@box/blueprint-web 5.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +379 -0
- package/README.md +191 -0
- package/THIRD_PARTY_LICENSES +2051 -0
- package/lib-esm/accordion/accordion.d.ts +20 -0
- package/lib-esm/accordion/accordion.js +112 -0
- package/lib-esm/accordion/accordion.module.js +4 -0
- package/lib-esm/accordion/index.d.ts +2 -0
- package/lib-esm/accordion/types.d.ts +43 -0
- package/lib-esm/actionable-inline-notice/actionable-inline-notice.d.ts +3 -0
- package/lib-esm/actionable-inline-notice/actionable-inline-notice.js +34 -0
- package/lib-esm/actionable-inline-notice/index.d.ts +60 -0
- package/lib-esm/actionable-inline-notice/index.js +9 -0
- package/lib-esm/actionable-inline-notice/types.d.ts +21 -0
- package/lib-esm/avatar/avatar.d.ts +109 -0
- package/lib-esm/avatar/avatar.js +127 -0
- package/lib-esm/avatar/avatar.module.js +4 -0
- package/lib-esm/avatar/consts.d.ts +5 -0
- package/lib-esm/avatar/consts.js +29 -0
- package/lib-esm/avatar/index.d.ts +2 -0
- package/lib-esm/avatar/types.d.ts +34 -0
- package/lib-esm/avatar/utils.d.ts +3 -0
- package/lib-esm/basics/button/button.d.ts +30 -0
- package/lib-esm/basics/button/button.js +23 -0
- package/lib-esm/basics/button/index.d.ts +2 -0
- package/lib-esm/basics/button/types.d.ts +8 -0
- package/lib-esm/basics/collapsible/collapsible-section.d.ts +15 -0
- package/lib-esm/basics/collapsible/collapsible-section.js +62 -0
- package/lib-esm/basics/collapsible/collapsible-section.module.js +4 -0
- package/lib-esm/basics/collapsible/index.d.ts +2 -0
- package/lib-esm/basics/collapsible/types.d.ts +12 -0
- package/lib-esm/basics/date-picker/date-picker.d.ts +5 -0
- package/lib-esm/basics/date-picker/date-picker.js +200 -0
- package/lib-esm/basics/date-picker/date-picker.module.js +4 -0
- package/lib-esm/basics/date-picker/index.d.ts +2 -0
- package/lib-esm/basics/date-picker/types.d.ts +32 -0
- package/lib-esm/basics/grid-list-item/grid-list.d.ts +3 -0
- package/lib-esm/basics/grid-list-item/grid-list.js +18 -0
- package/lib-esm/basics/grid-list-item/index.d.ts +74 -0
- package/lib-esm/basics/grid-list-item/index.js +73 -0
- package/lib-esm/basics/grid-list-item/types.d.ts +10 -0
- package/lib-esm/basics/large-list-item/index.d.ts +88 -0
- package/lib-esm/basics/large-list-item/index.js +87 -0
- package/lib-esm/basics/large-list-item/large-list-item-description.d.ts +4 -0
- package/lib-esm/basics/large-list-item/large-list-item-description.js +30 -0
- package/lib-esm/basics/large-list-item/large-list-item-snippet.d.ts +3 -0
- package/lib-esm/basics/large-list-item/large-list-item-snippet.js +36 -0
- package/lib-esm/basics/large-list-item/large-list.d.ts +3 -0
- package/lib-esm/basics/large-list-item/large-list.js +18 -0
- package/lib-esm/basics/large-list-item/types.d.ts +15 -0
- package/lib-esm/basics/navigation-menu/index.d.ts +16 -0
- package/lib-esm/basics/navigation-menu/index.js +17 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-content.d.ts +7 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-content.js +21 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-item.d.ts +13 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-item.js +52 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-link.d.ts +5 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-link.js +24 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-root.d.ts +10 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-root.js +19 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-separator.d.ts +2 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-separator.js +12 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-trigger.d.ts +7 -0
- package/lib-esm/basics/navigation-menu/navigation-menu-trigger.js +21 -0
- package/lib-esm/basics/navigation-menu/navigation-menu.module.js +4 -0
- package/lib-esm/basics/small-list-item/index.d.ts +47 -0
- package/lib-esm/basics/small-list-item/index.js +46 -0
- package/lib-esm/basics/small-list-item/small-list.d.ts +3 -0
- package/lib-esm/basics/small-list-item/small-list.js +18 -0
- package/lib-esm/basics/small-list-item/types.d.ts +6 -0
- package/lib-esm/basics/text-input/index.d.ts +2 -0
- package/lib-esm/basics/text-input/text-input.d.ts +48 -0
- package/lib-esm/basics/text-input/text-input.js +77 -0
- package/lib-esm/basics/text-input/text-input.module.js +4 -0
- package/lib-esm/basics/text-input/types.d.ts +23 -0
- package/lib-esm/branding-styles/branding-styles.d.ts +2 -0
- package/lib-esm/branding-styles/branding-styles.js +10 -0
- package/lib-esm/branding-styles/index.d.ts +3 -0
- package/lib-esm/branding-styles/types.d.ts +4 -0
- package/lib-esm/branding-styles/useCustomBranding.d.ts +1 -0
- package/lib-esm/branding-styles/useCustomBranding.js +40 -0
- package/lib-esm/branding-styles/utils/createTheme.d.ts +69 -0
- package/lib-esm/branding-styles/utils/createTheme.js +167 -0
- package/lib-esm/branding-styles/utils/theme.d.ts +41 -0
- package/lib-esm/branding-styles/utils/theme.js +48 -0
- package/lib-esm/branding-styles/utils/variables.d.ts +117 -0
- package/lib-esm/branding-styles/utils/variables.js +18 -0
- package/lib-esm/card/card.d.ts +6 -0
- package/lib-esm/card/card.js +24 -0
- package/lib-esm/card/card.module.js +4 -0
- package/lib-esm/card/index.d.ts +2 -0
- package/lib-esm/card/types.d.ts +10 -0
- package/lib-esm/card-tooltip/card-tooltip.d.ts +13 -0
- package/lib-esm/card-tooltip/card-tooltip.js +66 -0
- package/lib-esm/card-tooltip/card-tooltip.module.js +4 -0
- package/lib-esm/card-tooltip/index.d.ts +2 -0
- package/lib-esm/card-tooltip/types.d.ts +30 -0
- package/lib-esm/checkbox/checkbox-item.d.ts +6 -0
- package/lib-esm/checkbox/checkbox-item.js +78 -0
- package/lib-esm/checkbox/checkbox.module.js +4 -0
- package/lib-esm/checkbox/index.d.ts +8 -0
- package/lib-esm/checkbox/index.js +9 -0
- package/lib-esm/checkbox/types.d.ts +32 -0
- package/lib-esm/combobox/chips-group.d.ts +3 -0
- package/lib-esm/combobox/chips-group.js +100 -0
- package/lib-esm/combobox/chips-group.module.js +4 -0
- package/lib-esm/combobox/chips-group.types.d.ts +5 -0
- package/lib-esm/combobox/combobox.d.ts +14 -0
- package/lib-esm/combobox/combobox.js +422 -0
- package/lib-esm/combobox/combobox.module.js +4 -0
- package/lib-esm/combobox/index.d.ts +2 -0
- package/lib-esm/combobox/types.d.ts +206 -0
- package/lib-esm/content-card/content-card-body.d.ts +4 -0
- package/lib-esm/content-card/content-card-body.js +28 -0
- package/lib-esm/content-card/content-card-footer.d.ts +3 -0
- package/lib-esm/content-card/content-card-footer.js +17 -0
- package/lib-esm/content-card/content-card-image.d.ts +5 -0
- package/lib-esm/content-card/content-card-image.js +41 -0
- package/lib-esm/content-card/content-card-title.d.ts +4 -0
- package/lib-esm/content-card/content-card-title.js +28 -0
- package/lib-esm/content-card/content-card.d.ts +13 -0
- package/lib-esm/content-card/content-card.js +93 -0
- package/lib-esm/content-card/content-card.module.js +4 -0
- package/lib-esm/content-card/index.d.ts +2 -0
- package/lib-esm/content-card/types.d.ts +28 -0
- package/lib-esm/content-field/content-field.d.ts +5 -0
- package/lib-esm/content-field/content-field.js +93 -0
- package/lib-esm/content-field/content-field.module.js +4 -0
- package/lib-esm/content-field/index.d.ts +2 -0
- package/lib-esm/content-field/messages.d.ts +6 -0
- package/lib-esm/content-field/messages.js +8 -0
- package/lib-esm/content-field/types.d.ts +23 -0
- package/lib-esm/data-table/data-table-wrapper.d.ts +6 -0
- package/lib-esm/data-table/index.d.ts +1 -0
- package/lib-esm/empty-state/empty-state.d.ts +44 -0
- package/lib-esm/empty-state/empty-state.js +92 -0
- package/lib-esm/empty-state/empty-state.module.js +4 -0
- package/lib-esm/empty-state/index.d.ts +2 -0
- package/lib-esm/empty-state/types.d.ts +19 -0
- package/lib-esm/ghost/ghost.d.ts +27 -0
- package/lib-esm/ghost/ghost.js +37 -0
- package/lib-esm/ghost/ghost.module.js +4 -0
- package/lib-esm/ghost/index.d.ts +1 -0
- package/lib-esm/guided-tooltip/guided-tooltip-body.d.ts +11 -0
- package/lib-esm/guided-tooltip/guided-tooltip-body.js +49 -0
- package/lib-esm/guided-tooltip/guided-tooltip-footer.d.ts +71 -0
- package/lib-esm/guided-tooltip/guided-tooltip-footer.js +77 -0
- package/lib-esm/guided-tooltip/guided-tooltip-icon.d.ts +7 -0
- package/lib-esm/guided-tooltip/guided-tooltip-icon.js +22 -0
- package/lib-esm/guided-tooltip/guided-tooltip-illustration.d.ts +7 -0
- package/lib-esm/guided-tooltip/guided-tooltip-illustration.js +20 -0
- package/lib-esm/guided-tooltip/guided-tooltip-title.d.ts +6 -0
- package/lib-esm/guided-tooltip/guided-tooltip-title.js +36 -0
- package/lib-esm/guided-tooltip/guided-tooltip.d.ts +69 -0
- package/lib-esm/guided-tooltip/guided-tooltip.js +110 -0
- package/lib-esm/guided-tooltip/guided-tooltip.module.js +4 -0
- package/lib-esm/guided-tooltip/index.d.ts +3 -0
- package/lib-esm/guided-tooltip/types.d.ts +98 -0
- package/lib-esm/guided-tooltip/utils/guided-tooltip-context.d.ts +11 -0
- package/lib-esm/guided-tooltip/utils/guided-tooltip-context.js +12 -0
- package/lib-esm/index.css +5328 -0
- package/lib-esm/index.d.ts +55 -0
- package/lib-esm/index.js +62 -0
- package/lib-esm/inline-notice/inline-notice.d.ts +17 -0
- package/lib-esm/inline-notice/inline-notice.js +64 -0
- package/lib-esm/inline-table/index.d.ts +2 -0
- package/lib-esm/inline-table/inline-table.d.ts +10 -0
- package/lib-esm/inline-table/inline-table.js +53 -0
- package/lib-esm/inline-table/inline-table.module.js +4 -0
- package/lib-esm/inline-table/types.d.ts +14 -0
- package/lib-esm/input-chip/index.d.ts +2 -0
- package/lib-esm/input-chip/input-chip.d.ts +4 -0
- package/lib-esm/input-chip/input-chip.js +58 -0
- package/lib-esm/input-chip/input-chip.module.js +4 -0
- package/lib-esm/input-chip/types.d.ts +21 -0
- package/lib-esm/list-item/cell/action-cell.d.ts +13 -0
- package/lib-esm/list-item/cell/action-cell.js +49 -0
- package/lib-esm/list-item/cell/cell.d.ts +10 -0
- package/lib-esm/list-item/cell/cell.js +30 -0
- package/lib-esm/list-item/drop-indicator.d.ts +3 -0
- package/lib-esm/list-item/drop-indicator.js +19 -0
- package/lib-esm/list-item/drop-indicator.module.js +4 -0
- package/lib-esm/list-item/index.d.ts +25 -0
- package/lib-esm/list-item/list-item.d.ts +25 -0
- package/lib-esm/list-item/list-item.js +19 -0
- package/lib-esm/list-item/main.module.js +4 -0
- package/lib-esm/list-item/row.d.ts +12 -0
- package/lib-esm/list-item/row.js +32 -0
- package/lib-esm/list-item/table-body.d.ts +16 -0
- package/lib-esm/list-item/table-body.js +26 -0
- package/lib-esm/list-item/table-column.d.ts +14 -0
- package/lib-esm/list-item/table-column.js +78 -0
- package/lib-esm/list-item/table-header.d.ts +12 -0
- package/lib-esm/list-item/table-header.js +30 -0
- package/lib-esm/list-item/table.d.ts +8 -0
- package/lib-esm/list-item/table.js +30 -0
- package/lib-esm/loading-indicator/loading-indicator.d.ts +16 -0
- package/lib-esm/loading-indicator/loading-indicator.js +29 -0
- package/lib-esm/loading-indicator/loading-indicator.module.js +4 -0
- package/lib-esm/modal/index.d.ts +2 -0
- package/lib-esm/modal/modal-body.d.ts +7 -0
- package/lib-esm/modal/modal-body.js +20 -0
- package/lib-esm/modal/modal-close.d.ts +7 -0
- package/lib-esm/modal/modal-close.js +47 -0
- package/lib-esm/modal/modal-content.d.ts +7 -0
- package/lib-esm/modal/modal-content.js +28 -0
- package/lib-esm/modal/modal-footer.d.ts +65 -0
- package/lib-esm/modal/modal-footer.js +54 -0
- package/lib-esm/modal/modal-header.d.ts +7 -0
- package/lib-esm/modal/modal-header.js +42 -0
- package/lib-esm/modal/modal-scrollable-container.d.ts +8 -0
- package/lib-esm/modal/modal-scrollable-container.js +21 -0
- package/lib-esm/modal/modal-title.d.ts +7 -0
- package/lib-esm/modal/modal-title.js +29 -0
- package/lib-esm/modal/modal-trigger.d.ts +7 -0
- package/lib-esm/modal/modal-trigger.js +18 -0
- package/lib-esm/modal/modal.d.ts +93 -0
- package/lib-esm/modal/modal.js +55 -0
- package/lib-esm/modal/modal.module.js +4 -0
- package/lib-esm/modal/types.d.ts +48 -0
- package/lib-esm/primitives/base-button/base-button-context.d.ts +4 -0
- package/lib-esm/primitives/base-button/base-button-context.js +10 -0
- package/lib-esm/primitives/base-button/base-button-icon.d.ts +7 -0
- package/lib-esm/primitives/base-button/base-button-icon.js +47 -0
- package/lib-esm/primitives/base-button/base-button-label.d.ts +6 -0
- package/lib-esm/primitives/base-button/base-button-label.js +17 -0
- package/lib-esm/primitives/base-button/base-button.d.ts +24 -0
- package/lib-esm/primitives/base-button/base-button.js +58 -0
- package/lib-esm/primitives/base-button/base-button.module.js +4 -0
- package/lib-esm/primitives/base-button/index.d.ts +36 -0
- package/lib-esm/primitives/base-button/index.js +10 -0
- package/lib-esm/primitives/base-button/types.d.ts +28 -0
- package/lib-esm/primitives/base-button/utils.d.ts +8 -0
- package/lib-esm/primitives/base-button/utils.js +28 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-actions.d.ts +116 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-actions.js +55 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-content-container.d.ts +8 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-content-container.js +21 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-content.d.ts +7 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-content.js +49 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-icon.d.ts +7 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-icon.js +30 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice.d.ts +4 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice.js +21 -0
- package/lib-esm/primitives/base-inline-notice/base-inline-notice.module.js +4 -0
- package/lib-esm/primitives/base-inline-notice/index.d.ts +73 -0
- package/lib-esm/primitives/base-inline-notice/index.js +14 -0
- package/lib-esm/primitives/base-inline-notice/types.d.ts +39 -0
- package/lib-esm/primitives/calendar/calendar.d.ts +3 -0
- package/lib-esm/primitives/calendar/calendar.js +67 -0
- package/lib-esm/primitives/calendar/calendar.module.js +4 -0
- package/lib-esm/primitives/calendar/index.d.ts +3 -0
- package/lib-esm/primitives/calendar/parse-date.util.d.ts +7 -0
- package/lib-esm/primitives/calendar/parse-date.util.js +10 -0
- package/lib-esm/primitives/calendar/types.d.ts +17 -0
- package/lib-esm/primitives/chips/chip-dropdown-indicator.d.ts +2 -0
- package/lib-esm/primitives/chips/chip-dropdown-indicator.js +15 -0
- package/lib-esm/primitives/chips/chip-icon.d.ts +3 -0
- package/lib-esm/primitives/chips/chip-icon.js +18 -0
- package/lib-esm/primitives/chips/chip-label.d.ts +4 -0
- package/lib-esm/primitives/chips/chip-label.js +21 -0
- package/lib-esm/primitives/chips/chip-status.d.ts +4 -0
- package/lib-esm/primitives/chips/chip-status.js +20 -0
- package/lib-esm/primitives/chips/chip.d.ts +3 -0
- package/lib-esm/primitives/chips/chip.js +21 -0
- package/lib-esm/primitives/chips/chip.module.js +4 -0
- package/lib-esm/primitives/chips/chips-group.d.ts +7 -0
- package/lib-esm/primitives/chips/chips-group.js +22 -0
- package/lib-esm/primitives/chips/filter-chip/filter-chip-button.d.ts +8 -0
- package/lib-esm/primitives/chips/filter-chip/filter-chip-button.js +30 -0
- package/lib-esm/primitives/chips/filter-chip/filter-chip-group-context.d.ts +11 -0
- package/lib-esm/primitives/chips/filter-chip/filter-chip-group-context.js +9 -0
- package/lib-esm/primitives/chips/filter-chip/filter-chip.d.ts +18 -0
- package/lib-esm/primitives/chips/filter-chip/filter-chip.js +85 -0
- package/lib-esm/primitives/chips/filter-chip/filter-combo-chip.d.ts +27 -0
- package/lib-esm/primitives/chips/filter-chip/filter-combo-chip.js +84 -0
- package/lib-esm/primitives/chips/filter-chip/filter-trigger-chip.d.ts +16 -0
- package/lib-esm/primitives/chips/filter-chip/filter-trigger-chip.js +37 -0
- package/lib-esm/primitives/chips/filter-chip/index.d.ts +27 -0
- package/lib-esm/primitives/chips/filter-chip/index.js +23 -0
- package/lib-esm/primitives/chips/types.d.ts +23 -0
- package/lib-esm/primitives/context-menu/context-menu-item.d.ts +17 -0
- package/lib-esm/primitives/context-menu/context-menu-item.js +40 -0
- package/lib-esm/primitives/context-menu/context-menu-items-separator.d.ts +5 -0
- package/lib-esm/primitives/context-menu/context-menu-items-separator.js +16 -0
- package/lib-esm/primitives/context-menu/context-menu-menu-content.d.ts +11 -0
- package/lib-esm/primitives/context-menu/context-menu-menu-content.js +29 -0
- package/lib-esm/primitives/context-menu/context-menu-menu-root.d.ts +8 -0
- package/lib-esm/primitives/context-menu/context-menu-menu-root.js +19 -0
- package/lib-esm/primitives/context-menu/context-menu-menu-trigger.d.ts +8 -0
- package/lib-esm/primitives/context-menu/context-menu-menu-trigger.js +21 -0
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-content.d.ts +12 -0
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-content.js +34 -0
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-root.d.ts +11 -0
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-root.js +20 -0
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-trigger.d.ts +18 -0
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-trigger.js +39 -0
- package/lib-esm/primitives/context-menu/context-menu.module.js +4 -0
- package/lib-esm/primitives/context-menu/index.d.ts +27 -0
- package/lib-esm/primitives/context-menu/index.js +21 -0
- package/lib-esm/primitives/date-i18n-provider/date-i18n-provider.d.ts +15 -0
- package/lib-esm/primitives/date-i18n-provider/date-i18n-provider.js +17 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-checkbox-item.d.ts +8 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-checkbox-item.js +42 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-content.d.ts +12 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-content.js +35 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-item.d.ts +7 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-item.js +29 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-group.d.ts +8 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-group.js +17 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-select-item.d.ts +8 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-select-item.js +43 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-root.d.ts +10 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-root.js +19 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-separator.d.ts +5 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-separator.js +17 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-content.d.ts +12 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-content.js +34 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-root.d.ts +11 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-root.js +20 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-trigger.d.ts +17 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-trigger.js +38 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-trigger.d.ts +8 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-trigger.js +23 -0
- package/lib-esm/primitives/dropdown-menu/dropdown-menu.module.js +4 -0
- package/lib-esm/primitives/dropdown-menu/index.d.ts +29 -0
- package/lib-esm/primitives/dropdown-menu/index.js +27 -0
- package/lib-esm/primitives/icon-button/icon-button.d.ts +4 -0
- package/lib-esm/primitives/icon-button/icon-button.js +30 -0
- package/lib-esm/primitives/icon-button/icon-button.module.js +4 -0
- package/lib-esm/primitives/icon-button/index.d.ts +2 -0
- package/lib-esm/primitives/icon-button/types.d.ts +9 -0
- package/lib-esm/primitives/icon-button/utils.d.ts +3 -0
- package/lib-esm/primitives/icon-button/utils.js +9 -0
- package/lib-esm/primitives/inline-error/inline-error.d.ts +4 -0
- package/lib-esm/primitives/inline-error/inline-error.js +33 -0
- package/lib-esm/primitives/inline-error/inline-error.module.js +4 -0
- package/lib-esm/primitives/inline-error/types.d.ts +5 -0
- package/lib-esm/primitives/link/index.d.ts +2 -0
- package/lib-esm/primitives/link/link.d.ts +3 -0
- package/lib-esm/primitives/link/link.js +25 -0
- package/lib-esm/primitives/link/link.module.js +4 -0
- package/lib-esm/primitives/link/types.d.ts +21 -0
- package/lib-esm/primitives/notification/index.d.ts +12 -0
- package/lib-esm/primitives/notification/index.js +12 -0
- package/lib-esm/primitives/notification/notification-button.d.ts +9 -0
- package/lib-esm/primitives/notification/notification-button.js +23 -0
- package/lib-esm/primitives/notification/notification-provider.d.ts +37 -0
- package/lib-esm/primitives/notification/notification-provider.js +94 -0
- package/lib-esm/primitives/notification/notification.module.js +4 -0
- package/lib-esm/primitives/notification/notification.viewport.d.ts +9 -0
- package/lib-esm/primitives/notification/notification.viewport.js +35 -0
- package/lib-esm/primitives/notification/private-notification-element.d.ts +33 -0
- package/lib-esm/primitives/notification/private-notification-element.js +91 -0
- package/lib-esm/primitives/page-header/index.d.ts +2 -0
- package/lib-esm/primitives/page-header/page-header.d.ts +12 -0
- package/lib-esm/primitives/page-header/page-header.js +73 -0
- package/lib-esm/primitives/page-header/page-header.module.js +4 -0
- package/lib-esm/primitives/page-header/types.d.ts +8 -0
- package/lib-esm/primitives/popover/index.d.ts +18 -0
- package/lib-esm/primitives/popover/index.js +17 -0
- package/lib-esm/primitives/popover/popover-close.d.ts +8 -0
- package/lib-esm/primitives/popover/popover-close.js +23 -0
- package/lib-esm/primitives/popover/popover-content-container.d.ts +12 -0
- package/lib-esm/primitives/popover/popover-content-container.js +46 -0
- package/lib-esm/primitives/popover/popover-footer.d.ts +7 -0
- package/lib-esm/primitives/popover/popover-footer.js +30 -0
- package/lib-esm/primitives/popover/popover-main-content.d.ts +7 -0
- package/lib-esm/primitives/popover/popover-main-content.js +45 -0
- package/lib-esm/primitives/popover/popover-overflow-context.d.ts +6 -0
- package/lib-esm/primitives/popover/popover-overflow-context.js +8 -0
- package/lib-esm/primitives/popover/popover-root.d.ts +10 -0
- package/lib-esm/primitives/popover/popover-root.js +20 -0
- package/lib-esm/primitives/popover/popover-trigger.d.ts +9 -0
- package/lib-esm/primitives/popover/popover-trigger.js +24 -0
- package/lib-esm/primitives/popover/popover.module.js +4 -0
- package/lib-esm/primitives/select-menu-grid/index.d.ts +12 -0
- package/lib-esm/primitives/select-menu-grid/index.js +11 -0
- package/lib-esm/primitives/select-menu-grid/select-menu-grid-option.d.ts +343 -0
- package/lib-esm/primitives/select-menu-grid/select-menu-grid-option.js +100 -0
- package/lib-esm/primitives/select-menu-grid/select-menu-grid-option.module.js +4 -0
- package/lib-esm/primitives/select-menu-grid/select-menu-grid.d.ts +5 -0
- package/lib-esm/primitives/select-menu-grid/select-menu-grid.js +31 -0
- package/lib-esm/primitives/select-menu-grid/select-menu-grid.module.js +4 -0
- package/lib-esm/primitives/select-menu-grid/types.d.ts +35 -0
- package/lib-esm/primitives/slot.d.ts +5 -0
- package/lib-esm/primitives/slot.js +4 -0
- package/lib-esm/primitives/supplementary-fonts/get-supplementary-font-faces-config.d.ts +5 -0
- package/lib-esm/primitives/supplementary-fonts/get-supplementary-font-faces-config.js +17 -0
- package/lib-esm/primitives/supplementary-fonts/index.d.ts +4 -0
- package/lib-esm/primitives/supplementary-fonts/supplementary-fonts.d.ts +6 -0
- package/lib-esm/primitives/supplementary-fonts/supplementary-fonts.js +12 -0
- package/lib-esm/primitives/supplementary-fonts/types.d.ts +2 -0
- package/lib-esm/primitives/supplementary-fonts/useSupplementaryFonts.hook.d.ts +2 -0
- package/lib-esm/primitives/supplementary-fonts/useSupplementaryFonts.hook.js +36 -0
- package/lib-esm/primitives/tabs/index.d.ts +27 -0
- package/lib-esm/primitives/tabs/index.js +22 -0
- package/lib-esm/primitives/tabs/tab-list.d.ts +4 -0
- package/lib-esm/primitives/tabs/tab-list.js +27 -0
- package/lib-esm/primitives/tabs/tab-panel.d.ts +4 -0
- package/lib-esm/primitives/tabs/tab-panel.js +23 -0
- package/lib-esm/primitives/tabs/tab.d.ts +11 -0
- package/lib-esm/primitives/tabs/tab.js +58 -0
- package/lib-esm/primitives/tabs/tabs.d.ts +6 -0
- package/lib-esm/primitives/tabs/tabs.js +15 -0
- package/lib-esm/primitives/tabs/tabs.module.js +4 -0
- package/lib-esm/primitives/tabs/use-tabs.d.ts +1 -0
- package/lib-esm/primitives/tabs/use-tabs.js +7 -0
- package/lib-esm/primitives/utility/AreaIndicator.d.ts +7 -0
- package/lib-esm/radio-group/index.d.ts +9 -0
- package/lib-esm/radio-group/index.js +11 -0
- package/lib-esm/radio-group/radio-group.d.ts +4 -0
- package/lib-esm/radio-group/radio-group.js +35 -0
- package/lib-esm/radio-group/radio-group.module.js +4 -0
- package/lib-esm/radio-group/radio-item.d.ts +4 -0
- package/lib-esm/radio-group/radio-item.js +50 -0
- package/lib-esm/radio-group/types.d.ts +13 -0
- package/lib-esm/search-input/index.d.ts +22 -0
- package/lib-esm/search-input/index.js +11 -0
- package/lib-esm/search-input/search-input-action-button.d.ts +2 -0
- package/lib-esm/search-input/search-input-action-button.js +26 -0
- package/lib-esm/search-input/search-input.d.ts +16 -0
- package/lib-esm/search-input/search-input.js +95 -0
- package/lib-esm/search-input/search.module.js +4 -0
- package/lib-esm/search-input/types.d.ts +53 -0
- package/lib-esm/select/index.d.ts +2 -0
- package/lib-esm/select/select.d.ts +68 -0
- package/lib-esm/select/select.js +187 -0
- package/lib-esm/select/select.module.js +4 -0
- package/lib-esm/select/types.d.ts +105 -0
- package/lib-esm/side-panel/index.d.ts +2 -0
- package/lib-esm/side-panel/scroll-context.d.ts +11 -0
- package/lib-esm/side-panel/scroll-context.js +43 -0
- package/lib-esm/side-panel/side-panel-close.d.ts +7 -0
- package/lib-esm/side-panel/side-panel-close.js +26 -0
- package/lib-esm/side-panel/side-panel-content.d.ts +13 -0
- package/lib-esm/side-panel/side-panel-content.js +41 -0
- package/lib-esm/side-panel/side-panel-footer.d.ts +65 -0
- package/lib-esm/side-panel/side-panel-footer.js +62 -0
- package/lib-esm/side-panel/side-panel-header.d.ts +7 -0
- package/lib-esm/side-panel/side-panel-header.js +62 -0
- package/lib-esm/side-panel/side-panel-overlay.d.ts +8 -0
- package/lib-esm/side-panel/side-panel-overlay.js +31 -0
- package/lib-esm/side-panel/side-panel-scrollable-container.d.ts +8 -0
- package/lib-esm/side-panel/side-panel-scrollable-container.js +42 -0
- package/lib-esm/side-panel/side-panel.d.ts +70 -0
- package/lib-esm/side-panel/side-panel.js +52 -0
- package/lib-esm/side-panel/side-panel.module.js +4 -0
- package/lib-esm/side-panel/types.d.ts +38 -0
- package/lib-esm/side-panel/variant-context.d.ts +6 -0
- package/lib-esm/side-panel/variant-context.js +22 -0
- package/lib-esm/slider/index.d.ts +2 -0
- package/lib-esm/slider/slider-incrementer.d.ts +6 -0
- package/lib-esm/slider/slider-incrementer.js +57 -0
- package/lib-esm/slider/slider-incrementer.module.js +4 -0
- package/lib-esm/slider/slider-range.d.ts +6 -0
- package/lib-esm/slider/slider-range.js +65 -0
- package/lib-esm/slider/slider-range.module.js +4 -0
- package/lib-esm/slider/slider.d.ts +5 -0
- package/lib-esm/slider/slider.js +51 -0
- package/lib-esm/slider/slider.module.js +4 -0
- package/lib-esm/slider/types.d.ts +181 -0
- package/lib-esm/status/consts.d.ts +4 -0
- package/lib-esm/status/consts.js +25 -0
- package/lib-esm/status/index.d.ts +2 -0
- package/lib-esm/status/status.d.ts +3 -0
- package/lib-esm/status/status.js +82 -0
- package/lib-esm/status/status.module.js +4 -0
- package/lib-esm/status/types.d.ts +31 -0
- package/lib-esm/switch/index.d.ts +9 -0
- package/lib-esm/switch/index.js +9 -0
- package/lib-esm/switch/switch-item.d.ts +5 -0
- package/lib-esm/switch/switch-item.js +71 -0
- package/lib-esm/switch/switch-legend.d.ts +4 -0
- package/lib-esm/switch/switch-legend.js +11 -0
- package/lib-esm/switch/switch.module.js +4 -0
- package/lib-esm/switch/types.d.ts +32 -0
- package/lib-esm/text/index.d.ts +2 -0
- package/lib-esm/text/text.d.ts +4 -0
- package/lib-esm/text/text.js +21 -0
- package/lib-esm/text/text.module.js +4 -0
- package/lib-esm/text/types.d.ts +34 -0
- package/lib-esm/text-area/index.d.ts +2 -0
- package/lib-esm/text-area/text-area-autosize/text-area-autosize.d.ts +10 -0
- package/lib-esm/text-area/text-area-autosize/text-area-autosize.js +322 -0
- package/lib-esm/text-area/text-area-autosize/text-area-autosize.module.js +4 -0
- package/lib-esm/text-area/text-area-autosize/types.d.ts +21 -0
- package/lib-esm/text-area/text-area.d.ts +36 -0
- package/lib-esm/text-area/text-area.js +57 -0
- package/lib-esm/text-area/text-area.module.js +4 -0
- package/lib-esm/text-area/types.d.ts +22 -0
- package/lib-esm/text-button/index.d.ts +2 -0
- package/lib-esm/text-button/text-button.d.ts +24 -0
- package/lib-esm/text-button/text-button.js +54 -0
- package/lib-esm/text-button/text-button.module.js +4 -0
- package/lib-esm/text-button/types.d.ts +25 -0
- package/lib-esm/tooltip/index.d.ts +2 -0
- package/lib-esm/tooltip/tooltip.d.ts +16 -0
- package/lib-esm/tooltip/tooltip.js +128 -0
- package/lib-esm/tooltip/tooltip.module.js +4 -0
- package/lib-esm/tooltip/types.d.ts +41 -0
- package/lib-esm/trigger-button/index.d.ts +1 -0
- package/lib-esm/trigger-button/trigger-button.d.ts +50 -0
- package/lib-esm/trigger-button/trigger-button.js +41 -0
- package/lib-esm/types/modify.d.ts +1 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-actions.d.ts +4 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-actions.js +132 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-header.d.ts +3 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-header.js +57 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-subtitle.d.ts +4 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-subtitle.js +58 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-thumbnail.d.ts +4 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item-thumbnail.js +30 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item.d.ts +4 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item.js +70 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item.module.js +4 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list.d.ts +6 -0
- package/lib-esm/util-components/base-grid-list-item/base-grid-list.js +62 -0
- package/lib-esm/util-components/base-grid-list-item/index.d.ts +41 -0
- package/lib-esm/util-components/base-grid-list-item/index.js +42 -0
- package/lib-esm/util-components/base-grid-list-item/types.d.ts +32 -0
- package/lib-esm/util-components/base-grid-list-item/utils/rac-button.d.ts +12 -0
- package/lib-esm/util-components/base-grid-list-item/utils/rac-button.js +34 -0
- package/lib-esm/util-components/base-grid-list-item/utils/rac-tooltip.d.ts +7 -0
- package/lib-esm/util-components/base-grid-list-item/utils/rac-tooltip.js +30 -0
- package/lib-esm/util-components/focus-trap/focus-trap.d.ts +3 -0
- package/lib-esm/util-components/focus-trap/index.d.ts +1 -0
- package/lib-esm/util-components/focus-trap/types.d.ts +8 -0
- package/lib-esm/util-components/interactive-icon/index.d.ts +1 -0
- package/lib-esm/util-components/interactive-icon/interactive-icon.d.ts +4 -0
- package/lib-esm/util-components/interactive-icon/interactive-icon.js +24 -0
- package/lib-esm/util-components/interactive-icon/interactive-icon.module.js +4 -0
- package/lib-esm/util-components/interactive-icon/types.d.ts +9 -0
- package/lib-esm/util-components/legend/index.d.ts +1 -0
- package/lib-esm/util-components/legend/legend.d.ts +4 -0
- package/lib-esm/util-components/legend/legend.js +31 -0
- package/lib-esm/util-components/legend/legend.module.js +4 -0
- package/lib-esm/util-components/legend/types.d.ts +18 -0
- package/lib-esm/util-components/list-checkbox/index.d.ts +1 -0
- package/lib-esm/util-components/list-checkbox/list-checkbox.d.ts +10 -0
- package/lib-esm/util-components/list-checkbox/list-checkbox.js +36 -0
- package/lib-esm/util-components/list-checkbox/list-checkbox.module.js +4 -0
- package/lib-esm/util-components/menu-item-sections/menu-item-sections.d.ts +19 -0
- package/lib-esm/util-components/menu-item-sections/menu-item-sections.js +43 -0
- package/lib-esm/util-components/menu-item-sections/menu-item-sections.module.js +4 -0
- package/lib-esm/util-components/scrollable-container/scrollable-container.d.ts +30 -0
- package/lib-esm/util-components/scrollable-container/scrollable-container.js +65 -0
- package/lib-esm/util-components/scrollable-container/scrollable-container.module.js +4 -0
- package/lib-esm/util-components/search-term-string/index.d.ts +1 -0
- package/lib-esm/util-components/search-term-string/search-term-string.d.ts +5 -0
- package/lib-esm/util-components/search-term-string/search-term-string.js +41 -0
- package/lib-esm/util-components/search-term-string/search-term-string.module.js +4 -0
- package/lib-esm/util-components/search-term-string/types.d.ts +4 -0
- package/lib-esm/util-components/text-with-info-badge/index.d.ts +1 -0
- package/lib-esm/util-components/text-with-info-badge/text-with-info-badge.d.ts +4 -0
- package/lib-esm/util-components/text-with-info-badge/text-with-info-badge.js +36 -0
- package/lib-esm/util-components/text-with-info-badge/text-with-info-badge.module.js +4 -0
- package/lib-esm/util-components/text-with-info-badge/types.d.ts +15 -0
- package/lib-esm/utils/DocsStoryHeightDecorator.d.ts +14 -0
- package/lib-esm/utils/VariantsAggregator.d.ts +15 -0
- package/lib-esm/utils/a11yExceptionsConfig.d.ts +65 -0
- package/lib-esm/utils/commonTypes.d.ts +2 -0
- package/lib-esm/utils/debounce.d.ts +4 -0
- package/lib-esm/utils/debounce.js +13 -0
- package/lib-esm/utils/getButtonOptions.d.ts +7 -0
- package/lib-esm/utils/getButtonOptions.js +15 -0
- package/lib-esm/utils/isDefined.d.ts +1 -0
- package/lib-esm/utils/isDefined.js +8 -0
- package/lib-esm/utils/keyboardUtils.d.ts +5 -0
- package/lib-esm/utils/keyboardUtils.js +14 -0
- package/lib-esm/utils/ownerWindow.d.ts +1 -0
- package/lib-esm/utils/ownerWindow.js +9 -0
- package/lib-esm/utils/processString.d.ts +13 -0
- package/lib-esm/utils/processString.js +27 -0
- package/lib-esm/utils/switchCase.d.ts +1 -0
- package/lib-esm/utils/switchCase.js +5 -0
- package/lib-esm/utils/testStories.utils.d.ts +99 -0
- package/lib-esm/utils/unstableStorybookMessage.utils.d.ts +1 -0
- package/lib-esm/utils/use-debounce.d.ts +1 -0
- package/lib-esm/utils/use-debounce.js +14 -0
- package/lib-esm/utils/useBreakpoint.d.ts +16 -0
- package/lib-esm/utils/useBreakpoint.js +42 -0
- package/lib-esm/utils/useEnhancedEffect.d.ts +7 -0
- package/lib-esm/utils/useEnhancedEffect.js +10 -0
- package/lib-esm/utils/useForkRef.d.ts +12 -0
- package/lib-esm/utils/useForkRef.js +39 -0
- package/lib-esm/utils/useFullTextTooltip.d.ts +15 -0
- package/lib-esm/utils/useFullTextTooltip.js +28 -0
- package/lib-esm/utils/useIsTriggerInteractive.d.ts +5 -0
- package/lib-esm/utils/useIsTriggerInteractive.js +21 -0
- package/lib-esm/utils/useMobile.d.ts +1 -0
- package/lib-esm/utils/useMobile.js +14 -0
- package/lib-esm/utils/useNamedSlots.hook.d.ts +2 -0
- package/lib-esm/utils/useNamedSlots.hook.js +10 -0
- package/lib-esm/utils/useScreenSize.d.ts +4 -0
- package/lib-esm/utils/useScreenSize.js +23 -0
- package/lib-esm/utils/useSubMenuFocus.hook.d.ts +2 -0
- package/lib-esm/utils/useSubMenuFocus.hook.js +39 -0
- package/lib-esm/utils/useUniqueId.d.ts +2 -0
- package/lib-esm/utils/useUniqueId.js +8 -0
- package/lib-esm/utils/waitForAnimation.d.ts +13 -0
- package/package.json +83 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Ghost } from '../../ghost/ghost.js';
|
|
5
|
+
import { useBaseGridListItemContext } from './base-grid-list-item.js';
|
|
6
|
+
import styles from './base-grid-list-item.module.js';
|
|
7
|
+
|
|
8
|
+
const BaseGridListThumbnail = /*#__PURE__*/forwardRef(function BaseGridListThumbnail(props, forwardedRef) {
|
|
9
|
+
const {
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
...rest
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
loading
|
|
16
|
+
} = useBaseGridListItemContext();
|
|
17
|
+
return jsx("div", {
|
|
18
|
+
...rest,
|
|
19
|
+
ref: forwardedRef,
|
|
20
|
+
className: clsx(styles.thumbnail, {
|
|
21
|
+
[styles.loading]: loading
|
|
22
|
+
}, className),
|
|
23
|
+
children: loading ? jsx(Ghost, {
|
|
24
|
+
borderRadius: "0.5rem",
|
|
25
|
+
height: "100%"
|
|
26
|
+
}) : children
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export { BaseGridListThumbnail };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type BaseGridListItemContextType } from './types';
|
|
3
|
+
export declare const useBaseGridListItemContext: () => BaseGridListItemContextType;
|
|
4
|
+
export declare const BaseGridListItem: import("react").ForwardRefExoticComponent<import("react-aria-components").ItemProps<object> & Omit<BaseGridListItemContextType, "isItemInteracted" | "setIsItemInteracted"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import noop from 'lodash/noop';
|
|
4
|
+
import { forwardRef, useState, useMemo, createContext, useContext } from 'react';
|
|
5
|
+
import { Item } from 'react-aria-components';
|
|
6
|
+
import { useDebounce } from '../../utils/use-debounce.js';
|
|
7
|
+
import { useBaseGridListContext } from './base-grid-list.js';
|
|
8
|
+
import styles from './base-grid-list-item.module.js';
|
|
9
|
+
|
|
10
|
+
const BaseGridListItemContext = /*#__PURE__*/createContext({
|
|
11
|
+
loading: false,
|
|
12
|
+
pinned: false,
|
|
13
|
+
pinAriaLabel: undefined,
|
|
14
|
+
setIsItemInteracted: noop,
|
|
15
|
+
isItemInteracted: false
|
|
16
|
+
});
|
|
17
|
+
const useBaseGridListItemContext = () => {
|
|
18
|
+
return useContext(BaseGridListItemContext);
|
|
19
|
+
};
|
|
20
|
+
const BaseGridListItem = /*#__PURE__*/forwardRef(function BaseGridListItem(props, forwardedRef) {
|
|
21
|
+
const {
|
|
22
|
+
children,
|
|
23
|
+
className,
|
|
24
|
+
loading = false,
|
|
25
|
+
pinned = false,
|
|
26
|
+
pinAriaLabel,
|
|
27
|
+
...rest
|
|
28
|
+
} = props;
|
|
29
|
+
const {
|
|
30
|
+
layout
|
|
31
|
+
} = useBaseGridListContext();
|
|
32
|
+
const textValue = typeof rest.textValue === 'string' ? rest.textValue : undefined;
|
|
33
|
+
const [isItemInteracted, setIsItemInteracted] = useState(false);
|
|
34
|
+
// Use debounce with a small delay to make sure there is style flashing finishing interaction (e.g closing dropdown)
|
|
35
|
+
const debouncedIsItemInteracted = useDebounce(isItemInteracted, 50);
|
|
36
|
+
const context = useMemo(() => ({
|
|
37
|
+
loading,
|
|
38
|
+
pinned,
|
|
39
|
+
pinAriaLabel,
|
|
40
|
+
isItemInteracted,
|
|
41
|
+
setIsItemInteracted
|
|
42
|
+
}), [loading, pinned, pinAriaLabel, isItemInteracted]);
|
|
43
|
+
let layoutStyle;
|
|
44
|
+
switch (layout) {
|
|
45
|
+
case 'list':
|
|
46
|
+
layoutStyle = styles.largeListItem;
|
|
47
|
+
break;
|
|
48
|
+
case 'grid':
|
|
49
|
+
layoutStyle = styles.gridListItem;
|
|
50
|
+
break;
|
|
51
|
+
case 'small-list':
|
|
52
|
+
layoutStyle = styles.smallListItem;
|
|
53
|
+
}
|
|
54
|
+
return jsx(Item, {
|
|
55
|
+
...rest,
|
|
56
|
+
ref: forwardedRef,
|
|
57
|
+
className: clsx(layoutStyle, {
|
|
58
|
+
[styles.loading]: loading
|
|
59
|
+
}, {
|
|
60
|
+
[styles.isItemInteracted]: isItemInteracted || debouncedIsItemInteracted
|
|
61
|
+
}, className),
|
|
62
|
+
textValue: textValue,
|
|
63
|
+
children: jsx(BaseGridListItemContext.Provider, {
|
|
64
|
+
value: context,
|
|
65
|
+
children: children
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export { BaseGridListItem, useBaseGridListItemContext };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../../index.css';
|
|
2
|
+
var styles = {"smallList":"base-grid-list-item-module_smallList__8lWoC","smallListItem":"base-grid-list-item-module_smallListItem__MAhGw","loading":"base-grid-list-item-module_loading__u4wHh","thumbnail":"base-grid-list-item-module_thumbnail__hzNRu","header":"base-grid-list-item-module_header__8Cd7A","subtitle":"base-grid-list-item-module_subtitle__NKkK0","largeList":"base-grid-list-item-module_largeList__RTycT","largeListItem":"base-grid-list-item-module_largeListItem__ikeWj","actions":"base-grid-list-item-module_actions__tlu5J","selection":"base-grid-list-item-module_selection__hs7YE","fade":"base-grid-list-item-module_fade__iMTDj","inner":"base-grid-list-item-module_inner__rLb2D","actionsCheckboxWrapper":"base-grid-list-item-module_actionsCheckboxWrapper__51sTV","description":"base-grid-list-item-module_description__peDK8","snippet":"base-grid-list-item-module_snippet__DyZBh","snippetContent":"base-grid-list-item-module_snippetContent__98AuK","react-aria-DropIndicator":"base-grid-list-item-module_react-aria-DropIndicator__KtS-o","gridList":"base-grid-list-item-module_gridList__9TIux","gridListItem":"base-grid-list-item-module_gridListItem__CIHkV","statusPin":"base-grid-list-item-module_statusPin__UPlTb","isItemInteracted":"base-grid-list-item-module_isItemInteracted__FbAYE","tooltipContent":"base-grid-list-item-module_tooltipContent__8oeUV","tooltipArrow":"base-grid-list-item-module_tooltipArrow__xIXK-"};
|
|
3
|
+
|
|
4
|
+
export { styles as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type BaseGridListProps } from './types';
|
|
3
|
+
export declare const useBaseGridListContext: () => BaseGridListProps;
|
|
4
|
+
export declare const BaseGridList: import("react").ForwardRefExoticComponent<import("react-aria-components").GridListProps<BaseGridListProps> & {
|
|
5
|
+
layout: "grid" | "list" | "small-list";
|
|
6
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import noop from 'lodash/noop';
|
|
4
|
+
import { forwardRef, useMemo, createContext, useContext } from 'react';
|
|
5
|
+
import { GridList } from 'react-aria-components';
|
|
6
|
+
import { isCtrlKeyPressed } from '../../utils/keyboardUtils.js';
|
|
7
|
+
import styles from './base-grid-list-item.module.js';
|
|
8
|
+
|
|
9
|
+
const BaseGridListContext = /*#__PURE__*/createContext({
|
|
10
|
+
layout: 'grid'
|
|
11
|
+
});
|
|
12
|
+
const useBaseGridListContext = () => {
|
|
13
|
+
return useContext(BaseGridListContext);
|
|
14
|
+
};
|
|
15
|
+
// We don't want to propagate normal keys since they will be used for typeahead.
|
|
16
|
+
// DSYS-706
|
|
17
|
+
const SPECIAL_KEYS = new Set(['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageDown', 'PageUp', 'a', 'Tab', 'Escape', ' ', 'Enter']);
|
|
18
|
+
const stopPropagationForNonSpecialKeys = e => {
|
|
19
|
+
if (!SPECIAL_KEYS.has(e.key) || e.key === 'a' && !isCtrlKeyPressed(e)) {
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const BaseGridList = /*#__PURE__*/forwardRef(function BaseGridList(props, forwardedRef) {
|
|
24
|
+
const {
|
|
25
|
+
children,
|
|
26
|
+
onAction,
|
|
27
|
+
className,
|
|
28
|
+
layout,
|
|
29
|
+
...rest
|
|
30
|
+
} = props;
|
|
31
|
+
const context = useMemo(() => ({
|
|
32
|
+
selectionMode: rest.selectionMode,
|
|
33
|
+
selectionBehavior: rest.selectionBehavior,
|
|
34
|
+
layout
|
|
35
|
+
}), [rest.selectionMode, rest.selectionBehavior, layout]);
|
|
36
|
+
let layoutStyle;
|
|
37
|
+
switch (layout) {
|
|
38
|
+
case 'list':
|
|
39
|
+
layoutStyle = styles.largeList;
|
|
40
|
+
break;
|
|
41
|
+
case 'grid':
|
|
42
|
+
layoutStyle = styles.gridList;
|
|
43
|
+
break;
|
|
44
|
+
case 'small-list':
|
|
45
|
+
layoutStyle = styles.smallList;
|
|
46
|
+
}
|
|
47
|
+
return jsx("div", {
|
|
48
|
+
onKeyDownCapture: stopPropagationForNonSpecialKeys,
|
|
49
|
+
children: jsx(BaseGridListContext.Provider, {
|
|
50
|
+
value: context,
|
|
51
|
+
children: jsx(GridList, {
|
|
52
|
+
...rest,
|
|
53
|
+
ref: forwardedRef,
|
|
54
|
+
className: clsx(layoutStyle, className),
|
|
55
|
+
onAction: onAction || noop,
|
|
56
|
+
children: children
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export { BaseGridList, useBaseGridListContext };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Base Grid List can be used for showcasing various types of files in Box.
|
|
4
|
+
*
|
|
5
|
+
* It's based on GridList from react-aria-components with exposed subcomponents for easier styling.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BaseGridList: import("react").ForwardRefExoticComponent<import("react-aria-components").GridListProps<import("./types").BaseGridListProps> & {
|
|
8
|
+
layout: "grid" | "list" | "small-list";
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
10
|
+
/**
|
|
11
|
+
* An individual item in the list.
|
|
12
|
+
*/
|
|
13
|
+
Item: import("react").ForwardRefExoticComponent<import("react-aria-components").ItemProps<object> & Omit<import("./types").BaseGridListItemContextType, "isItemInteracted" | "setIsItemInteracted"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
/**
|
|
15
|
+
* Styled wrapper over and image or icon.
|
|
16
|
+
*/
|
|
17
|
+
Thumbnail: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
19
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
/**
|
|
21
|
+
* Styled wrapper over the title of an item and potential Status components.
|
|
22
|
+
*/
|
|
23
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("./types").BaseGridListHeaderProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
24
|
+
/**
|
|
25
|
+
* Styled wrapper over the subtitle of an item.
|
|
26
|
+
*/
|
|
27
|
+
Subtitle: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
28
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
29
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
/**
|
|
31
|
+
* Styled wrapper over the actions of an item.
|
|
32
|
+
* If `selectionMode` is passed, a checkbox will be rendered as well.
|
|
33
|
+
*/
|
|
34
|
+
Actions: import("react").ForwardRefExoticComponent<Omit<import("./types").BaseGridListActionsProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
+
/**
|
|
36
|
+
* Styled wrapper over an icon button.
|
|
37
|
+
* Ensures proper behaviour when used in a grid list item.
|
|
38
|
+
*/
|
|
39
|
+
ActionIconButton: import("react").ForwardRefExoticComponent<Omit<import("../../..").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
40
|
+
};
|
|
41
|
+
export type { BaseGridListActionIconButtonProps, BaseGridListActionsProps, BaseGridListDescriptionProps, BaseGridListHeaderProps, BaseGridListItemProps, BaseGridListProps, BaseGridListSubtitleProps, BaseGridListThumbnailProps, } from './types';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BaseGridList as BaseGridList$1 } from './base-grid-list.js';
|
|
2
|
+
import { BaseGridListItem } from './base-grid-list-item.js';
|
|
3
|
+
import { BaseGridListActions, BaseGridListActionIconButton } from './base-grid-list-item-actions.js';
|
|
4
|
+
import { BaseGridListHeader } from './base-grid-list-item-header.js';
|
|
5
|
+
import { BaseGridListSubtitle } from './base-grid-list-item-subtitle.js';
|
|
6
|
+
import { BaseGridListThumbnail } from './base-grid-list-item-thumbnail.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Base Grid List can be used for showcasing various types of files in Box.
|
|
10
|
+
*
|
|
11
|
+
* It's based on GridList from react-aria-components with exposed subcomponents for easier styling.
|
|
12
|
+
*/
|
|
13
|
+
const BaseGridList = Object.assign(BaseGridList$1, {
|
|
14
|
+
/**
|
|
15
|
+
* An individual item in the list.
|
|
16
|
+
*/
|
|
17
|
+
Item: BaseGridListItem,
|
|
18
|
+
/**
|
|
19
|
+
* Styled wrapper over and image or icon.
|
|
20
|
+
*/
|
|
21
|
+
Thumbnail: BaseGridListThumbnail,
|
|
22
|
+
/**
|
|
23
|
+
* Styled wrapper over the title of an item and potential Status components.
|
|
24
|
+
*/
|
|
25
|
+
Header: BaseGridListHeader,
|
|
26
|
+
/**
|
|
27
|
+
* Styled wrapper over the subtitle of an item.
|
|
28
|
+
*/
|
|
29
|
+
Subtitle: BaseGridListSubtitle,
|
|
30
|
+
/**
|
|
31
|
+
* Styled wrapper over the actions of an item.
|
|
32
|
+
* If `selectionMode` is passed, a checkbox will be rendered as well.
|
|
33
|
+
*/
|
|
34
|
+
Actions: BaseGridListActions,
|
|
35
|
+
/**
|
|
36
|
+
* Styled wrapper over an icon button.
|
|
37
|
+
* Ensures proper behaviour when used in a grid list item.
|
|
38
|
+
*/
|
|
39
|
+
ActionIconButton: BaseGridListActionIconButton
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export { BaseGridList };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type GridListProps as RAGridListProps, type ItemProps } from 'react-aria-components';
|
|
3
|
+
import { type IconButtonProps } from '../../primitives/icon-button';
|
|
4
|
+
import { type Modify } from '../../types/modify';
|
|
5
|
+
type BaseGridListLayoutProp = {
|
|
6
|
+
layout: 'grid' | 'list' | 'small-list';
|
|
7
|
+
};
|
|
8
|
+
export declare enum ListLayout {
|
|
9
|
+
GRID = "Grid List",
|
|
10
|
+
LARGE_LIST = "Large List",
|
|
11
|
+
SMALL_LIST = "Small List"
|
|
12
|
+
}
|
|
13
|
+
export type BaseGridListHeaderProps = ComponentPropsWithRef<'span'> & {
|
|
14
|
+
textValue?: string;
|
|
15
|
+
};
|
|
16
|
+
export type BaseGridListThumbnailProps = ComponentPropsWithRef<'div'>;
|
|
17
|
+
export type BaseGridListSubtitleProps = ComponentPropsWithRef<'span'>;
|
|
18
|
+
export type BaseGridListDescriptionProps = ComponentPropsWithRef<'p'>;
|
|
19
|
+
export type BaseGridListActionsProps = Modify<ComponentPropsWithRef<'div'>, {
|
|
20
|
+
children: ReactNode | ((setIsInteracted: (open: boolean) => void) => ReactNode);
|
|
21
|
+
}>;
|
|
22
|
+
export type BaseGridListActionIconButtonProps = IconButtonProps;
|
|
23
|
+
export type BaseGridListProps = RAGridListProps<BaseGridListProps> & BaseGridListLayoutProp;
|
|
24
|
+
export type BaseGridListItemContextType = {
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
pinned?: boolean;
|
|
27
|
+
pinAriaLabel?: string;
|
|
28
|
+
isItemInteracted: boolean;
|
|
29
|
+
setIsItemInteracted: (isInteracted: boolean) => void;
|
|
30
|
+
};
|
|
31
|
+
export type BaseGridListItemProps = ItemProps & Omit<BaseGridListItemContextType, 'isItemInteracted' | 'setIsItemInteracted'>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import { type ButtonProps } from 'react-aria-components';
|
|
3
|
+
/**
|
|
4
|
+
* RAC Button customized based on https://react-spectrum.adobe.com/react-aria/Button.html#hooks
|
|
5
|
+
*
|
|
6
|
+
* Extras:
|
|
7
|
+
* - Merge passed `onPointerDown` with RAC's pointerDown. Order is important. This is for handling the component being wrapped with Dropdown.Trigger,
|
|
8
|
+
* while still responding to clicks.
|
|
9
|
+
*/
|
|
10
|
+
export declare const RACButton: import("react").ForwardRefExoticComponent<ButtonProps & {
|
|
11
|
+
onPointerDown: ComponentProps<'button'>['onPointerDown'];
|
|
12
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useButton, mergeProps } from 'react-aria';
|
|
4
|
+
import { useContextProps, ButtonContext } from 'react-aria-components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* RAC Button customized based on https://react-spectrum.adobe.com/react-aria/Button.html#hooks
|
|
8
|
+
*
|
|
9
|
+
* Extras:
|
|
10
|
+
* - Merge passed `onPointerDown` with RAC's pointerDown. Order is important. This is for handling the component being wrapped with Dropdown.Trigger,
|
|
11
|
+
* while still responding to clicks.
|
|
12
|
+
*/
|
|
13
|
+
const RACButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
|
+
// Merge the local props and ref with the ones provided via context.
|
|
15
|
+
[props, ref] = useContextProps(props, ref, ButtonContext);
|
|
16
|
+
const {
|
|
17
|
+
buttonProps
|
|
18
|
+
} = useButton(props, ref);
|
|
19
|
+
const pointerDownProps = mergeProps({
|
|
20
|
+
onPointerDown: props.onPointerDown
|
|
21
|
+
}, {
|
|
22
|
+
onPointerDown: buttonProps.onPointerDown
|
|
23
|
+
});
|
|
24
|
+
return jsx("button", {
|
|
25
|
+
...buttonProps,
|
|
26
|
+
...pointerDownProps,
|
|
27
|
+
ref: ref,
|
|
28
|
+
className: props.className,
|
|
29
|
+
type: "button",
|
|
30
|
+
children: props.children
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { RACButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TooltipProps } from 'react-aria-components';
|
|
3
|
+
interface RATooltipProps extends Omit<TooltipProps, 'children'> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const RACTooltip: ({ children, ...props }: RATooltipProps) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { Tooltip, OverlayArrow } from 'react-aria-components';
|
|
4
|
+
import styles from '../base-grid-list-item.module.js';
|
|
5
|
+
|
|
6
|
+
const RACTooltip = ({
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
return jsxs(Tooltip, {
|
|
11
|
+
className: clsx(styles.tooltipContent),
|
|
12
|
+
offset: 3,
|
|
13
|
+
placement: "bottom",
|
|
14
|
+
...props,
|
|
15
|
+
children: [jsx(OverlayArrow, {
|
|
16
|
+
className: styles.tooltipArrow,
|
|
17
|
+
children: jsx("svg", {
|
|
18
|
+
fill: "none",
|
|
19
|
+
viewBox: "0 0 16 8",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
children: jsx("path", {
|
|
22
|
+
d: "m8.5 0-8 8h16l-8-8Z",
|
|
23
|
+
fill: "var(--gray-80)"
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
}), children]
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { RACTooltip };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FocusTrap } from './focus-trap';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type MutableRefObject } from 'react';
|
|
2
|
+
export type FocusTrapProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/** Reference to the container element */
|
|
5
|
+
containerRef: MutableRefObject<HTMLDivElement | null>;
|
|
6
|
+
/** Function to set the focus to a desired element when the focus trap is activated */
|
|
7
|
+
customInitialFocus?: (tabbableEls: (HTMLElement | SVGElement)[]) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interactive-icon';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type InteractiveIconProps } from './types';
|
|
3
|
+
export declare const InteractiveIcon: import("react").ForwardRefExoticComponent<InteractiveIconProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default InteractiveIcon;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { BoxBlue100 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
|
+
import { forwardRef, createElement } from 'react';
|
|
4
|
+
import styles from './interactive-icon.module.js';
|
|
5
|
+
|
|
6
|
+
const InteractiveIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
7
|
+
const {
|
|
8
|
+
icon,
|
|
9
|
+
...rest
|
|
10
|
+
} = props;
|
|
11
|
+
return jsx("button", {
|
|
12
|
+
...rest,
|
|
13
|
+
ref: forwardedRef,
|
|
14
|
+
className: styles.interactiveIcon,
|
|
15
|
+
type: "button",
|
|
16
|
+
children: /*#__PURE__*/createElement(icon, {
|
|
17
|
+
color: BoxBlue100,
|
|
18
|
+
role: 'presentation'
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
InteractiveIcon.displayName = 'InteractiveIcon';
|
|
23
|
+
|
|
24
|
+
export { InteractiveIcon, InteractiveIcon as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type FunctionComponent, type HTMLAttributes, type MouseEventHandler, type PropsWithChildren, type SVGProps } from 'react';
|
|
2
|
+
export interface InteractiveIconProps extends HTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** aria-label for the badge button */
|
|
4
|
+
['aria-label']: string;
|
|
5
|
+
/** Icon that will be rendered */
|
|
6
|
+
icon: FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
7
|
+
/** The onClick event occurs when the user clicks on the icon */
|
|
8
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './legend';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { TextWithInfoBadge } from '../text-with-info-badge/text-with-info-badge.js';
|
|
4
|
+
import styles from './legend.module.js';
|
|
5
|
+
|
|
6
|
+
function Legend(props) {
|
|
7
|
+
const {
|
|
8
|
+
header,
|
|
9
|
+
infoText,
|
|
10
|
+
infoBadgeAriaLabel,
|
|
11
|
+
children,
|
|
12
|
+
gap = 'default',
|
|
13
|
+
className,
|
|
14
|
+
...rest
|
|
15
|
+
} = props;
|
|
16
|
+
return jsxs("fieldset", {
|
|
17
|
+
...rest,
|
|
18
|
+
className: clsx(styles.fieldset, styles[gap], className),
|
|
19
|
+
children: [jsx("legend", {
|
|
20
|
+
className: styles.legend,
|
|
21
|
+
children: jsx(TextWithInfoBadge, {
|
|
22
|
+
className: styles.legendText,
|
|
23
|
+
infoBadgeAriaLabel: infoBadgeAriaLabel,
|
|
24
|
+
infoText: infoText,
|
|
25
|
+
children: header
|
|
26
|
+
})
|
|
27
|
+
}), children]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Legend, Legend as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type RequireAllOrNone } from 'type-fest';
|
|
3
|
+
import { type StyledText } from '../../utils/commonTypes';
|
|
4
|
+
type Info = {
|
|
5
|
+
/** Additional text to aid in use. It will appear inside info icon tooltip. */
|
|
6
|
+
infoText?: StyledText;
|
|
7
|
+
/** aria-label for the label badge button */
|
|
8
|
+
infoBadgeAriaLabel?: string;
|
|
9
|
+
};
|
|
10
|
+
export type LegendProps = {
|
|
11
|
+
/** The header for legend */
|
|
12
|
+
header: string;
|
|
13
|
+
/** One or more children */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/** Gap between children */
|
|
16
|
+
gap?: 'default' | 'wide';
|
|
17
|
+
} & RequireAllOrNone<Info, keyof Info> & HTMLAttributes<HTMLFieldSetElement>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListCheckbox } from './list-checkbox';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type CheckboxProps } from 'react-aria-components';
|
|
3
|
+
/**
|
|
4
|
+
* Based on React Aria Components `Checkbox`
|
|
5
|
+
*
|
|
6
|
+
* Used in Collection RAC components like GridList and Table.
|
|
7
|
+
*
|
|
8
|
+
* @see https://react-spectrum.adobe.com/react-aria/Checkbox.html
|
|
9
|
+
*/
|
|
10
|
+
export declare const ListCheckbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Checkmark } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
+
import { IconIconOnDark, Size3 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
import { Checkbox } from 'react-aria-components';
|
|
7
|
+
import styles from './list-checkbox.module.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Based on React Aria Components `Checkbox`
|
|
11
|
+
*
|
|
12
|
+
* Used in Collection RAC components like GridList and Table.
|
|
13
|
+
*
|
|
14
|
+
* @see https://react-spectrum.adobe.com/react-aria/Checkbox.html
|
|
15
|
+
*/
|
|
16
|
+
const ListCheckbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
|
+
return jsx("div", {
|
|
18
|
+
className: clsx(styles.selection, props.className),
|
|
19
|
+
children: jsx(Checkbox, {
|
|
20
|
+
...props,
|
|
21
|
+
ref: ref,
|
|
22
|
+
className: styles.checkbox,
|
|
23
|
+
slot: "selection",
|
|
24
|
+
children: ({
|
|
25
|
+
isSelected
|
|
26
|
+
}) => isSelected && jsx(Checkmark, {
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
color: IconIconOnDark,
|
|
29
|
+
height: Size3,
|
|
30
|
+
width: Size3
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export { ListCheckbox };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MenuItemSideContentProps extends React.ComponentProps<'div'> {
|
|
3
|
+
/** The content to display in the section. */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface MenuItemMainContentProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
7
|
+
/** The label for the checkbox button. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Additional text to aid in use. */
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Container for side content of menu item.
|
|
14
|
+
*/
|
|
15
|
+
export declare const MenuItemSideContent: ({ children, className, ...rest }: MenuItemSideContentProps) => JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Text contents of an Item.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MenuItemMainContent: ({ className, label, description, ...rest }: MenuItemMainContentProps) => JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import styles from './menu-item-sections.module.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Container for side content of menu item.
|
|
7
|
+
*/
|
|
8
|
+
const MenuItemSideContent = ({
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
...rest
|
|
12
|
+
}) => {
|
|
13
|
+
return jsx("div", {
|
|
14
|
+
...rest,
|
|
15
|
+
className: clsx(styles.menuItemSideContent, {
|
|
16
|
+
[styles.textOnLightSecondary]: typeof children === 'string'
|
|
17
|
+
}, className),
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Text contents of an Item.
|
|
23
|
+
*/
|
|
24
|
+
const MenuItemMainContent = ({
|
|
25
|
+
className,
|
|
26
|
+
label,
|
|
27
|
+
description,
|
|
28
|
+
...rest
|
|
29
|
+
}) => jsxs("div", {
|
|
30
|
+
...rest,
|
|
31
|
+
className: clsx(styles.menuItemMainContent, className),
|
|
32
|
+
children: [jsx("span", {
|
|
33
|
+
className: clsx(styles.label, {
|
|
34
|
+
[styles.bold]: Boolean(description)
|
|
35
|
+
}),
|
|
36
|
+
children: label
|
|
37
|
+
}), description ? jsx("span", {
|
|
38
|
+
className: styles.description,
|
|
39
|
+
children: description
|
|
40
|
+
}) : null]
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { MenuItemMainContent, MenuItemSideContent };
|