////////////////////////////////////////////////////////////////////////////////
//
//  Licensed to the Apache Software Foundation (ASF) under one or more
//  contributor license agreements.  See the NOTICE file distributed with
//  this work for additional information regarding copyright ownership.
//  The ASF licenses this file to You under the Apache License, Version 2.0
//  (the "License"); you may not use this file except in compliance with
//  the License.  You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////

// Jewel NumericStepper

// NumericStepper variables

.jewel.numericstepper
    display: flex
    flex-flow: column wrap
    
    .jewel.spinner
        display: none
        order: -1
    .jewel.textinput
        display: inline-flex
        order: 0
        z-index: 1
    .jewel.button
        &::after
            content: ' '
            position: absolute
        &.up
            order: 1
        &.down
            order: 2

@media (max-width: $desktop)
    .jewel.numericstepper
        flex-flow: row nowrap

        .jewel.spinner

        .jewel.textinput
            order: 1
        .jewel.button
            &.up
                order: 2
            &.down
                order: 0                

j|NumericStepper
    IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.RangeModel")
    IBeadView: ClassReference("org.apache.royale.jewel.beads.views.NumericStepperView")
    IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.NumericStepperController")

@media -royale-swf
    j|NumericStepper
        // iBorderBead: ClassReference('org.apache.royale.html.beads.SingleLineBorderBead')
        // iBackgroundBead: ClassReference('org.apache.royale.html.beads.SolidBackgroundBead')
        // padding: 0px
        // border-style: none

// Jewel Spinner

// Spinner variables
.jewel.spinner
//     display: inline-flex
//     flex-direction: column
//     vertical-align: top

//     .jewel.button
//         display: flex

//         &.up
            
//         &.down

//         &.up, &.down
//             &::after
//                 content: ' '
//                 position: absolute
            
j|Spinner
    IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.RangeModel")
    IBeadView:  ClassReference("org.apache.royale.jewel.beads.views.SpinnerView")
    IBeadController:  ClassReference("org.apache.royale.jewel.beads.controllers.SpinnerMouseController")
    
@media -royale-swf
    j|Spinner
        // IBeadController: ClassReference("org.apache.royale.html.beads.controllers.SpinnerMouseController")