@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
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { accordionProps, alertProps, anchorProps, autocompleteProps, avatarProps, badgeProps, breadcrumbProps, buttonProps, cardProps, checkboxCardProps, checkboxGroupProps, checkboxProps, chevronIconProps, codeProps, dialogProps, drawerProps, dropdownMenuProps, fileFieldProps, formControlProps, formProps, gridProps, headingProps, iconButtonProps, iconProps, listBoxProps, modalProps, numberFieldProps, paginationProps, passwordInputProps, popoverProps, progressProps, radioCardProps, radioProps,
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import { accordionProps, alertProps, anchorProps, autocompleteProps, avatarProps, badgeProps, breadcrumbProps, buttonProps, calendarProps, calloutProps, cardProps, carouselProps, checkboxCardProps, checkboxGroupProps, checkboxProps, chevronIconProps, codeProps, colorPickerProps, comboboxProps, copyButtonProps, dataTableProps, dateFieldProps, datePickerProps, dialogProps, drawerProps, dropdownMenuProps, emptyStateProps, fileFieldProps, formControlProps, formProps, gridProps, headingProps, iconButtonProps, iconProps, kbdProps, listBoxProps, modalProps, numberFieldProps, paginationProps, passwordInputProps, popoverProps, progressProps, radioCardProps, radioProps, rangeSliderProps, selectProps, separatorProps, sideNavProps, skeletonProps, sliderProps, spinnerProps, stackProps, statusIconProps, stepperProps, switchProps, tableProps, tabsProps, textFieldProps, textareaProps, toastProps, toolbarProps, tooltipProps, treeProps } from "../_shared/schemas.mjs";
|
|
3
2
|
import { autoFixSpec, defineCatalog, isNonEmptySpec, validateSpec } from "@json-render/core";
|
|
4
3
|
import { schema } from "@json-render/react/schema";
|
|
5
4
|
//#region src/integrations/json-render/catalog.ts
|
|
@@ -17,202 +16,263 @@ const catalog = defineCatalog(schema, {
|
|
|
17
16
|
Stack: {
|
|
18
17
|
props: stackProps,
|
|
19
18
|
slots: ["default"],
|
|
20
|
-
description: "
|
|
19
|
+
description: "Layout container that places its children in a row or a column with even spacing. gap sets the space between children and padding (none to xl) the space inside; give a section padding when it needs room around its content."
|
|
21
20
|
},
|
|
22
21
|
Grid: {
|
|
23
22
|
props: gridProps,
|
|
24
23
|
slots: ["default"],
|
|
25
|
-
description: "
|
|
24
|
+
description: "Places its children in a grid. Set cols (1 to 6, auto-fill, or auto-fit) and gap; with auto-fill or auto-fit, minItemSize sets the smallest size of each cell."
|
|
26
25
|
},
|
|
27
26
|
Button: {
|
|
28
27
|
props: buttonProps,
|
|
29
|
-
description: "
|
|
28
|
+
description: "Action button. With href it renders as a link (<a>)."
|
|
30
29
|
},
|
|
31
30
|
Card: {
|
|
32
31
|
props: cardProps,
|
|
33
32
|
slots: ["default"],
|
|
34
|
-
description: "
|
|
33
|
+
description: "Card that groups content (a container). size (sm/md/lg, default md) sets its inner padding, so a Stack inside it needs no padding of its own. interactive makes it scale up on hover."
|
|
35
34
|
},
|
|
36
35
|
Badge: {
|
|
37
36
|
props: badgeProps,
|
|
38
|
-
description: "
|
|
37
|
+
description: "Badge for a status or a label."
|
|
39
38
|
},
|
|
40
39
|
Heading: {
|
|
41
40
|
props: headingProps,
|
|
42
|
-
description: "
|
|
41
|
+
description: "Heading (h1 to h6)."
|
|
43
42
|
},
|
|
44
43
|
Alert: {
|
|
45
44
|
props: alertProps,
|
|
46
|
-
description: "
|
|
45
|
+
description: "Alert that reports a status. message is a string or an array of strings."
|
|
46
|
+
},
|
|
47
|
+
Callout: {
|
|
48
|
+
props: calloutProps,
|
|
49
|
+
description: "Note inside the content (a tip, a caveat). Unlike Alert, it is not announced as a status. content is plain text; label is an optional bold line above it."
|
|
47
50
|
},
|
|
48
51
|
Spinner: {
|
|
49
52
|
props: spinnerProps,
|
|
50
|
-
description: "
|
|
53
|
+
description: "Loading spinner."
|
|
51
54
|
},
|
|
52
55
|
Separator: {
|
|
53
56
|
props: separatorProps,
|
|
54
|
-
description: "
|
|
57
|
+
description: "Divider line."
|
|
55
58
|
},
|
|
56
59
|
TextField: {
|
|
57
60
|
props: textFieldProps,
|
|
58
|
-
description: "
|
|
61
|
+
description: "Single-line text input. defaultValue can be bound to state with $bindState."
|
|
59
62
|
},
|
|
60
63
|
Checkbox: {
|
|
61
64
|
props: checkboxProps,
|
|
62
|
-
description: "
|
|
65
|
+
description: "Checkbox. defaultChecked can be bound to state with $bindState."
|
|
63
66
|
},
|
|
64
67
|
Switch: {
|
|
65
68
|
props: switchProps,
|
|
66
|
-
description: "
|
|
69
|
+
description: "On/off switch. defaultChecked can be bound to state with $bindState."
|
|
67
70
|
},
|
|
68
71
|
Select: {
|
|
69
72
|
props: selectProps,
|
|
70
|
-
description: "
|
|
73
|
+
description: "Dropdown select. defaultValue can be bound to state with $bindState."
|
|
71
74
|
},
|
|
72
75
|
Tabs: {
|
|
73
76
|
props: tabsProps,
|
|
74
|
-
description: "
|
|
77
|
+
description: "Tabs. Each tab has a label and text content."
|
|
75
78
|
},
|
|
76
79
|
Accordion: {
|
|
77
80
|
props: accordionProps,
|
|
78
|
-
description: "
|
|
81
|
+
description: "Accordion of items that open and close. Each item has a title and text content."
|
|
82
|
+
},
|
|
83
|
+
Stepper: {
|
|
84
|
+
props: stepperProps,
|
|
85
|
+
description: "Steps of a process in order, marking the ones done and the current one (display only)."
|
|
79
86
|
},
|
|
80
87
|
Breadcrumb: {
|
|
81
88
|
props: breadcrumbProps,
|
|
82
|
-
description: "
|
|
89
|
+
description: "Breadcrumb trail."
|
|
90
|
+
},
|
|
91
|
+
DataTable: {
|
|
92
|
+
props: dataTableProps,
|
|
93
|
+
description: "Table the reader can sort (by the columns marked sortable) and, with selectable, pick rows from. Use it for records someone works through; use Table for data only read."
|
|
94
|
+
},
|
|
95
|
+
Tree: {
|
|
96
|
+
props: treeProps,
|
|
97
|
+
description: "Tree of nodes that open and close, such as files and folders, navigable with the arrow keys. List every node flat; a child names its parent by parentId."
|
|
98
|
+
},
|
|
99
|
+
SideNav: {
|
|
100
|
+
props: sideNavProps,
|
|
101
|
+
description: "Side navigation: groups of links, each group under a small title. Mark the page being shown with current: true."
|
|
83
102
|
},
|
|
84
103
|
Table: {
|
|
85
104
|
props: tableProps,
|
|
86
|
-
description: "
|
|
105
|
+
description: "Table with columns (the headers) and rows (the cell strings of each row)."
|
|
87
106
|
},
|
|
88
107
|
Anchor: {
|
|
89
108
|
props: anchorProps,
|
|
90
|
-
description: "
|
|
109
|
+
description: "Text link."
|
|
91
110
|
},
|
|
92
111
|
Avatar: {
|
|
93
112
|
props: avatarProps,
|
|
94
|
-
description: "
|
|
113
|
+
description: "Avatar (an image or initials)."
|
|
95
114
|
},
|
|
96
115
|
Code: {
|
|
97
116
|
props: codeProps,
|
|
98
|
-
description: "
|
|
117
|
+
description: "Inline code or value."
|
|
118
|
+
},
|
|
119
|
+
Kbd: {
|
|
120
|
+
props: kbdProps,
|
|
121
|
+
description: "Keyboard shortcut. keys lists the keys pressed together, and each is drawn as its own key cap."
|
|
122
|
+
},
|
|
123
|
+
EmptyState: {
|
|
124
|
+
props: emptyStateProps,
|
|
125
|
+
description: "Placeholder for a list, table, or search with nothing to show: a title, an optional description, and an optional icon."
|
|
126
|
+
},
|
|
127
|
+
Carousel: {
|
|
128
|
+
props: carouselProps,
|
|
129
|
+
slots: ["default"],
|
|
130
|
+
description: "Horizontally scrolling carousel with previous and next buttons. Each child is one slide. slideSize sets how much of the track one slide takes (full, lg, md for two, sm for three)."
|
|
99
131
|
},
|
|
100
132
|
Progress: {
|
|
101
133
|
props: progressProps,
|
|
102
|
-
description: "
|
|
134
|
+
description: "Progress bar. Leave value out when progress is unknown; it then shows an animated bar."
|
|
103
135
|
},
|
|
104
136
|
Skeleton: {
|
|
105
137
|
props: skeletonProps,
|
|
106
|
-
description: "
|
|
138
|
+
description: "Loading placeholder."
|
|
107
139
|
},
|
|
108
140
|
Icon: {
|
|
109
141
|
props: iconProps,
|
|
110
|
-
description: "
|
|
142
|
+
description: "Icon, chosen by name."
|
|
111
143
|
},
|
|
112
144
|
ChevronIcon: {
|
|
113
145
|
props: chevronIconProps,
|
|
114
|
-
description: "
|
|
146
|
+
description: "Arrow icon. direction sets which way it points."
|
|
115
147
|
},
|
|
116
148
|
StatusIcon: {
|
|
117
149
|
props: statusIconProps,
|
|
118
|
-
description: "
|
|
150
|
+
description: "Icon for a status (success/info/warning/error). It is decorative; to show a message, use Alert."
|
|
119
151
|
},
|
|
120
152
|
IconButton: {
|
|
121
153
|
props: iconButtonProps,
|
|
122
|
-
description: "
|
|
154
|
+
description: "Icon-only button (label is required and shown as its tooltip)."
|
|
155
|
+
},
|
|
156
|
+
CopyButton: {
|
|
157
|
+
props: copyButtonProps,
|
|
158
|
+
description: "Button that copies value to the clipboard and confirms it. With iconOnly, label becomes its tooltip."
|
|
123
159
|
},
|
|
124
160
|
Textarea: {
|
|
125
161
|
props: textareaProps,
|
|
126
|
-
description: "
|
|
162
|
+
description: "Multi-line text input. defaultValue can be bound to state with $bindState."
|
|
127
163
|
},
|
|
128
164
|
PasswordInput: {
|
|
129
165
|
props: passwordInputProps,
|
|
130
|
-
description: "
|
|
166
|
+
description: "Password input. defaultValue can be bound to state with $bindState."
|
|
131
167
|
},
|
|
132
168
|
NumberField: {
|
|
133
169
|
props: numberFieldProps,
|
|
134
|
-
description: "
|
|
170
|
+
description: "Number input. defaultValue can be bound to state with $bindState."
|
|
135
171
|
},
|
|
136
172
|
Slider: {
|
|
137
173
|
props: sliderProps,
|
|
138
|
-
description: "
|
|
174
|
+
description: "Slider. defaultValue can be bound to state with $bindState."
|
|
175
|
+
},
|
|
176
|
+
RangeSlider: {
|
|
177
|
+
props: rangeSliderProps,
|
|
178
|
+
description: "Slider with two thumbs for picking a range. defaultValue ([lower, upper]) can be bound to state with $bindState."
|
|
179
|
+
},
|
|
180
|
+
DateField: {
|
|
181
|
+
props: dateFieldProps,
|
|
182
|
+
description: "Date input with a visible label. Dates are YYYY-MM-DD strings. defaultValue can be bound to state with $bindState."
|
|
183
|
+
},
|
|
184
|
+
DatePicker: {
|
|
185
|
+
props: datePickerProps,
|
|
186
|
+
description: "Date input with a visible label and a button that opens a calendar. Dates are YYYY-MM-DD strings. defaultValue can be bound to state with $bindState."
|
|
187
|
+
},
|
|
188
|
+
Calendar: {
|
|
189
|
+
props: calendarProps,
|
|
190
|
+
description: "Month calendar shown inline for picking one day (YYYY-MM-DD). It submits nothing; in a form, use DatePicker. defaultValue can be bound to state with $bindState."
|
|
191
|
+
},
|
|
192
|
+
ColorPicker: {
|
|
193
|
+
props: colorPickerProps,
|
|
194
|
+
description: "Color input with a visible label: a #rrggbb text field, hue / saturation / lightness sliders, and optional preset swatches. defaultValue can be bound to state with $bindState."
|
|
139
195
|
},
|
|
140
196
|
Radio: {
|
|
141
197
|
props: radioProps,
|
|
142
|
-
description: "
|
|
198
|
+
description: "Radio buttons for a single choice. defaultValue can be bound to state with $bindState."
|
|
143
199
|
},
|
|
144
200
|
RadioCard: {
|
|
145
201
|
props: radioCardProps,
|
|
146
|
-
description: "
|
|
202
|
+
description: "Single choice presented as cards. defaultValue can be bound to state with $bindState."
|
|
147
203
|
},
|
|
148
204
|
CheckboxCard: {
|
|
149
205
|
props: checkboxCardProps,
|
|
150
|
-
description: "
|
|
206
|
+
description: "Multiple choice presented as cards. defaultValue can be bound to state with $bindState."
|
|
151
207
|
},
|
|
152
208
|
Pagination: {
|
|
153
209
|
props: paginationProps,
|
|
154
|
-
description: "
|
|
210
|
+
description: "Pagination. defaultPage can be bound to state with $bindState."
|
|
155
211
|
},
|
|
156
212
|
Form: {
|
|
157
213
|
props: formProps,
|
|
158
214
|
slots: ["default"],
|
|
159
|
-
description: "
|
|
215
|
+
description: "Wrapper for form elements (a vertical layout)."
|
|
160
216
|
},
|
|
161
217
|
Modal: {
|
|
162
218
|
props: modalProps,
|
|
163
219
|
slots: ["default"],
|
|
164
|
-
description: "
|
|
220
|
+
description: "Modal dialog. A self-contained widget that opens from a button labeled triggerLabel."
|
|
165
221
|
},
|
|
166
222
|
Dialog: {
|
|
167
223
|
props: dialogProps,
|
|
168
224
|
slots: ["default"],
|
|
169
|
-
description: "
|
|
225
|
+
description: "Centered dialog that opens from a button labeled triggerLabel."
|
|
170
226
|
},
|
|
171
227
|
Drawer: {
|
|
172
228
|
props: drawerProps,
|
|
173
229
|
slots: ["default"],
|
|
174
|
-
description: "
|
|
230
|
+
description: "Side drawer that opens from a button labeled triggerLabel."
|
|
175
231
|
},
|
|
176
232
|
Popover: {
|
|
177
233
|
props: popoverProps,
|
|
178
234
|
slots: ["default"],
|
|
179
|
-
description: "
|
|
235
|
+
description: "Popover that a button labeled triggerLabel opens and closes."
|
|
180
236
|
},
|
|
181
237
|
Tooltip: {
|
|
182
238
|
props: tooltipProps,
|
|
183
|
-
description: "
|
|
239
|
+
description: "Tooltip shown on hover or focus."
|
|
240
|
+
},
|
|
241
|
+
Toolbar: {
|
|
242
|
+
props: toolbarProps,
|
|
243
|
+
description: "Row (or column) of buttons that arrow keys move between, e.g. formatting actions. Give each item an icon to show only the icon."
|
|
184
244
|
},
|
|
185
245
|
DropdownMenu: {
|
|
186
246
|
props: dropdownMenuProps,
|
|
187
|
-
description: "
|
|
247
|
+
description: "Dropdown menu."
|
|
188
248
|
},
|
|
189
249
|
Toast: {
|
|
190
250
|
props: toastProps,
|
|
191
|
-
description: "
|
|
192
|
-
},
|
|
193
|
-
ScrollLinked: {
|
|
194
|
-
props: scrollLinkedProps,
|
|
195
|
-
description: "ページスクロール進捗バー(fixed top)。"
|
|
251
|
+
description: "Toast notification that a button labeled triggerLabel shows."
|
|
196
252
|
},
|
|
197
253
|
ListBox: {
|
|
198
254
|
props: listBoxProps,
|
|
199
|
-
description: "
|
|
255
|
+
description: "Single-choice list in a popup."
|
|
200
256
|
},
|
|
201
257
|
CheckboxGroup: {
|
|
202
258
|
props: checkboxGroupProps,
|
|
203
|
-
description: "
|
|
259
|
+
description: "Group of checkboxes."
|
|
260
|
+
},
|
|
261
|
+
Combobox: {
|
|
262
|
+
props: comboboxProps,
|
|
263
|
+
description: "Text field with a visible label that filters a list of options as you type, for picking one. Prefer it to ListBox when there are many options. defaultValue can be bound to state with $bindState."
|
|
204
264
|
},
|
|
205
265
|
Autocomplete: {
|
|
206
266
|
props: autocompleteProps,
|
|
207
|
-
description: "
|
|
267
|
+
description: "Tag-style autocomplete for multiple choices."
|
|
208
268
|
},
|
|
209
269
|
FileField: {
|
|
210
270
|
props: fileFieldProps,
|
|
211
|
-
description: "
|
|
271
|
+
description: "File picker field. With dropzone, files can also be dropped onto it."
|
|
212
272
|
},
|
|
213
273
|
FormControl: {
|
|
214
274
|
props: formControlProps,
|
|
215
|
-
description: "
|
|
275
|
+
description: "Field with a label and help or error text (text/textarea/password)."
|
|
216
276
|
}
|
|
217
277
|
},
|
|
218
278
|
actions: {}
|
|
@@ -225,9 +285,9 @@ const catalog = defineCatalog(schema, {
|
|
|
225
285
|
* const systemPrompt = catalog.prompt({ customRules: [...uiRules] });
|
|
226
286
|
*/
|
|
227
287
|
const uiRules = [
|
|
228
|
-
"
|
|
229
|
-
"href
|
|
230
|
-
"Tabs
|
|
288
|
+
"Every row in rows of a Table must have exactly as many cells as there are columns.",
|
|
289
|
+
"An href must be an absolute URL starting with https:// or http://, or a path starting with /.",
|
|
290
|
+
"The content of Tabs and Accordion must be plain text; components cannot be nested inside it."
|
|
231
291
|
];
|
|
232
292
|
const buildRepairPrompt = (issues) => ["The generated UI spec is invalid. Fix the following issues and return the corrected spec:", ...issues.map((issue) => issue.elementKey === void 0 ? `- ${issue.message}` : `- [${issue.elementKey}] ${issue.message}`)].join("\n");
|
|
233
293
|
/**
|
|
@@ -238,7 +298,10 @@ const buildRepairPrompt = (issues) => ["The generated UI spec is invalid. Fix th
|
|
|
238
298
|
* 既定値のまま描画されて壊れたことにすら気づけない。キー集合を取り出して
|
|
239
299
|
* 自前で照合する。
|
|
240
300
|
*/
|
|
241
|
-
const knownPropKeys = (propsSchema) =>
|
|
301
|
+
const knownPropKeys = (propsSchema) => {
|
|
302
|
+
const shape = "shape" in propsSchema ? propsSchema.shape : void 0;
|
|
303
|
+
return typeof shape === "object" && shape !== null ? Object.keys(shape) : void 0;
|
|
304
|
+
};
|
|
242
305
|
/** spec 側は LLM 出力なので、型に反して props が欠けていることがある。 */
|
|
243
306
|
const givenPropKeys = (props) => typeof props === "object" && props !== null ? Object.keys(props) : [];
|
|
244
307
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { Spec } from "@json-render/core";
|
|
3
3
|
//#region src/integrations/json-render/registry.d.ts
|
|
4
|
-
declare const registry: import("@json-render/react").ComponentRegistry;
|
|
4
|
+
export declare const registry: import("@json-render/react").ComponentRegistry;
|
|
5
5
|
/**
|
|
6
6
|
* spec を @k8ordo/ui の部品で描画する、事前結線済みコンポーネント。
|
|
7
7
|
*
|
|
@@ -17,7 +17,7 @@ declare const registry: import("@json-render/react").ComponentRegistry;
|
|
|
17
17
|
*
|
|
18
18
|
* <JsonRenderUI spec={spec} />
|
|
19
19
|
*/
|
|
20
|
-
declare const JsonRenderUI: FC<{
|
|
20
|
+
export declare const JsonRenderUI: FC<{
|
|
21
21
|
spec: Spec | null;
|
|
22
22
|
loading?: boolean;
|
|
23
23
|
onStateChange?: (changes: Array<{
|
|
@@ -25,5 +25,4 @@ declare const JsonRenderUI: FC<{
|
|
|
25
25
|
value: unknown;
|
|
26
26
|
}>) => void;
|
|
27
27
|
}>;
|
|
28
|
-
//#endregion
|
|
29
|
-
export { JsonRenderUI, registry };
|
|
28
|
+
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { DialogWidget, DrawerWidget, FileFieldWidget, FormControlWidget, ModalWidget, ToastWidget, renderAccordion, renderAlert, renderAnchor, renderAutocomplete, renderAvatar, renderBadge, renderBreadcrumb, renderButton, renderCard, renderCheckbox, renderCheckboxCard, renderCheckboxGroup, renderChevronIcon, renderCode, renderDropdownMenu, renderForm, renderGrid, renderHeading, renderIcon, renderIconButton, renderListBox, renderNumberField, renderPagination, renderPasswordInput, renderPopover, renderProgress, renderRadio, renderRadioCard,
|
|
2
|
+
import { DataTableWidget, DialogWidget, DrawerWidget, FileFieldWidget, FormControlWidget, ModalWidget, ToastWidget, renderAccordion, renderAlert, renderAnchor, renderAutocomplete, renderAvatar, renderBadge, renderBreadcrumb, renderButton, renderCalendar, renderCallout, renderCard, renderCarousel, renderCheckbox, renderCheckboxCard, renderCheckboxGroup, renderChevronIcon, renderCode, renderColorPicker, renderCombobox, renderCopyButton, renderDateField, renderDatePicker, renderDropdownMenu, renderEmptyState, renderForm, renderGrid, renderHeading, renderIcon, renderIconButton, renderKbd, renderListBox, renderNumberField, renderPagination, renderPasswordInput, renderPopover, renderProgress, renderRadio, renderRadioCard, renderRangeSlider, renderSelect, renderSeparator, renderSideNav, renderSkeleton, renderSlider, renderSpinner, renderStack, renderStatusIcon, renderStepper, renderSwitch, renderTable, renderTabs, renderTextField, renderTextarea, renderToolbar, renderTooltip, renderTree } from "../_shared/renderers.mjs";
|
|
3
3
|
import { catalog } from "./catalog.mjs";
|
|
4
|
-
import { useState } from "react";
|
|
4
|
+
import { Children, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { JSONUIProvider, Renderer, defineRegistry, useBoundProp } from "@json-render/react";
|
|
7
7
|
//#region src/integrations/json-render/registry.tsx
|
|
@@ -26,6 +26,7 @@ const { registry } = defineRegistry(catalog, { components: {
|
|
|
26
26
|
Badge: ({ props }) => renderBadge(props),
|
|
27
27
|
Heading: ({ props }) => renderHeading(props),
|
|
28
28
|
Alert: ({ props }) => renderAlert(props),
|
|
29
|
+
Callout: ({ props }) => renderCallout(props),
|
|
29
30
|
Spinner: ({ props }) => renderSpinner(props),
|
|
30
31
|
Separator: ({ props }) => renderSeparator(props),
|
|
31
32
|
Tabs: ({ props }) => renderTabs(props),
|
|
@@ -48,15 +49,23 @@ const { registry } = defineRegistry(catalog, { components: {
|
|
|
48
49
|
Anchor: ({ props }) => renderAnchor(props),
|
|
49
50
|
Avatar: ({ props }) => renderAvatar(props),
|
|
50
51
|
Code: ({ props }) => renderCode(props),
|
|
52
|
+
Kbd: ({ props }) => renderKbd(props),
|
|
53
|
+
EmptyState: ({ props }) => renderEmptyState(props),
|
|
54
|
+
Carousel: ({ props, children }) => renderCarousel(props, Children.toArray(children)),
|
|
51
55
|
Progress: ({ props }) => renderProgress(props),
|
|
52
56
|
Skeleton: ({ props }) => renderSkeleton(props),
|
|
53
57
|
Icon: ({ props }) => renderIcon(props),
|
|
54
58
|
ChevronIcon: ({ props }) => renderChevronIcon(props),
|
|
55
59
|
StatusIcon: ({ props }) => renderStatusIcon(props),
|
|
56
60
|
IconButton: ({ props }) => renderIconButton(props),
|
|
61
|
+
CopyButton: ({ props }) => renderCopyButton(props),
|
|
57
62
|
Accordion: ({ props }) => renderAccordion(props),
|
|
58
63
|
Breadcrumb: ({ props }) => renderBreadcrumb(props),
|
|
64
|
+
Stepper: ({ props }) => renderStepper(props),
|
|
59
65
|
Table: ({ props }) => renderTable(props),
|
|
66
|
+
DataTable: ({ props }) => /* @__PURE__ */ jsx(DataTableWidget, { props }),
|
|
67
|
+
Tree: ({ props }) => renderTree(props),
|
|
68
|
+
SideNav: ({ props }) => renderSideNav(props),
|
|
60
69
|
Textarea: ({ props, bindings }) => {
|
|
61
70
|
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
62
71
|
return renderTextarea(props, value, setValue);
|
|
@@ -65,6 +74,27 @@ const { registry } = defineRegistry(catalog, { components: {
|
|
|
65
74
|
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
66
75
|
return renderPasswordInput(props, value, setValue);
|
|
67
76
|
},
|
|
77
|
+
RangeSlider: ({ props, bindings }) => {
|
|
78
|
+
const whole = [props.min ?? 0, props.max ?? 100];
|
|
79
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, whole);
|
|
80
|
+
return renderRangeSlider(props, value, setValue);
|
|
81
|
+
},
|
|
82
|
+
ColorPicker: ({ props, bindings }) => {
|
|
83
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
84
|
+
return renderColorPicker(props, value, setValue);
|
|
85
|
+
},
|
|
86
|
+
DateField: ({ props, bindings }) => {
|
|
87
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
88
|
+
return renderDateField(props, value, setValue);
|
|
89
|
+
},
|
|
90
|
+
DatePicker: ({ props, bindings }) => {
|
|
91
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
92
|
+
return renderDatePicker(props, value, setValue);
|
|
93
|
+
},
|
|
94
|
+
Calendar: ({ props, bindings }) => {
|
|
95
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
96
|
+
return renderCalendar(props, value, setValue);
|
|
97
|
+
},
|
|
68
98
|
Radio: ({ props, bindings }) => {
|
|
69
99
|
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "", props.defaultValue ?? props.options[0]?.value ?? "");
|
|
70
100
|
return renderRadio(props, value, setValue);
|
|
@@ -74,7 +104,7 @@ const { registry } = defineRegistry(catalog, { components: {
|
|
|
74
104
|
return renderRadioCard(props, value, setValue);
|
|
75
105
|
},
|
|
76
106
|
NumberField: ({ props, bindings }) => {
|
|
77
|
-
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue,
|
|
107
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, null);
|
|
78
108
|
return renderNumberField(props, value, setValue);
|
|
79
109
|
},
|
|
80
110
|
Slider: ({ props, bindings }) => {
|
|
@@ -105,8 +135,8 @@ const { registry } = defineRegistry(catalog, { components: {
|
|
|
105
135
|
Popover: ({ props, children }) => renderPopover(props, children),
|
|
106
136
|
Tooltip: ({ props }) => renderTooltip(props),
|
|
107
137
|
DropdownMenu: ({ props }) => renderDropdownMenu(props),
|
|
138
|
+
Toolbar: ({ props }) => renderToolbar(props),
|
|
108
139
|
Toast: ({ props }) => /* @__PURE__ */ jsx(ToastWidget, { props }),
|
|
109
|
-
ScrollLinked: ({ props }) => renderScrollLinked(props),
|
|
110
140
|
ListBox: ({ props, bindings }) => {
|
|
111
141
|
const path = bindings?.defaultValue;
|
|
112
142
|
const hasBinding = path !== void 0 && path !== "";
|
|
@@ -121,6 +151,10 @@ const { registry } = defineRegistry(catalog, { components: {
|
|
|
121
151
|
const [local, setLocal] = useState(props.defaultValue ?? []);
|
|
122
152
|
return renderCheckboxGroup(props, hasBinding ? bound ?? [] : local, hasBinding ? setBound : setLocal);
|
|
123
153
|
},
|
|
154
|
+
Combobox: ({ props, bindings }) => {
|
|
155
|
+
const [value, setValue] = useBoundOrLocal(props.defaultValue, bindings?.defaultValue, "");
|
|
156
|
+
return renderCombobox(props, value, setValue);
|
|
157
|
+
},
|
|
124
158
|
Autocomplete: ({ props, bindings }) => {
|
|
125
159
|
const path = bindings?.defaultValue;
|
|
126
160
|
const hasBinding = path !== void 0 && path !== "";
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { AutocompleteProps, CheckboxCardProps, CheckboxGroupProps, CheckboxProps, ListBoxProps, NumberFieldProps, PaginationProps, PasswordInputProps, RadioCardProps, RadioProps, SelectProps, SliderProps, SwitchProps, TextFieldProps, TextareaProps } from "../_shared/schemas.mjs";
|
|
1
|
+
import { AutocompleteProps, CalendarProps, CheckboxCardProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, ComboboxProps, DateFieldProps, DatePickerProps, ListBoxProps, NumberFieldProps, PaginationProps, PasswordInputProps, RadioCardProps, RadioProps, RangeSliderProps, SelectProps, SliderProps, SwitchProps, TextFieldProps, TextareaProps, schemas_d_exports } from "../_shared/schemas.mjs";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
import { ComponentRenderProps } from "@openuidev/react-lang";
|
|
4
4
|
//#region src/integrations/openui/form-views.d.ts
|
|
5
|
-
declare const TextFieldView: FC<ComponentRenderProps<TextFieldProps>>;
|
|
6
|
-
declare const CheckboxView: FC<ComponentRenderProps<CheckboxProps>>;
|
|
7
|
-
declare const SwitchView: FC<ComponentRenderProps<SwitchProps>>;
|
|
8
|
-
declare const SelectView: FC<ComponentRenderProps<SelectProps>>;
|
|
9
|
-
declare const TextareaView: FC<ComponentRenderProps<TextareaProps>>;
|
|
10
|
-
declare const PasswordInputView: FC<ComponentRenderProps<PasswordInputProps>>;
|
|
11
|
-
declare const NumberFieldView: FC<ComponentRenderProps<NumberFieldProps>>;
|
|
12
|
-
declare const SliderView: FC<ComponentRenderProps<SliderProps>>;
|
|
13
|
-
declare const RadioView: FC<ComponentRenderProps<RadioProps>>;
|
|
14
|
-
declare const RadioCardView: FC<ComponentRenderProps<RadioCardProps>>;
|
|
15
|
-
declare const CheckboxCardView: FC<ComponentRenderProps<CheckboxCardProps>>;
|
|
16
|
-
declare const PaginationView: FC<ComponentRenderProps<PaginationProps>>;
|
|
17
|
-
declare const ListBoxView: FC<ComponentRenderProps<ListBoxProps>>;
|
|
18
|
-
declare const CheckboxGroupView: FC<ComponentRenderProps<CheckboxGroupProps>>;
|
|
19
|
-
declare const
|
|
20
|
-
|
|
21
|
-
export
|
|
5
|
+
export declare const TextFieldView: FC<ComponentRenderProps<TextFieldProps>>;
|
|
6
|
+
export declare const CheckboxView: FC<ComponentRenderProps<CheckboxProps>>;
|
|
7
|
+
export declare const SwitchView: FC<ComponentRenderProps<SwitchProps>>;
|
|
8
|
+
export declare const SelectView: FC<ComponentRenderProps<SelectProps>>;
|
|
9
|
+
export declare const TextareaView: FC<ComponentRenderProps<TextareaProps>>;
|
|
10
|
+
export declare const PasswordInputView: FC<ComponentRenderProps<PasswordInputProps>>;
|
|
11
|
+
export declare const NumberFieldView: FC<ComponentRenderProps<NumberFieldProps>>;
|
|
12
|
+
export declare const SliderView: FC<ComponentRenderProps<SliderProps>>;
|
|
13
|
+
export declare const RadioView: FC<ComponentRenderProps<RadioProps>>;
|
|
14
|
+
export declare const RadioCardView: FC<ComponentRenderProps<RadioCardProps>>;
|
|
15
|
+
export declare const CheckboxCardView: FC<ComponentRenderProps<CheckboxCardProps>>;
|
|
16
|
+
export declare const PaginationView: FC<ComponentRenderProps<PaginationProps>>;
|
|
17
|
+
export declare const ListBoxView: FC<ComponentRenderProps<ListBoxProps>>;
|
|
18
|
+
export declare const CheckboxGroupView: FC<ComponentRenderProps<CheckboxGroupProps>>;
|
|
19
|
+
export declare const ComboboxView: FC<ComponentRenderProps<ComboboxProps>>;
|
|
20
|
+
export declare const AutocompleteView: FC<ComponentRenderProps<AutocompleteProps>>;
|
|
21
|
+
export declare const ColorPickerView: FC<ComponentRenderProps<ColorPickerProps>>;
|
|
22
|
+
export declare const DateFieldView: FC<ComponentRenderProps<DateFieldProps>>;
|
|
23
|
+
export declare const DatePickerView: FC<ComponentRenderProps<DatePickerProps>>;
|
|
24
|
+
export declare const CalendarView: FC<ComponentRenderProps<CalendarProps>>;
|
|
25
|
+
export declare const RangeSliderView: FC<ComponentRenderProps<RangeSliderProps>>;
|
|
26
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { renderAutocomplete, renderCheckbox, renderCheckboxCard, renderCheckboxGroup, renderListBox, renderNumberField, renderPagination, renderPasswordInput, renderRadio, renderRadioCard, renderSelect, renderSlider, renderSwitch, renderTextField, renderTextarea } from "../_shared/renderers.mjs";
|
|
2
|
+
import { renderAutocomplete, renderCalendar, renderCheckbox, renderCheckboxCard, renderCheckboxGroup, renderColorPicker, renderCombobox, renderDateField, renderDatePicker, renderListBox, renderNumberField, renderPagination, renderPasswordInput, renderRadio, renderRadioCard, renderRangeSlider, renderSelect, renderSlider, renderSwitch, renderTextField, renderTextarea } from "../_shared/renderers.mjs";
|
|
3
3
|
import { useStateField } from "@openuidev/react-lang";
|
|
4
4
|
//#region src/integrations/openui/form-views.tsx
|
|
5
5
|
const TextFieldView = ({ props }) => {
|
|
@@ -27,7 +27,7 @@ const PasswordInputView = ({ props }) => {
|
|
|
27
27
|
return renderPasswordInput(props, field.value, field.setValue);
|
|
28
28
|
};
|
|
29
29
|
const NumberFieldView = ({ props }) => {
|
|
30
|
-
const field = useStateField(props.name, props.defaultValue ??
|
|
30
|
+
const field = useStateField(props.name, props.defaultValue ?? null);
|
|
31
31
|
return renderNumberField(props, field.value, field.setValue);
|
|
32
32
|
};
|
|
33
33
|
const SliderView = ({ props }) => {
|
|
@@ -58,9 +58,33 @@ const CheckboxGroupView = ({ props }) => {
|
|
|
58
58
|
const field = useStateField(props.name, props.defaultValue ?? []);
|
|
59
59
|
return renderCheckboxGroup(props, field.value, field.setValue);
|
|
60
60
|
};
|
|
61
|
+
const ComboboxView = ({ props }) => {
|
|
62
|
+
const field = useStateField(props.name, props.defaultValue ?? "");
|
|
63
|
+
return renderCombobox(props, field.value, field.setValue);
|
|
64
|
+
};
|
|
61
65
|
const AutocompleteView = ({ props }) => {
|
|
62
66
|
const field = useStateField(props.name, props.defaultValue ?? []);
|
|
63
67
|
return renderAutocomplete(props, field.value, field.setValue);
|
|
64
68
|
};
|
|
69
|
+
const ColorPickerView = ({ props }) => {
|
|
70
|
+
const field = useStateField(props.name, props.defaultValue ?? "");
|
|
71
|
+
return renderColorPicker(props, field.value, field.setValue);
|
|
72
|
+
};
|
|
73
|
+
const DateFieldView = ({ props }) => {
|
|
74
|
+
const field = useStateField(props.name, props.defaultValue ?? "");
|
|
75
|
+
return renderDateField(props, field.value, field.setValue);
|
|
76
|
+
};
|
|
77
|
+
const DatePickerView = ({ props }) => {
|
|
78
|
+
const field = useStateField(props.name, props.defaultValue ?? "");
|
|
79
|
+
return renderDatePicker(props, field.value, field.setValue);
|
|
80
|
+
};
|
|
81
|
+
const CalendarView = ({ props }) => {
|
|
82
|
+
const field = useStateField(props.name, props.defaultValue ?? "");
|
|
83
|
+
return renderCalendar(props, field.value, field.setValue);
|
|
84
|
+
};
|
|
85
|
+
const RangeSliderView = ({ props }) => {
|
|
86
|
+
const field = useStateField(props.name, props.defaultValue ?? [props.min ?? 0, props.max ?? 100]);
|
|
87
|
+
return renderRangeSlider(props, field.value, field.setValue);
|
|
88
|
+
};
|
|
65
89
|
//#endregion
|
|
66
|
-
export { AutocompleteView, CheckboxCardView, CheckboxGroupView, CheckboxView, ListBoxView, NumberFieldView, PaginationView, PasswordInputView, RadioCardView, RadioView, SelectView, SliderView, SwitchView, TextFieldView, TextareaView };
|
|
90
|
+
export { AutocompleteView, CalendarView, CheckboxCardView, CheckboxGroupView, CheckboxView, ColorPickerView, ComboboxView, DateFieldView, DatePickerView, ListBoxView, NumberFieldView, PaginationView, PasswordInputView, RadioCardView, RadioView, RangeSliderView, SelectView, SliderView, SwitchView, TextFieldView, TextareaView };
|