v2.15.0

InputNumber

Числовое поле ввода с гибкой настройкой диапазона.

Использование

Директива v-model управляет значением InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" />
</template>

Пропс default-value задаёт начальное значение, когда управлять состоянием не нужно.

<template>
  <B24InputNumber :default-value="5" />
</template>
Компонент использует пакет @internationalized/number, который предоставляет утилиты форматирования и разбора чисел для разных локалей и систем счисления.

Минимум и максимум

Пропсы min и max задают минимальное и максимальное значение InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :min="0" :max="10" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :min="0" :max="10" />
</template>

Шаг

Пропс step задаёт шаг изменения значения InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :step="2" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :step="2" />
</template>

Начальное значение 2.15+

Пропс starting-value задаёт значение первого увеличения или уменьшения, когда InputNumber пуст. Оно ограничивается min и max, но не выравнивается по step. По умолчанию равно min, а если min не задан — 0.

<template>
  <B24InputNumber :starting-value="18" placeholder="Возраст" />
</template>

Недопустимые значения 2.15+

Пропс allow-invalid сохраняет введённое значение, даже если оно вне диапазона min / max или не попадает в сетку step. Изменение значения в сторону диапазона по-прежнему возвращает его в диапазон и на сетку step.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :min="0" :max="10" allow-invalid />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :min="0" :max="10" allow-invalid />
</template>
InputNumber не помечает такое значение как недопустимое: проверять его нужно самостоятельно.

Ориентация

Пропс orientation меняет ориентацию InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" orientation="vertical" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" orientation="vertical" />
</template>

Плейсхолдер

Пропс placeholder задаёт текст плейсхолдера.

<template>
  <B24InputNumber placeholder="Введите число" />
</template>

Цвет

Пропс color меняет цвет кольца, когда InputNumber в фокусе.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" color="air-primary" highlight />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" color="air-primary" highlight />
</template>
Пропс highlight здесь показывает состояние фокуса. Внутри компонента он включается при ошибке валидации.

Тег

Свойство tag показывает Badge поверх InputNumber.

заметка
<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" tag="заметка" color="air-primary" highlight />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" tag="заметка" color="air-primary" highlight />
</template>

Свойство tagColor задаёт цвет Badge.

заметка
<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    tag="заметка"
    tag-color="air-secondary-alert"
    color="air-primary"
    highlight
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    tag="заметка"
    tag-color="air-secondary-alert"
    color="air-primary"
    highlight
  />
</template>
Пропс highlight здесь показывает состояние фокуса. Внутри компонента он включается при ошибке валидации.

Размер

Пропс size меняет размер InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" size="xl" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" size="xl" />
</template>

Отключение

Пропс disabled отключает InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" disabled />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" disabled />
</template>

Увеличение и уменьшение

Пропсы increment и decrement настраивают кнопки увеличения и уменьшения любыми пропсами Button.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :increment="{
      color: 'air-primary',
      size: 'xs'
    }"
    :decrement="{
      color: 'air-primary-alert',
      size: 'xs'
    }"
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :increment="{
      color: 'air-primary',
      size: 'xs'
    }"
    :decrement="{
      color: 'air-primary-alert',
      size: 'xs'
    }"
  />
</template>

Иконки увеличения и уменьшения

Пропсы increment-icon и decrement-icon меняют иконки кнопок.

<script setup lang="ts">
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :increment-icon="RocketIcon" :decrement-icon="RocketIcon" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value" :increment-icon="RocketIcon" :decrement-icon="RocketIcon" />
</template>

Без границы

Пропс noBorder убирает у InputNumber все границы (кольца).

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber no-border highlight v-model="value" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber no-border highlight v-model="value" />
</template>
Пропс highlight здесь показывает, что состояния фокуса нет.

Подчёркивание

Пропс underline убирает у InputNumber все границы (кольца), кроме нижней.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber underline highlight v-model="value" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber underline highlight v-model="value" />
</template>
Пропс highlight здесь показывает состояние фокуса.

Скругление

Пропс rounded скругляет InputNumber.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber rounded highlight v-model="value" />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber rounded highlight v-model="value" />
</template>
Пропс highlight здесь показывает состояние фокуса.

Примеры

С десятичным форматом

Пропс format-options настраивает формат значения.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :format-options="{
      signDisplay: 'exceptZero',
      minimumFractionDigits: 1
    }"
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :format-options="{
      signDisplay: 'exceptZero',
      minimumFractionDigits: 1
    }"
  />
</template>

С процентным форматом

