@k8ordo/ui 1.0.0 → 2.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/README.md +206 -171
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/components/_internal/focus-ring.css +37 -0
- package/dist/components/_internal/focus-ring.module.mjs +9 -0
- package/dist/components/_internal/form-value.d.mts +33 -0
- package/dist/components/_internal/form-value.mjs +91 -0
- package/dist/components/_internal/high-contrast.css +18 -0
- package/dist/components/_internal/high-contrast.module.mjs +5 -0
- package/dist/components/_internal/ignore-changes.d.mts +20 -0
- package/dist/components/_internal/ignore-changes.mjs +37 -0
- package/dist/components/_internal/nav-link.css +78 -0
- package/dist/components/_internal/nav-link.d.mts +5 -0
- package/dist/components/_internal/nav-link.mjs +8 -0
- package/dist/components/_internal/nav-link.module.mjs +14 -0
- package/dist/components/_internal/sr-only.css +17 -0
- package/dist/components/_internal/sr-only.module.mjs +5 -0
- package/dist/components/_internal/status-tone.css +37 -0
- package/dist/components/_internal/status-tone.d.mts +20 -0
- package/dist/components/_internal/status-tone.mjs +22 -0
- package/dist/components/_internal/status-tone.module.mjs +14 -0
- package/dist/components/ai/_internal/attachment-preview.css +75 -0
- package/dist/components/ai/_internal/attachment-preview.d.mts +14 -0
- package/dist/components/ai/_internal/attachment-preview.mjs +50 -0
- package/dist/components/ai/_internal/attachment-preview.module.mjs +14 -0
- package/dist/components/ai/_internal/collapsible.css +62 -0
- package/dist/components/ai/_internal/collapsible.d.mts +4 -3
- package/dist/components/ai/_internal/collapsible.mjs +42 -33
- package/dist/components/ai/_internal/collapsible.module.mjs +12 -0
- package/dist/components/ai/_internal/icons.d.mts +7 -0
- package/dist/components/ai/_internal/icons.mjs +14 -0
- package/dist/components/ai/_internal/streaming-cursor.css +28 -0
- package/dist/components/ai/_internal/streaming-cursor.d.mts +2 -3
- package/dist/components/ai/_internal/streaming-cursor.mjs +2 -1
- package/dist/components/ai/_internal/streaming-cursor.module.mjs +8 -0
- package/dist/components/ai/attachment/attachment.css +17 -0
- package/dist/components/ai/attachment/attachment.d.mts +14 -0
- package/dist/components/ai/attachment/attachment.mjs +25 -0
- package/dist/components/ai/attachment/attachment.module.mjs +8 -0
- package/dist/components/ai/attachment/index.d.mts +13 -0
- package/dist/components/ai/attachment/index.mjs +8 -0
- package/dist/components/ai/conversation/conversation.css +71 -0
- package/dist/components/ai/conversation/conversation.d.mts +8 -11
- package/dist/components/ai/conversation/conversation.mjs +39 -40
- package/dist/components/ai/conversation/conversation.module.mjs +11 -0
- package/dist/components/ai/conversation/index.d.mts +15 -2
- package/dist/components/ai/conversation/index.mjs +8 -1
- package/dist/components/ai/index.d.mts +8 -10
- package/dist/components/ai/index.mjs +7 -5
- package/dist/components/ai/message/index.d.mts +39 -2
- package/dist/components/ai/message/index.mjs +12 -1
- package/dist/components/ai/message/message.css +71 -0
- package/dist/components/ai/message/message.d.mts +33 -5
- package/dist/components/ai/message/message.mjs +98 -12
- package/dist/components/ai/message/message.module.mjs +18 -0
- package/dist/components/ai/prompt-input/index.d.mts +31 -2
- package/dist/components/ai/prompt-input/index.mjs +10 -1
- package/dist/components/ai/prompt-input/prompt-input.css +101 -0
- package/dist/components/ai/prompt-input/prompt-input.d.mts +15 -8
- package/dist/components/ai/prompt-input/prompt-input.mjs +152 -42
- package/dist/components/ai/prompt-input/prompt-input.module.mjs +15 -0
- package/dist/components/ai/reasoning/reasoning.css +16 -0
- package/dist/components/ai/reasoning/reasoning.d.mts +2 -3
- package/dist/components/ai/reasoning/reasoning.mjs +5 -5
- package/dist/components/ai/reasoning/reasoning.module.mjs +8 -0
- package/dist/components/ai/response/response.css +453 -0
- package/dist/components/ai/response/response.d.mts +4 -6
- package/dist/components/ai/response/response.mjs +20 -15
- package/dist/components/ai/response/response.module.mjs +8 -0
- package/dist/components/ai/source/index.d.mts +12 -0
- package/dist/components/ai/source/index.mjs +8 -0
- package/dist/components/ai/source/source.css +54 -0
- package/dist/components/ai/source/source.d.mts +13 -0
- package/dist/components/ai/source/source.mjs +51 -0
- package/dist/components/ai/source/source.module.mjs +12 -0
- package/dist/components/ai/suggestion/index.d.mts +13 -2
- package/dist/components/ai/suggestion/index.mjs +7 -1
- package/dist/components/ai/suggestion/suggestion.css +32 -0
- package/dist/components/ai/suggestion/suggestion.d.mts +3 -6
- package/dist/components/ai/suggestion/suggestion.mjs +8 -11
- package/dist/components/ai/suggestion/suggestion.module.mjs +8 -0
- package/dist/components/ai/tool-invocation/approval-bar.css +26 -0
- package/dist/components/ai/tool-invocation/approval-bar.d.mts +11 -0
- package/dist/components/ai/tool-invocation/approval-bar.mjs +59 -0
- package/dist/components/ai/tool-invocation/approval-bar.module.mjs +9 -0
- package/dist/components/ai/tool-invocation/tool-invocation.css +55 -0
- package/dist/components/ai/tool-invocation/tool-invocation.d.mts +5 -5
- package/dist/components/ai/tool-invocation/tool-invocation.mjs +39 -18
- package/dist/components/ai/tool-invocation/tool-invocation.module.mjs +15 -0
- package/dist/components/ai/types.d.mts +21 -4
- package/dist/components/buttons/button/button.css +158 -0
- package/dist/components/buttons/button/button.d.mts +32 -9
- package/dist/components/buttons/button/button.mjs +46 -36
- package/dist/components/buttons/button/button.module.mjs +23 -0
- package/dist/components/buttons/button/index.d.mts +2 -2
- package/dist/components/buttons/copy-button/copy-button.css +15 -0
- package/dist/components/buttons/copy-button/copy-button.d.mts +10 -0
- package/dist/components/buttons/copy-button/copy-button.mjs +70 -0
- package/dist/components/buttons/copy-button/copy-button.module.mjs +8 -0
- package/dist/components/buttons/copy-button/index.d.mts +2 -0
- package/dist/components/buttons/copy-button/index.mjs +2 -0
- package/dist/components/buttons/icon-button/icon-button.css +81 -0
- package/dist/components/buttons/icon-button/icon-button.d.mts +39 -12
- package/dist/components/buttons/icon-button/icon-button.mjs +71 -58
- package/dist/components/buttons/icon-button/icon-button.module.mjs +15 -0
- package/dist/components/buttons/icon-button/index.d.mts +2 -2
- package/dist/components/buttons/toolbar/index.d.mts +14 -0
- package/dist/components/buttons/toolbar/index.mjs +9 -0
- package/dist/components/buttons/toolbar/toolbar.css +30 -0
- package/dist/components/buttons/toolbar/toolbar.d.mts +18 -0
- package/dist/components/buttons/toolbar/toolbar.mjs +111 -0
- package/dist/components/buttons/toolbar/toolbar.module.mjs +9 -0
- package/dist/components/data-display/accordion/accordion-button.css +48 -0
- package/dist/components/data-display/accordion/accordion-button.d.mts +2 -3
- package/dist/components/data-display/accordion/accordion-button.mjs +5 -4
- package/dist/components/data-display/accordion/accordion-button.module.mjs +9 -0
- package/dist/components/data-display/accordion/accordion-item.css +11 -0
- package/dist/components/data-display/accordion/accordion-item.d.mts +2 -3
- package/dist/components/data-display/accordion/accordion-item.mjs +2 -1
- package/dist/components/data-display/accordion/accordion-item.module.mjs +5 -0
- package/dist/components/data-display/accordion/accordion-panel.css +9 -0
- package/dist/components/data-display/accordion/accordion-panel.d.mts +2 -3
- package/dist/components/data-display/accordion/accordion-panel.mjs +2 -2
- package/dist/components/data-display/accordion/accordion-panel.module.mjs +5 -0
- package/dist/components/data-display/accordion/accordion.css +19 -0
- package/dist/components/data-display/accordion/accordion.d.mts +2 -3
- package/dist/components/data-display/accordion/accordion.mjs +2 -1
- package/dist/components/data-display/accordion/accordion.module.mjs +5 -0
- package/dist/components/data-display/accordion/context.d.mts +3 -3
- package/dist/components/data-display/accordion/index.d.mts +2 -3
- package/dist/components/data-display/avatar/avatar.css +95 -0
- package/dist/components/data-display/avatar/avatar.d.mts +2 -3
- package/dist/components/data-display/avatar/avatar.mjs +22 -6
- package/dist/components/data-display/avatar/avatar.module.mjs +18 -0
- package/dist/components/data-display/badge/badge.css +160 -0
- package/dist/components/data-display/badge/badge.d.mts +2 -3
- package/dist/components/data-display/badge/badge.mjs +30 -5
- package/dist/components/data-display/badge/badge.module.mjs +21 -0
- package/dist/components/data-display/card/card.css +44 -0
- package/dist/components/data-display/card/card.d.mts +2 -3
- package/dist/components/data-display/card/card.mjs +12 -2
- package/dist/components/data-display/card/card.module.mjs +12 -0
- package/dist/components/data-display/carousel/carousel.css +83 -0
- package/dist/components/data-display/carousel/carousel.d.mts +11 -0
- package/dist/components/data-display/carousel/carousel.mjs +186 -0
- package/dist/components/data-display/carousel/carousel.module.mjs +18 -0
- package/dist/components/data-display/carousel/index.d.mts +11 -0
- package/dist/components/data-display/carousel/index.mjs +8 -0
- package/dist/components/data-display/code/code.css +37 -0
- package/dist/components/data-display/code/code.d.mts +2 -3
- package/dist/components/data-display/code/code.mjs +7 -6
- package/dist/components/data-display/code/code.module.mjs +9 -0
- package/dist/components/data-display/code/find-all-colors.d.mts +2 -3
- package/dist/components/data-display/code/find-all-colors.mjs +0 -161
- package/dist/components/data-display/code-block/code-block.css +161 -0
- package/dist/components/data-display/code-block/code-block.d.mts +12 -0
- package/dist/components/data-display/code-block/code-block.mjs +44 -0
- package/dist/components/data-display/code-block/code-block.module.mjs +11 -0
- package/dist/components/data-display/code-block/highlight.d.mts +9 -0
- package/dist/components/data-display/code-block/highlight.mjs +54 -0
- package/dist/components/data-display/code-block/index.d.mts +2 -0
- package/dist/components/data-display/code-block/index.mjs +2 -0
- package/dist/components/data-display/data-table/data-table.css +74 -0
- package/dist/components/data-display/data-table/data-table.d.mts +31 -0
- package/dist/components/data-display/data-table/data-table.mjs +155 -0
- package/dist/components/data-display/data-table/data-table.module.mjs +14 -0
- package/dist/components/data-display/data-table/index.d.mts +2 -0
- package/dist/components/data-display/data-table/index.mjs +2 -0
- package/dist/components/data-display/heading/heading.css +99 -0
- package/dist/components/data-display/heading/heading.d.mts +2 -3
- package/dist/components/data-display/heading/heading.mjs +15 -14
- package/dist/components/data-display/heading/heading.module.mjs +20 -0
- package/dist/components/data-display/kbd/index.d.mts +2 -0
- package/dist/components/data-display/kbd/index.mjs +2 -0
- package/dist/components/data-display/kbd/kbd.css +21 -0
- package/dist/components/data-display/kbd/kbd.d.mts +8 -0
- package/dist/components/data-display/kbd/kbd.mjs +17 -0
- package/dist/components/data-display/kbd/kbd.module.mjs +5 -0
- package/dist/components/data-display/prose/index.d.mts +2 -0
- package/dist/components/data-display/prose/index.mjs +2 -0
- package/dist/components/data-display/prose/prose.css +253 -0
- package/dist/components/data-display/prose/prose.d.mts +5 -0
- package/dist/components/data-display/prose/prose.mjs +10 -0
- package/dist/components/data-display/prose/prose.module.mjs +5 -0
- package/dist/components/data-display/table/table.css +107 -0
- package/dist/components/data-display/table/table.d.mts +10 -9
- package/dist/components/data-display/table/table.mjs +26 -15
- package/dist/components/data-display/table/table.module.mjs +22 -0
- package/dist/components/data-display/tree/index.d.mts +2 -0
- package/dist/components/data-display/tree/index.mjs +2 -0
- package/dist/components/data-display/tree/tree.css +84 -0
- package/dist/components/data-display/tree/tree.d.mts +20 -0
- package/dist/components/data-display/tree/tree.mjs +151 -0
- package/dist/components/data-display/tree/tree.module.mjs +15 -0
- package/dist/components/feedback/alert/alert.css +42 -0
- package/dist/components/feedback/alert/alert.d.mts +3 -4
- package/dist/components/feedback/alert/alert.mjs +20 -23
- package/dist/components/feedback/alert/alert.module.mjs +14 -0
- package/dist/components/feedback/callout/callout.css +38 -0
- package/dist/components/feedback/callout/callout.d.mts +10 -0
- package/dist/components/feedback/callout/callout.mjs +38 -0
- package/dist/components/feedback/callout/callout.module.mjs +11 -0
- package/dist/components/feedback/callout/index.d.mts +2 -0
- package/dist/components/feedback/callout/index.mjs +2 -0
- package/dist/components/feedback/empty-state/empty-state.css +36 -0
- package/dist/components/feedback/empty-state/empty-state.d.mts +10 -0
- package/dist/components/feedback/empty-state/empty-state.mjs +27 -0
- package/dist/components/feedback/empty-state/empty-state.module.mjs +11 -0
- package/dist/components/feedback/empty-state/index.d.mts +2 -0
- package/dist/components/feedback/empty-state/index.mjs +2 -0
- package/dist/components/feedback/progress/progress.css +78 -0
- package/dist/components/feedback/progress/progress.d.mts +5 -5
- package/dist/components/feedback/progress/progress.mjs +17 -3
- package/dist/components/feedback/progress/progress.module.mjs +12 -0
- package/dist/components/feedback/skeleton/skeleton.css +64 -0
- package/dist/components/feedback/skeleton/skeleton.d.mts +2 -3
- package/dist/components/feedback/skeleton/skeleton.mjs +19 -2
- package/dist/components/feedback/skeleton/skeleton.module.mjs +17 -0
- package/dist/components/feedback/spinner/spinner.css +40 -0
- package/dist/components/feedback/spinner/spinner.d.mts +2 -3
- package/dist/components/feedback/spinner/spinner.mjs +13 -7
- package/dist/components/feedback/spinner/spinner.module.mjs +12 -0
- package/dist/components/feedback/toast/context.d.mts +8 -9
- package/dist/components/feedback/toast/provider.css +69 -0
- package/dist/components/feedback/toast/provider.d.mts +2 -3
- package/dist/components/feedback/toast/provider.mjs +17 -13
- package/dist/components/feedback/toast/provider.module.mjs +12 -0
- package/dist/components/feedback/toast/toast.d.mts +2 -3
- package/dist/components/form/autocomplete/autocomplete.css +154 -0
- package/dist/components/form/autocomplete/autocomplete.d.mts +2 -3
- package/dist/components/form/autocomplete/autocomplete.mjs +70 -46
- package/dist/components/form/autocomplete/autocomplete.module.mjs +21 -0
- package/dist/components/form/calendar/calendar.css +98 -0
- package/dist/components/form/calendar/calendar.d.mts +14 -0
- package/dist/components/form/calendar/calendar.mjs +182 -0
- package/dist/components/form/calendar/calendar.module.mjs +18 -0
- package/dist/components/form/calendar/index.d.mts +2 -0
- package/dist/components/form/calendar/index.mjs +2 -0
- package/dist/components/form/checkbox/checkbox.css +90 -0
- package/dist/components/form/checkbox/checkbox.d.mts +5 -3
- package/dist/components/form/checkbox/checkbox.mjs +30 -27
- package/dist/components/form/checkbox/checkbox.module.mjs +13 -0
- package/dist/components/form/checkbox-card/checkbox-card.css +138 -0
- package/dist/components/form/checkbox-card/checkbox-card.d.mts +3 -4
- package/dist/components/form/checkbox-card/checkbox-card.mjs +17 -23
- package/dist/components/form/checkbox-card/checkbox-card.module.mjs +17 -0
- package/dist/components/form/checkbox-group/checkbox-group.css +15 -0
- package/dist/components/form/checkbox-group/checkbox-group.d.mts +7 -5
- package/dist/components/form/checkbox-group/checkbox-group.mjs +12 -16
- package/dist/components/form/checkbox-group/checkbox-group.module.mjs +8 -0
- package/dist/components/form/checkbox-group/index.d.mts +5 -3
- package/dist/components/form/color-picker/color-picker.css +172 -0
- package/dist/components/form/color-picker/color-picker.d.mts +28 -0
- package/dist/components/form/color-picker/color-picker.mjs +239 -0
- package/dist/components/form/color-picker/color-picker.module.mjs +20 -0
- package/dist/components/form/color-picker/index.d.mts +2 -0
- package/dist/components/form/color-picker/index.mjs +2 -0
- package/dist/components/form/combobox/combobox.css +143 -0
- package/dist/components/form/combobox/combobox.d.mts +32 -0
- package/dist/components/form/combobox/combobox.mjs +278 -0
- package/dist/components/form/combobox/combobox.module.mjs +19 -0
- package/dist/components/form/combobox/index.d.mts +2 -0
- package/dist/components/form/combobox/index.mjs +2 -0
- package/dist/components/form/date-field/date-field.css +31 -0
- package/dist/components/form/date-field/date-field.d.mts +8 -0
- package/dist/components/form/date-field/date-field.mjs +20 -0
- package/dist/components/form/date-field/date-field.module.mjs +5 -0
- package/dist/components/form/date-field/index.d.mts +2 -0
- package/dist/components/form/date-field/index.mjs +2 -0
- package/dist/components/form/date-picker/date-picker.css +90 -0
- package/dist/components/form/date-picker/date-picker.d.mts +12 -0
- package/dist/components/form/date-picker/date-picker.mjs +77 -0
- package/dist/components/form/date-picker/date-picker.module.mjs +14 -0
- package/dist/components/form/date-picker/index.d.mts +2 -0
- package/dist/components/form/date-picker/index.mjs +2 -0
- package/dist/components/form/file-field/file-field.css +88 -0
- package/dist/components/form/file-field/file-field.d.mts +18 -19
- package/dist/components/form/file-field/file-field.mjs +130 -42
- package/dist/components/form/file-field/file-field.module.mjs +17 -0
- package/dist/components/form/file-field/index.d.mts +20 -2
- package/dist/components/form/file-field/index.mjs +9 -1
- package/dist/components/form/form/form.css +11 -0
- package/dist/components/form/form/form.d.mts +4 -4
- package/dist/components/form/form/form.mjs +2 -1
- package/dist/components/form/form/form.module.mjs +5 -0
- package/dist/components/form/form-control/form-control.css +43 -0
- package/dist/components/form/form-control/form-control.d.mts +2 -3
- package/dist/components/form/form-control/form-control.mjs +11 -10
- package/dist/components/form/form-control/form-control.module.mjs +12 -0
- package/dist/components/form/number-field/cast.d.mts +2 -3
- package/dist/components/form/number-field/cast.mjs +3 -22
- package/dist/components/form/number-field/number-field.css +122 -0
- package/dist/components/form/number-field/number-field.d.mts +10 -10
- package/dist/components/form/number-field/number-field.mjs +126 -54
- package/dist/components/form/number-field/number-field.module.mjs +10 -0
- package/dist/components/form/password-input/password-input.css +88 -0
- package/dist/components/form/password-input/password-input.d.mts +2 -3
- package/dist/components/form/password-input/password-input.mjs +15 -12
- package/dist/components/form/password-input/password-input.module.mjs +12 -0
- package/dist/components/form/radio/radio.css +89 -0
- package/dist/components/form/radio/radio.d.mts +4 -3
- package/dist/components/form/radio/radio.mjs +16 -19
- package/dist/components/form/radio/radio.module.mjs +16 -0
- package/dist/components/form/radio-card/radio-card.css +147 -0
- package/dist/components/form/radio-card/radio-card.d.mts +4 -4
- package/dist/components/form/radio-card/radio-card.mjs +17 -23
- package/dist/components/form/radio-card/radio-card.module.mjs +19 -0
- package/dist/components/form/range-slider/index.d.mts +2 -0
- package/dist/components/form/range-slider/index.mjs +2 -0
- package/dist/components/form/range-slider/range-slider.css +67 -0
- package/dist/components/form/range-slider/range-slider.d.mts +30 -0
- package/dist/components/form/range-slider/range-slider.mjs +135 -0
- package/dist/components/form/range-slider/range-slider.module.mjs +14 -0
- package/dist/components/form/select/select.css +74 -0
- package/dist/components/form/select/select.d.mts +2 -3
- package/dist/components/form/select/select.mjs +25 -8
- package/dist/components/form/select/select.module.mjs +12 -0
- package/dist/components/form/slider/range-input-class.css +97 -0
- package/dist/components/form/slider/range-input-class.d.mts +7 -0
- package/dist/components/form/slider/range-input-class.mjs +10 -0
- package/dist/components/form/slider/range-input-class.module.mjs +8 -0
- package/dist/components/form/slider/slider.css +55 -0
- package/dist/components/form/slider/slider.d.mts +6 -7
- package/dist/components/form/slider/slider.mjs +44 -11
- package/dist/components/form/slider/slider.module.mjs +12 -0
- package/dist/components/form/switch/switch.css +103 -0
- package/dist/components/form/switch/switch.d.mts +2 -3
- package/dist/components/form/switch/switch.mjs +14 -17
- package/dist/components/form/switch/switch.module.mjs +16 -0
- package/dist/components/form/text-field/text-field.css +41 -0
- package/dist/components/form/text-field/text-field.d.mts +4 -5
- package/dist/components/form/text-field/text-field.mjs +2 -3
- package/dist/components/form/text-field/text-field.module.mjs +5 -0
- package/dist/components/form/textarea/textarea.css +50 -0
- package/dist/components/form/textarea/textarea.d.mts +3 -3
- package/dist/components/form/textarea/textarea.mjs +6 -20
- package/dist/components/form/textarea/textarea.module.mjs +9 -0
- package/dist/components/icons/base.css +40 -0
- package/dist/components/icons/base.d.mts +4 -5
- package/dist/components/icons/base.mjs +10 -10
- package/dist/components/icons/base.module.mjs +13 -0
- package/dist/components/icons/browsers.d.mts +5 -6
- package/dist/components/icons/color-scale.d.mts +2 -3
- package/dist/components/icons/github-mark.d.mts +2 -3
- package/dist/components/icons/logo.css +17 -0
- package/dist/components/icons/logo.d.mts +3 -4
- package/dist/components/icons/logo.mjs +4 -3
- package/dist/components/icons/logo.module.mjs +9 -0
- package/dist/components/icons/lucide-deep.d.mts +3 -1
- package/dist/components/icons/lucide-imports.d.mts +3 -1
- package/dist/components/icons/lucide-imports.mjs +3 -1
- package/dist/components/icons/lucide.d.mts +60 -61
- package/dist/components/icons/qiita.d.mts +2 -3
- package/dist/components/icons/twitter.css +9 -0
- package/dist/components/icons/twitter.d.mts +2 -3
- package/dist/components/icons/twitter.mjs +2 -1
- package/dist/components/icons/twitter.module.mjs +5 -0
- package/dist/components/icons/vertical-writing.d.mts +2 -3
- package/dist/components/index.d.mts +62 -29
- package/dist/components/index.mjs +36 -14
- package/dist/components/layout/_shared/gap.css +25 -0
- package/dist/components/layout/_shared/gap.d.mts +8 -9
- package/dist/components/layout/_shared/gap.mjs +6 -5
- package/dist/components/layout/_shared/gap.module.mjs +11 -0
- package/dist/components/layout/_shared/padding.css +25 -0
- package/dist/components/layout/_shared/padding.d.mts +8 -9
- package/dist/components/layout/_shared/padding.mjs +6 -5
- package/dist/components/layout/_shared/padding.module.mjs +11 -0
- package/dist/components/layout/grid/grid.css +93 -0
- package/dist/components/layout/grid/grid.d.mts +5 -6
- package/dist/components/layout/grid/grid.mjs +21 -20
- package/dist/components/layout/grid/grid.module.mjs +25 -0
- package/dist/components/layout/resizable-panels/index.d.mts +18 -0
- package/dist/components/layout/resizable-panels/index.mjs +9 -0
- package/dist/components/layout/resizable-panels/resizable-panels.css +77 -0
- package/dist/components/layout/resizable-panels/resizable-panels.d.mts +21 -0
- package/dist/components/layout/resizable-panels/resizable-panels.mjs +164 -0
- package/dist/components/layout/resizable-panels/resizable-panels.module.mjs +16 -0
- package/dist/components/layout/separator/separator.css +37 -0
- package/dist/components/layout/separator/separator.d.mts +2 -3
- package/dist/components/layout/separator/separator.mjs +12 -9
- package/dist/components/layout/separator/separator.module.mjs +12 -0
- package/dist/components/layout/stack/stack.css +49 -0
- package/dist/components/layout/stack/stack.d.mts +3 -4
- package/dist/components/layout/stack/stack.mjs +11 -10
- package/dist/components/layout/stack/stack.module.mjs +17 -0
- package/dist/components/navigation/anchor/anchor.css +29 -0
- package/dist/components/navigation/anchor/anchor.d.mts +2 -3
- package/dist/components/navigation/anchor/anchor.mjs +5 -2
- package/dist/components/navigation/anchor/anchor.module.mjs +8 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.css +72 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.d.mts +5 -6
- package/dist/components/navigation/breadcrumb/breadcrumb.mjs +15 -9
- package/dist/components/navigation/breadcrumb/breadcrumb.module.mjs +14 -0
- package/dist/components/navigation/breadcrumb/index.d.mts +2 -3
- package/dist/components/navigation/pagination/pagination.css +36 -0
- package/dist/components/navigation/pagination/pagination.d.mts +2 -3
- package/dist/components/navigation/pagination/pagination.mjs +9 -8
- package/dist/components/navigation/pagination/pagination.module.mjs +11 -0
- package/dist/components/navigation/side-nav/index.d.mts +16 -0
- package/dist/components/navigation/side-nav/index.mjs +10 -0
- package/dist/components/navigation/side-nav/side-nav.css +73 -0
- package/dist/components/navigation/side-nav/side-nav.d.mts +31 -0
- package/dist/components/navigation/side-nav/side-nav.mjs +62 -0
- package/dist/components/navigation/side-nav/side-nav.module.mjs +11 -0
- package/dist/components/navigation/stepper/index.d.mts +2 -0
- package/dist/components/navigation/stepper/index.mjs +2 -0
- package/dist/components/navigation/stepper/stepper.css +151 -0
- package/dist/components/navigation/stepper/stepper.d.mts +19 -0
- package/dist/components/navigation/stepper/stepper.mjs +87 -0
- package/dist/components/navigation/stepper/stepper.module.mjs +29 -0
- package/dist/components/navigation/table-of-contents/index.d.mts +2 -0
- package/dist/components/navigation/table-of-contents/index.mjs +2 -0
- package/dist/components/navigation/table-of-contents/table-of-contents.css +17 -0
- package/dist/components/navigation/table-of-contents/table-of-contents.d.mts +12 -0
- package/dist/components/navigation/table-of-contents/table-of-contents.mjs +94 -0
- package/dist/components/navigation/table-of-contents/table-of-contents.module.mjs +8 -0
- package/dist/components/navigation/tabs/index.d.mts +19 -2
- package/dist/components/navigation/tabs/index.mjs +9 -1
- package/dist/components/navigation/tabs/tabs.css +70 -0
- package/dist/components/navigation/tabs/tabs.d.mts +16 -19
- package/dist/components/navigation/tabs/tabs.mjs +52 -49
- package/dist/components/navigation/tabs/tabs.module.mjs +12 -0
- package/dist/components/observers/fragment-instance.d.mts +1 -0
- package/dist/components/observers/in-view/in-view.d.mts +11 -0
- package/dist/components/observers/in-view/in-view.mjs +60 -0
- package/dist/components/observers/in-view/index.d.mts +2 -0
- package/dist/components/observers/in-view/index.mjs +2 -0
- package/dist/components/observers/resize/index.d.mts +2 -0
- package/dist/components/observers/resize/index.mjs +2 -0
- package/dist/components/observers/resize/resize.d.mts +7 -0
- package/dist/components/observers/resize/resize.mjs +25 -0
- package/dist/components/overlays/_internal/modal-dialog-context.d.mts +4 -5
- package/dist/components/overlays/_internal/use-can-hover.d.mts +2 -3
- package/dist/components/overlays/_internal/use-hover-intent.d.mts +3 -4
- package/dist/components/overlays/_internal/use-list-navigation.d.mts +17 -11
- package/dist/components/overlays/_internal/use-list-navigation.mjs +42 -26
- package/dist/components/overlays/command-palette/command-palette.css +91 -0
- package/dist/components/overlays/command-palette/command-palette.d.mts +24 -0
- package/dist/components/overlays/command-palette/command-palette.mjs +139 -0
- package/dist/components/overlays/command-palette/command-palette.module.mjs +14 -0
- package/dist/components/overlays/command-palette/index.d.mts +2 -0
- package/dist/components/overlays/command-palette/index.mjs +2 -0
- package/dist/components/overlays/context-menu/context-menu.d.mts +13 -0
- package/dist/components/overlays/context-menu/context-menu.mjs +79 -0
- package/dist/components/overlays/context-menu/index.d.mts +21 -0
- package/dist/components/overlays/context-menu/index.mjs +13 -0
- package/dist/components/overlays/dialog/dialog.css +31 -0
- package/dist/components/overlays/dialog/dialog.d.mts +12 -17
- package/dist/components/overlays/dialog/dialog.mjs +11 -13
- package/dist/components/overlays/dialog/dialog.module.mjs +10 -0
- package/dist/components/overlays/dialog/index.d.mts +17 -2
- package/dist/components/overlays/dialog/index.mjs +8 -1
- package/dist/components/overlays/drawer/drawer.css +48 -0
- package/dist/components/overlays/drawer/drawer.d.mts +2 -3
- package/dist/components/overlays/drawer/drawer.mjs +11 -10
- package/dist/components/overlays/drawer/drawer.module.mjs +13 -0
- package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +19 -26
- package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +12 -20
- package/dist/components/overlays/dropdown-menu/hooks.d.mts +7 -7
- package/dist/components/overlays/dropdown-menu/hooks.mjs +3 -3
- package/dist/components/overlays/dropdown-menu/index.d.mts +30 -2
- package/dist/components/overlays/dropdown-menu/index.mjs +12 -1
- package/dist/components/overlays/dropdown-menu/shared.css +51 -0
- package/dist/components/overlays/dropdown-menu/shared.d.mts +3 -6
- package/dist/components/overlays/dropdown-menu/shared.mjs +4 -6
- package/dist/components/overlays/dropdown-menu/shared.module.mjs +8 -0
- package/dist/components/overlays/dropdown-menu/sub-menu.css +28 -0
- package/dist/components/overlays/dropdown-menu/sub-menu.d.mts +3 -6
- package/dist/components/overlays/dropdown-menu/sub-menu.mjs +16 -16
- package/dist/components/overlays/dropdown-menu/sub-menu.module.mjs +9 -0
- package/dist/components/overlays/dropdown-menu/use-safe-triangle.d.mts +2 -3
- package/dist/components/overlays/list-box/hooks.d.mts +6 -5
- package/dist/components/overlays/list-box/hooks.mjs +5 -4
- package/dist/components/overlays/list-box/index.d.mts +27 -2
- package/dist/components/overlays/list-box/index.mjs +9 -1
- package/dist/components/overlays/list-box/list-box.css +74 -0
- package/dist/components/overlays/list-box/list-box.d.mts +20 -23
- package/dist/components/overlays/list-box/list-box.mjs +17 -21
- package/dist/components/overlays/list-box/list-box.module.mjs +10 -0
- package/dist/components/overlays/modal/modal.css +119 -0
- package/dist/components/overlays/modal/modal.d.mts +2 -3
- package/dist/components/overlays/modal/modal.mjs +14 -11
- package/dist/components/overlays/modal/modal.module.mjs +11 -0
- package/dist/components/overlays/popover/anchor-positioning.d.mts +4 -5
- package/dist/components/overlays/popover/escape-stack.d.mts +2 -3
- package/dist/components/overlays/popover/hooks.d.mts +7 -8
- package/dist/components/overlays/popover/index.d.mts +25 -2
- package/dist/components/overlays/popover/index.mjs +8 -1
- package/dist/components/overlays/popover/popover.css +51 -0
- package/dist/components/overlays/popover/popover.d.mts +18 -20
- package/dist/components/overlays/popover/popover.mjs +13 -12
- package/dist/components/overlays/popover/popover.module.mjs +11 -0
- package/dist/components/overlays/tooltip/bridge.css +68 -0
- package/dist/components/overlays/tooltip/bridge.d.mts +2 -3
- package/dist/components/overlays/tooltip/bridge.mjs +7 -21
- package/dist/components/overlays/tooltip/bridge.module.mjs +11 -0
- package/dist/components/overlays/tooltip/index.d.mts +22 -2
- package/dist/components/overlays/tooltip/index.mjs +8 -1
- package/dist/components/overlays/tooltip/tooltip.css +15 -0
- package/dist/components/overlays/tooltip/tooltip.d.mts +19 -24
- package/dist/components/overlays/tooltip/tooltip.mjs +5 -9
- package/dist/components/overlays/tooltip/tooltip.module.mjs +5 -0
- package/dist/components/providers/index.d.mts +1 -2
- package/dist/components/providers/portal-root.d.mts +9 -7
- package/dist/components/providers/portal-root.mjs +7 -7
- package/dist/components/providers/ui-provider.d.mts +2 -6
- package/dist/components/providers/ui-provider.mjs +1 -5
- package/dist/helpers/chain.d.mts +2 -3
- package/dist/helpers/chain.mjs +0 -23
- package/dist/helpers/create-safe-context.d.mts +2 -3
- package/dist/helpers/create-safe-context.mjs +0 -17
- package/dist/helpers/index.d.mts +1 -2
- package/dist/helpers/index.mjs +2 -3
- package/dist/helpers/merge-props.d.mts +2 -3
- package/dist/helpers/merge-props.mjs +2 -37
- package/dist/helpers/merge-refs.d.mts +2 -3
- package/dist/helpers/merge-refs.mjs +0 -32
- package/dist/hooks/click-away/index.d.mts +2 -3
- package/dist/hooks/controllable-state/index.d.mts +2 -3
- package/dist/hooks/controllable-state/index.mjs +9 -11
- package/dist/hooks/index.d.mts +2 -23
- package/dist/hooks/index.mjs +2 -22
- package/dist/hooks/writing-mode/index.d.mts +15 -5
- package/dist/hooks/writing-mode/index.mjs +21 -14
- package/dist/i18n/current.d.mts +23 -0
- package/dist/i18n/current.mjs +43 -0
- package/dist/i18n/en.d.mts +2 -3
- package/dist/i18n/en.mjs +46 -0
- package/dist/i18n/index.d.mts +3 -2
- package/dist/i18n/index.mjs +4 -3
- package/dist/i18n/ja.d.mts +2 -3
- package/dist/i18n/ja.mjs +46 -0
- package/dist/i18n/messages.d.mts +81 -3
- package/dist/i18n/usage.d.mts +8 -0
- package/dist/i18n/usage.mjs +131 -0
- package/dist/index.d.mts +40 -47
- package/dist/index.mjs +36 -42
- package/dist/integrations/_shared/openui-defs.d.mts +3 -4
- package/dist/integrations/_shared/openui-defs.mjs +123 -54
- package/dist/integrations/_shared/renderers.css +50 -0
- package/dist/integrations/_shared/renderers.d.mts +71 -52
- package/dist/integrations/_shared/renderers.mjs +292 -34
- package/dist/integrations/_shared/renderers.module.mjs +14 -0
- package/dist/integrations/_shared/schemas.d.mts +388 -104
- package/dist/integrations/_shared/schemas.mjs +165 -27
- package/dist/integrations/ai-sdk/index.d.mts +2 -2
- package/dist/integrations/ai-sdk/map-parts.d.mts +25 -7
- package/dist/integrations/ai-sdk/map-parts.mjs +28 -3
- package/dist/integrations/json-render/catalog.d.mts +336 -18
- package/dist/integrations/json-render/catalog.mjs +120 -57
- package/dist/integrations/json-render/registry.d.mts +3 -4
- package/dist/integrations/json-render/registry.mjs +38 -4
- package/dist/integrations/openui/form-views.d.mts +23 -18
- package/dist/integrations/openui/form-views.mjs +27 -3
- package/dist/integrations/openui/library.d.mts +59 -7
- package/dist/integrations/openui/library.mjs +18 -3
- package/dist/integrations/openui/prompt.d.mts +2 -3
- package/dist/internal/accepts-file.d.mts +8 -0
- package/dist/internal/accepts-file.mjs +19 -0
- package/dist/internal/carries-files.d.mts +3 -0
- package/dist/internal/carries-files.mjs +4 -0
- package/dist/internal/clamp.d.mts +2 -3
- package/dist/internal/clamp.mjs +0 -11
- package/dist/internal/commit-input-value.d.mts +10 -0
- package/dist/internal/commit-input-value.mjs +15 -0
- package/dist/internal/dropped-files.d.mts +3 -0
- package/dist/internal/dropped-files.mjs +8 -0
- package/dist/{hooks/focus-trap/index.d.mts → internal/focus-trap.d.mts} +6 -7
- package/dist/{hooks/focus-trap/index.mjs → internal/focus-trap.mjs} +5 -5
- package/dist/internal/hex-color.d.mts +22 -0
- package/dist/internal/hex-color.mjs +53 -0
- package/dist/internal/iso-date.d.mts +39 -0
- package/dist/internal/iso-date.mjs +98 -0
- package/dist/internal/to-precision.d.mts +2 -3
- package/dist/internal/to-precision.mjs +0 -8
- package/dist/styles/index.css +513 -2534
- package/dist/styles/tailwind.css +217 -17
- package/dist/styles/tokens.d.mts +1 -2
- package/dist/styles/tokens.mjs +1 -2
- package/dist/types/variables.d.mts +7 -9
- package/docs/GUIDE.md +340 -158
- package/docs/llms.txt +18 -10
- package/docs/props.generated.json +2157 -292
- package/docs/references/ai-chat.md +396 -113
- package/docs/references/color.md +258 -113
- package/docs/references/components.md +1891 -461
- package/docs/references/generative-ui.md +163 -34
- package/docs/references/interaction-design.md +103 -73
- package/docs/references/spatial-design.md +112 -90
- package/docs/references/types.md +101 -0
- package/docs/references/typography.md +182 -73
- package/package.json +71 -70
- package/dist/components/_internal/focus-ring.d.mts +0 -8
- package/dist/components/_internal/focus-ring.mjs +0 -8
- package/dist/components/layout/scroll-linked/index.d.mts +0 -2
- package/dist/components/layout/scroll-linked/index.mjs +0 -2
- package/dist/components/layout/scroll-linked/scroll-linked.d.mts +0 -14
- package/dist/components/layout/scroll-linked/scroll-linked.mjs +0 -59
- package/dist/helpers/cn.d.mts +0 -5
- package/dist/helpers/cn.mjs +0 -27
- package/dist/hooks/breakpoint/index.d.mts +0 -5
- package/dist/hooks/breakpoint/index.mjs +0 -24
- package/dist/hooks/client/index.d.mts +0 -4
- package/dist/hooks/client/index.mjs +0 -6
- package/dist/hooks/clipboard/index.d.mts +0 -7
- package/dist/hooks/clipboard/index.mjs +0 -15
- package/dist/hooks/debounced-transition/index.d.mts +0 -5
- package/dist/hooks/debounced-transition/index.mjs +0 -49
- package/dist/hooks/deferred-debounce/index.d.mts +0 -4
- package/dist/hooks/deferred-debounce/index.mjs +0 -9
- package/dist/hooks/disclosure/index.d.mts +0 -10
- package/dist/hooks/disclosure/index.mjs +0 -20
- package/dist/hooks/hash/index.d.mts +0 -4
- package/dist/hooks/hash/index.mjs +0 -25
- package/dist/hooks/hover/index.d.mts +0 -12
- package/dist/hooks/hover/index.mjs +0 -19
- package/dist/hooks/intersection-observer/index.d.mts +0 -3
- package/dist/hooks/intersection-observer/index.mjs +0 -3
- package/dist/hooks/intersection-observer/use-in-view.d.mts +0 -11
- package/dist/hooks/intersection-observer/use-in-view.mjs +0 -18
- package/dist/hooks/intersection-observer/use-intersection-observer.d.mts +0 -11
- package/dist/hooks/intersection-observer/use-intersection-observer.mjs +0 -33
- package/dist/hooks/interval/index.d.mts +0 -4
- package/dist/hooks/interval/index.mjs +0 -19
- package/dist/hooks/local-storage/index.d.mts +0 -4
- package/dist/hooks/local-storage/index.mjs +0 -46
- package/dist/hooks/resize/index.d.mts +0 -8
- package/dist/hooks/resize/index.mjs +0 -24
- package/dist/hooks/scroll-direction/index.d.mts +0 -13
- package/dist/hooks/scroll-direction/index.mjs +0 -67
- package/dist/hooks/scroll-lock/index.d.mts +0 -9
- package/dist/hooks/scroll-lock/index.mjs +0 -59
- package/dist/hooks/session-storage/index.d.mts +0 -4
- package/dist/hooks/session-storage/index.mjs +0 -46
- package/dist/hooks/step/index.d.mts +0 -15
- package/dist/hooks/step/index.mjs +0 -39
- package/dist/hooks/timeout/index.d.mts +0 -4
- package/dist/hooks/timeout/index.mjs +0 -19
- package/dist/hooks/window-resize/index.d.mts +0 -11
- package/dist/hooks/window-resize/index.mjs +0 -21
- package/dist/hooks/window-size/index.d.mts +0 -8
- package/dist/hooks/window-size/index.mjs +0 -31
- package/dist/i18n/context.d.mts +0 -9
- package/dist/i18n/context.mjs +0 -19
- package/dist/styles/base.css +0 -315
- package/dist/styles/tokens.css +0 -380
- package/dist/styles/tokens.generated.d.mts +0 -840
- package/dist/styles/tokens.generated.mjs +0 -813
- package/dist/styles/utilities.css +0 -62
- package/docs/references/helpers.md +0 -120
- package/docs/references/hooks.md +0 -314
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
3
|
+
import sr_only_module_default from "../../_internal/sr-only.module.mjs";
|
|
4
|
+
import { mergeRefs } from "../../../helpers/merge-refs.mjs";
|
|
5
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
6
|
+
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
7
|
+
import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
|
|
8
|
+
import { useWritingMode } from "../../../hooks/writing-mode/index.mjs";
|
|
9
|
+
import { FormValue } from "../../_internal/form-value.mjs";
|
|
10
|
+
import combobox_module_default from "./combobox.module.mjs";
|
|
11
|
+
import { clsx } from "clsx";
|
|
12
|
+
import { useCallback, useId, useMemo, useRef, useState, useTransition } from "react";
|
|
13
|
+
import { useFormStatus } from "react-dom";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
//#region src/components/form/combobox/combobox.tsx
|
|
16
|
+
const NO_OPTIONS = [];
|
|
17
|
+
const matches = (option, text) => option.label.toLocaleLowerCase().includes(text.trim().toLocaleLowerCase());
|
|
18
|
+
const Combobox = ({ invalid = false, options: optionsProp, search, type: _type, value, defaultValue, onChange, name, id, disabled = false, readOnly = false, required = false, placeholder, onBlur, onKeyDown, ref, ...rest }) => {
|
|
19
|
+
const messages = getMessages();
|
|
20
|
+
const options = optionsProp ?? NO_OPTIONS;
|
|
21
|
+
const baseId = useId();
|
|
22
|
+
const listboxId = `${baseId}-listbox`;
|
|
23
|
+
const inputRef = useRef(null);
|
|
24
|
+
const mergedRef = useMemo(() => mergeRefs(inputRef, ref), [ref]);
|
|
25
|
+
const isControlled = value !== void 0;
|
|
26
|
+
const [current, setCurrent] = useControllableState({
|
|
27
|
+
value,
|
|
28
|
+
defaultValue: defaultValue ?? "",
|
|
29
|
+
onChange
|
|
30
|
+
});
|
|
31
|
+
const [text, setText] = useState(null);
|
|
32
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
33
|
+
const [activeIndex, setActiveIndex] = useState();
|
|
34
|
+
const [found, setFound] = useState(null);
|
|
35
|
+
const [failed, setFailed] = useState(false);
|
|
36
|
+
const [isSearching, startSearch] = useTransition();
|
|
37
|
+
const searchRef = useRef(null);
|
|
38
|
+
const [picked, setPicked] = useState(null);
|
|
39
|
+
const { pending } = useFormStatus();
|
|
40
|
+
const locked = readOnly || pending;
|
|
41
|
+
const expanded = isOpen && !locked;
|
|
42
|
+
const candidates = search === void 0 ? text === null ? options : options.filter((option) => matches(option, text)) : text === null || text.trim() === "" ? options : found ?? NO_OPTIONS;
|
|
43
|
+
const active = activeIndex === void 0 || candidates.length === 0 ? void 0 : Math.min(activeIndex, candidates.length - 1);
|
|
44
|
+
const currentLabel = current === "" ? "" : [
|
|
45
|
+
...options,
|
|
46
|
+
...found ?? [],
|
|
47
|
+
...picked === null ? [] : [picked]
|
|
48
|
+
].find((option) => option.value === current)?.label ?? current;
|
|
49
|
+
const [anchor, setAnchor] = useState(null);
|
|
50
|
+
const writingMode = useWritingMode(anchor);
|
|
51
|
+
const anchorName = `--ao-combobox-${baseId.replaceAll(/[^a-zA-Z0-9_-]/gu, "")}`;
|
|
52
|
+
const anchorRef = useCallback((node) => {
|
|
53
|
+
setAnchor(node);
|
|
54
|
+
node?.style.setProperty("anchor-name", anchorName);
|
|
55
|
+
}, [anchorName]);
|
|
56
|
+
const listStyle = {
|
|
57
|
+
position: "fixed",
|
|
58
|
+
inset: "auto",
|
|
59
|
+
margin: 0,
|
|
60
|
+
marginTop: "4px",
|
|
61
|
+
positionAnchor: anchorName,
|
|
62
|
+
positionArea: "bottom span-right",
|
|
63
|
+
positionTryFallbacks: "flip-block, flip-inline, flip-block flip-inline",
|
|
64
|
+
inlineSize: `anchor-size(${writingMode === "vertical" ? "height" : "width"})`
|
|
65
|
+
};
|
|
66
|
+
const runSearch = (query) => {
|
|
67
|
+
if (search === void 0) return;
|
|
68
|
+
searchRef.current?.abort();
|
|
69
|
+
if (query.trim() === "") {
|
|
70
|
+
setFound(null);
|
|
71
|
+
setFailed(false);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const controller = new AbortController();
|
|
75
|
+
searchRef.current = controller;
|
|
76
|
+
startSearch(async () => {
|
|
77
|
+
try {
|
|
78
|
+
const results = await search(query, { signal: controller.signal });
|
|
79
|
+
if (!controller.signal.aborted) startSearch(() => {
|
|
80
|
+
setFound(results);
|
|
81
|
+
setFailed(false);
|
|
82
|
+
});
|
|
83
|
+
} catch {
|
|
84
|
+
if (!controller.signal.aborted) startSearch(() => {
|
|
85
|
+
setFound(NO_OPTIONS);
|
|
86
|
+
setFailed(true);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
const open = (index) => {
|
|
92
|
+
if (locked) return;
|
|
93
|
+
setIsOpen(true);
|
|
94
|
+
setActiveIndex(index);
|
|
95
|
+
};
|
|
96
|
+
const close = () => {
|
|
97
|
+
setIsOpen(false);
|
|
98
|
+
setActiveIndex(void 0);
|
|
99
|
+
};
|
|
100
|
+
const choose = (option) => {
|
|
101
|
+
setPicked(option);
|
|
102
|
+
setCurrent(option.value);
|
|
103
|
+
setText(null);
|
|
104
|
+
close();
|
|
105
|
+
};
|
|
106
|
+
const scrollIntoView = useCallback((node) => {
|
|
107
|
+
node?.scrollIntoView({ block: "nearest" });
|
|
108
|
+
}, []);
|
|
109
|
+
const selectedIndex = candidates.findIndex((option) => option.value === current);
|
|
110
|
+
const handleKeyDown = (event) => {
|
|
111
|
+
onKeyDown?.(event);
|
|
112
|
+
if (event.defaultPrevented || event.nativeEvent.isComposing) return;
|
|
113
|
+
const last = candidates.length - 1;
|
|
114
|
+
switch (event.key) {
|
|
115
|
+
case "ArrowDown":
|
|
116
|
+
event.preventDefault();
|
|
117
|
+
if (!expanded) {
|
|
118
|
+
open(event.altKey ? void 0 : selectedIndex === -1 ? 0 : selectedIndex);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
setActiveIndex(active === void 0 ? 0 : Math.min(active + 1, last));
|
|
122
|
+
return;
|
|
123
|
+
case "ArrowUp":
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
if (event.altKey) {
|
|
126
|
+
close();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (!expanded) {
|
|
130
|
+
open(selectedIndex === -1 ? last : selectedIndex);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
setActiveIndex(active === void 0 ? last : Math.max(active - 1, 0));
|
|
134
|
+
return;
|
|
135
|
+
case "Enter": {
|
|
136
|
+
const option = active === void 0 ? void 0 : candidates[active];
|
|
137
|
+
if (!expanded || option === void 0) return;
|
|
138
|
+
event.preventDefault();
|
|
139
|
+
choose(option);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
case "Escape":
|
|
143
|
+
if (expanded) {
|
|
144
|
+
event.preventDefault();
|
|
145
|
+
close();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (text !== null) {
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
setText(null);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const status = isSearching ? messages.loading : failed ? messages.comboboxFailed : candidates.length === 0 ? messages.comboboxEmpty : null;
|
|
155
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
156
|
+
className: clsx(combobox_module_default.root, focus_ring_module_default.ringWithin, (disabled || pending) && combobox_module_default.disabled, readOnly && combobox_module_default.readOnly),
|
|
157
|
+
ref: anchorRef,
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ jsx(FormValue, {
|
|
160
|
+
defaultValues: isControlled ? void 0 : defaultValue === void 0 || defaultValue === "" ? [] : [defaultValue],
|
|
161
|
+
disabled,
|
|
162
|
+
focusTarget: inputRef,
|
|
163
|
+
multiple: false,
|
|
164
|
+
name,
|
|
165
|
+
onReset: () => {
|
|
166
|
+
setText(null);
|
|
167
|
+
close();
|
|
168
|
+
if (!isControlled) setCurrent(defaultValue ?? "");
|
|
169
|
+
},
|
|
170
|
+
required,
|
|
171
|
+
values: current === "" ? [] : [current]
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsx("input", {
|
|
174
|
+
...rest,
|
|
175
|
+
"aria-activedescendant": expanded && active !== void 0 ? `${baseId}-option-${String(active)}` : void 0,
|
|
176
|
+
"aria-autocomplete": "list",
|
|
177
|
+
"aria-controls": listboxId,
|
|
178
|
+
"aria-expanded": expanded,
|
|
179
|
+
"aria-invalid": invalid,
|
|
180
|
+
"aria-required": required,
|
|
181
|
+
autoComplete: "off",
|
|
182
|
+
className: combobox_module_default.input,
|
|
183
|
+
disabled,
|
|
184
|
+
id,
|
|
185
|
+
onBlur: (event) => {
|
|
186
|
+
if (text !== null && text.trim() === "") {
|
|
187
|
+
setCurrent("");
|
|
188
|
+
setPicked(null);
|
|
189
|
+
}
|
|
190
|
+
setText(null);
|
|
191
|
+
close();
|
|
192
|
+
onBlur?.(event);
|
|
193
|
+
},
|
|
194
|
+
onChange: (event) => {
|
|
195
|
+
setText(event.currentTarget.value);
|
|
196
|
+
open();
|
|
197
|
+
runSearch(event.currentTarget.value);
|
|
198
|
+
},
|
|
199
|
+
onClick: () => {
|
|
200
|
+
if (!expanded) open(selectedIndex === -1 ? void 0 : selectedIndex);
|
|
201
|
+
},
|
|
202
|
+
onKeyDown: handleKeyDown,
|
|
203
|
+
placeholder,
|
|
204
|
+
readOnly: locked,
|
|
205
|
+
ref: mergedRef,
|
|
206
|
+
role: "combobox",
|
|
207
|
+
type: "text",
|
|
208
|
+
value: text ?? currentLabel
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ jsx("button", {
|
|
211
|
+
"aria-controls": listboxId,
|
|
212
|
+
"aria-expanded": expanded,
|
|
213
|
+
"aria-label": messages.comboboxToggle,
|
|
214
|
+
className: combobox_module_default.toggle,
|
|
215
|
+
disabled: disabled || locked,
|
|
216
|
+
onClick: () => {
|
|
217
|
+
inputRef.current?.focus();
|
|
218
|
+
if (expanded) {
|
|
219
|
+
close();
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
open(selectedIndex === -1 ? void 0 : selectedIndex);
|
|
223
|
+
},
|
|
224
|
+
onMouseDown: (event) => {
|
|
225
|
+
event.preventDefault();
|
|
226
|
+
},
|
|
227
|
+
tabIndex: -1,
|
|
228
|
+
type: "button",
|
|
229
|
+
children: /* @__PURE__ */ jsx(ChevronIcon, {
|
|
230
|
+
direction: expanded ? "up" : "down",
|
|
231
|
+
size: "sm"
|
|
232
|
+
})
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ jsx("span", {
|
|
235
|
+
className: sr_only_module_default.srOnly,
|
|
236
|
+
role: "status",
|
|
237
|
+
children: expanded ? status : null
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ jsxs("div", {
|
|
240
|
+
className: clsx(combobox_module_default.popup, !expanded && combobox_module_default.collapsed),
|
|
241
|
+
onMouseDown: (event) => {
|
|
242
|
+
event.preventDefault();
|
|
243
|
+
},
|
|
244
|
+
role: "presentation",
|
|
245
|
+
style: listStyle,
|
|
246
|
+
children: [status === null ? null : /* @__PURE__ */ jsx("p", {
|
|
247
|
+
className: combobox_module_default.status,
|
|
248
|
+
children: status
|
|
249
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
250
|
+
"aria-busy": isSearching || void 0,
|
|
251
|
+
className: clsx(combobox_module_default.list, isSearching && combobox_module_default.searching),
|
|
252
|
+
hidden: candidates.length === 0,
|
|
253
|
+
id: listboxId,
|
|
254
|
+
role: "listbox",
|
|
255
|
+
children: candidates.map((option, index) => {
|
|
256
|
+
const selected = option.value === current;
|
|
257
|
+
return /* @__PURE__ */ jsx("li", {
|
|
258
|
+
"aria-selected": selected,
|
|
259
|
+
className: clsx(combobox_module_default.option, selected && combobox_module_default.selected, active === index && combobox_module_default.active),
|
|
260
|
+
id: `${baseId}-option-${String(index)}`,
|
|
261
|
+
onClick: () => {
|
|
262
|
+
choose(option);
|
|
263
|
+
},
|
|
264
|
+
onMouseEnter: () => {
|
|
265
|
+
setActiveIndex(index);
|
|
266
|
+
},
|
|
267
|
+
ref: active === index ? scrollIntoView : void 0,
|
|
268
|
+
role: "option",
|
|
269
|
+
children: option.label
|
|
270
|
+
}, option.value);
|
|
271
|
+
})
|
|
272
|
+
})]
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
//#endregion
|
|
278
|
+
export { Combobox };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './combobox.css';
|
|
2
|
+
//#region src/components/form/combobox/combobox.module.css
|
|
3
|
+
var combobox_module_default = {
|
|
4
|
+
"active": "-dBzoa_active",
|
|
5
|
+
"collapsed": "-dBzoa_collapsed",
|
|
6
|
+
"disabled": "-dBzoa_disabled",
|
|
7
|
+
"input": "-dBzoa_input",
|
|
8
|
+
"list": "-dBzoa_list",
|
|
9
|
+
"option": "-dBzoa_option",
|
|
10
|
+
"popup": "-dBzoa_popup",
|
|
11
|
+
"readOnly": "-dBzoa_readOnly",
|
|
12
|
+
"root": "-dBzoa_root",
|
|
13
|
+
"searching": "-dBzoa_searching",
|
|
14
|
+
"selected": "-dBzoa_selected",
|
|
15
|
+
"status": "-dBzoa_status",
|
|
16
|
+
"toggle": "-dBzoa_toggle"
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { combobox_module_default as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
._pBLbq_root {
|
|
5
|
+
border-radius: var(--radius-xl);
|
|
6
|
+
border-width: 1px;
|
|
7
|
+
border-color: var(--color-border-base);
|
|
8
|
+
background-color: var(--color-bg-base);
|
|
9
|
+
inline-size: 100%;
|
|
10
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
11
|
+
padding-block: calc(var(--spacing) * 2);
|
|
12
|
+
font-variant-numeric: tabular-nums;
|
|
13
|
+
|
|
14
|
+
&:read-only {
|
|
15
|
+
cursor: not-allowed;
|
|
16
|
+
background-color: var(--color-bg-subtle);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:disabled {
|
|
20
|
+
cursor: not-allowed;
|
|
21
|
+
border-color: var(--color-border-mute);
|
|
22
|
+
background-color: var(--color-bg-mute);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[aria-invalid="true"], &[aria-invalid="true"]:focus-visible {
|
|
26
|
+
border-color: var(--color-border-error);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@layer utilities;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, InputHTMLAttributes, Ref } from "react";
|
|
2
|
+
//#region src/components/form/date-field/date-field.d.ts
|
|
3
|
+
type Props = {
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
ref?: Ref<HTMLInputElement>;
|
|
6
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style' | 'type' | 'children'>;
|
|
7
|
+
export declare const DateField: FC<Props>;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
3
|
+
import date_field_module_default from "./date-field.module.mjs";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { useFormStatus } from "react-dom";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/form/date-field/date-field.tsx
|
|
8
|
+
const DateField = ({ invalid = false, readOnly, ref, ...rest }) => {
|
|
9
|
+
const { pending } = useFormStatus();
|
|
10
|
+
return /* @__PURE__ */ jsx("input", {
|
|
11
|
+
"aria-invalid": invalid,
|
|
12
|
+
className: clsx(date_field_module_default.root, focus_ring_module_default.ring),
|
|
13
|
+
readOnly: pending || readOnly,
|
|
14
|
+
ref,
|
|
15
|
+
...rest,
|
|
16
|
+
type: "date"
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { DateField };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.VmF9ya_root {
|
|
5
|
+
border-radius: var(--radius-xl);
|
|
6
|
+
border-width: 1px;
|
|
7
|
+
border-color: var(--color-border-base);
|
|
8
|
+
background-color: var(--color-bg-base);
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.VmF9ya_invalid {
|
|
16
|
+
border-color: var(--color-border-error);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.VmF9ya_disabled {
|
|
20
|
+
cursor: not-allowed;
|
|
21
|
+
border-color: var(--color-border-mute);
|
|
22
|
+
background-color: var(--color-bg-mute);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.VmF9ya_readOnly {
|
|
26
|
+
background-color: var(--color-bg-subtle);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.VmF9ya_input {
|
|
30
|
+
width: 100%;
|
|
31
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
32
|
+
padding-block: calc(var(--spacing) * 2);
|
|
33
|
+
font-variant-numeric: tabular-nums;
|
|
34
|
+
background-color: #0000;
|
|
35
|
+
flex-grow: 1;
|
|
36
|
+
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
outline-style: none;
|
|
39
|
+
|
|
40
|
+
@media (forced-colors: active) {
|
|
41
|
+
outline-offset: 2px;
|
|
42
|
+
outline: 2px solid #0000;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:read-only, &:disabled {
|
|
47
|
+
cursor: not-allowed;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::-webkit-calendar-picker-indicator {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.VmF9ya_trigger {
|
|
56
|
+
border-radius: var(--radius-md);
|
|
57
|
+
padding: calc(var(--spacing) * 1);
|
|
58
|
+
color: var(--color-fg-mute);
|
|
59
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
60
|
+
transition-duration: var(--duration-fast);
|
|
61
|
+
transition-timing-function: var(--easing-out);
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
margin-inline-end: calc(var(--spacing) * 2);
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (hover: hover) {
|
|
70
|
+
.VmF9ya_trigger:not(.VmF9ya_locked):hover {
|
|
71
|
+
background-color: var(--color-bg-mute);
|
|
72
|
+
color: var(--color-fg-base);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.VmF9ya_locked {
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.VmF9ya_dialog {
|
|
81
|
+
border-radius: var(--radius-xl);
|
|
82
|
+
border-width: 1px;
|
|
83
|
+
border-color: var(--color-border-subtle);
|
|
84
|
+
background-color: var(--color-bg-raised);
|
|
85
|
+
padding: calc(var(--spacing) * 3);
|
|
86
|
+
box-shadow: var(--shadow-md);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@layer utilities;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, InputHTMLAttributes, Ref } from "react";
|
|
2
|
+
//#region src/components/form/date-picker/date-picker.d.ts
|
|
3
|
+
type Props = {
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
/** `YYYY-MM-DD`。未入力は `''`。 */
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
ref?: Ref<HTMLInputElement>;
|
|
10
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'children'>;
|
|
11
|
+
export declare const DatePicker: FC<Props>;
|
|
12
|
+
//#endregion
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
3
|
+
import { mergeRefs } from "../../../helpers/merge-refs.mjs";
|
|
4
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
5
|
+
import { PublishDateIcon } from "../../icons/lucide.mjs";
|
|
6
|
+
import { Popover } from "../../overlays/popover/index.mjs";
|
|
7
|
+
import { Calendar } from "../calendar/calendar.mjs";
|
|
8
|
+
import { commitInputValue } from "../../../internal/commit-input-value.mjs";
|
|
9
|
+
import date_picker_module_default from "./date-picker.module.mjs";
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { useMemo, useRef, useState } from "react";
|
|
12
|
+
import { useFormStatus } from "react-dom";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
//#region src/components/form/date-picker/date-picker.tsx
|
|
15
|
+
const asDate = (bound) => bound === void 0 ? void 0 : String(bound);
|
|
16
|
+
const DatePicker = ({ invalid = false, value, defaultValue, onChange, disabled = false, readOnly = false, min, max, ref, ...rest }) => {
|
|
17
|
+
const messages = getMessages();
|
|
18
|
+
const { pending } = useFormStatus();
|
|
19
|
+
const inputRef = useRef(null);
|
|
20
|
+
const mergedRef = useMemo(() => mergeRefs(inputRef, ref), [ref]);
|
|
21
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
22
|
+
const [openedWith, setOpenedWith] = useState("");
|
|
23
|
+
const locked = disabled || readOnly || pending;
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: clsx(date_picker_module_default.root, invalid && date_picker_module_default.invalid, (disabled || pending) && date_picker_module_default.disabled, readOnly && date_picker_module_default.readOnly, focus_ring_module_default.ringWithin),
|
|
26
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
27
|
+
"aria-invalid": invalid,
|
|
28
|
+
className: date_picker_module_default.input,
|
|
29
|
+
defaultValue,
|
|
30
|
+
disabled,
|
|
31
|
+
max,
|
|
32
|
+
min,
|
|
33
|
+
onChange: (event) => {
|
|
34
|
+
onChange?.(event.target.value);
|
|
35
|
+
},
|
|
36
|
+
readOnly: pending || readOnly,
|
|
37
|
+
ref: mergedRef,
|
|
38
|
+
value,
|
|
39
|
+
...rest,
|
|
40
|
+
type: "date"
|
|
41
|
+
}), /* @__PURE__ */ jsxs(Popover.Root, {
|
|
42
|
+
isOpen,
|
|
43
|
+
onChange: (next) => {
|
|
44
|
+
if (next) setOpenedWith(inputRef.current?.value ?? "");
|
|
45
|
+
setIsOpen(next);
|
|
46
|
+
},
|
|
47
|
+
placement: "bottom-end",
|
|
48
|
+
role: "dialog",
|
|
49
|
+
children: [/* @__PURE__ */ jsx(Popover.Trigger, { renderItem: (props) => /* @__PURE__ */ jsx("button", {
|
|
50
|
+
...props,
|
|
51
|
+
"aria-label": messages.datePickerOpen,
|
|
52
|
+
className: clsx(date_picker_module_default.trigger, focus_ring_module_default.ringNoBorder, locked && date_picker_module_default.locked),
|
|
53
|
+
disabled: locked,
|
|
54
|
+
type: "button",
|
|
55
|
+
children: /* @__PURE__ */ jsx(PublishDateIcon, { size: "sm" })
|
|
56
|
+
}) }), /* @__PURE__ */ jsx(Popover.Content, { renderItem: ({ ref: contentRef, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
57
|
+
...props,
|
|
58
|
+
"aria-label": messages.datePickerDialog,
|
|
59
|
+
className: date_picker_module_default.dialog,
|
|
60
|
+
ref: contentRef,
|
|
61
|
+
children: isOpen ? /* @__PURE__ */ jsx(Calendar, {
|
|
62
|
+
defaultValue: openedWith,
|
|
63
|
+
max: asDate(max),
|
|
64
|
+
min: asDate(min),
|
|
65
|
+
onChange: (next) => {
|
|
66
|
+
const input = inputRef.current;
|
|
67
|
+
if (input !== null) commitInputValue(input, next);
|
|
68
|
+
onChange?.(next);
|
|
69
|
+
setIsOpen(false);
|
|
70
|
+
}
|
|
71
|
+
}) : null
|
|
72
|
+
}) })]
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
export { DatePicker };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
//#region src/components/form/date-picker/date-picker.module.css
|
|
3
|
+
var date_picker_module_default = {
|
|
4
|
+
"dialog": "VmF9ya_dialog",
|
|
5
|
+
"disabled": "VmF9ya_disabled",
|
|
6
|
+
"input": "VmF9ya_input",
|
|
7
|
+
"invalid": "VmF9ya_invalid",
|
|
8
|
+
"locked": "VmF9ya_locked",
|
|
9
|
+
"readOnly": "VmF9ya_readOnly",
|
|
10
|
+
"root": "VmF9ya_root",
|
|
11
|
+
"trigger": "VmF9ya_trigger"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { date_picker_module_default as default };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.PPBdPq_root {
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.PPBdPq_dropzone {
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: calc(var(--spacing) * 3);
|
|
12
|
+
border-radius: var(--radius-xl);
|
|
13
|
+
border-style: dashed;
|
|
14
|
+
border-width: 2px;
|
|
15
|
+
border-color: var(--color-border-base);
|
|
16
|
+
background-color: var(--color-bg-base);
|
|
17
|
+
width: 100%;
|
|
18
|
+
padding: calc(var(--spacing) * 6);
|
|
19
|
+
text-align: center;
|
|
20
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
21
|
+
transition-duration: var(--duration-fast);
|
|
22
|
+
transition-timing-function: var(--easing-out);
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
display: flex;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.PPBdPq_invalid {
|
|
28
|
+
border-color: var(--color-border-error);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.PPBdPq_dragging {
|
|
32
|
+
border-color: var(--color-primary-border);
|
|
33
|
+
background-color: var(--color-primary-bg-subtle);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.PPBdPq_disabled {
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
border-color: var(--color-border-mute);
|
|
39
|
+
background-color: var(--color-bg-mute);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.PPBdPq_hint {
|
|
43
|
+
font-size: var(--font-size-sm);
|
|
44
|
+
line-height: var(--line-height-sm);
|
|
45
|
+
color: var(--color-fg-mute);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.PPBdPq_list {
|
|
49
|
+
margin-top: calc(var(--spacing) * 2);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.PPBdPq_item {
|
|
53
|
+
border-radius: var(--radius-xl);
|
|
54
|
+
border-width: 1px;
|
|
55
|
+
border-color: var(--color-border-base);
|
|
56
|
+
background-color: var(--color-bg-base);
|
|
57
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
58
|
+
padding-block: calc(var(--spacing) * 2);
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
align-items: center;
|
|
61
|
+
display: flex;
|
|
62
|
+
|
|
63
|
+
&:not(:last-child) {
|
|
64
|
+
margin-block-end: calc(var(--spacing) * 2);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.PPBdPq_meta {
|
|
69
|
+
gap: calc(var(--spacing) * 1);
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.PPBdPq_name {
|
|
75
|
+
font-size: var(--font-size-sm);
|
|
76
|
+
line-height: var(--line-height-sm);
|
|
77
|
+
font-weight: var(--font-weight-medium);
|
|
78
|
+
color: var(--color-fg-base);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.PPBdPq_size {
|
|
82
|
+
font-size: var(--font-size-xs);
|
|
83
|
+
line-height: var(--line-height-xs);
|
|
84
|
+
color: var(--color-fg-mute);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@layer utilities;
|