@techsio/ui-kit 0.57.0 → 0.59.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 +128 -133
- package/dist/atoms/action-icon.js +9 -8
- package/dist/atoms/button.js +114 -18
- package/dist/atoms/checkbox.js +77 -17
- package/dist/atoms/hotkeys.js +26 -7
- package/dist/atoms/icon.js +5 -5
- package/dist/atoms/image.js +118 -3
- package/dist/atoms/input.js +57 -9
- package/dist/atoms/label.js +13 -4
- package/dist/atoms/link-button.js +15 -12
- package/dist/atoms/link.js +18 -4
- package/dist/atoms/numeric-input.js +362 -84
- package/dist/atoms/rating.js +306 -73
- package/dist/atoms/skeleton.js +18 -14
- package/dist/atoms/status-text.js +31 -18
- package/dist/atoms/textarea.js +59 -12
- package/dist/atoms/tooltip.js +64 -43
- package/dist/hotkeys.js +1 -0
- package/dist/internal/choice-control.js +173 -0
- package/dist/internal/combobox-query-sync.js +11 -0
- package/dist/internal/date-picker-coordinator.js +56 -40
- package/dist/internal/date-picker-dom.js +44 -0
- package/dist/internal/date-picker-input.js +30 -0
- package/dist/internal/described-by.js +23 -18
- package/dist/internal/form-control-lifecycle.js +122 -0
- package/dist/internal/molecules/command.context.js +1 -0
- package/dist/internal/molecules/drawer.context.js +1 -0
- package/dist/internal/molecules/vertical-navigation.context.js +1 -0
- package/dist/internal/molecules/vertical-navigation.styles.js +9 -2
- package/dist/internal/numeric-input-editing.js +87 -0
- package/dist/internal/organisms/sidebar.context.js +1 -0
- package/dist/internal/organisms/sidebar.focus.js +1 -0
- package/dist/internal/overlay-portal.js +72 -0
- package/dist/internal/reduced-motion.js +1 -0
- package/dist/internal/use-effective-disabled.js +8 -0
- package/dist/molecules/accordion.js +44 -30
- package/dist/molecules/availability-status.js +1 -0
- package/dist/molecules/breadcrumb.js +11 -11
- package/dist/molecules/carousel.js +279 -97
- package/dist/molecules/cascade-select.js +327 -81
- package/dist/molecules/chart.js +427 -78
- package/dist/molecules/color-select.js +181 -62
- package/dist/molecules/combobox.js +537 -182
- package/dist/molecules/command.js +2 -1
- package/dist/molecules/date-picker.js +629 -119
- package/dist/molecules/dialog.js +89 -48
- package/dist/molecules/drawer.js +63 -6
- package/dist/molecules/file-upload.js +373 -37
- package/dist/molecules/form-checkbox.js +65 -22
- package/dist/molecules/form-error-summary.js +29 -5
- package/dist/molecules/form-input.js +26 -30
- package/dist/molecules/form-numeric-input.js +11 -9
- package/dist/molecules/form-textarea.js +26 -23
- package/dist/molecules/menu.js +170 -47
- package/dist/molecules/pagination.js +100 -28
- package/dist/molecules/phone-input.js +172 -37
- package/dist/molecules/popover.js +53 -26
- package/dist/molecules/price-block.js +1 -0
- package/dist/molecules/product-card.js +85 -23
- package/dist/molecules/quantity-field.js +4 -2
- package/dist/molecules/radio-card.js +102 -30
- package/dist/molecules/radio-group.js +108 -31
- package/dist/molecules/search-form.js +116 -13
- package/dist/molecules/select.js +226 -81
- package/dist/molecules/slider.js +141 -30
- package/dist/molecules/steps.js +181 -50
- package/dist/molecules/switch.js +86 -20
- package/dist/molecules/tabs.js +227 -31
- package/dist/molecules/toast.js +155 -53
- package/dist/molecules/totals-summary.js +2 -1
- package/dist/molecules/tour.js +9 -5
- package/dist/molecules/tree-view.js +255 -109
- package/dist/molecules/vertical-navigation.js +8 -4
- package/dist/organisms/data-table.fields.js +26 -5
- package/dist/organisms/data-table.helpers.js +6 -2
- package/dist/organisms/data-table.js +587 -154
- package/dist/organisms/footer.js +18 -11
- package/dist/organisms/gallery.js +61 -24
- package/dist/organisms/header.js +106 -32
- package/dist/organisms/line-item.js +1 -0
- package/dist/organisms/sidebar.js +1 -0
- package/dist/organisms/table.js +22 -7
- package/dist/src/atoms/action-icon.d.ts +10 -10
- package/dist/src/atoms/action-icon.d.ts.map +1 -1
- package/dist/src/atoms/badge.d.ts +3 -3
- package/dist/src/atoms/badge.d.ts.map +1 -1
- package/dist/src/atoms/button.d.ts +47 -24
- package/dist/src/atoms/button.d.ts.map +1 -1
- package/dist/src/atoms/checkbox.d.ts +6 -5
- package/dist/src/atoms/checkbox.d.ts.map +1 -1
- package/dist/src/atoms/hotkeys.d.ts +3 -2
- package/dist/src/atoms/hotkeys.d.ts.map +1 -1
- package/dist/src/atoms/icon.d.ts +18 -17
- package/dist/src/atoms/icon.d.ts.map +1 -1
- package/dist/src/atoms/image.d.ts +38 -7
- package/dist/src/atoms/image.d.ts.map +1 -1
- package/dist/src/atoms/input.d.ts +23 -14
- package/dist/src/atoms/input.d.ts.map +1 -1
- package/dist/src/atoms/label.d.ts +4 -4
- package/dist/src/atoms/label.d.ts.map +1 -1
- package/dist/src/atoms/link-button.d.ts +78 -31
- package/dist/src/atoms/link-button.d.ts.map +1 -1
- package/dist/src/atoms/link.d.ts +30 -9
- package/dist/src/atoms/link.d.ts.map +1 -1
- package/dist/src/atoms/numeric-input.d.ts +24 -19
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/atoms/rating.d.ts +54 -26
- package/dist/src/atoms/rating.d.ts.map +1 -1
- package/dist/src/atoms/skeleton.d.ts +9 -9
- package/dist/src/atoms/skeleton.d.ts.map +1 -1
- package/dist/src/atoms/status-text.d.ts +21 -13
- package/dist/src/atoms/status-text.d.ts.map +1 -1
- package/dist/src/atoms/textarea.d.ts +22 -20
- package/dist/src/atoms/textarea.d.ts.map +1 -1
- package/dist/src/atoms/tooltip.d.ts +5 -5
- package/dist/src/atoms/tooltip.d.ts.map +1 -1
- package/dist/src/hotkeys.d.ts +1 -1
- package/dist/src/hotkeys.d.ts.map +1 -1
- package/dist/src/internal/choice-control.d.ts +18 -0
- package/dist/src/internal/choice-control.d.ts.map +1 -0
- package/dist/src/internal/combobox-query-sync.d.ts +4 -0
- package/dist/src/internal/combobox-query-sync.d.ts.map +1 -0
- package/dist/src/internal/date-picker-coordinator.d.ts +7 -1
- package/dist/src/internal/date-picker-coordinator.d.ts.map +1 -1
- package/dist/src/internal/date-picker-dom.d.ts +10 -0
- package/dist/src/internal/date-picker-dom.d.ts.map +1 -0
- package/dist/src/internal/date-picker-input.d.ts +7 -0
- package/dist/src/internal/date-picker-input.d.ts.map +1 -0
- package/dist/src/internal/described-by.d.ts +7 -1
- package/dist/src/internal/described-by.d.ts.map +1 -1
- package/dist/src/internal/form-control-lifecycle.d.ts +22 -0
- package/dist/src/internal/form-control-lifecycle.d.ts.map +1 -0
- package/dist/src/internal/molecules/vertical-navigation.context.d.ts +1 -1
- package/dist/src/internal/molecules/vertical-navigation.context.d.ts.map +1 -1
- package/dist/src/internal/molecules/vertical-navigation.styles.d.ts +21 -0
- package/dist/src/internal/molecules/vertical-navigation.styles.d.ts.map +1 -1
- package/dist/src/internal/numeric-input-editing.d.ts +13 -0
- package/dist/src/internal/numeric-input-editing.d.ts.map +1 -0
- package/dist/src/internal/overlay-portal.d.ts +18 -0
- package/dist/src/internal/overlay-portal.d.ts.map +1 -0
- package/dist/src/internal/use-effective-disabled.d.ts +4 -0
- package/dist/src/internal/use-effective-disabled.d.ts.map +1 -0
- package/dist/src/molecules/accordion.d.ts +25 -19
- package/dist/src/molecules/accordion.d.ts.map +1 -1
- package/dist/src/molecules/availability-status.d.ts +4 -1
- package/dist/src/molecules/availability-status.d.ts.map +1 -1
- package/dist/src/molecules/breadcrumb.d.ts +2 -2
- package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
- package/dist/src/molecules/carousel.d.ts +51 -52
- package/dist/src/molecules/carousel.d.ts.map +1 -1
- package/dist/src/molecules/cascade-select.d.ts +23 -8
- package/dist/src/molecules/cascade-select.d.ts.map +1 -1
- package/dist/src/molecules/chart.d.ts +18 -1
- package/dist/src/molecules/chart.d.ts.map +1 -1
- package/dist/src/molecules/color-select.d.ts +19 -3
- package/dist/src/molecules/color-select.d.ts.map +1 -1
- package/dist/src/molecules/combobox.d.ts +27 -5
- package/dist/src/molecules/combobox.d.ts.map +1 -1
- package/dist/src/molecules/command.d.ts +1 -1
- package/dist/src/molecules/date-picker.d.ts +30 -4
- package/dist/src/molecules/date-picker.d.ts.map +1 -1
- package/dist/src/molecules/dialog.d.ts +17 -4
- package/dist/src/molecules/dialog.d.ts.map +1 -1
- package/dist/src/molecules/drawer.d.ts +4 -4
- package/dist/src/molecules/drawer.d.ts.map +1 -1
- package/dist/src/molecules/file-upload.d.ts +11 -6
- package/dist/src/molecules/file-upload.d.ts.map +1 -1
- package/dist/src/molecules/form-checkbox.d.ts +7 -2
- package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
- package/dist/src/molecules/form-error-summary.d.ts +4 -3
- package/dist/src/molecules/form-error-summary.d.ts.map +1 -1
- package/dist/src/molecules/form-input.d.ts +5 -6
- package/dist/src/molecules/form-input.d.ts.map +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +5 -5
- package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-textarea.d.ts +5 -6
- package/dist/src/molecules/form-textarea.d.ts.map +1 -1
- package/dist/src/molecules/menu.d.ts +17 -3
- package/dist/src/molecules/menu.d.ts.map +1 -1
- package/dist/src/molecules/pagination.d.ts +1 -1
- package/dist/src/molecules/pagination.d.ts.map +1 -1
- package/dist/src/molecules/phone-input.d.ts +4 -1
- package/dist/src/molecules/phone-input.d.ts.map +1 -1
- package/dist/src/molecules/popover.d.ts +7 -1
- package/dist/src/molecules/popover.d.ts.map +1 -1
- package/dist/src/molecules/price-block.d.ts +1 -1
- package/dist/src/molecules/price-block.d.ts.map +1 -1
- package/dist/src/molecules/product-card.d.ts +127 -27
- package/dist/src/molecules/product-card.d.ts.map +1 -1
- package/dist/src/molecules/quantity-field.d.ts +1 -1
- package/dist/src/molecules/quantity-field.d.ts.map +1 -1
- package/dist/src/molecules/radio-card.d.ts +10 -3
- package/dist/src/molecules/radio-card.d.ts.map +1 -1
- package/dist/src/molecules/radio-group.d.ts +15 -6
- package/dist/src/molecules/radio-group.d.ts.map +1 -1
- package/dist/src/molecules/search-form.d.ts +37 -12
- package/dist/src/molecules/search-form.d.ts.map +1 -1
- package/dist/src/molecules/select.d.ts +34 -29
- package/dist/src/molecules/select.d.ts.map +1 -1
- package/dist/src/molecules/slider.d.ts +23 -2
- package/dist/src/molecules/slider.d.ts.map +1 -1
- package/dist/src/molecules/steps.d.ts +30 -10
- package/dist/src/molecules/steps.d.ts.map +1 -1
- package/dist/src/molecules/switch.d.ts +54 -33
- package/dist/src/molecules/switch.d.ts.map +1 -1
- package/dist/src/molecules/tabs.d.ts +11 -11
- package/dist/src/molecules/tabs.d.ts.map +1 -1
- package/dist/src/molecules/toast.d.ts +38 -14
- package/dist/src/molecules/toast.d.ts.map +1 -1
- package/dist/src/molecules/totals-summary.d.ts +1 -1
- package/dist/src/molecules/totals-summary.d.ts.map +1 -1
- package/dist/src/molecules/tour.d.ts +1 -1
- package/dist/src/molecules/tour.d.ts.map +1 -1
- package/dist/src/molecules/tree-view.d.ts +16 -20
- package/dist/src/molecules/tree-view.d.ts.map +1 -1
- package/dist/src/molecules/vertical-navigation.d.ts +2 -2
- package/dist/src/molecules/vertical-navigation.d.ts.map +1 -1
- package/dist/src/organisms/data-table.d.ts +28 -3
- package/dist/src/organisms/data-table.d.ts.map +1 -1
- package/dist/src/organisms/data-table.fields.d.ts +4 -1
- package/dist/src/organisms/data-table.fields.d.ts.map +1 -1
- package/dist/src/organisms/data-table.helpers.d.ts +5 -12
- package/dist/src/organisms/data-table.helpers.d.ts.map +1 -1
- package/dist/src/organisms/footer.d.ts +5 -5
- package/dist/src/organisms/footer.d.ts.map +1 -1
- package/dist/src/organisms/gallery.d.ts +11 -9
- package/dist/src/organisms/gallery.d.ts.map +1 -1
- package/dist/src/organisms/header.d.ts +24 -22
- package/dist/src/organisms/header.d.ts.map +1 -1
- package/dist/src/organisms/table.d.ts +14 -14
- package/dist/src/organisms/table.d.ts.map +1 -1
- package/dist/src/templates/accordion.d.ts +8 -6
- package/dist/src/templates/accordion.d.ts.map +1 -1
- package/dist/src/templates/breadcrumb.d.ts +1 -1
- package/dist/src/templates/breadcrumb.d.ts.map +1 -1
- package/dist/src/templates/carousel.d.ts +3 -3
- package/dist/src/templates/carousel.d.ts.map +1 -1
- package/dist/src/templates/facet-filter-panel.d.ts +9 -3
- package/dist/src/templates/facet-filter-panel.d.ts.map +1 -1
- package/dist/src/templates/gallery.d.ts +2 -2
- package/dist/src/templates/gallery.d.ts.map +1 -1
- package/dist/src/templates/numeric-input.d.ts +1 -1
- package/dist/src/templates/numeric-input.d.ts.map +1 -1
- package/dist/src/templates/popover.d.ts +4 -2
- package/dist/src/templates/popover.d.ts.map +1 -1
- package/dist/src/templates/product-card.d.ts +12 -4
- package/dist/src/templates/product-card.d.ts.map +1 -1
- package/dist/src/templates/search-suggestions.d.ts +1 -1
- package/dist/src/templates/select.d.ts +7 -2
- package/dist/src/templates/select.d.ts.map +1 -1
- package/dist/src/templates/tabs.d.ts +8 -7
- package/dist/src/templates/tabs.d.ts.map +1 -1
- package/dist/src/theme/theme-config.d.ts +9 -16
- package/dist/src/theme/theme-config.d.ts.map +1 -1
- package/dist/src/theme/theme-provider.d.ts +16 -21
- package/dist/src/theme/theme-provider.d.ts.map +1 -1
- package/dist/src/theme/theme-toggle.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/templates/accordion.js +3 -1
- package/dist/templates/breadcrumb.js +11 -4
- package/dist/templates/carousel.js +3 -6
- package/dist/templates/facet-filter-panel.js +121 -52
- package/dist/templates/gallery.js +6 -2
- package/dist/templates/numeric-input.js +6 -1
- package/dist/templates/popover.js +6 -1
- package/dist/templates/product-card.js +52 -26
- package/dist/templates/select.js +6 -1
- package/dist/templates/tabs.js +4 -2
- package/dist/theme/theme-config.js +8 -16
- package/dist/theme/theme-provider.js +89 -63
- package/dist/theme/theme-toggle.js +17 -9
- package/dist/utils.js +11 -1
- package/package.json +9 -5
- package/src/tokens/_base.css +4 -3
- package/src/tokens/_business-atoms.css +96 -0
- package/src/tokens/_foundation-overrides.css +251 -0
- package/src/tokens/_reset.css +10 -10
- package/src/tokens/_scheme-scopes.css +4194 -0
- package/src/tokens/_semantic.css +1 -23
- package/src/tokens/_tokens-base.css +36 -32
- package/src/tokens/_typography.css +2 -1
- package/src/tokens/components/_form-control.css +149 -6
- package/src/tokens/components/_popup-surface.css +15 -29
- package/src/tokens/components/atoms/_action-icon.css +49 -0
- package/src/tokens/components/atoms/_button.css +77 -0
- package/src/tokens/components/atoms/_checkbox.css +47 -4
- package/src/tokens/components/atoms/_hotkeys.css +2 -0
- package/src/tokens/components/atoms/_icon.css +60 -7
- package/src/tokens/components/atoms/_image.css +18 -0
- package/src/tokens/components/atoms/_input.css +20 -0
- package/src/tokens/components/atoms/_label.css +3 -7
- package/src/tokens/components/atoms/_link.css +47 -5
- package/src/tokens/components/atoms/_numeric-input.css +121 -2
- package/src/tokens/components/atoms/_rating.css +55 -6
- package/src/tokens/components/atoms/_skeleton.css +12 -2
- package/src/tokens/components/atoms/_status-text.css +35 -5
- package/src/tokens/components/atoms/_textarea.css +32 -3
- package/src/tokens/components/atoms/_tooltip.css +25 -0
- package/src/tokens/components/molecules/_accordion.css +46 -5
- package/src/tokens/components/molecules/_breadcrumb.css +15 -4
- package/src/tokens/components/molecules/_carousel.css +67 -0
- package/src/tokens/components/molecules/_cascade-select.css +104 -0
- package/src/tokens/components/molecules/_chart.css +32 -16
- package/src/tokens/components/molecules/_color-select.css +21 -0
- package/src/tokens/components/molecules/_combobox.css +81 -0
- package/src/tokens/components/molecules/_command.css +1 -0
- package/src/tokens/components/molecules/_date-picker.css +66 -10
- package/src/tokens/components/molecules/_dialog.css +36 -4
- package/src/tokens/components/molecules/_drawer.css +39 -3
- package/src/tokens/components/molecules/_file-upload.css +16 -1
- package/src/tokens/components/molecules/_menu.css +17 -0
- package/src/tokens/components/molecules/_pagination.css +19 -0
- package/src/tokens/components/molecules/_phone-input.css +20 -5
- package/src/tokens/components/molecules/_popover.css +34 -0
- package/src/tokens/components/molecules/_product-card.css +70 -0
- package/src/tokens/components/molecules/_radio-card.css +35 -0
- package/src/tokens/components/molecules/_radio-group.css +8 -0
- package/src/tokens/components/molecules/_select.css +33 -0
- package/src/tokens/components/molecules/_slider.css +5 -0
- package/src/tokens/components/molecules/_steps.css +52 -0
- package/src/tokens/components/molecules/_switch.css +59 -10
- package/src/tokens/components/molecules/_tabs.css +61 -3
- package/src/tokens/components/molecules/_toast.css +60 -0
- package/src/tokens/components/molecules/_totals-summary.css +22 -22
- package/src/tokens/components/molecules/_tour.css +16 -1
- package/src/tokens/components/molecules/_tree-view.css +27 -3
- package/src/tokens/components/molecules/_vertical-navigation.css +21 -3
- package/src/tokens/components/organisms/_data-table.css +97 -0
- package/src/tokens/components/organisms/_footer.css +9 -0
- package/src/tokens/components/organisms/_gallery.css +11 -0
- package/src/tokens/components/organisms/_header.css +22 -0
- package/src/tokens/components/organisms/_sidebar.css +1 -1
- package/src/tokens/components/organisms/_table.css +31 -0
- package/src/tokens/components/templates/_facet-filter-panel.css +11 -1
- package/src/tokens/figma/akros/variables.css +15 -6
- package/src/tokens/figma/brand-overrides.css +171 -57
- package/src/tokens/figma/business/variables.css +15 -6
- package/src/tokens/figma/cyber/variables.css +115 -38
- package/src/tokens/figma/cyber-dark/variables.css +115 -38
- package/src/tokens/figma/dark/variables.css +13 -4
- package/src/tokens/figma/light/variables.css +62 -49
- package/src/tokens/figma/{neo → n1}/variables.css +123 -114
- package/src/tokens/figma/variables.css +658 -249
- package/src/tokens/theme.css +24 -4
- package/src/tokens/_colors.css +0 -5
- package/src/tokens/figma/neo-dark/variables.css +0 -457
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../src/templates/product-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../src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E;QACN,MAAM,CAAC,EAAE,UAAU,GAAG,eAAe,GAAG,cAAc,CAAA;QACtD,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,GAAG,EAAE,EAC/D,KAAK,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EACb,kBAAqC,EACrC,iBAAmC,EACnC,MAAM,EACN,MAAM,EACN,KAAK,EACL,WAAkB,EAClB,WAAW,EACX,aAAa,EACb,eAAe,EACf,cAA8B,EAC9B,gBAAiC,EACjC,kBAAsC,EACtC,MAAiB,EACjB,SAAS,GACV,EAAE,wBAAwB,CAAC,CAAC,CAAC,+BAkG7B"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Select — @techsio/ui-kit template.
|
|
3
3
|
*
|
|
4
4
|
* @component Select
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.3.2
|
|
6
6
|
* @skill select-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
@@ -19,15 +19,20 @@ type SelectTemplateValueTextProps = Omit<ComponentPropsWithoutRef<"span">, "chil
|
|
|
19
19
|
ref?: Ref<HTMLSpanElement>;
|
|
20
20
|
};
|
|
21
21
|
export type SelectTemplateProps = Omit<SelectProps, "children"> & {
|
|
22
|
+
/** StatusText below the field, linked to its trigger; follows validateStatus. */
|
|
23
|
+
helpText?: ReactNode;
|
|
24
|
+
/** DOM attributes and events for the focusable trigger. */
|
|
25
|
+
triggerProps?: ComponentPropsWithoutRef<"button">;
|
|
22
26
|
label?: ReactNode;
|
|
23
27
|
labelProps?: SelectTemplateLabelProps;
|
|
24
28
|
placeholder?: string;
|
|
25
29
|
valueText?: ReactNode | ((items: SelectItem[]) => ReactNode);
|
|
26
30
|
valueTextProps?: SelectTemplateValueTextProps;
|
|
31
|
+
/** Show selected-option checkmarks (default true), not the trigger chevron. */
|
|
27
32
|
showIndicator?: boolean;
|
|
28
33
|
renderItem?: (item: SelectItem) => ReactNode;
|
|
29
34
|
ref?: Ref<HTMLDivElement>;
|
|
30
35
|
};
|
|
31
|
-
export declare function SelectTemplate({ items, label, labelProps, placeholder, valueText, valueTextProps, showIndicator, renderItem, ref, ...selectProps }: SelectTemplateProps): import("react").JSX.Element;
|
|
36
|
+
export declare function SelectTemplate({ items, helpText, triggerProps, label, labelProps, placeholder, valueText, valueTextProps, showIndicator, renderItem, ref, ...selectProps }: SelectTemplateProps): import("react").JSX.Element;
|
|
32
37
|
export {};
|
|
33
38
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/templates/select.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAA;AAE5B,KAAK,wBAAwB,GAAG,IAAI,CAClC,wBAAwB,CAAC,OAAO,CAAC,EACjC,UAAU,CACX,GAAG;IACF,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAC5B,CAAA;AAED,KAAK,4BAA4B,GAAG,IA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elog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
@@ -11,17 +11,18 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type * as React from "react";
|
|
13
13
|
import type { Ref } from "react";
|
|
14
|
-
import { type TabsProps } from "../molecules/tabs.js";
|
|
15
|
-
export
|
|
14
|
+
import { Tabs, type TabsProps } from "../molecules/tabs.js";
|
|
15
|
+
export type TabItem = {
|
|
16
16
|
value: string;
|
|
17
17
|
label: string;
|
|
18
18
|
content: React.ReactNode;
|
|
19
19
|
disabled?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export
|
|
20
|
+
};
|
|
21
|
+
export type TabsTemplateProps = Omit<TabsProps, "children" | "ref"> & {
|
|
22
|
+
tablistProps?: React.ComponentPropsWithoutRef<typeof Tabs.List>;
|
|
22
23
|
items: TabItem[];
|
|
23
24
|
showIndicator?: boolean;
|
|
24
25
|
ref?: Ref<HTMLDivElement>;
|
|
25
|
-
}
|
|
26
|
-
export declare function TabsTemplate({ items, showIndicator, variant, size, fitted, justify, orientation, defaultValue, value, onValueChange, ref, className, ...tabsProps }: TabsTemplateProps): React.JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
export declare function TabsTemplate({ items, tablistProps, showIndicator, variant, size, fitted, justify, orientation, defaultValue, value, onValueChange, ref, className, ...tabsProps }: TabsTemplateProps): React.JSX.Element;
|
|
27
28
|
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/templates/tabs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/templates/tabs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAExD,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG;IACpE,YAAY,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/D,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,YAAY,EACZ,aAAqB,EACrB,OAAmB,EACnB,IAAW,EACX,MAAc,EACd,OAAiB,EACjB,WAA0B,EAC1B,YAAY,EACZ,KAAK,EACL,aAAa,EACb,GAAG,EACH,SAAS,EACT,GAAG,SAAS,EACb,EAAE,iBAAiB,qBAmCnB"}
|
|
@@ -6,22 +6,10 @@ export type BrandConfig = {
|
|
|
6
6
|
label: string;
|
|
7
7
|
/** Concrete modes this brand ships. Light-only brands omit "dark". */
|
|
8
8
|
modes: ColorMode[];
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
* which is the default `:root` / `@theme` and needs no attribute.
|
|
12
|
-
*/
|
|
13
|
-
attr?: string;
|
|
9
|
+
/** `data-theme` attribute value for this brand. */
|
|
10
|
+
attr: string;
|
|
14
11
|
};
|
|
15
12
|
export declare const THEMES: {
|
|
16
|
-
readonly base: {
|
|
17
|
-
readonly label: "Default";
|
|
18
|
-
readonly modes: ["light", "dark"];
|
|
19
|
-
};
|
|
20
|
-
readonly neo: {
|
|
21
|
-
readonly label: "Neo (Red)";
|
|
22
|
-
readonly modes: ["light", "dark"];
|
|
23
|
-
readonly attr: "neo";
|
|
24
|
-
};
|
|
25
13
|
readonly business: {
|
|
26
14
|
readonly label: "Business";
|
|
27
15
|
readonly modes: ["light"];
|
|
@@ -32,6 +20,11 @@ export declare const THEMES: {
|
|
|
32
20
|
readonly modes: ["light"];
|
|
33
21
|
readonly attr: "akros";
|
|
34
22
|
};
|
|
23
|
+
readonly n1: {
|
|
24
|
+
readonly label: "N1";
|
|
25
|
+
readonly modes: ["light"];
|
|
26
|
+
readonly attr: "n1";
|
|
27
|
+
};
|
|
35
28
|
};
|
|
36
29
|
export type BrandKey = keyof typeof THEMES;
|
|
37
30
|
export declare const DEFAULT_BRAND: BrandKey;
|
|
@@ -42,8 +35,8 @@ export declare const MODE_STORAGE_KEY = "ui-mode";
|
|
|
42
35
|
export declare function brandKeys(): BrandKey[];
|
|
43
36
|
export declare function getBrand(key: BrandKey): BrandConfig;
|
|
44
37
|
export declare function isBrandKey(value: string): value is BrandKey;
|
|
45
|
-
/** `data-theme` value for a brand
|
|
46
|
-
export declare function brandAttr(key: BrandKey): string
|
|
38
|
+
/** `data-theme` value for a brand. */
|
|
39
|
+
export declare function brandAttr(key: BrandKey): string;
|
|
47
40
|
/** Whether a brand ships a dark variant (and therefore allows mode switching). */
|
|
48
41
|
export declare function brandSupportsDark(key: BrandKey): boolean;
|
|
49
42
|
/** Mode settings a brand allows in a toggler. Light-only brands get just light. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-config.d.ts","sourceRoot":"","sources":["../../../src/theme/theme-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-config.d.ts","sourceRoot":"","sources":["../../../src/theme/theme-config.ts"],"names":[],"mappings":"AAgBA,MA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1
1
|
import { type PropsWithChildren } from "react";
|
|
2
2
|
import { type BrandKey, type ColorMode, type ModeSetting } from "./theme-config.js";
|
|
3
|
-
|
|
4
|
-
defaultBrand?: BrandKey;
|
|
5
|
-
defaultMode?: ModeSetting;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function AppThemeProvider({ defaultBrand, defaultMode, children, }: AppThemeProviderProps): import("react").JSX.Element;
|
|
3
|
+
export declare function resolveAppearance(brand: BrandKey, requested: ModeSetting, system: ColorMode): ColorMode;
|
|
8
4
|
export type UseAppThemeResult = {
|
|
9
|
-
/** Active brand key. */
|
|
10
5
|
brand: BrandKey;
|
|
11
|
-
/** All brand keys, for building a brand toggler. */
|
|
12
6
|
brands: BrandKey[];
|
|
13
7
|
setBrand: (brand: BrandKey) => void;
|
|
14
|
-
/**
|
|
8
|
+
/** Requested preference; retained while a light-only brand is active. */
|
|
15
9
|
mode: ModeSetting;
|
|
16
|
-
/**
|
|
10
|
+
/** Effective appearance, after OS resolution and brand capability constraints. */
|
|
17
11
|
resolvedMode: ColorMode;
|
|
18
12
|
setMode: (mode: ModeSetting) => void;
|
|
19
|
-
/** Mode settings allowed for the active brand (light-only brands get just light). */
|
|
20
13
|
availableModes: ModeSetting[];
|
|
21
|
-
/** False during SSR and the first client render
|
|
14
|
+
/** False during SSR and the first client render. */
|
|
22
15
|
mounted: boolean;
|
|
23
16
|
};
|
|
17
|
+
export type AppThemeProviderProps = PropsWithChildren<{
|
|
18
|
+
defaultBrand?: BrandKey;
|
|
19
|
+
defaultMode?: ModeSetting;
|
|
20
|
+
/** Nonce for both synchronous theme bootstrap scripts under CSP. */
|
|
21
|
+
nonce?: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function AppThemeProvider({ defaultBrand, defaultMode, nonce, children, }: AppThemeProviderProps): import("react").JSX.Element;
|
|
24
24
|
export declare function useAppTheme(): UseAppThemeResult;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
* as possible: in `<head>`, or — for the Next.js App Router, which does not
|
|
29
|
-
* allow arbitrary `<head>` children in a layout — as the first child of
|
|
30
|
-
* `<body>`, where it still runs synchronously before any body content renders.
|
|
31
|
-
* better-themes injects its own equivalent script for the mode axis.
|
|
32
|
-
*/
|
|
33
|
-
export declare function BrandThemeScript({ defaultBrand, }: {
|
|
25
|
+
/** Render early in head/body when content precedes AppThemeProvider. The same
|
|
26
|
+
* atomic bootstrap is included by the provider; neither script persists data. */
|
|
27
|
+
export declare function BrandThemeScript({ defaultBrand, defaultMode, nonce, }: {
|
|
34
28
|
defaultBrand?: BrandKey;
|
|
29
|
+
defaultMode?: ModeSetting;
|
|
30
|
+
nonce?: string;
|
|
35
31
|
}): import("react").JSX.Element;
|
|
36
|
-
export {};
|
|
37
32
|
//# sourceMappingURL=theme-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../src/theme/theme-provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAA;AACd,OAAO,EAGL,KAAK,QAAQ,EAIb,KAAK,SAAS,EAKd,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAoBvB,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,WAAW,EACtB,MAAM,EAAE,SAAS,GAChB,SAAS,CAKX;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,MAAM,EAAE,QAAQ,EAAE,CAAA;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAA;IACnC,yEAAyE;IACzE,IAAI,EAAE,WAAW,CAAA;IACjB,kFAAkF;IAClF,YAAY,EAAE,SAAS,CAAA;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;IACpC,cAAc,EAAE,WAAW,EAAE,CAAA;IAC7B,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AA4ED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IACpD,YAAY,CAAC,EAAE,QAAQ,CAAA;IACvB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC,CAAA;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,YAA4B,EAC5B,WAA0B,EAC1B,KAAK,EACL,QAAQ,GACT,EAAE,qBAAqB,+BAwBvB;AAED,wBAAgB,WAAW,IAAI,iBAAiB,CAM/C;AAED;iFACiF;AACjF,wBAAgB,gBAAgB,CAAC,EAC/B,YAA4B,EAC5B,WAA0B,EAC1B,KAAK,GACN,EAAE;IACD,YAAY,CAAC,EAAE,QAAQ,CAAA;IACvB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,+BAgBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["../../../src/theme/theme-toggle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["../../../src/theme/theme-toggle.tsx"],"names":[],"mappings":"AAgCA,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAmDhE"}
|
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAU3C,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAU3C,eAAO,MAAM,EAAE,EAAE,EAsBf,CAAA;AAEF,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,UASlC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Accordion } from "../molecules/accordion.js";
|
|
3
|
-
function AccordionTemplate({ items, showIndicator = true, indicatorIcon = "token-icon-accordion-chevron", variant = "default", size = "md", shadow = "none", collapsible = true, multiple = false, defaultValue, value, onChange, ref, className, ...accordionProps }) {
|
|
4
|
+
function AccordionTemplate({ items, headingLevel = 3, showIndicator = true, indicatorIcon = "token-icon-accordion-chevron", variant = "default", size = "md", shadow = "none", collapsible = true, multiple = false, defaultValue, value, onChange, ref, className, ...accordionProps }) {
|
|
4
5
|
return /*#__PURE__*/ jsx(Accordion, {
|
|
5
6
|
className: className,
|
|
6
7
|
collapsible: collapsible,
|
|
@@ -18,6 +19,7 @@ function AccordionTemplate({ items, showIndicator = true, indicatorIcon = "token
|
|
|
18
19
|
value: item.value,
|
|
19
20
|
children: [
|
|
20
21
|
/*#__PURE__*/ jsxs(Accordion.Header, {
|
|
22
|
+
"aria-level": headingLevel,
|
|
21
23
|
children: [
|
|
22
24
|
/*#__PURE__*/ jsx(Accordion.Title, {
|
|
23
25
|
children: item.title
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Fragment as external_react_Fragment } from "react";
|
|
3
4
|
import { Breadcrumb } from "../molecules/breadcrumb.js";
|
|
@@ -22,7 +23,10 @@ function getItemKey(item, index) {
|
|
|
22
23
|
return item.value ?? `${index}-${String(item.label)}`;
|
|
23
24
|
}
|
|
24
25
|
function BreadcrumbTemplate({ items, maxItems = 0, linkAs, linkProps, separator, separatorIcon = "token-icon-breadcrumb-separator", iconSize, separatorIconSize, ellipsisIconSize, ref, ...breadcrumbProps }) {
|
|
25
|
-
const
|
|
26
|
+
const explicitCurrentIndex = items.findIndex((item)=>item.isCurrent);
|
|
27
|
+
const pathItems = explicitCurrentIndex < 0 ? items : items.slice(0, explicitCurrentIndex + 1);
|
|
28
|
+
const itemLimit = Number.isFinite(maxItems) ? Math.max(0, Math.floor(maxItems)) : 0;
|
|
29
|
+
const displayItems = getDisplayItems(pathItems, itemLimit);
|
|
26
30
|
const hasExplicitCurrent = displayItems.some((item)=>"ellipsis" !== item && item.isCurrent);
|
|
27
31
|
return /*#__PURE__*/ jsx(Breadcrumb, {
|
|
28
32
|
ref: ref,
|
|
@@ -49,7 +53,10 @@ function BreadcrumbTemplate({ items, maxItems = 0, linkAs, linkProps, separator,
|
|
|
49
53
|
icon: item.icon,
|
|
50
54
|
size: item.iconSize ?? iconSize
|
|
51
55
|
}),
|
|
52
|
-
|
|
56
|
+
/*#__PURE__*/ jsx("span", {
|
|
57
|
+
className: "wrap-anywhere min-w-0",
|
|
58
|
+
children: item.label
|
|
59
|
+
})
|
|
53
60
|
]
|
|
54
61
|
});
|
|
55
62
|
return /*#__PURE__*/ jsxs(external_react_Fragment, {
|
|
@@ -60,8 +67,8 @@ function BreadcrumbTemplate({ items, maxItems = 0, linkAs, linkProps, separator,
|
|
|
60
67
|
}) : /*#__PURE__*/ jsx(BreadcrumbTemplateLink, {
|
|
61
68
|
...linkProps,
|
|
62
69
|
as: linkAs,
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
href: item.href || "#",
|
|
71
|
+
children: itemContent
|
|
65
72
|
})
|
|
66
73
|
}),
|
|
67
74
|
!isLastItem && /*#__PURE__*/ jsx(Breadcrumb.Separator, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Carousel } from "../molecules/carousel.js";
|
|
3
4
|
function CarouselTemplate({ slides, showControls = true, showIndicators = true, showAutoplay = false, prevIcon = "token-icon-carousel-prev", nextIcon = "token-icon-carousel-next", size, objectFit, aspectRatio, orientation, loop, autoplay, allowMouseDrag, slidesPerPage, slidesPerMove, spacing, padding, imageAs, width, height, className, onPageChange, ...carouselProps }) {
|
|
@@ -33,11 +34,7 @@ function CarouselTemplate({ slides, showControls = true, showIndicators = true,
|
|
|
33
34
|
showControls && showIndicators && /*#__PURE__*/ jsx("div", {
|
|
34
35
|
className: "flex-1"
|
|
35
36
|
}),
|
|
36
|
-
showIndicators && /*#__PURE__*/ jsx(Carousel.Indicators, {
|
|
37
|
-
children: slides.map((slide, index)=>/*#__PURE__*/ jsx(Carousel.Indicator, {
|
|
38
|
-
index: index
|
|
39
|
-
}, slide.id))
|
|
40
|
-
}),
|
|
37
|
+
showIndicators && /*#__PURE__*/ jsx(Carousel.Indicators, {}),
|
|
41
38
|
showControls && showIndicators && /*#__PURE__*/ jsx("div", {
|
|
42
39
|
className: "flex-1"
|
|
43
40
|
}),
|
|
@@ -46,7 +43,7 @@ function CarouselTemplate({ slides, showControls = true, showIndicators = true,
|
|
|
46
43
|
})
|
|
47
44
|
]
|
|
48
45
|
}),
|
|
49
|
-
showAutoplay && /*#__PURE__*/ jsx(Carousel.Autoplay, {})
|
|
46
|
+
(Boolean(autoplay) || showAutoplay) && /*#__PURE__*/ jsx(Carousel.Autoplay, {})
|
|
50
47
|
]
|
|
51
48
|
});
|
|
52
49
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
3
4
|
import { Button } from "../atoms/button.js";
|
|
5
|
+
import { StatusText } from "../atoms/status-text.js";
|
|
4
6
|
import { Accordion } from "../molecules/accordion.js";
|
|
5
7
|
import { Dialog } from "../molecules/dialog.js";
|
|
6
8
|
import { FormCheckbox } from "../molecules/form-checkbox.js";
|
|
@@ -13,7 +15,8 @@ const facetFilterPanelStyles = tv({
|
|
|
13
15
|
"max-h-(--container-facet-filter-panel-max-h) rounded-facet-filter-panel",
|
|
14
16
|
"border-(length:--border-width-facet-filter-panel) border-facet-filter-panel-border",
|
|
15
17
|
"bg-facet-filter-panel-bg text-facet-filter-panel-fg",
|
|
16
|
-
"p-facet-filter-panel"
|
|
18
|
+
"p-facet-filter-panel",
|
|
19
|
+
"focus-visible:facet-filter-panel-scroll-focus"
|
|
17
20
|
],
|
|
18
21
|
content: "flex min-h-0 flex-col gap-facet-filter-panel",
|
|
19
22
|
title: "font-facet-filter-panel-title text-facet-filter-panel-title text-facet-filter-panel-title-fg",
|
|
@@ -29,7 +32,7 @@ const facetFilterPanelStyles = tv({
|
|
|
29
32
|
drawerTrigger: "self-start",
|
|
30
33
|
drawerContent: "min-w-0",
|
|
31
34
|
triggerCount: "inline-flex min-w-facet-filter-panel-count items-center justify-center rounded-facet-filter-panel-count bg-facet-filter-panel-count-bg px-facet-filter-panel-count text-facet-filter-panel-count text-facet-filter-panel-count-fg",
|
|
32
|
-
activeRoot: "border-b-(length:--border-width-facet-filter-panel) flex flex-col gap-facet-filter-panel-active border-facet-filter-panel-border pb-facet-filter-panel-active",
|
|
35
|
+
activeRoot: "border-b-(length:--border-width-facet-filter-panel) flex flex-col gap-facet-filter-panel-active border-facet-filter-panel-border pb-facet-filter-panel-active data-empty:border-0 data-empty:pb-0",
|
|
33
36
|
activeHeader: "flex flex-wrap items-center justify-between gap-facet-filter-panel-active",
|
|
34
37
|
activeTitle: "font-facet-filter-panel-active-title text-facet-filter-panel-active-title",
|
|
35
38
|
activeList: "flex flex-wrap gap-facet-filter-panel-active"
|
|
@@ -39,7 +42,7 @@ const toRangeTuple = (values, group)=>[
|
|
|
39
42
|
values[0] ?? group.min,
|
|
40
43
|
values[1] ?? group.max
|
|
41
44
|
];
|
|
42
|
-
function FacetFilterOptions({ group, selectedValues, disabled, showMoreLabel, showLessLabel, onOptionChange }) {
|
|
45
|
+
function FacetFilterOptions({ group, selectedValues, disabled, readOnly, size, showMoreLabel, showLessLabel, onOptionChange }) {
|
|
43
46
|
const [expanded, setExpanded] = useState(false);
|
|
44
47
|
const styles = facetFilterPanelStyles();
|
|
45
48
|
const collapseAfter = Math.max(0, group.collapseAfter ?? group.options.length);
|
|
@@ -65,10 +68,10 @@ function FacetFilterOptions({ group, selectedValues, disabled, showMoreLabel, sh
|
|
|
65
68
|
className: styles.optionText(),
|
|
66
69
|
children: option.label
|
|
67
70
|
}),
|
|
68
|
-
void 0
|
|
71
|
+
void 0 === option.count ? null : /*#__PURE__*/ jsx("span", {
|
|
69
72
|
className: styles.optionCount(),
|
|
70
73
|
children: option.count
|
|
71
|
-
})
|
|
74
|
+
})
|
|
72
75
|
]
|
|
73
76
|
}),
|
|
74
77
|
name: group.id,
|
|
@@ -77,6 +80,8 @@ function FacetFilterOptions({ group, selectedValues, disabled, showMoreLabel, sh
|
|
|
77
80
|
value: option.value,
|
|
78
81
|
checked
|
|
79
82
|
}),
|
|
83
|
+
readOnly: readOnly,
|
|
84
|
+
size: size,
|
|
80
85
|
value: option.value
|
|
81
86
|
})
|
|
82
87
|
}, option.value))
|
|
@@ -95,7 +100,7 @@ function FacetFilterOptions({ group, selectedValues, disabled, showMoreLabel, sh
|
|
|
95
100
|
]
|
|
96
101
|
});
|
|
97
102
|
}
|
|
98
|
-
function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFilters = [], disabled = false, pending = false, pendingLabel, activeFiltersLabel = "Active filters", resetLabel = "Clear filters", showMoreLabel = (hiddenCount)=>`Show ${hiddenCount} more`, showLessLabel = "Show less", expandedGroups, defaultExpandedGroups, onExpandedGroupsChange, onOptionChange, onRangeChange, onRangeChangeEnd, onRemoveFilter, onReset, showTitle, titleId }) {
|
|
103
|
+
function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFilters = [], disabled = false, readOnly = false, size = "md", pending = false, pendingLabel, activeFiltersLabel = "Active filters", resetLabel = "Clear filters", showMoreLabel = (hiddenCount)=>`Show ${hiddenCount} more`, showLessLabel = "Show less", expandedGroups, defaultExpandedGroups, onExpandedGroupsChange, onOptionChange, onRangeChange, onRangeChangeEnd, onRemoveFilter, onReset, showTitle, titleId }) {
|
|
99
104
|
const styles = facetFilterPanelStyles();
|
|
100
105
|
const interactionDisabled = disabled || pending;
|
|
101
106
|
const optionGroupIds = groups.filter((group)=>"options" === group.type).map((group)=>group.id);
|
|
@@ -124,9 +129,10 @@ function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFil
|
|
|
124
129
|
id: titleId,
|
|
125
130
|
children: title
|
|
126
131
|
}) : null,
|
|
127
|
-
pending && pendingLabel ? /*#__PURE__*/ jsx(
|
|
128
|
-
"aria-live": "polite",
|
|
132
|
+
pending && pendingLabel ? /*#__PURE__*/ jsx(StatusText, {
|
|
129
133
|
className: styles.pending(),
|
|
134
|
+
role: "status",
|
|
135
|
+
size: size,
|
|
130
136
|
children: pendingLabel
|
|
131
137
|
}) : null,
|
|
132
138
|
/*#__PURE__*/ jsx(FacetFilterPanel.ActiveFilters, {
|
|
@@ -135,6 +141,7 @@ function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFil
|
|
|
135
141
|
label: activeFiltersLabel,
|
|
136
142
|
onRemove: onRemoveFilter,
|
|
137
143
|
onReset: onReset,
|
|
144
|
+
readOnly: readOnly,
|
|
138
145
|
resetLabel: resetLabel
|
|
139
146
|
}),
|
|
140
147
|
/*#__PURE__*/ jsx(Accordion, {
|
|
@@ -151,6 +158,10 @@ function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFil
|
|
|
151
158
|
if ("range" === group.type) return /*#__PURE__*/ jsx("section", {
|
|
152
159
|
className: styles.rangeGroup(),
|
|
153
160
|
children: /*#__PURE__*/ jsx(Slider, {
|
|
161
|
+
"aria-label": group["aria-label"] ?? [
|
|
162
|
+
`Minimum ${group.label.toLocaleLowerCase()}`,
|
|
163
|
+
`Maximum ${group.label.toLocaleLowerCase()}`
|
|
164
|
+
],
|
|
154
165
|
disabled: interactionDisabled || group.disabled,
|
|
155
166
|
formatRangeText: group.formatRangeText,
|
|
156
167
|
formatValue: group.formatValue,
|
|
@@ -158,15 +169,17 @@ function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFil
|
|
|
158
169
|
max: group.max,
|
|
159
170
|
min: group.min,
|
|
160
171
|
minStepsBetweenThumbs: group.minStepsBetweenThumbs,
|
|
161
|
-
onChange: (value)
|
|
172
|
+
onChange: (value)=>!readOnly && onRangeChange?.({
|
|
162
173
|
groupId: group.id,
|
|
163
174
|
value: toRangeTuple(value, group)
|
|
164
175
|
}),
|
|
165
|
-
onChangeEnd: (value)
|
|
176
|
+
onChangeEnd: (value)=>!readOnly && onRangeChangeEnd?.({
|
|
166
177
|
groupId: group.id,
|
|
167
178
|
value: toRangeTuple(value, group)
|
|
168
179
|
}),
|
|
180
|
+
readOnly: readOnly,
|
|
169
181
|
showValueText: true,
|
|
182
|
+
size: size,
|
|
170
183
|
step: group.step,
|
|
171
184
|
value: [
|
|
172
185
|
...group.value
|
|
@@ -186,13 +199,16 @@ function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFil
|
|
|
186
199
|
]
|
|
187
200
|
}),
|
|
188
201
|
/*#__PURE__*/ jsx(Accordion.Content, {
|
|
202
|
+
role: "group",
|
|
189
203
|
children: /*#__PURE__*/ jsx(FacetFilterOptions, {
|
|
190
204
|
disabled: interactionDisabled || Boolean(group.disabled),
|
|
191
205
|
group: group,
|
|
192
206
|
onOptionChange: onOptionChange,
|
|
207
|
+
readOnly: readOnly,
|
|
193
208
|
selectedValues: selectedValues[group.id] ?? [],
|
|
194
209
|
showLessLabel: showLessLabel,
|
|
195
|
-
showMoreLabel: showMoreLabel
|
|
210
|
+
showMoreLabel: showMoreLabel,
|
|
211
|
+
size: size
|
|
196
212
|
})
|
|
197
213
|
})
|
|
198
214
|
]
|
|
@@ -202,7 +218,7 @@ function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFil
|
|
|
202
218
|
]
|
|
203
219
|
});
|
|
204
220
|
}
|
|
205
|
-
function FacetFilterPanel({ presentation = "inline", drawerTriggerLabel, drawerPlacement = "right", drawerSize = "sm", drawerOpen, defaultDrawerOpen = false, onDrawerOpenChange, className, ...props }) {
|
|
221
|
+
function FacetFilterPanel({ "aria-label": ariaLabel, presentation = "inline", drawerTriggerLabel, drawerPlacement = "right", drawerSize = "sm", drawerOpen, defaultDrawerOpen = false, onDrawerOpenChange, className, ...props }) {
|
|
206
222
|
const styles = facetFilterPanelStyles();
|
|
207
223
|
const inlineTitleId = useId();
|
|
208
224
|
const drawerTriggerRef = useRef(null);
|
|
@@ -234,6 +250,7 @@ function FacetFilterPanel({ presentation = "inline", drawerTriggerLabel, drawerP
|
|
|
234
250
|
]
|
|
235
251
|
}),
|
|
236
252
|
/*#__PURE__*/ jsx(Dialog, {
|
|
253
|
+
"aria-label": ariaLabel,
|
|
237
254
|
className: styles.drawerContent({
|
|
238
255
|
className
|
|
239
256
|
}),
|
|
@@ -252,10 +269,12 @@ function FacetFilterPanel({ presentation = "inline", drawerTriggerLabel, drawerP
|
|
|
252
269
|
]
|
|
253
270
|
});
|
|
254
271
|
return /*#__PURE__*/ jsx("aside", {
|
|
255
|
-
"aria-
|
|
272
|
+
"aria-label": ariaLabel,
|
|
273
|
+
"aria-labelledby": ariaLabel ? void 0 : inlineTitleId,
|
|
256
274
|
className: styles.root({
|
|
257
275
|
className
|
|
258
276
|
}),
|
|
277
|
+
tabIndex: 0,
|
|
259
278
|
children: /*#__PURE__*/ jsx(FacetFilterPanelContent, {
|
|
260
279
|
...props,
|
|
261
280
|
showTitle: true,
|
|
@@ -263,48 +282,98 @@ function FacetFilterPanel({ presentation = "inline", drawerTriggerLabel, drawerP
|
|
|
263
282
|
})
|
|
264
283
|
});
|
|
265
284
|
}
|
|
266
|
-
FacetFilterPanel.ActiveFilters = function({ items, label = "Active filters", resetLabel = "Clear filters", disabled = false, className, onRemove, onReset }) {
|
|
285
|
+
FacetFilterPanel.ActiveFilters = function({ items, label = "Active filters", resetLabel = "Clear filters", disabled = false, readOnly = false, className, onRemove, onReset, fallbackFocusEl }) {
|
|
267
286
|
const styles = facetFilterPanelStyles();
|
|
268
|
-
|
|
269
|
-
|
|
287
|
+
const sectionRef = useRef(null);
|
|
288
|
+
const pendingFocus = useRef(null);
|
|
289
|
+
const itemKey = JSON.stringify(items.map((item)=>item.id));
|
|
290
|
+
useLayoutEffect(()=>{
|
|
291
|
+
const pending = pendingFocus.current;
|
|
292
|
+
const section = sectionRef.current;
|
|
293
|
+
if (!(pending && section)) return;
|
|
294
|
+
const document = section.ownerDocument;
|
|
295
|
+
if (document.activeElement !== document.body && document.activeElement !== pending.action) {
|
|
296
|
+
pendingFocus.current = null;
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (pending.action.isConnected) return;
|
|
300
|
+
const buttons = Array.from(section.querySelectorAll("[data-filter-id]:not(:disabled)"));
|
|
301
|
+
const nextIds = [
|
|
302
|
+
...pending.ids.slice(pending.index + 1),
|
|
303
|
+
...pending.ids.slice(0, pending.index).reverse()
|
|
304
|
+
];
|
|
305
|
+
const target = nextIds.map((id)=>buttons.find((button)=>button.dataset.filterId === id)).find(Boolean) ?? buttons[0] ?? fallbackFocusEl?.() ?? section.parentElement?.querySelector('[data-scope="accordion"][data-part="item-trigger"]:not(:disabled), [role="slider"]:not([aria-disabled="true"])') ?? section;
|
|
306
|
+
target.focus({
|
|
307
|
+
preventScroll: true
|
|
308
|
+
});
|
|
309
|
+
pendingFocus.current = null;
|
|
310
|
+
}, [
|
|
311
|
+
itemKey,
|
|
312
|
+
fallbackFocusEl
|
|
313
|
+
]);
|
|
314
|
+
const trackFocus = (action, index)=>{
|
|
315
|
+
if (action.ownerDocument.activeElement === action) pendingFocus.current = {
|
|
316
|
+
action,
|
|
317
|
+
ids: items.map((item)=>item.id),
|
|
318
|
+
index
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
return /*#__PURE__*/ jsx("div", {
|
|
322
|
+
"aria-label": "string" == typeof label ? label : "Active filters",
|
|
270
323
|
className: styles.activeRoot({
|
|
271
324
|
className
|
|
272
325
|
}),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
326
|
+
"data-empty": 0 === items.length ? "" : void 0,
|
|
327
|
+
ref: sectionRef,
|
|
328
|
+
role: "group",
|
|
329
|
+
tabIndex: -1,
|
|
330
|
+
children: items.length > 0 && /*#__PURE__*/ jsxs(Fragment, {
|
|
331
|
+
children: [
|
|
332
|
+
/*#__PURE__*/ jsxs("div", {
|
|
333
|
+
className: styles.activeHeader(),
|
|
334
|
+
children: [
|
|
335
|
+
/*#__PURE__*/ jsx("h3", {
|
|
336
|
+
className: styles.activeTitle(),
|
|
337
|
+
children: label
|
|
338
|
+
}),
|
|
339
|
+
!readOnly && /*#__PURE__*/ jsx(Button, {
|
|
340
|
+
disabled: disabled,
|
|
341
|
+
onClick: (event)=>{
|
|
342
|
+
trackFocus(event.currentTarget, -1);
|
|
343
|
+
onReset?.();
|
|
344
|
+
},
|
|
345
|
+
size: "sm",
|
|
346
|
+
theme: "borderless",
|
|
347
|
+
type: "button",
|
|
348
|
+
variant: "primary",
|
|
349
|
+
children: resetLabel
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
}),
|
|
353
|
+
/*#__PURE__*/ jsx("div", {
|
|
354
|
+
className: styles.activeList(),
|
|
355
|
+
children: items.map((item)=>readOnly ? /*#__PURE__*/ jsx("span", {
|
|
356
|
+
className: styles.optionText(),
|
|
357
|
+
children: item.label
|
|
358
|
+
}, item.id) : /*#__PURE__*/ jsx(Button, {
|
|
359
|
+
"aria-label": item.removeLabel,
|
|
360
|
+
"data-filter-id": item.id,
|
|
361
|
+
disabled: disabled,
|
|
362
|
+
icon: "token-icon-close",
|
|
363
|
+
iconPosition: "right",
|
|
364
|
+
onClick: (event)=>{
|
|
365
|
+
trackFocus(event.currentTarget, items.indexOf(item));
|
|
366
|
+
onRemove?.(item.id);
|
|
367
|
+
},
|
|
368
|
+
size: "sm",
|
|
369
|
+
theme: "outlined",
|
|
370
|
+
type: "button",
|
|
371
|
+
variant: "primary",
|
|
372
|
+
children: item.label
|
|
373
|
+
}, item.id))
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
})
|
|
308
377
|
});
|
|
309
378
|
};
|
|
310
379
|
export { FacetFilterPanel };
|