From e4c1e45f1823a0972a009f27bc5c8d09ebd7b5bc Mon Sep 17 00:00:00 2001 From: hywax Date: Fri, 24 Oct 2025 13:32:50 +0500 Subject: [PATCH 01/21] feat(InputTime): add component --- docs/content/docs/2.components/input-time.md | 38 ++++ .../nuxt/app/composables/useNavigation.ts | 1 + .../nuxt/app/pages/components/input-time.vue | 31 ++++ src/runtime/components/InputTime.vue | 166 ++++++++++++++++++ src/runtime/types/index.ts | 1 + src/theme/index.ts | 1 + src/theme/input-time.ts | 38 ++++ test/components/InputTime.spec.ts | 30 ++++ 8 files changed, 306 insertions(+) create mode 100644 docs/content/docs/2.components/input-time.md create mode 100644 playgrounds/nuxt/app/pages/components/input-time.vue create mode 100644 src/runtime/components/InputTime.vue create mode 100644 src/theme/input-time.ts create mode 100644 test/components/InputTime.spec.ts diff --git a/docs/content/docs/2.components/input-time.md b/docs/content/docs/2.components/input-time.md new file mode 100644 index 0000000000..0a44f60e0d --- /dev/null +++ b/docs/content/docs/2.components/input-time.md @@ -0,0 +1,38 @@ +--- +title: InputTime +description: '' +links: + - label: InputTime + icon: i-custom-reka-ui + to: https://reka-ui.com/docs/components/input-time + - label: GitHub + icon: i-simple-icons-github + to: https://github.com/nuxt/ui/blob/v4/src/runtime/components/InputTime.vue +navigation.badge: Soon +--- + +## Usage + +## Examples + +## API + +### Props + +:component-props + +### Slots + +:component-slots + +### Emits + +:component-emits + +## Theme + +:component-theme + +## Changelog + +:component-changelog diff --git a/playgrounds/nuxt/app/composables/useNavigation.ts b/playgrounds/nuxt/app/composables/useNavigation.ts index 6248b38e9c..462fb32e27 100644 --- a/playgrounds/nuxt/app/composables/useNavigation.ts +++ b/playgrounds/nuxt/app/composables/useNavigation.ts @@ -38,6 +38,7 @@ const components = [ 'input-menu', 'input-number', 'input-tags', + 'input-time', 'input', 'kbd', 'link', diff --git a/playgrounds/nuxt/app/pages/components/input-time.vue b/playgrounds/nuxt/app/pages/components/input-time.vue new file mode 100644 index 0000000000..b226ad869d --- /dev/null +++ b/playgrounds/nuxt/app/pages/components/input-time.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue new file mode 100644 index 0000000000..43ae06bd1a --- /dev/null +++ b/src/runtime/components/InputTime.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/runtime/types/index.ts b/src/runtime/types/index.ts index 015f48fc9e..091f07bd05 100644 --- a/src/runtime/types/index.ts +++ b/src/runtime/types/index.ts @@ -54,6 +54,7 @@ export * from '../components/Input.vue' export * from '../components/InputMenu.vue' export * from '../components/InputNumber.vue' export * from '../components/InputTags.vue' +export * from '../components/InputTime.vue' export * from '../components/Kbd.vue' export * from '../components/Link.vue' export * from '../components/Main.vue' diff --git a/src/theme/index.ts b/src/theme/index.ts index 2d40b33607..ff8825701b 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -52,6 +52,7 @@ export { default as input } from './input' export { default as inputMenu } from './input-menu' export { default as inputNumber } from './input-number' export { default as inputTags } from './input-tags' +export { default as inputTime } from './input-time' export { default as kbd } from './kbd' export { default as link } from './link' export { default as main } from './main' diff --git a/src/theme/input-time.ts b/src/theme/input-time.ts new file mode 100644 index 0000000000..bc75918066 --- /dev/null +++ b/src/theme/input-time.ts @@ -0,0 +1,38 @@ +import { defuFn } from 'defu' +import type { ModuleOptions } from '../module' +import input from './input' + +export default (options: Required) => { + return defuFn({ + slots: { + base: () => ['w-full select-none relative group rounded-md inline-flex items-center focus:outline-none !gap-0', options.theme.transitions && 'transition-colors'], + segment: 'focus:bg-muted data-invalid:data-focused:bg-error data-focused:data-placeholder:text-muted data-focused:text-highlighted data-invalid:data-placeholder:text-error data-invalid:text-error data-placeholder:text-muted data-[segment=literal]:text-muted rounded px-1 data-[segment=literal]:px-0 outline-hidden data-disabled:cursor-not-allowed data-disabled:opacity-75 data-invalid:data-focused:text-white data-invalid:data-focused:data-placeholder:text-white' + }, + variants: { + variant: { + outline: 'text-highlighted bg-default ring ring-inset ring-accented', + soft: 'text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50', + subtle: 'text-highlighted bg-elevated ring ring-inset ring-accented', + ghost: 'text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent', + none: 'text-highlighted bg-transparent' + } + }, + compoundVariants: [...(options.theme.colors || []).map((color: string) => ({ + color, + variant: ['outline', 'subtle'], + class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}` + })), ...(options.theme.colors || []).map((color: string) => ({ + color, + highlight: true, + class: `ring ring-inset ring-${color}` + })), { + color: 'neutral', + variant: ['outline', 'subtle'], + class: 'focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted' + }, { + color: 'neutral', + highlight: true, + class: 'ring ring-inset ring-inverted' + }] + }, input(options)) +} diff --git a/test/components/InputTime.spec.ts b/test/components/InputTime.spec.ts new file mode 100644 index 0000000000..169f7776b0 --- /dev/null +++ b/test/components/InputTime.spec.ts @@ -0,0 +1,30 @@ +import { describe, it, expect } from 'vitest' +import { axe } from 'vitest-axe' +import { mountSuspended } from '@nuxt/test-utils/runtime' +import InputTime from '../../src/runtime/components/InputTime.vue' +import type { InputTimeProps, InputTimeSlots } from '../../src/runtime/components/InputTime.vue' +import ComponentRender from '../component-render' + +describe('InputTime', () => { + const props = {} + + it.each([ + // Props + ['with as', { props: { as: 'section' } }], + ['with class', { props: { class: '' } }], + ['with ui', { props: { ui: {} } }], + // Slots + ['with default slot', { props, slots: { default: () => 'Default slot' } }] + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputTimeProps, slots?: Partial }) => { + const html = await ComponentRender(nameOrHtml, options, InputTime) + expect(html).toMatchSnapshot() + }) + + it('passes accessibility tests', async () => { + const wrapper = await mountSuspended(InputTime, { + props + }) + + expect(await axe(wrapper.element)).toHaveNoViolations() + }) +}) From dce8077b781f9c870f07881bcd87618a0f9d46ba Mon Sep 17 00:00:00 2001 From: hywax Date: Fri, 24 Oct 2025 14:30:00 +0500 Subject: [PATCH 02/21] feat(InputTime): enhance component with Time support and add InputTimeFormField example --- docs/app/components/content/ComponentCode.vue | 9 +- .../imput-time/InputTimeFormFieldExample.vue | 11 ++ docs/content/docs/2.components/input-time.md | 163 +++++++++++++++++- src/runtime/components/InputTime.vue | 17 +- 4 files changed, 188 insertions(+), 12 deletions(-) create mode 100644 docs/app/components/content/examples/imput-time/InputTimeFormFieldExample.vue diff --git a/docs/app/components/content/ComponentCode.vue b/docs/app/components/content/ComponentCode.vue index 6dca699f58..5f018fe213 100644 --- a/docs/app/components/content/ComponentCode.vue +++ b/docs/app/components/content/ComponentCode.vue @@ -4,7 +4,7 @@ import type { ChipProps } from '@nuxt/ui' import json5 from 'json5' import { upperFirst, camelCase, kebabCase } from 'scule' import { hash } from 'ohash' -import { CalendarDate } from '@internationalized/date' +import { CalendarDate, Time } from '@internationalized/date' import * as theme from '#build/ui' import { get, set } from '#ui/utils' @@ -14,6 +14,7 @@ interface Cast { } type CastDateValue = [number, number, number] +type CastTimeValue = [number, number, number] const castMap: Record = { 'DateValue': { @@ -37,6 +38,12 @@ const castMap: Record = { return `{ start: new CalendarDate(${value.start.year}, ${value.start.month}, ${value.start.day}), end: new CalendarDate(${value.end.year}, ${value.end.month}, ${value.end.day}) }` } + }, + 'TimeValue': { + get: (args: CastTimeValue) => new Time(...args), + template: (value: Time) => { + return value ? `new Time(${value.hour}, ${value.minute}, ${value.second})` : 'null' + } } } diff --git a/docs/app/components/content/examples/imput-time/InputTimeFormFieldExample.vue b/docs/app/components/content/examples/imput-time/InputTimeFormFieldExample.vue new file mode 100644 index 0000000000..d5a607e155 --- /dev/null +++ b/docs/app/components/content/examples/imput-time/InputTimeFormFieldExample.vue @@ -0,0 +1,11 @@ + + + diff --git a/docs/content/docs/2.components/input-time.md b/docs/content/docs/2.components/input-time.md index 0a44f60e0d..c853940d1a 100644 --- a/docs/content/docs/2.components/input-time.md +++ b/docs/content/docs/2.components/input-time.md @@ -1,10 +1,11 @@ --- title: InputTime -description: '' +description: 'An input for selecting a time.' +category: form links: - - label: InputTime + - label: TimeField icon: i-custom-reka-ui - to: https://reka-ui.com/docs/components/input-time + to: https://reka-ui.com/docs/components/time-field - label: GitHub icon: i-simple-icons-github to: https://github.com/nuxt/ui/blob/v4/src/runtime/components/InputTime.vue @@ -13,8 +14,164 @@ navigation.badge: Soon ## Usage +Use the `v-model` directive to control the selected date. + +::component-code +--- +cast: + modelValue: TimeValue +ignore: + - modelValue +external: + - modelValue +props: + modelValue: [12, 30, 0] +--- +:: + +Use the `default-value` prop to set the initial value when you do not need to control its state. + +::component-code +--- +cast: + defaultValue: TimeValue +ignore: + - defaultValue +external: + - defaultValue +props: + defaultValue: [12, 30, 0] +--- +:: + +::note +This component relies on the [`@internationalized/date`](https://react-spectrum.adobe.com/internationalized/date/index.html) package which provides objects and functions for representing and manipulating dates and times in a locale-aware manner. +:: + +### Placeholder + +Use the `placeholder` prop to set a placeholder text. + +::component-code +--- +cast: + placeholder: TimeValue +ignore: + - placeholder +external: + - placeholder +props: + placeholder: [12, 30, 0] +--- +:: + +### Color + +Use the `color` prop to change the color of the InputTime. + +::component-code +--- +props: + color: neutral + highlight: true +--- +:: + +::note +The `highlight` prop is used here to show the focus state. It's used internally when a validation error occurs. +:: + +### Variant + +Use the `variant` prop to change the variant of the InputTime. + +::component-code +--- +cast: + defaultValue: TimeValue +hide: + - defaultValue +props: + variant: subtle + defaultValue: [12, 30, 0] +--- +:: + +### Size + +Use the `size` prop to change the size of the InputTime. + +::component-code +--- +props: + size: xl +--- +:: + +### Icon + +Use the `icon` prop to show an [Icon](/docs/components/icon) inside the InputTime. + +::component-code +--- +props: + icon: 'i-lucide-clock' +--- +:: + +::note +Use the `leading` and `trailing` props to set the icon position or the `leading-icon` and `trailing-icon` props to set a different icon for each position. +:: + +### Avatar + +Use the `avatar` prop to show an [Avatar](/docs/components/avatar) inside the InputTime. + +::component-code +--- +prettier: true +props: + avatar: + src: 'https://github.com/vuejs.png' + size: md + variant: outline +--- +:: + +### Disabled + +Use the `disabled` prop to disable the InputTime. + +::component-code +--- +props: + disabled: true +--- +:: + +### Hide Time Zone + +Use the `hideTimeZone` prop to hide the time zone of the InputTime. + +::component-code +--- +props: + hideTimeZone: true +--- +:: + ## Examples +### Within a FormField + +You can use the InputTime within a [FormField](/docs/components/form-field) component to display a label, help text, required indicator, etc. + +::component-example +--- +name: 'input-time-form-field-example' +--- +:: + ## API ### Props diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index 43ae06bd1a..d59bec1189 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -2,11 +2,13 @@ import type { TimeFieldRootProps, TimeFieldRootEmits } from 'reka-ui' import type { AppConfig } from '@nuxt/schema' import theme from '#build/ui/input-time' +import type { UseComponentIconsProps } from '../composables/useComponentIcons' +import type { AvatarProps } from '../types' import type { ComponentConfig } from '../types/tv' type InputTime = ComponentConfig -export interface InputTimeProps extends Omit { +export interface InputTimeProps extends Omit, UseComponentIconsProps { /** * The element or component this component should render as. * @defaultValue 'div' @@ -45,7 +47,7 @@ export interface InputTimeSlots { import type { ComponentPublicInstance } from 'vue' import { computed, onMounted, ref } from 'vue' import { TimeFieldRoot, TimeFieldInput, useForwardPropsEmits, Primitive } from 'reka-ui' -import { reactivePick } from '@vueuse/core' +import { reactiveOmit } from '@vueuse/core' import { useAppConfig } from '#imports' import { useFieldGroup } from '../composables/useFieldGroup' import { useComponentIcons } from '../composables/useComponentIcons' @@ -62,7 +64,7 @@ const slots = defineSlots() const { code: codeLocale, dir } = useLocale() const appConfig = useAppConfig() as InputTime['AppConfig'] -const rootProps = useForwardPropsEmits(reactivePick(props, 'disabled', 'id', 'name', 'required'), emits) +const rootProps = useForwardPropsEmits(reactiveOmit(props, 'modelValue', 'defaultValue', 'color', 'variant', 'size', 'highlight', 'autofocus', 'autofocusDelay', 'locale', 'icon', 'avatar', 'class', 'ui'), emits) const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formGroupSize, name, highlight, disabled, ariaAttrs } = useFormField(props) const { orientation, size: fieldGroupSize } = useFieldGroup(props) @@ -76,6 +78,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.inputTime || variant: props.variant, size: inputSize.value, highlight: highlight.value, + leading: isLeading.value || !!props.avatar || !!slots.leading, trailing: isTrailing.value || !!slots.trailing, fieldGroup: orientation.value })) @@ -126,12 +129,9 @@ defineExpose({ v-slot="{ segments }" :model-value="modelValue" :default-value="defaultValue" - :default-placeholder="defaultPlaceholder" - :placeholder="placeholder" - :required="required" + :name="name" :disabled="disabled" :locale="locale" - :name="name" :dir="dir" :class="ui.base({ class: [props.ui?.base] })" @update:model-value="onUpdate" @@ -150,9 +150,10 @@ defineExpose({ - + + From 74bd1374915735dd54e8a6864f1fe1913137f783 Mon Sep 17 00:00:00 2001 From: hywax Date: Fri, 24 Oct 2025 14:40:54 +0500 Subject: [PATCH 03/21] test(InputTime): expand test cases for InputTime component with various props and accessibility checks --- test/components/InputTime.spec.ts | 52 +- .../__snapshots__/InputTime-vue.spec.ts.snap | 446 ++++++++++++++++++ .../__snapshots__/InputTime.spec.ts.snap | 446 ++++++++++++++++++ 3 files changed, 938 insertions(+), 6 deletions(-) create mode 100644 test/components/__snapshots__/InputTime-vue.spec.ts.snap create mode 100644 test/components/__snapshots__/InputTime.spec.ts.snap diff --git a/test/components/InputTime.spec.ts b/test/components/InputTime.spec.ts index 169f7776b0..3ca18d0ab0 100644 --- a/test/components/InputTime.spec.ts +++ b/test/components/InputTime.spec.ts @@ -1,28 +1,68 @@ -import { describe, it, expect } from 'vitest' +import { describe, it, expect, vi, afterAll, test } from 'vitest' import { axe } from 'vitest-axe' import { mountSuspended } from '@nuxt/test-utils/runtime' import InputTime from '../../src/runtime/components/InputTime.vue' import type { InputTimeProps, InputTimeSlots } from '../../src/runtime/components/InputTime.vue' import ComponentRender from '../component-render' +import theme from '#build/ui/input-time' +import { Time } from '@internationalized/date' describe('InputTime', () => { - const props = {} + const sizes = Object.keys(theme.variants.size) as any + const variants = Object.keys(theme.variants.variant) as any + const date = new Date('2025-01-01') + + vi.setSystemTime(date) + + afterAll(() => { + vi.useRealTimers() + }) it.each([ // Props + ['with modelValue', { props: { modelValue: new Time(12, 30) } }], + ['with default value', { props: { defaultValue: new Time(12, 30) } }], + ['with placeholder', { props: { placeholder: new Time(12, 30) } }], + ['with disabled', { props: { disabled: true, modelValue: new Time(12, 30) } }], + ['with required', { props: { required: true, modelValue: new Time(12, 30) } }], + ['with readonly', { props: { readonly: true, modelValue: new Time(12, 30) } }], + ['with hour cycle 24', { props: { hourCycle: 24 as const } }], + ['with hour cycle 12', { props: { hourCycle: 12 as const } }], + ['with granularity', { props: { granularity: 'minute' as const } }], + ['with hide time zone', { props: { hideTimeZone: true } }], + ['with max value', { props: { maxValue: new Time(12, 30) } }], + ['with min value', { props: { minValue: new Time(12, 30) } }], + ['with icon', { props: { icon: 'i-lucide-clock' } }], + ['with leadingIcon', { props: { leadingIcon: 'i-lucide-arrow-left' } }], + ['with trailingIcon', { props: { trailingIcon: 'i-lucide-arrow-right' } }], + ...sizes.map((size: string) => [`with size ${size}`, { props: { size } }]), + ...variants.map((variant: string) => [`with variant ${variant}`, { props: { variant, defaultValue: new Time(12, 30) } }]), + ['with color neutral', { props: { color: 'neutral' } }], ['with as', { props: { as: 'section' } }], - ['with class', { props: { class: '' } }], - ['with ui', { props: { ui: {} } }], + ['with class', { props: { class: 'max-w-sm' } }], + ['with ui', { props: { ui: { base: 'rounded-full' } } }], // Slots - ['with default slot', { props, slots: { default: () => 'Default slot' } }] + ['with default slot', { slots: { default: () => 'Default slot' } }] ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputTimeProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, InputTime) expect(html).toMatchSnapshot() }) + describe('emits', () => { + test('update:modelValue event', async () => { + const wrapper = await mountSuspended(InputTime) + const time = new Time(12, 30) + + await wrapper.setValue(time) + expect(wrapper.emitted()).toMatchObject({ 'update:modelValue': [[time]] }) + }) + }) + it('passes accessibility tests', async () => { const wrapper = await mountSuspended(InputTime, { - props + props: { + modelValue: new Time(12, 30) + } }) expect(await axe(wrapper.element)).toHaveNoViolations() diff --git a/test/components/__snapshots__/InputTime-vue.spec.ts.snap b/test/components/__snapshots__/InputTime-vue.spec.ts.snap new file mode 100644 index 0000000000..50e23d12f8 --- /dev/null +++ b/test/components/__snapshots__/InputTime-vue.spec.ts.snap @@ -0,0 +1,446 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`InputTime > renders with as correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with class correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with color neutral correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with default slot correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ Default slot + + +
+
" +`; + +exports[`InputTime > renders with default value correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with disabled correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with granularity correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with hide time zone correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` +"
+
+
––
+ +
––
+ + + +
+
" +`; + +exports[`InputTime > renders with icon correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + +
+
" +`; + +exports[`InputTime > renders with leadingIcon correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + +
+
" +`; + +exports[`InputTime > renders with max value correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with min value correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with modelValue correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with placeholder correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with readonly correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with required correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with size lg correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size md correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size sm correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size xl correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size xs correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with trailingIcon correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + +
+
" +`; + +exports[`InputTime > renders with ui correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant ghost correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant none correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant outline correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant soft correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant subtle correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; diff --git a/test/components/__snapshots__/InputTime.spec.ts.snap b/test/components/__snapshots__/InputTime.spec.ts.snap new file mode 100644 index 0000000000..bde229a7f9 --- /dev/null +++ b/test/components/__snapshots__/InputTime.spec.ts.snap @@ -0,0 +1,446 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`InputTime > renders with as correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with class correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with color neutral correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with default slot correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ Default slot + + +
+
" +`; + +exports[`InputTime > renders with default value correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with disabled correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with granularity correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with hide time zone correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` +"
+
+
––
+ +
––
+ + + +
+
" +`; + +exports[`InputTime > renders with icon correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + +
+
" +`; + +exports[`InputTime > renders with leadingIcon correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + +
+
" +`; + +exports[`InputTime > renders with max value correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with min value correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with modelValue correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with placeholder correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with readonly correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with required correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with size lg correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size md correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size sm correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size xl correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with size xs correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with trailingIcon correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + +
+
" +`; + +exports[`InputTime > renders with ui correctly 1`] = ` +"
+
+
––
+ +
––
+ +
AM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant ghost correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant none correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant outline correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant soft correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; + +exports[`InputTime > renders with variant subtle correctly 1`] = ` +"
+
+
12
+ +
30
+ +
PM
+ + + +
+
" +`; From 10ad31f8aff8125580e193eedda690fd8dbc3465 Mon Sep 17 00:00:00 2001 From: hywax Date: Sat, 1 Nov 2025 17:54:40 +0500 Subject: [PATCH 04/21] fix(InputTime): improve key handling and trim segment values in TimeFieldInput --- src/runtime/components/InputTime.vue | 6 +++--- src/theme/input-time.ts | 21 +++++++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index d59bec1189..e122e64878 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -140,12 +140,12 @@ defineExpose({ > - {{ segment.value }} + {{ segment.value.trim() }} diff --git a/src/theme/input-time.ts b/src/theme/input-time.ts index bc75918066..72cdff5360 100644 --- a/src/theme/input-time.ts +++ b/src/theme/input-time.ts @@ -5,8 +5,8 @@ import input from './input' export default (options: Required) => { return defuFn({ slots: { - base: () => ['w-full select-none relative group rounded-md inline-flex items-center focus:outline-none !gap-0', options.theme.transitions && 'transition-colors'], - segment: 'focus:bg-muted data-invalid:data-focused:bg-error data-focused:data-placeholder:text-muted data-focused:text-highlighted data-invalid:data-placeholder:text-error data-invalid:text-error data-placeholder:text-muted data-[segment=literal]:text-muted rounded px-1 data-[segment=literal]:px-0 outline-hidden data-disabled:cursor-not-allowed data-disabled:opacity-75 data-invalid:data-focused:text-white data-invalid:data-focused:data-placeholder:text-white' + base: () => ['w-full select-none relative group rounded-md inline-flex items-center align-middle focus:outline-none !gap-0', options.theme.transitions && 'transition-colors'], + segment: 'focus:bg-muted data-invalid:data-focused:bg-error data-focused:data-placeholder:text-muted data-focused:text-highlighted data-invalid:data-placeholder:text-error data-invalid:text-error data-placeholder:text-muted data-[segment=literal]:text-muted rounded outline-hidden data-disabled:cursor-not-allowed data-disabled:opacity-75 data-invalid:data-focused:text-white data-invalid:data-focused:data-placeholder:text-white text-center' }, variants: { variant: { @@ -15,6 +15,23 @@ export default (options: Required) => { subtle: 'text-highlighted bg-elevated ring ring-inset ring-accented', ghost: 'text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent', none: 'text-highlighted bg-transparent' + }, + size: { + xs: { + segment: 'w-7' + }, + sm: { + segment: 'w-7' + }, + md: { + segment: 'w-8' + }, + lg: { + segment: 'w-8' + }, + xl: { + segment: 'w-9' + } } }, compoundVariants: [...(options.theme.colors || []).map((color: string) => ({ From a573428f2aa52909ef8f31700a0d77ffd61d6cda Mon Sep 17 00:00:00 2001 From: hywax Date: Sat, 1 Nov 2025 18:06:40 +0500 Subject: [PATCH 05/21] docs(InputTime): update documentation to reflect hourCycle prop and remove hideTimeZone section --- docs/content/docs/2.components/input-time.md | 23 ++++---------------- src/runtime/components/InputTime.vue | 1 + 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/docs/content/docs/2.components/input-time.md b/docs/content/docs/2.components/input-time.md index c853940d1a..9fcb1996c9 100644 --- a/docs/content/docs/2.components/input-time.md +++ b/docs/content/docs/2.components/input-time.md @@ -48,20 +48,16 @@ props: This component relies on the [`@internationalized/date`](https://react-spectrum.adobe.com/internationalized/date/index.html) package which provides objects and functions for representing and manipulating dates and times in a locale-aware manner. :: -### Placeholder +### Hour Cycle -Use the `placeholder` prop to set a placeholder text. +Use the `hourCycle` prop to change the hour cycle of the InputTime. ::component-code --- -cast: - placeholder: TimeValue ignore: - - placeholder -external: - - placeholder + - hourCycle props: - placeholder: [12, 30, 0] + hourCycle: 24 --- :: @@ -149,17 +145,6 @@ props: --- :: -### Hide Time Zone - -Use the `hideTimeZone` prop to hide the time zone of the InputTime. - -::component-code ---- -props: - hideTimeZone: true ---- -:: - ## Examples ### Within a FormField diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index e122e64878..31833663a4 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -146,6 +146,7 @@ defineExpose({ :class="segment.part !== 'literal' ? ui.segment({ class: props.ui?.segment }) : ''" > {{ segment.value.trim() }} + {{ console.log(segment) }} From fa460eb3aaf89aec3e34d6a601cf7414b52e51c1 Mon Sep 17 00:00:00 2001 From: hywax Date: Sat, 1 Nov 2025 18:06:53 +0500 Subject: [PATCH 06/21] refactor(InputTime): remove console.log statement from TimeFieldInput --- src/runtime/components/InputTime.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index 31833663a4..e122e64878 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -146,7 +146,6 @@ defineExpose({ :class="segment.part !== 'literal' ? ui.segment({ class: props.ui?.segment }) : ''" > {{ segment.value.trim() }} - {{ console.log(segment) }} From 5bba77c99d76528904c0cda74d1c712babc6b941 Mon Sep 17 00:00:00 2001 From: hywax Date: Sat, 1 Nov 2025 18:09:50 +0500 Subject: [PATCH 07/21] docs(InputTime): add defaultValue prop to InputTime documentation --- docs/content/docs/2.components/input-time.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/docs/2.components/input-time.md b/docs/content/docs/2.components/input-time.md index 9fcb1996c9..bded65e863 100644 --- a/docs/content/docs/2.components/input-time.md +++ b/docs/content/docs/2.components/input-time.md @@ -54,10 +54,16 @@ Use the `hourCycle` prop to change the hour cycle of the InputTime. ::component-code --- +cast: + defaultValue: TimeValue ignore: - hourCycle + - defaultValue +external: + - defaultValue props: hourCycle: 24 + defaultValue: [16, 30, 0] --- :: From 89d8249c476a62e379a259398b1af9e59d591382 Mon Sep 17 00:00:00 2001 From: hywax Date: Sat, 1 Nov 2025 18:14:22 +0500 Subject: [PATCH 08/21] test(InputTime): update snapshots to reflect changes in InputTime component structure and styling --- .../__snapshots__/InputTime-vue.spec.ts.snap | 416 +++++++++--------- .../__snapshots__/InputTime.spec.ts.snap | 416 +++++++++--------- 2 files changed, 416 insertions(+), 416 deletions(-) diff --git a/test/components/__snapshots__/InputTime-vue.spec.ts.snap b/test/components/__snapshots__/InputTime-vue.spec.ts.snap index 50e23d12f8..de50619cc9 100644 --- a/test/components/__snapshots__/InputTime-vue.spec.ts.snap +++ b/test/components/__snapshots__/InputTime-vue.spec.ts.snap @@ -2,13 +2,13 @@ exports[`InputTime > renders with as correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -17,13 +17,13 @@ exports[`InputTime > renders with as correctly 1`] = ` exports[`InputTime > renders with class correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -32,13 +32,13 @@ exports[`InputTime > renders with class correctly 1`] = ` exports[`InputTime > renders with color neutral correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -47,13 +47,13 @@ exports[`InputTime > renders with color neutral correctly 1`] = ` exports[`InputTime > renders with default slot correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- Default slot +
+
––
+ +
––
+ +
AM
+ Default slot
@@ -62,13 +62,13 @@ exports[`InputTime > renders with default slot correctly 1`] = ` exports[`InputTime > renders with default value correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -77,13 +77,13 @@ exports[`InputTime > renders with default value correctly 1`] = ` exports[`InputTime > renders with disabled correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -92,13 +92,13 @@ exports[`InputTime > renders with disabled correctly 1`] = ` exports[`InputTime > renders with granularity correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -107,13 +107,13 @@ exports[`InputTime > renders with granularity correctly 1`] = ` exports[`InputTime > renders with hide time zone correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -122,13 +122,13 @@ exports[`InputTime > renders with hide time zone correctly 1`] = ` exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -137,11 +137,11 @@ exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` "
-
-
––
- -
––
- +
+
––
+ +
––
+
@@ -150,13 +150,13 @@ exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` exports[`InputTime > renders with icon correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
" @@ -164,13 +164,13 @@ exports[`InputTime > renders with icon correctly 1`] = ` exports[`InputTime > renders with leadingIcon correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
" @@ -178,13 +178,13 @@ exports[`InputTime > renders with leadingIcon correctly 1`] = ` exports[`InputTime > renders with max value correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -193,13 +193,13 @@ exports[`InputTime > renders with max value correctly 1`] = ` exports[`InputTime > renders with min value correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -208,13 +208,13 @@ exports[`InputTime > renders with min value correctly 1`] = ` exports[`InputTime > renders with modelValue correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -223,13 +223,13 @@ exports[`InputTime > renders with modelValue correctly 1`] = ` exports[`InputTime > renders with placeholder correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -238,13 +238,13 @@ exports[`InputTime > renders with placeholder correctly 1`] = ` exports[`InputTime > renders with readonly correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -253,13 +253,13 @@ exports[`InputTime > renders with readonly correctly 1`] = ` exports[`InputTime > renders with required correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -268,13 +268,13 @@ exports[`InputTime > renders with required correctly 1`] = ` exports[`InputTime > renders with size lg correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -283,13 +283,13 @@ exports[`InputTime > renders with size lg correctly 1`] = ` exports[`InputTime > renders with size md correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -298,13 +298,13 @@ exports[`InputTime > renders with size md correctly 1`] = ` exports[`InputTime > renders with size sm correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -313,13 +313,13 @@ exports[`InputTime > renders with size sm correctly 1`] = ` exports[`InputTime > renders with size xl correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -328,13 +328,13 @@ exports[`InputTime > renders with size xl correctly 1`] = ` exports[`InputTime > renders with size xs correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -343,13 +343,13 @@ exports[`InputTime > renders with size xs correctly 1`] = ` exports[`InputTime > renders with trailingIcon correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
" @@ -357,13 +357,13 @@ exports[`InputTime > renders with trailingIcon correctly 1`] = ` exports[`InputTime > renders with ui correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -372,13 +372,13 @@ exports[`InputTime > renders with ui correctly 1`] = ` exports[`InputTime > renders with variant ghost correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -387,13 +387,13 @@ exports[`InputTime > renders with variant ghost correctly 1`] = ` exports[`InputTime > renders with variant none correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -402,13 +402,13 @@ exports[`InputTime > renders with variant none correctly 1`] = ` exports[`InputTime > renders with variant outline correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -417,13 +417,13 @@ exports[`InputTime > renders with variant outline correctly 1`] = ` exports[`InputTime > renders with variant soft correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -432,13 +432,13 @@ exports[`InputTime > renders with variant soft correctly 1`] = ` exports[`InputTime > renders with variant subtle correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
diff --git a/test/components/__snapshots__/InputTime.spec.ts.snap b/test/components/__snapshots__/InputTime.spec.ts.snap index bde229a7f9..33c88993d4 100644 --- a/test/components/__snapshots__/InputTime.spec.ts.snap +++ b/test/components/__snapshots__/InputTime.spec.ts.snap @@ -2,13 +2,13 @@ exports[`InputTime > renders with as correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -17,13 +17,13 @@ exports[`InputTime > renders with as correctly 1`] = ` exports[`InputTime > renders with class correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -32,13 +32,13 @@ exports[`InputTime > renders with class correctly 1`] = ` exports[`InputTime > renders with color neutral correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -47,13 +47,13 @@ exports[`InputTime > renders with color neutral correctly 1`] = ` exports[`InputTime > renders with default slot correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- Default slot +
+
––
+ +
––
+ +
AM
+ Default slot
@@ -62,13 +62,13 @@ exports[`InputTime > renders with default slot correctly 1`] = ` exports[`InputTime > renders with default value correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -77,13 +77,13 @@ exports[`InputTime > renders with default value correctly 1`] = ` exports[`InputTime > renders with disabled correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -92,13 +92,13 @@ exports[`InputTime > renders with disabled correctly 1`] = ` exports[`InputTime > renders with granularity correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -107,13 +107,13 @@ exports[`InputTime > renders with granularity correctly 1`] = ` exports[`InputTime > renders with hide time zone correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -122,13 +122,13 @@ exports[`InputTime > renders with hide time zone correctly 1`] = ` exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -137,11 +137,11 @@ exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` "
-
-
––
- -
––
- +
+
––
+ +
––
+
@@ -150,13 +150,13 @@ exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` exports[`InputTime > renders with icon correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
" @@ -164,13 +164,13 @@ exports[`InputTime > renders with icon correctly 1`] = ` exports[`InputTime > renders with leadingIcon correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
" @@ -178,13 +178,13 @@ exports[`InputTime > renders with leadingIcon correctly 1`] = ` exports[`InputTime > renders with max value correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -193,13 +193,13 @@ exports[`InputTime > renders with max value correctly 1`] = ` exports[`InputTime > renders with min value correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -208,13 +208,13 @@ exports[`InputTime > renders with min value correctly 1`] = ` exports[`InputTime > renders with modelValue correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -223,13 +223,13 @@ exports[`InputTime > renders with modelValue correctly 1`] = ` exports[`InputTime > renders with placeholder correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -238,13 +238,13 @@ exports[`InputTime > renders with placeholder correctly 1`] = ` exports[`InputTime > renders with readonly correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -253,13 +253,13 @@ exports[`InputTime > renders with readonly correctly 1`] = ` exports[`InputTime > renders with required correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -268,13 +268,13 @@ exports[`InputTime > renders with required correctly 1`] = ` exports[`InputTime > renders with size lg correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -283,13 +283,13 @@ exports[`InputTime > renders with size lg correctly 1`] = ` exports[`InputTime > renders with size md correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -298,13 +298,13 @@ exports[`InputTime > renders with size md correctly 1`] = ` exports[`InputTime > renders with size sm correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -313,13 +313,13 @@ exports[`InputTime > renders with size sm correctly 1`] = ` exports[`InputTime > renders with size xl correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -328,13 +328,13 @@ exports[`InputTime > renders with size xl correctly 1`] = ` exports[`InputTime > renders with size xs correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -343,13 +343,13 @@ exports[`InputTime > renders with size xs correctly 1`] = ` exports[`InputTime > renders with trailingIcon correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
" @@ -357,13 +357,13 @@ exports[`InputTime > renders with trailingIcon correctly 1`] = ` exports[`InputTime > renders with ui correctly 1`] = ` "
-
-
––
- -
––
- -
AM
- +
+
––
+ +
––
+ +
AM
+
@@ -372,13 +372,13 @@ exports[`InputTime > renders with ui correctly 1`] = ` exports[`InputTime > renders with variant ghost correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -387,13 +387,13 @@ exports[`InputTime > renders with variant ghost correctly 1`] = ` exports[`InputTime > renders with variant none correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -402,13 +402,13 @@ exports[`InputTime > renders with variant none correctly 1`] = ` exports[`InputTime > renders with variant outline correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -417,13 +417,13 @@ exports[`InputTime > renders with variant outline correctly 1`] = ` exports[`InputTime > renders with variant soft correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
@@ -432,13 +432,13 @@ exports[`InputTime > renders with variant soft correctly 1`] = ` exports[`InputTime > renders with variant subtle correctly 1`] = ` "
-
-
12
- -
30
- -
PM
- +
+
12
+ +
30
+ +
PM
+
From 1b0346a4882225a88e2d4a80575e13c2c4806c5a Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 1 Nov 2025 21:23:51 +0500 Subject: [PATCH 09/21] Apply suggestion from @vercel[bot] Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> --- playgrounds/nuxt/app/pages/components/input-time.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playgrounds/nuxt/app/pages/components/input-time.vue b/playgrounds/nuxt/app/pages/components/input-time.vue index b226ad869d..468ea365e8 100644 --- a/playgrounds/nuxt/app/pages/components/input-time.vue +++ b/playgrounds/nuxt/app/pages/components/input-time.vue @@ -1,6 +1,6 @@ diff --git a/src/theme/input-time.ts b/src/theme/input-time.ts index 2a1d924289..24991333cf 100644 --- a/src/theme/input-time.ts +++ b/src/theme/input-time.ts @@ -5,27 +5,59 @@ import input from './input' export default (options: Required) => { return defuFn({ slots: { - base: (prev: string) => [prev, 'select-none relative inline-flex items-center align-middle !gap-0'], - segment: 'focus:bg-muted data-invalid:data-focused:bg-error data-focused:data-placeholder:text-muted data-focused:text-highlighted data-invalid:data-placeholder:text-error data-invalid:text-error data-placeholder:text-muted data-[segment=literal]:text-muted rounded outline-hidden data-disabled:cursor-not-allowed data-disabled:opacity-75 data-invalid:data-focused:text-white data-invalid:data-focused:data-placeholder:text-white text-center' + root: () => undefined, + base: () => ['group relative inline-flex items-center rounded-md select-none', options.theme.transitions && 'transition-colors'], + segment: ['rounded text-center outline-hidden data-placeholder:text-dimmed data-[segment=literal]:text-dimmed data-invalid:text-error data-disabled:cursor-not-allowed data-disabled:opacity-75', options.theme.transitions && 'transition-colors'] }, variants: { size: { xs: { - segment: 'w-7' + base: (prev: string) => [prev, 'gap-0.25'], + segment: 'not-data-[segment=literal]:w-6' }, sm: { - segment: 'w-7' + base: (prev: string) => [prev, 'gap-0.5'], + segment: 'not-data-[segment=literal]:w-6' }, md: { - segment: 'w-8' + base: (prev: string) => [prev, 'gap-0.5'], + segment: 'not-data-[segment=literal]:w-7' }, lg: { - segment: 'w-8' + base: (prev: string) => [prev, 'gap-0.75'], + segment: 'not-data-[segment=literal]:w-7' }, xl: { - segment: 'w-9' + base: (prev: string) => [prev, 'gap-0.75'], + segment: 'not-data-[segment=literal]:w-8' } } - } + }, + compoundVariants: [{ + variant: 'outline', + class: { + segment: 'focus:bg-elevated' + } + }, { + variant: 'soft', + class: { + segment: 'focus:bg-accented/50 group-hover:focus:bg-accented' + } + }, { + variant: 'subtle', + class: { + segment: 'focus:bg-accented' + } + }, { + variant: 'ghost', + class: { + segment: 'focus:bg-elevated group-hover:focus:bg-accented' + } + }, { + variant: 'none', + class: { + segment: 'focus:bg-elevated' + } + }] }, input(options)) } diff --git a/test/components/__snapshots__/InputTime-vue.spec.ts.snap b/test/components/__snapshots__/InputTime-vue.spec.ts.snap index 9f31ad3bb5..a37828b785 100644 --- a/test/components/__snapshots__/InputTime-vue.spec.ts.snap +++ b/test/components/__snapshots__/InputTime-vue.spec.ts.snap @@ -1,446 +1,386 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`InputTime > renders with as correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
-
" +"
+
––
+ +
––
+ +
AM
+ + + +
" `; exports[`InputTime > renders with class correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with color neutral correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with default slot correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- Default slot - - -
+"
+
––
+ +
––
+ +
AM
+ Default slot + +
" `; exports[`InputTime > renders with default value correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with disabled correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with granularity correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with hide time zone correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` -"
-
-
––
- -
––
- - - -
+"
+
––
+ +
––
+ + +
" `; exports[`InputTime > renders with icon correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - -
+"
+
––
+ +
––
+ +
AM
+ +
" `; exports[`InputTime > renders with leadingIcon correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - -
+"
+
––
+ +
––
+ +
AM
+ +
" `; exports[`InputTime > renders with max value correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with min value correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with modelValue correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with placeholder correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with readonly correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with required correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with size lg correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size md correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size sm correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size xl correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size xs correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with trailingIcon correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - -
+"
+
––
+ +
––
+ +
AM
+ +
" `; exports[`InputTime > renders with ui correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with variant ghost correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant none correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant outline correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant soft correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant subtle correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; diff --git a/test/components/__snapshots__/InputTime.spec.ts.snap b/test/components/__snapshots__/InputTime.spec.ts.snap index 9a4aa84527..6215dea253 100644 --- a/test/components/__snapshots__/InputTime.spec.ts.snap +++ b/test/components/__snapshots__/InputTime.spec.ts.snap @@ -1,446 +1,386 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`InputTime > renders with as correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
-
" +"
+
––
+ +
––
+ +
AM
+ + + +
" `; exports[`InputTime > renders with class correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with color neutral correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with default slot correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- Default slot - - -
+"
+
––
+ +
––
+ +
AM
+ Default slot + +
" `; exports[`InputTime > renders with default value correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with disabled correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with granularity correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with hide time zone correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` -"
-
-
––
- -
––
- - - -
+"
+
––
+ +
––
+ + +
" `; exports[`InputTime > renders with icon correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - -
+"
+
––
+ +
––
+ +
AM
+ +
" `; exports[`InputTime > renders with leadingIcon correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - -
+"
+
––
+ +
––
+ +
AM
+ +
" `; exports[`InputTime > renders with max value correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with min value correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with modelValue correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with placeholder correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with readonly correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with required correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with size lg correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size md correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size sm correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size xl correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with size xs correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with trailingIcon correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - -
+"
+
––
+ +
––
+ +
AM
+ +
" `; exports[`InputTime > renders with ui correctly 1`] = ` -"
-
-
––
- -
––
- -
AM
- - - -
+"
+
––
+ +
––
+ +
AM
+ + +
" `; exports[`InputTime > renders with variant ghost correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant none correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant outline correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant soft correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; exports[`InputTime > renders with variant subtle correctly 1`] = ` -"
-
-
12
- -
30
- -
PM
- - - -
+"
+
12
+ +
30
+ +
PM
+ + +
" `; From 1278d323ae20835fe01b4b95f129c02b001193d1 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 5 Nov 2025 11:56:33 +0100 Subject: [PATCH 14/21] docs: fix dir name --- .../{imput-time => input-time}/InputTimeFormFieldExample.vue | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/app/components/content/examples/{imput-time => input-time}/InputTimeFormFieldExample.vue (100%) diff --git a/docs/app/components/content/examples/imput-time/InputTimeFormFieldExample.vue b/docs/app/components/content/examples/input-time/InputTimeFormFieldExample.vue similarity index 100% rename from docs/app/components/content/examples/imput-time/InputTimeFormFieldExample.vue rename to docs/app/components/content/examples/input-time/InputTimeFormFieldExample.vue From f36ff83deb60ce1b55bb88cd7356f99f73571653 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 5 Nov 2025 12:17:50 +0100 Subject: [PATCH 15/21] fix: ignore `asChild` --- src/runtime/components/InputTime.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index 09b2f315e2..c4c1fe41b3 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -9,7 +9,7 @@ import type { ComponentConfig } from '../types/tv' type InputTime = ComponentConfig -export interface InputTimeProps extends Omit, UseComponentIconsProps { +export interface InputTimeProps extends Omit, UseComponentIconsProps { /** * The element or component this component should render as. * @defaultValue 'div' From 67278386669ab50dbf8f4b6980352b93192baaab Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 5 Nov 2025 12:17:59 +0100 Subject: [PATCH 16/21] test: update --- test/components/InputTime.spec.ts | 5 +- .../__snapshots__/InputTime-vue.spec.ts.snap | 143 ++++++++++++++++++ .../__snapshots__/InputTime.spec.ts.snap | 143 ++++++++++++++++++ 3 files changed, 289 insertions(+), 2 deletions(-) diff --git a/test/components/InputTime.spec.ts b/test/components/InputTime.spec.ts index 3ca18d0ab0..78ce1ae8fa 100644 --- a/test/components/InputTime.spec.ts +++ b/test/components/InputTime.spec.ts @@ -36,8 +36,9 @@ describe('InputTime', () => { ['with leadingIcon', { props: { leadingIcon: 'i-lucide-arrow-left' } }], ['with trailingIcon', { props: { trailingIcon: 'i-lucide-arrow-right' } }], ...sizes.map((size: string) => [`with size ${size}`, { props: { size } }]), - ...variants.map((variant: string) => [`with variant ${variant}`, { props: { variant, defaultValue: new Time(12, 30) } }]), - ['with color neutral', { props: { color: 'neutral' } }], + ...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { variant, defaultValue: new Time(12, 30) } }]), + ...variants.map((variant: string) => [`with neutral variant ${variant}`, { props: { variant, color: 'neutral', defaultValue: new Time(12, 30) } }]), + ['with ariaLabel', { attrs: { 'aria-label': 'Aria label' } }], ['with as', { props: { as: 'section' } }], ['with class', { props: { class: 'max-w-sm' } }], ['with ui', { props: { ui: { base: 'rounded-full' } } }], diff --git a/test/components/__snapshots__/InputTime-vue.spec.ts.snap b/test/components/__snapshots__/InputTime-vue.spec.ts.snap index a37828b785..aab70224e1 100644 --- a/test/components/__snapshots__/InputTime-vue.spec.ts.snap +++ b/test/components/__snapshots__/InputTime-vue.spec.ts.snap @@ -1,5 +1,18 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`InputTime > renders with ariaLabel correctly 1`] = ` +"
+
––
+ +
––
+ +
AM
+ + + +
" +`; + exports[`InputTime > renders with as correctly 1`] = ` "
––
@@ -191,6 +204,71 @@ exports[`InputTime > renders with modelValue correctly 1`] = `
" `; +exports[`InputTime > renders with neutral variant ghost correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant none correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant outline correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant soft correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant subtle correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + exports[`InputTime > renders with placeholder correctly 1`] = ` "
––
@@ -204,6 +282,71 @@ exports[`InputTime > renders with placeholder correctly 1`] = `
" `; +exports[`InputTime > renders with primary variant ghost correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant none correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant outline correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant soft correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant subtle correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + exports[`InputTime > renders with readonly correctly 1`] = ` "
12
diff --git a/test/components/__snapshots__/InputTime.spec.ts.snap b/test/components/__snapshots__/InputTime.spec.ts.snap index 6215dea253..2b10d4a7bc 100644 --- a/test/components/__snapshots__/InputTime.spec.ts.snap +++ b/test/components/__snapshots__/InputTime.spec.ts.snap @@ -1,5 +1,18 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`InputTime > renders with ariaLabel correctly 1`] = ` +"
+
––
+ +
––
+ +
AM
+ + + +
" +`; + exports[`InputTime > renders with as correctly 1`] = ` "
––
@@ -191,6 +204,71 @@ exports[`InputTime > renders with modelValue correctly 1`] = `
" `; +exports[`InputTime > renders with neutral variant ghost correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant none correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant outline correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant soft correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with neutral variant subtle correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + exports[`InputTime > renders with placeholder correctly 1`] = ` "
––
@@ -204,6 +282,71 @@ exports[`InputTime > renders with placeholder correctly 1`] = `
" `; +exports[`InputTime > renders with primary variant ghost correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant none correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant outline correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant soft correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + +exports[`InputTime > renders with primary variant subtle correctly 1`] = ` +"
+
12
+ +
30
+ +
PM
+ + + +
" +`; + exports[`InputTime > renders with readonly correctly 1`] = ` "
12
From 6a79e775fe8878d3f81f6c52f4fb3809d890f3b9 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 5 Nov 2025 12:29:24 +0100 Subject: [PATCH 17/21] fix: clean forward omit --- src/runtime/components/InputTime.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index c4c1fe41b3..21466e9d3f 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -73,7 +73,7 @@ const slots = defineSlots() const { code: codeLocale, dir } = useLocale() const appConfig = useAppConfig() as InputTime['AppConfig'] -const rootProps = useForwardPropsEmits(reactiveOmit(props, 'as', 'modelValue', 'defaultValue', 'color', 'variant', 'size', 'highlight', 'autofocus', 'autofocusDelay', 'locale', 'icon', 'avatar', 'class', 'ui'), emits) +const rootProps = useForwardPropsEmits(reactiveOmit(props, 'as', 'id', 'name', 'color', 'variant', 'size', 'name', 'highlight', 'disabled', 'autofocus', 'autofocusDelay', 'locale', 'icon', 'avatar', 'class', 'ui'), emits) const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formGroupSize, name, highlight, disabled, ariaAttrs } = useFormField(props) const { orientation, size: fieldGroupSize } = useFieldGroup(props) @@ -136,8 +136,6 @@ defineExpose({ v-bind="{ ...rootProps, ...ariaAttrs }" :id="id" v-slot="{ segments }" - :model-value="modelValue" - :default-value="defaultValue" :name="name" :disabled="disabled" :locale="locale" From d175ce3afde627aa752e909bf958a5d7645e0992 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 5 Nov 2025 12:29:30 +0100 Subject: [PATCH 18/21] docs: clean --- docs/content/docs/2.components/input-time.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/content/docs/2.components/input-time.md b/docs/content/docs/2.components/input-time.md index bded65e863..0828d3c0e9 100644 --- a/docs/content/docs/2.components/input-time.md +++ b/docs/content/docs/2.components/input-time.md @@ -50,7 +50,7 @@ This component relies on the [`@internationalized/date`](https://react-spectrum. ### Hour Cycle -Use the `hourCycle` prop to change the hour cycle of the InputTime. +Use the `hour-cycle` prop to change the hour cycle of the InputTime. Defaults to `12`. ::component-code --- @@ -89,13 +89,8 @@ Use the `variant` prop to change the variant of the InputTime. ::component-code --- -cast: - defaultValue: TimeValue -hide: - - defaultValue props: variant: subtle - defaultValue: [12, 30, 0] --- :: From 6c9dd93d96e024b2970d90d708ce1b8aebdc9757 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 5 Nov 2025 17:43:23 +0500 Subject: [PATCH 19/21] Update src/runtime/components/InputTime.vue Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> --- src/runtime/components/InputTime.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index 21466e9d3f..4eae1a3b17 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -73,7 +73,7 @@ const slots = defineSlots() const { code: codeLocale, dir } = useLocale() const appConfig = useAppConfig() as InputTime['AppConfig'] -const rootProps = useForwardPropsEmits(reactiveOmit(props, 'as', 'id', 'name', 'color', 'variant', 'size', 'name', 'highlight', 'disabled', 'autofocus', 'autofocusDelay', 'locale', 'icon', 'avatar', 'class', 'ui'), emits) +const rootProps = useForwardPropsEmits(reactiveOmit(props, 'as', 'id', 'name', 'color', 'variant', 'size', 'highlight', 'disabled', 'autofocus', 'autofocusDelay', 'locale', 'icon', 'avatar', 'class', 'ui'), emits) const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formGroupSize, name, highlight, disabled, ariaAttrs } = useFormField(props) const { orientation, size: fieldGroupSize } = useFieldGroup(props) From 4acf34a5d35bb04eb1bf10c14bcb1c7b7e1d8b74 Mon Sep 17 00:00:00 2001 From: hywax Date: Wed, 5 Nov 2025 17:45:54 +0500 Subject: [PATCH 20/21] feat(InputTime): add UIcon and UAvatar imports for enhanced functionality --- src/runtime/components/InputTime.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/components/InputTime.vue b/src/runtime/components/InputTime.vue index 4eae1a3b17..09bdc40060 100644 --- a/src/runtime/components/InputTime.vue +++ b/src/runtime/components/InputTime.vue @@ -63,6 +63,8 @@ import { useComponentIcons } from '../composables/useComponentIcons' import { useFormField } from '../composables/useFormField' import { useLocale } from '../composables/useLocale' import { tv } from '../utils/tv' +import UIcon from './Icon.vue' +import UAvatar from './Avatar.vue' const props = withDefaults(defineProps(), { autofocusDelay: 0 From 1666d70051ad2b948f1d6ee2ca35e7fb003f04a9 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 5 Nov 2025 14:40:54 +0100 Subject: [PATCH 21/21] fix: use `text-muted` on literal segment --- src/theme/input-time.ts | 2 +- .../__snapshots__/InputTime-vue.spec.ts.snap | 494 ++++++++---------- .../__snapshots__/InputTime.spec.ts.snap | 494 ++++++++---------- 3 files changed, 417 insertions(+), 573 deletions(-) diff --git a/src/theme/input-time.ts b/src/theme/input-time.ts index 24991333cf..70974200ce 100644 --- a/src/theme/input-time.ts +++ b/src/theme/input-time.ts @@ -7,7 +7,7 @@ export default (options: Required) => { slots: { root: () => undefined, base: () => ['group relative inline-flex items-center rounded-md select-none', options.theme.transitions && 'transition-colors'], - segment: ['rounded text-center outline-hidden data-placeholder:text-dimmed data-[segment=literal]:text-dimmed data-invalid:text-error data-disabled:cursor-not-allowed data-disabled:opacity-75', options.theme.transitions && 'transition-colors'] + segment: ['rounded text-center outline-hidden data-placeholder:text-dimmed data-[segment=literal]:text-muted data-invalid:text-error data-disabled:cursor-not-allowed data-disabled:opacity-75', options.theme.transitions && 'transition-colors'] }, variants: { size: { diff --git a/test/components/__snapshots__/InputTime-vue.spec.ts.snap b/test/components/__snapshots__/InputTime-vue.spec.ts.snap index aab70224e1..4a6818b6b4 100644 --- a/test/components/__snapshots__/InputTime-vue.spec.ts.snap +++ b/test/components/__snapshots__/InputTime-vue.spec.ts.snap @@ -2,12 +2,12 @@ exports[`InputTime > renders with ariaLabel correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -15,12 +15,12 @@ exports[`InputTime > renders with ariaLabel correctly 1`] = ` exports[`InputTime > renders with as correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -28,25 +28,12 @@ exports[`InputTime > renders with as correctly 1`] = ` exports[`InputTime > renders with class correctly 1`] = ` "
-
––
- -
––
- -
AM
- - - -
" -`; - -exports[`InputTime > renders with color neutral correctly 1`] = ` -"
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -54,12 +41,12 @@ exports[`InputTime > renders with color neutral correctly 1`] = ` exports[`InputTime > renders with default slot correctly 1`] = ` "
-
––
- -
––
- -
AM
- Default slot +
––
+ +
––
+ +
AM
+ Default slot
" @@ -67,12 +54,12 @@ exports[`InputTime > renders with default slot correctly 1`] = ` exports[`InputTime > renders with default value correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -80,12 +67,12 @@ exports[`InputTime > renders with default value correctly 1`] = ` exports[`InputTime > renders with disabled correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -93,12 +80,12 @@ exports[`InputTime > renders with disabled correctly 1`] = ` exports[`InputTime > renders with granularity correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -106,12 +93,12 @@ exports[`InputTime > renders with granularity correctly 1`] = ` exports[`InputTime > renders with hide time zone correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -119,12 +106,12 @@ exports[`InputTime > renders with hide time zone correctly 1`] = ` exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -132,10 +119,10 @@ exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` "
-
––
- -
––
- +
––
+ +
––
+
" @@ -143,36 +130,36 @@ exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` exports[`InputTime > renders with icon correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; exports[`InputTime > renders with leadingIcon correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; exports[`InputTime > renders with max value correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -180,12 +167,12 @@ exports[`InputTime > renders with max value correctly 1`] = ` exports[`InputTime > renders with min value correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -193,12 +180,12 @@ exports[`InputTime > renders with min value correctly 1`] = ` exports[`InputTime > renders with modelValue correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -206,12 +193,12 @@ exports[`InputTime > renders with modelValue correctly 1`] = ` exports[`InputTime > renders with neutral variant ghost correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -219,12 +206,12 @@ exports[`InputTime > renders with neutral variant ghost correctly 1`] = ` exports[`InputTime > renders with neutral variant none correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -232,12 +219,12 @@ exports[`InputTime > renders with neutral variant none correctly 1`] = ` exports[`InputTime > renders with neutral variant outline correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -245,12 +232,12 @@ exports[`InputTime > renders with neutral variant outline correctly 1`] = ` exports[`InputTime > renders with neutral variant soft correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -258,12 +245,12 @@ exports[`InputTime > renders with neutral variant soft correctly 1`] = ` exports[`InputTime > renders with neutral variant subtle correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -271,12 +258,12 @@ exports[`InputTime > renders with neutral variant subtle correctly 1`] = ` exports[`InputTime > renders with placeholder correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -284,12 +271,12 @@ exports[`InputTime > renders with placeholder correctly 1`] = ` exports[`InputTime > renders with primary variant ghost correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -297,12 +284,12 @@ exports[`InputTime > renders with primary variant ghost correctly 1`] = ` exports[`InputTime > renders with primary variant none correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -310,12 +297,12 @@ exports[`InputTime > renders with primary variant none correctly 1`] = ` exports[`InputTime > renders with primary variant outline correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -323,12 +310,12 @@ exports[`InputTime > renders with primary variant outline correctly 1`] = ` exports[`InputTime > renders with primary variant soft correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -336,12 +323,12 @@ exports[`InputTime > renders with primary variant soft correctly 1`] = ` exports[`InputTime > renders with primary variant subtle correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -349,12 +336,12 @@ exports[`InputTime > renders with primary variant subtle correctly 1`] = ` exports[`InputTime > renders with readonly correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -362,12 +349,12 @@ exports[`InputTime > renders with readonly correctly 1`] = ` exports[`InputTime > renders with required correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -375,12 +362,12 @@ exports[`InputTime > renders with required correctly 1`] = ` exports[`InputTime > renders with size lg correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -388,12 +375,12 @@ exports[`InputTime > renders with size lg correctly 1`] = ` exports[`InputTime > renders with size md correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -401,12 +388,12 @@ exports[`InputTime > renders with size md correctly 1`] = ` exports[`InputTime > renders with size sm correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -414,12 +401,12 @@ exports[`InputTime > renders with size sm correctly 1`] = ` exports[`InputTime > renders with size xl correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -427,12 +414,12 @@ exports[`InputTime > renders with size xl correctly 1`] = ` exports[`InputTime > renders with size xs correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -440,90 +427,25 @@ exports[`InputTime > renders with size xs correctly 1`] = ` exports[`InputTime > renders with trailingIcon correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; exports[`InputTime > renders with ui correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; - -exports[`InputTime > renders with variant ghost correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant none correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant outline correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant soft correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant subtle correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; diff --git a/test/components/__snapshots__/InputTime.spec.ts.snap b/test/components/__snapshots__/InputTime.spec.ts.snap index 2b10d4a7bc..db7d505ee6 100644 --- a/test/components/__snapshots__/InputTime.spec.ts.snap +++ b/test/components/__snapshots__/InputTime.spec.ts.snap @@ -2,12 +2,12 @@ exports[`InputTime > renders with ariaLabel correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -15,12 +15,12 @@ exports[`InputTime > renders with ariaLabel correctly 1`] = ` exports[`InputTime > renders with as correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -28,25 +28,12 @@ exports[`InputTime > renders with as correctly 1`] = ` exports[`InputTime > renders with class correctly 1`] = ` "
-
––
- -
––
- -
AM
- - - -
" -`; - -exports[`InputTime > renders with color neutral correctly 1`] = ` -"
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -54,12 +41,12 @@ exports[`InputTime > renders with color neutral correctly 1`] = ` exports[`InputTime > renders with default slot correctly 1`] = ` "
-
––
- -
––
- -
AM
- Default slot +
––
+ +
––
+ +
AM
+ Default slot
" @@ -67,12 +54,12 @@ exports[`InputTime > renders with default slot correctly 1`] = ` exports[`InputTime > renders with default value correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -80,12 +67,12 @@ exports[`InputTime > renders with default value correctly 1`] = ` exports[`InputTime > renders with disabled correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -93,12 +80,12 @@ exports[`InputTime > renders with disabled correctly 1`] = ` exports[`InputTime > renders with granularity correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -106,12 +93,12 @@ exports[`InputTime > renders with granularity correctly 1`] = ` exports[`InputTime > renders with hide time zone correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -119,12 +106,12 @@ exports[`InputTime > renders with hide time zone correctly 1`] = ` exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -132,10 +119,10 @@ exports[`InputTime > renders with hour cycle 12 correctly 1`] = ` exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` "
-
––
- -
––
- +
––
+ +
––
+
" @@ -143,36 +130,36 @@ exports[`InputTime > renders with hour cycle 24 correctly 1`] = ` exports[`InputTime > renders with icon correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; exports[`InputTime > renders with leadingIcon correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; exports[`InputTime > renders with max value correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -180,12 +167,12 @@ exports[`InputTime > renders with max value correctly 1`] = ` exports[`InputTime > renders with min value correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -193,12 +180,12 @@ exports[`InputTime > renders with min value correctly 1`] = ` exports[`InputTime > renders with modelValue correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -206,12 +193,12 @@ exports[`InputTime > renders with modelValue correctly 1`] = ` exports[`InputTime > renders with neutral variant ghost correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -219,12 +206,12 @@ exports[`InputTime > renders with neutral variant ghost correctly 1`] = ` exports[`InputTime > renders with neutral variant none correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -232,12 +219,12 @@ exports[`InputTime > renders with neutral variant none correctly 1`] = ` exports[`InputTime > renders with neutral variant outline correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -245,12 +232,12 @@ exports[`InputTime > renders with neutral variant outline correctly 1`] = ` exports[`InputTime > renders with neutral variant soft correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -258,12 +245,12 @@ exports[`InputTime > renders with neutral variant soft correctly 1`] = ` exports[`InputTime > renders with neutral variant subtle correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -271,12 +258,12 @@ exports[`InputTime > renders with neutral variant subtle correctly 1`] = ` exports[`InputTime > renders with placeholder correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -284,12 +271,12 @@ exports[`InputTime > renders with placeholder correctly 1`] = ` exports[`InputTime > renders with primary variant ghost correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -297,12 +284,12 @@ exports[`InputTime > renders with primary variant ghost correctly 1`] = ` exports[`InputTime > renders with primary variant none correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -310,12 +297,12 @@ exports[`InputTime > renders with primary variant none correctly 1`] = ` exports[`InputTime > renders with primary variant outline correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -323,12 +310,12 @@ exports[`InputTime > renders with primary variant outline correctly 1`] = ` exports[`InputTime > renders with primary variant soft correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -336,12 +323,12 @@ exports[`InputTime > renders with primary variant soft correctly 1`] = ` exports[`InputTime > renders with primary variant subtle correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -349,12 +336,12 @@ exports[`InputTime > renders with primary variant subtle correctly 1`] = ` exports[`InputTime > renders with readonly correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -362,12 +349,12 @@ exports[`InputTime > renders with readonly correctly 1`] = ` exports[`InputTime > renders with required correctly 1`] = ` "
-
12
- -
30
- -
PM
- +
12
+ +
30
+ +
PM
+
" @@ -375,12 +362,12 @@ exports[`InputTime > renders with required correctly 1`] = ` exports[`InputTime > renders with size lg correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -388,12 +375,12 @@ exports[`InputTime > renders with size lg correctly 1`] = ` exports[`InputTime > renders with size md correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -401,12 +388,12 @@ exports[`InputTime > renders with size md correctly 1`] = ` exports[`InputTime > renders with size sm correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -414,12 +401,12 @@ exports[`InputTime > renders with size sm correctly 1`] = ` exports[`InputTime > renders with size xl correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -427,12 +414,12 @@ exports[`InputTime > renders with size xl correctly 1`] = ` exports[`InputTime > renders with size xs correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" @@ -440,90 +427,25 @@ exports[`InputTime > renders with size xs correctly 1`] = ` exports[`InputTime > renders with trailingIcon correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; exports[`InputTime > renders with ui correctly 1`] = ` "
-
––
- -
––
- -
AM
- +
––
+ +
––
+ +
AM
+
" `; - -exports[`InputTime > renders with variant ghost correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant none correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant outline correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant soft correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`; - -exports[`InputTime > renders with variant subtle correctly 1`] = ` -"
-
12
- -
30
- -
PM
- - - -
" -`;