@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":[],"sources":["../../../src/components/flashcard/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 { clsx } from '@accelint/design-foundation/lib/utils';\nimport 'client-only';\nimport { createContext, useContext } from 'react';\nimport { Heading, Text } from 'react-aria-components';\nimport { DetailsList } from '../details-list';\nimport { DetailsListLabel } from '../details-list/label';\nimport { DetailsListValue } from '../details-list/value';\nimport { Skeleton } from '../skeleton';\nimport styles from './styles.module.css';\nimport type {\n FlashcardComponentProps,\n FlashcardDetailsListProps,\n FlashcardProps,\n} from './types';\n\nexport const FlashcardContext = createContext<FlashcardProps>({\n isLoading: false,\n header: '',\n subheader: '',\n});\n\n/**\n * Example usage.\n *\n * ```tsx\n * <Flashcard isLoading={isLoading} header=\"Identifier\" subheader=\"DATA\">\n * <FlashcardHero />\n * <FlashcardAdditionalData>\n * {secondaryData}\n * </FlashcardAdditionalData>\n * <FlashcardDetailsList>\n * {detail.map((detail) => (\n * <Fragment key={detail.id}>\n * <FlashcardDetailsLabel>\n * {detail.label}\n * </FlashcardDetailsLabel>\n * <FlashcardDetailsValue>\n * {detail.value}\n * </FlashcardDetailsValue>\n * </Fragment>\n * ))}\n * </FlashcardDetailsList>\n * </Flashcard>\n * ```\n */\nexport function Flashcard(props: FlashcardProps) {\n const { isLoading, header, subheader, children, className, ...rest } = props;\n\n return (\n <FlashcardContext.Provider value={{ isLoading, header, subheader }}>\n <div {...rest} className={clsx(styles.container, className)}>\n {children}\n </div>\n </FlashcardContext.Provider>\n );\n}\nFlashcard.displayName = 'Flashcard';\n\nexport function FlashcardHero(props: FlashcardComponentProps) {\n const { children, className, ...rest } = props;\n const { isLoading, header, subheader } = useContext(FlashcardContext);\n\n if (isLoading) {\n return (\n <div {...rest} className={clsx(styles.hero, className, 'gap-s')}>\n <Skeleton className={styles.skeleton} data-testid='hero-skeleton' />\n <Skeleton className={clsx(styles.skeleton, styles.half)} />\n </div>\n );\n }\n\n return (\n <div {...rest} className={clsx(styles.hero, className)}>\n <FlashcardHeader className={styles.header}>{header}</FlashcardHeader>\n <FlashcardSubheader className={styles.subheader}>\n {subheader}\n </FlashcardSubheader>\n </div>\n );\n}\nFlashcardHero.displayName = 'FlashcardHero';\n\nconst FlashcardHeader = Heading;\nconst FlashcardSubheader = Text;\n\nexport function FlashcardAdditionalData(props: FlashcardComponentProps) {\n const { children, className, ...rest } = props;\n const { isLoading } = useContext(FlashcardContext);\n\n // While loading, don't display.\n if (isLoading) {\n return null;\n }\n\n return (\n <div {...rest} className={clsx(styles.data, className)}>\n {children}\n </div>\n );\n}\nFlashcardAdditionalData.displayName = 'FlashcardAdditionalData';\n\nexport function FlashcardDetailsList(props: FlashcardDetailsListProps) {\n const { children, className, ...rest } = props;\n return (\n <DetailsList\n {...rest}\n align='justify'\n classNames={{ list: clsx(styles['details-list'], className) }}\n >\n {children}\n </DetailsList>\n );\n}\nFlashcardDetailsList.displayName = 'FlashcardDetailsList';\n\nexport function FlashcardDetailsLabel(props: FlashcardComponentProps) {\n const { isLoading } = useContext(FlashcardContext);\n const { className, children, ...rest } = props;\n return (\n <DetailsListLabel\n {...rest}\n className={clsx(styles['details-label'], className)}\n >\n {isLoading ? (\n <Skeleton className={clsx(styles.skeleton, styles.smaller)} />\n ) : (\n children\n )}\n </DetailsListLabel>\n );\n}\nFlashcardDetailsLabel.displayName = 'FlashcardDetailsLabel';\n\nexport function FlashcardDetailsValue(props: FlashcardComponentProps) {\n const { isLoading } = useContext(FlashcardContext);\n const { className, children, ...rest } = props;\n return (\n <DetailsListValue\n {...rest}\n className={clsx(styles['details-value'], className)}\n >\n {isLoading ? (\n <Skeleton className={clsx(styles.skeleton, styles.smaller)} />\n ) : (\n children\n )}\n </DetailsListValue>\n );\n}\nFlashcardDetailsValue.displayName = 'FlashcardDetailsValue';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,mBAAmB,cAA8B;CAC5D,WAAW;CACX,QAAQ;CACR,WAAW;CACZ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AA0BF,SAAgB,UAAU,OAAuB;CAC/C,MAAM,EAAE,WAAW,QAAQ,WAAW,UAAU,WAAW,GAAG,SAAS;AAEvE,QACE,oBAAC,iBAAiB;EAAS,OAAO;GAAE;GAAW;GAAQ;GAAW;YAChE,oBAAC;GAAI,GAAI;GAAM,WAAW,KAAK,OAAO,WAAW,UAAU;GACxD;IACG;GACoB;;AAGhC,UAAU,cAAc;AAExB,SAAgB,cAAc,OAAgC;CAC5D,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,MAAM,EAAE,WAAW,QAAQ,cAAc,WAAW,iBAAiB;AAErE,KAAI,UACF,QACE,qBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,MAAM,WAAW,QAAQ;aAC7D,oBAAC;GAAS,WAAW,OAAO;GAAU,eAAY;IAAkB,EACpE,oBAAC,YAAS,WAAW,KAAK,OAAO,UAAU,OAAO,KAAK,GAAI;GACvD;AAIV,QACE,qBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,MAAM,UAAU;aACpD,oBAAC;GAAgB,WAAW,OAAO;aAAS;IAAyB,EACrE,oBAAC;GAAmB,WAAW,OAAO;aACnC;IACkB;GACjB;;AAGV,cAAc,cAAc;AAE5B,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAE3B,SAAgB,wBAAwB,OAAgC;CACtE,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,MAAM,EAAE,cAAc,WAAW,iBAAiB;AAGlD,KAAI,UACF,QAAO;AAGT,QACE,oBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,MAAM,UAAU;EACnD;GACG;;AAGV,wBAAwB,cAAc;AAEtC,SAAgB,qBAAqB,OAAkC;CACrE,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;AACzC,QACE,oBAAC;EACC,GAAI;EACJ,OAAM;EACN,YAAY,EAAE,MAAM,KAAK,OAAO,iBAAiB,UAAU,EAAE;EAE5D;GACW;;AAGlB,qBAAqB,cAAc;AAEnC,SAAgB,sBAAsB,OAAgC;CACpE,MAAM,EAAE,cAAc,WAAW,iBAAiB;CAClD,MAAM,EAAE,WAAW,UAAU,GAAG,SAAS;AACzC,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,OAAO,kBAAkB,UAAU;YAElD,YACC,oBAAC,YAAS,WAAW,KAAK,OAAO,UAAU,OAAO,QAAQ,GAAI,GAE9D;GAEe;;AAGvB,sBAAsB,cAAc;AAEpC,SAAgB,sBAAsB,OAAgC;CACpE,MAAM,EAAE,cAAc,WAAW,iBAAiB;CAClD,MAAM,EAAE,WAAW,UAAU,GAAG,SAAS;AACzC,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,OAAO,kBAAkB,UAAU;YAElD,YACC,oBAAC,YAAS,WAAW,KAAK,OAAO,UAAU,OAAO,QAAQ,GAAI,GAE9D;GAEe;;AAGvB,sBAAsB,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/flashcard/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 { clsx } from '@accelint/design-foundation/lib/utils';\nimport 'client-only';\nimport { createContext, useContext } from 'react';\nimport { Heading, Text } from 'react-aria-components';\nimport { DetailsList } from '../details-list';\nimport { DetailsListLabel } from '../details-list/label';\nimport { DetailsListValue } from '../details-list/value';\nimport { Skeleton } from '../skeleton';\nimport styles from './styles.module.css';\nimport type {\n FlashcardComponentProps,\n FlashcardDetailsListProps,\n FlashcardProps,\n} from './types';\n\n/**\n * Context for sharing Flashcard state across child components.\n */\nexport const FlashcardContext = createContext<FlashcardProps>({\n isLoading: false,\n header: '',\n subheader: '',\n});\n\n/**\n * Flashcard - A quick visual identifier for map entity data.\n *\n * Container component that provides loading state and header/subheader\n * to child components via context.\n *\n * @param props - {@link FlashcardProps}\n * @param props.isLoading - Whether the flashcard is in a loading state.\n * @param props.header - Primary header text.\n * @param props.subheader - Secondary text below the header.\n * @param props.children - Child components to render.\n * @param props.className - Optional CSS class name.\n * @returns The rendered Flashcard component.\n *\n * @example\n * ```tsx\n * <Flashcard isLoading={false} header=\"Identifier\" subheader=\"DATA\">\n * <FlashcardHero />\n * <FlashcardAdditionalData>Secondary info</FlashcardAdditionalData>\n * <FlashcardDetailsList>\n * <FlashcardDetailsLabel>Status</FlashcardDetailsLabel>\n * <FlashcardDetailsValue>Active</FlashcardDetailsValue>\n * </FlashcardDetailsList>\n * </Flashcard>\n * ```\n */\nexport function Flashcard(props: FlashcardProps) {\n const { isLoading, header, subheader, children, className, ...rest } = props;\n\n return (\n <FlashcardContext.Provider value={{ isLoading, header, subheader }}>\n <div {...rest} className={clsx(styles.container, className)}>\n {children}\n </div>\n </FlashcardContext.Provider>\n );\n}\nFlashcard.displayName = 'Flashcard';\n\n/**\n * FlashcardHero - Upper section displaying header and subheader.\n *\n * Reads header and subheader from Flashcard context. Shows skeleton\n * placeholders when the parent Flashcard has isLoading=true.\n *\n * @param props - {@link FlashcardComponentProps}\n * @param props.children - Optional child content.\n * @param props.className - Optional CSS class name.\n * @returns The rendered FlashcardHero component.\n *\n * @example\n * ```tsx\n * <Flashcard header=\"Entity Name\" subheader=\"Type\">\n * <FlashcardHero />\n * </Flashcard>\n * ```\n */\nexport function FlashcardHero(props: FlashcardComponentProps) {\n const { children, className, ...rest } = props;\n const { isLoading, header, subheader } = useContext(FlashcardContext);\n\n if (isLoading) {\n return (\n <div {...rest} className={clsx(styles.hero, className, 'gap-s')}>\n <Skeleton className={styles.skeleton} data-testid='hero-skeleton' />\n <Skeleton className={clsx(styles.skeleton, styles.half)} />\n </div>\n );\n }\n\n return (\n <div {...rest} className={clsx(styles.hero, className)}>\n <FlashcardHeader className={styles.header}>{header}</FlashcardHeader>\n <FlashcardSubheader className={styles.subheader}>\n {subheader}\n </FlashcardSubheader>\n </div>\n );\n}\nFlashcardHero.displayName = 'FlashcardHero';\n\nconst FlashcardHeader = Heading;\nconst FlashcardSubheader = Text;\n\n/**\n * FlashcardAdditionalData - Secondary data section below the hero.\n *\n * Hidden when the parent Flashcard has isLoading=true.\n *\n * @param props - {@link FlashcardComponentProps}\n * @param props.children - Content to display in the section.\n * @param props.className - Optional CSS class name.\n * @returns The rendered FlashcardAdditionalData component, or null if loading.\n *\n * @example\n * ```tsx\n * <Flashcard header=\"Entity\" subheader=\"Data\">\n * <FlashcardHero />\n * <FlashcardAdditionalData>\n * Last updated: 2024-01-15\n * </FlashcardAdditionalData>\n * </Flashcard>\n * ```\n */\nexport function FlashcardAdditionalData(props: FlashcardComponentProps) {\n const { children, className, ...rest } = props;\n const { isLoading } = useContext(FlashcardContext);\n\n // While loading, don't display.\n if (isLoading) {\n return null;\n }\n\n return (\n <div {...rest} className={clsx(styles.data, className)}>\n {children}\n </div>\n );\n}\nFlashcardAdditionalData.displayName = 'FlashcardAdditionalData';\n\n/**\n * FlashcardDetailsList - Wrapper for key-value detail pairs.\n *\n * Wraps DetailsList with justify alignment for flashcard styling.\n *\n * @param props - {@link FlashcardDetailsListProps}\n * @param props.children - FlashcardDetailsLabel and FlashcardDetailsValue pairs.\n * @param props.className - Optional CSS class name.\n * @returns The rendered FlashcardDetailsList component.\n *\n * @example\n * ```tsx\n * <Flashcard header=\"Aircraft\" subheader=\"Entity\">\n * <FlashcardHero />\n * <FlashcardDetailsList>\n * <FlashcardDetailsLabel>Status</FlashcardDetailsLabel>\n * <FlashcardDetailsValue>Active</FlashcardDetailsValue>\n * <FlashcardDetailsLabel>Speed</FlashcardDetailsLabel>\n * <FlashcardDetailsValue>450 kts</FlashcardDetailsValue>\n * </FlashcardDetailsList>\n * </Flashcard>\n * ```\n */\nexport function FlashcardDetailsList(props: FlashcardDetailsListProps) {\n const { children, className, ...rest } = props;\n return (\n <DetailsList\n {...rest}\n align='justify'\n classNames={{ list: clsx(styles['details-list'], className) }}\n >\n {children}\n </DetailsList>\n );\n}\nFlashcardDetailsList.displayName = 'FlashcardDetailsList';\n\n/**\n * FlashcardDetailsLabel - Label for detail items.\n *\n * Shows skeleton placeholder when the parent Flashcard has isLoading=true.\n *\n * @param props - {@link FlashcardComponentProps}\n * @param props.children - Label text content.\n * @param props.className - Optional CSS class name.\n * @returns The rendered FlashcardDetailsLabel component.\n *\n * @example\n * ```tsx\n * <FlashcardDetailsList>\n * <FlashcardDetailsLabel>Status</FlashcardDetailsLabel>\n * <FlashcardDetailsValue>Active</FlashcardDetailsValue>\n * </FlashcardDetailsList>\n * ```\n */\nexport function FlashcardDetailsLabel(props: FlashcardComponentProps) {\n const { isLoading } = useContext(FlashcardContext);\n const { className, children, ...rest } = props;\n return (\n <DetailsListLabel\n {...rest}\n className={clsx(styles['details-label'], className)}\n >\n {isLoading ? (\n <Skeleton className={clsx(styles.skeleton, styles.smaller)} />\n ) : (\n children\n )}\n </DetailsListLabel>\n );\n}\nFlashcardDetailsLabel.displayName = 'FlashcardDetailsLabel';\n\n/**\n * FlashcardDetailsValue - Value for detail items.\n *\n * Shows skeleton placeholder when the parent Flashcard has isLoading=true.\n *\n * @param props - {@link FlashcardComponentProps}\n * @param props.children - Value text content.\n * @param props.className - Optional CSS class name.\n * @returns The rendered FlashcardDetailsValue component.\n *\n * @example\n * ```tsx\n * <FlashcardDetailsList>\n * <FlashcardDetailsLabel>Type</FlashcardDetailsLabel>\n * <FlashcardDetailsValue>Aircraft</FlashcardDetailsValue>\n * </FlashcardDetailsList>\n * ```\n */\nexport function FlashcardDetailsValue(props: FlashcardComponentProps) {\n const { isLoading } = useContext(FlashcardContext);\n const { className, children, ...rest } = props;\n return (\n <DetailsListValue\n {...rest}\n className={clsx(styles['details-value'], className)}\n >\n {isLoading ? (\n <Skeleton className={clsx(styles.skeleton, styles.smaller)} />\n ) : (\n children\n )}\n </DetailsListValue>\n );\n}\nFlashcardDetailsValue.displayName = 'FlashcardDetailsValue';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,mBAAmB,cAA8B;CAC5D,WAAW;CACX,QAAQ;CACR,WAAW;CACZ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BF,SAAgB,UAAU,OAAuB;CAC/C,MAAM,EAAE,WAAW,QAAQ,WAAW,UAAU,WAAW,GAAG,SAAS;AAEvE,QACE,oBAAC,iBAAiB;EAAS,OAAO;GAAE;GAAW;GAAQ;GAAW;YAChE,oBAAC;GAAI,GAAI;GAAM,WAAW,KAAK,OAAO,WAAW,UAAU;GACxD;IACG;GACoB;;AAGhC,UAAU,cAAc;;;;;;;;;;;;;;;;;;;AAoBxB,SAAgB,cAAc,OAAgC;CAC5D,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,MAAM,EAAE,WAAW,QAAQ,cAAc,WAAW,iBAAiB;AAErE,KAAI,UACF,QACE,qBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,MAAM,WAAW,QAAQ;aAC7D,oBAAC;GAAS,WAAW,OAAO;GAAU,eAAY;IAAkB,EACpE,oBAAC,YAAS,WAAW,KAAK,OAAO,UAAU,OAAO,KAAK,GAAI;GACvD;AAIV,QACE,qBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,MAAM,UAAU;aACpD,oBAAC;GAAgB,WAAW,OAAO;aAAS;IAAyB,EACrE,oBAAC;GAAmB,WAAW,OAAO;aACnC;IACkB;GACjB;;AAGV,cAAc,cAAc;AAE5B,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;AAsB3B,SAAgB,wBAAwB,OAAgC;CACtE,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,MAAM,EAAE,cAAc,WAAW,iBAAiB;AAGlD,KAAI,UACF,QAAO;AAGT,QACE,oBAAC;EAAI,GAAI;EAAM,WAAW,KAAK,OAAO,MAAM,UAAU;EACnD;GACG;;AAGV,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;AAyBtC,SAAgB,qBAAqB,OAAkC;CACrE,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;AACzC,QACE,oBAAC;EACC,GAAI;EACJ,OAAM;EACN,YAAY,EAAE,MAAM,KAAK,OAAO,iBAAiB,UAAU,EAAE;EAE5D;GACW;;AAGlB,qBAAqB,cAAc;;;;;;;;;;;;;;;;;;;AAoBnC,SAAgB,sBAAsB,OAAgC;CACpE,MAAM,EAAE,cAAc,WAAW,iBAAiB;CAClD,MAAM,EAAE,WAAW,UAAU,GAAG,SAAS;AACzC,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,OAAO,kBAAkB,UAAU;YAElD,YACC,oBAAC,YAAS,WAAW,KAAK,OAAO,UAAU,OAAO,QAAQ,GAAI,GAE9D;GAEe;;AAGvB,sBAAsB,cAAc;;;;;;;;;;;;;;;;;;;AAoBpC,SAAgB,sBAAsB,OAAgC;CACpE,MAAM,EAAE,cAAc,WAAW,iBAAiB;CAClD,MAAM,EAAE,WAAW,UAAU,GAAG,SAAS;AACzC,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,OAAO,kBAAkB,UAAU;YAElD,YACC,oBAAC,YAAS,WAAW,KAAK,OAAO,UAAU,OAAO,QAAQ,GAAI,GAE9D;GAEe;;AAGvB,sBAAsB,cAAc"}
|
|
@@ -14,12 +14,24 @@ import { DetailsListProps } from "../details-list/types.js";
|
|
|
14
14
|
import { ComponentPropsWithRef, PropsWithChildren } from "react";
|
|
15
15
|
|
|
16
16
|
//#region src/components/flashcard/types.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Base props for Flashcard child components.
|
|
19
|
+
*/
|
|
17
20
|
type FlashcardComponentProps = PropsWithChildren & ComponentPropsWithRef<'div'>;
|
|
21
|
+
/**
|
|
22
|
+
* Props for the Flashcard component.
|
|
23
|
+
*/
|
|
18
24
|
type FlashcardProps = FlashcardComponentProps & {
|
|
25
|
+
/** Whether the flashcard is in a loading state. */
|
|
19
26
|
isLoading?: boolean;
|
|
27
|
+
/** Primary header text displayed in the hero section. */
|
|
20
28
|
header: string;
|
|
29
|
+
/** Secondary text displayed below the header. */
|
|
21
30
|
subheader: string;
|
|
22
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Props for the FlashcardDetailsList component.
|
|
34
|
+
*/
|
|
23
35
|
type FlashcardDetailsListProps = FlashcardComponentProps & Partial<DetailsListProps>;
|
|
24
36
|
//#endregion
|
|
25
37
|
export { FlashcardComponentProps, FlashcardDetailsListProps, FlashcardProps };
|
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
|
|
13
13
|
import { HeroProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react27 from "react";
|
|
16
16
|
import { ContextValue } from "react-aria-components";
|
|
17
17
|
|
|
18
18
|
//#region src/components/hero/context.d.ts
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Context for sharing Hero props across component tree.
|
|
21
|
+
*/
|
|
22
|
+
declare const HeroContext: react27.Context<ContextValue<HeroProps, HTMLElement>>;
|
|
20
23
|
//#endregion
|
|
21
24
|
export { HeroContext };
|
|
22
25
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/hero/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 { HeroProps } from './types';\n\nexport const HeroContext =\n createContext<ContextValue<HeroProps, HTMLElement>>(null);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/hero/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 { HeroProps } from './types';\n\n/**\n * Context for sharing Hero props across component tree.\n */\nexport const HeroContext =\n createContext<ContextValue<HeroProps, HTMLElement>>(null);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,cACX,cAAoD,KAAK"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { HeroProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime53 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/hero/index.d.ts
|
|
18
18
|
|
|
@@ -20,6 +20,13 @@ import * as react_jsx_runtime56 from "react/jsx-runtime";
|
|
|
20
20
|
* A versatile hero component that displays an icon alongside primary and secondary content.
|
|
21
21
|
* Automatically organizes child components by type and supports both stacked and grid layouts.
|
|
22
22
|
*
|
|
23
|
+
* @param props - {@link HeroProps}
|
|
24
|
+
* @param props.ref - Ref to the header element.
|
|
25
|
+
* @param props.children - Child components (Icon, HeroTitle, HeroSubtitle).
|
|
26
|
+
* @param props.classNames - Class names for Hero sub-elements.
|
|
27
|
+
* @param props.compact - Whether to use compact grid layout.
|
|
28
|
+
* @returns The rendered Hero component.
|
|
29
|
+
*
|
|
23
30
|
* @example
|
|
24
31
|
* ```tsx
|
|
25
32
|
* // Basic hero with icon and content
|
|
@@ -49,7 +56,7 @@ import * as react_jsx_runtime56 from "react/jsx-runtime";
|
|
|
49
56
|
declare function Hero({
|
|
50
57
|
ref,
|
|
51
58
|
...props
|
|
52
|
-
}: HeroProps):
|
|
59
|
+
}: HeroProps): react_jsx_runtime53.JSX.Element;
|
|
53
60
|
//#endregion
|
|
54
61
|
export { Hero };
|
|
55
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -26,6 +26,13 @@ import styles from "./styles.module.css";
|
|
|
26
26
|
* A versatile hero component that displays an icon alongside primary and secondary content.
|
|
27
27
|
* Automatically organizes child components by type and supports both stacked and grid layouts.
|
|
28
28
|
*
|
|
29
|
+
* @param props - {@link HeroProps}
|
|
30
|
+
* @param props.ref - Ref to the header element.
|
|
31
|
+
* @param props.children - Child components (Icon, HeroTitle, HeroSubtitle).
|
|
32
|
+
* @param props.classNames - Class names for Hero sub-elements.
|
|
33
|
+
* @param props.compact - Whether to use compact grid layout.
|
|
34
|
+
* @returns The rendered Hero component.
|
|
35
|
+
*
|
|
29
36
|
* @example
|
|
30
37
|
* ```tsx
|
|
31
38
|
* // Basic hero with icon and content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/hero/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 Header,\n HeadingContext,\n Provider,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { IconContext } from '../icon/context';\nimport { HeroContext } from './context';\nimport styles from './styles.module.css';\nimport type { HeroProps } from './types';\n\n/**\n * A versatile hero component that displays an icon alongside primary and secondary content.\n * Automatically organizes child components by type and supports both stacked and grid layouts.\n *\n * @example\n * ```tsx\n * // Basic hero with icon and content\n * <Hero>\n * <Icon><Placeholder /></Icon>\n * <HeroTitle>Primary Title</HeroTitle>\n * <HeroSubtitle>Secondary information</HeroSubtitle>\n * </Hero>\n *\n * // Grid layout for compact display\n * <Hero compact>\n * <Icon><Settings /></Icon>\n * <HeroTitle>Settings</HeroTitle>\n * <HeroSubtitle>Configure your preferences</HeroSubtitle>\n * </Hero>\n * ```\n *\n * ## Child Component Behavior\n * - **Icon**: Only one allowed\n * - **HeroTitle**: Only one allowed\n * - **HeroSubtitle**: Any number allowed as secondary content\n *\n * ## Layout Modes\n * - **Stack** (default): Vertical layout with larger icon and stacked content\n * - **Grid** (compact=true): Horizontal layout with smaller icon beside content\n */\nexport function Hero({ ref, ...props }: HeroProps) {\n [props, ref] = useContextProps(props, ref ?? null, HeroContext);\n\n const { children, classNames, compact, ...rest } = props;\n\n return (\n <Provider\n values={[\n [\n IconContext,\n { className: clsx(styles.icon, classNames?.icon), size: 'large' },\n ],\n [\n HeadingContext,\n { className: clsx(styles.title, classNames?.title), level: 2 },\n ],\n [\n TextContext,\n { className: clsx(styles.subtitle, classNames?.subtitle) },\n ],\n ]}\n >\n <Header\n {...rest}\n ref={ref}\n className={clsx('group/hero', styles.hero, classNames?.hero)}\n data-layout={compact ? 'grid' : 'stack'}\n >\n {children}\n </Header>\n </Provider>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/hero/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 Header,\n HeadingContext,\n Provider,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { IconContext } from '../icon/context';\nimport { HeroContext } from './context';\nimport styles from './styles.module.css';\nimport type { HeroProps } from './types';\n\n/**\n * A versatile hero component that displays an icon alongside primary and secondary content.\n * Automatically organizes child components by type and supports both stacked and grid layouts.\n *\n * @param props - {@link HeroProps}\n * @param props.ref - Ref to the header element.\n * @param props.children - Child components (Icon, HeroTitle, HeroSubtitle).\n * @param props.classNames - Class names for Hero sub-elements.\n * @param props.compact - Whether to use compact grid layout.\n * @returns The rendered Hero component.\n *\n * @example\n * ```tsx\n * // Basic hero with icon and content\n * <Hero>\n * <Icon><Placeholder /></Icon>\n * <HeroTitle>Primary Title</HeroTitle>\n * <HeroSubtitle>Secondary information</HeroSubtitle>\n * </Hero>\n *\n * // Grid layout for compact display\n * <Hero compact>\n * <Icon><Settings /></Icon>\n * <HeroTitle>Settings</HeroTitle>\n * <HeroSubtitle>Configure your preferences</HeroSubtitle>\n * </Hero>\n * ```\n *\n * ## Child Component Behavior\n * - **Icon**: Only one allowed\n * - **HeroTitle**: Only one allowed\n * - **HeroSubtitle**: Any number allowed as secondary content\n *\n * ## Layout Modes\n * - **Stack** (default): Vertical layout with larger icon and stacked content\n * - **Grid** (compact=true): Horizontal layout with smaller icon beside content\n */\nexport function Hero({ ref, ...props }: HeroProps) {\n [props, ref] = useContextProps(props, ref ?? null, HeroContext);\n\n const { children, classNames, compact, ...rest } = props;\n\n return (\n <Provider\n values={[\n [\n IconContext,\n { className: clsx(styles.icon, classNames?.icon), size: 'large' },\n ],\n [\n HeadingContext,\n { className: clsx(styles.title, classNames?.title), level: 2 },\n ],\n [\n TextContext,\n { className: clsx(styles.subtitle, classNames?.subtitle) },\n ],\n ]}\n >\n <Header\n {...rest}\n ref={ref}\n className={clsx('group/hero', styles.hero, classNames?.hero)}\n data-layout={compact ? 'grid' : 'stack'}\n >\n {children}\n </Header>\n </Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAgB,KAAK,EAAE,KAAK,GAAG,SAAoB;AACjD,EAAC,OAAO,OAAO,gBAAgB,OAAO,OAAO,MAAM,YAAY;CAE/D,MAAM,EAAE,UAAU,YAAY,SAAS,GAAG,SAAS;AAEnD,QACE,oBAAC;EACC,QAAQ;GACN,CACE,aACA;IAAE,WAAW,KAAK,OAAO,MAAM,YAAY,KAAK;IAAE,MAAM;IAAS,CAClE;GACD,CACE,gBACA;IAAE,WAAW,KAAK,OAAO,OAAO,YAAY,MAAM;IAAE,OAAO;IAAG,CAC/D;GACD,CACE,aACA,EAAE,WAAW,KAAK,OAAO,UAAU,YAAY,SAAS,EAAE,CAC3D;GACF;YAED,oBAAC;GACC,GAAI;GACC;GACL,WAAW,KAAK,cAAc,OAAO,MAAM,YAAY,KAAK;GAC5D,eAAa,UAAU,SAAS;GAE/B;IACM;GACA"}
|
|
@@ -11,11 +11,26 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import "client-only";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react21 from "react";
|
|
15
15
|
import * as react_aria_components0 from "react-aria-components";
|
|
16
16
|
|
|
17
17
|
//#region src/components/hero/subtitle.d.ts
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* HeroSubtitle - Secondary text content for the Hero component.
|
|
20
|
+
*
|
|
21
|
+
* Zero or more allowed per Hero for displaying additional metadata.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Hero>
|
|
26
|
+
* <Icon><User /></Icon>
|
|
27
|
+
* <HeroTitle>John Doe</HeroTitle>
|
|
28
|
+
* <HeroSubtitle>Software Engineer</HeroSubtitle>
|
|
29
|
+
* <HeroSubtitle>San Francisco, CA</HeroSubtitle>
|
|
30
|
+
* </Hero>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const HeroSubtitle: react21.ForwardRefExoticComponent<react_aria_components0.TextProps & react21.RefAttributes<HTMLElement>>;
|
|
19
34
|
//#endregion
|
|
20
35
|
export { HeroSubtitle };
|
|
21
36
|
//# sourceMappingURL=subtitle.d.ts.map
|
|
@@ -17,6 +17,21 @@ import "client-only";
|
|
|
17
17
|
import { Text } from "react-aria-components";
|
|
18
18
|
|
|
19
19
|
//#region src/components/hero/subtitle.tsx
|
|
20
|
+
/**
|
|
21
|
+
* HeroSubtitle - Secondary text content for the Hero component.
|
|
22
|
+
*
|
|
23
|
+
* Zero or more allowed per Hero for displaying additional metadata.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Hero>
|
|
28
|
+
* <Icon><User /></Icon>
|
|
29
|
+
* <HeroTitle>John Doe</HeroTitle>
|
|
30
|
+
* <HeroSubtitle>Software Engineer</HeroSubtitle>
|
|
31
|
+
* <HeroSubtitle>San Francisco, CA</HeroSubtitle>
|
|
32
|
+
* </Hero>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
20
35
|
const HeroSubtitle = Text;
|
|
21
36
|
|
|
22
37
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subtitle.js","names":[],"sources":["../../../src/components/hero/subtitle.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 { Text } from 'react-aria-components';\n\nexport const HeroSubtitle = Text;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"subtitle.js","names":[],"sources":["../../../src/components/hero/subtitle.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 { Text } from 'react-aria-components';\n\n/**\n * HeroSubtitle - Secondary text content for the Hero component.\n *\n * Zero or more allowed per Hero for displaying additional metadata.\n *\n * @example\n * ```tsx\n * <Hero>\n * <Icon><User /></Icon>\n * <HeroTitle>John Doe</HeroTitle>\n * <HeroSubtitle>Software Engineer</HeroSubtitle>\n * <HeroSubtitle>San Francisco, CA</HeroSubtitle>\n * </Hero>\n * ```\n */\nexport const HeroSubtitle = Text;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,eAAe"}
|
|
@@ -11,11 +11,24 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import "client-only";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react18 from "react";
|
|
15
15
|
import * as react_aria_components0 from "react-aria-components";
|
|
16
16
|
|
|
17
17
|
//#region src/components/hero/title.d.ts
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* HeroTitle - Primary heading for the Hero component.
|
|
20
|
+
*
|
|
21
|
+
* Renders as an `<h2>` element. Exactly one required per Hero.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Hero>
|
|
26
|
+
* <Icon><Placeholder /></Icon>
|
|
27
|
+
* <HeroTitle>Primary Title</HeroTitle>
|
|
28
|
+
* </Hero>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare const HeroTitle: react18.ForwardRefExoticComponent<react_aria_components0.HeadingProps & react18.RefAttributes<HTMLHeadingElement>>;
|
|
19
32
|
//#endregion
|
|
20
33
|
export { HeroTitle };
|
|
21
34
|
//# sourceMappingURL=title.d.ts.map
|
|
@@ -17,6 +17,19 @@ import "client-only";
|
|
|
17
17
|
import { Heading } from "react-aria-components";
|
|
18
18
|
|
|
19
19
|
//#region src/components/hero/title.tsx
|
|
20
|
+
/**
|
|
21
|
+
* HeroTitle - Primary heading for the Hero component.
|
|
22
|
+
*
|
|
23
|
+
* Renders as an `<h2>` element. Exactly one required per Hero.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Hero>
|
|
28
|
+
* <Icon><Placeholder /></Icon>
|
|
29
|
+
* <HeroTitle>Primary Title</HeroTitle>
|
|
30
|
+
* </Hero>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
20
33
|
const HeroTitle = Heading;
|
|
21
34
|
|
|
22
35
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","names":[],"sources":["../../../src/components/hero/title.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 { Heading } from 'react-aria-components';\n\nexport const HeroTitle = Heading;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"title.js","names":[],"sources":["../../../src/components/hero/title.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 { Heading } from 'react-aria-components';\n\n/**\n * HeroTitle - Primary heading for the Hero component.\n *\n * Renders as an `<h2>` element. Exactly one required per Hero.\n *\n * @example\n * ```tsx\n * <Hero>\n * <Icon><Placeholder /></Icon>\n * <HeroTitle>Primary Title</HeroTitle>\n * </Hero>\n * ```\n */\nexport const HeroTitle = Heading;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,YAAY"}
|
|
@@ -13,13 +13,22 @@
|
|
|
13
13
|
import { ComponentPropsWithRef } from "react";
|
|
14
14
|
|
|
15
15
|
//#region src/components/hero/types.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Props for the Hero component.
|
|
18
|
+
*/
|
|
16
19
|
type HeroProps = Omit<ComponentPropsWithRef<'header'>, 'className'> & {
|
|
20
|
+
/** Class names for Hero sub-elements. */
|
|
17
21
|
classNames?: {
|
|
22
|
+
/** Class name for the hero container. */
|
|
18
23
|
hero?: string;
|
|
24
|
+
/** Class name for the icon. */
|
|
19
25
|
icon?: string;
|
|
26
|
+
/** Class name for the title. */
|
|
20
27
|
title?: string;
|
|
28
|
+
/** Class name for the subtitle. */
|
|
21
29
|
subtitle?: string;
|
|
22
30
|
};
|
|
31
|
+
/** Whether to use compact grid layout instead of stacked layout. */
|
|
23
32
|
compact?: boolean;
|
|
24
33
|
};
|
|
25
34
|
//#endregion
|
|
@@ -13,16 +13,36 @@
|
|
|
13
13
|
import { ProviderProps } from "../../lib/types.js";
|
|
14
14
|
import { HotkeyProps } from "./types.js";
|
|
15
15
|
import "client-only";
|
|
16
|
-
import * as
|
|
16
|
+
import * as react20 from "react";
|
|
17
17
|
import { ContextValue } from "react-aria-components";
|
|
18
|
-
import * as
|
|
18
|
+
import * as react_jsx_runtime52 from "react/jsx-runtime";
|
|
19
19
|
|
|
20
20
|
//#region src/components/hotkey/context.d.ts
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Context for sharing Hotkey props across component tree.
|
|
23
|
+
*/
|
|
24
|
+
declare const HotkeyContext: react20.Context<ContextValue<HotkeyProps, HTMLElement>>;
|
|
25
|
+
/**
|
|
26
|
+
* HotkeyProvider - Context provider for setting default Hotkey props.
|
|
27
|
+
*
|
|
28
|
+
* Use this to configure shared variant across multiple Hotkey components.
|
|
29
|
+
*
|
|
30
|
+
* @param props - ProviderProps<HotkeyProps>
|
|
31
|
+
* @param props.children - Child components to receive context.
|
|
32
|
+
* @returns The rendered HotkeyProvider component.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <HotkeyProvider variant="flat">
|
|
37
|
+
* <Hotkey>Ctrl</Hotkey>
|
|
38
|
+
* <Hotkey>C</Hotkey>
|
|
39
|
+
* </HotkeyProvider>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
22
42
|
declare function HotkeyProvider({
|
|
23
43
|
children,
|
|
24
44
|
...props
|
|
25
|
-
}: ProviderProps<HotkeyProps>):
|
|
45
|
+
}: ProviderProps<HotkeyProps>): react_jsx_runtime52.JSX.Element;
|
|
26
46
|
//#endregion
|
|
27
47
|
export { HotkeyContext, HotkeyProvider };
|
|
28
48
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -18,7 +18,27 @@ import { createContext } from "react";
|
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
19
19
|
|
|
20
20
|
//#region src/components/hotkey/context.tsx
|
|
21
|
+
/**
|
|
22
|
+
* Context for sharing Hotkey props across component tree.
|
|
23
|
+
*/
|
|
21
24
|
const HotkeyContext = createContext(null);
|
|
25
|
+
/**
|
|
26
|
+
* HotkeyProvider - Context provider for setting default Hotkey props.
|
|
27
|
+
*
|
|
28
|
+
* Use this to configure shared variant across multiple Hotkey components.
|
|
29
|
+
*
|
|
30
|
+
* @param props - ProviderProps<HotkeyProps>
|
|
31
|
+
* @param props.children - Child components to receive context.
|
|
32
|
+
* @returns The rendered HotkeyProvider component.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <HotkeyProvider variant="flat">
|
|
37
|
+
* <Hotkey>Ctrl</Hotkey>
|
|
38
|
+
* <Hotkey>C</Hotkey>
|
|
39
|
+
* </HotkeyProvider>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
22
42
|
function HotkeyProvider({ children, ...props }) {
|
|
23
43
|
return /* @__PURE__ */ jsx(HotkeyContext.Provider, {
|
|
24
44
|
value: props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/hotkey/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\n'use client';\n\nimport type { ProviderProps } from '@/lib/types';\nimport 'client-only';\nimport { createContext } from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport type { HotkeyProps } from './types';\n\nexport const HotkeyContext =\n createContext<ContextValue<HotkeyProps, HTMLElement>>(null);\n\nexport function HotkeyProvider({\n children,\n ...props\n}: ProviderProps<HotkeyProps>) {\n return (\n <HotkeyContext.Provider value={props}>{children}</HotkeyContext.Provider>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/hotkey/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\n'use client';\n\nimport type { ProviderProps } from '@/lib/types';\nimport 'client-only';\nimport { createContext } from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport type { HotkeyProps } from './types';\n\n/**\n * Context for sharing Hotkey props across component tree.\n */\nexport const HotkeyContext =\n createContext<ContextValue<HotkeyProps, HTMLElement>>(null);\n\n/**\n * HotkeyProvider - Context provider for setting default Hotkey props.\n *\n * Use this to configure shared variant across multiple Hotkey components.\n *\n * @param props - ProviderProps<HotkeyProps>\n * @param props.children - Child components to receive context.\n * @returns The rendered HotkeyProvider component.\n *\n * @example\n * ```tsx\n * <HotkeyProvider variant=\"flat\">\n * <Hotkey>Ctrl</Hotkey>\n * <Hotkey>C</Hotkey>\n * </HotkeyProvider>\n * ```\n */\nexport function HotkeyProvider({\n children,\n ...props\n}: ProviderProps<HotkeyProps>) {\n return (\n <HotkeyContext.Provider value={props}>{children}</HotkeyContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,gBACX,cAAsD,KAAK;;;;;;;;;;;;;;;;;;AAmB7D,SAAgB,eAAe,EAC7B,UACA,GAAG,SAC0B;AAC7B,QACE,oBAAC,cAAc;EAAS,OAAO;EAAQ;GAAkC"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { HotkeyProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime55 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/hotkey/index.d.ts
|
|
18
18
|
|
|
@@ -24,34 +24,49 @@ import * as react_jsx_runtime50 from "react/jsx-runtime";
|
|
|
24
24
|
* keyboard shortcuts. Supports multiple visual styles including outlined keys,
|
|
25
25
|
* flat presentation, and icon-specific formatting.
|
|
26
26
|
*
|
|
27
|
+
* @param props - {@link HotkeyProps}
|
|
28
|
+
* @param props.ref - Ref to the kbd element.
|
|
29
|
+
* @param props.children - Key text or icon to display.
|
|
30
|
+
* @param props.className - Optional CSS class name.
|
|
31
|
+
* @param props.variant - Visual style variant.
|
|
32
|
+
* @returns The rendered Hotkey component.
|
|
33
|
+
*
|
|
27
34
|
* @example
|
|
35
|
+
* ```tsx
|
|
28
36
|
* // Basic hotkey display
|
|
29
37
|
* <Hotkey>Ctrl</Hotkey>
|
|
38
|
+
* ```
|
|
30
39
|
*
|
|
31
40
|
* @example
|
|
41
|
+
* ```tsx
|
|
32
42
|
* // Hotkey combination with different variants
|
|
33
43
|
* <HotkeySet>
|
|
34
44
|
* <Hotkey variant="outline">Cmd</Hotkey>
|
|
35
45
|
* <span>+</span>
|
|
36
46
|
* <Hotkey variant="outline">K</Hotkey>
|
|
37
47
|
* </HotkeySet>
|
|
48
|
+
* ```
|
|
38
49
|
*
|
|
39
50
|
* @example
|
|
51
|
+
* ```tsx
|
|
40
52
|
* // Flat style for inline text
|
|
41
53
|
* <p>Press <Hotkey variant="flat">Enter</Hotkey> to submit</p>
|
|
54
|
+
* ```
|
|
42
55
|
*
|
|
43
56
|
* @example
|
|
57
|
+
* ```tsx
|
|
44
58
|
* // Icon variant for special keys
|
|
45
59
|
* <HotkeySet>
|
|
46
60
|
* <Hotkey variant="icon">⌘</Hotkey>
|
|
47
61
|
* <Hotkey>Space</Hotkey>
|
|
48
62
|
* </HotkeySet>
|
|
63
|
+
* ```
|
|
49
64
|
*/
|
|
50
65
|
declare function Hotkey({
|
|
51
66
|
ref,
|
|
52
67
|
children,
|
|
53
68
|
...props
|
|
54
|
-
}: HotkeyProps):
|
|
69
|
+
}: HotkeyProps): react_jsx_runtime55.JSX.Element;
|
|
55
70
|
//#endregion
|
|
56
71
|
export { Hotkey };
|
|
57
72
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -29,28 +29,43 @@ import styles from "./styles.module.css";
|
|
|
29
29
|
* keyboard shortcuts. Supports multiple visual styles including outlined keys,
|
|
30
30
|
* flat presentation, and icon-specific formatting.
|
|
31
31
|
*
|
|
32
|
+
* @param props - {@link HotkeyProps}
|
|
33
|
+
* @param props.ref - Ref to the kbd element.
|
|
34
|
+
* @param props.children - Key text or icon to display.
|
|
35
|
+
* @param props.className - Optional CSS class name.
|
|
36
|
+
* @param props.variant - Visual style variant.
|
|
37
|
+
* @returns The rendered Hotkey component.
|
|
38
|
+
*
|
|
32
39
|
* @example
|
|
40
|
+
* ```tsx
|
|
33
41
|
* // Basic hotkey display
|
|
34
42
|
* <Hotkey>Ctrl</Hotkey>
|
|
43
|
+
* ```
|
|
35
44
|
*
|
|
36
45
|
* @example
|
|
46
|
+
* ```tsx
|
|
37
47
|
* // Hotkey combination with different variants
|
|
38
48
|
* <HotkeySet>
|
|
39
49
|
* <Hotkey variant="outline">Cmd</Hotkey>
|
|
40
50
|
* <span>+</span>
|
|
41
51
|
* <Hotkey variant="outline">K</Hotkey>
|
|
42
52
|
* </HotkeySet>
|
|
53
|
+
* ```
|
|
43
54
|
*
|
|
44
55
|
* @example
|
|
56
|
+
* ```tsx
|
|
45
57
|
* // Flat style for inline text
|
|
46
58
|
* <p>Press <Hotkey variant="flat">Enter</Hotkey> to submit</p>
|
|
59
|
+
* ```
|
|
47
60
|
*
|
|
48
61
|
* @example
|
|
62
|
+
* ```tsx
|
|
49
63
|
* // Icon variant for special keys
|
|
50
64
|
* <HotkeySet>
|
|
51
65
|
* <Hotkey variant="icon">⌘</Hotkey>
|
|
52
66
|
* <Hotkey>Space</Hotkey>
|
|
53
67
|
* </HotkeySet>
|
|
68
|
+
* ```
|
|
54
69
|
*/
|
|
55
70
|
function Hotkey({ ref, children, ...props }) {
|
|
56
71
|
[props, ref] = useContextProps(props, ref ?? null, HotkeyContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/hotkey/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';\n\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { Keyboard, useContextProps } from 'react-aria-components';\nimport { HotkeyContext } from './context';\nimport styles from './styles.module.css';\nimport type { HotkeyProps } from './types';\n\n/**\n * Hotkey - A visual representation of keyboard shortcuts and key combinations\n *\n * Displays keyboard keys and shortcuts in a consistent, accessible format.\n * Perfect for documentation, help systems, or UI elements that need to show\n * keyboard shortcuts. Supports multiple visual styles including outlined keys,\n * flat presentation, and icon-specific formatting.\n *\n * @example\n * // Basic hotkey display\n * <Hotkey>Ctrl</Hotkey>\n *\n * @example\n * // Hotkey combination with different variants\n * <HotkeySet>\n * <Hotkey variant=\"outline\">Cmd</Hotkey>\n * <span>+</span>\n * <Hotkey variant=\"outline\">K</Hotkey>\n * </HotkeySet>\n *\n * @example\n * // Flat style for inline text\n * <p>Press <Hotkey variant=\"flat\">Enter</Hotkey> to submit</p>\n *\n * @example\n * // Icon variant for special keys\n * <HotkeySet>\n * <Hotkey variant=\"icon\">⌘</Hotkey>\n * <Hotkey>Space</Hotkey>\n * </HotkeySet>\n */\nexport function Hotkey({ ref, children, ...props }: HotkeyProps) {\n [props, ref] = useContextProps(props, ref ?? null, HotkeyContext);\n\n const { className, variant = 'outline', ...rest } = props;\n\n return (\n <Keyboard\n {...rest}\n ref={ref}\n className={clsx(styles.key, styles[variant], className)}\n >\n {children}\n </Keyboard>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/hotkey/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';\n\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { Keyboard, useContextProps } from 'react-aria-components';\nimport { HotkeyContext } from './context';\nimport styles from './styles.module.css';\nimport type { HotkeyProps } from './types';\n\n/**\n * Hotkey - A visual representation of keyboard shortcuts and key combinations\n *\n * Displays keyboard keys and shortcuts in a consistent, accessible format.\n * Perfect for documentation, help systems, or UI elements that need to show\n * keyboard shortcuts. Supports multiple visual styles including outlined keys,\n * flat presentation, and icon-specific formatting.\n *\n * @param props - {@link HotkeyProps}\n * @param props.ref - Ref to the kbd element.\n * @param props.children - Key text or icon to display.\n * @param props.className - Optional CSS class name.\n * @param props.variant - Visual style variant.\n * @returns The rendered Hotkey component.\n *\n * @example\n * ```tsx\n * // Basic hotkey display\n * <Hotkey>Ctrl</Hotkey>\n * ```\n *\n * @example\n * ```tsx\n * // Hotkey combination with different variants\n * <HotkeySet>\n * <Hotkey variant=\"outline\">Cmd</Hotkey>\n * <span>+</span>\n * <Hotkey variant=\"outline\">K</Hotkey>\n * </HotkeySet>\n * ```\n *\n * @example\n * ```tsx\n * // Flat style for inline text\n * <p>Press <Hotkey variant=\"flat\">Enter</Hotkey> to submit</p>\n * ```\n *\n * @example\n * ```tsx\n * // Icon variant for special keys\n * <HotkeySet>\n * <Hotkey variant=\"icon\">⌘</Hotkey>\n * <Hotkey>Space</Hotkey>\n * </HotkeySet>\n * ```\n */\nexport function Hotkey({ ref, children, ...props }: HotkeyProps) {\n [props, ref] = useContextProps(props, ref ?? null, HotkeyContext);\n\n const { className, variant = 'outline', ...rest } = props;\n\n return (\n <Keyboard\n {...rest}\n ref={ref}\n className={clsx(styles.key, styles[variant], className)}\n >\n {children}\n </Keyboard>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,SAAgB,OAAO,EAAE,KAAK,UAAU,GAAG,SAAsB;AAC/D,EAAC,OAAO,OAAO,gBAAgB,OAAO,OAAO,MAAM,cAAc;CAEjE,MAAM,EAAE,WAAW,UAAU,WAAW,GAAG,SAAS;AAEpD,QACE,oBAAC;EACC,GAAI;EACC;EACL,WAAW,KAAK,OAAO,KAAK,OAAO,UAAU,UAAU;EAEtD;GACQ"}
|
|
@@ -12,13 +12,32 @@
|
|
|
12
12
|
|
|
13
13
|
import "client-only";
|
|
14
14
|
import { ComponentPropsWithRef } from "react";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime96 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/hotkey/set.d.ts
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* HotkeySet - Container for grouping multiple Hotkey components.
|
|
21
|
+
*
|
|
22
|
+
* Automatically sizes icons via IconProvider.
|
|
23
|
+
*
|
|
24
|
+
* @param props - ComponentPropsWithRef<'div'>
|
|
25
|
+
* @param props.className - Optional CSS class name.
|
|
26
|
+
* @returns The rendered HotkeySet component.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <HotkeySet>
|
|
31
|
+
* <Hotkey>CMD</Hotkey>
|
|
32
|
+
* <span>+</span>
|
|
33
|
+
* <Hotkey>K</Hotkey>
|
|
34
|
+
* </HotkeySet>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
18
37
|
declare function HotkeySet({
|
|
19
38
|
className,
|
|
20
39
|
...rest
|
|
21
|
-
}: ComponentPropsWithRef<'div'>):
|
|
40
|
+
}: ComponentPropsWithRef<'div'>): react_jsx_runtime96.JSX.Element;
|
|
22
41
|
//#endregion
|
|
23
42
|
export { HotkeySet };
|
|
24
43
|
//# sourceMappingURL=set.d.ts.map
|
|
@@ -20,6 +20,24 @@ import { jsx } from "react/jsx-runtime";
|
|
|
20
20
|
import styles from "./styles.module.css";
|
|
21
21
|
|
|
22
22
|
//#region src/components/hotkey/set.tsx
|
|
23
|
+
/**
|
|
24
|
+
* HotkeySet - Container for grouping multiple Hotkey components.
|
|
25
|
+
*
|
|
26
|
+
* Automatically sizes icons via IconProvider.
|
|
27
|
+
*
|
|
28
|
+
* @param props - ComponentPropsWithRef<'div'>
|
|
29
|
+
* @param props.className - Optional CSS class name.
|
|
30
|
+
* @returns The rendered HotkeySet component.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <HotkeySet>
|
|
35
|
+
* <Hotkey>CMD</Hotkey>
|
|
36
|
+
* <span>+</span>
|
|
37
|
+
* <Hotkey>K</Hotkey>
|
|
38
|
+
* </HotkeySet>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
23
41
|
function HotkeySet({ className, ...rest }) {
|
|
24
42
|
return /* @__PURE__ */ jsx(IconProvider, {
|
|
25
43
|
size: "large",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","names":[],"sources":["../../../src/components/hotkey/set.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 { clsx } from '@accelint/design-foundation/lib/utils';\nimport { IconProvider } from '../icon/context';\nimport styles from './styles.module.css';\nimport type { ComponentPropsWithRef } from 'react';\n\nexport function HotkeySet({\n className,\n ...rest\n}: ComponentPropsWithRef<'div'>) {\n return (\n <IconProvider size='large'>\n <div {...rest} className={clsx(styles.set, className)} />\n </IconProvider>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"set.js","names":[],"sources":["../../../src/components/hotkey/set.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 { clsx } from '@accelint/design-foundation/lib/utils';\nimport { IconProvider } from '../icon/context';\nimport styles from './styles.module.css';\nimport type { ComponentPropsWithRef } from 'react';\n\n/**\n * HotkeySet - Container for grouping multiple Hotkey components.\n *\n * Automatically sizes icons via IconProvider.\n *\n * @param props - ComponentPropsWithRef<'div'>\n * @param props.className - Optional CSS class name.\n * @returns The rendered HotkeySet component.\n *\n * @example\n * ```tsx\n * <HotkeySet>\n * <Hotkey>CMD</Hotkey>\n * <span>+</span>\n * <Hotkey>K</Hotkey>\n * </HotkeySet>\n * ```\n */\nexport function HotkeySet({\n className,\n ...rest\n}: ComponentPropsWithRef<'div'>) {\n return (\n <IconProvider size='large'>\n <div {...rest} className={clsx(styles.set, className)} />\n </IconProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAgB,UAAU,EACxB,WACA,GAAG,QAC4B;AAC/B,QACE,oBAAC;EAAa,MAAK;YACjB,oBAAC;GAAI,GAAI;GAAM,WAAW,KAAK,OAAO,KAAK,UAAU;IAAI;GAC5C"}
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
import { ComponentPropsWithRef } from "react";
|
|
14
14
|
|
|
15
15
|
//#region src/components/hotkey/types.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Props for the Hotkey component.
|
|
18
|
+
*/
|
|
16
19
|
type HotkeyProps = ComponentPropsWithRef<'kbd'> & {
|
|
20
|
+
/** Visual style variant for the hotkey display. */
|
|
17
21
|
variant?: 'flat' | 'icon' | 'outline';
|
|
18
22
|
};
|
|
19
23
|
//#endregion
|