@kanzo-tech/ui 0.0.1-alpha
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 +60 -0
- package/dist/analytics.d.ts +36 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +155 -0
- package/dist/analytics.js.map +1 -0
- package/dist/charts/arrow.d.ts +37 -0
- package/dist/charts/arrow.d.ts.map +1 -0
- package/dist/charts/arrow.js +29 -0
- package/dist/charts/arrow.js.map +1 -0
- package/dist/charts/chart-axes.d.ts +59 -0
- package/dist/charts/chart-axes.d.ts.map +1 -0
- package/dist/charts/chart-axes.js +39 -0
- package/dist/charts/chart-axes.js.map +1 -0
- package/dist/charts/chart-config.d.ts +52 -0
- package/dist/charts/chart-config.d.ts.map +1 -0
- package/dist/charts/chart-config.js +43 -0
- package/dist/charts/chart-config.js.map +1 -0
- package/dist/charts/chart-inputs.d.ts +174 -0
- package/dist/charts/chart-inputs.d.ts.map +1 -0
- package/dist/charts/chart-inputs.js +382 -0
- package/dist/charts/chart-inputs.js.map +1 -0
- package/dist/charts/chart-interactors.d.ts +75 -0
- package/dist/charts/chart-interactors.d.ts.map +1 -0
- package/dist/charts/chart-interactors.js +35 -0
- package/dist/charts/chart-interactors.js.map +1 -0
- package/dist/charts/chart-legend.d.ts +38 -0
- package/dist/charts/chart-legend.d.ts.map +1 -0
- package/dist/charts/chart-legend.js +49 -0
- package/dist/charts/chart-legend.js.map +1 -0
- package/dist/charts/chart-marks.d.ts +124 -0
- package/dist/charts/chart-marks.d.ts.map +1 -0
- package/dist/charts/chart-marks.js +109 -0
- package/dist/charts/chart-marks.js.map +1 -0
- package/dist/charts/chart-root.d.ts +90 -0
- package/dist/charts/chart-root.d.ts.map +1 -0
- package/dist/charts/chart-root.js +162 -0
- package/dist/charts/chart-root.js.map +1 -0
- package/dist/charts/chart-spec.d.ts +126 -0
- package/dist/charts/chart-spec.d.ts.map +1 -0
- package/dist/charts/chart-spec.js +133 -0
- package/dist/charts/chart-spec.js.map +1 -0
- package/dist/charts/chart-stat.d.ts +23 -0
- package/dist/charts/chart-stat.d.ts.map +1 -0
- package/dist/charts/chart-stat.js +24 -0
- package/dist/charts/chart-stat.js.map +1 -0
- package/dist/charts/id-set-client.d.ts +42 -0
- package/dist/charts/id-set-client.d.ts.map +1 -0
- package/dist/charts/id-set-client.js +43 -0
- package/dist/charts/id-set-client.js.map +1 -0
- package/dist/charts/mosaic-provider.d.ts +70 -0
- package/dist/charts/mosaic-provider.d.ts.map +1 -0
- package/dist/charts/mosaic-provider.js +53 -0
- package/dist/charts/mosaic-provider.js.map +1 -0
- package/dist/charts/query-client.d.ts +22 -0
- package/dist/charts/query-client.d.ts.map +1 -0
- package/dist/charts/query-client.js +26 -0
- package/dist/charts/query-client.js.map +1 -0
- package/dist/charts/tokenized-plot.d.ts +26 -0
- package/dist/charts/tokenized-plot.d.ts.map +1 -0
- package/dist/charts/tokenized-plot.js +41 -0
- package/dist/charts/tokenized-plot.js.map +1 -0
- package/dist/charts/use-chart-query.d.ts +30 -0
- package/dist/charts/use-chart-query.d.ts.map +1 -0
- package/dist/charts/use-chart-query.js +19 -0
- package/dist/charts/use-chart-query.js.map +1 -0
- package/dist/composites/CodeEditor.d.ts +64 -0
- package/dist/composites/CodeEditor.d.ts.map +1 -0
- package/dist/composites/CodeEditor.js +521 -0
- package/dist/composites/CodeEditor.js.map +1 -0
- package/dist/composites/MadeWith.d.ts +39 -0
- package/dist/composites/MadeWith.d.ts.map +1 -0
- package/dist/composites/MadeWith.js +30 -0
- package/dist/composites/MadeWith.js.map +1 -0
- package/dist/composites/Preferences.d.ts +155 -0
- package/dist/composites/Preferences.d.ts.map +1 -0
- package/dist/composites/Preferences.js +501 -0
- package/dist/composites/Preferences.js.map +1 -0
- package/dist/composites/Questionnaire.d.ts +215 -0
- package/dist/composites/Questionnaire.d.ts.map +1 -0
- package/dist/composites/Questionnaire.js +422 -0
- package/dist/composites/Questionnaire.js.map +1 -0
- package/dist/composites/SidebarIdentity.d.ts +63 -0
- package/dist/composites/SidebarIdentity.d.ts.map +1 -0
- package/dist/composites/SidebarIdentity.js +103 -0
- package/dist/composites/SidebarIdentity.js.map +1 -0
- package/dist/composites/code-editor-search.d.ts +40 -0
- package/dist/composites/code-editor-search.d.ts.map +1 -0
- package/dist/composites/code-editor-search.js +212 -0
- package/dist/composites/code-editor-search.js.map +1 -0
- package/dist/composites/sidebar.d.ts +129 -0
- package/dist/composites/sidebar.d.ts.map +1 -0
- package/dist/composites/sidebar.js +671 -0
- package/dist/composites/sidebar.js.map +1 -0
- package/dist/composites/theme-notice.d.ts +54 -0
- package/dist/composites/theme-notice.d.ts.map +1 -0
- package/dist/composites/theme-notice.js +19 -0
- package/dist/composites/theme-notice.js.map +1 -0
- package/dist/editor.d.ts +3 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +6 -0
- package/dist/editor.js.map +1 -0
- package/dist/guard-corpus.d.ts +63 -0
- package/dist/guard-corpus.d.ts.map +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +696 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts/section.d.ts +166 -0
- package/dist/layouts/section.d.ts.map +1 -0
- package/dist/layouts/section.js +153 -0
- package/dist/layouts/section.js.map +1 -0
- package/dist/layouts/shell.d.ts +128 -0
- package/dist/layouts/shell.d.ts.map +1 -0
- package/dist/layouts/shell.js +107 -0
- package/dist/layouts/shell.js.map +1 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/is-active-path.d.ts +13 -0
- package/dist/lib/is-active-path.d.ts.map +1 -0
- package/dist/lib/is-active-path.js +7 -0
- package/dist/lib/is-active-path.js.map +1 -0
- package/dist/lib/theme-tick.d.ts +37 -0
- package/dist/lib/theme-tick.d.ts.map +1 -0
- package/dist/lib/theme-tick.js +30 -0
- package/dist/lib/theme-tick.js.map +1 -0
- package/dist/lib/token-color.d.ts +74 -0
- package/dist/lib/token-color.d.ts.map +1 -0
- package/dist/lib/token-color.js +35 -0
- package/dist/lib/token-color.js.map +1 -0
- package/dist/lib/use-is-mobile.d.ts +2 -0
- package/dist/lib/use-is-mobile.d.ts.map +1 -0
- package/dist/lib/use-is-mobile.js +17 -0
- package/dist/lib/use-is-mobile.js.map +1 -0
- package/dist/shark-parity.divergences.d.ts +104 -0
- package/dist/shark-parity.divergences.d.ts.map +1 -0
- package/dist/simples/FacetFilter.d.ts +57 -0
- package/dist/simples/FacetFilter.d.ts.map +1 -0
- package/dist/simples/FacetFilter.js +167 -0
- package/dist/simples/FacetFilter.js.map +1 -0
- package/dist/simples/FieldArray.d.ts +42 -0
- package/dist/simples/FieldArray.d.ts.map +1 -0
- package/dist/simples/FieldArray.js +76 -0
- package/dist/simples/FieldArray.js.map +1 -0
- package/dist/simples/Link.d.ts +38 -0
- package/dist/simples/Link.d.ts.map +1 -0
- package/dist/simples/Link.js +24 -0
- package/dist/simples/Link.js.map +1 -0
- package/dist/simples/accordion.d.ts +8 -0
- package/dist/simples/accordion.d.ts.map +1 -0
- package/dist/simples/accordion.js +78 -0
- package/dist/simples/accordion.js.map +1 -0
- package/dist/simples/action-bar.d.ts +101 -0
- package/dist/simples/action-bar.d.ts.map +1 -0
- package/dist/simples/action-bar.js +195 -0
- package/dist/simples/action-bar.js.map +1 -0
- package/dist/simples/alert-dialog.d.ts +24 -0
- package/dist/simples/alert-dialog.d.ts.map +1 -0
- package/dist/simples/alert-dialog.js +43 -0
- package/dist/simples/alert-dialog.js.map +1 -0
- package/dist/simples/alert.d.ts +36 -0
- package/dist/simples/alert.d.ts.map +1 -0
- package/dist/simples/alert.js +123 -0
- package/dist/simples/alert.js.map +1 -0
- package/dist/simples/avatar.d.ts +37 -0
- package/dist/simples/avatar.d.ts.map +1 -0
- package/dist/simples/avatar.js +133 -0
- package/dist/simples/avatar.js.map +1 -0
- package/dist/simples/badge.d.ts +66 -0
- package/dist/simples/badge.d.ts.map +1 -0
- package/dist/simples/badge.js +138 -0
- package/dist/simples/badge.js.map +1 -0
- package/dist/simples/breadcrumb.d.ts +19 -0
- package/dist/simples/breadcrumb.d.ts.map +1 -0
- package/dist/simples/breadcrumb.js +107 -0
- package/dist/simples/breadcrumb.js.map +1 -0
- package/dist/simples/button-group.d.ts +19 -0
- package/dist/simples/button-group.d.ts.map +1 -0
- package/dist/simples/button-group.js +69 -0
- package/dist/simples/button-group.js.map +1 -0
- package/dist/simples/button.d.ts +148 -0
- package/dist/simples/button.d.ts.map +1 -0
- package/dist/simples/button.js +157 -0
- package/dist/simples/button.js.map +1 -0
- package/dist/simples/calendar.d.ts +45 -0
- package/dist/simples/calendar.d.ts.map +1 -0
- package/dist/simples/calendar.js +342 -0
- package/dist/simples/calendar.js.map +1 -0
- package/dist/simples/card.d.ts +43 -0
- package/dist/simples/card.d.ts.map +1 -0
- package/dist/simples/card.js +151 -0
- package/dist/simples/card.js.map +1 -0
- package/dist/simples/checkbox.d.ts +25 -0
- package/dist/simples/checkbox.d.ts.map +1 -0
- package/dist/simples/checkbox.js +103 -0
- package/dist/simples/checkbox.js.map +1 -0
- package/dist/simples/client-only.d.ts +3 -0
- package/dist/simples/client-only.d.ts.map +1 -0
- package/dist/simples/client-only.js +7 -0
- package/dist/simples/client-only.js.map +1 -0
- package/dist/simples/clipboard.d.ts +11 -0
- package/dist/simples/clipboard.d.ts.map +1 -0
- package/dist/simples/clipboard.js +99 -0
- package/dist/simples/clipboard.js.map +1 -0
- package/dist/simples/collapsible.d.ts +8 -0
- package/dist/simples/collapsible.d.ts.map +1 -0
- package/dist/simples/collapsible.js +79 -0
- package/dist/simples/collapsible.js.map +1 -0
- package/dist/simples/color-picker.d.ts +62 -0
- package/dist/simples/color-picker.d.ts.map +1 -0
- package/dist/simples/color-picker.js +391 -0
- package/dist/simples/color-picker.js.map +1 -0
- package/dist/simples/combobox.d.ts +66 -0
- package/dist/simples/combobox.d.ts.map +1 -0
- package/dist/simples/combobox.js +230 -0
- package/dist/simples/combobox.js.map +1 -0
- package/dist/simples/command.d.ts +45 -0
- package/dist/simples/command.d.ts.map +1 -0
- package/dist/simples/command.js +180 -0
- package/dist/simples/command.js.map +1 -0
- package/dist/simples/data-list.d.ts +25 -0
- package/dist/simples/data-list.d.ts.map +1 -0
- package/dist/simples/data-list.js +62 -0
- package/dist/simples/data-list.js.map +1 -0
- package/dist/simples/date-picker.d.ts +16 -0
- package/dist/simples/date-picker.d.ts.map +1 -0
- package/dist/simples/date-picker.js +117 -0
- package/dist/simples/date-picker.js.map +1 -0
- package/dist/simples/diagnostic.d.ts +138 -0
- package/dist/simples/diagnostic.d.ts.map +1 -0
- package/dist/simples/diagnostic.js +288 -0
- package/dist/simples/diagnostic.js.map +1 -0
- package/dist/simples/dialog.d.ts +100 -0
- package/dist/simples/dialog.d.ts.map +1 -0
- package/dist/simples/dialog.js +267 -0
- package/dist/simples/dialog.js.map +1 -0
- package/dist/simples/download-trigger.d.ts +3 -0
- package/dist/simples/download-trigger.d.ts.map +1 -0
- package/dist/simples/download-trigger.js +7 -0
- package/dist/simples/download-trigger.js.map +1 -0
- package/dist/simples/editable.d.ts +23 -0
- package/dist/simples/editable.d.ts.map +1 -0
- package/dist/simples/editable.js +70 -0
- package/dist/simples/editable.js.map +1 -0
- package/dist/simples/field.d.ts +58 -0
- package/dist/simples/field.d.ts.map +1 -0
- package/dist/simples/field.js +285 -0
- package/dist/simples/field.js.map +1 -0
- package/dist/simples/file-upload.d.ts +19 -0
- package/dist/simples/file-upload.d.ts.map +1 -0
- package/dist/simples/file-upload.js +192 -0
- package/dist/simples/file-upload.js.map +1 -0
- package/dist/simples/float.d.ts +45 -0
- package/dist/simples/float.d.ts.map +1 -0
- package/dist/simples/float.js +40 -0
- package/dist/simples/float.js.map +1 -0
- package/dist/simples/floating-panel.d.ts +25 -0
- package/dist/simples/floating-panel.d.ts.map +1 -0
- package/dist/simples/floating-panel.js +95 -0
- package/dist/simples/floating-panel.js.map +1 -0
- package/dist/simples/highlight.d.ts +6 -0
- package/dist/simples/highlight.d.ts.map +1 -0
- package/dist/simples/highlight.js +24 -0
- package/dist/simples/highlight.js.map +1 -0
- package/dist/simples/hover-card.d.ts +11 -0
- package/dist/simples/hover-card.d.ts.map +1 -0
- package/dist/simples/hover-card.js +83 -0
- package/dist/simples/hover-card.js.map +1 -0
- package/dist/simples/image-cropper.d.ts +17 -0
- package/dist/simples/image-cropper.d.ts.map +1 -0
- package/dist/simples/image-cropper.js +139 -0
- package/dist/simples/image-cropper.js.map +1 -0
- package/dist/simples/input-group.d.ts +116 -0
- package/dist/simples/input-group.d.ts.map +1 -0
- package/dist/simples/input-group.js +245 -0
- package/dist/simples/input-group.js.map +1 -0
- package/dist/simples/input.d.ts +26 -0
- package/dist/simples/input.d.ts.map +1 -0
- package/dist/simples/input.js +60 -0
- package/dist/simples/input.js.map +1 -0
- package/dist/simples/item.d.ts +72 -0
- package/dist/simples/item.d.ts.map +1 -0
- package/dist/simples/item.js +180 -0
- package/dist/simples/item.js.map +1 -0
- package/dist/simples/json-tree-view.d.ts +7 -0
- package/dist/simples/json-tree-view.d.ts.map +1 -0
- package/dist/simples/json-tree-view.js +71 -0
- package/dist/simples/json-tree-view.js.map +1 -0
- package/dist/simples/kbd.d.ts +25 -0
- package/dist/simples/kbd.d.ts.map +1 -0
- package/dist/simples/kbd.js +50 -0
- package/dist/simples/kbd.js.map +1 -0
- package/dist/simples/listbox.d.ts +46 -0
- package/dist/simples/listbox.d.ts.map +1 -0
- package/dist/simples/listbox.js +218 -0
- package/dist/simples/listbox.js.map +1 -0
- package/dist/simples/menu.d.ts +60 -0
- package/dist/simples/menu.d.ts.map +1 -0
- package/dist/simples/menu.js +294 -0
- package/dist/simples/menu.js.map +1 -0
- package/dist/simples/native-select.d.ts +36 -0
- package/dist/simples/native-select.d.ts.map +1 -0
- package/dist/simples/native-select.js +77 -0
- package/dist/simples/native-select.js.map +1 -0
- package/dist/simples/number-input.d.ts +35 -0
- package/dist/simples/number-input.d.ts.map +1 -0
- package/dist/simples/number-input.js +142 -0
- package/dist/simples/number-input.js.map +1 -0
- package/dist/simples/pagination.d.ts +11 -0
- package/dist/simples/pagination.d.ts.map +1 -0
- package/dist/simples/pagination.js +78 -0
- package/dist/simples/pagination.js.map +1 -0
- package/dist/simples/password-input.d.ts +23 -0
- package/dist/simples/password-input.d.ts.map +1 -0
- package/dist/simples/password-input.js +90 -0
- package/dist/simples/password-input.js.map +1 -0
- package/dist/simples/pin-input.d.ts +30 -0
- package/dist/simples/pin-input.d.ts.map +1 -0
- package/dist/simples/pin-input.js +71 -0
- package/dist/simples/pin-input.js.map +1 -0
- package/dist/simples/popover.d.ts +42 -0
- package/dist/simples/popover.d.ts.map +1 -0
- package/dist/simples/popover.js +188 -0
- package/dist/simples/popover.js.map +1 -0
- package/dist/simples/progress.d.ts +23 -0
- package/dist/simples/progress.d.ts.map +1 -0
- package/dist/simples/progress.js +82 -0
- package/dist/simples/progress.js.map +1 -0
- package/dist/simples/prose.d.ts +17 -0
- package/dist/simples/prose.d.ts.map +1 -0
- package/dist/simples/prose.js +18 -0
- package/dist/simples/prose.js.map +1 -0
- package/dist/simples/radio-group.d.ts +23 -0
- package/dist/simples/radio-group.d.ts.map +1 -0
- package/dist/simples/radio-group.js +149 -0
- package/dist/simples/radio-group.js.map +1 -0
- package/dist/simples/rating.d.ts +10 -0
- package/dist/simples/rating.d.ts.map +1 -0
- package/dist/simples/rating.js +81 -0
- package/dist/simples/rating.js.map +1 -0
- package/dist/simples/resizable.d.ts +16 -0
- package/dist/simples/resizable.d.ts.map +1 -0
- package/dist/simples/resizable.js +57 -0
- package/dist/simples/resizable.js.map +1 -0
- package/dist/simples/scroll-area.d.ts +23 -0
- package/dist/simples/scroll-area.d.ts.map +1 -0
- package/dist/simples/scroll-area.js +88 -0
- package/dist/simples/scroll-area.js.map +1 -0
- package/dist/simples/segment-group.d.ts +27 -0
- package/dist/simples/segment-group.d.ts.map +1 -0
- package/dist/simples/segment-group.js +129 -0
- package/dist/simples/segment-group.js.map +1 -0
- package/dist/simples/select.d.ts +34 -0
- package/dist/simples/select.d.ts.map +1 -0
- package/dist/simples/select.js +258 -0
- package/dist/simples/select.js.map +1 -0
- package/dist/simples/separator.d.ts +12 -0
- package/dist/simples/separator.d.ts.map +1 -0
- package/dist/simples/separator.js +27 -0
- package/dist/simples/separator.js.map +1 -0
- package/dist/simples/sheet.d.ts +94 -0
- package/dist/simples/sheet.d.ts.map +1 -0
- package/dist/simples/sheet.js +172 -0
- package/dist/simples/sheet.js.map +1 -0
- package/dist/simples/show.d.ts +10 -0
- package/dist/simples/show.d.ts.map +1 -0
- package/dist/simples/show.js +9 -0
- package/dist/simples/show.js.map +1 -0
- package/dist/simples/skeleton.d.ts +3 -0
- package/dist/simples/skeleton.d.ts.map +1 -0
- package/dist/simples/skeleton.js +23 -0
- package/dist/simples/skeleton.js.map +1 -0
- package/dist/simples/skip-nav.d.ts +54 -0
- package/dist/simples/skip-nav.d.ts.map +1 -0
- package/dist/simples/skip-nav.js +42 -0
- package/dist/simples/skip-nav.js.map +1 -0
- package/dist/simples/slider.d.ts +29 -0
- package/dist/simples/slider.d.ts.map +1 -0
- package/dist/simples/slider.js +189 -0
- package/dist/simples/slider.js.map +1 -0
- package/dist/simples/spinner.d.ts +2 -0
- package/dist/simples/spinner.d.ts.map +1 -0
- package/dist/simples/spinner.js +20 -0
- package/dist/simples/spinner.js.map +1 -0
- package/dist/simples/stat-tile.d.ts +31 -0
- package/dist/simples/stat-tile.d.ts.map +1 -0
- package/dist/simples/stat-tile.js +64 -0
- package/dist/simples/stat-tile.js.map +1 -0
- package/dist/simples/status.d.ts +48 -0
- package/dist/simples/status.d.ts.map +1 -0
- package/dist/simples/status.js +57 -0
- package/dist/simples/status.js.map +1 -0
- package/dist/simples/steps.d.ts +20 -0
- package/dist/simples/steps.d.ts.map +1 -0
- package/dist/simples/steps.js +171 -0
- package/dist/simples/steps.js.map +1 -0
- package/dist/simples/suggestions.d.ts +43 -0
- package/dist/simples/suggestions.d.ts.map +1 -0
- package/dist/simples/suggestions.js +38 -0
- package/dist/simples/suggestions.js.map +1 -0
- package/dist/simples/swatch.d.ts +73 -0
- package/dist/simples/swatch.d.ts.map +1 -0
- package/dist/simples/swatch.js +35 -0
- package/dist/simples/swatch.js.map +1 -0
- package/dist/simples/switch.d.ts +5 -0
- package/dist/simples/switch.d.ts.map +1 -0
- package/dist/simples/switch.js +71 -0
- package/dist/simples/switch.js.map +1 -0
- package/dist/simples/table.d.ts +55 -0
- package/dist/simples/table.d.ts.map +1 -0
- package/dist/simples/table.js +166 -0
- package/dist/simples/table.js.map +1 -0
- package/dist/simples/tabs.d.ts +55 -0
- package/dist/simples/tabs.d.ts.map +1 -0
- package/dist/simples/tabs.js +133 -0
- package/dist/simples/tabs.js.map +1 -0
- package/dist/simples/tags-input.d.ts +64 -0
- package/dist/simples/tags-input.d.ts.map +1 -0
- package/dist/simples/tags-input.js +228 -0
- package/dist/simples/tags-input.js.map +1 -0
- package/dist/simples/textarea.d.ts +6 -0
- package/dist/simples/textarea.d.ts.map +1 -0
- package/dist/simples/textarea.js +34 -0
- package/dist/simples/textarea.js.map +1 -0
- package/dist/simples/toast.d.ts +20 -0
- package/dist/simples/toast.d.ts.map +1 -0
- package/dist/simples/toast.js +127 -0
- package/dist/simples/toast.js.map +1 -0
- package/dist/simples/toggle-group.d.ts +20 -0
- package/dist/simples/toggle-group.d.ts.map +1 -0
- package/dist/simples/toggle-group.js +82 -0
- package/dist/simples/toggle-group.js.map +1 -0
- package/dist/simples/toggle.d.ts +35 -0
- package/dist/simples/toggle.d.ts.map +1 -0
- package/dist/simples/toggle.js +57 -0
- package/dist/simples/toggle.js.map +1 -0
- package/dist/simples/tooltip.d.ts +8 -0
- package/dist/simples/tooltip.d.ts.map +1 -0
- package/dist/simples/tooltip.js +80 -0
- package/dist/simples/tooltip.js.map +1 -0
- package/dist/simples/tour.d.ts +81 -0
- package/dist/simples/tour.d.ts.map +1 -0
- package/dist/simples/tour.js +253 -0
- package/dist/simples/tour.js.map +1 -0
- package/dist/simples/tree-view.d.ts +64 -0
- package/dist/simples/tree-view.d.ts.map +1 -0
- package/dist/simples/tree-view.js +300 -0
- package/dist/simples/tree-view.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/table/data-table-content.d.ts +18 -0
- package/dist/table/data-table-content.d.ts.map +1 -0
- package/dist/table/data-table-content.js +53 -0
- package/dist/table/data-table-content.js.map +1 -0
- package/dist/table/data-table-pagination.d.ts +8 -0
- package/dist/table/data-table-pagination.d.ts.map +1 -0
- package/dist/table/data-table-pagination.js +65 -0
- package/dist/table/data-table-pagination.js.map +1 -0
- package/dist/table/data-table-root.d.ts +10 -0
- package/dist/table/data-table-root.d.ts.map +1 -0
- package/dist/table/data-table-root.js +21 -0
- package/dist/table/data-table-root.js.map +1 -0
- package/dist/table/data-table-toolbar.d.ts +44 -0
- package/dist/table/data-table-toolbar.d.ts.map +1 -0
- package/dist/table/data-table-toolbar.js +87 -0
- package/dist/table/data-table-toolbar.js.map +1 -0
- package/dist/table/select-column.d.ts +16 -0
- package/dist/table/select-column.d.ts.map +1 -0
- package/dist/table/select-column.js +39 -0
- package/dist/table/select-column.js.map +1 -0
- package/dist/table/sortableHeader.d.ts +25 -0
- package/dist/table/sortableHeader.d.ts.map +1 -0
- package/dist/table/sortableHeader.js +43 -0
- package/dist/table/sortableHeader.js.map +1 -0
- package/dist/table/use-data-table.d.ts +40 -0
- package/dist/table/use-data-table.d.ts.map +1 -0
- package/dist/table/use-data-table.js +65 -0
- package/dist/table/use-data-table.js.map +1 -0
- package/dist/table.d.ts +15 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +22 -0
- package/dist/table.js.map +1 -0
- package/dist/theme/KanzoTheme.d.ts +74 -0
- package/dist/theme/KanzoTheme.d.ts.map +1 -0
- package/dist/theme/KanzoTheme.js +61 -0
- package/dist/theme/KanzoTheme.js.map +1 -0
- package/dist/theme/KanzoThemeProvider.d.ts +144 -0
- package/dist/theme/KanzoThemeProvider.d.ts.map +1 -0
- package/dist/theme/KanzoThemeProvider.js +271 -0
- package/dist/theme/KanzoThemeProvider.js.map +1 -0
- package/dist/theme/theme-context.d.ts +146 -0
- package/dist/theme/theme-context.d.ts.map +1 -0
- package/dist/theme/theme-context.js +18 -0
- package/dist/theme/theme-context.js.map +1 -0
- package/dist/theme/theme-script.d.ts +17 -0
- package/dist/theme/theme-script.d.ts.map +1 -0
- package/dist/theme/theme-script.js +16 -0
- package/dist/theme/theme-script.js.map +1 -0
- package/package.json +201 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { ark as i } from "@ark-ui/react/factory";
|
|
3
|
+
import { useStepsContext as p, Steps as r } from "@ark-ui/react/steps";
|
|
4
|
+
import { CheckIcon as d } from "lucide-react";
|
|
5
|
+
import { cn as n } from "../lib/cn.js";
|
|
6
|
+
const v = p, N = (t) => {
|
|
7
|
+
const { className: e, slot: s, ...a } = t;
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
r.Root,
|
|
10
|
+
{
|
|
11
|
+
className: n(
|
|
12
|
+
"flex flex-col gap-4",
|
|
13
|
+
"data-[orientation=vertical]:min-h-32 data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-8",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
...a,
|
|
17
|
+
"data-slot": s ?? "steps"
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}, h = (t) => {
|
|
21
|
+
const { className: e, slot: s, ...a } = t;
|
|
22
|
+
return /* @__PURE__ */ o(
|
|
23
|
+
r.List,
|
|
24
|
+
{
|
|
25
|
+
className: n(
|
|
26
|
+
"[--steps-gutter:--spacing(2)] [--steps-icon-size:--spacing(4)] [--steps-size:--spacing(8)]",
|
|
27
|
+
"flex",
|
|
28
|
+
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-start",
|
|
29
|
+
"data-[orientation=horizontal]:items-center data-[orientation=horizontal]:justify-between",
|
|
30
|
+
e
|
|
31
|
+
),
|
|
32
|
+
...a,
|
|
33
|
+
"data-slot": s ?? "steps-list"
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}, S = (t) => {
|
|
37
|
+
const { className: e, slot: s, ...a } = t;
|
|
38
|
+
return /* @__PURE__ */ o(
|
|
39
|
+
r.Item,
|
|
40
|
+
{
|
|
41
|
+
className: n(
|
|
42
|
+
"group/step",
|
|
43
|
+
"relative flex flex-1",
|
|
44
|
+
"data-[orientation=vertical]:items-start",
|
|
45
|
+
"data-[orientation=horizontal]:items-center",
|
|
46
|
+
"last:flex-initial last:**:data-[slot=steps-separator]:hidden",
|
|
47
|
+
e
|
|
48
|
+
),
|
|
49
|
+
...a,
|
|
50
|
+
"data-slot": s ?? "steps-item"
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}, b = (t) => {
|
|
54
|
+
const { className: e, slot: s, ...a } = t;
|
|
55
|
+
return /* @__PURE__ */ o(
|
|
56
|
+
r.Trigger,
|
|
57
|
+
{
|
|
58
|
+
className: n(
|
|
59
|
+
"inline-flex items-center gap-3",
|
|
60
|
+
"cursor-pointer rounded-full outline-none",
|
|
61
|
+
"disabled:pointer-events-none disabled:opacity-64",
|
|
62
|
+
e
|
|
63
|
+
),
|
|
64
|
+
...a,
|
|
65
|
+
"data-slot": s ?? "steps-trigger"
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}, z = (t) => {
|
|
69
|
+
const { className: e, children: s, slot: a, ...l } = t;
|
|
70
|
+
return /* @__PURE__ */ c(
|
|
71
|
+
r.Indicator,
|
|
72
|
+
{
|
|
73
|
+
className: n(
|
|
74
|
+
"flex shrink-0 items-center justify-center tabular-nums",
|
|
75
|
+
"size-(--steps-size)",
|
|
76
|
+
"bg-muted text-muted-foreground",
|
|
77
|
+
"font-medium text-sm",
|
|
78
|
+
"rounded-full border",
|
|
79
|
+
"transition-colors",
|
|
80
|
+
"in-focus-visible:ring-[3px] in-focus-visible:ring-ring",
|
|
81
|
+
"data-current:border-primary data-current:bg-primary data-current:text-primary-foreground",
|
|
82
|
+
"data-complete:border-primary data-complete:bg-primary data-complete:text-primary-foreground",
|
|
83
|
+
"[&_svg]:size-(--steps-icon-size) [&_svg]:shrink-0",
|
|
84
|
+
"motion-reduce:transition-none!",
|
|
85
|
+
e
|
|
86
|
+
),
|
|
87
|
+
...l,
|
|
88
|
+
"data-slot": a ?? "steps-indicator",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ o("span", { className: "group-data-complete/step:hidden", children: s }),
|
|
91
|
+
/* @__PURE__ */ o(d, { className: "hidden group-data-complete/step:block" })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}, y = (t) => {
|
|
96
|
+
const { className: e, slot: s, ...a } = t;
|
|
97
|
+
return /* @__PURE__ */ o(
|
|
98
|
+
r.Separator,
|
|
99
|
+
{
|
|
100
|
+
className: n(
|
|
101
|
+
"flex-1",
|
|
102
|
+
"bg-border",
|
|
103
|
+
"rounded-full",
|
|
104
|
+
"transition-colors",
|
|
105
|
+
"data-complete:bg-primary",
|
|
106
|
+
"data-[orientation=horizontal]:mx-(--steps-gutter) data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-full",
|
|
107
|
+
"data-[orientation=vertical]:absolute data-[orientation=vertical]:top-[calc(var(--steps-size)+var(--steps-gutter))] data-[orientation=vertical]:start-[calc(var(--steps-size)/2-1px)] data-[orientation=vertical]:h-full data-[orientation=vertical]:max-h-[calc(100%-(var(--steps-size)+var(--steps-gutter)*2))] data-[orientation=vertical]:w-0.5",
|
|
108
|
+
"motion-reduce:transition-none!",
|
|
109
|
+
e
|
|
110
|
+
),
|
|
111
|
+
...a,
|
|
112
|
+
"data-slot": s ?? "steps-separator"
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}, C = (t) => {
|
|
116
|
+
const { className: e, slot: s, ...a } = t;
|
|
117
|
+
return /* @__PURE__ */ o(
|
|
118
|
+
i.span,
|
|
119
|
+
{
|
|
120
|
+
className: n("font-medium text-sm leading-none", e),
|
|
121
|
+
...a,
|
|
122
|
+
"data-slot": s ?? "steps-title"
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}, k = (t) => {
|
|
126
|
+
const { className: e, slot: s, ...a } = t;
|
|
127
|
+
return /* @__PURE__ */ o(
|
|
128
|
+
i.span,
|
|
129
|
+
{
|
|
130
|
+
className: n("text-muted-foreground text-xs", e),
|
|
131
|
+
...a,
|
|
132
|
+
"data-slot": s ?? "steps-description"
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
}, I = (t) => {
|
|
136
|
+
const { className: e, slot: s, ...a } = t;
|
|
137
|
+
return /* @__PURE__ */ o(
|
|
138
|
+
r.Content,
|
|
139
|
+
{
|
|
140
|
+
className: n("data-[orientation=vertical]:flex-1", e),
|
|
141
|
+
...a,
|
|
142
|
+
"data-slot": s ?? "steps-content"
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}, T = (t) => {
|
|
146
|
+
const { className: e, slot: s, ...a } = t;
|
|
147
|
+
return /* @__PURE__ */ o(
|
|
148
|
+
r.CompletedContent,
|
|
149
|
+
{
|
|
150
|
+
className: n("data-[orientation=vertical]:flex-1", e),
|
|
151
|
+
...a,
|
|
152
|
+
"data-slot": s ?? "steps-completed-content"
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}, j = ({ slot: t, ...e }) => /* @__PURE__ */ o(r.PrevTrigger, { ...e, "data-slot": t ?? "steps-previous" }), w = ({ slot: t, ...e }) => /* @__PURE__ */ o(r.NextTrigger, { ...e, "data-slot": t ?? "steps-next" });
|
|
156
|
+
export {
|
|
157
|
+
N as Steps,
|
|
158
|
+
T as StepsCompletedContent,
|
|
159
|
+
I as StepsContent,
|
|
160
|
+
k as StepsDescription,
|
|
161
|
+
z as StepsIndicator,
|
|
162
|
+
S as StepsItem,
|
|
163
|
+
h as StepsList,
|
|
164
|
+
w as StepsNext,
|
|
165
|
+
j as StepsPrevious,
|
|
166
|
+
y as StepsSeparator,
|
|
167
|
+
C as StepsTitle,
|
|
168
|
+
b as StepsTrigger,
|
|
169
|
+
v as useSteps
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.js","sources":["../../src/simples/steps.tsx"],"sourcesContent":["import { ark } from \"@ark-ui/react/factory\";\nimport { Steps as ArkSteps, useStepsContext } from \"@ark-ui/react/steps\";\nimport { CheckIcon } from \"lucide-react\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport const useSteps = useStepsContext;\n\nexport const Steps = (props: React.ComponentProps<typeof ArkSteps.Root>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.Root\n className={cn(\n \"flex flex-col gap-4\",\n \"data-[orientation=vertical]:min-h-32 data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-8\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"steps\"}\n />\n );\n};\n\nexport const StepsList = (\n props: React.ComponentProps<typeof ArkSteps.List>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.List\n className={cn(\n \"[--steps-gutter:--spacing(2)] [--steps-icon-size:--spacing(4)] [--steps-size:--spacing(8)]\",\n \"flex\",\n \"data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-start\",\n \"data-[orientation=horizontal]:items-center data-[orientation=horizontal]:justify-between\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"steps-list\"}\n />\n );\n};\n\nexport const StepsItem = (\n props: React.ComponentProps<typeof ArkSteps.Item>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.Item\n className={cn(\n \"group/step\",\n \"relative flex flex-1\",\n \"data-[orientation=vertical]:items-start\",\n \"data-[orientation=horizontal]:items-center\",\n \"last:flex-initial last:**:data-[slot=steps-separator]:hidden\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"steps-item\"}\n />\n );\n};\n\ninterface StepsTriggerProps\n extends React.ComponentProps<typeof ArkSteps.Trigger> {}\n\nexport const StepsTrigger = (props: StepsTriggerProps) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.Trigger\n className={cn(\n \"inline-flex items-center gap-3\",\n \"cursor-pointer rounded-full outline-none\",\n \"disabled:pointer-events-none disabled:opacity-64\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"steps-trigger\"}\n />\n );\n};\n\nexport const StepsIndicator = (\n props: React.ComponentProps<typeof ArkSteps.Indicator>\n) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <ArkSteps.Indicator\n className={cn(\n \"flex shrink-0 items-center justify-center tabular-nums\",\n \"size-(--steps-size)\",\n \"bg-muted text-muted-foreground\",\n \"font-medium text-sm\",\n \"rounded-full border\",\n \"transition-colors\",\n \"in-focus-visible:ring-[3px] in-focus-visible:ring-ring\",\n \"data-current:border-primary data-current:bg-primary data-current:text-primary-foreground\",\n \"data-complete:border-primary data-complete:bg-primary data-complete:text-primary-foreground\",\n \"[&_svg]:size-(--steps-icon-size) [&_svg]:shrink-0\",\n \"motion-reduce:transition-none!\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"steps-indicator\"}\n >\n <span className=\"group-data-complete/step:hidden\">{children}</span>\n <CheckIcon className=\"hidden group-data-complete/step:block\" />\n </ArkSteps.Indicator>\n );\n};\n\nexport const StepsSeparator = (\n props: React.ComponentProps<typeof ArkSteps.Separator>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.Separator\n className={cn(\n \"flex-1\",\n \"bg-border\",\n \"rounded-full\",\n \"transition-colors\",\n \"data-complete:bg-primary\",\n \"data-[orientation=horizontal]:mx-(--steps-gutter) data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-full\",\n \"data-[orientation=vertical]:absolute data-[orientation=vertical]:top-[calc(var(--steps-size)+var(--steps-gutter))] data-[orientation=vertical]:start-[calc(var(--steps-size)/2-1px)] data-[orientation=vertical]:h-full data-[orientation=vertical]:max-h-[calc(100%-(var(--steps-size)+var(--steps-gutter)*2))] data-[orientation=vertical]:w-0.5\",\n \"motion-reduce:transition-none!\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"steps-separator\"}\n />\n );\n};\n\nexport const StepsTitle = (props: React.ComponentProps<typeof ark.span>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.span\n className={cn(\"font-medium text-sm leading-none\", className)}\n {...rest}\n data-slot={slot ?? \"steps-title\"}\n />\n );\n};\n\nexport const StepsDescription = (\n props: React.ComponentProps<typeof ark.span>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.span\n className={cn(\"text-muted-foreground text-xs\", className)}\n {...rest}\n data-slot={slot ?? \"steps-description\"}\n />\n );\n};\n\nexport const StepsContent = (\n props: React.ComponentProps<typeof ArkSteps.Content>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.Content\n className={cn(\"data-[orientation=vertical]:flex-1\", className)}\n {...rest}\n data-slot={slot ?? \"steps-content\"}\n />\n );\n};\n\nexport const StepsCompletedContent = (\n props: React.ComponentProps<typeof ArkSteps.CompletedContent>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkSteps.CompletedContent\n className={cn(\"data-[orientation=vertical]:flex-1\", className)}\n {...rest}\n data-slot={slot ?? \"steps-completed-content\"}\n />\n );\n};\n\nexport const StepsPrevious = (\n { slot, ...rest }: React.ComponentProps<typeof ArkSteps.PrevTrigger>\n) => <ArkSteps.PrevTrigger {...rest} data-slot={slot ?? \"steps-previous\"} />;\n\nexport const StepsNext = (\n { slot, ...rest }: React.ComponentProps<typeof ArkSteps.NextTrigger>\n) => <ArkSteps.NextTrigger {...rest} data-slot={slot ?? \"steps-next\"} />;\n"],"names":["useSteps","useStepsContext","Steps","props","className","slot","rest","jsx","ArkSteps","cn","StepsList","StepsItem","StepsTrigger","StepsIndicator","children","jsxs","CheckIcon","StepsSeparator","StepsTitle","ark","StepsDescription","StepsContent","StepsCompletedContent","StepsPrevious","StepsNext"],"mappings":"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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ButtonProps } from './button';
|
|
4
|
+
/**
|
|
5
|
+
* A row of values on offer. **It does not know where they came from.**
|
|
6
|
+
*
|
|
7
|
+
* That is the whole reason it is here and not in `@kanzo-tech/ai`: the line that package draws is
|
|
8
|
+
* *does the component know a model exists*, and a strip of buttons that each commit a string does
|
|
9
|
+
* not. Recent searches, saved filters, a questionnaire's quick answers and a model's candidates are
|
|
10
|
+
* one component; the ✨ beside it is what says a model wrote these, and that stays next door.
|
|
11
|
+
*
|
|
12
|
+
* **Not a listbox, and this is the correction it exists to make.** Picking one leaves an *effect* —
|
|
13
|
+
* a value in a field — not a selection in a list, which makes it a command surface rather than a
|
|
14
|
+
* value surface. The version this replaces was an Ark listbox whose
|
|
15
|
+
* `value` was pinned to a hoisted empty array forever, with a comment explaining why; that comment
|
|
16
|
+
* was the rule being noticed and worked around instead of read.
|
|
17
|
+
*
|
|
18
|
+
* ARIA: nothing is declared. Each pill is a `<button>` with its own accessible name, in document
|
|
19
|
+
* order, so Tab reaches every one and a screen reader announces them as what they are. A
|
|
20
|
+
* `role="listbox"` here would promise a navigation model that is not implemented — the failure a
|
|
21
|
+
* composite role without its keyboard contract always is.
|
|
22
|
+
*
|
|
23
|
+
* Wraps by default. A caller that wants one scrolling line passes `flex-nowrap overflow-x-auto`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Suggestions: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
|
|
26
|
+
export interface SuggestionProps extends Omit<ButtonProps, "onSelect" | "value"> {
|
|
27
|
+
/** What this pill commits. Also its identity — a strip never offers one value twice. */
|
|
28
|
+
value: string;
|
|
29
|
+
/** Given the value, so a handler needs no closure per pill. */
|
|
30
|
+
onSelect?: (value: string) => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One value on offer, as a pill.
|
|
34
|
+
*
|
|
35
|
+
* `onSelect` takes the value rather than the event, which is what lets a caller write one handler
|
|
36
|
+
* for the whole strip. `onClick` still fires first and still wins: calling `preventDefault` on it
|
|
37
|
+
* stops the select, so a pill can be intercepted without being rebuilt.
|
|
38
|
+
*
|
|
39
|
+
* Children default to the value. Give it children when the label and the value differ — the value
|
|
40
|
+
* is what gets committed either way.
|
|
41
|
+
*/
|
|
42
|
+
export declare const Suggestion: (props: SuggestionProps) => React.JSX.Element;
|
|
43
|
+
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../src/simples/suggestions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,sBAUtE,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC;IAC9E,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,sBAoBhD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { ark as g } from "@ark-ui/react/factory";
|
|
4
|
+
import { cn as n } from "../lib/cn.js";
|
|
5
|
+
import { Button as p } from "./button.js";
|
|
6
|
+
const v = (t) => {
|
|
7
|
+
const { className: e, slot: o, ...s } = t;
|
|
8
|
+
return /* @__PURE__ */ l(
|
|
9
|
+
g.div,
|
|
10
|
+
{
|
|
11
|
+
className: n("flex min-w-0 flex-wrap items-center gap-1.5", e),
|
|
12
|
+
...s,
|
|
13
|
+
"data-slot": o ?? "suggestions"
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}, w = (t) => {
|
|
17
|
+
const { children: e, className: o, onClick: s, onSelect: r, size: m = "sm", slot: u, value: a, variant: c = "outline", ...f } = t;
|
|
18
|
+
return /* @__PURE__ */ l(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
className: n("h-auto max-w-full py-1", o),
|
|
22
|
+
onClick: (i) => {
|
|
23
|
+
s == null || s(i), i.defaultPrevented || r == null || r(a);
|
|
24
|
+
},
|
|
25
|
+
pill: !0,
|
|
26
|
+
size: m,
|
|
27
|
+
variant: c,
|
|
28
|
+
...f,
|
|
29
|
+
slot: u ?? "suggestion",
|
|
30
|
+
children: e ?? a
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
w as Suggestion,
|
|
36
|
+
v as Suggestions
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=suggestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.js","sources":["../../src/simples/suggestions.tsx"],"sourcesContent":["\"use client\";\n\nimport { ark } from \"@ark-ui/react/factory\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { Button, type ButtonProps } from \"./button\";\n\n/**\n * A row of values on offer. **It does not know where they came from.**\n *\n * That is the whole reason it is here and not in `@kanzo-tech/ai`: the line that package draws is\n * *does the component know a model exists*, and a strip of buttons that each commit a string does\n * not. Recent searches, saved filters, a questionnaire's quick answers and a model's candidates are\n * one component; the ✨ beside it is what says a model wrote these, and that stays next door.\n *\n * **Not a listbox, and this is the correction it exists to make.** Picking one leaves an *effect* —\n * a value in a field — not a selection in a list, which makes it a command surface rather than a\n * value surface. The version this replaces was an Ark listbox whose\n * `value` was pinned to a hoisted empty array forever, with a comment explaining why; that comment\n * was the rule being noticed and worked around instead of read.\n *\n * ARIA: nothing is declared. Each pill is a `<button>` with its own accessible name, in document\n * order, so Tab reaches every one and a screen reader announces them as what they are. A\n * `role=\"listbox\"` here would promise a navigation model that is not implemented — the failure a\n * composite role without its keyboard contract always is.\n *\n * Wraps by default. A caller that wants one scrolling line passes `flex-nowrap overflow-x-auto`.\n */\nexport const Suggestions = (props: React.ComponentProps<typeof ark.div>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.div\n className={cn(\"flex min-w-0 flex-wrap items-center gap-1.5\", className)}\n {...rest}\n data-slot={slot ?? \"suggestions\"}\n />\n );\n};\n\nexport interface SuggestionProps extends Omit<ButtonProps, \"onSelect\" | \"value\"> {\n /** What this pill commits. Also its identity — a strip never offers one value twice. */\n value: string;\n /** Given the value, so a handler needs no closure per pill. */\n onSelect?: (value: string) => void;\n}\n\n/**\n * One value on offer, as a pill.\n *\n * `onSelect` takes the value rather than the event, which is what lets a caller write one handler\n * for the whole strip. `onClick` still fires first and still wins: calling `preventDefault` on it\n * stops the select, so a pill can be intercepted without being rebuilt.\n *\n * Children default to the value. Give it children when the label and the value differ — the value\n * is what gets committed either way.\n */\nexport const Suggestion = (props: SuggestionProps) => {\n const { children, className, onClick, onSelect, size = \"sm\", slot, value, variant = \"outline\", ...rest } =\n props;\n\n return (\n <Button\n className={cn(\"h-auto max-w-full py-1\", className)}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) onSelect?.(value);\n }}\n pill\n size={size}\n variant={variant}\n {...rest}\n slot={slot ?? \"suggestion\"}\n >\n {children ?? value}\n </Button>\n );\n};\n"],"names":[],"mappings":";;;;;AA4BO;AACL;AAEA;AACE;AAAK;AAAJ;AACuE;AAClE;AACe;AAAA;AAGzB;AAoBE;AAGA;AACE;AAAC;AAAA;AACkD;AAE/C;AACwC;AAC1C;AACI;AACJ;AACA;AACI;AACU;AAED;AAAA;AAGnB;;;;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { VariantProps } from 'tailwind-variants';
|
|
4
|
+
/**
|
|
5
|
+
* A colour, drawn.
|
|
6
|
+
*
|
|
7
|
+
* Ark has no machine for this and should not: a swatch has no behaviour. What it does have is an
|
|
8
|
+
* ARIA contract, and stating it is the whole reason this is a component rather than a `<span>` at
|
|
9
|
+
* each call site — colour is never an identity channel on its own, so a swatch always sits beside
|
|
10
|
+
* text that names the thing it depicts. It is `aria-hidden`, carries no role and is never
|
|
11
|
+
* focusable. Wanting a focusable one means wanting something else: `ColorPickerSwatchTrigger` if
|
|
12
|
+
* the colour *is* the value, or a `RadioGroupCard` around this if the colour merely pictures a
|
|
13
|
+
* value that has a name.
|
|
14
|
+
*
|
|
15
|
+
* That distinction is load-bearing and was checked rather than assumed. Ark's swatch parts cannot
|
|
16
|
+
* serve as a display strip: all of them call `useColorPickerContext`, which is `strict` and throws
|
|
17
|
+
* outside a picker; `data-state="checked"` is computed as `color.isEqual(value)` against the one
|
|
18
|
+
* colour the machine holds, so in a strip of sixteen the highlight would land on whichever slot
|
|
19
|
+
* happened to match; and every trigger is a button labelled `select #2e3440 as the color`, which is
|
|
20
|
+
* the wrong sentence when what the reader is choosing is "Nord".
|
|
21
|
+
*/
|
|
22
|
+
declare const swatchVariants: import('tailwind-variants').TVReturnType<{
|
|
23
|
+
size: {
|
|
24
|
+
xs: string;
|
|
25
|
+
sm: string;
|
|
26
|
+
md: string;
|
|
27
|
+
lg: string;
|
|
28
|
+
};
|
|
29
|
+
shape: {
|
|
30
|
+
square: string;
|
|
31
|
+
round: string;
|
|
32
|
+
};
|
|
33
|
+
}, undefined, "shrink-0", {
|
|
34
|
+
size: {
|
|
35
|
+
xs: string;
|
|
36
|
+
sm: string;
|
|
37
|
+
md: string;
|
|
38
|
+
lg: string;
|
|
39
|
+
};
|
|
40
|
+
shape: {
|
|
41
|
+
square: string;
|
|
42
|
+
round: string;
|
|
43
|
+
};
|
|
44
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
45
|
+
size: {
|
|
46
|
+
xs: string;
|
|
47
|
+
sm: string;
|
|
48
|
+
md: string;
|
|
49
|
+
lg: string;
|
|
50
|
+
};
|
|
51
|
+
shape: {
|
|
52
|
+
square: string;
|
|
53
|
+
round: string;
|
|
54
|
+
};
|
|
55
|
+
}, undefined, "shrink-0", unknown, unknown, undefined>>;
|
|
56
|
+
export interface SwatchProps extends Omit<React.ComponentProps<typeof ark.span>, "color">, VariantProps<typeof swatchVariants> {
|
|
57
|
+
/** The colour to paint. Data, not a variant — the sanctioned inline-style case. */
|
|
58
|
+
color: string;
|
|
59
|
+
}
|
|
60
|
+
export declare const Swatch: ({ color, size, shape, className, style, slot, ...rest }: SwatchProps) => React.JSX.Element;
|
|
61
|
+
export interface SwatchGroupProps extends Omit<React.ComponentProps<typeof ark.span>, "color">, VariantProps<typeof swatchVariants> {
|
|
62
|
+
/**
|
|
63
|
+
* The colours, in order.
|
|
64
|
+
*
|
|
65
|
+
* Order is meaning, so this never sorts: for a categorical scheme the sequence *is* the
|
|
66
|
+
* colour-blindness mechanism (`orderScheme` derives it), and for a palette it is base16's slot
|
|
67
|
+
* order. A strip that tidied its input would be quietly discarding the reason it was ordered.
|
|
68
|
+
*/
|
|
69
|
+
colors: readonly string[];
|
|
70
|
+
}
|
|
71
|
+
export declare const SwatchGroup: ({ colors, size, shape, className, slot, ...rest }: SwatchGroupProps) => React.JSX.Element;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=swatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swatch.d.ts","sourceRoot":"","sources":["../../src/simples/swatch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAOlB,CAAC;AAEH,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAC1D,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,MAAM,GAAI,yDAAyD,WAAW,sBAQ1F,CAAC;AAEF,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAC1D,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC;;;;;;OAMG;IACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW,GAAI,mDAAmD,gBAAgB,sBAW9F,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ark as d } from "@ark-ui/react/factory";
|
|
3
|
+
import { tv as p } from "tailwind-variants";
|
|
4
|
+
import { cn as m } from "../lib/cn.js";
|
|
5
|
+
const l = p({
|
|
6
|
+
base: "shrink-0",
|
|
7
|
+
variants: {
|
|
8
|
+
size: { xs: "size-2.5", sm: "size-3", md: "size-4", lg: "size-5" },
|
|
9
|
+
shape: { square: "rounded-[2px]", round: "rounded-full" }
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: { size: "sm", shape: "square" }
|
|
12
|
+
}), u = ({ color: s, size: r, shape: e, className: t, style: o, slot: i, ...a }) => /* @__PURE__ */ n(
|
|
13
|
+
d.span,
|
|
14
|
+
{
|
|
15
|
+
"aria-hidden": !0,
|
|
16
|
+
className: m(l({ size: r, shape: e }), t),
|
|
17
|
+
style: { background: s, ...o },
|
|
18
|
+
...a,
|
|
19
|
+
"data-slot": i ?? "swatch"
|
|
20
|
+
}
|
|
21
|
+
), x = ({ colors: s, size: r, shape: e, className: t, slot: o, ...i }) => /* @__PURE__ */ n(
|
|
22
|
+
d.span,
|
|
23
|
+
{
|
|
24
|
+
"aria-hidden": !0,
|
|
25
|
+
className: m("flex items-center gap-0.5", t),
|
|
26
|
+
...i,
|
|
27
|
+
"data-slot": o ?? "swatch-group",
|
|
28
|
+
children: s.map((a, c) => /* @__PURE__ */ n(u, { color: a, shape: e, size: r }, `${c}-${a}`))
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
export {
|
|
32
|
+
u as Swatch,
|
|
33
|
+
x as SwatchGroup
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=swatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swatch.js","sources":["../../src/simples/swatch.tsx"],"sourcesContent":["import { ark } from \"@ark-ui/react/factory\";\nimport type React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn\";\n\n/**\n * A colour, drawn.\n *\n * Ark has no machine for this and should not: a swatch has no behaviour. What it does have is an\n * ARIA contract, and stating it is the whole reason this is a component rather than a `<span>` at\n * each call site — colour is never an identity channel on its own, so a swatch always sits beside\n * text that names the thing it depicts. It is `aria-hidden`, carries no role and is never\n * focusable. Wanting a focusable one means wanting something else: `ColorPickerSwatchTrigger` if\n * the colour *is* the value, or a `RadioGroupCard` around this if the colour merely pictures a\n * value that has a name.\n *\n * That distinction is load-bearing and was checked rather than assumed. Ark's swatch parts cannot\n * serve as a display strip: all of them call `useColorPickerContext`, which is `strict` and throws\n * outside a picker; `data-state=\"checked\"` is computed as `color.isEqual(value)` against the one\n * colour the machine holds, so in a strip of sixteen the highlight would land on whichever slot\n * happened to match; and every trigger is a button labelled `select #2e3440 as the color`, which is\n * the wrong sentence when what the reader is choosing is \"Nord\".\n */\nconst swatchVariants = tv({\n base: \"shrink-0\",\n variants: {\n size: { xs: \"size-2.5\", sm: \"size-3\", md: \"size-4\", lg: \"size-5\" },\n shape: { square: \"rounded-[2px]\", round: \"rounded-full\" },\n },\n defaultVariants: { size: \"sm\", shape: \"square\" },\n});\n\nexport interface SwatchProps\n extends Omit<React.ComponentProps<typeof ark.span>, \"color\">,\n VariantProps<typeof swatchVariants> {\n /** The colour to paint. Data, not a variant — the sanctioned inline-style case. */\n color: string;\n}\n\nexport const Swatch = ({ color, size, shape, className, style, slot, ...rest }: SwatchProps) => (\n <ark.span\n aria-hidden\n className={cn(swatchVariants({ size, shape }), className)}\n style={{ background: color, ...style }}\n {...rest}\n data-slot={slot ?? \"swatch\"}\n />\n);\n\nexport interface SwatchGroupProps\n extends Omit<React.ComponentProps<typeof ark.span>, \"color\">,\n VariantProps<typeof swatchVariants> {\n /**\n * The colours, in order.\n *\n * Order is meaning, so this never sorts: for a categorical scheme the sequence *is* the\n * colour-blindness mechanism (`orderScheme` derives it), and for a palette it is base16's slot\n * order. A strip that tidied its input would be quietly discarding the reason it was ordered.\n */\n colors: readonly string[];\n}\n\nexport const SwatchGroup = ({ colors, size, shape, className, slot, ...rest }: SwatchGroupProps) => (\n <ark.span\n aria-hidden\n className={cn(\"flex items-center gap-0.5\", className)}\n {...rest}\n data-slot={slot ?? \"swatch-group\"}\n >\n {colors.map((c, i) => (\n <Swatch color={c} key={`${i}-${c}`} shape={shape} size={size} />\n ))}\n </ark.span>\n);\n"],"names":["swatchVariants","tv","Swatch","color","size","shape","className","style","slot","rest","jsx","ark","cn","SwatchGroup","colors","c","i"],"mappings":";;;;AAuBA,MAAMA,IAAiBC,EAAG;AAAA,EACxB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,MAAM,EAAE,IAAI,YAAY,IAAI,UAAU,IAAI,UAAU,IAAI,SAAA;AAAA,IACxD,OAAO,EAAE,QAAQ,iBAAiB,OAAO,eAAA;AAAA,EAAe;AAAA,EAE1D,iBAAiB,EAAE,MAAM,MAAM,OAAO,SAAA;AACxC,CAAC,GASYC,IAAS,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,MAAAC,GAAM,GAAGC,EAAA,MACtE,gBAAAC;AAAA,EAACC,EAAI;AAAA,EAAJ;AAAA,IACC,eAAW;AAAA,IACX,WAAWC,EAAGZ,EAAe,EAAE,MAAAI,GAAM,OAAAC,EAAA,CAAO,GAAGC,CAAS;AAAA,IACxD,OAAO,EAAE,YAAYH,GAAO,GAAGI,EAAA;AAAA,IAC9B,GAAGE;AAAA,IACJ,aAAWD,KAAQ;AAAA,EAAA;AACrB,GAgBWK,IAAc,CAAC,EAAE,QAAAC,GAAQ,MAAAV,GAAM,OAAAC,GAAO,WAAAC,GAAW,MAAAE,GAAM,GAAGC,EAAA,MACrE,gBAAAC;AAAA,EAACC,EAAI;AAAA,EAAJ;AAAA,IACC,eAAW;AAAA,IACX,WAAWC,EAAG,6BAA6BN,CAAS;AAAA,IACnD,GAAGG;AAAA,IACJ,aAAWD,KAAQ;AAAA,IAElB,YAAO,IAAI,CAACO,GAAGC,wBACbd,GAAA,EAAO,OAAOa,GAAqB,OAAAV,GAAc,MAAAD,KAA3B,GAAGY,CAAC,IAAID,CAAC,EAA8B,CAC/D;AAAA,EAAA;AACH;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Switch as ArkSwitch } from '@ark-ui/react/switch';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare const useSwitch: () => import('@ark-ui/react').UseSwitchContext;
|
|
4
|
+
export declare const Switch: (props: React.ComponentProps<typeof ArkSwitch.Root>) => React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/simples/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAoB,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,SAAS,gDAAmB,CAAC;AAE1C,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,sBAwExE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useSwitchContext as l, Switch as t } from "@ark-ui/react/switch";
|
|
3
|
+
import { cn as e } from "../lib/cn.js";
|
|
4
|
+
const m = l, g = (s) => {
|
|
5
|
+
const { children: i, className: r, tabIndex: n, slot: o, ...c } = s;
|
|
6
|
+
return /* @__PURE__ */ d(
|
|
7
|
+
t.Root,
|
|
8
|
+
{
|
|
9
|
+
className: e(
|
|
10
|
+
"group/switch",
|
|
11
|
+
"[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]",
|
|
12
|
+
"inline-flex w-fit items-center gap-2",
|
|
13
|
+
"data-disabled:pointer-events-none data-disabled:opacity-64",
|
|
14
|
+
r
|
|
15
|
+
),
|
|
16
|
+
...c,
|
|
17
|
+
"data-slot": o ?? "switch",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ a(
|
|
20
|
+
t.Control,
|
|
21
|
+
{
|
|
22
|
+
className: e(
|
|
23
|
+
"h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)]",
|
|
24
|
+
"p-px",
|
|
25
|
+
"flex shrink-0 items-center",
|
|
26
|
+
"rounded-full border border-transparent",
|
|
27
|
+
"transition-all",
|
|
28
|
+
"outline-none group-data-[focus-visible]/switch:ring-[3px] group-data-invalid/switch:ring-[3px]",
|
|
29
|
+
"group-data-[focus-visible]/switch:border-primary group-data-[focus-visible]/switch:ring-ring",
|
|
30
|
+
"group-data-invalid/switch:border-destructive group-data-invalid/switch:ring-destructive/24",
|
|
31
|
+
"group-data-[state=checked]/switch:bg-primary",
|
|
32
|
+
// The track IS this control's boundary — `border` is transparent — and the thumb is
|
|
33
|
+
// `bg-background`, so the track is the only thing that says the switch is off. A surface
|
|
34
|
+
// step puts the thumb at ~1.07:1 against it and the off state stops being readable, which
|
|
35
|
+
// is 1.4.11 asking about a *state*, not about a fill. Boundary contrast, spelled as a fill.
|
|
36
|
+
"group-data-[state=unchecked]/switch:bg-input",
|
|
37
|
+
"motion-reduce:transition-none!"
|
|
38
|
+
),
|
|
39
|
+
"data-slot": "switch-control",
|
|
40
|
+
children: /* @__PURE__ */ a(
|
|
41
|
+
t.Thumb,
|
|
42
|
+
{
|
|
43
|
+
className: e(
|
|
44
|
+
"block",
|
|
45
|
+
"aspect-square h-full w-auto",
|
|
46
|
+
"bg-background",
|
|
47
|
+
"rounded-full ring-0",
|
|
48
|
+
"pointer-events-none",
|
|
49
|
+
"transition-transform",
|
|
50
|
+
"data-[state=checked]:translate-x-[calc(var(--thumb-size)-4px)]",
|
|
51
|
+
"dark:data-[state=checked]:bg-primary-foreground",
|
|
52
|
+
"data-[state=unchecked]:translate-x-0",
|
|
53
|
+
"dark:data-[state=unchecked]:bg-foreground",
|
|
54
|
+
"motion-reduce:transition-none!"
|
|
55
|
+
),
|
|
56
|
+
"data-slot": "switch-thumb"
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
i === void 0 ? null : /* @__PURE__ */ a(t.Label, { className: "text-sm leading-none", "data-slot": "switch-label", children: i }),
|
|
62
|
+
/* @__PURE__ */ a(t.HiddenInput, { tabIndex: n })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
g as Switch,
|
|
69
|
+
m as useSwitch
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../../src/simples/switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, useSwitchContext } from \"@ark-ui/react/switch\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport const useSwitch = useSwitchContext;\n\nexport const Switch = (props: React.ComponentProps<typeof ArkSwitch.Root>) => {\n const { children, className, tabIndex, slot, ...rest } = props;\n\n return (\n <ArkSwitch.Root\n className={cn(\n \"group/switch\",\n \"[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]\",\n \"inline-flex w-fit items-center gap-2\",\n \"data-disabled:pointer-events-none data-disabled:opacity-64\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"switch\"}\n >\n {/* The track, and everything that used to be on the root.\n **It moved because the root has to be able to hold a label.** `children` were accepted by\n the type and rendered nowhere: the root is Ark's `<label for=…>` and carried the track's\n own box, so a caller passing text got a bare toggle with **no accessible name at all** —\n measured on `/docs/forms/switch`, whose own example passes one. WCAG 4.1.2, and the ring\n is the reason this is a part rather than a wrapper: on the root it would have drawn around\n the label too. */}\n <ArkSwitch.Control\n className={cn(\n \"h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)]\",\n \"p-px\",\n \"flex shrink-0 items-center\",\n \"rounded-full border border-transparent\",\n \"transition-all\",\n \"outline-none group-data-[focus-visible]/switch:ring-[3px] group-data-invalid/switch:ring-[3px]\",\n \"group-data-[focus-visible]/switch:border-primary group-data-[focus-visible]/switch:ring-ring\",\n \"group-data-invalid/switch:border-destructive group-data-invalid/switch:ring-destructive/24\",\n \"group-data-[state=checked]/switch:bg-primary\",\n // The track IS this control's boundary — `border` is transparent — and the thumb is\n // `bg-background`, so the track is the only thing that says the switch is off. A surface\n // step puts the thumb at ~1.07:1 against it and the off state stops being readable, which\n // is 1.4.11 asking about a *state*, not about a fill. Boundary contrast, spelled as a fill.\n \"group-data-[state=unchecked]/switch:bg-input\",\n \"motion-reduce:transition-none!\"\n )}\n data-slot=\"switch-control\"\n >\n <ArkSwitch.Thumb\n className={cn(\n \"block\",\n \"aspect-square h-full w-auto\",\n \"bg-background\",\n \"rounded-full ring-0\",\n \"pointer-events-none\",\n \"transition-transform\",\n \"data-[state=checked]:translate-x-[calc(var(--thumb-size)-4px)]\",\n \"dark:data-[state=checked]:bg-primary-foreground\",\n \"data-[state=unchecked]:translate-x-0\",\n \"dark:data-[state=unchecked]:bg-foreground\",\n \"motion-reduce:transition-none!\"\n )}\n data-slot=\"switch-thumb\"\n />\n </ArkSwitch.Control>\n\n {/* Not a second export: Shark ships `Switch` and `useSwitch` and nothing else, and this stays\n one component that renders its own parts — the same argument the docs page already makes\n about Control, Thumb and HiddenInput. */}\n {children === undefined ? null : (\n <ArkSwitch.Label className=\"text-sm leading-none\" data-slot=\"switch-label\">\n {children}\n </ArkSwitch.Label>\n )}\n\n <ArkSwitch.HiddenInput tabIndex={tabIndex} />\n </ArkSwitch.Root>\n );\n};\n"],"names":["useSwitch","useSwitchContext","Switch","props","children","className","tabIndex","slot","rest","jsxs","ArkSwitch","cn","jsx"],"mappings":";;;AAIO,MAAMA,IAAYC,GAEZC,IAAS,CAACC,MAAuD;AAC5E,QAAM,EAAE,UAAAC,GAAU,WAAAC,GAAW,UAAAC,GAAU,MAAAC,GAAM,GAAGC,MAASL;AAEzD,SACE,gBAAAM;AAAA,IAACC,EAAU;AAAA,IAAV;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,MACJ,aAAWD,KAAQ;AAAA,MASnB,UAAA;AAAA,QAAA,gBAAAK;AAAA,UAACF,EAAU;AAAA,UAAV;AAAA,YACC,WAAWC;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA;AAAA;AAAA;AAAA,cAKA;AAAA,cACA;AAAA,YAAA;AAAA,YAEF,aAAU;AAAA,YAEV,UAAA,gBAAAC;AAAA,cAACF,EAAU;AAAA,cAAV;AAAA,gBACC,WAAWC;AAAA,kBACT;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,gBAAA;AAAA,gBAEF,aAAU;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA;AAAA,QAMDP,MAAa,SAAY,OACxB,gBAAAQ,EAACF,EAAU,OAAV,EAAgB,WAAU,wBAAuB,aAAU,gBACzD,UAAAN,EAAA,CACH;AAAA,QAGF,gBAAAQ,EAACF,EAAU,aAAV,EAAsB,UAAAJ,EAAA,CAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGjD;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface TableProps extends React.ComponentProps<typeof ark.table> {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the table rows are hoverable.
|
|
6
|
+
*
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
isHoverable?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The variant of the table.
|
|
12
|
+
*
|
|
13
|
+
* @default "plain"
|
|
14
|
+
*/
|
|
15
|
+
variant?: "plain" | "striped";
|
|
16
|
+
/**
|
|
17
|
+
* Pin the header row while the rows scroll under it.
|
|
18
|
+
*
|
|
19
|
+
* This has to change the wrapper, not just the cells: `position: sticky` resolves against the
|
|
20
|
+
* nearest scroll container, and the wrapper's `overflow-auto` is one — so a sticky `th` pins to
|
|
21
|
+
* a box exactly as tall as its own content, which never moves. WHICH scroll container it should
|
|
22
|
+
* pin to is what `maxHeight` decides, and the two answers behave differently enough to choose
|
|
23
|
+
* between deliberately.
|
|
24
|
+
*
|
|
25
|
+
* The pinned cells need to be opaque or the rows read through them; `bg-background` assumes the
|
|
26
|
+
* table sits on the page surface, so on a `Card` pass `className="bg-card"` to `TableHead`.
|
|
27
|
+
*
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
stickyHeader?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Give the table its own scroll region, and pin the header to that.
|
|
33
|
+
*
|
|
34
|
+
* With it, the wrapper stays a scroll container and simply gains a height: the header pins to
|
|
35
|
+
* the table's own scrollport and a table wider than its box still scrolls sideways. Without it,
|
|
36
|
+
* `stickyHeader` stands the wrapper's overflow down so the header pins to whatever encloses the
|
|
37
|
+
* table — a `ShellMain`, a dialog body, the page — which reads better, one scrollbar instead of
|
|
38
|
+
* two, but gives up that sideways scroll: CSS cannot keep one axis scrollable while the other
|
|
39
|
+
* stays sticky. Set it whenever the columns may not fit, which on a narrow viewport is most
|
|
40
|
+
* tables.
|
|
41
|
+
*/
|
|
42
|
+
maxHeight?: string | number;
|
|
43
|
+
}
|
|
44
|
+
export declare const Table: (props: TableProps) => React.JSX.Element;
|
|
45
|
+
export declare const TableHeader: (props: React.ComponentProps<typeof ark.thead>) => React.JSX.Element;
|
|
46
|
+
export interface TableBodyProps extends React.ComponentProps<typeof ark.tbody> {
|
|
47
|
+
}
|
|
48
|
+
export declare const TableBody: (props: TableBodyProps) => React.JSX.Element;
|
|
49
|
+
export declare const TableFooter: (props: React.ComponentProps<typeof ark.tfoot>) => React.JSX.Element;
|
|
50
|
+
export declare const TableRow: (props: React.ComponentProps<typeof ark.tr>) => React.JSX.Element;
|
|
51
|
+
export declare const TableHead: (props: React.ComponentProps<typeof ark.th>) => React.JSX.Element;
|
|
52
|
+
export declare const TableCell: (props: React.ComponentProps<typeof ark.td>) => React.JSX.Element;
|
|
53
|
+
export declare const TableCaption: (props: React.ComponentProps<typeof ark.caption>) => React.JSX.Element;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/simples/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC;IACjE;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,sBAkDtC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,sBAUxE,CAAC;AAEF,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC;CAAG;AAEnD,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,sBAU9C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,sBAgBxE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC,sBAyBlE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC,sBAiBnE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC,sBAcnE,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,sBAWhD,CAAC"}
|