@k8ordo/ui 2.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 +197 -187
- 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 +4 -5
- 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 -4
- 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 -6
- 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/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 +2 -3
- package/dist/components/ai/suggestion/suggestion.css +32 -0
- package/dist/components/ai/suggestion/suggestion.d.mts +3 -4
- 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 +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 +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/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 +4 -3
- package/dist/components/form/checkbox/checkbox.mjs +29 -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 +4 -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 +9 -7
- 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 -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 +3 -3
- 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/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 +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/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 +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 +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 +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/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 -7
- 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/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 +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 -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 -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 +387 -103
- 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/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 +1664 -242
- package/docs/references/generative-ui.md +125 -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 +64 -62
- 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
package/docs/GUIDE.md
CHANGED
|
@@ -11,7 +11,6 @@ npm install @k8ordo/ui
|
|
|
11
11
|
```tsx
|
|
12
12
|
// 1. Load the stylesheet (once, at your entry point)
|
|
13
13
|
import '@k8ordo/ui/styles.css';
|
|
14
|
-
|
|
15
14
|
// 2. Wrap the app in the provider
|
|
16
15
|
import { UIProvider } from '@k8ordo/ui';
|
|
17
16
|
|
|
@@ -27,57 +26,160 @@ function App() {
|
|
|
27
26
|
import { Button, Card } from '@k8ordo/ui';
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
###
|
|
29
|
+
### How the styles arrive
|
|
30
|
+
|
|
31
|
+
`@k8ordo/ui` is written in CSS Modules, and its styles come in two parts:
|
|
32
|
+
|
|
33
|
+
- **`styles.css`** — import it once. It declares the cascade layers, the design
|
|
34
|
+
tokens (custom properties on `:root` and their modes), a reset (the same
|
|
35
|
+
rules as Tailwind CSS 4's preflight), and the page-wide defaults.
|
|
36
|
+
- **Each component's own CSS** — imported by the component's JavaScript, so a
|
|
37
|
+
page loads the CSS of the components it uses and nothing else. Any bundler
|
|
38
|
+
that handles a CSS import from a package does this for you (Vite, Next.js,
|
|
39
|
+
webpack, Rspack, …).
|
|
40
|
+
|
|
41
|
+
Every rule of the library sits in a cascade layer. `styles.css` declares the
|
|
42
|
+
order first:
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
```css
|
|
45
|
+
@layer properties, theme, base, components, utilities;
|
|
46
|
+
```
|
|
33
47
|
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
The reset and the defaults are in `base` and the components in `components`.
|
|
49
|
+
These are Tailwind CSS 4's layers in Tailwind's order, so in a Tailwind project
|
|
50
|
+
your utilities win over the components; without Tailwind, any CSS of yours that
|
|
51
|
+
is not in a layer wins, and so does a layer you declare after `components`. The
|
|
52
|
+
one rule that does not yield is the reset's
|
|
53
|
+
`[hidden] { display: none !important }`.
|
|
54
|
+
|
|
55
|
+
The CSS is written for what browsers ship today: `@scope`, container style
|
|
56
|
+
queries, `light-dark()`, `:dir()`, nesting. Keep your bundler's CSS target
|
|
57
|
+
recent (in Vite, `build.cssTarget`): an older target makes Lightning CSS
|
|
58
|
+
rewrite `:dir(rtl)` into `:lang()` selectors, which no longer follow `dir`.
|
|
59
|
+
|
|
60
|
+
Components take no `className`. To change how one looks, change the tokens, or
|
|
61
|
+
render your own element through its `renderItem` / `renderAnchor`, which hands
|
|
62
|
+
you the component's `className` to keep or to add to.
|
|
63
|
+
|
|
64
|
+
### Tokens
|
|
65
|
+
|
|
66
|
+
The tokens are custom properties declared at `:root`, named by category:
|
|
67
|
+
`--color-*`, `--spacing` (and `--spacing-em`), `--radius-*`, `--shadow-*`,
|
|
68
|
+
`--font-family-*`, `--font-size-*`, `--font-weight-*`, `--line-height-*`,
|
|
69
|
+
`--letter-spacing-*`, `--z-index-*`, `--duration-*`, `--easing-*` and
|
|
70
|
+
`--breakpoint-*`. Read them in your own CSS (`color: var(--color-fg-mute)`,
|
|
71
|
+
`padding: calc(var(--spacing) * 6)`). The palette they are built from
|
|
72
|
+
(`--gray-500`, …) is not part of the API.
|
|
73
|
+
|
|
74
|
+
They are declared outside any layer, so to override one, declare it after
|
|
75
|
+
`styles.css` is loaded: between unlayered rules of equal specificity, source
|
|
76
|
+
order decides. `@k8ordo/ui/tokens` exports the same tokens as data, a DTCG
|
|
77
|
+
resolver document (Resolver Module 2025.10), with each mode (`.dark`,
|
|
78
|
+
`prefers-contrast: more`) as a modifier.
|
|
79
|
+
|
|
80
|
+
[better-css-modules](https://github.com/k35o/better-css-modules) holds CSS
|
|
81
|
+
Modules to these tokens: list `@k8ordo/ui/styles.css` in its `globalCss`, and
|
|
82
|
+
its `check` reports a raw value, a misspelt token, or a palette color in your
|
|
83
|
+
own modules.
|
|
84
|
+
|
|
85
|
+
### Tailwind CSS 4
|
|
86
|
+
|
|
87
|
+
In a Tailwind CSS 4 project, import `tailwind.css` after Tailwind, instead of
|
|
88
|
+
`styles.css`. It brings in `styles.css` and a theme whose utilities read the
|
|
89
|
+
tokens: `bg-bg-base` is `var(--color-bg-base)`, `text-md` is
|
|
90
|
+
`var(--font-size-md)` with its line height, `p-6` is `calc(var(--spacing) * 6)`.
|
|
91
|
+
It does not import Tailwind itself, so `@k8ordo/ui` does not depend on
|
|
92
|
+
`tailwindcss`; your project's own Tailwind comes first:
|
|
36
93
|
|
|
37
94
|
```css
|
|
95
|
+
@import 'tailwindcss';
|
|
38
96
|
@import '@k8ordo/ui/tailwind.css';
|
|
39
97
|
```
|
|
40
98
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
typography defaults (`font-size`, `overflow-wrap: anywhere`,
|
|
45
|
-
`scrollbar-gutter: stable`, …). Adding it to an existing app restyles more than
|
|
46
|
-
the library's own components.
|
|
99
|
+
It also defines the `dark:`, `light:` and `vertical:` variants and the
|
|
100
|
+
`grid-cols-auto-fill-*`, `writing-*` and `z-overlay` / `z-modal` / `z-toast`
|
|
101
|
+
utilities. The components do not need Tailwind; it is only for your own markup.
|
|
47
102
|
|
|
48
|
-
|
|
49
|
-
classes to be generated by _your_ Tailwind build, so the prebuilt `styles.css`
|
|
50
|
-
alone will not render it completely. Using `Response` requires `tailwind.css`
|
|
51
|
-
plus a `@source` entry — see [ai-chat](references/ai-chat.md).
|
|
103
|
+
### Page-wide styles
|
|
52
104
|
|
|
53
|
-
|
|
105
|
+
Note that `styles.css` applies base styles document-wide. On top of the reset
|
|
106
|
+
(headings, lists, and margins), it unsets bold on `b` / `strong` and italics on
|
|
107
|
+
`i` / `em`, and sets `body` typography defaults (`font-size`,
|
|
108
|
+
`overflow-wrap: anywhere`, `scrollbar-gutter: stable`, …). Adding it to an
|
|
109
|
+
existing app restyles more than the library's own components. Wrap rendered
|
|
110
|
+
Markdown or MDX in `Prose` to get the typesetting of body text back inside it —
|
|
111
|
+
see [Typography](references/typography.md#long-form-text-prose).
|
|
54
112
|
|
|
55
|
-
|
|
56
|
-
**defaults to Japanese**. It works without a provider and without passing
|
|
57
|
-
`messages`, so a Japanese app needs no setup at all.
|
|
113
|
+
### Dark mode
|
|
58
114
|
|
|
59
|
-
|
|
115
|
+
The tokens switch on a `dark` class: `:root` holds the light values and `.dark`
|
|
116
|
+
the dark ones, so everything under an element with the class is dark. The
|
|
117
|
+
library never adds the class itself. In a k8ordo application
|
|
118
|
+
`@k8ordo/color-scheme` does, resolving the visitor's choice and the system
|
|
119
|
+
preference into `dark` on `<html>` before the first paint; anything else that
|
|
120
|
+
toggles the class works the same.
|
|
60
121
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
122
|
+
The base layer sets the CSS `color-scheme` property to match — `light` on
|
|
123
|
+
`:root`, `dark` under `.dark` — so the browser's own rendering (scrollbars, form
|
|
124
|
+
controls, a `<dialog>`'s default colors) follows the tokens rather than the OS.
|
|
125
|
+
Your own CSS follows the same way when it reads the tokens. With
|
|
126
|
+
`tailwind.css`, the `dark:` variant applies under `.dark` and `light:`
|
|
127
|
+
everywhere else.
|
|
128
|
+
|
|
129
|
+
### Wording language (i18n)
|
|
64
130
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
131
|
+
The wording components own internally ("close", "required", "loading", …) is
|
|
132
|
+
read in `@k8ordo/i18n`'s current locale. There is no provider to configure and
|
|
133
|
+
nothing to pass: `@k8ordo/i18n` is a peer dependency, installed with this
|
|
134
|
+
package.
|
|
135
|
+
|
|
136
|
+
- **With a locale set.** Once the application defines its set with
|
|
137
|
+
`defineLocales`, the components speak the locale its messages do — the one
|
|
138
|
+
the URL names, or the set's default.
|
|
139
|
+
- **Without one.** An application that defines no set (a Next.js or plain
|
|
140
|
+
Vite app that does not use `@k8ordo/i18n`) gets **English**, whatever its
|
|
141
|
+
URL starts with — so the server's HTML and the browser agree.
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
// src/i18n.ts — a Japanese-only app defines a set of one
|
|
145
|
+
import { defineLocales } from '@k8ordo/i18n';
|
|
146
|
+
|
|
147
|
+
export const locales = defineLocales({
|
|
148
|
+
ja: { timeZone: 'Asia/Tokyo', dir: 'ltr' },
|
|
149
|
+
});
|
|
68
150
|
```
|
|
69
151
|
|
|
70
|
-
|
|
152
|
+
The module that defines the set has to be loaded in the browser too, not
|
|
153
|
+
only by the server render: where no set is defined the components speak
|
|
154
|
+
English, and would disagree with the HTML. In a k8ordo app a client component
|
|
155
|
+
that links (`bindParams`) or switches language already imports it; elsewhere,
|
|
156
|
+
import it from a client module the root renders.
|
|
71
157
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
158
|
+
`ja` and `en` ship with the library. Any other locale is registered next to
|
|
159
|
+
the set, and a regional tag without a dictionary of its own (`en-US`) reads
|
|
160
|
+
its language's (`en`); a locale nothing has text for throws, naming how to
|
|
161
|
+
register it:
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
import { en, ja, registerMessages } from '@k8ordo/ui/i18n';
|
|
165
|
+
import type { Messages } from '@k8ordo/ui/i18n';
|
|
166
|
+
|
|
167
|
+
const fr: Messages = { close: 'Fermer' /* …every key */ };
|
|
168
|
+
registerMessages('fr', fr);
|
|
169
|
+
|
|
170
|
+
// A registered dictionary wins over a built-in one
|
|
171
|
+
registerMessages('en', { ...en, close: 'Dismiss' });
|
|
76
172
|
```
|
|
77
173
|
|
|
78
|
-
Resolution order is **component prop >
|
|
79
|
-
|
|
80
|
-
`Spinner`'s `label`, that prop wins
|
|
174
|
+
Resolution order is **component prop > registered dictionary > built-in
|
|
175
|
+
dictionary**. For a component with a wording prop of its own, such as
|
|
176
|
+
`Spinner`'s `label`, that prop wins.
|
|
177
|
+
|
|
178
|
+
`getMessages()` from `@k8ordo/ui/i18n` returns the wording in effect for your
|
|
179
|
+
own elements (a `renderItem`, a component beside the library). It is not a
|
|
180
|
+
hook, so it works in a Server Component — which is also why `Spinner`,
|
|
181
|
+
`Breadcrumb`, `Code`, `Alert`, `Callout`, `Reasoning`, and `ToolInvocation`
|
|
182
|
+
are Server Components.
|
|
81
183
|
|
|
82
184
|
> [Full key list and details](references/components.md) (the "i18n (message dictionary)" section)
|
|
83
185
|
|
|
@@ -99,7 +201,7 @@ Do not give everything the same tone. Soften in proportion to the element's role
|
|
|
99
201
|
| Element | Direction |
|
|
100
202
|
| ----------------------------------- | ---------------------------------------------------- |
|
|
101
203
|
| Forms (TextField, Textarea, Button) | Soft (large radii, pill buttons, generous padding) |
|
|
102
|
-
| Cards and containers | Soft (
|
|
204
|
+
| Cards and containers | Soft (`--radius-xl`–`--radius-2xl`, gentle shadow) |
|
|
103
205
|
| Alert, Badge | Precise (clarity of information comes first) |
|
|
104
206
|
| Tabs, Breadcrumb | Sharp (elements that express structure stay precise) |
|
|
105
207
|
|
|
@@ -113,9 +215,9 @@ Soft spacing and quiet refinement. The appeal is in space and shape.
|
|
|
113
215
|
|
|
114
216
|
**DO:**
|
|
115
217
|
|
|
116
|
-
- Use
|
|
218
|
+
- Use `--color-bg-subtle` (a light grey) for the page background
|
|
117
219
|
- Float content on white cards
|
|
118
|
-
- Leave enough room between cards (
|
|
220
|
+
- Leave enough room between cards (6–10 steps of `--spacing`)
|
|
119
221
|
|
|
120
222
|
**DON'T:**
|
|
121
223
|
|
|
@@ -127,9 +229,9 @@ Soft spacing and quiet refinement. The appeal is in space and shape.
|
|
|
127
229
|
|
|
128
230
|
**DO:**
|
|
129
231
|
|
|
130
|
-
- Use the Japanese fonts (Noto Sans JP, M PLUS 2)
|
|
131
|
-
- Keep to three
|
|
132
|
-
- Lean on
|
|
232
|
+
- Use the Japanese fonts (Noto Sans JP, M PLUS 2), which your app loads and sets — the library sets no font of its own, so text stays on the reset's system stack until your app sets one
|
|
233
|
+
- Keep to three weights: 400 (the inherited default), `--font-weight-medium`, `--font-weight-bold`
|
|
234
|
+
- Lean on `--font-weight-medium` being 450 — lighter than the usual 500 — for delicate emphasis
|
|
133
235
|
|
|
134
236
|
**DON'T:**
|
|
135
237
|
|
|
@@ -144,17 +246,17 @@ Soft spacing and quiet refinement. The appeal is in space and shape.
|
|
|
144
246
|
**DO:**
|
|
145
247
|
|
|
146
248
|
- Follow the 60-30-10 rule (60% neutral, 30% supporting, 10% accent)
|
|
147
|
-
- Use semantic color tokens (
|
|
249
|
+
- Use semantic color tokens (`--color-bg-subtle`, `--color-fg-mute`, …)
|
|
148
250
|
- Design dark mode as its own tone, not a derivative
|
|
149
251
|
- Keep color calm; let space and shape carry the design
|
|
150
252
|
|
|
151
253
|
**DON'T:**
|
|
152
254
|
|
|
153
255
|
- Use gradient backgrounds
|
|
154
|
-
- Use
|
|
155
|
-
- Express state with opacity
|
|
256
|
+
- Use `--color-primary-bg` on hover — use `--color-bg-mute`
|
|
257
|
+
- Express state with opacity — use the dedicated token
|
|
156
258
|
- Spread vivid color over large areas
|
|
157
|
-
- Use raw palette colors (
|
|
259
|
+
- Use raw palette colors (`--teal-500`) — use semantic tokens (`--color-primary-bg`)
|
|
158
260
|
|
|
159
261
|
> [Color details](references/color.md)
|
|
160
262
|
|
|
@@ -162,15 +264,15 @@ Soft spacing and quiet refinement. The appeal is in space and shape.
|
|
|
162
264
|
|
|
163
265
|
**DO:**
|
|
164
266
|
|
|
165
|
-
- Treat `
|
|
166
|
-
- Express relatedness through the size of the gap (
|
|
267
|
+
- Treat 6 steps of `--spacing` (`calc(var(--spacing) * 6)`) as the standard padding (inside forms and cards), 4 when compact and 8 when generous
|
|
268
|
+
- Express relatedness through the size of the gap (2 steps close, 4 standard, 8 between sections)
|
|
167
269
|
- Separate sections with Separator
|
|
168
270
|
|
|
169
271
|
**DON'T:**
|
|
170
272
|
|
|
171
273
|
- Put everything in a Card
|
|
172
274
|
- Nest cards (Card in Card)
|
|
173
|
-
- Use extremely tight spacing such as
|
|
275
|
+
- Use extremely tight spacing such as one step
|
|
174
276
|
|
|
175
277
|
> [Spacing details](references/spatial-design.md)
|
|
176
278
|
|
|
@@ -178,9 +280,9 @@ Soft spacing and quiet refinement. The appeal is in space and shape.
|
|
|
178
280
|
|
|
179
281
|
**DO:**
|
|
180
282
|
|
|
181
|
-
- Start from
|
|
182
|
-
- Express focus with `
|
|
183
|
-
- Keep hover gentle with
|
|
283
|
+
- Start from a color transition over `--duration-fast` with `--easing-out`
|
|
284
|
+
- Express focus with `box-shadow: var(--shadow-ring-info)` on `:focus-visible`
|
|
285
|
+
- Keep hover gentle with `--color-bg-mute`
|
|
184
286
|
|
|
185
287
|
**DON'T:**
|
|
186
288
|
|
|
@@ -194,7 +296,7 @@ Soft spacing and quiet refinement. The appeal is in space and shape.
|
|
|
194
296
|
|
|
195
297
|
### Button
|
|
196
298
|
|
|
197
|
-
Styling is unified through `color` and `variant`. Pill-shaped (
|
|
299
|
+
Styling is unified through `color` and `variant`. Pill-shaped (`--radius-full`).
|
|
198
300
|
|
|
199
301
|
```tsx
|
|
200
302
|
import { Button } from '@k8ordo/ui';
|
|
@@ -208,11 +310,14 @@ import { Button } from '@k8ordo/ui';
|
|
|
208
310
|
// Text only
|
|
209
311
|
<Button variant="skeleton">View details</Button>
|
|
210
312
|
|
|
211
|
-
// Render as a link (renderItem prop)
|
|
313
|
+
// Render as a link (renderItem prop). The bag holds everything the <button>
|
|
314
|
+
// would have received, so drop the two <button>-only members and spread the
|
|
315
|
+
// rest: className, children, ref, onClick, aria-disabled, aria-busy, and any
|
|
316
|
+
// attribute passed to Button all ride along.
|
|
212
317
|
<Button
|
|
213
318
|
color="base"
|
|
214
|
-
renderItem={({
|
|
215
|
-
<a
|
|
319
|
+
renderItem={({ children, disabled: _disabled, type: _type, ...props }) => (
|
|
320
|
+
<a href="/settings" {...props}>{children}</a>
|
|
216
321
|
)}
|
|
217
322
|
>
|
|
218
323
|
Settings
|
|
@@ -229,12 +334,13 @@ import { IconButton } from '@k8ordo/ui';
|
|
|
229
334
|
<IconButton color="transparent" label="Copy"><CopyIcon /></IconButton>
|
|
230
335
|
<IconButton color="primary" label="Send"><SendIcon /></IconButton>
|
|
231
336
|
|
|
232
|
-
// Render as a link (renderItem prop)
|
|
337
|
+
// Render as a link (renderItem prop). triggerProps holds the tooltip wiring
|
|
338
|
+
// and the merged ref; spread it alongside the rest.
|
|
233
339
|
<IconButton
|
|
234
340
|
color="base"
|
|
235
341
|
label="Home"
|
|
236
|
-
renderItem={({
|
|
237
|
-
<a
|
|
342
|
+
renderItem={({ children, disabled: _disabled, triggerProps, type: _type, ...props }) => (
|
|
343
|
+
<a href="/home" {...props} {...triggerProps}>
|
|
238
344
|
{children}
|
|
239
345
|
</a>
|
|
240
346
|
)}
|
|
@@ -243,21 +349,42 @@ import { IconButton } from '@k8ordo/ui';
|
|
|
243
349
|
</IconButton>
|
|
244
350
|
```
|
|
245
351
|
|
|
352
|
+
### CopyButton
|
|
353
|
+
|
|
354
|
+
For copying text, reach for `CopyButton` rather than an `IconButton` and your own
|
|
355
|
+
clipboard code: it writes to the clipboard, shows a check, and announces the
|
|
356
|
+
result to screen readers.
|
|
357
|
+
|
|
358
|
+
```tsx
|
|
359
|
+
import { CopyButton } from '@k8ordo/ui';
|
|
360
|
+
|
|
361
|
+
<CopyButton value={code} label="Copy code" iconOnly size="sm" />
|
|
362
|
+
<CopyButton value={() => window.location.href} label="Copy link" />
|
|
363
|
+
```
|
|
364
|
+
|
|
246
365
|
### Card
|
|
247
366
|
|
|
248
|
-
Floating on a shadow is the default: a white card over a
|
|
367
|
+
Floating on a shadow is the default: a white card over a `--color-bg-subtle`
|
|
368
|
+
page. The card has no padding of its own.
|
|
369
|
+
|
|
370
|
+
```css
|
|
371
|
+
/* card.module.css */
|
|
372
|
+
.body {
|
|
373
|
+
padding: calc(var(--spacing) * 6);
|
|
374
|
+
}
|
|
375
|
+
```
|
|
249
376
|
|
|
250
377
|
```tsx
|
|
251
378
|
import { Card } from '@k8ordo/ui';
|
|
252
379
|
|
|
253
380
|
// Static card (floated with a shadow)
|
|
254
381
|
<Card variant="shadow">
|
|
255
|
-
<div className=
|
|
382
|
+
<div className={styles.body}>Card content</div>
|
|
256
383
|
</Card>
|
|
257
384
|
|
|
258
385
|
// Clickable card (interactive scales it up on hover)
|
|
259
386
|
<Card variant="shadow" interactive>
|
|
260
|
-
<div className=
|
|
387
|
+
<div className={styles.body}>Content</div>
|
|
261
388
|
</Card>
|
|
262
389
|
```
|
|
263
390
|
|
|
@@ -297,19 +424,39 @@ import {
|
|
|
297
424
|
</FileField.Root>
|
|
298
425
|
```
|
|
299
426
|
|
|
427
|
+
With `@k8ordo/form`, spread what `form.field(name).input` derives onto the
|
|
428
|
+
field after `FormControl`'s props — `type`, `required`, the length and range
|
|
429
|
+
bounds, and the echoed `defaultValue` all go in as they are, whichever field
|
|
430
|
+
renders them. Uncontrolled fields keep their value in the DOM, so the form's
|
|
431
|
+
reset, `isDirty`, and error clearing hear every change, including ones a
|
|
432
|
+
component makes in code. The pairing per component is in `@k8ordo/form`'s
|
|
433
|
+
guide (`node_modules/@k8ordo/form/docs/GUIDE.md`, "Working with @k8ordo/ui").
|
|
434
|
+
|
|
435
|
+
```tsx
|
|
436
|
+
const title = form.field('title');
|
|
437
|
+
|
|
438
|
+
<FormControl
|
|
439
|
+
errorText={title.error}
|
|
440
|
+
invalid={title.invalid}
|
|
441
|
+
label="Title"
|
|
442
|
+
required={title.required}
|
|
443
|
+
renderInput={(props) => <TextField {...props} {...title.input} />}
|
|
444
|
+
/>;
|
|
445
|
+
```
|
|
446
|
+
|
|
300
447
|
## Anti-patterns: avoiding "AI slop"
|
|
301
448
|
|
|
302
449
|
Avoid the traits that make a UI recognizably AI-generated at a glance.
|
|
303
450
|
|
|
304
|
-
| Anti-pattern | The @k8ordo/ui alternative
|
|
305
|
-
| -------------------------- |
|
|
306
|
-
| Purple gradients | Flat teal/cyan color
|
|
307
|
-
| Card in Card | A Separator and spacing instead
|
|
308
|
-
| Grey text on a grey ground | Hold contrast with
|
|
309
|
-
| Bounce / spring animation |
|
|
310
|
-
| The Inter typeface | Noto Sans JP / M PLUS 2
|
|
311
|
-
| Heavy glassmorphism | A border plus a subtle background color
|
|
312
|
-
| Cramming information in | Sparse placement that lets the space breathe
|
|
451
|
+
| Anti-pattern | The @k8ordo/ui alternative |
|
|
452
|
+
| -------------------------- | --------------------------------------------------------- |
|
|
453
|
+
| Purple gradients | Flat teal/cyan color |
|
|
454
|
+
| Card in Card | A Separator and spacing instead |
|
|
455
|
+
| Grey text on a grey ground | Hold contrast with `--color-fg-base` / `--color-fg-mute` |
|
|
456
|
+
| Bounce / spring animation | A color transition over `--duration-fast`, `--easing-out` |
|
|
457
|
+
| The Inter typeface | Noto Sans JP / M PLUS 2 |
|
|
458
|
+
| Heavy glassmorphism | A border plus a subtle background color |
|
|
459
|
+
| Cramming information in | Sparse placement that lets the space breathe |
|
|
313
460
|
|
|
314
461
|
### The AI slop test
|
|
315
462
|
|
|
@@ -321,11 +468,32 @@ Avoid the traits that make a UI recognizably AI-generated at a glance.
|
|
|
321
468
|
- **Use the existing components**: look for a @k8ordo/ui component before building custom UI
|
|
322
469
|
- **Render from Server Components**: every component, compound ones included (`Dialog.Root`, `Tabs.Root`, …), can be placed in a Server Component; only the interactive parts are client modules
|
|
323
470
|
- **Keep placed state in `@k8ordo/state`**: state that lives in the URL, a history entry, localStorage, or memory is `defineLocalState` and friends, not a hook from this package
|
|
324
|
-
- **
|
|
471
|
+
- **Browser-only rendering is React's**: a component that can only render in a browser calls `use(browser())` (`browser` from `react-dom`) under a `<Suspense>`; there is no `useClient` here and no "mounted" flag
|
|
472
|
+
- **Use semantic tokens**: tokens (`--color-primary-bg`), never raw color values or the palette (`--teal-500`)
|
|
325
473
|
- **Let space and shape carry it**: character comes from spacing and soft radii, not from vivid color
|
|
326
474
|
- **Do not forget dark mode**: semantic tokens handle it for you
|
|
475
|
+
- **High contrast is handled too**: the tokens follow `prefers-contrast: more` and the components stay legible under `forced-colors: active`; for your own UI, see [High contrast and forced colors](references/color.md#high-contrast-and-forced-colors)
|
|
327
476
|
- **Accessibility**: `aria-label`, keyboard navigation, and state that does not rely on color alone
|
|
328
477
|
|
|
478
|
+
## Testing
|
|
479
|
+
|
|
480
|
+
Run component tests in a real browser — Vitest browser mode or Playwright —
|
|
481
|
+
the way this library tests itself. Every interactive component is built
|
|
482
|
+
directly on APIs a browser has and jsdom does not: `ResizeObserver`,
|
|
483
|
+
`IntersectionObserver`, `matchMedia`, `HTMLDialogElement`'s `showModal` /
|
|
484
|
+
`close`, and the Popover API. None of them is called through a support check,
|
|
485
|
+
so under jsdom `Tooltip`, `IconButton` (unless `tooltipDisabled`), `Tabs`,
|
|
486
|
+
`Autocomplete`, `Combobox`, `Toolbar`, `ResizablePanels`, `InView`, `Resize`,
|
|
487
|
+
and `Conversation` throw as soon as they mount; `Modal`, `CommandPalette`,
|
|
488
|
+
`Drawer`, `Popover`, `DropdownMenu`, `ContextMenu`, `ListBox`, and `DatePicker`
|
|
489
|
+
throw the moment they open (a `DropdownMenu` holding a `SubMenu` already at
|
|
490
|
+
mount); and a `clearable` `FileField.ItemList` throws once it lists a file.
|
|
491
|
+
|
|
492
|
+
This is not a gap to be stubbed around. A synthetic DOM (jsdom, happy-dom) has
|
|
493
|
+
no layout engine, so even with stubs in place a passing assertion about focus,
|
|
494
|
+
placement, or visibility there means very little — the thing you wanted to
|
|
495
|
+
check is the thing it cannot model.
|
|
496
|
+
|
|
329
497
|
## Detailed reference
|
|
330
498
|
|
|
331
499
|
- Typography: [references/typography.md](references/typography.md)
|
|
@@ -333,7 +501,6 @@ Avoid the traits that make a UI recognizably AI-generated at a glance.
|
|
|
333
501
|
- Spacing and layout: [references/spatial-design.md](references/spatial-design.md)
|
|
334
502
|
- Interaction: [references/interaction-design.md](references/interaction-design.md)
|
|
335
503
|
- Component catalog: [references/components.md](references/components.md)
|
|
336
|
-
-
|
|
337
|
-
- Helpers and types: [references/helpers.md](references/helpers.md)
|
|
504
|
+
- Types: [references/types.md](references/types.md)
|
|
338
505
|
- AI chat (Conversation / Message / PromptInput, …): [references/ai-chat.md](references/ai-chat.md)
|
|
339
506
|
- Generative UI (having an LLM generate UI via json-render / OpenUI): [references/generative-ui.md](references/generative-ui.md)
|
package/docs/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @k8ordo/ui
|
|
2
2
|
|
|
3
3
|
> React components from k8ordo, with semantic design tokens, dark mode,
|
|
4
|
-
> built-in Japanese
|
|
4
|
+
> built-in wording that follows `@k8ordo/i18n` (Japanese and English included), AI chat components, and official generative UI
|
|
5
5
|
> adapters (json-render & OpenUI) that let an LLM generate, validate, and render
|
|
6
6
|
> on-brand UIs from these components.
|
|
7
7
|
>
|
|
@@ -14,16 +14,20 @@ Start with GUIDE.md, then follow the reference most relevant to the task.
|
|
|
14
14
|
|
|
15
15
|
## Guide
|
|
16
16
|
|
|
17
|
-
- [Design Guide](GUIDE.md): setup, i18n (
|
|
17
|
+
- [Design Guide](GUIDE.md): setup, dark mode (the `dark` class that `@k8ordo/color-scheme` puts on `<html>`, and the `color-scheme` the stylesheet sets to match), i18n (wording in `@k8ordo/i18n`'s current locale, English without a locale set, registering other locales), design direction, aesthetic guidelines, component usage principles, anti-patterns, implementation principles, testing (component tests belong in a real browser — Vitest browser mode or Playwright — because the components call browser APIs jsdom does not implement).
|
|
18
18
|
|
|
19
19
|
## References
|
|
20
20
|
|
|
21
|
-
- [Components](references/components.md): full component list, import paths, props, and i18n — every component, compound ones included (`Dialog.Root`, `Tabs.Root`, …), renders from a Server Component — component wording comes from
|
|
22
|
-
- [AI chat](references/ai-chat.md): AI chat components from `@k8ordo/ui/ai` (Conversation / Message / PromptInput / Reasoning / Suggestion / ToolInvocation), streaming Markdown `Response` from `@k8ordo/ui/ai/response` (optional peer `streamdown`), and `mapMessageParts` from `@k8ordo/ui/ai-sdk` to render AI SDK `UIMessage.parts` (optional peer `ai`).
|
|
23
|
-
- [Generative UI](references/generative-ui.md): use json-render / OpenUI to make an LLM generate UIs — `catalog.prompt()` (server-safe), `<JsonRenderUI spec={spec} />` (client), `validateGeneratedSpec()` (validate/repair LLM output), `satisfies UISpec` (typed specs),
|
|
21
|
+
- [Components](references/components.md): full component list, import paths, props, and i18n — every component, compound ones included (`Dialog.Root`, `Tabs.Root`, …), renders from a Server Component — component wording comes from the dictionary of `@k8ordo/i18n`'s current locale (English when the app defines no locale set); `@k8ordo/ui/i18n` exports `ja` / `en` / the `Messages` type, `registerMessages(locale, messages)` for any other locale or a replacement (per-component wording props win over any dictionary), and `getMessages()` — not a hook — to read the wording in effect in your own elements.
|
|
22
|
+
- [AI chat](references/ai-chat.md): AI chat components from `@k8ordo/ui/ai` (Conversation / Message / PromptInput / Reasoning / Suggestion / ToolInvocation / Attachment / Source) — tool approval, attachments, sources, and message actions included, streaming Markdown `Response` from `@k8ordo/ui/ai/response` (optional peer `streamdown`), and `mapMessageParts` from `@k8ordo/ui/ai-sdk` to render AI SDK `UIMessage.parts` (optional peer `ai`).
|
|
23
|
+
- [Generative UI](references/generative-ui.md): use json-render / OpenUI to make an LLM generate UIs — `catalog.prompt()` (server-safe), `<JsonRenderUI spec={spec} />` (client), `validateGeneratedSpec()` (validate/repair LLM output), `satisfies UISpec` (typed specs), `@k8ordo/ui/openui/prompt`, and which exports the catalog leaves out on purpose.
|
|
24
24
|
- [Typography](references/typography.md): type scale and usage.
|
|
25
25
|
- [Color](references/color.md): semantic token system and dark mode.
|
|
26
26
|
- [Spacing & layout](references/spatial-design.md): spacing scale and layout patterns.
|
|
27
27
|
- [Interaction](references/interaction-design.md): motion and interaction guidelines.
|
|
28
|
-
- [
|
|
29
|
-
|
|
28
|
+
- [Types](references/types.md): the shared types for typing component props (`Status` / `Direction` / `Placement` / `ModalSide` / `DrawerSide` / `Option`).
|
|
29
|
+
|
|
30
|
+
## Data exports
|
|
31
|
+
|
|
32
|
+
- `@k8ordo/ui/tokens`: the design tokens as data — `tokens`, a DTCG resolver document (Resolver Module 2025.10) whose set is the `:root` tokens and whose modifiers are the modes (`.dark`, `prefers-contrast: more`).
|
|
33
|
+
- `@k8ordo/ui/props.json`: every component's props as JSON (`docs/props.generated.json`), generated from the types — the same data as the Props blocks in components.md.
|