@k8ordo/ui 2.0.0 → 2.2.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 +197 -187
- 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 +34 -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 +15 -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 -2
- 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 +8 -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 +15 -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 +4 -4
- package/dist/components/ai/conversation/conversation.mjs +38 -34
- package/dist/components/ai/conversation/conversation.module.mjs +11 -0
- package/dist/components/ai/conversation/index.d.mts +2 -3
- package/dist/components/ai/index.d.mts +4 -2
- package/dist/components/ai/index.mjs +3 -1
- package/dist/components/ai/message/index.d.mts +29 -3
- package/dist/components/ai/message/index.mjs +7 -2
- package/dist/components/ai/message/message.css +71 -0
- package/dist/components/ai/message/message.d.mts +34 -3
- package/dist/components/ai/message/message.mjs +99 -9
- package/dist/components/ai/message/message.module.mjs +18 -0
- package/dist/components/ai/prompt-input/index.d.mts +11 -4
- package/dist/components/ai/prompt-input/index.mjs +3 -1
- package/dist/components/ai/prompt-input/prompt-input.css +101 -0
- package/dist/components/ai/prompt-input/prompt-input.d.mts +15 -5
- package/dist/components/ai/prompt-input/prompt-input.mjs +152 -37
- package/dist/components/ai/prompt-input/prompt-input.module.mjs +15 -0
- package/dist/components/ai/reasoning/index.mjs +1 -2
- package/dist/components/ai/reasoning/reasoning.css +16 -0
- package/dist/components/ai/reasoning/reasoning.d.mts +2 -2
- package/dist/components/ai/reasoning/reasoning.mjs +5 -5
- package/dist/components/ai/reasoning/reasoning.module.mjs +8 -0
- package/dist/components/ai/response/index.mjs +1 -2
- package/dist/components/ai/response/response.css +453 -0
- package/dist/components/ai/response/response.d.mts +4 -5
- 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 +14 -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 +2 -3
- package/dist/components/ai/suggestion/suggestion.css +32 -0
- package/dist/components/ai/suggestion/suggestion.d.mts +3 -3
- package/dist/components/ai/suggestion/suggestion.mjs +7 -6
- 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 +12 -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/index.mjs +1 -2
- package/dist/components/ai/tool-invocation/tool-invocation.css +55 -0
- package/dist/components/ai/tool-invocation/tool-invocation.d.mts +5 -4
- 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 -8
- 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/button/index.mjs +1 -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 +1 -0
- package/dist/components/buttons/icon-button/icon-button.css +81 -0
- package/dist/components/buttons/icon-button/icon-button.d.mts +39 -11
- package/dist/components/buttons/icon-button/icon-button.mjs +70 -57
- 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/icon-button/index.mjs +1 -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 +19 -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 -2
- 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/avatar/index.mjs +1 -2
- package/dist/components/data-display/badge/badge.css +160 -0
- package/dist/components/data-display/badge/badge.d.mts +2 -2
- 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/badge/index.mjs +1 -2
- package/dist/components/data-display/card/card.css +44 -0
- package/dist/components/data-display/card/card.d.mts +2 -2
- 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/card/index.mjs +1 -2
- package/dist/components/data-display/carousel/carousel.css +83 -0
- package/dist/components/data-display/carousel/carousel.d.mts +12 -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 -2
- 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 -2
- package/dist/components/data-display/code/find-all-colors.mjs +0 -161
- package/dist/components/data-display/code/index.mjs +1 -2
- package/dist/components/data-display/code-block/code-block.css +161 -0
- package/dist/components/data-display/code-block/code-block.d.mts +13 -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 +10 -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 +1 -0
- package/dist/components/data-display/data-table/data-table.css +74 -0
- package/dist/components/data-display/data-table/data-table.d.mts +32 -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 +1 -0
- package/dist/components/data-display/heading/heading.css +99 -0
- package/dist/components/data-display/heading/heading.d.mts +2 -2
- 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/heading/index.mjs +1 -2
- package/dist/components/data-display/kbd/index.d.mts +2 -0
- package/dist/components/data-display/kbd/index.mjs +1 -0
- package/dist/components/data-display/kbd/kbd.css +21 -0
- package/dist/components/data-display/kbd/kbd.d.mts +9 -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 +1 -0
- package/dist/components/data-display/prose/prose.css +253 -0
- package/dist/components/data-display/prose/prose.d.mts +6 -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/index.mjs +1 -2
- package/dist/components/data-display/table/table.css +107 -0
- package/dist/components/data-display/table/table.d.mts +10 -8
- 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 +1 -0
- package/dist/components/data-display/tree/tree.css +70 -0
- package/dist/components/data-display/tree/tree.d.mts +21 -0
- package/dist/components/data-display/tree/tree.mjs +144 -0
- package/dist/components/data-display/tree/tree.module.mjs +14 -0
- package/dist/components/feedback/alert/alert.css +42 -0
- package/dist/components/feedback/alert/alert.d.mts +3 -3
- package/dist/components/feedback/alert/alert.mjs +20 -23
- package/dist/components/feedback/alert/alert.module.mjs +14 -0
- package/dist/components/feedback/alert/index.mjs +1 -2
- package/dist/components/feedback/callout/callout.css +38 -0
- package/dist/components/feedback/callout/callout.d.mts +11 -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 +1 -0
- package/dist/components/feedback/empty-state/empty-state.css +36 -0
- package/dist/components/feedback/empty-state/empty-state.d.mts +11 -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 +1 -0
- package/dist/components/feedback/progress/index.mjs +1 -2
- package/dist/components/feedback/progress/progress.css +78 -0
- package/dist/components/feedback/progress/progress.d.mts +5 -4
- package/dist/components/feedback/progress/progress.mjs +17 -3
- package/dist/components/feedback/progress/progress.module.mjs +12 -0
- package/dist/components/feedback/skeleton/index.mjs +1 -2
- package/dist/components/feedback/skeleton/skeleton.css +64 -0
- package/dist/components/feedback/skeleton/skeleton.d.mts +2 -2
- package/dist/components/feedback/skeleton/skeleton.mjs +19 -2
- package/dist/components/feedback/skeleton/skeleton.module.mjs +17 -0
- package/dist/components/feedback/spinner/index.mjs +1 -2
- package/dist/components/feedback/spinner/spinner.css +40 -0
- package/dist/components/feedback/spinner/spinner.d.mts +2 -2
- 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 -2
- package/dist/components/form/autocomplete/autocomplete.css +154 -0
- package/dist/components/form/autocomplete/autocomplete.d.mts +2 -2
- package/dist/components/form/autocomplete/autocomplete.mjs +70 -46
- package/dist/components/form/autocomplete/autocomplete.module.mjs +21 -0
- package/dist/components/form/autocomplete/index.mjs +1 -2
- package/dist/components/form/calendar/calendar.css +98 -0
- package/dist/components/form/calendar/calendar.d.mts +15 -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 +1 -0
- package/dist/components/form/checkbox/checkbox.css +90 -0
- package/dist/components/form/checkbox/checkbox.d.mts +4 -2
- package/dist/components/form/checkbox/checkbox.mjs +29 -27
- package/dist/components/form/checkbox/checkbox.module.mjs +13 -0
- package/dist/components/form/checkbox/index.mjs +1 -2
- package/dist/components/form/checkbox-card/checkbox-card.css +138 -0
- package/dist/components/form/checkbox-card/checkbox-card.d.mts +3 -3
- 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-card/index.mjs +1 -2
- 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 +4 -3
- package/dist/components/form/color-picker/color-picker.css +172 -0
- package/dist/components/form/color-picker/color-picker.d.mts +29 -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 +1 -0
- package/dist/components/form/combobox/combobox.css +143 -0
- package/dist/components/form/combobox/combobox.d.mts +33 -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 +1 -0
- package/dist/components/form/date-field/date-field.css +31 -0
- package/dist/components/form/date-field/date-field.d.mts +9 -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 +1 -0
- package/dist/components/form/date-picker/date-picker.css +90 -0
- package/dist/components/form/date-picker/date-picker.d.mts +13 -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 +1 -0
- package/dist/components/form/file-field/file-field.css +88 -0
- package/dist/components/form/file-field/file-field.d.mts +9 -6
- package/dist/components/form/file-field/file-field.mjs +130 -37
- package/dist/components/form/file-field/file-field.module.mjs +17 -0
- package/dist/components/form/file-field/index.d.mts +5 -3
- package/dist/components/form/file-field/index.mjs +2 -1
- package/dist/components/form/form/form.css +11 -0
- package/dist/components/form/form/form.d.mts +4 -3
- package/dist/components/form/form/form.mjs +2 -1
- package/dist/components/form/form/form.module.mjs +5 -0
- package/dist/components/form/form/index.mjs +1 -2
- package/dist/components/form/form-control/form-control.css +43 -0
- package/dist/components/form/form-control/form-control.d.mts +2 -2
- 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/form-control/index.mjs +1 -2
- 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/index.mjs +1 -2
- package/dist/components/form/number-field/number-field.css +122 -0
- package/dist/components/form/number-field/number-field.d.mts +10 -9
- 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/index.mjs +1 -2
- package/dist/components/form/password-input/password-input.css +88 -0
- package/dist/components/form/password-input/password-input.d.mts +2 -2
- 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/index.mjs +1 -2
- package/dist/components/form/radio/radio.css +89 -0
- package/dist/components/form/radio/radio.d.mts +3 -2
- package/dist/components/form/radio/radio.mjs +15 -19
- package/dist/components/form/radio/radio.module.mjs +16 -0
- package/dist/components/form/radio-card/index.mjs +1 -2
- package/dist/components/form/radio-card/radio-card.css +147 -0
- package/dist/components/form/radio-card/radio-card.d.mts +4 -3
- 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 +1 -0
- package/dist/components/form/range-slider/range-slider.css +67 -0
- package/dist/components/form/range-slider/range-slider.d.mts +31 -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/index.mjs +1 -2
- package/dist/components/form/select/select.css +74 -0
- package/dist/components/form/select/select.d.mts +2 -2
- package/dist/components/form/select/select.mjs +25 -8
- package/dist/components/form/select/select.module.mjs +12 -0
- package/dist/components/form/slider/index.mjs +1 -2
- 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 -6
- package/dist/components/form/slider/slider.mjs +44 -11
- package/dist/components/form/slider/slider.module.mjs +12 -0
- package/dist/components/form/switch/index.mjs +1 -2
- package/dist/components/form/switch/switch.css +103 -0
- package/dist/components/form/switch/switch.d.mts +2 -2
- 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/index.mjs +1 -2
- package/dist/components/form/text-field/text-field.css +41 -0
- package/dist/components/form/text-field/text-field.d.mts +4 -4
- 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/index.mjs +1 -2
- package/dist/components/form/textarea/textarea.css +50 -0
- package/dist/components/form/textarea/textarea.d.mts +3 -2
- 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 -60
- 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 +48 -9
- package/dist/components/index.mjs +32 -10
- 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/grid/index.mjs +1 -2
- 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 +22 -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/index.mjs +1 -2
- package/dist/components/layout/separator/separator.css +37 -0
- package/dist/components/layout/separator/separator.d.mts +2 -2
- package/dist/components/layout/separator/separator.mjs +12 -9
- package/dist/components/layout/separator/separator.module.mjs +12 -0
- package/dist/components/layout/stack/index.mjs +1 -2
- 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 -2
- package/dist/components/navigation/anchor/anchor.mjs +5 -2
- package/dist/components/navigation/anchor/anchor.module.mjs +8 -0
- package/dist/components/navigation/anchor/index.mjs +1 -2
- package/dist/components/navigation/breadcrumb/breadcrumb.css +72 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.d.mts +5 -5
- 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/index.mjs +1 -2
- package/dist/components/navigation/pagination/pagination.css +36 -0
- package/dist/components/navigation/pagination/pagination.d.mts +2 -2
- 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 +32 -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 +1 -0
- package/dist/components/navigation/stepper/stepper.css +151 -0
- package/dist/components/navigation/stepper/stepper.d.mts +20 -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 +1 -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 +2 -3
- package/dist/components/navigation/tabs/tabs.css +70 -0
- package/dist/components/navigation/tabs/tabs.d.mts +5 -6
- package/dist/components/navigation/tabs/tabs.mjs +51 -42
- 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 +1 -0
- package/dist/components/observers/resize/index.d.mts +2 -0
- package/dist/components/observers/resize/index.mjs +1 -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 +25 -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 +1 -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 +4 -5
- package/dist/components/overlays/dialog/dialog.mjs +10 -7
- package/dist/components/overlays/dialog/dialog.module.mjs +10 -0
- package/dist/components/overlays/dialog/index.d.mts +2 -3
- 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/drawer/index.mjs +1 -2
- package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +7 -10
- package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +10 -9
- package/dist/components/overlays/dropdown-menu/hooks.d.mts +7 -6
- package/dist/components/overlays/dropdown-menu/hooks.mjs +3 -3
- package/dist/components/overlays/dropdown-menu/index.d.mts +8 -10
- 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 +15 -15
- 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 +2 -3
- package/dist/components/overlays/list-box/list-box.css +74 -0
- package/dist/components/overlays/list-box/list-box.d.mts +5 -6
- package/dist/components/overlays/list-box/list-box.mjs +15 -13
- package/dist/components/overlays/list-box/list-box.module.mjs +10 -0
- package/dist/components/overlays/modal/index.mjs +1 -2
- 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 -4
- package/dist/components/overlays/popover/escape-stack.d.mts +2 -3
- package/dist/components/overlays/popover/hooks.d.mts +7 -7
- package/dist/components/overlays/popover/index.d.mts +2 -2
- package/dist/components/overlays/popover/popover.css +51 -0
- package/dist/components/overlays/popover/popover.d.mts +4 -4
- package/dist/components/overlays/popover/popover.mjs +11 -5
- 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 +2 -2
- package/dist/components/overlays/tooltip/tooltip.css +15 -0
- package/dist/components/overlays/tooltip/tooltip.d.mts +5 -6
- package/dist/components/overlays/tooltip/tooltip.mjs +3 -2
- 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 -2
- package/dist/helpers/chain.mjs +0 -23
- package/dist/helpers/create-safe-context.d.mts +2 -2
- 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 -2
- 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 -2
- package/dist/hooks/controllable-state/index.mjs +9 -11
- package/dist/hooks/index.d.mts +2 -20
- package/dist/hooks/index.mjs +2 -19
- 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 +29 -34
- package/dist/index.mjs +32 -35
- 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 +288 -30
- package/dist/integrations/_shared/renderers.module.mjs +14 -0
- package/dist/integrations/_shared/schemas.d.mts +384 -102
- package/dist/integrations/_shared/schemas.mjs +165 -27
- package/dist/integrations/ai-sdk/index.d.mts +2 -2
- package/dist/integrations/ai-sdk/index.mjs +1 -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 -17
- 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 -6
- 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/internal/focus-trap.d.mts +5 -6
- package/dist/internal/focus-trap.mjs +4 -4
- 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 -2526
- 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 +239 -72
- package/docs/llms.txt +11 -7
- package/docs/props.generated.json +2156 -309
- package/docs/references/ai-chat.md +345 -62
- package/docs/references/color.md +222 -78
- package/docs/references/components.md +1667 -242
- package/docs/references/generative-ui.md +126 -17
- package/docs/references/interaction-design.md +65 -35
- package/docs/references/spatial-design.md +83 -63
- package/docs/references/types.md +101 -0
- package/docs/references/typography.md +159 -51
- package/package.json +65 -63
- 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/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/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/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 -223
- package/docs/references/hooks.md +0 -301
|
@@ -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,6 @@ 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;
|
|
18
|
+
export declare const Anchor: <T extends string>({ href, children, openInNewTab, renderAnchor, ...rest }: Props<T>) => ReactNode;
|
|
19
19
|
//#endregion
|
|
20
|
-
export {
|
|
20
|
+
export {};
|
|
@@ -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" })] })
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Anchor };
|
|
1
|
+
export { Anchor } from "./anchor.mjs";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.pX7MyW_list {
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: calc(var(--spacing) * 1);
|
|
7
|
+
color: var(--color-fg-mute);
|
|
8
|
+
list-style-type: none;
|
|
9
|
+
display: flex;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pX7MyW_sm {
|
|
13
|
+
font-size: var(--font-size-xs);
|
|
14
|
+
line-height: var(--line-height-xs);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pX7MyW_md {
|
|
18
|
+
font-size: var(--font-size-xs);
|
|
19
|
+
line-height: var(--line-height-xs);
|
|
20
|
+
|
|
21
|
+
@media (width >= 48rem) {
|
|
22
|
+
font-size: var(--font-size-md);
|
|
23
|
+
line-height: var(--line-height-md);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pX7MyW_lg {
|
|
28
|
+
font-size: var(--font-size-xl);
|
|
29
|
+
line-height: var(--line-height-xl);
|
|
30
|
+
|
|
31
|
+
@media (width >= 48rem) {
|
|
32
|
+
font-size: var(--font-size-2xl);
|
|
33
|
+
line-height: var(--line-height-2xl);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pX7MyW_item {
|
|
38
|
+
align-items: center;
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pX7MyW_separator {
|
|
43
|
+
color: var(--color-fg-mute);
|
|
44
|
+
|
|
45
|
+
@container style(--writing: vertical) {
|
|
46
|
+
rotate: 90deg;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pX7MyW_current {
|
|
51
|
+
color: var(--color-fg-base);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pX7MyW_link {
|
|
55
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
56
|
+
transition-duration: var(--duration-fast);
|
|
57
|
+
transition-timing-function: var(--easing-out);
|
|
58
|
+
text-decoration-line: underline;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media (hover: hover) {
|
|
62
|
+
.pX7MyW_link:hover {
|
|
63
|
+
color: var(--color-fg-base);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pX7MyW_link:focus-visible {
|
|
68
|
+
border-radius: var(--radius-sm);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@layer utilities;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from "react";
|
|
2
2
|
//#region src/components/navigation/breadcrumb/breadcrumb.d.ts
|
|
3
|
-
declare const List: FC<PropsWithChildren<{
|
|
3
|
+
export declare const List: FC<PropsWithChildren<{
|
|
4
4
|
size?: 'sm' | 'md' | 'lg';
|
|
5
5
|
}>>;
|
|
6
|
-
declare const Item: FC<PropsWithChildren>;
|
|
7
|
-
declare const Separator: FC;
|
|
6
|
+
export declare const Item: FC<PropsWithChildren>;
|
|
7
|
+
export declare const Separator: FC;
|
|
8
8
|
type RenderBreadcrumbAnchorProps<T extends string> = {
|
|
9
9
|
href: NoInfer<T>;
|
|
10
10
|
className: string;
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
};
|
|
13
|
-
declare const Link: <T extends string>({ href, current, children, renderAnchor }: PropsWithChildren<{
|
|
13
|
+
export declare const Link: <T extends string>({ href, current, children, renderAnchor }: PropsWithChildren<{
|
|
14
14
|
href: T;
|
|
15
15
|
current?: boolean;
|
|
16
16
|
renderAnchor?: (props: RenderBreadcrumbAnchorProps<T>) => ReactNode;
|
|
17
17
|
}>) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
18
18
|
//#endregion
|
|
19
|
-
export {
|
|
19
|
+
export {};
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { useMessages } from "../../../i18n/context.mjs";
|
|
1
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
2
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
4
3
|
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
4
|
+
import breadcrumb_module_default from "./breadcrumb.module.mjs";
|
|
5
|
+
import { clsx } from "clsx";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/navigation/breadcrumb/breadcrumb.tsx
|
|
8
|
+
const SIZE = {
|
|
9
|
+
sm: breadcrumb_module_default.sm,
|
|
10
|
+
md: breadcrumb_module_default.md,
|
|
11
|
+
lg: breadcrumb_module_default.lg
|
|
12
|
+
};
|
|
7
13
|
const List = ({ children, size = "md" }) => {
|
|
8
|
-
const messages =
|
|
14
|
+
const messages = getMessages();
|
|
9
15
|
return /* @__PURE__ */ jsx("nav", {
|
|
10
16
|
"aria-label": messages.breadcrumb,
|
|
11
17
|
children: /* @__PURE__ */ jsx("ol", {
|
|
12
|
-
className:
|
|
18
|
+
className: clsx(breadcrumb_module_default.list, SIZE[size]),
|
|
13
19
|
children
|
|
14
20
|
})
|
|
15
21
|
});
|
|
16
22
|
};
|
|
17
23
|
const Item = ({ children }) => /* @__PURE__ */ jsx("li", {
|
|
18
|
-
className:
|
|
24
|
+
className: breadcrumb_module_default.item,
|
|
19
25
|
children
|
|
20
26
|
});
|
|
21
27
|
const Separator = () => /* @__PURE__ */ jsx("li", {
|
|
22
28
|
"aria-hidden": "true",
|
|
23
|
-
className:
|
|
29
|
+
className: breadcrumb_module_default.separator,
|
|
24
30
|
children: /* @__PURE__ */ jsx(ChevronIcon, {
|
|
25
31
|
direction: "right",
|
|
26
32
|
size: "sm"
|
|
@@ -32,11 +38,11 @@ const defaultRenderBreadcrumbAnchor = ({ children, ...rest }) => /* @__PURE__ */
|
|
|
32
38
|
});
|
|
33
39
|
const Link = ({ href, current = false, children, renderAnchor = defaultRenderBreadcrumbAnchor }) => current ? /* @__PURE__ */ jsx("span", {
|
|
34
40
|
"aria-current": "page",
|
|
35
|
-
className:
|
|
41
|
+
className: breadcrumb_module_default.current,
|
|
36
42
|
children
|
|
37
43
|
}) : renderAnchor({
|
|
38
44
|
href,
|
|
39
|
-
className:
|
|
45
|
+
className: clsx(breadcrumb_module_default.link, focus_ring_module_default.ringNoBorder),
|
|
40
46
|
children
|
|
41
47
|
});
|
|
42
48
|
//#endregion
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './breadcrumb.css';
|
|
2
|
+
//#region src/components/navigation/breadcrumb/breadcrumb.module.css
|
|
3
|
+
var breadcrumb_module_default = {
|
|
4
|
+
"current": "pX7MyW_current",
|
|
5
|
+
"item": "pX7MyW_item",
|
|
6
|
+
"lg": "pX7MyW_lg",
|
|
7
|
+
"link": "pX7MyW_link",
|
|
8
|
+
"list": "pX7MyW_list",
|
|
9
|
+
"md": "pX7MyW_md",
|
|
10
|
+
"separator": "pX7MyW_separator",
|
|
11
|
+
"sm": "pX7MyW_sm"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { breadcrumb_module_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Link } from "./breadcrumb.mjs";
|
|
2
2
|
//#region src/components/navigation/breadcrumb/index.d.ts
|
|
3
|
-
declare const Breadcrumb: {
|
|
3
|
+
export declare const Breadcrumb: {
|
|
4
4
|
readonly List: import("react").FC<import("react").PropsWithChildren<{
|
|
5
5
|
size?: 'sm' | 'md' | 'lg';
|
|
6
6
|
}>>;
|
|
@@ -10,5 +10,4 @@ declare const Breadcrumb: {
|
|
|
10
10
|
readonly Separator: import("react").FC;
|
|
11
11
|
readonly Link: typeof Link;
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { Breadcrumb };
|
|
13
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Pagination };
|
|
1
|
+
export { Pagination } from "./pagination.mjs";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.LBG7cW_row {
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: calc(var(--spacing) * 2);
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.LBG7cW_chevron {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
|
|
14
|
+
@container style(--writing: vertical) {
|
|
15
|
+
rotate: 90deg;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.LBG7cW_status {
|
|
20
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
21
|
+
font-size: var(--font-size-sm);
|
|
22
|
+
line-height: var(--line-height-sm);
|
|
23
|
+
font-variant-numeric: tabular-nums;
|
|
24
|
+
color: var(--color-fg-mute);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.LBG7cW_current {
|
|
28
|
+
color: var(--color-fg-base);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.LBG7cW_slash {
|
|
32
|
+
margin-inline: calc(var(--spacing) * 1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@layer utilities;
|
|
@@ -10,6 +10,6 @@ type Props = {
|
|
|
10
10
|
'aria-label'?: string;
|
|
11
11
|
ref?: Ref<HTMLElement>;
|
|
12
12
|
} & Omit<HTMLAttributes<HTMLElement>, 'className' | 'style' | 'onChange' | 'children'>;
|
|
13
|
-
declare const Pagination: FC<Props>;
|
|
13
|
+
export declare const Pagination: FC<Props>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
3
3
|
import { Button } from "../../buttons/button/button.mjs";
|
|
4
4
|
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
5
|
+
import pagination_module_default from "./pagination.module.mjs";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/navigation/pagination/pagination.tsx
|
|
7
8
|
const Pagination = ({ totalPages, currentPage, onChange, disabled = false, prevLabel, nextLabel, "aria-label": ariaLabel, ref, ...rest }) => {
|
|
8
|
-
const messages =
|
|
9
|
+
const messages = getMessages();
|
|
9
10
|
const safeTotal = Math.max(1, totalPages);
|
|
10
11
|
const safeCurrent = Math.min(Math.max(1, currentPage), safeTotal);
|
|
11
12
|
const isFirst = safeCurrent <= 1;
|
|
@@ -15,7 +16,7 @@ const Pagination = ({ totalPages, currentPage, onChange, disabled = false, prevL
|
|
|
15
16
|
"aria-label": ariaLabel ?? messages.paginationLabel,
|
|
16
17
|
ref,
|
|
17
18
|
children: /* @__PURE__ */ jsxs("div", {
|
|
18
|
-
className:
|
|
19
|
+
className: pagination_module_default.row,
|
|
19
20
|
children: [
|
|
20
21
|
/* @__PURE__ */ jsx(Button, {
|
|
21
22
|
color: "base",
|
|
@@ -25,7 +26,7 @@ const Pagination = ({ totalPages, currentPage, onChange, disabled = false, prevL
|
|
|
25
26
|
},
|
|
26
27
|
size: "sm",
|
|
27
28
|
startIcon: /* @__PURE__ */ jsx("span", {
|
|
28
|
-
className:
|
|
29
|
+
className: pagination_module_default.chevron,
|
|
29
30
|
children: /* @__PURE__ */ jsx(ChevronIcon, {
|
|
30
31
|
direction: "left",
|
|
31
32
|
size: "sm"
|
|
@@ -36,14 +37,14 @@ const Pagination = ({ totalPages, currentPage, onChange, disabled = false, prevL
|
|
|
36
37
|
}),
|
|
37
38
|
/* @__PURE__ */ jsxs("p", {
|
|
38
39
|
"aria-live": "polite",
|
|
39
|
-
className:
|
|
40
|
+
className: pagination_module_default.status,
|
|
40
41
|
children: [
|
|
41
42
|
/* @__PURE__ */ jsx("span", {
|
|
42
|
-
className:
|
|
43
|
+
className: pagination_module_default.current,
|
|
43
44
|
children: safeCurrent
|
|
44
45
|
}),
|
|
45
46
|
/* @__PURE__ */ jsx("span", {
|
|
46
|
-
className:
|
|
47
|
+
className: pagination_module_default.slash,
|
|
47
48
|
children: "/"
|
|
48
49
|
}),
|
|
49
50
|
/* @__PURE__ */ jsx("span", { children: safeTotal })
|
|
@@ -53,7 +54,7 @@ const Pagination = ({ totalPages, currentPage, onChange, disabled = false, prevL
|
|
|
53
54
|
color: "base",
|
|
54
55
|
disabled: disabled || isLast,
|
|
55
56
|
endIcon: /* @__PURE__ */ jsx("span", {
|
|
56
|
-
className:
|
|
57
|
+
className: pagination_module_default.chevron,
|
|
57
58
|
children: /* @__PURE__ */ jsx(ChevronIcon, {
|
|
58
59
|
direction: "right",
|
|
59
60
|
size: "sm"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './pagination.css';
|
|
2
|
+
//#region src/components/navigation/pagination/pagination.module.css
|
|
3
|
+
var pagination_module_default = {
|
|
4
|
+
"chevron": "LBG7cW_chevron",
|
|
5
|
+
"current": "LBG7cW_current",
|
|
6
|
+
"row": "LBG7cW_row",
|
|
7
|
+
"slash": "LBG7cW_slash",
|
|
8
|
+
"status": "LBG7cW_status"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { pagination_module_default as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Link } from "./side-nav.mjs";
|
|
2
|
+
//#region src/components/navigation/side-nav/index.d.ts
|
|
3
|
+
export declare const SideNav: {
|
|
4
|
+
readonly Root: import("react").FC<import("react").PropsWithChildren<{
|
|
5
|
+
label: string;
|
|
6
|
+
} & Omit<import("react").HTMLAttributes<HTMLElement>, "aria-label" | "children" | "className" | "style">>>;
|
|
7
|
+
readonly Group: import("react").FC<import("react").PropsWithChildren<{
|
|
8
|
+
title: string;
|
|
9
|
+
}>>;
|
|
10
|
+
readonly Sub: import("react").FC<import("react").PropsWithChildren<{
|
|
11
|
+
title: string;
|
|
12
|
+
defaultOpen?: boolean;
|
|
13
|
+
}>>;
|
|
14
|
+
readonly Link: typeof Link;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@layer properties, theme, base;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
._2RqvcG_root {
|
|
5
|
+
gap: calc(var(--spacing) * 6);
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
display: flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
._2RqvcG_group {
|
|
11
|
+
gap: calc(var(--spacing) * 1);
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
._2RqvcG_summary {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: calc(var(--spacing) * 1.5);
|
|
20
|
+
border-inline-start-width: 2px;
|
|
21
|
+
padding-block: calc(var(--spacing) * 1.5);
|
|
22
|
+
font-size: var(--font-size-sm);
|
|
23
|
+
line-height: var(--line-height-sm);
|
|
24
|
+
color: var(--color-fg-mute);
|
|
25
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
26
|
+
transition-duration: var(--duration-fast);
|
|
27
|
+
transition-timing-function: var(--easing-out);
|
|
28
|
+
border-color: #0000;
|
|
29
|
+
margin-inline-start: -1px;
|
|
30
|
+
padding-inline-start: calc(var(--spacing) * 4);
|
|
31
|
+
padding-inline-end: calc(var(--spacing) * 3);
|
|
32
|
+
list-style-type: none;
|
|
33
|
+
display: flex;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
._2RqvcG_summary::-webkit-details-marker {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (hover: hover) {
|
|
41
|
+
._2RqvcG_summary:hover {
|
|
42
|
+
border-color: var(--color-border-emphasize);
|
|
43
|
+
color: var(--color-fg-base);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
._2RqvcG_summary:focus-visible {
|
|
48
|
+
box-shadow: var(--shadow-ring-inset-info);
|
|
49
|
+
outline-style: none;
|
|
50
|
+
|
|
51
|
+
@media (forced-colors: active) {
|
|
52
|
+
outline-offset: 2px;
|
|
53
|
+
outline: 2px solid #0000;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
._2RqvcG_chevron {
|
|
58
|
+
transition-property: transform, translate, scale, rotate;
|
|
59
|
+
transition-duration: var(--duration-fast);
|
|
60
|
+
transition-timing-function: var(--easing-out);
|
|
61
|
+
display: flex;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
._2RqvcG_chevron:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
65
|
+
scale: -1 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
._2RqvcG_sub[open] ._2RqvcG_chevron {
|
|
69
|
+
rotate: 90deg;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@layer utilities;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, FC, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
//#region src/components/navigation/side-nav/side-nav.d.ts
|
|
3
|
+
type RestProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'children' | 'className' | 'style' | 'aria-current'>;
|
|
4
|
+
type RenderSideNavAnchorProps<T extends string> = {
|
|
5
|
+
href: NoInfer<T>;
|
|
6
|
+
className: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
'aria-current': 'page' | undefined;
|
|
9
|
+
} & RestProps;
|
|
10
|
+
export declare const Root: FC<PropsWithChildren<{
|
|
11
|
+
label: string;
|
|
12
|
+
} & Omit<HTMLAttributes<HTMLElement>, 'className' | 'style' | 'aria-label' | 'children'>>>;
|
|
13
|
+
export declare const Group: FC<PropsWithChildren<{
|
|
14
|
+
title: string;
|
|
15
|
+
}>>;
|
|
16
|
+
export declare const Link: <T extends string>({ href, current, children, renderAnchor, ...rest }: {
|
|
17
|
+
href: T;
|
|
18
|
+
current?: boolean;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
renderAnchor?: (props: RenderSideNavAnchorProps<T>) => ReactNode;
|
|
21
|
+
} & RestProps) => import("react").JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* A group inside a group that opens and closes — a level of the tree. It is a
|
|
24
|
+
* `<details>`, so it works before hydration and without JavaScript; open the
|
|
25
|
+
* one holding the current page with `defaultOpen`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Sub: FC<PropsWithChildren<{
|
|
28
|
+
title: string;
|
|
29
|
+
defaultOpen?: boolean;
|
|
30
|
+
}>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
2
|
+
import { NAV_LIST_CLASS_NAME, NAV_TITLE_CLASS_NAME, navLinkClassName } from "../../_internal/nav-link.mjs";
|
|
3
|
+
import side_nav_module_default from "./side-nav.module.mjs";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/navigation/side-nav/side-nav.tsx
|
|
7
|
+
const defaultRenderAnchor = ({ children, ...rest }) => /* @__PURE__ */ jsx("a", {
|
|
8
|
+
...rest,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
const Root = ({ label, children, ...rest }) => /* @__PURE__ */ jsx("nav", {
|
|
12
|
+
...rest,
|
|
13
|
+
"aria-label": label,
|
|
14
|
+
className: side_nav_module_default.root,
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
const Group = ({ title, children }) => {
|
|
18
|
+
const titleId = useId();
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: side_nav_module_default.group,
|
|
21
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: NAV_TITLE_CLASS_NAME,
|
|
23
|
+
id: titleId,
|
|
24
|
+
children: title
|
|
25
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
26
|
+
"aria-labelledby": titleId,
|
|
27
|
+
className: NAV_LIST_CLASS_NAME,
|
|
28
|
+
children
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const Link = ({ href, current = false, children, renderAnchor = defaultRenderAnchor, ...rest }) => /* @__PURE__ */ jsx("li", { children: renderAnchor({
|
|
33
|
+
...rest,
|
|
34
|
+
href,
|
|
35
|
+
children,
|
|
36
|
+
"aria-current": current ? "page" : void 0,
|
|
37
|
+
className: navLinkClassName(current)
|
|
38
|
+
}) });
|
|
39
|
+
/**
|
|
40
|
+
* A group inside a group that opens and closes — a level of the tree. It is a
|
|
41
|
+
* `<details>`, so it works before hydration and without JavaScript; open the
|
|
42
|
+
* one holding the current page with `defaultOpen`.
|
|
43
|
+
*/
|
|
44
|
+
const Sub = ({ title, defaultOpen = false, children }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("details", {
|
|
45
|
+
className: side_nav_module_default.sub,
|
|
46
|
+
open: defaultOpen,
|
|
47
|
+
children: [/* @__PURE__ */ jsxs("summary", {
|
|
48
|
+
className: side_nav_module_default.summary,
|
|
49
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: side_nav_module_default.chevron,
|
|
51
|
+
children: /* @__PURE__ */ jsx(ChevronIcon, {
|
|
52
|
+
direction: "right",
|
|
53
|
+
size: "sm"
|
|
54
|
+
})
|
|
55
|
+
}), title]
|
|
56
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
57
|
+
className: NAV_LIST_CLASS_NAME,
|
|
58
|
+
children
|
|
59
|
+
})]
|
|
60
|
+
}) });
|
|
61
|
+
//#endregion
|
|
62
|
+
export { Group, Link, Root, Sub };
|