Пропс format-options со значением style: 'percent' настраивает формат значения как процентный.

<script setup lang="ts">
const value = ref(0.05)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :step="0.01"
    :format-options="{
      style: 'percent'
    }"
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(0.05)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :step="0.01"
    :format-options="{
      style: 'percent'
    }"
  />
</template>

С денежным форматом

Пропс format-options со значением style: 'currency' настраивает формат значения как денежный.

<script setup lang="ts">
const value = ref(1500)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :step="0.01"
    :format-options="{
      style: 'currency',
      currency: 'EUR',
      currencyDisplay: 'code',
      currencySign: 'accounting'
    }"
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(1500)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :step="0.01"
    :format-options="{
      style: 'currency',
      currency: 'EUR',
      currencyDisplay: 'code',
      currencySign: 'accounting'
    }"
  />
</template>

Без кнопок

Пропсы increment и decrement управляют видимостью кнопок.

<script setup lang="ts">
const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :increment="false"
    :decrement="false"
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'

const value = ref(5)
</script>

<template>
  <B24InputNumber
    v-model="value"
    :increment="false"
    :decrement="false"
  />
</template>

Внутри FormField

InputNumber можно использовать внутри компонента FormField, чтобы показывать подпись, справочный текст, признак обязательности и так далее.

Укажите число попыток
<script setup lang="ts">
const retries = ref(0)
</script>

<template>
  <B24FormField label="Повторы" help="Укажите число попыток" required>
    <B24InputNumber v-model="retries" placeholder="Введите число повторов" />
  </B24FormField>
</template>
<script setup lang="ts">
import { ref } from 'vue'

const retries = ref(0)
</script>

<template>
  <B24FormField label="Повторы" help="Укажите число попыток" required>
    <B24InputNumber v-model="retries" placeholder="Введите число повторов" />
  </B24FormField>
</template>

Со слотами

Слоты #increment и #decrement позволяют настроить кнопки.

<script setup lang="ts">
import { ref } from 'vue'
import ArrowToTheLeftIcon from '@bitrix24/b24icons-vue/actions/ArrowToTheLeftIcon'
import ArrowToTheRightIcon from '@bitrix24/b24icons-vue/actions/ArrowToTheRightIcon'

const value = ref(5)
</script>

<template>
  <B24InputNumber v-model="value">
    <template #decrement>
      <B24Button size="md" rounded :icon="ArrowToTheLeftIcon" />
    </template>

    <template #increment>
      <B24Button size="md" rounded :icon="ArrowToTheRightIcon" />
    </template>
  </B24InputNumber>
</template>

API

Пропсы

Prop Default Type
as'div'any

The element or component this component should render as.

placeholder string

The placeholder text when the input is empty.

color'air-primary'"air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-warning" | "air-primary-copilot"
size'md' "xss" | "xs" | "sm" | "md" | "lg" | "xl"
noBorderfalseboolean

Removes all borders (rings)

underlinefalseboolean

Removes all borders (rings) except the bottom one

roundedfalseboolean

Rounds the corners of the input

tag string
tagColor'air-primary'"air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-warning" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "air-selection"
highlightboolean

Highlight the ring color like a focus state.

fixedboolean

Keep the mobile text size on all breakpoints. (Left for backward compatibility.)

orientation'horizontal' "horizontal" | "vertical"

The orientation of the input number.

incrementtrueboolean | Omit<ButtonProps, LinkPropsKeys>

Configure the increment button. The size is inherited.

incrementIconicons.plusIconComponent

The icon displayed to increment the value.

incrementDisabledboolean

Disable the increment button.

decrementtrueboolean | Omit<ButtonProps, LinkPropsKeys>

Configure the decrement button. The size is inherited.

decrementIconicons.minusIconComponent

The icon displayed to decrement the value.

decrementDisabledboolean

Disable the decrement button.

autofocusboolean
autofocusDelay number
defaultValue NonNullable<T>
modelValue T | Mod extends { optional: true; } ? undefined : never
modelModifiers Mod
min number

The smallest value allowed for the input.

max number

The largest value allowed for the input.

step number

The amount that the input value changes with each increment or decrement "tick".

stepSnappingboolean

When false, prevents the value from snapping to the nearest increment of the step value

startingValue number

The value the first increment or decrement sets when the field is empty. It is clamped to min/max but not snapped to step. Defaults to min, or 0 when min is not set.

allowInvalidboolean

When true, a typed value is kept as-is even if invalid (out of min/max range or off the step grid); step interactions still clamp and snap. The field does not flag the value as invalid (no aria-invalid/data-invalid), so validating and surfacing the error is up to the consumer.

