@accelint/design-toolkit 5.2.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/catalog-info.yaml +44 -0
- package/dist/components/accordion/context.d.ts +10 -0
- package/dist/components/accordion/context.js +4 -0
- package/dist/components/accordion/context.js.map +1 -0
- package/dist/components/accordion/group.d.ts +11 -0
- package/dist/components/accordion/group.js +4 -0
- package/dist/components/accordion/group.js.map +1 -0
- package/dist/components/accordion/header.d.ts +11 -0
- package/dist/components/accordion/header.js +4 -0
- package/dist/components/accordion/header.js.map +1 -0
- package/dist/components/accordion/index.d.ts +22 -46
- package/dist/components/accordion/index.js +1 -3
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/panel.d.ts +11 -0
- package/dist/components/accordion/panel.js +4 -0
- package/dist/components/accordion/panel.js.map +1 -0
- package/dist/components/accordion/styles.d.ts +3 -3
- package/dist/components/accordion/styles.js +1 -1
- package/dist/components/accordion/styles.js.map +1 -1
- package/dist/components/accordion/trigger.d.ts +11 -0
- package/dist/components/accordion/trigger.js +4 -0
- package/dist/components/accordion/trigger.js.map +1 -0
- package/dist/components/accordion/types.d.ts +1 -1
- package/dist/components/action-bar/index.d.ts +11 -3
- package/dist/components/action-bar/index.js +1 -1
- package/dist/components/action-bar/index.js.map +1 -1
- package/dist/components/avatar/context.d.ts +14 -0
- package/dist/components/avatar/context.js +4 -0
- package/dist/components/avatar/context.js.map +1 -0
- package/dist/components/avatar/index.d.ts +2 -13
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/context.d.ts +13 -0
- package/dist/components/badge/context.js +4 -0
- package/dist/components/badge/context.js.map +1 -0
- package/dist/components/badge/index.d.ts +2 -13
- package/dist/components/badge/index.js +1 -3
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/breadcrumbs/index.d.ts +12 -9
- package/dist/components/breadcrumbs/index.js +1 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/breadcrumbs/item.d.ts +7 -0
- package/dist/components/breadcrumbs/item.js +4 -0
- package/dist/components/breadcrumbs/item.js.map +1 -0
- package/dist/components/button/context.d.ts +17 -0
- package/dist/components/button/context.js +4 -0
- package/dist/components/button/context.js.map +1 -0
- package/dist/components/button/index.d.ts +5 -104
- package/dist/components/button/index.js +1 -3
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/link.d.ts +46 -0
- package/dist/components/button/link.js +4 -0
- package/dist/components/button/link.js.map +1 -0
- package/dist/components/button/styles.js +1 -1
- package/dist/components/button/styles.js.map +1 -1
- package/dist/components/button/toggle.d.ts +48 -0
- package/dist/components/button/toggle.js +4 -0
- package/dist/components/button/toggle.js.map +1 -0
- package/dist/components/checkbox/context.d.ts +10 -0
- package/dist/components/checkbox/context.js +4 -0
- package/dist/components/checkbox/context.js.map +1 -0
- package/dist/components/checkbox/group.d.ts +10 -0
- package/dist/components/checkbox/group.js +4 -0
- package/dist/components/checkbox/group.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +6 -16
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/styles.js +1 -1
- package/dist/components/checkbox/styles.js.map +1 -1
- package/dist/components/chip/context.d.ts +13 -0
- package/dist/components/chip/context.js +4 -0
- package/dist/components/chip/context.js.map +1 -0
- package/dist/components/chip/deletable.d.ts +11 -0
- package/dist/components/chip/deletable.js +4 -0
- package/dist/components/chip/deletable.js.map +1 -0
- package/dist/components/chip/index.d.ts +14 -39
- package/dist/components/chip/index.js +1 -3
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/list.d.ts +12 -0
- package/dist/components/chip/list.js +4 -0
- package/dist/components/chip/list.js.map +1 -0
- package/dist/components/chip/selectable.d.ts +11 -0
- package/dist/components/chip/selectable.js +2 -0
- package/dist/components/chip/selectable.js.map +1 -0
- package/dist/components/chip/styles.js +1 -1
- package/dist/components/chip/styles.js.map +1 -1
- package/dist/components/chip/types.d.ts +2 -2
- package/dist/components/classification-badge/context.d.ts +12 -0
- package/dist/components/classification-badge/context.js +4 -0
- package/dist/components/classification-badge/context.js.map +1 -0
- package/dist/components/classification-badge/index.d.ts +2 -13
- package/dist/components/classification-badge/index.js +1 -3
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-banner/context.d.ts +12 -0
- package/dist/components/classification-banner/context.js +4 -0
- package/dist/components/classification-banner/context.js.map +1 -0
- package/dist/components/classification-banner/index.d.ts +2 -13
- package/dist/components/classification-banner/index.js +1 -3
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/clock/index.d.ts +36 -0
- package/dist/components/clock/index.js +4 -0
- package/dist/components/clock/index.js.map +1 -0
- package/dist/components/clock/types.d.ts +7 -0
- package/dist/components/clock/types.js +2 -0
- package/dist/components/clock/types.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +0 -3
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-picker/styles.js +1 -1
- package/dist/components/color-picker/styles.js.map +1 -1
- package/dist/components/combobox-field/context.d.ts +16 -0
- package/dist/components/combobox-field/context.js +4 -0
- package/dist/components/combobox-field/context.js.map +1 -0
- package/dist/components/combobox-field/index.d.ts +14 -7
- package/dist/components/combobox-field/index.js +1 -1
- package/dist/components/combobox-field/index.js.map +1 -1
- package/dist/components/combobox-field/styles.d.ts +3 -3
- package/dist/components/combobox-field/styles.js +1 -1
- package/dist/components/combobox-field/styles.js.map +1 -1
- package/dist/components/date-field/index.js +1 -1
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/details-list/context.d.ts +12 -0
- package/dist/components/details-list/context.js +4 -0
- package/dist/components/details-list/context.js.map +1 -0
- package/dist/components/details-list/index.d.ts +15 -35
- package/dist/components/details-list/index.js +1 -3
- package/dist/components/details-list/index.js.map +1 -1
- package/dist/components/details-list/label.d.ts +10 -0
- package/dist/components/details-list/label.js +4 -0
- package/dist/components/details-list/label.js.map +1 -0
- package/dist/components/details-list/value.d.ts +10 -0
- package/dist/components/details-list/value.js +4 -0
- package/dist/components/details-list/value.js.map +1 -0
- package/dist/components/dialog/content.d.ts +6 -0
- package/dist/components/dialog/content.js +2 -0
- package/dist/components/dialog/content.js.map +1 -0
- package/dist/components/dialog/context.d.ts +7 -0
- package/dist/components/dialog/context.js +4 -0
- package/dist/components/dialog/context.js.map +1 -0
- package/dist/components/dialog/footer.d.ts +6 -0
- package/dist/components/dialog/footer.js +4 -0
- package/dist/components/dialog/footer.js.map +1 -0
- package/dist/components/dialog/index.d.ts +9 -30
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/styles.d.ts +3 -3
- package/dist/components/dialog/title.d.ts +6 -0
- package/dist/components/dialog/title.js +4 -0
- package/dist/components/dialog/title.js.map +1 -0
- package/dist/components/dialog/trigger.d.ts +1 -0
- package/dist/components/dialog/trigger.js +2 -0
- package/dist/components/dialog/trigger.js.map +1 -0
- package/dist/components/dialog/types.d.ts +3 -2
- package/dist/components/divider/context.d.ts +10 -0
- package/dist/components/divider/context.js +4 -0
- package/dist/components/divider/context.js.map +1 -0
- package/dist/components/divider/index.d.ts +2 -13
- package/dist/components/divider/index.js +1 -3
- package/dist/components/divider/index.js.map +1 -1
- package/dist/components/drawer/back.d.ts +5 -0
- package/dist/components/drawer/back.js +4 -0
- package/dist/components/drawer/back.js.map +1 -0
- package/dist/components/drawer/close.d.ts +5 -0
- package/dist/components/drawer/close.js +2 -0
- package/dist/components/drawer/close.js.map +1 -0
- package/dist/components/drawer/content.d.ts +6 -0
- package/dist/components/drawer/content.js +4 -0
- package/dist/components/drawer/content.js.map +1 -0
- package/dist/components/drawer/context.d.ts +38 -0
- package/dist/components/drawer/context.js +4 -0
- package/dist/components/drawer/context.js.map +1 -0
- package/dist/components/drawer/footer.d.ts +6 -0
- package/dist/components/drawer/footer.js +4 -0
- package/dist/components/drawer/footer.js.map +1 -0
- package/dist/components/drawer/header-title.d.ts +25 -0
- package/dist/components/drawer/header-title.js +2 -0
- package/dist/components/drawer/header-title.js.map +1 -0
- package/dist/components/drawer/header.d.ts +6 -0
- package/dist/components/drawer/header.js +4 -0
- package/dist/components/drawer/header.js.map +1 -0
- package/dist/components/drawer/index.d.ts +30 -88
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/drawer/layout-main.d.ts +6 -0
- package/dist/components/drawer/layout-main.js +2 -0
- package/dist/components/drawer/layout-main.js.map +1 -0
- package/dist/components/drawer/layout.d.ts +20 -0
- package/dist/components/drawer/layout.js +4 -0
- package/dist/components/drawer/layout.js.map +1 -0
- package/dist/components/drawer/menu-item.d.ts +20 -0
- package/dist/components/drawer/menu-item.js +2 -0
- package/dist/components/drawer/menu-item.js.map +1 -0
- package/dist/components/drawer/menu.d.ts +20 -0
- package/dist/components/drawer/menu.js +4 -0
- package/dist/components/drawer/menu.js.map +1 -0
- package/dist/components/drawer/panel.d.ts +6 -0
- package/dist/components/drawer/panel.js +2 -0
- package/dist/components/drawer/panel.js.map +1 -0
- package/dist/components/drawer/styles.d.ts +9 -9
- package/dist/components/drawer/trigger.d.ts +20 -0
- package/dist/components/drawer/trigger.js +4 -0
- package/dist/components/drawer/trigger.js.map +1 -0
- package/dist/components/drawer/types.d.ts +3 -3
- package/dist/components/drawer/view.d.ts +11 -0
- package/dist/components/drawer/view.js +4 -0
- package/dist/components/drawer/view.js.map +1 -0
- package/dist/components/hero/context.d.ts +7 -0
- package/dist/components/hero/context.js +2 -0
- package/dist/components/hero/context.js.map +1 -0
- package/dist/components/hero/index.d.ts +8 -16
- package/dist/components/hero/index.js +1 -1
- package/dist/components/hero/index.js.map +1 -1
- package/dist/components/hero/subtitle.d.ts +6 -0
- package/dist/components/hero/subtitle.js +4 -0
- package/dist/components/hero/subtitle.js.map +1 -0
- package/dist/components/hero/title.d.ts +6 -0
- package/dist/components/hero/title.js +2 -0
- package/dist/components/hero/title.js.map +1 -0
- package/dist/components/hotkey/context.d.ts +12 -0
- package/dist/components/hotkey/context.js +4 -0
- package/dist/components/hotkey/context.js.map +1 -0
- package/dist/components/hotkey/hotkey-set.d.ts +9 -0
- package/dist/components/hotkey/hotkey-set.js +2 -0
- package/dist/components/hotkey/hotkey-set.js.map +1 -0
- package/dist/components/hotkey/index.d.ts +7 -23
- package/dist/components/hotkey/index.js +1 -1
- package/dist/components/hotkey/index.js.map +1 -1
- package/dist/components/icon/context.d.ts +10 -0
- package/dist/components/icon/context.js +4 -0
- package/dist/components/icon/context.js.map +1 -0
- package/dist/components/icon/index.d.ts +2 -13
- package/dist/components/icon/index.js +1 -3
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/input/context.d.ts +13 -0
- package/dist/components/input/context.js +4 -0
- package/dist/components/input/context.js.map +1 -0
- package/dist/components/input/index.d.ts +3 -7
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/label/context.d.ts +10 -0
- package/dist/components/label/context.js +4 -0
- package/dist/components/label/context.js.map +1 -0
- package/dist/components/label/index.d.ts +3 -13
- package/dist/components/label/index.js +1 -3
- package/dist/components/label/index.js.map +1 -1
- package/dist/components/lines/index.d.ts +9 -0
- package/dist/components/lines/index.js.map +1 -1
- package/dist/components/link/context.d.ts +9 -0
- package/dist/components/link/context.js +4 -0
- package/dist/components/link/context.js.map +1 -0
- package/dist/components/link/index.d.ts +9 -9
- package/dist/components/link/index.js +1 -3
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/link/styles.js +1 -1
- package/dist/components/link/styles.js.map +1 -1
- package/dist/components/menu/context.d.ts +10 -0
- package/dist/components/menu/context.js +4 -0
- package/dist/components/menu/context.js.map +1 -0
- package/dist/components/menu/index.d.ts +31 -63
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/item-description.d.ts +6 -0
- package/dist/components/menu/item-description.js +2 -0
- package/dist/components/menu/item-description.js.map +1 -0
- package/dist/components/menu/item-label.d.ts +6 -0
- package/dist/components/menu/item-label.js +4 -0
- package/dist/components/menu/item-label.js.map +1 -0
- package/dist/components/menu/item.d.ts +11 -0
- package/dist/components/menu/item.js +4 -0
- package/dist/components/menu/item.js.map +1 -0
- package/dist/components/menu/section.d.ts +11 -0
- package/dist/components/menu/section.js +2 -0
- package/dist/components/menu/section.js.map +1 -0
- package/dist/components/menu/separator.d.ts +6 -0
- package/dist/components/menu/separator.js +4 -0
- package/dist/components/menu/separator.js.map +1 -0
- package/dist/components/menu/styles.js +1 -1
- package/dist/components/menu/styles.js.map +1 -1
- package/dist/components/menu/submenu.d.ts +6 -0
- package/dist/components/menu/submenu.js +4 -0
- package/dist/components/menu/submenu.js.map +1 -0
- package/dist/components/menu/trigger.d.ts +1 -0
- package/dist/components/menu/trigger.js +2 -0
- package/dist/components/menu/trigger.js.map +1 -0
- package/dist/components/menu/types.d.ts +1 -1
- package/dist/components/notice/events.d.ts +10 -0
- package/dist/components/notice/events.js +2 -0
- package/dist/components/notice/events.js.map +1 -0
- package/dist/components/notice/index.d.ts +16 -0
- package/dist/components/notice/index.js +4 -0
- package/dist/components/notice/index.js.map +1 -0
- package/dist/components/notice/list.d.ts +16 -0
- package/dist/components/notice/list.js +4 -0
- package/dist/components/notice/list.js.map +1 -0
- package/dist/components/notice/notice-icon.d.ts +16 -0
- package/dist/components/notice/notice-icon.js +2 -0
- package/dist/components/notice/notice-icon.js.map +1 -0
- package/dist/components/notice/styles.d.ts +60 -0
- package/dist/components/notice/styles.js +2 -0
- package/dist/components/notice/styles.js.map +1 -0
- package/dist/components/notice/types.d.ts +75 -0
- package/dist/components/notice/types.js +2 -0
- package/dist/components/notice/types.js.map +1 -0
- package/dist/components/notice/utils.d.ts +3 -0
- package/dist/components/notice/utils.js +4 -0
- package/dist/components/notice/utils.js.map +1 -0
- package/dist/components/options/context.d.ts +8 -0
- package/dist/components/options/context.js +2 -0
- package/dist/components/options/context.js.map +1 -0
- package/dist/components/options/index.d.ts +22 -51
- package/dist/components/options/index.js +1 -1
- package/dist/components/options/index.js.map +1 -1
- package/dist/components/options/item-content.d.ts +9 -0
- package/dist/components/options/item-content.js +2 -0
- package/dist/components/options/item-content.js.map +1 -0
- package/dist/components/options/item-description.d.ts +9 -0
- package/dist/components/options/item-description.js +4 -0
- package/dist/components/options/item-description.js.map +1 -0
- package/dist/components/options/item-label.d.ts +9 -0
- package/dist/components/options/item-label.js +2 -0
- package/dist/components/options/item-label.js.map +1 -0
- package/dist/components/options/item.d.ts +9 -0
- package/dist/components/options/item.js +4 -0
- package/dist/components/options/item.js.map +1 -0
- package/dist/components/options/section.d.ts +9 -0
- package/dist/components/options/section.js +2 -0
- package/dist/components/options/section.js.map +1 -0
- package/dist/components/options/styles.d.ts +3 -3
- package/dist/components/options/styles.js +1 -1
- package/dist/components/options/styles.js.map +1 -1
- package/dist/components/options/types.d.ts +2 -2
- package/dist/components/popover/body.d.ts +8 -0
- package/dist/components/popover/body.js +4 -0
- package/dist/components/popover/body.js.map +1 -0
- package/dist/components/popover/content.d.ts +8 -0
- package/dist/components/popover/content.js +2 -0
- package/dist/components/popover/content.js.map +1 -0
- package/dist/components/popover/footer.d.ts +9 -0
- package/dist/components/popover/footer.js +4 -0
- package/dist/components/popover/footer.js.map +1 -0
- package/dist/components/popover/index.d.ts +16 -39
- package/dist/components/popover/index.js +1 -3
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/title.d.ts +8 -0
- package/dist/components/popover/title.js +4 -0
- package/dist/components/popover/title.js.map +1 -0
- package/dist/components/popover/trigger.d.ts +8 -0
- package/dist/components/popover/trigger.js +2 -0
- package/dist/components/popover/trigger.js.map +1 -0
- package/dist/components/popover/types.d.ts +1 -1
- package/dist/components/query-builder/action-element.js +1 -1
- package/dist/components/query-builder/action-element.js.map +1 -1
- package/dist/components/query-builder/actions.d.ts +8 -0
- package/dist/components/query-builder/actions.js +2 -0
- package/dist/components/query-builder/actions.js.map +1 -0
- package/dist/components/query-builder/combinator-selector.d.ts +6 -0
- package/dist/components/query-builder/combinator-selector.js +4 -0
- package/dist/components/query-builder/combinator-selector.js.map +1 -0
- package/dist/components/query-builder/index.d.ts +1 -21
- package/dist/components/query-builder/index.js +3 -1
- package/dist/components/query-builder/index.js.map +1 -1
- package/dist/components/query-builder/{group.js → rule-group.js} +2 -2
- package/dist/components/query-builder/rule-group.js.map +1 -0
- package/dist/components/query-builder/rule.js +1 -3
- package/dist/components/query-builder/rule.js.map +1 -1
- package/dist/components/query-builder/styles.d.ts +152 -0
- package/dist/components/query-builder/styles.js +2 -0
- package/dist/components/query-builder/styles.js.map +1 -0
- package/dist/components/query-builder/utils.d.ts +1 -10
- package/dist/components/query-builder/utils.js +1 -1
- package/dist/components/query-builder/utils.js.map +1 -1
- package/dist/components/query-builder/value-editor.js +1 -1
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/query-builder/value-selector.js +1 -1
- package/dist/components/query-builder/value-selector.js.map +1 -1
- package/dist/components/radio/context.d.ts +13 -0
- package/dist/components/radio/context.js +4 -0
- package/dist/components/radio/context.js.map +1 -0
- package/dist/components/radio/group.d.ts +15 -0
- package/dist/components/radio/group.js +4 -0
- package/dist/components/radio/group.js.map +1 -0
- package/dist/components/radio/index.d.ts +10 -19
- package/dist/components/radio/index.js +1 -3
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/styles.js +1 -1
- package/dist/components/radio/styles.js.map +1 -1
- package/dist/components/radio/types.d.ts +1 -1
- package/dist/components/search-field/context.d.ts +26 -0
- package/dist/components/search-field/context.js +4 -0
- package/dist/components/search-field/context.js.map +1 -0
- package/dist/components/search-field/index.d.ts +4 -20
- package/dist/components/search-field/index.js +1 -1
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/select-field/context.d.ts +15 -0
- package/dist/components/select-field/context.js +4 -0
- package/dist/components/select-field/context.js.map +1 -0
- package/dist/components/select-field/index.d.ts +12 -21
- package/dist/components/select-field/index.js +1 -1
- package/dist/components/select-field/index.js.map +1 -1
- package/dist/components/select-field/styles.d.ts +9 -3
- package/dist/components/select-field/styles.js +1 -1
- package/dist/components/select-field/styles.js.map +1 -1
- package/dist/components/select-field/types.d.ts +2 -2
- package/dist/components/sidenav/avatar.d.ts +16 -0
- package/dist/components/sidenav/avatar.js +4 -0
- package/dist/components/sidenav/avatar.js.map +1 -0
- package/dist/components/sidenav/content.d.ts +16 -0
- package/dist/components/sidenav/content.js +2 -0
- package/dist/components/sidenav/content.js.map +1 -0
- package/dist/components/sidenav/context.d.ts +10 -0
- package/dist/components/sidenav/context.js +4 -0
- package/dist/components/sidenav/context.js.map +1 -0
- package/dist/components/sidenav/footer.d.ts +16 -0
- package/dist/components/sidenav/footer.js +4 -0
- package/dist/components/sidenav/footer.js.map +1 -0
- package/dist/components/sidenav/header.d.ts +16 -0
- package/dist/components/sidenav/header.js +4 -0
- package/dist/components/sidenav/header.js.map +1 -0
- package/dist/components/sidenav/index.d.ts +57 -49
- package/dist/components/sidenav/index.js +1 -3
- package/dist/components/sidenav/index.js.map +1 -1
- package/dist/components/sidenav/item.d.ts +16 -0
- package/dist/components/sidenav/item.js +4 -0
- package/dist/components/sidenav/item.js.map +1 -0
- package/dist/components/sidenav/link.d.ts +16 -0
- package/dist/components/sidenav/link.js +4 -0
- package/dist/components/sidenav/link.js.map +1 -0
- package/dist/components/sidenav/menu-item.d.ts +16 -0
- package/dist/components/sidenav/menu-item.js +2 -0
- package/dist/components/sidenav/menu-item.js.map +1 -0
- package/dist/components/sidenav/menu.d.ts +16 -0
- package/dist/components/sidenav/menu.js +4 -0
- package/dist/components/sidenav/menu.js.map +1 -0
- package/dist/components/sidenav/styles.d.ts +9 -9
- package/dist/components/sidenav/trigger.d.ts +16 -0
- package/dist/components/sidenav/trigger.js +4 -0
- package/dist/components/sidenav/trigger.js.map +1 -0
- package/dist/components/sidenav/types.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts +0 -3
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/index.js.map +1 -1
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/styles.d.ts +3 -3
- package/dist/components/slider/styles.js +1 -1
- package/dist/components/slider/styles.js.map +1 -1
- package/dist/components/switch/context.d.ts +20 -0
- package/dist/components/switch/context.js +4 -0
- package/dist/components/switch/context.js.map +1 -0
- package/dist/components/switch/index.d.ts +3 -13
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/styles.js +1 -1
- package/dist/components/switch/styles.js.map +1 -1
- package/dist/components/table/body.js +2 -0
- package/dist/components/table/body.js.map +1 -0
- package/dist/components/table/cell.js +2 -0
- package/dist/components/table/cell.js.map +1 -0
- package/dist/components/table/constants/table.d.ts +17 -0
- package/dist/components/table/constants/table.js +2 -0
- package/dist/components/table/constants/table.js.map +1 -0
- package/dist/components/table/context.js +1 -1
- package/dist/components/table/context.js.map +1 -1
- package/dist/components/table/{table-header-cell.d.ts → header-cell.d.ts} +2 -2
- package/dist/components/table/header-cell.js +2 -0
- package/dist/components/table/header-cell.js.map +1 -0
- package/dist/components/table/header.js +2 -0
- package/dist/components/table/header.js.map +1 -0
- package/dist/components/table/index.d.ts +10 -14
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row.js +2 -0
- package/dist/components/table/row.js.map +1 -0
- package/dist/components/table/types.d.ts +25 -2
- package/dist/components/tabs/context.d.ts +20 -0
- package/dist/components/tabs/context.js +4 -0
- package/dist/components/tabs/context.js.map +1 -0
- package/dist/components/tabs/index.d.ts +25 -51
- package/dist/components/tabs/index.js +1 -3
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tabs/list.d.ts +11 -0
- package/dist/components/tabs/list.js +4 -0
- package/dist/components/tabs/list.js.map +1 -0
- package/dist/components/tabs/panel.d.ts +11 -0
- package/dist/components/tabs/panel.js +2 -0
- package/dist/components/tabs/panel.js.map +1 -0
- package/dist/components/tabs/styles.js +1 -1
- package/dist/components/tabs/styles.js.map +1 -1
- package/dist/components/tabs/tab.d.ts +11 -0
- package/dist/components/tabs/tab.js +4 -0
- package/dist/components/tabs/tab.js.map +1 -0
- package/dist/components/text-area-field/context.d.ts +20 -0
- package/dist/components/text-area-field/context.js +4 -0
- package/dist/components/text-area-field/context.js.map +1 -0
- package/dist/components/text-area-field/index.d.ts +3 -13
- package/dist/components/text-area-field/index.js +1 -1
- package/dist/components/text-area-field/index.js.map +1 -1
- package/dist/components/text-field/context.d.ts +17 -0
- package/dist/components/text-field/context.js +4 -0
- package/dist/components/text-field/context.js.map +1 -0
- package/dist/components/text-field/index.d.ts +4 -13
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/time-field/index.d.ts +9 -0
- package/dist/components/time-field/index.js +1 -1
- package/dist/components/time-field/index.js.map +1 -1
- package/dist/components/tooltip/context.d.ts +7 -0
- package/dist/components/tooltip/context.js +4 -0
- package/dist/components/tooltip/context.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +22 -42
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tooltip/trigger.d.ts +8 -0
- package/dist/components/tooltip/trigger.js +4 -0
- package/dist/components/tooltip/trigger.js.map +1 -0
- package/dist/components/tooltip/types.d.ts +5 -6
- package/dist/components/tree/context.d.ts +18 -0
- package/dist/components/tree/context.js +4 -0
- package/dist/components/tree/context.js.map +1 -0
- package/dist/components/tree/index.d.ts +25 -43
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree/index.js.map +1 -1
- package/dist/components/tree/item-actions.d.ts +13 -0
- package/dist/components/tree/item-actions.js +2 -0
- package/dist/components/tree/item-actions.js.map +1 -0
- package/dist/components/tree/item-content.d.ts +17 -0
- package/dist/components/tree/item-content.js +2 -0
- package/dist/components/tree/item-content.js.map +1 -0
- package/dist/components/tree/item-description.d.ts +11 -0
- package/dist/components/tree/item-description.js +2 -0
- package/dist/components/tree/item-description.js.map +1 -0
- package/dist/components/tree/item-label.d.ts +11 -0
- package/dist/components/tree/item-label.js +2 -0
- package/dist/components/tree/item-label.js.map +1 -0
- package/dist/components/tree/item-prefix-icon.d.ts +12 -0
- package/dist/components/tree/item-prefix-icon.js +2 -0
- package/dist/components/tree/item-prefix-icon.js.map +1 -0
- package/dist/components/tree/item.d.ts +17 -0
- package/dist/components/tree/item.js +4 -0
- package/dist/components/tree/item.js.map +1 -0
- package/dist/components/tree/lines.d.ts +8 -0
- package/dist/components/tree/lines.js +2 -0
- package/dist/components/tree/lines.js.map +1 -0
- package/dist/components/tree/styles.js +1 -1
- package/dist/components/tree/styles.js.map +1 -1
- package/dist/components/tree/types.d.ts +1 -1
- package/dist/components/view-stack/context.d.ts +31 -0
- package/dist/components/view-stack/context.js +4 -0
- package/dist/components/view-stack/context.js.map +1 -0
- package/dist/components/view-stack/index.d.ts +38 -24
- package/dist/components/view-stack/index.js +1 -1
- package/dist/components/view-stack/index.js.map +1 -1
- package/dist/components/view-stack/trigger.d.ts +16 -0
- package/dist/components/view-stack/trigger.js +2 -0
- package/dist/components/view-stack/trigger.js.map +1 -0
- package/dist/components/view-stack/view.d.ts +16 -0
- package/dist/components/view-stack/view.js +4 -0
- package/dist/components/view-stack/view.js.map +1 -0
- package/dist/icons/catalog.d.ts +14 -0
- package/dist/icons/catalog.js +1 -1
- package/dist/icons/catalog.js.map +1 -1
- package/dist/index.css +5 -52
- package/dist/index.d.ts +152 -46
- package/dist/index.js +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/portal.d.ts +9 -0
- package/dist/providers/portal.js +2 -0
- package/dist/providers/portal.js.map +1 -0
- package/dist/providers/theme-provider.d.ts +6 -6
- package/dist/providers/theme-provider.js +1 -1
- package/dist/providers/theme-provider.js.map +1 -1
- package/dist/styles.css +1306 -340
- package/dist/tokens/themes.css +1 -1
- package/dist/tokens/themes.d.ts +1 -2
- package/dist/tokens/tokens.js +1 -1
- package/dist/tokens/tokens.js.map +1 -1
- package/package.json +109 -90
- package/dist/components/query-builder/group.js.map +0 -1
- package/dist/components/table/table-body.js +0 -2
- package/dist/components/table/table-body.js.map +0 -1
- package/dist/components/table/table-cell.js +0 -2
- package/dist/components/table/table-cell.js.map +0 -1
- package/dist/components/table/table-header-cell.js +0 -2
- package/dist/components/table/table-header-cell.js.map +0 -1
- package/dist/components/table/table-header.js +0 -2
- package/dist/components/table/table-header.js.map +0 -1
- package/dist/components/table/table-row.js +0 -2
- package/dist/components/table/table-row.js.map +0 -1
- package/dist/lib/react.d.ts +0 -59
- package/dist/lib/react.js +0 -9
- package/dist/lib/react.js.map +0 -1
- /package/dist/components/query-builder/{group.d.ts → rule-group.d.ts} +0 -0
- /package/dist/components/table/{table-body.d.ts → body.d.ts} +0 -0
- /package/dist/components/table/{table-cell.d.ts → cell.d.ts} +0 -0
- /package/dist/components/table/{table-header.d.ts → header.d.ts} +0 -0
- /package/dist/components/table/{table-row.d.ts → row.d.ts} +0 -0
|
@@ -1,35 +1,11 @@
|
|
|
1
|
-
import * as react_aria_components from 'react-aria-components';
|
|
2
|
-
import { MenuTrigger, TextProps, SeparatorProps, ContextValue } from 'react-aria-components';
|
|
3
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { MenuProps } from './types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react-aria-components';
|
|
6
5
|
import 'tailwind-variants';
|
|
7
6
|
import '../icon/types.js';
|
|
8
7
|
import './styles.js';
|
|
9
8
|
|
|
10
|
-
declare const MenuContext: react.Context<ContextValue<MenuProps<unknown>, HTMLDivElement>>;
|
|
11
|
-
declare function MenuSection<T extends object>({ children, classNames, items, title, ...rest }: MenuSectionProps<T>): react_jsx_runtime.JSX.Element;
|
|
12
|
-
declare namespace MenuSection {
|
|
13
|
-
var displayName: string;
|
|
14
|
-
}
|
|
15
|
-
declare function MenuSeparator({ className, ...rest }: SeparatorProps): react_jsx_runtime.JSX.Element;
|
|
16
|
-
declare namespace MenuSeparator {
|
|
17
|
-
var displayName: string;
|
|
18
|
-
}
|
|
19
|
-
declare function MenuLabel({ children, className, ...rest }: TextProps): react_jsx_runtime.JSX.Element;
|
|
20
|
-
declare namespace MenuLabel {
|
|
21
|
-
var displayName: string;
|
|
22
|
-
}
|
|
23
|
-
declare function MenuDescription({ children, className, ...rest }: TextProps): react_jsx_runtime.JSX.Element;
|
|
24
|
-
declare namespace MenuDescription {
|
|
25
|
-
var displayName: string;
|
|
26
|
-
}
|
|
27
|
-
declare function MenuItem({ children, classNames, color, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
28
|
-
declare namespace MenuItem {
|
|
29
|
-
var displayName: string;
|
|
30
|
-
var Label: typeof MenuLabel;
|
|
31
|
-
var Description: typeof MenuDescription;
|
|
32
|
-
}
|
|
33
9
|
/**
|
|
34
10
|
* Menu - A dropdown menu component with keyboard navigation and selection
|
|
35
11
|
*
|
|
@@ -39,67 +15,59 @@ declare namespace MenuItem {
|
|
|
39
15
|
*
|
|
40
16
|
* @example
|
|
41
17
|
* // Basic menu with trigger
|
|
42
|
-
* <
|
|
18
|
+
* <MenuTrigger>
|
|
43
19
|
* <Button>Open Menu</Button>
|
|
44
20
|
* <Menu>
|
|
45
|
-
* <
|
|
46
|
-
* <
|
|
47
|
-
* <
|
|
21
|
+
* <MenuItem>Edit</MenuItem>
|
|
22
|
+
* <MenuItem>Copy</MenuItem>
|
|
23
|
+
* <MenuItem>Delete</MenuItem>
|
|
48
24
|
* </Menu>
|
|
49
|
-
* </
|
|
25
|
+
* </MenuTrigger>
|
|
50
26
|
*
|
|
51
27
|
* @example
|
|
52
28
|
* // Menu with sections and separators
|
|
53
|
-
* <
|
|
29
|
+
* <MenuTrigger>
|
|
54
30
|
* <Button>Open</Button>
|
|
55
31
|
* <Menu>
|
|
56
|
-
* <
|
|
57
|
-
* <
|
|
58
|
-
* <
|
|
59
|
-
* </
|
|
32
|
+
* <MenuSection>
|
|
33
|
+
* <MenuItem>New File</MenuItem>
|
|
34
|
+
* <MenuItem>Open File</MenuItem>
|
|
35
|
+
* </MenuSection>
|
|
60
36
|
*
|
|
61
|
-
* <
|
|
37
|
+
* <MenuSeparator />
|
|
62
38
|
*
|
|
63
|
-
* <
|
|
39
|
+
* <MenuItem>Settings</MenuItem>
|
|
64
40
|
* </Menu>
|
|
65
|
-
* </
|
|
41
|
+
* </MenuTrigger>
|
|
66
42
|
*
|
|
67
43
|
* @example
|
|
68
44
|
* // Menu with selection
|
|
69
|
-
* <
|
|
45
|
+
* <MenuTrigger>
|
|
70
46
|
* <Button>Group</Button>
|
|
71
47
|
* <Menu selectionMode='multiple'>
|
|
72
|
-
* <
|
|
73
|
-
* <
|
|
48
|
+
* <MenuItem>Option 1</MenuItem>
|
|
49
|
+
* <MenuItem>Option 2</MenuItem>
|
|
74
50
|
* </Menu>
|
|
75
|
-
* </
|
|
51
|
+
* </MenuTrigger>
|
|
76
52
|
*
|
|
77
53
|
* @example
|
|
78
54
|
* // Menu with submenu
|
|
79
|
-
* <
|
|
55
|
+
* <MenuTrigger>
|
|
80
56
|
* <Button>Actions</Button>
|
|
81
57
|
* <Menu>
|
|
82
|
-
* <
|
|
83
|
-
* <
|
|
84
|
-
* <
|
|
58
|
+
* <MenuItem>New File</MenuItem>
|
|
59
|
+
* <MenuSubmenu>
|
|
60
|
+
* <MenuItem>Export</MenuItem>
|
|
85
61
|
* <Menu>
|
|
86
|
-
* <
|
|
87
|
-
* <
|
|
88
|
-
* <
|
|
62
|
+
* <MenuItem>Export as PDF</MenuItem>
|
|
63
|
+
* <MenuItem>Export as CSV</MenuItem>
|
|
64
|
+
* <MenuItem>Export as JSON</MenuItem>
|
|
89
65
|
* </Menu>
|
|
90
|
-
* </
|
|
91
|
-
* <
|
|
66
|
+
* </MenuSubmenu>
|
|
67
|
+
* <MenuItem>Delete</MenuItem>
|
|
92
68
|
* </Menu>
|
|
93
|
-
* </
|
|
69
|
+
* </MenuTrigger>
|
|
94
70
|
*/
|
|
95
71
|
declare function Menu<T extends object>({ ref, ...props }: MenuProps<T>): react_jsx_runtime.JSX.Element;
|
|
96
|
-
declare namespace Menu {
|
|
97
|
-
var displayName: string;
|
|
98
|
-
var Trigger: typeof MenuTrigger;
|
|
99
|
-
var Submenu: (props: react_aria_components.SubmenuTriggerProps & React.RefAttributes<HTMLDivElement>) => react.ReactElement | null;
|
|
100
|
-
var Item: typeof MenuItem;
|
|
101
|
-
var Separator: typeof MenuSeparator;
|
|
102
|
-
var Section: typeof MenuSection;
|
|
103
|
-
}
|
|
104
72
|
|
|
105
|
-
export { Menu
|
|
73
|
+
export { Menu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {jsx
|
|
3
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {useContextProps,Popover,composeRenderProps,Menu}from'react-aria-components';import {MenuContext}from'./context.js';import {MenuStyles,MenuStylesDefaults}from'./styles.js';const{menu:f,popover:x}=MenuStyles();function S({ref:e,...o}){[o,e]=useContextProps(o,e??null,MenuContext);const{children:i,classNames:t,popoverProps:a,selectionMode:l="single",variant:s=MenuStylesDefaults.variant,...m}=o;return jsx(Popover,{...a,className:composeRenderProps(t?.popover,n=>x({className:n})),children:jsx(MenuContext.Provider,{value:{variant:s},children:jsx(Menu,{...m,ref:e,className:composeRenderProps(t?.menu,n=>f({className:n,variant:s})),selectionMode:l,children:i})})})}export{S as Menu};//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/menu/index.tsx"],"names":["label","description","header","MenuStyles","MenuContext","MenuSection","f","children","classNames","jsxs","AriaMenuSection","rest","y","g","title","jsx","o","L","Collection","items","A","MenuSeparator","className","E","M","context","useContext","isSlottedContextValue","b","w","MenuStylesDefaults","x","I","item","u","composeRenderProps","Provider","V","hotkey","h","K","icon","D","more","Text","hasSubmenu","F","MenuItem","MenuDescription","Menu","props","ref","j","popoverProps","H","AriaMenu","menu","SubmenuTrigger"],"mappings":"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","file":"index.js","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 ChevronRight from '@accelint/icons/chevron-right';\nimport { createContext, useContext } from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n Collection,\n type ContextValue,\n composeRenderProps,\n DEFAULT_SLOT,\n Header,\n KeyboardContext,\n MenuTrigger,\n Popover,\n Provider,\n Separator,\n type SeparatorProps,\n SubmenuTrigger,\n Text,\n type TextProps,\n useContextProps,\n} from 'react-aria-components';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { Icon, IconContext } from '../icon';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type { MenuItemProps, MenuProps, MenuSectionProps } from './types';\n\nconst {\n menu,\n icon,\n item,\n label,\n description,\n more,\n section,\n header,\n separator,\n hotkey,\n popover,\n} = MenuStyles();\n\nexport const MenuContext =\n createContext<ContextValue<MenuProps<unknown>, HTMLDivElement>>(null);\n\nfunction MenuSection<T extends object>({\n children,\n classNames,\n items,\n title,\n ...rest\n}: MenuSectionProps<T>) {\n return (\n <AriaMenuSection\n {...rest}\n className={section({ className: classNames?.section })}\n >\n {title && (\n <Header className={header({ className: classNames?.header })}>\n {title}\n </Header>\n )}\n <Collection items={items}>{children}</Collection>\n </AriaMenuSection>\n );\n}\nMenuSection.displayName = 'Menu.Section';\n\nfunction MenuSeparator({ className, ...rest }: SeparatorProps) {\n return <Separator {...rest} className={separator({ className })} />;\n}\nMenuSeparator.displayName = 'Menu.Separator';\n\nfunction MenuLabel({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='label' className={label({ className })}>\n {children}\n </Text>\n );\n}\nMenuLabel.displayName = 'Menu.Item.Label';\n\nfunction MenuDescription({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })}>\n {children}\n </Text>\n );\n}\nMenuDescription.displayName = 'Menu.Item.Description';\n\nfunction MenuItem({\n children,\n classNames,\n color = 'info',\n ...rest\n}: MenuItemProps) {\n const context = useContext(MenuContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n MenuStylesDefaults.variant;\n\n return (\n <AriaMenuItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className, variant }),\n )}\n data-color={color}\n >\n {composeRenderProps(children, (children, { hasSubmenu }) => (\n <Provider\n values={[\n [\n KeyboardContext,\n { className: hotkey({ className: classNames?.hotkey }) },\n ],\n [\n IconContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: icon({ className: classNames?.icon }),\n },\n submenu: { className: more({ className: classNames?.more }) },\n },\n },\n ],\n ]}\n >\n {typeof children === 'string' ? (\n <Text slot='label' className={classNames?.text}>\n {children}\n </Text>\n ) : (\n children\n )}\n {hasSubmenu && (\n <Icon slot='submenu'>\n <ChevronRight />\n </Icon>\n )}\n </Provider>\n ))}\n </AriaMenuItem>\n );\n}\nMenuItem.displayName = 'Menu.Item';\nMenuItem.Label = MenuLabel;\nMenuItem.Description = MenuDescription;\n\n/**\n * Menu - A dropdown menu component with keyboard navigation and selection\n *\n * Provides accessible dropdown menu functionality with support for single and\n * multiple selection modes. Includes sections, separators, and submenu support\n * with comprehensive keyboard navigation and ARIA compliance.\n *\n * @example\n * // Basic menu with trigger\n * <Menu.Trigger>\n * <Button>Open Menu</Button>\n * <Menu>\n * <Menu.Item>Edit</Menu.Item>\n * <Menu.Item>Copy</Menu.Item>\n * <Menu.Item>Delete</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with sections and separators\n * <Menu.Trigger>\n * <Button>Open</Button>\n * <Menu>\n * <Menu.Section>\n * <Menu.Item>New File</Menu.Item>\n * <Menu.Item>Open File</Menu.Item>\n * </Menu.Section>\n *\n * <Menu.Separator />\n *\n * <Menu.Item>Settings</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with selection\n * <Menu.Trigger>\n * <Button>Group</Button>\n * <Menu selectionMode='multiple'>\n * <Menu.Item>Option 1</Menu.Item>\n * <Menu.Item>Option 2</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with submenu\n * <Menu.Trigger>\n * <Button>Actions</Button>\n * <Menu>\n * <Menu.Item>New File</Menu.Item>\n * <Menu.Submenu>\n * <Menu.Item>Export</Menu.Item>\n * <Menu>\n * <Menu.Item>Export as PDF</Menu.Item>\n * <Menu.Item>Export as CSV</Menu.Item>\n * <Menu.Item>Export as JSON</Menu.Item>\n * </Menu>\n * </Menu.Submenu>\n * <Menu.Item>Delete</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n */\nexport function Menu<T extends object>({ ref, ...props }: MenuProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, MenuContext);\n\n const {\n children,\n classNames,\n popoverProps,\n selectionMode = 'single',\n variant = MenuStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <Popover\n {...popoverProps}\n className={composeRenderProps(classNames?.popover, (className) =>\n popover({ className }),\n )}\n >\n <MenuContext.Provider value={{ variant }}>\n <AriaMenu\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.menu, (className) =>\n menu({ className, variant }),\n )}\n selectionMode={selectionMode}\n >\n {children}\n </AriaMenu>\n </MenuContext.Provider>\n </Popover>\n );\n}\nMenu.displayName = 'Menu';\nMenu.Trigger = MenuTrigger;\nMenu.Submenu = SubmenuTrigger;\nMenu.Item = MenuItem;\nMenu.Separator = MenuSeparator;\nMenu.Section = MenuSection;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/index.tsx"],"names":["popover","P","ref","props","useContextProps","v","MenuContext","u","variant","d","jsx","popoverProps","c","p","className","r","rest","M","menu"],"mappings":"2OAyBQ,KAAM,CAAA,IAAA,CAAA,CAAA,CAAAA,OAgEP,CAAA,CAAA,CAAA,CAAAC,UAAA,EAAA,CAAA,SAAkCC,CAAK,CAAA,CAAA,GAAS,CAAiB,CACtE,CAACC,GAAU,CAAA,CAAIC,CAAAA,CAAgBD,CAAAA,CAAOD,CAAAA,CAAAA,CAAO,CAAAG,eAAA,CAAA,CAAA,CAAMC,CAAW,EAE9D,IAAA,CAAMC,WACJ,CAAA,CAAA,KAAA,CAAA,QACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,4BACgB,CAAA,CAAA,CAAA,QAChB,CAAAC,OAA6B,CAAA,CAAA,CAAAC,kBAAA,CAC7B,OACEN,CAEJ,GAAA,CAAA,CAAA,CAAA,CACEO,CAAAA,OACMC,GAAAA,CACJC,OAAA,CAAA,CAAA,GAAA,CAAA,CAAA,SAA0C,CAAAC,kBAAA,CAAA,CAAA,EAAUC,OACxC,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,SAGZ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAa,CAAAC,GAAA,CAAAR,WAAA,CAAA,QAAgB,CAAE,CAAA,KAAA,CAAA,CAAAC,OAC7B,CAAA,CAAA,CAAA,CAAA,QACG,CAAGQ,GAAAA,CACJC,IAAA,CAAA,CAAA,GACA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,SAA0C,CAAAJ,kBAAA,CAAOC,CAAAA,EAC/CI,IAAO,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAAV,OAEpB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,aAEC,CAAA,CAAA,CAAA,QAKX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","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 {\n Menu as AriaMenu,\n composeRenderProps,\n Popover,\n useContextProps,\n} from 'react-aria-components';\nimport { MenuContext } from './context';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type { MenuProps } from './types';\n\nconst { menu, popover } = MenuStyles();\n\n/**\n * Menu - A dropdown menu component with keyboard navigation and selection\n *\n * Provides accessible dropdown menu functionality with support for single and\n * multiple selection modes. Includes sections, separators, and submenu support\n * with comprehensive keyboard navigation and ARIA compliance.\n *\n * @example\n * // Basic menu with trigger\n * <MenuTrigger>\n * <Button>Open Menu</Button>\n * <Menu>\n * <MenuItem>Edit</MenuItem>\n * <MenuItem>Copy</MenuItem>\n * <MenuItem>Delete</MenuItem>\n * </Menu>\n * </MenuTrigger>\n *\n * @example\n * // Menu with sections and separators\n * <MenuTrigger>\n * <Button>Open</Button>\n * <Menu>\n * <MenuSection>\n * <MenuItem>New File</MenuItem>\n * <MenuItem>Open File</MenuItem>\n * </MenuSection>\n *\n * <MenuSeparator />\n *\n * <MenuItem>Settings</MenuItem>\n * </Menu>\n * </MenuTrigger>\n *\n * @example\n * // Menu with selection\n * <MenuTrigger>\n * <Button>Group</Button>\n * <Menu selectionMode='multiple'>\n * <MenuItem>Option 1</MenuItem>\n * <MenuItem>Option 2</MenuItem>\n * </Menu>\n * </MenuTrigger>\n *\n * @example\n * // Menu with submenu\n * <MenuTrigger>\n * <Button>Actions</Button>\n * <Menu>\n * <MenuItem>New File</MenuItem>\n * <MenuSubmenu>\n * <MenuItem>Export</MenuItem>\n * <Menu>\n * <MenuItem>Export as PDF</MenuItem>\n * <MenuItem>Export as CSV</MenuItem>\n * <MenuItem>Export as JSON</MenuItem>\n * </Menu>\n * </MenuSubmenu>\n * <MenuItem>Delete</MenuItem>\n * </Menu>\n * </MenuTrigger>\n */\nexport function Menu<T extends object>({ ref, ...props }: MenuProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, MenuContext);\n\n const {\n children,\n classNames,\n popoverProps,\n selectionMode = 'single',\n variant = MenuStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <Popover\n {...popoverProps}\n className={composeRenderProps(classNames?.popover, (className) =>\n popover({ className }),\n )}\n >\n <MenuContext.Provider value={{ variant }}>\n <AriaMenu\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.menu, (className) =>\n menu({ className, variant }),\n )}\n selectionMode={selectionMode}\n >\n {children}\n </AriaMenu>\n </MenuContext.Provider>\n </Popover>\n );\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {Text}from'react-aria-components';import {MenuStyles}from'./styles.js';const{description:p}=MenuStyles();function l({children:t,className:e,...o}){return jsx(Text,{...o,slot:"description",className:p({className:e}),children:t})}export{l as MenuItemDescription};//# sourceMappingURL=item-description.js.map
|
|
2
|
+
//# sourceMappingURL=item-description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/item-description.tsx"],"names":["MenuStyles","i","rest","s","r"],"mappings":"sIAkBA,KAAQ,CAAA,WAAgBA,CAAAA,CAAW,CAAA,CAE5BC,UAAA,EAAA,CAAA,SACL,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,WACGC,CACL,GACE,CAAA,CAAA,CAAA,CAAA,OACGC,GAAM,CAAAC,IAAA,CAAGF,CAAAA,SAAW,CAAA,aAAc,CAAA,SAAyB,CAAA,CAAA,CAAA,CAAA,SAAW,CACpE,CAAA,CAAA,CAAA,CAAA,QAGP,CAAA,CAAA,CAAA,CAAA","file":"item-description.js","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 { Text, type TextProps } from 'react-aria-components';\nimport { MenuStyles } from './styles';\n\nconst { description } = MenuStyles();\n\nexport function MenuItemDescription({\n children,\n className,\n ...rest\n}: TextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })}>\n {children}\n </Text>\n );\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {Text}from'react-aria-components';import {MenuStyles}from'./styles.js';const{label:p}=MenuStyles();function i({children:e,className:t,...o}){return jsx(Text,{...o,slot:"label",className:p({className:t}),children:e})}export{i as MenuItemLabel};//# sourceMappingURL=item-label.js.map
|
|
4
|
+
//# sourceMappingURL=item-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/item-label.tsx"],"names":["MenuStyles","r","rest","s","l"],"mappings":"sIAkBA,KAAQ,CAAA,KAAUA,CAAAA,CAAW,CAAA,CAEtBC,UAAA,EAAA,CAAA,SAAyB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAA,CAAA,WAAcC,CAAK,GAC3D,CAAA,CAAA,CAAA,CAAA,OACGC,GAAM,CAAAC,IAAA,CAAGF,CAAAA,SAAW,CAAA,OAAQ,CAAA,SAAmB,CAAA,CAAA,CAAA,CAAA,SAAW,CACxD,CAAA,CAAA,CAAA,CAAA,QAGP,CAAA,CAAA,CAAA,CAAA","file":"item-label.js","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 { Text, type TextProps } from 'react-aria-components';\nimport { MenuStyles } from './styles';\n\nconst { label } = MenuStyles();\n\nexport function MenuItemLabel({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='label' className={label({ className })}>\n {children}\n </Text>\n );\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MenuItemProps } from './types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react-aria-components';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '../icon/types.js';
|
|
7
|
+
import './styles.js';
|
|
8
|
+
|
|
9
|
+
declare function MenuItem({ children, classNames, color, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { MenuItem };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx,jsxs}from'react/jsx-runtime';import p from'@accelint/icons/chevron-right';import'client-only';import {useContext}from'react';import {MenuItem,composeRenderProps,Provider,KeyboardContext,Text,DEFAULT_SLOT}from'react-aria-components';import {isSlottedContextValue}from'../../lib/utils.js';import {Icon}from'../icon/index.js';import {IconContext}from'../icon/context.js';import {MenuContext}from'./context.js';import {MenuStyles,MenuStylesDefaults}from'./styles.js';const{item:N,icon:S,more:T,hotkey:A}=MenuStyles();function U({children:n,classNames:t,color:s="info",...i}){const r=useContext(MenuContext),a=(isSlottedContextValue(r)?void 0:r?.variant)??MenuStylesDefaults.variant;return jsx(MenuItem,{...i,className:composeRenderProps(t?.item,e=>N({className:e,variant:a})),"data-color":s,children:composeRenderProps(n,(e,{hasSubmenu:u})=>jsxs(Provider,{values:[[KeyboardContext,{className:A({className:t?.hotkey})}],[IconContext,{slots:{[DEFAULT_SLOT]:{className:S({className:t?.icon})},submenu:{className:T({className:t?.more})}}}]],children:[typeof e=="string"?jsx(Text,{slot:"label",className:t?.text,children:e}):e,u&&jsx(Icon,{slot:"submenu",children:jsx(p,{})})]}))})}export{U as MenuItem};//# sourceMappingURL=item.js.map
|
|
4
|
+
//# sourceMappingURL=item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/item.tsx"],"names":["more","MenuStyles","MenuItem","children","classNames","useContext","MenuContext","context","MenuStylesDefaults","rest","o","c","className","item","variant","color","composeRenderProps","jsxs","Provider","g","hotkey","IconContext","DEFAULT_SLOT","icon","hasSubmenu","jsx","Icon","ChevronRight"],"mappings":"2dAgCoBA,KAAM,CAAA,IAAO,CAAIC,CAAAA,CAAW,IAEzC,CAAA,CAAA,CAAA,IAASC,CAAAA,CAAS,CACvB,MAAA,CAAA,CAAA,CAAAC,CAAAA,UACA,YAAAC,CACA,CAAA,CAAA,QAAQ,CAAA,CAAA,CAAA,UAGR,CAAA,CAAA,CAAA,KAAgBC,CAAWC,CAAW,OAEbC,CAAO,GAAI,CAAA,CAAA,CAAA,CAAA,kCAClCC,CAAAA,qBAAmB,CAAA,CAAA,CAAA,CAAA,iBAIhB,GAAGC,kBACJ,CAAA,OAAA,CAAA,OAA0CC,GAAA,CAAAC,QAAA,CAAOC,IAC/CC,CAAK,CAAE,UAAAD,kBAAAA,CAAW,CAAA,EAAA,IAAA,CAAAE,CAAQ,EAC5B,EACA,CAAA,SAAA,CAAA,CAAA,CAAYC,WAEXC,CAAAA,CAAmBb,uBAClBc,CAACC,kBAAAA,CAAA,CACC,CAAA,CAAA,CAAA,CAAA,CAAA,UAGM,CAAA,CAAA,CAAA,GAAAC,IAAWC,CAAAA,QAAO,CAAE,CAAA,MAAA,CAAA,CAAA,CAAWhB,eAAAA,CAAAA,CAAY,SAC/C,EACA,CACEiB,CAAAA,SAGI,CAACC,CAAY,EAAG,MACd,CAAA,CAAA,CAAA,CAAA,CAAWC,CAAAA,WAAK,CAAE,qBAAWnB,EAAAA,CAAY,sBAEhC,CAAA,CAAA,EAAA,IAAkB,CAAA,CAAA,CAAA,CAAA,OAAWA,CAAAA,CAAY,SAG1D,CACF,CAAA,CAEC,CAAA,SAAA,CAAA,CAAA,EAAA,IAAOD,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QACb,CAAA,CAAA,OAAK,CAAA,EAAA,aAAmBC,IAAAA,CAAAA,CAAY,IAAA,CACvC,iBAKJoB,CACCC,CAAAA,EAACC,IAAK,CAAA,QAAK,CAAA,CAAA,CAAA,CACT,cAAAD,CAAAA,CAACE,IAAa,CAAA,SAO5B,CAAA,QAAA,CAAAjB,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"item.js","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 ChevronRight from '@accelint/icons/chevron-right';\nimport 'client-only';\nimport { useContext } from 'react';\nimport {\n MenuItem as AriaMenuItem,\n composeRenderProps,\n DEFAULT_SLOT,\n KeyboardContext,\n Provider,\n Text,\n} from 'react-aria-components';\nimport { isSlottedContextValue } from '../../lib/utils';\nimport { Icon } from '../icon';\nimport { IconContext } from '../icon/context';\nimport { MenuContext } from './context';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type { MenuItemProps } from './types';\n\nconst { item, icon, more, hotkey } = MenuStyles();\n\nexport function MenuItem({\n children,\n classNames,\n color = 'info',\n ...rest\n}: MenuItemProps) {\n const context = useContext(MenuContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n MenuStylesDefaults.variant;\n\n return (\n <AriaMenuItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className, variant }),\n )}\n data-color={color}\n >\n {composeRenderProps(children, (children, { hasSubmenu }) => (\n <Provider\n values={[\n [\n KeyboardContext,\n { className: hotkey({ className: classNames?.hotkey }) },\n ],\n [\n IconContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: icon({ className: classNames?.icon }),\n },\n submenu: { className: more({ className: classNames?.more }) },\n },\n },\n ],\n ]}\n >\n {typeof children === 'string' ? (\n <Text slot='label' className={classNames?.text}>\n {children}\n </Text>\n ) : (\n children\n )}\n {hasSubmenu && (\n <Icon slot='submenu'>\n <ChevronRight />\n </Icon>\n )}\n </Provider>\n ))}\n </AriaMenuItem>\n );\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MenuSectionProps } from './types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react-aria-components';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '../icon/types.js';
|
|
7
|
+
import './styles.js';
|
|
8
|
+
|
|
9
|
+
declare function MenuSection<T extends object>({ children, classNames, items, title, ...rest }: MenuSectionProps<T>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { MenuSection };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import'client-only';import {MenuSection,Header,Collection}from'react-aria-components';import {MenuStyles}from'./styles.js';const{section:p,header:u}=MenuStyles();function f({children:t,classNames:e,items:i,title:o,...c}){return jsxs(MenuSection,{...c,className:p({className:e?.section}),children:[o&&jsx(Header,{className:u({className:e?.header}),children:o}),jsx(Collection,{items:i,children:t})]})}export{f as MenuSection};//# sourceMappingURL=section.js.map
|
|
2
|
+
//# sourceMappingURL=section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/section.tsx"],"names":["MenuStyles","m","rest","l","jsx","Header","n","a","Collection","s"],"mappings":"oKAuBA,aAAiB,CAAA,CAAA,CAAA,MAAWA,EAAW,CAAA,CAEhCC,UAAA,EAAA,CAAA,oBAEL,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,aAEA,CAAA,CAAGC,CACL,GACE,CAAA,CAAA,CAAA,CAAA,OACGC,IACE,aAAGD,CAAAA,GACJ,CAAA,CAAA,SAAqB,aAAuB,CAAA,CAAA,EAAA,OAE3C,CAAA,CAAA,CAAA,SACCE,CAAAA,CAACC,EAAAC,GAAO,CAAAC,MAAA,CAAA,CAAA,SAAoB,CAAA,CAAA,CAAA,CAAA,SAAuB,CAAA,CAAA,EAAA,MAChD,CAAA,CAAA,CAAA,QACH,CAEFH,CAAAA,CAACI,EAAAF,GAAW,CAAAG,UAAA,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,UAC7B,CAEJ,CAAA,CAAA,CAAA,CAAA","file":"section.js","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 {\n MenuSection as AriaMenuSection,\n Collection,\n Header,\n} from 'react-aria-components';\nimport { MenuStyles } from './styles';\nimport type { MenuSectionProps } from './types';\n\nconst { section, header } = MenuStyles();\n\nexport function MenuSection<T extends object>({\n children,\n classNames,\n items,\n title,\n ...rest\n}: MenuSectionProps<T>) {\n return (\n <AriaMenuSection\n {...rest}\n className={section({ className: classNames?.section })}\n >\n {title && (\n <Header className={header({ className: classNames?.header })}>\n {title}\n </Header>\n )}\n <Collection items={items}>{children}</Collection>\n </AriaMenuSection>\n );\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {Separator}from'react-aria-components';import {MenuStyles}from'./styles.js';const{separator:p}=MenuStyles();function S({className:r,...o}){return jsx(Separator,{...o,className:p({className:r})})}export{S as MenuSeparator};//# sourceMappingURL=separator.js.map
|
|
4
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/separator.tsx"],"names":["MenuStyles","e","rest","a","t"],"mappings":"2IAkBA,eAAsBA,EAAW,CAAA,CAE1BC,UAAA,EAAA,CAAA,qBAAoC,CAAA,CAAGC,CAAK,GACjD,WAAQC,GAAW,CAAAC,SAAA,CAAGF,CAAAA,cAA6B,cAAc,CACnE,CAAA,CAAA,CAAA,CAAA","file":"separator.js","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 { Separator, type SeparatorProps } from 'react-aria-components';\nimport { MenuStyles } from './styles';\n\nconst { separator } = MenuStyles();\n\nexport function MenuSeparator({ className, ...rest }: SeparatorProps) {\n return <Separator {...rest} className={separator({ className })} />;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tv}from'./../../lib/utils.js';const o={variant:"cozy"},i=tv({slots:{menu:"group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static",item:["group/menu-item flex cursor-pointer items-center gap-x-s px-s text-body-s outline outline-transparent",'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:"icon_label_space_action"_"icon_description_space_action"]',"enabled:focus-visible:
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const o={variant:"cozy"},i=tv({slots:{menu:"group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static",item:["group/menu-item flex cursor-pointer items-center gap-x-s px-s text-body-s outline outline-transparent",'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:"icon_label_space_action"_"icon_description_space_action"]',"enabled:fg-primary-bold enabled","enabled:selected:inset-shadow-[3px_0_0_0_]","color-info:enabled:focus-visible:bg-accent-primary-muted","color-info:enabled:hover:bg-accent-primary-muted","color-info:enabled:open:bg-accent-primary-muted","color-info:enabled:selected:bg-accent-primary-muted","color-info:enabled:pressed:fg-accent-primary-bold color-info:enabled:pressed:bg-accent-primary-pressed","color-info:enabled:selected:inset-shadow-[color:var(--outline-accent-primary-bold)] color-info:enabled:selected:bg-accent-primary-muted","color-info:enabled:selected:hover:bg-accent-primary-bold","color-info:enabled:selected:focus-visible:bg-accent-primary-bold","color-info:enabled:selected:pressed:fg-accent-primary-bold color-info:enabled:selected:pressed:inset-shadow-[color:var(--outline-accent-primary-pressed)] color-info:enabled:selected:pressed:bg-accent-primary-pressed","color-serious:enabled:focus-visible:bg-serious-muted","color-serious:enabled:hover:bg-serious-muted","color-serious:enabled:open:bg-serious-muted","color-serious:enabled:selected:bg-serious-muted","color-serious:enabled:pressed:fg-serious-bold color-serious:enabled:pressed:bg-serious-pressed","color-serious:enabled:selected:inset-shadow-[color:var(--outline-serious-bold)] color-serious:enabled:selected:bg-serious-muted","color-serious:enabled:selected:hover:bg-serious-bold","color-serious:enabled:selected:focus-visible:bg-serious-bold","color-serious:enabled:selected:pressed:fg-serious-bold color-serious:enabled:selected:pressed:inset-shadow-[color:var(--outline-serious-pressed)] color-serious:enabled:selected:pressed:bg-serious-pressed","color-critical:enabled:focus-visible:bg-critical-muted","color-critical:enabled:hover:bg-critical-muted","color-critical:enabled:open:bg-critical-muted","color-critical:enabled:selected:bg-critical-muted","color-critical:enabled:pressed:fg-critical-bold color-critical:enabled:pressed:bg-critical-pressed","color-critical:enabled:selected:inset-shadow-[color:var(--outline-critical-bold)] color-critical:enabled:selected:bg-critical-muted","color-critical:enabled:selected:hover:bg-critical-bold","color-critical:enabled:selected:focus-visible:bg-critical-bold","color-critical:enabled:selected:pressed:fg-critical-bold color-critical:enabled:selected:pressed:inset-shadow-[color:var(--outline-critical-pressed)] color-critical:enabled:selected:pressed:bg-critical-pressed","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-transparent"],icon:"[grid-area:icon]",label:"truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full",description:["[grid-area:description]","fg-primary-muted truncate text-body-xs","group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent","group-disabled/menu-item:fg-disabled","group-enabled/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold","group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold","group-enabled/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold","group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold","group-enabled/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-critical-bold","group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-critical-bold"],more:"[grid-area:action]",section:"",header:"fg-primary-muted px-s py-xs text-header-xs",separator:"mx-3 my-1 outline outline-static",hotkey:["[grid-area:action]","group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent","group-disabled/menu-item:fg-disabled","group-enabled/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold","group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold","group-enabled/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold","group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold","group-enabled/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-critical-bold","group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-accent-critical-bold"],popover:"outline-none"},variants:{variant:{cozy:{item:"pt-s pb-s"},compact:{item:"pt-xs pb-xs"}}},defaultVariants:o});export{i as MenuStyles,o as MenuStylesDefaults};//# sourceMappingURL=styles.js.map
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/menu/styles.ts"],"names":["MenuStyles","tv","e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAaC,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/styles.ts"],"names":["MenuStyles","tv","e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAaC,SACjB,CACLC,EAAA,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,8HAEJ,CAAA,IAAA,CAAA,CAAA,6NAEA,CAAA,iCACA,CAAA,4CAEA,CAAA,0DACA,CAAA,kDACA,CAAA,iDACA,CAAA,8JAGA,CAAA,yIACA,CAAA,0DACA,CAAA,kEACA,CAAA,yNAEA,CAAA,sDACA,CAAA,4FAEA,CAAA,iDACA,CAAA,gGAEA,CAAA,iIACA,CAAA,sDACA,CAAA,8DACA,CAAA,sQAGA,CAAA,gDACA,CAAA,+CACA,CAAA,mDACA,CAAA,oGAEA,CAAA,qIACA,CAAA,yHAEA,CAAA,mNAEA,CAAA,0EAEI,CAAA,CAAA,IAAA,CAAA,kHAGN,CAAA,WACE,CAAA,CAAA,yBACA,CAAA,wCACA,CAAA,yFACA,CAAA,0IAGA,CAAA,4HAEA,CAAA,+FACA,CAAA,wHAEA,CAAA,iGACA,CAAA,0HAEI,CAAA,CAAA,IAAA,CAAA,oBACG,CAAA,OACT,CAAQ,EAAA,CAAA,MAAA,CAAA,4CACR,CAAW,4CAET,CAAA,MAAA,CAAA,CAAA,oBACA,CAAA,yFACA,CAAA,sCAEA,CAAA,gOAGA,CAAA,+FACA,CAAA,wHAEA,CAAA,iGACA,CAAA,iIAEO,wBAEX,CAAU,CACR,QAAS,CACP,CAAA,OACE,CAAA,CAAA,IAAM,CAAA,CAAA,IAAA,CAAA,WAEC,CACP,CAAA,OAAM,CAAA,CAAA,IAAA,CAAA,aAIZ,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","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\nimport { tv } from '@/lib/utils';\n\nexport const MenuStylesDefaults = {\n variant: 'cozy',\n} as const;\n\nexport const MenuStyles = tv({\n slots: {\n menu: 'group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static',\n item: [\n 'group/menu-item flex cursor-pointer items-center gap-x-s px-s text-body-s outline outline-transparent',\n 'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:\"icon_label_space_action\"_\"icon_description_space_action\"]',\n 'enabled:fg-primary-bold enabled',\n 'enabled:selected:inset-shadow-[3px_0_0_0_]',\n // info\n 'color-info:enabled:focus-visible:bg-accent-primary-muted',\n 'color-info:enabled:hover:bg-accent-primary-muted',\n 'color-info:enabled:open:bg-accent-primary-muted',\n 'color-info:enabled:selected:bg-accent-primary-muted',\n 'color-info:enabled:pressed:fg-accent-primary-bold color-info:enabled:pressed:bg-accent-primary-pressed',\n // info + selected\n 'color-info:enabled:selected:inset-shadow-[color:var(--outline-accent-primary-bold)] color-info:enabled:selected:bg-accent-primary-muted',\n 'color-info:enabled:selected:hover:bg-accent-primary-bold',\n 'color-info:enabled:selected:focus-visible:bg-accent-primary-bold',\n 'color-info:enabled:selected:pressed:fg-accent-primary-bold color-info:enabled:selected:pressed:inset-shadow-[color:var(--outline-accent-primary-pressed)] color-info:enabled:selected:pressed:bg-accent-primary-pressed',\n // serious\n 'color-serious:enabled:focus-visible:bg-serious-muted',\n 'color-serious:enabled:hover:bg-serious-muted',\n 'color-serious:enabled:open:bg-serious-muted',\n 'color-serious:enabled:selected:bg-serious-muted',\n 'color-serious:enabled:pressed:fg-serious-bold color-serious:enabled:pressed:bg-serious-pressed',\n // serious + selected\n 'color-serious:enabled:selected:inset-shadow-[color:var(--outline-serious-bold)] color-serious:enabled:selected:bg-serious-muted',\n 'color-serious:enabled:selected:hover:bg-serious-bold',\n 'color-serious:enabled:selected:focus-visible:bg-serious-bold',\n 'color-serious:enabled:selected:pressed:fg-serious-bold color-serious:enabled:selected:pressed:inset-shadow-[color:var(--outline-serious-pressed)] color-serious:enabled:selected:pressed:bg-serious-pressed',\n // critical\n 'color-critical:enabled:focus-visible:bg-critical-muted',\n 'color-critical:enabled:hover:bg-critical-muted',\n 'color-critical:enabled:open:bg-critical-muted',\n 'color-critical:enabled:selected:bg-critical-muted',\n 'color-critical:enabled:pressed:fg-critical-bold color-critical:enabled:pressed:bg-critical-pressed',\n // critical + selected\n 'color-critical:enabled:selected:inset-shadow-[color:var(--outline-critical-bold)] color-critical:enabled:selected:bg-critical-muted',\n 'color-critical:enabled:selected:hover:bg-critical-bold',\n 'color-critical:enabled:selected:focus-visible:bg-critical-bold',\n 'color-critical:enabled:selected:pressed:fg-critical-bold color-critical:enabled:selected:pressed:inset-shadow-[color:var(--outline-critical-pressed)] color-critical:enabled:selected:pressed:bg-critical-pressed',\n\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-transparent',\n ],\n icon: '[grid-area:icon]',\n label:\n 'truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full',\n description: [\n '[grid-area:description]',\n 'fg-primary-muted truncate text-body-xs',\n 'group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent',\n 'group-disabled/menu-item:fg-disabled',\n // info\n 'group-enabled/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold',\n 'group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold',\n // serious\n 'group-enabled/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold',\n 'group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold',\n // critical\n 'group-enabled/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-critical-bold',\n 'group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-critical-bold',\n ],\n more: '[grid-area:action]',\n section: '',\n header: 'fg-primary-muted px-s py-xs text-header-xs',\n separator: 'mx-3 my-1 outline outline-static',\n hotkey: [\n '[grid-area:action]',\n 'group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent',\n 'group-disabled/menu-item:fg-disabled',\n // info\n 'group-enabled/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold',\n 'group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-info/menu-item:fg-accent-primary-bold',\n // serious\n 'group-enabled/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold',\n 'group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-serious/menu-item:fg-serious-bold',\n // critical\n 'group-enabled/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-critical-bold',\n 'group-enabled/menu-item:group-selected/menu-item:group-pressed/menu-item:group-color-critical/menu-item:fg-accent-critical-bold',\n ],\n popover: 'outline-none',\n },\n variants: {\n variant: {\n cozy: {\n item: 'pt-s pb-s',\n },\n compact: {\n item: 'pt-xs pb-xs',\n },\n },\n },\n defaultVariants: MenuStylesDefaults,\n});\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_aria_components from 'react-aria-components';
|
|
3
|
+
|
|
4
|
+
declare const MenuSubmenu: (props: react_aria_components.SubmenuTriggerProps & React.RefAttributes<HTMLDivElement>) => react.ReactElement | null;
|
|
5
|
+
|
|
6
|
+
export { MenuSubmenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/submenu.tsx"],"names":["MenuSubmenu","SubmenuTrigger"],"mappings":"6EAiBaA,CAAAA,CAAcC","file":"submenu.js","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 { SubmenuTrigger } from 'react-aria-components';\n\nexport const MenuSubmenu = SubmenuTrigger;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuTrigger } from 'react-aria-components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"trigger.js","sourcesContent":[]}
|
|
@@ -19,7 +19,7 @@ type MenuItemProps = Omit<MenuItemProps$1, 'className'> & {
|
|
|
19
19
|
icon?: IconProps['className'];
|
|
20
20
|
hotkey?: string;
|
|
21
21
|
};
|
|
22
|
-
color?: 'info' | 'serious';
|
|
22
|
+
color?: 'info' | 'serious' | 'critical';
|
|
23
23
|
};
|
|
24
24
|
type MenuSectionProps<T> = Omit<MenuSectionProps$1<T>, 'className'> & {
|
|
25
25
|
classNames?: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const NoticeEventNamespace = "Notice";
|
|
2
|
+
declare const NoticeEventTypes: {
|
|
3
|
+
readonly queue: "Notice:queue";
|
|
4
|
+
readonly dequeue: "Notice:dequeue";
|
|
5
|
+
readonly actionPrimary: "Notice:action:primary";
|
|
6
|
+
readonly actionSecondary: "Notice:action:secondary";
|
|
7
|
+
readonly close: "Notice:close";
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { NoticeEventNamespace, NoticeEventTypes };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e="Notice",o={queue:`${e}:queue`,dequeue:`${e}:dequeue`,actionPrimary:`${e}:action:primary`,actionSecondary:`${e}:action:secondary`,close:`${e}:close`};export{e as NoticeEventNamespace,o as NoticeEventTypes};//# sourceMappingURL=events.js.map
|
|
2
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/notice/events.ts"],"names":["NoticeEventNamespace","NoticeEventTypes"],"mappings":"AAYO,MAAMA,CAAAA,CAAuB,SAEvBC,CAAAA,CAAmB,CAC9B,MAAO,CAAA,EAAGD,CAAoB,CAAA,MAAA,CAAA,CAC9B,OAAA,CAAS,CAAA,EAAGA,CAAoB,WAChC,aAAA,CAAe,CAAA,EAAGA,CAAoB,CAAA,eAAA,CAAA,CACtC,eAAA,CAAiB,CAAA,EAAGA,CAAoB,CAAA,iBAAA,CAAA,CACxC,KAAA,CAAO,CAAA,EAAGA,CAAoB,CAAA,MAAA,CAChC","file":"events.js","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\nexport const NoticeEventNamespace = 'Notice';\n\nexport const NoticeEventTypes = {\n queue: `${NoticeEventNamespace}:queue`,\n dequeue: `${NoticeEventNamespace}:dequeue`,\n actionPrimary: `${NoticeEventNamespace}:action:primary`,\n actionSecondary: `${NoticeEventNamespace}:action:secondary`,\n close: `${NoticeEventNamespace}:close`,\n} as const;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { NoticeProps } from './types.js';
|
|
3
|
+
import '@accelint/bus';
|
|
4
|
+
import '@accelint/core';
|
|
5
|
+
import 'react-aria-components';
|
|
6
|
+
import '../button/types.js';
|
|
7
|
+
import 'tailwind-variants';
|
|
8
|
+
import '../../lib/types.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
import '../button/styles.js';
|
|
11
|
+
import 'tailwind-merge';
|
|
12
|
+
import './events.js';
|
|
13
|
+
|
|
14
|
+
declare function Notice({ id, classNames, color, message, primary, secondary, hideIcon, showClose, shouldCloseOnAction, size, onPrimaryAction, onSecondaryAction, onClose, }: NoticeProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { Notice };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {Cancel}from'@accelint/icons';import'client-only';import {UNSTABLE_Toast,UNSTABLE_ToastContent,Text}from'react-aria-components';import {Button}from'../button/index.js';import {Icon}from'../icon/index.js';import {NoticeIcon}from'./notice-icon.js';import {NoticeStyles}from'./styles.js';const{notice:S,content:x,actions:E,message:L}=NoticeStyles(),c={normal:"mono-bold",advisory:"mono-bold",info:"mono-bold",serious:"serious",critical:"critical"};function q({id:f,classNames:n,color:t="info",message:m,primary:r,secondary:s,hideIcon:N,showClose:u,shouldCloseOnAction:p,size:i="medium",onPrimaryAction:d,onSecondaryAction:T,onClose:e}){return jsx(UNSTABLE_Toast,{className:S({className:n?.notice}),toast:{key:f,content:m,onClose:e},"data-color":t,"data-size":i,children:jsxs(UNSTABLE_ToastContent,{className:x({className:n?.content}),children:[!N&&i==="medium"&&jsx(NoticeIcon,{color:t,size:i}),jsx(Text,{slot:"description",className:L({className:n?.message}),children:m}),(r||s)&&jsxs("div",{className:E({className:n?.actions}),children:[r&&jsx(Button,{color:c[t],variant:"filled",...r,size:i,onPress:()=>{d?.(),p&&e?.();}}),s&&jsx(Button,{color:c[t],variant:"outline",...s,size:i,onPress:()=>{T?.(),p&&e?.();}})]}),u&&jsx(Button,{color:c[t],variant:"icon",onPress:e,children:jsx(Icon,{children:jsx(Cancel,{})})})]})})}export{q as Notice};//# sourceMappingURL=index.js.map
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/notice/index.tsx"],"names":["actions","description","ButtonColorMap","I","id","classNames","color","primary","size","onPrimaryAction","onClose","notice","ToastContent","content","jsx","o","C","P","secondary","l","Button","a","shouldCloseOnAction","onSecondaryAction","showClose","Icon","Cancel","y","B"],"mappings":"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","file":"index.js","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 { Cancel } from '@accelint/icons';\nimport 'client-only';\nimport {\n Text,\n UNSTABLE_Toast as Toast,\n UNSTABLE_ToastContent as ToastContent,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { NoticeIcon } from './notice-icon';\nimport { NoticeStyles } from './styles';\nimport type { ButtonProps } from '../button/types';\nimport type { NoticeColor, NoticeProps } from './types';\n\nconst { notice, content, actions, message: description } = NoticeStyles();\n\nconst ButtonColorMap: Record<NoticeColor, ButtonProps['color']> = {\n normal: 'mono-bold',\n advisory: 'mono-bold',\n info: 'mono-bold',\n serious: 'serious',\n critical: 'critical',\n};\n\nexport function Notice({\n id,\n classNames,\n color = 'info',\n message,\n primary,\n secondary,\n hideIcon,\n showClose,\n shouldCloseOnAction,\n size = 'medium',\n onPrimaryAction,\n onSecondaryAction,\n onClose,\n}: NoticeProps) {\n return (\n <Toast\n className={notice({ className: classNames?.notice })}\n toast={{ key: id, content: message, onClose }}\n data-color={color}\n data-size={size}\n >\n <ToastContent className={content({ className: classNames?.content })}>\n {!hideIcon && size === 'medium' && (\n <NoticeIcon color={color} size={size} />\n )}\n <Text\n slot='description'\n className={description({ className: classNames?.message })}\n >\n {message}\n </Text>\n {(primary || secondary) && (\n <div className={actions({ className: classNames?.actions })}>\n {primary && (\n <Button\n color={ButtonColorMap[color]}\n variant='filled'\n {...primary}\n size={size}\n onPress={() => {\n onPrimaryAction?.();\n\n if (shouldCloseOnAction) {\n onClose?.();\n }\n }}\n />\n )}\n {secondary && (\n <Button\n color={ButtonColorMap[color]}\n variant='outline'\n {...secondary}\n size={size}\n onPress={() => {\n onSecondaryAction?.();\n\n if (shouldCloseOnAction) {\n onClose?.();\n }\n }}\n />\n )}\n </div>\n )}\n {showClose && (\n <Button\n color={ButtonColorMap[color]}\n variant='icon'\n onPress={onClose}\n >\n <Icon>\n <Cancel />\n </Icon>\n </Button>\n )}\n </ToastContent>\n </Toast>\n );\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { NoticeListProps } from './types.js';
|
|
3
|
+
import '@accelint/bus';
|
|
4
|
+
import '@accelint/core';
|
|
5
|
+
import 'react-aria-components';
|
|
6
|
+
import '../button/types.js';
|
|
7
|
+
import 'tailwind-variants';
|
|
8
|
+
import '../../lib/types.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
import '../button/styles.js';
|
|
11
|
+
import 'tailwind-merge';
|
|
12
|
+
import './events.js';
|
|
13
|
+
|
|
14
|
+
declare function NoticeList({ id, classNames, defaultColor, defaultTimeout, hideClearAll, limit, global, placement, size, ...rest }: NoticeListProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { NoticeList };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useMemo,useState,useRef,useEffect,createElement}from'react';import {useBus}from'@accelint/bus/react';import {uuid}from'@accelint/core';import {useToastRegion}from'@react-aria/toast';import {useToastQueue}from'@react-stately/toast';import'client-only';import {UNSTABLE_ToastQueue,composeRenderProps,UNSTABLE_ToastList,UNSTABLE_ToastRegion,UNSTABLE_ToastStateContext}from'react-aria-components';import {Button}from'../button/index.js';import {Notice}from'.//index.js';import {NoticeEventTypes}from'./events.js';import {NoticeStyles}from'./styles.js';import {matchesMetadata}from'./utils.js';const{list:J,region:y}=NoticeStyles();function ae({id:s,classNames:t,defaultColor:T,defaultTimeout:v,hideClearAll:g,limit:u=3,global:E,placement:m,size:C="medium",...S}){const o=useMemo(()=>new UNSTABLE_ToastQueue({maxVisibleToasts:u}),[u]),A=useToastQueue(o),[L,P]=useState(false),l=useRef(null),{regionProps:q}=useToastRegion(S,o,l),{useEmit:c,useOn:d}=useBus(),h=c(NoticeEventTypes.actionPrimary),Q=c(NoticeEventTypes.actionSecondary),B=c(NoticeEventTypes.close);d(NoticeEventTypes.queue,e=>{(s&&e.payload.target===s||!s)&&o.add({...e.payload,id:e.payload.id||uuid(),color:T||e.payload.color},{timeout:v??e.payload.timeout});}),d(NoticeEventTypes.dequeue,e=>{const N=o.queue,r=N.filter(a=>matchesMetadata(e.payload,a.content));if(r.length&&r.length===N.length)o.clear();else for(const a of r)o.close(a.key);}),useEffect(()=>{o.subscribe(()=>{P(o.visibleToasts.length>0);});});const p=jsxs(Fragment,{children:[!g&&L&&jsx(Button,{className:composeRenderProps(t?.button,e=>e??""),variant:"outline",onPress:o.clear,children:"Clear All"}),jsx(UNSTABLE_ToastList,{className:composeRenderProps(t?.list,e=>J({className:e})),children:({toast:e})=>createElement(Notice,{...e.content,key:e.key,showClose:!(e.timeout&&e.content.primary&&e.content.secondary),classNames:t?.notice,size:C,onPrimaryAction:()=>h({id:e.content.id}),onSecondaryAction:()=>Q({id:e.content.id}),onClose:()=>{e.onClose?.(),o.close(e.key),B({id:e.content.id});}})})]});return E?jsx(UNSTABLE_ToastRegion,{className:y({className:t?.region}),"data-placement":m,queue:o,children:p}):jsx("div",{...q,className:y({className:t?.region}),"data-placement":m,ref:l,children:jsx(UNSTABLE_ToastStateContext.Provider,{value:A,children:p})})}export{ae as NoticeList};//# sourceMappingURL=list.js.map
|
|
4
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/notice/list.tsx"],"names":["NoticeList","id","classNames","defaultColor","defaultTimeout","hideClearAll","global","placement","size","rest","queue","useMemo","limit","_","useToastQueue","useRef","regionProps","useToastRegion","ref","useBus","k","emitActionPrimary","useEmit","NoticeEventTypes","useOn","data","i","uuid","b","dequeue","queuedNotices","toast","matchesMetadata","I","setHasNotices","U","hasNotices","jsx","Button","X","W","composeRenderProps","className","V","ToastList","list","n","M","f","K","F","ToastRegion","region","H","state","children","O"],"mappings":"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","file":"list.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport { useBus } from '@accelint/bus/react';\nimport { uuid } from '@accelint/core';\nimport { useToastRegion } from '@react-aria/toast';\nimport { useToastQueue } from '@react-stately/toast';\nimport 'client-only';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n composeRenderProps,\n type QueuedToast,\n UNSTABLE_ToastList as ToastList,\n UNSTABLE_ToastQueue as ToastQueue,\n UNSTABLE_ToastRegion as ToastRegion,\n UNSTABLE_ToastStateContext as ToastStateContext,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Notice } from './';\nimport { NoticeEventTypes } from './events';\nimport { NoticeStyles } from './styles';\nimport { matchesMetadata } from './utils';\nimport type {\n NoticeActionEvent,\n NoticeContent,\n NoticeDequeueEvent,\n NoticeListProps,\n NoticeQueueEvent,\n} from './types';\n\nconst { list, region } = NoticeStyles();\n\nexport function NoticeList({\n id,\n classNames,\n defaultColor,\n defaultTimeout,\n hideClearAll,\n limit = 3,\n global,\n placement,\n size = 'medium',\n ...rest\n}: NoticeListProps) {\n const queue = useMemo(\n () => new ToastQueue<NoticeContent>({ maxVisibleToasts: limit }),\n [limit],\n );\n const state = useToastQueue(queue);\n\n const [hasNotices, setHasNotices] = useState(false);\n const ref = useRef(null);\n const { regionProps } = useToastRegion(rest, queue, ref);\n\n const { useEmit, useOn } = useBus<\n NoticeQueueEvent | NoticeDequeueEvent | NoticeActionEvent\n >();\n const emitActionPrimary = useEmit(NoticeEventTypes.actionPrimary);\n const emitActionSecondary = useEmit(NoticeEventTypes.actionSecondary);\n const emitClose = useEmit(NoticeEventTypes.close);\n\n useOn(NoticeEventTypes.queue, (data) => {\n if ((id && data.payload.target === id) || !id) {\n queue.add(\n {\n ...data.payload,\n id: data.payload.id || uuid(),\n color: defaultColor || data.payload.color,\n },\n {\n timeout: defaultTimeout ?? data.payload.timeout,\n },\n );\n }\n });\n\n useOn(NoticeEventTypes.dequeue, (data) => {\n // @ts-expect-error : queue.queue exists, but is not currently documented\n const queuedNotices = queue.queue;\n\n const dequeue = queuedNotices.filter((toast: QueuedToast<NoticeContent>) =>\n matchesMetadata(data.payload, toast.content),\n );\n\n if (dequeue.length && dequeue.length === queuedNotices.length) {\n queue.clear();\n } else {\n for (const toast of dequeue) {\n queue.close(toast.key);\n }\n }\n });\n\n useEffect(() => {\n queue.subscribe(() => {\n setHasNotices(queue.visibleToasts.length > 0);\n });\n });\n\n const children = (\n <>\n {!hideClearAll && hasNotices && (\n <Button\n className={composeRenderProps(\n classNames?.button,\n (className) => className ?? '',\n )}\n variant='outline'\n onPress={queue.clear}\n >\n Clear All\n </Button>\n )}\n <ToastList\n className={composeRenderProps(classNames?.list, (className) =>\n list({ className }),\n )}\n >\n {({ toast }: { toast: QueuedToast<NoticeContent> }) => (\n <Notice\n {...toast.content}\n key={toast.key}\n showClose={\n !(\n toast.timeout &&\n toast.content.primary &&\n toast.content.secondary\n )\n }\n classNames={classNames?.notice}\n size={size}\n onPrimaryAction={() => emitActionPrimary({ id: toast.content.id })}\n onSecondaryAction={() =>\n emitActionSecondary({ id: toast.content.id })\n }\n onClose={() => {\n toast.onClose?.();\n queue.close(toast.key);\n emitClose({ id: toast.content.id });\n }}\n />\n )}\n </ToastList>\n </>\n );\n\n return global ? (\n <ToastRegion\n className={region({ className: classNames?.region })}\n data-placement={placement}\n queue={queue}\n >\n {children}\n </ToastRegion>\n ) : (\n <div\n {...regionProps}\n className={region({ className: classNames?.region })}\n data-placement={placement}\n ref={ref}\n >\n <ToastStateContext.Provider value={state}>\n {children}\n </ToastStateContext.Provider>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { NoticeIconProps } from './types.js';
|
|
3
|
+
import '@accelint/bus';
|
|
4
|
+
import '@accelint/core';
|
|
5
|
+
import 'react-aria-components';
|
|
6
|
+
import '../button/types.js';
|
|
7
|
+
import 'tailwind-variants';
|
|
8
|
+
import '../../lib/types.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
import '../button/styles.js';
|
|
11
|
+
import 'tailwind-merge';
|
|
12
|
+
import './events.js';
|
|
13
|
+
|
|
14
|
+
declare function NoticeIcon({ color, size }: NoticeIconProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { NoticeIcon };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import'client-only';import {Information,Success,Warning,Problem}from'@accelint/icons';import {Icon}from'../icon/index.js';function I({color:o="info",size:r}){return jsxs(Icon,{size:r==="small"?"medium":"large",children:[o==="info"&&jsx(Information,{}),o==="advisory"&&jsx(Information,{}),o==="normal"&&jsx(Success,{}),o==="serious"&&jsx(Warning,{}),o==="critical"&&jsx(Problem,{})]})}export{I as NoticeIcon};//# sourceMappingURL=notice-icon.js.map
|
|
2
|
+
//# sourceMappingURL=notice-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/notice/notice-icon.tsx"],"names":["color","jsxs","Icon","size","Information","n","jsx","t","m","i","e"],"mappings":"4KAmB6BA,CAAQ,CAAA,CAAA,KAAQ,SAC3C,CAAA,IAAA,CAAA,CACEC,EAACC,CAAAA,OAAWC,IAAAA,CAAAA,IAAAA,CAAS,CAAA,IAAA,CAAA,CAAA,GAAU,OAAW,CAAA,QACvC,CAAA,OAAA,CAAAH,QAAU,CAAA,CAAA,CAAA,GAAWI,MACrBJ,EAAAA,GAAAA,CAAUK,WAAA,CAAA,EAAA,CAAA,CAAA,CAAA,GAAA,UACVL,EAAAA,GAAAA,CAAUK,WAAA,CAAA,EAAA,CAAA,CAAA,CAAA,GAAYC,QACtBN,EAAAA,GAAAA,CAAUO,yBACVP,MAAUQ,OAAA,CAAA,EAAA,CAAA,CAAA,CAAA,GAAA,YAGjBC,GAAA,CAAAC,OAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA","file":"notice-icon.js","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 { Information, Problem, Success, Warning } from '@accelint/icons';\nimport { Icon } from '../icon';\nimport type { NoticeIconProps } from './types';\n\nexport function NoticeIcon({ color = 'info', size }: NoticeIconProps) {\n return (\n <Icon size={size === 'small' ? 'medium' : 'large'}>\n {color === 'info' && <Information />}\n {color === 'advisory' && <Information />}\n {color === 'normal' && <Success />}\n {color === 'serious' && <Warning />}\n {color === 'critical' && <Problem />}\n </Icon>\n );\n}\n"]}
|