@k8ordo/ui 2.3.1 → 4.0.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 +75 -183
- package/dist/catalog/icon-map.d.mts +108 -0
- package/dist/catalog/icon-map.mjs +212 -0
- package/dist/catalog/icon-names.d.mts +1 -0
- package/dist/catalog/icon-names.mjs +108 -0
- package/dist/catalog/index.d.mts +1289 -0
- package/dist/catalog/index.mjs +419 -0
- package/dist/catalog/render.css +34 -0
- package/dist/catalog/render.d.mts +72 -0
- package/dist/catalog/render.mjs +631 -0
- package/dist/catalog/render.module.mjs +11 -0
- package/dist/{integrations/_shared → catalog}/schemas.d.mts +550 -307
- package/dist/{integrations/_shared → catalog}/schemas.mjs +191 -184
- package/dist/catalog/to-tree.d.mts +4 -0
- package/dist/catalog/to-tree.mjs +17 -0
- package/dist/components/_internal/checked-values.d.mts +1 -0
- package/dist/components/_internal/checked-values.mjs +5 -0
- package/dist/components/_internal/field-message.css +25 -0
- package/dist/components/_internal/field-message.d.mts +10 -0
- package/dist/components/_internal/field-message.mjs +22 -0
- package/dist/components/_internal/field-message.module.mjs +9 -0
- package/dist/components/_internal/focus-ring.css +1 -1
- package/dist/components/_internal/high-contrast.css +1 -0
- package/dist/components/{observers/in-view → _internal}/in-view.mjs +1 -1
- package/dist/components/{observers/resize → _internal}/resize.mjs +1 -1
- package/dist/components/ai/_internal/attachment-preview.mjs +3 -3
- package/dist/components/ai/_internal/collapsible.mjs +2 -2
- package/dist/components/ai/attachment/attachment.d.mts +1 -1
- package/dist/components/ai/attachment/index.d.mts +1 -1
- package/dist/components/ai/conversation/conversation.mjs +4 -4
- package/dist/components/ai/index.d.mts +2 -2
- package/dist/components/ai/message/index.d.mts +2 -2
- package/dist/components/ai/message/message.d.mts +2 -2
- package/dist/components/ai/message/message.mjs +14 -12
- package/dist/components/ai/prompt-input/prompt-input.mjs +5 -5
- package/dist/components/ai/reasoning/reasoning.mjs +1 -1
- package/dist/components/ai/source/index.d.mts +2 -2
- package/dist/components/ai/source/source.d.mts +2 -2
- package/dist/components/ai/source/source.mjs +2 -2
- package/dist/components/ai/tool-invocation/approval-bar.mjs +11 -22
- package/dist/components/ai/tool-invocation/tool-invocation.d.mts +2 -2
- package/dist/components/ai/tool-invocation/tool-invocation.mjs +2 -1
- package/dist/components/buttons/button/button.css +1 -1
- package/dist/components/buttons/button/button.d.mts +34 -37
- package/dist/components/buttons/button/button.mjs +37 -24
- package/dist/components/buttons/button/button.module.mjs +0 -1
- package/dist/components/buttons/button/index.d.mts +2 -2
- package/dist/components/buttons/copy-button/copy-button.mjs +6 -4
- package/dist/components/buttons/icon-button/icon-button.css +3 -3
- package/dist/components/buttons/icon-button/icon-button.d.mts +37 -43
- package/dist/components/buttons/icon-button/icon-button.mjs +73 -63
- package/dist/components/buttons/icon-button/icon-button.module.mjs +2 -2
- package/dist/components/buttons/icon-button/index.d.mts +2 -2
- package/dist/components/buttons/toolbar/toolbar.css +5 -1
- package/dist/components/buttons/toolbar/toolbar.mjs +1 -1
- package/dist/components/data-display/accordion/accordion-button.d.mts +4 -1
- package/dist/components/data-display/accordion/accordion-button.mjs +5 -5
- package/dist/components/data-display/accordion/index.d.mts +3 -3
- package/dist/components/data-display/card/card-action.d.mts +6 -0
- package/dist/components/data-display/card/card-action.mjs +21 -0
- package/dist/components/data-display/card/card.css +24 -0
- package/dist/components/data-display/card/card.d.mts +26 -3
- package/dist/components/data-display/card/card.mjs +46 -6
- package/dist/components/data-display/card/card.module.mjs +4 -1
- package/dist/components/data-display/card/index.d.mts +2 -2
- package/dist/components/data-display/carousel/carousel.mjs +3 -3
- package/dist/components/data-display/code/code.css +4 -0
- package/dist/components/data-display/code-block/code-block.mjs +1 -1
- package/dist/components/data-display/data-table/data-table.css +0 -3
- package/dist/components/data-display/data-table/data-table.mjs +25 -26
- package/dist/components/data-display/tree/tree.d.mts +1 -1
- package/dist/components/data-display/tree/tree.mjs +7 -6
- package/dist/components/feedback/alert/alert.d.mts +2 -7
- package/dist/components/feedback/alert/alert.mjs +12 -11
- package/dist/components/feedback/alert/index.d.mts +2 -2
- package/dist/components/feedback/callout/callout.mjs +3 -3
- package/dist/components/feedback/progress/progress.mjs +1 -1
- package/dist/components/feedback/toast/context.d.mts +4 -5
- package/dist/components/feedback/toast/index.d.mts +2 -2
- package/dist/components/feedback/toast/provider.d.mts +7 -2
- package/dist/components/feedback/toast/provider.mjs +7 -2
- package/dist/components/feedback/toast/toast.d.mts +2 -3
- package/dist/components/form/autocomplete/autocomplete.d.mts +2 -2
- package/dist/components/form/autocomplete/autocomplete.mjs +15 -12
- package/dist/components/form/calendar/calendar.mjs +4 -6
- package/dist/components/form/checkbox/checkbox.d.mts +3 -1
- package/dist/components/form/checkbox/checkbox.mjs +45 -45
- package/dist/components/form/checkbox-card/checkbox-card.d.mts +3 -2
- package/dist/components/form/checkbox-card/checkbox-card.mjs +13 -6
- package/dist/components/form/checkbox-group/checkbox-group.d.mts +15 -20
- package/dist/components/form/checkbox-group/checkbox-group.mjs +18 -26
- package/dist/components/form/checkbox-group/index.d.mts +2 -34
- package/dist/components/form/checkbox-group/index.mjs +1 -8
- package/dist/components/form/color-picker/color-picker.css +3 -5
- package/dist/components/form/color-picker/color-picker.d.mts +0 -1
- package/dist/components/form/color-picker/color-picker.mjs +4 -4
- package/dist/components/form/combobox/combobox.d.mts +0 -1
- package/dist/components/form/combobox/combobox.mjs +9 -8
- package/dist/components/form/date-picker/date-picker.css +0 -5
- package/dist/components/form/date-picker/date-picker.mjs +22 -23
- package/dist/components/form/file-field/file-field.d.mts +6 -3
- package/dist/components/form/file-field/file-field.mjs +42 -19
- package/dist/components/form/file-field/index.d.mts +4 -1
- package/dist/components/form/form/form.mjs +0 -1
- package/dist/components/form/form-control/form-control.css +0 -15
- package/dist/components/form/form-control/form-control.d.mts +3 -4
- package/dist/components/form/form-control/form-control.mjs +44 -46
- package/dist/components/form/form-control/form-control.module.mjs +0 -3
- package/dist/components/form/number-field/number-field.d.mts +2 -2
- package/dist/components/form/number-field/number-field.mjs +13 -52
- package/dist/components/form/password-input/password-input.mjs +3 -2
- package/dist/components/form/radio/radio.mjs +4 -2
- package/dist/components/form/radio-card/radio-card.mjs +9 -2
- package/dist/components/form/range-slider/range-slider.d.mts +4 -2
- package/dist/components/form/range-slider/range-slider.mjs +2 -4
- package/dist/components/form/select/select.css +6 -4
- package/dist/components/form/select/select.d.mts +5 -0
- package/dist/components/form/select/select.mjs +10 -7
- package/dist/components/form/slider/slider.d.mts +2 -2
- package/dist/components/form/slider/slider.mjs +3 -6
- package/dist/components/form/switch/switch.d.mts +3 -0
- package/dist/components/form/switch/switch.mjs +43 -31
- package/dist/components/form/text-field/index.d.mts +2 -2
- package/dist/components/form/text-field/text-field.css +4 -0
- package/dist/components/form/text-field/text-field.d.mts +1 -1
- package/dist/components/form/textarea/textarea.d.mts +0 -1
- package/dist/components/form/textarea/textarea.mjs +1 -1
- package/dist/components/icons/alert.d.mts +6 -0
- package/dist/components/icons/alert.mjs +17 -0
- package/dist/components/icons/{vertical-writing.d.mts → arrow-down.d.mts} +1 -1
- package/dist/components/icons/arrow-down.mjs +8 -0
- package/dist/components/icons/arrow-left.d.mts +3 -0
- package/dist/components/icons/arrow-left.mjs +8 -0
- package/dist/components/icons/arrow-right.d.mts +3 -0
- package/dist/components/icons/arrow-right.mjs +8 -0
- package/dist/components/icons/{twitter.d.mts → arrow-up.d.mts} +1 -1
- package/dist/components/icons/arrow-up.mjs +8 -0
- package/dist/components/icons/base.d.mts +0 -1
- package/dist/components/icons/base.mjs +1 -2
- package/dist/components/icons/{qiita.d.mts → bell.d.mts} +1 -1
- package/dist/components/icons/bell.mjs +8 -0
- package/dist/components/icons/{github-mark.d.mts → blend.d.mts} +1 -1
- package/dist/components/icons/blend.mjs +16 -0
- package/dist/components/icons/book-text.d.mts +3 -0
- package/dist/components/icons/book-text.mjs +8 -0
- package/dist/components/icons/bookmark.d.mts +3 -0
- package/dist/components/icons/bookmark.mjs +8 -0
- package/dist/components/icons/bot-message.d.mts +3 -0
- package/dist/components/icons/bot-message.mjs +8 -0
- package/dist/components/icons/bot.d.mts +3 -0
- package/dist/components/icons/bot.mjs +14 -0
- package/dist/components/icons/calendar.d.mts +3 -0
- package/dist/components/icons/calendar.mjs +14 -0
- package/dist/components/icons/check.d.mts +3 -0
- package/dist/components/icons/check.mjs +8 -0
- package/dist/components/icons/chevron-down.d.mts +3 -0
- package/dist/components/icons/chevron-down.mjs +8 -0
- package/dist/components/icons/chevron-left.d.mts +3 -0
- package/dist/components/icons/chevron-left.mjs +8 -0
- package/dist/components/icons/chevron-right.d.mts +3 -0
- package/dist/components/icons/chevron-right.mjs +8 -0
- package/dist/components/icons/chevron-up.d.mts +3 -0
- package/dist/components/icons/chevron-up.mjs +8 -0
- package/dist/components/icons/chevron.d.mts +6 -0
- package/dist/components/icons/chevron.mjs +17 -0
- package/dist/components/icons/chevrons-up-down.d.mts +3 -0
- package/dist/components/icons/chevrons-up-down.mjs +8 -0
- package/dist/components/icons/circle-alert.d.mts +3 -0
- package/dist/components/icons/circle-alert.mjs +12 -0
- package/dist/components/icons/circle-check.d.mts +3 -0
- package/dist/components/icons/circle-check.mjs +12 -0
- package/dist/components/icons/circle-help.d.mts +3 -0
- package/dist/components/icons/circle-help.mjs +12 -0
- package/dist/components/icons/circle-x.d.mts +3 -0
- package/dist/components/icons/circle-x.mjs +12 -0
- package/dist/components/icons/clipboard-check.d.mts +3 -0
- package/dist/components/icons/clipboard-check.mjs +18 -0
- package/dist/components/icons/clock.d.mts +3 -0
- package/dist/components/icons/clock.mjs +12 -0
- package/dist/components/icons/code.d.mts +3 -0
- package/dist/components/icons/code.mjs +8 -0
- package/dist/components/icons/color-scale.mjs +18 -30
- package/dist/components/icons/contrast.d.mts +3 -0
- package/dist/components/icons/contrast.mjs +15 -0
- package/dist/components/icons/copy.d.mts +3 -0
- package/dist/components/icons/copy.mjs +14 -0
- package/dist/components/icons/download.d.mts +3 -0
- package/dist/components/icons/download.mjs +8 -0
- package/dist/components/icons/ellipsis-vertical.d.mts +3 -0
- package/dist/components/icons/ellipsis-vertical.mjs +27 -0
- package/dist/components/icons/ellipsis.d.mts +3 -0
- package/dist/components/icons/ellipsis.mjs +27 -0
- package/dist/components/icons/external-link.d.mts +3 -0
- package/dist/components/icons/external-link.mjs +8 -0
- package/dist/components/icons/eye-closed.d.mts +3 -0
- package/dist/components/icons/eye-closed.mjs +8 -0
- package/dist/components/icons/eye.d.mts +3 -0
- package/dist/components/icons/eye.mjs +12 -0
- package/dist/components/icons/file-text.d.mts +3 -0
- package/dist/components/icons/file-text.mjs +12 -0
- package/dist/components/icons/file.d.mts +3 -0
- package/dist/components/icons/file.mjs +8 -0
- package/dist/components/icons/filter.d.mts +3 -0
- package/dist/components/icons/filter.mjs +8 -0
- package/dist/components/icons/flask.d.mts +3 -0
- package/dist/components/icons/flask.mjs +8 -0
- package/dist/components/icons/folder-open.d.mts +3 -0
- package/dist/components/icons/folder-open.mjs +8 -0
- package/dist/components/icons/folder.d.mts +3 -0
- package/dist/components/icons/folder.mjs +8 -0
- package/dist/components/icons/git-fork.d.mts +3 -0
- package/dist/components/icons/git-fork.mjs +25 -0
- package/dist/components/icons/git-pull-request.d.mts +3 -0
- package/dist/components/icons/git-pull-request.mjs +20 -0
- package/dist/components/icons/globe.d.mts +3 -0
- package/dist/components/icons/globe.mjs +12 -0
- package/dist/components/icons/grid.d.mts +3 -0
- package/dist/components/icons/grid.mjs +37 -0
- package/dist/components/icons/grip-vertical.d.mts +3 -0
- package/dist/components/icons/grip-vertical.mjs +45 -0
- package/dist/components/icons/heart.d.mts +3 -0
- package/dist/components/icons/heart.mjs +8 -0
- package/dist/components/icons/history.d.mts +3 -0
- package/dist/components/icons/history.mjs +8 -0
- package/dist/components/icons/home.d.mts +3 -0
- package/dist/components/icons/home.mjs +8 -0
- package/dist/components/icons/image.d.mts +3 -0
- package/dist/components/icons/image.mjs +22 -0
- package/dist/components/icons/index.d.mts +107 -9
- package/dist/components/icons/index.mjs +107 -8
- package/dist/components/icons/info.d.mts +3 -0
- package/dist/components/icons/info.mjs +12 -0
- package/dist/components/icons/lightbulb.d.mts +3 -0
- package/dist/components/icons/lightbulb.mjs +8 -0
- package/dist/components/icons/line-icon.d.mts +3 -0
- package/dist/components/icons/line-icon.mjs +17 -0
- package/dist/components/icons/link.d.mts +3 -0
- package/dist/components/icons/link.mjs +11 -0
- package/dist/components/icons/list.d.mts +3 -0
- package/dist/components/icons/list.mjs +8 -0
- package/dist/components/icons/lock-open.d.mts +3 -0
- package/dist/components/icons/lock-open.mjs +14 -0
- package/dist/components/icons/lock.d.mts +3 -0
- package/dist/components/icons/lock.mjs +14 -0
- package/dist/components/icons/log-in.d.mts +3 -0
- package/dist/components/icons/log-in.mjs +8 -0
- package/dist/components/icons/log-out.d.mts +3 -0
- package/dist/components/icons/log-out.mjs +8 -0
- package/dist/components/icons/mail.d.mts +3 -0
- package/dist/components/icons/mail.mjs +14 -0
- package/dist/components/icons/map-pin.d.mts +3 -0
- package/dist/components/icons/map-pin.mjs +12 -0
- package/dist/components/icons/maximize.d.mts +3 -0
- package/dist/components/icons/maximize.mjs +8 -0
- package/dist/components/icons/menu.d.mts +3 -0
- package/dist/components/icons/menu.mjs +8 -0
- package/dist/components/icons/message-circle.d.mts +3 -0
- package/dist/components/icons/message-circle.mjs +8 -0
- package/dist/components/icons/minimize.d.mts +3 -0
- package/dist/components/icons/minimize.mjs +8 -0
- package/dist/components/icons/minus.d.mts +3 -0
- package/dist/components/icons/minus.mjs +8 -0
- package/dist/components/icons/monitor.d.mts +3 -0
- package/dist/components/icons/monitor.mjs +14 -0
- package/dist/components/icons/moon.d.mts +3 -0
- package/dist/components/icons/moon.mjs +8 -0
- package/dist/components/icons/package.d.mts +3 -0
- package/dist/components/icons/package.mjs +8 -0
- package/dist/components/icons/paint-bucket.d.mts +3 -0
- package/dist/components/icons/paint-bucket.mjs +8 -0
- package/dist/components/icons/palette.d.mts +3 -0
- package/dist/components/icons/palette.mjs +8 -0
- package/dist/components/icons/panel-left.d.mts +3 -0
- package/dist/components/icons/panel-left.mjs +14 -0
- package/dist/components/icons/paperclip.d.mts +3 -0
- package/dist/components/icons/paperclip.mjs +11 -0
- package/dist/components/icons/pause.d.mts +3 -0
- package/dist/components/icons/pause.mjs +20 -0
- package/dist/components/icons/pencil.d.mts +3 -0
- package/dist/components/icons/pencil.mjs +8 -0
- package/dist/components/icons/pin.d.mts +3 -0
- package/dist/components/icons/pin.mjs +11 -0
- package/dist/components/icons/play.d.mts +3 -0
- package/dist/components/icons/play.mjs +8 -0
- package/dist/components/icons/plus.d.mts +3 -0
- package/dist/components/icons/plus.mjs +8 -0
- package/dist/components/icons/presentation.d.mts +3 -0
- package/dist/components/icons/presentation.mjs +8 -0
- package/dist/components/icons/redo.d.mts +3 -0
- package/dist/components/icons/redo.mjs +8 -0
- package/dist/components/icons/refresh.d.mts +3 -0
- package/dist/components/icons/refresh.mjs +8 -0
- package/dist/components/icons/rocket.d.mts +3 -0
- package/dist/components/icons/rocket.mjs +19 -0
- package/dist/components/icons/rss.d.mts +3 -0
- package/dist/components/icons/rss.mjs +13 -0
- package/dist/components/icons/search.d.mts +3 -0
- package/dist/components/icons/search.mjs +12 -0
- package/dist/components/icons/send.d.mts +3 -0
- package/dist/components/icons/send.mjs +8 -0
- package/dist/components/icons/settings.d.mts +3 -0
- package/dist/components/icons/settings.mjs +12 -0
- package/dist/components/icons/share.d.mts +3 -0
- package/dist/components/icons/share.mjs +25 -0
- package/dist/components/icons/shield-check.d.mts +3 -0
- package/dist/components/icons/shield-check.mjs +8 -0
- package/dist/components/icons/smile.d.mts +3 -0
- package/dist/components/icons/smile.mjs +12 -0
- package/dist/components/icons/sparkles.d.mts +3 -0
- package/dist/components/icons/sparkles.mjs +8 -0
- package/dist/components/icons/square.d.mts +3 -0
- package/dist/components/icons/square.mjs +14 -0
- package/dist/components/icons/squircle.d.mts +3 -0
- package/dist/components/icons/squircle.mjs +8 -0
- package/dist/components/icons/star.d.mts +3 -0
- package/dist/components/icons/star.mjs +8 -0
- package/dist/components/icons/sun.d.mts +3 -0
- package/dist/components/icons/sun.mjs +12 -0
- package/dist/components/icons/table.d.mts +3 -0
- package/dist/components/icons/table.mjs +14 -0
- package/dist/components/icons/tag.d.mts +3 -0
- package/dist/components/icons/tag.mjs +8 -0
- package/dist/components/icons/text-horizontal.d.mts +3 -0
- package/dist/components/icons/text-horizontal.mjs +8 -0
- package/dist/components/icons/text-vertical.d.mts +3 -0
- package/dist/components/icons/text-vertical.mjs +8 -0
- package/dist/components/icons/thumbs-down.d.mts +3 -0
- package/dist/components/icons/thumbs-down.mjs +8 -0
- package/dist/components/icons/thumbs-up.d.mts +3 -0
- package/dist/components/icons/thumbs-up.mjs +8 -0
- package/dist/components/icons/trash.d.mts +3 -0
- package/dist/components/icons/trash.mjs +8 -0
- package/dist/components/icons/triangle-alert.d.mts +3 -0
- package/dist/components/icons/triangle-alert.mjs +8 -0
- package/dist/components/icons/undo.d.mts +3 -0
- package/dist/components/icons/undo.mjs +8 -0
- package/dist/components/icons/upload.d.mts +3 -0
- package/dist/components/icons/upload.mjs +8 -0
- package/dist/components/icons/user.d.mts +3 -0
- package/dist/components/icons/user.mjs +12 -0
- package/dist/components/icons/users.d.mts +3 -0
- package/dist/components/icons/users.mjs +12 -0
- package/dist/components/icons/x.d.mts +3 -0
- package/dist/components/icons/x.mjs +8 -0
- package/dist/components/index.d.mts +58 -76
- package/dist/components/index.mjs +13 -27
- package/dist/components/layout/resizable-panels/resizable-panels.mjs +3 -3
- package/dist/components/navigation/anchor/anchor.css +3 -3
- package/dist/components/navigation/anchor/anchor.mjs +20 -7
- package/dist/components/navigation/anchor/anchor.module.mjs +1 -1
- package/dist/components/navigation/breadcrumb/breadcrumb.d.mts +6 -4
- package/dist/components/navigation/breadcrumb/breadcrumb.mjs +3 -2
- package/dist/components/navigation/pagination/pagination.d.mts +2 -2
- package/dist/components/navigation/pagination/pagination.mjs +3 -3
- package/dist/components/navigation/side-nav/side-nav.mjs +1 -1
- package/dist/components/navigation/stepper/stepper.mjs +3 -3
- package/dist/components/navigation/tabs/index.d.mts +10 -5
- package/dist/components/navigation/tabs/tabs.d.mts +11 -6
- package/dist/components/navigation/tabs/tabs.mjs +24 -27
- package/dist/components/overlays/_internal/modal-header.css +38 -0
- package/dist/components/overlays/_internal/modal-header.d.mts +7 -0
- package/dist/components/overlays/_internal/modal-header.mjs +32 -0
- package/dist/components/overlays/_internal/modal-header.module.mjs +10 -0
- package/dist/components/overlays/command-palette/command-palette.d.mts +2 -2
- package/dist/components/overlays/command-palette/command-palette.mjs +9 -8
- package/dist/components/overlays/context-menu/context-menu.mjs +3 -3
- package/dist/components/overlays/context-menu/index.d.mts +27 -2
- package/dist/components/overlays/dialog/dialog.css +3 -21
- package/dist/components/overlays/dialog/dialog.d.mts +20 -9
- package/dist/components/overlays/dialog/dialog.mjs +35 -73
- package/dist/components/overlays/dialog/dialog.module.mjs +1 -3
- package/dist/components/overlays/dialog/index.d.mts +2 -15
- package/dist/components/overlays/dialog/index.mjs +1 -8
- package/dist/components/overlays/drawer/drawer.css +4 -26
- package/dist/components/overlays/drawer/drawer.d.mts +7 -2
- package/dist/components/overlays/drawer/drawer.mjs +24 -37
- package/dist/components/overlays/drawer/drawer.module.mjs +2 -6
- package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +35 -5
- package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +30 -12
- package/dist/components/overlays/dropdown-menu/hooks.d.mts +1 -1
- package/dist/components/overlays/dropdown-menu/hooks.mjs +1 -1
- package/dist/components/overlays/dropdown-menu/index.d.mts +34 -4
- package/dist/components/overlays/dropdown-menu/shared.css +1 -0
- package/dist/components/overlays/dropdown-menu/sub-menu.mjs +4 -4
- package/dist/components/overlays/list-box/hooks.mjs +2 -2
- package/dist/components/overlays/list-box/index.d.mts +2 -25
- package/dist/components/overlays/list-box/index.mjs +1 -9
- package/dist/components/overlays/list-box/list-box.d.mts +11 -16
- package/dist/components/overlays/list-box/list-box.mjs +24 -16
- package/dist/components/overlays/modal/modal.d.mts +8 -7
- package/dist/components/overlays/modal/modal.mjs +23 -32
- package/dist/components/overlays/popover/anchor-positioning.d.mts +3 -16
- package/dist/components/overlays/popover/anchor-positioning.mjs +14 -6
- package/dist/components/overlays/popover/hooks.d.mts +0 -2
- package/dist/components/overlays/popover/hooks.mjs +0 -2
- package/dist/components/overlays/popover/index.d.mts +19 -2
- package/dist/components/overlays/popover/index.mjs +7 -2
- package/dist/components/overlays/popover/popover.css +6 -0
- package/dist/components/overlays/popover/popover.d.mts +15 -2
- package/dist/components/overlays/popover/popover.mjs +28 -13
- package/dist/components/overlays/popover/popover.module.mjs +2 -1
- package/dist/components/overlays/tooltip/bridge.css +1 -1
- package/dist/components/overlays/tooltip/tooltip.mjs +5 -5
- package/dist/helpers/index.mjs +1 -1
- package/dist/i18n/en.mjs +1 -2
- package/dist/i18n/index.d.mts +3 -4
- package/dist/i18n/index.mjs +1 -2
- package/dist/i18n/ja.mjs +1 -2
- package/dist/i18n/messages.d.mts +2 -4
- package/dist/i18n/usage.d.mts +2 -1
- package/dist/i18n/usage.mjs +3 -3
- package/dist/index.d.mts +30 -45
- package/dist/index.mjs +4 -18
- package/dist/internal/iso-date.mjs +1 -1
- package/dist/styles/index.css +79 -231
- package/dist/styles/tailwind.css +1 -4
- package/dist/styles/tokens.css +281 -0
- package/dist/styles/tokens.d.mts +1 -1
- package/dist/styles/tokens.mjs +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/variables.d.mts +4 -2
- package/docs/GUIDE.md +145 -69
- package/docs/llms.txt +38 -11
- package/docs/props.generated.json +1414 -645
- package/docs/references/ai-chat.md +94 -44
- package/docs/references/color.md +15 -15
- package/docs/references/components.md +636 -504
- package/docs/references/generative-ui.md +378 -187
- package/docs/references/interaction-design.md +6 -5
- package/docs/references/spatial-design.md +8 -8
- package/docs/references/types.md +22 -25
- package/package.json +43 -73
- package/dist/components/ai/_internal/icons.d.mts +0 -6
- package/dist/components/ai/_internal/icons.mjs +0 -13
- package/dist/components/form/date-field/date-field.css +0 -31
- package/dist/components/form/date-field/date-field.d.mts +0 -7
- package/dist/components/form/date-field/date-field.mjs +0 -19
- package/dist/components/form/date-field/date-field.module.mjs +0 -4
- package/dist/components/form/date-field/index.d.mts +0 -2
- package/dist/components/form/date-field/index.mjs +0 -1
- package/dist/components/icons/browsers.d.mts +0 -6
- package/dist/components/icons/browsers.mjs +0 -890
- package/dist/components/icons/github-mark.mjs +0 -18
- package/dist/components/icons/logo.css +0 -17
- package/dist/components/icons/logo.d.mts +0 -4
- package/dist/components/icons/logo.mjs +0 -29
- package/dist/components/icons/logo.module.mjs +0 -8
- package/dist/components/icons/lucide-imports.d.mts +0 -67
- package/dist/components/icons/lucide-imports.mjs +0 -67
- package/dist/components/icons/lucide.d.mts +0 -67
- package/dist/components/icons/lucide.mjs +0 -255
- package/dist/components/icons/qiita.mjs +0 -27
- package/dist/components/icons/twitter.css +0 -9
- package/dist/components/icons/twitter.mjs +0 -20
- package/dist/components/icons/twitter.module.mjs +0 -4
- package/dist/components/icons/vertical-writing.mjs +0 -25
- package/dist/components/observers/in-view/index.d.mts +0 -2
- package/dist/components/observers/in-view/index.mjs +0 -1
- package/dist/components/observers/resize/index.d.mts +0 -2
- package/dist/components/observers/resize/index.mjs +0 -1
- package/dist/components/overlays/_internal/modal-dialog-context.d.mts +0 -11
- package/dist/components/overlays/_internal/modal-dialog-context.mjs +0 -12
- package/dist/components/providers/index.d.mts +0 -3
- package/dist/components/providers/index.mjs +0 -3
- package/dist/components/providers/portal-root.d.mts +0 -8
- package/dist/components/providers/portal-root.mjs +0 -11
- package/dist/components/providers/ui-provider.d.mts +0 -2
- package/dist/components/providers/ui-provider.mjs +0 -6
- package/dist/integrations/_shared/openui-defs.d.mts +0 -15
- package/dist/integrations/_shared/openui-defs.mjs +0 -230
- package/dist/integrations/_shared/renderers.css +0 -50
- package/dist/integrations/_shared/renderers.d.mts +0 -88
- package/dist/integrations/_shared/renderers.mjs +0 -936
- package/dist/integrations/_shared/renderers.module.mjs +0 -13
- package/dist/integrations/ai-sdk/index.d.mts +0 -3
- package/dist/integrations/ai-sdk/index.mjs +0 -1
- package/dist/integrations/ai-sdk/map-parts.d.mts +0 -44
- package/dist/integrations/ai-sdk/map-parts.mjs +0 -56
- package/dist/integrations/json-render/catalog.d.mts +0 -1155
- package/dist/integrations/json-render/catalog.mjs +0 -373
- package/dist/integrations/json-render/registry.d.mts +0 -26
- package/dist/integrations/json-render/registry.mjs +0 -192
- package/dist/integrations/openui/form-views.d.mts +0 -24
- package/dist/integrations/openui/form-views.mjs +0 -89
- package/dist/integrations/openui/library.d.mts +0 -202
- package/dist/integrations/openui/library.mjs +0 -83
- package/dist/integrations/openui/prompt.d.mts +0 -2
- package/dist/integrations/openui/prompt.mjs +0 -18
- /package/dist/components/{observers → _internal}/fragment-instance.d.mts +0 -0
- /package/dist/components/{observers/in-view → _internal}/in-view.d.mts +0 -0
- /package/dist/components/{observers/resize → _internal}/resize.d.mts +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
2
|
+
import { CardAction } from "./card-action.mjs";
|
|
3
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
1
4
|
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
2
5
|
import card_module_default from "./card.module.mjs";
|
|
3
6
|
import { clsx } from "clsx";
|
|
4
|
-
import {
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
9
|
// src/components/data-display/card/card.tsx
|
|
6
10
|
const VARIANT = {
|
|
7
11
|
shadow: [card_module_default.shadow, high_contrast_module_default.edge],
|
|
@@ -11,9 +15,45 @@ const WIDTH = {
|
|
|
11
15
|
full: card_module_default.full,
|
|
12
16
|
fit: card_module_default.fit
|
|
13
17
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
const defaultRenderAnchor = (props) => /* @__PURE__ */ jsx("a", { ...props });
|
|
19
|
+
const Card = ({ children, width = "full", variant = "shadow", interactive = false, href, openInNewTab = false, renderAnchor = defaultRenderAnchor, action, ...rest }) => {
|
|
20
|
+
const contentId = useId();
|
|
21
|
+
const newTabId = `${contentId}-new-tab`;
|
|
22
|
+
const targetClassName = clsx(card_module_default.target, focus_ring_module_default.ringNoBorder);
|
|
23
|
+
const target = href === void 0 ? action === void 0 ? null : /* @__PURE__ */ jsx(CardAction, {
|
|
24
|
+
action,
|
|
25
|
+
className: targetClassName,
|
|
26
|
+
labelledBy: contentId
|
|
27
|
+
}) : renderAnchor({
|
|
28
|
+
href,
|
|
29
|
+
className: targetClassName,
|
|
30
|
+
...openInNewTab ? {
|
|
31
|
+
"aria-labelledby": `${contentId} ${newTabId}`,
|
|
32
|
+
target: "_blank",
|
|
33
|
+
rel: "noopener noreferrer"
|
|
34
|
+
} : { "aria-labelledby": contentId }
|
|
35
|
+
});
|
|
36
|
+
const className = clsx(card_module_default.root, VARIANT[variant], WIDTH[width], (interactive || target !== null) && card_module_default.interactive, target !== null && card_module_default.pressable);
|
|
37
|
+
return target === null ? /* @__PURE__ */ jsx("div", {
|
|
38
|
+
...rest,
|
|
39
|
+
className,
|
|
40
|
+
children
|
|
41
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
42
|
+
...rest,
|
|
43
|
+
className,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: card_module_default.content,
|
|
47
|
+
id: contentId,
|
|
48
|
+
children
|
|
49
|
+
}),
|
|
50
|
+
target,
|
|
51
|
+
href !== void 0 && openInNewTab && /* @__PURE__ */ jsx("span", {
|
|
52
|
+
hidden: true,
|
|
53
|
+
id: newTabId,
|
|
54
|
+
children: getMessages().opensInNewTab
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
};
|
|
19
59
|
export { Card };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import './card.css';
|
|
2
2
|
// src/components/data-display/card/card.module.css
|
|
3
3
|
var card_module_default = {
|
|
4
|
+
"content": "v9O_zW_content",
|
|
4
5
|
"fit": "v9O_zW_fit",
|
|
5
6
|
"full": "v9O_zW_full",
|
|
6
7
|
"interactive": "v9O_zW_interactive",
|
|
7
8
|
"outline": "v9O_zW_outline",
|
|
9
|
+
"pressable": "v9O_zW_pressable",
|
|
8
10
|
"root": "v9O_zW_root",
|
|
9
|
-
"shadow": "v9O_zW_shadow"
|
|
11
|
+
"shadow": "v9O_zW_shadow",
|
|
12
|
+
"target": "v9O_zW_target"
|
|
10
13
|
};
|
|
11
14
|
export { card_module_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Card } from "./card.mjs";
|
|
2
|
-
export { Card };
|
|
1
|
+
import { Card, CardRenderAnchorProps } from "./card.mjs";
|
|
2
|
+
export { Card, type CardRenderAnchorProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getMessages } from "../../../i18n/current.mjs";
|
|
3
|
-
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
4
|
-
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
5
2
|
import { readWritingMode } from "../../../hooks/writing-mode/index.mjs";
|
|
3
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
6
4
|
import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
|
|
5
|
+
import { ChevronIcon } from "../../icons/chevron.mjs";
|
|
6
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
7
7
|
import carousel_module_default from "./carousel.module.mjs";
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
import { createContext, use, useEffect, useId, useRef, useState } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getMessages } from "../../../i18n/current.mjs";
|
|
2
2
|
import { CopyButton } from "../../buttons/copy-button/copy-button.mjs";
|
|
3
|
-
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
4
3
|
import { highlight } from "./highlight.mjs";
|
|
4
|
+
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
5
5
|
import code_block_module_default from "./code-block.module.mjs";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
._1lzWCq_columnMenu {
|
|
16
16
|
gap: calc(var(--spacing) * 3);
|
|
17
|
-
border-radius: var(--radius-lg);
|
|
18
|
-
background-color: var(--color-bg-raised);
|
|
19
17
|
padding: calc(var(--spacing) * 4);
|
|
20
|
-
box-shadow: var(--shadow-md);
|
|
21
18
|
flex-direction: column;
|
|
22
19
|
display: flex;
|
|
23
20
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getMessages } from "../../../i18n/current.mjs";
|
|
3
|
-
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
4
3
|
import { Button } from "../../buttons/button/button.mjs";
|
|
5
|
-
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
6
|
-
import { Popover } from "../../overlays/popover/index.mjs";
|
|
7
4
|
import { Checkbox } from "../../form/checkbox/checkbox.mjs";
|
|
8
|
-
import { CheckboxGroup } from "../../form/checkbox-group/
|
|
5
|
+
import { CheckboxGroup } from "../../form/checkbox-group/checkbox-group.mjs";
|
|
6
|
+
import { ChevronIcon } from "../../icons/chevron.mjs";
|
|
7
|
+
import { Popover } from "../../overlays/popover/index.mjs";
|
|
9
8
|
import { Table } from "../table/table.mjs";
|
|
9
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
10
10
|
import data_table_module_default from "./data-table.module.mjs";
|
|
11
11
|
import { clsx } from "clsx";
|
|
12
12
|
import { useId } from "react";
|
|
@@ -48,7 +48,6 @@ const ColumnMenu = ({ columns, hiddenColumnIds, onHiddenColumnIdsChange }) => {
|
|
|
48
48
|
const visible = hideable.filter((column) => !hiddenColumnIds.includes(column.id)).map((column) => column.id);
|
|
49
49
|
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
50
50
|
placement: "bottom-end",
|
|
51
|
-
role: "dialog",
|
|
52
51
|
children: [/* @__PURE__ */ jsx(Popover.Trigger, { renderItem: (props) => /* @__PURE__ */ jsx(Button, {
|
|
53
52
|
...props,
|
|
54
53
|
color: "base",
|
|
@@ -56,27 +55,27 @@ const ColumnMenu = ({ columns, hiddenColumnIds, onHiddenColumnIdsChange }) => {
|
|
|
56
55
|
type: "button",
|
|
57
56
|
variant: "outline",
|
|
58
57
|
children: messages.dataTableColumns
|
|
59
|
-
}) }), /* @__PURE__ */ jsx(Popover.Content, {
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
})
|
|
58
|
+
}) }), /* @__PURE__ */ jsx(Popover.Content, {
|
|
59
|
+
label: messages.dataTableColumns,
|
|
60
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: data_table_module_default.columnMenu,
|
|
62
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
63
|
+
className: data_table_module_default.columnMenuTitle,
|
|
64
|
+
id: titleId,
|
|
65
|
+
children: messages.dataTableColumns
|
|
66
|
+
}), /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
67
|
+
"aria-labelledby": titleId,
|
|
68
|
+
onChange: (next) => {
|
|
69
|
+
onHiddenColumnIdsChange(hideable.map((column) => column.id).filter((id) => !next.includes(id)));
|
|
70
|
+
},
|
|
71
|
+
options: hideable.map((column) => ({
|
|
72
|
+
value: column.id,
|
|
73
|
+
label: column.header
|
|
74
|
+
})),
|
|
75
|
+
value: visible
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
80
79
|
});
|
|
81
80
|
};
|
|
82
81
|
const DataTable = ({ label, columns, rows, getRowId, sort = null, onSortChange, selectedIds = NONE, onSelectedIdsChange, hiddenColumnIds = NONE, onHiddenColumnIdsChange, emptyState }) => {
|
|
@@ -10,7 +10,7 @@ type Props = {
|
|
|
10
10
|
items: readonly TreeItem[];
|
|
11
11
|
expandedIds?: readonly string[];
|
|
12
12
|
defaultExpandedIds?: readonly string[];
|
|
13
|
-
|
|
13
|
+
onExpandedIdsChange?: (ids: string[]) => void;
|
|
14
14
|
selectedId?: string | null;
|
|
15
15
|
defaultSelectedId?: string | null;
|
|
16
16
|
onChange?: (id: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
3
|
-
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
4
2
|
import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
|
|
5
3
|
import { readWritingMode } from "../../../hooks/writing-mode/index.mjs";
|
|
4
|
+
import { ChevronIcon } from "../../icons/chevron.mjs";
|
|
5
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
6
6
|
import tree_module_default from "./tree.module.mjs";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { useRef, useState } from "react";
|
|
@@ -30,11 +30,10 @@ const directionOf = (key, isVertical) => {
|
|
|
30
30
|
})[key];
|
|
31
31
|
};
|
|
32
32
|
const NONE = [];
|
|
33
|
-
const Tree = ({ label, items, expandedIds, defaultExpandedIds,
|
|
33
|
+
const Tree = ({ label, items, expandedIds, defaultExpandedIds, onExpandedIdsChange, selectedId, defaultSelectedId = null, onChange, ...rest }) => {
|
|
34
34
|
const [expanded, setExpanded] = useControllableState({
|
|
35
35
|
value: expandedIds,
|
|
36
|
-
defaultValue: defaultExpandedIds ?? NONE
|
|
37
|
-
onChange: onExpandedChange
|
|
36
|
+
defaultValue: defaultExpandedIds ?? NONE
|
|
38
37
|
});
|
|
39
38
|
const [selected, setSelected] = useControllableState({
|
|
40
39
|
value: selectedId,
|
|
@@ -54,7 +53,9 @@ const Tree = ({ label, items, expandedIds, defaultExpandedIds, onExpandedChange,
|
|
|
54
53
|
elements.current.get(id)?.focus();
|
|
55
54
|
};
|
|
56
55
|
const toggle = (id) => {
|
|
57
|
-
|
|
56
|
+
const next = expanded.includes(id) ? expanded.filter((value) => value !== id) : [...expanded, id];
|
|
57
|
+
setExpanded(next);
|
|
58
|
+
onExpandedIdsChange?.(next);
|
|
58
59
|
};
|
|
59
60
|
const typeahead = (from, character) => {
|
|
60
61
|
const lower = character.toLowerCase();
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { Status } from "../../../types/variables.mjs";
|
|
2
2
|
import { FC, HTMLAttributes, ReactNode } from "react";
|
|
3
|
-
export type AlertAction = {
|
|
4
|
-
label: string;
|
|
5
|
-
renderItem: (props: {
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}) => ReactNode;
|
|
8
|
-
};
|
|
9
3
|
type Props = {
|
|
10
4
|
tone: Status;
|
|
11
5
|
message: string | string[];
|
|
12
|
-
|
|
6
|
+
/** A link or button, placed after a one-line message or below a list. */
|
|
7
|
+
action?: ReactNode;
|
|
13
8
|
onClose?: () => void;
|
|
14
9
|
closeLabel?: string;
|
|
15
10
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role' | 'className' | 'style'>;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { getMessages } from "../../../i18n/current.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { AlertIcon, CloseIcon } from "../../icons/lucide.mjs";
|
|
2
|
+
import { STATUS_ICON, STATUS_MESSAGE_KEY, STATUS_SURFACE } from "../../_internal/status-tone.mjs";
|
|
4
3
|
import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
|
|
4
|
+
import { AlertIcon } from "../../icons/alert.mjs";
|
|
5
|
+
import { XIcon } from "../../icons/x.mjs";
|
|
5
6
|
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
6
|
-
import
|
|
7
|
+
import sr_only_module_default from "../../_internal/sr-only.module.mjs";
|
|
7
8
|
import alert_module_default from "./alert.module.mjs";
|
|
8
9
|
import { clsx } from "clsx";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
// src/components/feedback/alert/alert.tsx
|
|
11
12
|
const Alert = ({ tone, message, action, onClose, closeLabel, ...rest }) => {
|
|
12
13
|
const messages = getMessages();
|
|
13
|
-
const
|
|
14
|
-
const inlineAction =
|
|
14
|
+
const hasAction = action !== void 0 && action !== null && typeof action !== "boolean";
|
|
15
|
+
const inlineAction = hasAction ? /* @__PURE__ */ jsx("span", {
|
|
15
16
|
className: alert_module_default.inlineAction,
|
|
16
|
-
children:
|
|
17
|
+
children: action
|
|
17
18
|
}) : null;
|
|
18
19
|
let messageContent;
|
|
19
20
|
if (Array.isArray(message) && message.length > 1) {
|
|
20
|
-
const list = /* @__PURE__ */ jsx("ul", { children: message.map((msg) => /* @__PURE__ */ jsx("li", {
|
|
21
|
+
const list = /* @__PURE__ */ jsx("ul", { children: message.map((msg, index) => /* @__PURE__ */ jsx("li", {
|
|
21
22
|
className: alert_module_default.listItem,
|
|
22
23
|
children: msg
|
|
23
|
-
}, msg)) });
|
|
24
|
-
messageContent =
|
|
24
|
+
}, `${msg}-${index}`)) });
|
|
25
|
+
messageContent = hasAction ? /* @__PURE__ */ jsxs("div", { children: [list, /* @__PURE__ */ jsx("div", {
|
|
25
26
|
className: alert_module_default.listAction,
|
|
26
|
-
children:
|
|
27
|
+
children: action
|
|
27
28
|
})] }) : list;
|
|
28
29
|
} else {
|
|
29
30
|
const text = Array.isArray(message) ? message[0] : message;
|
|
@@ -58,7 +59,7 @@ const Alert = ({ tone, message, action, onClose, closeLabel, ...rest }) => {
|
|
|
58
59
|
onClick: onClose,
|
|
59
60
|
size: "sm",
|
|
60
61
|
tooltipDisabled: true,
|
|
61
|
-
children: /* @__PURE__ */ jsx(
|
|
62
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: "sm" })
|
|
62
63
|
})
|
|
63
64
|
}) : null
|
|
64
65
|
]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Alert
|
|
2
|
-
export { Alert
|
|
1
|
+
import { Alert } from "./alert.mjs";
|
|
2
|
+
export { Alert };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getMessages } from "../../../i18n/current.mjs";
|
|
2
|
-
import sr_only_module_default from "../../_internal/sr-only.module.mjs";
|
|
3
|
-
import { AlertIcon } from "../../icons/lucide.mjs";
|
|
4
|
-
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
5
2
|
import { STATUS_ICON, STATUS_MESSAGE_KEY, STATUS_SURFACE } from "../../_internal/status-tone.mjs";
|
|
3
|
+
import { AlertIcon } from "../../icons/alert.mjs";
|
|
4
|
+
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
5
|
+
import sr_only_module_default from "../../_internal/sr-only.module.mjs";
|
|
6
6
|
import callout_module_default from "./callout.module.mjs";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getMessages } from "../../../i18n/current.mjs";
|
|
2
|
-
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
3
2
|
import { toPrecision } from "../../../internal/to-precision.mjs";
|
|
3
|
+
import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
|
|
4
4
|
import progress_module_default from "./progress.module.mjs";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { Status } from "../../../types/variables.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "../alert/index.mjs";
|
|
4
|
-
export type ToastAction = AlertAction;
|
|
2
|
+
import { ReactNode } from "react";
|
|
5
3
|
export type ToastOptions = {
|
|
6
4
|
/**
|
|
7
5
|
* 自動で閉じるまでのミリ秒。`Number.POSITIVE_INFINITY` で自動クローズなし
|
|
8
6
|
* (閉じるボタンでのみ閉じる)。既定は 5000ms。
|
|
9
7
|
*/
|
|
10
8
|
duration?: number;
|
|
11
|
-
action
|
|
9
|
+
/** A link or button drawn in the toast, as `Alert`'s `action`. */
|
|
10
|
+
action?: ReactNode;
|
|
12
11
|
};
|
|
13
12
|
export type ToastType = {
|
|
14
13
|
id: string;
|
|
15
14
|
tone: Status;
|
|
16
15
|
message: string;
|
|
17
16
|
duration: number;
|
|
18
|
-
action?:
|
|
17
|
+
action?: ReactNode;
|
|
19
18
|
/**
|
|
20
19
|
* 開いた時点のフォーカス位置。閉じたときの返還先候補として使う。
|
|
21
20
|
* 参照を握り続けて DOM のリークを起こさないよう WeakRef で持つ。
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToastOptions, useToast } from "./context.mjs";
|
|
2
2
|
import { ToastProvider } from "./provider.mjs";
|
|
3
|
-
export { type
|
|
3
|
+
export { type ToastOptions, ToastProvider, useToast };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, RefObject } from "react";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The toasts of one layer. `Modal` opens its own inside its `<dialog>`, which
|
|
4
|
+
* the top layer would otherwise cover; the application's is `ToastProvider`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ToastLayer: FC<PropsWithChildren<{
|
|
3
7
|
portalRef?: RefObject<HTMLElement | null>;
|
|
4
8
|
position?: 'fixed' | 'absolute';
|
|
5
|
-
}>>;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const ToastProvider: FC<PropsWithChildren>;
|
|
@@ -52,7 +52,11 @@ const ToastItem = ({ id, isClosing, onExited, children }) => {
|
|
|
52
52
|
})
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
/**
|
|
56
|
+
* The toasts of one layer. `Modal` opens its own inside its `<dialog>`, which
|
|
57
|
+
* the top layer would otherwise cover; the application's is `ToastProvider`.
|
|
58
|
+
*/
|
|
59
|
+
const ToastLayer = ({ children, portalRef = null, position = "fixed" }) => {
|
|
56
60
|
const messages = getMessages();
|
|
57
61
|
const [state, setState] = useState({
|
|
58
62
|
toasts: [],
|
|
@@ -172,4 +176,5 @@ const ToastProvider = ({ children, portalRef = null, position = "fixed" }) => {
|
|
|
172
176
|
}), container) : null]
|
|
173
177
|
});
|
|
174
178
|
};
|
|
175
|
-
|
|
179
|
+
const ToastProvider = ({ children }) => /* @__PURE__ */ jsx(ToastLayer, { children });
|
|
180
|
+
export { ToastLayer, ToastProvider };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Status } from "../../../types/variables.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { FC } from "react";
|
|
2
|
+
import { FC, ReactNode } from "react";
|
|
4
3
|
type ToastProps = {
|
|
5
4
|
tone: Status;
|
|
6
5
|
message: string;
|
|
7
6
|
duration: number;
|
|
8
|
-
action?:
|
|
7
|
+
action?: ReactNode;
|
|
9
8
|
isPaused?: boolean;
|
|
10
9
|
onClose: () => void;
|
|
11
10
|
};
|
|
@@ -7,12 +7,12 @@ type BaseProps = {
|
|
|
7
7
|
ref?: Ref<HTMLInputElement>;
|
|
8
8
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'role' | 'className' | 'style' | 'value' | 'onChange' | 'defaultValue' | 'children' | 'id' | 'autoComplete' | 'aria-autocomplete' | 'aria-controls' | 'aria-expanded' | 'aria-activedescendant'>;
|
|
9
9
|
type ControlledProps = {
|
|
10
|
-
value: string[];
|
|
10
|
+
value: readonly string[];
|
|
11
11
|
onChange: (value: string[]) => void;
|
|
12
12
|
defaultValue?: never;
|
|
13
13
|
};
|
|
14
14
|
type UncontrolledProps = {
|
|
15
|
-
defaultValue?: string[];
|
|
15
|
+
defaultValue?: readonly string[];
|
|
16
16
|
value?: never;
|
|
17
17
|
onChange?: (value: string[]) => void;
|
|
18
18
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getMessages } from "../../../i18n/current.mjs";
|
|
3
|
-
import { mergeRefs } from "../../../helpers/merge-refs.mjs";
|
|
4
|
-
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
5
|
-
import { CloseIcon } from "../../icons/lucide.mjs";
|
|
6
|
-
import { chain } from "../../../helpers/chain.mjs";
|
|
7
2
|
import { useClickAway } from "../../../hooks/click-away/index.mjs";
|
|
8
3
|
import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
|
|
9
4
|
import { useWritingMode } from "../../../hooks/writing-mode/index.mjs";
|
|
10
|
-
import {
|
|
5
|
+
import { getMessages } from "../../../i18n/current.mjs";
|
|
11
6
|
import { FormValue } from "../../_internal/form-value.mjs";
|
|
7
|
+
import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
|
|
8
|
+
import { XIcon } from "../../icons/x.mjs";
|
|
9
|
+
import { chain } from "../../../helpers/chain.mjs";
|
|
10
|
+
import { mergeRefs } from "../../../helpers/merge-refs.mjs";
|
|
11
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
12
12
|
import autocomplete_module_default from "./autocomplete.module.mjs";
|
|
13
13
|
import { clsx } from "clsx";
|
|
14
14
|
import { useCallback, useDeferredValue, useId, useMemo, useRef, useState } from "react";
|
|
@@ -17,11 +17,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
// src/components/form/autocomplete/autocomplete.tsx
|
|
18
18
|
const Autocomplete = ({ id, name, invalid = false, disabled = false, readOnly = false, required = false, options, value, defaultValue, onChange, placeholder, onBlur, onClick, onKeyDown, ref, ...rest }) => {
|
|
19
19
|
const messages = getMessages();
|
|
20
|
-
const [currentValue,
|
|
20
|
+
const [currentValue, setCurrentValue] = useControllableState({
|
|
21
21
|
value,
|
|
22
|
-
defaultValue: defaultValue ?? []
|
|
23
|
-
onChange
|
|
22
|
+
defaultValue: defaultValue ?? []
|
|
24
23
|
});
|
|
24
|
+
const handleChange = (next) => {
|
|
25
|
+
setCurrentValue(next);
|
|
26
|
+
onChange?.(next);
|
|
27
|
+
};
|
|
25
28
|
const baseId = useId();
|
|
26
29
|
const listboxId = `${baseId}-listbox`;
|
|
27
30
|
const optionId = (index) => `${baseId}-option-${String(index)}`;
|
|
@@ -135,7 +138,7 @@ const Autocomplete = ({ id, name, invalid = false, disabled = false, readOnly =
|
|
|
135
138
|
name,
|
|
136
139
|
onReset: () => {
|
|
137
140
|
reset();
|
|
138
|
-
if (value === void 0) handleChange(defaultValue ?? []);
|
|
141
|
+
if (value === void 0) handleChange([...defaultValue ?? []]);
|
|
139
142
|
},
|
|
140
143
|
required,
|
|
141
144
|
values: currentValue
|
|
@@ -158,7 +161,7 @@ const Autocomplete = ({ id, name, invalid = false, disabled = false, readOnly =
|
|
|
158
161
|
handleChange(currentValue.filter((v) => v !== selectedValue));
|
|
159
162
|
},
|
|
160
163
|
size: "sm",
|
|
161
|
-
children: /* @__PURE__ */ jsx(
|
|
164
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: "sm" })
|
|
162
165
|
})]
|
|
163
166
|
}, selectedValue);
|
|
164
167
|
}), /* @__PURE__ */ jsx("input", {
|
|
@@ -196,7 +199,7 @@ const Autocomplete = ({ id, name, invalid = false, disabled = false, readOnly =
|
|
|
196
199
|
handleChange([]);
|
|
197
200
|
},
|
|
198
201
|
size: "sm",
|
|
199
|
-
children: /* @__PURE__ */ jsx(
|
|
202
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: "sm" })
|
|
200
203
|
})]
|
|
201
204
|
}),
|
|
202
205
|
expanded && /* @__PURE__ */ jsx("div", {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getLocale, getMessages } from "../../../i18n/current.mjs";
|
|
3
|
-
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
4
|
-
import { ChevronIcon } from "../../icons/lucide.mjs";
|
|
5
2
|
import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
|
|
6
|
-
import {
|
|
3
|
+
import { getLocale, getMessages } from "../../../i18n/current.mjs";
|
|
7
4
|
import { addDays, addMonths, clampDate, endOfMonth, formatDate, isIsoDate, isSameMonth, isWithin, localToday, monthWeeks, startOfMonth, startOfWeek, subscribeToDateChange } from "../../../internal/iso-date.mjs";
|
|
5
|
+
import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
|
|
6
|
+
import { ChevronIcon } from "../../icons/chevron.mjs";
|
|
7
|
+
import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
|
|
8
8
|
import calendar_module_default from "./calendar.module.mjs";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
10
|
import { Suspense, use, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -99,7 +99,6 @@ const CalendarBody = ({ value, defaultValue, onChange, min: minProp, max: maxPro
|
|
|
99
99
|
className: calendar_module_default.header,
|
|
100
100
|
children: [
|
|
101
101
|
/* @__PURE__ */ jsx(IconButton, {
|
|
102
|
-
color: "transparent",
|
|
103
102
|
disabled: !canGoPrevious,
|
|
104
103
|
label: messages.calendarPreviousMonth,
|
|
105
104
|
onClick: () => {
|
|
@@ -119,7 +118,6 @@ const CalendarBody = ({ value, defaultValue, onChange, min: minProp, max: maxPro
|
|
|
119
118
|
children: monthFormat.format(formatDate(focused))
|
|
120
119
|
}),
|
|
121
120
|
/* @__PURE__ */ jsx(IconButton, {
|
|
122
|
-
color: "transparent",
|
|
123
121
|
disabled: !canGoNext,
|
|
124
122
|
label: messages.calendarNextMonth,
|
|
125
123
|
onClick: () => {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ChangeEvent, FC, InputHTMLAttributes, Ref } from "react";
|
|
2
2
|
type BaseProps = {
|
|
3
|
+
errorText?: string;
|
|
4
|
+
helpText?: string;
|
|
3
5
|
indeterminate?: boolean;
|
|
4
6
|
invalid?: boolean;
|
|
5
|
-
itemValue?: string;
|
|
6
7
|
label: string;
|
|
7
8
|
labelHidden?: boolean;
|
|
8
9
|
ref?: Ref<HTMLInputElement>;
|
|
10
|
+
value?: string;
|
|
9
11
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'className' | 'style' | 'value' | 'onChange' | 'defaultChecked' | 'checked' | 'children'>;
|
|
10
12
|
type ControlledProps = {
|
|
11
13
|
checked: boolean;
|