disabledboolean

When true, prevents the user from interacting with the Number Field.

requiredboolean

When true, indicates that the user must set the value before the owning form can be submitted.

id string

Id of the element

name string

The name of the field. Submitted with its owning form as part of a name/value pair.

formatOptions Intl.NumberFormatOptions

Formatting options for the value displayed in the number field. This also affects what characters are allowed to be typed by the user.

disableWheelChangeboolean

When true, prevents the value from changing on wheel scroll.

invertWheelChangeboolean

When true, inverts the direction of the wheel change.

readonlyboolean

When true, the Number Field is read-only.

focusOnChangeboolean

When true, the input will be focused when the value changes.

locale string

The locale to use for formatting and currencies

list string
autocomplete "on" | "off" | string & {}
b24ui { root?: SlotClass; base?: SlotClass; increment?: SlotClass; decrement?: SlotClass; tag?: SlotClass; }
Компонент поддерживает и все нативные HTML-атрибуты <input>.

Слоты

Slot Type
increment{}
decrement{}

События

Event Type
update:modelValue[value: ApplyModifiers<T, Mod>]
blur[event: FocusEvent]
change[event: Event]

Доступ через ref

При обращении к компоненту через ref в шаблоне доступно:

ИмяТип
inputRefRef<HTMLInputElement | null>

Тема

