@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,18 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { BaseGridList } from '../../util-components/base-grid-list-item/base-grid-list.js';
|
|
4
|
+
|
|
5
|
+
const SmallList = /*#__PURE__*/forwardRef(function SmallList(props, forwardedRef) {
|
|
6
|
+
const {
|
|
7
|
+
children,
|
|
8
|
+
...rest
|
|
9
|
+
} = props;
|
|
10
|
+
return jsx(BaseGridList, {
|
|
11
|
+
...rest,
|
|
12
|
+
ref: forwardedRef,
|
|
13
|
+
layout: "small-list",
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export { SmallList };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type BaseGridListHeaderProps, type BaseGridListItemProps, type BaseGridListProps, type BaseGridListSubtitleProps, type BaseGridListThumbnailProps } from '../../util-components/base-grid-list-item';
|
|
2
|
+
export type SmallListHeaderProps = BaseGridListHeaderProps;
|
|
3
|
+
export type SmallListThumbnailProps = BaseGridListThumbnailProps;
|
|
4
|
+
export type SmallListSubtitleProps = BaseGridListSubtitleProps;
|
|
5
|
+
export type SmallListProps = Omit<BaseGridListProps, 'layout'>;
|
|
6
|
+
export type SmallListItemProps = BaseGridListItemProps;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* This extends a default HTML <input/> and accepts the same props as well as some custom ones listed below.<br/>
|
|
4
|
+
*
|
|
5
|
+
* **IMPORTANT **: Since input uses tooltip to display error message, it must be placed inside a single <b>TooltipProvider</b> component provided by the app, see [issue on github](https://github.com/radix-ui/primitives/issues/1712) and [radix docs](https://www.radix-ui.com/docs/primitives/components/tooltip#provider).
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare const TextInput: import("react").ForwardRefExoticComponent<(Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
label: string;
|
|
12
|
+
type?: "text" | undefined;
|
|
13
|
+
hideLabel?: boolean | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
|
+
required?: boolean | undefined;
|
|
16
|
+
error?: import("react").ReactNode;
|
|
17
|
+
} & Required<Pick<{
|
|
18
|
+
loading?: boolean | undefined;
|
|
19
|
+
loadingAriaLabel?: string | undefined;
|
|
20
|
+
}, keyof {
|
|
21
|
+
loading?: boolean | undefined;
|
|
22
|
+
loadingAriaLabel?: string | undefined;
|
|
23
|
+
}>> & Omit<{
|
|
24
|
+
loading?: boolean | undefined;
|
|
25
|
+
loadingAriaLabel?: string | undefined;
|
|
26
|
+
}, keyof {
|
|
27
|
+
loading?: boolean | undefined;
|
|
28
|
+
loadingAriaLabel?: string | undefined;
|
|
29
|
+
}>, "ref"> | Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
30
|
+
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
label: string;
|
|
33
|
+
type?: "text" | undefined;
|
|
34
|
+
hideLabel?: boolean | undefined;
|
|
35
|
+
disabled?: boolean | undefined;
|
|
36
|
+
required?: boolean | undefined;
|
|
37
|
+
error?: import("react").ReactNode;
|
|
38
|
+
} & Partial<Record<keyof {
|
|
39
|
+
loading?: boolean | undefined;
|
|
40
|
+
loadingAriaLabel?: string | undefined;
|
|
41
|
+
}, never>> & Omit<{
|
|
42
|
+
loading?: boolean | undefined;
|
|
43
|
+
loadingAriaLabel?: string | undefined;
|
|
44
|
+
}, keyof {
|
|
45
|
+
loading?: boolean | undefined;
|
|
46
|
+
loadingAriaLabel?: string | undefined;
|
|
47
|
+
}>, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
|
|
48
|
+
export default TextInput;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { forwardRef, useRef, useCallback } from 'react';
|
|
5
|
+
import { LoadingIndicator } from '../../loading-indicator/loading-indicator.js';
|
|
6
|
+
import { InlineError } from '../../primitives/inline-error/inline-error.js';
|
|
7
|
+
import { useForkRef } from '../../utils/useForkRef.js';
|
|
8
|
+
import { useUniqueId } from '../../utils/useUniqueId.js';
|
|
9
|
+
import styles from './text-input.module.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This extends a default HTML <input/> and accepts the same props as well as some custom ones listed below.<br/>
|
|
13
|
+
*
|
|
14
|
+
* **IMPORTANT **: Since input uses tooltip to display error message, it must be placed inside a single <b>TooltipProvider</b> component provided by the app, see [issue on github](https://github.com/radix-ui/primitives/issues/1712) and [radix docs](https://www.radix-ui.com/docs/primitives/components/tooltip#provider).
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
18
|
+
const {
|
|
19
|
+
className,
|
|
20
|
+
label,
|
|
21
|
+
type = 'text',
|
|
22
|
+
disabled,
|
|
23
|
+
hideLabel,
|
|
24
|
+
error,
|
|
25
|
+
loading = false,
|
|
26
|
+
loadingAriaLabel,
|
|
27
|
+
required = false,
|
|
28
|
+
...rest
|
|
29
|
+
} = props;
|
|
30
|
+
const inputRef = useRef(null);
|
|
31
|
+
const inputId = useUniqueId('input-');
|
|
32
|
+
const focusInput = useCallback(() => {
|
|
33
|
+
inputRef.current?.focus();
|
|
34
|
+
}, []);
|
|
35
|
+
const hasError = !!error && !disabled;
|
|
36
|
+
const isLoading = !disabled && loading && loadingAriaLabel;
|
|
37
|
+
return jsxs(Fragment, {
|
|
38
|
+
children: [jsxs("div", {
|
|
39
|
+
className: clsx([styles.textInputContainer], {
|
|
40
|
+
[styles.disabled]: disabled,
|
|
41
|
+
[styles.error]: hasError
|
|
42
|
+
}, className),
|
|
43
|
+
children: [jsx("label", {
|
|
44
|
+
className: clsx([styles.label], {
|
|
45
|
+
[styles.hidden]: hideLabel
|
|
46
|
+
}),
|
|
47
|
+
htmlFor: inputId,
|
|
48
|
+
children: hideLabel ? jsx(VisuallyHidden, {
|
|
49
|
+
children: label
|
|
50
|
+
}) : label
|
|
51
|
+
}), jsx("input", {
|
|
52
|
+
...rest,
|
|
53
|
+
ref: useForkRef(inputRef, forwardedRef),
|
|
54
|
+
"aria-invalid": hasError,
|
|
55
|
+
"aria-required": required,
|
|
56
|
+
className: clsx([styles.textInput], {
|
|
57
|
+
[styles.error]: hasError,
|
|
58
|
+
[styles.loading]: isLoading
|
|
59
|
+
}),
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
id: inputId,
|
|
62
|
+
required: required,
|
|
63
|
+
type: type
|
|
64
|
+
}), isLoading && jsx(LoadingIndicator, {
|
|
65
|
+
"aria-label": loadingAriaLabel,
|
|
66
|
+
className: styles.loadingIndicator,
|
|
67
|
+
onClick: focusInput
|
|
68
|
+
})]
|
|
69
|
+
}), jsx(InlineError, {
|
|
70
|
+
className: styles.inlineError,
|
|
71
|
+
children: error
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
TextInput.displayName = 'TextInput';
|
|
76
|
+
|
|
77
|
+
export { TextInput, TextInput as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../../index.css';
|
|
2
|
+
var styles = {"textInputContainer":"text-input-module_textInputContainer__UJn59","label":"text-input-module_label__rQIWV","hidden":"text-input-module_hidden__mVumP","textInput":"text-input-module_textInput__i84NX","error":"text-input-module_error__8-X6N","loading":"text-input-module_loading__2bK9g","loadingIndicator":"text-input-module_loadingIndicator__QF0cs","disabled":"text-input-module_disabled__FFmmn","inlineError":"text-input-module_inlineError__mQlWE"};
|
|
3
|
+
|
|
4
|
+
export { styles as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type RequireAllOrNone } from 'type-fest';
|
|
3
|
+
type Loading = {
|
|
4
|
+
/** When true input is renedered with loading indicator. When this is true `loadingAriaLabel` must also be provided. */
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
/** The aria-label for the loading indicator. */
|
|
7
|
+
loadingAriaLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
export type TextInputProps = React.ComponentPropsWithRef<'input'> & {
|
|
10
|
+
/** The label for text input */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Input type, defaults to 'text' */
|
|
13
|
+
type?: 'text';
|
|
14
|
+
/** When true label text is hidden */
|
|
15
|
+
hideLabel?: boolean;
|
|
16
|
+
/** When true prevents user interaction with input */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** When true it indicates input field must be filled out */
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/** Content of error message */
|
|
21
|
+
error?: React.ReactNode;
|
|
22
|
+
} & RequireAllOrNone<Loading, keyof Loading>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCustomBranding: (brandColor: string) => void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BoxBlue100, Gray65 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
2
|
+
import { useEnhancedEffect } from '../utils/useEnhancedEffect.js';
|
|
3
|
+
import { createTheme } from './utils/createTheme.js';
|
|
4
|
+
|
|
5
|
+
const useCustomBranding = brandColor => {
|
|
6
|
+
useEnhancedEffect(() => {
|
|
7
|
+
const buieTheme = createTheme(brandColor);
|
|
8
|
+
const isBrandingEnabled = brandColor.toLowerCase() !== BoxBlue100.toLowerCase();
|
|
9
|
+
// Create a new stylsheet, insert it into the DOM and add style rules
|
|
10
|
+
const stylesheet = document.createElement('style');
|
|
11
|
+
// add data-blueprint property for debugging
|
|
12
|
+
stylesheet.dataset.blueprint = '';
|
|
13
|
+
document.head.appendChild(stylesheet);
|
|
14
|
+
stylesheet.sheet?.insertRule(`:root {
|
|
15
|
+
/* Button branding tokens */
|
|
16
|
+
--text-text-brand-on-color: ${buieTheme.primary.buttonForeground};
|
|
17
|
+
--surface-surface-brand: ${buieTheme.primary.buttonBackground};
|
|
18
|
+
--surface-surface-brand-hover: ${buieTheme.primary.buttonBackgroundHover};
|
|
19
|
+
--surface-surface-brand-pressed: ${buieTheme.primary.buttonBackgroundActive};
|
|
20
|
+
/* BUIE Theme has no token for disabled and busy button. Setting to default TODO: Confirm with designers */
|
|
21
|
+
--surface-surface-brand-disabled: ${buieTheme.primary.buttonBackground};
|
|
22
|
+
--surface-surface-brand-busy: ${buieTheme.primary.buttonBackground};
|
|
23
|
+
|
|
24
|
+
/* Nav branding tokens */
|
|
25
|
+
--surface-nav-surface-brand-selected-focus: ${buieTheme.primary.backgroundActive};
|
|
26
|
+
--surface-nav-surface-brand-selected: ${buieTheme.primary.backgroundActive};
|
|
27
|
+
--surface-nav-surface-brand-focus: ${buieTheme.primary.backgroundActive};
|
|
28
|
+
--surface-nav-surface-brand-hover: ${buieTheme.primary.backgroundHover};
|
|
29
|
+
--surface-nav-surface-brand: ${buieTheme.primary.background};
|
|
30
|
+
|
|
31
|
+
/* Illustrations branding tokens */
|
|
32
|
+
--surface-illustration-surface-box-neutral: ${isBrandingEnabled ? Gray65 : BoxBlue100}
|
|
33
|
+
}`, 0);
|
|
34
|
+
return () => {
|
|
35
|
+
document.head.removeChild(stylesheet);
|
|
36
|
+
};
|
|
37
|
+
}, [brandColor]);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { useCustomBranding };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const THEME_VERY_DARK = "vDark";
|
|
2
|
+
export declare const THEME_DARK = "dark";
|
|
3
|
+
export declare const THEME_MID_DARK = "midDark";
|
|
4
|
+
export declare const THEME_MIDTONE = "midTone";
|
|
5
|
+
export declare const THEME_MID_LIGHT = "midLight";
|
|
6
|
+
export declare const THEME_VERY_LIGHT = "vLight";
|
|
7
|
+
export declare const MIN_CONTRAST = 4.5;
|
|
8
|
+
declare function createTheme(colorKey: string): {
|
|
9
|
+
base: {
|
|
10
|
+
background: string;
|
|
11
|
+
backgroundHover: string;
|
|
12
|
+
backgroundActive: string;
|
|
13
|
+
foreground: string;
|
|
14
|
+
border: string;
|
|
15
|
+
buttonForeground: string;
|
|
16
|
+
buttonBackground: string;
|
|
17
|
+
buttonBackgroundHover: string;
|
|
18
|
+
buttonBackgroundActive: string;
|
|
19
|
+
buttonBorder: string;
|
|
20
|
+
buttonBorderHover: string;
|
|
21
|
+
buttonBorderActive: string;
|
|
22
|
+
progressBarBackground: string;
|
|
23
|
+
scrollShadowRgba: string;
|
|
24
|
+
gridUnitPx: number;
|
|
25
|
+
};
|
|
26
|
+
primary: {
|
|
27
|
+
background: string;
|
|
28
|
+
backgroundActive: string;
|
|
29
|
+
backgroundGradient: string;
|
|
30
|
+
backgroundHover: string;
|
|
31
|
+
border: string;
|
|
32
|
+
buttonBackground: string;
|
|
33
|
+
buttonBackgroundActive: string;
|
|
34
|
+
buttonBackgroundHover: string;
|
|
35
|
+
buttonBorder: string;
|
|
36
|
+
buttonBorderActive: string;
|
|
37
|
+
buttonBorderHover: string;
|
|
38
|
+
buttonForeground: string;
|
|
39
|
+
foreground: string;
|
|
40
|
+
progressBarBackground: string;
|
|
41
|
+
scrollShadowRgba: string;
|
|
42
|
+
};
|
|
43
|
+
modes: {
|
|
44
|
+
admin: {};
|
|
45
|
+
dark: {};
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
primary: {
|
|
49
|
+
_debug: {
|
|
50
|
+
colorRange: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
background: any;
|
|
53
|
+
backgroundHover: any;
|
|
54
|
+
backgroundActive: any;
|
|
55
|
+
backgroundGradient: any;
|
|
56
|
+
foreground: any;
|
|
57
|
+
border: any;
|
|
58
|
+
buttonForeground: any;
|
|
59
|
+
buttonBackground: any;
|
|
60
|
+
buttonBackgroundHover: any;
|
|
61
|
+
buttonBackgroundActive: any;
|
|
62
|
+
buttonBorder: any;
|
|
63
|
+
buttonBorderHover: any;
|
|
64
|
+
buttonBorderActive: any;
|
|
65
|
+
progressBarBackground: any;
|
|
66
|
+
scrollShadowRgba: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export { createTheme };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import Color from 'color';
|
|
2
|
+
import mapValues from 'lodash/mapValues';
|
|
3
|
+
import merge from 'lodash/merge';
|
|
4
|
+
import method from 'lodash/method';
|
|
5
|
+
import theme from './theme.js';
|
|
6
|
+
import { white, black, bdlGray10, bdlGray, bdlGray80, bdlGray65, bdlGray50 } from './variables.js';
|
|
7
|
+
|
|
8
|
+
/* eslint-disable no-restricted-syntax */
|
|
9
|
+
/* ----------------- Theme ---------------------------*/
|
|
10
|
+
const THEME_VERY_DARK = 'vDark';
|
|
11
|
+
const THEME_DARK = 'dark';
|
|
12
|
+
const THEME_MID_DARK = 'midDark';
|
|
13
|
+
const THEME_MIDTONE = 'midTone';
|
|
14
|
+
const THEME_MID_LIGHT = 'midLight';
|
|
15
|
+
const THEME_VERY_LIGHT = 'vLight';
|
|
16
|
+
// When converting from rgb/hsl to hex there is potential for
|
|
17
|
+
// flattening of the color space, so we add an offset factor to account for it.
|
|
18
|
+
const OFFSET_FACTOR = 0.05;
|
|
19
|
+
const MIN_CONTRAST = 4.5;
|
|
20
|
+
// The yiq coefficients in the color library are incorrect
|
|
21
|
+
// http://poynton.ca/notes/colour_and_gamma/ColorFAQ.html#RTFToC9
|
|
22
|
+
function getYiq(color) {
|
|
23
|
+
const rgb = Color(color).rgb().array();
|
|
24
|
+
return (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;
|
|
25
|
+
}
|
|
26
|
+
function adjustLightness(color, amount) {
|
|
27
|
+
const lightness = color.lightness();
|
|
28
|
+
return color.lightness(lightness + amount);
|
|
29
|
+
}
|
|
30
|
+
// Given a colorKey, output an accessible Box color palette
|
|
31
|
+
function createTheme(colorKey) {
|
|
32
|
+
if (!colorKey) {
|
|
33
|
+
throw new Error('Color key is undefined');
|
|
34
|
+
}
|
|
35
|
+
const colorKeyObj = Color(colorKey);
|
|
36
|
+
const colorKeyYiq = getYiq(colorKey);
|
|
37
|
+
const colorKeyLightness = colorKeyObj.lightness();
|
|
38
|
+
const whiteTextContrast = colorKeyObj.contrast(Color(white));
|
|
39
|
+
const blackTextContrast = colorKeyObj.contrast(Color(black));
|
|
40
|
+
// Take the greater contrasting foreground color
|
|
41
|
+
const foreground = whiteTextContrast > blackTextContrast ? white : black;
|
|
42
|
+
const foregroundObj = Color(foreground);
|
|
43
|
+
// vDark dark midDark midtone midLight vLight
|
|
44
|
+
// |----|-----|-----------|----|----|-----------|----|
|
|
45
|
+
// 0 4 20 118 128 168 235 255
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
|
+
const colorMap = {
|
|
48
|
+
[THEME_VERY_DARK]: {
|
|
49
|
+
yiqRange: [0, 4],
|
|
50
|
+
modifiers: {
|
|
51
|
+
active: 15,
|
|
52
|
+
gradient: 10,
|
|
53
|
+
hover: 10
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
[THEME_DARK]: {
|
|
57
|
+
yiqRange: [4, 20],
|
|
58
|
+
modifiers: {
|
|
59
|
+
active: 8,
|
|
60
|
+
gradient: 5,
|
|
61
|
+
hover: 4
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
[THEME_MID_DARK]: {
|
|
65
|
+
yiqRange: [20, 118],
|
|
66
|
+
modifiers: {
|
|
67
|
+
active: -8,
|
|
68
|
+
gradient: -5,
|
|
69
|
+
hover: 4
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
[THEME_MIDTONE]: {
|
|
73
|
+
yiqRange: [118, 168],
|
|
74
|
+
modifiers: {
|
|
75
|
+
active: -7,
|
|
76
|
+
activeInverse: 9,
|
|
77
|
+
gradient: -7,
|
|
78
|
+
hover: 7,
|
|
79
|
+
hoverInverse: -4
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
[THEME_MID_LIGHT]: {
|
|
83
|
+
yiqRange: [168, 235],
|
|
84
|
+
modifiers: {
|
|
85
|
+
active: 15,
|
|
86
|
+
gradient: -10,
|
|
87
|
+
hover: 10
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
[THEME_VERY_LIGHT]: {
|
|
91
|
+
yiqRange: [235, 256],
|
|
92
|
+
lightnessThreshold: 90,
|
|
93
|
+
modifiers: {
|
|
94
|
+
active: -8,
|
|
95
|
+
gradient: -5,
|
|
96
|
+
hover: -4
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
// Filter down the color map to the object that's in the proper YIQ range
|
|
101
|
+
const colorRange = Object.keys(colorMap).find(key => colorKeyYiq >= colorMap[key].yiqRange[0] && colorKeyYiq < colorMap[key].yiqRange[1] || colorMap[key].lightnessThreshold && colorKeyLightness >= colorMap[key].lightnessThreshold);
|
|
102
|
+
const colorRangeConfig = {
|
|
103
|
+
...colorMap[colorRange || THEME_MIDTONE]
|
|
104
|
+
};
|
|
105
|
+
// Modify the primary colorKey with the associated modifiers from the filtered map
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
+
const modifiedColors = {};
|
|
108
|
+
for (const [key, value] of Object.entries(colorRangeConfig.modifiers)) {
|
|
109
|
+
// $FlowFixMe
|
|
110
|
+
modifiedColors[key] = adjustLightness(colorKeyObj, value);
|
|
111
|
+
}
|
|
112
|
+
// If the color is too extreme on either end of the spectrum we need to change our rules.
|
|
113
|
+
const exceedsLightThreshold = colorRange === THEME_VERY_LIGHT || colorRange === THEME_MID_LIGHT;
|
|
114
|
+
const exceedsDarkThreshold = colorRange === THEME_VERY_DARK || colorRange === THEME_DARK;
|
|
115
|
+
// Light or dark isn't sufficient for determining how the secondary or accent colors should
|
|
116
|
+
// be calculated. In addition to that check, we will check the yiq value of the color to ensure
|
|
117
|
+
// the colorKey is not on the edges of the spectrum.
|
|
118
|
+
const hoverContrast = modifiedColors.hover.contrast(foregroundObj);
|
|
119
|
+
// If contrast has reached 21, we have hit the end of the spectrum and want to invert.
|
|
120
|
+
const hover = hoverContrast >= MIN_CONTRAST + OFFSET_FACTOR && hoverContrast !== 21 ? modifiedColors.hover : modifiedColors.hoverInverse || adjustLightness(colorKeyObj, -colorRangeConfig.modifiers.hover);
|
|
121
|
+
const activeContrast = modifiedColors.active.contrast(foregroundObj);
|
|
122
|
+
const active = activeContrast >= MIN_CONTRAST + OFFSET_FACTOR && activeContrast !== 21 ? modifiedColors.active : modifiedColors.activeInverse || adjustLightness(colorKeyObj, -colorRangeConfig.modifiers.active);
|
|
123
|
+
let scrollShadowRgba = 'rgba(0, 0, 0, 0.12)';
|
|
124
|
+
if (exceedsLightThreshold) {
|
|
125
|
+
scrollShadowRgba = 'rgba(0, 0, 0, 0.08)';
|
|
126
|
+
} else if (exceedsDarkThreshold) {
|
|
127
|
+
scrollShadowRgba = 'rgba(0, 0, 0, 0.4)';
|
|
128
|
+
}
|
|
129
|
+
// Converting color objects to hex for return value
|
|
130
|
+
const colorKeyHex = colorKeyObj.hex();
|
|
131
|
+
const hoverHex = hover.hex();
|
|
132
|
+
const activeHex = active.hex();
|
|
133
|
+
const gradientHex = modifiedColors.gradient.hex();
|
|
134
|
+
const colorValues = {
|
|
135
|
+
background: colorKeyHex,
|
|
136
|
+
backgroundHover: hoverHex,
|
|
137
|
+
backgroundActive: activeHex,
|
|
138
|
+
backgroundGradient: gradientHex,
|
|
139
|
+
foreground,
|
|
140
|
+
border: exceedsLightThreshold ? bdlGray10 : colorKeyHex,
|
|
141
|
+
// Button specific overrides. If the primary color is greater than the lightness threshold
|
|
142
|
+
// we will override the button styling to be a styling based on vars.bdlGray primary.
|
|
143
|
+
buttonForeground: exceedsLightThreshold ? white : foreground,
|
|
144
|
+
buttonBackground: exceedsLightThreshold ? bdlGray : colorKeyHex,
|
|
145
|
+
buttonBackgroundHover: exceedsLightThreshold ? bdlGray80 : hoverHex,
|
|
146
|
+
buttonBackgroundActive: exceedsLightThreshold ? bdlGray65 : activeHex,
|
|
147
|
+
buttonBorder: exceedsLightThreshold ? bdlGray : colorKeyHex,
|
|
148
|
+
buttonBorderHover: exceedsLightThreshold ? bdlGray80 : hoverHex,
|
|
149
|
+
buttonBorderActive: exceedsLightThreshold ? bdlGray65 : activeHex,
|
|
150
|
+
// ProgressBar overrides
|
|
151
|
+
progressBarBackground: exceedsLightThreshold ? bdlGray50 : hoverHex,
|
|
152
|
+
// Scroll effect overrides for scrollable themed elements
|
|
153
|
+
scrollShadowRgba
|
|
154
|
+
};
|
|
155
|
+
const dynamicTheme = {
|
|
156
|
+
// To avoid a mixture of casing, we force all values to lower
|
|
157
|
+
primary: {
|
|
158
|
+
...mapValues(colorValues, method('toLowerCase')),
|
|
159
|
+
_debug: {
|
|
160
|
+
colorRange
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
return merge({}, theme, dynamicTheme);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { MIN_CONTRAST, THEME_DARK, THEME_MIDTONE, THEME_MID_DARK, THEME_MID_LIGHT, THEME_VERY_DARK, THEME_VERY_LIGHT, createTheme };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const theme: {
|
|
2
|
+
base: {
|
|
3
|
+
background: string;
|
|
4
|
+
backgroundHover: string;
|
|
5
|
+
backgroundActive: string;
|
|
6
|
+
foreground: string;
|
|
7
|
+
border: string;
|
|
8
|
+
buttonForeground: string;
|
|
9
|
+
buttonBackground: string;
|
|
10
|
+
buttonBackgroundHover: string;
|
|
11
|
+
buttonBackgroundActive: string;
|
|
12
|
+
buttonBorder: string;
|
|
13
|
+
buttonBorderHover: string;
|
|
14
|
+
buttonBorderActive: string;
|
|
15
|
+
progressBarBackground: string;
|
|
16
|
+
scrollShadowRgba: string;
|
|
17
|
+
gridUnitPx: number;
|
|
18
|
+
};
|
|
19
|
+
primary: {
|
|
20
|
+
background: string;
|
|
21
|
+
backgroundActive: string;
|
|
22
|
+
backgroundGradient: string;
|
|
23
|
+
backgroundHover: string;
|
|
24
|
+
border: string;
|
|
25
|
+
buttonBackground: string;
|
|
26
|
+
buttonBackgroundActive: string;
|
|
27
|
+
buttonBackgroundHover: string;
|
|
28
|
+
buttonBorder: string;
|
|
29
|
+
buttonBorderActive: string;
|
|
30
|
+
buttonBorderHover: string;
|
|
31
|
+
buttonForeground: string;
|
|
32
|
+
foreground: string;
|
|
33
|
+
progressBarBackground: string;
|
|
34
|
+
scrollShadowRgba: string;
|
|
35
|
+
};
|
|
36
|
+
modes: {
|
|
37
|
+
admin: {};
|
|
38
|
+
dark: {};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default theme;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { white, bdlGray05, bdlGray10, bdlGray, bdlGray30, black, bdlGray40, bdlGridUnitPx, bdlBoxBlue } from './variables.js';
|
|
2
|
+
|
|
3
|
+
// Copy of https://github.com/box/box-ui-elements/blob/830bf71bef5720a5e6ba128afa35152112674c17/src/styles/theme.js
|
|
4
|
+
const theme = {
|
|
5
|
+
base: {
|
|
6
|
+
background: white,
|
|
7
|
+
backgroundHover: bdlGray05,
|
|
8
|
+
backgroundActive: bdlGray10,
|
|
9
|
+
foreground: bdlGray,
|
|
10
|
+
border: bdlGray30,
|
|
11
|
+
buttonForeground: black,
|
|
12
|
+
buttonBackground: white,
|
|
13
|
+
buttonBackgroundHover: bdlGray05,
|
|
14
|
+
buttonBackgroundActive: bdlGray10,
|
|
15
|
+
buttonBorder: bdlGray30,
|
|
16
|
+
buttonBorderHover: bdlGray30,
|
|
17
|
+
buttonBorderActive: bdlGray30,
|
|
18
|
+
progressBarBackground: bdlGray40,
|
|
19
|
+
scrollShadowRgba: 'rgba(0, 0, 0, 0.12)',
|
|
20
|
+
gridUnitPx: parseInt(bdlGridUnitPx, 10) // grid unit in pixels (as number for computations)
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// Primary or brand color
|
|
24
|
+
primary: {
|
|
25
|
+
background: bdlBoxBlue,
|
|
26
|
+
backgroundActive: '#004eac',
|
|
27
|
+
backgroundGradient: '#0055bc',
|
|
28
|
+
backgroundHover: '#006ae9',
|
|
29
|
+
border: bdlBoxBlue,
|
|
30
|
+
buttonBackground: bdlBoxBlue,
|
|
31
|
+
buttonBackgroundActive: '#004eac',
|
|
32
|
+
buttonBackgroundHover: '#006ae9',
|
|
33
|
+
buttonBorder: bdlBoxBlue,
|
|
34
|
+
buttonBorderActive: '#004eac',
|
|
35
|
+
buttonBorderHover: '#006ae9',
|
|
36
|
+
buttonForeground: white,
|
|
37
|
+
foreground: white,
|
|
38
|
+
progressBarBackground: '#006ae9',
|
|
39
|
+
scrollShadowRgba: 'rgba(0, 0, 0, 0.12)'
|
|
40
|
+
},
|
|
41
|
+
// TODO: Should be the same keys as the default if applicable
|
|
42
|
+
modes: {
|
|
43
|
+
admin: {},
|
|
44
|
+
dark: {}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { theme as default };
|