@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
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { cn } from "../../../helpers/cn.mjs";
|
|
2
1
|
import { GAP_CLASS } from "../_shared/gap.mjs";
|
|
2
|
+
import grid_module_default from "./grid.module.mjs";
|
|
3
|
+
import { clsx } from "clsx";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/layout/grid/grid.tsx
|
|
5
6
|
const COLS_CLASS = {
|
|
6
|
-
1:
|
|
7
|
-
2:
|
|
8
|
-
3:
|
|
9
|
-
4:
|
|
10
|
-
5:
|
|
11
|
-
6:
|
|
7
|
+
1: grid_module_default.cols1,
|
|
8
|
+
2: grid_module_default.cols2,
|
|
9
|
+
3: grid_module_default.cols3,
|
|
10
|
+
4: grid_module_default.cols4,
|
|
11
|
+
5: grid_module_default.cols5,
|
|
12
|
+
6: grid_module_default.cols6
|
|
12
13
|
};
|
|
13
14
|
const AUTO_FILL_CLASS = {
|
|
14
|
-
24:
|
|
15
|
-
32:
|
|
16
|
-
40:
|
|
17
|
-
48:
|
|
18
|
-
64:
|
|
19
|
-
80:
|
|
15
|
+
24: grid_module_default.autoFill24,
|
|
16
|
+
32: grid_module_default.autoFill32,
|
|
17
|
+
40: grid_module_default.autoFill40,
|
|
18
|
+
48: grid_module_default.autoFill48,
|
|
19
|
+
64: grid_module_default.autoFill64,
|
|
20
|
+
80: grid_module_default.autoFill80
|
|
20
21
|
};
|
|
21
22
|
const AUTO_FIT_CLASS = {
|
|
22
|
-
24:
|
|
23
|
-
32:
|
|
24
|
-
40:
|
|
25
|
-
48:
|
|
26
|
-
64:
|
|
27
|
-
80:
|
|
23
|
+
24: grid_module_default.autoFit24,
|
|
24
|
+
32: grid_module_default.autoFit32,
|
|
25
|
+
40: grid_module_default.autoFit40,
|
|
26
|
+
48: grid_module_default.autoFit48,
|
|
27
|
+
64: grid_module_default.autoFit64,
|
|
28
|
+
80: grid_module_default.autoFit80
|
|
28
29
|
};
|
|
29
30
|
const Grid = ({ cols = "auto-fill", minItemSize = 48, gap = "md", children, ...rest }) => /* @__PURE__ */ jsx("div", {
|
|
30
31
|
...rest,
|
|
31
|
-
className:
|
|
32
|
+
className: clsx(grid_module_default.root, GAP_CLASS[gap], typeof cols === "number" ? COLS_CLASS[cols] : cols === "auto-fill" ? AUTO_FILL_CLASS[minItemSize] : AUTO_FIT_CLASS[minItemSize]),
|
|
32
33
|
children
|
|
33
34
|
});
|
|
34
35
|
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './grid.css';
|
|
2
|
+
//#region src/components/layout/grid/grid.module.css
|
|
3
|
+
var grid_module_default = {
|
|
4
|
+
"autoFill24": "_23gUBq_autoFill24",
|
|
5
|
+
"autoFill32": "_23gUBq_autoFill32",
|
|
6
|
+
"autoFill40": "_23gUBq_autoFill40",
|
|
7
|
+
"autoFill48": "_23gUBq_autoFill48",
|
|
8
|
+
"autoFill64": "_23gUBq_autoFill64",
|
|
9
|
+
"autoFill80": "_23gUBq_autoFill80",
|
|
10
|
+
"autoFit24": "_23gUBq_autoFit24",
|
|
11
|
+
"autoFit32": "_23gUBq_autoFit32",
|
|
12
|
+
"autoFit40": "_23gUBq_autoFit40",
|
|
13
|
+
"autoFit48": "_23gUBq_autoFit48",
|
|
14
|
+
"autoFit64": "_23gUBq_autoFit64",
|
|
15
|
+
"autoFit80": "_23gUBq_autoFit80",
|
|
16
|
+
"cols1": "_23gUBq_cols1",
|
|
17
|
+
"cols2": "_23gUBq_cols2",
|
|
18
|
+
"cols3": "_23gUBq_cols3",
|
|
19
|
+
"cols4": "_23gUBq_cols4",
|
|
20
|
+
"cols5": "_23gUBq_cols5",
|
|
21
|
+
"cols6": "_23gUBq_cols6",
|
|
22
|
+
"root": "_23gUBq_root"
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { grid_module_default as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/components/layout/resizable-panels/index.d.ts
|
|
2
|
+
export declare const ResizablePanels: {
|
|
3
|
+
readonly Root: import("react").FC<{
|
|
4
|
+
orientation?: "horizontal" | "vertical";
|
|
5
|
+
value?: number;
|
|
6
|
+
defaultValue?: number;
|
|
7
|
+
onChange?: (value: number) => void;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
step?: number;
|
|
11
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
12
|
+
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "className" | "defaultValue" | "onChange" | "style">>;
|
|
13
|
+
readonly Panel: import("react").FC<{
|
|
14
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
15
|
+
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "className" | "style">>;
|
|
16
|
+
readonly Handle: import("react").FC<Omit<import("react").HTMLAttributes<HTMLDivElement>, "aria-controls" | "aria-orientation" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "children" | "className" | "role" | "style" | "tabIndex">>;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.TQAbeG_root {
|
|
5
|
+
block-size: 100%;
|
|
6
|
+
inline-size: 100%;
|
|
7
|
+
display: grid;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.TQAbeG_horizontal {
|
|
11
|
+
grid-template-columns: var(--panels-size) auto minmax(0, 1fr);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.TQAbeG_vertical {
|
|
15
|
+
grid-template-rows: var(--panels-size) auto minmax(0, 1fr);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.TQAbeG_panel {
|
|
19
|
+
min-block-size: 0;
|
|
20
|
+
min-inline-size: 0;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.TQAbeG_handle {
|
|
25
|
+
touch-action: none;
|
|
26
|
+
border-radius: var(--radius-full);
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.TQAbeG_handleX {
|
|
33
|
+
cursor: col-resize;
|
|
34
|
+
width: calc(var(--spacing) * 3);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.TQAbeG_handleY {
|
|
38
|
+
cursor: row-resize;
|
|
39
|
+
height: calc(var(--spacing) * 3);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.TQAbeG_line {
|
|
43
|
+
border-radius: var(--radius-full);
|
|
44
|
+
background-color: var(--color-border-base);
|
|
45
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
46
|
+
transition-duration: var(--duration-fast);
|
|
47
|
+
transition-timing-function: var(--easing-out);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.TQAbeG_lineX {
|
|
51
|
+
width: 1px;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.TQAbeG_lineY {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 1px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (hover: hover) {
|
|
61
|
+
:where(.TQAbeG_handle:hover) .TQAbeG_line {
|
|
62
|
+
background-color: var(--color-border-emphasize);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(.TQAbeG_handle[data-dragging]) .TQAbeG_line {
|
|
67
|
+
background-color: var(--color-primary-border);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (forced-colors: active) {
|
|
71
|
+
.TQAbeG_line {
|
|
72
|
+
background-color: var(--color-system-canvas-text);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@layer utilities;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, Ref } from "react";
|
|
2
|
+
//#region src/components/layout/resizable-panels/resizable-panels.d.ts
|
|
3
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
4
|
+
export declare const Root: FC<{
|
|
5
|
+
/** 2 枚を並べる向き。`horizontal` は書字方向の行に沿って並べる。 */
|
|
6
|
+
orientation?: Orientation;
|
|
7
|
+
/** 1 枚目が占める割合(%)。 */
|
|
8
|
+
value?: number;
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
onChange?: (value: number) => void;
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
/** 矢印キー 1 回で動く割合(%)。 */
|
|
14
|
+
step?: number;
|
|
15
|
+
ref?: Ref<HTMLDivElement>;
|
|
16
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'defaultValue' | 'onChange'>>;
|
|
17
|
+
export declare const Panel: FC<{
|
|
18
|
+
ref?: Ref<HTMLDivElement>;
|
|
19
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>>;
|
|
20
|
+
export declare const Handle: FC<Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'role' | 'children' | 'tabIndex' | 'aria-orientation' | 'aria-valuenow' | 'aria-valuemin' | 'aria-valuemax' | 'aria-controls'>>;
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1,164 @@
|
|
|
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 { createSafeContext } from "../../../helpers/create-safe-context.mjs";
|
|
6
|
+
import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
|
|
7
|
+
import { useWritingMode } from "../../../hooks/writing-mode/index.mjs";
|
|
8
|
+
import resizable_panels_module_default from "./resizable-panels.module.mjs";
|
|
9
|
+
import { clsx } from "clsx";
|
|
10
|
+
import { useCallback, useId, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/layout/resizable-panels/resizable-panels.tsx
|
|
13
|
+
const [PanelsProvider, usePanels] = createSafeContext("usePanels must be used within a ResizablePanels.Root");
|
|
14
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
15
|
+
/**
|
|
16
|
+
* 1 枚目が根のどちらの端に付いているかを、描かれた箱から読む。
|
|
17
|
+
* 書字方向(縦書き、右から左)ごとに分けて考えるより確か。
|
|
18
|
+
*/
|
|
19
|
+
const measure = (root, axis) => {
|
|
20
|
+
const box = root.getBoundingClientRect();
|
|
21
|
+
const first = root.firstElementChild?.getBoundingClientRect() ?? box;
|
|
22
|
+
return axis === "x" ? {
|
|
23
|
+
length: box.width,
|
|
24
|
+
fromEnd: first.left - box.left > box.right - first.right,
|
|
25
|
+
start: box.left,
|
|
26
|
+
end: box.right
|
|
27
|
+
} : {
|
|
28
|
+
length: box.height,
|
|
29
|
+
fromEnd: first.top - box.top > box.bottom - first.bottom,
|
|
30
|
+
start: box.top,
|
|
31
|
+
end: box.bottom
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const Root = ({ orientation = "horizontal", value, defaultValue = 50, onChange, min = 10, max = 90, step = 5, children, ref, ...rest }) => {
|
|
35
|
+
const [root, setRoot] = useState(null);
|
|
36
|
+
const [primaryId, setPrimaryId] = useState(null);
|
|
37
|
+
const mergedRef = useMemo(() => mergeRefs(setRoot, ref), [ref]);
|
|
38
|
+
const [size, setSize] = useControllableState({
|
|
39
|
+
value,
|
|
40
|
+
defaultValue,
|
|
41
|
+
onChange
|
|
42
|
+
});
|
|
43
|
+
const visualOrientation = useWritingMode(root) === "vertical" ? orientation === "horizontal" ? "vertical" : "horizontal" : orientation;
|
|
44
|
+
const clamped = clamp(size, min, max);
|
|
45
|
+
return /* @__PURE__ */ jsx(PanelsProvider, {
|
|
46
|
+
value: {
|
|
47
|
+
size: clamped,
|
|
48
|
+
resize: (next) => {
|
|
49
|
+
setSize(clamp(next, min, max));
|
|
50
|
+
},
|
|
51
|
+
min,
|
|
52
|
+
max,
|
|
53
|
+
step,
|
|
54
|
+
visualOrientation,
|
|
55
|
+
primaryId,
|
|
56
|
+
setPrimaryId,
|
|
57
|
+
root
|
|
58
|
+
},
|
|
59
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
60
|
+
...rest,
|
|
61
|
+
className: clsx(resizable_panels_module_default.root, orientation === "horizontal" ? resizable_panels_module_default.horizontal : resizable_panels_module_default.vertical),
|
|
62
|
+
ref: mergedRef,
|
|
63
|
+
style: { "--panels-size": `${String(clamped)}%` },
|
|
64
|
+
children
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const Panel = ({ id, ref, ...rest }) => {
|
|
69
|
+
const generatedId = useId();
|
|
70
|
+
const panelId = id ?? generatedId;
|
|
71
|
+
const { setPrimaryId } = usePanels();
|
|
72
|
+
const claimPrimary = useCallback((node) => {
|
|
73
|
+
if (node?.previousElementSibling !== null) return;
|
|
74
|
+
setPrimaryId(panelId);
|
|
75
|
+
return () => {
|
|
76
|
+
setPrimaryId((current) => current === panelId ? null : current);
|
|
77
|
+
};
|
|
78
|
+
}, [panelId, setPrimaryId]);
|
|
79
|
+
const mergedRef = useMemo(() => mergeRefs(claimPrimary, ref), [claimPrimary, ref]);
|
|
80
|
+
return /* @__PURE__ */ jsx("div", {
|
|
81
|
+
...rest,
|
|
82
|
+
className: resizable_panels_module_default.panel,
|
|
83
|
+
id: panelId,
|
|
84
|
+
ref: mergedRef
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const Handle = ({ "aria-label": ariaLabel, onKeyDown, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ...rest }) => {
|
|
88
|
+
const { size, resize, min, max, step, visualOrientation, primaryId, root } = usePanels();
|
|
89
|
+
const grabRef = useRef(null);
|
|
90
|
+
const [dragging, setDragging] = useState(false);
|
|
91
|
+
const axis = visualOrientation === "horizontal" ? "x" : "y";
|
|
92
|
+
const release = () => {
|
|
93
|
+
grabRef.current = null;
|
|
94
|
+
setDragging(false);
|
|
95
|
+
};
|
|
96
|
+
const handleKeyDown = (event) => {
|
|
97
|
+
onKeyDown?.(event);
|
|
98
|
+
if (event.defaultPrevented || root === null) return;
|
|
99
|
+
const sign = measure(root, axis).fromEnd ? -1 : 1;
|
|
100
|
+
const [decrease, increase] = axis === "x" ? ["ArrowLeft", "ArrowRight"] : ["ArrowUp", "ArrowDown"];
|
|
101
|
+
const next = {
|
|
102
|
+
[decrease]: size - step * sign,
|
|
103
|
+
[increase]: size + step * sign,
|
|
104
|
+
Home: min,
|
|
105
|
+
End: max
|
|
106
|
+
}[event.key];
|
|
107
|
+
if (next === void 0) return;
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
resize(next);
|
|
110
|
+
};
|
|
111
|
+
const distance = (event) => {
|
|
112
|
+
if (root === null) return null;
|
|
113
|
+
const layout = measure(root, axis);
|
|
114
|
+
const point = axis === "x" ? event.clientX : event.clientY;
|
|
115
|
+
return {
|
|
116
|
+
...layout,
|
|
117
|
+
reach: layout.fromEnd ? layout.end - point : point - layout.start
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
return /* @__PURE__ */ jsx("div", {
|
|
121
|
+
...rest,
|
|
122
|
+
"aria-controls": primaryId ?? void 0,
|
|
123
|
+
"aria-label": ariaLabel ?? (rest["aria-labelledby"] === void 0 ? getMessages().resizablePanelsHandle : void 0),
|
|
124
|
+
"aria-orientation": axis === "x" ? "vertical" : "horizontal",
|
|
125
|
+
"aria-valuemax": max,
|
|
126
|
+
"aria-valuemin": min,
|
|
127
|
+
"aria-valuenow": Math.round(size),
|
|
128
|
+
className: clsx(resizable_panels_module_default.handle, axis === "x" ? resizable_panels_module_default.handleX : resizable_panels_module_default.handleY, focus_ring_module_default.ringNoBorder),
|
|
129
|
+
"data-dragging": dragging ? "" : void 0,
|
|
130
|
+
onKeyDown: handleKeyDown,
|
|
131
|
+
onPointerDown: (event) => {
|
|
132
|
+
onPointerDown?.(event);
|
|
133
|
+
if (event.defaultPrevented || event.button !== 0) return;
|
|
134
|
+
const current = distance(event);
|
|
135
|
+
if (current === null) return;
|
|
136
|
+
grabRef.current = current.reach - size / 100 * current.length;
|
|
137
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
138
|
+
setDragging(true);
|
|
139
|
+
},
|
|
140
|
+
onPointerMove: (event) => {
|
|
141
|
+
onPointerMove?.(event);
|
|
142
|
+
const grab = grabRef.current;
|
|
143
|
+
const current = grab === null ? null : distance(event);
|
|
144
|
+
if (grab === null || current === null) return;
|
|
145
|
+
resize((current.reach - grab) / current.length * 100);
|
|
146
|
+
},
|
|
147
|
+
onPointerCancel: (event) => {
|
|
148
|
+
onPointerCancel?.(event);
|
|
149
|
+
release();
|
|
150
|
+
},
|
|
151
|
+
onPointerUp: (event) => {
|
|
152
|
+
onPointerUp?.(event);
|
|
153
|
+
release();
|
|
154
|
+
},
|
|
155
|
+
role: "separator",
|
|
156
|
+
tabIndex: 0,
|
|
157
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
158
|
+
"aria-hidden": true,
|
|
159
|
+
className: clsx(resizable_panels_module_default.line, axis === "x" ? resizable_panels_module_default.lineX : resizable_panels_module_default.lineY)
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
export { Handle, Panel, Root };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './resizable-panels.css';
|
|
2
|
+
//#region src/components/layout/resizable-panels/resizable-panels.module.css
|
|
3
|
+
var resizable_panels_module_default = {
|
|
4
|
+
"handle": "TQAbeG_handle",
|
|
5
|
+
"handleX": "TQAbeG_handleX",
|
|
6
|
+
"handleY": "TQAbeG_handleY",
|
|
7
|
+
"horizontal": "TQAbeG_horizontal",
|
|
8
|
+
"line": "TQAbeG_line",
|
|
9
|
+
"lineX": "TQAbeG_lineX",
|
|
10
|
+
"lineY": "TQAbeG_lineY",
|
|
11
|
+
"panel": "TQAbeG_panel",
|
|
12
|
+
"root": "TQAbeG_root",
|
|
13
|
+
"vertical": "TQAbeG_vertical"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { resizable_panels_module_default as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.qQ-3Zq_root {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.qQ-3Zq_horizontal {
|
|
9
|
+
block-size: 1px;
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.qQ-3Zq_vertical {
|
|
14
|
+
block-size: 100%;
|
|
15
|
+
inline-size: 1px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.qQ-3Zq_base {
|
|
19
|
+
background-color: var(--color-border-base);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.qQ-3Zq_mute {
|
|
23
|
+
background-color: var(--color-border-mute);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.qQ-3Zq_subtle {
|
|
27
|
+
background-color: var(--color-border-subtle);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (forced-colors: active) {
|
|
31
|
+
.qQ-3Zq_root {
|
|
32
|
+
background-color: var(--color-system-canvas-text);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@layer utilities;
|
|
@@ -4,6 +4,5 @@ type Props = {
|
|
|
4
4
|
orientation?: 'horizontal' | 'vertical';
|
|
5
5
|
color?: 'base' | 'mute' | 'subtle';
|
|
6
6
|
} & Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'role' | 'aria-orientation' | 'className' | 'style'>;
|
|
7
|
-
declare const Separator: FC<Props>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { Separator };
|
|
7
|
+
export declare const Separator: FC<Props>;
|
|
8
|
+
//#endregion
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import separator_module_default from "./separator.module.mjs";
|
|
2
|
+
import { clsx } from "clsx";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/layout/separator/separator.tsx
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"aria-orientation": orientation,
|
|
9
|
-
className: cn("block", isVertical ? "block-full inline-px" : "block-px inline-full", color === "base" && "bg-border-base", color === "mute" && "bg-border-mute", color === "subtle" && "bg-border-subtle"),
|
|
10
|
-
role: "separator"
|
|
11
|
-
});
|
|
5
|
+
const COLOR = {
|
|
6
|
+
base: separator_module_default.base,
|
|
7
|
+
mute: separator_module_default.mute,
|
|
8
|
+
subtle: separator_module_default.subtle
|
|
12
9
|
};
|
|
10
|
+
const Separator = ({ orientation = "horizontal", color = "base", ...rest }) => /* @__PURE__ */ jsx("span", {
|
|
11
|
+
...rest,
|
|
12
|
+
"aria-orientation": orientation,
|
|
13
|
+
className: clsx(separator_module_default.root, orientation === "vertical" ? separator_module_default.vertical : separator_module_default.horizontal, COLOR[color]),
|
|
14
|
+
role: "separator"
|
|
15
|
+
});
|
|
13
16
|
//#endregion
|
|
14
17
|
export { Separator };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './separator.css';
|
|
2
|
+
//#region src/components/layout/separator/separator.module.css
|
|
3
|
+
var separator_module_default = {
|
|
4
|
+
"base": "qQ-3Zq_base",
|
|
5
|
+
"horizontal": "qQ-3Zq_horizontal",
|
|
6
|
+
"mute": "qQ-3Zq_mute",
|
|
7
|
+
"root": "qQ-3Zq_root",
|
|
8
|
+
"subtle": "qQ-3Zq_subtle",
|
|
9
|
+
"vertical": "qQ-3Zq_vertical"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { separator_module_default as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.xGsfrG_root {
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.xGsfrG_row {
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.xGsfrG_column {
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.xGsfrG_alignStart {
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.xGsfrG_alignCenter {
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.xGsfrG_alignEnd {
|
|
25
|
+
align-items: flex-end;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.xGsfrG_alignStretch {
|
|
29
|
+
align-items: stretch;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.xGsfrG_justifyStart {
|
|
33
|
+
justify-content: flex-start;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.xGsfrG_justifyCenter {
|
|
37
|
+
justify-content: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.xGsfrG_justifyEnd {
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.xGsfrG_justifyBetween {
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@layer utilities;
|
|
@@ -2,7 +2,7 @@ import { GapSize } from "../_shared/gap.mjs";
|
|
|
2
2
|
import { PaddingSize } from "../_shared/padding.mjs";
|
|
3
3
|
import { FC, HTMLAttributes, PropsWithChildren } from "react";
|
|
4
4
|
//#region src/components/layout/stack/stack.d.ts
|
|
5
|
-
type StackProps = PropsWithChildren<{
|
|
5
|
+
export type StackProps = PropsWithChildren<{
|
|
6
6
|
direction?: 'row' | 'column';
|
|
7
7
|
gap?: GapSize;
|
|
8
8
|
/** Inner padding on all sides. Stack has no padding by default. */
|
|
@@ -10,6 +10,5 @@ type StackProps = PropsWithChildren<{
|
|
|
10
10
|
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
11
11
|
justify?: 'start' | 'center' | 'end' | 'between';
|
|
12
12
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>>;
|
|
13
|
-
declare const Stack: FC<StackProps>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Stack, StackProps };
|
|
13
|
+
export declare const Stack: FC<StackProps>;
|
|
14
|
+
//#endregion
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { cn } from "../../../helpers/cn.mjs";
|
|
2
1
|
import { GAP_CLASS } from "../_shared/gap.mjs";
|
|
3
2
|
import { PADDING_CLASS } from "../_shared/padding.mjs";
|
|
3
|
+
import stack_module_default from "./stack.module.mjs";
|
|
4
|
+
import { clsx } from "clsx";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/layout/stack/stack.tsx
|
|
6
7
|
const ALIGN_CLASS = {
|
|
7
|
-
start:
|
|
8
|
-
center:
|
|
9
|
-
end:
|
|
10
|
-
stretch:
|
|
8
|
+
start: stack_module_default.alignStart,
|
|
9
|
+
center: stack_module_default.alignCenter,
|
|
10
|
+
end: stack_module_default.alignEnd,
|
|
11
|
+
stretch: stack_module_default.alignStretch
|
|
11
12
|
};
|
|
12
13
|
const JUSTIFY_CLASS = {
|
|
13
|
-
start:
|
|
14
|
-
center:
|
|
15
|
-
end:
|
|
16
|
-
between:
|
|
14
|
+
start: stack_module_default.justifyStart,
|
|
15
|
+
center: stack_module_default.justifyCenter,
|
|
16
|
+
end: stack_module_default.justifyEnd,
|
|
17
|
+
between: stack_module_default.justifyBetween
|
|
17
18
|
};
|
|
18
19
|
const Stack = ({ direction = "column", gap = "md", padding, align, justify, children, ...rest }) => /* @__PURE__ */ jsx("div", {
|
|
19
20
|
...rest,
|
|
20
|
-
className:
|
|
21
|
+
className: clsx(stack_module_default.root, direction === "row" ? stack_module_default.row : stack_module_default.column, GAP_CLASS[gap], padding && PADDING_CLASS[padding], align && ALIGN_CLASS[align], justify && JUSTIFY_CLASS[justify]),
|
|
21
22
|
children
|
|
22
23
|
});
|
|
23
24
|
//#endregion
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './stack.css';
|
|
2
|
+
//#region src/components/layout/stack/stack.module.css
|
|
3
|
+
var stack_module_default = {
|
|
4
|
+
"alignCenter": "xGsfrG_alignCenter",
|
|
5
|
+
"alignEnd": "xGsfrG_alignEnd",
|
|
6
|
+
"alignStart": "xGsfrG_alignStart",
|
|
7
|
+
"alignStretch": "xGsfrG_alignStretch",
|
|
8
|
+
"column": "xGsfrG_column",
|
|
9
|
+
"justifyBetween": "xGsfrG_justifyBetween",
|
|
10
|
+
"justifyCenter": "xGsfrG_justifyCenter",
|
|
11
|
+
"justifyEnd": "xGsfrG_justifyEnd",
|
|
12
|
+
"justifyStart": "xGsfrG_justifyStart",
|
|
13
|
+
"root": "xGsfrG_root",
|
|
14
|
+
"row": "xGsfrG_row"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { stack_module_default as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
._7nx_2W_root {
|
|
5
|
+
color: var(--color-fg-info);
|
|
6
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
7
|
+
transition-duration: var(--duration-fast);
|
|
8
|
+
transition-timing-function: var(--easing-out);
|
|
9
|
+
text-decoration-line: underline;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media (hover: hover) {
|
|
13
|
+
._7nx_2W_root:hover {
|
|
14
|
+
color: var(--color-fg-base);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
._7nx_2W_root:focus-visible {
|
|
19
|
+
border-radius: var(--radius-sm);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
._7nx_2W_external {
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: calc(var(--spacing) * .5);
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@layer utilities;
|
|
@@ -15,6 +15,5 @@ type Props<T extends string> = {
|
|
|
15
15
|
openInNewTab?: boolean;
|
|
16
16
|
renderAnchor?: (props: RenderAnchorProps<T>) => ReactNode;
|
|
17
17
|
} & RestProps;
|
|
18
|
-
declare const Anchor: <T extends string>({ href, children, openInNewTab, renderAnchor, ...rest }: Props<T>) => ReactNode;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { Anchor };
|
|
18
|
+
export declare const Anchor: <T extends string>({ href, children, openInNewTab, renderAnchor, ...rest }: Props<T>) => ReactNode;
|
|
19
|
+
//#endregion
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
1
2
|
import { ExternalLinkIcon } from "../../icons/lucide.mjs";
|
|
3
|
+
import anchor_module_default from "./anchor.module.mjs";
|
|
4
|
+
import { clsx } from "clsx";
|
|
2
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
6
|
//#region src/components/navigation/anchor/anchor.tsx
|
|
4
7
|
const defaultRenderAnchor = ({ children: anchorChildren, ...rest }) => /* @__PURE__ */ jsx("a", {
|
|
@@ -7,12 +10,12 @@ const defaultRenderAnchor = ({ children: anchorChildren, ...rest }) => /* @__PUR
|
|
|
7
10
|
});
|
|
8
11
|
const Anchor = ({ href, children, openInNewTab = false, renderAnchor = defaultRenderAnchor, ...rest }) => {
|
|
9
12
|
const kind = !href.startsWith("http") && !openInNewTab ? "internal" : "external";
|
|
10
|
-
const baseClassName =
|
|
13
|
+
const baseClassName = clsx(anchor_module_default.root, focus_ring_module_default.ringNoBorder);
|
|
11
14
|
const props = kind === "internal" ? {
|
|
12
15
|
className: baseClassName,
|
|
13
16
|
children
|
|
14
17
|
} : {
|
|
15
|
-
className:
|
|
18
|
+
className: clsx(baseClassName, anchor_module_default.external),
|
|
16
19
|
target: "_blank",
|
|
17
20
|
rel: "noopener noreferrer",
|
|
18
21
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [children, /* @__PURE__ */ jsx(ExternalLinkIcon, { size: "sm" })] })
|