https://github.com/bx-shef/b24-ui/tree/main/src/theme/input-number.ts
export default {
  slots: {
    root: 'isolate relative inline-flex items-center',
    base: 'w-full py-0 border-0 focus:outline-none disabled:cursor-not-allowed disabled:pointer-events-auto disabled:select-none disabled:opacity-30 disabled:resize-none appearance-none transition-colors duration-300 ease-linear text-(--ui-color-base-1) style-blurred-bg-input placeholder:text-(--ui-color-design-plain-na-content-secondary) hover:text-(--ui-color-base-1) focus:text-(--ui-color-base-1) active:text-(--ui-color-base-1) font-[family-name:var(--ui-font-family-primary)] font-(--ui-font-weight-regular) align-middle text-ellipsis whitespace-nowrap',
    increment: 'absolute flex items-center',
    decrement: 'absolute flex items-center',
    tag: 'pointer-events-none select-none absolute z-10 -top-[7px] right-[14px] flex flex-col justify-center items-center'
  },
  variants: {
    fieldGroup: {
      horizontal: {
        root: 'group leading-none has-focus-visible:z-[1]',
        base: 'focus-visible:outline-none ring ring-inset ring-1 focus-visible:ring-2 group-not-only:group-first:rounded-e-3xl group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none group-not-only:group-first:border-e-0 group-not-only:group-not-first:border-s-0'
      },
      vertical: {
        root: 'group has-focus-visible:z-[1]',
        base: 'focus-visible:outline-none ring ring-inset ring-1 focus-visible:ring-2 group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none'
      }
    },
    noSplit: {
      false: "group-not-only:not-first:after:content-[''] group-not-only:not-first:after:absolute group-not-only:not-first:after:top-[7px] group-not-only:not-first:after:bottom-[6px] group-not-only:not-first:after:left-0 group-not-only:not-first:after:w-px group-not-only:not-first:after:bg-current/30"
    },
    size: {
      xss: 'px-2 h-[20px] gap-1 text-(length:--ui-font-size-4xs)/[normal]',
      xs: 'px-2 h-[24px] gap-1 text-(length:--ui-font-size-xs)/[normal]',
      sm: 'px-2.5 h-[28px] gap-1.5 text-(length:--ui-font-size-sm)/[normal]',
      md: 'px-2.5 h-[34px] gap-1.5 text-(length:--ui-font-size-lg)/[normal]',
      lg: 'px-3 h-[38px] gap-2 text-(length:--ui-font-size-lg)/[normal]',
      xl: 'px-3 h-[46px] gap-2 text-(length:--ui-font-size-2xl)/[normal]'
    },
    color: {
      'air-primary': {
        base: 'style-filled'
      },
      'air-primary-success': {
        base: 'style-filled-success'
      },
      'air-primary-alert': {
        base: 'style-filled-alert'
      },
      'air-primary-copilot': {
        base: 'style-filled-copilot'
      },
      'air-primary-warning': {
        base: 'style-filled-warning'
      },
      default: {
        base: 'style-old-default'
      },
      danger: {
        base: 'style-old-danger'
      },
      success: {
        base: 'style-old-success'
      },
      warning: {
        base: 'style-old-warning'
      },
      primary: {
        base: 'style-old-primary'
      },
      secondary: {
        base: 'style-old-secondary'
      },
      collab: {
        base: 'style-old-collab'
      },
      ai: {
        base: 'style-old-ai'
      }
    },
    rounded: {
      true: 'rounded-(--ui-border-radius-3xl)',
      false: 'rounded-(--ui-border-radius-sm)'
    },
    noBorder: {
      true: 'ring-0 focus-visible:ring-0 style-transparent-bg'
    },
    underline: {
      true: 'rounded-none ring-0 focus-visible:ring-0 style-transparent-bg border-b-1 border-b-(--ui-color-design-outline-stroke)'
    },
    disabled: {
      true: {
        increment: 'cursor-not-allowed',
        decrement: 'cursor-not-allowed'
      }
    },
    orientation: {
      horizontal: {
        base: 'text-center',
        increment: 'inset-y-0 end-0 py-0 pe-0 [&>button]:p-1',
        decrement: 'inset-y-0 start-0 py-0 ps-0 [&>button]:p-1'
      },
      vertical: {
        increment: 'top-1 end-0 pe-1 [&>button]:p-0',
        decrement: 'bottom-1 end-0 pe-1 [&>button]:p-0'
      }
    },
    highlight: {
      true: ''
    },
    fixed: {
      false: ''
    },
    increment: {
      false: ''
    },
    decrement: {
      false: ''
    }
  },
  compoundVariants: [
    {
      highlight: false,
      noBorder: false,
      underline: false,
      class: {
        base: 'ring ring-inset ring-(--ui-color-design-outline-stroke) focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--b24ui-border-color) hover:not-disabled:not-data-disabled:ring-1 hover:not-disabled:not-data-disabled:ring-inset hover:not-disabled:not-data-disabled:ring-(--b24ui-border-color) data-[state=open]:ring-1 data-[state=open]:ring-inset data-[state=open]:ring-(--b24ui-border-color)'
      }
    },
    {
      highlight: true,
      noBorder: false,
      underline: false,
      class: {
        base: 'ring ring-inset ring-(--b24ui-border-color) focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--b24ui-border-color) hover:ring-1 hover:ring-inset hover:ring-(--b24ui-border-color) data-[state=open]:ring-1 data-[state=open]:ring-inset data-[state=open]:ring-(--b24ui-border-color)'
      }
    },
    {
      noBorder: false,
      underline: true,
      class: {
        base: 'focus-visible:border-(--b24ui-border-color)'
      }
    },
    {
      highlight: true,
      noBorder: false,
      underline: true,
      class: {
        base: 'ring-0 border-b-(--b24ui-border-color)'
      }
    },
    {
      highlight: true,
      noBorder: true,
      underline: false,
      class: {
        base: 'ring-0'
      }
    },
    {
      orientation: 'horizontal',
      rounded: true,
      class: {
        increment: '[&>button]:rounded-3xl',
        decrement: '[&>button]:rounded-3xl'
      }
    },
    {
      orientation: 'horizontal',
      decrement: false,
      class: {
        base: 'text-start'
      }
    },
    {
      orientation: 'horizontal',
      size: 'xss',
      class: {
        increment: '[&>button]:p-[2px] [&>button]:h-[24px] scale-70',
        decrement: '[&>button]:p-[2px] [&>button]:h-[24px] scale-70'
      }
    },
    {
      orientation: 'horizontal',
      size: 'xs',
      class: {
        increment: '[&>button]:p-[2px] [&>button]:h-[24px] scale-70',
        decrement: '[&>button]:p-[2px] [&>button]:h-[24px] scale-70'
      }
    },
    {
      orientation: 'horizontal',
      size: 'sm',
      class: {
        increment: '[&>button]:p-[2px] scale-70',
        decrement: '[&>button]:p-[2px] scale-70'
      }
    },
    {
      orientation: 'horizontal',
      size: 'md',
      class: {
        increment: '[&>button]:p-[2px] scale-60',
        decrement: '[&>button]:p-[2px] scale-60'
      }
    },
    {
      orientation: 'horizontal',
      size: 'lg',
      class: {
        increment: '[&>button]:p-[2px] scale-60',
        decrement: '[&>button]:p-[2px] scale-60'
      }
    },
    {
      orientation: 'horizontal',
      size: 'xl',
      class: {
        increment: '[&>button]:p-[4px] scale-60',
        decrement: '[&>button]:p-[4px] scale-60'
      }
    },
    {
      orientation: 'vertical',
      size: 'xss',
      class: {
        increment: 'top-0 pe-0 [&>button]:h-[13px] scale-56',
        decrement: 'bottom-0 pe-0 [&>button]:h-[13px] scale-56'
      }
    },
    {
      orientation: 'vertical',
      size: 'xs',
      class: {
        increment: 'top-0 pe-0 [&>button]:h-[13px] scale-80',
        decrement: 'bottom-0 pe-0 [&>button]:h-[13px] scale-80'
      }
    },
    {
      orientation: 'vertical',
      size: 'sm',
      class: {
        increment: 'top-0 pe-0 [&>button]:h-[15px] scale-80',
        decrement: 'bottom-0 pe-0 [&>button]:h-[15px] scale-80'
      }
    },
    {
      orientation: 'vertical',
      size: 'md',
      class: {
        increment: 'top-0 pe-0 [&>button]:h-4.5 scale-80',
        decrement: 'bottom-0 pe-0 [&>button]:h-4.5 scale-80'
      }
    },
    {
      orientation: 'vertical',
      size: 'lg',
      class: {
        increment: '[&>button]:h-[16px] scale-80',
        decrement: '[&>button]:h-[16px] scale-80'
      }
    },
    {
      orientation: 'vertical',
      size: 'xl',
      class: {
        increment: '[&>button]:h-[20px] scale-80',
        decrement: '[&>button]:h-[20px] scale-80'
      }
    },
    {
      decrement: true,
      size: 'xss',
      class: {
        base: 'ps-[24px]'
      }
    },
    {
      decrement: true,
      size: 'xs',
      class: {
        base: 'ps-[24px]'
      }
    },
    {
      decrement: true,
      size: 'sm',
      class: {
        base: 'ps-[28px]'
      }
    },
    {
      decrement: true,
      size: 'md',
      class: {
        base: 'ps-[30px]'
      }
    },
    {
      decrement: true,
      size: 'lg',
      class: {
        base: 'ps-[30px]'
      }
    },
    {
      decrement: true,
      size: 'xl',
      class: {
        base: 'ps-[40px]'
      }
    },
    {
      increment: true,
      size: 'xss',
      class: {
        base: 'pe-[24px]'
      }
    },
    {
      increment: true,
      size: 'xs',
      class: {
        base: 'pe-[24px]'
      }
    },
    {
      increment: true,
      size: 'sm',
      class: {
        base: 'pe-[30px]',
        increment: 'top-0 pe-0 [&>button]:h-[15px] scale-80',
        decrement: 'bottom-0 pe-0 [&>button]:h-[15px] scale-80'
      }
    },
    {
      increment: true,
      size: 'md',
      class: {
        base: 'pe-[34px]'
      }
    },
    {
      increment: true,
      size: 'lg',
      class: {
        base: 'pe-[38px]'
      }
    },
    {
      increment: true,
      size: 'xl',
      class: {
        base: 'pe-[38px]'
      }
    },
    {
      fieldGroup: [
        'horizontal',
        'vertical'
      ],
      size: [
        'xl',
        'lg',
        'md'
      ],
      rounded: false,
      class: 'rounded-(--ui-border-radius-md)'
    },
    {
      fieldGroup: [
        'horizontal',
        'vertical'
      ],
      size: 'sm',
      rounded: false,
      class: 'rounded-(--ui-border-radius-sm)'
    },
    {
      fieldGroup: [
        'horizontal',
        'vertical'
      ],
      size: 'xs',
      rounded: false,
      class: 'rounded-(--ui-border-radius-xs)'
    },
    {
      fieldGroup: [
        'horizontal',
        'vertical'
      ],
      size: 'xss',
      rounded: false,
      class: 'rounded-[5px]'
    },
    {
      fixed: false,
      size: 'xss',
      class: 'md:text-(length:--ui-font-size-4xs)/[normal]'
    },
    {
      fixed: false,
      size: 'xs',
      class: 'md:text-(length:--ui-font-size-xs)/[normal]'
    },
    {
      fixed: false,
      size: 'sm',
      class: 'md:text-(length:--ui-font-size-sm)/[normal]'
    },
    {
      fixed: false,
      size: 'md',
      class: 'md:text-(length:--ui-font-size-lg)/[normal]'
    },
    {
      fixed: false,
      size: 'lg',
      class: 'md:text-(length:--ui-font-size-lg)/[normal]'
    }
  ],
  defaultVariants: {
    color: 'air-primary',
    size: 'md'
  }
}