@webx-ui/core 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/components/Card/Card.d.ts +3 -1
- package/dist/components/Card/types.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +41 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/types.d.ts +18 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +37 -0
- package/dist/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/components/CheckboxGroup/types.d.ts +23 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +25 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/types.d.ts +21 -0
- package/dist/components/DatePicker/DatePicker.d.ts +54 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/types.d.ts +47 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +51 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/types.d.ts +37 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +52 -0
- package/dist/components/DateTimePicker/index.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +32 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/types.d.ts +22 -0
- package/dist/components/FormItem/FormItem.d.ts +33 -0
- package/dist/components/FormItem/index.d.ts +2 -0
- package/dist/components/FormItem/types.d.ts +24 -0
- package/dist/components/Input/Input.d.ts +11 -10
- package/dist/components/Input/types.d.ts +2 -0
- package/dist/components/InputNumber/InputNumber.d.ts +41 -0
- package/dist/components/InputNumber/index.d.ts +2 -0
- package/dist/components/InputNumber/types.d.ts +34 -0
- package/dist/components/Radio/Radio.d.ts +36 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/types.d.ts +16 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +35 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RadioGroup/types.d.ts +19 -0
- package/dist/components/Rate/Rate.d.ts +24 -0
- package/dist/components/Rate/index.d.ts +2 -0
- package/dist/components/Rate/types.d.ts +22 -0
- package/dist/components/RichText/RichText.d.ts +38 -0
- package/dist/components/RichText/ToolbarButton.d.ts +20 -0
- package/dist/components/RichText/icons.d.ts +6 -0
- package/dist/components/RichText/index.d.ts +2 -0
- package/dist/components/RichText/tools.d.ts +48 -0
- package/dist/components/RichText/types.d.ts +42 -0
- package/dist/components/Select/Select.d.ts +50 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/types.d.ts +41 -0
- package/dist/components/Slider/Slider.d.ts +26 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/types.d.ts +24 -0
- package/dist/components/Switch/Switch.d.ts +38 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/types.d.ts +18 -0
- package/dist/components/TagsInput/TagsInput.d.ts +32 -0
- package/dist/components/TagsInput/index.d.ts +2 -0
- package/dist/components/TagsInput/types.d.ts +26 -0
- package/dist/components/Textarea/Textarea.d.ts +39 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/types.d.ts +31 -0
- package/dist/components/TimePicker/TimePicker.d.ts +52 -0
- package/dist/components/TimePicker/index.d.ts +1 -0
- package/dist/components/index.d.ts +20 -1
- package/dist/composables/useFormField.d.ts +64 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2418 -164
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/Button/Button.vue","../src/components/Input/Input.vue","../src/components/Card/Card.vue","../src/plugin.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './types'\n\ndefineOptions({ name: 'WxButton', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n type: 'default',\n variant: 'solid',\n size: 'md',\n disabled: false,\n loading: false,\n block: false,\n round: false,\n href: undefined,\n target: undefined,\n nativeType: 'button',\n})\n\nconst emit = defineEmits<ButtonEmits>()\n\nconst isDisabled = computed(() => props.disabled || props.loading)\nconst tag = computed(() => (props.href ? 'a' : 'button'))\n\nconst classes = computed(() => [\n 'wx-button',\n `wx-button--${props.type}`,\n `wx-button--${props.variant}`,\n `wx-button--${props.size}`,\n {\n 'wx-button--block': props.block,\n 'wx-button--round': props.round,\n 'wx-button--loading': props.loading,\n 'is-disabled': isDisabled.value,\n },\n])\n\nconst nativeAttrs = computed(() =>\n props.href\n ? {\n href: isDisabled.value ? undefined : props.href,\n target: props.target,\n role: 'button',\n 'aria-disabled': isDisabled.value ? 'true' : undefined,\n tabindex: isDisabled.value ? -1 : undefined,\n }\n : {\n type: props.nativeType,\n disabled: isDisabled.value,\n },\n)\n\nfunction onClick(event: MouseEvent) {\n if (isDisabled.value) {\n event.preventDefault()\n event.stopPropagation()\n return\n }\n emit('click', event)\n}\n</script>\n\n<template>\n <component\n :is=\"tag\"\n v-bind=\"{ ...nativeAttrs, ...$attrs }\"\n :class=\"classes\"\n :aria-busy=\"loading || undefined\"\n @click=\"onClick\"\n >\n <span v-if=\"loading\" class=\"wx-button__spinner\" aria-hidden=\"true\" />\n <span v-else-if=\"$slots.icon\" class=\"wx-button__icon\">\n <slot name=\"icon\" />\n </span>\n <span v-if=\"$slots.default\" class=\"wx-button__label\">\n <slot />\n </span>\n </component>\n</template>\n\n<style scoped>\n.wx-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--wx-space-2);\n box-sizing: border-box;\n border: 1px solid transparent;\n border-radius: var(--wx-radius-md);\n font-family: inherit;\n font-weight: var(--wx-font-weight-medium);\n line-height: var(--wx-font-line-height-tight);\n text-decoration: none;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition:\n background-color var(--wx-duration-fast) var(--wx-easing-standard),\n border-color var(--wx-duration-fast) var(--wx-easing-standard),\n color var(--wx-duration-fast) var(--wx-easing-standard),\n box-shadow var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-button:focus-visible {\n outline: none;\n box-shadow: var(--wx-ring-focus);\n}\n\n/* sizes */\n.wx-button--sm {\n height: var(--wx-size-control-sm);\n padding: 0 var(--wx-space-3);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-button--md {\n height: var(--wx-size-control-md);\n padding: 0 var(--wx-space-5);\n font-size: var(--wx-font-size-md);\n}\n\n.wx-button--lg {\n height: var(--wx-size-control-lg);\n padding: 0 var(--wx-space-7);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-button--block {\n display: flex;\n width: 100%;\n}\n\n.wx-button--round {\n border-radius: var(--wx-radius-full);\n}\n\n/* solid */\n.wx-button--solid.wx-button--default {\n background: var(--wx-bg-surface);\n border-color: var(--wx-border-strong);\n color: var(--wx-text-default);\n}\n\n.wx-button--solid.wx-button--default:hover:not(.is-disabled) {\n background: var(--wx-bg-muted);\n}\n\n.wx-button--solid.wx-button--primary {\n background: var(--wx-color-primary);\n color: var(--wx-color-primary-contrast);\n}\n\n.wx-button--solid.wx-button--primary:hover:not(.is-disabled) {\n background: var(--wx-color-primary-hover);\n}\n\n.wx-button--solid.wx-button--success {\n background: var(--wx-color-success);\n color: var(--wx-color-primary-contrast);\n}\n\n.wx-button--solid.wx-button--warning {\n background: var(--wx-color-warning);\n color: var(--wx-color-primary-contrast);\n}\n\n.wx-button--solid.wx-button--danger {\n background: var(--wx-color-danger);\n color: var(--wx-color-danger-contrast);\n}\n\n.wx-button--solid.wx-button--danger:hover:not(.is-disabled) {\n background: var(--wx-color-danger-hover);\n}\n\n.wx-button--solid.wx-button--success:hover:not(.is-disabled),\n.wx-button--solid.wx-button--warning:hover:not(.is-disabled) {\n filter: brightness(0.94);\n}\n\n/* outline */\n.wx-button--outline {\n background: transparent;\n border-color: var(--wx-border-strong);\n color: var(--wx-text-default);\n}\n\n.wx-button--outline.wx-button--primary {\n border-color: var(--wx-color-primary);\n color: var(--wx-color-primary);\n}\n\n.wx-button--outline.wx-button--success {\n border-color: var(--wx-color-success);\n color: var(--wx-color-success);\n}\n\n.wx-button--outline.wx-button--warning {\n border-color: var(--wx-color-warning);\n color: var(--wx-color-warning);\n}\n\n.wx-button--outline.wx-button--danger {\n border-color: var(--wx-color-danger);\n color: var(--wx-color-danger);\n}\n\n.wx-button--outline:hover:not(.is-disabled) {\n background: var(--wx-bg-muted);\n}\n\n.wx-button--outline.wx-button--primary:hover:not(.is-disabled) {\n background: var(--wx-color-primary-soft);\n}\n\n.wx-button--outline.wx-button--danger:hover:not(.is-disabled) {\n background: var(--wx-color-danger-soft);\n}\n\n/* text */\n.wx-button--text {\n background: transparent;\n border-color: transparent;\n color: var(--wx-text-default);\n}\n\n.wx-button--text.wx-button--primary {\n color: var(--wx-color-primary);\n}\n\n.wx-button--text.wx-button--danger {\n color: var(--wx-color-danger);\n}\n\n.wx-button--text.wx-button--success {\n color: var(--wx-color-success);\n}\n\n.wx-button--text.wx-button--warning {\n color: var(--wx-color-warning);\n}\n\n.wx-button--text:hover:not(.is-disabled) {\n background: var(--wx-bg-muted);\n}\n\n/* states */\n.wx-button.is-disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.wx-button--loading {\n cursor: progress;\n}\n\n.wx-button__spinner {\n width: 1em;\n height: 1em;\n border: 2px solid currentcolor;\n border-right-color: transparent;\n border-radius: var(--wx-radius-full);\n animation: wx-button-spin var(--wx-duration-slow) linear infinite;\n}\n\n.wx-button__icon {\n display: inline-flex;\n align-items: center;\n}\n\n@keyframes wx-button-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wx-button {\n transition: none;\n }\n\n .wx-button__spinner {\n animation-duration: 2s;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport type { InputEmits, InputModelValue, InputProps } from './types'\n\ndefineOptions({ name: 'WxInput', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<InputProps>(), {\n type: 'text',\n size: 'md',\n status: 'default',\n placeholder: undefined,\n disabled: false,\n readonly: false,\n clearable: false,\n maxlength: undefined,\n showCount: false,\n autocomplete: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<InputEmits>()\n\nconst model = defineModel<InputModelValue>({ default: '' })\n\nconst inputRef = ref<HTMLInputElement | null>(null)\nconst focused = ref(false)\n\nconst currentValue = computed(() => (model.value == null ? '' : String(model.value)))\n\nconst showClear = computed(\n () => props.clearable && !props.disabled && !props.readonly && currentValue.value.length > 0,\n)\n\nconst counter = computed(() =>\n props.showCount && props.maxlength ? `${currentValue.value.length}/${props.maxlength}` : null,\n)\n\nconst classes = computed(() => [\n 'wx-input',\n `wx-input--${props.size}`,\n {\n [`wx-input--${props.status}`]: props.status !== 'default',\n 'is-focused': focused.value,\n 'is-disabled': props.disabled,\n 'is-readonly': props.readonly,\n },\n])\n\nfunction onInput(event: Event) {\n const value = (event.target as HTMLInputElement).value\n model.value = value\n emit('input', value)\n}\n\nfunction onChange(event: Event) {\n emit('change', (event.target as HTMLInputElement).value)\n}\n\nfunction onFocus(event: FocusEvent) {\n focused.value = true\n emit('focus', event)\n}\n\nfunction onBlur(event: FocusEvent) {\n focused.value = false\n emit('blur', event)\n}\n\nfunction clear() {\n model.value = ''\n emit('input', '')\n emit('change', '')\n emit('clear')\n inputRef.value?.focus()\n}\n\ndefineExpose({\n focus: () => inputRef.value?.focus(),\n blur: () => inputRef.value?.blur(),\n select: () => inputRef.value?.select(),\n input: inputRef,\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <span v-if=\"$slots.prefix\" class=\"wx-input__affix wx-input__affix--prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <input\n ref=\"inputRef\"\n v-bind=\"$attrs\"\n class=\"wx-input__inner\"\n :type=\"type\"\n :value=\"currentValue\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :maxlength=\"maxlength\"\n :autocomplete=\"autocomplete\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"status === 'error' || undefined\"\n @input=\"onInput\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n />\n\n <button\n v-if=\"showClear\"\n class=\"wx-input__clear\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n @click=\"clear\"\n >\n ✕\n </button>\n\n <span v-if=\"counter\" class=\"wx-input__count\">{{ counter }}</span>\n\n <span v-if=\"$slots.suffix\" class=\"wx-input__affix wx-input__affix--suffix\">\n <slot name=\"suffix\" />\n </span>\n </div>\n</template>\n\n<style scoped>\n.wx-input {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-2);\n box-sizing: border-box;\n width: 100%;\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-md);\n color: var(--wx-text-default);\n transition:\n border-color var(--wx-duration-fast) var(--wx-easing-standard),\n box-shadow var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-input:hover:not(.is-disabled) {\n border-color: var(--wx-border-strong);\n}\n\n.wx-input.is-focused {\n border-color: var(--wx-border-focus);\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-input--sm {\n height: var(--wx-size-control-sm);\n padding: 0 var(--wx-space-3);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-input--md {\n height: var(--wx-size-control-md);\n padding: 0 var(--wx-space-4);\n font-size: var(--wx-font-size-md);\n}\n\n.wx-input--lg {\n height: var(--wx-size-control-lg);\n padding: 0 var(--wx-space-5);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-input--error {\n border-color: var(--wx-color-danger);\n}\n\n.wx-input--error.is-focused {\n box-shadow: 0 0 0 3px var(--wx-color-danger-soft);\n}\n\n.wx-input--success {\n border-color: var(--wx-color-success);\n}\n\n.wx-input--warning {\n border-color: var(--wx-color-warning);\n}\n\n.wx-input.is-disabled {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-input__inner {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n.wx-input__inner::placeholder {\n color: var(--wx-text-muted);\n}\n\n.wx-input__inner:disabled {\n cursor: not-allowed;\n}\n\n.wx-input__affix,\n.wx-input__count {\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n color: var(--wx-text-muted);\n}\n\n.wx-input__count {\n font-size: var(--wx-font-size-xs);\n font-variant-numeric: tabular-nums;\n}\n\n.wx-input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n width: 16px;\n height: 16px;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: var(--wx-radius-full);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-xs);\n line-height: 1;\n cursor: pointer;\n}\n\n.wx-input__clear:hover {\n background: var(--wx-bg-muted);\n color: var(--wx-text-default);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport type { CardProps } from './types'\n\ndefineOptions({ name: 'WxCard' })\n\nconst props = withDefaults(defineProps<CardProps>(), {\n title: undefined,\n shadow: 'never',\n padding: 'md',\n borderless: false,\n})\n\nconst slots = useSlots()\n\nconst hasHeader = computed(() => Boolean(props.title || slots.header || slots.extra))\n\nconst classes = computed(() => [\n 'wx-card',\n `wx-card--shadow-${props.shadow}`,\n `wx-card--padding-${props.padding}`,\n { 'wx-card--borderless': props.borderless },\n])\n</script>\n\n<template>\n <section :class=\"classes\">\n <header v-if=\"hasHeader\" class=\"wx-card__header\">\n <div class=\"wx-card__title\">\n <slot name=\"header\">{{ title }}</slot>\n </div>\n <div v-if=\"$slots.extra\" class=\"wx-card__extra\">\n <slot name=\"extra\" />\n </div>\n </header>\n\n <div class=\"wx-card__body\">\n <slot />\n </div>\n\n <footer v-if=\"$slots.footer\" class=\"wx-card__footer\">\n <slot name=\"footer\" />\n </footer>\n </section>\n</template>\n\n<style scoped>\n.wx-card {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-lg);\n color: var(--wx-text-default);\n transition: box-shadow var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-card--borderless {\n border-color: transparent;\n}\n\n.wx-card--shadow-always {\n box-shadow: var(--wx-shadow-card);\n}\n\n.wx-card--shadow-hover:hover {\n box-shadow: var(--wx-shadow-popover);\n}\n\n.wx-card__header,\n.wx-card__body,\n.wx-card__footer {\n padding: var(--wx-card-padding, var(--wx-space-5));\n}\n\n.wx-card--padding-none {\n --wx-card-padding: 0px;\n}\n\n.wx-card--padding-sm {\n --wx-card-padding: var(--wx-space-3);\n}\n\n.wx-card--padding-md {\n --wx-card-padding: var(--wx-space-5);\n}\n\n.wx-card--padding-lg {\n --wx-card-padding: var(--wx-space-7);\n}\n\n.wx-card__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wx-space-4);\n border-bottom: 1px solid var(--wx-border-muted);\n}\n\n.wx-card__title {\n min-width: 0;\n color: var(--wx-text-strong);\n font-size: var(--wx-font-size-lg);\n font-weight: var(--wx-font-weight-semibold);\n line-height: var(--wx-font-line-height-tight);\n}\n\n.wx-card__extra {\n flex: 0 0 auto;\n color: var(--wx-text-muted);\n}\n\n.wx-card__body {\n flex: 1 1 auto;\n}\n\n.wx-card__footer {\n border-top: 1px solid var(--wx-border-muted);\n}\n</style>\n","import type { App, Plugin } from 'vue'\nimport * as components from './components'\n\nexport interface WebxUiOptions {\n /**\n * Prefix used when registering components globally.\n * Components are declared as `WxButton`, so the default keeps that name.\n */\n prefix?: string\n}\n\n/**\n * Registers every component globally:\n *\n * ```ts\n * import { WebxUI } from '@webx-ui/core'\n * import '@webx-ui/core/style.css'\n *\n * app.use(WebxUI)\n * ```\n *\n * Prefer named imports when bundle size matters — they tree-shake.\n */\nexport const WebxUI: Plugin<[WebxUiOptions?]> = {\n install(app: App, options: WebxUiOptions = {}) {\n const { prefix = 'Wx' } = options\n\n for (const [name, component] of Object.entries(components)) {\n if (!name.startsWith('Wx')) continue\n const registeredName = prefix === 'Wx' ? name : `${prefix}${name.slice(2)}`\n app.component(registeredName, component)\n }\n },\n}\n\nexport default WebxUI\n"],"names":["props","__props","emit","__emit","isDisabled","computed","tag","classes","nativeAttrs","onClick","event","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","$attrs","_createElementBlock","_hoisted_1","$slots","_hoisted_2","_renderSlot","_ctx","_hoisted_3","model","_useModel","inputRef","ref","focused","currentValue","showClear","counter","onInput","value","onChange","onFocus","onBlur","clear","__expose","_createElementVNode","_toDisplayString","_hoisted_4","slots","useSlots","hasHeader","_hoisted_5","WebxUI","app","options","prefix","name","component","components","registeredName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GAaRC,IAAOC,GAEPC,IAAaC,EAAS,MAAML,EAAM,YAAYA,EAAM,OAAO,GAC3DM,IAAMD,EAAS,MAAOL,EAAM,OAAO,MAAM,QAAS,GAElDO,IAAUF,EAAS,MAAM;AAAA,MAC7B;AAAA,MACA,cAAcL,EAAM,IAAI;AAAA,MACxB,cAAcA,EAAM,OAAO;AAAA,MAC3B,cAAcA,EAAM,IAAI;AAAA,MACxB;AAAA,QACE,oBAAoBA,EAAM;AAAA,QAC1B,oBAAoBA,EAAM;AAAA,QAC1B,sBAAsBA,EAAM;AAAA,QAC5B,eAAeI,EAAW;AAAA,MAAA;AAAA,IAC5B,CACD,GAEKI,IAAcH;AAAA,MAAS,MAC3BL,EAAM,OACF;AAAA,QACE,MAAMI,EAAW,QAAQ,SAAYJ,EAAM;AAAA,QAC3C,QAAQA,EAAM;AAAA,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;AAAA,MAjBA,SAAOT,EAAA,KAAO;AAAA,IAAA;MACRoC,EAAA,SAAdhC,EAAA,GAAAK,EAOS,UAPTC,GAOS;AAAA,QANPqB,EAEM,OAFNnB,GAEM;AAAA,UADJC,EAAsCC,wBAAtC,MAAsC;AAAA,gBAAfpB,EAAA,KAAK,GAAA,CAAA;AAAA,UAAA;;QAEnBiB,EAAAA,OAAO,SAAlBP,KAAAK,EAEM,OAFNM,GAEM;AAAA,UADJF,EAAqBC,EAAA,QAAA,SAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA;;MAIzBiB,EAEM,OAFNE,GAEM;AAAA,QADJpB,EAAQC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;MAGIH,EAAAA,OAAO,UAArBP,KAAAK,EAES,UAFT4B,GAES;AAAA,QADPxB,EAAsBC,EAAA,QAAA,UAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;;;;;;;;8CClBfwB,KAAmC;AAAA,EAC9C,QAAQC,GAAUC,IAAyB,IAAI;AAC7C,UAAM,EAAE,QAAAC,IAAS,KAAA,IAASD;AAE1B,eAAW,CAACE,GAAMC,CAAS,KAAK,OAAO,QAAQC,EAAU,GAAG;AAC1D,UAAI,CAACF,EAAK,WAAW,IAAI,EAAG;AAC5B,YAAMG,IAAiBJ,MAAW,OAAOC,IAAO,GAAGD,CAAM,GAAGC,EAAK,MAAM,CAAC,CAAC;AACzE,MAAAH,EAAI,UAAUM,GAAgBF,CAAS;AAAA,IACzC;AAAA,EACF;AACF;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Button/Button.vue","../src/components/Card/Card.vue","../src/composables/useFormField.ts","../src/components/Checkbox/Checkbox.vue","../src/components/CheckboxGroup/CheckboxGroup.vue","../src/components/ColorPicker/ColorPicker.vue","../src/components/DatePicker/DatePicker.vue","../src/components/DateRangePicker/DateRangePicker.vue","../src/components/DateTimePicker/DateTimePicker.vue","../src/components/Form/Form.vue","../src/components/FormItem/FormItem.vue","../src/components/Input/Input.vue","../src/components/InputNumber/InputNumber.vue","../src/components/Radio/Radio.vue","../src/components/RadioGroup/RadioGroup.vue","../src/components/Rate/Rate.vue","../src/components/RichText/icons.ts","../src/components/RichText/ToolbarButton.vue","../src/components/RichText/tools.ts","../src/components/RichText/RichText.vue","../src/components/Select/Select.vue","../src/components/Slider/Slider.vue","../src/components/Switch/Switch.vue","../src/components/TagsInput/TagsInput.vue","../src/components/Textarea/Textarea.vue","../src/components/TimePicker/TimePicker.vue","../src/plugin.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './types'\n\ndefineOptions({ name: 'WxButton', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n type: 'default',\n variant: 'solid',\n size: 'md',\n disabled: false,\n loading: false,\n block: false,\n round: false,\n href: undefined,\n target: undefined,\n nativeType: 'button',\n})\n\nconst emit = defineEmits<ButtonEmits>()\n\nconst isDisabled = computed(() => props.disabled || props.loading)\nconst tag = computed(() => (props.href ? 'a' : 'button'))\n\nconst classes = computed(() => [\n 'wx-button',\n `wx-button--${props.type}`,\n `wx-button--${props.variant}`,\n `wx-button--${props.size}`,\n {\n 'wx-button--block': props.block,\n 'wx-button--round': props.round,\n 'wx-button--loading': props.loading,\n 'is-disabled': isDisabled.value,\n },\n])\n\nconst nativeAttrs = computed(() =>\n props.href\n ? {\n href: isDisabled.value ? undefined : props.href,\n target: props.target,\n role: 'button',\n 'aria-disabled': isDisabled.value ? 'true' : undefined,\n tabindex: isDisabled.value ? -1 : undefined,\n }\n : {\n type: props.nativeType,\n disabled: isDisabled.value,\n },\n)\n\nfunction onClick(event: MouseEvent) {\n if (isDisabled.value) {\n event.preventDefault()\n event.stopPropagation()\n return\n }\n emit('click', event)\n}\n</script>\n\n<template>\n <component\n :is=\"tag\"\n v-bind=\"{ ...nativeAttrs, ...$attrs }\"\n :class=\"classes\"\n :aria-busy=\"loading || undefined\"\n @click=\"onClick\"\n >\n <span v-if=\"loading\" class=\"wx-button__spinner\" aria-hidden=\"true\" />\n <span v-else-if=\"$slots.icon\" class=\"wx-button__icon\">\n <slot name=\"icon\" />\n </span>\n <span v-if=\"$slots.default\" class=\"wx-button__label\">\n <slot />\n </span>\n </component>\n</template>\n\n<style scoped>\n.wx-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--wx-space-8);\n box-sizing: border-box;\n border: 1px solid transparent;\n border-radius: var(--wx-radius-control);\n font-family: inherit;\n font-weight: var(--wx-font-weight-semibold);\n line-height: var(--wx-font-line-height-tight);\n text-decoration: none;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition:\n background-color var(--wx-duration-normal) var(--wx-easing-standard),\n border-color var(--wx-duration-normal) var(--wx-easing-standard),\n color var(--wx-duration-normal) var(--wx-easing-standard),\n box-shadow var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-button:focus-visible {\n outline: none;\n box-shadow: var(--wx-ring-focus);\n}\n\n/* sizes */\n.wx-button--sm {\n height: var(--wx-size-control-sm);\n padding: 0 var(--wx-space-12);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-button--md {\n height: var(--wx-size-control-md);\n padding: 0 var(--wx-space-18);\n font-size: var(--wx-font-size-md);\n}\n\n.wx-button--lg {\n height: var(--wx-size-control-lg);\n padding: 0 var(--wx-space-24);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-button--block {\n display: flex;\n width: 100%;\n}\n\n.wx-button--round {\n border-radius: var(--wx-radius-full);\n}\n\n/*\n * Each type exposes its own palette through local variables, so the variant rules\n * below stay type-agnostic.\n */\n.wx-button--default {\n --wx-button-bg: var(--wx-bg-surface);\n --wx-button-bg-hover: var(--wx-bg-fill);\n --wx-button-bg-active: var(--wx-bg-fill-hover);\n --wx-button-bg-disabled: var(--wx-bg-surface);\n --wx-button-fg: var(--wx-text-default);\n --wx-button-border: var(--wx-border-default);\n}\n\n.wx-button--primary {\n --wx-button-bg: var(--wx-color-primary);\n --wx-button-bg-hover: var(--wx-color-primary-hover);\n --wx-button-bg-active: var(--wx-color-primary-active);\n --wx-button-bg-disabled: var(--wx-color-primary-disabled);\n --wx-button-fg: var(--wx-color-primary-contrast);\n --wx-button-border: var(--wx-color-primary);\n --wx-button-accent: var(--wx-color-primary);\n --wx-button-soft: var(--wx-color-primary-soft);\n}\n\n.wx-button--success {\n --wx-button-bg: var(--wx-color-success);\n --wx-button-bg-hover: var(--wx-color-success-hover);\n --wx-button-bg-active: var(--wx-color-success-active);\n --wx-button-bg-disabled: var(--wx-color-success-disabled);\n --wx-button-fg: var(--wx-color-success-contrast);\n --wx-button-border: var(--wx-color-success);\n --wx-button-accent: var(--wx-color-success);\n --wx-button-soft: var(--wx-color-success-soft);\n}\n\n.wx-button--warning {\n --wx-button-bg: var(--wx-color-warning);\n --wx-button-bg-hover: var(--wx-color-warning-hover);\n --wx-button-bg-active: var(--wx-color-warning-active);\n --wx-button-bg-disabled: var(--wx-color-warning-disabled);\n --wx-button-fg: var(--wx-color-warning-contrast);\n --wx-button-border: var(--wx-color-warning);\n --wx-button-accent: var(--wx-color-warning);\n --wx-button-soft: var(--wx-color-warning-soft);\n}\n\n.wx-button--danger {\n --wx-button-bg: var(--wx-color-danger);\n --wx-button-bg-hover: var(--wx-color-danger-hover);\n --wx-button-bg-active: var(--wx-color-danger-active);\n --wx-button-bg-disabled: var(--wx-color-danger-disabled);\n --wx-button-fg: var(--wx-color-danger-contrast);\n --wx-button-border: var(--wx-color-danger);\n --wx-button-accent: var(--wx-color-danger);\n --wx-button-soft: var(--wx-color-danger-soft);\n}\n\n/* solid */\n.wx-button--solid {\n background: var(--wx-button-bg);\n border-color: var(--wx-button-border);\n color: var(--wx-button-fg);\n}\n\n.wx-button--solid:hover:not(.is-disabled) {\n background: var(--wx-button-bg-hover);\n border-color: var(--wx-button-bg-hover);\n}\n\n.wx-button--solid:active:not(.is-disabled) {\n background: var(--wx-button-bg-active);\n border-color: var(--wx-button-bg-active);\n}\n\n.wx-button--solid.is-disabled {\n background: var(--wx-button-bg-disabled);\n border-color: var(--wx-button-bg-disabled);\n}\n\n.wx-button--solid.wx-button--default.is-disabled {\n border-color: var(--wx-border-default);\n color: var(--wx-text-disabled);\n}\n\n/* outline */\n.wx-button--outline {\n background: transparent;\n border-color: var(--wx-button-accent, var(--wx-border-default));\n color: var(--wx-button-accent, var(--wx-text-default));\n}\n\n.wx-button--outline:hover:not(.is-disabled) {\n background: var(--wx-button-soft, var(--wx-bg-fill));\n}\n\n.wx-button--outline:active:not(.is-disabled) {\n border-color: var(--wx-button-bg-active);\n color: var(--wx-button-bg-active);\n}\n\n.wx-button--outline.is-disabled {\n border-color: var(--wx-button-bg-disabled);\n color: var(--wx-button-bg-disabled);\n}\n\n/* text */\n.wx-button--text {\n background: transparent;\n border-color: transparent;\n color: var(--wx-button-accent, var(--wx-text-default));\n}\n\n.wx-button--text:hover:not(.is-disabled) {\n background: var(--wx-bg-fill);\n}\n\n.wx-button--text:active:not(.is-disabled) {\n background: var(--wx-bg-fill-hover);\n}\n\n.wx-button--text.is-disabled {\n color: var(--wx-text-disabled);\n}\n\n/* states */\n.wx-button.is-disabled {\n cursor: not-allowed;\n}\n\n.wx-button--loading {\n cursor: progress;\n}\n\n.wx-button__spinner {\n width: 1em;\n height: 1em;\n border: 2px solid currentcolor;\n border-right-color: transparent;\n border-radius: var(--wx-radius-full);\n animation: wx-button-spin var(--wx-duration-slow) linear infinite;\n}\n\n.wx-button__icon {\n display: inline-flex;\n align-items: center;\n}\n\n@keyframes wx-button-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wx-button {\n transition: none;\n }\n\n .wx-button__spinner {\n animation-duration: 2s;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport type { CardProps } from './types'\n\ndefineOptions({ name: 'WxCard' })\n\nconst props = withDefaults(defineProps<CardProps>(), {\n title: undefined,\n shadow: 'always',\n padding: 'md',\n bordered: false,\n})\n\nconst slots = useSlots()\n\nconst hasHeader = computed(() => Boolean(props.title || slots.header || slots.extra))\nconst hasSidebar = computed(() => Boolean(slots.sidebar))\n\nconst classes = computed(() => [\n 'wx-card',\n `wx-card--shadow-${props.shadow}`,\n `wx-card--padding-${props.padding}`,\n {\n 'wx-card--bordered': props.bordered,\n 'wx-card--with-sidebar': hasSidebar.value,\n },\n])\n</script>\n\n<template>\n <section :class=\"classes\">\n <header v-if=\"hasHeader\" class=\"wx-card__header\">\n <div class=\"wx-card__title\">\n <slot name=\"header\">{{ title }}</slot>\n </div>\n <div v-if=\"$slots.extra\" class=\"wx-card__extra\">\n <slot name=\"extra\" />\n </div>\n </header>\n\n <div class=\"wx-card__body\">\n <div v-if=\"hasSidebar\" class=\"wx-card__layout\">\n <aside class=\"wx-card__sidebar\">\n <slot name=\"sidebar\" />\n </aside>\n <div class=\"wx-card__content\">\n <slot />\n </div>\n </div>\n <slot v-else />\n </div>\n\n <footer v-if=\"$slots.footer\" class=\"wx-card__footer\">\n <slot name=\"footer\" />\n </footer>\n </section>\n</template>\n\n<style scoped>\n.wx-card {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background: var(--wx-bg-surface);\n border: 1px solid transparent;\n border-radius: var(--wx-radius-md);\n color: var(--wx-text-default);\n transition: box-shadow var(--wx-duration-normal) var(--wx-easing-standard);\n /* The sidebar layout reacts to the card's own width, not the viewport's. */\n container-type: inline-size;\n}\n\n.wx-card--bordered {\n border-color: var(--wx-border-default);\n}\n\n.wx-card--shadow-always {\n box-shadow: var(--wx-shadow-card);\n}\n\n.wx-card--shadow-hover:hover {\n box-shadow: var(--wx-shadow-card);\n}\n\n.wx-card__header,\n.wx-card__body,\n.wx-card__footer {\n padding: var(--wx-card-padding, var(--wx-space-16));\n}\n\n.wx-card--padding-none {\n --wx-card-padding: 0px;\n}\n\n.wx-card--padding-sm {\n --wx-card-padding: var(--wx-space-12);\n}\n\n.wx-card--padding-md {\n --wx-card-padding: var(--wx-space-16);\n}\n\n.wx-card--padding-lg {\n --wx-card-padding: var(--wx-space-24);\n}\n\n.wx-card__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wx-space-16);\n padding-bottom: 0;\n}\n\n.wx-card__title {\n min-width: 0;\n color: var(--wx-text-strong);\n font-size: var(--wx-font-size-lg);\n font-weight: var(--wx-font-weight-semibold);\n line-height: var(--wx-font-line-height-tight);\n}\n\n.wx-card__extra {\n flex: 0 0 auto;\n color: var(--wx-text-muted);\n}\n\n.wx-card__body {\n flex: 1 1 auto;\n}\n\n.wx-card__footer {\n padding-top: 0;\n}\n\n/* Sidebar layout: stacked by default, two columns once the card is wide enough. */\n.wx-card__layout {\n display: flex;\n flex-direction: column;\n gap: var(--wx-card-padding, var(--wx-space-16));\n}\n\n.wx-card__sidebar,\n.wx-card__content {\n min-width: 0;\n}\n\n.wx-card__content {\n flex: 1 1 auto;\n}\n\n@container (min-width: 560px) {\n .wx-card__layout {\n flex-direction: row;\n }\n\n .wx-card__sidebar {\n flex: 0 0 auto;\n width: var(--wx-card-sidebar-width, 240px);\n }\n}\n</style>\n","import { computed, inject, provide, type ComputedRef, type InjectionKey, type Ref } from 'vue'\n\nexport type ControlSize = 'sm' | 'md' | 'lg'\nexport type ControlStatus = 'default' | 'success' | 'warning' | 'error'\n\n/** Field name -> messages, the shape Laravel returns on a 422. */\nexport type ValidationErrors = Record<string, string[]>\n\nexport interface FormContext {\n /** Server-side errors, keyed by field name. */\n errors: Ref<ValidationErrors>\n disabled: Ref<boolean>\n size: Ref<ControlSize>\n labelPosition: Ref<'top' | 'left'>\n labelWidth: Ref<string | undefined>\n}\n\nexport interface FormItemContext {\n /** Id given to the control, so the label's `for` matches. */\n id: ComputedRef<string>\n /** Ids of the help and error nodes, for `aria-describedby`. */\n describedBy: ComputedRef<string | undefined>\n status: ComputedRef<ControlStatus>\n disabled: ComputedRef<boolean>\n size: ComputedRef<ControlSize | undefined>\n /** Set by grouped controls so the label points at the group, not one input. */\n registerLabelTarget: (id: string | undefined) => void\n}\n\nexport const formContextKey: InjectionKey<FormContext> = Symbol('wx-form')\nexport const formItemContextKey: InjectionKey<FormItemContext> = Symbol('wx-form-item')\n\nlet uid = 0\nexport function useId(prefix = 'wx'): string {\n uid += 1\n return `${prefix}-${uid}`\n}\n\nexport interface FormFieldProps {\n disabled?: boolean\n size?: ControlSize\n status?: ControlStatus\n id?: string\n}\n\n/**\n * Resolves what a control should render as, given its own props, the enclosing\n * `WxFormItem` and the enclosing `WxForm`. The control's own prop always wins;\n * `WxFormItem` beats `WxForm`.\n */\nexport function useFormField(props: FormFieldProps) {\n const form = inject(formContextKey, null)\n const item = inject(formItemContextKey, null)\n const fallbackId = useId('wx-control')\n\n const id = computed(() => props.id ?? item?.id.value ?? fallbackId)\n\n const disabled = computed(\n () => props.disabled || item?.disabled.value || form?.disabled.value || false,\n )\n\n const size = computed<ControlSize>(\n () => props.size ?? item?.size.value ?? form?.size.value ?? 'md',\n )\n\n const status = computed<ControlStatus>(() => {\n if (props.status && props.status !== 'default') return props.status\n return item?.status.value ?? 'default'\n })\n\n const describedBy = computed(() => item?.describedBy.value)\n\n return { id, disabled, size, status, describedBy, form, item }\n}\n\n/**\n * What a checkbox, radio or switch may carry. Deliberately narrower than `unknown`:\n * a `v-model` that hands back `unknown` is useless to the caller, and object values\n * would need identity comparison rather than `===`.\n */\nexport type ChoiceValue = string | number | boolean | null\n\n/** Used by `WxCheckboxGroup` / `WxRadioGroup` to share state with their children. */\nexport interface ChoiceGroupContext<T> {\n name: ComputedRef<string | undefined>\n modelValue: Ref<T>\n disabled: ComputedRef<boolean>\n size: ComputedRef<ControlSize>\n toggle: (value: ChoiceValue, checked: boolean) => void\n}\n\nexport const checkboxGroupKey: InjectionKey<ChoiceGroupContext<ChoiceValue[]>> =\n Symbol('wx-checkbox-group')\nexport const radioGroupKey: InjectionKey<ChoiceGroupContext<ChoiceValue | undefined>> =\n Symbol('wx-radio-group')\n\nexport function provideFormItem(context: FormItemContext): void {\n provide(formItemContextKey, context)\n}\n","<script setup lang=\"ts\">\nimport { computed, inject, onMounted, ref, watch } from 'vue'\nimport { checkboxGroupKey, useFormField } from '../../composables/useFormField'\nimport type { CheckboxEmits, CheckboxProps } from './types'\n\ndefineOptions({ name: 'WxCheckbox', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CheckboxProps>(), {\n value: undefined,\n label: undefined,\n indeterminate: false,\n disabled: undefined,\n size: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<CheckboxEmits>()\n\nconst model = defineModel<boolean>({ default: false })\n\nconst group = inject(checkboxGroupKey, null)\nconst field = useFormField(props)\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nconst checked = computed(() =>\n group ? group.modelValue.value.includes(props.value ?? null) : model.value === true,\n)\n\nconst disabled = computed(() => props.disabled || group?.disabled.value || field.disabled.value)\nconst size = computed(() => props.size ?? group?.size.value ?? field.size.value)\n\nconst classes = computed(() => [\n 'wx-checkbox',\n `wx-checkbox--${size.value}`,\n {\n 'is-checked': checked.value,\n 'is-indeterminate': props.indeterminate && !checked.value,\n 'is-disabled': disabled.value,\n },\n])\n\n/** `indeterminate` only exists as a DOM property, never as an attribute. */\nfunction syncIndeterminate() {\n if (inputRef.value) inputRef.value.indeterminate = props.indeterminate && !checked.value\n}\n\nonMounted(syncIndeterminate)\nwatch([() => props.indeterminate, checked], syncIndeterminate)\n\nfunction onChange(event: Event) {\n const next = (event.target as HTMLInputElement).checked\n if (group) group.toggle(props.value ?? null, next)\n else model.value = next\n emit('change', next)\n}\n</script>\n\n<template>\n <label :class=\"classes\">\n <input\n :id=\"field.id.value\"\n ref=\"inputRef\"\n v-bind=\"$attrs\"\n class=\"wx-checkbox__native\"\n type=\"checkbox\"\n :name=\"name ?? group?.name.value\"\n :checked=\"checked\"\n :disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n @change=\"onChange\"\n />\n\n <span class=\"wx-checkbox__box\" aria-hidden=\"true\">\n <svg class=\"wx-checkbox__mark\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n v-if=\"indeterminate && !checked\"\n d=\"M4 8h8\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n v-else\n d=\"M3.5 8.5l3 3 6-6\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n\n <span v-if=\"label || $slots.default\" class=\"wx-checkbox__label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n\n<style scoped>\n.wx-checkbox {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-8);\n cursor: pointer;\n user-select: none;\n color: var(--wx-text-default);\n}\n\n.wx-checkbox.is-disabled {\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-checkbox__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.wx-checkbox__box {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n box-sizing: border-box;\n width: var(--wx-checkbox-size, 20px);\n height: var(--wx-checkbox-size, 20px);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-strong);\n border-radius: var(--wx-radius-xs);\n color: transparent;\n transition:\n background-color var(--wx-duration-fast) var(--wx-easing-standard),\n border-color var(--wx-duration-fast) var(--wx-easing-standard),\n color var(--wx-duration-fast) var(--wx-easing-standard),\n box-shadow var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-checkbox--sm {\n --wx-checkbox-size: 16px;\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-checkbox--md {\n --wx-checkbox-size: 20px;\n font-size: var(--wx-font-size-md);\n}\n\n.wx-checkbox--lg {\n --wx-checkbox-size: 24px;\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-checkbox:hover:not(.is-disabled) .wx-checkbox__box {\n border-color: var(--wx-color-primary);\n}\n\n.wx-checkbox.is-checked .wx-checkbox__box,\n.wx-checkbox.is-indeterminate .wx-checkbox__box {\n border-color: var(--wx-color-primary);\n color: var(--wx-color-primary);\n}\n\n.wx-checkbox.is-disabled .wx-checkbox__box {\n background: var(--wx-bg-disabled);\n border-color: var(--wx-border-default);\n}\n\n.wx-checkbox.is-disabled.is-checked .wx-checkbox__box,\n.wx-checkbox.is-disabled.is-indeterminate .wx-checkbox__box {\n color: var(--wx-color-primary-disabled);\n border-color: var(--wx-color-primary-disabled);\n}\n\n.wx-checkbox__native:focus-visible + .wx-checkbox__box {\n border-color: var(--wx-color-primary);\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-checkbox__mark {\n width: 100%;\n height: 100%;\n}\n\n.wx-checkbox__label {\n line-height: var(--wx-font-line-height-normal);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wx-checkbox__box {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, provide } from 'vue'\nimport { checkboxGroupKey, useFormField, type ChoiceValue } from '../../composables/useFormField'\nimport WxCheckbox from '../Checkbox/Checkbox.vue'\nimport type { CheckboxGroupEmits, CheckboxGroupProps } from './types'\n\ndefineOptions({ name: 'WxCheckboxGroup' })\n\nconst props = withDefaults(defineProps<CheckboxGroupProps>(), {\n options: undefined,\n disabled: undefined,\n size: undefined,\n name: undefined,\n inline: false,\n min: undefined,\n max: undefined,\n})\n\nconst emit = defineEmits<CheckboxGroupEmits>()\n\nconst model = defineModel<ChoiceValue[]>({ default: () => [] })\n\nconst field = useFormField(props)\n\n/** A group cannot be the target of a `for`, so the item label becomes a span. */\nfield.item?.registerLabelTarget(undefined)\n\nconst disabled = computed(() => props.disabled ?? field.disabled.value)\nconst size = computed(() => props.size ?? field.size.value)\n\nfunction toggle(value: ChoiceValue, checked: boolean) {\n const current = model.value ?? []\n if (checked) {\n if (current.includes(value)) return\n if (props.max !== undefined && current.length >= props.max) return\n model.value = [...current, value]\n } else {\n if (props.min !== undefined && current.length <= props.min) return\n model.value = current.filter((item) => item !== value)\n }\n emit('change', model.value)\n}\n\nprovide(checkboxGroupKey, {\n name: computed(() => props.name),\n modelValue: computed(() => model.value ?? []),\n disabled,\n size,\n toggle,\n})\n</script>\n\n<template>\n <div\n :class=\"['wx-checkbox-group', { 'wx-checkbox-group--inline': inline }]\"\n role=\"group\"\n :aria-labelledby=\"field.item ? `${field.item.id.value}-label` : undefined\"\n :aria-describedby=\"field.describedBy.value\"\n >\n <slot>\n <wx-checkbox\n v-for=\"option in options\"\n :key=\"String(option.value)\"\n :value=\"option.value\"\n :label=\"option.label\"\n :disabled=\"option.disabled\"\n />\n </slot>\n </div>\n</template>\n\n<style scoped>\n.wx-checkbox-group {\n display: flex;\n flex-direction: column;\n gap: var(--wx-space-8);\n}\n\n.wx-checkbox-group--inline {\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--wx-space-16);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport {\n ColorAreaArea,\n ColorAreaRoot,\n ColorAreaThumb,\n ColorSliderRoot,\n ColorSliderThumb,\n ColorSliderTrack,\n PopoverAnchor,\n PopoverContent,\n PopoverPortal,\n PopoverRoot,\n colorToHex,\n convertToHsb,\n getAreaBackgroundStyle,\n getSliderBackgroundStyle,\n parseColor,\n} from 'reka-ui'\nimport type { Color } from 'reka-ui'\nimport { useFormField } from '../../composables/useFormField'\nimport type { ColorPickerEmits, ColorPickerProps } from './types'\n\ndefineOptions({ name: 'WxColorPicker', inheritAttrs: false })\n\nconst HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i\n\nconst props = withDefaults(defineProps<ColorPickerProps>(), {\n presets: () => [],\n clearable: false,\n placeholder: '#000000',\n teleport: true,\n disabled: undefined,\n readonly: false,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<ColorPickerEmits>()\n\nconst model = defineModel<string | null>({ default: null })\n\nconst field = useFormField(props)\nconst open = ref(false)\n\n/** What the text box shows. Kept separate so a half-typed hex is not thrown away. */\nconst text = ref(model.value ?? '')\n\nwatch(model, (value) => {\n text.value = value ?? ''\n})\n\n/**\n * A hex parses into an RGB colour, and the picker works in HSB. Both the gradients and\n * the primitives take the space from the object unless told otherwise, so an unconverted\n * colour draws an RGB area — where the brightness gradient runs the other way and the\n * square looks upside down until the first drag replaces the object.\n */\nfunction toWorking(hex: string): Color {\n return convertToHsb(parseColor(hex))\n}\n\n/**\n * The picker works on a colour object, not on the hex string.\n *\n * A grey has no hue to speak of, so parsing #919191 back into channels invents one —\n * and re-deriving it on every pointer move is what made the hue strip jump from blue\n * to teal to red as the pointer travelled into the desaturated corner. Holding the\n * object keeps the hue the user chose even where the colour cannot express it.\n */\nconst working = ref<Color>(\n toWorking(model.value && HEX.test(model.value) ? model.value : '#427edd'),\n)\n\nwatch(model, (value) => {\n const hex = value && HEX.test(value) ? value : null\n if (!hex || hex === colorToHex(working.value).toLowerCase()) return\n working.value = toWorking(hex)\n})\n\n// The space is stated rather than read off the colour, so the gradients cannot drift\n// away from the channels the area and the slider are pinned to.\nconst areaStyle = computed(() =>\n getAreaBackgroundStyle(working.value, 'saturation', 'brightness', 'hsb'),\n)\nconst hueStyle = computed(() => getSliderBackgroundStyle(working.value, 'hue', 'hsb'))\n\nconst swatch = computed(() => (model.value && HEX.test(model.value) ? model.value : null))\n\nconst classes = computed(() => [\n 'wx-color-picker',\n `wx-color-picker--${field.size.value}`,\n {\n [`wx-color-picker--${field.status.value}`]: field.status.value !== 'default',\n 'is-open': open.value,\n 'is-disabled': field.disabled.value,\n },\n])\n\nfunction commit(value: string | null) {\n if (model.value === value) return\n model.value = value\n emit('change', value)\n}\n\n/** Typing is free-form; only a complete hex reaches the model. */\nfunction onInput(event: Event) {\n const value = (event.target as HTMLInputElement).value\n text.value = value\n if (HEX.test(value)) commit(value.toLowerCase())\n else if (value === '') commit(null)\n}\n\n/** On blur the box either shows a valid colour or goes back to the last one. */\nfunction onBlur() {\n if (text.value === '') {\n commit(null)\n return\n }\n const candidate = text.value.startsWith('#') ? text.value : `#${text.value}`\n if (HEX.test(candidate)) {\n commit(candidate.toLowerCase())\n text.value = candidate.toLowerCase()\n } else {\n text.value = model.value ?? ''\n }\n}\n\n/**\n * The two primitives do not agree on which event carries the new colour: the hue\n * slider reports through `change`, the saturation area through `update:modelValue`.\n * Both are bound on both, and only string payloads are taken — the slider can also\n * hand back a colour object. Committing twice is harmless: an unchanged value is\n * dropped.\n */\nfunction onColor(color: Color) {\n working.value = convertToHsb(color)\n commit(colorToHex(color).toLowerCase())\n}\n\n/** Presets and typing come in as hex and have to be parsed back into the picker. */\nfunction onHex(value: string) {\n const hex = value.toLowerCase()\n working.value = toWorking(hex)\n commit(hex)\n}\n\nfunction clear() {\n commit(null)\n text.value = ''\n}\n\nfunction openPicker() {\n if (!field.disabled.value && !props.readonly) open.value = true\n}\n</script>\n\n<template>\n <popover-root v-model:open=\"open\">\n <div :class=\"classes\">\n <popover-anchor as-child>\n <div class=\"wx-color-picker__field\" @click=\"openPicker\">\n <button\n class=\"wx-color-picker__swatch\"\n type=\"button\"\n :disabled=\"field.disabled.value\"\n :aria-label=\"ariaLabel ?? 'Pick a colour'\"\n :style=\"swatch ? { background: swatch } : undefined\"\n :class=\"{ 'is-empty': !swatch }\"\n />\n\n <input\n :id=\"field.id.value\"\n v-bind=\"$attrs\"\n class=\"wx-color-picker__input\"\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n :value=\"text\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :disabled=\"field.disabled.value\"\n :readonly=\"readonly\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-invalid=\"field.status.value === 'error' || undefined\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n />\n\n <button\n v-if=\"clearable && swatch && !field.disabled.value\"\n class=\"wx-color-picker__clear\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n @click.stop=\"clear\"\n >\n ✕\n </button>\n </div>\n </popover-anchor>\n\n <popover-portal :disabled=\"!teleport\">\n <popover-content class=\"wx-color-picker__panel\" :side-offset=\"4\" align=\"start\">\n <!-- Channels are stated: the defaults are RGB, which would move the hue as\n the pointer travels and disagree with the gradient drawn underneath. -->\n <color-area-root\n class=\"wx-color-picker__area\"\n color-space=\"hsb\"\n x-channel=\"saturation\"\n y-channel=\"brightness\"\n :model-value=\"working\"\n @update:color=\"onColor\"\n >\n <color-area-area class=\"wx-color-picker__area-surface\" :style=\"areaStyle\">\n <color-area-thumb class=\"wx-color-picker__thumb\" />\n </color-area-area>\n </color-area-root>\n\n <color-slider-root\n class=\"wx-color-picker__hue\"\n color-space=\"hsb\"\n channel=\"hue\"\n :model-value=\"working\"\n @update:color=\"onColor\"\n >\n <color-slider-track class=\"wx-color-picker__hue-track\" :style=\"hueStyle\">\n <color-slider-thumb class=\"wx-color-picker__thumb\" />\n </color-slider-track>\n </color-slider-root>\n\n <div v-if=\"presets.length\" class=\"wx-color-picker__presets\">\n <button\n v-for=\"preset in presets\"\n :key=\"preset\"\n class=\"wx-color-picker__preset\"\n type=\"button\"\n :style=\"{ background: preset }\"\n :aria-label=\"preset\"\n :aria-pressed=\"model === preset\"\n @click=\"onHex(preset)\"\n />\n </div>\n </popover-content>\n </popover-portal>\n </div>\n </popover-root>\n</template>\n\n<style scoped>\n.wx-color-picker {\n display: block;\n width: 100%;\n}\n\n.wx-color-picker__field {\n display: flex;\n align-items: center;\n gap: var(--wx-space-8);\n box-sizing: border-box;\n height: var(--wx-size-control-md);\n padding: 0 var(--wx-space-8) 0 var(--wx-space-6);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n font-size: var(--wx-font-size-md);\n cursor: text;\n transition: border-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-color-picker--sm .wx-color-picker__field {\n height: var(--wx-size-control-sm);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-color-picker--lg .wx-color-picker__field {\n height: var(--wx-size-control-lg);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-color-picker__field:hover {\n border-color: var(--wx-border-strong);\n}\n\n.wx-color-picker.is-open .wx-color-picker__field,\n.wx-color-picker__field:focus-within {\n border-color: var(--wx-border-focus);\n}\n\n.wx-color-picker--error .wx-color-picker__field {\n border-color: var(--wx-color-danger);\n}\n\n.wx-color-picker--success .wx-color-picker__field {\n border-color: var(--wx-color-success);\n}\n\n.wx-color-picker--warning .wx-color-picker__field {\n border-color: var(--wx-color-warning);\n}\n\n.wx-color-picker.is-disabled .wx-color-picker__field {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-color-picker__swatch {\n flex: 0 0 auto;\n width: 22px;\n height: 22px;\n padding: 0;\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-xs);\n cursor: pointer;\n}\n\n/* A chequerboard says \"no colour\" more clearly than an empty box. */\n.wx-color-picker__swatch.is-empty {\n background-image:\n linear-gradient(45deg, var(--wx-bg-fill) 25%, transparent 25%),\n linear-gradient(-45deg, var(--wx-bg-fill) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--wx-bg-fill) 75%),\n linear-gradient(-45deg, transparent 75%, var(--wx-bg-fill) 75%);\n background-size: 8px 8px;\n background-position:\n 0 0,\n 0 4px,\n 4px -4px,\n -4px 0;\n}\n\n.wx-color-picker__input {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: var(--wx-font-family-mono);\n font-size: inherit;\n text-transform: lowercase;\n}\n\n.wx-color-picker__input::placeholder {\n color: var(--wx-text-placeholder);\n text-transform: none;\n}\n\n.wx-color-picker__clear {\n flex: 0 0 auto;\n width: 18px;\n height: 18px;\n padding: 0;\n background: transparent;\n border: none;\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-xs);\n line-height: 1;\n cursor: pointer;\n}\n\n.wx-color-picker__clear:hover {\n color: var(--wx-text-default);\n}\n</style>\n\n<style>\n/* Teleported panel. */\n.wx-color-picker__panel {\n z-index: var(--wx-z-index-popover);\n display: flex;\n flex-direction: column;\n gap: var(--wx-space-10);\n width: 232px;\n padding: var(--wx-space-10);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-sm);\n box-shadow: var(--wx-shadow-popover);\n}\n\n.wx-color-picker__area,\n.wx-color-picker__area-surface {\n position: relative;\n width: 100%;\n height: 140px;\n border-radius: var(--wx-radius-xs);\n}\n\n.wx-color-picker__hue {\n position: relative;\n height: 14px;\n}\n\n.wx-color-picker__hue-track {\n /* Reka renders the track as an inline element, where width and height do nothing. */\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: var(--wx-radius-full);\n}\n\n.wx-color-picker__thumb {\n width: 14px;\n height: 14px;\n background: transparent;\n border: 2px solid #fff;\n border-radius: var(--wx-radius-full);\n box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);\n}\n\n.wx-color-picker__thumb:focus-visible {\n outline: none;\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 0.35),\n var(--wx-ring-focus);\n}\n\n.wx-color-picker__presets {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wx-space-4);\n}\n\n.wx-color-picker__preset {\n width: 20px;\n height: 20px;\n padding: 0;\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-xs);\n cursor: pointer;\n}\n\n.wx-color-picker__preset[aria-pressed='true'] {\n box-shadow: 0 0 0 2px var(--wx-color-primary);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { VueDatePicker } from '@vuepic/vue-datepicker'\nimport { useFormField } from '../../composables/useFormField'\nimport '../../styles/datepicker.css'\nimport type { DatePickerEmits, DatePickerModelValue, DatePickerProps } from './types'\n\ndefineOptions({ name: 'WxDatePicker', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n type: 'date',\n valueFormat: undefined,\n format: undefined,\n placeholder: undefined,\n clearable: true,\n minDate: undefined,\n maxDate: undefined,\n seconds: false,\n minutesIncrement: 1,\n is24: true,\n weekStart: 1,\n autoApply: true,\n textInput: false,\n teleport: true,\n disabled: undefined,\n readonly: false,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<DatePickerEmits>()\n\nconst model = defineModel<DatePickerModelValue>({ default: null })\n\nconst field = useFormField(props)\n\nconst hasTime = computed(() => props.type !== 'date')\n\n/**\n * What the model holds. Defaults match the column types a Laravel migration\n * produces, so the value can go to the API untouched; `'date'` opts out and keeps\n * `Date` objects.\n */\nconst modelType = computed(() => {\n if (props.valueFormat === 'date') return undefined\n if (props.valueFormat) return props.valueFormat\n if (props.type === 'time') return props.seconds ? 'HH:mm:ss' : 'HH:mm'\n if (props.type === 'datetime') return props.seconds ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd HH:mm'\n return 'yyyy-MM-dd'\n})\n\n/** What the field shows. Day-first, because this kit is aimed at European admins. */\nconst displayFormat = computed(() => {\n if (props.format) return props.format\n const time = props.seconds ? 'HH:mm:ss' : 'HH:mm'\n if (props.type === 'time') return time\n if (props.type === 'datetime') return `dd.MM.yyyy ${time}`\n return 'dd.MM.yyyy'\n})\n\n/**\n * The overlay is sized to a calendar (`modeHeight`, 255 by default) so switching\n * between panes does not resize the menu. A time-only picker has no calendar to\n * match, and the default leaves ~150px of empty space around the columns.\n */\nconst config = computed(() => (props.type === 'time' ? { modeHeight: 125 } : undefined))\n\nconst timeConfig = computed(() => ({\n enableTimePicker: hasTime.value,\n enableSeconds: props.seconds,\n is24: props.is24,\n minutesIncrement: props.minutesIncrement,\n}))\n\nconst inputAttrs = computed(() => ({\n id: field.id.value,\n name: props.name,\n clearable: props.clearable,\n // The library reads `state: false` as invalid; leaving it undefined means neutral.\n state: field.status.value === 'error' ? false : undefined,\n 'aria-label': props.ariaLabel,\n 'aria-describedby': field.describedBy.value,\n}))\n\nconst classes = computed(() => [\n 'wx-datepicker',\n `wx-datepicker--${field.size.value}`,\n {\n [`wx-datepicker--${field.status.value}`]: field.status.value !== 'default',\n 'is-disabled': field.disabled.value,\n },\n])\n\nfunction onUpdate(value: DatePickerModelValue) {\n model.value = value\n emit('change', value)\n}\n\nfunction onCleared() {\n model.value = null\n emit('change', null)\n emit('clear')\n}\n</script>\n\n<template>\n <div :class=\"classes\">\n <vue-date-picker\n :model-value=\"model\"\n :model-type=\"modelType\"\n :formats=\"{ input: displayFormat }\"\n :time-picker=\"type === 'time'\"\n :time-config=\"timeConfig\"\n :config=\"config\"\n :input-attrs=\"inputAttrs\"\n :ui=\"{ input: 'wx-datepicker__input', menu: 'wx-datepicker__menu' }\"\n :placeholder=\"placeholder\"\n :min-date=\"minDate\"\n :max-date=\"maxDate\"\n :week-start=\"weekStart\"\n :auto-apply=\"autoApply\"\n :text-input=\"textInput\"\n :teleport=\"teleport\"\n :disabled=\"field.disabled.value\"\n :readonly=\"readonly\"\n v-bind=\"$attrs\"\n @update:model-value=\"onUpdate\"\n @cleared=\"onCleared\"\n @open=\"emit('open')\"\n @closed=\"emit('close')\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps ?? {}\" />\n </template>\n </vue-date-picker>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { VueDatePicker } from '@vuepic/vue-datepicker'\nimport { useFormField } from '../../composables/useFormField'\nimport '../../styles/datepicker.css'\nimport type { DateRangePickerEmits, DateRangePickerModelValue, DateRangePickerProps } from './types'\n\ndefineOptions({ name: 'WxDateRangePicker', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DateRangePickerProps>(), {\n valueFormat: undefined,\n format: undefined,\n placeholder: undefined,\n clearable: true,\n minDate: undefined,\n maxDate: undefined,\n months: 2,\n weekStart: 1,\n autoApply: true,\n textInput: false,\n teleport: true,\n disabled: undefined,\n readonly: false,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<DateRangePickerEmits>()\n\nconst model = defineModel<DateRangePickerModelValue>({ default: null })\n\nconst field = useFormField(props)\n\nconst modelType = computed(() =>\n props.valueFormat === 'date' ? undefined : (props.valueFormat ?? 'yyyy-MM-dd'),\n)\nconst displayFormat = computed(() => props.format ?? 'dd.MM.yyyy')\n\nconst inputAttrs = computed(() => ({\n id: field.id.value,\n name: props.name,\n clearable: props.clearable,\n state: field.status.value === 'error' ? false : undefined,\n 'aria-label': props.ariaLabel,\n 'aria-describedby': field.describedBy.value,\n}))\n\nconst classes = computed(() => [\n 'wx-datepicker',\n 'wx-datepicker--range',\n `wx-datepicker--${field.size.value}`,\n {\n [`wx-datepicker--${field.status.value}`]: field.status.value !== 'default',\n 'is-disabled': field.disabled.value,\n },\n])\n\n/** The library hands back `null` while only the first date has been picked. */\nfunction onUpdate(value: DateRangePickerModelValue) {\n model.value = value\n emit('change', value)\n}\n\nfunction onCleared() {\n model.value = null\n emit('change', null)\n emit('clear')\n}\n</script>\n\n<template>\n <div :class=\"classes\">\n <vue-date-picker\n range\n :model-value=\"model\"\n :model-type=\"modelType\"\n :formats=\"{ input: displayFormat }\"\n :multi-calendars=\"months\"\n :input-attrs=\"inputAttrs\"\n :ui=\"{ input: 'wx-datepicker__input', menu: 'wx-datepicker__menu' }\"\n :placeholder=\"placeholder\"\n :min-date=\"minDate\"\n :max-date=\"maxDate\"\n :week-start=\"weekStart\"\n :auto-apply=\"autoApply\"\n :text-input=\"textInput\"\n :teleport=\"teleport\"\n :disabled=\"field.disabled.value\"\n :readonly=\"readonly\"\n v-bind=\"$attrs\"\n @update:model-value=\"onUpdate\"\n @cleared=\"onCleared\"\n @open=\"emit('open')\"\n @closed=\"emit('close')\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps ?? {}\" />\n </template>\n </vue-date-picker>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport WxDatePicker from '../DatePicker/DatePicker.vue'\nimport type { DatePickerModelValue, DatePickerProps } from '../DatePicker/types'\n\ndefineOptions({ name: 'WxDateTimePicker' })\n\n/**\n * Every prop defaults to `undefined` on purpose. Vue casts an absent boolean prop\n * to `false`, and this preset forwards its whole prop object — without these the\n * preset would hand `WxDatePicker` an explicit `false` for `is24`, `clearable`,\n * `autoApply` and `teleport`, overriding that component's own defaults. Passing\n * `undefined` lets each default apply as if the prop had never been written.\n */\nwithDefaults(defineProps<Omit<DatePickerProps, 'type'>>(), {\n valueFormat: undefined,\n format: undefined,\n placeholder: undefined,\n clearable: undefined,\n minDate: undefined,\n maxDate: undefined,\n seconds: undefined,\n minutesIncrement: undefined,\n is24: undefined,\n weekStart: undefined,\n autoApply: undefined,\n textInput: undefined,\n teleport: undefined,\n disabled: undefined,\n readonly: undefined,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst model = defineModel<DatePickerModelValue>({ default: null })\n</script>\n\n<template>\n <wx-date-picker v-model=\"model\" type=\"datetime\" v-bind=\"$props\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps ?? {}\" />\n </template>\n </wx-date-picker>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, provide, toRef } from 'vue'\nimport { formContextKey, type ValidationErrors } from '../../composables/useFormField'\nimport type { FormEmits, FormProps } from './types'\n\ndefineOptions({ name: 'WxForm' })\n\nconst props = withDefaults(defineProps<FormProps>(), {\n errors: undefined,\n disabled: false,\n size: 'md',\n labelPosition: 'top',\n labelWidth: undefined,\n gap: 'md',\n})\n\nconst emit = defineEmits<FormEmits>()\n\nconst errors = computed<ValidationErrors>(() => props.errors ?? {})\n\nprovide(formContextKey, {\n errors,\n disabled: toRef(props, 'disabled'),\n size: toRef(props, 'size'),\n labelPosition: toRef(props, 'labelPosition'),\n labelWidth: toRef(props, 'labelWidth'),\n})\n\n/** Native submit is always prevented: forms here talk to a data adapter, not a URL. */\nfunction onSubmit(event: SubmitEvent) {\n event.preventDefault()\n emit('submit', event)\n}\n\nfunction onReset(event: Event) {\n emit('reset', event)\n}\n</script>\n\n<template>\n <form\n :class=\"['wx-form', `wx-form--gap-${gap}`, `wx-form--label-${labelPosition}`]\"\n novalidate\n @submit=\"onSubmit\"\n @reset=\"onReset\"\n >\n <slot />\n </form>\n</template>\n\n<style scoped>\n.wx-form {\n display: flex;\n flex-direction: column;\n}\n\n.wx-form--gap-sm {\n gap: var(--wx-space-8);\n}\n\n.wx-form--gap-md {\n gap: var(--wx-space-16);\n}\n\n.wx-form--gap-lg {\n gap: var(--wx-space-24);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue'\nimport {\n formContextKey,\n provideFormItem,\n useId,\n type ControlSize,\n type ControlStatus,\n} from '../../composables/useFormField'\nimport type { FormItemProps } from './types'\n\ndefineOptions({ name: 'WxFormItem' })\n\nconst props = withDefaults(defineProps<FormItemProps>(), {\n label: undefined,\n name: undefined,\n required: false,\n error: undefined,\n help: undefined,\n disabled: false,\n size: undefined,\n labelWidth: undefined,\n reserveErrorSpace: false,\n})\n\nconst form = inject(formContextKey, null)\n\nconst baseId = useId('wx-field')\nconst errorId = `${baseId}-error`\nconst helpId = `${baseId}-help`\n\n/**\n * Grouped controls (checkbox and radio groups) cannot be targeted by `for`,\n * so they register themselves and the label becomes a plain span instead.\n */\nconst labelMode = ref<'control' | 'group'>('control')\nconst controlId = ref<string>(baseId)\n\nfunction registerLabelTarget(id: string | undefined) {\n if (id === undefined) {\n labelMode.value = 'group'\n return\n }\n labelMode.value = 'control'\n controlId.value = id\n}\n\nconst messages = computed<string[]>(() => {\n if (props.error !== undefined) {\n return Array.isArray(props.error) ? props.error : [props.error]\n }\n if (props.name && form) return form.errors.value[props.name] ?? []\n return []\n})\n\nconst hasError = computed(() => messages.value.length > 0)\nconst status = computed<ControlStatus>(() => (hasError.value ? 'error' : 'default'))\n\n/**\n * Only ever names nodes that are actually rendered — the help text gives way to the\n * error, and a dangling `aria-describedby` is worse than none.\n */\nconst describedBy = computed(() => {\n if (hasError.value) return errorId\n return props.help ? helpId : undefined\n})\n\nconst size = computed<ControlSize | undefined>(() => props.size)\nconst disabled = computed(() => props.disabled)\n\nconst labelWidth = computed(() => props.labelWidth ?? form?.labelWidth.value)\nconst isInline = computed(() => form?.labelPosition.value === 'left')\n\nprovideFormItem({\n id: computed(() => baseId),\n describedBy,\n status,\n disabled,\n size,\n registerLabelTarget,\n})\n\ndefineExpose({ messages, hasError })\n</script>\n\n<template>\n <div\n :class=\"[\n 'wx-form-item',\n { 'wx-form-item--inline': isInline, 'is-error': hasError, 'is-required': required },\n ]\"\n :style=\"isInline && labelWidth ? { '--wx-form-item-label-width': labelWidth } : undefined\"\n >\n <component\n :is=\"labelMode === 'group' ? 'span' : 'label'\"\n v-if=\"label || $slots.label\"\n :id=\"`${baseId}-label`\"\n class=\"wx-form-item__label\"\n :for=\"labelMode === 'group' ? undefined : controlId\"\n >\n <slot name=\"label\">{{ label }}</slot>\n <span v-if=\"required\" class=\"wx-form-item__required\" aria-hidden=\"true\">*</span>\n </component>\n\n <div class=\"wx-form-item__control\">\n <slot />\n\n <p v-if=\"hasError\" :id=\"errorId\" class=\"wx-form-item__error\" role=\"alert\">\n {{ messages[0] }}\n </p>\n <p v-else-if=\"help\" :id=\"helpId\" class=\"wx-form-item__help\">{{ help }}</p>\n <p v-else-if=\"reserveErrorSpace\" class=\"wx-form-item__error\" aria-hidden=\"true\"> </p>\n </div>\n </div>\n</template>\n\n<style scoped>\n.wx-form-item {\n display: flex;\n flex-direction: column;\n gap: var(--wx-space-6);\n min-width: 0;\n}\n\n.wx-form-item--inline {\n flex-direction: row;\n align-items: flex-start;\n gap: var(--wx-space-16);\n}\n\n.wx-form-item--inline .wx-form-item__label {\n flex: 0 0 auto;\n width: var(--wx-form-item-label-width, 160px);\n /* Line the label up with the first line of a control's text. */\n padding-top: calc((var(--wx-size-control-md) - 1lh) / 2);\n}\n\n.wx-form-item--inline .wx-form-item__control {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.wx-form-item__label {\n color: var(--wx-text-default);\n font-size: var(--wx-font-size-sm);\n font-weight: var(--wx-font-weight-medium);\n line-height: var(--wx-font-line-height-normal);\n}\n\n.wx-form-item__required {\n margin-left: var(--wx-space-2);\n color: var(--wx-color-danger);\n}\n\n.wx-form-item__control {\n display: flex;\n flex-direction: column;\n gap: var(--wx-space-4);\n min-width: 0;\n}\n\n.wx-form-item__error,\n.wx-form-item__help {\n margin: 0;\n font-size: var(--wx-font-size-sm);\n line-height: var(--wx-font-line-height-normal);\n}\n\n.wx-form-item__error {\n color: var(--wx-color-danger);\n}\n\n.wx-form-item__help {\n color: var(--wx-text-muted);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { useFormField } from '../../composables/useFormField'\nimport type { InputEmits, InputModelValue, InputProps } from './types'\n\ndefineOptions({ name: 'WxInput', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<InputProps>(), {\n type: 'text',\n size: undefined,\n status: undefined,\n id: undefined,\n placeholder: undefined,\n disabled: undefined,\n readonly: false,\n clearable: false,\n maxlength: undefined,\n showCount: false,\n autocomplete: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<InputEmits>()\n\nconst model = defineModel<InputModelValue>({ default: '' })\n\nconst field = useFormField(props)\nconst inputRef = ref<HTMLInputElement | null>(null)\nconst focused = ref(false)\n\nconst currentValue = computed(() => (model.value == null ? '' : String(model.value)))\n\nconst showClear = computed(\n () =>\n props.clearable && !field.disabled.value && !props.readonly && currentValue.value.length > 0,\n)\n\nconst counter = computed(() =>\n props.showCount && props.maxlength ? `${currentValue.value.length}/${props.maxlength}` : null,\n)\n\nconst classes = computed(() => [\n 'wx-input',\n `wx-input--${field.size.value}`,\n {\n [`wx-input--${field.status.value}`]: field.status.value !== 'default',\n 'is-focused': focused.value,\n 'is-disabled': field.disabled.value,\n 'is-readonly': props.readonly,\n },\n])\n\nfunction onInput(event: Event) {\n const value = (event.target as HTMLInputElement).value\n model.value = value\n emit('input', value)\n}\n\nfunction onChange(event: Event) {\n emit('change', (event.target as HTMLInputElement).value)\n}\n\nfunction onFocus(event: FocusEvent) {\n focused.value = true\n emit('focus', event)\n}\n\nfunction onBlur(event: FocusEvent) {\n focused.value = false\n emit('blur', event)\n}\n\nfunction clear() {\n model.value = ''\n emit('input', '')\n emit('change', '')\n emit('clear')\n inputRef.value?.focus()\n}\n\ndefineExpose({\n focus: () => inputRef.value?.focus(),\n blur: () => inputRef.value?.blur(),\n select: () => inputRef.value?.select(),\n input: inputRef,\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <span v-if=\"$slots.prefix\" class=\"wx-input__affix wx-input__affix--prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <input\n :id=\"field.id.value\"\n ref=\"inputRef\"\n v-bind=\"$attrs\"\n class=\"wx-input__inner\"\n :type=\"type\"\n :value=\"currentValue\"\n :placeholder=\"placeholder\"\n :disabled=\"field.disabled.value\"\n :readonly=\"readonly\"\n :maxlength=\"maxlength\"\n :autocomplete=\"autocomplete\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-invalid=\"field.status.value === 'error' || undefined\"\n @input=\"onInput\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n />\n\n <button\n v-if=\"showClear\"\n class=\"wx-input__clear\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n @click=\"clear\"\n >\n ✕\n </button>\n\n <span v-if=\"counter\" class=\"wx-input__count\">{{ counter }}</span>\n\n <span v-if=\"$slots.suffix\" class=\"wx-input__affix wx-input__affix--suffix\">\n <slot name=\"suffix\" />\n </span>\n </div>\n</template>\n\n<style scoped>\n.wx-input {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-8);\n box-sizing: border-box;\n width: 100%;\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n transition:\n border-color var(--wx-duration-normal) var(--wx-easing-standard),\n background-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-input:hover:not(.is-disabled) {\n border-color: var(--wx-border-strong);\n}\n\n/* The reference marks focus with a tinted border rather than a ring. */\n.wx-input.is-focused {\n border-color: var(--wx-border-focus);\n}\n\n.wx-input--sm {\n height: var(--wx-size-control-sm);\n padding: 0 var(--wx-space-10);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-input--md {\n height: var(--wx-size-control-md);\n padding: 0 var(--wx-space-12);\n font-size: var(--wx-font-size-md);\n}\n\n.wx-input--lg {\n height: var(--wx-size-control-lg);\n padding: 0 var(--wx-space-16);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-input--error,\n.wx-input--error.is-focused {\n border-color: var(--wx-color-danger);\n}\n\n.wx-input--success,\n.wx-input--success.is-focused {\n border-color: var(--wx-color-success);\n}\n\n.wx-input--warning,\n.wx-input--warning.is-focused {\n border-color: var(--wx-color-warning);\n}\n\n.wx-input.is-disabled {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-input__inner {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n.wx-input__inner::placeholder {\n color: var(--wx-text-placeholder);\n}\n\n.wx-input__inner:disabled {\n cursor: not-allowed;\n}\n\n.wx-input__affix,\n.wx-input__count {\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n color: var(--wx-text-muted);\n}\n\n.wx-input__count {\n font-size: var(--wx-font-size-xs);\n font-variant-numeric: tabular-nums;\n}\n\n.wx-input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n width: 18px;\n height: 18px;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: var(--wx-radius-full);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-xs);\n line-height: 1;\n cursor: pointer;\n transition: background-color var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-input__clear:hover {\n background: var(--wx-bg-fill);\n color: var(--wx-text-default);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { useFormField } from '../../composables/useFormField'\nimport type { InputNumberEmits, InputNumberModelValue, InputNumberProps } from './types'\n\ndefineOptions({ name: 'WxInputNumber', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n min: undefined,\n max: undefined,\n step: 1,\n precision: undefined,\n controls: true,\n controlsPosition: 'sides',\n wheel: false,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n placeholder: undefined,\n disabled: undefined,\n readonly: false,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<InputNumberEmits>()\n\nconst model = defineModel<InputNumberModelValue>({ default: null })\n\nconst field = useFormField(props)\nconst inputRef = ref<HTMLInputElement | null>(null)\nconst focused = ref(false)\n\n/** Decimals to keep: explicit `precision`, otherwise whatever `step` implies. */\nconst precision = computed(() => {\n if (props.precision !== undefined) return props.precision\n const [, decimals = ''] = String(props.step).split('.')\n return decimals.length\n})\n\n/** Rounds through a scaled integer so 0.1 + 0.2 does not leak into the model. */\nfunction round(value: number): number {\n const factor = 10 ** precision.value\n return Math.round((value + Number.EPSILON) * factor) / factor\n}\n\nfunction clamp(value: number): number {\n let next = value\n if (props.min !== undefined) next = Math.max(next, props.min)\n if (props.max !== undefined) next = Math.min(next, props.max)\n return round(next)\n}\n\nconst current = computed<number | null>(() =>\n typeof model.value === 'number' && Number.isFinite(model.value) ? model.value : null,\n)\n\n/** What the user sees. Kept as text so a half-typed \"-\" or \"1.\" survives. */\nconst display = ref(current.value === null ? '' : current.value.toFixed(precision.value))\n\nwatch(current, (value) => {\n if (focused.value) return\n display.value = value === null ? '' : value.toFixed(precision.value)\n})\n\nconst disabled = computed(() => field.disabled.value)\nconst canDecrease = computed(\n () =>\n !disabled.value &&\n !props.readonly &&\n (props.min === undefined || (current.value ?? 0) > props.min),\n)\nconst canIncrease = computed(\n () =>\n !disabled.value &&\n !props.readonly &&\n (props.max === undefined || (current.value ?? 0) < props.max),\n)\n\nconst classes = computed(() => [\n 'wx-input-number',\n `wx-input-number--${field.size.value}`,\n `wx-input-number--controls-${props.controls ? props.controlsPosition : 'none'}`,\n {\n [`wx-input-number--${field.status.value}`]: field.status.value !== 'default',\n 'is-focused': focused.value,\n 'is-disabled': disabled.value,\n },\n])\n\nfunction commit(value: number | null) {\n if (model.value === value) return\n model.value = value\n emit('change', value)\n}\n\nfunction stepBy(direction: 1 | -1) {\n if (disabled.value || props.readonly) return\n const base = current.value ?? clamp(0)\n const next = clamp(base + direction * props.step)\n commit(next)\n display.value = next.toFixed(precision.value)\n}\n\nfunction onInput(event: Event) {\n display.value = (event.target as HTMLInputElement).value\n const parsed = Number.parseFloat(display.value)\n // While typing, only push through values that already make sense.\n if (display.value === '') commit(null)\n else if (Number.isFinite(parsed)) commit(round(parsed))\n}\n\n/** Clamping and formatting happen on blur, so typing 5 into a min=10 field is possible. */\nfunction normalize() {\n if (display.value.trim() === '') {\n commit(null)\n display.value = ''\n return\n }\n const parsed = Number.parseFloat(display.value)\n if (!Number.isFinite(parsed)) {\n display.value = current.value === null ? '' : current.value.toFixed(precision.value)\n return\n }\n const next = clamp(parsed)\n commit(next)\n display.value = next.toFixed(precision.value)\n}\n\nfunction onFocus(event: FocusEvent) {\n focused.value = true\n emit('focus', event)\n}\n\nfunction onBlur(event: FocusEvent) {\n focused.value = false\n normalize()\n emit('blur', event)\n}\n\n/**\n * Only ever acts on a focused field, and swallows the scroll while it does — a\n * hovered field must not steal the page's scrolling.\n */\nfunction onWheel(event: WheelEvent) {\n if (!props.wheel || !focused.value || disabled.value || props.readonly) return\n event.preventDefault()\n stepBy(event.deltaY < 0 ? 1 : -1)\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n stepBy(1)\n } else if (event.key === 'ArrowDown') {\n event.preventDefault()\n stepBy(-1)\n } else if (event.key === 'Enter') {\n normalize()\n }\n}\n\ndefineExpose({\n focus: () => inputRef.value?.focus(),\n blur: () => inputRef.value?.blur(),\n increase: () => stepBy(1),\n decrease: () => stepBy(-1),\n input: inputRef,\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <button\n v-if=\"controls\"\n class=\"wx-input-number__button wx-input-number__button--decrease\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Decrease\"\n :disabled=\"!canDecrease\"\n @click=\"stepBy(-1)\"\n >\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M3.5 8h9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n\n <input\n :id=\"field.id.value\"\n ref=\"inputRef\"\n v-bind=\"$attrs\"\n class=\"wx-input-number__inner\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n :name=\"name\"\n :value=\"display\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-invalid=\"field.status.value === 'error' || undefined\"\n role=\"spinbutton\"\n :aria-valuenow=\"current ?? undefined\"\n :aria-valuemin=\"min\"\n :aria-valuemax=\"max\"\n @input=\"onInput\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n @wheel=\"onWheel\"\n />\n\n <button\n v-if=\"controls\"\n class=\"wx-input-number__button wx-input-number__button--increase\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Increase\"\n :disabled=\"!canIncrease\"\n @click=\"stepBy(1)\"\n >\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M8 3.5v9M3.5 8h9\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n </div>\n</template>\n\n<style scoped>\n.wx-input-number {\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n height: var(--wx-size-control-md);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n overflow: hidden;\n transition:\n border-color var(--wx-duration-normal) var(--wx-easing-standard),\n background-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-input-number--sm {\n height: var(--wx-size-control-sm);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-input-number--md {\n height: var(--wx-size-control-md);\n font-size: var(--wx-font-size-md);\n}\n\n.wx-input-number--lg {\n height: var(--wx-size-control-lg);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-input-number:hover:not(.is-disabled) {\n border-color: var(--wx-border-strong);\n}\n\n.wx-input-number.is-focused {\n border-color: var(--wx-border-focus);\n}\n\n.wx-input-number--error,\n.wx-input-number--error.is-focused {\n border-color: var(--wx-color-danger);\n}\n\n.wx-input-number--success {\n border-color: var(--wx-color-success);\n}\n\n.wx-input-number--warning {\n border-color: var(--wx-color-warning);\n}\n\n.wx-input-number.is-disabled {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n}\n\n.wx-input-number__inner {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding: 0 var(--wx-space-12);\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n font-variant-numeric: tabular-nums;\n text-align: center;\n}\n\n.wx-input-number--controls-none .wx-input-number__inner {\n text-align: left;\n}\n\n.wx-input-number__inner::placeholder {\n color: var(--wx-text-placeholder);\n}\n\n.wx-input-number__inner:disabled {\n cursor: not-allowed;\n}\n\n.wx-input-number__button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n width: calc(var(--wx-size-control-md) - 8px);\n height: 100%;\n padding: 0;\n background: var(--wx-bg-fill);\n border: none;\n color: var(--wx-text-default);\n cursor: pointer;\n transition: background-color var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-input-number__button svg {\n width: 16px;\n height: 16px;\n}\n\n.wx-input-number__button:hover:not(:disabled) {\n background: var(--wx-bg-fill-hover);\n color: var(--wx-color-primary);\n}\n\n.wx-input-number__button:disabled {\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n/*\n * Stacked layout: the DOM order stays decrease → input → increase (which is what a\n * screen reader and the tab order want); grid puts the buttons where they belong.\n */\n.wx-input-number--controls-right {\n display: grid;\n grid-template-columns: 1fr auto;\n grid-template-rows: 1fr 1fr;\n}\n\n.wx-input-number--controls-right .wx-input-number__inner {\n grid-column: 1;\n grid-row: 1 / span 2;\n text-align: left;\n}\n\n.wx-input-number--controls-right .wx-input-number__button {\n width: calc(var(--wx-size-control-md) - 16px);\n height: 100%;\n border-left: 1px solid var(--wx-border-default);\n}\n\n.wx-input-number--controls-right .wx-input-number__button--increase {\n grid-column: 2;\n grid-row: 1;\n}\n\n.wx-input-number--controls-right .wx-input-number__button--decrease {\n grid-column: 2;\n grid-row: 2;\n border-top: 1px solid var(--wx-border-default);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { radioGroupKey, useFormField, type ChoiceValue } from '../../composables/useFormField'\nimport type { RadioEmits, RadioProps } from './types'\n\ndefineOptions({ name: 'WxRadio', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n label: undefined,\n disabled: undefined,\n size: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<RadioEmits>()\n\nconst model = defineModel<ChoiceValue>({ default: null })\n\nconst group = inject(radioGroupKey, null)\nconst field = useFormField(props)\n\nconst checked = computed(() =>\n group ? group.modelValue.value === props.value : model.value === props.value,\n)\n\nconst disabled = computed(() => props.disabled || group?.disabled.value || field.disabled.value)\nconst size = computed(() => props.size ?? group?.size.value ?? field.size.value)\n\nconst classes = computed(() => [\n 'wx-radio',\n `wx-radio--${size.value}`,\n { 'is-checked': checked.value, 'is-disabled': disabled.value },\n])\n\nfunction onChange() {\n if (group) group.toggle(props.value, true)\n else model.value = props.value\n emit('change', props.value)\n}\n</script>\n\n<template>\n <label :class=\"classes\">\n <input\n :id=\"field.id.value\"\n v-bind=\"$attrs\"\n class=\"wx-radio__native\"\n type=\"radio\"\n :name=\"name ?? group?.name.value\"\n :checked=\"checked\"\n :disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n @change=\"onChange\"\n />\n\n <span class=\"wx-radio__box\" aria-hidden=\"true\">\n <span class=\"wx-radio__dot\" />\n </span>\n\n <span v-if=\"label || $slots.default\" class=\"wx-radio__label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n\n<style scoped>\n.wx-radio {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-8);\n cursor: pointer;\n user-select: none;\n color: var(--wx-text-default);\n}\n\n.wx-radio.is-disabled {\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-radio__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.wx-radio__box {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n box-sizing: border-box;\n width: var(--wx-radio-size, 20px);\n height: var(--wx-radio-size, 20px);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-strong);\n border-radius: var(--wx-radius-full);\n transition:\n border-color var(--wx-duration-fast) var(--wx-easing-standard),\n box-shadow var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-radio--sm {\n --wx-radio-size: 16px;\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-radio--md {\n --wx-radio-size: 20px;\n font-size: var(--wx-font-size-md);\n}\n\n.wx-radio--lg {\n --wx-radio-size: 24px;\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-radio__dot {\n width: 50%;\n height: 50%;\n border-radius: var(--wx-radius-full);\n background: var(--wx-color-primary);\n transform: scale(0);\n transition: transform var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-radio:hover:not(.is-disabled) .wx-radio__box {\n border-color: var(--wx-color-primary);\n}\n\n.wx-radio.is-checked .wx-radio__box {\n border-color: var(--wx-color-primary);\n}\n\n.wx-radio.is-checked .wx-radio__dot {\n transform: scale(1);\n}\n\n.wx-radio.is-disabled .wx-radio__box {\n background: var(--wx-bg-disabled);\n border-color: var(--wx-border-default);\n}\n\n.wx-radio.is-disabled .wx-radio__dot {\n background: var(--wx-color-primary-disabled);\n}\n\n.wx-radio__native:focus-visible + .wx-radio__box {\n border-color: var(--wx-color-primary);\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-radio__label {\n line-height: var(--wx-font-line-height-normal);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wx-radio__box,\n .wx-radio__dot {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, provide } from 'vue'\nimport {\n radioGroupKey,\n useFormField,\n useId,\n type ChoiceValue,\n} from '../../composables/useFormField'\nimport WxRadio from '../Radio/Radio.vue'\nimport type { RadioGroupEmits, RadioGroupProps } from './types'\n\ndefineOptions({ name: 'WxRadioGroup' })\n\nconst props = withDefaults(defineProps<RadioGroupProps>(), {\n options: undefined,\n disabled: undefined,\n size: undefined,\n name: undefined,\n inline: false,\n})\n\nconst emit = defineEmits<RadioGroupEmits>()\n\nconst model = defineModel<ChoiceValue>({ default: null })\n\nconst field = useFormField(props)\nconst fallbackName = useId('wx-radio-group')\n\n/** A group cannot be the target of a `for`, so the item label becomes a span. */\nfield.item?.registerLabelTarget(undefined)\n\nconst disabled = computed(() => props.disabled ?? field.disabled.value)\nconst size = computed(() => props.size ?? field.size.value)\n\n/**\n * Radios sharing a `name` are one roving-tabindex group in the browser, which is\n * what gives arrow-key navigation for free — so a name is always set.\n */\nconst name = computed(() => props.name ?? fallbackName)\n\nfunction toggle(value: ChoiceValue) {\n if (model.value === value) return\n model.value = value\n emit('change', value)\n}\n\nprovide(radioGroupKey, {\n name,\n modelValue: computed(() => model.value),\n disabled,\n size,\n toggle,\n})\n</script>\n\n<template>\n <div\n :class=\"['wx-radio-group', { 'wx-radio-group--inline': inline }]\"\n role=\"radiogroup\"\n :aria-labelledby=\"field.item ? `${field.item.id.value}-label` : undefined\"\n :aria-describedby=\"field.describedBy.value\"\n >\n <slot>\n <wx-radio\n v-for=\"option in options\"\n :key=\"String(option.value)\"\n :value=\"option.value\"\n :label=\"option.label\"\n :disabled=\"option.disabled\"\n />\n </slot>\n </div>\n</template>\n\n<style scoped>\n.wx-radio-group {\n display: flex;\n flex-direction: column;\n gap: var(--wx-space-8);\n}\n\n.wx-radio-group--inline {\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--wx-space-16);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { useFormField } from '../../composables/useFormField'\nimport type { RateEmits, RateProps } from './types'\n\ndefineOptions({ name: 'WxRate', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RateProps>(), {\n max: 5,\n allowHalf: false,\n clearable: true,\n showValue: false,\n readonly: false,\n disabled: undefined,\n size: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<RateEmits>()\n\nconst model = defineModel<number>({ default: 0 })\n\nconst field = useFormField(props)\nconst hovered = ref<number | null>(null)\n\nconst interactive = computed(() => !field.disabled.value && !props.readonly)\n\n/** What the stars show right now: the hovered value while pointing, the model otherwise. */\nconst shown = computed(() => hovered.value ?? model.value ?? 0)\n\nconst stars = computed(() =>\n Array.from({ length: props.max }, (_, index) => {\n const position = index + 1\n const fill = Math.min(Math.max(shown.value - index, 0), 1)\n return { position, full: fill >= 1, half: fill > 0 && fill < 1 }\n }),\n)\n\nconst classes = computed(() => [\n 'wx-rate',\n `wx-rate--${field.size.value}`,\n { 'is-disabled': field.disabled.value, 'is-readonly': props.readonly },\n])\n\n/** Halves come from the pointer landing on the left side of a star. */\nfunction valueAt(position: number, event: MouseEvent): number {\n if (!props.allowHalf) return position\n const target = event.currentTarget as HTMLElement\n const { left, width } = target.getBoundingClientRect()\n return event.clientX - left < width / 2 ? position - 0.5 : position\n}\n\n/** `toggle` is what makes clicking the current value clear it — the arrow keys must not. */\nfunction set(value: number, toggle = false) {\n const next = toggle && props.clearable && model.value === value ? 0 : value\n if (next === model.value) return\n model.value = next\n emit('change', next)\n}\n\nfunction onClick(position: number, event: MouseEvent) {\n if (!interactive.value) return\n set(valueAt(position, event), true)\n}\n\nfunction onHover(position: number, event: MouseEvent) {\n if (!interactive.value) return\n hovered.value = valueAt(position, event)\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (!interactive.value) return\n const step = props.allowHalf ? 0.5 : 1\n const current = model.value ?? 0\n\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n event.preventDefault()\n set(Math.min(current + step, props.max))\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n event.preventDefault()\n set(Math.max(current - step, 0))\n } else if (event.key === 'Home') {\n event.preventDefault()\n set(0)\n } else if (event.key === 'End') {\n event.preventDefault()\n set(props.max)\n }\n}\n</script>\n\n<template>\n <div\n :id=\"field.id.value\"\n v-bind=\"$attrs\"\n :class=\"classes\"\n role=\"slider\"\n :tabindex=\"interactive ? 0 : -1\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n :aria-valuenow=\"model ?? 0\"\n :aria-readonly=\"readonly || undefined\"\n :aria-disabled=\"field.disabled.value || undefined\"\n @keydown=\"onKeydown\"\n @mouseleave=\"hovered = null\"\n >\n <span\n v-for=\"star in stars\"\n :key=\"star.position\"\n class=\"wx-rate__star\"\n :class=\"{ 'is-full': star.full, 'is-half': star.half }\"\n @click=\"onClick(star.position, $event)\"\n @mousemove=\"onHover(star.position, $event)\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n class=\"wx-rate__outline\"\n d=\"M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linejoin=\"round\"\n />\n <path\n class=\"wx-rate__fill\"\n d=\"M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n\n <span v-if=\"showValue\" class=\"wx-rate__value\">{{ model ?? 0 }}</span>\n\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"model ?? 0\" />\n </div>\n</template>\n\n<style scoped>\n.wx-rate {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-2);\n color: var(--wx-border-strong);\n}\n\n.wx-rate:focus-visible {\n outline: none;\n border-radius: var(--wx-radius-xs);\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-rate--sm {\n --wx-rate-size: 18px;\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-rate--md {\n --wx-rate-size: 22px;\n font-size: var(--wx-font-size-md);\n}\n\n.wx-rate--lg {\n --wx-rate-size: 28px;\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-rate__star {\n display: inline-flex;\n width: var(--wx-rate-size, 22px);\n height: var(--wx-rate-size, 22px);\n cursor: pointer;\n}\n\n.wx-rate.is-disabled .wx-rate__star,\n.wx-rate.is-readonly .wx-rate__star {\n cursor: default;\n}\n\n.wx-rate.is-disabled {\n opacity: 0.6;\n}\n\n.wx-rate__star svg {\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n/* The filled star is clipped to nothing, then revealed whole or by half. */\n.wx-rate__fill {\n color: var(--wx-color-warning);\n clip-path: inset(0 100% 0 0);\n transition: clip-path var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-rate__star.is-full .wx-rate__fill {\n clip-path: inset(0);\n}\n\n.wx-rate__star.is-half .wx-rate__fill {\n clip-path: inset(0 50% 0 0);\n}\n\n.wx-rate__star.is-full,\n.wx-rate__star.is-half {\n color: var(--wx-color-warning);\n}\n\n.wx-rate__value {\n margin-left: var(--wx-space-6);\n color: var(--wx-text-muted);\n font-variant-numeric: tabular-nums;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wx-rate__fill {\n transition: none;\n }\n}\n</style>\n","/**\n * Toolbar glyphs as raw path data, drawn on a 24×24 grid with a 1.7 stroke.\n * Inline rather than an icon package: it is a dozen paths, and a dependency for\n * that would be worse than the duplication.\n */\nexport const richTextIcons: Record<string, string> = {\n bold: 'M7 5h6a3.5 3.5 0 0 1 0 7H7zm0 7h7a3.5 3.5 0 0 1 0 7H7z',\n italic: 'M15 5h-5M14 19H9M13.5 5 10.5 19',\n strike:\n 'M5 12h14M8 8.5A3 3 0 0 1 11 6h2a3 3 0 0 1 3 2.5M16 15.5A3 3 0 0 1 13 18h-2a3 3 0 0 1-3-2.5',\n code: 'm9 8-5 4 5 4M15 8l5 4-5 4',\n bulletList: 'M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01',\n orderedList: 'M10 6h10M10 12h10M10 18h10M4 6h1v4M4 10h2M4 14h2v2H4v2h2',\n blockquote: 'M7 15V9h4v6H7l-2 3M15 15V9h4v6h-4l-2 3',\n hr: 'M4 12h16',\n link: 'M10 13a4 4 0 0 0 5.7.4l2.6-2.6a4 4 0 0 0-5.7-5.7l-1.5 1.5M14 11a4 4 0 0 0-5.7-.4l-2.6 2.6a4 4 0 0 0 5.7 5.7l1.5-1.5',\n table: 'M4 6h16v12H4zM4 10h16M10 10v8M4 14h16',\n image: 'M4 6h16v12H4zM4 15l4-4 4 4 3-3 5 5M9 9.5h.01',\n youtube:\n 'M3 8.5A2.5 2.5 0 0 1 5.5 6h13A2.5 2.5 0 0 1 21 8.5v7a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 15.5zM10.5 9.5l4 2.5-4 2.5z',\n undo: 'M4 9h11a4.5 4.5 0 0 1 0 9h-4M4 9l4-4M4 9l4 4',\n redo: 'M20 9H9a4.5 4.5 0 0 0 0 9h4M20 9l-4-4M20 9l-4 4',\n rowAfter: 'M4 5h16M4 11h16M8 15v6M5 18h6',\n rowBefore: 'M4 19h16M4 13h16M8 3v6M5 6h6',\n columnAfter: 'M5 4v16M11 4v16M15 8h6M18 5v6',\n columnBefore: 'M19 4v16M13 4v16M3 8h6M6 5v6',\n deleteRow: 'M4 8h16M4 16h16M9 12h6',\n deleteColumn: 'M8 4v16M16 4v16M12 9v6',\n deleteTable: 'M5 7h14M9 7V5h6v2M7 7l1 12h8l1-12M10 11v4M14 11v4',\n mergeCells: 'M4 6h16v12H4zM12 6v3M12 15v3M9 12h6M9 12l2-2M9 12l2 2',\n check: 'm5 13 4 4L19 7',\n close: 'M6 6l12 12M18 6 6 18',\n}\n","<script setup lang=\"ts\">\nimport { richTextIcons } from './icons'\n\ndefineOptions({ name: 'WxRichTextToolbarButton' })\n\nwithDefaults(\n defineProps<{\n /** Key into the icon set. Omit it and the `text` shows instead. */\n icon?: string\n /** Short label used for headings, where a glyph reads worse than \"H2\". */\n text?: string\n label: string\n active?: boolean\n disabled?: boolean\n }>(),\n { icon: undefined, text: undefined, active: false, disabled: false },\n)\n\ndefineEmits<{ click: [] }>()\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"wx-rich-text__tool\"\n :class=\"{ 'is-active': active }\"\n :title=\"label\"\n :aria-label=\"label\"\n :aria-pressed=\"active\"\n :disabled=\"disabled\"\n @click=\"$emit('click')\"\n >\n <svg v-if=\"icon\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path\n :d=\"richTextIcons[icon]\"\n stroke=\"currentColor\"\n stroke-width=\"1.7\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <span v-else class=\"wx-rich-text__tool-text\">{{ text }}</span>\n </button>\n</template>\n\n<style scoped>\n.wx-rich-text__tool {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n width: 30px;\n height: 30px;\n padding: 0;\n background: transparent;\n border: 1px solid transparent;\n border-radius: var(--wx-radius-xs);\n color: var(--wx-text-default);\n cursor: pointer;\n transition:\n background-color var(--wx-duration-fast) var(--wx-easing-standard),\n color var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-rich-text__tool svg {\n width: 18px;\n height: 18px;\n}\n\n.wx-rich-text__tool-text {\n font-size: var(--wx-font-size-sm);\n font-weight: var(--wx-font-weight-semibold);\n}\n\n.wx-rich-text__tool:hover:not(:disabled) {\n background: var(--wx-bg-fill);\n}\n\n.wx-rich-text__tool.is-active {\n background: var(--wx-color-primary-soft);\n color: var(--wx-color-primary);\n}\n\n.wx-rich-text__tool:focus-visible {\n outline: none;\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-rich-text__tool:disabled {\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n</style>\n","import type { RichTextTool } from './types'\n\n/**\n * Kept out of the component because `withDefaults` cannot reference a binding\n * declared inside `<script setup>` — it is hoisted out of `setup()`.\n */\nexport const DEFAULT_TOOLS: RichTextTool[] = [\n 'bold',\n 'italic',\n 'strike',\n 'code',\n 'divider',\n 'h2',\n 'h3',\n 'h4',\n 'divider',\n 'bulletList',\n 'orderedList',\n 'blockquote',\n 'hr',\n 'divider',\n 'link',\n 'table',\n 'image',\n 'youtube',\n 'divider',\n 'undo',\n 'redo',\n]\n\nexport const DEFAULT_ACCEPT = [\n 'image/png',\n 'image/jpeg',\n 'image/gif',\n 'image/webp',\n 'image/svg+xml',\n]\n\nexport interface ToolMeta {\n label: string\n icon?: string\n text?: string\n}\n\nexport const TOOL_META: Record<Exclude<RichTextTool, 'divider'>, ToolMeta> = {\n bold: { label: 'Bold', icon: 'bold' },\n italic: { label: 'Italic', icon: 'italic' },\n strike: { label: 'Strikethrough', icon: 'strike' },\n code: { label: 'Inline code', icon: 'code' },\n h2: { label: 'Heading 2', text: 'H2' },\n h3: { label: 'Heading 3', text: 'H3' },\n h4: { label: 'Heading 4', text: 'H4' },\n bulletList: { label: 'Bulleted list', icon: 'bulletList' },\n orderedList: { label: 'Numbered list', icon: 'orderedList' },\n blockquote: { label: 'Quote', icon: 'blockquote' },\n hr: { label: 'Divider', icon: 'hr' },\n link: { label: 'Link', icon: 'link' },\n table: { label: 'Table', icon: 'table' },\n image: { label: 'Image', icon: 'image' },\n youtube: { label: 'YouTube video', icon: 'youtube' },\n undo: { label: 'Undo', icon: 'undo' },\n redo: { label: 'Redo', icon: 'redo' },\n}\n\n/** Shown as a second row while the caret sits inside a table. */\nexport const TABLE_TOOLS = [\n { key: 'addRowAfter', label: 'Row below', icon: 'rowAfter' },\n { key: 'addRowBefore', label: 'Row above', icon: 'rowBefore' },\n { key: 'addColumnAfter', label: 'Column after', icon: 'columnAfter' },\n { key: 'addColumnBefore', label: 'Column before', icon: 'columnBefore' },\n { key: 'deleteRow', label: 'Delete row', icon: 'deleteRow' },\n { key: 'deleteColumn', label: 'Delete column', icon: 'deleteColumn' },\n { key: 'mergeOrSplit', label: 'Merge or split cells', icon: 'mergeCells' },\n { key: 'deleteTable', label: 'Delete table', icon: 'deleteTable' },\n] as const\n\nexport type TableToolKey = (typeof TABLE_TOOLS)[number]['key']\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { EditorContent, useEditor } from '@tiptap/vue-3'\nimport StarterKit from '@tiptap/starter-kit'\nimport { TableKit } from '@tiptap/extension-table'\nimport Image from '@tiptap/extension-image'\nimport Youtube from '@tiptap/extension-youtube'\nimport FileHandler from '@tiptap/extension-file-handler'\nimport { useFormField } from '../../composables/useFormField'\nimport WxRichTextToolbarButton from './ToolbarButton.vue'\nimport { DEFAULT_ACCEPT, DEFAULT_TOOLS, TABLE_TOOLS, TOOL_META, type TableToolKey } from './tools'\nimport type { RichTextEmits, RichTextProps, RichTextTool } from './types'\n\ndefineOptions({ name: 'WxRichText', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RichTextProps>(), {\n placeholder: undefined,\n disabled: undefined,\n readonly: false,\n size: undefined,\n status: undefined,\n id: undefined,\n ariaLabel: undefined,\n minHeight: '220px',\n tools: () => DEFAULT_TOOLS,\n upload: undefined,\n pickImage: undefined,\n accept: () => DEFAULT_ACCEPT,\n})\n\nconst emit = defineEmits<RichTextEmits>()\n\nconst model = defineModel<string>({ default: '' })\n\nconst field = useFormField(props)\nconst focused = ref(false)\nconst uploading = ref(0)\nconst fileInput = ref<HTMLInputElement | null>(null)\n\n/** The link and YouTube buttons open one shared bar rather than a `prompt()`. */\nconst prompt = ref<{ kind: 'link' | 'youtube'; value: string } | null>(null)\n\nconst editable = computed(() => !field.disabled.value && !props.readonly)\n\n/** Tiptap renders `<p></p>` for an empty document; a backend wants an empty string. */\nfunction readHtml(): string {\n const instance = editor.value\n if (!instance || instance.isEmpty) return ''\n return instance.getHTML()\n}\n\nconst editor = useEditor({\n content: model.value ?? '',\n editable: editable.value,\n extensions: [\n StarterKit.configure({\n link: {\n openOnClick: false,\n autolink: true,\n HTMLAttributes: { rel: 'noopener noreferrer nofollow', target: '_blank' },\n },\n }),\n TableKit.configure({ table: { resizable: true } }),\n Image.configure({ HTMLAttributes: { class: 'wx-rich-text__image' } }),\n Youtube.configure({ nocookie: true, width: 640, height: 360 }),\n FileHandler.configure({\n allowedMimeTypes: props.accept,\n onDrop: (_editor, files, pos) => void uploadFiles(files, pos),\n onPaste: (_editor, files) => void uploadFiles(files),\n }),\n ],\n onUpdate: () => {\n const html = readHtml()\n model.value = html\n emit('change', html)\n },\n onFocus: () => {\n focused.value = true\n emit('focus')\n },\n onBlur: () => {\n focused.value = false\n emit('blur')\n },\n})\n\n/** Only replaces the document when the value really differs, or the caret jumps. */\nwatch(model, (value) => {\n const instance = editor.value\n if (!instance) return\n if ((value ?? '') === readHtml()) return\n instance.commands.setContent(value ?? '', { emitUpdate: false })\n})\n\nwatch(editable, (value) => editor.value?.setEditable(value))\n\nconst isEmpty = computed(() => editor.value?.isEmpty ?? true)\nconst inTable = computed(() => editor.value?.isActive('table') ?? false)\n\nconst classes = computed(() => [\n 'wx-rich-text',\n `wx-rich-text--${field.size.value}`,\n {\n [`wx-rich-text--${field.status.value}`]: field.status.value !== 'default',\n 'is-focused': focused.value,\n 'is-disabled': field.disabled.value,\n 'is-readonly': props.readonly,\n },\n])\n\nfunction insertImage(url: string, alt?: string, pos?: number) {\n const instance = editor.value\n if (!instance) return\n const at = pos ?? instance.state.selection.anchor\n instance\n .chain()\n .focus()\n .insertContentAt(at, { type: 'image', attrs: { src: url, alt } })\n .run()\n}\n\n/**\n * Uploads happen one file at a time and insert only on success — a failed upload\n * leaves nothing behind to clean up.\n */\nasync function uploadFiles(files: File[], pos?: number) {\n if (!props.upload) return\n for (const file of files) {\n uploading.value += 1\n try {\n const result = await props.upload(file)\n insertImage(result.url, result.alt, pos)\n } catch (error) {\n emit('uploadError', error, file)\n } finally {\n uploading.value -= 1\n }\n }\n}\n\nasync function onImageButton() {\n if (props.pickImage) {\n const url = await props.pickImage()\n if (url) insertImage(url)\n return\n }\n fileInput.value?.click()\n}\n\nfunction onFilePicked(event: Event) {\n const input = event.target as HTMLInputElement\n const files = Array.from(input.files ?? [])\n input.value = ''\n void uploadFiles(files)\n}\n\nfunction openPrompt(kind: 'link' | 'youtube') {\n const current = kind === 'link' ? (editor.value?.getAttributes('link').href ?? '') : ''\n prompt.value = { kind, value: String(current) }\n}\n\nfunction applyPrompt() {\n const instance = editor.value\n const current = prompt.value\n if (!instance || !current) return\n const value = current.value.trim()\n\n if (current.kind === 'link') {\n if (value) instance.chain().focus().extendMarkRange('link').setLink({ href: value }).run()\n else instance.chain().focus().extendMarkRange('link').unsetLink().run()\n } else if (value) {\n instance.commands.setYoutubeVideo({ src: value })\n }\n\n prompt.value = null\n}\n\n/** Whether a tool should render at all — the image button needs somewhere to get a file. */\nfunction toolVisible(tool: RichTextTool): boolean {\n if (tool === 'image') return Boolean(props.upload || props.pickImage)\n return true\n}\n\nconst visibleTools = computed(() => props.tools.filter(toolVisible))\n\nfunction isActive(tool: RichTextTool): boolean {\n const instance = editor.value\n if (!instance) return false\n switch (tool) {\n case 'h2':\n return instance.isActive('heading', { level: 2 })\n case 'h3':\n return instance.isActive('heading', { level: 3 })\n case 'h4':\n return instance.isActive('heading', { level: 4 })\n default:\n return instance.isActive(tool)\n }\n}\n\nfunction run(tool: RichTextTool) {\n const instance = editor.value\n if (!instance) return\n const chain = instance.chain().focus()\n\n switch (tool) {\n case 'bold':\n chain.toggleBold().run()\n break\n case 'italic':\n chain.toggleItalic().run()\n break\n case 'strike':\n chain.toggleStrike().run()\n break\n case 'code':\n chain.toggleCode().run()\n break\n case 'h2':\n chain.toggleHeading({ level: 2 }).run()\n break\n case 'h3':\n chain.toggleHeading({ level: 3 }).run()\n break\n case 'h4':\n chain.toggleHeading({ level: 4 }).run()\n break\n case 'bulletList':\n chain.toggleBulletList().run()\n break\n case 'orderedList':\n chain.toggleOrderedList().run()\n break\n case 'blockquote':\n chain.toggleBlockquote().run()\n break\n case 'hr':\n chain.setHorizontalRule().run()\n break\n case 'undo':\n chain.undo().run()\n break\n case 'redo':\n chain.redo().run()\n break\n case 'table':\n chain.insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()\n break\n case 'link':\n openPrompt('link')\n break\n case 'youtube':\n openPrompt('youtube')\n break\n case 'image':\n void onImageButton()\n break\n }\n}\n\nfunction runTableCommand(key: TableToolKey) {\n const instance = editor.value\n if (!instance) return\n const chain = instance.chain().focus() as unknown as Record<string, () => { run: () => void }>\n chain[key]().run()\n}\n\ndefineExpose({\n editor,\n focus: () => editor.value?.commands.focus(),\n clear: () => editor.value?.commands.clearContent(true),\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <div class=\"wx-rich-text__toolbar\" role=\"toolbar\" :aria-label=\"ariaLabel ?? 'Text formatting'\">\n <template v-for=\"(tool, index) in visibleTools\" :key=\"`${tool}-${index}`\">\n <span v-if=\"tool === 'divider'\" class=\"wx-rich-text__divider\" aria-hidden=\"true\" />\n <wx-rich-text-toolbar-button\n v-else\n :icon=\"TOOL_META[tool].icon\"\n :text=\"TOOL_META[tool].text\"\n :label=\"TOOL_META[tool].label\"\n :active=\"isActive(tool)\"\n :disabled=\"!editable\"\n @click=\"run(tool)\"\n />\n </template>\n\n <span v-if=\"uploading > 0\" class=\"wx-rich-text__uploading\">Uploading…</span>\n </div>\n\n <div v-if=\"inTable && editable\" class=\"wx-rich-text__toolbar wx-rich-text__toolbar--table\">\n <wx-rich-text-toolbar-button\n v-for=\"tool in TABLE_TOOLS\"\n :key=\"tool.key\"\n :icon=\"tool.icon\"\n :label=\"tool.label\"\n @click=\"runTableCommand(tool.key)\"\n />\n </div>\n\n <form v-if=\"prompt\" class=\"wx-rich-text__prompt\" @submit.prevent=\"applyPrompt\">\n <label class=\"wx-rich-text__prompt-label\" :for=\"`${field.id.value}-prompt`\">\n {{ prompt.kind === 'link' ? 'Link address' : 'YouTube URL' }}\n </label>\n <input\n :id=\"`${field.id.value}-prompt`\"\n v-model=\"prompt.value\"\n class=\"wx-rich-text__prompt-input\"\n type=\"url\"\n :placeholder=\"prompt.kind === 'link' ? 'https://example.com' : 'https://youtu.be/…'\"\n @keydown.esc=\"prompt = null\"\n />\n <wx-rich-text-toolbar-button icon=\"check\" label=\"Apply\" @click=\"applyPrompt\" />\n <wx-rich-text-toolbar-button icon=\"close\" label=\"Cancel\" @click=\"prompt = null\" />\n </form>\n\n <div class=\"wx-rich-text__body\" :style=\"{ minHeight }\">\n <span v-if=\"placeholder && isEmpty\" class=\"wx-rich-text__placeholder\">{{ placeholder }}</span>\n <editor-content\n :editor=\"editor\"\n class=\"wx-rich-text__content\"\n :aria-describedby=\"field.describedBy.value\"\n />\n </div>\n\n <input\n v-if=\"upload && !pickImage\"\n ref=\"fileInput\"\n class=\"wx-rich-text__file\"\n type=\"file\"\n :accept=\"accept.join(',')\"\n multiple\n @change=\"onFilePicked\"\n />\n </div>\n</template>\n\n<style scoped>\n.wx-rich-text {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n transition: border-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-rich-text.is-focused {\n border-color: var(--wx-border-focus);\n}\n\n.wx-rich-text--error,\n.wx-rich-text--error.is-focused {\n border-color: var(--wx-color-danger);\n}\n\n.wx-rich-text--success {\n border-color: var(--wx-color-success);\n}\n\n.wx-rich-text--warning {\n border-color: var(--wx-color-warning);\n}\n\n.wx-rich-text.is-disabled {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n}\n\n.wx-rich-text__toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--wx-space-2);\n padding: var(--wx-space-6);\n border-bottom: 1px solid var(--wx-border-muted);\n}\n\n.wx-rich-text__toolbar--table {\n background: var(--wx-bg-subtle);\n}\n\n.wx-rich-text__divider {\n width: 1px;\n height: 18px;\n margin: 0 var(--wx-space-4);\n background: var(--wx-border-default);\n}\n\n.wx-rich-text__uploading {\n margin-left: auto;\n padding: 0 var(--wx-space-8);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-rich-text__prompt {\n display: flex;\n align-items: center;\n gap: var(--wx-space-8);\n padding: var(--wx-space-8);\n background: var(--wx-bg-subtle);\n border-bottom: 1px solid var(--wx-border-muted);\n}\n\n.wx-rich-text__prompt-label {\n flex: 0 0 auto;\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-rich-text__prompt-input {\n flex: 1 1 auto;\n min-width: 0;\n height: var(--wx-size-control-sm);\n padding: 0 var(--wx-space-10);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-xs);\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-rich-text__prompt-input:focus {\n border-color: var(--wx-border-focus);\n}\n\n.wx-rich-text__body {\n position: relative;\n flex: 1 1 auto;\n padding: var(--wx-space-12) var(--wx-space-16);\n}\n\n.wx-rich-text__placeholder {\n position: absolute;\n top: var(--wx-space-12);\n left: var(--wx-space-16);\n color: var(--wx-text-placeholder);\n pointer-events: none;\n}\n\n.wx-rich-text__file {\n display: none;\n}\n\n/* The editing surface itself is rendered by ProseMirror. */\n.wx-rich-text__content :deep(.ProseMirror) {\n outline: none;\n min-height: inherit;\n line-height: var(--wx-font-line-height-relaxed);\n}\n\n/*\n * Host applications decorate content tags globally — VitePress, which renders these\n * docs, gives every h2 a top border and 24px of padding, and turns tables into\n * `display: block`. The editing surface has to look the same wherever it is\n * embedded, so anything a host is likely to set is stated here instead of inherited.\n */\n.wx-rich-text__content :deep(h1),\n.wx-rich-text__content :deep(h2),\n.wx-rich-text__content :deep(h3),\n.wx-rich-text__content :deep(h4),\n.wx-rich-text__content :deep(h5),\n.wx-rich-text__content :deep(h6) {\n margin: var(--wx-space-18) 0 var(--wx-space-8);\n padding: 0;\n border: 0;\n color: var(--wx-text-strong);\n font-weight: var(--wx-font-weight-semibold);\n line-height: var(--wx-font-line-height-tight);\n}\n\n.wx-rich-text__content :deep(p) {\n margin: 0 0 var(--wx-space-12);\n}\n\n/* Nothing pushes the document away from the top or bottom edge of the field. */\n.wx-rich-text__content :deep(.ProseMirror > :first-child) {\n margin-top: 0;\n}\n\n.wx-rich-text__content :deep(.ProseMirror > :last-child) {\n margin-bottom: 0;\n}\n\n.wx-rich-text__content :deep(h2) {\n font-size: var(--wx-font-size-2xl);\n}\n\n.wx-rich-text__content :deep(h3) {\n font-size: var(--wx-font-size-xl);\n}\n\n.wx-rich-text__content :deep(h4) {\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-rich-text__content :deep(ul),\n.wx-rich-text__content :deep(ol) {\n margin: 0 0 var(--wx-space-12);\n padding-left: var(--wx-space-24);\n}\n\n.wx-rich-text__content :deep(blockquote) {\n margin: 0 0 var(--wx-space-12);\n padding-left: var(--wx-space-16);\n border-left: 3px solid var(--wx-color-primary-soft);\n color: var(--wx-text-muted);\n}\n\n.wx-rich-text__content :deep(a) {\n color: var(--wx-text-link);\n text-decoration: underline;\n}\n\n.wx-rich-text__content :deep(code) {\n padding: 2px var(--wx-space-4);\n background: var(--wx-bg-fill);\n border-radius: var(--wx-radius-xs);\n font-family: var(--wx-font-family-mono);\n font-size: 0.9em;\n}\n\n.wx-rich-text__content :deep(pre) {\n margin: 0 0 var(--wx-space-12);\n padding: var(--wx-space-12);\n background: var(--wx-bg-inverse);\n border-radius: var(--wx-radius-xs);\n color: var(--wx-text-inverse);\n overflow-x: auto;\n}\n\n.wx-rich-text__content :deep(hr) {\n margin: var(--wx-space-18) 0;\n border: none;\n border-top: 1px solid var(--wx-border-default);\n}\n\n.wx-rich-text__content :deep(img),\n.wx-rich-text__content :deep(iframe) {\n max-width: 100%;\n border-radius: var(--wx-radius-xs);\n}\n\n.wx-rich-text__content :deep(img.ProseMirror-selectednode) {\n outline: 2px solid var(--wx-color-primary);\n}\n\n.wx-rich-text__content :deep(table) {\n /* Stated because hosts turn tables into `display: block` for horizontal scrolling. */\n display: table;\n width: 100%;\n margin: 0 0 var(--wx-space-12);\n border-collapse: collapse;\n table-layout: fixed;\n overflow: hidden;\n}\n\n.wx-rich-text__content :deep(th),\n.wx-rich-text__content :deep(td) {\n position: relative;\n padding: var(--wx-space-6) var(--wx-space-10);\n border: 1px solid var(--wx-border-default);\n vertical-align: top;\n}\n\n.wx-rich-text__content :deep(th) {\n background: var(--wx-bg-fill);\n font-weight: var(--wx-font-weight-semibold);\n text-align: left;\n}\n\n.wx-rich-text__content :deep(.selectedCell::after) {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--wx-color-primary-soft);\n pointer-events: none;\n}\n\n.wx-rich-text__content :deep(.column-resize-handle) {\n position: absolute;\n top: 0;\n right: -2px;\n bottom: 0;\n width: 4px;\n background: var(--wx-color-primary);\n cursor: col-resize;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport {\n ComboboxAnchor,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxItemIndicator,\n ComboboxPortal,\n ComboboxRoot,\n ComboboxTrigger,\n ComboboxViewport,\n} from 'reka-ui'\nimport { useFormField } from '../../composables/useFormField'\nimport type { SelectEmits, SelectModelValue, SelectProps, SelectValue } from './types'\n\ndefineOptions({ name: 'WxSelect', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<SelectProps>(), {\n options: () => [],\n multiple: false,\n filterable: false,\n clearable: false,\n placeholder: undefined,\n emptyText: 'Nothing found',\n teleport: true,\n disabled: undefined,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<SelectEmits>()\n\nconst model = defineModel<SelectModelValue>({ default: null })\n\nconst field = useFormField(props)\nconst open = ref(false)\n\n/**\n * The text in the search field. Controlled here rather than left to the combobox:\n * with `multiple` the input has no display value to fall back on and renders the\n * model itself, so picking two tags leaves \"news,releases\" sitting in the box.\n */\nconst searchText = ref('')\n\n/** Reka wants an array for multiple and a bare value otherwise. */\nconst selection = computed({\n get: () => (props.multiple ? ((model.value as SelectValue[]) ?? []) : (model.value ?? null)),\n set: (value) => {\n model.value = value as SelectModelValue\n emit('change', value as SelectModelValue)\n },\n})\n\nconst labelOf = (value: SelectValue) =>\n props.options.find((option) => option.value === value)?.label ?? String(value)\n\nconst selectedOptions = computed(() => {\n if (!props.multiple) return []\n return ((model.value as SelectValue[]) ?? []).map((value) => ({ value, label: labelOf(value) }))\n})\n\nconst singleLabel = computed(() => {\n if (props.multiple) return ''\n const value = model.value as SelectValue | null\n return value === null || value === undefined ? '' : labelOf(value)\n})\n\nconst hasSelection = computed(() =>\n props.multiple\n ? selectedOptions.value.length > 0\n : model.value !== null && model.value !== undefined && model.value !== '',\n)\n\nconst showClear = computed(() => props.clearable && !field.disabled.value && hasSelection.value)\n\nconst classes = computed(() => [\n 'wx-select',\n `wx-select--${field.size.value}`,\n {\n [`wx-select--${field.status.value}`]: field.status.value !== 'default',\n 'is-open': open.value,\n 'is-disabled': field.disabled.value,\n 'is-multiple': props.multiple,\n },\n])\n\n/** A pick clears the search in multiple mode and shows the label in single mode. */\nwatch(\n () => model.value,\n () => {\n searchText.value = props.multiple ? '' : singleLabel.value\n },\n { immediate: true },\n)\n\nwatch(open, (value) => {\n if (value) {\n emit('open')\n return\n }\n searchText.value = props.multiple ? '' : singleLabel.value\n emit('close')\n})\n\n/** Clicking the field is how everyone expects a select to open. */\nfunction openList() {\n if (!field.disabled.value) open.value = true\n}\n\n/**\n * What a filterable field shows once a value is picked. Without it the input falls\n * back to the raw value, so choosing \"Maria Kovalenko\" leaves \"12\" in the box.\n */\nfunction displayValue(value: unknown): string {\n return value === null || value === undefined ? '' : labelOf(value as SelectValue)\n}\n\n/**\n * Reka filters the list itself and keeps no public search term, so the value is read\n * straight off the input — that is what a caller loading options from a backend needs.\n */\nfunction onSearch(event: Event) {\n emit('search', (event.target as HTMLInputElement).value)\n}\n\nfunction clear() {\n model.value = props.multiple ? [] : null\n emit('change', model.value)\n emit('clear')\n}\n\nfunction removeTag(value: SelectValue) {\n const next = ((model.value as SelectValue[]) ?? []).filter((item) => item !== value)\n model.value = next\n emit('change', next)\n}\n</script>\n\n<template>\n <combobox-root\n v-model=\"selection\"\n v-model:open=\"open\"\n :multiple=\"multiple\"\n :disabled=\"field.disabled.value\"\n :name=\"name\"\n :ignore-filter=\"!filterable\"\n :open-on-click=\"true\"\n :class=\"classes\"\n as=\"div\"\n >\n <combobox-anchor class=\"wx-select__anchor\" as=\"div\" @click=\"openList\">\n <div class=\"wx-select__value\">\n <template v-if=\"multiple\">\n <span\n v-for=\"option in selectedOptions\"\n :key=\"String(option.value)\"\n class=\"wx-select__tag\"\n >\n {{ option.label }}\n <button\n v-if=\"!field.disabled.value\"\n class=\"wx-select__tag-remove\"\n type=\"button\"\n tabindex=\"-1\"\n :aria-label=\"`Remove ${option.label}`\"\n @click.stop=\"removeTag(option.value)\"\n >\n ✕\n </button>\n </span>\n </template>\n\n <combobox-input\n v-if=\"filterable\"\n :id=\"field.id.value\"\n v-bind=\"$attrs\"\n v-model=\"searchText\"\n class=\"wx-select__input\"\n :placeholder=\"placeholder\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-invalid=\"field.status.value === 'error' || undefined\"\n :display-value=\"multiple ? undefined : displayValue\"\n auto-focus\n @input=\"onSearch\"\n />\n\n <template v-else>\n <span v-if=\"!multiple && hasSelection\" class=\"wx-select__single\">{{ singleLabel }}</span>\n <span v-else-if=\"!hasSelection\" class=\"wx-select__placeholder\">{{ placeholder }}</span>\n </template>\n </div>\n\n <button\n v-if=\"showClear\"\n class=\"wx-select__clear\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n @click.stop=\"clear\"\n >\n ✕\n </button>\n\n <combobox-trigger\n :id=\"filterable ? undefined : field.id.value\"\n class=\"wx-select__toggle\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n >\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"m4 6 4 4 4-4\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </combobox-trigger>\n </combobox-anchor>\n\n <combobox-portal :disabled=\"!teleport\">\n <combobox-content class=\"wx-select__content\" position=\"popper\" :side-offset=\"4\">\n <combobox-viewport class=\"wx-select__viewport\">\n <combobox-empty class=\"wx-select__empty\">{{ emptyText }}</combobox-empty>\n\n <slot>\n <combobox-item\n v-for=\"option in options\"\n :key=\"String(option.value)\"\n class=\"wx-select__option\"\n :value=\"option.value\"\n :disabled=\"option.disabled\"\n >\n <span class=\"wx-select__option-label\">{{ option.label }}</span>\n <combobox-item-indicator class=\"wx-select__check\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"m3.5 8.5 3 3 6-6\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </combobox-item-indicator>\n </combobox-item>\n </slot>\n </combobox-viewport>\n </combobox-content>\n </combobox-portal>\n </combobox-root>\n</template>\n\n<style scoped>\n.wx-select {\n display: block;\n width: 100%;\n}\n\n.wx-select__anchor {\n display: flex;\n align-items: center;\n gap: var(--wx-space-6);\n box-sizing: border-box;\n min-height: var(--wx-size-control-md);\n padding: 0 var(--wx-space-6) 0 var(--wx-space-12);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n font-size: var(--wx-font-size-md);\n cursor: pointer;\n transition: border-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-select--sm .wx-select__anchor {\n min-height: var(--wx-size-control-sm);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-select--lg .wx-select__anchor {\n min-height: var(--wx-size-control-lg);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-select__anchor:hover {\n border-color: var(--wx-border-strong);\n}\n\n.wx-select.is-open .wx-select__anchor {\n border-color: var(--wx-border-focus);\n}\n\n.wx-select--error .wx-select__anchor,\n.wx-select--error.is-open .wx-select__anchor {\n border-color: var(--wx-color-danger);\n}\n\n.wx-select--success .wx-select__anchor {\n border-color: var(--wx-color-success);\n}\n\n.wx-select--warning .wx-select__anchor {\n border-color: var(--wx-color-warning);\n}\n\n.wx-select.is-disabled .wx-select__anchor {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-select__value {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--wx-space-4);\n flex: 1 1 auto;\n min-width: 0;\n padding: var(--wx-space-4) 0;\n}\n\n.wx-select__single,\n.wx-select__placeholder {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.wx-select__placeholder {\n color: var(--wx-text-placeholder);\n}\n\n.wx-select__input {\n flex: 1 1 60px;\n min-width: 0;\n padding: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n}\n\n.wx-select__input::placeholder {\n color: var(--wx-text-placeholder);\n}\n\n.wx-select__tag {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-4);\n padding: 2px var(--wx-space-6);\n background: var(--wx-bg-fill);\n border-radius: var(--wx-radius-xs);\n font-size: var(--wx-font-size-sm);\n line-height: var(--wx-font-line-height-tight);\n}\n\n.wx-select__tag-remove,\n.wx-select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: var(--wx-radius-full);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-xs);\n line-height: 1;\n cursor: pointer;\n}\n\n.wx-select__tag-remove:hover,\n.wx-select__clear:hover {\n color: var(--wx-text-default);\n}\n\n.wx-select__clear {\n flex: 0 0 auto;\n width: 18px;\n height: 18px;\n}\n\n.wx-select__toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n width: 24px;\n height: 24px;\n padding: 0;\n background: transparent;\n border: none;\n color: var(--wx-text-muted);\n cursor: inherit;\n transition: transform var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-select__toggle svg {\n width: 16px;\n height: 16px;\n}\n\n.wx-select.is-open .wx-select__toggle {\n transform: rotate(180deg);\n}\n</style>\n\n<style>\n/* The list is teleported, so its styles cannot be scoped to the component. */\n.wx-select__content {\n z-index: var(--wx-z-index-dropdown);\n box-sizing: border-box;\n width: var(--reka-combobox-trigger-width);\n max-height: 280px;\n padding: var(--wx-space-4);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-sm);\n box-shadow: var(--wx-shadow-popover);\n color: var(--wx-text-default);\n font-family: var(--wx-font-family-sans);\n font-size: var(--wx-font-size-md);\n overflow: hidden;\n}\n\n.wx-select__viewport {\n max-height: 272px;\n overflow-y: auto;\n}\n\n.wx-select__option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wx-space-8);\n padding: var(--wx-space-6) var(--wx-space-10);\n border-radius: var(--wx-radius-xs);\n cursor: pointer;\n user-select: none;\n}\n\n.wx-select__option[data-highlighted] {\n background: var(--wx-bg-fill);\n outline: none;\n}\n\n.wx-select__option[data-state='checked'] {\n color: var(--wx-color-primary);\n font-weight: var(--wx-font-weight-medium);\n}\n\n.wx-select__option[data-disabled] {\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-select__option-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.wx-select__check {\n display: inline-flex;\n flex: 0 0 auto;\n color: var(--wx-color-primary);\n}\n\n.wx-select__check svg {\n width: 16px;\n height: 16px;\n}\n\n.wx-select__empty {\n padding: var(--wx-space-10);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-sm);\n text-align: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { SliderRange, SliderRoot, SliderThumb, SliderTrack } from 'reka-ui'\nimport { useFormField } from '../../composables/useFormField'\nimport type { SliderEmits, SliderModelValue, SliderProps } from './types'\n\ndefineOptions({ name: 'WxSlider', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<SliderProps>(), {\n min: 0,\n max: 100,\n step: 1,\n range: false,\n minStepsBetweenThumbs: 0,\n showValue: false,\n marks: undefined,\n disabled: undefined,\n size: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<SliderEmits>()\n\nconst model = defineModel<SliderModelValue>({ default: null })\n\nconst field = useFormField(props)\n\n/**\n * The underlying slider always works with an array. A single slider keeps a plain\n * number in the model, because that is what a caller wants to store.\n */\nconst values = computed<number[]>(() => {\n if (props.range) {\n const pair = Array.isArray(model.value) ? model.value : []\n return [pair[0] ?? props.min, pair[1] ?? props.max]\n }\n const single = Array.isArray(model.value) ? model.value[0] : model.value\n return [single ?? props.min]\n})\n\nfunction onUpdate(next: number[] | undefined) {\n if (!next) return\n const value = props.range ? [...next] : next[0]\n model.value = value\n emit('change', value)\n}\n\nconst marks = computed(() =>\n Object.entries(props.marks ?? {}).map(([value, label]) => ({\n value: Number(value),\n label,\n offset: ((Number(value) - props.min) / (props.max - props.min)) * 100,\n })),\n)\n\nconst classes = computed(() => [\n 'wx-slider',\n `wx-slider--${field.size.value}`,\n { 'is-disabled': field.disabled.value, 'is-range': props.range },\n])\n</script>\n\n<template>\n <div :class=\"classes\">\n <div class=\"wx-slider__row\">\n <slider-root\n :id=\"field.id.value\"\n v-bind=\"$attrs\"\n class=\"wx-slider__root\"\n :model-value=\"values\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"field.disabled.value\"\n :min-steps-between-thumbs=\"minStepsBetweenThumbs\"\n :name=\"name\"\n @update:model-value=\"onUpdate\"\n >\n <slider-track class=\"wx-slider__track\">\n <slider-range class=\"wx-slider__range\" />\n </slider-track>\n\n <slider-thumb\n v-for=\"index in values.length\"\n :key=\"index\"\n class=\"wx-slider__thumb\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n />\n </slider-root>\n\n <span v-if=\"showValue\" class=\"wx-slider__value\">\n {{ range ? `${values[0]} — ${values[1]}` : values[0] }}\n </span>\n </div>\n\n <div v-if=\"marks.length\" class=\"wx-slider__marks\" aria-hidden=\"true\">\n <span\n v-for=\"mark in marks\"\n :key=\"mark.value\"\n class=\"wx-slider__mark\"\n :style=\"{ left: `${mark.offset}%` }\"\n >\n {{ mark.label }}\n </span>\n </div>\n </div>\n</template>\n\n<style scoped>\n.wx-slider {\n display: block;\n width: 100%;\n}\n\n.wx-slider__row {\n display: flex;\n align-items: center;\n gap: var(--wx-space-16);\n}\n\n.wx-slider__root {\n position: relative;\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n height: var(--wx-size-control-md);\n touch-action: none;\n user-select: none;\n}\n\n.wx-slider--sm .wx-slider__root {\n height: var(--wx-size-control-sm);\n}\n\n.wx-slider--lg .wx-slider__root {\n height: var(--wx-size-control-lg);\n}\n\n.wx-slider__track {\n position: relative;\n flex: 1 1 auto;\n height: 4px;\n background: var(--wx-bg-fill-hover);\n border-radius: var(--wx-radius-full);\n}\n\n.wx-slider__range {\n position: absolute;\n height: 100%;\n background: var(--wx-color-primary);\n border-radius: var(--wx-radius-full);\n}\n\n.wx-slider__thumb {\n display: block;\n width: 18px;\n height: 18px;\n background: var(--wx-bg-surface);\n border: 2px solid var(--wx-color-primary);\n border-radius: var(--wx-radius-full);\n box-shadow: var(--wx-shadow-card);\n cursor: grab;\n transition: box-shadow var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-slider__thumb:focus-visible {\n outline: none;\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-slider__thumb:active {\n cursor: grabbing;\n}\n\n.wx-slider.is-disabled .wx-slider__range {\n background: var(--wx-color-primary-disabled);\n}\n\n.wx-slider.is-disabled .wx-slider__thumb {\n border-color: var(--wx-color-primary-disabled);\n cursor: not-allowed;\n}\n\n.wx-slider__value {\n flex: 0 0 auto;\n min-width: 4ch;\n color: var(--wx-text-default);\n font-size: var(--wx-font-size-sm);\n font-variant-numeric: tabular-nums;\n text-align: right;\n}\n\n.wx-slider__marks {\n position: relative;\n height: 18px;\n margin-top: calc(var(--wx-space-4) * -1);\n}\n\n.wx-slider__mark {\n position: absolute;\n transform: translateX(-50%);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-xs);\n white-space: nowrap;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useFormField, type ChoiceValue } from '../../composables/useFormField'\nimport type { SwitchEmits, SwitchProps } from './types'\n\ndefineOptions({ name: 'WxSwitch', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<SwitchProps>(), {\n activeValue: true,\n inactiveValue: false,\n label: undefined,\n disabled: undefined,\n size: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<SwitchEmits>()\n\nconst model = defineModel<ChoiceValue>({ default: false })\n\nconst field = useFormField(props)\n\nconst checked = computed(() => model.value === props.activeValue)\nconst size = computed(() => props.size ?? field.size.value)\n\nconst classes = computed(() => [\n 'wx-switch',\n `wx-switch--${size.value}`,\n { 'is-checked': checked.value, 'is-disabled': field.disabled.value },\n])\n\nfunction onChange(event: Event) {\n const next = (event.target as HTMLInputElement).checked ? props.activeValue : props.inactiveValue\n model.value = next\n emit('change', next)\n}\n</script>\n\n<template>\n <label :class=\"classes\">\n <input\n :id=\"field.id.value\"\n v-bind=\"$attrs\"\n class=\"wx-switch__native\"\n type=\"checkbox\"\n role=\"switch\"\n :name=\"name\"\n :checked=\"checked\"\n :disabled=\"field.disabled.value\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n @change=\"onChange\"\n />\n\n <span class=\"wx-switch__track\" aria-hidden=\"true\">\n <span class=\"wx-switch__thumb\" />\n </span>\n\n <span v-if=\"label || $slots.default\" class=\"wx-switch__label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n\n<style scoped>\n.wx-switch {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-8);\n cursor: pointer;\n user-select: none;\n color: var(--wx-text-default);\n}\n\n.wx-switch.is-disabled {\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-switch__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.wx-switch__track {\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n box-sizing: border-box;\n width: calc(var(--wx-switch-height) * 1.8);\n height: var(--wx-switch-height);\n padding: 2px;\n background: var(--wx-border-strong);\n border-radius: var(--wx-radius-full);\n transition:\n background-color var(--wx-duration-normal) var(--wx-easing-standard),\n box-shadow var(--wx-duration-fast) var(--wx-easing-standard);\n}\n\n.wx-switch--sm {\n --wx-switch-height: 18px;\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-switch--md {\n --wx-switch-height: 22px;\n font-size: var(--wx-font-size-md);\n}\n\n.wx-switch--lg {\n --wx-switch-height: 26px;\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-switch__thumb {\n width: calc(var(--wx-switch-height) - 4px);\n height: calc(var(--wx-switch-height) - 4px);\n background: var(--wx-bg-surface);\n border-radius: var(--wx-radius-full);\n box-shadow: var(--wx-shadow-card);\n transition: transform var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-switch.is-checked .wx-switch__track {\n background: var(--wx-color-primary);\n}\n\n.wx-switch.is-checked .wx-switch__thumb {\n transform: translateX(calc(var(--wx-switch-height) * 0.8));\n}\n\n.wx-switch.is-disabled .wx-switch__track {\n background: var(--wx-border-default);\n}\n\n.wx-switch.is-disabled.is-checked .wx-switch__track {\n background: var(--wx-color-primary-disabled);\n}\n\n.wx-switch__native:focus-visible + .wx-switch__track {\n box-shadow: var(--wx-ring-focus);\n}\n\n.wx-switch__label {\n line-height: var(--wx-font-line-height-normal);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wx-switch__track,\n .wx-switch__thumb {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { useFormField } from '../../composables/useFormField'\nimport type { TagsInputEmits, TagsInputProps } from './types'\n\ndefineOptions({ name: 'WxTagsInput', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TagsInputProps>(), {\n suggestions: () => [],\n placeholder: undefined,\n emptyText: 'Nothing found',\n max: undefined,\n duplicates: false,\n allowCreate: true,\n disabled: undefined,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<TagsInputEmits>()\n\nconst model = defineModel<string[]>({ default: () => [] })\n\nconst field = useFormField(props)\nconst inputRef = ref<HTMLInputElement | null>(null)\nconst text = ref('')\nconst open = ref(false)\nconst highlighted = ref(-1)\n/** The tag Backspace has marked; the next Backspace removes it. */\nconst armed = ref(-1)\n\nconst tags = computed(() => model.value ?? [])\n\nconst suggestions = computed(() =>\n props.suggestions.filter((suggestion) => !tags.value.includes(suggestion)),\n)\n\nconst showList = computed(() => open.value && suggestions.value.length > 0)\n\nconst full = computed(() => props.max !== undefined && tags.value.length >= props.max)\n\nconst classes = computed(() => [\n 'wx-tags-input',\n `wx-tags-input--${field.size.value}`,\n {\n [`wx-tags-input--${field.status.value}`]: field.status.value !== 'default',\n 'is-open': showList.value,\n 'is-disabled': field.disabled.value,\n },\n])\n\nwatch(suggestions, () => {\n highlighted.value = -1\n})\n\nfunction commit(next: string[]) {\n model.value = next\n emit('change', next)\n}\n\nfunction add(tag: string) {\n const value = tag.trim()\n if (!value || full.value) return\n if (!props.duplicates && tags.value.includes(value)) {\n text.value = ''\n return\n }\n commit([...tags.value, value])\n text.value = ''\n open.value = false\n armed.value = -1\n}\n\nfunction remove(index: number) {\n commit(tags.value.filter((_, position) => position !== index))\n armed.value = -1\n}\n\nfunction onInput(event: Event) {\n const value = (event.target as HTMLInputElement).value\n text.value = value\n armed.value = -1\n highlighted.value = -1\n if (value) open.value = true\n emit('search', value)\n}\n\n/**\n * Backspace on an empty field marks the last tag first and removes it on the second\n * press — deleting something the user cannot see would be worse than one extra key.\n */\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n open.value = false\n armed.value = -1\n return\n }\n\n if (event.key === 'Backspace' && text.value === '' && tags.value.length > 0) {\n event.preventDefault()\n if (armed.value === tags.value.length - 1) remove(armed.value)\n else armed.value = tags.value.length - 1\n return\n }\n\n if (event.key === 'ArrowDown' && showList.value) {\n event.preventDefault()\n highlighted.value = (highlighted.value + 1) % suggestions.value.length\n return\n }\n\n if (event.key === 'ArrowUp' && showList.value) {\n event.preventDefault()\n highlighted.value =\n highlighted.value <= 0 ? suggestions.value.length - 1 : highlighted.value - 1\n return\n }\n\n if (event.key === 'Enter') {\n event.preventDefault()\n if (showList.value && highlighted.value >= 0) add(suggestions.value[highlighted.value])\n else if (props.allowCreate) add(text.value)\n }\n}\n\nfunction onBlur() {\n armed.value = -1\n // Let a click on a suggestion land before the list disappears.\n window.setTimeout(() => {\n open.value = false\n }, 120)\n}\n\ndefineExpose({ focus: () => inputRef.value?.focus() })\n</script>\n\n<template>\n <div :class=\"classes\">\n <div class=\"wx-tags-input__anchor\" @click=\"inputRef?.focus()\">\n <span\n v-for=\"(tag, index) in tags\"\n :key=\"tag\"\n class=\"wx-tags-input__tag\"\n :class=\"{ 'is-armed': index === armed }\"\n >\n {{ tag }}\n <button\n v-if=\"!field.disabled.value\"\n class=\"wx-tags-input__remove\"\n type=\"button\"\n tabindex=\"-1\"\n :aria-label=\"`Remove ${tag}`\"\n @click.stop=\"remove(index)\"\n >\n ✕\n </button>\n </span>\n\n <input\n :id=\"field.id.value\"\n ref=\"inputRef\"\n v-bind=\"$attrs\"\n class=\"wx-tags-input__field\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n :value=\"text\"\n :placeholder=\"placeholder\"\n :disabled=\"field.disabled.value\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-invalid=\"field.status.value === 'error' || undefined\"\n :aria-expanded=\"showList\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n @focus=\"open = true\"\n @blur=\"onBlur\"\n />\n\n <ul v-if=\"showList\" class=\"wx-tags-input__list\" role=\"listbox\">\n <li\n v-for=\"(suggestion, index) in suggestions\"\n :key=\"suggestion\"\n class=\"wx-tags-input__option\"\n :class=\"{ 'is-highlighted': index === highlighted }\"\n role=\"option\"\n :aria-selected=\"index === highlighted\"\n @mousedown.prevent=\"add(suggestion)\"\n @mousemove=\"highlighted = index\"\n >\n {{ suggestion }}\n </li>\n </ul>\n </div>\n\n <select v-if=\"name\" class=\"wx-sr-only\" :name=\"name\" multiple tabindex=\"-1\" aria-hidden=\"true\">\n <option v-for=\"tag in tags\" :key=\"tag\" :value=\"tag\" selected>{{ tag }}</option>\n </select>\n </div>\n</template>\n\n<style scoped>\n.wx-tags-input {\n display: block;\n width: 100%;\n}\n\n.wx-tags-input__anchor {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--wx-space-4);\n box-sizing: border-box;\n min-height: var(--wx-size-control-md);\n padding: var(--wx-space-4) var(--wx-space-10);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n font-size: var(--wx-font-size-md);\n cursor: text;\n transition: border-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-tags-input--sm .wx-tags-input__anchor {\n min-height: var(--wx-size-control-sm);\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-tags-input--lg .wx-tags-input__anchor {\n min-height: var(--wx-size-control-lg);\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-tags-input__anchor:hover {\n border-color: var(--wx-border-strong);\n}\n\n.wx-tags-input__anchor:focus-within {\n border-color: var(--wx-border-focus);\n}\n\n.wx-tags-input--error .wx-tags-input__anchor {\n border-color: var(--wx-color-danger);\n}\n\n.wx-tags-input--success .wx-tags-input__anchor {\n border-color: var(--wx-color-success);\n}\n\n.wx-tags-input--warning .wx-tags-input__anchor {\n border-color: var(--wx-color-warning);\n}\n\n.wx-tags-input.is-disabled .wx-tags-input__anchor {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n cursor: not-allowed;\n}\n\n.wx-tags-input__tag {\n display: inline-flex;\n align-items: center;\n gap: var(--wx-space-4);\n padding: 2px var(--wx-space-6);\n background: var(--wx-bg-fill);\n border-radius: var(--wx-radius-xs);\n font-size: var(--wx-font-size-sm);\n line-height: var(--wx-font-line-height-tight);\n}\n\n.wx-tags-input__tag.is-armed {\n background: var(--wx-color-danger-soft);\n color: var(--wx-color-danger);\n}\n\n.wx-tags-input__remove {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n background: transparent;\n border: none;\n color: currentcolor;\n font-size: var(--wx-font-size-xs);\n line-height: 1;\n opacity: 0.65;\n cursor: pointer;\n}\n\n.wx-tags-input__remove:hover {\n opacity: 1;\n}\n\n.wx-tags-input__field {\n flex: 1 1 80px;\n min-width: 0;\n padding: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n}\n\n.wx-tags-input__field::placeholder {\n color: var(--wx-text-placeholder);\n}\n\n.wx-tags-input__list {\n position: absolute;\n top: calc(100% + var(--wx-space-4));\n left: 0;\n right: 0;\n z-index: var(--wx-z-index-dropdown);\n max-height: 220px;\n margin: 0;\n padding: var(--wx-space-4);\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-sm);\n box-shadow: var(--wx-shadow-popover);\n list-style: none;\n overflow-y: auto;\n}\n\n.wx-tags-input__option {\n padding: var(--wx-space-6) var(--wx-space-10);\n border-radius: var(--wx-radius-xs);\n cursor: pointer;\n}\n\n.wx-tags-input__option.is-highlighted {\n background: var(--wx-bg-fill);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { useFormField } from '../../composables/useFormField'\nimport type { TextareaEmits, TextareaModelValue, TextareaProps } from './types'\n\ndefineOptions({ name: 'WxTextarea', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TextareaProps>(), {\n size: undefined,\n status: undefined,\n id: undefined,\n placeholder: undefined,\n disabled: undefined,\n readonly: false,\n rows: 3,\n autosize: false,\n maxlength: undefined,\n showCount: false,\n resize: 'vertical',\n ariaLabel: undefined,\n})\n\nconst emit = defineEmits<TextareaEmits>()\n\nconst model = defineModel<TextareaModelValue>({ default: '' })\n\nconst field = useFormField(props)\nconst textareaRef = ref<HTMLTextAreaElement | null>(null)\nconst focused = ref(false)\n\nconst currentValue = computed(() => model.value ?? '')\n\nconst counter = computed(() =>\n props.showCount && props.maxlength ? `${currentValue.value.length}/${props.maxlength}` : null,\n)\n\nconst autosizeOptions = computed(() =>\n props.autosize === true ? {} : props.autosize === false ? null : props.autosize,\n)\n\nconst classes = computed(() => [\n 'wx-textarea',\n `wx-textarea--${field.size.value}`,\n {\n [`wx-textarea--${field.status.value}`]: field.status.value !== 'default',\n 'is-focused': focused.value,\n 'is-disabled': field.disabled.value,\n 'is-readonly': props.readonly,\n 'is-autosize': Boolean(autosizeOptions.value),\n },\n])\n\n/** Grows the field to fit its content, clamped by minRows / maxRows. */\nfunction syncHeight() {\n const options = autosizeOptions.value\n const el = textareaRef.value\n if (!options || !el) return\n\n el.style.height = 'auto'\n const styles = getComputedStyle(el)\n const lineHeight = Number.parseFloat(styles.lineHeight) || 20\n const vertical =\n Number.parseFloat(styles.paddingTop) +\n Number.parseFloat(styles.paddingBottom) +\n Number.parseFloat(styles.borderTopWidth) +\n Number.parseFloat(styles.borderBottomWidth)\n\n let height = el.scrollHeight\n if (options.minRows) height = Math.max(height, options.minRows * lineHeight + vertical)\n if (options.maxRows) height = Math.min(height, options.maxRows * lineHeight + vertical)\n\n el.style.height = `${height}px`\n el.style.overflowY = options.maxRows && el.scrollHeight > height ? 'auto' : 'hidden'\n}\n\nonMounted(() => nextTick(syncHeight))\nwatch([currentValue, autosizeOptions], () => nextTick(syncHeight))\n\nfunction onInput(event: Event) {\n const value = (event.target as HTMLTextAreaElement).value\n model.value = value\n emit('input', value)\n}\n\nfunction onChange(event: Event) {\n emit('change', (event.target as HTMLTextAreaElement).value)\n}\n\nfunction onFocus(event: FocusEvent) {\n focused.value = true\n emit('focus', event)\n}\n\nfunction onBlur(event: FocusEvent) {\n focused.value = false\n emit('blur', event)\n}\n\ndefineExpose({\n focus: () => textareaRef.value?.focus(),\n blur: () => textareaRef.value?.blur(),\n select: () => textareaRef.value?.select(),\n textarea: textareaRef,\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <textarea\n :id=\"field.id.value\"\n ref=\"textareaRef\"\n v-bind=\"$attrs\"\n class=\"wx-textarea__inner\"\n :value=\"currentValue\"\n :rows=\"rows\"\n :placeholder=\"placeholder\"\n :disabled=\"field.disabled.value\"\n :readonly=\"readonly\"\n :maxlength=\"maxlength\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"field.describedBy.value\"\n :aria-invalid=\"field.status.value === 'error' || undefined\"\n :style=\"{ resize }\"\n @input=\"onInput\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n />\n\n <span v-if=\"counter\" class=\"wx-textarea__count\">{{ counter }}</span>\n </div>\n</template>\n\n<style scoped>\n.wx-textarea {\n position: relative;\n display: block;\n box-sizing: border-box;\n width: 100%;\n background: var(--wx-bg-surface);\n border: 1px solid var(--wx-border-default);\n border-radius: var(--wx-radius-control);\n color: var(--wx-text-default);\n transition:\n border-color var(--wx-duration-normal) var(--wx-easing-standard),\n background-color var(--wx-duration-normal) var(--wx-easing-standard);\n}\n\n.wx-textarea:hover:not(.is-disabled) {\n border-color: var(--wx-border-strong);\n}\n\n.wx-textarea.is-focused {\n border-color: var(--wx-border-focus);\n}\n\n.wx-textarea--error,\n.wx-textarea--error.is-focused {\n border-color: var(--wx-color-danger);\n}\n\n.wx-textarea--success,\n.wx-textarea--success.is-focused {\n border-color: var(--wx-color-success);\n}\n\n.wx-textarea--warning,\n.wx-textarea--warning.is-focused {\n border-color: var(--wx-color-warning);\n}\n\n.wx-textarea.is-disabled {\n background: var(--wx-bg-disabled);\n color: var(--wx-text-disabled);\n}\n\n.wx-textarea__inner {\n display: block;\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: var(--wx-space-8) var(--wx-space-12);\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: var(--wx-font-line-height-normal);\n}\n\n.wx-textarea--sm {\n font-size: var(--wx-font-size-sm);\n}\n\n.wx-textarea--md {\n font-size: var(--wx-font-size-md);\n}\n\n.wx-textarea--lg {\n font-size: var(--wx-font-size-lg);\n}\n\n.wx-textarea.is-autosize .wx-textarea__inner {\n resize: none !important;\n overflow-y: hidden;\n}\n\n.wx-textarea__inner::placeholder {\n color: var(--wx-text-placeholder);\n}\n\n.wx-textarea__inner:disabled {\n cursor: not-allowed;\n}\n\n.wx-textarea__count {\n position: absolute;\n right: var(--wx-space-8);\n bottom: var(--wx-space-4);\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-xs);\n font-variant-numeric: tabular-nums;\n pointer-events: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport WxDatePicker from '../DatePicker/DatePicker.vue'\nimport type { DatePickerModelValue, DatePickerProps } from '../DatePicker/types'\n\ndefineOptions({ name: 'WxTimePicker' })\n\n/**\n * Every prop defaults to `undefined` on purpose. Vue casts an absent boolean prop\n * to `false`, and this preset forwards its whole prop object — without these the\n * preset would hand `WxDatePicker` an explicit `false` for `is24`, `clearable`,\n * `autoApply` and `teleport`, overriding that component's own defaults. Passing\n * `undefined` lets each default apply as if the prop had never been written.\n */\nwithDefaults(defineProps<Omit<DatePickerProps, 'type'>>(), {\n valueFormat: undefined,\n format: undefined,\n placeholder: undefined,\n clearable: undefined,\n minDate: undefined,\n maxDate: undefined,\n seconds: undefined,\n minutesIncrement: undefined,\n is24: undefined,\n weekStart: undefined,\n autoApply: undefined,\n textInput: undefined,\n teleport: undefined,\n disabled: undefined,\n readonly: undefined,\n size: undefined,\n status: undefined,\n id: undefined,\n name: undefined,\n ariaLabel: undefined,\n})\n\nconst model = defineModel<DatePickerModelValue>({ default: null })\n</script>\n\n<template>\n <wx-date-picker v-model=\"model\" type=\"time\" v-bind=\"$props\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps ?? {}\" />\n </template>\n </wx-date-picker>\n</template>\n","import type { App, Plugin } from 'vue'\nimport * as components from './components'\n\nexport interface WebxUiOptions {\n /**\n * Prefix used when registering components globally.\n * Components are declared as `WxButton`, so the default keeps that name.\n */\n prefix?: string\n}\n\n/**\n * Registers every component globally:\n *\n * ```ts\n * import { WebxUI } from '@webx-ui/core'\n * import '@webx-ui/core/style.css'\n *\n * app.use(WebxUI)\n * ```\n *\n * Prefer named imports when bundle size matters — they tree-shake.\n */\nexport const WebxUI: Plugin<[WebxUiOptions?]> = {\n install(app: App, options: WebxUiOptions = {}) {\n const { prefix = 'Wx' } = options\n\n for (const [name, component] of Object.entries(components)) {\n if (!name.startsWith('Wx')) continue\n const registeredName = prefix === 'Wx' ? name : `${prefix}${name.slice(2)}`\n app.component(registeredName, component)\n }\n },\n}\n\nexport default WebxUI\n"],"names":["props","__props","emit","__emit","isDisabled","computed","tag","classes","nativeAttrs","onClick","event","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","$attrs","_createElementBlock","_hoisted_1","$slots","_hoisted_2","_renderSlot","_ctx","_hoisted_3","slots","useSlots","hasHeader","hasSidebar","_createElementVNode","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","formContextKey","formItemContextKey","uid","useId","prefix","useFormField","form","inject","item","fallbackId","id","disabled","size","status","describedBy","checkboxGroupKey","radioGroupKey","provideFormItem","context","provide","model","_useModel","group","field","inputRef","ref","checked","syncIndeterminate","onMounted","watch","onChange","next","_unref","toggle","value","current","_Fragment","_renderList","option","WxCheckbox","HEX","open","text","toWorking","hex","convertToHsb","parseColor","working","colorToHex","areaStyle","getAreaBackgroundStyle","hueStyle","getSliderBackgroundStyle","swatch","commit","onInput","onBlur","candidate","onColor","color","onHex","clear","openPicker","PopoverRoot","$event","_createVNode","PopoverAnchor","_normalizeClass","_normalizeStyle","PopoverPortal","PopoverContent","ColorAreaRoot","ColorAreaArea","ColorAreaThumb","ColorSliderRoot","ColorSliderTrack","ColorSliderThumb","preset","hasTime","modelType","displayFormat","time","config","timeConfig","inputAttrs","onUpdate","onCleared","_","name","_withCtx","slotProps","_normalizeProps","_guardReactiveProps","WxDatePicker","$props","_createSlots","errors","toRef","onSubmit","onReset","baseId","errorId","helpId","labelMode","controlId","registerLabelTarget","messages","hasError","labelWidth","isInline","__expose","focused","currentValue","showClear","counter","onFocus","_toDisplayString","precision","decimals","round","factor","clamp","display","canDecrease","canIncrease","stepBy","direction","base","parsed","normalize","onWheel","onKeydown","fallbackName","WxRadio","hovered","interactive","shown","stars","index","position","fill","valueAt","target","left","width","set","onHover","step","star","richTextIcons","$emit","DEFAULT_TOOLS","DEFAULT_ACCEPT","TOOL_META","TABLE_TOOLS","uploading","fileInput","prompt","editable","readHtml","instance","editor","useEditor","StarterKit","TableKit","Image","Youtube","FileHandler","_editor","files","pos","uploadFiles","html","isEmpty","inTable","insertImage","url","alt","at","file","result","error","onImageButton","onFilePicked","input","openPrompt","kind","applyPrompt","toolVisible","tool","visibleTools","isActive","run","chain","runTableCommand","key","WxRichTextToolbarButton","_cache","_vModelText","EditorContent","searchText","selection","labelOf","selectedOptions","singleLabel","hasSelection","openList","displayValue","onSearch","removeTag","ComboboxRoot","ComboboxAnchor","_withModifiers","ComboboxTrigger","ComboboxPortal","ComboboxContent","ComboboxViewport","ComboboxEmpty","ComboboxItem","ComboboxItemIndicator","values","pair","marks","label","SliderTrack","SliderRange","SliderThumb","mark","highlighted","armed","tags","suggestions","suggestion","showList","full","add","remove","_createTextVNode","textareaRef","autosizeOptions","syncHeight","options","el","styles","lineHeight","vertical","height","nextTick","WebxUI","app","component","components","registeredName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GAaRC,IAAOC,GAEPC,IAAaC,EAAS,MAAML,EAAM,YAAYA,EAAM,OAAO,GAC3DM,IAAMD,EAAS,MAAOL,EAAM,OAAO,MAAM,QAAS,GAElDO,IAAUF,EAAS,MAAM;AAAA,MAC7B;AAAA,MACA,cAAcL,EAAM,IAAI;AAAA,MACxB,cAAcA,EAAM,OAAO;AAAA,MAC3B,cAAcA,EAAM,IAAI;AAAA,MACxB;AAAA,QACE,oBAAoBA,EAAM;AAAA,QAC1B,oBAAoBA,EAAM;AAAA,QAC1B,sBAAsBA,EAAM;AAAA,QAC5B,eAAeI,EAAW;AAAA,MAAA;AAAA,IAC5B,CACD,GAEKI,IAAcH;AAAA,MAAS,MAC3BL,EAAM,OACF;AAAA,QACE,MAAMI,EAAW,QAAQ,SAAYJ,EAAM;AAAA,QAC3C,QAAQA,EAAM;AAAA,QACd,MAAM;AAAA,QACN,iBAAiBI,EAAW,QAAQ,SAAS;AAAA,QAC7C,UAAUA,EAAW,QAAQ,KAAK;AAAA,MAAA,IAEpC;AAAA,QACE,MAAMJ,EAAM;AAAA,QACZ,UAAUI,EAAW;AAAA,MAAA;AAAA,IACvB;AAGN,aAASK,EAAQC,GAAmB;AAClC,UAAIN,EAAW,OAAO;AACpB,QAAAM,EAAM,eAAA,GACNA,EAAM,gBAAA;AACN;AAAA,MACF;AACA,MAAAR,EAAK,SAASQ,CAAK;AAAA,IACrB;sBAIEC,EAAA,GAAAC,EAcYC,GAbLP,EAAA,KAAG,GADVQ,EAcY,EAAA,GAZGN,EAAA,UAAgBO,EAAAA,UAAM;AAAA,MAClC,OAAOR,EAAA;AAAA,MAC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