@salesforce/design-system-react 11.0.0-rc.0 → 11.0.0-rc.2
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 +27 -1
- package/dist/cjs/components/accordion/index.cjs +1 -1
- package/dist/cjs/components/accordion/index.cjs.map +1 -1
- package/dist/cjs/components/accordion/panel.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/builder-header/nav-dropdown.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-link.cjs.map +1 -1
- package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
- package/dist/cjs/components/button/check-props.cjs +1 -1
- package/dist/cjs/components/button/check-props.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-stateful/check-props.cjs +1 -1
- package/dist/cjs/components/button-stateful/check-props.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/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-indicators.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs +1 -1
- package/dist/cjs/components/checkbox/check-props.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/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/custom-color.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch-option.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch-option.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/combobox/index.cjs +1 -1
- package/dist/cjs/components/combobox/index.cjs.map +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/calendar.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/day.cjs +1 -1
- package/dist/cjs/components/date-picker/private/day.cjs.map +1 -1
- package/dist/cjs/components/files/file.cjs +1 -8
- package/dist/cjs/components/files/file.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-figure.cjs +1 -1
- package/dist/cjs/components/files/private/file-figure.cjs.map +1 -1
- package/dist/cjs/components/filter/filter.cjs +1 -1
- package/dist/cjs/components/filter/filter.cjs.map +1 -1
- package/dist/cjs/components/icon/check-props.cjs +1 -1
- package/dist/cjs/components/icon/check-props.cjs.map +1 -1
- package/dist/cjs/components/icon/index.cjs +1 -1
- package/dist/cjs/components/icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon-settings/index.cjs.map +1 -1
- package/dist/cjs/components/input/check-props.cjs +1 -1
- package/dist/cjs/components/input/check-props.cjs.map +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/input/search.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.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/panel/filtering/group.cjs.map +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/edit-dialog.cjs.map +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/progress-indicator/index.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/step.cjs.map +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-group/check-props.cjs.map +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/scoped-notification/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/interactive-element.cjs +1 -1
- package/dist/cjs/components/simple-data-table/interactive-element.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/cell-context.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/corner-style.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/corner-style.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/link.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/link.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/header.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/panel.cjs.map +1 -1
- package/dist/cjs/components/tabs/private/tab.cjs +1 -1
- package/dist/cjs/components/tabs/private/tab.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +1 -1
- package/dist/cjs/components/textarea/check-props.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.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +1 -3
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/button.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/dropdown.cjs.map +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/dialog/portal.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/portal.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/index.cjs +1 -26
- package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item-label.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs.map +1 -1
- package/dist/cjs/utilities/color.cjs +1 -1
- package/dist/cjs/utilities/color.cjs.map +1 -1
- package/dist/cjs/utilities/dom-element-focus.cjs.map +1 -1
- package/dist/cjs/utilities/execution-environment.cjs.map +1 -1
- package/dist/cjs/utilities/get-aria-props.cjs +1 -1
- package/dist/cjs/utilities/get-aria-props.cjs.map +1 -1
- package/dist/cjs/utilities/get-component-doc.cjs +1 -1
- package/dist/cjs/utilities/get-component-doc.cjs.map +1 -1
- package/dist/cjs/utilities/get-data-props.cjs +1 -1
- package/dist/cjs/utilities/get-data-props.cjs.map +1 -1
- package/dist/cjs/utilities/keyboard-navigable-dialog.cjs +1 -1
- package/dist/cjs/utilities/keyboard-navigable-dialog.cjs.map +1 -1
- package/dist/cjs/utilities/keyboard-navigate.cjs +1 -1
- package/dist/cjs/utilities/keyboard-navigate.cjs.map +1 -1
- package/dist/cjs/utilities/product-tokens/icon-backgrounds.cjs.map +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/has-children-without-display-name-of.cjs +1 -1
- package/dist/cjs/utilities/warning/has-children-without-display-name-of.cjs.map +1 -1
- package/dist/cjs/utilities/warning/if-one-then-both-required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/if-one-then-both-required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/is-trigger-tabbable.cjs +1 -1
- package/dist/cjs/utilities/warning/is-trigger-tabbable.cjs.map +1 -1
- package/dist/cjs/utilities/warning/low-priority-warning.cjs.map +1 -1
- package/dist/cjs/utilities/warning/one-of-required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/one-of-required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/only-one-of-properties.cjs +1 -1
- package/dist/cjs/utilities/warning/only-one-of-properties.cjs.map +1 -1
- package/dist/cjs/utilities/warning/removal-version.cjs +2 -0
- package/dist/cjs/utilities/warning/removal-version.cjs.map +1 -0
- package/dist/cjs/utilities/warning/render-function-return-contents-lack-display-name.cjs +1 -1
- package/dist/cjs/utilities/warning/render-function-return-contents-lack-display-name.cjs.map +1 -1
- package/dist/cjs/utilities/warning/required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/sunset-property.cjs +1 -1
- package/dist/cjs/utilities/warning/sunset-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/warned-registry.cjs +2 -0
- package/dist/cjs/utilities/warning/warned-registry.cjs.map +1 -0
- package/dist/es/components/accordion/index.js +7 -3
- package/dist/es/components/accordion/index.js.map +1 -1
- package/dist/es/components/accordion/panel.js.map +1 -1
- package/dist/es/components/alert/index.js +4 -5
- package/dist/es/components/alert/index.js.map +1 -1
- package/dist/es/components/builder-header/nav-dropdown.js.map +1 -1
- package/dist/es/components/builder-header/nav-link.js.map +1 -1
- package/dist/es/components/builder-header/toolbar.js.map +1 -1
- package/dist/es/components/button/check-props.js +1 -1
- package/dist/es/components/button/check-props.js.map +1 -1
- package/dist/es/components/button/index.js +50 -50
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/check-props.js +1 -1
- package/dist/es/components/button-stateful/check-props.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/carousel/index.js +155 -129
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-indicators.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-item.js +1 -1
- package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
- package/dist/es/components/checkbox/check-props.js +1 -1
- package/dist/es/components/checkbox/check-props.js.map +1 -1
- package/dist/es/components/checkbox/index.js +102 -100
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +150 -151
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/custom-color.js.map +1 -1
- package/dist/es/components/color-picker/private/hsv-color.js +16 -20
- package/dist/es/components/color-picker/private/hsv-color.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch-option.js +2 -2
- package/dist/es/components/color-picker/private/swatch-option.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch.js +1 -1
- package/dist/es/components/color-picker/private/swatch.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +569 -582
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/index.js +6 -19
- package/dist/es/components/combobox/index.js.map +1 -1
- package/dist/es/components/combobox/private/menu.js +3 -3
- package/dist/es/components/combobox/private/menu.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +101 -102
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/date-picker/private/calendar.js.map +1 -1
- package/dist/es/components/date-picker/private/day.js +1 -1
- package/dist/es/components/date-picker/private/day.js.map +1 -1
- package/dist/es/components/files/file.js +5 -6
- package/dist/es/components/files/file.js.map +1 -1
- package/dist/es/components/files/private/file-actions.js +2 -2
- package/dist/es/components/files/private/file-actions.js.map +1 -1
- package/dist/es/components/files/private/file-figure.js +1 -1
- package/dist/es/components/files/private/file-figure.js.map +1 -1
- package/dist/es/components/filter/filter.js +5 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/icon/check-props.js +9 -7
- package/dist/es/components/icon/check-props.js.map +1 -1
- package/dist/es/components/icon/index.js +13 -10
- package/dist/es/components/icon/index.js.map +1 -1
- package/dist/es/components/icon/input-icon/index.js.map +1 -1
- package/dist/es/components/icon-settings/index.js.map +1 -1
- package/dist/es/components/input/check-props.js +14 -13
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/input/search.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +202 -207
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +1 -2
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/panel/filtering/group.js.map +1 -1
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +10 -6
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +181 -177
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/index.js.map +1 -1
- package/dist/es/components/progress-indicator/private/step.js.map +1 -1
- package/dist/es/components/progress-ring/index.js.map +1 -1
- package/dist/es/components/radio/index.js +1 -1
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-group/check-props.js.map +1 -1
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/scoped-notification/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/cell.js +8 -5
- package/dist/es/components/simple-data-table/cell.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +97 -91
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js +31 -28
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -1
- package/dist/es/components/simple-data-table/private/cell-context.js.map +1 -1
- package/dist/es/components/simple-data-table/private/corner-style.js +9 -0
- package/dist/es/components/simple-data-table/private/corner-style.js.map +1 -0
- package/dist/es/components/simple-data-table/private/head.js +65 -42
- package/dist/es/components/simple-data-table/private/head.js.map +1 -1
- package/dist/es/components/simple-data-table/private/header-cell.js +2 -1
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -1
- package/dist/es/components/simple-data-table/private/link.js.map +1 -1
- package/dist/es/components/simple-data-table/private/row.js +96 -60
- package/dist/es/components/simple-data-table/private/row.js.map +1 -1
- package/dist/es/components/simple-data-table/row-actions.js +4 -1
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/split-view/header.js.map +1 -1
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/panel.js.map +1 -1
- package/dist/es/components/tabs/private/tab.js +1 -1
- package/dist/es/components/tabs/private/tab.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +1 -1
- package/dist/es/components/textarea/check-props.js.map +1 -1
- package/dist/es/components/textarea/index.js +29 -42
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/index.js.map +1 -1
- package/dist/es/components/tooltip/index.js +107 -88
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js +14 -19
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/trial-bar/button.js.map +1 -1
- package/dist/es/components/trial-bar/dropdown.js.map +1 -1
- package/dist/es/components/utilities/dialog/index.js +2 -1
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/components/utilities/dialog/portal.js +5 -3
- package/dist/es/components/utilities/dialog/portal.js.map +1 -1
- package/dist/es/components/utilities/menu-list/index.js +6 -6
- package/dist/es/components/utilities/menu-list/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item-label.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item.js +42 -18
- package/dist/es/components/utilities/menu-list/item.js.map +1 -1
- package/dist/es/components/utilities/utility-icon/index.js +32 -52
- package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
- package/dist/es/utilities/color.js +1 -1
- package/dist/es/utilities/color.js.map +1 -1
- package/dist/es/utilities/dom-element-focus.js.map +1 -1
- package/dist/es/utilities/execution-environment.js.map +1 -1
- package/dist/es/utilities/get-aria-props.js +1 -1
- package/dist/es/utilities/get-aria-props.js.map +1 -1
- package/dist/es/utilities/get-component-doc.js +6 -6
- package/dist/es/utilities/get-component-doc.js.map +1 -1
- package/dist/es/utilities/get-data-props.js +1 -1
- package/dist/es/utilities/get-data-props.js.map +1 -1
- package/dist/es/utilities/keyboard-navigable-dialog.js +7 -7
- package/dist/es/utilities/keyboard-navigable-dialog.js.map +1 -1
- package/dist/es/utilities/keyboard-navigate.js +1 -1
- package/dist/es/utilities/keyboard-navigate.js.map +1 -1
- package/dist/es/utilities/product-tokens/icon-backgrounds.js.map +1 -1
- package/dist/es/utilities/warning/children-as-trigger.js +10 -8
- package/dist/es/utilities/warning/children-as-trigger.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property-value.js +12 -10
- package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property.js +10 -8
- package/dist/es/utilities/warning/deprecated-property.js.map +1 -1
- package/dist/es/utilities/warning/has-children-without-display-name-of.js +11 -10
- package/dist/es/utilities/warning/has-children-without-display-name-of.js.map +1 -1
- package/dist/es/utilities/warning/if-one-then-both-required-property.js +10 -9
- package/dist/es/utilities/warning/if-one-then-both-required-property.js.map +1 -1
- package/dist/es/utilities/warning/is-trigger-tabbable.js +9 -8
- package/dist/es/utilities/warning/is-trigger-tabbable.js.map +1 -1
- package/dist/es/utilities/warning/low-priority-warning.js.map +1 -1
- package/dist/es/utilities/warning/one-of-required-property.js +11 -10
- package/dist/es/utilities/warning/one-of-required-property.js.map +1 -1
- package/dist/es/utilities/warning/only-one-of-properties.js +9 -8
- package/dist/es/utilities/warning/only-one-of-properties.js.map +1 -1
- package/dist/es/utilities/warning/removal-version.js +6 -0
- package/dist/es/utilities/warning/removal-version.js.map +1 -0
- package/dist/es/utilities/warning/render-function-return-contents-lack-display-name.js +14 -13
- package/dist/es/utilities/warning/render-function-return-contents-lack-display-name.js.map +1 -1
- package/dist/es/utilities/warning/required-property.js +8 -7
- package/dist/es/utilities/warning/required-property.js.map +1 -1
- package/dist/es/utilities/warning/sunset-property.js +8 -7
- package/dist/es/utilities/warning/sunset-property.js.map +1 -1
- package/dist/es/utilities/warning/warned-registry.js +10 -0
- package/dist/es/utilities/warning/warned-registry.js.map +1 -0
- package/dist/llms/components/accordion.md +267 -0
- package/dist/llms/components/alert.md +228 -0
- package/dist/llms/components/avatar.md +167 -0
- package/dist/llms/components/badge.md +153 -0
- package/dist/llms/components/breadcrumb.md +148 -0
- package/dist/llms/components/builder-header.examples.md +239 -0
- package/dist/llms/components/builder-header.md +736 -0
- package/dist/llms/components/button-group.md +167 -0
- package/dist/llms/components/button-stateful.md +246 -0
- package/dist/llms/components/button.md +661 -0
- package/dist/llms/components/card.md +368 -0
- package/dist/llms/components/carousel.md +365 -0
- package/dist/llms/components/checkbox.md +887 -0
- package/dist/llms/components/color-picker.md +591 -0
- package/dist/llms/components/combobox.examples.md +802 -0
- package/dist/llms/components/combobox.md +929 -0
- package/dist/llms/components/date-picker.md +546 -0
- package/dist/llms/components/docked-composer.md +173 -0
- package/dist/llms/components/dynamic-icon.md +226 -0
- package/dist/llms/components/expandable-section.md +198 -0
- package/dist/llms/components/files.md +337 -0
- package/dist/llms/components/filter.md +775 -0
- package/dist/llms/components/icon-settings.md +301 -0
- package/dist/llms/components/icon.md +1040 -0
- package/dist/llms/components/input.md +746 -0
- package/dist/llms/components/media-object.md +125 -0
- package/dist/llms/components/menu-dropdown.md +732 -0
- package/dist/llms/components/modal.md +504 -0
- package/dist/llms/components/page-header.md +282 -0
- package/dist/llms/components/panel.md +256 -0
- package/dist/llms/components/pill-container.md +218 -0
- package/dist/llms/components/pill.md +266 -0
- package/dist/llms/components/popover.md +600 -0
- package/dist/llms/components/portal-settings.md +371 -0
- package/dist/llms/components/progress-bar.md +175 -0
- package/dist/llms/components/progress-indicator.md +399 -0
- package/dist/llms/components/progress-ring.md +146 -0
- package/dist/llms/components/radio-button-group.md +285 -0
- package/dist/llms/components/radio-group.md +242 -0
- package/dist/llms/components/radio.md +269 -0
- package/dist/llms/components/scoped-notification.md +156 -0
- package/dist/llms/components/setup-assistant.md +398 -0
- package/dist/llms/components/simple-data-table.examples.md +2773 -0
- package/dist/llms/components/simple-data-table.md +919 -0
- package/dist/llms/components/slider.md +217 -0
- package/dist/llms/components/spinner.md +232 -0
- package/dist/llms/components/split-view.md +350 -0
- package/dist/llms/components/tabs.md +311 -0
- package/dist/llms/components/textarea.md +331 -0
- package/dist/llms/components/toast.md +267 -0
- package/dist/llms/components/tooltip.md +470 -0
- package/dist/llms/components/tree.md +1011 -0
- package/dist/llms/components/trial-bar.md +383 -0
- package/dist/llms/components/vertical-navigation.md +196 -0
- package/dist/llms/components/visual-picker.md +362 -0
- package/dist/llms/components/welcome-mat.md +885 -0
- package/dist/llms/docs/migration-v11.md +471 -0
- package/dist/llms/llms-full.txt +6874 -0
- package/dist/llms/llms.txt +133 -0
- package/dist/llms/rules.md +36 -0
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/accordion/panel.d.ts +7 -7
- package/dist/types/components/builder-header/nav-dropdown.d.ts +1 -0
- package/dist/types/components/builder-header/nav-dropdown.d.ts.map +1 -1
- package/dist/types/components/builder-header/nav-link.d.ts +0 -1
- package/dist/types/components/builder-header/nav-link.d.ts.map +1 -1
- package/dist/types/components/builder-header/toolbar.d.ts +0 -1
- package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +19 -6
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +8 -2
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +7 -1
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +22 -5
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +6 -4
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/types.d.ts +2 -2
- package/dist/types/components/combobox/combobox.d.ts +22 -0
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/index.d.ts +1 -1
- package/dist/types/components/combobox/index.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +16 -4
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +2 -6
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/files/file.d.ts +5 -0
- package/dist/types/components/files/file.d.ts.map +1 -1
- package/dist/types/components/icon/index.d.ts +8 -1
- package/dist/types/components/icon/index.d.ts.map +1 -1
- package/dist/types/components/icon/input-icon/index.d.ts +3 -0
- package/dist/types/components/icon/input-icon/index.d.ts.map +1 -1
- package/dist/types/components/icon-settings/index.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +10 -6
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/input/search.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts +5 -0
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +13 -3
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/index.d.ts +5 -5
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/page-header/types.d.ts +3 -0
- package/dist/types/components/page-header/types.d.ts.map +1 -1
- package/dist/types/components/panel/filtering/group.d.ts +2 -0
- package/dist/types/components/panel/filtering/group.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +1 -0
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/popover/edit-dialog.d.ts +1 -3
- package/dist/types/components/popover/edit-dialog.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/index.d.ts +1 -0
- package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/components/progress-ring/index.d.ts +1 -0
- package/dist/types/components/progress-ring/index.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +11 -4
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/index.d.ts +5 -3
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/scoped-notification/index.d.ts +1 -0
- package/dist/types/components/scoped-notification/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +0 -1
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/cell.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts +8 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +11 -2
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +6 -4
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts +1 -0
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/panel.d.ts +2 -1
- package/dist/types/components/tabs/panel.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +12 -40
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +5 -0
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +5 -0
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/utilities/dialog/portal.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/index.d.ts +2 -2
- package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item-label.d.ts +12 -0
- package/dist/types/components/utilities/menu-list/item-label.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts +14 -1
- package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
- package/dist/types/components/utilities/truncate/index.d.ts.map +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
- package/dist/types/types/common.d.ts.map +1 -1
- package/dist/types/types/components.d.ts.map +1 -1
- package/package.json +9 -7
- package/dist/cjs/icons/action/index.cjs +0 -2
- package/dist/cjs/icons/action/index.cjs.map +0 -1
- package/dist/cjs/icons/custom/index.cjs +0 -2
- package/dist/cjs/icons/custom/index.cjs.map +0 -1
- package/dist/cjs/icons/doctype/index.cjs +0 -2
- package/dist/cjs/icons/doctype/index.cjs.map +0 -1
- package/dist/cjs/icons/standard/index.cjs +0 -2
- package/dist/cjs/icons/standard/index.cjs.map +0 -1
- package/dist/cjs/icons/utility/index.cjs +0 -2
- package/dist/cjs/icons/utility/index.cjs.map +0 -1
- package/dist/es/icons/action/index.js +0 -6
- package/dist/es/icons/action/index.js.map +0 -1
- package/dist/es/icons/custom/index.js +0 -6
- package/dist/es/icons/custom/index.js.map +0 -1
- package/dist/es/icons/doctype/index.js +0 -6
- package/dist/es/icons/doctype/index.js.map +0 -1
- package/dist/es/icons/standard/index.js +0 -6
- package/dist/es/icons/standard/index.js.map +0 -1
- package/dist/es/icons/utility/index.js +0 -6
- package/dist/es/icons/utility/index.js.map +0 -1
- package/dist/types/icons/action/index.d.ts +0 -3
- package/dist/types/icons/action/index.d.ts.map +0 -1
- package/dist/types/icons/custom/index.d.ts +0 -3
- package/dist/types/icons/custom/index.d.ts.map +0 -1
- package/dist/types/icons/doctype/index.d.ts +0 -3
- package/dist/types/icons/doctype/index.d.ts.map +0 -1
- package/dist/types/icons/standard/index.d.ts +0 -3
- package/dist/types/icons/standard/index.d.ts.map +0 -1
- package/dist/types/icons/utility/index.d.ts +0 -3
- package/dist/types/icons/utility/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","names":[],"sources":["../../../../components/setup-assistant/step.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\ttype ReactNode,\n\ttype CSSProperties,\n\ttype SyntheticEvent,\n} from 'react';\nimport classNames from 'classnames';\n\nimport assign from 'lodash.assign';\n\n// This component's `checkProps` which issues warnings to developers about properties\n// when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport Button from '../button';\nimport ProgressRing from '../progress-ring';\n\nimport Icon, { type IconProps } from '../icon';\n\nimport { SETUP_ASSISTANT_STEP } from '../../utilities/constants';\nimport isElementOfType from '../../utilities/is-element-of-type';\nimport generateId from '../../utilities/generate-id';\n\nexport interface StepAssistiveText {\n\t/** Button that examples a step */\n\texpandStep?: string;\n}\n\n/**\n * Data passed to `onToggleIsOpen`\n */\nexport interface StepToggleData {\n\t/** Index of the step within the Setup Assistant (set by the parent `SetupAssistant`) */\n\tindex?: number;\n\t/** Requested (next) open state: `true` to expand the step, `false` to collapse it */\n\tisOpen: boolean;\n\t/** Props of the step being toggled */\n\tstep: StepProps;\n}\n\nexport interface StepProps {\n\t/**\n\t * **Assistive text for accessibility**\n\t * This object is merged with the default props object on every render.\n\t * * `expandStep`: Button that examples a step\n\t * _Tested with snapshot testing._\n\t */\n\tassistiveText?: StepAssistiveText;\n\t/**\n\t * CSS class names to be added to the container element. `array`, `object`, or `string` are accepted.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Detailed description of the step\n\t */\n\tdescription?: string | ReactNode;\n\t/**\n\t * Estimated time for completing the step\n\t */\n\testimatedTime?: string | ReactNode;\n\t/**\n\t * Heading for the step\n\t */\n\theading?: string | ReactNode;\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * Dictates whether the step can be expanded / collapsed\n\t */\n\tisExpandable?: boolean;\n\t/**\n\t * Expanded state of an `isExpandable` step when it is controlled. When set, the step only expands and\n\t * collapses when this prop changes: update it from `onToggleIsOpen` (or the parent's\n\t * `onStepToggleIsOpen`). Leave it `undefined` for an uncontrolled step (see `defaultIsOpen`).\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Initial expanded state of an uncontrolled `isExpandable` step (`isOpen` is `undefined`). Defaults to `false`.\n\t */\n\tdefaultIsOpen?: boolean;\n\t/**\n\t * A step's available action(s). Typically a Button, Button of variant \"link,\" or Checkbox of variant \"toggle\"\n\t */\n\taction?: ReactNode;\n\t/**\n\t * Step content shown when an expandable step is open. Typically a ProgressIndicator and/or ScopedNotification component\n\t */\n\tcontent?: ReactNode;\n\t/**\n\t * Content within the media figure. Expects an Icon or ProgressRing component. An Icon is rendered at size `small`.\n\t */\n\tfigure?: ReactNode;\n\t/** @deprecated Use `action` instead. */\n\tonRenderAction?: () => ReactNode;\n\t/** @deprecated Use `content` instead. */\n\tonRenderContent?: () => ReactNode;\n\t/** @deprecated Use `figure` instead. */\n\tonRenderFigure?: () => ReactNode;\n\t/**\n\t * Called when the step requests to expand / collapse, controlled or not. `data.isOpen` is the\n\t * requested (next) state. Set by the parent `SetupAssistant` from `onStepToggleIsOpen` unless the\n\t * step passes its own.\n\t */\n\tonToggleIsOpen?: (event: SyntheticEvent, data: StepToggleData) => void;\n\t/**\n\t * Percentage of step completed. No progress indicator will be shown for the step unless this is provided\n\t */\n\tprogress?: number;\n\t/**\n\t * Display number for the step. Only appears if progress indicator is enabled. Determined automatically by parent if not provided.\n\t */\n\tstepNumber?: number;\n}\n\n/** Props the parent `SetupAssistant` injects. They aren't part of the public props. */\nexport interface StepInjectedProps {\n\t/** Index of the step within the Setup Assistant */\n\tindex?: number;\n}\n\ninterface StepState {\n\tisOpen: boolean;\n}\n\nconst defaultProps: Partial<StepProps> = {\n\tassistiveText: { expandStep: 'Expand Step' },\n};\n\n/**\n * Setup Assistant Step component is used to specify individual items within the Setup Assistant\n * filled with learning and task links along with a recommended sequence that may have progress tracking\n */\nclass Step extends React.Component<StepProps & StepInjectedProps, StepState> {\n\tstatic displayName = SETUP_ASSISTANT_STEP;\n\n\tstatic defaultProps = defaultProps;\n\n\tgeneratedId: string;\n\n\tconstructor(props: StepProps & StepInjectedProps) {\n\t\tsuper(props);\n\t\tthis.generatedId = generateId();\n\t\tthis.state = {\n\t\t\tisOpen: props.defaultIsOpen ?? false,\n\t\t};\n\t\tcheckProps(SETUP_ASSISTANT_STEP, { ...this.props }, componentDoc);\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetIsOpen() {\n\t\treturn this.props.isOpen !== undefined\n\t\t\t? this.props.isOpen\n\t\t\t: this.state.isOpen;\n\t}\n\n\t// Controlled when `isOpen` is set: the step reports the requested state and waits for the prop.\n\ttoggleIsOpen = (event: SyntheticEvent) => {\n\t\tconst isOpen = !this.getIsOpen();\n\n\t\tif (this.props.isOpen === undefined) {\n\t\t\tthis.setState({ isOpen });\n\t\t}\n\n\t\tthis.props.onToggleIsOpen?.(event, {\n\t\t\tindex: this.props.index,\n\t\t\tisOpen,\n\t\t\tstep: this.props,\n\t\t});\n\t};\n\n\trenderMediaContent() {\n\t\treturn (\n\t\t\t<React.Fragment>\n\t\t\t\t<div className=\"slds-setup-assistant__step-summary-content slds-media__body\">\n\t\t\t\t\t<h3 className=\"slds-setup-assistant__step-summary-title slds-text-heading_small\">\n\t\t\t\t\t\t{this.props.isExpandable ? (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\taria-controls={`${this.getId()}-detail-content`}\n\t\t\t\t\t\t\t\tclassName=\"slds-button_reset\"\n\t\t\t\t\t\t\t\tlabel={this.props.heading}\n\t\t\t\t\t\t\t\tonClick={this.toggleIsOpen}\n\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tthis.props.heading\n\t\t\t\t\t\t)}\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>{this.props.description}</p>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"slds-media__figure slds-media__figure_reverse\">\n\t\t\t\t\t{this.props.action ?? this.props.onRenderAction?.() ?? null}\n\t\t\t\t\t{this.props.estimatedTime ? (\n\t\t\t\t\t\t<p\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t'slds-text-align_right',\n\t\t\t\t\t\t\t\t'slds-text-color_weak',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'slds-p-top_medium':\n\t\t\t\t\t\t\t\t\t\tthis.props.action !== undefined ||\n\t\t\t\t\t\t\t\t\t\tthis.props.onRenderAction !== undefined,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.props.estimatedTime}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</React.Fragment>\n\t\t);\n\t}\n\n\trenderSummary() {\n\t\tlet figure: ReactNode;\n\t\tlet progressRingTheme: 'active' | 'complete' | undefined;\n\n\t\tif (\n\t\t\tthis.props.progress !== undefined &&\n\t\t\tthis.props.progress > 0 &&\n\t\t\tthis.props.progress < 100\n\t\t) {\n\t\t\tprogressRingTheme = 'active';\n\t\t} else if (this.props.progress === 100) {\n\t\t\tprogressRingTheme = 'complete';\n\t\t}\n\n\t\tif (this.props.figure !== undefined || this.props.onRenderFigure) {\n\t\t\tconst renderedFigure =\n\t\t\t\tthis.props.figure ?? this.props.onRenderFigure?.() ?? null;\n\n\t\t\tif (isElementOfType<IconProps>(renderedFigure, Icon)) {\n\t\t\t\tconst figureProps = renderedFigure.props;\n\t\t\t\tlet containerStyle: CSSProperties = {\n\t\t\t\t\tposition: 'relative',\n\t\t\t\t\ttop: this.props.isExpandable ? '5px' : '-3px',\n\t\t\t\t};\n\n\t\t\t\tif (figureProps.containerStyle) {\n\t\t\t\t\tcontainerStyle = {\n\t\t\t\t\t\t...containerStyle,\n\t\t\t\t\t\t...figureProps.containerStyle,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst clonedFigure = React.cloneElement(renderedFigure, {\n\t\t\t\t\t...figureProps,\n\t\t\t\t\tcontainerStyle,\n\t\t\t\t\tsize: 'small',\n\t\t\t\t} as Partial<unknown>);\n\t\t\t\tfigure = <div className=\"slds-media__figure\">{clonedFigure}</div>;\n\t\t\t} else {\n\t\t\t\tfigure = renderedFigure;\n\t\t\t}\n\t\t} else if (this.props.progress !== undefined) {\n\t\t\tfigure = (\n\t\t\t\t<div className=\"slds-media__figure\">\n\t\t\t\t\t<ProgressRing\n\t\t\t\t\t\thasIcon\n\t\t\t\t\t\ticon={this.props.progress === 100 ? null : this.props.stepNumber}\n\t\t\t\t\t\tflowDirection=\"fill\"\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\ttheme={progressRingTheme}\n\t\t\t\t\t\tvalue={this.props.progress}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-setup-assistant__step-summary\">\n\t\t\t\t<div className=\"slds-media\">\n\t\t\t\t\t{figure}\n\t\t\t\t\t{this.props.isExpandable || this.props.progress !== undefined ? (\n\t\t\t\t\t\t<div className=\"slds-media__body slds-m-top_x-small\">\n\t\t\t\t\t\t\t<div className=\"slds-media\">{this.renderMediaContent()}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.renderMediaContent()\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst assistiveText = assign(\n\t\t\t{},\n\t\t\tdefaultProps.assistiveText,\n\t\t\tthis.props.assistiveText\n\t\t);\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-setup-assistant__item',\n\t\t\t\t\tthis.props.className as string\n\t\t\t\t)}\n\t\t\t\tid={this.getId()}\n\t\t\t>\n\t\t\t\t<article className=\"slds-setup-assistant__step\">\n\t\t\t\t\t{this.props.isExpandable ? (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames('slds-summary-detail', {\n\t\t\t\t\t\t\t\t'slds-is-open': this.getIsOpen(),\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.expandStep }}\n\t\t\t\t\t\t\t\taria-controls={`${this.getId()}-detail-content`}\n\t\t\t\t\t\t\t\tclassName=\"slds-m-right_x-small slds-m-top_x-small\"\n\t\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\t\ticonClassName=\"slds-summary-detail__action-icon\"\n\t\t\t\t\t\t\t\ticonName=\"switch\"\n\t\t\t\t\t\t\t\tonClick={this.toggleIsOpen}\n\t\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className=\"slds-container_fluid\">\n\t\t\t\t\t\t\t\t<div className=\"slds-summary-detail__title\">\n\t\t\t\t\t\t\t\t\t{this.renderSummary()}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"slds-summary-detail__content\"\n\t\t\t\t\t\t\t\t\tid={`${this.getId()}-detail-content`}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"slds-setup-assistant__step-detail\">\n\t\t\t\t\t\t\t\t\t\t{this.props.content ??\n\t\t\t\t\t\t\t\t\t\t\tthis.props.onRenderContent?.() ??\n\t\t\t\t\t\t\t\t\t\t\tnull}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.renderSummary()\n\t\t\t\t\t)}\n\t\t\t\t</article>\n\t\t\t</li>\n\t\t);\n\t}\n}\n\nexport default Step as React.ComponentType<StepProps>;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"step.js","names":[],"sources":["../../../../components/setup-assistant/step.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\ttype ReactNode,\n\ttype CSSProperties,\n\ttype SyntheticEvent,\n} from 'react';\nimport classNames from 'classnames';\n\nimport assign from 'lodash.assign';\n\n// This component's `checkProps` which issues warnings to developers about properties\n// when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport Button from '../button';\nimport ProgressRing from '../progress-ring';\n\nimport Icon, { type IconProps } from '../icon';\n\nimport { SETUP_ASSISTANT_STEP } from '../../utilities/constants';\nimport isElementOfType from '../../utilities/is-element-of-type';\nimport generateId from '../../utilities/generate-id';\n\nexport interface StepAssistiveText {\n\t/** Button that examples a step */\n\texpandStep?: string;\n}\n\n/**\n * Data passed to `onToggleIsOpen`\n */\nexport interface StepToggleData {\n\t/** Index of the step within the Setup Assistant (set by the parent `SetupAssistant`) */\n\tindex?: number;\n\t/** Requested (next) open state: `true` to expand the step, `false` to collapse it */\n\tisOpen: boolean;\n\t/** Props of the step being toggled */\n\tstep: StepProps;\n}\n\nexport interface StepProps {\n\t/**\n\t * **Assistive text for accessibility**\n\t * This object is merged with the default props object on every render.\n\t * * `expandStep`: Button that examples a step\n\t */\n\tassistiveText?: StepAssistiveText;\n\t/**\n\t * CSS class names to be added to the container element. `array`, `object`, or `string` are accepted.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Detailed description of the step\n\t */\n\tdescription?: string | ReactNode;\n\t/**\n\t * Estimated time for completing the step\n\t */\n\testimatedTime?: string | ReactNode;\n\t/**\n\t * Heading for the step\n\t */\n\theading?: string | ReactNode;\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * Dictates whether the step can be expanded / collapsed\n\t */\n\tisExpandable?: boolean;\n\t/**\n\t * Expanded state of an `isExpandable` step when it is controlled. When set, the step only expands and\n\t * collapses when this prop changes: update it from `onToggleIsOpen` (or the parent's\n\t * `onStepToggleIsOpen`). Leave it `undefined` for an uncontrolled step (see `defaultIsOpen`).\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Initial expanded state of an uncontrolled `isExpandable` step (`isOpen` is `undefined`). Defaults to `false`.\n\t */\n\tdefaultIsOpen?: boolean;\n\t/**\n\t * A step's available action(s). Typically a Button, Button of variant \"link,\" or Checkbox of variant \"toggle\"\n\t */\n\taction?: ReactNode;\n\t/**\n\t * Step content shown when an expandable step is open. Typically a ProgressIndicator and/or ScopedNotification component\n\t */\n\tcontent?: ReactNode;\n\t/**\n\t * Content within the media figure. Expects an Icon or ProgressRing component. An Icon is rendered at size `small`.\n\t */\n\tfigure?: ReactNode;\n\t/** @deprecated Use `action` instead. */\n\tonRenderAction?: () => ReactNode;\n\t/** @deprecated Use `content` instead. */\n\tonRenderContent?: () => ReactNode;\n\t/** @deprecated Use `figure` instead. */\n\tonRenderFigure?: () => ReactNode;\n\t/**\n\t * Called when the step requests to expand / collapse, controlled or not. `data.isOpen` is the\n\t * requested (next) state. Set by the parent `SetupAssistant` from `onStepToggleIsOpen` unless the\n\t * step passes its own.\n\t */\n\tonToggleIsOpen?: (event: SyntheticEvent, data: StepToggleData) => void;\n\t/**\n\t * Percentage of step completed. No progress indicator will be shown for the step unless this is provided\n\t */\n\tprogress?: number;\n\t/**\n\t * Display number for the step. Only appears if progress indicator is enabled. Determined automatically by parent if not provided.\n\t */\n\tstepNumber?: number;\n}\n\n/** Props the parent `SetupAssistant` injects. They aren't part of the public props. */\nexport interface StepInjectedProps {\n\t/** Index of the step within the Setup Assistant */\n\tindex?: number;\n}\n\ninterface StepState {\n\tisOpen: boolean;\n}\n\nconst defaultProps: Partial<StepProps> = {\n\tassistiveText: { expandStep: 'Expand Step' },\n};\n\n/**\n * Setup Assistant Step component is used to specify individual items within the Setup Assistant\n * filled with learning and task links along with a recommended sequence that may have progress tracking\n */\nclass Step extends React.Component<StepProps & StepInjectedProps, StepState> {\n\tstatic displayName = SETUP_ASSISTANT_STEP;\n\n\tstatic defaultProps = defaultProps;\n\n\tgeneratedId: string;\n\n\tconstructor(props: StepProps & StepInjectedProps) {\n\t\tsuper(props);\n\t\tthis.generatedId = generateId();\n\t\tthis.state = {\n\t\t\tisOpen: props.defaultIsOpen ?? false,\n\t\t};\n\t\tcheckProps(SETUP_ASSISTANT_STEP, { ...this.props }, componentDoc);\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetIsOpen() {\n\t\treturn this.props.isOpen !== undefined\n\t\t\t? this.props.isOpen\n\t\t\t: this.state.isOpen;\n\t}\n\n\t// Controlled when `isOpen` is set: the step reports the requested state and waits for the prop.\n\ttoggleIsOpen = (event: SyntheticEvent) => {\n\t\tconst isOpen = !this.getIsOpen();\n\n\t\tif (this.props.isOpen === undefined) {\n\t\t\tthis.setState({ isOpen });\n\t\t}\n\n\t\tthis.props.onToggleIsOpen?.(event, {\n\t\t\tindex: this.props.index,\n\t\t\tisOpen,\n\t\t\tstep: this.props,\n\t\t});\n\t};\n\n\trenderMediaContent() {\n\t\treturn (\n\t\t\t<React.Fragment>\n\t\t\t\t<div className=\"slds-setup-assistant__step-summary-content slds-media__body\">\n\t\t\t\t\t<h3 className=\"slds-setup-assistant__step-summary-title slds-text-heading_small\">\n\t\t\t\t\t\t{this.props.isExpandable ? (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\taria-controls={`${this.getId()}-detail-content`}\n\t\t\t\t\t\t\t\tclassName=\"slds-button_reset\"\n\t\t\t\t\t\t\t\tlabel={this.props.heading}\n\t\t\t\t\t\t\t\tonClick={this.toggleIsOpen}\n\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tthis.props.heading\n\t\t\t\t\t\t)}\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>{this.props.description}</p>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"slds-media__figure slds-media__figure_reverse\">\n\t\t\t\t\t{this.props.action ?? this.props.onRenderAction?.() ?? null}\n\t\t\t\t\t{this.props.estimatedTime ? (\n\t\t\t\t\t\t<p\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t'slds-text-align_right',\n\t\t\t\t\t\t\t\t'slds-text-color_weak',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'slds-p-top_medium':\n\t\t\t\t\t\t\t\t\t\tthis.props.action !== undefined ||\n\t\t\t\t\t\t\t\t\t\tthis.props.onRenderAction !== undefined,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.props.estimatedTime}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</React.Fragment>\n\t\t);\n\t}\n\n\trenderSummary() {\n\t\tlet figure: ReactNode;\n\t\tlet progressRingTheme: 'active' | 'complete' | undefined;\n\n\t\tif (\n\t\t\tthis.props.progress !== undefined &&\n\t\t\tthis.props.progress > 0 &&\n\t\t\tthis.props.progress < 100\n\t\t) {\n\t\t\tprogressRingTheme = 'active';\n\t\t} else if (this.props.progress === 100) {\n\t\t\tprogressRingTheme = 'complete';\n\t\t}\n\n\t\tif (this.props.figure !== undefined || this.props.onRenderFigure) {\n\t\t\tconst renderedFigure =\n\t\t\t\tthis.props.figure ?? this.props.onRenderFigure?.() ?? null;\n\n\t\t\tif (isElementOfType<IconProps>(renderedFigure, Icon)) {\n\t\t\t\tconst figureProps = renderedFigure.props;\n\t\t\t\tlet containerStyle: CSSProperties = {\n\t\t\t\t\tposition: 'relative',\n\t\t\t\t\ttop: this.props.isExpandable ? '5px' : '-3px',\n\t\t\t\t};\n\n\t\t\t\tif (figureProps.containerStyle) {\n\t\t\t\t\tcontainerStyle = {\n\t\t\t\t\t\t...containerStyle,\n\t\t\t\t\t\t...figureProps.containerStyle,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst clonedFigure = React.cloneElement(renderedFigure, {\n\t\t\t\t\t...figureProps,\n\t\t\t\t\tcontainerStyle,\n\t\t\t\t\tsize: 'small',\n\t\t\t\t} as Partial<unknown>);\n\t\t\t\tfigure = <div className=\"slds-media__figure\">{clonedFigure}</div>;\n\t\t\t} else {\n\t\t\t\tfigure = renderedFigure;\n\t\t\t}\n\t\t} else if (this.props.progress !== undefined) {\n\t\t\tfigure = (\n\t\t\t\t<div className=\"slds-media__figure\">\n\t\t\t\t\t<ProgressRing\n\t\t\t\t\t\thasIcon\n\t\t\t\t\t\ticon={this.props.progress === 100 ? null : this.props.stepNumber}\n\t\t\t\t\t\tflowDirection=\"fill\"\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\ttheme={progressRingTheme}\n\t\t\t\t\t\tvalue={this.props.progress}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-setup-assistant__step-summary\">\n\t\t\t\t<div className=\"slds-media\">\n\t\t\t\t\t{figure}\n\t\t\t\t\t{this.props.isExpandable || this.props.progress !== undefined ? (\n\t\t\t\t\t\t<div className=\"slds-media__body slds-m-top_x-small\">\n\t\t\t\t\t\t\t<div className=\"slds-media\">{this.renderMediaContent()}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.renderMediaContent()\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst assistiveText = assign(\n\t\t\t{},\n\t\t\tdefaultProps.assistiveText,\n\t\t\tthis.props.assistiveText\n\t\t);\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-setup-assistant__item',\n\t\t\t\t\tthis.props.className as string\n\t\t\t\t)}\n\t\t\t\tid={this.getId()}\n\t\t\t>\n\t\t\t\t<article className=\"slds-setup-assistant__step\">\n\t\t\t\t\t{this.props.isExpandable ? (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames('slds-summary-detail', {\n\t\t\t\t\t\t\t\t'slds-is-open': this.getIsOpen(),\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.expandStep }}\n\t\t\t\t\t\t\t\taria-controls={`${this.getId()}-detail-content`}\n\t\t\t\t\t\t\t\tclassName=\"slds-m-right_x-small slds-m-top_x-small\"\n\t\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\t\ticonClassName=\"slds-summary-detail__action-icon\"\n\t\t\t\t\t\t\t\ticonName=\"switch\"\n\t\t\t\t\t\t\t\tonClick={this.toggleIsOpen}\n\t\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className=\"slds-container_fluid\">\n\t\t\t\t\t\t\t\t<div className=\"slds-summary-detail__title\">\n\t\t\t\t\t\t\t\t\t{this.renderSummary()}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"slds-summary-detail__content\"\n\t\t\t\t\t\t\t\t\tid={`${this.getId()}-detail-content`}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"slds-setup-assistant__step-detail\">\n\t\t\t\t\t\t\t\t\t\t{this.props.content ??\n\t\t\t\t\t\t\t\t\t\t\tthis.props.onRenderContent?.() ??\n\t\t\t\t\t\t\t\t\t\t\tnull}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.renderSummary()\n\t\t\t\t\t)}\n\t\t\t\t</article>\n\t\t\t</li>\n\t\t);\n\t}\n}\n\nexport default Step as React.ComponentType<StepProps>;\n"],"mappings":";;;;;;;;;;;;;AAgIA,IAAM,IAAmC,EACxC,eAAe,EAAE,YAAY,cAAc,EAC5C,GAMM,IAAN,cAAmB,EAAM,UAAoD;CAC5E,OAAO,cAAc;CAErB,OAAO,eAAe;CAEtB;CAEA,YAAY,GAAsC;EAMjD,AALA,MAAM,CAAK,GACX,KAAK,cAAc,EAAW,GAC9B,KAAK,QAAQ,EACZ,QAAQ,EAAM,iBAAiB,GAChC,GACA,EAAW,GAAsB,EAAE,GAAG,KAAK,MAAM,GAAG,CAAY;CACjE;CAEA,QAAQ;EACP,OAAO,KAAK,MAAM,MAAM,KAAK;CAC9B;CAEA,YAAY;EACX,OAAO,KAAK,MAAM,WAAW,KAAA,IAE1B,KAAK,MAAM,SADX,KAAK,MAAM;CAEf;CAGA,gBAAgB,MAA0B;EACzC,IAAM,IAAS,CAAC,KAAK,UAAU;EAM/B,AAJI,KAAK,MAAM,WAAW,KAAA,KACzB,KAAK,SAAS,EAAE,UAAO,CAAC,GAGzB,KAAK,MAAM,iBAAiB,GAAO;GAClC,OAAO,KAAK,MAAM;GAClB;GACA,MAAM,KAAK;EACZ,CAAC;CACF;CAEA,qBAAqB;EACpB,OACC,kBAAC,EAAM,UAAP,EAAA,UAAA,CACC,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,kBAAC,MAAD;IAAI,WAAU;IACZ,UAAA,KAAK,MAAM,eACX,kBAAC,GAAD;KACC,iBAAe,GAAG,KAAK,MAAM,EAAE;KAC/B,WAAU;KACV,OAAO,KAAK,MAAM;KAClB,SAAS,KAAK;KACd,SAAQ;IACR,CAAA,IAED,KAAK,MAAM;GAET,CAAA,GACJ,kBAAC,KAAD,EAAA,UAAI,KAAK,MAAM,YAAe,CAAA,CAC1B;EACL,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,KAAK,MAAM,UAAU,KAAK,MAAM,iBAAiB,KAAK,MACtD,KAAK,MAAM,gBACX,kBAAC,KAAD;IACC,WAAW,EACV,yBACA,wBACA,EACC,qBACC,KAAK,MAAM,WAAW,KAAA,KACtB,KAAK,MAAM,mBAAmB,KAAA,EAChC,CACD;IAEC,UAAA,KAAK,MAAM;GACV,CAAA,IACA,IACA;EACU,CAAA,CAAA,EAAA,CAAA;CAElB;CAEA,gBAAgB;EACf,IAAI,GACA;EAYJ,IATC,KAAK,MAAM,aAAa,KAAA,KACxB,KAAK,MAAM,WAAW,KACtB,KAAK,MAAM,WAAW,MAEtB,IAAoB,WACV,KAAK,MAAM,aAAa,QAClC,IAAoB,aAGjB,KAAK,MAAM,WAAW,KAAA,KAAa,KAAK,MAAM,gBAAgB;GACjE,IAAM,IACL,KAAK,MAAM,UAAU,KAAK,MAAM,iBAAiB,KAAK;GAEvD,IAAI,EAA2B,GAAgB,CAAI,GAAG;IACrD,IAAM,IAAc,EAAe,OAC/B,IAAgC;KACnC,UAAU;KACV,KAAK,KAAK,MAAM,eAAe,QAAQ;IACxC;IAEA,AAAI,EAAY,mBACf,IAAiB;KAChB,GAAG;KACH,GAAG,EAAY;IAChB;IAGD,IAAM,IAAe,EAAM,aAAa,GAAgB;KACvD,GAAG;KACH;KACA,MAAM;IACP,CAAqB;IACrB,IAAS,kBAAC,OAAD;KAAK,WAAU;KAAsB,UAAA;IAAkB,CAAA;GACjE,OACC,IAAS;EAEX,OAAO,AAAI,KAAK,MAAM,aAAa,KAAA,MAClC,IACC,kBAAC,OAAD;GAAK,WAAU;GACd,UAAA,kBAAC,GAAD;IACC,SAAA;IACA,MAAM,KAAK,MAAM,aAAa,MAAM,OAAO,KAAK,MAAM;IACtD,eAAc;IACd,MAAK;IACL,OAAO;IACP,OAAO,KAAK,MAAM;GAClB,CAAA;EACG,CAAA;EAIP,OACC,kBAAC,OAAD;GAAK,WAAU;GACd,UAAA,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,GACA,KAAK,MAAM,gBAAgB,KAAK,MAAM,aAAa,KAAA,IACnD,kBAAC,OAAD;KAAK,WAAU;KACd,UAAA,kBAAC,OAAD;MAAK,WAAU;MAAc,UAAA,KAAK,mBAAmB;KAAO,CAAA;IACxD,CAAA,IAEL,KAAK,mBAAmB,CAErB;;EACD,CAAA;CAEP;CAEA,SAAS;EACR,IAAM,IAAgB,EACrB,CAAC,GACD,EAAa,eACb,KAAK,MAAM,aACZ;EACA,OACC,kBAAC,MAAD;GACC,WAAW,EACV,8BACA,KAAK,MAAM,SACZ;GACA,IAAI,KAAK,MAAM;GAEf,UAAA,kBAAC,WAAD;IAAS,WAAU;IACjB,UAAA,KAAK,MAAM,eACX,kBAAC,OAAD;KACC,WAAW,EAAW,uBAAuB,EAC5C,gBAAgB,KAAK,UAAU,EAChC,CAAC;KAHF,UAAA,CAKC,kBAAC,GAAD;MACC,eAAe,EAAE,MAAM,EAAc,WAAW;MAChD,iBAAe,GAAG,KAAK,MAAM,EAAE;MAC/B,WAAU;MACV,cAAa;MACb,eAAc;MACd,UAAS;MACT,SAAS,KAAK;MACd,SAAQ;KACR,CAAA,GACD,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACC,kBAAC,OAAD;OAAK,WAAU;OACb,UAAA,KAAK,cAAc;MAChB,CAAA,GACL,kBAAC,OAAD;OACC,WAAU;OACV,IAAI,GAAG,KAAK,MAAM,EAAE;OAEpB,UAAA,kBAAC,OAAD;QAAK,WAAU;QACb,UAAA,KAAK,MAAM,WACX,KAAK,MAAM,kBAAkB,KAC7B;OACG,CAAA;MACD,CAAA,CACD;KACD,CAAA,CAAA;IAEL,CAAA,IAAA,KAAK,cAAc;GAEZ,CAAA;EACN,CAAA;CAEN;AACD"}
|
|
@@ -11,16 +11,19 @@ var c = (e) => {
|
|
|
11
11
|
className: o({ "slds-truncate": e.fixedLayout }),
|
|
12
12
|
title: e.title || (typeof m == "string" ? m : void 0),
|
|
13
13
|
children: e.children
|
|
14
|
-
}), g = o(e.className, { "slds-has-focus": d }), _ =
|
|
14
|
+
}), g = o(e.className, { "slds-has-focus": d }), _ = e.width || l.cornerStyle ? {
|
|
15
|
+
...l.cornerStyle,
|
|
16
|
+
width: e.width
|
|
17
|
+
} : void 0, v = (e) => {
|
|
15
18
|
e && d && e.focus();
|
|
16
19
|
};
|
|
17
20
|
return e.primaryColumn ? /* @__PURE__ */ s("th", {
|
|
18
21
|
className: g,
|
|
19
|
-
ref:
|
|
22
|
+
ref: v,
|
|
20
23
|
"data-label": e.label,
|
|
21
24
|
role: c.isGrid ? "gridcell" : void 0,
|
|
22
25
|
tabIndex: u,
|
|
23
|
-
style:
|
|
26
|
+
style: _,
|
|
24
27
|
onFocus: f,
|
|
25
28
|
onKeyDown: p,
|
|
26
29
|
children: h
|
|
@@ -29,9 +32,9 @@ var c = (e) => {
|
|
|
29
32
|
"data-label": e.label,
|
|
30
33
|
onFocus: f,
|
|
31
34
|
onKeyDown: p,
|
|
32
|
-
ref:
|
|
35
|
+
ref: v,
|
|
33
36
|
role: c.isGrid ? "gridcell" : void 0,
|
|
34
|
-
style:
|
|
37
|
+
style: _,
|
|
35
38
|
tabIndex: u,
|
|
36
39
|
headers: e.headerId,
|
|
37
40
|
children: h
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.js","names":[],"sources":["../../../../components/simple-data-table/cell.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, { useContext, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport CellContext from './private/cell-context';\nimport TableContext from './private/table-context';\nimport useContextHelper from './private/context-helper';\n\nimport { SIMPLE_DATA_TABLE_CELL } from '../../utilities/constants';\n\nexport interface SimpleDataTableCellProps {\n\t/** The contents of the cell */\n\tchildren?: ReactNode;\n\t/** Class names to be added to the cell */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Use this for advanced table (selectable or sortable rows) */\n\tfixedLayout?: boolean;\n\t/** The item from the items which represents this row */\n\titem?: Record<string, unknown>;\n\t/** The primary column for a row. This is almost always the first column. */\n\tprimaryColumn?: boolean;\n\t/** The property of this item to display */\n\tproperty?: string;\n\t/** Shows on hover. Useful for truncated cells. */\n\ttitle?: string;\n\t/** Width of column. Required for advanced/fixed layout tables. */\n\twidth?: string;\n\t/** Data label for stacked layout */\n\tlabel?: string;\n\t/** Header ID for accessibility */\n\theaderId?: string;\n}\n\n/**\n * The default Cell renderer for the SimpleDataTable. To customize a column's cells,\n * pass an element of any component that takes these props as the column's child.\n */\nconst SimpleDataTableCell: React.FC<SimpleDataTableCellProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = useContext(CellContext);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst childText = React.isValidElement(props.children)\n\t\t? (props.children.props as { children?: string }).children\n\t\t: props.children;\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={classNames({\n\t\t\t\t'slds-truncate': props.fixedLayout,\n\t\t\t})}\n\t\t\ttitle={\n\t\t\t\tprops.title || (typeof childText === 'string' ? childText : undefined)\n\t\t\t}\n\t\t>\n\t\t\t{props.children}\n\t\t</div>\n\t);\n\n\tconst className = classNames(props.className, {\n\t\t'slds-has-focus': hasFocus,\n\t});\n\n\tconst ref = (node: HTMLTableCellElement | null) => {\n\t\tif (node && hasFocus) {\n\t\t\tnode.focus();\n\t\t}\n\t};\n\n\tif (props.primaryColumn) {\n\t\treturn (\n\t\t\t<th\n\t\t\t\tclassName={className}\n\t\t\t\tref={ref}\n\t\t\t\tdata-label={props.label}\n\t\t\t\trole={tableContext.isGrid ? 'gridcell' : undefined}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\tstyle={
|
|
1
|
+
{"version":3,"file":"cell.js","names":[],"sources":["../../../../components/simple-data-table/cell.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, { useContext, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport CellContext from './private/cell-context';\nimport TableContext from './private/table-context';\nimport useContextHelper from './private/context-helper';\n\nimport { SIMPLE_DATA_TABLE_CELL } from '../../utilities/constants';\n\nexport interface SimpleDataTableCellProps {\n\t/** The contents of the cell */\n\tchildren?: ReactNode;\n\t/** Class names to be added to the cell */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Use this for advanced table (selectable or sortable rows) */\n\tfixedLayout?: boolean;\n\t/** The item from the items which represents this row */\n\titem?: Record<string, unknown>;\n\t/** The primary column for a row. This is almost always the first column. */\n\tprimaryColumn?: boolean;\n\t/** The property of this item to display */\n\tproperty?: string;\n\t/** Shows on hover. Useful for truncated cells. */\n\ttitle?: string;\n\t/** Width of column. Required for advanced/fixed layout tables. */\n\twidth?: string;\n\t/** Data label for stacked layout */\n\tlabel?: string;\n\t/** Header ID for accessibility */\n\theaderId?: string;\n}\n\n/**\n * The default Cell renderer for the SimpleDataTable. To customize a column's cells,\n * pass an element of any component that takes these props as the column's child.\n */\nconst SimpleDataTableCell: React.FC<SimpleDataTableCellProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = useContext(CellContext);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst childText = React.isValidElement(props.children)\n\t\t? (props.children.props as { children?: string }).children\n\t\t: props.children;\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={classNames({\n\t\t\t\t'slds-truncate': props.fixedLayout,\n\t\t\t})}\n\t\t\ttitle={\n\t\t\t\tprops.title || (typeof childText === 'string' ? childText : undefined)\n\t\t\t}\n\t\t>\n\t\t\t{props.children}\n\t\t</div>\n\t);\n\n\tconst className = classNames(props.className, {\n\t\t'slds-has-focus': hasFocus,\n\t});\n\n\tconst style =\n\t\tprops.width || cellContext.cornerStyle\n\t\t\t? { ...cellContext.cornerStyle, width: props.width }\n\t\t\t: undefined;\n\n\tconst ref = (node: HTMLTableCellElement | null) => {\n\t\tif (node && hasFocus) {\n\t\t\tnode.focus();\n\t\t}\n\t};\n\n\tif (props.primaryColumn) {\n\t\treturn (\n\t\t\t<th\n\t\t\t\tclassName={className}\n\t\t\t\tref={ref}\n\t\t\t\tdata-label={props.label}\n\t\t\t\trole={tableContext.isGrid ? 'gridcell' : undefined}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\tstyle={style}\n\t\t\t\tonFocus={handleFocus}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t>\n\t\t\t\t{contents}\n\t\t\t</th>\n\t\t);\n\t}\n\n\treturn (\n\t\t<td\n\t\t\tclassName={className}\n\t\t\tdata-label={props.label}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tref={ref}\n\t\t\trole={tableContext.isGrid ? 'gridcell' : undefined}\n\t\t\tstyle={style}\n\t\t\ttabIndex={tabIndex}\n\t\t\theaders={props.headerId}\n\t\t>\n\t\t\t{contents}\n\t\t</td>\n\t);\n};\n\nSimpleDataTableCell.displayName = SIMPLE_DATA_TABLE_CELL;\n\nexport default SimpleDataTableCell;\n"],"mappings":";;;;;;;;AAuCA,IAAM,KAA2D,MAAU;CAC1E,IAAM,IAAe,EAAW,CAAY,GACtC,IAAc,EAAW,CAAW,GACpC,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,EAAM,WACP,GAEM,IAAY,EAAM,eAAe,EAAM,QAAQ,IACjD,EAAM,SAAS,MAAgC,WAChD,EAAM,UAEH,IACL,kBAAC,OAAD;EACC,WAAW,EAAW,EACrB,iBAAiB,EAAM,YACxB,CAAC;EACD,OACC,EAAM,UAAU,OAAO,KAAc,WAAW,IAAY,KAAA;EAG5D,UAAA,EAAM;CACH,CAAA,GAGA,IAAY,EAAW,EAAM,WAAW,EAC7C,kBAAkB,EACnB,CAAC,GAEK,IACL,EAAM,SAAS,EAAY,cACxB;EAAE,GAAG,EAAY;EAAa,OAAO,EAAM;CAAM,IACjD,KAAA,GAEE,KAAO,MAAsC;EAClD,AAAI,KAAQ,KACX,EAAK,MAAM;CAEb;CAmBA,OAjBI,EAAM,gBAER,kBAAC,MAAD;EACY;EACN;EACL,cAAY,EAAM;EAClB,MAAM,EAAa,SAAS,aAAa,KAAA;EAC/B;EACH;EACP,SAAS;EACT,WAAW;EAEV,UAAA;CACE,CAAA,IAKL,kBAAC,MAAD;EACY;EACX,cAAY,EAAM;EAClB,SAAS;EACT,WAAW;EACN;EACL,MAAM,EAAa,SAAS,aAAa,KAAA;EAClC;EACG;EACV,SAAS,EAAM;EAEd,UAAA;CACE,CAAA;AAEN;AAEA,EAAoB,cAAc"}
|
|
@@ -11,17 +11,18 @@ import f from "./private/table-context.js";
|
|
|
11
11
|
import p from "./cell.js";
|
|
12
12
|
import m from "./column.js";
|
|
13
13
|
import h from "./private/mode.js";
|
|
14
|
-
import g from "./private/
|
|
15
|
-
import _ from "./private/
|
|
16
|
-
import v from "./row
|
|
17
|
-
import y from "
|
|
18
|
-
import b from "
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import w from "
|
|
22
|
-
import T from "
|
|
14
|
+
import { inheritRadius as g } from "./private/corner-style.js";
|
|
15
|
+
import _ from "./private/head.js";
|
|
16
|
+
import v from "./private/row.js";
|
|
17
|
+
import y from "./row-actions.js";
|
|
18
|
+
import b from "react";
|
|
19
|
+
import x from "classnames";
|
|
20
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
21
|
+
import { dequal as w } from "dequal";
|
|
22
|
+
import T from "lodash.assign";
|
|
23
|
+
import E from "memoize-one";
|
|
23
24
|
//#region components/simple-data-table/index.tsx
|
|
24
|
-
var
|
|
25
|
+
var D = (e) => Array.isArray(e) ? e.length : 0, O = {
|
|
25
26
|
assistiveText: {
|
|
26
27
|
actionsHeader: "Actions",
|
|
27
28
|
columnSort: "Sort by: ",
|
|
@@ -34,29 +35,29 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
34
35
|
},
|
|
35
36
|
hasMore: !1,
|
|
36
37
|
loadMoreOffset: 20
|
|
37
|
-
},
|
|
38
|
-
let t = new Set(e), n = new Set(e.filter(
|
|
39
|
-
return (e) => t.has(e) ||
|
|
40
|
-
},
|
|
41
|
-
...
|
|
38
|
+
}, k = [], A = (e) => e.id !== void 0 && e.id !== null, j = (e) => {
|
|
39
|
+
let t = new Set(e), n = new Set(e.filter(A).map((e) => e.id));
|
|
40
|
+
return (e) => t.has(e) || A(e) && n.has(e.id);
|
|
41
|
+
}, M = E((e) => ({
|
|
42
|
+
...O.assistiveText,
|
|
42
43
|
...e
|
|
43
|
-
}),
|
|
44
|
+
}), w), N = (e) => {
|
|
44
45
|
if (typeof e != "object" || !e) return !1;
|
|
45
46
|
let t = Object.getPrototypeOf(e);
|
|
46
47
|
return t === Object.prototype || t === null;
|
|
47
|
-
},
|
|
48
|
+
}, P = (e, t) => {
|
|
48
49
|
let n = !1;
|
|
49
50
|
if (e === t) n = !0;
|
|
50
|
-
else if (
|
|
51
|
-
else if (Array.isArray(e) && Array.isArray(t)) n = e.length === t.length && e.every((e, n) =>
|
|
52
|
-
else if (
|
|
51
|
+
else if (b.isValidElement(e) && b.isValidElement(t)) n = e.type === t.type && e.key === t.key && P(e.props, t.props);
|
|
52
|
+
else if (Array.isArray(e) && Array.isArray(t)) n = e.length === t.length && e.every((e, n) => P(e, t[n]));
|
|
53
|
+
else if (N(e) && N(t)) {
|
|
53
54
|
let r = Object.keys(e);
|
|
54
|
-
n = r.length === Object.keys(t).length && r.every((n) => Object.prototype.hasOwnProperty.call(t, n) &&
|
|
55
|
+
n = r.length === Object.keys(t).length && r.every((n) => Object.prototype.hasOwnProperty.call(t, n) && P(e[n], t[n]));
|
|
55
56
|
}
|
|
56
57
|
return n;
|
|
57
|
-
},
|
|
58
|
+
}, F = E((e, t, n, r, i, a) => {
|
|
58
59
|
let s = [], c = null;
|
|
59
|
-
return
|
|
60
|
+
return b.Children.forEach(e, (e) => {
|
|
60
61
|
if (o(e, m)) {
|
|
61
62
|
let { children: n, ...o } = e.props, c = {
|
|
62
63
|
fixedLayout: r,
|
|
@@ -66,21 +67,21 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
66
67
|
};
|
|
67
68
|
t && (c.id = t);
|
|
68
69
|
let l;
|
|
69
|
-
|
|
70
|
+
b.isValidElement(n) ? (l = n.type, T(c, n.props)) : l = p, s.push({
|
|
70
71
|
Cell: l,
|
|
71
72
|
props: c
|
|
72
73
|
});
|
|
73
|
-
} else if (o(e,
|
|
74
|
+
} else if (o(e, y)) {
|
|
74
75
|
let { dropdown: t } = e.props;
|
|
75
|
-
c =
|
|
76
|
+
c = b.cloneElement(e, { dropdown: t && n && t.props.menuPosition === void 0 ? b.cloneElement(t, { menuPosition: "overflowBoundaryElement" }) : t });
|
|
76
77
|
}
|
|
77
78
|
}), {
|
|
78
79
|
columns: s,
|
|
79
80
|
RowActions: c
|
|
80
81
|
};
|
|
81
|
-
},
|
|
82
|
+
}, P), I = class extends b.Component {
|
|
82
83
|
static displayName = e;
|
|
83
|
-
static defaultProps =
|
|
84
|
+
static defaultProps = O;
|
|
84
85
|
generatedId;
|
|
85
86
|
headerRefs;
|
|
86
87
|
scrollerRef;
|
|
@@ -118,7 +119,7 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
118
119
|
getFirstInteractiveElement(e, t) {
|
|
119
120
|
return this.state.mode === h.ACTIONABLE && this.interactiveElements[e] && this.interactiveElements[e][t] ? this.interactiveElements[e][t][0] : null;
|
|
120
121
|
}
|
|
121
|
-
getTableContext =
|
|
122
|
+
getTableContext = E((e, t, n) => ({
|
|
122
123
|
isGrid: n,
|
|
123
124
|
activeCell: e.activeCell,
|
|
124
125
|
activeElement: e.activeElement,
|
|
@@ -133,20 +134,20 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
133
134
|
t && this.setState({ allowKeyboardNavigation: e });
|
|
134
135
|
}
|
|
135
136
|
}));
|
|
136
|
-
getSelectionMatcher =
|
|
137
|
-
getDisabledSelectionMatcher =
|
|
137
|
+
getSelectionMatcher = E(j);
|
|
138
|
+
getDisabledSelectionMatcher = E(j);
|
|
138
139
|
requestSelection = (e, t) => {
|
|
139
140
|
typeof this.props.onRowChange == "function" && this.props.onRowChange(e, { selection: t });
|
|
140
141
|
};
|
|
141
142
|
handleToggleAll = (e, { checked: t }) => {
|
|
142
|
-
let n = this.props.selection ??
|
|
143
|
+
let n = this.props.selection ?? k, r = this.getDisabledSelectionMatcher(this.props.disabledSelection ?? k), i = n.filter(r), a = this.props.items.filter((e) => !r(e)), o = (t ? [...a, ...i] : i).filter((e) => e.type !== "header-row");
|
|
143
144
|
this.requestSelection(e, o);
|
|
144
145
|
};
|
|
145
146
|
handleRowToggle = (e, t, n) => {
|
|
146
|
-
let r = this.props.selection ??
|
|
147
|
+
let r = this.props.selection ?? k, i;
|
|
147
148
|
if (t) i = this.props.selectRows === "radio" ? [e] : [...r, e];
|
|
148
149
|
else {
|
|
149
|
-
let t =
|
|
150
|
+
let t = j([e]);
|
|
150
151
|
i = r.filter((e) => !t(e));
|
|
151
152
|
}
|
|
152
153
|
this.requestSelection(n, i);
|
|
@@ -255,7 +256,7 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
255
256
|
}));
|
|
256
257
|
}
|
|
257
258
|
getCellCount() {
|
|
258
|
-
let { columns: e, RowActions: t } =
|
|
259
|
+
let { columns: e, RowActions: t } = F(this.props.children, this.props.id, this.props.fixedHeader, this.props.fixedLayout, this.props.items, this.props.search);
|
|
259
260
|
return e.length + +!!t;
|
|
260
261
|
}
|
|
261
262
|
handleKeyDownRight() {
|
|
@@ -288,7 +289,7 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
288
289
|
...this.headerRefs.select,
|
|
289
290
|
...this.headerRefs.column,
|
|
290
291
|
...this.headerRefs.action
|
|
291
|
-
], i
|
|
292
|
+
], i, a;
|
|
292
293
|
e.shiftKey ? n - 1 >= 0 ? (a = n - 1, i = t) : (i = t > 0 ? t - 1 : this.props.items.length, a = r.length - 1) : n + 1 < r.length ? (a = n + 1, i = t) : (i = t < this.props.items.length ? t + 1 : 0, a = 0), this.changeActiveCell(i, a);
|
|
293
294
|
}
|
|
294
295
|
handleNextActionable(e) {
|
|
@@ -331,17 +332,17 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
331
332
|
r.includes(n) || (this.interactiveElements[e][t] = [...r, n]);
|
|
332
333
|
}
|
|
333
334
|
render() {
|
|
334
|
-
let e = {}, r = this.getSelectionMatcher(this.props.selection ??
|
|
335
|
+
let e = {}, r = this.getSelectionMatcher(this.props.selection ?? k), i = this.getDisabledSelectionMatcher(this.props.disabledSelection ?? k), a = D(this.props.items), o = this.props.items.filter((e) => e.type !== "header-row" && !i(e)), l = o.length, u = o.filter(r).length, d = this.props.selectRows && l > 0 ? this.props.selectRows : !1, p = d && l === u, m = d && l !== u && u !== 0, { columns: y, RowActions: w } = F(this.props.children, this.props.id, this.props.fixedHeader, this.props.fixedLayout, this.props.items, this.props.search), T = M(this.props.assistiveText);
|
|
335
336
|
this.props.selectRows && this.props.selectRows !== "radio" && (e["aria-multiselectable"] = "true"), this.headerRefs = {
|
|
336
|
-
action:
|
|
337
|
-
column: this.headerRefs.column.slice(0,
|
|
337
|
+
action: w ? this.headerRefs.action : [],
|
|
338
|
+
column: this.headerRefs.column.slice(0, y.length),
|
|
338
339
|
select: d ? this.headerRefs.select : []
|
|
339
340
|
};
|
|
340
|
-
let
|
|
341
|
-
value: this.getTableContext(this.state, this.props.keyboardNavigation,
|
|
342
|
-
children: /* @__PURE__ */
|
|
341
|
+
let E = !!(this.props.fixedLayout && this.props.keyboardNavigation), O = /* @__PURE__ */ C(b.Fragment, { children: [/* @__PURE__ */ S(f.Provider, {
|
|
342
|
+
value: this.getTableContext(this.state, this.props.keyboardNavigation, E),
|
|
343
|
+
children: /* @__PURE__ */ C("table", {
|
|
343
344
|
...e,
|
|
344
|
-
className:
|
|
345
|
+
className: x("slds-table", {
|
|
345
346
|
"slds-table_fixed-layout": this.props.fixedLayout,
|
|
346
347
|
"slds-table_header-fixed": this.props.fixedHeader,
|
|
347
348
|
"slds-table_resizable-cols": this.props.fixedLayout,
|
|
@@ -351,14 +352,13 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
351
352
|
"slds-max-medium-table_stacked-horizontal": this.props.stackedHorizontal,
|
|
352
353
|
"slds-table_striped": this.props.striped,
|
|
353
354
|
"slds-table_col-bordered": this.props.columnBordered,
|
|
354
|
-
"slds-no-row-hover": this.props.noRowHover
|
|
355
|
-
"slds-table_header-hidden": this.props.isHeadless
|
|
355
|
+
"slds-no-row-hover": this.props.noRowHover
|
|
356
356
|
}, this.props.className),
|
|
357
357
|
id: this.getId(),
|
|
358
358
|
ref: (e) => {
|
|
359
359
|
e && (this.tableRef = e);
|
|
360
360
|
},
|
|
361
|
-
role:
|
|
361
|
+
role: E ? "grid" : void 0,
|
|
362
362
|
onBlur: (e) => {
|
|
363
363
|
this.tableRef && !this.tableRef.contains(e.relatedTarget) && this.setState({
|
|
364
364
|
tableHasFocus: !1,
|
|
@@ -367,8 +367,8 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
367
367
|
});
|
|
368
368
|
},
|
|
369
369
|
style: this.props.style,
|
|
370
|
-
children: [/* @__PURE__ */
|
|
371
|
-
assistiveText:
|
|
370
|
+
children: [/* @__PURE__ */ S(_, {
|
|
371
|
+
assistiveText: T,
|
|
372
372
|
allSelected: p,
|
|
373
373
|
fixedHeader: this.props.fixedHeader,
|
|
374
374
|
fixedLayout: this.props.fixedLayout,
|
|
@@ -376,51 +376,57 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
376
376
|
t === "action" || t === "select" ? e ? this.headerRefs[t][0] = e : this.headerRefs[t] = [] : this.headerRefs.column[t] = e;
|
|
377
377
|
},
|
|
378
378
|
isHidden: this.props.isHeadless,
|
|
379
|
+
isOnlyRow: a === 0,
|
|
379
380
|
indeterminateSelected: m,
|
|
380
381
|
canSelectRows: d,
|
|
381
|
-
columns:
|
|
382
|
+
columns: y,
|
|
382
383
|
id: `${this.getId()}-${t}`,
|
|
383
384
|
onToggleAll: this.handleToggleAll,
|
|
384
385
|
onSort: this.props.onSort,
|
|
385
|
-
showRowActions: !!
|
|
386
|
-
}), /* @__PURE__ */
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
let
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
386
|
+
showRowActions: !!w
|
|
387
|
+
}), /* @__PURE__ */ S("tbody", {
|
|
388
|
+
style: g,
|
|
389
|
+
children: a > 0 ? this.props.items.map((e, t) => {
|
|
390
|
+
let o = this.getId() && e.id ? `${this.getId()}-${n}-${e.id}` : s();
|
|
391
|
+
if (e.type === "header-row") {
|
|
392
|
+
let t = {
|
|
393
|
+
assistiveText: T,
|
|
394
|
+
classNameRow: e.classNameRow,
|
|
395
|
+
columns: y,
|
|
396
|
+
id: o,
|
|
397
|
+
tableId: this.getId(),
|
|
398
|
+
item: e
|
|
399
|
+
};
|
|
400
|
+
if (this.props.renderSubHeadingRow) return /* @__PURE__ */ S(b.Fragment, { children: this.props.renderSubHeadingRow(t) }, o);
|
|
401
|
+
if (this.props.onRenderSubHeadingRow) return this.props.onRenderSubHeadingRow({
|
|
402
|
+
...t,
|
|
403
|
+
key: o
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
return /* @__PURE__ */ S(v, {
|
|
407
|
+
assistiveText: T,
|
|
408
|
+
canSelectRows: d,
|
|
409
|
+
className: e.classNameRow,
|
|
410
|
+
columns: y,
|
|
411
|
+
fixedLayout: this.props.fixedLayout,
|
|
412
|
+
id: o,
|
|
413
|
+
index: t,
|
|
414
|
+
item: e,
|
|
415
|
+
onToggle: this.handleRowToggle,
|
|
416
|
+
isSelected: r(e),
|
|
417
|
+
isDisabled: i(e),
|
|
418
|
+
rowActions: w,
|
|
394
419
|
tableId: this.getId(),
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
return /* @__PURE__ */ x(_, {
|
|
404
|
-
assistiveText: w,
|
|
405
|
-
canSelectRows: d,
|
|
406
|
-
className: e.classNameRow,
|
|
407
|
-
columns: v,
|
|
408
|
-
fixedLayout: this.props.fixedLayout,
|
|
409
|
-
id: a,
|
|
410
|
-
index: t,
|
|
411
|
-
item: e,
|
|
412
|
-
onToggle: this.handleRowToggle,
|
|
413
|
-
isSelected: r(e),
|
|
414
|
-
isDisabled: i(e),
|
|
415
|
-
rowActions: C,
|
|
416
|
-
tableId: this.getId(),
|
|
417
|
-
rowIndex: t + 1
|
|
418
|
-
}, a);
|
|
419
|
-
}) : null })]
|
|
420
|
+
rowIndex: t + 1,
|
|
421
|
+
isFirstRow: this.props.isHeadless && t === 0,
|
|
422
|
+
isLastRow: t === a - 1
|
|
423
|
+
}, o);
|
|
424
|
+
}) : null
|
|
425
|
+
})]
|
|
420
426
|
})
|
|
421
|
-
}), this.props.fixedHeader && this.props.hasMore && /* @__PURE__ */
|
|
427
|
+
}), this.props.fixedHeader && this.props.hasMore && /* @__PURE__ */ S("div", {
|
|
422
428
|
className: "slds-is-relative slds-p-around_large",
|
|
423
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ S(c, {
|
|
424
430
|
assistiveText: { label: this.props.assistiveText?.loadingMore },
|
|
425
431
|
hasContainer: !1,
|
|
426
432
|
size: "small",
|
|
@@ -428,18 +434,18 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
428
434
|
})
|
|
429
435
|
})] });
|
|
430
436
|
if (this.props.fixedHeader) {
|
|
431
|
-
let e = "1px solid var(--slds-g-color-border-1)", t = {
|
|
437
|
+
let e = "1px solid var(--slds-g-color-border-1, rgb(221, 219, 218))", t = {
|
|
432
438
|
borderTop: e,
|
|
433
439
|
height: "100%"
|
|
434
440
|
};
|
|
435
|
-
this.props.joined && (t.borderBottom = e, t.borderLeft = e, t.borderRight = e, t.borderTop = "none", t.borderRadius = "0 0 var(--slds-g-radius-border-2) var(--slds-g-radius-border-2)"),
|
|
441
|
+
this.props.joined && (t.borderBottom = e, t.borderLeft = e, t.borderRight = e, t.borderTop = "none", t.borderRadius = "0 0 var(--slds-g-radius-border-2, 0.25rem) var(--slds-g-radius-border-2, 0.25rem)"), O = /* @__PURE__ */ S("div", {
|
|
436
442
|
className: "slds-table_header-fixed_container",
|
|
437
443
|
style: t,
|
|
438
444
|
onScroll: (e) => {
|
|
439
445
|
let t = e.target.scrollLeft;
|
|
440
446
|
t > 0 && (e.target.scrollLeft = 0, this.scrollerRef && (this.scrollerRef.scrollLeft = t));
|
|
441
447
|
},
|
|
442
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ S("div", {
|
|
443
449
|
className: "slds-table_header-fixed_scroller",
|
|
444
450
|
ref: (e) => {
|
|
445
451
|
this.scrollerRef = e;
|
|
@@ -448,14 +454,14 @@ var E = (e) => Array.isArray(e) ? e.length : 0, D = {
|
|
|
448
454
|
height: "100%",
|
|
449
455
|
overflow: "auto"
|
|
450
456
|
},
|
|
451
|
-
children:
|
|
457
|
+
children: O
|
|
452
458
|
})
|
|
453
459
|
});
|
|
454
460
|
}
|
|
455
|
-
return
|
|
461
|
+
return O;
|
|
456
462
|
}
|
|
457
463
|
};
|
|
458
464
|
//#endregion
|
|
459
|
-
export {
|
|
465
|
+
export { I as default };
|
|
460
466
|
|
|
461
467
|
//# sourceMappingURL=index.js.map
|