@g4rcez/components 5.0.1 → 5.0.3
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/dist/AnimatePresence-j36AYeOQ.js +181 -0
- package/dist/AnimatePresence-j36AYeOQ.js.map +1 -0
- package/dist/Calendar.es-xICmgvjq.js +23 -0
- package/dist/Calendar.es-xICmgvjq.js.map +1 -0
- package/dist/Funnel.es-DjKVl8Nj.js +23 -0
- package/dist/Funnel.es-DjKVl8Nj.js.map +1 -0
- package/dist/{MotionConfig-DKKYqBH2.js → MotionConfig-CXHoPGbK.js} +2 -2
- package/dist/{MotionConfig-DKKYqBH2.js.map → MotionConfig-CXHoPGbK.js.map} +1 -1
- package/dist/Plus.es-DbyRkEE2.js +23 -0
- package/dist/Plus.es-DbyRkEE2.js.map +1 -0
- package/dist/Trash.es-BFAc8PMf.js +23 -0
- package/dist/Trash.es-BFAc8PMf.js.map +1 -0
- package/dist/{calendar-PCCZDUIL.js → calendar-DEPkz8sw.js} +364 -502
- package/dist/calendar-DEPkz8sw.js.map +1 -0
- package/dist/calendar-header-Dfr-CwkY.js +174 -0
- package/dist/calendar-header-Dfr-CwkY.js.map +1 -0
- package/dist/chunk-jwUa06l-.js +23 -0
- package/dist/components/core/button.d.ts +77 -0
- package/dist/components/core/button.d.ts.map +1 -0
- package/dist/components/core/button.js +1 -1
- package/dist/components/core/button.jsx +79 -0
- package/dist/components/core/heading.d.ts +3 -0
- package/dist/components/core/heading.d.ts.map +1 -0
- package/dist/components/core/heading.js +11 -0
- package/dist/components/core/heading.js.map +1 -0
- package/dist/components/core/heading.jsx +4 -0
- package/dist/components/core/polymorph.d.ts +10 -0
- package/dist/components/core/polymorph.d.ts.map +1 -0
- package/dist/{polymorph-BLXhrn9n.js → components/core/polymorph.js} +2 -2
- package/dist/components/core/polymorph.js.map +1 -0
- package/dist/components/core/polymorph.jsx +5 -0
- package/dist/components/core/render-on-view.d.ts +7 -0
- package/dist/components/core/render-on-view.d.ts.map +1 -0
- package/dist/components/core/render-on-view.js +29 -0
- package/dist/components/core/render-on-view.js.map +1 -0
- package/dist/components/core/render-on-view.jsx +31 -0
- package/dist/components/core/resizable.d.ts +9 -0
- package/dist/components/core/resizable.d.ts.map +1 -0
- package/dist/components/core/resizable.js +60 -0
- package/dist/components/core/resizable.js.map +1 -0
- package/dist/components/core/resizable.jsx +57 -0
- package/dist/components/core/slot.d.ts +16 -0
- package/dist/components/core/slot.d.ts.map +1 -0
- package/dist/{slot-pC8kH9De.js → components/core/slot.js} +2 -2
- package/dist/components/core/slot.js.map +1 -0
- package/dist/components/core/slot.jsx +156 -0
- package/dist/components/core/tag.d.ts +35 -0
- package/dist/components/core/tag.d.ts.map +1 -0
- package/dist/components/core/tag.js +1 -1
- package/dist/components/core/tag.jsx +53 -0
- package/dist/components/core/typography.d.ts +25 -0
- package/dist/components/core/typography.d.ts.map +1 -0
- package/dist/components/core/typography.js +40 -0
- package/dist/components/core/typography.js.map +1 -0
- package/dist/components/core/typography.jsx +20 -0
- package/dist/components/display/alert.d.ts +28 -0
- package/dist/components/display/alert.d.ts.map +1 -0
- package/dist/components/display/alert.js +83 -102
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/alert.jsx +58 -0
- package/dist/components/display/calendar.d.ts +42 -0
- package/dist/components/display/calendar.d.ts.map +1 -0
- package/dist/components/display/calendar.js +1 -1
- package/dist/components/display/calendar.jsx +323 -0
- package/dist/components/display/card.d.ts +29 -0
- package/dist/components/display/card.d.ts.map +1 -0
- package/dist/components/display/card.js +2 -2
- package/dist/components/display/card.jsx +43 -0
- package/dist/components/display/empty.d.ts +8 -0
- package/dist/components/display/empty.d.ts.map +1 -0
- package/dist/components/display/empty.js +25 -0
- package/dist/components/display/empty.js.map +1 -0
- package/dist/components/display/empty.jsx +13 -0
- package/dist/components/display/list.d.ts +16 -0
- package/dist/components/display/list.d.ts.map +1 -0
- package/dist/components/display/list.js +132 -122
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/list.jsx +90 -0
- package/dist/components/display/notifications.d.ts +27 -0
- package/dist/components/display/notifications.d.ts.map +1 -0
- package/dist/components/display/notifications.js +1 -1
- package/dist/components/display/notifications.jsx +132 -0
- package/dist/components/display/progress.d.ts +16 -0
- package/dist/components/display/progress.d.ts.map +1 -0
- package/dist/components/display/progress.js +3 -0
- package/dist/components/display/progress.jsx +19 -0
- package/dist/components/display/shortcut.d.ts +4 -0
- package/dist/components/display/shortcut.d.ts.map +1 -0
- package/dist/components/display/shortcut.js +2 -0
- package/dist/components/display/shortcut.jsx +23 -0
- package/dist/components/display/skeleton.d.ts +12 -0
- package/dist/components/display/skeleton.d.ts.map +1 -0
- package/dist/components/display/skeleton.js +41 -0
- package/dist/components/display/skeleton.js.map +1 -0
- package/dist/components/display/skeleton.jsx +19 -0
- package/dist/components/display/spinner.d.ts +5 -0
- package/dist/components/display/spinner.d.ts.map +1 -0
- package/dist/components/display/spinner.js +17 -0
- package/dist/components/display/spinner.js.map +1 -0
- package/dist/components/display/spinner.jsx +11 -0
- package/dist/components/display/stats.d.ts +12 -0
- package/dist/components/display/stats.d.ts.map +1 -0
- package/dist/components/display/stats.jsx +16 -0
- package/dist/components/display/step.d.ts +24 -0
- package/dist/components/display/step.d.ts.map +1 -0
- package/dist/components/display/step.js +3 -0
- package/dist/components/display/step.jsx +145 -0
- package/dist/components/display/tabs.d.ts +24 -0
- package/dist/components/display/tabs.d.ts.map +1 -0
- package/dist/components/display/tabs.js +1 -1
- package/dist/components/display/tabs.jsx +125 -0
- package/dist/components/display/timeline.d.ts +10 -0
- package/dist/components/display/timeline.d.ts.map +1 -0
- package/dist/components/display/timeline.js +1 -1
- package/dist/components/display/timeline.jsx +25 -0
- package/dist/components/floating/command-palette.d.ts +49 -0
- package/dist/components/floating/command-palette.d.ts.map +1 -0
- package/dist/components/floating/command-palette.js +255 -0
- package/dist/components/floating/command-palette.js.map +1 -0
- package/dist/components/floating/command-palette.jsx +232 -0
- package/dist/components/floating/dropdown.d.ts +15 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -0
- package/dist/components/floating/dropdown.js +1 -1
- package/dist/components/floating/dropdown.js.map +1 -1
- package/dist/components/floating/dropdown.jsx +56 -0
- package/dist/components/floating/expand.d.ts +11 -0
- package/dist/components/floating/expand.d.ts.map +1 -0
- package/dist/components/floating/expand.js +15 -14
- package/dist/components/floating/expand.js.map +1 -1
- package/dist/components/floating/expand.jsx +44 -0
- package/dist/components/floating/menu.d.ts +52 -0
- package/dist/components/floating/menu.d.ts.map +1 -0
- package/dist/components/floating/menu.js +1 -1
- package/dist/components/floating/menu.jsx +165 -0
- package/dist/components/floating/modal.d.ts +63 -0
- package/dist/components/floating/modal.d.ts.map +1 -0
- package/dist/components/floating/modal.js +1 -1
- package/dist/components/floating/modal.jsx +375 -0
- package/dist/components/floating/toolbar.d.ts +6 -0
- package/dist/components/floating/toolbar.d.ts.map +1 -0
- package/dist/components/floating/toolbar.js +20 -0
- package/dist/components/floating/toolbar.js.map +1 -0
- package/dist/components/floating/toolbar.jsx +9 -0
- package/dist/components/floating/tooltip.d.ts +17 -0
- package/dist/components/floating/tooltip.d.ts.map +1 -0
- package/dist/components/floating/tooltip.js +2 -2
- package/dist/components/floating/tooltip.js.map +1 -1
- package/dist/components/floating/tooltip.jsx +67 -0
- package/dist/components/floating/wizard.d.ts +26 -0
- package/dist/components/floating/wizard.d.ts.map +1 -0
- package/dist/components/floating/wizard.js +3 -0
- package/dist/components/floating/wizard.jsx +165 -0
- package/dist/components/form/autocomplete.d.ts +16 -0
- package/dist/components/form/autocomplete.d.ts.map +1 -0
- package/dist/components/form/autocomplete.js +344 -2
- package/dist/components/form/autocomplete.js.map +1 -0
- package/dist/components/form/autocomplete.jsx +299 -0
- package/dist/components/form/checkbox.d.ts +12 -0
- package/dist/components/form/checkbox.d.ts.map +1 -0
- package/dist/components/form/checkbox.js +29 -27
- package/dist/components/form/checkbox.js.map +1 -1
- package/dist/components/form/checkbox.jsx +27 -0
- package/dist/components/form/date-picker.d.ts +10 -0
- package/dist/components/form/date-picker.d.ts.map +1 -0
- package/dist/components/form/date-picker.js +1 -1
- package/dist/components/form/date-picker.jsx +115 -0
- package/dist/components/form/file-upload.d.ts +20 -0
- package/dist/components/form/file-upload.d.ts.map +1 -0
- package/dist/components/form/file-upload.js +1 -1
- package/dist/components/form/file-upload.jsx +160 -0
- package/dist/components/form/form.d.ts +3 -0
- package/dist/components/form/form.d.ts.map +1 -0
- package/dist/components/form/form.jsx +10 -0
- package/dist/components/form/formReset.d.ts +2 -0
- package/dist/components/form/formReset.d.ts.map +1 -0
- package/dist/components/form/formReset.js +10 -0
- package/dist/components/form/formReset.js.map +1 -0
- package/dist/components/form/formReset.jsx +17 -0
- package/dist/components/form/free-text.d.ts +11 -0
- package/dist/components/form/free-text.d.ts.map +1 -0
- package/dist/components/form/free-text.js +70 -0
- package/dist/components/form/free-text.js.map +1 -0
- package/dist/components/form/free-text.jsx +41 -0
- package/dist/components/form/input-field.d.ts +34 -0
- package/dist/components/form/input-field.d.ts.map +1 -0
- package/dist/components/form/input-field.js +3 -0
- package/dist/components/form/input-field.jsx +64 -0
- package/dist/components/form/input.d.ts +52 -0
- package/dist/components/form/input.d.ts.map +1 -0
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/input.jsx +36 -0
- package/dist/components/form/multi-select.d.ts +19 -0
- package/dist/components/form/multi-select.d.ts.map +1 -0
- package/dist/components/form/multi-select.js +420 -0
- package/dist/components/form/multi-select.js.map +1 -0
- package/dist/components/form/multi-select.jsx +352 -0
- package/dist/components/form/radiobox.d.ts +7 -0
- package/dist/components/form/radiobox.d.ts.map +1 -0
- package/dist/components/form/radiobox.jsx +6 -0
- package/dist/components/form/select.d.ts +13 -0
- package/dist/components/form/select.d.ts.map +1 -0
- package/dist/components/form/select.js +55 -51
- package/dist/components/form/select.js.map +1 -1
- package/dist/components/form/select.jsx +47 -0
- package/dist/components/form/slider.d.ts +7 -0
- package/dist/components/form/slider.d.ts.map +1 -0
- package/dist/components/form/slider.js +3 -0
- package/dist/components/form/slider.jsx +45 -0
- package/dist/components/form/switch.d.ts +10 -0
- package/dist/components/form/switch.d.ts.map +1 -0
- package/dist/components/form/switch.js +32 -26
- package/dist/components/form/switch.js.map +1 -1
- package/dist/components/form/switch.jsx +59 -0
- package/dist/components/form/task-list.d.ts +3 -0
- package/dist/components/form/task-list.d.ts.map +1 -0
- package/dist/components/form/task-list.jsx +26 -0
- package/dist/components/form/textarea.d.ts +5 -0
- package/dist/components/form/textarea.d.ts.map +1 -0
- package/dist/components/form/textarea.js +19 -0
- package/dist/components/form/textarea.js.map +1 -0
- package/dist/components/form/textarea.jsx +26 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +44 -0
- package/dist/components/page-calendar/calendar-header.d.ts +16 -0
- package/dist/components/page-calendar/calendar-header.d.ts.map +1 -0
- package/dist/components/page-calendar/calendar-header.js +2 -0
- package/dist/components/page-calendar/calendar-header.jsx +85 -0
- package/dist/components/page-calendar/day-view.d.ts +12 -0
- package/dist/components/page-calendar/day-view.d.ts.map +1 -0
- package/dist/components/page-calendar/day-view.js +124 -0
- package/dist/components/page-calendar/day-view.js.map +1 -0
- package/dist/components/page-calendar/day-view.jsx +89 -0
- package/dist/components/page-calendar/event-pill.d.ts +9 -0
- package/dist/components/page-calendar/event-pill.d.ts.map +1 -0
- package/dist/components/page-calendar/event-pill.js +44 -0
- package/dist/components/page-calendar/event-pill.js.map +1 -0
- package/dist/components/page-calendar/event-pill.jsx +25 -0
- package/dist/components/page-calendar/index.d.ts +4 -0
- package/dist/components/page-calendar/index.d.ts.map +1 -0
- package/dist/components/page-calendar/index.js +2 -0
- package/dist/components/page-calendar/month-view.d.ts +11 -0
- package/dist/components/page-calendar/month-view.d.ts.map +1 -0
- package/dist/components/page-calendar/month-view.js +109 -0
- package/dist/components/page-calendar/month-view.js.map +1 -0
- package/dist/components/page-calendar/month-view.jsx +93 -0
- package/dist/components/page-calendar/page-calendar.d.ts +18 -0
- package/dist/components/page-calendar/page-calendar.d.ts.map +1 -0
- package/dist/components/page-calendar/page-calendar.js +75 -0
- package/dist/components/page-calendar/page-calendar.js.map +1 -0
- package/dist/components/page-calendar/page-calendar.jsx +41 -0
- package/dist/components/page-calendar/page-calendar.types.d.ts +18 -0
- package/dist/components/page-calendar/page-calendar.types.d.ts.map +1 -0
- package/dist/components/page-calendar/page-calendar.types.js +1 -0
- package/dist/components/page-calendar/page-calendar.utils.d.ts +24 -0
- package/dist/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
- package/dist/components/page-calendar/page-calendar.utils.js +93 -0
- package/dist/components/page-calendar/week-view.d.ts +11 -0
- package/dist/components/page-calendar/week-view.d.ts.map +1 -0
- package/dist/components/page-calendar/week-view.js +88 -0
- package/dist/components/page-calendar/week-view.js.map +1 -0
- package/dist/components/page-calendar/week-view.jsx +66 -0
- package/dist/components/table/filter.d.ts +42 -0
- package/dist/components/table/filter.d.ts.map +1 -0
- package/dist/components/table/filter.js +239 -0
- package/dist/components/table/filter.js.map +1 -0
- package/dist/components/table/filter.jsx +174 -0
- package/dist/components/table/group.d.ts +17 -0
- package/dist/components/table/group.d.ts.map +1 -0
- package/dist/components/table/group.js +3 -0
- package/dist/components/table/group.jsx +77 -0
- package/dist/components/table/index.d.ts +19 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +102 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/index.jsx +63 -0
- package/dist/components/table/inner-table.d.ts +29 -0
- package/dist/components/table/inner-table.d.ts.map +1 -0
- package/dist/components/table/inner-table.js +2 -0
- package/dist/components/table/inner-table.jsx +102 -0
- package/dist/components/table/metadata.d.ts +4 -0
- package/dist/components/table/metadata.d.ts.map +1 -0
- package/dist/components/table/metadata.js +73 -0
- package/dist/components/table/metadata.js.map +1 -0
- package/dist/components/table/metadata.jsx +36 -0
- package/dist/components/table/pagination.d.ts +5 -0
- package/dist/components/table/pagination.d.ts.map +1 -0
- package/dist/components/table/pagination.js +70 -0
- package/dist/components/table/pagination.js.map +1 -0
- package/dist/components/table/pagination.jsx +74 -0
- package/dist/components/table/row.d.ts +11 -0
- package/dist/components/table/row.d.ts.map +1 -0
- package/dist/components/table/row.js +58 -0
- package/dist/components/table/row.js.map +1 -0
- package/dist/components/table/row.jsx +49 -0
- package/dist/components/table/sort.d.ts +28 -0
- package/dist/components/table/sort.d.ts.map +1 -0
- package/dist/components/table/sort.js +3 -0
- package/dist/components/table/sort.jsx +111 -0
- package/dist/components/table/table-lib.d.ts +135 -0
- package/dist/components/table/table-lib.d.ts.map +1 -0
- package/dist/components/table/table-lib.js +83 -0
- package/dist/components/table/table.context.d.ts +10 -0
- package/dist/components/table/table.context.d.ts.map +1 -0
- package/dist/components/table/table.context.jsx +5 -0
- package/dist/components/table/thead.d.ts +9 -0
- package/dist/components/table/thead.d.ts.map +1 -0
- package/dist/components/table/thead.js +3 -0
- package/dist/components/table/thead.jsx +103 -0
- package/dist/config/context.d.ts +21 -0
- package/dist/config/context.d.ts.map +1 -0
- package/dist/config/context.js +12 -0
- package/dist/config/default-translations.d.ts +112 -0
- package/dist/config/default-translations.d.ts.map +1 -0
- package/dist/config/default-translations.jsx +105 -0
- package/dist/config/default-tweaks.d.ts +13 -0
- package/dist/config/default-tweaks.d.ts.map +1 -0
- package/dist/config/default-tweaks.js +4 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +2 -0
- package/dist/{use-translations-DTLfPE3_.js → context-CsnUsfeP.js} +55 -40
- package/dist/context-CsnUsfeP.js.map +1 -0
- package/dist/{date-picker-BhKEFZew.js → date-picker-DNzupG8R.js} +301 -317
- package/dist/date-picker-DNzupG8R.js.map +1 -0
- package/dist/dict-CisoYSMO.js +28 -0
- package/dist/dict-CisoYSMO.js.map +1 -0
- package/dist/dist-ChfJ5LO9.js +498 -0
- package/dist/dist-ChfJ5LO9.js.map +1 -0
- package/dist/{dist-BrGpYRaj.js → dist-DIjUECx9.js} +56 -56
- package/dist/{dist-BrGpYRaj.js.map → dist-DIjUECx9.js.map} +1 -1
- package/dist/dom-Bn4wY_Zx.js.map +1 -1
- package/dist/{file-upload-DWbZfeG5.js → file-upload-C2zNnv9n.js} +501 -481
- package/dist/{file-upload-DWbZfeG5.js.map → file-upload-C2zNnv9n.js.map} +1 -1
- package/dist/fzf-CPGDDCoU.js +64 -0
- package/dist/fzf-CPGDDCoU.js.map +1 -0
- package/dist/getISOWeek-EcB4Ebqp.js +72 -0
- package/dist/getISOWeek-EcB4Ebqp.js.map +1 -0
- package/dist/group-Dl14TJXO.js +222 -0
- package/dist/group-Dl14TJXO.js.map +1 -0
- package/dist/hooks/use-click-outside.d.ts +3 -0
- package/dist/hooks/use-click-outside.d.ts.map +1 -0
- package/dist/hooks/use-click-outside.js +17 -0
- package/dist/hooks/use-color-parser.d.ts +2 -0
- package/dist/hooks/use-color-parser.d.ts.map +1 -0
- package/dist/hooks/use-color-parser.js +9 -0
- package/dist/hooks/use-components-provider.d.ts +15 -0
- package/dist/hooks/use-components-provider.d.ts.map +1 -0
- package/dist/hooks/use-components-provider.jsx +22 -0
- package/dist/hooks/use-debounce.d.ts +5 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-debounce.js +12 -0
- package/dist/hooks/use-floating-ref.d.ts +2 -0
- package/dist/hooks/use-floating-ref.d.ts.map +1 -0
- package/dist/hooks/use-floating-ref.js +6 -0
- package/dist/hooks/use-form.d.ts +394 -0
- package/dist/hooks/use-form.d.ts.map +1 -0
- package/dist/hooks/use-form.js +563 -0
- package/dist/hooks/use-hover.d.ts +3 -0
- package/dist/hooks/use-hover.d.ts.map +1 -0
- package/dist/hooks/use-hover.js +18 -0
- package/dist/hooks/use-input-id.d.ts +4 -0
- package/dist/hooks/use-input-id.d.ts.map +1 -0
- package/dist/hooks/use-input-id.js +5 -0
- package/dist/hooks/use-is-coarse-device.d.ts +2 -0
- package/dist/hooks/use-is-coarse-device.d.ts.map +1 -0
- package/dist/hooks/use-is-coarse-device.js +12 -0
- package/dist/hooks/use-locale.d.ts +3 -0
- package/dist/hooks/use-locale.d.ts.map +1 -0
- package/dist/hooks/use-locale.js +10 -0
- package/dist/hooks/use-media-query.d.ts +2 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +25 -0
- package/dist/hooks/use-on-event.d.ts +4 -0
- package/dist/hooks/use-on-event.d.ts.map +1 -0
- package/dist/hooks/use-on-event.js +10 -0
- package/dist/hooks/use-parent.d.ts +3 -0
- package/dist/hooks/use-parent.d.ts.map +1 -0
- package/dist/hooks/use-parent.js +21 -0
- package/dist/hooks/use-preferences.d.ts +2 -0
- package/dist/hooks/use-preferences.d.ts.map +1 -0
- package/dist/hooks/use-preferences.js +23 -0
- package/dist/hooks/use-previous.d.ts +2 -0
- package/dist/hooks/use-previous.d.ts.map +1 -0
- package/dist/hooks/use-previous.js +9 -0
- package/dist/hooks/use-reactive.d.ts +2 -0
- package/dist/hooks/use-reactive.d.ts.map +1 -0
- package/dist/hooks/use-reactive.js +9 -0
- package/dist/hooks/use-remove-scroll.d.ts +4 -0
- package/dist/hooks/use-remove-scroll.d.ts.map +1 -0
- package/dist/hooks/use-remove-scroll.js +48 -0
- package/dist/hooks/use-resize-observer.d.ts +2 -0
- package/dist/hooks/use-resize-observer.d.ts.map +1 -0
- package/dist/hooks/use-resize-observer.js +17 -0
- package/dist/hooks/use-stable-ref.d.ts +2 -0
- package/dist/hooks/use-stable-ref.d.ts.map +1 -0
- package/dist/hooks/use-stable-ref.js +9 -0
- package/dist/hooks/use-swipe.d.ts +8 -0
- package/dist/hooks/use-swipe.d.ts.map +1 -0
- package/dist/hooks/use-swipe.js +17 -0
- package/dist/hooks/use-translations.d.ts +110 -0
- package/dist/hooks/use-translations.d.ts.map +1 -0
- package/dist/hooks/use-translations.js +9 -0
- package/dist/hooks/use-tweaks.d.ts +3 -0
- package/dist/hooks/use-tweaks.d.ts.map +1 -0
- package/dist/hooks/use-tweaks.js +9 -0
- package/dist/hooks/use-window-size.d.ts +5 -0
- package/dist/hooks/use-window-size.d.ts.map +1 -0
- package/dist/hooks/use-window-size.js +14 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -7932
- package/dist/index.js.map +1 -1
- package/dist/inner-table-CeDX60cL.js +151 -0
- package/dist/inner-table-CeDX60cL.js.map +1 -0
- package/dist/input-Cmyuea4Y.js +412 -0
- package/dist/input-Cmyuea4Y.js.map +1 -0
- package/dist/{input-field-B_whI66Q.js → input-field-ffx1MbHo.js} +29 -16
- package/dist/input-field-ffx1MbHo.js.map +1 -0
- package/dist/isSameMonth-C3lsSwcg.js +10 -0
- package/dist/isSameMonth-C3lsSwcg.js.map +1 -0
- package/dist/isToday-COXfxFui.js +32 -0
- package/dist/isToday-COXfxFui.js.map +1 -0
- package/dist/lib/combi-keys.d.ts +15 -0
- package/dist/lib/combi-keys.d.ts.map +1 -0
- package/dist/lib/combi-keys.js +60 -0
- package/dist/lib/dict.d.ts +9 -0
- package/dist/lib/dict.d.ts.map +1 -0
- package/dist/lib/dict.js +28 -0
- package/dist/lib/dom.d.ts +20 -0
- package/dist/lib/dom.d.ts.map +1 -0
- package/dist/lib/dom.js +185 -0
- package/dist/lib/fns.d.ts +11 -0
- package/dist/lib/fns.d.ts.map +1 -0
- package/dist/lib/fns.js +46 -0
- package/dist/lib/fzf.d.ts +16 -0
- package/dist/lib/fzf.d.ts.map +1 -0
- package/dist/lib/fzf.js +115 -0
- package/dist/lib/keyboard-area.d.ts +16 -0
- package/dist/lib/keyboard-area.d.ts.map +1 -0
- package/dist/lib/keyboard-area.js +14 -0
- package/dist/modal-Df8-6i-o.js +408 -0
- package/dist/modal-Df8-6i-o.js.map +1 -0
- package/dist/notifications-NhCESJUV.js +1697 -0
- package/dist/notifications-NhCESJUV.js.map +1 -0
- package/dist/page-calendar.utils-Bd0PHktL.js +102 -0
- package/dist/page-calendar.utils-Bd0PHktL.js.map +1 -0
- package/dist/preset/preset.tailwind.d.ts.map +1 -1
- package/dist/preset/preset.tailwind.js +6 -7
- package/dist/preset/src/styles/dark.js +1 -1
- package/dist/progress-8LO5gWLp.js +104 -0
- package/dist/progress-8LO5gWLp.js.map +1 -0
- package/dist/{proxy-BcJ_5Dwq.js → proxy-fP2NxmhM.js} +658 -844
- package/dist/proxy-fP2NxmhM.js.map +1 -0
- package/dist/shim-Czv-YhKR.js +93 -0
- package/dist/shim-Czv-YhKR.js.map +1 -0
- package/dist/shortcut-CQCmgmlU.js +100 -0
- package/dist/shortcut-CQCmgmlU.js.map +1 -0
- package/dist/slider-TX9hiHO-.js +1196 -0
- package/dist/slider-TX9hiHO-.js.map +1 -0
- package/dist/sort-DGmiselV.js +195 -0
- package/dist/sort-DGmiselV.js.map +1 -0
- package/dist/step-DFpJ7zCG.js +185 -0
- package/dist/step-DFpJ7zCG.js.map +1 -0
- package/dist/styles/dark.js +1 -1
- package/dist/subMonths-QcCnE3Yh.js +43 -0
- package/dist/subMonths-QcCnE3Yh.js.map +1 -0
- package/dist/table-lib-1bkYSklk.js +174 -0
- package/dist/table-lib-1bkYSklk.js.map +1 -0
- package/dist/{tabs-Ciy0l9OF.js → tabs-Brc963EW.js} +2 -2
- package/dist/{tabs-Ciy0l9OF.js.map → tabs-Brc963EW.js.map} +1 -1
- package/dist/thead-B6WELJZ-.js +211 -0
- package/dist/thead-B6WELJZ-.js.map +1 -0
- package/dist/types.d.ts +26 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/use-locale-DPM_sg4s.js +12 -0
- package/dist/use-locale-DPM_sg4s.js.map +1 -0
- package/dist/use-remove-scroll-pAgC09Sq.js +38 -0
- package/dist/use-remove-scroll-pAgC09Sq.js.map +1 -0
- package/dist/use-translations-BE4PuhLm.js +11 -0
- package/dist/use-translations-BE4PuhLm.js.map +1 -0
- package/dist/useAnimationFrame-DnKbaXfi.js +223 -0
- package/dist/useAnimationFrame-DnKbaXfi.js.map +1 -0
- package/dist/valueToPercent-DZc_m1tm.js +43 -0
- package/dist/valueToPercent-DZc_m1tm.js.map +1 -0
- package/dist/visuallyHidden-B7wI86yi.js +303 -0
- package/dist/visuallyHidden-B7wI86yi.js.map +1 -0
- package/dist/with-selector-BFW5n-pb.js +102 -0
- package/dist/with-selector-BFW5n-pb.js.map +1 -0
- package/dist/wizard-7u_qZ-78.js +218 -0
- package/dist/wizard-7u_qZ-78.js.map +1 -0
- package/package.json +19 -11
- package/dist/autocomplete-D3VOTihi.js +0 -415
- package/dist/autocomplete-D3VOTihi.js.map +0 -1
- package/dist/calendar-PCCZDUIL.js.map +0 -1
- package/dist/components/table/table.js +0 -3
- package/dist/date-picker-BhKEFZew.js.map +0 -1
- package/dist/input-B7jqwPG4.js +0 -473
- package/dist/input-B7jqwPG4.js.map +0 -1
- package/dist/input-field-B_whI66Q.js.map +0 -1
- package/dist/modal-Bz-61ays.js +0 -373
- package/dist/modal-Bz-61ays.js.map +0 -1
- package/dist/notifications-MT4XkLov.js +0 -2203
- package/dist/notifications-MT4XkLov.js.map +0 -1
- package/dist/polymorph-BLXhrn9n.js.map +0 -1
- package/dist/proxy-BcJ_5Dwq.js.map +0 -1
- package/dist/skeleton-CBYEq3lM.js +0 -26
- package/dist/skeleton-CBYEq3lM.js.map +0 -1
- package/dist/slot-pC8kH9De.js.map +0 -1
- package/dist/table-CUFbAI2k.js +0 -1914
- package/dist/table-CUFbAI2k.js.map +0 -1
- package/dist/use-translations-DTLfPE3_.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropsWithoutRef } from "react";
|
|
2
|
+
import { Label } from "../../types";
|
|
3
|
+
type ProgressProps = {
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
value?: number;
|
|
7
|
+
/** @deprecated use value */
|
|
8
|
+
percent?: number;
|
|
9
|
+
label?: Label;
|
|
10
|
+
className?: string;
|
|
11
|
+
container?: string;
|
|
12
|
+
textClassName?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const Progress: (props: PropsWithoutRef<ProgressProps>) => import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/display/progress.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,KAAK,aAAa,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAIF,eAAO,MAAM,QAAQ,GAAI,OAAO,eAAe,CAAC,aAAa,CAAC,gCA6B7D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Is } from "sidekicker";
|
|
3
|
+
import { Progress as RadixProgress } from "@base-ui/react/progress";
|
|
4
|
+
import { css } from "../../lib/dom";
|
|
5
|
+
const clamp = (n, min, max) => Math.min(Math.max(n, min), max);
|
|
6
|
+
export const Progress = (props) => {
|
|
7
|
+
const min = props.min ?? 0;
|
|
8
|
+
const max = props.max ?? 100;
|
|
9
|
+
const range = max - min;
|
|
10
|
+
const rawValue = props.value ?? props.percent;
|
|
11
|
+
const hasValue = Is.number(rawValue) && range > 0;
|
|
12
|
+
const percent = hasValue ? clamp(((rawValue - min) / range) * 100, 0, 100) : null;
|
|
13
|
+
return (<RadixProgress.Root min={min} max={max} value={hasValue ? rawValue : null} style={{ transform: "translateZ(0)" }} className={css("relative h-progress-track-h w-full overflow-hidden rounded-progress-radius bg-background", props.container)}>
|
|
14
|
+
<RadixProgress.Indicator className={css("h-full bg-primary transition-[width] duration-500 ease-in-out", props.className)}/>
|
|
15
|
+
{percent !== null ? (<p className={css("absolute inset-0 flex w-full items-center justify-center font-semibold tabular-nums text-primary-foreground", props.textClassName)}>
|
|
16
|
+
{props.label ? props.label : `${Math.round(percent)} %`}
|
|
17
|
+
</p>) : null}
|
|
18
|
+
</RadixProgress.Root>);
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut.d.ts","sourceRoot":"","sources":["../../../src/components/display/shortcut.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,QAAQ,GAAI,OAAO;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,gCAehD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CommandIcon, OptionIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { Fragment } from "react";
|
|
3
|
+
import { isMac } from "../../lib/combi-keys";
|
|
4
|
+
const remap = (x) => {
|
|
5
|
+
x = x.trim();
|
|
6
|
+
if (x === "Alt")
|
|
7
|
+
return isMac() ? <OptionIcon aria-label="Option" size={12}/> : "Alt";
|
|
8
|
+
if (x === "Mod")
|
|
9
|
+
return isMac() ? <CommandIcon aria-label="Command" size={12}/> : "Ctrl";
|
|
10
|
+
return x;
|
|
11
|
+
};
|
|
12
|
+
export const Shortcut = (props) => {
|
|
13
|
+
const p = props.value.trim().split("+");
|
|
14
|
+
return (<span className="flex items-center gap-shortcut-gap text-shortcut-text">
|
|
15
|
+
{p.map((x, i) => {
|
|
16
|
+
const isLast = p.length - 1 === i;
|
|
17
|
+
return (<Fragment key={`${props.value}-${x}-key-${i}`}>
|
|
18
|
+
<kbd aria-label={x}>{remap(x)}</kbd>
|
|
19
|
+
{isLast ? null : <span>+</span>}
|
|
20
|
+
</Fragment>);
|
|
21
|
+
})}
|
|
22
|
+
</span>);
|
|
23
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { CSSProperties, type ElementType } from "react";
|
|
2
|
+
export declare const SkeletonCell: React.JSX.Element;
|
|
3
|
+
export declare const Skeleton: (props: {
|
|
4
|
+
className?: string;
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export declare const SkeletonList: (props: {
|
|
9
|
+
className?: string;
|
|
10
|
+
rows: number;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/display/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAU,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAKvE,eAAO,MAAM,YAAY,mBAOxB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,sBAY9F,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,sBAavE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { t as e } from "../../dom-Bn4wY_Zx.js";
|
|
2
|
+
import { Polymorph as t } from "../core/polymorph.js";
|
|
3
|
+
import { t as n } from "../../use-translations-BE4PuhLm.js";
|
|
4
|
+
import { useRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/display/skeleton.tsx
|
|
7
|
+
var a = /* @__PURE__ */ i("div", {
|
|
8
|
+
role: "status",
|
|
9
|
+
"aria-busy": "true",
|
|
10
|
+
"aria-label": "Loading content",
|
|
11
|
+
className: "h-skeleton-cell-h w-10/12 animate-pulse rounded-skeleton-radius bg-muted"
|
|
12
|
+
}), o = (r) => {
|
|
13
|
+
let a = n();
|
|
14
|
+
return /* @__PURE__ */ i(t, {
|
|
15
|
+
...r,
|
|
16
|
+
role: "status",
|
|
17
|
+
"aria-busy": "true",
|
|
18
|
+
"aria-label": a.skeletonLoading,
|
|
19
|
+
as: r.as || "span",
|
|
20
|
+
className: e("block h-skeleton-height w-skeleton-width animate-pulse rounded-skeleton-radius bg-muted", r.className)
|
|
21
|
+
});
|
|
22
|
+
}, s = (t) => {
|
|
23
|
+
let a = n(), s = r(Array.from({ length: t.rows }).map((e, t) => {
|
|
24
|
+
let n = Math.max(100, Math.random() * 99);
|
|
25
|
+
return /* @__PURE__ */ i(o, {
|
|
26
|
+
style: { width: `${n}%` },
|
|
27
|
+
as: "li"
|
|
28
|
+
}, `skeleton-${n}-${t}`);
|
|
29
|
+
}));
|
|
30
|
+
return /* @__PURE__ */ i("ul", {
|
|
31
|
+
role: "status",
|
|
32
|
+
"aria-busy": "true",
|
|
33
|
+
"aria-label": a.skeletonLoading,
|
|
34
|
+
className: e("flex flex-col gap-skeleton-list-gap", t.className),
|
|
35
|
+
children: s.current
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { o as Skeleton, a as SkeletonCell, s as SkeletonList };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","names":[],"sources":["../../../src/components/display/skeleton.tsx"],"sourcesContent":["import React, { CSSProperties, useRef, type ElementType } from \"react\";\nimport { useTranslations } from \"../../hooks/use-translations\";\nimport { css } from \"../../lib/dom\";\nimport { Polymorph } from \"../core/polymorph\";\n\nexport const SkeletonCell = (\n <div\n role=\"status\"\n aria-busy=\"true\"\n aria-label=\"Loading content\"\n className=\"h-skeleton-cell-h w-10/12 animate-pulse rounded-skeleton-radius bg-muted\"\n />\n);\n\nexport const Skeleton = (props: { className?: string; as?: ElementType; style?: CSSProperties }) => {\n const t = useTranslations();\n return (\n <Polymorph\n {...props}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={t.skeletonLoading}\n as={props.as || \"span\"}\n className={css(\"block h-skeleton-height w-skeleton-width animate-pulse rounded-skeleton-radius bg-muted\", props.className)}\n />\n );\n};\n\nexport const SkeletonList = (props: { className?: string; rows: number }) => {\n const t = useTranslations();\n const items = useRef(\n Array.from({ length: props.rows }).map((_, i) => {\n const rand = Math.max(100, Math.random() * 99);\n return <Skeleton key={`skeleton-${rand}-${i}`} style={{ width: `${rand}%` }} as=\"li\" />;\n })\n );\n return (\n <ul role=\"status\" aria-busy=\"true\" aria-label={t.skeletonLoading} className={css(\"flex flex-col gap-skeleton-list-gap\", props.className)}>\n {items.current}\n </ul>\n );\n};\n"],"mappings":";;;;;;AAKA,IAAa,IACT,kBAAC,OAAD;CACI,MAAK;CACL,aAAU;CACV,cAAW;CACX,WAAU;AACb,CAAA,GAGQ,KAAY,MAA2E;CAChG,IAAM,IAAI,EAAgB;CAC1B,OACI,kBAAC,GAAD;EACI,GAAI;EACJ,MAAK;EACL,aAAU;EACV,cAAY,EAAE;EACd,IAAI,EAAM,MAAM;EAChB,WAAW,EAAI,2FAA2F,EAAM,SAAS;CAC5H,CAAA;AAET,GAEa,KAAgB,MAAgD;CACzE,IAAM,IAAI,EAAgB,GACpB,IAAQ,EACV,MAAM,KAAK,EAAE,QAAQ,EAAM,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM;EAC7C,IAAM,IAAO,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,EAAE;EAC7C,OAAO,kBAAC,GAAD;GAAwC,OAAO,EAAE,OAAO,GAAG,EAAK,GAAG;GAAG,IAAG;EAAM,GAAhE,YAAY,EAAK,GAAG,GAA4C;CAC1F,CAAC,CACL;CACA,OACI,kBAAC,MAAD;EAAI,MAAK;EAAS,aAAU;EAAO,cAAY,EAAE;EAAiB,WAAW,EAAI,uCAAuC,EAAM,SAAS;YAClI,EAAM;CACP,CAAA;AAEZ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { useRef } from "react";
|
|
2
|
+
import { useTranslations } from "../../hooks/use-translations";
|
|
3
|
+
import { css } from "../../lib/dom";
|
|
4
|
+
import { Polymorph } from "../core/polymorph";
|
|
5
|
+
export const SkeletonCell = (<div role="status" aria-busy="true" aria-label="Loading content" className="h-skeleton-cell-h w-10/12 animate-pulse rounded-skeleton-radius bg-muted"/>);
|
|
6
|
+
export const Skeleton = (props) => {
|
|
7
|
+
const t = useTranslations();
|
|
8
|
+
return (<Polymorph {...props} role="status" aria-busy="true" aria-label={t.skeletonLoading} as={props.as || "span"} className={css("block h-skeleton-height w-skeleton-width animate-pulse rounded-skeleton-radius bg-muted", props.className)}/>);
|
|
9
|
+
};
|
|
10
|
+
export const SkeletonList = (props) => {
|
|
11
|
+
const t = useTranslations();
|
|
12
|
+
const items = useRef(Array.from({ length: props.rows }).map((_, i) => {
|
|
13
|
+
const rand = Math.max(100, Math.random() * 99);
|
|
14
|
+
return <Skeleton key={`skeleton-${rand}-${i}`} style={{ width: `${rand}%` }} as="li"/>;
|
|
15
|
+
}));
|
|
16
|
+
return (<ul role="status" aria-busy="true" aria-label={t.skeletonLoading} className={css("flex flex-col gap-skeleton-list-gap", props.className)}>
|
|
17
|
+
{items.current}
|
|
18
|
+
</ul>);
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,GAAI,OAAO;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,gCAapD,CAAC;AAEF,eAAO,MAAM,OAAO,mCAMnB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as e } from "../../dom-Bn4wY_Zx.js";
|
|
2
|
+
import { t } from "../../use-translations-BE4PuhLm.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/display/spinner.tsx
|
|
5
|
+
var r = (r) => /* @__PURE__ */ n("span", {
|
|
6
|
+
role: "status",
|
|
7
|
+
"aria-live": "polite",
|
|
8
|
+
"aria-label": t().spinnerLoading,
|
|
9
|
+
className: e("box-border inline-block aspect-square size-spinner-size animate-spin rounded-full border-spinner-border border-background border-b-primary", r.className)
|
|
10
|
+
}), i = () => /* @__PURE__ */ n("div", {
|
|
11
|
+
className: "flex h-full w-full items-center justify-center p-spinner-container-p",
|
|
12
|
+
children: /* @__PURE__ */ n(r, {})
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as Loading, r as Spinner };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","names":[],"sources":["../../../src/components/display/spinner.tsx"],"sourcesContent":["import { useTranslations } from \"../../hooks/use-translations\";\nimport { css } from \"../../lib/dom\";\n\nexport const Spinner = (props: { className?: string }) => {\n const t = useTranslations();\n return (\n <span\n role=\"status\"\n aria-live=\"polite\"\n aria-label={t.spinnerLoading}\n className={css(\n \"box-border inline-block aspect-square size-spinner-size animate-spin rounded-full border-spinner-border border-background border-b-primary\",\n props.className\n )}\n />\n );\n};\n\nexport const Loading = () => {\n return (\n <div className=\"flex h-full w-full items-center justify-center p-spinner-container-p\">\n <Spinner />\n </div>\n );\n};\n"],"mappings":";;;;AAGA,IAAa,KAAW,MAGhB,kBAAC,QAAD;CACI,MAAK;CACL,aAAU;CACV,cALE,EAKU,EAAE;CACd,WAAW,EACP,8IACA,EAAM,SACV;AACH,CAAA,GAII,UAEL,kBAAC,OAAD;CAAK,WAAU;WACX,kBAAC,GAAD,CAAU,CAAA;AACT,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useTranslations } from "../../hooks/use-translations";
|
|
2
|
+
import { css } from "../../lib/dom";
|
|
3
|
+
export const Spinner = (props) => {
|
|
4
|
+
const t = useTranslations();
|
|
5
|
+
return (<span role="status" aria-live="polite" aria-label={t.spinnerLoading} className={css("box-border inline-block aspect-square size-spinner-size animate-spin rounded-full border-spinner-border border-background border-b-primary", props.className)}/>);
|
|
6
|
+
};
|
|
7
|
+
export const Loading = () => {
|
|
8
|
+
return (<div className="flex h-full w-full items-center justify-center p-spinner-container-p">
|
|
9
|
+
<Spinner />
|
|
10
|
+
</div>);
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Label } from "../../types";
|
|
3
|
+
export type StatsProps = {
|
|
4
|
+
title: Label;
|
|
5
|
+
iconContainer?: string;
|
|
6
|
+
footer?: React.ReactElement;
|
|
7
|
+
Icon: React.FC<{
|
|
8
|
+
className: string;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
export declare const Stats: (props: React.PropsWithChildren<StatsProps>) => React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/components/display/stats.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,MAAM,UAAU,GAAG;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,sBAe/D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { css } from "../../lib/dom";
|
|
3
|
+
export const Stats = (props) => {
|
|
4
|
+
return (<div className="divide-y divide-card-border overflow-hidden rounded-stats-radius border border-card-border bg-card-background shadow-shadow-card">
|
|
5
|
+
<header className="flex items-stretch gap-stats-gap">
|
|
6
|
+
<div className={css("flex shrink-0 items-center justify-center bg-primary p-stats-icon-p", props.iconContainer)}>
|
|
7
|
+
<props.Icon className="aspect-square size-stats-icon-size text-primary-foreground"/>
|
|
8
|
+
</div>
|
|
9
|
+
<div className="flex flex-col justify-center gap-stats-inner-gap py-stats-p pr-stats-p">
|
|
10
|
+
<h3 className="text-typography-base leading-none">{props.title}</h3>
|
|
11
|
+
<p className="text-stats-value-text font-semibold">{props.children}</p>
|
|
12
|
+
</div>
|
|
13
|
+
</header>
|
|
14
|
+
{props.footer ? <footer className="px-stats-footer-px py-stats-footer-py">{props.footer}</footer> : null}
|
|
15
|
+
</div>);
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
import { Label } from "../../types";
|
|
3
|
+
type StepContextValue = {
|
|
4
|
+
currentStep: number;
|
|
5
|
+
previousStep: number;
|
|
6
|
+
progressBarDuration: number;
|
|
7
|
+
steps: number;
|
|
8
|
+
};
|
|
9
|
+
type StepStatus = "active" | "inactive" | "complete" | "error";
|
|
10
|
+
export type StepProps = React.ComponentProps<"button"> & {
|
|
11
|
+
step: number;
|
|
12
|
+
title?: Label;
|
|
13
|
+
currentStep: number;
|
|
14
|
+
status?: StepStatus;
|
|
15
|
+
titleClassName?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const useStepContext: () => StepContextValue | null;
|
|
18
|
+
export declare const Step: ({ step, currentStep, status, title, titleClassName, ...props }: StepProps) => React.JSX.Element;
|
|
19
|
+
export declare const Steps: (props: PropsWithChildren<{
|
|
20
|
+
steps: number;
|
|
21
|
+
currentStep: number;
|
|
22
|
+
}>) => React.JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/components/display/step.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA2C,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAEnI,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAUpC,KAAK,gBAAgB,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AA8CF,KAAK,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAgCF,eAAO,MAAM,cAAc,+BAAgC,CAAC;AAE5D,eAAO,MAAM,IAAI,GAAI,gEAAgE,SAAS,sBA8F7F,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,sBA0BrF,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { motion } from "motion/react";
|
|
3
|
+
import React, { createContext, Fragment, useContext, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { useColorParser } from "../../hooks/use-color-parser";
|
|
5
|
+
const PROGRESS_BAR_DURATION = 0.3;
|
|
6
|
+
const transition = {
|
|
7
|
+
duration: PROGRESS_BAR_DURATION,
|
|
8
|
+
type: "tween",
|
|
9
|
+
ease: "easeInOut",
|
|
10
|
+
};
|
|
11
|
+
const StepContext = createContext(null);
|
|
12
|
+
const iconTransitions = {
|
|
13
|
+
delay: 0.2,
|
|
14
|
+
duration: 0.3,
|
|
15
|
+
type: "tween",
|
|
16
|
+
ease: "easeOut",
|
|
17
|
+
};
|
|
18
|
+
const states = {
|
|
19
|
+
initial: { pathLength: 0, opacity: 0 },
|
|
20
|
+
animate: { pathLength: 1, opacity: 1 },
|
|
21
|
+
};
|
|
22
|
+
const ErrorIcon = (props) => (<svg {...props} aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
23
|
+
<motion.path className="currentColor" initial={states.initial} animate={states.animate} transition={iconTransitions} d="M18 6 6 18"/>
|
|
24
|
+
<motion.path className="currentColor" initial={states.initial} animate={states.animate} transition={iconTransitions} d="m6 6 12 12"/>
|
|
25
|
+
</svg>);
|
|
26
|
+
const CheckIcon = (props) => (<svg {...props} aria-hidden="true" focusable="false" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={3}>
|
|
27
|
+
<motion.path d="M5 13l4 4L19 7" strokeLinecap="round" strokeLinejoin="round" animate={states.animate} initial={states.initial} transition={iconTransitions}/>
|
|
28
|
+
</svg>);
|
|
29
|
+
const variants = {
|
|
30
|
+
complete: { scale: 1.25 },
|
|
31
|
+
active: { scale: 1, transition: { delay: 0, duration: 0.3 } },
|
|
32
|
+
};
|
|
33
|
+
const transitions = {
|
|
34
|
+
duration: 0.6,
|
|
35
|
+
delay: 0.2,
|
|
36
|
+
type: "tween",
|
|
37
|
+
ease: "circOut",
|
|
38
|
+
};
|
|
39
|
+
const getCurrentStatus = (step, currentStep, status) => {
|
|
40
|
+
if (status === "error")
|
|
41
|
+
return "error";
|
|
42
|
+
if (currentStep === step)
|
|
43
|
+
return "active";
|
|
44
|
+
if (currentStep < step)
|
|
45
|
+
return "inactive";
|
|
46
|
+
return "complete";
|
|
47
|
+
};
|
|
48
|
+
const calculateStepDelay = (step, currentStep, previousStep, duration) => {
|
|
49
|
+
if (currentStep === previousStep)
|
|
50
|
+
return 0;
|
|
51
|
+
const isForward = currentStep > previousStep;
|
|
52
|
+
if (isForward) {
|
|
53
|
+
if (step <= previousStep || step > currentStep)
|
|
54
|
+
return 0;
|
|
55
|
+
return ((step - previousStep) / (currentStep - previousStep)) * duration;
|
|
56
|
+
}
|
|
57
|
+
if (step <= currentStep || step > previousStep)
|
|
58
|
+
return 0;
|
|
59
|
+
return ((previousStep - step) / (previousStep - currentStep)) * duration;
|
|
60
|
+
};
|
|
61
|
+
export const useStepContext = () => useContext(StepContext);
|
|
62
|
+
export const Step = ({ step, currentStep, status, title, titleClassName, ...props }) => {
|
|
63
|
+
const parser = useColorParser();
|
|
64
|
+
const context = useStepContext();
|
|
65
|
+
const [visualCurrentStep, setVisualCurrentStep] = useState(currentStep);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!context) {
|
|
68
|
+
setVisualCurrentStep(currentStep);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const delay = calculateStepDelay(step, context.currentStep, context.previousStep, context.progressBarDuration);
|
|
72
|
+
if (delay === 0) {
|
|
73
|
+
setVisualCurrentStep(currentStep);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const timer = setTimeout(() => {
|
|
77
|
+
setVisualCurrentStep(currentStep);
|
|
78
|
+
}, delay * 1000);
|
|
79
|
+
return () => clearTimeout(timer);
|
|
80
|
+
}, [currentStep, context, step]);
|
|
81
|
+
const innerStatus = getCurrentStatus(step, visualCurrentStep, status);
|
|
82
|
+
const _widthPerStep = context?.steps ? 100 / context?.steps : undefined;
|
|
83
|
+
return (<Fragment>
|
|
84
|
+
<div className={`hidden h-step-connector-h w-full bg-card-border first:hidden xl:block ${innerStatus === "active" || innerStatus === "complete" ? "bg-success" : ""}`}/>
|
|
85
|
+
<motion.button {...props} type="button" aria-current={innerStatus === "active" ? "step" : undefined} data-step={step} animate={innerStatus} className="relative flex w-auto items-center justify-center text-center">
|
|
86
|
+
<motion.div variants={variants} transition={transitions} className={`absolute inset-0 hidden rounded-full text-center xl:block ${innerStatus === "error" ? "bg-danger" : ""}`}/>
|
|
87
|
+
<motion.div initial={false} animate={innerStatus} transition={transition} className="relative flex aspect-square size-step-size items-center justify-center rounded-full font-medium" variants={{
|
|
88
|
+
error: {
|
|
89
|
+
color: parser("var(--danger-foreground)"),
|
|
90
|
+
borderColor: parser("var(--danger-hover)"),
|
|
91
|
+
backgroundColor: parser("var(--danger-DEFAULT)"),
|
|
92
|
+
},
|
|
93
|
+
inactive: {
|
|
94
|
+
transition,
|
|
95
|
+
color: parser("var(--disabled)"),
|
|
96
|
+
borderColor: parser("var(--card-border)"),
|
|
97
|
+
backgroundColor: parser("var(--background)"),
|
|
98
|
+
},
|
|
99
|
+
active: {
|
|
100
|
+
transition,
|
|
101
|
+
color: parser("var(--primary-foreground)"),
|
|
102
|
+
borderColor: parser("var(--primary-DEFAULT)"),
|
|
103
|
+
backgroundColor: parser("var(--primary-DEFAULT)"),
|
|
104
|
+
},
|
|
105
|
+
complete: {
|
|
106
|
+
transition,
|
|
107
|
+
color: parser("var(--success-foreground)"),
|
|
108
|
+
borderColor: parser("var(--success-DEFAULT)"),
|
|
109
|
+
backgroundColor: parser("var(--success-DEFAULT)"),
|
|
110
|
+
},
|
|
111
|
+
}}>
|
|
112
|
+
<div className="flex items-center justify-center">
|
|
113
|
+
{innerStatus === "complete" ? (<CheckIcon className="size-step-icon-size text-primary-foreground"/>) : innerStatus === "error" ? (<ErrorIcon className="size-step-icon-size text-danger-foreground"/>) : (<Fragment>
|
|
114
|
+
<span>{step}</span>
|
|
115
|
+
</Fragment>)}
|
|
116
|
+
</div>
|
|
117
|
+
</motion.div>
|
|
118
|
+
<div className="flex flex-col items-start justify-start px-step-label-px">
|
|
119
|
+
<h3 className={`flex h-full items-center whitespace-nowrap font-normal ${titleClassName}`}>{title}</h3>
|
|
120
|
+
</div>
|
|
121
|
+
</motion.button>
|
|
122
|
+
</Fragment>);
|
|
123
|
+
};
|
|
124
|
+
export const Steps = (props) => {
|
|
125
|
+
const previousStepRef = useRef(props.currentStep);
|
|
126
|
+
const [previousStep, setPreviousStep] = useState(props.currentStep);
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
previousStepRef.current = previousStep;
|
|
129
|
+
const timer = setTimeout(() => {
|
|
130
|
+
setPreviousStep(props.currentStep);
|
|
131
|
+
}, PROGRESS_BAR_DURATION * 1000);
|
|
132
|
+
return () => clearTimeout(timer);
|
|
133
|
+
}, [props.currentStep, previousStep]);
|
|
134
|
+
const contextValue = {
|
|
135
|
+
currentStep: props.currentStep,
|
|
136
|
+
previousStep: previousStepRef.current,
|
|
137
|
+
progressBarDuration: PROGRESS_BAR_DURATION,
|
|
138
|
+
steps: React.Children.count(props.children),
|
|
139
|
+
};
|
|
140
|
+
return (<StepContext.Provider value={contextValue}>
|
|
141
|
+
<div className="relative flex w-full flex-col items-start justify-center gap-step-gap lg:flex-row lg:items-center lg:justify-between">
|
|
142
|
+
{props.children}
|
|
143
|
+
</div>
|
|
144
|
+
</StepContext.Provider>);
|
|
145
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
import { Label } from "../../types";
|
|
3
|
+
import { CardProps } from "./card";
|
|
4
|
+
export type TabsProps = Omit<CardProps<"div">, "onChange"> & {
|
|
5
|
+
active: string;
|
|
6
|
+
container?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
onChange?: (id: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const Tabs: (props: PropsWithChildren<TabsProps>) => React.JSX.Element;
|
|
11
|
+
type CommonTabProps = {
|
|
12
|
+
id: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type TabProps = CommonTabProps & ({
|
|
16
|
+
title: string;
|
|
17
|
+
label?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
label: string;
|
|
20
|
+
title: Omit<Label, string>;
|
|
21
|
+
});
|
|
22
|
+
export declare const Tab: (props: PropsWithChildren<TabProps>) => React.JSX.Element | null;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/display/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAiB,iBAAiB,EAAiC,MAAM,OAAO,CAAC;AAM/F,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AA2CF,eAAO,MAAM,IAAI,GAAI,OAAO,iBAAiB,CAAC,SAAS,CAAC,sBAiGvD,CAAC;AAIF,KAAK,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,QAAQ,GAAG,cAAc,GACjC,CACM;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GACpC;IACI,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC9B,CACN,CAAC;AAEN,eAAO,MAAM,GAAG,GAAI,OAAO,iBAAiB,CAAC,QAAQ,CAAC,6BAQrD,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { createContext, useContext, useEffect, useRef } from "react";
|
|
3
|
+
import { Is } from "sidekicker";
|
|
4
|
+
import { useReactive } from "../../hooks/use-reactive";
|
|
5
|
+
import { useStableRef } from "../../hooks/use-stable-ref";
|
|
6
|
+
import { css } from "../../lib/dom";
|
|
7
|
+
import { keyboardKeys } from "../../lib/keyboard-area";
|
|
8
|
+
import { Polymorph } from "../core/polymorph";
|
|
9
|
+
import { Card } from "./card";
|
|
10
|
+
const Context = createContext("");
|
|
11
|
+
const isElementDisabled = (element) => element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
|
|
12
|
+
const getNElement = (elements, currentIndex, direction) => {
|
|
13
|
+
const step = direction === "forward" ? 1 : -1;
|
|
14
|
+
const startIndex = currentIndex + step;
|
|
15
|
+
for (let i = startIndex; i >= 0 && i < elements.length; i += step) {
|
|
16
|
+
const element = elements[i];
|
|
17
|
+
if (!isElementDisabled(element))
|
|
18
|
+
return element;
|
|
19
|
+
}
|
|
20
|
+
return direction === "backward" ? getNElement(elements, elements.length - 1, "backward") : getNElement(elements, -1, "forward");
|
|
21
|
+
};
|
|
22
|
+
const moveOn = (ul, direction) => {
|
|
23
|
+
const items = Array.from(ul.querySelectorAll("li"));
|
|
24
|
+
const find = items.findIndex((x) => x.dataset.active === "true");
|
|
25
|
+
if (find === -1)
|
|
26
|
+
return null;
|
|
27
|
+
const item = getNElement(items, find, direction);
|
|
28
|
+
if (item === null)
|
|
29
|
+
return null;
|
|
30
|
+
item.querySelector("button")?.focus({ preventScroll: false });
|
|
31
|
+
return item.getAttribute("data-id") || "";
|
|
32
|
+
};
|
|
33
|
+
const moveToEdge = (ul, edge) => {
|
|
34
|
+
const items = Array.from(ul.querySelectorAll("li"));
|
|
35
|
+
const ordered = edge === "first" ? items : [...items].reverse();
|
|
36
|
+
for (const item of ordered) {
|
|
37
|
+
if (!isElementDisabled(item)) {
|
|
38
|
+
item.querySelector("button")?.focus({ preventScroll: false });
|
|
39
|
+
return item.getAttribute("data-id") || "";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
const actionKeys = {
|
|
45
|
+
[keyboardKeys.ArrowLeft]: (_, ul) => moveOn(ul, "backward"),
|
|
46
|
+
[keyboardKeys.ArrowRight]: (_, ul) => moveOn(ul, "forward"),
|
|
47
|
+
};
|
|
48
|
+
export const Tabs = (props) => {
|
|
49
|
+
const [active, setActive] = useReactive(props.active);
|
|
50
|
+
const ref = useRef(null);
|
|
51
|
+
const onChangeRef = useStableRef(props.onChange);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
const header = ref.current;
|
|
54
|
+
if (header === null)
|
|
55
|
+
return;
|
|
56
|
+
let first = header.querySelector(`li[data-active=true]`);
|
|
57
|
+
if (first === null) {
|
|
58
|
+
first = header.querySelector(`li[data-id]`);
|
|
59
|
+
const id = first.getAttribute("data-id") || "";
|
|
60
|
+
setActive(id);
|
|
61
|
+
}
|
|
62
|
+
}, [props.active, setActive]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (onChangeRef.current)
|
|
65
|
+
onChangeRef.current(active);
|
|
66
|
+
}, [onChangeRef, active]);
|
|
67
|
+
const items = React.Children.toArray(props.children);
|
|
68
|
+
const onClick = (e) => {
|
|
69
|
+
const anchor = e.currentTarget;
|
|
70
|
+
setActive(anchor.dataset.id || "");
|
|
71
|
+
};
|
|
72
|
+
const onKeyDown = (e) => {
|
|
73
|
+
if (ref.current === null)
|
|
74
|
+
return;
|
|
75
|
+
const k = e.key;
|
|
76
|
+
if (Is.keyof(actionKeys, k)) {
|
|
77
|
+
const fn = actionKeys[k];
|
|
78
|
+
const result = fn(e, ref.current);
|
|
79
|
+
if (result === null)
|
|
80
|
+
return;
|
|
81
|
+
setActive(result);
|
|
82
|
+
}
|
|
83
|
+
else if (k === "Home") {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
const result = moveToEdge(ref.current, "first");
|
|
86
|
+
if (result)
|
|
87
|
+
setActive(result);
|
|
88
|
+
}
|
|
89
|
+
else if (k === "End") {
|
|
90
|
+
e.preventDefault();
|
|
91
|
+
const result = moveToEdge(ref.current, "last");
|
|
92
|
+
if (result)
|
|
93
|
+
setActive(result);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
return (<Context.Provider value={active}>
|
|
97
|
+
<Card className={props.className} container={css("pt-0 max-w-full w-full min-w-0", props.container)} header={<header className="relative mb-tabs-header-mb overflow-x-auto">
|
|
98
|
+
<div className="absolute bottom-0 h-tabs-divider-h w-full bg-card-border"/>
|
|
99
|
+
<nav className="min-w-0">
|
|
100
|
+
<ul role="tablist" onKeyDown={onKeyDown} ref={ref} className="flex w-0 min-w-full flex-1 justify-start overflow-x-auto">
|
|
101
|
+
{items.map((x) => {
|
|
102
|
+
const inner = x.props;
|
|
103
|
+
const current = active === inner.id;
|
|
104
|
+
return (<li data-id={inner.id} data-active={current} key={`tab-header-${inner.id}`} className={css("relative w-fit border-b border-transparent transition-all", current ? "border-primary font-medium text-primary" : "", inner.disabled ? "aria-disabled:text-disabled" : "")}>
|
|
105
|
+
<Polymorph role="tab" as="button" type="button" data-id={inner.id} id={`${inner.id}-tab`} aria-selected={current} disabled={inner.disabled} tabIndex={current ? 0 : -1} aria-controls={`${inner.id}-panel`} onClick={inner.disabled ? undefined : onClick} className="block w-full whitespace-nowrap px-tabs-item-px py-tabs-item-py disabled:cursor-not-allowed">
|
|
106
|
+
{inner.title}
|
|
107
|
+
</Polymorph>
|
|
108
|
+
</li>);
|
|
109
|
+
})}
|
|
110
|
+
</ul>
|
|
111
|
+
</nav>
|
|
112
|
+
</header>}>
|
|
113
|
+
{props.children}
|
|
114
|
+
</Card>
|
|
115
|
+
</Context.Provider>);
|
|
116
|
+
};
|
|
117
|
+
const useTabs = () => useContext(Context);
|
|
118
|
+
export const Tab = (props) => {
|
|
119
|
+
const active = useTabs();
|
|
120
|
+
if (props.id !== active)
|
|
121
|
+
return null;
|
|
122
|
+
return (<div role="tabpanel" tabIndex={0} id={`${props.id}-panel`} aria-labelledby={`${props.id}-tab`}>
|
|
123
|
+
{props.children}
|
|
124
|
+
</div>);
|
|
125
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ComponentProps, ElementType, PropsWithChildren } from "react";
|
|
2
|
+
import { PolymorphicProps } from "../core/polymorph";
|
|
3
|
+
export declare const TimelineItem: {
|
|
4
|
+
(props: PropsWithChildren): React.JSX.Element;
|
|
5
|
+
Icon(props: PropsWithChildren<ComponentProps<"header">>): React.JSX.Element;
|
|
6
|
+
Body<T extends ElementType = "section">(props: PropsWithChildren<PolymorphicProps<object, T>>): React.JSX.Element;
|
|
7
|
+
Right<T extends ElementType = "button">(props: PolymorphicProps<object, T>): React.JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export declare const Timeline: (props: PropsWithChildren) => React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/components/display/timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAa,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,eAAO,MAAM,YAAY;YAAW,iBAAiB;gBAUJ,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;SAc9C,CAAC,SAAS,WAAW,qBAAqB,iBAAiB,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;UAQtF,CAAC,SAAS,WAAW,oBAAoB,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC;CAxBnH,CAAC;AAgCF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,sBAIhD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../dom-Bn4wY_Zx.js";
|
|
2
|
-
import { t } from "
|
|
2
|
+
import { Polymorph as t } from "../core/polymorph.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/display/timeline.tsx
|