@accelint/design-toolkit 9.9.2 → 9.10.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/catalog-info.yaml +2 -2
- package/dist/components/accordion/group.d.ts +2 -2
- package/dist/components/accordion/header.d.ts +2 -2
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/styles.module.css +19 -3
- package/dist/components/accordion/trigger.d.ts +2 -2
- package/dist/components/action-bar/index.d.ts +2 -2
- package/dist/components/audio/index.d.ts +2 -2
- package/dist/components/avatar/context.d.ts +4 -4
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/context.d.ts +4 -4
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/breadcrumbs/index.d.ts +2 -2
- package/dist/components/breadcrumbs/item.d.ts +2 -2
- package/dist/components/button/context.d.ts +8 -8
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/link.d.ts +2 -2
- package/dist/components/button/styles.module.css +16 -0
- package/dist/components/button/toggle.d.ts +2 -2
- package/dist/components/carousel/context.d.ts +40 -0
- package/dist/components/carousel/context.js +55 -0
- package/dist/components/carousel/context.js.map +1 -0
- package/dist/components/carousel/gallery.d.ts +38 -0
- package/dist/components/carousel/gallery.js +84 -0
- package/dist/components/carousel/gallery.js.map +1 -0
- package/dist/components/carousel/index.d.ts +56 -0
- package/dist/components/carousel/index.js +66 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/carousel/navigation.d.ts +51 -0
- package/dist/components/carousel/navigation.js +82 -0
- package/dist/components/carousel/navigation.js.map +1 -0
- package/dist/components/carousel/position.d.ts +33 -0
- package/dist/components/carousel/position.js +48 -0
- package/dist/components/carousel/position.js.map +1 -0
- package/dist/components/carousel/select.d.ts +38 -0
- package/dist/components/carousel/select.js +69 -0
- package/dist/components/carousel/select.js.map +1 -0
- package/dist/components/carousel/style.module.css +62 -0
- package/dist/components/carousel/types.d.ts +87 -0
- package/dist/components/carousel/types.js +12 -0
- package/dist/components/carousel/viewer.d.ts +40 -0
- package/dist/components/carousel/viewer.js +75 -0
- package/dist/components/carousel/viewer.js.map +1 -0
- package/dist/components/checkbox/context.d.ts +3 -3
- package/dist/components/checkbox/group.d.ts +2 -2
- package/dist/components/checkbox/group.js +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/chip/context.d.ts +4 -4
- package/dist/components/chip/deletable.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/list.d.ts +4 -4
- package/dist/components/chip/selectable.d.ts +2 -2
- package/dist/components/classification-badge/context.d.ts +4 -4
- package/dist/components/classification-badge/index.d.ts +2 -2
- package/dist/components/classification-banner/context.d.ts +4 -4
- package/dist/components/classification-banner/index.d.ts +2 -2
- package/dist/components/clock/index.d.ts +2 -2
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox-field/context.d.ts +4 -4
- package/dist/components/combobox-field/index.d.ts +2 -2
- package/dist/components/combobox-field/index.js +1 -1
- package/dist/components/combobox-field/styles.module.css +12 -0
- package/dist/components/coordinate-field/context.d.ts +6 -6
- package/dist/components/coordinate-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/segment.d.ts +2 -2
- package/dist/components/date-field/index.d.ts +2 -2
- package/dist/components/deferred-collection/index.d.ts +2 -2
- package/dist/components/details-list/context.d.ts +4 -4
- package/dist/components/details-list/index.d.ts +2 -2
- package/dist/components/details-list/label.d.ts +2 -2
- package/dist/components/details-list/value.d.ts +2 -2
- package/dist/components/dialog/content.d.ts +2 -2
- package/dist/components/dialog/context.d.ts +2 -2
- package/dist/components/dialog/footer.d.ts +2 -2
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/styles.module.css +23 -0
- package/dist/components/dialog/title.d.ts +2 -2
- package/dist/components/divider/context.d.ts +4 -4
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/drawer/back.d.ts +2 -2
- package/dist/components/drawer/close.d.ts +2 -2
- package/dist/components/drawer/content.d.ts +2 -2
- package/dist/components/drawer/context.d.ts +2 -2
- package/dist/components/drawer/footer.d.ts +2 -2
- package/dist/components/drawer/header-title.d.ts +2 -2
- package/dist/components/drawer/header.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/layout-main.d.ts +2 -2
- package/dist/components/drawer/layout.d.ts +2 -2
- package/dist/components/drawer/menu-item.d.ts +2 -2
- package/dist/components/drawer/menu.d.ts +2 -2
- package/dist/components/drawer/panel.d.ts +2 -2
- package/dist/components/drawer/styles.module.css +54 -2
- package/dist/components/drawer/trigger.d.ts +2 -2
- package/dist/components/drawer/view.d.ts +2 -2
- package/dist/components/flashcard/index.d.ts +9 -9
- package/dist/components/floating-card/context.d.ts +37 -5
- package/dist/components/floating-card/context.js +18 -3
- package/dist/components/floating-card/context.js.map +1 -1
- package/dist/components/floating-card/index.d.ts +51 -1
- package/dist/components/floating-card/index.js +41 -11
- package/dist/components/floating-card/index.js.map +1 -1
- package/dist/components/floating-card/provider.d.ts +94 -17
- package/dist/components/floating-card/provider.js +116 -20
- package/dist/components/floating-card/provider.js.map +1 -1
- package/dist/components/floating-card/styles.module.css +5 -0
- package/dist/components/gantt/components/base-elements/point.d.ts +28 -0
- package/dist/components/gantt/components/base-elements/point.js +44 -0
- package/dist/components/gantt/components/base-elements/point.js.map +1 -0
- package/dist/components/gantt/components/base-elements/range.d.ts +30 -0
- package/dist/components/gantt/components/base-elements/range.js +51 -0
- package/dist/components/gantt/components/base-elements/range.js.map +1 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.d.ts +12 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.js +42 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.js.map +1 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.d.ts +23 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.js +50 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +23 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.js +40 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +23 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.js +33 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/styles.module.css +32 -0
- package/dist/components/gantt/components/containers/internal/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/index.js +35 -0
- package/dist/components/gantt/components/containers/internal/index.js.map +1 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.js +27 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/internal/styles.module.css +35 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.js +38 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/block.d.ts +27 -0
- package/dist/components/gantt/components/content-row/block.js +39 -0
- package/dist/components/gantt/components/content-row/block.js.map +1 -0
- package/dist/components/gantt/components/content-row/bracket.d.ts +23 -0
- package/dist/components/gantt/components/content-row/bracket.js +48 -0
- package/dist/components/gantt/components/content-row/bracket.js.map +1 -0
- package/dist/components/gantt/components/content-row/icon-marker.d.ts +27 -0
- package/dist/components/gantt/components/content-row/icon-marker.js +41 -0
- package/dist/components/gantt/components/content-row/icon-marker.js.map +1 -0
- package/dist/components/gantt/components/content-row/index.d.ts +24 -0
- package/dist/components/gantt/components/content-row/index.js +32 -0
- package/dist/components/gantt/components/content-row/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/marker.d.ts +21 -0
- package/dist/components/gantt/components/content-row/marker.js +35 -0
- package/dist/components/gantt/components/content-row/marker.js.map +1 -0
- package/dist/components/gantt/components/content-row/spacer.d.ts +23 -0
- package/dist/components/gantt/components/content-row/spacer.js +35 -0
- package/dist/components/gantt/components/content-row/spacer.js.map +1 -0
- package/dist/components/gantt/components/content-row/styles.module.css +198 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.d.ts +19 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.js +27 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.d.ts +10 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.js +24 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.js.map +1 -0
- package/dist/components/gantt/components/current-time/index.d.ts +28 -0
- package/dist/components/gantt/components/current-time/index.js +63 -0
- package/dist/components/gantt/components/current-time/index.js.map +1 -0
- package/dist/components/gantt/components/current-time/styles.module.css +42 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.d.ts +31 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.js +58 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.js.map +1 -0
- package/dist/components/gantt/components/header/index.d.ts +25 -0
- package/dist/components/gantt/components/header/index.js +41 -0
- package/dist/components/gantt/components/header/index.js.map +1 -0
- package/dist/components/gantt/components/header/styles.module.css +23 -0
- package/dist/components/gantt/components/panel-row/index.d.ts +24 -0
- package/dist/components/gantt/components/panel-row/index.js +33 -0
- package/dist/components/gantt/components/panel-row/index.js.map +1 -0
- package/dist/components/gantt/components/panel-row/styles.module.css +24 -0
- package/dist/components/gantt/components/rows-virtualizer/index.d.ts +25 -0
- package/dist/components/gantt/components/rows-virtualizer/index.js +67 -0
- package/dist/components/gantt/components/rows-virtualizer/index.js.map +1 -0
- package/dist/components/gantt/components/rows-virtualizer/styles.module.css +30 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.d.ts +29 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.js +57 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.js.map +1 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.d.ts +10 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.js +58 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.js.map +1 -0
- package/dist/components/gantt/components/styles.module.css +46 -0
- package/dist/components/gantt/components/timeline/index.d.ts +19 -0
- package/dist/components/gantt/components/timeline/index.js +45 -0
- package/dist/components/gantt/components/timeline/index.js.map +1 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.d.ts +29 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.js +33 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.js.map +1 -0
- package/dist/components/gantt/components/timeline-chunk/index.d.ts +25 -0
- package/dist/components/gantt/components/timeline-chunk/index.js +43 -0
- package/dist/components/gantt/components/timeline-chunk/index.js.map +1 -0
- package/dist/components/gantt/constants.d.ts +31 -0
- package/dist/components/gantt/constants.js +57 -0
- package/dist/components/gantt/constants.js.map +1 -0
- package/dist/components/gantt/context/index.d.ts +60 -0
- package/dist/components/gantt/context/index.js +78 -0
- package/dist/components/gantt/context/index.js.map +1 -0
- package/dist/components/gantt/context/store/index.d.ts +45 -0
- package/dist/components/gantt/context/store/index.js +42 -0
- package/dist/components/gantt/context/store/index.js.map +1 -0
- package/dist/components/gantt/context/temporal-data/index.d.ts +48 -0
- package/dist/components/gantt/context/temporal-data/index.js +80 -0
- package/dist/components/gantt/context/temporal-data/index.js.map +1 -0
- package/dist/components/gantt/gantt.d.ts +50 -0
- package/dist/components/gantt/gantt.js +51 -0
- package/dist/components/gantt/gantt.js.map +1 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.d.ts +22 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.js +36 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.d.ts +26 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.js +45 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.d.ts +26 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.js +50 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.d.ts +5 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.js +24 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.d.ts +5 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.js +40 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.d.ts +19 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.js +87 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.d.ts +22 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.js +38 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.js.map +1 -0
- package/dist/components/gantt/public-types.d.ts +31 -0
- package/dist/components/gantt/public-types.js +12 -0
- package/dist/components/gantt/store.d.ts +51 -0
- package/dist/components/gantt/store.js +46 -0
- package/dist/components/gantt/store.js.map +1 -0
- package/dist/components/gantt/styles.module.css +30 -0
- package/dist/components/gantt/types.d.ts +67 -0
- package/dist/components/gantt/types.js +12 -0
- package/dist/components/gantt/utils/conversions.d.ts +23 -0
- package/dist/components/gantt/utils/conversions.js +34 -0
- package/dist/components/gantt/utils/conversions.js.map +1 -0
- package/dist/components/gantt/utils/dates.d.ts +11 -0
- package/dist/components/gantt/utils/dates.js +41 -0
- package/dist/components/gantt/utils/dates.js.map +1 -0
- package/dist/components/gantt/utils/formatting.d.ts +5 -0
- package/dist/components/gantt/utils/formatting.js +54 -0
- package/dist/components/gantt/utils/formatting.js.map +1 -0
- package/dist/components/gantt/utils/generation.d.ts +19 -0
- package/dist/components/gantt/utils/generation.js +37 -0
- package/dist/components/gantt/utils/generation.js.map +1 -0
- package/dist/components/gantt/utils/helpers.d.ts +26 -0
- package/dist/components/gantt/utils/helpers.js +55 -0
- package/dist/components/gantt/utils/helpers.js.map +1 -0
- package/dist/components/gantt/utils/layout.d.ts +32 -0
- package/dist/components/gantt/utils/layout.js +55 -0
- package/dist/components/gantt/utils/layout.js.map +1 -0
- package/dist/components/gantt/utils/thresholds.d.ts +52 -0
- package/dist/components/gantt/utils/thresholds.js +116 -0
- package/dist/components/gantt/utils/thresholds.js.map +1 -0
- package/dist/components/hero/context.d.ts +2 -2
- package/dist/components/hero/index.d.ts +2 -2
- package/dist/components/hero/subtitle.d.ts +2 -2
- package/dist/components/hero/title.d.ts +2 -2
- package/dist/components/hotkey/context.d.ts +4 -4
- package/dist/components/hotkey/index.d.ts +2 -2
- package/dist/components/hotkey/set.d.ts +2 -2
- package/dist/components/icon/context.d.ts +4 -4
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/input/context.d.ts +2 -2
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/kanban/card-body.d.ts +2 -2
- package/dist/components/kanban/card-header-actions.d.ts +2 -2
- package/dist/components/kanban/card-header-title.d.ts +2 -2
- package/dist/components/kanban/card-header.d.ts +2 -2
- package/dist/components/kanban/card.d.ts +2 -2
- package/dist/components/kanban/column-actions.d.ts +2 -2
- package/dist/components/kanban/column-container.d.ts +2 -2
- package/dist/components/kanban/column-content.d.ts +2 -2
- package/dist/components/kanban/column-header-actions.d.ts +2 -2
- package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
- package/dist/components/kanban/column-header-title.d.ts +2 -2
- package/dist/components/kanban/column-header.d.ts +2 -2
- package/dist/components/kanban/column.d.ts +2 -2
- package/dist/components/kanban/context.d.ts +2 -2
- package/dist/components/kanban/header-actions.d.ts +2 -2
- package/dist/components/kanban/header-search.d.ts +2 -2
- package/dist/components/kanban/header-title.d.ts +2 -2
- package/dist/components/kanban/header.d.ts +2 -2
- package/dist/components/kanban/kanban.d.ts +4 -4
- package/dist/components/label/context.d.ts +4 -4
- package/dist/components/label/index.d.ts +2 -2
- package/dist/components/lines/index.d.ts +2 -2
- package/dist/components/link/context.d.ts +2 -2
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/list/context.d.ts +2 -2
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/item-content.d.ts +2 -2
- package/dist/components/list/item-description.d.ts +2 -2
- package/dist/components/list/item-title.d.ts +2 -2
- package/dist/components/list/item.d.ts +2 -2
- package/dist/components/media-controls/context.d.ts +4 -4
- package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
- package/dist/components/media-controls/index.d.ts +2 -2
- package/dist/components/media-controls/mute-button.d.ts +2 -2
- package/dist/components/media-controls/play-button.d.ts +2 -2
- package/dist/components/media-controls/playback-rate.d.ts +2 -2
- package/dist/components/media-controls/seek-button.d.ts +2 -2
- package/dist/components/media-controls/time-display.d.ts +2 -2
- package/dist/components/media-controls/time-range.d.ts +2 -2
- package/dist/components/media-controls/volume-slider.d.ts +2 -2
- package/dist/components/menu/context.d.ts +2 -2
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/item-description.d.ts +2 -2
- package/dist/components/menu/item-label.d.ts +2 -2
- package/dist/components/menu/item.d.ts +2 -2
- package/dist/components/menu/section.d.ts +2 -2
- package/dist/components/menu/separator.d.ts +2 -2
- package/dist/components/menu/styles.module.css +12 -0
- package/dist/components/menu/submenu.d.ts +2 -2
- package/dist/components/notice/index.d.ts +2 -2
- package/dist/components/notice/index.js +1 -0
- package/dist/components/notice/index.js.map +1 -1
- package/dist/components/notice/list.d.ts +2 -2
- package/dist/components/notice/list.js +10 -1
- package/dist/components/notice/list.js.map +1 -1
- package/dist/components/notice/notice-icon.d.ts +2 -2
- package/dist/components/notice/styles.module.css +27 -0
- package/dist/components/options/context.d.ts +2 -2
- package/dist/components/options/index.d.ts +2 -2
- package/dist/components/options/item-content.d.ts +2 -2
- package/dist/components/options/item-description.d.ts +2 -2
- package/dist/components/options/item-label.d.ts +2 -2
- package/dist/components/options/item.d.ts +2 -2
- package/dist/components/options/section.d.ts +2 -2
- package/dist/components/pagination/context.d.ts +2 -2
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/next.d.ts +2 -2
- package/dist/components/pagination/pages.d.ts +2 -2
- package/dist/components/pagination/prev.d.ts +2 -2
- package/dist/components/popover/content.d.ts +2 -2
- package/dist/components/popover/footer.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/styles.module.css +34 -0
- package/dist/components/popover/title.d.ts +2 -2
- package/dist/components/popover/trigger.d.ts +2 -2
- package/dist/components/query-builder/action-element.d.ts +2 -2
- package/dist/components/query-builder/actions.d.ts +4 -4
- package/dist/components/query-builder/combinator-selector.d.ts +2 -2
- package/dist/components/query-builder/index.d.ts +2 -2
- package/dist/components/query-builder/rule-group.d.ts +4 -4
- package/dist/components/query-builder/rule.d.ts +2 -2
- package/dist/components/query-builder/value-editor.d.ts +2 -2
- package/dist/components/query-builder/value-selector.d.ts +2 -2
- package/dist/components/query-builder/value-selector.js +1 -1
- package/dist/components/radio/context.d.ts +3 -3
- package/dist/components/radio/group.d.ts +2 -2
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/search-field/context.d.ts +4 -4
- package/dist/components/search-field/index.d.ts +2 -2
- package/dist/components/select-field/context.d.ts +4 -4
- package/dist/components/select-field/index.d.ts +2 -2
- package/dist/components/sidenav/avatar.d.ts +2 -2
- package/dist/components/sidenav/content.d.ts +2 -2
- package/dist/components/sidenav/context.d.ts +2 -2
- package/dist/components/sidenav/footer.d.ts +2 -2
- package/dist/components/sidenav/header.d.ts +2 -2
- package/dist/components/sidenav/index.d.ts +2 -2
- package/dist/components/sidenav/item.d.ts +2 -2
- package/dist/components/sidenav/link.d.ts +2 -2
- package/dist/components/sidenav/menu-item.d.ts +2 -2
- package/dist/components/sidenav/menu.d.ts +2 -2
- package/dist/components/sidenav/styles.module.css +10 -2
- package/dist/components/sidenav/trigger.d.ts +2 -2
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/status-indicator/index.d.ts +2 -2
- package/dist/components/switch/context.d.ts +4 -4
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/styles.module.css +8 -0
- package/dist/components/table/body.d.ts +2 -2
- package/dist/components/table/cell.d.ts +2 -2
- package/dist/components/table/context.d.ts +2 -2
- package/dist/components/table/header-cell.d.ts +2 -2
- package/dist/components/table/header.d.ts +2 -2
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +2 -2
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row.d.ts +2 -2
- package/dist/components/tabs/context.d.ts +6 -6
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/list.d.ts +2 -2
- package/dist/components/tabs/panel.d.ts +2 -2
- package/dist/components/tabs/tab.d.ts +2 -2
- package/dist/components/text-area-field/context.d.ts +4 -4
- package/dist/components/text-area-field/index.d.ts +2 -2
- package/dist/components/text-field/context.d.ts +4 -4
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/time-field/index.d.ts +2 -2
- package/dist/components/tooltip/context.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/styles.module.css +35 -0
- package/dist/components/tooltip/trigger.d.ts +2 -2
- package/dist/components/tree/context.d.ts +3 -3
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/index.js +20 -10
- package/dist/components/tree/index.js.map +1 -1
- package/dist/components/tree/item-actions.d.ts +2 -2
- package/dist/components/tree/item-content.d.ts +2 -2
- package/dist/components/tree/item-content.js +3 -2
- package/dist/components/tree/item-content.js.map +1 -1
- package/dist/components/tree/item-description.d.ts +2 -2
- package/dist/components/tree/item-label.d.ts +2 -2
- package/dist/components/tree/item-prefix-icon.d.ts +2 -2
- package/dist/components/tree/item.d.ts +2 -2
- package/dist/components/tree/lines.d.ts +2 -2
- package/dist/components/tree/types.d.ts +1 -0
- package/dist/components/video/index.d.ts +2 -2
- package/dist/components/view-stack/index.d.ts +2 -2
- package/dist/components/view-stack/trigger.d.ts +2 -2
- package/dist/components/view-stack/view.d.ts +2 -2
- package/dist/hooks/use-tree/actions/cache.d.ts +20 -3
- package/dist/hooks/use-tree/actions/cache.js +110 -2
- package/dist/hooks/use-tree/actions/cache.js.map +1 -1
- package/dist/hooks/use-tree/actions/index.d.ts +2 -1
- package/dist/hooks/use-tree/actions/index.js +70 -11
- package/dist/hooks/use-tree/actions/index.js.map +1 -1
- package/dist/hooks/use-tree/state/index.d.ts +20 -1
- package/dist/hooks/use-tree/state/index.js +22 -2
- package/dist/hooks/use-tree/state/index.js.map +1 -1
- package/dist/hooks/use-tree/types.d.ts +14 -0
- package/dist/index.d.ts +24 -5
- package/dist/index.js +27 -10
- package/dist/providers/portal.d.ts +2 -2
- package/dist/providers/theme-provider.d.ts +2 -2
- package/package.json +64 -6
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
import { ToggleButton } from "../button/toggle.js";
|
|
17
|
+
import { CarouselContext } from "./context.js";
|
|
18
|
+
import "client-only";
|
|
19
|
+
import { useCallback, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
20
|
+
import { clsx } from "@accelint/design-foundation/lib/utils";
|
|
21
|
+
import { jsx } from "react/jsx-runtime";
|
|
22
|
+
import styles from "./style.module.css";
|
|
23
|
+
|
|
24
|
+
//#region src/components/carousel/gallery.tsx
|
|
25
|
+
/**
|
|
26
|
+
* Number of visible thumbnail items to keep before the selected item
|
|
27
|
+
* when scrolling the gallery. This keeps the selected item visually
|
|
28
|
+
* centered rather than pinned to the leading edge.
|
|
29
|
+
*/
|
|
30
|
+
const VISIBLE_ITEMS_BEFORE_SELECTED = 2;
|
|
31
|
+
/**
|
|
32
|
+
* Renders a horizontally-scrolling strip of thumbnail buttons for carousel navigation.
|
|
33
|
+
*
|
|
34
|
+
* Automatically scrolls to keep the selected thumbnail visible. Clicking a
|
|
35
|
+
* thumbnail navigates the carousel to that item. Note that it relies on the <Carousel/>
|
|
36
|
+
* component to supply context and must be used as a child of that component.
|
|
37
|
+
*
|
|
38
|
+
* @param props - The gallery props.
|
|
39
|
+
* @param props.classNames - Custom class names for gallery elements.
|
|
40
|
+
* @param props.classNames.container - Class name for the gallery container.
|
|
41
|
+
* @param props.classNames.item - Class name for individual gallery items.
|
|
42
|
+
* @returns The carousel gallery component.
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
function CarouselGallery({ classNames, ...rest }) {
|
|
46
|
+
const { items, currentPosition, setCurrentPosition } = useContext(CarouselContext);
|
|
47
|
+
const [galleryXOffset, setGalleryXOffset] = useState(0);
|
|
48
|
+
const containerRef = useRef(null);
|
|
49
|
+
const selectedItem = items[currentPosition];
|
|
50
|
+
const handleItemClick = useCallback((index) => {
|
|
51
|
+
setCurrentPosition(index);
|
|
52
|
+
}, [setCurrentPosition]);
|
|
53
|
+
useLayoutEffect(() => {
|
|
54
|
+
if (!containerRef.current) return;
|
|
55
|
+
const { width } = containerRef.current.children?.[0]?.getBoundingClientRect() || { width: 0 };
|
|
56
|
+
if (currentPosition > VISIBLE_ITEMS_BEFORE_SELECTED) setGalleryXOffset(currentPosition * -width + width * VISIBLE_ITEMS_BEFORE_SELECTED);
|
|
57
|
+
else setGalleryXOffset(0);
|
|
58
|
+
}, [currentPosition]);
|
|
59
|
+
return /* @__PURE__ */ jsx("div", {
|
|
60
|
+
...rest,
|
|
61
|
+
className: clsx(styles["gallery-container"], classNames?.container),
|
|
62
|
+
ref: containerRef,
|
|
63
|
+
children: items.map((item, index) => {
|
|
64
|
+
const isSelected = selectedItem && item.id === selectedItem.id;
|
|
65
|
+
return /* @__PURE__ */ jsx(ToggleButton, {
|
|
66
|
+
style: { translate: `${galleryXOffset}px` },
|
|
67
|
+
isSelected,
|
|
68
|
+
className: clsx(styles["gallery-item"], classNames?.item),
|
|
69
|
+
onClick: () => handleItemClick(index),
|
|
70
|
+
size: "small",
|
|
71
|
+
color: "accent",
|
|
72
|
+
"data-id": `thumbnail-id-${item.id}`,
|
|
73
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
74
|
+
src: item.thumbnailUrl,
|
|
75
|
+
alt: item.title
|
|
76
|
+
})
|
|
77
|
+
}, `thumbnail-${item.id}`);
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { CarouselGallery };
|
|
84
|
+
//# sourceMappingURL=gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery.js","names":[],"sources":["../../../src/components/carousel/gallery.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport {\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { CarouselContext } from './context';\nimport styles from './style.module.css';\nimport type { CarouselGalleryProps } from './types';\nimport { ToggleButton } from '../button/toggle';\n\n/**\n * Number of visible thumbnail items to keep before the selected item\n * when scrolling the gallery. This keeps the selected item visually\n * centered rather than pinned to the leading edge.\n */\nconst VISIBLE_ITEMS_BEFORE_SELECTED = 2;\n\n/**\n * Renders a horizontally-scrolling strip of thumbnail buttons for carousel navigation.\n *\n * Automatically scrolls to keep the selected thumbnail visible. Clicking a\n * thumbnail navigates the carousel to that item. Note that it relies on the <Carousel/>\n * component to supply context and must be used as a child of that component.\n *\n * @param props - The gallery props.\n * @param props.classNames - Custom class names for gallery elements.\n * @param props.classNames.container - Class name for the gallery container.\n * @param props.classNames.item - Class name for individual gallery items.\n * @returns The carousel gallery component.\n * ```\n */\nexport function CarouselGallery({ classNames, ...rest }: CarouselGalleryProps) {\n const { items, currentPosition, setCurrentPosition } =\n useContext(CarouselContext);\n const [galleryXOffset, setGalleryXOffset] = useState(0);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const selectedItem = items[currentPosition];\n\n const handleItemClick = useCallback(\n (index: number) => {\n setCurrentPosition(index);\n },\n [setCurrentPosition],\n );\n\n // Calculate scroll position synchronously before browser paint to prevent visual flicker when the gallery scrolls\n useLayoutEffect(() => {\n if (!containerRef.current) {\n return;\n }\n\n const rect = containerRef.current.children?.[0]?.getBoundingClientRect();\n const { width } = rect || { width: 0 };\n\n if (currentPosition > VISIBLE_ITEMS_BEFORE_SELECTED) {\n setGalleryXOffset(\n currentPosition * -width + width * VISIBLE_ITEMS_BEFORE_SELECTED,\n );\n } else {\n setGalleryXOffset(0);\n }\n }, [currentPosition]);\n\n return (\n <div\n {...rest}\n className={clsx(styles['gallery-container'], classNames?.container)}\n ref={containerRef}\n >\n {items.map((item, index) => {\n const isSelected = selectedItem && item.id === selectedItem.id;\n return (\n <ToggleButton\n style={{\n translate: `${galleryXOffset}px`,\n }}\n isSelected={isSelected}\n className={clsx(styles['gallery-item'], classNames?.item)}\n onClick={() => handleItemClick(index)}\n key={`thumbnail-${item.id}`}\n size='small'\n color='accent'\n data-id={`thumbnail-id-${item.id}`}\n >\n <img src={item.thumbnailUrl} alt={item.title} />\n </ToggleButton>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,gCAAgC;;;;;;;;;;;;;;;AAgBtC,SAAgB,gBAAgB,EAAE,YAAY,GAAG,QAA8B;CAC7E,MAAM,EAAE,OAAO,iBAAiB,uBAC9B,WAAW,gBAAgB;CAC7B,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,EAAE;CACvD,MAAM,eAAe,OAAuB,KAAK;CAEjD,MAAM,eAAe,MAAM;CAE3B,MAAM,kBAAkB,aACrB,UAAkB;AACjB,qBAAmB,MAAM;IAE3B,CAAC,mBAAmB,CACrB;AAGD,uBAAsB;AACpB,MAAI,CAAC,aAAa,QAChB;EAIF,MAAM,EAAE,UADK,aAAa,QAAQ,WAAW,IAAI,uBAAuB,IAC9C,EAAE,OAAO,GAAG;AAEtC,MAAI,kBAAkB,8BACpB,mBACE,kBAAkB,CAAC,QAAQ,QAAQ,8BACpC;MAED,mBAAkB,EAAE;IAErB,CAAC,gBAAgB,CAAC;AAErB,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,OAAO,sBAAsB,YAAY,UAAU;EACnE,KAAK;YAEJ,MAAM,KAAK,MAAM,UAAU;GAC1B,MAAM,aAAa,gBAAgB,KAAK,OAAO,aAAa;AAC5D,UACE,oBAAC;IACC,OAAO,EACL,WAAW,GAAG,eAAe,KAC9B;IACW;IACZ,WAAW,KAAK,OAAO,iBAAiB,YAAY,KAAK;IACzD,eAAe,gBAAgB,MAAM;IAErC,MAAK;IACL,OAAM;IACN,WAAS,gBAAgB,KAAK;cAE9B,oBAAC;KAAI,KAAK,KAAK;KAAc,KAAK,KAAK;MAAS;MAL3C,aAAa,KAAK,KAMV;IAEjB;GACE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { CarouselProps } from "./types.js";
|
|
14
|
+
import "client-only";
|
|
15
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
//#region src/components/carousel/index.d.ts
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A compound carousel component for navigating a collection of media items.
|
|
21
|
+
*
|
|
22
|
+
* Provides carousel state via context to composable sub-components
|
|
23
|
+
* (CarouselViewer, CarouselGallery, CarouselPrevious, CarouselNext,
|
|
24
|
+
* CarouselPosition, CarouselSelect).
|
|
25
|
+
*
|
|
26
|
+
* @param props - The carousel props.
|
|
27
|
+
* @param props.items - The carousel data items to display.
|
|
28
|
+
* @param props.className - Custom class names for carousel elements.
|
|
29
|
+
* @param props.children - Carousel sub-components to render.
|
|
30
|
+
* @param props.currentPosition - Zero-based index of the active item.
|
|
31
|
+
* @param props.setCurrentPosition - Callback invoked when the active item changes.
|
|
32
|
+
* @returns The carousel component.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const [position, setPosition] = useState(0);
|
|
37
|
+
*
|
|
38
|
+
* <Carousel items={items} currentPosition={position} setCurrentPosition={setPosition}>
|
|
39
|
+
* <CarouselViewer />
|
|
40
|
+
* <CarouselPrevious />
|
|
41
|
+
* <CarouselGallery />
|
|
42
|
+
* <CarouselNext />
|
|
43
|
+
* </Carousel>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function Carousel({
|
|
47
|
+
items,
|
|
48
|
+
className,
|
|
49
|
+
children,
|
|
50
|
+
currentPosition,
|
|
51
|
+
setCurrentPosition,
|
|
52
|
+
...rest
|
|
53
|
+
}: CarouselProps): react_jsx_runtime33.JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Carousel };
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
import { CarouselProvider } from "./context.js";
|
|
17
|
+
import "client-only";
|
|
18
|
+
import { clsx } from "@accelint/design-foundation/lib/utils";
|
|
19
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
|
+
import styles from "./style.module.css";
|
|
21
|
+
|
|
22
|
+
//#region src/components/carousel/index.tsx
|
|
23
|
+
const EMPTY_ITEMS = [];
|
|
24
|
+
/**
|
|
25
|
+
* A compound carousel component for navigating a collection of media items.
|
|
26
|
+
*
|
|
27
|
+
* Provides carousel state via context to composable sub-components
|
|
28
|
+
* (CarouselViewer, CarouselGallery, CarouselPrevious, CarouselNext,
|
|
29
|
+
* CarouselPosition, CarouselSelect).
|
|
30
|
+
*
|
|
31
|
+
* @param props - The carousel props.
|
|
32
|
+
* @param props.items - The carousel data items to display.
|
|
33
|
+
* @param props.className - Custom class names for carousel elements.
|
|
34
|
+
* @param props.children - Carousel sub-components to render.
|
|
35
|
+
* @param props.currentPosition - Zero-based index of the active item.
|
|
36
|
+
* @param props.setCurrentPosition - Callback invoked when the active item changes.
|
|
37
|
+
* @returns The carousel component.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const [position, setPosition] = useState(0);
|
|
42
|
+
*
|
|
43
|
+
* <Carousel items={items} currentPosition={position} setCurrentPosition={setPosition}>
|
|
44
|
+
* <CarouselViewer />
|
|
45
|
+
* <CarouselPrevious />
|
|
46
|
+
* <CarouselGallery />
|
|
47
|
+
* <CarouselNext />
|
|
48
|
+
* </Carousel>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
function Carousel({ items = EMPTY_ITEMS, className, children, currentPosition, setCurrentPosition, ...rest }) {
|
|
52
|
+
return /* @__PURE__ */ jsx(CarouselProvider, {
|
|
53
|
+
items,
|
|
54
|
+
currentPosition,
|
|
55
|
+
setCurrentPosition,
|
|
56
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
57
|
+
...rest,
|
|
58
|
+
className: clsx(styles.carousel, className),
|
|
59
|
+
children
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { Carousel };
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["EMPTY_ITEMS: CarouselData[]"],"sources":["../../../src/components/carousel/index.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { CarouselProvider } from './context';\nimport styles from './style.module.css';\nimport type { CarouselData, CarouselProps } from './types';\n\nconst EMPTY_ITEMS: CarouselData[] = [];\n\n/**\n * A compound carousel component for navigating a collection of media items.\n *\n * Provides carousel state via context to composable sub-components\n * (CarouselViewer, CarouselGallery, CarouselPrevious, CarouselNext,\n * CarouselPosition, CarouselSelect).\n *\n * @param props - The carousel props.\n * @param props.items - The carousel data items to display.\n * @param props.className - Custom class names for carousel elements.\n * @param props.children - Carousel sub-components to render.\n * @param props.currentPosition - Zero-based index of the active item.\n * @param props.setCurrentPosition - Callback invoked when the active item changes.\n * @returns The carousel component.\n *\n * @example\n * ```tsx\n * const [position, setPosition] = useState(0);\n *\n * <Carousel items={items} currentPosition={position} setCurrentPosition={setPosition}>\n * <CarouselViewer />\n * <CarouselPrevious />\n * <CarouselGallery />\n * <CarouselNext />\n * </Carousel>\n * ```\n */\nexport function Carousel({\n items = EMPTY_ITEMS,\n className,\n children,\n currentPosition,\n setCurrentPosition,\n ...rest\n}: CarouselProps) {\n return (\n <CarouselProvider\n items={items}\n currentPosition={currentPosition}\n setCurrentPosition={setCurrentPosition}\n >\n <div {...rest} className={clsx(styles.carousel, className)}>\n {children}\n </div>\n </CarouselProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAMA,cAA8B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BtC,SAAgB,SAAS,EACvB,QAAQ,aACR,WACA,UACA,iBACA,oBACA,GAAG,QACa;AAChB,QACE,oBAAC;EACQ;EACU;EACG;YAEpB,oBAAC;GAAI,GAAI;GAAM,WAAW,KAAK,OAAO,UAAU,UAAU;GACvD;IACG;GACW"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { ButtonProps } from "../button/types.js";
|
|
14
|
+
import "client-only";
|
|
15
|
+
import * as react_jsx_runtime34 from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
//#region src/components/carousel/navigation.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Navigates the carousel to the previous item. Automatically disables when at the first item.
|
|
20
|
+
* Note that it relies on the <Carousel/>
|
|
21
|
+
* component to supply context and must be used as a child of that component.
|
|
22
|
+
*
|
|
23
|
+
* @param props - The control props.
|
|
24
|
+
* @param props.className - Additional CSS class name.
|
|
25
|
+
* @returns The previous navigation button.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
declare function CarouselPrevious({
|
|
29
|
+
className,
|
|
30
|
+
variant,
|
|
31
|
+
isDisabled,
|
|
32
|
+
...rest
|
|
33
|
+
}: ButtonProps): react_jsx_runtime34.JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Navigates the carousel to the next item. Automatically disables when at the last item.
|
|
36
|
+
* Note that it relies on the <Carousel/> component to supply context and must be used
|
|
37
|
+
* as a child of that component.
|
|
38
|
+
*
|
|
39
|
+
* @param props - The control props.
|
|
40
|
+
* @param props.className - Additional CSS class name.
|
|
41
|
+
* @returns The next navigation button.
|
|
42
|
+
*/
|
|
43
|
+
declare function CarouselNext({
|
|
44
|
+
className,
|
|
45
|
+
variant,
|
|
46
|
+
isDisabled,
|
|
47
|
+
...rest
|
|
48
|
+
}: ButtonProps): react_jsx_runtime34.JSX.Element;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { CarouselNext, CarouselPrevious };
|
|
51
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
import { Icon } from "../icon/index.js";
|
|
17
|
+
import { Button } from "../button/index.js";
|
|
18
|
+
import { CarouselContext } from "./context.js";
|
|
19
|
+
import "client-only";
|
|
20
|
+
import { useContext } from "react";
|
|
21
|
+
import { clsx } from "@accelint/design-foundation/lib/utils";
|
|
22
|
+
import { jsx } from "react/jsx-runtime";
|
|
23
|
+
import ChevronRight from "@accelint/icons/chevron-right";
|
|
24
|
+
import styles from "./style.module.css";
|
|
25
|
+
import ChevronLeft from "@accelint/icons/chevron-left";
|
|
26
|
+
|
|
27
|
+
//#region src/components/carousel/navigation.tsx
|
|
28
|
+
/**
|
|
29
|
+
* Navigates the carousel to the previous item. Automatically disables when at the first item.
|
|
30
|
+
* Note that it relies on the <Carousel/>
|
|
31
|
+
* component to supply context and must be used as a child of that component.
|
|
32
|
+
*
|
|
33
|
+
* @param props - The control props.
|
|
34
|
+
* @param props.className - Additional CSS class name.
|
|
35
|
+
* @returns The previous navigation button.
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
function CarouselPrevious({ className, variant = "flat", isDisabled, ...rest }) {
|
|
39
|
+
const { currentPosition, setCurrentPosition } = useContext(CarouselContext);
|
|
40
|
+
const shouldDisablePrevious = currentPosition === 0 || isDisabled;
|
|
41
|
+
const onClick = () => {
|
|
42
|
+
if (currentPosition - 1 >= 0) setCurrentPosition(currentPosition - 1);
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
45
|
+
...rest,
|
|
46
|
+
"aria-label": "Previous",
|
|
47
|
+
onClick,
|
|
48
|
+
className: clsx(styles.navigation, className),
|
|
49
|
+
variant,
|
|
50
|
+
isDisabled: shouldDisablePrevious,
|
|
51
|
+
children: /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(ChevronLeft, {}) })
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Navigates the carousel to the next item. Automatically disables when at the last item.
|
|
56
|
+
* Note that it relies on the <Carousel/> component to supply context and must be used
|
|
57
|
+
* as a child of that component.
|
|
58
|
+
*
|
|
59
|
+
* @param props - The control props.
|
|
60
|
+
* @param props.className - Additional CSS class name.
|
|
61
|
+
* @returns The next navigation button.
|
|
62
|
+
*/
|
|
63
|
+
function CarouselNext({ className, variant = "flat", isDisabled, ...rest }) {
|
|
64
|
+
const { currentPosition, setCurrentPosition, items } = useContext(CarouselContext);
|
|
65
|
+
const shouldDisableNext = currentPosition === items.length - 1 || isDisabled;
|
|
66
|
+
const onClick = () => {
|
|
67
|
+
if (currentPosition + 1 < items.length) setCurrentPosition(currentPosition + 1);
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
70
|
+
...rest,
|
|
71
|
+
"aria-label": "Next",
|
|
72
|
+
onClick,
|
|
73
|
+
className: clsx(styles.navigation, className),
|
|
74
|
+
variant,
|
|
75
|
+
isDisabled: shouldDisableNext,
|
|
76
|
+
children: /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(ChevronRight, {}) })
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
export { CarouselNext, CarouselPrevious };
|
|
82
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","names":[],"sources":["../../../src/components/carousel/navigation.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ChevronLeft from '@accelint/icons/chevron-left';\nimport ChevronRight from '@accelint/icons/chevron-right';\nimport { useContext } from 'react';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { CarouselContext } from './context';\nimport styles from './style.module.css';\nimport type { ButtonProps } from '../button/types';\n\n/**\n * Navigates the carousel to the previous item. Automatically disables when at the first item.\n * Note that it relies on the <Carousel/>\n * component to supply context and must be used as a child of that component.\n *\n * @param props - The control props.\n * @param props.className - Additional CSS class name.\n * @returns The previous navigation button.\n *\n */\nexport function CarouselPrevious({\n className,\n variant = 'flat',\n isDisabled,\n ...rest\n}: ButtonProps) {\n const context = useContext(CarouselContext);\n const { currentPosition, setCurrentPosition } = context;\n\n const shouldDisablePrevious = currentPosition === 0 || isDisabled;\n\n const onClick = () => {\n if (currentPosition - 1 >= 0) {\n setCurrentPosition(currentPosition - 1);\n }\n };\n\n return (\n <Button\n {...rest}\n aria-label='Previous'\n onClick={onClick}\n className={clsx(styles.navigation, className)}\n variant={variant}\n isDisabled={shouldDisablePrevious}\n >\n <Icon>\n <ChevronLeft />\n </Icon>\n </Button>\n );\n}\n\n/**\n * Navigates the carousel to the next item. Automatically disables when at the last item.\n * Note that it relies on the <Carousel/> component to supply context and must be used\n * as a child of that component.\n *\n * @param props - The control props.\n * @param props.className - Additional CSS class name.\n * @returns The next navigation button.\n */\nexport function CarouselNext({\n className,\n variant = 'flat',\n isDisabled,\n ...rest\n}: ButtonProps) {\n const context = useContext(CarouselContext);\n const { currentPosition, setCurrentPosition, items } = context;\n\n const shouldDisableNext = currentPosition === items.length - 1 || isDisabled;\n\n const onClick = () => {\n if (currentPosition + 1 < items.length) {\n setCurrentPosition(currentPosition + 1);\n }\n };\n\n return (\n <Button\n {...rest}\n aria-label='Next'\n onClick={onClick}\n className={clsx(styles.navigation, className)}\n variant={variant}\n isDisabled={shouldDisableNext}\n >\n <Icon>\n <ChevronRight />\n </Icon>\n </Button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAgB,iBAAiB,EAC/B,WACA,UAAU,QACV,YACA,GAAG,QACW;CAEd,MAAM,EAAE,iBAAiB,uBADT,WAAW,gBAAgB;CAG3C,MAAM,wBAAwB,oBAAoB,KAAK;CAEvD,MAAM,gBAAgB;AACpB,MAAI,kBAAkB,KAAK,EACzB,oBAAmB,kBAAkB,EAAE;;AAI3C,QACE,oBAAC;EACC,GAAI;EACJ,cAAW;EACF;EACT,WAAW,KAAK,OAAO,YAAY,UAAU;EACpC;EACT,YAAY;YAEZ,oBAAC,kBACC,oBAAC,gBAAc,GACV;GACA;;;;;;;;;;;AAab,SAAgB,aAAa,EAC3B,WACA,UAAU,QACV,YACA,GAAG,QACW;CAEd,MAAM,EAAE,iBAAiB,oBAAoB,UAD7B,WAAW,gBAAgB;CAG3C,MAAM,oBAAoB,oBAAoB,MAAM,SAAS,KAAK;CAElE,MAAM,gBAAgB;AACpB,MAAI,kBAAkB,IAAI,MAAM,OAC9B,oBAAmB,kBAAkB,EAAE;;AAI3C,QACE,oBAAC;EACC,GAAI;EACJ,cAAW;EACF;EACT,WAAW,KAAK,OAAO,YAAY,UAAU;EACpC;EACT,YAAY;YAEZ,oBAAC,kBACC,oBAAC,iBAAe,GACX;GACA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import "client-only";
|
|
14
|
+
import { HTMLAttributes } from "react";
|
|
15
|
+
import * as react_jsx_runtime36 from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
//#region src/components/carousel/position.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Displays the current position and total item count (e.g. "3 / 9").
|
|
20
|
+
* Note that it relies on the <Carousel/> component to supply context and must be used
|
|
21
|
+
* as a child of that component.
|
|
22
|
+
*
|
|
23
|
+
* @param props - The position display props.
|
|
24
|
+
* @param props.className - Additional CSS class name.
|
|
25
|
+
* @returns The carousel position indicator.
|
|
26
|
+
*/
|
|
27
|
+
declare function CarouselPosition({
|
|
28
|
+
className,
|
|
29
|
+
...rest
|
|
30
|
+
}: HTMLAttributes<HTMLDivElement>): react_jsx_runtime36.JSX.Element;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { CarouselPosition };
|
|
33
|
+
//# sourceMappingURL=position.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
import { CarouselContext } from "./context.js";
|
|
17
|
+
import "client-only";
|
|
18
|
+
import { useContext } from "react";
|
|
19
|
+
import { clsx } from "@accelint/design-foundation/lib/utils";
|
|
20
|
+
import { jsxs } from "react/jsx-runtime";
|
|
21
|
+
import styles from "./style.module.css";
|
|
22
|
+
|
|
23
|
+
//#region src/components/carousel/position.tsx
|
|
24
|
+
/**
|
|
25
|
+
* Displays the current position and total item count (e.g. "3 / 9").
|
|
26
|
+
* Note that it relies on the <Carousel/> component to supply context and must be used
|
|
27
|
+
* as a child of that component.
|
|
28
|
+
*
|
|
29
|
+
* @param props - The position display props.
|
|
30
|
+
* @param props.className - Additional CSS class name.
|
|
31
|
+
* @returns The carousel position indicator.
|
|
32
|
+
*/
|
|
33
|
+
function CarouselPosition({ className, ...rest }) {
|
|
34
|
+
const { currentPosition, items } = useContext(CarouselContext);
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: clsx(styles.position, className),
|
|
37
|
+
...rest,
|
|
38
|
+
children: [
|
|
39
|
+
currentPosition + 1,
|
|
40
|
+
" / ",
|
|
41
|
+
items.length
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { CarouselPosition };
|
|
48
|
+
//# sourceMappingURL=position.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.js","names":[],"sources":["../../../src/components/carousel/position.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { type HTMLAttributes, useContext } from 'react';\nimport { CarouselContext } from './context';\nimport styles from './style.module.css';\n\n/**\n * Displays the current position and total item count (e.g. \"3 / 9\").\n * Note that it relies on the <Carousel/> component to supply context and must be used\n * as a child of that component.\n *\n * @param props - The position display props.\n * @param props.className - Additional CSS class name.\n * @returns The carousel position indicator.\n */\nexport function CarouselPosition({\n className,\n ...rest\n}: HTMLAttributes<HTMLDivElement>) {\n const context = useContext(CarouselContext);\n const { currentPosition, items } = context;\n return (\n <div className={clsx(styles.position, className)} {...rest}>\n {currentPosition + 1} / {items.length}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,iBAAiB,EAC/B,WACA,GAAG,QAC8B;CAEjC,MAAM,EAAE,iBAAiB,UADT,WAAW,gBAAgB;AAE3C,QACE,qBAAC;EAAI,WAAW,KAAK,OAAO,UAAU,UAAU;EAAE,GAAI;;GACnD,kBAAkB;GAAE;GAAI,MAAM;;GAC3B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { CarouselSelectProps } from "./types.js";
|
|
14
|
+
import "client-only";
|
|
15
|
+
import * as react_jsx_runtime37 from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
//#region src/components/carousel/select.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Renders a dropdown select for navigating the carousel by item title.
|
|
20
|
+
* Note that it relies on the <Carousel/> component to supply context and must be used
|
|
21
|
+
* as a child of that component.
|
|
22
|
+
*
|
|
23
|
+
* Displays the current item's title and allows the user to jump to any
|
|
24
|
+
* item in the carousel via a select dropdown.
|
|
25
|
+
*
|
|
26
|
+
* @param props - The select props.
|
|
27
|
+
* @param props.classNames - Custom class names for select elements.
|
|
28
|
+
* @param props.classNames.field - Class names passed to the SelectField.
|
|
29
|
+
* @param props.classNames.optionItem - Class names passed to each OptionsItem.
|
|
30
|
+
* @returns The carousel select component.
|
|
31
|
+
*/
|
|
32
|
+
declare function CarouselSelect({
|
|
33
|
+
classNames,
|
|
34
|
+
...rest
|
|
35
|
+
}: CarouselSelectProps): react_jsx_runtime37.JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { CarouselSelect };
|
|
38
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
import { CarouselContext } from "./context.js";
|
|
17
|
+
import { OptionsItem } from "../options/item.js";
|
|
18
|
+
import { SelectField } from "../select-field/index.js";
|
|
19
|
+
import "client-only";
|
|
20
|
+
import { useContext } from "react";
|
|
21
|
+
import { clsx } from "@accelint/design-foundation/lib/utils";
|
|
22
|
+
import { jsx } from "react/jsx-runtime";
|
|
23
|
+
import styles from "./style.module.css";
|
|
24
|
+
|
|
25
|
+
//#region src/components/carousel/select.tsx
|
|
26
|
+
/**
|
|
27
|
+
* Renders a dropdown select for navigating the carousel by item title.
|
|
28
|
+
* Note that it relies on the <Carousel/> component to supply context and must be used
|
|
29
|
+
* as a child of that component.
|
|
30
|
+
*
|
|
31
|
+
* Displays the current item's title and allows the user to jump to any
|
|
32
|
+
* item in the carousel via a select dropdown.
|
|
33
|
+
*
|
|
34
|
+
* @param props - The select props.
|
|
35
|
+
* @param props.classNames - Custom class names for select elements.
|
|
36
|
+
* @param props.classNames.field - Class names passed to the SelectField.
|
|
37
|
+
* @param props.classNames.optionItem - Class names passed to each OptionsItem.
|
|
38
|
+
* @returns The carousel select component.
|
|
39
|
+
*/
|
|
40
|
+
function CarouselSelect({ classNames, ...rest }) {
|
|
41
|
+
const { items, currentPosition, setCurrentPosition } = useContext(CarouselContext);
|
|
42
|
+
const onChange = (key) => {
|
|
43
|
+
const index = items.findIndex((i) => i.id === key);
|
|
44
|
+
if (index >= 0) setCurrentPosition(index);
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ jsx(SelectField, {
|
|
47
|
+
...rest,
|
|
48
|
+
"aria-label": "Carousel item select",
|
|
49
|
+
value: items[currentPosition]?.title,
|
|
50
|
+
placeholder: items[currentPosition]?.title,
|
|
51
|
+
onChange,
|
|
52
|
+
classNames: {
|
|
53
|
+
...classNames?.select,
|
|
54
|
+
field: clsx(styles["gallery-select"], classNames?.select?.field),
|
|
55
|
+
trigger: clsx(styles["gallery-select"], classNames?.select?.trigger)
|
|
56
|
+
},
|
|
57
|
+
children: items.map((item) => /* @__PURE__ */ jsx(OptionsItem, {
|
|
58
|
+
textValue: item.title,
|
|
59
|
+
"aria-label": item.title,
|
|
60
|
+
id: item.id,
|
|
61
|
+
classNames: classNames?.optionItem,
|
|
62
|
+
children: item.title
|
|
63
|
+
}, item.id))
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { CarouselSelect };
|
|
69
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../../src/components/carousel/select.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport { useContext } from 'react';\nimport { OptionsItem } from '../options/item';\nimport { SelectField } from '../select-field';\nimport { CarouselContext } from './context';\nimport type { Key } from 'react-aria-components';\nimport type { CarouselSelectProps } from './types';\nimport styles from './style.module.css';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\n\n/**\n * Renders a dropdown select for navigating the carousel by item title.\n * Note that it relies on the <Carousel/> component to supply context and must be used\n * as a child of that component.\n *\n * Displays the current item's title and allows the user to jump to any\n * item in the carousel via a select dropdown.\n *\n * @param props - The select props.\n * @param props.classNames - Custom class names for select elements.\n * @param props.classNames.field - Class names passed to the SelectField.\n * @param props.classNames.optionItem - Class names passed to each OptionsItem.\n * @returns The carousel select component.\n */\nexport function CarouselSelect({ classNames, ...rest }: CarouselSelectProps) {\n const { items, currentPosition, setCurrentPosition } =\n useContext(CarouselContext);\n\n const onChange = (key: Key | null) => {\n const index = items.findIndex((i) => i.id === key);\n if (index >= 0) {\n setCurrentPosition(index);\n }\n };\n\n return (\n <SelectField\n {...rest}\n aria-label='Carousel item select'\n value={items[currentPosition]?.title}\n placeholder={items[currentPosition]?.title}\n onChange={onChange}\n classNames={{\n ...classNames?.select,\n field: clsx(styles['gallery-select'], classNames?.select?.field),\n trigger: clsx(styles['gallery-select'], classNames?.select?.trigger),\n }}\n >\n {items.map((item) => (\n <OptionsItem\n textValue={item.title}\n key={item.id}\n aria-label={item.title}\n id={item.id}\n classNames={classNames?.optionItem}\n >\n {item.title}\n </OptionsItem>\n ))}\n </SelectField>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,eAAe,EAAE,YAAY,GAAG,QAA6B;CAC3E,MAAM,EAAE,OAAO,iBAAiB,uBAC9B,WAAW,gBAAgB;CAE7B,MAAM,YAAY,QAAoB;EACpC,MAAM,QAAQ,MAAM,WAAW,MAAM,EAAE,OAAO,IAAI;AAClD,MAAI,SAAS,EACX,oBAAmB,MAAM;;AAI7B,QACE,oBAAC;EACC,GAAI;EACJ,cAAW;EACX,OAAO,MAAM,kBAAkB;EAC/B,aAAa,MAAM,kBAAkB;EAC3B;EACV,YAAY;GACV,GAAG,YAAY;GACf,OAAO,KAAK,OAAO,mBAAmB,YAAY,QAAQ,MAAM;GAChE,SAAS,KAAK,OAAO,mBAAmB,YAAY,QAAQ,QAAQ;GACrE;YAEA,MAAM,KAAK,SACV,oBAAC;GACC,WAAW,KAAK;GAEhB,cAAY,KAAK;GACjB,IAAI,KAAK;GACT,YAAY,YAAY;aAEvB,KAAK;KALD,KAAK,GAME,CACd;GACU"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@reference '@accelint/design-foundation/styles';
|
|
14
|
+
|
|
15
|
+
@layer components.l1 {
|
|
16
|
+
.carousel {
|
|
17
|
+
@apply gap-s flex flex-col;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.viewer {
|
|
21
|
+
@apply p-s flex w-full items-center justify-center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.viewer-item {
|
|
25
|
+
@apply flex aspect-3/2 h-320 w-full justify-center object-contain;
|
|
26
|
+
|
|
27
|
+
&:where([data-media='audio']) {
|
|
28
|
+
@apply items-center;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.controls {
|
|
33
|
+
@apply gap-s flex w-full flex-row items-center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.gallery-container {
|
|
37
|
+
@apply gap-x-s flex w-full flex-row overflow-x-hidden py-1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.position {
|
|
41
|
+
@apply gap-s flex flex-row items-center;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@layer components.l2 {
|
|
46
|
+
.gallery-item {
|
|
47
|
+
@apply aspect-3/2 rounded-none bg-transparent p-0 transition-all duration-200 ease-in-out;
|
|
48
|
+
height: 32px;
|
|
49
|
+
|
|
50
|
+
@variant selected {
|
|
51
|
+
@apply outline-accent-primary-bold fg-a11y-on-utility outline-2;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.navigation {
|
|
56
|
+
@apply min-w-[28px];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.gallery-select {
|
|
60
|
+
@apply w-full;
|
|
61
|
+
}
|
|
62
|
+
}
|