@accelint/design-toolkit 9.3.0 → 9.4.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 +1 -1
- package/dist/components/accordion/context.d.ts +6 -0
- package/dist/components/accordion/context.js +6 -0
- package/dist/components/accordion/context.js.map +1 -1
- package/dist/components/accordion/group.d.ts +37 -2
- package/dist/components/accordion/group.js +34 -0
- package/dist/components/accordion/group.js.map +1 -1
- package/dist/components/accordion/header.d.ts +27 -2
- package/dist/components/accordion/header.js +25 -1
- package/dist/components/accordion/header.js.map +1 -1
- package/dist/components/accordion/index.d.ts +18 -4
- package/dist/components/accordion/index.js +16 -2
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/panel.d.ts +29 -2
- package/dist/components/accordion/panel.js +26 -0
- package/dist/components/accordion/panel.js.map +1 -1
- package/dist/components/accordion/trigger.d.ts +25 -2
- package/dist/components/accordion/trigger.js +23 -1
- package/dist/components/accordion/trigger.js.map +1 -1
- package/dist/components/accordion/types.d.ts +33 -0
- package/dist/components/action-bar/index.d.ts +29 -8
- package/dist/components/action-bar/index.js +27 -6
- package/dist/components/action-bar/index.js.map +1 -1
- package/dist/components/action-bar/types.d.ts +7 -0
- package/dist/components/avatar/context.d.ts +22 -4
- package/dist/components/avatar/context.js +18 -0
- package/dist/components/avatar/context.js.map +1 -1
- package/dist/components/avatar/index.d.ts +22 -15
- package/dist/components/avatar/index.js +21 -14
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/avatar/types.d.ts +13 -0
- package/dist/components/badge/context.d.ts +20 -2
- package/dist/components/badge/context.js +18 -0
- package/dist/components/badge/context.js.map +1 -1
- package/dist/components/badge/index.d.ts +28 -14
- package/dist/components/badge/index.js +28 -14
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/badge/types.d.ts +9 -0
- package/dist/components/breadcrumbs/index.d.ts +8 -0
- package/dist/components/breadcrumbs/index.js +7 -0
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/breadcrumbs/item.d.ts +23 -0
- package/dist/components/breadcrumbs/item.js +23 -1
- package/dist/components/breadcrumbs/item.js.map +1 -1
- package/dist/components/breadcrumbs/types.d.ts +17 -0
- package/dist/components/button/context.d.ts +62 -8
- package/dist/components/button/context.js +54 -0
- package/dist/components/button/context.js.map +1 -1
- package/dist/components/button/index.d.ts +21 -2
- package/dist/components/button/index.js +19 -0
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/link.d.ts +20 -0
- package/dist/components/button/link.js +20 -0
- package/dist/components/button/link.js.map +1 -1
- package/dist/components/button/toggle.d.ts +23 -2
- package/dist/components/button/toggle.js +22 -1
- package/dist/components/button/toggle.js.map +1 -1
- package/dist/components/button/types.d.ts +26 -0
- package/dist/components/checkbox/context.d.ts +9 -3
- package/dist/components/checkbox/context.js +6 -0
- package/dist/components/checkbox/context.js.map +1 -1
- package/dist/components/checkbox/group.d.ts +31 -2
- package/dist/components/checkbox/group.js +28 -0
- package/dist/components/checkbox/group.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +19 -2
- package/dist/components/checkbox/index.js +19 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/types.d.ts +19 -0
- package/dist/components/chip/context.d.ts +22 -4
- package/dist/components/chip/context.js +18 -0
- package/dist/components/chip/context.js.map +1 -1
- package/dist/components/chip/deletable.d.ts +38 -2
- package/dist/components/chip/deletable.js +36 -1
- package/dist/components/chip/deletable.js.map +1 -1
- package/dist/components/chip/index.d.ts +24 -2
- package/dist/components/chip/index.js +22 -0
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/list.d.ts +47 -2
- package/dist/components/chip/list.js +45 -0
- package/dist/components/chip/list.js.map +1 -1
- package/dist/components/chip/selectable.d.ts +32 -0
- package/dist/components/chip/selectable.js +31 -0
- package/dist/components/chip/selectable.js.map +1 -1
- package/dist/components/chip/types.d.ts +27 -0
- package/dist/components/classification-badge/context.d.ts +18 -2
- package/dist/components/classification-badge/context.js +16 -0
- package/dist/components/classification-badge/context.js.map +1 -1
- package/dist/components/classification-badge/index.d.ts +26 -8
- package/dist/components/classification-badge/index.js +25 -8
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-badge/types.d.ts +4 -0
- package/dist/components/classification-banner/context.d.ts +20 -4
- package/dist/components/classification-banner/context.js +16 -0
- package/dist/components/classification-banner/context.js.map +1 -1
- package/dist/components/classification-banner/index.d.ts +12 -2
- package/dist/components/classification-banner/index.js +9 -0
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/classification-banner/types.d.ts +4 -0
- package/dist/components/clock/index.d.ts +12 -2
- package/dist/components/clock/index.js +10 -0
- package/dist/components/clock/index.js.map +1 -1
- package/dist/components/clock/types.d.ts +4 -0
- package/dist/components/color-picker/index.d.ts +12 -10
- package/dist/components/color-picker/index.js +10 -8
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-picker/types.d.ts +8 -0
- package/dist/components/combobox-field/context.d.ts +20 -4
- package/dist/components/combobox-field/context.js +16 -0
- package/dist/components/combobox-field/context.js.map +1 -1
- package/dist/components/combobox-field/index.d.ts +15 -2
- package/dist/components/combobox-field/index.js +13 -1
- package/dist/components/combobox-field/index.js.map +1 -1
- package/dist/components/combobox-field/types.d.ts +19 -0
- package/dist/components/coordinate-field/context.d.ts +15 -6
- package/dist/components/coordinate-field/context.js +9 -0
- package/dist/components/coordinate-field/context.js.map +1 -1
- package/dist/components/coordinate-field/coordinate-utils.d.ts +8 -0
- package/dist/components/coordinate-field/coordinate-utils.js +8 -0
- package/dist/components/coordinate-field/coordinate-utils.js.map +1 -1
- package/dist/components/coordinate-field/index.d.ts +29 -2
- package/dist/components/coordinate-field/index.js +29 -3
- package/dist/components/coordinate-field/index.js.map +1 -1
- package/dist/components/coordinate-field/segment.d.ts +27 -2
- package/dist/components/coordinate-field/segment.js +25 -0
- package/dist/components/coordinate-field/segment.js.map +1 -1
- package/dist/components/coordinate-field/styles.module.css +5 -1
- package/dist/components/date-field/index.d.ts +27 -2
- package/dist/components/date-field/index.js +25 -0
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-field/types.d.ts +19 -3
- package/dist/components/deferred-collection/index.d.ts +10 -2
- package/dist/components/deferred-collection/index.js +8 -0
- package/dist/components/deferred-collection/index.js.map +1 -1
- package/dist/components/deferred-collection/types.d.ts +6 -3
- package/dist/components/details-list/context.d.ts +25 -4
- package/dist/components/details-list/context.js +21 -0
- package/dist/components/details-list/context.js.map +1 -1
- package/dist/components/details-list/index.d.ts +9 -2
- package/dist/components/details-list/index.js +7 -0
- package/dist/components/details-list/index.js.map +1 -1
- package/dist/components/details-list/label.d.ts +18 -2
- package/dist/components/details-list/label.js +16 -0
- package/dist/components/details-list/label.js.map +1 -1
- package/dist/components/details-list/types.d.ts +14 -0
- package/dist/components/details-list/value.d.ts +20 -2
- package/dist/components/details-list/value.js +17 -0
- package/dist/components/details-list/value.js.map +1 -1
- package/dist/components/dialog/content.d.ts +23 -2
- package/dist/components/dialog/content.js +20 -0
- package/dist/components/dialog/content.js.map +1 -1
- package/dist/components/dialog/context.d.ts +5 -2
- package/dist/components/dialog/context.js +3 -0
- package/dist/components/dialog/context.js.map +1 -1
- package/dist/components/dialog/footer.d.ts +26 -2
- package/dist/components/dialog/footer.js +23 -0
- package/dist/components/dialog/footer.js.map +1 -1
- package/dist/components/dialog/index.d.ts +12 -2
- package/dist/components/dialog/index.js +10 -0
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/title.d.ts +21 -2
- package/dist/components/dialog/title.js +18 -0
- package/dist/components/dialog/title.js.map +1 -1
- package/dist/components/dialog/trigger.d.ts +18 -0
- package/dist/components/dialog/trigger.js +17 -0
- package/dist/components/dialog/trigger.js.map +1 -1
- package/dist/components/dialog/types.d.ts +12 -0
- package/dist/components/divider/context.d.ts +24 -4
- package/dist/components/divider/context.js +20 -0
- package/dist/components/divider/context.js.map +1 -1
- package/dist/components/divider/index.d.ts +13 -2
- package/dist/components/divider/index.js +10 -0
- package/dist/components/divider/index.js.map +1 -1
- package/dist/components/divider/types.d.ts +4 -4
- package/dist/components/drawer/back.d.ts +21 -2
- package/dist/components/drawer/back.js +19 -1
- package/dist/components/drawer/back.js.map +1 -1
- package/dist/components/drawer/close.d.ts +25 -2
- package/dist/components/drawer/close.js +28 -3
- package/dist/components/drawer/close.js.map +1 -1
- package/dist/components/drawer/content.d.ts +22 -2
- package/dist/components/drawer/content.js +19 -0
- package/dist/components/drawer/content.js.map +1 -1
- package/dist/components/drawer/context.d.ts +46 -4
- package/dist/components/drawer/context.js +45 -2
- package/dist/components/drawer/context.js.map +1 -1
- package/dist/components/drawer/events.d.ts +2 -0
- package/dist/components/drawer/events.js +2 -0
- package/dist/components/drawer/events.js.map +1 -1
- package/dist/components/drawer/footer.d.ts +24 -2
- package/dist/components/drawer/footer.js +21 -0
- package/dist/components/drawer/footer.js.map +1 -1
- package/dist/components/drawer/header-title.d.ts +22 -4
- package/dist/components/drawer/header-title.js +19 -2
- package/dist/components/drawer/header-title.js.map +1 -1
- package/dist/components/drawer/header.d.ts +34 -2
- package/dist/components/drawer/header.js +42 -2
- package/dist/components/drawer/header.js.map +1 -1
- package/dist/components/drawer/index.d.ts +14 -2
- package/dist/components/drawer/index.js +16 -0
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/drawer/layout-main.d.ts +23 -2
- package/dist/components/drawer/layout-main.js +20 -0
- package/dist/components/drawer/layout-main.js.map +1 -1
- package/dist/components/drawer/layout.d.ts +25 -2
- package/dist/components/drawer/layout.js +22 -0
- package/dist/components/drawer/layout.js.map +1 -1
- package/dist/components/drawer/menu-item.d.ts +25 -2
- package/dist/components/drawer/menu-item.js +22 -0
- package/dist/components/drawer/menu-item.js.map +1 -1
- package/dist/components/drawer/menu.d.ts +22 -2
- package/dist/components/drawer/menu.js +19 -0
- package/dist/components/drawer/menu.js.map +1 -1
- package/dist/components/drawer/panel.d.ts +21 -2
- package/dist/components/drawer/panel.js +18 -0
- package/dist/components/drawer/panel.js.map +1 -1
- package/dist/components/drawer/trigger.d.ts +31 -2
- package/dist/components/drawer/trigger.js +29 -1
- package/dist/components/drawer/trigger.js.map +1 -1
- package/dist/components/drawer/types.d.ts +149 -2
- package/dist/components/drawer/view.d.ts +25 -2
- package/dist/components/drawer/view.js +22 -0
- package/dist/components/drawer/view.js.map +1 -1
- package/dist/components/flashcard/index.d.ts +129 -27
- package/dist/components/flashcard/index.js +120 -18
- package/dist/components/flashcard/index.js.map +1 -1
- package/dist/components/flashcard/styles.module.css +1 -1
- package/dist/components/flashcard/types.d.ts +12 -0
- package/dist/components/hero/context.d.ts +5 -2
- package/dist/components/hero/context.js +3 -0
- package/dist/components/hero/context.js.map +1 -1
- package/dist/components/hero/index.d.ts +9 -2
- package/dist/components/hero/index.js +7 -0
- package/dist/components/hero/index.js.map +1 -1
- package/dist/components/hero/subtitle.d.ts +17 -2
- package/dist/components/hero/subtitle.js +15 -0
- package/dist/components/hero/subtitle.js.map +1 -1
- package/dist/components/hero/title.d.ts +15 -2
- package/dist/components/hero/title.js +13 -0
- package/dist/components/hero/title.js.map +1 -1
- package/dist/components/hero/types.d.ts +9 -0
- package/dist/components/hotkey/context.d.ts +24 -4
- package/dist/components/hotkey/context.js +20 -0
- package/dist/components/hotkey/context.js.map +1 -1
- package/dist/components/hotkey/index.d.ts +17 -2
- package/dist/components/hotkey/index.js +15 -0
- package/dist/components/hotkey/index.js.map +1 -1
- package/dist/components/hotkey/set.d.ts +21 -2
- package/dist/components/hotkey/set.js +18 -0
- package/dist/components/hotkey/set.js.map +1 -1
- package/dist/components/hotkey/types.d.ts +4 -0
- package/dist/components/icon/context.d.ts +24 -4
- package/dist/components/icon/context.js +20 -0
- package/dist/components/icon/context.js.map +1 -1
- package/dist/components/icon/index.d.ts +15 -2
- package/dist/components/icon/index.js +13 -0
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/icon/types.d.ts +4 -0
- package/dist/components/input/context.d.ts +4 -0
- package/dist/components/input/context.js +4 -0
- package/dist/components/input/context.js.map +1 -1
- package/dist/components/input/index.d.ts +17 -2
- package/dist/components/input/index.js +16 -1
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/types.d.ts +16 -0
- package/dist/components/kanban/card-body.d.ts +10 -2
- package/dist/components/kanban/card-body.js +8 -0
- package/dist/components/kanban/card-body.js.map +1 -1
- package/dist/components/kanban/card-header-actions.d.ts +10 -2
- package/dist/components/kanban/card-header-actions.js +8 -0
- package/dist/components/kanban/card-header-actions.js.map +1 -1
- package/dist/components/kanban/card-header-title.d.ts +10 -2
- package/dist/components/kanban/card-header-title.js +8 -0
- package/dist/components/kanban/card-header-title.js.map +1 -1
- package/dist/components/kanban/card-header.d.ts +12 -2
- package/dist/components/kanban/card-header.js +10 -0
- package/dist/components/kanban/card-header.js.map +1 -1
- package/dist/components/kanban/card.d.ts +26 -2
- package/dist/components/kanban/card.js +23 -0
- package/dist/components/kanban/card.js.map +1 -1
- package/dist/components/kanban/column-actions.d.ts +10 -2
- package/dist/components/kanban/column-actions.js +9 -1
- package/dist/components/kanban/column-actions.js.map +1 -1
- package/dist/components/kanban/column-container.d.ts +10 -2
- package/dist/components/kanban/column-container.js +8 -0
- package/dist/components/kanban/column-container.js.map +1 -1
- package/dist/components/kanban/column-content.d.ts +13 -2
- package/dist/components/kanban/column-content.js +11 -0
- package/dist/components/kanban/column-content.js.map +1 -1
- package/dist/components/kanban/column-header-actions.d.ts +13 -2
- package/dist/components/kanban/column-header-actions.js +11 -0
- package/dist/components/kanban/column-header-actions.js.map +1 -1
- package/dist/components/kanban/column-header-drag-handle.d.ts +7 -2
- package/dist/components/kanban/column-header-drag-handle.js +6 -1
- package/dist/components/kanban/column-header-drag-handle.js.map +1 -1
- package/dist/components/kanban/column-header-title.d.ts +10 -2
- package/dist/components/kanban/column-header-title.js +8 -0
- package/dist/components/kanban/column-header-title.js.map +1 -1
- package/dist/components/kanban/column-header.d.ts +12 -2
- package/dist/components/kanban/column-header.js +10 -0
- package/dist/components/kanban/column-header.js.map +1 -1
- package/dist/components/kanban/column.d.ts +22 -2
- package/dist/components/kanban/column.js +19 -0
- package/dist/components/kanban/column.js.map +1 -1
- package/dist/components/kanban/context.d.ts +49 -2
- package/dist/components/kanban/context.js +30 -0
- package/dist/components/kanban/context.js.map +1 -1
- package/dist/components/kanban/header-actions.d.ts +10 -2
- package/dist/components/kanban/header-actions.js +8 -0
- package/dist/components/kanban/header-actions.js.map +1 -1
- package/dist/components/kanban/header-search.d.ts +9 -2
- package/dist/components/kanban/header-search.js +7 -0
- package/dist/components/kanban/header-search.js.map +1 -1
- package/dist/components/kanban/header-title.d.ts +10 -2
- package/dist/components/kanban/header-title.js +8 -0
- package/dist/components/kanban/header-title.js.map +1 -1
- package/dist/components/kanban/header.d.ts +12 -2
- package/dist/components/kanban/header.js +10 -0
- package/dist/components/kanban/header.js.map +1 -1
- package/dist/components/kanban/kanban.d.ts +33 -4
- package/dist/components/kanban/kanban.js +29 -0
- package/dist/components/kanban/kanban.js.map +1 -1
- package/dist/components/kanban/types.d.ts +51 -0
- package/dist/components/label/context.d.ts +25 -4
- package/dist/components/label/context.js +21 -0
- package/dist/components/label/context.js.map +1 -1
- package/dist/components/label/index.d.ts +16 -2
- package/dist/components/label/index.js +14 -0
- package/dist/components/label/index.js.map +1 -1
- package/dist/components/label/types.d.ts +5 -0
- package/dist/components/lines/index.d.ts +10 -0
- package/dist/components/lines/index.js +9 -0
- package/dist/components/lines/index.js.map +1 -1
- package/dist/components/lines/types.d.ts +6 -0
- package/dist/components/link/context.d.ts +21 -2
- package/dist/components/link/context.js +18 -0
- package/dist/components/link/context.js.map +1 -1
- package/dist/components/link/index.d.ts +12 -2
- package/dist/components/link/index.js +9 -0
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/link/types.d.ts +5 -0
- package/dist/components/list/context.d.ts +11 -2
- package/dist/components/list/context.js +9 -0
- package/dist/components/list/context.js.map +1 -1
- package/dist/components/list/index.d.ts +11 -2
- package/dist/components/list/index.js +9 -0
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list/item-content.d.ts +9 -2
- package/dist/components/list/item-content.js +6 -0
- package/dist/components/list/item-content.js.map +1 -1
- package/dist/components/list/item-description.d.ts +9 -2
- package/dist/components/list/item-description.js +7 -0
- package/dist/components/list/item-description.js.map +1 -1
- package/dist/components/list/item-title.d.ts +9 -2
- package/dist/components/list/item-title.js +7 -0
- package/dist/components/list/item-title.js.map +1 -1
- package/dist/components/list/item.d.ts +10 -2
- package/dist/components/list/item.js +8 -0
- package/dist/components/list/item.js.map +1 -1
- package/dist/components/list/types.d.ts +22 -0
- package/dist/components/menu/context.d.ts +6 -2
- package/dist/components/menu/context.js +4 -0
- package/dist/components/menu/context.js.map +1 -1
- package/dist/components/menu/index.d.ts +24 -3
- package/dist/components/menu/index.js +22 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/item-description.d.ts +17 -2
- package/dist/components/menu/item-description.js +15 -0
- package/dist/components/menu/item-description.js.map +1 -1
- package/dist/components/menu/item-label.d.ts +17 -2
- package/dist/components/menu/item-label.js +15 -0
- package/dist/components/menu/item-label.js.map +1 -1
- package/dist/components/menu/item.d.ts +23 -2
- package/dist/components/menu/item.js +21 -1
- package/dist/components/menu/item.js.map +1 -1
- package/dist/components/menu/section.d.ts +23 -2
- package/dist/components/menu/section.js +20 -0
- package/dist/components/menu/section.js.map +1 -1
- package/dist/components/menu/separator.d.ts +16 -2
- package/dist/components/menu/separator.js +14 -0
- package/dist/components/menu/separator.js.map +1 -1
- package/dist/components/menu/submenu.d.ts +18 -2
- package/dist/components/menu/submenu.js +16 -0
- package/dist/components/menu/submenu.js.map +1 -1
- package/dist/components/menu/trigger.d.ts +15 -0
- package/dist/components/menu/trigger.js +15 -0
- package/dist/components/menu/trigger.js.map +1 -1
- package/dist/components/menu/types.d.ts +25 -0
- package/dist/components/notice/events.d.ts +9 -0
- package/dist/components/notice/events.js +9 -0
- package/dist/components/notice/events.js.map +1 -1
- package/dist/components/notice/index.d.ts +34 -2
- package/dist/components/notice/index.js +32 -1
- package/dist/components/notice/index.js.map +1 -1
- package/dist/components/notice/list.d.ts +31 -2
- package/dist/components/notice/list.js +28 -0
- package/dist/components/notice/list.js.map +1 -1
- package/dist/components/notice/notice-icon.d.ts +22 -2
- package/dist/components/notice/notice-icon.js +23 -1
- package/dist/components/notice/notice-icon.js.map +1 -1
- package/dist/components/notice/types.d.ts +60 -0
- package/dist/components/notice/utils.d.ts +8 -0
- package/dist/components/notice/utils.js +8 -0
- package/dist/components/notice/utils.js.map +1 -1
- package/dist/components/options/context.d.ts +1 -0
- package/dist/components/options/context.js +1 -0
- package/dist/components/options/context.js.map +1 -1
- package/dist/components/options/index.d.ts +15 -2
- package/dist/components/options/index.js +13 -0
- package/dist/components/options/index.js.map +1 -1
- package/dist/components/options/item-content.d.ts +22 -2
- package/dist/components/options/item-content.js +19 -0
- package/dist/components/options/item-content.js.map +1 -1
- package/dist/components/options/item-description.d.ts +14 -2
- package/dist/components/options/item-description.js +12 -0
- package/dist/components/options/item-description.js.map +1 -1
- package/dist/components/options/item-label.d.ts +14 -2
- package/dist/components/options/item-label.js +12 -0
- package/dist/components/options/item-label.js.map +1 -1
- package/dist/components/options/item.d.ts +24 -2
- package/dist/components/options/item.js +21 -0
- package/dist/components/options/item.js.map +1 -1
- package/dist/components/options/section.d.ts +21 -2
- package/dist/components/options/section.js +18 -0
- package/dist/components/options/section.js.map +1 -1
- package/dist/components/options/types.d.ts +24 -0
- package/dist/components/pagination/context.d.ts +3 -2
- package/dist/components/pagination/context.js +1 -0
- package/dist/components/pagination/context.js.map +1 -1
- package/dist/components/pagination/index.d.ts +18 -11
- package/dist/components/pagination/index.js +15 -9
- package/dist/components/pagination/index.js.map +1 -1
- package/dist/components/pagination/next.d.ts +17 -2
- package/dist/components/pagination/next.js +15 -0
- package/dist/components/pagination/next.js.map +1 -1
- package/dist/components/pagination/pages.d.ts +21 -2
- package/dist/components/pagination/pages.js +18 -0
- package/dist/components/pagination/pages.js.map +1 -1
- package/dist/components/pagination/prev.d.ts +17 -2
- package/dist/components/pagination/prev.js +16 -1
- package/dist/components/pagination/prev.js.map +1 -1
- package/dist/components/pagination/types.d.ts +32 -0
- package/dist/components/pagination/utils.d.ts +35 -0
- package/dist/components/pagination/utils.js +35 -0
- package/dist/components/pagination/utils.js.map +1 -1
- package/dist/components/popover/content.d.ts +20 -2
- package/dist/components/popover/content.js +17 -0
- package/dist/components/popover/content.js.map +1 -1
- package/dist/components/popover/footer.d.ts +22 -2
- package/dist/components/popover/footer.js +19 -0
- package/dist/components/popover/footer.js.map +1 -1
- package/dist/components/popover/index.d.ts +9 -2
- package/dist/components/popover/index.js +8 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/styles.module.css +6 -0
- package/dist/components/popover/title.d.ts +17 -2
- package/dist/components/popover/title.js +15 -0
- package/dist/components/popover/title.js.map +1 -1
- package/dist/components/popover/trigger.d.ts +24 -2
- package/dist/components/popover/trigger.js +21 -0
- package/dist/components/popover/trigger.js.map +1 -1
- package/dist/components/popover/types.d.ts +10 -0
- package/dist/components/query-builder/action-element.d.ts +20 -2
- package/dist/components/query-builder/action-element.js +17 -0
- package/dist/components/query-builder/action-element.js.map +1 -1
- package/dist/components/query-builder/actions.d.ts +37 -4
- package/dist/components/query-builder/actions.js +36 -1
- package/dist/components/query-builder/actions.js.map +1 -1
- package/dist/components/query-builder/combinator-selector.d.ts +10 -2
- package/dist/components/query-builder/combinator-selector.js +8 -0
- package/dist/components/query-builder/combinator-selector.js.map +1 -1
- package/dist/components/query-builder/constants.d.ts +1 -0
- package/dist/components/query-builder/constants.js +1 -0
- package/dist/components/query-builder/constants.js.map +1 -1
- package/dist/components/query-builder/index.d.ts +11 -2
- package/dist/components/query-builder/index.js +9 -0
- package/dist/components/query-builder/index.js.map +1 -1
- package/dist/components/query-builder/rule-group.d.ts +52 -4
- package/dist/components/query-builder/rule-group.js +47 -0
- package/dist/components/query-builder/rule-group.js.map +1 -1
- package/dist/components/query-builder/rule.d.ts +20 -2
- package/dist/components/query-builder/rule.js +18 -0
- package/dist/components/query-builder/rule.js.map +1 -1
- package/dist/components/query-builder/types.d.ts +9 -0
- package/dist/components/query-builder/utils.d.ts +15 -0
- package/dist/components/query-builder/utils.js +15 -0
- package/dist/components/query-builder/utils.js.map +1 -1
- package/dist/components/query-builder/value-editor.d.ts +23 -2
- package/dist/components/query-builder/value-editor.js +20 -0
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/query-builder/value-selector.d.ts +23 -2
- package/dist/components/query-builder/value-selector.js +20 -0
- package/dist/components/query-builder/value-selector.js.map +1 -1
- package/dist/components/radio/context.d.ts +2 -2
- package/dist/components/radio/group.d.ts +19 -2
- package/dist/components/radio/group.js +16 -0
- package/dist/components/radio/group.js.map +1 -1
- package/dist/components/radio/index.d.ts +13 -26
- package/dist/components/radio/index.js +11 -24
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/types.d.ts +16 -0
- package/dist/components/search-field/context.d.ts +7 -4
- package/dist/components/search-field/context.js +3 -0
- package/dist/components/search-field/context.js.map +1 -1
- package/dist/components/search-field/index.d.ts +15 -24
- package/dist/components/search-field/index.js +16 -23
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-field/types.d.ts +13 -0
- package/dist/components/select-field/context.d.ts +11 -4
- package/dist/components/select-field/context.js +7 -0
- package/dist/components/select-field/context.js.map +1 -1
- package/dist/components/select-field/index.d.ts +19 -39
- package/dist/components/select-field/index.js +18 -38
- package/dist/components/select-field/index.js.map +1 -1
- package/dist/components/select-field/styles.module.css +8 -0
- package/dist/components/select-field/types.d.ts +18 -0
- package/dist/components/sidenav/avatar.d.ts +19 -2
- package/dist/components/sidenav/avatar.js +16 -0
- package/dist/components/sidenav/avatar.js.map +1 -1
- package/dist/components/sidenav/content.d.ts +23 -2
- package/dist/components/sidenav/content.js +20 -0
- package/dist/components/sidenav/content.js.map +1 -1
- package/dist/components/sidenav/context.d.ts +3 -2
- package/dist/components/sidenav/context.js +1 -0
- package/dist/components/sidenav/context.js.map +1 -1
- package/dist/components/sidenav/events.d.ts +2 -0
- package/dist/components/sidenav/events.js +2 -0
- package/dist/components/sidenav/events.js.map +1 -1
- package/dist/components/sidenav/footer.d.ts +16 -2
- package/dist/components/sidenav/footer.js +13 -0
- package/dist/components/sidenav/footer.js.map +1 -1
- package/dist/components/sidenav/header.d.ts +20 -2
- package/dist/components/sidenav/header.js +18 -1
- package/dist/components/sidenav/header.js.map +1 -1
- package/dist/components/sidenav/index.d.ts +11 -2
- package/dist/components/sidenav/index.js +9 -0
- package/dist/components/sidenav/index.js.map +1 -1
- package/dist/components/sidenav/item.d.ts +17 -2
- package/dist/components/sidenav/item.js +14 -0
- package/dist/components/sidenav/item.js.map +1 -1
- package/dist/components/sidenav/link.d.ts +17 -2
- package/dist/components/sidenav/link.js +15 -1
- package/dist/components/sidenav/link.js.map +1 -1
- package/dist/components/sidenav/menu-item.d.ts +16 -2
- package/dist/components/sidenav/menu-item.js +13 -0
- package/dist/components/sidenav/menu-item.js.map +1 -1
- package/dist/components/sidenav/menu.d.ts +19 -2
- package/dist/components/sidenav/menu.js +17 -1
- package/dist/components/sidenav/menu.js.map +1 -1
- package/dist/components/sidenav/trigger.d.ts +17 -2
- package/dist/components/sidenav/trigger.js +14 -0
- package/dist/components/sidenav/trigger.js.map +1 -1
- package/dist/components/sidenav/types.d.ts +53 -0
- package/dist/components/skeleton/index.d.ts +12 -27
- package/dist/components/skeleton/index.js +10 -24
- package/dist/components/skeleton/index.js.map +1 -1
- package/dist/components/skeleton/types.d.ts +4 -0
- package/dist/components/slider/index.d.ts +30 -29
- package/dist/components/slider/index.js +28 -27
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/types.d.ts +18 -0
- package/dist/components/switch/context.d.ts +16 -10
- package/dist/components/switch/context.js +13 -7
- package/dist/components/switch/context.js.map +1 -1
- package/dist/components/switch/index.d.ts +14 -31
- package/dist/components/switch/index.js +12 -29
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/types.d.ts +5 -0
- package/dist/components/table/body.d.ts +21 -2
- package/dist/components/table/body.js +18 -0
- package/dist/components/table/body.js.map +1 -1
- package/dist/components/table/cell.d.ts +22 -2
- package/dist/components/table/cell.js +19 -0
- package/dist/components/table/cell.js.map +1 -1
- package/dist/components/table/constants/table.d.ts +6 -0
- package/dist/components/table/constants/table.js +4 -0
- package/dist/components/table/constants/table.js.map +1 -1
- package/dist/components/table/context.d.ts +3 -2
- package/dist/components/table/context.js +1 -0
- package/dist/components/table/context.js.map +1 -1
- package/dist/components/table/header-cell.d.ts +24 -2
- package/dist/components/table/header-cell.js +24 -1
- package/dist/components/table/header-cell.js.map +1 -1
- package/dist/components/table/header.d.ts +20 -0
- package/dist/components/table/header.js +19 -0
- package/dist/components/table/header.js.map +1 -1
- package/dist/components/table/index.d.ts +28 -6
- package/dist/components/table/index.js +27 -5
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row.d.ts +26 -2
- package/dist/components/table/row.js +23 -0
- package/dist/components/table/row.js.map +1 -1
- package/dist/components/table/types.d.ts +3 -0
- package/dist/components/tabs/context.d.ts +20 -10
- package/dist/components/tabs/context.js +17 -7
- package/dist/components/tabs/context.js.map +1 -1
- package/dist/components/tabs/index.d.ts +17 -40
- package/dist/components/tabs/index.js +15 -38
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tabs/list.d.ts +20 -4
- package/dist/components/tabs/list.js +17 -2
- package/dist/components/tabs/list.js.map +1 -1
- package/dist/components/tabs/panel.d.ts +21 -4
- package/dist/components/tabs/panel.js +18 -2
- package/dist/components/tabs/panel.js.map +1 -1
- package/dist/components/tabs/tab.d.ts +17 -4
- package/dist/components/tabs/tab.js +14 -2
- package/dist/components/tabs/tab.js.map +1 -1
- package/dist/components/tabs/types.d.ts +3 -0
- package/dist/components/text-area-field/context.d.ts +20 -10
- package/dist/components/text-area-field/context.js +17 -7
- package/dist/components/text-area-field/context.js.map +1 -1
- package/dist/components/text-area-field/index.d.ts +20 -15
- package/dist/components/text-area-field/index.js +18 -13
- package/dist/components/text-area-field/index.js.map +1 -1
- package/dist/components/text-area-field/styles.module.css +1 -1
- package/dist/components/text-area-field/types.d.ts +9 -0
- package/dist/components/text-field/context.d.ts +24 -4
- package/dist/components/text-field/context.js +20 -0
- package/dist/components/text-field/context.js.map +1 -1
- package/dist/components/text-field/index.d.ts +17 -82
- package/dist/components/text-field/index.js +15 -80
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/text-field/types.d.ts +9 -0
- package/dist/components/time-field/index.d.ts +23 -5
- package/dist/components/time-field/index.js +21 -4
- package/dist/components/time-field/index.js.map +1 -1
- package/dist/components/time-field/types.d.ts +9 -0
- package/dist/components/tooltip/context.d.ts +3 -2
- package/dist/components/tooltip/context.js +1 -0
- package/dist/components/tooltip/context.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +15 -30
- package/dist/components/tooltip/index.js +13 -28
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tooltip/trigger.d.ts +22 -2
- package/dist/components/tooltip/trigger.js +19 -0
- package/dist/components/tooltip/trigger.js.map +1 -1
- package/dist/components/tooltip/types.d.ts +7 -0
- package/dist/components/tree/context.d.ts +5 -9
- package/dist/components/tree/context.js +2 -6
- package/dist/components/tree/context.js.map +1 -1
- package/dist/components/tree/index.d.ts +30 -8
- package/dist/components/tree/index.js +28 -6
- package/dist/components/tree/index.js.map +1 -1
- package/dist/components/tree/item-actions.d.ts +19 -4
- package/dist/components/tree/item-actions.js +16 -2
- package/dist/components/tree/item-actions.js.map +1 -1
- package/dist/components/tree/item-content.d.ts +18 -4
- package/dist/components/tree/item-content.js +20 -3
- package/dist/components/tree/item-content.js.map +1 -1
- package/dist/components/tree/item-description.d.ts +15 -4
- package/dist/components/tree/item-description.js +13 -2
- package/dist/components/tree/item-description.js.map +1 -1
- package/dist/components/tree/item-label.d.ts +15 -4
- package/dist/components/tree/item-label.js +13 -2
- package/dist/components/tree/item-label.js.map +1 -1
- package/dist/components/tree/item-prefix-icon.d.ts +15 -4
- package/dist/components/tree/item-prefix-icon.js +13 -2
- package/dist/components/tree/item-prefix-icon.js.map +1 -1
- package/dist/components/tree/item.d.ts +24 -4
- package/dist/components/tree/item.js +21 -2
- package/dist/components/tree/item.js.map +1 -1
- package/dist/components/tree/lines.d.ts +10 -2
- package/dist/components/tree/lines.js +8 -0
- package/dist/components/tree/lines.js.map +1 -1
- package/dist/components/tree/types.d.ts +26 -0
- package/dist/components/view-stack/context.d.ts +20 -9
- package/dist/components/view-stack/context.js +18 -7
- package/dist/components/view-stack/context.js.map +1 -1
- package/dist/components/view-stack/events.d.ts +2 -0
- package/dist/components/view-stack/events.js +2 -0
- package/dist/components/view-stack/events.js.map +1 -1
- package/dist/components/view-stack/index.d.ts +16 -24
- package/dist/components/view-stack/index.js +14 -22
- package/dist/components/view-stack/index.js.map +1 -1
- package/dist/components/view-stack/trigger.d.ts +26 -4
- package/dist/components/view-stack/trigger.js +23 -2
- package/dist/components/view-stack/trigger.js.map +1 -1
- package/dist/components/view-stack/types.d.ts +29 -0
- package/dist/components/view-stack/view.d.ts +22 -2
- package/dist/components/view-stack/view.js +19 -0
- package/dist/components/view-stack/view.js.map +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-copy.d.ts +44 -0
- package/dist/hooks/coordinate-field/use-coordinate-copy.js +35 -0
- package/dist/hooks/coordinate-field/use-coordinate-copy.js.map +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-field-state.d.ts +69 -0
- package/dist/hooks/coordinate-field/use-coordinate-field-state.js +50 -0
- package/dist/hooks/coordinate-field/use-coordinate-field-state.js.map +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-field.d.ts +61 -0
- package/dist/hooks/coordinate-field/use-coordinate-field.js +47 -0
- package/dist/hooks/coordinate-field/use-coordinate-field.js.map +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-focus.d.ts +51 -0
- package/dist/hooks/coordinate-field/use-coordinate-focus.js +39 -0
- package/dist/hooks/coordinate-field/use-coordinate-focus.js.map +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-paste.d.ts +63 -0
- package/dist/hooks/coordinate-field/use-coordinate-paste.js +51 -0
- package/dist/hooks/coordinate-field/use-coordinate-paste.js.map +1 -1
- package/dist/hooks/coordinate-field/use-timeout-cleanup.d.ts +32 -0
- package/dist/hooks/coordinate-field/use-timeout-cleanup.js +30 -0
- package/dist/hooks/coordinate-field/use-timeout-cleanup.js.map +1 -1
- package/dist/hooks/use-frame-delay/index.d.ts +5 -0
- package/dist/hooks/use-frame-delay/index.js +5 -0
- package/dist/hooks/use-frame-delay/index.js.map +1 -1
- package/dist/hooks/use-tree/actions/index.d.ts +4 -2
- package/dist/hooks/use-tree/actions/index.js +4 -2
- package/dist/hooks/use-tree/actions/index.js.map +1 -1
- package/dist/hooks/use-tree/state/index.d.ts +7 -0
- package/dist/hooks/use-tree/state/index.js +7 -0
- package/dist/hooks/use-tree/state/index.js.map +1 -1
- package/dist/hooks/use-tree/types.d.ts +22 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/lib/types.d.ts +17 -0
- package/dist/lib/utils.d.ts +15 -0
- package/dist/lib/utils.js +15 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/providers/portal.d.ts +11 -2
- package/dist/providers/portal.js +9 -0
- package/dist/providers/portal.js.map +1 -1
- package/dist/providers/theme-provider.d.ts +18 -2
- package/dist/providers/theme-provider.js +15 -0
- package/dist/providers/theme-provider.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ButtonColorMap: Record<NoticeColor, ButtonProps['color']>","Toast","ToastContent","Button"],"sources":["../../../src/components/notice/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 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';\
|
|
1
|
+
{"version":3,"file":"index.js","names":["ButtonColorMap: Record<NoticeColor, ButtonProps['color']>","Toast","ToastContent","Button"],"sources":["../../../src/components/notice/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 Cancel from '@accelint/icons/cancel';\nimport {\n Text,\n UNSTABLE_Toast as Toast,\n UNSTABLE_ToastContent as ToastContent,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { NoticeIcon } from './notice-icon';\nimport styles from './styles.module.css';\nimport type { ButtonProps } from '../button/types';\nimport type { NoticeColor, NoticeProps } from './types';\n\nconst ButtonColorMap: Record<NoticeColor, ButtonProps['color']> = {\n normal: 'mono-bold',\n advisory: 'mono-bold',\n info: 'mono-bold',\n serious: 'serious',\n critical: 'critical',\n};\n\n/**\n * Notice - Notification component for temporary messages and alerts\n *\n * Displays messages with optional action buttons and close functionality.\n * Icons are automatically displayed based on the color variant.\n *\n * @example\n * ```tsx\n * <Notice\n * id=\"notice-1\"\n * message=\"Operation completed\"\n * color=\"normal\"\n * />\n * ```\n *\n * @param props - {@link NoticeProps}\n * @param props.id - Unique identifier for the notice.\n * @param props.classNames - CSS class names for notice elements.\n * @param props.color - Color variant indicating severity.\n * @param props.message - Message text to display.\n * @param props.primary - Primary action button configuration.\n * @param props.secondary - Secondary action button configuration.\n * @param props.hideIcon - Whether to hide the status icon.\n * @param props.showClose - Whether to show the close button.\n * @param props.shouldCloseOnAction - Whether to close the notice when an action button is pressed.\n * @param props.size - Size variant for the notice.\n * @param props.onPrimaryAction - Callback when primary action button is pressed.\n * @param props.onSecondaryAction - Callback when secondary action button is pressed.\n * @param props.onClose - Callback when the notice is closed.\n * @returns The rendered Notice component.\n */\nexport function Notice({\n id,\n classNames,\n color = 'info',\n message,\n primary,\n secondary,\n hideIcon,\n showClose,\n shouldCloseOnAction,\n size = 'medium',\n onPrimaryAction,\n onSecondaryAction,\n onClose,\n}: NoticeProps) {\n return (\n <Toast\n className={clsx('group/notice', styles.notice, classNames?.notice)}\n toast={{ key: id, content: message, onClose }}\n data-color={color}\n data-size={size}\n >\n <ToastContent className={clsx(styles.content, classNames?.content)}>\n {!hideIcon && size === 'medium' && (\n <NoticeIcon color={color} size={size} />\n )}\n <Text\n slot='description'\n className={clsx(styles.message, classNames?.message)}\n >\n {message}\n </Text>\n {(primary || secondary) && (\n <div className={clsx(styles.actions, classNames?.actions)}>\n {primary && (\n <Button\n color={ButtonColorMap[color]}\n variant='filled'\n {...primary}\n size={size}\n onPress={() => {\n onPrimaryAction?.();\n\n if (shouldCloseOnAction) {\n onClose?.();\n }\n }}\n />\n )}\n {secondary && (\n <Button\n color={ButtonColorMap[color]}\n variant='outline'\n {...secondary}\n size={size}\n onPress={() => {\n onSecondaryAction?.();\n\n if (shouldCloseOnAction) {\n onClose?.();\n }\n }}\n />\n )}\n </div>\n )}\n {showClose && (\n <Button\n color={ButtonColorMap[color]}\n variant='icon'\n onPress={onClose}\n >\n <Icon>\n <Cancel />\n </Icon>\n </Button>\n )}\n </ToastContent>\n </Toast>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAMA,iBAA4D;CAChE,QAAQ;CACR,UAAU;CACV,MAAM;CACN,SAAS;CACT,UAAU;CACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCD,SAAgB,OAAO,EACrB,IACA,YACA,QAAQ,QACR,SACA,SACA,WACA,UACA,WACA,qBACA,OAAO,UACP,iBACA,mBACA,WACc;AACd,QACE,oBAACC;EACC,WAAW,KAAK,gBAAgB,OAAO,QAAQ,YAAY,OAAO;EAClE,OAAO;GAAE,KAAK;GAAI,SAAS;GAAS;GAAS;EAC7C,cAAY;EACZ,aAAW;YAEX,qBAACC;GAAa,WAAW,KAAK,OAAO,SAAS,YAAY,QAAQ;;IAC/D,CAAC,YAAY,SAAS,YACrB,oBAAC;KAAkB;KAAa;MAAQ;IAE1C,oBAAC;KACC,MAAK;KACL,WAAW,KAAK,OAAO,SAAS,YAAY,QAAQ;eAEnD;MACI;KACL,WAAW,cACX,qBAAC;KAAI,WAAW,KAAK,OAAO,SAAS,YAAY,QAAQ;gBACtD,WACC,oBAACC;MACC,OAAO,eAAe;MACtB,SAAQ;MACR,GAAI;MACE;MACN,eAAe;AACb,0BAAmB;AAEnB,WAAI,oBACF,YAAW;;OAGf,EAEH,aACC,oBAACA;MACC,OAAO,eAAe;MACtB,SAAQ;MACR,GAAI;MACE;MACN,eAAe;AACb,4BAAqB;AAErB,WAAI,oBACF,YAAW;;OAGf;MAEA;IAEP,aACC,oBAACA;KACC,OAAO,eAAe;KACtB,SAAQ;KACR,SAAS;eAET,oBAAC,kBACC,oBAAC,WAAS,GACL;MACA;;IAEE;GACT"}
|
|
@@ -12,9 +12,38 @@
|
|
|
12
12
|
|
|
13
13
|
import { NoticeListProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime187 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/notice/list.d.ts
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* NoticeList - Queue manager for displaying multiple notices
|
|
21
|
+
*
|
|
22
|
+
* Manages a FIFO queue of notices with automatic timeout and dismissal.
|
|
23
|
+
* New notices push out older ones when the limit is reached.
|
|
24
|
+
* Uses event-driven communication via the bus system.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <NoticeList
|
|
29
|
+
* aria-label="notifications"
|
|
30
|
+
* placement="top right"
|
|
31
|
+
* limit={3}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param props - {@link NoticeListProps}
|
|
36
|
+
* @param props.id - Unique identifier for targeting notices to this list.
|
|
37
|
+
* @param props.classNames - CSS class names for list elements.
|
|
38
|
+
* @param props.defaultColor - Default color for notices without explicit color.
|
|
39
|
+
* @param props.defaultTimeout - Default timeout for notices without explicit timeout.
|
|
40
|
+
* @param props.hideClearAll - Whether to hide the "Clear All" button.
|
|
41
|
+
* @param props.limit - Maximum number of visible notices.
|
|
42
|
+
* @param props.global - Whether to use global ToastRegion for portal rendering.
|
|
43
|
+
* @param props.placement - Position of the notice list on screen.
|
|
44
|
+
* @param props.size - Size variant for notices in the list.
|
|
45
|
+
* @returns The rendered NoticeList component.
|
|
46
|
+
*/
|
|
18
47
|
declare function NoticeList({
|
|
19
48
|
id,
|
|
20
49
|
classNames,
|
|
@@ -26,7 +55,7 @@ declare function NoticeList({
|
|
|
26
55
|
placement,
|
|
27
56
|
size,
|
|
28
57
|
...rest
|
|
29
|
-
}: NoticeListProps):
|
|
58
|
+
}: NoticeListProps): react_jsx_runtime187.JSX.Element;
|
|
30
59
|
//#endregion
|
|
31
60
|
export { NoticeList };
|
|
32
61
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -29,6 +29,34 @@ import { useToastRegion } from "@react-aria/toast";
|
|
|
29
29
|
import { useToastQueue } from "@react-stately/toast";
|
|
30
30
|
|
|
31
31
|
//#region src/components/notice/list.tsx
|
|
32
|
+
/**
|
|
33
|
+
* NoticeList - Queue manager for displaying multiple notices
|
|
34
|
+
*
|
|
35
|
+
* Manages a FIFO queue of notices with automatic timeout and dismissal.
|
|
36
|
+
* New notices push out older ones when the limit is reached.
|
|
37
|
+
* Uses event-driven communication via the bus system.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <NoticeList
|
|
42
|
+
* aria-label="notifications"
|
|
43
|
+
* placement="top right"
|
|
44
|
+
* limit={3}
|
|
45
|
+
* />
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param props - {@link NoticeListProps}
|
|
49
|
+
* @param props.id - Unique identifier for targeting notices to this list.
|
|
50
|
+
* @param props.classNames - CSS class names for list elements.
|
|
51
|
+
* @param props.defaultColor - Default color for notices without explicit color.
|
|
52
|
+
* @param props.defaultTimeout - Default timeout for notices without explicit timeout.
|
|
53
|
+
* @param props.hideClearAll - Whether to hide the "Clear All" button.
|
|
54
|
+
* @param props.limit - Maximum number of visible notices.
|
|
55
|
+
* @param props.global - Whether to use global ToastRegion for portal rendering.
|
|
56
|
+
* @param props.placement - Position of the notice list on screen.
|
|
57
|
+
* @param props.size - Size variant for notices in the list.
|
|
58
|
+
* @returns The rendered NoticeList component.
|
|
59
|
+
*/
|
|
32
60
|
function NoticeList({ id, classNames, defaultColor, defaultTimeout, hideClearAll, limit = 3, global, placement, size = "medium", ...rest }) {
|
|
33
61
|
const queue = useMemo(() => new UNSTABLE_ToastQueue({ maxVisibleToasts: limit }), [limit]);
|
|
34
62
|
const state = useToastQueue(queue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":["ToastQueue","useEmit","Button","ToastList","ToastRegion","ToastStateContext"],"sources":["../../../src/components/notice/list.tsx"],"sourcesContent":["/*\n * Copyright 2025 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';\n\nimport { useBus } from '@accelint/bus/react';\nimport { uuid } from '@accelint/core';\nimport { useToastRegion } from '@react-aria/toast';\nimport { useToastQueue } from '@react-stately/toast';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n composeRenderProps,\n type QueuedToast,\n UNSTABLE_ToastList as ToastList,\n UNSTABLE_ToastQueue as ToastQueue,\n UNSTABLE_ToastRegion as ToastRegion,\n UNSTABLE_ToastStateContext as ToastStateContext,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Notice } from './';\nimport { NoticeEventTypes } from './events';\nimport styles from './styles.module.css';\nimport { matchesMetadata } from './utils';\nimport type {\n NoticeActionEvent,\n NoticeContent,\n NoticeDequeueEvent,\n NoticeListProps,\n NoticeQueueEvent,\n} from './types';\n\nexport function NoticeList({\n id,\n classNames,\n defaultColor,\n defaultTimeout,\n hideClearAll,\n limit = 3,\n global,\n placement,\n size = 'medium',\n ...rest\n}: NoticeListProps) {\n const queue = useMemo(\n () => new ToastQueue<NoticeContent>({ maxVisibleToasts: limit }),\n [limit],\n );\n const state = useToastQueue(queue);\n\n const [hasNotices, setHasNotices] = useState(false);\n const ref = useRef(null);\n const { regionProps } = useToastRegion(rest, queue, ref);\n\n const { useEmit, useOn } = useBus<\n NoticeQueueEvent | NoticeDequeueEvent | NoticeActionEvent\n >();\n const emitActionPrimary = useEmit(NoticeEventTypes.actionPrimary);\n const emitActionSecondary = useEmit(NoticeEventTypes.actionSecondary);\n const emitClose = useEmit(NoticeEventTypes.close);\n\n useOn(NoticeEventTypes.queue, (data) => {\n if ((id && data.payload.target === id) || !id) {\n const timeout = defaultTimeout ?? data.payload.timeout;\n queue.add(\n {\n ...data.payload,\n id: data.payload.id || uuid(),\n color: defaultColor || data.payload.color,\n },\n {\n timeout,\n },\n );\n if (timeout) {\n queue.resumeAll();\n }\n }\n });\n\n useOn(NoticeEventTypes.dequeue, (data) => {\n // @ts-expect-error : queue.queue exists, but is not currently documented\n const queuedNotices = queue.queue;\n\n const dequeue = queuedNotices.filter((toast: QueuedToast<NoticeContent>) =>\n matchesMetadata(data.payload, toast.content),\n );\n\n if (dequeue.length && dequeue.length === queuedNotices.length) {\n queue.clear();\n } else {\n for (const toast of dequeue) {\n queue.close(toast.key);\n }\n }\n });\n\n useEffect(() => {\n queue.subscribe(() => {\n setHasNotices(queue.visibleToasts.length > 0);\n });\n });\n\n const children = (\n <>\n {!hideClearAll && hasNotices && (\n <Button\n className={composeRenderProps(\n classNames?.button,\n (className) => className ?? '',\n )}\n variant='outline'\n onPress={queue.clear}\n >\n Clear All\n </Button>\n )}\n <ToastList\n className={composeRenderProps(classNames?.list, (className) =>\n clsx(styles.list, className),\n )}\n >\n {({ toast }: { toast: QueuedToast<NoticeContent> }) => (\n <Notice\n {...toast.content}\n key={toast.key}\n showClose={\n !(\n toast.timeout &&\n toast.content.primary &&\n toast.content.secondary\n )\n }\n classNames={classNames?.notice}\n size={size}\n onPrimaryAction={() => emitActionPrimary({ id: toast.content.id })}\n onSecondaryAction={() =>\n emitActionSecondary({ id: toast.content.id })\n }\n onClose={() => {\n toast.onClose?.();\n queue.close(toast.key);\n emitClose({ id: toast.content.id });\n }}\n />\n )}\n </ToastList>\n </>\n );\n\n return global ? (\n <ToastRegion\n className={clsx('group/region', styles.region, classNames?.region)}\n data-placement={placement}\n queue={queue}\n >\n {children}\n </ToastRegion>\n ) : (\n <div\n {...regionProps}\n className={clsx('group/region', styles.region, classNames?.region)}\n data-placement={placement}\n ref={ref}\n >\n <ToastStateContext.Provider value={state}>\n {children}\n </ToastStateContext.Provider>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","names":["ToastQueue","useEmit","Button","ToastList","ToastRegion","ToastStateContext"],"sources":["../../../src/components/notice/list.tsx"],"sourcesContent":["/*\n * Copyright 2025 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';\n\nimport { useBus } from '@accelint/bus/react';\nimport { uuid } from '@accelint/core';\nimport { useToastRegion } from '@react-aria/toast';\nimport { useToastQueue } from '@react-stately/toast';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n composeRenderProps,\n type QueuedToast,\n UNSTABLE_ToastList as ToastList,\n UNSTABLE_ToastQueue as ToastQueue,\n UNSTABLE_ToastRegion as ToastRegion,\n UNSTABLE_ToastStateContext as ToastStateContext,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Notice } from './';\nimport { NoticeEventTypes } from './events';\nimport styles from './styles.module.css';\nimport { matchesMetadata } from './utils';\nimport type {\n NoticeActionEvent,\n NoticeContent,\n NoticeDequeueEvent,\n NoticeListProps,\n NoticeQueueEvent,\n} from './types';\n\n/**\n * NoticeList - Queue manager for displaying multiple notices\n *\n * Manages a FIFO queue of notices with automatic timeout and dismissal.\n * New notices push out older ones when the limit is reached.\n * Uses event-driven communication via the bus system.\n *\n * @example\n * ```tsx\n * <NoticeList\n * aria-label=\"notifications\"\n * placement=\"top right\"\n * limit={3}\n * />\n * ```\n *\n * @param props - {@link NoticeListProps}\n * @param props.id - Unique identifier for targeting notices to this list.\n * @param props.classNames - CSS class names for list elements.\n * @param props.defaultColor - Default color for notices without explicit color.\n * @param props.defaultTimeout - Default timeout for notices without explicit timeout.\n * @param props.hideClearAll - Whether to hide the \"Clear All\" button.\n * @param props.limit - Maximum number of visible notices.\n * @param props.global - Whether to use global ToastRegion for portal rendering.\n * @param props.placement - Position of the notice list on screen.\n * @param props.size - Size variant for notices in the list.\n * @returns The rendered NoticeList component.\n */\nexport function NoticeList({\n id,\n classNames,\n defaultColor,\n defaultTimeout,\n hideClearAll,\n limit = 3,\n global,\n placement,\n size = 'medium',\n ...rest\n}: NoticeListProps) {\n const queue = useMemo(\n () => new ToastQueue<NoticeContent>({ maxVisibleToasts: limit }),\n [limit],\n );\n const state = useToastQueue(queue);\n\n const [hasNotices, setHasNotices] = useState(false);\n const ref = useRef(null);\n const { regionProps } = useToastRegion(rest, queue, ref);\n\n const { useEmit, useOn } = useBus<\n NoticeQueueEvent | NoticeDequeueEvent | NoticeActionEvent\n >();\n const emitActionPrimary = useEmit(NoticeEventTypes.actionPrimary);\n const emitActionSecondary = useEmit(NoticeEventTypes.actionSecondary);\n const emitClose = useEmit(NoticeEventTypes.close);\n\n useOn(NoticeEventTypes.queue, (data) => {\n if ((id && data.payload.target === id) || !id) {\n const timeout = defaultTimeout ?? data.payload.timeout;\n queue.add(\n {\n ...data.payload,\n id: data.payload.id || uuid(),\n color: defaultColor || data.payload.color,\n },\n {\n timeout,\n },\n );\n if (timeout) {\n queue.resumeAll();\n }\n }\n });\n\n useOn(NoticeEventTypes.dequeue, (data) => {\n // @ts-expect-error : queue.queue exists, but is not currently documented\n const queuedNotices = queue.queue;\n\n const dequeue = queuedNotices.filter((toast: QueuedToast<NoticeContent>) =>\n matchesMetadata(data.payload, toast.content),\n );\n\n if (dequeue.length && dequeue.length === queuedNotices.length) {\n queue.clear();\n } else {\n for (const toast of dequeue) {\n queue.close(toast.key);\n }\n }\n });\n\n useEffect(() => {\n queue.subscribe(() => {\n setHasNotices(queue.visibleToasts.length > 0);\n });\n });\n\n const children = (\n <>\n {!hideClearAll && hasNotices && (\n <Button\n className={composeRenderProps(\n classNames?.button,\n (className) => className ?? '',\n )}\n variant='outline'\n onPress={queue.clear}\n >\n Clear All\n </Button>\n )}\n <ToastList\n className={composeRenderProps(classNames?.list, (className) =>\n clsx(styles.list, className),\n )}\n >\n {({ toast }: { toast: QueuedToast<NoticeContent> }) => (\n <Notice\n {...toast.content}\n key={toast.key}\n showClose={\n !(\n toast.timeout &&\n toast.content.primary &&\n toast.content.secondary\n )\n }\n classNames={classNames?.notice}\n size={size}\n onPrimaryAction={() => emitActionPrimary({ id: toast.content.id })}\n onSecondaryAction={() =>\n emitActionSecondary({ id: toast.content.id })\n }\n onClose={() => {\n toast.onClose?.();\n queue.close(toast.key);\n emitClose({ id: toast.content.id });\n }}\n />\n )}\n </ToastList>\n </>\n );\n\n return global ? (\n <ToastRegion\n className={clsx('group/region', styles.region, classNames?.region)}\n data-placement={placement}\n queue={queue}\n >\n {children}\n </ToastRegion>\n ) : (\n <div\n {...regionProps}\n className={clsx('group/region', styles.region, classNames?.region)}\n data-placement={placement}\n ref={ref}\n >\n <ToastStateContext.Provider value={state}>\n {children}\n </ToastStateContext.Provider>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,SAAgB,WAAW,EACzB,IACA,YACA,cACA,gBACA,cACA,QAAQ,GACR,QACA,WACA,OAAO,UACP,GAAG,QACe;CAClB,MAAM,QAAQ,cACN,IAAIA,oBAA0B,EAAE,kBAAkB,OAAO,CAAC,EAChE,CAAC,MAAM,CACR;CACD,MAAM,QAAQ,cAAc,MAAM;CAElC,MAAM,CAAC,YAAY,iBAAiB,SAAS,MAAM;CACnD,MAAM,MAAM,OAAO,KAAK;CACxB,MAAM,EAAE,gBAAgB,eAAe,MAAM,OAAO,IAAI;CAExD,MAAM,EAAE,oBAAS,mBAAU,QAExB;CACH,MAAM,oBAAoBC,UAAQ,iBAAiB,cAAc;CACjE,MAAM,sBAAsBA,UAAQ,iBAAiB,gBAAgB;CACrE,MAAM,YAAYA,UAAQ,iBAAiB,MAAM;AAEjD,SAAM,iBAAiB,QAAQ,SAAS;AACtC,MAAK,MAAM,KAAK,QAAQ,WAAW,MAAO,CAAC,IAAI;GAC7C,MAAM,UAAU,kBAAkB,KAAK,QAAQ;AAC/C,SAAM,IACJ;IACE,GAAG,KAAK;IACR,IAAI,KAAK,QAAQ,MAAM,MAAM;IAC7B,OAAO,gBAAgB,KAAK,QAAQ;IACrC,EACD,EACE,SACD,CACF;AACD,OAAI,QACF,OAAM,WAAW;;GAGrB;AAEF,SAAM,iBAAiB,UAAU,SAAS;EAExC,MAAM,gBAAgB,MAAM;EAE5B,MAAM,UAAU,cAAc,QAAQ,UACpC,gBAAgB,KAAK,SAAS,MAAM,QAAQ,CAC7C;AAED,MAAI,QAAQ,UAAU,QAAQ,WAAW,cAAc,OACrD,OAAM,OAAO;MAEb,MAAK,MAAM,SAAS,QAClB,OAAM,MAAM,MAAM,IAAI;GAG1B;AAEF,iBAAgB;AACd,QAAM,gBAAgB;AACpB,iBAAc,MAAM,cAAc,SAAS,EAAE;IAC7C;GACF;CAEF,MAAM,WACJ,8CACG,CAAC,gBAAgB,cAChB,oBAACC;EACC,WAAW,mBACT,YAAY,SACX,cAAc,aAAa,GAC7B;EACD,SAAQ;EACR,SAAS,MAAM;YAChB;GAEQ,EAEX,oBAACC;EACC,WAAW,mBAAmB,YAAY,OAAO,cAC/C,KAAK,OAAO,MAAM,UAAU,CAC7B;aAEC,EAAE,YACF,8BAAC;GACC,GAAI,MAAM;GACV,KAAK,MAAM;GACX,WACE,EACE,MAAM,WACN,MAAM,QAAQ,WACd,MAAM,QAAQ;GAGlB,YAAY,YAAY;GAClB;GACN,uBAAuB,kBAAkB,EAAE,IAAI,MAAM,QAAQ,IAAI,CAAC;GAClE,yBACE,oBAAoB,EAAE,IAAI,MAAM,QAAQ,IAAI,CAAC;GAE/C,eAAe;AACb,UAAM,WAAW;AACjB,UAAM,MAAM,MAAM,IAAI;AACtB,cAAU,EAAE,IAAI,MAAM,QAAQ,IAAI,CAAC;;IAErC;GAEM,IACX;AAGL,QAAO,SACL,oBAACC;EACC,WAAW,KAAK,gBAAgB,OAAO,QAAQ,YAAY,OAAO;EAClE,kBAAgB;EACT;EAEN;GACW,GAEd,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,gBAAgB,OAAO,QAAQ,YAAY,OAAO;EAClE,kBAAgB;EACX;YAEL,oBAACC,2BAAkB;GAAS,OAAO;GAChC;IAC0B;GACzB"}
|
|
@@ -12,13 +12,33 @@
|
|
|
12
12
|
|
|
13
13
|
import { NoticeIconProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime188 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/notice/notice-icon.d.ts
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* NoticeIcon - Color-mapped icon for Notice components
|
|
21
|
+
*
|
|
22
|
+
* Automatically renders the appropriate icon based on color variant:
|
|
23
|
+
* - info/advisory: Information icon
|
|
24
|
+
* - normal: Success icon
|
|
25
|
+
* - serious: Warning icon
|
|
26
|
+
* - critical: Problem icon
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <NoticeIcon color="serious" size="small" />
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @param props - {@link NoticeIconProps}
|
|
34
|
+
* @param props.color - Color variant determining which icon to display.
|
|
35
|
+
* @param props.size - Size of the icon.
|
|
36
|
+
* @returns The rendered NoticeIcon component.
|
|
37
|
+
*/
|
|
18
38
|
declare function NoticeIcon({
|
|
19
39
|
color,
|
|
20
40
|
size
|
|
21
|
-
}: NoticeIconProps):
|
|
41
|
+
}: NoticeIconProps): react_jsx_runtime188.JSX.Element;
|
|
22
42
|
//#endregion
|
|
23
43
|
export { NoticeIcon };
|
|
24
44
|
//# sourceMappingURL=notice-icon.d.ts.map
|
|
@@ -16,9 +16,31 @@
|
|
|
16
16
|
import { Icon } from "../icon/index.js";
|
|
17
17
|
import "client-only";
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
import
|
|
19
|
+
import Information from "@accelint/icons/information";
|
|
20
|
+
import Problem from "@accelint/icons/problem";
|
|
21
|
+
import Success from "@accelint/icons/success";
|
|
22
|
+
import Warning from "@accelint/icons/warning";
|
|
20
23
|
|
|
21
24
|
//#region src/components/notice/notice-icon.tsx
|
|
25
|
+
/**
|
|
26
|
+
* NoticeIcon - Color-mapped icon for Notice components
|
|
27
|
+
*
|
|
28
|
+
* Automatically renders the appropriate icon based on color variant:
|
|
29
|
+
* - info/advisory: Information icon
|
|
30
|
+
* - normal: Success icon
|
|
31
|
+
* - serious: Warning icon
|
|
32
|
+
* - critical: Problem icon
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <NoticeIcon color="serious" size="small" />
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param props - {@link NoticeIconProps}
|
|
40
|
+
* @param props.color - Color variant determining which icon to display.
|
|
41
|
+
* @param props.size - Size of the icon.
|
|
42
|
+
* @returns The rendered NoticeIcon component.
|
|
43
|
+
*/
|
|
22
44
|
function NoticeIcon({ color = "info", size }) {
|
|
23
45
|
return /* @__PURE__ */ jsxs(Icon, {
|
|
24
46
|
size: size === "small" ? "medium" : "large",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-icon.js","names":[],"sources":["../../../src/components/notice/notice-icon.tsx"],"sourcesContent":["/*\n * Copyright 2025 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';\n\nimport 'client-only';\nimport
|
|
1
|
+
{"version":3,"file":"notice-icon.js","names":[],"sources":["../../../src/components/notice/notice-icon.tsx"],"sourcesContent":["/*\n * Copyright 2025 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';\n\nimport 'client-only';\n\nimport Information from '@accelint/icons/information';\nimport Problem from '@accelint/icons/problem';\nimport Success from '@accelint/icons/success';\nimport Warning from '@accelint/icons/warning';\nimport { Icon } from '../icon';\nimport type { NoticeIconProps } from './types';\n\n/**\n * NoticeIcon - Color-mapped icon for Notice components\n *\n * Automatically renders the appropriate icon based on color variant:\n * - info/advisory: Information icon\n * - normal: Success icon\n * - serious: Warning icon\n * - critical: Problem icon\n *\n * @example\n * ```tsx\n * <NoticeIcon color=\"serious\" size=\"small\" />\n * ```\n *\n * @param props - {@link NoticeIconProps}\n * @param props.color - Color variant determining which icon to display.\n * @param props.size - Size of the icon.\n * @returns The rendered NoticeIcon component.\n */\nexport function NoticeIcon({ color = 'info', size }: NoticeIconProps) {\n return (\n <Icon size={size === 'small' ? 'medium' : 'large'}>\n {color === 'info' && <Information />}\n {color === 'advisory' && <Information />}\n {color === 'normal' && <Success />}\n {color === 'serious' && <Warning />}\n {color === 'critical' && <Problem />}\n </Icon>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,WAAW,EAAE,QAAQ,QAAQ,QAAyB;AACpE,QACE,qBAAC;EAAK,MAAM,SAAS,UAAU,WAAW;;GACvC,UAAU,UAAU,oBAAC,gBAAc;GACnC,UAAU,cAAc,oBAAC,gBAAc;GACvC,UAAU,YAAY,oBAAC,YAAU;GACjC,UAAU,aAAa,oBAAC,YAAU;GAClC,UAAU,cAAc,oBAAC,YAAU;;GAC/B"}
|
|
@@ -17,65 +17,125 @@ import { Payload, StructuredCloneableData } from "@accelint/bus";
|
|
|
17
17
|
import { UniqueId } from "@accelint/core";
|
|
18
18
|
|
|
19
19
|
//#region src/components/notice/types.d.ts
|
|
20
|
+
/**
|
|
21
|
+
* Color variant for notices indicating severity level.
|
|
22
|
+
*/
|
|
20
23
|
type NoticeColor = 'info' | 'advisory' | 'normal' | 'serious' | 'critical';
|
|
21
24
|
type ActionButtonProps = Pick<ButtonProps$1, 'color' | 'variant'> & {
|
|
22
25
|
children: string;
|
|
23
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Data structure for notice content in the queue.
|
|
29
|
+
*/
|
|
24
30
|
type NoticeContent = {
|
|
31
|
+
/** Unique identifier for the notice. */
|
|
25
32
|
id: UniqueId;
|
|
33
|
+
/** Message text to display. */
|
|
26
34
|
message: string;
|
|
35
|
+
/** Color variant indicating severity. */
|
|
27
36
|
color?: NoticeColor;
|
|
37
|
+
/** Primary action button configuration. */
|
|
28
38
|
primary?: ActionButtonProps;
|
|
39
|
+
/** Secondary action button configuration. */
|
|
29
40
|
secondary?: ActionButtonProps;
|
|
41
|
+
/** Auto-dismiss timeout in milliseconds. */
|
|
30
42
|
timeout?: number;
|
|
43
|
+
/** Target NoticeList ID for routing. */
|
|
31
44
|
target?: UniqueId;
|
|
45
|
+
/** Custom metadata for filtering and matching. */
|
|
32
46
|
metadata?: Record<string, StructuredCloneableData>;
|
|
33
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Props for the NoticeIcon component.
|
|
50
|
+
*/
|
|
34
51
|
type NoticeIconProps = {
|
|
52
|
+
/** Color variant determining which icon to display. */
|
|
35
53
|
color?: NoticeColor;
|
|
54
|
+
/** Size of the icon. */
|
|
36
55
|
size: 'small' | 'medium';
|
|
37
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Props for the NoticeList component.
|
|
59
|
+
*/
|
|
38
60
|
type NoticeListProps = {
|
|
61
|
+
/** Unique identifier for targeting notices to this list. */
|
|
39
62
|
id?: UniqueId;
|
|
63
|
+
/** Position of the notice list on screen. */
|
|
40
64
|
placement?: 'top left' | 'top' | 'top right' | 'right' | 'bottom right' | 'bottom' | 'bottom left' | 'left';
|
|
65
|
+
/** Maximum number of visible notices. */
|
|
41
66
|
limit?: number;
|
|
67
|
+
/** Default color for notices without explicit color. */
|
|
42
68
|
defaultColor?: NoticeColor;
|
|
69
|
+
/** Default timeout for notices without explicit timeout. */
|
|
43
70
|
defaultTimeout?: number;
|
|
71
|
+
/** Whether to hide the "Clear All" button. */
|
|
44
72
|
hideClearAll?: boolean;
|
|
73
|
+
/** Size variant for notices in the list. */
|
|
45
74
|
size?: 'small' | 'medium';
|
|
75
|
+
/** Whether to use global ToastRegion for portal rendering. */
|
|
46
76
|
global?: boolean;
|
|
77
|
+
/** CSS class names for list elements. */
|
|
47
78
|
classNames?: {
|
|
79
|
+
/** Class name for the region container. */
|
|
48
80
|
region?: string;
|
|
81
|
+
/** Class name for the toast list. */
|
|
49
82
|
list?: ToastListProps<NoticeContent>['className'];
|
|
83
|
+
/** Class name for the clear all button. */
|
|
50
84
|
button?: ButtonProps$1['className'];
|
|
85
|
+
/** Class names for individual notices. */
|
|
51
86
|
notice?: NoticeProps['classNames'];
|
|
52
87
|
};
|
|
53
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* Props for the Notice component.
|
|
91
|
+
*/
|
|
54
92
|
type NoticeProps = Omit<NoticeContent, 'metadata' | 'timeout' | 'target'> & {
|
|
93
|
+
/** Unique identifier for the notice. */
|
|
55
94
|
id: UniqueId;
|
|
95
|
+
/** CSS class names for notice elements. */
|
|
56
96
|
classNames?: {
|
|
97
|
+
/** Class name for the notice container. */
|
|
57
98
|
notice?: string;
|
|
99
|
+
/** Class name for the content wrapper. */
|
|
58
100
|
content?: string;
|
|
101
|
+
/** Class name for the message text. */
|
|
59
102
|
message?: string;
|
|
103
|
+
/** Class name for the actions container. */
|
|
60
104
|
actions?: string;
|
|
61
105
|
};
|
|
106
|
+
/** Whether to hide the status icon. */
|
|
62
107
|
hideIcon?: boolean;
|
|
108
|
+
/** Whether to show the close button. */
|
|
63
109
|
showClose?: boolean;
|
|
110
|
+
/** Whether to close the notice when an action button is pressed. */
|
|
64
111
|
shouldCloseOnAction?: boolean;
|
|
112
|
+
/** Size variant for the notice. */
|
|
65
113
|
size?: 'small' | 'medium';
|
|
114
|
+
/** Callback when primary action button is pressed. */
|
|
66
115
|
onPrimaryAction?: () => void;
|
|
116
|
+
/** Callback when secondary action button is pressed. */
|
|
67
117
|
onSecondaryAction?: () => void;
|
|
118
|
+
/** Callback when the notice is closed. */
|
|
68
119
|
onClose?: () => void;
|
|
69
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Event payload for queuing a new notice via the bus.
|
|
123
|
+
*/
|
|
70
124
|
type NoticeQueueEvent = Payload<typeof NoticeEventTypes.queue, Omit<NoticeContent, 'id'> & {
|
|
71
125
|
id?: UniqueId;
|
|
72
126
|
}>;
|
|
127
|
+
/**
|
|
128
|
+
* Event payload for removing notices from the queue via the bus.
|
|
129
|
+
*/
|
|
73
130
|
type NoticeDequeueEvent = Payload<typeof NoticeEventTypes.dequeue, {
|
|
74
131
|
id?: UniqueId;
|
|
75
132
|
target?: UniqueId;
|
|
76
133
|
color?: NoticeColor;
|
|
77
134
|
metadata?: Record<string, StructuredCloneableData>;
|
|
78
135
|
}>;
|
|
136
|
+
/**
|
|
137
|
+
* Event payload for notice action events via the bus.
|
|
138
|
+
*/
|
|
79
139
|
type NoticeActionEvent = Payload<typeof NoticeEventTypes.actionPrimary | typeof NoticeEventTypes.actionSecondary | typeof NoticeEventTypes.close, {
|
|
80
140
|
id: UniqueId;
|
|
81
141
|
}>;
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
import "client-only";
|
|
14
14
|
|
|
15
15
|
//#region src/components/notice/utils.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Checks if a payload matches metadata on a notice.
|
|
18
|
+
* Used for filtering notices during dequeue operations.
|
|
19
|
+
*
|
|
20
|
+
* @param payload - Object with key-value pairs to match against.
|
|
21
|
+
* @param metadata - Metadata object from a notice to check.
|
|
22
|
+
* @returns True if all payload entries match corresponding metadata entries.
|
|
23
|
+
*/
|
|
16
24
|
declare function matchesMetadata(payload: Record<string, unknown>, metadata?: Record<string, unknown>): boolean;
|
|
17
25
|
//#endregion
|
|
18
26
|
export { matchesMetadata };
|
|
@@ -17,6 +17,14 @@ import "client-only";
|
|
|
17
17
|
import { isEqual } from "radashi";
|
|
18
18
|
|
|
19
19
|
//#region src/components/notice/utils.ts
|
|
20
|
+
/**
|
|
21
|
+
* Checks if a payload matches metadata on a notice.
|
|
22
|
+
* Used for filtering notices during dequeue operations.
|
|
23
|
+
*
|
|
24
|
+
* @param payload - Object with key-value pairs to match against.
|
|
25
|
+
* @param metadata - Metadata object from a notice to check.
|
|
26
|
+
* @returns True if all payload entries match corresponding metadata entries.
|
|
27
|
+
*/
|
|
20
28
|
function matchesMetadata(payload, metadata) {
|
|
21
29
|
if (!metadata) return false;
|
|
22
30
|
return Object.entries(payload).every(([key, value]) => key in metadata && isEqual(metadata[key], value));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/notice/utils.ts"],"sourcesContent":["/*\n * Copyright 2025 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';\n\nimport 'client-only';\nimport { isEqual } from 'radashi';\n\nexport function matchesMetadata(\n payload: Record<string, unknown>,\n metadata?: Record<string, unknown>,\n) {\n if (!metadata) {\n return false;\n }\n\n return Object.entries(payload).every(\n ([key, value]) => key in metadata && isEqual(metadata[key], value),\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/notice/utils.ts"],"sourcesContent":["/*\n * Copyright 2025 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';\n\nimport 'client-only';\nimport { isEqual } from 'radashi';\n\n/**\n * Checks if a payload matches metadata on a notice.\n * Used for filtering notices during dequeue operations.\n *\n * @param payload - Object with key-value pairs to match against.\n * @param metadata - Metadata object from a notice to check.\n * @returns True if all payload entries match corresponding metadata entries.\n */\nexport function matchesMetadata(\n payload: Record<string, unknown>,\n metadata?: Record<string, unknown>,\n) {\n if (!metadata) {\n return false;\n }\n\n return Object.entries(payload).every(\n ([key, value]) => key in metadata && isEqual(metadata[key], value),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,gBACd,SACA,UACA;AACA,KAAI,CAAC,SACH,QAAO;AAGT,QAAO,OAAO,QAAQ,QAAQ,CAAC,OAC5B,CAAC,KAAK,WAAW,OAAO,YAAY,QAAQ,SAAS,MAAM,MAAM,CACnE"}
|
|
@@ -16,6 +16,7 @@ import * as react47 from "react";
|
|
|
16
16
|
import { ContextValue } from "react-aria-components";
|
|
17
17
|
|
|
18
18
|
//#region src/components/options/context.d.ts
|
|
19
|
+
/** Context for sharing Options props with nested components */
|
|
19
20
|
declare const OptionsContext: react47.Context<ContextValue<OptionsProps<OptionsDataItem>, HTMLDivElement>>;
|
|
20
21
|
//#endregion
|
|
21
22
|
export { OptionsContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/options/context.tsx"],"sourcesContent":["/*\n * Copyright 2025 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'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport type { OptionsDataItem, OptionsProps } from './types';\n\nexport const OptionsContext =\n createContext<ContextValue<OptionsProps<OptionsDataItem>, HTMLDivElement>>(\n null,\n );\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/options/context.tsx"],"sourcesContent":["/*\n * Copyright 2025 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'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport type { OptionsDataItem, OptionsProps } from './types';\n\n/** Context for sharing Options props with nested components */\nexport const OptionsContext =\n createContext<ContextValue<OptionsProps<OptionsDataItem>, HTMLDivElement>>(\n null,\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,MAAa,iBACX,cACE,KACD"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { OptionsDataItem, OptionsProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime101 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/options/index.d.ts
|
|
18
18
|
|
|
@@ -24,6 +24,7 @@ import * as react_jsx_runtime145 from "react/jsx-runtime";
|
|
|
24
24
|
* dropdown lists, menu items, or any selectable list interface.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
+
* ```tsx
|
|
27
28
|
* // Basic options list
|
|
28
29
|
* <Options>
|
|
29
30
|
* <OptionsItem>
|
|
@@ -33,8 +34,10 @@ import * as react_jsx_runtime145 from "react/jsx-runtime";
|
|
|
33
34
|
* <OptionsItemLabel>Option 2</OptionsItemLabel>
|
|
34
35
|
* </OptionsItem>
|
|
35
36
|
* </Options>
|
|
37
|
+
* ```
|
|
36
38
|
*
|
|
37
39
|
* @example
|
|
40
|
+
* ```tsx
|
|
38
41
|
* // Options with descriptions and icons
|
|
39
42
|
* <Options>
|
|
40
43
|
* <OptionsItem>
|
|
@@ -45,8 +48,10 @@ import * as react_jsx_runtime145 from "react/jsx-runtime";
|
|
|
45
48
|
* </OptionsItemContent>
|
|
46
49
|
* </OptionsItem>
|
|
47
50
|
* </Options>
|
|
51
|
+
* ```
|
|
48
52
|
*
|
|
49
53
|
* @example
|
|
54
|
+
* ```tsx
|
|
50
55
|
* // Sectioned options
|
|
51
56
|
* <Options>
|
|
52
57
|
* <OptionsSection header="Recent">
|
|
@@ -56,11 +61,19 @@ import * as react_jsx_runtime145 from "react/jsx-runtime";
|
|
|
56
61
|
* <OptionsItem>All Items 1</OptionsItem>
|
|
57
62
|
* </OptionsSection>
|
|
58
63
|
* </Options>
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @param props - {@link OptionsProps}
|
|
67
|
+
* @param props.ref - Forwarded ref to the underlying ListBox element.
|
|
68
|
+
* @param props.children - Options items and sections to render.
|
|
69
|
+
* @param props.className - Optional CSS class name.
|
|
70
|
+
* @param props.size - Size variant for the options list.
|
|
71
|
+
* @returns The rendered Options component.
|
|
59
72
|
*/
|
|
60
73
|
declare function Options<T extends OptionsDataItem>({
|
|
61
74
|
ref,
|
|
62
75
|
...props
|
|
63
|
-
}: OptionsProps<T>):
|
|
76
|
+
}: OptionsProps<T>): react_jsx_runtime101.JSX.Element;
|
|
64
77
|
//#endregion
|
|
65
78
|
export { Options };
|
|
66
79
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -29,6 +29,7 @@ import styles from "./styles.module.css";
|
|
|
29
29
|
* dropdown lists, menu items, or any selectable list interface.
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
+
* ```tsx
|
|
32
33
|
* // Basic options list
|
|
33
34
|
* <Options>
|
|
34
35
|
* <OptionsItem>
|
|
@@ -38,8 +39,10 @@ import styles from "./styles.module.css";
|
|
|
38
39
|
* <OptionsItemLabel>Option 2</OptionsItemLabel>
|
|
39
40
|
* </OptionsItem>
|
|
40
41
|
* </Options>
|
|
42
|
+
* ```
|
|
41
43
|
*
|
|
42
44
|
* @example
|
|
45
|
+
* ```tsx
|
|
43
46
|
* // Options with descriptions and icons
|
|
44
47
|
* <Options>
|
|
45
48
|
* <OptionsItem>
|
|
@@ -50,8 +53,10 @@ import styles from "./styles.module.css";
|
|
|
50
53
|
* </OptionsItemContent>
|
|
51
54
|
* </OptionsItem>
|
|
52
55
|
* </Options>
|
|
56
|
+
* ```
|
|
53
57
|
*
|
|
54
58
|
* @example
|
|
59
|
+
* ```tsx
|
|
55
60
|
* // Sectioned options
|
|
56
61
|
* <Options>
|
|
57
62
|
* <OptionsSection header="Recent">
|
|
@@ -61,6 +66,14 @@ import styles from "./styles.module.css";
|
|
|
61
66
|
* <OptionsItem>All Items 1</OptionsItem>
|
|
62
67
|
* </OptionsSection>
|
|
63
68
|
* </Options>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @param props - {@link OptionsProps}
|
|
72
|
+
* @param props.ref - Forwarded ref to the underlying ListBox element.
|
|
73
|
+
* @param props.children - Options items and sections to render.
|
|
74
|
+
* @param props.className - Optional CSS class name.
|
|
75
|
+
* @param props.size - Size variant for the options list.
|
|
76
|
+
* @returns The rendered Options component.
|
|
64
77
|
*/
|
|
65
78
|
function Options({ ref, ...props }) {
|
|
66
79
|
[props, ref] = useContextProps(props, ref ?? null, OptionsContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["className"],"sources":["../../../src/components/options/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 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'use client';\n\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport {\n composeRenderProps,\n ListBox,\n useContextProps,\n} from 'react-aria-components';\nimport { OptionsContext } from './context';\nimport styles from './styles.module.css';\nimport type { OptionsDataItem, OptionsProps } from './types';\n\n/**\n * Options - A flexible list component for selectable items with rich content\n *\n * Provides accessible list functionality with support for selection, sections,\n * and rich item content including labels, descriptions, and icons. Perfect for\n * dropdown lists, menu items, or any selectable list interface.\n *\n * @example\n * // Basic options list\n * <Options>\n * <OptionsItem>\n * <OptionsItemLabel>Option 1</OptionsItemLabel>\n * </OptionsItem>\n * <OptionsItem>\n * <OptionsItemLabel>Option 2</OptionsItemLabel>\n * </OptionsItem>\n * </Options>\n *\n * @example\n * // Options with descriptions and icons\n * <Options>\n * <OptionsItem>\n * <Icon><User /></Icon>\n * <OptionsItemContent>\n * <OptionsItemLabel>John Doe</OptionsItemLabel>\n * <OptionsItemDescription>Senior Developer</OptionsItemDescription>\n * </OptionsItemContent>\n * </OptionsItem>\n * </Options>\n *\n * @example\n * // Sectioned options\n * <Options>\n * <OptionsSection header=\"Recent\">\n * <OptionsItem>Recent Item 1</OptionsItem>\n * </OptionsSection>\n * <OptionsSection header=\"All Items\">\n * <OptionsItem>All Items 1</OptionsItem>\n * </OptionsSection>\n * </Options>\n */\nexport function Options<T extends OptionsDataItem>({\n ref,\n ...props\n}: OptionsProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, OptionsContext);\n\n const { children, className, size, ...rest } = props;\n\n return (\n <ListBox<T>\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n clsx('group/options', styles.list, className),\n )}\n data-size={size}\n >\n {children}\n </ListBox>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["className"],"sources":["../../../src/components/options/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 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'use client';\n\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport {\n composeRenderProps,\n ListBox,\n useContextProps,\n} from 'react-aria-components';\nimport { OptionsContext } from './context';\nimport styles from './styles.module.css';\nimport type { OptionsDataItem, OptionsProps } from './types';\n\n/**\n * Options - A flexible list component for selectable items with rich content\n *\n * Provides accessible list functionality with support for selection, sections,\n * and rich item content including labels, descriptions, and icons. Perfect for\n * dropdown lists, menu items, or any selectable list interface.\n *\n * @example\n * ```tsx\n * // Basic options list\n * <Options>\n * <OptionsItem>\n * <OptionsItemLabel>Option 1</OptionsItemLabel>\n * </OptionsItem>\n * <OptionsItem>\n * <OptionsItemLabel>Option 2</OptionsItemLabel>\n * </OptionsItem>\n * </Options>\n * ```\n *\n * @example\n * ```tsx\n * // Options with descriptions and icons\n * <Options>\n * <OptionsItem>\n * <Icon><User /></Icon>\n * <OptionsItemContent>\n * <OptionsItemLabel>John Doe</OptionsItemLabel>\n * <OptionsItemDescription>Senior Developer</OptionsItemDescription>\n * </OptionsItemContent>\n * </OptionsItem>\n * </Options>\n * ```\n *\n * @example\n * ```tsx\n * // Sectioned options\n * <Options>\n * <OptionsSection header=\"Recent\">\n * <OptionsItem>Recent Item 1</OptionsItem>\n * </OptionsSection>\n * <OptionsSection header=\"All Items\">\n * <OptionsItem>All Items 1</OptionsItem>\n * </OptionsSection>\n * </Options>\n * ```\n *\n * @param props - {@link OptionsProps}\n * @param props.ref - Forwarded ref to the underlying ListBox element.\n * @param props.children - Options items and sections to render.\n * @param props.className - Optional CSS class name.\n * @param props.size - Size variant for the options list.\n * @returns The rendered Options component.\n */\nexport function Options<T extends OptionsDataItem>({\n ref,\n ...props\n}: OptionsProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, OptionsContext);\n\n const { children, className, size, ...rest } = props;\n\n return (\n <ListBox<T>\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n clsx('group/options', styles.list, className),\n )}\n data-size={size}\n >\n {children}\n </ListBox>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,SAAgB,QAAmC,EACjD,KACA,GAAG,SACe;AAClB,EAAC,OAAO,OAAO,gBAAgB,OAAO,OAAO,MAAM,eAAe;CAElE,MAAM,EAAE,UAAU,WAAW,MAAM,GAAG,SAAS;AAE/C,QACE,oBAAC;EACC,GAAI;EACC;EACL,WAAW,mBAAmB,YAAY,gBACxC,KAAK,iBAAiB,OAAO,MAAMA,YAAU,CAC9C;EACD,aAAW;EAEV;GACO"}
|
|
@@ -11,13 +11,33 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { TextProps } from "react-aria-components";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime102 from "react/jsx-runtime";
|
|
15
15
|
|
|
16
16
|
//#region src/components/options/item-content.d.ts
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* OptionsItemContent - Container for label and description within an item
|
|
20
|
+
*
|
|
21
|
+
* Use when an item needs both a label and description.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <OptionsItem>
|
|
26
|
+
* <OptionsItemContent>
|
|
27
|
+
* <OptionsItemLabel>Option Name</OptionsItemLabel>
|
|
28
|
+
* <OptionsItemDescription>Description text</OptionsItemDescription>
|
|
29
|
+
* </OptionsItemContent>
|
|
30
|
+
* </OptionsItem>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @param props - TextProps from react-aria-components.
|
|
34
|
+
* @param props.className - Optional CSS class name.
|
|
35
|
+
* @returns The rendered OptionsItemContent component.
|
|
36
|
+
*/
|
|
17
37
|
declare function OptionsItemContent({
|
|
18
38
|
className,
|
|
19
39
|
...rest
|
|
20
|
-
}: TextProps):
|
|
40
|
+
}: TextProps): react_jsx_runtime102.JSX.Element;
|
|
21
41
|
//#endregion
|
|
22
42
|
export { OptionsItemContent };
|
|
23
43
|
//# sourceMappingURL=item-content.d.ts.map
|
|
@@ -16,6 +16,25 @@ import { jsx } from "react/jsx-runtime";
|
|
|
16
16
|
import styles from "./styles.module.css";
|
|
17
17
|
|
|
18
18
|
//#region src/components/options/item-content.tsx
|
|
19
|
+
/**
|
|
20
|
+
* OptionsItemContent - Container for label and description within an item
|
|
21
|
+
*
|
|
22
|
+
* Use when an item needs both a label and description.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <OptionsItem>
|
|
27
|
+
* <OptionsItemContent>
|
|
28
|
+
* <OptionsItemLabel>Option Name</OptionsItemLabel>
|
|
29
|
+
* <OptionsItemDescription>Description text</OptionsItemDescription>
|
|
30
|
+
* </OptionsItemContent>
|
|
31
|
+
* </OptionsItem>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param props - TextProps from react-aria-components.
|
|
35
|
+
* @param props.className - Optional CSS class name.
|
|
36
|
+
* @returns The rendered OptionsItemContent component.
|
|
37
|
+
*/
|
|
19
38
|
function OptionsItemContent({ className, ...rest }) {
|
|
20
39
|
return /* @__PURE__ */ jsx("div", {
|
|
21
40
|
...rest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-content.js","names":[],"sources":["../../../src/components/options/item-content.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport styles from './styles.module.css';\nimport type { TextProps } from 'react-aria-components';\n\nexport function OptionsItemContent({ className, ...rest }: TextProps) {\n return <div {...rest} className={clsx(styles.content, className)} />;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"item-content.js","names":[],"sources":["../../../src/components/options/item-content.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport styles from './styles.module.css';\nimport type { TextProps } from 'react-aria-components';\n\n/**\n * OptionsItemContent - Container for label and description within an item\n *\n * Use when an item needs both a label and description.\n *\n * @example\n * ```tsx\n * <OptionsItem>\n * <OptionsItemContent>\n * <OptionsItemLabel>Option Name</OptionsItemLabel>\n * <OptionsItemDescription>Description text</OptionsItemDescription>\n * </OptionsItemContent>\n * </OptionsItem>\n * ```\n *\n * @param props - TextProps from react-aria-components.\n * @param props.className - Optional CSS class name.\n * @returns The rendered OptionsItemContent component.\n */\nexport function OptionsItemContent({ className, ...rest }: TextProps) {\n return <div {...rest} className={clsx(styles.content, className)} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAgB,mBAAmB,EAAE,WAAW,GAAG,QAAmB;AACpE,QAAO,oBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,SAAS,UAAU;GAAI"}
|