@salesforce/design-system-react 11.0.0-alpha.3 → 11.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -70
- package/dist/cjs/components/accordion/index.cjs +1 -1
- package/dist/cjs/components/accordion/index.cjs.map +1 -1
- package/dist/cjs/components/alert/index.cjs +1 -1
- package/dist/cjs/components/alert/index.cjs.map +1 -1
- package/dist/cjs/components/avatar/index.cjs +1 -1
- package/dist/cjs/components/avatar/index.cjs.map +1 -1
- package/dist/cjs/components/badge/index.cjs +1 -1
- package/dist/cjs/components/badge/index.cjs.map +1 -1
- package/dist/cjs/components/breadcrumb/index.cjs +1 -1
- package/dist/cjs/components/breadcrumb/index.cjs.map +1 -1
- package/dist/cjs/components/builder-header/index.cjs +1 -1
- package/dist/cjs/components/builder-header/index.cjs.map +1 -1
- package/dist/cjs/components/button/index.cjs +1 -1
- package/dist/cjs/components/button/index.cjs.map +1 -1
- package/dist/cjs/components/button-group/index.cjs +1 -1
- package/dist/cjs/components/button-group/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/index.cjs +1 -1
- package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
- package/dist/cjs/components/card/index.cjs +1 -1
- package/dist/cjs/components/card/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/checkbox/index.cjs +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/index.cjs +1 -0
- package/dist/cjs/components/color-picker.cjs +1 -0
- package/dist/cjs/components/combobox/index.cjs +1 -1
- package/dist/cjs/components/combobox/index.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/docked-composer/index.cjs +1 -1
- package/dist/cjs/components/docked-composer/index.cjs.map +1 -1
- package/dist/cjs/components/dynamic-icon/index.cjs +1 -1
- package/dist/cjs/components/dynamic-icon/index.cjs.map +1 -1
- package/dist/cjs/components/expandable-section/index.cjs +1 -1
- package/dist/cjs/components/expandable-section/index.cjs.map +1 -1
- package/dist/cjs/components/files/index.cjs +1 -1
- package/dist/cjs/components/files/index.cjs.map +1 -1
- package/dist/cjs/components/filter/index.cjs +1 -0
- package/dist/cjs/components/filter.cjs +1 -0
- package/dist/cjs/components/grid/index.cjs +2 -0
- package/dist/cjs/components/grid/index.cjs.map +1 -0
- package/dist/cjs/components/grid.cjs +1 -0
- package/dist/cjs/components/icon/index.cjs +1 -1
- package/dist/cjs/components/icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon-settings/index.cjs +1 -1
- package/dist/cjs/components/icon-settings/index.cjs.map +1 -1
- package/dist/cjs/components/illustration/index.cjs +1 -1
- package/dist/cjs/components/illustration/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/input/index.cjs +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/media-object/index.cjs +1 -1
- package/dist/cjs/components/media-object/index.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/index.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/page-header/index.cjs +1 -1
- package/dist/cjs/components/page-header/index.cjs.map +1 -1
- package/dist/cjs/components/panel/index.cjs +1 -1
- package/dist/cjs/components/panel/index.cjs.map +1 -1
- package/dist/cjs/components/pill/index.cjs +1 -1
- package/dist/cjs/components/pill/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/popover/index.cjs +1 -1
- package/dist/cjs/components/popover/index.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/portal-settings/index.cjs +1 -1
- package/dist/cjs/components/portal-settings/index.cjs.map +1 -1
- package/dist/cjs/components/progress-bar/index.cjs +1 -1
- package/dist/cjs/components/progress-bar/index.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/check-props.cjs +2 -0
- package/dist/cjs/components/progress-indicator/check-props.cjs.map +1 -0
- package/dist/cjs/components/progress-indicator/index.cjs +1 -1
- package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/path.cjs +2 -0
- package/dist/cjs/components/progress-indicator/private/path.cjs.map +1 -0
- package/dist/cjs/components/progress-indicator/private/progress.cjs +1 -1
- package/dist/cjs/components/progress-indicator/private/progress.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/use-roving-tab-index.cjs +2 -0
- package/dist/cjs/components/progress-indicator/private/use-roving-tab-index.cjs.map +1 -0
- package/dist/cjs/components/progress-ring/index.cjs +1 -1
- package/dist/cjs/components/progress-ring/index.cjs.map +1 -1
- package/dist/cjs/components/radio/index.cjs +1 -1
- package/dist/cjs/components/radio/index.cjs.map +1 -1
- package/dist/cjs/components/radio-button-group/index.cjs +1 -1
- package/dist/cjs/components/radio-button-group/index.cjs.map +1 -1
- package/dist/cjs/components/radio-group/index.cjs +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/scoped-notification/index.cjs +1 -1
- package/dist/cjs/components/scoped-notification/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/index.cjs +1 -1
- package/dist/cjs/components/setup-assistant/index.cjs.map +1 -1
- package/dist/cjs/components/{data-table → simple-data-table}/cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/column-check-props.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/column.cjs +2 -0
- package/dist/cjs/components/simple-data-table/column.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/component.cjs +2 -0
- package/dist/cjs/components/simple-data-table/component.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/highlight-cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/highlight-cell.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/index.cjs +2 -0
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/interactive-element.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/interactive-link.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/cell-context.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/cell-fixed.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/context-helper.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/link.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/mode.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/row.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/table-context.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table.cjs +1 -0
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/spinner/index.cjs +1 -1
- package/dist/cjs/components/spinner/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/index.cjs +1 -1
- package/dist/cjs/components/split-view/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/index.cjs +1 -1
- package/dist/cjs/components/toast/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +2 -2
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/index.cjs +1 -0
- package/dist/cjs/components/tree.cjs +1 -0
- package/dist/cjs/components/trial-bar/index.cjs +1 -1
- package/dist/cjs/components/trial-bar/index.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/visual-picker/index.cjs +1 -1
- package/dist/cjs/components/visual-picker/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/cjs/utilities/constants.cjs +1 -1
- package/dist/cjs/utilities/constants.cjs.map +1 -1
- package/dist/cjs/utilities/hooks/index.cjs +1 -0
- package/dist/cjs/utilities/hooks.cjs +1 -0
- package/dist/cjs/utilities/warning/incompatible-props.cjs +2 -0
- package/dist/cjs/utilities/warning/incompatible-props.cjs.map +1 -0
- package/dist/es/components/accordion/index.js +28 -24
- package/dist/es/components/accordion/index.js.map +1 -1
- package/dist/es/components/alert/index.js +14 -14
- package/dist/es/components/alert/index.js.map +1 -1
- package/dist/es/components/badge/index.js +1 -0
- package/dist/es/components/badge/index.js.map +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/index.js +3 -2
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/color-picker/index.js +2 -0
- package/dist/es/components/color-picker.js +2 -0
- package/dist/es/components/filter/index.js +2 -0
- package/dist/es/components/filter.js +2 -0
- package/dist/es/components/grid/index.js +31 -0
- package/dist/es/components/grid/index.js.map +1 -0
- package/dist/es/components/grid.js +2 -0
- package/dist/es/components/index.js +78 -78
- package/dist/es/components/menu-dropdown/index.js +5 -5
- package/dist/es/components/menu-dropdown/menu-dropdown.js +47 -40
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/page-header/index.js +24 -24
- package/dist/es/components/page-header/index.js.map +1 -1
- package/dist/es/components/popover/index.js +3 -3
- package/dist/es/components/popover/popover.js +10 -3
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/check-props.js +24 -0
- package/dist/es/components/progress-indicator/check-props.js.map +1 -0
- package/dist/es/components/progress-indicator/index.js +80 -38
- package/dist/es/components/progress-indicator/index.js.map +1 -1
- package/dist/es/components/progress-indicator/private/path.js +95 -0
- package/dist/es/components/progress-indicator/private/path.js.map +1 -0
- package/dist/es/components/progress-indicator/private/progress.js +1 -1
- package/dist/es/components/progress-indicator/private/progress.js.map +1 -1
- package/dist/es/components/progress-indicator/private/use-roving-tab-index.js +29 -0
- package/dist/es/components/progress-indicator/private/use-roving-tab-index.js.map +1 -0
- package/dist/es/components/progress-ring/index.js +8 -8
- package/dist/es/components/progress-ring/index.js.map +1 -1
- package/dist/es/components/{data-table → simple-data-table}/cell.js +2 -2
- package/dist/es/components/simple-data-table/cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/check-props.js +2 -2
- package/dist/es/components/simple-data-table/check-props.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/column-check-props.js +1 -1
- package/dist/es/components/simple-data-table/column-check-props.js.map +1 -0
- package/dist/es/components/simple-data-table/column.js +8 -0
- package/dist/es/components/simple-data-table/column.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/component.js +6 -10
- package/dist/es/components/simple-data-table/component.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/highlight-cell.js +2 -2
- package/dist/es/components/simple-data-table/highlight-cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/index.js +126 -233
- package/dist/es/components/simple-data-table/index.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/interactive-element.js +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/interactive-link.js +1 -1
- package/dist/es/components/simple-data-table/interactive-link.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/cell-context.js +1 -1
- package/dist/es/components/simple-data-table/private/cell-context.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/cell-fixed.js +1 -1
- package/dist/es/components/simple-data-table/private/cell-fixed.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/context-helper.js +1 -1
- package/dist/es/components/simple-data-table/private/context-helper.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/head.js +2 -2
- package/dist/es/components/simple-data-table/private/head.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/header-cell.js +2 -2
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/link.js +1 -1
- package/dist/es/components/simple-data-table/private/link.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/mode.js +1 -1
- package/dist/es/components/simple-data-table/private/mode.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/row.js +6 -6
- package/dist/es/components/simple-data-table/private/row.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/table-context.js +1 -1
- package/dist/es/components/simple-data-table/private/table-context.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/row-actions.js +2 -2
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -0
- package/dist/es/components/simple-data-table.js +2 -0
- package/dist/es/components/tooltip/index.js +90 -84
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/index.js +2 -0
- package/dist/es/components/tree.js +2 -0
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/es/utilities/hooks/index.js +2 -0
- package/dist/es/utilities/hooks.js +1 -0
- package/dist/es/utilities/warning/incompatible-props.js +19 -0
- package/dist/es/utilities/warning/incompatible-props.js.map +1 -0
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/alert/index.d.ts.map +1 -1
- package/dist/types/components/badge/index.d.ts +1 -1
- package/dist/types/components/badge/index.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +5 -2
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +2 -2
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +14 -14
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page-header/index.d.ts +1 -1
- package/dist/types/components/page-header/index.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/check-props.d.ts.map +1 -0
- package/dist/types/components/progress-indicator/index.d.ts +39 -8
- package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/private/path.d.ts +48 -0
- package/dist/types/components/progress-indicator/private/path.d.ts.map +1 -0
- package/dist/types/components/progress-indicator/private/progress.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/private/use-roving-tab-index.d.ts +41 -0
- package/dist/types/components/progress-indicator/private/use-roving-tab-index.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/cell.d.ts +5 -5
- package/dist/types/components/simple-data-table/cell.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/check-props.d.ts +3 -0
- package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/column-check-props.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/column.d.ts +6 -6
- package/dist/types/components/simple-data-table/column.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/highlight-cell.d.ts +14 -0
- package/dist/types/components/simple-data-table/highlight-cell.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/index.d.ts +13 -40
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/interactive-link.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/cell-context.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/cell-fixed.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/context-helper.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/head.d.ts +6 -6
- package/dist/types/components/simple-data-table/private/head.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/header-cell.d.ts +3 -3
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/link.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/mode.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/row.d.ts +11 -11
- package/dist/types/components/simple-data-table/private/row.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/table-context.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/row-actions.d.ts +5 -5
- package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/simple-data-table.d.ts +15 -0
- package/dist/types/components/simple-data-table/simple-data-table.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/types.d.ts +56 -71
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -0
- package/dist/types/components/simple-data-table.d.ts +2 -0
- package/dist/types/components/tooltip/index.d.ts +10 -1
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/utilities/constants.d.ts +8 -7
- package/dist/types/utilities/constants.d.ts.map +1 -1
- package/dist/types/utilities/hooks/index.d.ts +1 -1
- package/dist/types/utilities/hooks/index.d.ts.map +1 -1
- package/dist/types/utilities/hooks.d.ts +0 -1
- package/dist/types/utilities/sample-data/global-navigation-bar.d.ts +0 -1
- package/dist/types/utilities/sample-data/vertical-navigation.d.ts +0 -1
- package/dist/types/utilities/warning/incompatible-props.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/cjs/components/data-table/cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/check-props.cjs.map +0 -1
- package/dist/cjs/components/data-table/column-check-props.cjs.map +0 -1
- package/dist/cjs/components/data-table/column.cjs +0 -2
- package/dist/cjs/components/data-table/column.cjs.map +0 -1
- package/dist/cjs/components/data-table/component.cjs +0 -2
- package/dist/cjs/components/data-table/component.cjs.map +0 -1
- package/dist/cjs/components/data-table/highlight-cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/index.cjs +0 -2
- package/dist/cjs/components/data-table/index.cjs.map +0 -1
- package/dist/cjs/components/data-table/interactive-element.cjs.map +0 -1
- package/dist/cjs/components/data-table/interactive-link.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/cell-context.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/cell-fixed.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/context-helper.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/head.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/header-cell.cjs +0 -2
- package/dist/cjs/components/data-table/private/header-cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/link.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/mode.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/row.cjs +0 -2
- package/dist/cjs/components/data-table/private/row.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/table-context.cjs.map +0 -1
- package/dist/cjs/components/data-table/row-actions.cjs.map +0 -1
- package/dist/cjs/components/data-table.cjs +0 -1
- package/dist/cjs/utilities/design-tokens/dist/palette-colors.common.cjs +0 -2
- package/dist/cjs/utilities/design-tokens/dist/palette-colors.common.cjs.map +0 -1
- package/dist/cjs/utilities/design-tokens/dist/salesforce-skin.common.cjs +0 -2
- package/dist/cjs/utilities/design-tokens/dist/salesforce-skin.common.cjs.map +0 -1
- package/dist/es/components/data-table/cell.js.map +0 -1
- package/dist/es/components/data-table/check-props.js.map +0 -1
- package/dist/es/components/data-table/column-check-props.js.map +0 -1
- package/dist/es/components/data-table/column.js +0 -8
- package/dist/es/components/data-table/column.js.map +0 -1
- package/dist/es/components/data-table/component.js.map +0 -1
- package/dist/es/components/data-table/highlight-cell.js.map +0 -1
- package/dist/es/components/data-table/index.js.map +0 -1
- package/dist/es/components/data-table/interactive-element.js.map +0 -1
- package/dist/es/components/data-table/interactive-link.js.map +0 -1
- package/dist/es/components/data-table/private/cell-context.js.map +0 -1
- package/dist/es/components/data-table/private/cell-fixed.js.map +0 -1
- package/dist/es/components/data-table/private/context-helper.js.map +0 -1
- package/dist/es/components/data-table/private/head.js.map +0 -1
- package/dist/es/components/data-table/private/header-cell.js.map +0 -1
- package/dist/es/components/data-table/private/link.js.map +0 -1
- package/dist/es/components/data-table/private/mode.js.map +0 -1
- package/dist/es/components/data-table/private/row.js.map +0 -1
- package/dist/es/components/data-table/private/table-context.js.map +0 -1
- package/dist/es/components/data-table/row-actions.js.map +0 -1
- package/dist/es/components/data-table.js +0 -2
- package/dist/es/utilities/design-tokens/dist/palette-colors.common.js +0 -6
- package/dist/es/utilities/design-tokens/dist/palette-colors.common.js.map +0 -1
- package/dist/es/utilities/design-tokens/dist/salesforce-skin.common.js +0 -286
- package/dist/es/utilities/design-tokens/dist/salesforce-skin.common.js.map +0 -1
- package/dist/types/components/data-table/cell.d.ts.map +0 -1
- package/dist/types/components/data-table/check-props.d.ts.map +0 -1
- package/dist/types/components/data-table/column-check-props.d.ts.map +0 -1
- package/dist/types/components/data-table/column.d.ts.map +0 -1
- package/dist/types/components/data-table/data-table.d.ts +0 -15
- package/dist/types/components/data-table/data-table.d.ts.map +0 -1
- package/dist/types/components/data-table/highlight-cell.d.ts +0 -14
- package/dist/types/components/data-table/highlight-cell.d.ts.map +0 -1
- package/dist/types/components/data-table/index.d.ts.map +0 -1
- package/dist/types/components/data-table/interactive-element.d.ts.map +0 -1
- package/dist/types/components/data-table/interactive-link.d.ts.map +0 -1
- package/dist/types/components/data-table/private/cell-context.d.ts.map +0 -1
- package/dist/types/components/data-table/private/cell-fixed.d.ts.map +0 -1
- package/dist/types/components/data-table/private/context-helper.d.ts.map +0 -1
- package/dist/types/components/data-table/private/head.d.ts.map +0 -1
- package/dist/types/components/data-table/private/header-cell.d.ts.map +0 -1
- package/dist/types/components/data-table/private/link.d.ts.map +0 -1
- package/dist/types/components/data-table/private/mode.d.ts.map +0 -1
- package/dist/types/components/data-table/private/row.d.ts.map +0 -1
- package/dist/types/components/data-table/private/table-context.d.ts.map +0 -1
- package/dist/types/components/data-table/row-actions.d.ts.map +0 -1
- package/dist/types/components/data-table/types.d.ts.map +0 -1
- package/dist/types/components/data-table.d.ts +0 -2
- package/dist/types/utilities/design-tokens/dist/analytics-cloud.common.d.ts +0 -81
- package/dist/types/utilities/design-tokens/dist/analytics-cloud.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/bg-actions.common.d.ts +0 -201
- package/dist/types/utilities/design-tokens/dist/bg-actions.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/bg-custom.common.d.ts +0 -117
- package/dist/types/utilities/design-tokens/dist/bg-custom.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/bg-icons.common.d.ts +0 -5
- package/dist/types/utilities/design-tokens/dist/bg-icons.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/bg-standard.common.d.ts +0 -204
- package/dist/types/utilities/design-tokens/dist/bg-standard.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/color-palettes.common.d.ts +0 -3
- package/dist/types/utilities/design-tokens/dist/color-palettes.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/components.common.d.ts +0 -249
- package/dist/types/utilities/design-tokens/dist/components.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/console-base.common.d.ts +0 -9
- package/dist/types/utilities/design-tokens/dist/console-base.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/force-base.common.d.ts +0 -647
- package/dist/types/utilities/design-tokens/dist/force-base.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/force-font-commons.common.d.ts +0 -14
- package/dist/types/utilities/design-tokens/dist/force-font-commons.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/force-mq-commons.common.d.ts +0 -10
- package/dist/types/utilities/design-tokens/dist/force-mq-commons.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/icon-paths.common.d.ts +0 -9
- package/dist/types/utilities/design-tokens/dist/icon-paths.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/illustrations.common.d.ts +0 -7
- package/dist/types/utilities/design-tokens/dist/illustrations.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/image-paths.common.d.ts +0 -12
- package/dist/types/utilities/design-tokens/dist/image-paths.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/marketing-cloud.common.d.ts +0 -35
- package/dist/types/utilities/design-tokens/dist/marketing-cloud.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/palette-colors.common.d.ts +0 -98
- package/dist/types/utilities/design-tokens/dist/palette-colors.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/s1-base-large.common.d.ts +0 -15
- package/dist/types/utilities/design-tokens/dist/s1-base-large.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/s1-base-medium.common.d.ts +0 -5
- package/dist/types/utilities/design-tokens/dist/s1-base-medium.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/s1-base-small.common.d.ts +0 -11
- package/dist/types/utilities/design-tokens/dist/s1-base-small.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/s1-base.common.d.ts +0 -21
- package/dist/types/utilities/design-tokens/dist/s1-base.common.d.ts.map +0 -1
- package/dist/types/utilities/design-tokens/dist/salesforce-skin.common.d.ts +0 -283
- package/dist/types/utilities/design-tokens/dist/salesforce-skin.common.d.ts.map +0 -1
- /package/dist/cjs/components/{data-table → simple-data-table}/column-check-props.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/interactive-element.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/interactive-link.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/cell-context.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/cell-fixed.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/context-helper.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/link.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/mode.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/table-context.cjs +0 -0
- /package/dist/types/components/{data-table → progress-indicator}/check-props.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/column-check-props.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/interactive-element.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/interactive-link.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/cell-context.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/cell-fixed.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/context-helper.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/link.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/mode.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/table-context.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/alert/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useState, useRef, useEffect, useCallback, type ReactNode, type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { ALERT } from '../../utilities/constants';\nimport DOMElementFocus from '../../utilities/dom-element-focus';\nimport EventUtil from '../../utilities/event';\n\n/**\n * Alert variant types\n */\nexport type AlertVariant = 'error' | 'info' | 'offline' | 'warning';\n\n/**\n * Assistive text for Alert\n */\nexport interface AlertAssistiveText {\n\t/** Close button assistive text */\n\tcloseButton?: ReactNode;\n}\n\n/**\n * Labels for Alert\n */\nexport interface AlertLabels {\n\t/** Main heading content */\n\theading?: ReactNode;\n\t/** Link text in heading */\n\theadingLink?: ReactNode;\n}\n\n/**\n * Props for the Alert component\n */\nexport interface AlertProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: AlertAssistiveText;\n\t/** CSS classes for the alert container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Show close button */\n\tdismissible?: boolean;\n\t/** Custom icon (defaults to variant-specific icon) */\n\ticon?: ReactNode;\n\t/** Text labels */\n\tlabels?: AlertLabels;\n\t/** Callback when heading link is clicked */\n\tonClickHeadingLink?: (event: React.MouseEvent) => void;\n\t/** Callback when close button is clicked */\n\tonRequestClose?: (event: React.MouseEvent) => void;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n\t/** Alert type/severity */\n\tvariant: AlertVariant;\n}\n\nconst defaultAssistiveText: AlertAssistiveText = {\n\tcloseButton: 'Close',\n};\n\nconst defaultLabels: AlertLabels = {};\n\nconst assistiveTextVariant: Record<AlertVariant, string> = {\n\tinfo: 'info',\n\twarning: 'warning',\n\terror: 'error',\n\toffline: 'offline',\n};\n\nconst defaultIcons: Record<AlertVariant, ReactNode> = {\n\tinfo: <Icon category=\"utility\" name=\"info\" />,\n\toffline: <Icon category=\"utility\" name=\"offline\" />,\n\twarning: <Icon category=\"utility\" name=\"warning\" />,\n\terror: <Icon category=\"utility\" name=\"error\" />,\n};\n\n/**\n * Alert banners communicate a state that affects the entire system, not just a feature or page.\n * It persists over a session and appears without the user initiating the action.\n */\nconst Alert = ({\n\tassistiveText: propAssistiveText,\n\tclassName,\n\tdismissible,\n\ticon: propIcon,\n\tlabels: propLabels,\n\tonClickHeadingLink,\n\tonRequestClose,\n\tstyle,\n\tvariant = 'info',\n}: AlertProps): React.ReactElement => {\n\tconst [isInitialRender, setIsInitialRender] = useState(true);\n\tconst closeButtonRef = useRef<HTMLButtonElement | null>(null);\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst labels = { ...defaultLabels, ...propLabels };\n\n\t//
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/alert/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useState, useRef, useEffect, useCallback, type ReactNode, type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { ALERT } from '../../utilities/constants';\nimport DOMElementFocus from '../../utilities/dom-element-focus';\nimport EventUtil from '../../utilities/event';\n\n/**\n * Alert variant types\n */\nexport type AlertVariant = 'error' | 'info' | 'offline' | 'warning';\n\n/**\n * Assistive text for Alert\n */\nexport interface AlertAssistiveText {\n\t/** Close button assistive text */\n\tcloseButton?: ReactNode;\n}\n\n/**\n * Labels for Alert\n */\nexport interface AlertLabels {\n\t/** Main heading content */\n\theading?: ReactNode;\n\t/** Link text in heading */\n\theadingLink?: ReactNode;\n}\n\n/**\n * Props for the Alert component\n */\nexport interface AlertProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: AlertAssistiveText;\n\t/** CSS classes for the alert container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Show close button */\n\tdismissible?: boolean;\n\t/** Custom icon (defaults to variant-specific icon) */\n\ticon?: ReactNode;\n\t/** Text labels */\n\tlabels?: AlertLabels;\n\t/** Callback when heading link is clicked */\n\tonClickHeadingLink?: (event: React.MouseEvent) => void;\n\t/** Callback when close button is clicked */\n\tonRequestClose?: (event: React.MouseEvent) => void;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n\t/** Alert type/severity */\n\tvariant: AlertVariant;\n}\n\nconst defaultAssistiveText: AlertAssistiveText = {\n\tcloseButton: 'Close',\n};\n\nconst defaultLabels: AlertLabels = {};\n\nconst assistiveTextVariant: Record<AlertVariant, string> = {\n\tinfo: 'info',\n\twarning: 'warning',\n\terror: 'error',\n\toffline: 'offline',\n};\n\nconst defaultIcons: Record<AlertVariant, ReactNode> = {\n\tinfo: <Icon category=\"utility\" name=\"info\" />,\n\toffline: <Icon category=\"utility\" name=\"offline\" />,\n\twarning: <Icon category=\"utility\" name=\"warning\" />,\n\terror: <Icon category=\"utility\" name=\"error\" />,\n};\n\n/**\n * Alert banners communicate a state that affects the entire system, not just a feature or page.\n * It persists over a session and appears without the user initiating the action.\n */\nconst Alert = ({\n\tassistiveText: propAssistiveText,\n\tclassName,\n\tdismissible,\n\ticon: propIcon,\n\tlabels: propLabels,\n\tonClickHeadingLink,\n\tonRequestClose,\n\tstyle,\n\tvariant = 'info',\n}: AlertProps): React.ReactElement => {\n\tconst [isInitialRender, setIsInitialRender] = useState(true);\n\tconst closeButtonRef = useRef<HTMLButtonElement | null>(null);\n\tconst hasStoredFocusRef = useRef(false);\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst labels = { ...defaultLabels, ...propLabels };\n\n\t// Restore focus on unmount, but only if this Alert stored it. The stored\n\t// element is shared with other components (Popover, Toast), so restoring\n\t// unconditionally would take focus they stored.\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (hasStoredFocusRef.current) {\n\t\t\t\tDOMElementFocus.returnFocusToStoredElement();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst saveButtonRef = useCallback((component: HTMLButtonElement | null) => {\n\t\tcloseButtonRef.current = component;\n\t\tif (isInitialRender && component) {\n\t\t\tDOMElementFocus.storeActiveElement();\n\t\t\thasStoredFocusRef.current = true;\n\t\t\tcomponent.focus();\n\t\t\tsetIsInitialRender(false);\n\t\t}\n\t}, [isInitialRender]);\n\n\t// Get the icon to display\n\tconst icon = propIcon || defaultIcons[variant];\n\n\tconst clonedIcon = React.isValidElement(icon)\n\t\t? React.cloneElement(icon as React.ReactElement<{ containerClassName?: string; inverse?: boolean; size?: string }>, {\n\t\t\t\tcontainerClassName: 'slds-m-right_x-small',\n\t\t\t\tinverse: true,\n\t\t\t\tsize: 'x-small',\n\t\t })\n\t\t: icon;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-notify slds-notify_alert slds-theme_alert-texture',\n\t\t\t\t{\n\t\t\t\t\t'slds-theme_info': variant === 'info',\n\t\t\t\t\t'slds-theme_warning': variant === 'warning',\n\t\t\t\t\t'slds-theme_error': variant === 'error',\n\t\t\t\t\t'slds-theme_offline': variant === 'offline',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t\trole=\"alert\"\n\t\t\tstyle={style}\n\t\t>\n\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t{assistiveTextVariant[variant]}\n\t\t\t</span>\n\t\t\t{clonedIcon}\n\t\t\t<h2>\n\t\t\t\t{labels.heading}{' '}\n\t\t\t\t{labels.headingLink && (\n\t\t\t\t\t<a\n\t\t\t\t\t\tonClick={EventUtil.trappedHandler(onClickHeadingLink)}\n\t\t\t\t\t\thref=\"#\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{labels.headingLink}\n\t\t\t\t\t</a>\n\t\t\t\t)}\n\t\t\t</h2>\n\t\t\t{dismissible && (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{ icon: assistiveText.closeButton as string }}\n\t\t\t\t\tbuttonRef={saveButtonRef}\n\t\t\t\t\tclassName=\"slds-notify__close\"\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName=\"close\"\n\t\t\t\t\ticonSize=\"medium\"\n\t\t\t\t\tinverse\n\t\t\t\t\tonClick={onRequestClose}\n\t\t\t\t\ttitle={assistiveText.closeButton as string}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nAlert.displayName = ALERT;\n\nexport default Alert;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;AA0DA,IAAM,IAA2C,EAChD,aAAa,QACd,GAEM,IAA6B,CAAC,GAE9B,IAAqD;CAC1D,MAAM;CACN,SAAS;CACT,OAAO;CACP,SAAS;AACV,GAEM,IAAgD;CACrD,MAAM,kBAAC,GAAD;EAAM,UAAS;EAAU,MAAK;CAAQ,CAAA;CAC5C,SAAS,kBAAC,GAAD;EAAM,UAAS;EAAU,MAAK;CAAW,CAAA;CAClD,SAAS,kBAAC,GAAD;EAAM,UAAS;EAAU,MAAK;CAAW,CAAA;CAClD,OAAO,kBAAC,GAAD;EAAM,UAAS;EAAU,MAAK;CAAS,CAAA;AAC/C,GAMM,KAAS,EACd,eAAe,GACf,cACA,gBACA,MAAM,GACN,QAAQ,GACR,uBACA,mBACA,UACA,aAAU,aAC2B;CACrC,IAAM,CAAC,GAAiB,KAAsB,EAAS,EAAI,GACrD,IAAiB,EAAiC,IAAI,GACtD,IAAoB,EAAO,EAAK,GAEhC,IAAgB;EAAE,GAAG;EAAsB,GAAG;CAAkB,GAChE,IAAS;EAAE,GAAG;EAAe,GAAG;CAAW;CAKjD,cACc;EACZ,AAAI,EAAkB,WACrB,EAAgB,2BAA2B;CAE7C,GACE,CAAC,CAAC;CAEL,IAAM,IAAgB,GAAa,MAAwC;EAE1E,AADA,EAAe,UAAU,GACrB,KAAmB,MACtB,EAAgB,mBAAmB,GACnC,EAAkB,UAAU,IAC5B,EAAU,MAAM,GAChB,EAAmB,EAAK;CAE1B,GAAG,CAAC,CAAe,CAAC,GAGd,IAAO,KAAY,EAAa,IAEhC,IAAa,EAAM,eAAe,CAAI,IACzC,EAAM,aAAa,GAA+F;EAClH,oBAAoB;EACpB,SAAS;EACT,MAAM;CACN,CAAC,IACD;CAEH,OACC,kBAAC,OAAD;EACC,WAAW,EACV,0DACA;GACC,mBAAmB,MAAY;GAC/B,sBAAsB,MAAY;GAClC,oBAAoB,MAAY;GAChC,sBAAsB,MAAY;EACnC,GACA,CACD;EACA,MAAK;EACE;EAZR,UAAA;GAcC,kBAAC,QAAD;IAAM,WAAU;IACd,UAAA,EAAqB;GACjB,CAAA;GACL;GACD,kBAAC,MAAD,EAAA,UAAA;IACE,EAAO;IAAS;IAChB,EAAO,eACP,kBAAC,KAAD;KACC,SAAS,EAAU,eAAe,CAAkB;KACpD,MAAK;KAEJ,UAAA,EAAO;IACN,CAAA;GAED,EAAA,CAAA;GACH,KACA,kBAAC,GAAD;IACC,eAAe,EAAE,MAAM,EAAc,YAAsB;IAC3D,WAAW;IACX,WAAU;IACV,cAAa;IACb,UAAS;IACT,UAAS;IACT,SAAA;IACA,SAAS;IACT,OAAO,EAAc;IACrB,SAAQ;GACR,CAAA;EAEE;;AAEP;AAEA,EAAM,cAAc"}
|
|
@@ -14,6 +14,7 @@ var o = ({ className: e, color: o = "default", content: s, icon: c, iconAlignmen
|
|
|
14
14
|
className: n("slds-badge", {
|
|
15
15
|
"slds-badge_inverse": o === "inverse",
|
|
16
16
|
"slds-badge_lightest": o === "light",
|
|
17
|
+
"slds-theme_info": o === "info",
|
|
17
18
|
"slds-theme_success": o === "success",
|
|
18
19
|
"slds-theme_warning": o === "warning",
|
|
19
20
|
"slds-theme_error": o === "error"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/badge/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, type ReactNode, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { BADGE } from '../../utilities/constants';\n\n/**\n * Badge color variants\n */\nexport type BadgeColor
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/badge/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, type ReactNode, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { BADGE } from '../../utilities/constants';\n\n/**\n * Badge color variants\n */\nexport type BadgeColor =\n\t'default' | 'inverse' | 'light' | 'info' | 'success' | 'warning' | 'error';\n\n/**\n * Badge icon alignment\n */\nexport type BadgeIconAlignment = 'left' | 'right';\n\n/**\n * Props for the Badge component\n */\nexport interface BadgeProps {\n\t/** CSS classes for the badge */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Color variant */\n\tcolor?: BadgeColor;\n\t/** Content inside the badge */\n\tcontent?: ReactNode;\n\t/** Icon to display */\n\ticon?: ReactNode;\n\t/** Icon alignment relative to content */\n\ticonAlignment?: BadgeIconAlignment;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n}\n\n/**\n * Badges are labels which hold small amounts of information.\n */\nconst Badge = ({\n\tclassName,\n\tcolor = 'default',\n\tcontent,\n\ticon,\n\ticonAlignment = 'left',\n\tid: propId,\n\tstyle,\n}: BadgeProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst iconElement = icon && (\n\t\t<span\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-badge__icon',\n\t\t\t\t`slds-badge__icon_${iconAlignment}`\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{icon}\n\t\t</span>\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-badge',\n\t\t\t\t{\n\t\t\t\t\t'slds-badge_inverse': color === 'inverse',\n\t\t\t\t\t'slds-badge_lightest': color === 'light',\n\t\t\t\t\t'slds-theme_info': color === 'info',\n\t\t\t\t\t'slds-theme_success': color === 'success',\n\t\t\t\t\t'slds-theme_warning': color === 'warning',\n\t\t\t\t\t'slds-theme_error': color === 'error',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t>\n\t\t\t{iconAlignment === 'left' ? (\n\t\t\t\t<>\n\t\t\t\t\t{iconElement}\n\t\t\t\t\t{content}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{content}\n\t\t\t\t\t{iconElement}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</span>\n\t);\n};\n\nBadge.displayName = BADGE;\n\nexport default Badge;\n"],"mappings":";;;;;AAyCA,IAAM,KAAS,EACd,cACA,WAAQ,WACR,YACA,SACA,mBAAgB,QAChB,IAAI,GACJ,eACqC;CACrC,IAAM,IAAc,EAAM,GACpB,IAAK,KAAU,GAEf,IAAc,KACnB,kBAAC,QAAD;EACC,WAAW,EACV,oBACA,oBAAoB,GACrB;EACO;EAEN,UAAA;CACI,CAAA;CAGP,OACC,kBAAC,QAAD;EACK;EACJ,WAAW,EACV,cACA;GACC,sBAAsB,MAAU;GAChC,uBAAuB,MAAU;GACjC,mBAAmB,MAAU;GAC7B,sBAAsB,MAAU;GAChC,sBAAsB,MAAU;GAChC,oBAAoB,MAAU;EAC/B,GACA,CACD;EAEC,UAAA,MAAkB,SAClB,kBAAA,GAAA,EAAA,UAAA,CACE,GACA,CACA,EAAA,CAAA,IAEF,kBAAA,GAAA,EAAA,UAAA,CACE,GACA,CACA,EAAA,CAAA;CAEE,CAAA;AAER;AAEA,EAAM,cAAc"}
|
|
@@ -30,7 +30,7 @@ var f = { icon: "" }, p = o((e, o) => {
|
|
|
30
30
|
}, X = (e) => {
|
|
31
31
|
A && A(e, { id: E });
|
|
32
32
|
}, Z = (e) => {
|
|
33
|
-
let n = !w || T ? void 0 : w;
|
|
33
|
+
let n = !w || T || w === "xx-small" ? void 0 : w;
|
|
34
34
|
return /* @__PURE__ */ u(t, {
|
|
35
35
|
category: y || "utility",
|
|
36
36
|
className: l({ "slds-global-header__icon": T === "global-header" }, b),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/button/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Button design pattern](https://lightningdesignsystem.com/components/buttons/) in React.\n\nimport React, {\n\tuseEffect,\n\tuseRef,\n\tforwardRef,\n\ttype MouseEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype CSSProperties,\n\ttype ReactNode,\n\ttype ForwardedRef,\n} from 'react';\nimport classNames from 'classnames';\n// These imports use the old JSX files for now until they're converted\nimport ButtonIcon from '../icon/button-icon/index.jsx';\nimport Tooltip from '../tooltip/index.jsx';\nimport getAriaProps from '../../utilities/get-aria-props';\nimport getDataProps from '../../utilities/get-data-props';\nimport getFormProps from '../../utilities/get-form-props';\nimport { BUTTON } from '../../utilities/constants';\nimport type { IconCategory } from '../../types/common';\n\n/**\n * Button variant types\n */\nexport type ButtonVariant =\n\t| 'base'\n\t| 'link'\n\t| 'neutral'\n\t| 'brand'\n\t| 'outline-brand'\n\t| 'destructive'\n\t| 'success'\n\t| 'text-destructive'\n\t| 'icon';\n\n/**\n * Button icon variant types\n */\nexport type ButtonIconVariant =\n\t| 'bare'\n\t| 'container'\n\t| 'border'\n\t| 'border-filled'\n\t| 'brand'\n\t| 'more'\n\t| 'global-header';\n\n/**\n * Button icon size types\n */\nexport type ButtonIconSize = 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Button type attribute\n */\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\n/**\n * Icon position relative to label\n */\nexport type IconPosition = 'left' | 'right';\n\n/**\n * Assistive text for button\n */\nexport interface ButtonAssistiveText {\n\ticon?: string;\n}\n\n/**\n * Props for the Button component\n */\nexport interface ButtonProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ButtonAssistiveText | string;\n\t/** Callback for DOM reference */\n\tbuttonRef?: (ref: HTMLButtonElement | null) => void;\n\t/** Additional CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Child elements */\n\tchildren?: ReactNode;\n\t/** Disabled state */\n\tdisabled?: boolean;\n\t/** Hint styling for icon buttons */\n\thint?: boolean;\n\t/** Icon category */\n\ticonCategory?: IconCategory;\n\t/** CSS classes for icon */\n\ticonClassName?: string | string[] | Record<string, boolean>;\n\t/** Icon name */\n\ticonName?: string;\n\t/** Direct path to icon sprite */\n\ticonPath?: string;\n\t/** Icon position */\n\ticonPosition?: IconPosition;\n\t/** Icon size */\n\ticonSize?: ButtonIconSize;\n\t/** Icon variant */\n\ticonVariant?: ButtonIconVariant;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Inverse colors for dark backgrounds */\n\tinverse?: boolean;\n\t/** Visible button label */\n\tlabel?: ReactNode;\n\t/** Blur event handler */\n\tonBlur?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Click event handler */\n\tonClick?: (event: MouseEvent<HTMLButtonElement>, data?: { id?: string }) => void;\n\t/** Focus event handler */\n\tonFocus?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Key down event handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key press event handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key up event handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Mouse down event handler */\n\tonMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse enter event handler */\n\tonMouseEnter?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse leave event handler */\n\tonMouseLeave?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse up event handler */\n\tonMouseUp?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Request focus callback */\n\tonRequestFocus?: (element: HTMLButtonElement) => void;\n\t/** Trigger onRequestFocus */\n\trequestFocus?: boolean;\n\t/** Responsive width on small screens */\n\tresponsive?: boolean;\n\t/** Custom inline styles */\n\tstyle?: CSSProperties;\n\t/** Tab index */\n\ttabIndex?: number | string;\n\t/** HTML title attribute */\n\ttitle?: string;\n\t/** Tooltip content (deprecated) */\n\ttooltip?: ReactNode;\n\t/** Button type attribute */\n\ttype?: ButtonType;\n\t/** Button variant */\n\tvariant?: ButtonVariant;\n\t/** Allow any additional props for aria-*, data-*, form* */\n\t[key: `aria-${string}`]: string | boolean | undefined;\n\t[key: `data-${string}`]: string | number | boolean | undefined;\n\t[key: `form${string}`]: string | undefined;\n}\n\nconst defaultAssistiveText: ButtonAssistiveText = { icon: '' };\n\n/**\n * The Button component is the Lightning Design System Button component.\n * Use for label buttons, icon buttons, or buttons with both labels and icons.\n *\n * Either a `label` or `assistiveText.icon` is required for accessibility.\n * For buttons that maintain selected/unselected states, use ButtonStateful.\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n\t(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) => {\n\t\tconst {\n\t\t\tassistiveText = defaultAssistiveText,\n\t\t\tbuttonRef,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled = false,\n\t\t\thint = false,\n\t\t\ticonCategory,\n\t\t\ticonClassName,\n\t\t\ticonName,\n\t\t\ticonPath,\n\t\t\ticonPosition,\n\t\t\ticonSize = 'medium',\n\t\t\ticonVariant,\n\t\t\tid,\n\t\t\tinverse,\n\t\t\tlabel,\n\t\t\tonBlur,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonMouseDown,\n\t\t\tonMouseEnter,\n\t\t\tonMouseLeave,\n\t\t\tonMouseUp,\n\t\t\tonRequestFocus,\n\t\t\trequestFocus,\n\t\t\tstyle,\n\t\t\ttabIndex,\n\t\t\ttitle,\n\t\t\ttooltip,\n\t\t\ttype = 'button',\n\t\t\tvariant = 'neutral',\n\t\t\t...restProps\n\t\t} = props;\n\n\t\tconst internalRef = useRef<HTMLButtonElement | null>(null);\n\n\t\tuseEffect(() => {\n\t\t\tif (requestFocus && onRequestFocus && internalRef.current) {\n\t\t\t\tonRequestFocus(internalRef.current);\n\t\t\t}\n\t\t}, [requestFocus, onRequestFocus]);\n\n\t\tconst getClassName = (): string => {\n\t\t\tconst isIcon = variant === 'icon';\n\t\t\tlet computedIconVariant = iconVariant;\n\t\t\tconst iconMore = iconVariant === 'more';\n\t\t\tconst iconBorder = iconVariant === 'border';\n\t\t\tconst iconGlobalHeader = iconVariant === 'global-header';\n\n\t\t\tconst showButtonVariant =\n\t\t\t\t(variant !== 'base' &&\n\t\t\t\t\t!iconVariant &&\n\t\t\t\t\t!inverse &&\n\t\t\t\t\tvariant !== 'link') ||\n\t\t\t\ticonVariant === 'bare';\n\t\t\tconst plainInverseBtn = inverse && !isIcon;\n\t\t\tconst plainInverseIcon =\n\t\t\t\tinverse && isIcon && !iconMore && !iconBorder;\n\t\t\tconst moreInverseIcon = inverse && iconMore;\n\t\t\tconst borderInverseIcon = inverse && iconBorder;\n\n\t\t\t// Reset to container style for the actual button CSS\n\t\t\tif (iconVariant === 'global-header') {\n\t\t\t\tcomputedIconVariant = 'container';\n\t\t\t}\n\n\t\t\treturn classNames(\n\t\t\t\t{\n\t\t\t\t\t'slds-button': variant !== 'link',\n\t\t\t\t\t[`slds-button_${variant}`]: showButtonVariant,\n\t\t\t\t\t'slds-button_inverse': plainInverseBtn,\n\t\t\t\t\t'slds-button_icon-inverse': plainInverseIcon || moreInverseIcon,\n\t\t\t\t\t'slds-button_icon-border-inverse': borderInverseIcon,\n\t\t\t\t\t[`slds-button_icon-${computedIconVariant}`]:\n\t\t\t\t\t\tcomputedIconVariant && !borderInverseIcon,\n\t\t\t\t\t'slds-global-header__button_icon': iconGlobalHeader,\n\t\t\t\t\t[`slds-button_icon-${iconSize}`]:\n\t\t\t\t\t\ticonVariant && iconSize !== 'medium',\n\t\t\t\t\t'slds-button_reset': variant === 'link',\n\t\t\t\t\t'slds-text-link': variant === 'link',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t);\n\t\t};\n\n\t\tconst handleClick = (event: MouseEvent<HTMLButtonElement>): void => {\n\t\t\tif (onClick) {\n\t\t\t\tonClick(event, { id });\n\t\t\t}\n\t\t};\n\n\t\tconst renderIcon = (name?: string): React.ReactElement => {\n\t\t\tconst computedIconSize =\n\t\t\t\t!iconSize || iconVariant ? undefined : iconSize;\n\t\t\treturn (\n\t\t\t\t<ButtonIcon\n\t\t\t\t\tcategory={iconCategory || 'utility'}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-global-header__icon': iconVariant === 'global-header',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ticonClassName as string\n\t\t\t\t\t)}\n\t\t\t\t\thint={hint}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\tname={name}\n\t\t\t\t\tpath={iconPath}\n\t\t\t\t\tposition={iconPosition}\n\t\t\t\t\tsize={computedIconSize}\n\t\t\t\t/>\n\t\t\t);\n\t\t};\n\n\t\tconst renderLabel = (): ReactNode => {\n\t\t\tconst iconOnly = iconName || iconPath;\n\t\t\tconst assistiveTextIcon =\n\t\t\t\ttypeof assistiveText === 'string'\n\t\t\t\t\t? assistiveText\n\t\t\t\t\t: {\n\t\t\t\t\t\t\t...defaultAssistiveText,\n\t\t\t\t\t\t\t...(assistiveText as ButtonAssistiveText),\n\t\t\t\t\t }.icon;\n\n\t\t\treturn iconOnly && assistiveTextIcon ? (\n\t\t\t\t<span className=\"slds-assistive-text\">{assistiveTextIcon}</span>\n\t\t\t) : (\n\t\t\t\tlabel\n\t\t\t);\n\t\t};\n\n\t\tconst renderButton = (): React.ReactElement => {\n\t\t\tconst ariaProps = getAriaProps(restProps);\n\t\t\tconst dataProps = getDataProps(restProps);\n\t\t\tconst formProps = getFormProps(restProps);\n\n\t\t\treturn (\n\t\t\t\t<button\n\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tid={id}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonMouseDown={onMouseDown}\n\t\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\t\tonMouseUp={onMouseUp}\n\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\tinternalRef.current = node;\n\t\t\t\t\t\tif (typeof ref === 'function') {\n\t\t\t\t\t\t\tref(node);\n\t\t\t\t\t\t} else if (ref) {\n\t\t\t\t\t\t\tref.current = node;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (buttonRef) {\n\t\t\t\t\t\t\tbuttonRef(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\ttabIndex={typeof tabIndex === 'string' ? parseInt(tabIndex, 10) : tabIndex}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tstyle={style}\n\t\t\t\t\t{...ariaProps}\n\t\t\t\t\t{...dataProps}\n\t\t\t\t\t{...formProps}\n\t\t\t\t>\n\t\t\t\t\t{iconPosition === 'right' ? renderLabel() : null}\n\t\t\t\t\t{iconName || iconPath ? renderIcon(iconName) : null}\n\t\t\t\t\t{iconVariant === 'more' ? (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\tclassName={iconClassName as string}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{iconPosition === 'left' || !iconPosition ? renderLabel() : null}\n\t\t\t\t\t{children}\n\t\t\t\t</button>\n\t\t\t);\n\t\t};\n\n\t\t// Deprecated: wrap button in tooltip if tooltip prop is provided\n\t\tif (tooltip) {\n\t\t\treturn <Tooltip content={tooltip}>{renderButton()}</Tooltip>;\n\t\t}\n\n\t\treturn renderButton();\n\t}\n);\n\nButton.displayName = BUTTON;\n\nexport default Button;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/button/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Button design pattern](https://lightningdesignsystem.com/components/buttons/) in React.\n\nimport React, {\n\tuseEffect,\n\tuseRef,\n\tforwardRef,\n\ttype MouseEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype CSSProperties,\n\ttype ReactNode,\n\ttype ForwardedRef,\n} from 'react';\nimport classNames from 'classnames';\n// These imports use the old JSX files for now until they're converted\nimport ButtonIcon from '../icon/button-icon/index.jsx';\nimport Tooltip from '../tooltip/index.jsx';\nimport getAriaProps from '../../utilities/get-aria-props';\nimport getDataProps from '../../utilities/get-data-props';\nimport getFormProps from '../../utilities/get-form-props';\nimport { BUTTON } from '../../utilities/constants';\nimport type { IconCategory } from '../../types/common';\n\n/**\n * Button variant types\n */\nexport type ButtonVariant =\n\t| 'base'\n\t| 'link'\n\t| 'neutral'\n\t| 'brand'\n\t| 'outline-brand'\n\t| 'destructive'\n\t| 'success'\n\t| 'text-destructive'\n\t| 'icon';\n\n/**\n * Button icon variant types\n */\nexport type ButtonIconVariant =\n\t| 'bare'\n\t| 'container'\n\t| 'border'\n\t| 'border-filled'\n\t| 'brand'\n\t| 'more'\n\t| 'global-header';\n\n/**\n * Button icon size types\n */\nexport type ButtonIconSize =\n\t'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Button type attribute\n */\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\n/**\n * Icon position relative to label\n */\nexport type IconPosition = 'left' | 'right';\n\n/**\n * Assistive text for button\n */\nexport interface ButtonAssistiveText {\n\ticon?: string;\n}\n\n/**\n * Props for the Button component\n */\nexport interface ButtonProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ButtonAssistiveText | string;\n\t/** Callback for DOM reference */\n\tbuttonRef?: (ref: HTMLButtonElement | null) => void;\n\t/** Additional CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Child elements */\n\tchildren?: ReactNode;\n\t/** Disabled state */\n\tdisabled?: boolean;\n\t/** Hint styling for icon buttons */\n\thint?: boolean;\n\t/** Icon category */\n\ticonCategory?: IconCategory;\n\t/** CSS classes for icon */\n\ticonClassName?: string | string[] | Record<string, boolean>;\n\t/** Icon name */\n\ticonName?: string;\n\t/** Direct path to icon sprite */\n\ticonPath?: string;\n\t/** Icon position */\n\ticonPosition?: IconPosition;\n\t/**\n\t * Icon size. With `iconVariant`, sizes the button container (`slds-button_icon-*`); otherwise sizes the SVG (`slds-button__icon_*`).\n\t * `xx-small` requires `iconVariant`, since SLDS only defines it for the button container (matches `lightning-button-icon`).\n\t */\n\ticonSize?: ButtonIconSize;\n\t/** Icon variant */\n\ticonVariant?: ButtonIconVariant;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Inverse colors for dark backgrounds */\n\tinverse?: boolean;\n\t/** Visible button label */\n\tlabel?: ReactNode;\n\t/** Blur event handler */\n\tonBlur?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Click event handler */\n\tonClick?: (\n\t\tevent: MouseEvent<HTMLButtonElement>,\n\t\tdata?: { id?: string }\n\t) => void;\n\t/** Focus event handler */\n\tonFocus?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Key down event handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key press event handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key up event handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Mouse down event handler */\n\tonMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse enter event handler */\n\tonMouseEnter?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse leave event handler */\n\tonMouseLeave?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse up event handler */\n\tonMouseUp?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Request focus callback */\n\tonRequestFocus?: (element: HTMLButtonElement) => void;\n\t/** Trigger onRequestFocus */\n\trequestFocus?: boolean;\n\t/** Responsive width on small screens */\n\tresponsive?: boolean;\n\t/** Custom inline styles */\n\tstyle?: CSSProperties;\n\t/** Tab index */\n\ttabIndex?: number | string;\n\t/** HTML title attribute */\n\ttitle?: string;\n\t/** Tooltip content (deprecated) */\n\ttooltip?: ReactNode;\n\t/** Button type attribute */\n\ttype?: ButtonType;\n\t/** Button variant */\n\tvariant?: ButtonVariant;\n\t/** Allow any additional props for aria-*, data-*, form* */\n\t[key: `aria-${string}`]: string | boolean | undefined;\n\t[key: `data-${string}`]: string | number | boolean | undefined;\n\t[key: `form${string}`]: string | undefined;\n}\n\nconst defaultAssistiveText: ButtonAssistiveText = { icon: '' };\n\n/**\n * The Button component is the Lightning Design System Button component.\n * Use for label buttons, icon buttons, or buttons with both labels and icons.\n *\n * Either a `label` or `assistiveText.icon` is required for accessibility.\n * For buttons that maintain selected/unselected states, use ButtonStateful.\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n\t(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) => {\n\t\tconst {\n\t\t\tassistiveText = defaultAssistiveText,\n\t\t\tbuttonRef,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled = false,\n\t\t\thint = false,\n\t\t\ticonCategory,\n\t\t\ticonClassName,\n\t\t\ticonName,\n\t\t\ticonPath,\n\t\t\ticonPosition,\n\t\t\ticonSize = 'medium',\n\t\t\ticonVariant,\n\t\t\tid,\n\t\t\tinverse,\n\t\t\tlabel,\n\t\t\tonBlur,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonMouseDown,\n\t\t\tonMouseEnter,\n\t\t\tonMouseLeave,\n\t\t\tonMouseUp,\n\t\t\tonRequestFocus,\n\t\t\trequestFocus,\n\t\t\tstyle,\n\t\t\ttabIndex,\n\t\t\ttitle,\n\t\t\ttooltip,\n\t\t\ttype = 'button',\n\t\t\tvariant = 'neutral',\n\t\t\t...restProps\n\t\t} = props;\n\n\t\tconst internalRef = useRef<HTMLButtonElement | null>(null);\n\n\t\tuseEffect(() => {\n\t\t\tif (requestFocus && onRequestFocus && internalRef.current) {\n\t\t\t\tonRequestFocus(internalRef.current);\n\t\t\t}\n\t\t}, [requestFocus, onRequestFocus]);\n\n\t\tconst getClassName = (): string => {\n\t\t\tconst isIcon = variant === 'icon';\n\t\t\tlet computedIconVariant = iconVariant;\n\t\t\tconst iconMore = iconVariant === 'more';\n\t\t\tconst iconBorder = iconVariant === 'border';\n\t\t\tconst iconGlobalHeader = iconVariant === 'global-header';\n\n\t\t\tconst showButtonVariant =\n\t\t\t\t(variant !== 'base' &&\n\t\t\t\t\t!iconVariant &&\n\t\t\t\t\t!inverse &&\n\t\t\t\t\tvariant !== 'link') ||\n\t\t\t\ticonVariant === 'bare';\n\t\t\tconst plainInverseBtn = inverse && !isIcon;\n\t\t\tconst plainInverseIcon = inverse && isIcon && !iconMore && !iconBorder;\n\t\t\tconst moreInverseIcon = inverse && iconMore;\n\t\t\tconst borderInverseIcon = inverse && iconBorder;\n\n\t\t\t// Reset to container style for the actual button CSS\n\t\t\tif (iconVariant === 'global-header') {\n\t\t\t\tcomputedIconVariant = 'container';\n\t\t\t}\n\n\t\t\treturn classNames(\n\t\t\t\t{\n\t\t\t\t\t'slds-button': variant !== 'link',\n\t\t\t\t\t[`slds-button_${variant}`]: showButtonVariant,\n\t\t\t\t\t'slds-button_inverse': plainInverseBtn,\n\t\t\t\t\t'slds-button_icon-inverse': plainInverseIcon || moreInverseIcon,\n\t\t\t\t\t'slds-button_icon-border-inverse': borderInverseIcon,\n\t\t\t\t\t[`slds-button_icon-${computedIconVariant}`]:\n\t\t\t\t\t\tcomputedIconVariant && !borderInverseIcon,\n\t\t\t\t\t'slds-global-header__button_icon': iconGlobalHeader,\n\t\t\t\t\t[`slds-button_icon-${iconSize}`]:\n\t\t\t\t\t\ticonVariant && iconSize !== 'medium',\n\t\t\t\t\t'slds-button_reset': variant === 'link',\n\t\t\t\t\t'slds-text-link': variant === 'link',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t);\n\t\t};\n\n\t\tconst handleClick = (event: MouseEvent<HTMLButtonElement>): void => {\n\t\t\tif (onClick) {\n\t\t\t\tonClick(event, { id });\n\t\t\t}\n\t\t};\n\n\t\tconst renderIcon = (name?: string): React.ReactElement => {\n\t\t\t// SLDS has no `slds-button__icon_xx-small`; xx-small only sizes the container.\n\t\t\tconst computedIconSize =\n\t\t\t\t!iconSize || iconVariant || iconSize === 'xx-small'\n\t\t\t\t\t? undefined\n\t\t\t\t\t: iconSize;\n\t\t\treturn (\n\t\t\t\t<ButtonIcon\n\t\t\t\t\tcategory={iconCategory || 'utility'}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-global-header__icon': iconVariant === 'global-header',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ticonClassName as string\n\t\t\t\t\t)}\n\t\t\t\t\thint={hint}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\tname={name}\n\t\t\t\t\tpath={iconPath}\n\t\t\t\t\tposition={iconPosition}\n\t\t\t\t\tsize={computedIconSize}\n\t\t\t\t/>\n\t\t\t);\n\t\t};\n\n\t\tconst renderLabel = (): ReactNode => {\n\t\t\tconst iconOnly = iconName || iconPath;\n\t\t\tconst assistiveTextIcon =\n\t\t\t\ttypeof assistiveText === 'string'\n\t\t\t\t\t? assistiveText\n\t\t\t\t\t: {\n\t\t\t\t\t\t\t...defaultAssistiveText,\n\t\t\t\t\t\t\t...(assistiveText as ButtonAssistiveText),\n\t\t\t\t\t\t}.icon;\n\n\t\t\treturn iconOnly && assistiveTextIcon ? (\n\t\t\t\t<span className=\"slds-assistive-text\">{assistiveTextIcon}</span>\n\t\t\t) : (\n\t\t\t\tlabel\n\t\t\t);\n\t\t};\n\n\t\tconst renderButton = (): React.ReactElement => {\n\t\t\tconst ariaProps = getAriaProps(restProps);\n\t\t\tconst dataProps = getDataProps(restProps);\n\t\t\tconst formProps = getFormProps(restProps);\n\n\t\t\treturn (\n\t\t\t\t<button\n\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tid={id}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonMouseDown={onMouseDown}\n\t\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\t\tonMouseUp={onMouseUp}\n\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\tinternalRef.current = node;\n\t\t\t\t\t\tif (typeof ref === 'function') {\n\t\t\t\t\t\t\tref(node);\n\t\t\t\t\t\t} else if (ref) {\n\t\t\t\t\t\t\tref.current = node;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (buttonRef) {\n\t\t\t\t\t\t\tbuttonRef(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\ttabIndex={\n\t\t\t\t\t\ttypeof tabIndex === 'string' ? parseInt(tabIndex, 10) : tabIndex\n\t\t\t\t\t}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tstyle={style}\n\t\t\t\t\t{...ariaProps}\n\t\t\t\t\t{...dataProps}\n\t\t\t\t\t{...formProps}\n\t\t\t\t>\n\t\t\t\t\t{iconPosition === 'right' ? renderLabel() : null}\n\t\t\t\t\t{iconName || iconPath ? renderIcon(iconName) : null}\n\t\t\t\t\t{iconVariant === 'more' ? (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\tclassName={iconClassName as string}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{iconPosition === 'left' || !iconPosition ? renderLabel() : null}\n\t\t\t\t\t{children}\n\t\t\t\t</button>\n\t\t\t);\n\t\t};\n\n\t\t// Deprecated: wrap button in tooltip if tooltip prop is provided\n\t\tif (tooltip) {\n\t\t\treturn <Tooltip content={tooltip}>{renderButton()}</Tooltip>;\n\t\t}\n\n\t\treturn renderButton();\n\t}\n);\n\nButton.displayName = BUTTON;\n\nexport default Button;\n"],"mappings":"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"}
|
|
@@ -17,8 +17,9 @@ var u = { icon: "" }, d = {
|
|
|
17
17
|
label: "Unfollow"
|
|
18
18
|
}, m = ({ active: e, assistiveText: m, className: h, disabled: g = !1, icon: _, iconName: v, iconSize: y = "medium", id: b, onBlur: x, onClick: S, onFocus: C, onKeyDown: w, onKeyPress: T, onKeyUp: E, onMouseDown: D, onMouseEnter: O, responsive: k = !1, stateOne: A = d, stateTwo: j = f, stateThree: M = p, tabIndex: N, variant: P, ...F }) => {
|
|
19
19
|
let [I, L] = a(!1), R = typeof e == "boolean" ? e : I, z = i((e) => o(h, "slds-button", "slds-button_stateful", {
|
|
20
|
-
"slds-button_neutral": P !== "icon" && P !== "icon-filled",
|
|
20
|
+
"slds-button_neutral": P !== "icon" && P !== "icon-filled" && P !== "success" && P !== "text",
|
|
21
21
|
"slds-button_inverse": P === "inverse",
|
|
22
|
+
"slds-button_success": P === "success",
|
|
22
23
|
"slds-not-selected": !e,
|
|
23
24
|
"slds-is-selected": e,
|
|
24
25
|
"slds-max-small-button_stretch": k,
|
|
@@ -29,7 +30,7 @@ var u = { icon: "" }, d = {
|
|
|
29
30
|
P,
|
|
30
31
|
k
|
|
31
32
|
]), B = i((e) => {
|
|
32
|
-
x &&
|
|
33
|
+
x && x(e), e.currentTarget.matches(":focus-visible") || e.currentTarget.blur();
|
|
33
34
|
}, [x]), V = i((t) => {
|
|
34
35
|
l(S) && S(t), typeof e != "boolean" && L((e) => !e);
|
|
35
36
|
}, [S, e]), H = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/button-stateful/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseCallback,\n\ttype ReactNode,\n\ttype MouseEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n} from 'react';\nimport classNames from 'classnames';\nimport isFunction from 'lodash.isfunction';\n\nimport ButtonIcon from '../icon/button-icon';\nimport getAriaProps from '../../utilities/get-aria-props';\nimport { BUTTON_STATEFUL } from '../../utilities/constants';\n\n/**\n * Button stateful variant types\n */\nexport type ButtonStatefulVariant = 'base' | 'neutral' | 'brand' | 'destructive' | 'icon' | 'icon-filled' | 'inverse';\n\n/**\n * State configuration for stateful button\n */\nexport interface ButtonStatefulState {\n\t/** Icon component or icon name */\n\ticon?: ReactNode;\n\t/** Icon name (if not using icon prop) */\n\ticonName?: string;\n\t/** Button label */\n\tlabel?: string;\n}\n\n/**\n * Assistive text for ButtonStateful\n */\nexport interface ButtonStatefulAssistiveText {\n\t/** Text for icon */\n\ticon?: string;\n}\n\n/**\n * Props for the ButtonStateful component\n */\nexport interface ButtonStatefulProps {\n\t/** Controlled active state */\n\tactive?: boolean;\n\t/** Assistive text */\n\tassistiveText?: ButtonStatefulAssistiveText | string;\n\t/** CSS classes */\n\tclassName?: string;\n\t/** Disabled state */\n\tdisabled?: boolean;\n\t/** Icon component */\n\ticon?: ReactNode;\n\t/** Icon name */\n\ticonName?: string;\n\t/** Icon size */\n\ticonSize?: string;\n\t/** HTML id */\n\tid?: string;\n\t/** Blur handler */\n\tonBlur?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Click handler */\n\tonClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Focus handler */\n\tonFocus?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Key down handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key press handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key up handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Mouse down handler */\n\tonMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse enter handler */\n\tonMouseEnter?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Scale to full width on small screens */\n\tresponsive?: boolean;\n\t/** Initial/unselected state */\n\tstateOne?: ButtonStatefulState;\n\t/** Selected state */\n\tstateTwo?: ButtonStatefulState;\n\t/** Deselect/hover state */\n\tstateThree?: ButtonStatefulState;\n\t/** Tab index */\n\ttabIndex?: string;\n\t/** Button variant */\n\tvariant?: ButtonStatefulVariant;\n}\n\nconst defaultAssistiveText: ButtonStatefulAssistiveText = { icon: '' };\n\nconst defaultStateOne: ButtonStatefulState = { iconName: 'add', label: 'Follow' };\nconst defaultStateTwo: ButtonStatefulState = { iconName: 'check', label: 'Following' };\nconst defaultStateThree: ButtonStatefulState = { iconName: 'close', label: 'Unfollow' };\n\n/**\n * The ButtonStateful component is a variant of the Lightning Design System Button component.\n * It is used for buttons that have a state of unselected or selected.\n */\nconst ButtonStateful = ({\n\tactive: controlledActive,\n\tassistiveText: propAssistiveText,\n\tclassName,\n\tdisabled = false,\n\ticon,\n\ticonName,\n\ticonSize = 'medium',\n\tid,\n\tonBlur,\n\tonClick,\n\tonFocus,\n\tonKeyDown,\n\tonKeyPress,\n\tonKeyUp,\n\tonMouseDown,\n\tonMouseEnter,\n\tresponsive = false,\n\tstateOne = defaultStateOne,\n\tstateTwo = defaultStateTwo,\n\tstateThree = defaultStateThree,\n\ttabIndex,\n\tvariant,\n\t...rest\n}: ButtonStatefulProps): React.ReactElement => {\n\tconst [internalActive, setInternalActive] = useState(false);\n\n\tconst isActive = typeof controlledActive === 'boolean' ? controlledActive : internalActive;\n\n\tconst getClassName = useCallback(\n\t\t(active: boolean) =>\n\t\t\tclassNames(className, 'slds-button', 'slds-button_stateful', {\n\t\t\t\t'slds-button_neutral': variant !== 'icon' && variant !== 'icon-filled',\n\t\t\t\t'slds-button_inverse': variant === 'inverse',\n\t\t\t\t'slds-not-selected': !active,\n\t\t\t\t'slds-is-selected': active,\n\t\t\t\t'slds-max-small-button_stretch': responsive,\n\t\t\t\t'slds-button_icon-border': variant === 'icon',\n\t\t\t\t'slds-button_icon-border-filled': variant === 'icon-filled',\n\t\t\t}),\n\t\t[className, variant, responsive]\n\t);\n\n\tconst handleBlur = useCallback(\n\t\t(e: FocusEvent<HTMLButtonElement> | MouseEvent<HTMLButtonElement>) => {\n\t\t\tif (onBlur && 'relatedTarget' in e) onBlur(e as FocusEvent<HTMLButtonElement>);\n\t\t\te.currentTarget.blur();\n\t\t},\n\t\t[onBlur]\n\t);\n\n\tconst handleClick = useCallback(\n\t\t(e: MouseEvent<HTMLButtonElement>) => {\n\t\t\tif (isFunction(onClick)) onClick(e);\n\t\t\tif (typeof controlledActive !== 'boolean') {\n\t\t\t\tsetInternalActive((prev) => !prev);\n\t\t\t}\n\t\t},\n\t\t[onClick, controlledActive]\n\t);\n\n\tconst defaultIconProps = {\n\t\tdisabled,\n\t\tsize: 'small' as const,\n\t\tclassName: 'slds-button__icon_stateful',\n\t};\n\n\tconst iconAssistiveText =\n\t\ttypeof propAssistiveText === 'string'\n\t\t\t? propAssistiveText\n\t\t\t: { ...defaultAssistiveText, ...propAssistiveText }.icon;\n\n\t// Accept aria-* props\n\tlet ariaProps = getAriaProps(rest);\n\n\tif (variant === 'icon' || variant === 'icon-filled') {\n\t\tif (Object.keys(ariaProps).length === 0) {\n\t\t\tariaProps = { 'aria-live': 'polite' as const };\n\t\t}\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\t{...ariaProps}\n\t\t\t\tclassName={getClassName(isActive)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tid={id}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonFocus={onFocus}\n\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\tonMouseDown={onMouseDown}\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={handleBlur}\n\t\t\t\ttabIndex={tabIndex ? parseInt(tabIndex, 10) : undefined}\n\t\t\t\ttype=\"button\"\n\t\t\t>\n\t\t\t\t{icon ? (\n\t\t\t\t\tReact.cloneElement(icon as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t\t\t...defaultIconProps,\n\t\t\t\t\t\t...((icon as React.ReactElement<Record<string, unknown>>).props || {}),\n\t\t\t\t\t})\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={iconName}\n\t\t\t\t\t\tsize={iconSize as 'x-small' | 'small' | 'medium' | 'large'}\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{iconAssistiveText ? (\n\t\t\t\t\t<span className=\"slds-assistive-text\">{iconAssistiveText}</span>\n\t\t\t\t) : null}\n\t\t\t</button>\n\t\t);\n\t}\n\n\tconst defaultIconPropsWithPosition = { ...defaultIconProps, position: 'left' as const };\n\n\tif (Object.keys(ariaProps).length === 0) {\n\t\tariaProps = { 'aria-live': 'assertive' as const };\n\t}\n\n\treturn (\n\t\t<button\n\t\t\t{...ariaProps}\n\t\t\tclassName={getClassName(isActive)}\n\t\t\tdisabled={disabled}\n\t\t\tid={id}\n\t\t\tonBlur={handleBlur}\n\t\t\tonClick={handleClick}\n\t\t\tonFocus={onFocus}\n\t\t\tonKeyDown={onKeyDown}\n\t\t\tonKeyPress={onKeyPress}\n\t\t\tonKeyUp={onKeyUp}\n\t\t\tonMouseEnter={onMouseEnter}\n\t\t\tonMouseLeave={handleBlur}\n\t\t\ttabIndex={tabIndex ? parseInt(tabIndex, 10) : undefined}\n\t\t\ttype=\"button\"\n\t\t>\n\t\t\t<span className=\"slds-text-not-selected\">\n\t\t\t\t{stateOne.icon ? (\n\t\t\t\t\tReact.cloneElement(stateOne.icon as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t\t\t...defaultIconPropsWithPosition,\n\t\t\t\t\t\t...((stateOne.icon as React.ReactElement<Record<string, unknown>>).props || {}),\n\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t})\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={stateOne.iconName}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tposition=\"left\"\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{stateOne.label}\n\t\t\t</span>\n\t\t\t<span className=\"slds-text-selected\">\n\t\t\t\t{stateTwo.icon ? (\n\t\t\t\t\tReact.cloneElement(stateTwo.icon as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t\t\t...defaultIconPropsWithPosition,\n\t\t\t\t\t\t...((stateTwo.icon as React.ReactElement<Record<string, unknown>>).props || {}),\n\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t})\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={stateTwo.iconName}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tposition=\"left\"\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{stateTwo.label}\n\t\t\t</span>\n\t\t\t<span className=\"slds-text-selected-focus\">\n\t\t\t\t{stateThree.icon ? (\n\t\t\t\t\tReact.cloneElement(stateThree.icon as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t\t\t...defaultIconPropsWithPosition,\n\t\t\t\t\t\t...((stateThree.icon as React.ReactElement<Record<string, unknown>>).props || {}),\n\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t})\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={stateThree.iconName}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tposition=\"left\"\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{stateThree.label}\n\t\t\t</span>\n\t\t</button>\n\t);\n};\n\nButtonStateful.displayName = BUTTON_STATEFUL;\n\nexport default ButtonStateful;\n\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/button-stateful/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseCallback,\n\ttype ReactNode,\n\ttype MouseEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n} from 'react';\nimport classNames from 'classnames';\nimport isFunction from 'lodash.isfunction';\n\nimport ButtonIcon from '../icon/button-icon';\nimport getAriaProps from '../../utilities/get-aria-props';\nimport { BUTTON_STATEFUL } from '../../utilities/constants';\n\n/**\n * Button stateful variant types\n */\nexport type ButtonStatefulVariant =\n\t| 'base'\n\t| 'neutral'\n\t| 'brand'\n\t| 'destructive'\n\t| 'icon'\n\t| 'icon-filled'\n\t| 'inverse'\n\t| 'success'\n\t| 'text';\n\n/**\n * State configuration for stateful button\n */\nexport interface ButtonStatefulState {\n\t/** Icon component or icon name */\n\ticon?: ReactNode;\n\t/** Icon name (if not using icon prop) */\n\ticonName?: string;\n\t/** Button label */\n\tlabel?: string;\n}\n\n/**\n * Assistive text for ButtonStateful\n */\nexport interface ButtonStatefulAssistiveText {\n\t/** Text for icon */\n\ticon?: string;\n}\n\n/**\n * Props for the ButtonStateful component\n */\nexport interface ButtonStatefulProps {\n\t/** Controlled active state */\n\tactive?: boolean;\n\t/** Assistive text */\n\tassistiveText?: ButtonStatefulAssistiveText | string;\n\t/** CSS classes */\n\tclassName?: string;\n\t/** Disabled state */\n\tdisabled?: boolean;\n\t/** Icon component */\n\ticon?: ReactNode;\n\t/** Icon name */\n\ticonName?: string;\n\t/** Icon size */\n\ticonSize?: string;\n\t/** HTML id */\n\tid?: string;\n\t/** Blur handler */\n\tonBlur?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Click handler */\n\tonClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Focus handler */\n\tonFocus?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t/** Key down handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key press handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Key up handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLButtonElement>) => void;\n\t/** Mouse down handler */\n\tonMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Mouse enter handler */\n\tonMouseEnter?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Scale to full width on small screens */\n\tresponsive?: boolean;\n\t/** Initial/unselected state */\n\tstateOne?: ButtonStatefulState;\n\t/** Selected state */\n\tstateTwo?: ButtonStatefulState;\n\t/** Deselect/hover state */\n\tstateThree?: ButtonStatefulState;\n\t/** Tab index */\n\ttabIndex?: string;\n\t/** Button variant. `text` renders a stateful button with no border or background. */\n\tvariant?: ButtonStatefulVariant;\n}\n\nconst defaultAssistiveText: ButtonStatefulAssistiveText = { icon: '' };\n\nconst defaultStateOne: ButtonStatefulState = {\n\ticonName: 'add',\n\tlabel: 'Follow',\n};\nconst defaultStateTwo: ButtonStatefulState = {\n\ticonName: 'check',\n\tlabel: 'Following',\n};\nconst defaultStateThree: ButtonStatefulState = {\n\ticonName: 'close',\n\tlabel: 'Unfollow',\n};\n\n/**\n * The ButtonStateful component is a variant of the Lightning Design System Button component.\n * It is used for buttons that have a state of unselected or selected.\n */\nconst ButtonStateful = ({\n\tactive: controlledActive,\n\tassistiveText: propAssistiveText,\n\tclassName,\n\tdisabled = false,\n\ticon,\n\ticonName,\n\ticonSize = 'medium',\n\tid,\n\tonBlur,\n\tonClick,\n\tonFocus,\n\tonKeyDown,\n\tonKeyPress,\n\tonKeyUp,\n\tonMouseDown,\n\tonMouseEnter,\n\tresponsive = false,\n\tstateOne = defaultStateOne,\n\tstateTwo = defaultStateTwo,\n\tstateThree = defaultStateThree,\n\ttabIndex,\n\tvariant,\n\t...rest\n}: ButtonStatefulProps): React.ReactElement => {\n\tconst [internalActive, setInternalActive] = useState(false);\n\n\tconst isActive =\n\t\ttypeof controlledActive === 'boolean' ? controlledActive : internalActive;\n\n\tconst getClassName = useCallback(\n\t\t(active: boolean) =>\n\t\t\tclassNames(className, 'slds-button', 'slds-button_stateful', {\n\t\t\t\t'slds-button_neutral':\n\t\t\t\t\tvariant !== 'icon' &&\n\t\t\t\t\tvariant !== 'icon-filled' &&\n\t\t\t\t\tvariant !== 'success' &&\n\t\t\t\t\tvariant !== 'text',\n\t\t\t\t'slds-button_inverse': variant === 'inverse',\n\t\t\t\t'slds-button_success': variant === 'success',\n\t\t\t\t'slds-not-selected': !active,\n\t\t\t\t'slds-is-selected': active,\n\t\t\t\t'slds-max-small-button_stretch': responsive,\n\t\t\t\t'slds-button_icon-border': variant === 'icon',\n\t\t\t\t'slds-button_icon-border-filled': variant === 'icon-filled',\n\t\t\t}),\n\t\t[className, variant, responsive]\n\t);\n\n\tconst handleBlur = useCallback(\n\t\t(e: FocusEvent<HTMLButtonElement> | MouseEvent<HTMLButtonElement>) => {\n\t\t\tif (onBlur) onBlur(e as FocusEvent<HTMLButtonElement>);\n\t\t\t// SLDS shows `slds-text-selected-focus` on `.slds-is-selected:focus`, so\n\t\t\t// drop focus left behind by a mouse click. Keyboard focus is\n\t\t\t// `:focus-visible` and stays put.\n\t\t\tif (!e.currentTarget.matches(':focus-visible')) e.currentTarget.blur();\n\t\t},\n\t\t[onBlur]\n\t);\n\n\tconst handleClick = useCallback(\n\t\t(e: MouseEvent<HTMLButtonElement>) => {\n\t\t\tif (isFunction(onClick)) onClick(e);\n\t\t\tif (typeof controlledActive !== 'boolean') {\n\t\t\t\tsetInternalActive((prev) => !prev);\n\t\t\t}\n\t\t},\n\t\t[onClick, controlledActive]\n\t);\n\n\tconst defaultIconProps = {\n\t\tdisabled,\n\t\tsize: 'small' as const,\n\t\tclassName: 'slds-button__icon_stateful',\n\t};\n\n\tconst iconAssistiveText =\n\t\ttypeof propAssistiveText === 'string'\n\t\t\t? propAssistiveText\n\t\t\t: { ...defaultAssistiveText, ...propAssistiveText }.icon;\n\n\t// Accept aria-* props\n\tlet ariaProps = getAriaProps(rest);\n\n\tif (variant === 'icon' || variant === 'icon-filled') {\n\t\tif (Object.keys(ariaProps).length === 0) {\n\t\t\tariaProps = { 'aria-live': 'polite' as const };\n\t\t}\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\t{...ariaProps}\n\t\t\t\tclassName={getClassName(isActive)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tid={id}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonFocus={onFocus}\n\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\tonMouseDown={onMouseDown}\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={handleBlur}\n\t\t\t\ttabIndex={tabIndex ? parseInt(tabIndex, 10) : undefined}\n\t\t\t\ttype=\"button\"\n\t\t\t>\n\t\t\t\t{icon ? (\n\t\t\t\t\tReact.cloneElement(\n\t\t\t\t\t\ticon as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...defaultIconProps,\n\t\t\t\t\t\t\t...((icon as React.ReactElement<Record<string, unknown>>).props ||\n\t\t\t\t\t\t\t\t{}),\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={iconName}\n\t\t\t\t\t\tsize={iconSize as 'x-small' | 'small' | 'medium' | 'large'}\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{iconAssistiveText ? (\n\t\t\t\t\t<span className=\"slds-assistive-text\">{iconAssistiveText}</span>\n\t\t\t\t) : null}\n\t\t\t</button>\n\t\t);\n\t}\n\n\tconst defaultIconPropsWithPosition = {\n\t\t...defaultIconProps,\n\t\tposition: 'left' as const,\n\t};\n\n\tif (Object.keys(ariaProps).length === 0) {\n\t\tariaProps = { 'aria-live': 'assertive' as const };\n\t}\n\n\treturn (\n\t\t<button\n\t\t\t{...ariaProps}\n\t\t\tclassName={getClassName(isActive)}\n\t\t\tdisabled={disabled}\n\t\t\tid={id}\n\t\t\tonBlur={handleBlur}\n\t\t\tonClick={handleClick}\n\t\t\tonFocus={onFocus}\n\t\t\tonKeyDown={onKeyDown}\n\t\t\tonKeyPress={onKeyPress}\n\t\t\tonKeyUp={onKeyUp}\n\t\t\tonMouseEnter={onMouseEnter}\n\t\t\tonMouseLeave={handleBlur}\n\t\t\ttabIndex={tabIndex ? parseInt(tabIndex, 10) : undefined}\n\t\t\ttype=\"button\"\n\t\t>\n\t\t\t<span className=\"slds-text-not-selected\">\n\t\t\t\t{stateOne.icon ? (\n\t\t\t\t\tReact.cloneElement(\n\t\t\t\t\t\tstateOne.icon as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...defaultIconPropsWithPosition,\n\t\t\t\t\t\t\t...((stateOne.icon as React.ReactElement<Record<string, unknown>>)\n\t\t\t\t\t\t\t\t.props || {}),\n\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={stateOne.iconName}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tposition=\"left\"\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{stateOne.label}\n\t\t\t</span>\n\t\t\t<span className=\"slds-text-selected\">\n\t\t\t\t{stateTwo.icon ? (\n\t\t\t\t\tReact.cloneElement(\n\t\t\t\t\t\tstateTwo.icon as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...defaultIconPropsWithPosition,\n\t\t\t\t\t\t\t...((stateTwo.icon as React.ReactElement<Record<string, unknown>>)\n\t\t\t\t\t\t\t\t.props || {}),\n\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={stateTwo.iconName}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tposition=\"left\"\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{stateTwo.label}\n\t\t\t</span>\n\t\t\t<span className=\"slds-text-selected-focus\">\n\t\t\t\t{stateThree.icon ? (\n\t\t\t\t\tReact.cloneElement(\n\t\t\t\t\t\tstateThree.icon as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...defaultIconPropsWithPosition,\n\t\t\t\t\t\t\t...((\n\t\t\t\t\t\t\t\tstateThree.icon as React.ReactElement<Record<string, unknown>>\n\t\t\t\t\t\t\t).props || {}),\n\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t) : (\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tname={stateThree.iconName}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tposition=\"left\"\n\t\t\t\t\t\tclassName=\"slds-button__icon_stateful\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{stateThree.label}\n\t\t\t</span>\n\t\t</button>\n\t);\n};\n\nButtonStateful.displayName = BUTTON_STATEFUL;\n\nexport default ButtonStateful;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component as e } from "react";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region components/grid/index.tsx
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
getClassName() {
|
|
7
|
+
return t(this.props.className, "slds-col");
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return /* @__PURE__ */ n("div", {
|
|
11
|
+
className: this.getClassName(),
|
|
12
|
+
children: this.props.children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}, i = class extends e {
|
|
16
|
+
static Column = r;
|
|
17
|
+
getClassName() {
|
|
18
|
+
let { flavor: e } = this.props;
|
|
19
|
+
return t(this.props.className, "slds-grid", { [`slds-grid_${e}`]: e });
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return /* @__PURE__ */ n("div", {
|
|
23
|
+
className: this.getClassName(),
|
|
24
|
+
children: this.props.children
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { i as default };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/grid/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport { Component, type ReactNode } from 'react';\nimport classNames from 'classnames';\n\nexport interface GridColumnProps {\n\t/** Additional class names applied to the column. */\n\tclassName?: string;\n\t/** Column content. */\n\tchildren?: ReactNode;\n}\n\nclass GridColumn extends Component<GridColumnProps> {\n\tgetClassName() {\n\t\treturn classNames(this.props.className, 'slds-col');\n\t}\n\n\trender() {\n\t\treturn <div className={this.getClassName()}>{this.props.children}</div>;\n\t}\n}\n\nexport interface GridProps {\n\t/** Additional class names applied to the grid. */\n\tclassName?: string;\n\t/** Grid flavor, appended as `slds-grid_{flavor}`. */\n\tflavor?: string;\n\t/** Grid content, typically `Grid.Column` elements. */\n\tchildren?: ReactNode;\n}\n\nclass Grid extends Component<GridProps> {\n\tstatic Column = GridColumn;\n\n\tgetClassName() {\n\t\tconst { flavor } = this.props;\n\t\treturn classNames(this.props.className, 'slds-grid', {\n\t\t\t[`slds-grid_${flavor}`]: flavor,\n\t\t});\n\t}\n\n\trender() {\n\t\treturn <div className={this.getClassName()}>{this.props.children}</div>;\n\t}\n}\n\nexport default Grid;\n"],"mappings":";;;;AAaA,IAAM,IAAN,cAAyB,EAA2B;CACnD,eAAe;EACd,OAAO,EAAW,KAAK,MAAM,WAAW,UAAU;CACnD;CAEA,SAAS;EACR,OAAO,kBAAC,OAAD;GAAK,WAAW,KAAK,aAAa;GAAI,UAAA,KAAK,MAAM;EAAc,CAAA;CACvE;AACD,GAWM,IAAN,cAAmB,EAAqB;CACvC,OAAO,SAAS;CAEhB,eAAe;EACd,IAAM,EAAE,cAAW,KAAK;EACxB,OAAO,EAAW,KAAK,MAAM,WAAW,aAAa,GACnD,aAAa,MAAW,EAC1B,CAAC;CACF;CAEA,SAAS;EACR,OAAO,kBAAC,OAAD;GAAK,WAAW,KAAK,aAAa;GAAI,UAAA,KAAK,MAAM;EAAc,CAAA;CACvE;AACD"}
|
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
import ee from "./accordion/index.js";
|
|
2
2
|
import te from "./utilities/UNSAFE_direction/index.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import se from "./expandable-section/index.js";
|
|
58
|
-
import Y from "./files/file.js";
|
|
59
|
-
import ce from "./files/index.js";
|
|
60
|
-
import X from "./files/more-files.js";
|
|
61
|
-
import le from "./filter/filter.js";
|
|
62
|
-
import ue from "./illustration/index.js";
|
|
63
|
-
import de from "./forms/input/inline.js";
|
|
3
|
+
import e from "./icon-settings/index.js";
|
|
4
|
+
import t from "./utilities/utility-icon/index.js";
|
|
5
|
+
import n from "./icon/button-icon/index.js";
|
|
6
|
+
import r from "./portal-settings/index.js";
|
|
7
|
+
import i from "./icon/index.js";
|
|
8
|
+
import a from "./tooltip/index.js";
|
|
9
|
+
import o from "./button/index.js";
|
|
10
|
+
import ne from "./accordion/panel.js";
|
|
11
|
+
import re from "./alert/index.js";
|
|
12
|
+
import ie from "./alert/container.js";
|
|
13
|
+
import s from "./avatar/index.js";
|
|
14
|
+
import c from "./badge/index.js";
|
|
15
|
+
import l from "./menu-dropdown/button-trigger.js";
|
|
16
|
+
import u from "./menu-dropdown/index.js";
|
|
17
|
+
import d from "./breadcrumb/index.js";
|
|
18
|
+
import f from "./builder-header/utilities.js";
|
|
19
|
+
import p from "./builder-header/nav-link.js";
|
|
20
|
+
import m from "./builder-header/index.js";
|
|
21
|
+
import h from "./builder-header/misc.js";
|
|
22
|
+
import g from "./builder-header/nav.js";
|
|
23
|
+
import _ from "./builder-header/nav-dropdown.js";
|
|
24
|
+
import v from "./builder-header/toolbar.js";
|
|
25
|
+
import y from "./button-group/index.js";
|
|
26
|
+
import b from "./button-stateful/index.js";
|
|
27
|
+
import x from "./media-object/index.js";
|
|
28
|
+
import S from "./card/empty.js";
|
|
29
|
+
import C from "./card/index.js";
|
|
30
|
+
import w from "./spinner/index.js";
|
|
31
|
+
import T from "./input/index.js";
|
|
32
|
+
import E from "./icon/input-icon/index.js";
|
|
33
|
+
import D from "./card/filter.js";
|
|
34
|
+
import O from "./carousel/index.js";
|
|
35
|
+
import k from "./checkbox/index.js";
|
|
36
|
+
import A from "./radio-group/index.js";
|
|
37
|
+
import j from "./radio-button-group/index.js";
|
|
38
|
+
import M from "./radio/index.js";
|
|
39
|
+
import N from "./tabs/index.js";
|
|
40
|
+
import P from "./tabs/panel.js";
|
|
41
|
+
import F from "./popover/index.js";
|
|
42
|
+
import I from "./color-picker/color-picker.js";
|
|
43
|
+
import L from "./pill/index.js";
|
|
44
|
+
import R from "./combobox/index.js";
|
|
45
|
+
import z from "./combobox/filter.js";
|
|
46
|
+
import B from "./date-picker/index.js";
|
|
47
|
+
import V from "./docked-composer/index.js";
|
|
48
|
+
import H from "./dynamic-icon/index.js";
|
|
49
|
+
import U from "./popover/edit-dialog.js";
|
|
50
|
+
import W from "./expandable-section/index.js";
|
|
51
|
+
import G from "./files/file.js";
|
|
52
|
+
import K from "./files/index.js";
|
|
53
|
+
import q from "./files/more-files.js";
|
|
54
|
+
import J from "./filter/filter.js";
|
|
55
|
+
import Y from "./illustration/index.js";
|
|
56
|
+
import X from "./forms/input/inline.js";
|
|
64
57
|
import Z from "./input/search.js";
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
58
|
+
import ae from "./settings.js";
|
|
59
|
+
import oe from "./modal/index.js";
|
|
60
|
+
import se from "./modal/trigger.js";
|
|
68
61
|
import Q from "./vertical-navigation/index.js";
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
62
|
+
import ce from "./page-header/index.js";
|
|
63
|
+
import le from "./page-header/control.js";
|
|
64
|
+
import ue from "./panel/index.js";
|
|
65
|
+
import de from "./panel/filtering/group.js";
|
|
66
|
+
import fe from "./panel/filtering/list.js";
|
|
67
|
+
import pe from "./panel/filtering/list-heading.js";
|
|
68
|
+
import me from "./pill-container/index.js";
|
|
69
|
+
import he from "./progress-bar/index.js";
|
|
70
|
+
import ge from "./progress-indicator/index.js";
|
|
71
|
+
import _e from "./progress-ring/index.js";
|
|
72
|
+
import ve from "./scoped-notification/index.js";
|
|
73
|
+
import ye from "./setup-assistant/index.js";
|
|
74
|
+
import be from "./setup-assistant/step.js";
|
|
75
|
+
import xe from "./simple-data-table/cell.js";
|
|
76
|
+
import Se from "./simple-data-table/column.js";
|
|
77
|
+
import Ce from "./simple-data-table/interactive-element.js";
|
|
78
|
+
import we from "./simple-data-table/interactive-link.js";
|
|
79
|
+
import Te from "./simple-data-table/row-actions.js";
|
|
80
|
+
import Ee from "./simple-data-table/index.js";
|
|
81
|
+
import De from "./simple-data-table/highlight-cell.js";
|
|
82
82
|
import Oe from "./slider/index.js";
|
|
83
83
|
import $ from "./split-view/index.js";
|
|
84
84
|
import ke from "./split-view/header.js";
|
|
@@ -97,4 +97,4 @@ import Ve from "./welcome-mat/info-badge.js";
|
|
|
97
97
|
import He from "./welcome-mat/tile.js";
|
|
98
98
|
import Ue from "./combobox/add-subheadings.js";
|
|
99
99
|
import We from "../utilities/log.js";
|
|
100
|
-
export { ee as Accordion,
|
|
100
|
+
export { ee as Accordion, ne as AccordionPanel, re as Alert, ie as AlertContainer, s as Avatar, c as Badge, d as BreadCrumb, d as Breadcrumb, m as BuilderHeader, h as BuilderHeaderMisc, g as BuilderHeaderNav, _ as BuilderHeaderNavDropdown, p as BuilderHeaderNavLink, v as BuilderHeaderToolbar, f as BuilderHeaderUtilities, o as Button, y as ButtonGroup, n as ButtonIcon, b as ButtonStateful, C as Card, S as CardEmpty, D as CardFilter, O as Carousel, k as Checkbox, I as ColorPicker, R as Combobox, B as DatePicker, B as Datepicker, V as DockedComposer, u as Dropdown, l as DropdownTrigger, H as DynamicIcon, U as EditDialog, W as ExpandableSection, G as File, K as Files, G as FilesFile, q as FilesMoreFiles, J as Filter, i as Icon, e as IconSettings, Y as Illustration, X as InlineEdit, T as Input, E as InputIcon, Z as InputSearch, x as MediaObject, u as MenuDropdown, l as MenuDropdownButtonTrigger, oe as Modal, se as ModalTrigger, q as MoreFiles, Q as Navigation, ce as PageHeader, le as PageHeaderControl, ue as Panel, de as PanelFilterGroup, fe as PanelFilterList, pe as PanelFilterListHeading, L as Pill, me as PillContainer, F as Popover, a as PopoverTooltip, r as PortalSettings, he as ProgressBar, ge as ProgressIndicator, _e as ProgressRing, M as Radio, j as RadioButtonGroup, A as RadioGroup, ee as SLDSAccordion, ne as SLDSAccordionPanel, re as SLDSAlert, ie as SLDSAlertContainer, s as SLDSAvatar, c as SLDSBadge, d as SLDSBreadCrumb, d as SLDSBreadcrumb, m as SLDSBuilderHeader, h as SLDSBuilderHeaderMisc, g as SLDSBuilderHeaderNav, _ as SLDSBuilderHeaderNavDropdown, p as SLDSBuilderHeaderNavLink, v as SLDSBuilderHeaderToolbar, f as SLDSBuilderHeaderUtilities, o as SLDSButton, y as SLDSButtonGroup, n as SLDSButtonIcon, b as SLDSButtonStateful, C as SLDSCard, S as SLDSCardEmpty, D as SLDSCardFilter, O as SLDSCarousel, k as SLDSCheckbox, I as SLDSColorPicker, R as SLDSCombobox, z as SLDSComboboxFilterAndLimit, B as SLDSDatePicker, B as SLDSDatepicker, V as SLDSDockedComposer, l as SLDSDropdownTrigger, H as SLDSDynamicIcon, U as SLDSEditDialog, W as SLDSExpandableSection, G as SLDSFile, K as SLDSFiles, G as SLDSFilesFile, q as SLDSFilesMoreFiles, J as SLDSFilter, i as SLDSIcon, e as SLDSIconSettings, Y as SLDSIllustration, X as SLDSInlineEdit, T as SLDSInput, E as SLDSInputIcon, Z as SLDSInputSearch, x as SLDSMediaObject, u as SLDSMenuDropdown, l as SLDSMenuDropdownButtonTrigger, oe as SLDSModal, se as SLDSModalTrigger, q as SLDSMoreFiles, Q as SLDSNavigation, ce as SLDSPageHeader, le as SLDSPageHeaderControl, ue as SLDSPanel, de as SLDSPanelFilterGroup, fe as SLDSPanelFilterList, pe as SLDSPanelFilterListHeading, L as SLDSPill, me as SLDSPillContainer, F as SLDSPopover, a as SLDSPopoverTooltip, r as SLDSPortalSettings, he as SLDSProgressBar, ge as SLDSProgressIndicator, _e as SLDSProgressRing, M as SLDSRadio, j as SLDSRadioButtonGroup, A as SLDSRadioGroup, ve as SLDSScopedNotification, Z as SLDSSearch, ae as SLDSSettings, ye as SLDSSetupAssistant, be as SLDSSetupAssistantStep, Ee as SLDSSimpleDataTable, xe as SLDSSimpleDataTableCell, Se as SLDSSimpleDataTableColumn, De as SLDSSimpleDataTableHighlightCell, Ce as SLDSSimpleDataTableInteractiveElement, we as SLDSSimpleDataTableInteractiveLink, Te as SLDSSimpleDataTableRowActions, Oe as SLDSSlider, w as SLDSSpinner, $ as SLDSSplitView, ke as SLDSSplitViewHeader, Ae as SLDSSplitViewListbox, $ as SLDSSplitview, N as SLDSTabs, P as SLDSTabsPanel, je as SLDSTextarea, Me as SLDSToast, Ne as SLDSToastContainer, a as SLDSTooltip, Pe as SLDSTree, Fe as SLDSTrialBar, Ie as SLDSTrialBarButton, Le as SLDSTrialBarDropdown, t as SLDSUtilityIcon, Q as SLDSVerticalNavigation, Re as SLDSVisualPicker, ze as SLDSVisualPickerLink, Be as SLDSWelcomeMat, Ve as SLDSWelcomeMatInfoBadge, He as SLDSWelcomeMatTile, ve as ScopedNotification, Z as Search, ae as Settings, ye as SetupAssistant, be as SetupAssistantStep, Ee as SimpleDataTable, xe as SimpleDataTableCell, Se as SimpleDataTableColumn, De as SimpleDataTableHighlightCell, Ce as SimpleDataTableInteractiveElement, we as SimpleDataTableInteractiveLink, Te as SimpleDataTableRowActions, Oe as Slider, w as Spinner, $ as SplitView, ke as SplitViewHeader, Ae as SplitViewListbox, $ as Splitview, N as Tabs, P as TabsPanel, je as Textarea, Me as Toast, Ne as ToastContainer, a as Tooltip, Pe as Tree, Fe as TrialBar, Ie as TrialBarButton, Le as TrialBarDropdown, te as UNSAFE_DirectionSettings, t as UtilityIcon, Q as VerticalNavigation, Re as VisualPicker, ze as VisualPickerLink, Be as WelcomeMat, Ve as WelcomeMatInfoBadge, He as WelcomeMatTile, Ue as comboboxAddSubheadings, z as comboboxFilterAndLimit, We as log };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../utilities/menu-list/item-label.js";
|
|
2
|
-
import "../utilities/menu-list/item.js";
|
|
3
|
-
import
|
|
1
|
+
import e from "../utilities/menu-list/item-label.js";
|
|
2
|
+
import t from "../utilities/menu-list/item.js";
|
|
3
|
+
import n, { DropdownNubbinPositions as r } from "./menu-dropdown.js";
|
|
4
4
|
//#region components/menu-dropdown/index.tsx
|
|
5
|
-
var
|
|
5
|
+
var i = n;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { t as default };
|
|
7
|
+
export { r as DropdownNubbinPositions, t as ListItem, e as ListItemLabel, i as default };
|
|
8
8
|
|
|
9
9
|
//# sourceMappingURL=index.js.map
|