@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,49 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef, useEffect } from 'react';
|
|
4
|
+
import { Text } from '../text/text.js';
|
|
5
|
+
import { getUniqueId } from '../utils/useUniqueId.js';
|
|
6
|
+
import styles from './guided-tooltip.module.js';
|
|
7
|
+
import { useGuidedTooltipContext } from './utils/guided-tooltip-context.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The component to show the text of Guided Tooltip.
|
|
11
|
+
*/
|
|
12
|
+
const GuidedTooltipText = ({
|
|
13
|
+
children
|
|
14
|
+
}) => jsx(Text, {
|
|
15
|
+
as: "p",
|
|
16
|
+
color: "textOnLightDefault",
|
|
17
|
+
variant: "bodyDefault",
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* The component to show content in body of the Guided Tooltip.
|
|
22
|
+
*/
|
|
23
|
+
const GuidedTooltipBody = /*#__PURE__*/forwardRef(({
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
...rest
|
|
27
|
+
}, forwardedRef) => {
|
|
28
|
+
const {
|
|
29
|
+
bodyId,
|
|
30
|
+
setBodyId,
|
|
31
|
+
titleId
|
|
32
|
+
} = useGuidedTooltipContext();
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (!bodyId) {
|
|
35
|
+
const id = getUniqueId('guidedTooltip-body-');
|
|
36
|
+
setBodyId(id);
|
|
37
|
+
}
|
|
38
|
+
}, [bodyId, setBodyId]);
|
|
39
|
+
const guidedTooltipHasNoTitle = !titleId;
|
|
40
|
+
return jsx("div", {
|
|
41
|
+
...rest,
|
|
42
|
+
ref: forwardedRef,
|
|
43
|
+
className: clsx(styles.body, guidedTooltipHasNoTitle && styles.noTitle, className),
|
|
44
|
+
id: bodyId,
|
|
45
|
+
children: children
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export { GuidedTooltipBody, GuidedTooltipText, GuidedTooltipBody as default };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type GuidedTooltipActionsContainerProps, type GuidedTooltipFooterProps, type GuidedTooltipStepsIndicatorProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper for buttons in the footer of the GuidedTooltip with optional step indicator.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GuidedTooltipFooterComponent: ({ children, className, ...rest }: GuidedTooltipFooterProps) => JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Wrapper for buttons in the footer of the GuidedTooltip.
|
|
9
|
+
* Exposes primary and secondary action buttons most commonly used inside footer of the tooltip.
|
|
10
|
+
*/
|
|
11
|
+
export declare const GuidedTooltipFooter: (({ children, className, ...rest }: GuidedTooltipFooterProps) => JSX.Element) & {
|
|
12
|
+
ActionsContainer: ({ children, className }: GuidedTooltipActionsContainerProps) => JSX.Element;
|
|
13
|
+
PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<{
|
|
14
|
+
loading?: boolean | undefined;
|
|
15
|
+
loadingAriaLabel?: string | undefined;
|
|
16
|
+
}, keyof {
|
|
17
|
+
loading?: boolean | undefined;
|
|
18
|
+
loadingAriaLabel?: string | undefined;
|
|
19
|
+
}>> & Omit<{
|
|
20
|
+
loading?: boolean | undefined;
|
|
21
|
+
loadingAriaLabel?: string | undefined;
|
|
22
|
+
}, keyof {
|
|
23
|
+
loading?: boolean | undefined;
|
|
24
|
+
loadingAriaLabel?: string | undefined;
|
|
25
|
+
}> & {
|
|
26
|
+
children?: string | string[] | undefined;
|
|
27
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
28
|
+
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof {
|
|
29
|
+
loading?: boolean | undefined;
|
|
30
|
+
loadingAriaLabel?: string | undefined;
|
|
31
|
+
}, never>> & Omit<{
|
|
32
|
+
loading?: boolean | undefined;
|
|
33
|
+
loadingAriaLabel?: string | undefined;
|
|
34
|
+
}, keyof {
|
|
35
|
+
loading?: boolean | undefined;
|
|
36
|
+
loadingAriaLabel?: string | undefined;
|
|
37
|
+
}> & {
|
|
38
|
+
children?: string | string[] | undefined;
|
|
39
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
40
|
+
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
SecondaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<{
|
|
42
|
+
loading?: boolean | undefined;
|
|
43
|
+
loadingAriaLabel?: string | undefined;
|
|
44
|
+
}, keyof {
|
|
45
|
+
loading?: boolean | undefined;
|
|
46
|
+
loadingAriaLabel?: string | undefined;
|
|
47
|
+
}>> & Omit<{
|
|
48
|
+
loading?: boolean | undefined;
|
|
49
|
+
loadingAriaLabel?: string | undefined;
|
|
50
|
+
}, keyof {
|
|
51
|
+
loading?: boolean | undefined;
|
|
52
|
+
loadingAriaLabel?: string | undefined;
|
|
53
|
+
}> & {
|
|
54
|
+
children?: string | string[] | undefined;
|
|
55
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
56
|
+
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof {
|
|
57
|
+
loading?: boolean | undefined;
|
|
58
|
+
loadingAriaLabel?: string | undefined;
|
|
59
|
+
}, never>> & Omit<{
|
|
60
|
+
loading?: boolean | undefined;
|
|
61
|
+
loadingAriaLabel?: string | undefined;
|
|
62
|
+
}, keyof {
|
|
63
|
+
loading?: boolean | undefined;
|
|
64
|
+
loadingAriaLabel?: string | undefined;
|
|
65
|
+
}> & {
|
|
66
|
+
children?: string | string[] | undefined;
|
|
67
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
68
|
+
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
69
|
+
StepsIndicator: ({ children, className }: GuidedTooltipStepsIndicatorProps) => JSX.Element;
|
|
70
|
+
};
|
|
71
|
+
export default GuidedTooltipFooter;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef, useEffect } from 'react';
|
|
4
|
+
import { Button } from '../basics/button/button.js';
|
|
5
|
+
import { getUniqueId } from '../utils/useUniqueId.js';
|
|
6
|
+
import styles from './guided-tooltip.module.js';
|
|
7
|
+
import { useGuidedTooltipContext } from './utils/guided-tooltip-context.js';
|
|
8
|
+
|
|
9
|
+
const PrimaryAction = /*#__PURE__*/forwardRef((props, forwardedRef) => jsx(Button, {
|
|
10
|
+
...props,
|
|
11
|
+
ref: forwardedRef,
|
|
12
|
+
autoFocus: true,
|
|
13
|
+
className: clsx(styles.primaryAction, props.className)
|
|
14
|
+
}));
|
|
15
|
+
const SecondaryAction = /*#__PURE__*/forwardRef((props, forwardedRef) => jsx(Button, {
|
|
16
|
+
...props,
|
|
17
|
+
ref: forwardedRef,
|
|
18
|
+
className: clsx(styles.secondaryAction, props.className),
|
|
19
|
+
variant: "tertiary"
|
|
20
|
+
}));
|
|
21
|
+
/**
|
|
22
|
+
* Wrapper for buttons in the footer of the tooltip.
|
|
23
|
+
*/
|
|
24
|
+
const ActionsContainer = ({
|
|
25
|
+
children,
|
|
26
|
+
className
|
|
27
|
+
}) => jsx("div", {
|
|
28
|
+
className: clsx(styles.actionButtons, className),
|
|
29
|
+
children: children
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Container for the steps indicator text (example: "1 of 3").
|
|
33
|
+
*/
|
|
34
|
+
const StepsIndicator = ({
|
|
35
|
+
children,
|
|
36
|
+
className
|
|
37
|
+
}) => {
|
|
38
|
+
const {
|
|
39
|
+
setStepsIndicatorId,
|
|
40
|
+
stepsIndicatorId
|
|
41
|
+
} = useGuidedTooltipContext();
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!stepsIndicatorId) {
|
|
44
|
+
const id = getUniqueId('guidedTooltip-steps-indicator-');
|
|
45
|
+
setStepsIndicatorId(id);
|
|
46
|
+
}
|
|
47
|
+
}, [setStepsIndicatorId, stepsIndicatorId]);
|
|
48
|
+
return jsx("div", {
|
|
49
|
+
className: clsx(styles.stepsIndicator, className),
|
|
50
|
+
id: stepsIndicatorId,
|
|
51
|
+
children: children
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Wrapper for buttons in the footer of the GuidedTooltip with optional step indicator.
|
|
56
|
+
*/
|
|
57
|
+
const GuidedTooltipFooterComponent = ({
|
|
58
|
+
children,
|
|
59
|
+
className,
|
|
60
|
+
...rest
|
|
61
|
+
}) => jsx("div", {
|
|
62
|
+
...rest,
|
|
63
|
+
className: clsx(styles.footer, className),
|
|
64
|
+
children: children
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* Wrapper for buttons in the footer of the GuidedTooltip.
|
|
68
|
+
* Exposes primary and secondary action buttons most commonly used inside footer of the tooltip.
|
|
69
|
+
*/
|
|
70
|
+
const GuidedTooltipFooter = Object.assign(GuidedTooltipFooterComponent, {
|
|
71
|
+
ActionsContainer,
|
|
72
|
+
PrimaryAction,
|
|
73
|
+
SecondaryAction,
|
|
74
|
+
StepsIndicator
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export { GuidedTooltipFooter, GuidedTooltipFooterComponent, GuidedTooltipFooter as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type GuidedTooltipIconProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Component that displays icon.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GuidedTooltipIcon: ({ className, icon }: GuidedTooltipIconProps) => JSX.Element;
|
|
7
|
+
export default GuidedTooltipIcon;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { SurfaceSurfaceBrand } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
|
+
import styles from './guided-tooltip.module.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Component that displays icon.
|
|
8
|
+
*/
|
|
9
|
+
const GuidedTooltipIcon = ({
|
|
10
|
+
className,
|
|
11
|
+
icon
|
|
12
|
+
}) => {
|
|
13
|
+
return jsx("div", {
|
|
14
|
+
className: styles.icon,
|
|
15
|
+
children: /*#__PURE__*/createElement(icon, {
|
|
16
|
+
color: SurfaceSurfaceBrand,
|
|
17
|
+
role: 'presentation'
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { GuidedTooltipIcon, GuidedTooltipIcon as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type GuidedTooltipIllustrationProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Component that displays illustration.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GuidedTooltipIllustration: ({ altText, className, imgUrl }: GuidedTooltipIllustrationProps) => JSX.Element;
|
|
7
|
+
export default GuidedTooltipIllustration;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import styles from './guided-tooltip.module.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component that displays illustration.
|
|
7
|
+
*/
|
|
8
|
+
const GuidedTooltipIllustration = ({
|
|
9
|
+
altText = '',
|
|
10
|
+
className,
|
|
11
|
+
imgUrl
|
|
12
|
+
}) => {
|
|
13
|
+
return jsx("img", {
|
|
14
|
+
alt: altText,
|
|
15
|
+
className: clsx(styles.illustration, className),
|
|
16
|
+
src: imgUrl
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { GuidedTooltipIllustration, GuidedTooltipIllustration as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type GuidedTooltipTitleProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* An accessible title to be announced when the GuidedTooltip is opened.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GuidedTooltipTitle: ({ children, className }: GuidedTooltipTitleProps) => JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { getUniqueId } from '../utils/useUniqueId.js';
|
|
5
|
+
import { Text } from '../text/text.js';
|
|
6
|
+
import styles from './guided-tooltip.module.js';
|
|
7
|
+
import { useGuidedTooltipContext } from './utils/guided-tooltip-context.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An accessible title to be announced when the GuidedTooltip is opened.
|
|
11
|
+
*/
|
|
12
|
+
const GuidedTooltipTitle = ({
|
|
13
|
+
children,
|
|
14
|
+
className
|
|
15
|
+
}) => {
|
|
16
|
+
const {
|
|
17
|
+
setTitleId,
|
|
18
|
+
titleId
|
|
19
|
+
} = useGuidedTooltipContext();
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!titleId) {
|
|
22
|
+
const id = getUniqueId('guidedTooltip-title-');
|
|
23
|
+
setTitleId(id);
|
|
24
|
+
}
|
|
25
|
+
}, [setTitleId, titleId]);
|
|
26
|
+
return jsx(Text, {
|
|
27
|
+
as: "h2",
|
|
28
|
+
className: clsx(styles.title, className),
|
|
29
|
+
color: "textOnLightDefault",
|
|
30
|
+
id: titleId,
|
|
31
|
+
variant: "titleLarge",
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { GuidedTooltipTitle };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type GuidedTooltipProps } from './types';
|
|
3
|
+
export declare const GuidedTooltip: (({ children, onOpenChange, open, container, ...guidedTooltipContentProps }: GuidedTooltipProps) => JSX.Element) & {
|
|
4
|
+
Body: import("react").ForwardRefExoticComponent<import("./types").GuidedTooltipBodyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
Footer: (({ children, className, ...rest }: import("./types").GuidedTooltipFooterProps) => JSX.Element) & {
|
|
6
|
+
ActionsContainer: ({ children, className }: import("./types").GuidedTooltipActionsContainerProps) => JSX.Element;
|
|
7
|
+
PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<{
|
|
8
|
+
loading?: boolean | undefined;
|
|
9
|
+
loadingAriaLabel?: string | undefined;
|
|
10
|
+
}, keyof {
|
|
11
|
+
loading?: boolean | undefined;
|
|
12
|
+
loadingAriaLabel?: string | undefined;
|
|
13
|
+
}>> & Omit<{
|
|
14
|
+
loading?: boolean | undefined;
|
|
15
|
+
loadingAriaLabel?: string | undefined;
|
|
16
|
+
}, keyof {
|
|
17
|
+
loading?: boolean | undefined;
|
|
18
|
+
loadingAriaLabel?: string | undefined;
|
|
19
|
+
}> & {
|
|
20
|
+
children?: string | string[] | undefined;
|
|
21
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
22
|
+
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof {
|
|
23
|
+
loading?: boolean | undefined;
|
|
24
|
+
loadingAriaLabel?: string | undefined;
|
|
25
|
+
}, never>> & Omit<{
|
|
26
|
+
loading?: boolean | undefined;
|
|
27
|
+
loadingAriaLabel?: string | undefined;
|
|
28
|
+
}, keyof {
|
|
29
|
+
loading?: boolean | undefined;
|
|
30
|
+
loadingAriaLabel?: string | undefined;
|
|
31
|
+
}> & {
|
|
32
|
+
children?: string | string[] | undefined;
|
|
33
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
34
|
+
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
SecondaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<{
|
|
36
|
+
loading?: boolean | undefined;
|
|
37
|
+
loadingAriaLabel?: string | undefined;
|
|
38
|
+
}, keyof {
|
|
39
|
+
loading?: boolean | undefined;
|
|
40
|
+
loadingAriaLabel?: string | undefined;
|
|
41
|
+
}>> & Omit<{
|
|
42
|
+
loading?: boolean | undefined;
|
|
43
|
+
loadingAriaLabel?: string | undefined;
|
|
44
|
+
}, keyof {
|
|
45
|
+
loading?: boolean | undefined;
|
|
46
|
+
loadingAriaLabel?: string | undefined;
|
|
47
|
+
}> & {
|
|
48
|
+
children?: string | string[] | undefined;
|
|
49
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
50
|
+
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof {
|
|
51
|
+
loading?: boolean | undefined;
|
|
52
|
+
loadingAriaLabel?: string | undefined;
|
|
53
|
+
}, never>> & Omit<{
|
|
54
|
+
loading?: boolean | undefined;
|
|
55
|
+
loadingAriaLabel?: string | undefined;
|
|
56
|
+
}, keyof {
|
|
57
|
+
loading?: boolean | undefined;
|
|
58
|
+
loadingAriaLabel?: string | undefined;
|
|
59
|
+
}> & {
|
|
60
|
+
children?: string | string[] | undefined;
|
|
61
|
+
icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
|
|
62
|
+
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
63
|
+
StepsIndicator: ({ children, className }: import("./types").GuidedTooltipStepsIndicatorProps) => JSX.Element;
|
|
64
|
+
};
|
|
65
|
+
Icon: ({ className, icon }: import("./types").GuidedTooltipIconProps) => JSX.Element;
|
|
66
|
+
Illustration: ({ altText, className, imgUrl }: import("./types").GuidedTooltipIllustrationProps) => JSX.Element;
|
|
67
|
+
Text: ({ children }: import("./types").GuidedTooltipTextProps) => JSX.Element;
|
|
68
|
+
Title: ({ children, className }: import("./types").GuidedTooltipTitleProps) => JSX.Element;
|
|
69
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { XMark } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
+
import { Space7 } from '@box/blueprint-web-assets/tokens/px-tokens';
|
|
4
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { forwardRef, useCallback, useState, useMemo } from 'react';
|
|
7
|
+
import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
8
|
+
import { GuidedTooltipBody, GuidedTooltipText } from './guided-tooltip-body.js';
|
|
9
|
+
import { GuidedTooltipFooter } from './guided-tooltip-footer.js';
|
|
10
|
+
import { GuidedTooltipIcon } from './guided-tooltip-icon.js';
|
|
11
|
+
import { GuidedTooltipIllustration } from './guided-tooltip-illustration.js';
|
|
12
|
+
import { GuidedTooltipTitle } from './guided-tooltip-title.js';
|
|
13
|
+
import styles from './guided-tooltip.module.js';
|
|
14
|
+
import { GuidedTooltipContext } from './utils/guided-tooltip-context.js';
|
|
15
|
+
|
|
16
|
+
const OFFSET_FROM_ANCHOR_IN_PX = 3;
|
|
17
|
+
const ARROW_PADDING_IN_PX = parseInt(Space7, 10);
|
|
18
|
+
const GuidedTooltipContent = /*#__PURE__*/forwardRef(({
|
|
19
|
+
align = 'center',
|
|
20
|
+
className,
|
|
21
|
+
closeLabel,
|
|
22
|
+
content,
|
|
23
|
+
side = 'bottom',
|
|
24
|
+
sideOffset = OFFSET_FROM_ANCHOR_IN_PX,
|
|
25
|
+
...rest
|
|
26
|
+
}, forwardedRef) => {
|
|
27
|
+
const onInteractOutside = useCallback(event => event.preventDefault(), []);
|
|
28
|
+
const [bodyId, setBodyId] = useState();
|
|
29
|
+
const [stepsIndicatorId, setStepsIndicatorId] = useState();
|
|
30
|
+
const [titleId, setTitleId] = useState();
|
|
31
|
+
const contextProviderValue = useMemo(() => ({
|
|
32
|
+
bodyId,
|
|
33
|
+
setBodyId,
|
|
34
|
+
setStepsIndicatorId,
|
|
35
|
+
setTitleId,
|
|
36
|
+
stepsIndicatorId,
|
|
37
|
+
titleId
|
|
38
|
+
}), [bodyId, stepsIndicatorId, titleId]);
|
|
39
|
+
/**
|
|
40
|
+
* We use aria-labelledby attribute instead of aria-label because of the First Rule of ARIA Use
|
|
41
|
+
* (https://www.w3.org/TR/using-aria/#firstrule). We also follow the Guided Tooltip Accessibility Notes
|
|
42
|
+
* aria-labelledby attribute has similar structure as className - ids of elements separated by space,
|
|
43
|
+
* hence the use of clsx utility.
|
|
44
|
+
* It needs to consist of an id of the title element or the body element if former is not present.
|
|
45
|
+
* It also needs to consist of an id of the "steps indicator" element if it's present
|
|
46
|
+
*/
|
|
47
|
+
const ariaLabelledbyAttr = clsx(titleId || bodyId, stepsIndicatorId);
|
|
48
|
+
return jsx(GuidedTooltipContext.Provider, {
|
|
49
|
+
value: contextProviderValue,
|
|
50
|
+
children: jsxs(RadixPopover.Content, {
|
|
51
|
+
...rest,
|
|
52
|
+
ref: forwardedRef,
|
|
53
|
+
align: align,
|
|
54
|
+
"aria-labelledby": ariaLabelledbyAttr,
|
|
55
|
+
arrowPadding: ARROW_PADDING_IN_PX,
|
|
56
|
+
className: clsx(styles.content, className),
|
|
57
|
+
onInteractOutside: onInteractOutside,
|
|
58
|
+
side: side,
|
|
59
|
+
sideOffset: sideOffset,
|
|
60
|
+
children: [content, jsx(RadixPopover.Close, {
|
|
61
|
+
asChild: true,
|
|
62
|
+
children: jsx(IconButton, {
|
|
63
|
+
"aria-label": closeLabel,
|
|
64
|
+
className: styles.closeButton,
|
|
65
|
+
icon: XMark
|
|
66
|
+
})
|
|
67
|
+
}), jsx(RadixPopover.Arrow, {
|
|
68
|
+
asChild: true,
|
|
69
|
+
height: 16,
|
|
70
|
+
width: 34,
|
|
71
|
+
children: jsx("div", {
|
|
72
|
+
className: styles.arrow
|
|
73
|
+
})
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
/**
|
|
79
|
+
* A component used to wrap any other component, giving it a GuidedTooltip.
|
|
80
|
+
*
|
|
81
|
+
* * [Radix-UI link](https://www.radix-ui.com/docs/primitives/components/popover)
|
|
82
|
+
*/
|
|
83
|
+
const GuidedTooltipComponent = ({
|
|
84
|
+
children,
|
|
85
|
+
onOpenChange,
|
|
86
|
+
open,
|
|
87
|
+
container,
|
|
88
|
+
...guidedTooltipContentProps
|
|
89
|
+
}) => jsxs(RadixPopover.Root, {
|
|
90
|
+
onOpenChange: onOpenChange,
|
|
91
|
+
open: open,
|
|
92
|
+
children: [jsx(RadixPopover.Anchor, {
|
|
93
|
+
children: children
|
|
94
|
+
}), jsx(RadixPopover.Portal, {
|
|
95
|
+
container: container,
|
|
96
|
+
children: jsx(GuidedTooltipContent, {
|
|
97
|
+
...guidedTooltipContentProps
|
|
98
|
+
})
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
const GuidedTooltip = Object.assign(GuidedTooltipComponent, {
|
|
102
|
+
Body: GuidedTooltipBody,
|
|
103
|
+
Footer: GuidedTooltipFooter,
|
|
104
|
+
Icon: GuidedTooltipIcon,
|
|
105
|
+
Illustration: GuidedTooltipIllustration,
|
|
106
|
+
Text: GuidedTooltipText,
|
|
107
|
+
Title: GuidedTooltipTitle
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export { GuidedTooltip };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../index.css';
|
|
2
|
+
var styles = {"content":"guided-tooltip-module_content__4P0jU","body":"guided-tooltip-module_body__lf6-N","noTitle":"guided-tooltip-module_noTitle__C-rQU","title":"guided-tooltip-module_title__WjhyT","footer":"guided-tooltip-module_footer__dvCqt","actionButtons":"guided-tooltip-module_actionButtons__JCj8T","stepsIndicator":"guided-tooltip-module_stepsIndicator__hkoGZ","closeButton":"guided-tooltip-module_closeButton__ZVZcg","arrow":"guided-tooltip-module_arrow__JCGwC","icon":"guided-tooltip-module_icon__FZnIm","illustration":"guided-tooltip-module_illustration__CU2kK"};
|
|
3
|
+
|
|
4
|
+
export { styles as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { GuidedTooltip } from './guided-tooltip';
|
|
2
|
+
export { type GuidedTooltipActionsContainerProps, type GuidedTooltipBodyProps, type GuidedTooltipFooterProps, type GuidedTooltipIconProps, type GuidedTooltipIllustrationProps, type GuidedTooltipProps, type GuidedTooltipStepsIndicatorProps, type GuidedTooltipTitleProps, } from './types';
|
|
3
|
+
export { GuidedTooltipContext } from './utils/guided-tooltip-context';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type * as RadixPopover from '@radix-ui/react-popover';
|
|
2
|
+
import { type FunctionComponent, type PropsWithChildren, type SVGProps } from 'react';
|
|
3
|
+
export interface GuidedTooltipContentProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
4
|
+
/** The preferred alignment against the anchor. May change when collisions occur.
|
|
5
|
+
* "start" | "center" | "end"
|
|
6
|
+
* Default value: "center". */
|
|
7
|
+
align?: RadixPopover.PopoverContentProps['align'];
|
|
8
|
+
/** The anchor for the tooltip. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Localized aria-label for close button */
|
|
11
|
+
closeLabel: string;
|
|
12
|
+
/** React element with the content of GuildedTooltip */
|
|
13
|
+
content: React.ReactElement;
|
|
14
|
+
/** The preferred side of the anchor to render against. Will be reversed when collisions occur.
|
|
15
|
+
* "top" | "right" | "bottom" | "left"
|
|
16
|
+
* Default value: "bottom". */
|
|
17
|
+
side?: RadixPopover.PopoverContentProps['side'];
|
|
18
|
+
/** The offset that GuidedTooltip will be moved from anchor element, in pixels. "3" by default. */
|
|
19
|
+
sideOffset?: RadixPopover.PopoverContentProps['sideOffset'];
|
|
20
|
+
}
|
|
21
|
+
export interface GuidedTooltipProps extends GuidedTooltipContentProps {
|
|
22
|
+
/** The anchor for the tooltip. */
|
|
23
|
+
children: React.ReactNode | React.ReactNode[];
|
|
24
|
+
/** Element that will be a container for Portal in wich GuidedTooltip is rendered. */
|
|
25
|
+
container?: HTMLElement | null;
|
|
26
|
+
/** The controlled open state of the tooltip. Must be used in conjunction with onOpenChange. */
|
|
27
|
+
open: RadixPopover.PopoverProps['open'];
|
|
28
|
+
/** Event handler called when the open state of the tooltip changes. */
|
|
29
|
+
onOpenChange?: RadixPopover.PopoverProps['onOpenChange'];
|
|
30
|
+
}
|
|
31
|
+
export interface GuidedTooltipTextProps {
|
|
32
|
+
/** The content of the GuidedTooltipText. */
|
|
33
|
+
children: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GuidedTooltipBodyProps {
|
|
36
|
+
/** The content of the GuidedTooltip. */
|
|
37
|
+
children: React.ReactNode | React.ReactNode[];
|
|
38
|
+
/** Additional className to pass to GuidedTooltip Body */
|
|
39
|
+
className?: string;
|
|
40
|
+
/**
|
|
41
|
+
* SVG Icon element to pass to GuidedTooltip Body
|
|
42
|
+
* */
|
|
43
|
+
icon?: FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
44
|
+
}
|
|
45
|
+
export interface GuidedTooltipFooterProps {
|
|
46
|
+
/** The content of the GuidedTooltip. */
|
|
47
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
48
|
+
/** Additional className to pass to GuidedTooltip Footer */
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface GuidedTooltipIconProps {
|
|
52
|
+
/** Additional className to pass to GuidedTooltip Icon */
|
|
53
|
+
className?: string;
|
|
54
|
+
/**
|
|
55
|
+
* SVG Icon element to pass to GuidedTooltip Icon
|
|
56
|
+
* */
|
|
57
|
+
icon: FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
58
|
+
}
|
|
59
|
+
export interface GuidedTooltipTitleProps {
|
|
60
|
+
/** Title content. */
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Additional className to pass to GuidedTooltip Footer
|
|
64
|
+
*/
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface GuidedTooltipStepsIndicatorProps {
|
|
68
|
+
/**
|
|
69
|
+
* StepsIndicator text
|
|
70
|
+
*/
|
|
71
|
+
children: string;
|
|
72
|
+
/**
|
|
73
|
+
* Additional className to pass to GuidedTooltip StepsIndicator
|
|
74
|
+
*/
|
|
75
|
+
className?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface GuidedTooltipActionsContainerProps {
|
|
78
|
+
/**
|
|
79
|
+
* Additional className to pass to GuidedTooltip ActionButtons
|
|
80
|
+
*/
|
|
81
|
+
className?: string;
|
|
82
|
+
/** The content of the GuidedTooltip ActionButtons */
|
|
83
|
+
children: React.ReactNode | React.ReactNode[];
|
|
84
|
+
}
|
|
85
|
+
export interface GuidedTooltipIllustrationProps {
|
|
86
|
+
/**
|
|
87
|
+
* Alternative text for image
|
|
88
|
+
*/
|
|
89
|
+
altText?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Image URL
|
|
92
|
+
*/
|
|
93
|
+
imgUrl: string;
|
|
94
|
+
/**
|
|
95
|
+
* Additional className to pass to GuidedTooltip Illustration
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface GuidedTooltipContextData {
|
|
3
|
+
bodyId?: string;
|
|
4
|
+
setBodyId: (bodyId: string) => void;
|
|
5
|
+
setStepsIndicatorId: (stepsIndicatorId: string) => void;
|
|
6
|
+
setTitleId: (titleId: string) => void;
|
|
7
|
+
stepsIndicatorId?: string;
|
|
8
|
+
titleId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const GuidedTooltipContext: import("react").Context<GuidedTooltipContextData | undefined>;
|
|
11
|
+
export declare const useGuidedTooltipContext: () => GuidedTooltipContextData;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
const GuidedTooltipContext = /*#__PURE__*/createContext(undefined);
|
|
4
|
+
const useGuidedTooltipContext = () => {
|
|
5
|
+
const guidedTooltipContextData = useContext(GuidedTooltipContext);
|
|
6
|
+
if (!guidedTooltipContextData) {
|
|
7
|
+
throw new Error('The useGuidedTooltipContext hook must be used within a GuidedTooltipContext.Provider');
|
|
8
|
+
}
|
|
9
|
+
return guidedTooltipContextData;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { GuidedTooltipContext, useGuidedTooltipContext };
|