@salesforce/design-system-react 11.0.0-alpha.9 → 11.0.0-rc.0
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 +2 -0
- 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/index.cjs +1 -1
- package/dist/cjs/components/builder-header/index.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-dropdown.cjs +1 -1
- package/dist/cjs/components/builder-header/nav-dropdown.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-link.cjs +1 -1
- package/dist/cjs/components/builder-header/nav.cjs +1 -1
- package/dist/cjs/components/builder-header/nav.cjs.map +1 -1
- package/dist/cjs/components/builder-header/toolbar.cjs +1 -1
- package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
- package/dist/cjs/components/builder-header/utilities.cjs +1 -1
- package/dist/cjs/components/builder-header/utilities.cjs.map +1 -1
- package/dist/cjs/components/button/check-props.cjs +2 -0
- package/dist/cjs/components/button/check-props.cjs.map +1 -0
- package/dist/cjs/components/button/component.cjs +2 -0
- package/dist/cjs/components/button/component.cjs.map +1 -0
- 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/filter.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/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/check-props.cjs +1 -1
- package/dist/cjs/components/color-picker/check-props.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/color-picker-tabs.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/custom-color-form.cjs +1 -1
- package/dist/cjs/components/color-picker/private/custom-color-form.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.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch-picker.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs.map +1 -1
- package/dist/cjs/components/combobox/check-props.cjs +1 -1
- package/dist/cjs/components/combobox/check-props.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/component.cjs +1 -1
- package/dist/cjs/components/combobox/component.cjs.map +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/check-props.cjs +1 -1
- package/dist/cjs/components/date-picker/check-props.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-wrapper.cjs +1 -1
- package/dist/cjs/components/date-picker/private/calendar-wrapper.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/date-picker/private/week.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/year-picklist.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/file.cjs +2 -2
- package/dist/cjs/components/files/file.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/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.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/filter/private/error-id-context.cjs +2 -0
- package/dist/cjs/components/filter/private/error-id-context.cjs.map +1 -0
- package/dist/cjs/components/grid/index.cjs +1 -1
- package/dist/cjs/components/grid/index.cjs.map +1 -1
- package/dist/cjs/components/icon/button-icon/index.cjs +1 -1
- package/dist/cjs/components/icon/button-icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon/check-props.cjs +2 -0
- package/dist/cjs/components/icon/check-props.cjs.map +1 -0
- package/dist/cjs/components/icon/component.cjs +2 -0
- package/dist/cjs/components/icon/component.cjs.map +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/input-icon/index.cjs +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +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 +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/input/search.cjs +1 -1
- package/dist/cjs/components/input/search.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/check-props.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/check-props.cjs.map +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/page-header/check-props.cjs +1 -1
- package/dist/cjs/components/page-header/check-props.cjs.map +1 -1
- package/dist/cjs/components/page-header/control.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/page-header/private/base/index.cjs +1 -1
- package/dist/cjs/components/page-header/private/base/index.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/controls.cjs +1 -1
- package/dist/cjs/components/page-header/private/controls.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/detail-block.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/detail-row.cjs +1 -1
- package/dist/cjs/components/page-header/private/detail-row.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/info.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/object-home/index.cjs +1 -1
- package/dist/cjs/components/page-header/private/object-home/index.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/record-home/index.cjs +1 -1
- package/dist/cjs/components/page-header/private/record-home/index.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/related-list/index.cjs +1 -1
- package/dist/cjs/components/page-header/private/related-list/index.cjs.map +1 -1
- package/dist/cjs/components/page-header/private/title.cjs +1 -1
- package/dist/cjs/components/page-header/private/title.cjs.map +1 -1
- package/dist/cjs/components/panel/filtering/check-props.cjs +1 -1
- package/dist/cjs/components/panel/filtering/check-props.cjs.map +1 -1
- package/dist/cjs/components/panel/filtering/group.cjs +1 -1
- package/dist/cjs/components/panel/filtering/group.cjs.map +1 -1
- package/dist/cjs/components/panel/filtering/list.cjs +1 -1
- package/dist/cjs/components/panel/filtering/list.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/pill-container/private/selected-listbox.cjs.map +1 -1
- package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
- package/dist/cjs/components/popover/edit-dialog.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/check-props.cjs +1 -1
- package/dist/cjs/components/progress-indicator/check-props.cjs.map +1 -1
- 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/step-vertical.cjs +1 -1
- package/dist/cjs/components/progress-indicator/private/step-vertical.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/step.cjs +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/check-props.cjs +1 -1
- package/dist/cjs/components/radio/check-props.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.map +1 -1
- package/dist/cjs/components/radio-button-group/radio.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/check-props.cjs +2 -0
- package/dist/cjs/components/scoped-notification/check-props.cjs.map +1 -0
- package/dist/cjs/components/scoped-notification/component.cjs +2 -0
- package/dist/cjs/components/scoped-notification/component.cjs.map +1 -0
- 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/setup-assistant/step.cjs +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/check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/column-check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/column-check-props.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/column.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/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/private/table-context.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/table-context.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/spinner/check-props.cjs +1 -1
- package/dist/cjs/components/spinner/check-props.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/header.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox.cjs +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/list-item-content.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.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/check-props.cjs +1 -1
- package/dist/cjs/components/tooltip/check-props.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/tooltip/private/field-level-help-tooltip.cjs +1 -1
- package/dist/cjs/components/tooltip/private/field-level-help-tooltip.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/private/branch.cjs +1 -1
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/button.cjs +1 -1
- package/dist/cjs/components/trial-bar/button.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/dropdown.cjs +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/menu-list/item.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
- package/dist/cjs/components/utilities/pill/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/private/item.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/private/item.cjs.map +1 -1
- package/dist/cjs/components/visual-picker/check-props.cjs +2 -0
- package/dist/cjs/components/visual-picker/check-props.cjs.map +1 -0
- 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/visual-picker/link.cjs +1 -1
- package/dist/cjs/components/visual-picker/link.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/components/welcome-mat/info-badge.cjs +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/tile.cjs +1 -1
- package/dist/cjs/components/welcome-mat/tile.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/dom-element-focus.cjs +1 -1
- package/dist/cjs/utilities/dom-element-focus.cjs.map +1 -1
- package/dist/cjs/utilities/event.cjs +1 -1
- package/dist/cjs/utilities/event.cjs.map +1 -1
- package/dist/cjs/utilities/hooks/use-click-outside.cjs.map +1 -1
- package/dist/cjs/utilities/hooks/use-latest-ref.cjs +2 -0
- package/dist/cjs/utilities/hooks/use-latest-ref.cjs.map +1 -0
- package/dist/cjs/utilities/is-element-of-type.cjs +2 -0
- package/dist/cjs/utilities/is-element-of-type.cjs.map +1 -0
- package/dist/cjs/utilities/key-callbacks.cjs +1 -1
- package/dist/cjs/utilities/key-callbacks.cjs.map +1 -1
- package/dist/cjs/utilities/key-code.cjs +1 -1
- package/dist/cjs/utilities/key-code.cjs.map +1 -1
- package/dist/cjs/utilities/key-letter-menu-item-select.cjs +1 -1
- package/dist/cjs/utilities/key-letter-menu-item-select.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/merge-props.cjs +2 -0
- package/dist/cjs/utilities/merge-props.cjs.map +1 -0
- package/dist/cjs/utilities/warning/children-as-trigger.cjs +2 -0
- package/dist/cjs/utilities/warning/children-as-trigger.cjs.map +1 -0
- 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 +19 -19
- package/dist/es/components/alert/index.js.map +1 -1
- package/dist/es/components/builder-header/index.js +15 -22
- package/dist/es/components/builder-header/index.js.map +1 -1
- package/dist/es/components/builder-header/nav-dropdown.js +22 -23
- package/dist/es/components/builder-header/nav-dropdown.js.map +1 -1
- package/dist/es/components/builder-header/nav-link.js +4 -4
- package/dist/es/components/builder-header/nav.js +10 -7
- package/dist/es/components/builder-header/nav.js.map +1 -1
- package/dist/es/components/builder-header/toolbar.js +20 -18
- package/dist/es/components/builder-header/toolbar.js.map +1 -1
- package/dist/es/components/builder-header/utilities.js +9 -6
- package/dist/es/components/builder-header/utilities.js.map +1 -1
- package/dist/es/components/button/check-props.js +14 -0
- package/dist/es/components/button/check-props.js.map +1 -0
- package/dist/es/components/button/component.js +31 -0
- package/dist/es/components/button/component.js.map +1 -0
- package/dist/es/components/button/index.js +86 -75
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-group/index.js +24 -17
- package/dist/es/components/button-group/index.js.map +1 -1
- package/dist/es/components/button-stateful/index.js +95 -96
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/card/filter.js.map +1 -1
- package/dist/es/components/card/index.js +39 -36
- package/dist/es/components/card/index.js.map +1 -1
- package/dist/es/components/carousel/index.js +126 -123
- package/dist/es/components/carousel/index.js.map +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 +138 -137
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/check-props.js +21 -13
- package/dist/es/components/color-picker/check-props.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +164 -144
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/color-picker-tabs.js.map +1 -1
- package/dist/es/components/color-picker/private/custom-color-form.js +4 -4
- package/dist/es/components/color-picker/private/custom-color-form.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 +1 -1
- package/dist/es/components/color-picker/private/hsv-color.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch-option.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch-picker.js +7 -7
- package/dist/es/components/color-picker/private/swatch-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch.js.map +1 -1
- package/dist/es/components/combobox/check-props.js +21 -14
- package/dist/es/components/combobox/check-props.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +532 -550
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/component.js +1 -1
- package/dist/es/components/combobox/component.js.map +1 -1
- package/dist/es/components/combobox/index.js.map +1 -1
- package/dist/es/components/combobox/private/menu.js +8 -8
- package/dist/es/components/combobox/private/menu.js.map +1 -1
- package/dist/es/components/date-picker/check-props.js +1 -1
- package/dist/es/components/date-picker/check-props.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +174 -178
- 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-wrapper.js +6 -6
- package/dist/es/components/date-picker/private/calendar-wrapper.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 +11 -11
- package/dist/es/components/date-picker/private/day.js.map +1 -1
- package/dist/es/components/date-picker/private/week.js.map +1 -1
- package/dist/es/components/date-picker/private/year-picklist.js.map +1 -1
- package/dist/es/components/docked-composer/index.js +71 -43
- package/dist/es/components/docked-composer/index.js.map +1 -1
- package/dist/es/components/dynamic-icon/index.js +21 -16
- package/dist/es/components/dynamic-icon/index.js.map +1 -1
- package/dist/es/components/expandable-section/index.js +18 -18
- package/dist/es/components/expandable-section/index.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/index.js +4 -8
- package/dist/es/components/files/index.js.map +1 -1
- package/dist/es/components/files/private/file-actions.js +25 -21
- package/dist/es/components/files/private/file-actions.js.map +1 -1
- package/dist/es/components/files/private/file-figure.js.map +1 -1
- package/dist/es/components/filter/filter.js +72 -70
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/filter/private/error-id-context.js +7 -0
- package/dist/es/components/filter/private/error-id-context.js.map +1 -0
- package/dist/es/components/grid/index.js +1 -1
- package/dist/es/components/grid/index.js.map +1 -1
- package/dist/es/components/icon/button-icon/index.js +2 -3
- package/dist/es/components/icon/button-icon/index.js.map +1 -1
- package/dist/es/components/icon/check-props.js +15 -0
- package/dist/es/components/icon/check-props.js.map +1 -0
- package/dist/es/components/icon/component.js +31 -0
- package/dist/es/components/icon/component.js.map +1 -0
- package/dist/es/components/icon/index.js +42 -44
- package/dist/es/components/icon/index.js.map +1 -1
- package/dist/es/components/icon/input-icon/index.js +8 -8
- package/dist/es/components/icon/input-icon/index.js.map +1 -1
- package/dist/es/components/index.js +83 -84
- package/dist/es/components/input/check-props.js +13 -18
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js +113 -115
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js +1 -1
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/input/search.js +3 -3
- package/dist/es/components/input/search.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js +58 -47
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/check-props.js +14 -11
- package/dist/es/components/menu-dropdown/check-props.js.map +1 -1
- package/dist/es/components/menu-dropdown/index.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +277 -280
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +5 -5
- package/dist/es/components/page-header/check-props.js +2 -2
- package/dist/es/components/page-header/check-props.js.map +1 -1
- package/dist/es/components/page-header/control.js.map +1 -1
- package/dist/es/components/page-header/index.js +33 -33
- package/dist/es/components/page-header/index.js.map +1 -1
- package/dist/es/components/page-header/private/base/index.js +24 -36
- package/dist/es/components/page-header/private/base/index.js.map +1 -1
- package/dist/es/components/page-header/private/controls.js +19 -25
- package/dist/es/components/page-header/private/controls.js.map +1 -1
- package/dist/es/components/page-header/private/detail-block.js.map +1 -1
- package/dist/es/components/page-header/private/detail-row.js +1 -1
- package/dist/es/components/page-header/private/detail-row.js.map +1 -1
- package/dist/es/components/page-header/private/info.js.map +1 -1
- package/dist/es/components/page-header/private/object-home/index.js +37 -50
- package/dist/es/components/page-header/private/object-home/index.js.map +1 -1
- package/dist/es/components/page-header/private/record-home/index.js +26 -38
- package/dist/es/components/page-header/private/record-home/index.js.map +1 -1
- package/dist/es/components/page-header/private/related-list/index.js +0 -2
- package/dist/es/components/page-header/private/related-list/index.js.map +1 -1
- package/dist/es/components/page-header/private/title.js +5 -4
- package/dist/es/components/page-header/private/title.js.map +1 -1
- package/dist/es/components/panel/filtering/check-props.js +2 -2
- package/dist/es/components/panel/filtering/check-props.js.map +1 -1
- package/dist/es/components/panel/filtering/group.js +5 -6
- package/dist/es/components/panel/filtering/group.js.map +1 -1
- package/dist/es/components/panel/filtering/list.js +19 -12
- package/dist/es/components/panel/filtering/list.js.map +1 -1
- package/dist/es/components/pill/index.js +9 -9
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +1 -1
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/pill-container/private/selected-listbox.js.map +1 -1
- package/dist/es/components/popover/edit-dialog.js +9 -6
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/popover.js +240 -222
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/check-props.js +8 -7
- package/dist/es/components/progress-indicator/check-props.js.map +1 -1
- package/dist/es/components/progress-indicator/index.js +73 -60
- package/dist/es/components/progress-indicator/index.js.map +1 -1
- package/dist/es/components/progress-indicator/private/step-vertical.js +2 -2
- package/dist/es/components/progress-indicator/private/step-vertical.js.map +1 -1
- package/dist/es/components/progress-indicator/private/step.js +2 -4
- 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/check-props.js +2 -2
- package/dist/es/components/radio/check-props.js.map +1 -1
- package/dist/es/components/radio/index.js +27 -22
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-button-group/index.js.map +1 -1
- package/dist/es/components/radio-button-group/radio.js.map +1 -1
- package/dist/es/components/radio-group/index.js +2 -2
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/scoped-notification/check-props.js +13 -0
- package/dist/es/components/scoped-notification/check-props.js.map +1 -0
- package/dist/es/components/scoped-notification/component.js +31 -0
- package/dist/es/components/scoped-notification/component.js.map +1 -0
- package/dist/es/components/scoped-notification/index.js +31 -29
- package/dist/es/components/scoped-notification/index.js.map +1 -1
- package/dist/es/components/setup-assistant/index.js +22 -24
- package/dist/es/components/setup-assistant/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js +43 -41
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/cell.js +2 -2
- package/dist/es/components/simple-data-table/cell.js.map +1 -1
- package/dist/es/components/simple-data-table/check-props.js +1 -1
- package/dist/es/components/simple-data-table/check-props.js.map +1 -1
- package/dist/es/components/simple-data-table/column-check-props.js +16 -8
- package/dist/es/components/simple-data-table/column-check-props.js.map +1 -1
- package/dist/es/components/simple-data-table/column.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +131 -123
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js +17 -8
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -1
- package/dist/es/components/simple-data-table/private/head.js.map +1 -1
- package/dist/es/components/simple-data-table/private/header-cell.js +3 -3
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -1
- package/dist/es/components/simple-data-table/private/link.js +13 -14
- package/dist/es/components/simple-data-table/private/link.js.map +1 -1
- package/dist/es/components/simple-data-table/private/row.js +2 -1
- package/dist/es/components/simple-data-table/private/row.js.map +1 -1
- package/dist/es/components/simple-data-table/private/table-context.js +1 -0
- package/dist/es/components/simple-data-table/private/table-context.js.map +1 -1
- package/dist/es/components/simple-data-table/row-actions.js +10 -9
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
- package/dist/es/components/spinner/check-props.js +1 -1
- package/dist/es/components/spinner/check-props.js.map +1 -1
- package/dist/es/components/spinner/index.js +31 -28
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/split-view/header.js.map +1 -1
- package/dist/es/components/split-view/listbox.js +8 -8
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/split-view/private/list-item-content.js.map +1 -1
- package/dist/es/components/tabs/index.js +3 -3
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/index.js +58 -58
- package/dist/es/components/toast/index.js.map +1 -1
- package/dist/es/components/tooltip/check-props.js +12 -9
- package/dist/es/components/tooltip/check-props.js.map +1 -1
- package/dist/es/components/tooltip/index.js +114 -108
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tooltip/private/field-level-help-tooltip.js +10 -15
- package/dist/es/components/tooltip/private/field-level-help-tooltip.js.map +1 -1
- package/dist/es/components/tree/check-props.js +5 -5
- package/dist/es/components/tree/private/branch.js +56 -57
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js +13 -13
- package/dist/es/components/tree/private/render-branch.js +35 -35
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/trial-bar/button.js +9 -7
- package/dist/es/components/trial-bar/button.js.map +1 -1
- package/dist/es/components/trial-bar/dropdown.js +17 -19
- package/dist/es/components/trial-bar/dropdown.js.map +1 -1
- package/dist/es/components/utilities/dialog/index.js +8 -8
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item.js +13 -10
- package/dist/es/components/utilities/menu-list/item.js.map +1 -1
- package/dist/es/components/utilities/pill/index.js +14 -14
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/vertical-navigation/private/item.js +25 -20
- package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
- package/dist/es/components/visual-picker/check-props.js +11 -0
- package/dist/es/components/visual-picker/check-props.js.map +1 -0
- package/dist/es/components/visual-picker/index.js +17 -17
- package/dist/es/components/visual-picker/index.js.map +1 -1
- package/dist/es/components/visual-picker/link.js +15 -11
- package/dist/es/components/visual-picker/link.js.map +1 -1
- package/dist/es/components/welcome-mat/index.js +5 -5
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/es/components/welcome-mat/info-badge.js +6 -6
- package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
- package/dist/es/components/welcome-mat/tile.js +7 -7
- package/dist/es/components/welcome-mat/tile.js.map +1 -1
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/es/utilities/dom-element-focus.js +4 -4
- package/dist/es/utilities/dom-element-focus.js.map +1 -1
- package/dist/es/utilities/event.js +4 -0
- package/dist/es/utilities/event.js.map +1 -1
- package/dist/es/utilities/hooks/use-click-outside.js.map +1 -1
- package/dist/es/utilities/hooks/use-latest-ref.js +12 -0
- package/dist/es/utilities/hooks/use-latest-ref.js.map +1 -0
- package/dist/es/utilities/is-element-of-type.js +7 -0
- package/dist/es/utilities/is-element-of-type.js.map +1 -0
- package/dist/es/utilities/key-callbacks.js +1 -1
- package/dist/es/utilities/key-callbacks.js.map +1 -1
- package/dist/es/utilities/key-code.js +11 -11
- package/dist/es/utilities/key-code.js.map +1 -1
- package/dist/es/utilities/key-letter-menu-item-select.js +7 -7
- package/dist/es/utilities/key-letter-menu-item-select.js.map +1 -1
- package/dist/es/utilities/keyboard-navigable-dialog.js +6 -6
- package/dist/es/utilities/keyboard-navigable-dialog.js.map +1 -1
- package/dist/es/utilities/keyboard-navigate.js +15 -15
- package/dist/es/utilities/keyboard-navigate.js.map +1 -1
- package/dist/es/utilities/merge-props.js +34 -0
- package/dist/es/utilities/merge-props.js.map +1 -0
- package/dist/es/utilities/warning/children-as-trigger.js +15 -0
- package/dist/es/utilities/warning/children-as-trigger.js.map +1 -0
- package/dist/types/components/accordion/index.d.ts +5 -3
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/accordion/panel.d.ts +9 -19
- package/dist/types/components/accordion/panel.d.ts.map +1 -1
- package/dist/types/components/alert/index.d.ts +9 -5
- package/dist/types/components/alert/index.d.ts.map +1 -1
- package/dist/types/components/builder-header/index.d.ts +8 -3
- package/dist/types/components/builder-header/index.d.ts.map +1 -1
- package/dist/types/components/builder-header/nav-dropdown.d.ts +4 -2
- package/dist/types/components/builder-header/nav-dropdown.d.ts.map +1 -1
- package/dist/types/components/builder-header/nav.d.ts +6 -2
- package/dist/types/components/builder-header/nav.d.ts.map +1 -1
- package/dist/types/components/builder-header/toolbar.d.ts +4 -1
- package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
- package/dist/types/components/builder-header/utilities.d.ts +6 -2
- package/dist/types/components/builder-header/utilities.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +36 -21
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-group/index.d.ts +14 -6
- package/dist/types/components/button-group/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +6 -4
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/card/filter.d.ts +2 -2
- package/dist/types/components/card/filter.d.ts.map +1 -1
- package/dist/types/components/card/index.d.ts +10 -4
- package/dist/types/components/card/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +4 -3
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/carousel/{private/carousel-item.d.ts → types.d.ts} +3 -9
- package/dist/types/components/carousel/types.d.ts.map +1 -0
- package/dist/types/components/checkbox/index.d.ts +88 -24
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +16 -20
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/index.d.ts +1 -1
- package/dist/types/components/color-picker/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/types.d.ts +29 -7
- package/dist/types/components/color-picker/types.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts +30 -12
- 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/combobox/types.d.ts +89 -0
- package/dist/types/components/combobox/types.d.ts.map +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +9 -12
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +1 -1
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/docked-composer/index.d.ts +8 -2
- package/dist/types/components/docked-composer/index.d.ts.map +1 -1
- package/dist/types/components/dynamic-icon/index.d.ts +42 -14
- package/dist/types/components/dynamic-icon/index.d.ts.map +1 -1
- package/dist/types/components/expandable-section/index.d.ts +33 -10
- package/dist/types/components/expandable-section/index.d.ts.map +1 -1
- package/dist/types/components/files/file.d.ts +16 -16
- package/dist/types/components/files/file.d.ts.map +1 -1
- package/dist/types/components/files/index.d.ts +8 -10
- package/dist/types/components/files/index.d.ts.map +1 -1
- package/dist/types/components/filter/filter.d.ts +9 -1
- package/dist/types/components/filter/filter.d.ts.map +1 -1
- package/dist/types/components/grid/index.d.ts +5 -3
- package/dist/types/components/grid/index.d.ts.map +1 -1
- package/dist/types/components/icon/button-icon/index.d.ts +2 -3
- package/dist/types/components/icon/button-icon/index.d.ts.map +1 -1
- package/dist/types/components/icon/index.d.ts +2 -1
- package/dist/types/components/icon/index.d.ts.map +1 -1
- package/dist/types/components/icon/input-icon/index.d.ts +26 -9
- package/dist/types/components/icon/input-icon/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -2
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +57 -26
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/input/search.d.ts +2 -2
- package/dist/types/components/input/search.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts +27 -15
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts +2 -1
- package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +48 -16
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/page-header/control.d.ts.map +1 -1
- package/dist/types/components/page-header/index.d.ts +81 -21
- package/dist/types/components/page-header/index.d.ts.map +1 -1
- package/dist/types/components/page-header/private/detail-block.d.ts +4 -25
- package/dist/types/components/page-header/private/detail-block.d.ts.map +1 -1
- package/dist/types/components/page-header/private/detail-row.d.ts +3 -14
- package/dist/types/components/page-header/private/detail-row.d.ts.map +1 -1
- package/dist/types/components/page-header/private/info.d.ts +1 -15
- package/dist/types/components/page-header/private/info.d.ts.map +1 -1
- package/dist/types/components/page-header/private/title.d.ts +2 -23
- package/dist/types/components/page-header/private/title.d.ts.map +1 -1
- package/dist/types/components/page-header/types.d.ts +73 -0
- package/dist/types/components/page-header/types.d.ts.map +1 -0
- package/dist/types/components/panel/filtering/group.d.ts +43 -21
- package/dist/types/components/panel/filtering/group.d.ts.map +1 -1
- package/dist/types/components/panel/filtering/list.d.ts +5 -3
- package/dist/types/components/panel/filtering/list.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +45 -16
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/index.d.ts +6 -6
- package/dist/types/components/pill-container/index.d.ts.map +1 -1
- package/dist/types/components/popover/edit-dialog.d.ts +14 -8
- package/dist/types/components/popover/edit-dialog.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +46 -18
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/index.d.ts +74 -29
- package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/components/progress-ring/index.d.ts +19 -6
- package/dist/types/components/progress-ring/index.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +44 -18
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-button-group/index.d.ts +5 -7
- package/dist/types/components/radio-button-group/index.d.ts.map +1 -1
- package/dist/types/components/radio-button-group/radio.d.ts +1 -3
- package/dist/types/components/radio-button-group/radio.d.ts.map +1 -1
- package/dist/types/components/radio-group/index.d.ts +23 -10
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/radio.d.ts +1 -3
- package/dist/types/components/radio-group/radio.d.ts.map +1 -1
- package/dist/types/components/scoped-notification/index.d.ts +6 -5
- package/dist/types/components/scoped-notification/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/index.d.ts +22 -15
- package/dist/types/components/setup-assistant/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +6 -23
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/cell.d.ts +2 -2
- package/dist/types/components/simple-data-table/column.d.ts +3 -55
- package/dist/types/components/simple-data-table/column.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/index.d.ts +6 -3
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts +6 -2
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/row-actions.d.ts +5 -29
- package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +48 -50
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/spinner/index.d.ts +32 -5
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/split-view/header.d.ts +2 -6
- package/dist/types/components/split-view/header.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts +2 -1
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/split-view/types.d.ts +7 -0
- package/dist/types/components/split-view/types.d.ts.map +1 -0
- package/dist/types/components/tabs/index.d.ts +7 -17
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +3 -21
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/index.d.ts +17 -8
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +38 -6
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/index.d.ts +1 -1
- package/dist/types/components/tree/index.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +61 -14
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/trial-bar/button.d.ts +1 -1
- package/dist/types/components/trial-bar/button.d.ts.map +1 -1
- package/dist/types/components/trial-bar/dropdown.d.ts +2 -2
- package/dist/types/components/trial-bar/dropdown.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
- package/dist/types/components/utilities/truncate/index.d.ts +2 -3
- package/dist/types/components/utilities/truncate/index.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +4 -3
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/visual-picker/index.d.ts +35 -21
- package/dist/types/components/visual-picker/index.d.ts.map +1 -1
- package/dist/types/components/visual-picker/link.d.ts +3 -2
- package/dist/types/components/visual-picker/link.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/index.d.ts +12 -9
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/info-badge.d.ts +2 -0
- package/dist/types/components/welcome-mat/info-badge.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/tile.d.ts +6 -16
- package/dist/types/components/welcome-mat/tile.d.ts.map +1 -1
- package/dist/types/types/common.d.ts +15 -1
- package/dist/types/types/common.d.ts.map +1 -1
- package/dist/types/utilities/constants.d.ts +0 -1
- package/dist/types/utilities/constants.d.ts.map +1 -1
- package/package.json +26 -9
- package/dist/cjs/components/illustration/check-props.cjs +0 -2
- package/dist/cjs/components/illustration/check-props.cjs.map +0 -1
- package/dist/cjs/components/illustration/index.cjs +0 -2
- package/dist/cjs/components/illustration/index.cjs.map +0 -1
- package/dist/cjs/components/illustration.cjs +0 -1
- package/dist/cjs/components/page-header/private/base.cjs +0 -1
- package/dist/cjs/components/page-header/private/object-home.cjs +0 -1
- package/dist/cjs/components/page-header/private/record-home.cjs +0 -1
- package/dist/cjs/components/page-header/private/related-list.cjs +0 -1
- package/dist/cjs/utilities/hooks/index.cjs +0 -1
- package/dist/cjs/utilities/hooks.cjs +0 -1
- package/dist/cjs/utilities/object.cjs +0 -2
- package/dist/cjs/utilities/object.cjs.map +0 -1
- package/dist/cjs/utilities/warning/component-is-deprecated.cjs +0 -2
- package/dist/cjs/utilities/warning/component-is-deprecated.cjs.map +0 -1
- package/dist/es/components/illustration/check-props.js +0 -11
- package/dist/es/components/illustration/check-props.js.map +0 -1
- package/dist/es/components/illustration/index.js +0 -73
- package/dist/es/components/illustration/index.js.map +0 -1
- package/dist/es/components/illustration.js +0 -2
- package/dist/es/components/page-header/private/base.js +0 -2
- package/dist/es/components/page-header/private/object-home.js +0 -2
- package/dist/es/components/page-header/private/record-home.js +0 -2
- package/dist/es/components/page-header/private/related-list.js +0 -2
- package/dist/es/utilities/hooks/index.js +0 -3
- package/dist/es/utilities/hooks.js +0 -1
- package/dist/es/utilities/object.js +0 -10
- package/dist/es/utilities/object.js.map +0 -1
- package/dist/es/utilities/warning/component-is-deprecated.js +0 -15
- package/dist/es/utilities/warning/component-is-deprecated.js.map +0 -1
- package/dist/types/components/alert/check-props.d.ts +0 -3
- package/dist/types/components/alert/check-props.d.ts.map +0 -1
- package/dist/types/components/builder-header/check-props.d.ts +0 -3
- package/dist/types/components/builder-header/check-props.d.ts.map +0 -1
- package/dist/types/components/button/check-props.d.ts +0 -3
- package/dist/types/components/button/check-props.d.ts.map +0 -1
- package/dist/types/components/button-stateful/check-props.d.ts +0 -3
- package/dist/types/components/button-stateful/check-props.d.ts.map +0 -1
- package/dist/types/components/card/private/body.d.ts +0 -22
- package/dist/types/components/card/private/body.d.ts.map +0 -1
- package/dist/types/components/card/private/footer.d.ts +0 -14
- package/dist/types/components/card/private/footer.d.ts.map +0 -1
- package/dist/types/components/card/private/header.d.ts +0 -48
- package/dist/types/components/card/private/header.d.ts.map +0 -1
- package/dist/types/components/carousel/check-props.d.ts +0 -3
- package/dist/types/components/carousel/check-props.d.ts.map +0 -1
- package/dist/types/components/carousel/private/auto-play-button.d.ts +0 -26
- package/dist/types/components/carousel/private/auto-play-button.d.ts.map +0 -1
- package/dist/types/components/carousel/private/carousel-indicators.d.ts +0 -65
- package/dist/types/components/carousel/private/carousel-indicators.d.ts.map +0 -1
- package/dist/types/components/carousel/private/carousel-item.d.ts.map +0 -1
- package/dist/types/components/carousel/private/previous-next-carousel-navigator.d.ts +0 -30
- package/dist/types/components/carousel/private/previous-next-carousel-navigator.d.ts.map +0 -1
- package/dist/types/components/checkbox/check-props.d.ts +0 -5
- package/dist/types/components/checkbox/check-props.d.ts.map +0 -1
- package/dist/types/components/color-picker/check-props.d.ts +0 -3
- package/dist/types/components/color-picker/check-props.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/color-picker-tabs.d.ts +0 -14
- package/dist/types/components/color-picker/private/color-picker-tabs.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/custom-color-form.d.ts +0 -28
- package/dist/types/components/color-picker/private/custom-color-form.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/custom-color.d.ts +0 -49
- package/dist/types/components/color-picker/private/custom-color.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/hsv-color.d.ts +0 -37
- package/dist/types/components/color-picker/private/hsv-color.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/swatch-option.d.ts +0 -25
- package/dist/types/components/color-picker/private/swatch-option.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/swatch-picker.d.ts +0 -65
- package/dist/types/components/color-picker/private/swatch-picker.d.ts.map +0 -1
- package/dist/types/components/color-picker/private/swatch.d.ts +0 -22
- package/dist/types/components/color-picker/private/swatch.d.ts.map +0 -1
- package/dist/types/components/combobox/check-props.d.ts +0 -3
- package/dist/types/components/combobox/check-props.d.ts.map +0 -1
- package/dist/types/components/combobox/private/menu.d.ts +0 -143
- package/dist/types/components/combobox/private/menu.d.ts.map +0 -1
- package/dist/types/components/date-picker/check-props.d.ts +0 -3
- package/dist/types/components/date-picker/check-props.d.ts.map +0 -1
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts +0 -80
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts.map +0 -1
- package/dist/types/components/date-picker/private/calendar.d.ts +0 -77
- package/dist/types/components/date-picker/private/calendar.d.ts.map +0 -1
- package/dist/types/components/date-picker/private/day.d.ts +0 -100
- package/dist/types/components/date-picker/private/day.d.ts.map +0 -1
- package/dist/types/components/date-picker/private/navigation.d.ts +0 -37
- package/dist/types/components/date-picker/private/navigation.d.ts.map +0 -1
- package/dist/types/components/date-picker/private/week.d.ts +0 -59
- package/dist/types/components/date-picker/private/week.d.ts.map +0 -1
- package/dist/types/components/date-picker/private/year-picklist.d.ts +0 -27
- package/dist/types/components/date-picker/private/year-picklist.d.ts.map +0 -1
- package/dist/types/components/files/private/file-actions.d.ts +0 -30
- package/dist/types/components/files/private/file-actions.d.ts.map +0 -1
- package/dist/types/components/files/private/file-figure.d.ts +0 -36
- package/dist/types/components/files/private/file-figure.d.ts.map +0 -1
- package/dist/types/components/forms/private/label.d.ts +0 -32
- package/dist/types/components/forms/private/label.d.ts.map +0 -1
- package/dist/types/components/icon/button-icon/check-props.d.ts +0 -3
- package/dist/types/components/icon/button-icon/check-props.d.ts.map +0 -1
- package/dist/types/components/icon/check-props.d.ts +0 -3
- package/dist/types/components/icon/check-props.d.ts.map +0 -1
- package/dist/types/components/illustration/check-props.d.ts +0 -3
- package/dist/types/components/illustration/check-props.d.ts.map +0 -1
- package/dist/types/components/illustration/index.d.ts +0 -42
- package/dist/types/components/illustration/index.d.ts.map +0 -1
- package/dist/types/components/illustration.d.ts +0 -2
- package/dist/types/components/input/check-props.d.ts +0 -3
- package/dist/types/components/input/check-props.d.ts.map +0 -1
- package/dist/types/components/input/private/inner-input.d.ts +0 -136
- package/dist/types/components/input/private/inner-input.d.ts.map +0 -1
- package/dist/types/components/menu-dropdown/check-props.d.ts +0 -3
- package/dist/types/components/menu-dropdown/check-props.d.ts.map +0 -1
- package/dist/types/components/modal/check-props.d.ts +0 -3
- package/dist/types/components/modal/check-props.d.ts.map +0 -1
- package/dist/types/components/page-header/check-props.d.ts +0 -3
- package/dist/types/components/page-header/check-props.d.ts.map +0 -1
- package/dist/types/components/page-header/private/base/index.d.ts +0 -9
- package/dist/types/components/page-header/private/base/index.d.ts.map +0 -1
- package/dist/types/components/page-header/private/base.d.ts +0 -2
- package/dist/types/components/page-header/private/controls.d.ts +0 -33
- package/dist/types/components/page-header/private/controls.d.ts.map +0 -1
- package/dist/types/components/page-header/private/label.d.ts +0 -22
- package/dist/types/components/page-header/private/label.d.ts.map +0 -1
- package/dist/types/components/page-header/private/object-home/index.d.ts +0 -9
- package/dist/types/components/page-header/private/object-home/index.d.ts.map +0 -1
- package/dist/types/components/page-header/private/object-home.d.ts +0 -2
- package/dist/types/components/page-header/private/record-home/index.d.ts +0 -9
- package/dist/types/components/page-header/private/record-home/index.d.ts.map +0 -1
- package/dist/types/components/page-header/private/record-home.d.ts +0 -2
- package/dist/types/components/page-header/private/related-list/index.d.ts +0 -9
- package/dist/types/components/page-header/private/related-list/index.d.ts.map +0 -1
- package/dist/types/components/page-header/private/related-list.d.ts +0 -2
- package/dist/types/components/page-header/private/types.d.ts +0 -49
- package/dist/types/components/page-header/private/types.d.ts.map +0 -1
- package/dist/types/components/panel/filtering/check-props.d.ts +0 -3
- package/dist/types/components/panel/filtering/check-props.d.ts.map +0 -1
- package/dist/types/components/panel/filtering/private/panel-footer.d.ts +0 -25
- package/dist/types/components/panel/filtering/private/panel-footer.d.ts.map +0 -1
- package/dist/types/components/panel/filtering/private/panel-header.d.ts +0 -47
- package/dist/types/components/panel/filtering/private/panel-header.d.ts.map +0 -1
- package/dist/types/components/pill-container/check-props.d.ts +0 -3
- package/dist/types/components/pill-container/check-props.d.ts.map +0 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts +0 -83
- package/dist/types/components/pill-container/private/selected-listbox.d.ts.map +0 -1
- package/dist/types/components/popover/check-props.d.ts +0 -3
- package/dist/types/components/popover/check-props.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/check-props.d.ts +0 -3
- package/dist/types/components/progress-indicator/check-props.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/private/path.d.ts +0 -48
- package/dist/types/components/progress-indicator/private/path.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/private/progress-bar.d.ts +0 -27
- package/dist/types/components/progress-indicator/private/progress-bar.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/private/progress.d.ts +0 -45
- package/dist/types/components/progress-indicator/private/progress.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/private/step-vertical.d.ts +0 -59
- package/dist/types/components/progress-indicator/private/step-vertical.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/private/step.d.ts +0 -78
- package/dist/types/components/progress-indicator/private/step.d.ts.map +0 -1
- package/dist/types/components/progress-indicator/private/use-roving-tab-index.d.ts +0 -41
- package/dist/types/components/progress-indicator/private/use-roving-tab-index.d.ts.map +0 -1
- package/dist/types/components/progress-ring/private/ring-shape.d.ts +0 -34
- package/dist/types/components/progress-ring/private/ring-shape.d.ts.map +0 -1
- package/dist/types/components/radio/check-props.d.ts +0 -4
- package/dist/types/components/radio/check-props.d.ts.map +0 -1
- package/dist/types/components/radio-group/check-props.d.ts +0 -3
- package/dist/types/components/radio-group/check-props.d.ts.map +0 -1
- package/dist/types/components/scoped-notification/check-props.d.ts +0 -3
- package/dist/types/components/scoped-notification/check-props.d.ts.map +0 -1
- package/dist/types/components/setup-assistant/check-props.d.ts +0 -3
- package/dist/types/components/setup-assistant/check-props.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/check-props.d.ts +0 -3
- package/dist/types/components/simple-data-table/check-props.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/column-check-props.d.ts +0 -3
- package/dist/types/components/simple-data-table/column-check-props.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/cell-context.d.ts +0 -8
- package/dist/types/components/simple-data-table/private/cell-context.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/cell-fixed.d.ts +0 -10
- package/dist/types/components/simple-data-table/private/cell-fixed.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/context-helper.d.ts +0 -14
- package/dist/types/components/simple-data-table/private/context-helper.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/head.d.ts +0 -39
- package/dist/types/components/simple-data-table/private/head.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/header-cell.d.ts +0 -39
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/link.d.ts +0 -11
- package/dist/types/components/simple-data-table/private/link.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/row.d.ts +0 -44
- package/dist/types/components/simple-data-table/private/row.d.ts.map +0 -1
- package/dist/types/components/simple-data-table/private/table-context.d.ts +0 -20
- package/dist/types/components/simple-data-table/private/table-context.d.ts.map +0 -1
- package/dist/types/components/slider/check-props.d.ts +0 -3
- package/dist/types/components/slider/check-props.d.ts.map +0 -1
- package/dist/types/components/spinner/check-props.d.ts +0 -3
- package/dist/types/components/spinner/check-props.d.ts.map +0 -1
- package/dist/types/components/split-view/check-props.d.ts +0 -3
- package/dist/types/components/split-view/check-props.d.ts.map +0 -1
- package/dist/types/components/split-view/listbox-check-props.d.ts +0 -4
- package/dist/types/components/split-view/listbox-check-props.d.ts.map +0 -1
- package/dist/types/components/split-view/private/list-item-content.d.ts +0 -23
- package/dist/types/components/split-view/private/list-item-content.d.ts.map +0 -1
- package/dist/types/components/split-view/private/toggle-button.d.ts +0 -33
- package/dist/types/components/split-view/private/toggle-button.d.ts.map +0 -1
- package/dist/types/components/tabs/check-props.d.ts +0 -3
- package/dist/types/components/tabs/check-props.d.ts.map +0 -1
- package/dist/types/components/tabs/private/tab-panel.d.ts +0 -45
- package/dist/types/components/tabs/private/tab-panel.d.ts.map +0 -1
- package/dist/types/components/tabs/private/tab.d.ts +0 -59
- package/dist/types/components/tabs/private/tab.d.ts.map +0 -1
- package/dist/types/components/tabs/private/tabs-list.d.ts +0 -27
- package/dist/types/components/tabs/private/tabs-list.d.ts.map +0 -1
- package/dist/types/components/textarea/check-props.d.ts +0 -3
- package/dist/types/components/textarea/check-props.d.ts.map +0 -1
- package/dist/types/components/toast/check-props.d.ts +0 -3
- package/dist/types/components/toast/check-props.d.ts.map +0 -1
- package/dist/types/components/tooltip/check-props.d.ts +0 -3
- package/dist/types/components/tooltip/check-props.d.ts.map +0 -1
- package/dist/types/components/tooltip/private/field-level-help-tooltip.d.ts +0 -20
- package/dist/types/components/tooltip/private/field-level-help-tooltip.d.ts.map +0 -1
- package/dist/types/components/tree/check-props.d.ts +0 -4
- package/dist/types/components/tree/check-props.d.ts.map +0 -1
- package/dist/types/components/tree/private/branch.d.ts +0 -60
- package/dist/types/components/tree/private/branch.d.ts.map +0 -1
- package/dist/types/components/tree/private/item.d.ts +0 -46
- package/dist/types/components/tree/private/item.d.ts.map +0 -1
- package/dist/types/components/tree/private/render-branch.d.ts +0 -48
- package/dist/types/components/tree/private/render-branch.d.ts.map +0 -1
- package/dist/types/components/tree/private/render-initial-branch.d.ts +0 -14
- package/dist/types/components/tree/private/render-initial-branch.d.ts.map +0 -1
- package/dist/types/components/trial-bar/check-props.d.ts +0 -3
- package/dist/types/components/trial-bar/check-props.d.ts.map +0 -1
- package/dist/types/components/utilities/UNSAFE_direction/private/language-direction.d.ts +0 -53
- package/dist/types/components/utilities/UNSAFE_direction/private/language-direction.d.ts.map +0 -1
- package/dist/types/components/utilities/utility-icon/check-props.d.ts +0 -3
- package/dist/types/components/utilities/utility-icon/check-props.d.ts.map +0 -1
- package/dist/types/components/vertical-navigation/check-props.d.ts +0 -4
- package/dist/types/components/vertical-navigation/check-props.d.ts.map +0 -1
- package/dist/types/components/vertical-navigation/private/item.d.ts +0 -27
- package/dist/types/components/vertical-navigation/private/item.d.ts.map +0 -1
- package/dist/types/components/welcome-mat/check-props.d.ts +0 -3
- package/dist/types/components/welcome-mat/check-props.d.ts.map +0 -1
- package/dist/types/utilities/class-names.d.ts +0 -3
- package/dist/types/utilities/class-names.d.ts.map +0 -1
- package/dist/types/utilities/color.d.ts +0 -134
- package/dist/types/utilities/color.d.ts.map +0 -1
- package/dist/types/utilities/date.d.ts +0 -18
- package/dist/types/utilities/date.d.ts.map +0 -1
- package/dist/types/utilities/dialog-helpers.d.ts +0 -8
- package/dist/types/utilities/dialog-helpers.d.ts.map +0 -1
- package/dist/types/utilities/dom-element-focus.d.ts +0 -14
- package/dist/types/utilities/dom-element-focus.d.ts.map +0 -1
- package/dist/types/utilities/dom.d.ts +0 -11
- package/dist/types/utilities/dom.d.ts.map +0 -1
- package/dist/types/utilities/event.d.ts +0 -8
- package/dist/types/utilities/event.d.ts.map +0 -1
- package/dist/types/utilities/execution-environment.d.ts +0 -5
- package/dist/types/utilities/execution-environment.d.ts.map +0 -1
- package/dist/types/utilities/generate-id.d.ts +0 -7
- package/dist/types/utilities/generate-id.d.ts.map +0 -1
- package/dist/types/utilities/get-aria-props.d.ts +0 -2
- package/dist/types/utilities/get-aria-props.d.ts.map +0 -1
- package/dist/types/utilities/get-component-doc.d.ts +0 -3
- package/dist/types/utilities/get-component-doc.d.ts.map +0 -1
- package/dist/types/utilities/get-data-props.d.ts +0 -2
- package/dist/types/utilities/get-data-props.d.ts.map +0 -1
- package/dist/types/utilities/get-form-props.d.ts +0 -2
- package/dist/types/utilities/get-form-props.d.ts.map +0 -1
- package/dist/types/utilities/hooks/index.d.ts +0 -3
- package/dist/types/utilities/hooks/index.d.ts.map +0 -1
- package/dist/types/utilities/hooks/use-click-outside.d.ts +0 -32
- package/dist/types/utilities/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/types/utilities/hooks/use-controllable-state.d.ts +0 -23
- package/dist/types/utilities/hooks/use-controllable-state.d.ts.map +0 -1
- package/dist/types/utilities/hooks.d.ts +0 -1
- package/dist/types/utilities/index.d.ts +0 -4
- package/dist/types/utilities/index.d.ts.map +0 -1
- package/dist/types/utilities/is-react-component.d.ts +0 -3
- package/dist/types/utilities/is-react-component.d.ts.map +0 -1
- package/dist/types/utilities/key-buffer.d.ts +0 -3
- package/dist/types/utilities/key-buffer.d.ts.map +0 -1
- package/dist/types/utilities/key-callbacks.d.ts +0 -7
- package/dist/types/utilities/key-callbacks.d.ts.map +0 -1
- package/dist/types/utilities/key-code.d.ts +0 -67
- package/dist/types/utilities/key-code.d.ts.map +0 -1
- package/dist/types/utilities/key-letter-menu-item-select.d.ts +0 -8
- package/dist/types/utilities/key-letter-menu-item-select.d.ts.map +0 -1
- package/dist/types/utilities/keyboard-navigable-dialog.d.ts +0 -11
- package/dist/types/utilities/keyboard-navigable-dialog.d.ts.map +0 -1
- package/dist/types/utilities/keyboard-navigate.d.ts +0 -15
- package/dist/types/utilities/keyboard-navigate.d.ts.map +0 -1
- package/dist/types/utilities/letter-key-code.d.ts +0 -5
- package/dist/types/utilities/letter-key-code.d.ts.map +0 -1
- package/dist/types/utilities/menu-item-select-scroll.d.ts +0 -8
- package/dist/types/utilities/menu-item-select-scroll.d.ts.map +0 -1
- package/dist/types/utilities/object.d.ts +0 -6
- package/dist/types/utilities/object.d.ts.map +0 -1
- package/dist/types/utilities/product-tokens/icon-backgrounds.d.ts +0 -12
- package/dist/types/utilities/product-tokens/icon-backgrounds.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/global-navigation-bar/index.d.ts +0 -90
- package/dist/types/utilities/sample-data/global-navigation-bar/index.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/global-navigation-bar.d.ts +0 -1
- package/dist/types/utilities/sample-data/tree/index.d.ts +0 -207
- package/dist/types/utilities/sample-data/tree/index.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/tree/nodes-base.d.ts +0 -78
- package/dist/types/utilities/sample-data/tree/nodes-base.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/tree/nodes-with-initial-state.d.ts +0 -102
- package/dist/types/utilities/sample-data/tree/nodes-with-initial-state.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/tree/nodes-with-large-dataset.d.ts +0 -29
- package/dist/types/utilities/sample-data/tree/nodes-with-large-dataset.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/tree.d.ts +0 -2
- package/dist/types/utilities/sample-data/vertical-navigation/index.d.ts +0 -23
- package/dist/types/utilities/sample-data/vertical-navigation/index.d.ts.map +0 -1
- package/dist/types/utilities/sample-data/vertical-navigation.d.ts +0 -1
- package/dist/types/utilities/tabbable.d.ts +0 -14
- package/dist/types/utilities/tabbable.d.ts.map +0 -1
- package/dist/types/utilities/warning/check-app-element-set.d.ts +0 -3
- package/dist/types/utilities/warning/check-app-element-set.d.ts.map +0 -1
- package/dist/types/utilities/warning/component-has-moved.d.ts +0 -8
- package/dist/types/utilities/warning/component-has-moved.d.ts.map +0 -1
- package/dist/types/utilities/warning/component-is-deprecated.d.ts +0 -6
- package/dist/types/utilities/warning/component-is-deprecated.d.ts.map +0 -1
- package/dist/types/utilities/warning/component-is-prototype.d.ts +0 -3
- package/dist/types/utilities/warning/component-is-prototype.d.ts.map +0 -1
- package/dist/types/utilities/warning/deprecated-property-value.d.ts +0 -3
- package/dist/types/utilities/warning/deprecated-property-value.d.ts.map +0 -1
- package/dist/types/utilities/warning/deprecated-property.d.ts +0 -3
- package/dist/types/utilities/warning/deprecated-property.d.ts.map +0 -1
- package/dist/types/utilities/warning/future-property.d.ts +0 -3
- package/dist/types/utilities/warning/future-property.d.ts.map +0 -1
- package/dist/types/utilities/warning/has-children-without-display-name-of.d.ts +0 -3
- package/dist/types/utilities/warning/has-children-without-display-name-of.d.ts.map +0 -1
- package/dist/types/utilities/warning/if-one-then-both-required-property.d.ts +0 -3
- package/dist/types/utilities/warning/if-one-then-both-required-property.d.ts.map +0 -1
- package/dist/types/utilities/warning/incompatible-props.d.ts +0 -3
- package/dist/types/utilities/warning/incompatible-props.d.ts.map +0 -1
- package/dist/types/utilities/warning/is-trigger-tabbable.d.ts +0 -3
- package/dist/types/utilities/warning/is-trigger-tabbable.d.ts.map +0 -1
- package/dist/types/utilities/warning/low-priority-warning.d.ts +0 -3
- package/dist/types/utilities/warning/low-priority-warning.d.ts.map +0 -1
- package/dist/types/utilities/warning/one-of-component.d.ts +0 -3
- package/dist/types/utilities/warning/one-of-component.d.ts.map +0 -1
- package/dist/types/utilities/warning/one-of-required-property.d.ts +0 -3
- package/dist/types/utilities/warning/one-of-required-property.d.ts.map +0 -1
- package/dist/types/utilities/warning/only-one-of-properties.d.ts +0 -3
- package/dist/types/utilities/warning/only-one-of-properties.d.ts.map +0 -1
- package/dist/types/utilities/warning/render-function-return-contents-lack-display-name.d.ts +0 -3
- package/dist/types/utilities/warning/render-function-return-contents-lack-display-name.d.ts.map +0 -1
- package/dist/types/utilities/warning/required-property.d.ts +0 -3
- package/dist/types/utilities/warning/required-property.d.ts.map +0 -1
- package/dist/types/utilities/warning/sunset-property.d.ts +0 -3
- package/dist/types/utilities/warning/sunset-property.d.ts.map +0 -1
- package/dist/types/utilities/warning/url-exists.d.ts +0 -3
- package/dist/types/utilities/warning/url-exists.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","names":[],"sources":["../../../../../components/simple-data-table/private/row.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\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tSyntheticEvent,\n\tReactNode,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Checkbox from '../../checkbox';\nimport Radio from '../../radio';\n\nimport {\n\tSIMPLE_DATA_TABLE_ROW,\n\tSIMPLE_DATA_TABLE_ROW_ACTIONS,\n\tSIMPLE_DATA_TABLE_CELL,\n} from '../../../utilities/constants';\n\nimport InteractiveElement from '../interactive-element';\nimport CellContext from './cell-context';\nimport TableContext from './table-context';\nimport useContextHelper from './context-helper';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst InteractiveCheckbox = InteractiveElement(\n\tCheckbox as any\n) as React.ComponentType<any>;\nconst InteractiveRadio = InteractiveElement(\n\tRadio as any\n) as React.ComponentType<any>;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\ninterface SimpleDataTableItem {\n\tid: string;\n\t[key: string]: unknown;\n}\n\ninterface SimpleDataTableColumnConfig {\n\tCell: React.ComponentType<Record<string, unknown>>;\n\tprops: {\n\t\tproperty?: string;\n\t\ttruncate?: boolean;\n\t\tprimaryColumn?: boolean;\n\t\twidth?: string;\n\t\t[key: string]: unknown;\n\t};\n}\n\ninterface AssistiveText {\n\tselectRow?: string;\n\t[key: string]: unknown;\n}\n\nexport interface SimpleDataTableRowProps {\n\tassistiveText?: AssistiveText;\n\tcanSelectRows?: boolean | 'checkbox' | 'radio';\n\tclassName?: string;\n\tcolumns?: SimpleDataTableColumnConfig[];\n\tfixedLayout?: boolean;\n\tid: string;\n\tindex?: number;\n\titem: SimpleDataTableItem;\n\tonToggle?: (\n\t\titem: SimpleDataTableItem,\n\t\tselected: boolean,\n\t\tevent: SyntheticEvent\n\t) => void;\n\trowActions?: ReactNode;\n\t/** Whether the row's item is in the table's `selection` (matched by `id`) */\n\tisSelected?: boolean;\n\t/** Whether the row's item is in the table's `disabledSelection` (matched by `id`) */\n\tisDisabled?: boolean;\n\ttableId?: string;\n\trowIndex?: number;\n\tstacked?: boolean;\n}\n\n/**\n * Used internally, provides row rendering to the SimpleDataTable.\n */\nconst SimpleDataTableRow: React.FC<SimpleDataTableRowProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst selectRowCellContext = useMemo(\n\t\t() => ({\n\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\tcolumnIndex: 0,\n\t\t}),\n\t\t[props.rowIndex]\n\t);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tselectRowCellContext,\n\t\tprops.fixedLayout\n\t);\n\n\t// Selection is controlled: the checkbox or radio always renders the table's\n\t// `selection` prop (`checked` is always passed, never `defaultChecked`).\n\tconst isSelected = !!props.isSelected;\n\tconst isDisabled = !!props.isDisabled;\n\n\tconst { item, onToggle } = props;\n\tconst handleToggle = useCallback(\n\t\t(_e: SyntheticEvent, { checked }: { checked: boolean }) => {\n\t\t\t// A disabled row never requests a selection change.\n\t\t\tif (onToggle && !isDisabled) {\n\t\t\t\tonToggle(item, checked, _e);\n\t\t\t}\n\t\t},\n\t\t[isDisabled, item, onToggle]\n\t);\n\n\tconst ariaProps = useMemo(() => {\n\t\tconst result: { 'aria-selected'?: 'true' | 'false' } = {};\n\n\t\tif (props.canSelectRows) {\n\t\t\tresult['aria-selected'] = isSelected ? 'true' : 'false';\n\t\t}\n\t\treturn result;\n\t}, [isSelected, props.canSelectRows]);\n\n\tconst radioSelection = useMemo(() => {\n\t\t// Disabled rows are not registered for keyboard navigation.\n\t\tconst RadioComponent = isDisabled ? Radio : InteractiveRadio;\n\t\treturn (\n\t\t\t<RadioComponent\n\t\t\t\tassistiveText={{\n\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${\n\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t}`,\n\t\t\t\t}}\n\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSSimpleDataTableHead-column-group-header-row-select`}\n\t\t\t\tchecked={isSelected}\n\t\t\t\tclassName=\"slds-m-right_x-small\"\n\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\tname={`${props.tableId}-SelectRow`}\n\t\t\t\tonChange={handleToggle}\n\t\t\t\tdisabled={isDisabled}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\thandleToggle,\n\t\tisSelected,\n\t\tisDisabled,\n\t\tprops.assistiveText?.selectRow,\n\t\tprops.id,\n\t\tprops.index,\n\t\tprops.tableId,\n\t]);\n\n\tconst checkboxSelection = useMemo(() => {\n\t\t// Disabled rows are not registered for keyboard navigation.\n\t\tconst CheckboxComponent = isDisabled ? Checkbox : InteractiveCheckbox;\n\t\treturn (\n\t\t\t<CheckboxComponent\n\t\t\t\tassistiveText={{\n\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${\n\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t}`,\n\t\t\t\t}}\n\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSSimpleDataTableHead-column-group-header-row-select`}\n\t\t\t\tchecked={isSelected}\n\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\tname={`SelectRow${(props.index ?? 0) + 1}`}\n\t\t\t\tonChange={handleToggle}\n\t\t\t\tdisabled={isDisabled}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\thandleToggle,\n\t\tisSelected,\n\t\tisDisabled,\n\t\tprops.assistiveText?.selectRow,\n\t\tprops.id,\n\t\tprops.index,\n\t\tprops.tableId,\n\t]);\n\n\treturn (\n\t\t<tr\n\t\t\t{...ariaProps}\n\t\t\tclassName={classNames(props.className, {\n\t\t\t\t'slds-hint-parent': props.rowActions,\n\t\t\t\t'slds-is-selected': props.canSelectRows && isSelected,\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t>\n\t\t\t{useMemo(\n\t\t\t\t() => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{props.canSelectRows ? (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\trole={props.fixedLayout ? 'gridcell' : undefined}\n\t\t\t\t\t\t\t\tclassName=\"slds-text-align_right\"\n\t\t\t\t\t\t\t\tdata-label={props.stacked ? 'Select Row' : undefined}\n\t\t\t\t\t\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\t\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\t\t\t\t\t\tref.focus();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CellContext.Provider value={selectRowCellContext}>\n\t\t\t\t\t\t\t\t\t{props.canSelectRows === 'radio'\n\t\t\t\t\t\t\t\t\t\t? radioSelection\n\t\t\t\t\t\t\t\t\t\t: checkboxSelection}\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{props.columns?.map((column, index) => {\n\t\t\t\t\t\t\tconst { Cell } = column;\n\t\t\t\t\t\t\tconst cellId = `${props.id}-${SIMPLE_DATA_TABLE_CELL}-${column.props.property}`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\t\t\tkey={cellId}\n\t\t\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows ? index + 1 : index,\n\t\t\t\t\t\t\t\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\t\t\t\t{...column.props}\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\tcolumn.props.truncate ? 'slds-truncate' : undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\t\t\t\t\t\trowHeader={column.props.primaryColumn}\n\t\t\t\t\t\t\t\t\t\tid={cellId}\n\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\twidth={column.props.width}\n\t\t\t\t\t\t\t\t\t\theaderId={item.headerId}\n\t\t\t\t\t\t\t\t\t\tcolumns={props.columns}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{item[column.props.property || '']}\n\t\t\t\t\t\t\t\t\t</Cell>\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows\n\t\t\t\t\t\t\t\t\t? (props.columns?.length ?? 0) + 1\n\t\t\t\t\t\t\t\t\t: (props.columns?.length ?? 0),\n\t\t\t\t\t\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{props.rowActions\n\t\t\t\t\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\t\t\t\t\tprops.rowActions as React.ReactElement<{\n\t\t\t\t\t\t\t\t\t\t\tid?: string;\n\t\t\t\t\t\t\t\t\t\t\titem?: SimpleDataTableItem;\n\t\t\t\t\t\t\t\t\t\t\tfixedLayout?: boolean;\n\t\t\t\t\t\t\t\t\t\t}>,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tid: `${props.id}-${SIMPLE_DATA_TABLE_ROW_ACTIONS}`,\n\t\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\t\tfixedLayout: props.fixedLayout,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t: null}\n\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t\t[\n\t\t\t\t\thandleFocus,\n\t\t\t\t\thandleKeyDown,\n\t\t\t\t\thasFocus,\n\t\t\t\t\titem,\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tprops.canSelectRows,\n\t\t\t\t\tprops.columns,\n\t\t\t\t\tprops.fixedLayout,\n\t\t\t\t\tprops.id,\n\t\t\t\t\tprops.rowActions,\n\t\t\t\t\tprops.rowIndex,\n\t\t\t\t\tprops.stacked,\n\t\t\t\t\tselectRowCellContext,\n\t\t\t\t\tcheckboxSelection,\n\t\t\t\t\tradioSelection,\n\t\t\t\t]\n\t\t\t)}\n\t\t</tr>\n\t);\n};\n\nSimpleDataTableRow.displayName = SIMPLE_DATA_TABLE_ROW;\n\nexport default SimpleDataTableRow;\n"],"mappings":";;;;;;;;;;;AA2BA,IAAM,IAAsB,EAC3B,CACD,GACM,IAAmB,EACxB,CACD,GAmDM,KAAyD,MAAU;CACxE,IAAM,IAAe,EAAW,CAAY,GACtC,IAAuB,SACrB;EACN,UAAU,EAAM,YAAY;EAC5B,aAAa;CACd,IACA,CAAC,EAAM,QAAQ,CAChB,GACM,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,EAAM,WACP,GAIM,IAAa,CAAC,CAAC,EAAM,YACrB,IAAa,CAAC,CAAC,EAAM,YAErB,EAAE,SAAM,gBAAa,GACrB,IAAe,GACnB,GAAoB,EAAE,iBAAoC;EAE1D,AAAI,KAAY,CAAC,KAChB,EAAS,GAAM,GAAS,CAAE;CAE5B,GACA;EAAC;EAAY;EAAM;CAAQ,CAC5B,GAEM,IAAY,QAAc;EAC/B,IAAM,IAAiD,CAAC;EAKxD,OAHI,EAAM,kBACT,EAAO,mBAAmB,IAAa,SAAS,UAE1C;CACR,GAAG,CAAC,GAAY,EAAM,aAAa,CAAC,GAE9B,IAAiB,QAIrB,kBAFsB,IAAa,IAAQ,GAE3C;EACC,eAAe,EACd,OAAO,GAAG,EAAM,eAAe,UAAU,GACxC,OAAO,EAAM,KAAK,IAAI,IAExB;EACA,mBAAiB,GAAG,EAAM,GAAG,mBAAmB,EAAM,QAAQ;EAC9D,SAAS;EACT,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AG,GAAG,EAAuB,GAAG,EAAO,MAAM;IAErE,OACC,kBAAC,EAAY,UAAb;KAEC,OAAO;MACN,aAAa,EAAM,gBAAgB,IAAQ,IAAI;MAC/C,UAAU,EAAM,YAAY;KAC7B;KAEA,UAAA,kBAAC,GAAD;MACC,GAAI,EAAO;MACX,WACC,EAAO,MAAM,WAAW,kBAAkB,KAAA;MAE3C,aAAa,EAAM;MACnB,WAAW,EAAO,MAAM;MACxB,IAAI;MACE;MACN,OAAO,EAAO,MAAM;MACpB,UAAU,EAAK;MACf,SAAS,EAAM;MAEd,UAAA,EAAK,EAAO,MAAM,YAAY;KAC1B,CAAA;IACe,GArBhB,CAqBgB;GAExB,CAAC;GACD,kBAAC,EAAY,UAAb;IACC,OAAO;KACN,aAAa,EAAM,iBACf,EAAM,SAAS,UAAU,KAAK,IAC9B,EAAM,SAAS,UAAU;KAC7B,UAAU,EAAM,YAAY;IAC7B;IAEC,UAAA,EAAM,aACJ,EAAM,aACN,EAAM,YAKN;KACC,IAAI,GAAG,EAAM,GAAG,GAAG;KACnB;KACA,aAAa,EAAM;IACpB,CACD,IACC;GACkB,CAAA;EACrB,EAAA,CAAA,GAEH;GACC;GACA;GACA;GACA;GACA;GACA,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN;GACA;GACA;EACD,CACD;CACG,CAAA;AAEN;AAEA,EAAmB,cAAc"}
|
|
1
|
+
{"version":3,"file":"row.js","names":[],"sources":["../../../../../components/simple-data-table/private/row.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\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tSyntheticEvent,\n\tReactNode,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Checkbox from '../../checkbox';\nimport Radio from '../../radio';\n\nimport {\n\tSIMPLE_DATA_TABLE_ROW,\n\tSIMPLE_DATA_TABLE_ROW_ACTIONS,\n\tSIMPLE_DATA_TABLE_CELL,\n} from '../../../utilities/constants';\n\nimport InteractiveElement from '../interactive-element';\nimport type {\n\tSimpleDataTableAssistiveText,\n\tSimpleDataTableColumnConfig,\n\tSimpleDataTableItem,\n} from '../types';\nimport CellContext from './cell-context';\nimport TableContext from './table-context';\nimport useContextHelper from './context-helper';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst InteractiveCheckbox = InteractiveElement(\n\tCheckbox as any\n) as React.ComponentType<any>;\nconst InteractiveRadio = InteractiveElement(\n\tRadio as any\n) as React.ComponentType<any>;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nexport interface SimpleDataTableRowProps {\n\tassistiveText?: SimpleDataTableAssistiveText;\n\tcanSelectRows?: boolean | 'checkbox' | 'radio';\n\tclassName?: string;\n\tcolumns?: SimpleDataTableColumnConfig[];\n\tfixedLayout?: boolean;\n\tid: string;\n\tindex?: number;\n\titem: SimpleDataTableItem;\n\tonToggle?: (\n\t\titem: SimpleDataTableItem,\n\t\tselected: boolean,\n\t\tevent: SyntheticEvent\n\t) => void;\n\trowActions?: ReactNode;\n\t/** Whether the row's item is in the table's `selection` (matched by `id`) */\n\tisSelected?: boolean;\n\t/** Whether the row's item is in the table's `disabledSelection` (matched by `id`) */\n\tisDisabled?: boolean;\n\ttableId?: string;\n\trowIndex?: number;\n\tstacked?: boolean;\n}\n\n/**\n * Used internally, provides row rendering to the SimpleDataTable.\n */\nconst SimpleDataTableRow: React.FC<SimpleDataTableRowProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst selectRowCellContext = useMemo(\n\t\t() => ({\n\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\tcolumnIndex: 0,\n\t\t}),\n\t\t[props.rowIndex]\n\t);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tselectRowCellContext,\n\t\tprops.fixedLayout\n\t);\n\n\t// Selection is controlled: the checkbox or radio always renders the table's\n\t// `selection` prop (`checked` is always passed, never `defaultChecked`).\n\tconst isSelected = !!props.isSelected;\n\tconst isDisabled = !!props.isDisabled;\n\n\tconst { item, onToggle } = props;\n\tconst handleToggle = useCallback(\n\t\t(_e: SyntheticEvent, { checked }: { checked: boolean }) => {\n\t\t\t// A disabled row never requests a selection change.\n\t\t\tif (onToggle && !isDisabled) {\n\t\t\t\tonToggle(item, checked, _e);\n\t\t\t}\n\t\t},\n\t\t[isDisabled, item, onToggle]\n\t);\n\n\tconst ariaProps = useMemo(() => {\n\t\tconst result: { 'aria-selected'?: 'true' | 'false' } = {};\n\n\t\tif (props.canSelectRows) {\n\t\t\tresult['aria-selected'] = isSelected ? 'true' : 'false';\n\t\t}\n\t\treturn result;\n\t}, [isSelected, props.canSelectRows]);\n\n\tconst radioSelection = useMemo(() => {\n\t\t// Disabled rows are not registered for keyboard navigation.\n\t\tconst RadioComponent = isDisabled ? Radio : InteractiveRadio;\n\t\treturn (\n\t\t\t<RadioComponent\n\t\t\t\tassistiveText={{\n\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${Number(props.index) + 1}`,\n\t\t\t\t}}\n\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSSimpleDataTableHead-column-group-header-row-select`}\n\t\t\t\tchecked={isSelected}\n\t\t\t\tclassName=\"slds-m-right_x-small\"\n\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\tname={`${props.tableId}-SelectRow`}\n\t\t\t\tonChange={handleToggle}\n\t\t\t\tdisabled={isDisabled}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\thandleToggle,\n\t\tisSelected,\n\t\tisDisabled,\n\t\tprops.assistiveText?.selectRow,\n\t\tprops.id,\n\t\tprops.index,\n\t\tprops.tableId,\n\t]);\n\n\tconst checkboxSelection = useMemo(() => {\n\t\t// Disabled rows are not registered for keyboard navigation.\n\t\tconst CheckboxComponent = isDisabled ? Checkbox : InteractiveCheckbox;\n\t\treturn (\n\t\t\t<CheckboxComponent\n\t\t\t\tassistiveText={{\n\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${Number(props.index) + 1}`,\n\t\t\t\t}}\n\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSSimpleDataTableHead-column-group-header-row-select`}\n\t\t\t\tchecked={isSelected}\n\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\tname={`SelectRow${(props.index ?? 0) + 1}`}\n\t\t\t\tonChange={handleToggle}\n\t\t\t\tdisabled={isDisabled}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\thandleToggle,\n\t\tisSelected,\n\t\tisDisabled,\n\t\tprops.assistiveText?.selectRow,\n\t\tprops.id,\n\t\tprops.index,\n\t\tprops.tableId,\n\t]);\n\n\treturn (\n\t\t<tr\n\t\t\t{...ariaProps}\n\t\t\tclassName={classNames(props.className, {\n\t\t\t\t'slds-hint-parent': props.rowActions,\n\t\t\t\t'slds-is-selected': props.canSelectRows && isSelected,\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t>\n\t\t\t{useMemo(\n\t\t\t\t() => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{props.canSelectRows ? (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\trole={tableContext.isGrid ? 'gridcell' : undefined}\n\t\t\t\t\t\t\t\tclassName=\"slds-text-align_right\"\n\t\t\t\t\t\t\t\tdata-label={props.stacked ? 'Select Row' : undefined}\n\t\t\t\t\t\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\t\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\t\t\t\t\t\tref.focus();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CellContext.Provider value={selectRowCellContext}>\n\t\t\t\t\t\t\t\t\t{props.canSelectRows === 'radio'\n\t\t\t\t\t\t\t\t\t\t? radioSelection\n\t\t\t\t\t\t\t\t\t\t: checkboxSelection}\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{props.columns?.map((column, index) => {\n\t\t\t\t\t\t\tconst { Cell } = column;\n\t\t\t\t\t\t\tconst cellId = `${props.id}-${SIMPLE_DATA_TABLE_CELL}-${column.props.property}`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\t\t\tkey={cellId}\n\t\t\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows ? index + 1 : index,\n\t\t\t\t\t\t\t\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\t\t\t\t{...column.props}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\ttypeof column.props.label === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t? column.props.label\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\tcolumn.props.truncate ? 'slds-truncate' : undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\t\t\t\t\t\trowHeader={column.props.primaryColumn}\n\t\t\t\t\t\t\t\t\t\tid={cellId}\n\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\twidth={column.props.width}\n\t\t\t\t\t\t\t\t\t\theaderId={item.headerId}\n\t\t\t\t\t\t\t\t\t\tcolumns={props.columns}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t(item as Record<string, ReactNode>)[\n\t\t\t\t\t\t\t\t\t\t\t\tcolumn.props.property || ''\n\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</Cell>\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows\n\t\t\t\t\t\t\t\t\t? (props.columns?.length ?? 0) + 1\n\t\t\t\t\t\t\t\t\t: (props.columns?.length ?? 0),\n\t\t\t\t\t\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{props.rowActions\n\t\t\t\t\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\t\t\t\t\tprops.rowActions as React.ReactElement<{\n\t\t\t\t\t\t\t\t\t\t\tid?: string;\n\t\t\t\t\t\t\t\t\t\t\titem?: SimpleDataTableItem;\n\t\t\t\t\t\t\t\t\t\t\tfixedLayout?: boolean;\n\t\t\t\t\t\t\t\t\t\t}>,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tid: `${props.id}-${SIMPLE_DATA_TABLE_ROW_ACTIONS}`,\n\t\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\t\tfixedLayout: props.fixedLayout,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t: null}\n\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t\t[\n\t\t\t\t\thandleFocus,\n\t\t\t\t\thandleKeyDown,\n\t\t\t\t\thasFocus,\n\t\t\t\t\titem,\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tprops.canSelectRows,\n\t\t\t\t\tprops.columns,\n\t\t\t\t\tprops.fixedLayout,\n\t\t\t\t\tprops.id,\n\t\t\t\t\tprops.rowActions,\n\t\t\t\t\tprops.rowIndex,\n\t\t\t\t\tprops.stacked,\n\t\t\t\t\tselectRowCellContext,\n\t\t\t\t\tcheckboxSelection,\n\t\t\t\t\tradioSelection,\n\t\t\t\t]\n\t\t\t)}\n\t\t</tr>\n\t);\n};\n\nSimpleDataTableRow.displayName = SIMPLE_DATA_TABLE_ROW;\n\nexport default SimpleDataTableRow;\n"],"mappings":";;;;;;;;;;;AAgCA,IAAM,IAAsB,EAC3B,CACD,GACM,IAAmB,EACxB,CACD,GA8BM,KAAyD,MAAU;CACxE,IAAM,IAAe,EAAW,CAAY,GACtC,IAAuB,SACrB;EACN,UAAU,EAAM,YAAY;EAC5B,aAAa;CACd,IACA,CAAC,EAAM,QAAQ,CAChB,GACM,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,EAAM,WACP,GAIM,IAAa,CAAC,CAAC,EAAM,YACrB,IAAa,CAAC,CAAC,EAAM,YAErB,EAAE,SAAM,gBAAa,GACrB,IAAe,GACnB,GAAoB,EAAE,iBAAoC;EAE1D,AAAI,KAAY,CAAC,KAChB,EAAS,GAAM,GAAS,CAAE;CAE5B,GACA;EAAC;EAAY;EAAM;CAAQ,CAC5B,GAEM,IAAY,QAAc;EAC/B,IAAM,IAAiD,CAAC;EAKxD,OAHI,EAAM,kBACT,EAAO,mBAAmB,IAAa,SAAS,UAE1C;CACR,GAAG,CAAC,GAAY,EAAM,aAAa,CAAC,GAE9B,IAAiB,QAIrB,kBAFsB,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,UAAb;KAAsB,OAAO;KAC3B,UAAA,EAAM,kBAAkB,UACtB,IACA;IACkB,CAAA;GACnB,CAAA,IACD;GACH,EAAM,SAAS,KAAK,GAAQ,MAAU;IACtC,IAAM,EAAE,YAAS,GACX,IAAS,GAAG,EAAM,GAAG,GAAG,EAAuB,GAAG,EAAO,MAAM;IAErE,OACC,kBAAC,EAAY,UAAb;KAEC,OAAO;MACN,aAAa,EAAM,gBAAgB,IAAQ,IAAI;MAC/C,UAAU,EAAM,YAAY;KAC7B;KAEA,UAAA,kBAAC,GAAD;MACC,GAAI,EAAO;MACX,OACC,OAAO,EAAO,MAAM,SAAU,WAC3B,EAAO,MAAM,QACb,KAAA;MAEJ,WACC,EAAO,MAAM,WAAW,kBAAkB,KAAA;MAE3C,aAAa,EAAM;MACnB,WAAW,EAAO,MAAM;MACxB,IAAI;MACE;MACN,OAAO,EAAO,MAAM;MACpB,UAAU,EAAK;MACf,SAAS,EAAM;MAGb,UAAA,EACA,EAAO,MAAM,YAAY;KAGtB,CAAA;IACe,GA9BhB,CA8BgB;GAExB,CAAC;GACD,kBAAC,EAAY,UAAb;IACC,OAAO;KACN,aAAa,EAAM,iBACf,EAAM,SAAS,UAAU,KAAK,IAC9B,EAAM,SAAS,UAAU;KAC7B,UAAU,EAAM,YAAY;IAC7B;IAEC,UAAA,EAAM,aACJ,EAAM,aACN,EAAM,YAKN;KACC,IAAI,GAAG,EAAM,GAAG,GAAG;KACnB;KACA,aAAa,EAAM;IACpB,CACD,IACC;GACkB,CAAA;EACrB,EAAA,CAAA,GAEH;GACC;GACA;GACA;GACA;GACA;GACA,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN;GACA;GACA;EACD,CACD;CACG,CAAA;AAEN;AAEA,EAAmB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-context.js","names":[],"sources":["../../../../../components/simple-data-table/private/table-context.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface ActiveCell {\n\trowIndex: number;\n\tcolumnIndex: number;\n}\n\nexport interface TableContextValue {\n\tactiveCell: ActiveCell;\n\tactiveElement: string | null;\n\tmode: 'navigation' | 'actionable' | null;\n\ttableHasFocus: boolean;\n\tchangeActiveCell: (rowIndex: number, columnIndex: number) => void;\n\tchangeActiveElement: (elementId: string | null) => void;\n\thandleKeyDown: (event: React.KeyboardEvent) => void;\n\tregisterInteractiveElement: (\n\t\trowIndex: number,\n\t\tcolumnIndex: number,\n\t\telementId: string\n\t) => void;\n\tallowKeyboardNavigation: boolean;\n\tsetAllowKeyboardNavigation: (allow: boolean) => void;\n}\n\nconst defaultValue: TableContextValue = {\n\tactiveCell: { rowIndex: 0, columnIndex: 0 },\n\tactiveElement: null,\n\tmode: null,\n\ttableHasFocus: false,\n\tchangeActiveCell: () => {},\n\tchangeActiveElement: () => {},\n\thandleKeyDown: () => {},\n\tregisterInteractiveElement: () => {},\n\tallowKeyboardNavigation: true,\n\tsetAllowKeyboardNavigation: () => {},\n};\n\nconst TableContext = React.createContext<TableContextValue>(defaultValue);\n\nexport default TableContext;\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"table-context.js","names":[],"sources":["../../../../../components/simple-data-table/private/table-context.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface ActiveCell {\n\trowIndex: number;\n\tcolumnIndex: number;\n}\n\nexport interface TableContextValue {\n\t/** The table has `role=\"grid\"` (`fixedLayout` with `keyboardNavigation`) */\n\tisGrid: boolean;\n\tactiveCell: ActiveCell;\n\tactiveElement: string | null;\n\tmode: 'navigation' | 'actionable' | null;\n\ttableHasFocus: boolean;\n\tchangeActiveCell: (rowIndex: number, columnIndex: number) => void;\n\tchangeActiveElement: (elementId: string | null) => void;\n\thandleKeyDown: (event: React.KeyboardEvent) => void;\n\tregisterInteractiveElement: (\n\t\trowIndex: number,\n\t\tcolumnIndex: number,\n\t\telementId: string\n\t) => void;\n\tallowKeyboardNavigation: boolean;\n\tsetAllowKeyboardNavigation: (allow: boolean) => void;\n}\n\nconst defaultValue: TableContextValue = {\n\tisGrid: false,\n\tactiveCell: { rowIndex: 0, columnIndex: 0 },\n\tactiveElement: null,\n\tmode: null,\n\ttableHasFocus: false,\n\tchangeActiveCell: () => {},\n\tchangeActiveElement: () => {},\n\thandleKeyDown: () => {},\n\tregisterInteractiveElement: () => {},\n\tallowKeyboardNavigation: true,\n\tsetAllowKeyboardNavigation: () => {},\n};\n\nconst TableContext = React.createContext<TableContextValue>(defaultValue);\n\nexport default TableContext;\n"],"mappings":";;AAwCA,IAAM,IAAe,EAAM,cAAiC;CAb3D,QAAQ;CACR,YAAY;EAAE,UAAU;EAAG,aAAa;CAAE;CAC1C,eAAe;CACf,MAAM;CACN,eAAe;CACf,wBAAwB,CAAC;CACzB,2BAA2B,CAAC;CAC5B,qBAAqB,CAAC;CACtB,kCAAkC,CAAC;CACnC,yBAAyB;CACzB,kCAAkC,CAAC;AAGwB,CAAY"}
|
|
@@ -14,7 +14,10 @@ var d = o(n), f = ({ assistiveText: e = { icon: "Actions" }, noHint: n = !1, opt
|
|
|
14
14
|
let v = s(i), y = s(r), { tabIndex: b, hasFocus: x, handleFocus: S, handleKeyDown: C } = a(v, y, _), w = (e) => {
|
|
15
15
|
t.trap(e);
|
|
16
16
|
}, T = (e, t) => {
|
|
17
|
-
u(h) && m && h(
|
|
17
|
+
u(h) && m && h(e, {
|
|
18
|
+
item: m,
|
|
19
|
+
option: t.option
|
|
20
|
+
}), g?.props.onSelect?.(e, t);
|
|
18
21
|
}, E = {
|
|
19
22
|
align: "right",
|
|
20
23
|
buttonClassName: "slds-button_icon-x-small",
|
|
@@ -27,13 +30,11 @@ var d = o(n), f = ({ assistiveText: e = { icon: "Actions" }, noHint: n = !1, opt
|
|
|
27
30
|
className: f,
|
|
28
31
|
options: o,
|
|
29
32
|
hint: !n,
|
|
30
|
-
id: p
|
|
31
|
-
|
|
32
|
-
return D = {
|
|
33
|
-
...E,
|
|
34
|
-
...D,
|
|
33
|
+
id: p,
|
|
34
|
+
...g?.props,
|
|
35
35
|
onSelect: T
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ l("td", {
|
|
37
38
|
className: c({ "slds-has-focus": x }),
|
|
38
39
|
"data-label": "Actions",
|
|
39
40
|
onClick: w,
|
|
@@ -43,9 +44,9 @@ var d = o(n), f = ({ assistiveText: e = { icon: "Actions" }, noHint: n = !1, opt
|
|
|
43
44
|
ref: (e) => {
|
|
44
45
|
e && x && e.focus();
|
|
45
46
|
},
|
|
46
|
-
role:
|
|
47
|
+
role: v.isGrid ? "gridcell" : void 0,
|
|
47
48
|
tabIndex: b,
|
|
48
|
-
children: /* @__PURE__ */ l(d, { ...
|
|
49
|
+
children: /* @__PURE__ */ l(d, { ...E })
|
|
49
50
|
});
|
|
50
51
|
};
|
|
51
52
|
f.displayName = e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row-actions.js","names":[],"sources":["../../../../components/simple-data-table/row-actions.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
|
|
1
|
+
{"version":3,"file":"row-actions.js","names":[],"sources":["../../../../components/simple-data-table/row-actions.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 } from 'react';\nimport classNames from 'classnames';\nimport isFunction from 'lodash.isfunction';\n\nimport Dropdown, { type MenuDropdownProps } from '../menu-dropdown';\n\nimport EventUtil from '../../utilities/event';\n\nimport InteractiveElement from './interactive-element';\nimport CellContext from './private/cell-context';\nimport TableContext from './private/table-context';\nimport useContextHelper from './private/context-helper';\n\nimport { SIMPLE_DATA_TABLE_ROW_ACTIONS } from '../../utilities/constants';\nimport type {\n\tSimpleDataTableItem,\n\tSimpleDataTableRowActionsProps,\n} from './types';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst InteractiveDropdown = InteractiveElement(\n\tDropdown as any\n) as React.ComponentType<any>;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nexport type { SimpleDataTableRowActionsProps };\n\n/** Props the table row injects. They aren't part of the public props. */\ninterface RowActionsInjectedProps {\n\t/** HTML ID for the actions menu, unique per row */\n\tid?: string;\n\t/** The row's item */\n\titem?: SimpleDataTableItem;\n\t/** Fixed layout mode */\n\tfixedLayout?: boolean;\n}\n\n/**\n * RowActions provide a mechanism for defining a menu to display alongside\n * each row in the SimpleDataTable.\n */\nconst SimpleDataTableRowActions: React.FC<\n\tSimpleDataTableRowActionsProps & RowActionsInjectedProps\n> = ({\n\tassistiveText = { icon: 'Actions' },\n\tnoHint = false,\n\toptions = [],\n\tclassName,\n\tid,\n\titem,\n\tonAction,\n\tdropdown,\n\tfixedLayout,\n}) => {\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\tfixedLayout\n\t);\n\n\tconst handleClick = (e: React.MouseEvent) => {\n\t\tEventUtil.trap(e);\n\t};\n\n\tconst handleSelect: NonNullable<MenuDropdownProps['onSelect']> = (\n\t\tevent,\n\t\tdata\n\t) => {\n\t\tif (isFunction(onAction) && item) {\n\t\t\tonAction(event as React.SyntheticEvent, { item, option: data.option });\n\t\t}\n\t\tdropdown?.props.onSelect?.(event, data);\n\t};\n\n\tconst defaultDropdownProps = {\n\t\talign: 'right',\n\t\tbuttonClassName: 'slds-button_icon-x-small',\n\t\tbuttonVariant: 'icon',\n\t\ticonCategory: 'utility',\n\t\ticonName: 'down',\n\t\ticonSize: 'small',\n\t\ticonVariant: 'border-filled',\n\t\tassistiveText,\n\t\tclassName,\n\t\toptions,\n\t\thint: !noHint,\n\t\tid,\n\t};\n\n\tconst dropdownProps = {\n\t\t...defaultDropdownProps,\n\t\t...dropdown?.props,\n\t\tonSelect: handleSelect,\n\t};\n\n\treturn (\n\t\t<td\n\t\t\tclassName={classNames({ 'slds-has-focus': hasFocus })}\n\t\t\tdata-label=\"Actions\"\n\t\t\tonClick={handleClick}\n\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tref={(ref) => {\n\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t}}\n\t\t\trole={tableContext.isGrid ? 'gridcell' : undefined}\n\t\t\ttabIndex={tabIndex}\n\t\t>\n\t\t\t<InteractiveDropdown {...dropdownProps} />\n\t\t</td>\n\t);\n};\n\nSimpleDataTableRowActions.displayName = SIMPLE_DATA_TABLE_ROW_ACTIONS;\n\nexport default SimpleDataTableRowActions as React.FC<SimpleDataTableRowActionsProps>;\n"],"mappings":";;;;;;;;;;;;AAuBA,IAAM,IAAsB,EAC3B,CACD,GAmBM,KAED,EACJ,mBAAgB,EAAE,MAAM,UAAU,GAClC,YAAS,IACT,aAAU,CAAC,GACX,cACA,OACA,SACA,aACA,aACA,qBACK;CACL,IAAM,IAAe,EAAW,CAAY,GACtC,IAAc,EAAW,CAAW,GACpC,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,CACD,GAEM,KAAe,MAAwB;EAC5C,EAAU,KAAK,CAAC;CACjB,GAEM,KACL,GACA,MACI;EAIJ,AAHI,EAAW,CAAQ,KAAK,KAC3B,EAAS,GAA+B;GAAE;GAAM,QAAQ,EAAK;EAAO,CAAC,GAEtE,GAAU,MAAM,WAAW,GAAO,CAAI;CACvC,GAiBM,IAAgB;EAdrB,OAAO;EACP,iBAAiB;EACjB,eAAe;EACf,cAAc;EACd,UAAU;EACV,UAAU;EACV,aAAa;EACb;EACA;EACA;EACA,MAAM,CAAC;EACP;EAKA,GAAG,GAAU;EACb,UAAU;CACX;CAEA,OACC,kBAAC,MAAD;EACC,WAAW,EAAW,EAAE,kBAAkB,EAAS,CAAC;EACpD,cAAW;EACX,SAAS;EACT,OAAO,EAAE,OAAO,UAAU;EAC1B,SAAS;EACT,WAAW;EACX,MAAM,MAAQ;GACb,AAAI,KAAO,KACV,EAAI,MAAM;EAEZ;EACA,MAAM,EAAa,SAAS,aAAa,KAAA;EAC/B;EAEV,UAAA,kBAAC,GAAD,EAAqB,GAAI,EAAgB,CAAA;CACtC,CAAA;AAEN;AAEA,EAA0B,cAAc"}
|
|
@@ -4,7 +4,7 @@ import t from "../../utilities/warning/deprecated-property.js";
|
|
|
4
4
|
var n = function() {};
|
|
5
5
|
process.env.NODE_ENV !== "production" && (n = function(n, r = {}, i) {
|
|
6
6
|
let a = e(i);
|
|
7
|
-
t(n, r.containerClassName, "containerClassName", "className", a("className")), t(n, r.containerStyle, "containerStyle", "style", a("style"));
|
|
7
|
+
t(n, r.containerClassName, "containerClassName", "className", a("className")), t(n, r.containerStyle, "containerStyle", "style", a("style")), t(n, r.isInline, "isInline", "placement=\"inline\"", a("placement")), t(n, r.isInput, "isInput", "placement=\"input\"", a("placement"));
|
|
8
8
|
});
|
|
9
9
|
var r = n;
|
|
10
10
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/spinner/check-props.js"],"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/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props = {}, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.containerClassName,\n\t\t\t'containerClassName',\n\t\t\t'className',\n\t\t\tcreateDocUrl('className')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.containerStyle,\n\t\t\t'containerStyle',\n\t\t\t'style',\n\t\t\tcreateDocUrl('style')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;AAOA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,IAAQ,CAAC,GAAG,GAAS;CACxE,IAAM,IAAe,EAAkB,CAAO;
|
|
1
|
+
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/spinner/check-props.js"],"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/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props = {}, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.containerClassName,\n\t\t\t'containerClassName',\n\t\t\t'className',\n\t\t\tcreateDocUrl('className')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.containerStyle,\n\t\t\t'containerStyle',\n\t\t\t'style',\n\t\t\tcreateDocUrl('style')\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.isInline,\n\t\t\t'isInline',\n\t\t\t'placement=\"inline\"',\n\t\t\tcreateDocUrl('placement')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.isInput,\n\t\t\t'isInput',\n\t\t\t'placement=\"input\"',\n\t\t\tcreateDocUrl('placement')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;AAOA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,IAAQ,CAAC,GAAG,GAAS;CACxE,IAAM,IAAe,EAAkB,CAAO;CAwB9C,AAtBA,EACC,GACA,EAAM,oBACN,sBACA,aACA,EAAa,WAAW,CACzB,GACA,EACC,GACA,EAAM,gBACN,kBACA,SACA,EAAa,OAAO,CACrB,GAEA,EACC,GACA,EAAM,UACN,YACA,wBACA,EAAa,WAAW,CACzB,GACA,EACC,GACA,EAAM,SACN,WACA,uBACA,EAAa,WAAW,CACzB;AACD;AAGD,IAAA,IAAe"}
|
|
@@ -5,48 +5,51 @@ import { forwardRef as r, useEffect as i } from "react";
|
|
|
5
5
|
import a from "classnames";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region components/spinner/index.tsx
|
|
8
|
-
var c = { label: "Loading..." }, l = r((
|
|
8
|
+
var c = { label: "Loading..." }, l = r((r, l) => {
|
|
9
|
+
let { assistiveText: u = c, className: d, classNameSpinner: f, containerClassName: p, containerStyle: m, hasContainer: h = !0, id: g, isDelayed: _ = !1, isInline: v, isInput: y, placement: b, size: x = "medium", style: S, variant: C = "base" } = r;
|
|
9
10
|
i(() => {
|
|
10
11
|
t(e, {
|
|
11
|
-
containerClassName:
|
|
12
|
-
containerStyle:
|
|
12
|
+
containerClassName: p,
|
|
13
|
+
containerStyle: m,
|
|
14
|
+
isInline: v,
|
|
15
|
+
isInput: y
|
|
13
16
|
}, n);
|
|
14
17
|
}, []);
|
|
15
|
-
let
|
|
18
|
+
let w = b ?? (y ? "input" : v ? "inline" : "container"), T = {
|
|
16
19
|
...c,
|
|
17
|
-
...
|
|
18
|
-
}.label,
|
|
19
|
-
...
|
|
20
|
-
...
|
|
21
|
-
} :
|
|
22
|
-
"slds-spinner_inline":
|
|
23
|
-
"slds-input__spinner":
|
|
24
|
-
"slds-spinner_brand":
|
|
25
|
-
"slds-spinner_inverse":
|
|
26
|
-
"slds-spinner_delayed":
|
|
27
|
-
[`slds-spinner_${
|
|
28
|
-
},
|
|
20
|
+
...u
|
|
21
|
+
}.label, E = h ? a(p, d) : d, D = h ? {
|
|
22
|
+
...m,
|
|
23
|
+
...S
|
|
24
|
+
} : S, O = a("slds-spinner", {
|
|
25
|
+
"slds-spinner_inline": w === "inline",
|
|
26
|
+
"slds-input__spinner": w === "input",
|
|
27
|
+
"slds-spinner_brand": C === "brand",
|
|
28
|
+
"slds-spinner_inverse": C === "inverse",
|
|
29
|
+
"slds-spinner_delayed": _,
|
|
30
|
+
[`slds-spinner_${x}`]: x
|
|
31
|
+
}, f, h ? void 0 : E), k = /* @__PURE__ */ s("div", {
|
|
29
32
|
"aria-hidden": "false",
|
|
30
|
-
className:
|
|
31
|
-
id:
|
|
32
|
-
ref:
|
|
33
|
+
className: O,
|
|
34
|
+
id: g,
|
|
35
|
+
ref: h ? void 0 : l,
|
|
33
36
|
role: "status",
|
|
34
|
-
style:
|
|
37
|
+
style: h ? void 0 : D,
|
|
35
38
|
children: [
|
|
36
|
-
|
|
39
|
+
T && /* @__PURE__ */ o("span", {
|
|
37
40
|
className: "slds-assistive-text",
|
|
38
|
-
children:
|
|
41
|
+
children: T
|
|
39
42
|
}),
|
|
40
43
|
/* @__PURE__ */ o("div", { className: "slds-spinner__dot-a" }),
|
|
41
44
|
/* @__PURE__ */ o("div", { className: "slds-spinner__dot-b" })
|
|
42
45
|
]
|
|
43
46
|
});
|
|
44
|
-
return
|
|
45
|
-
className: a(
|
|
46
|
-
ref:
|
|
47
|
-
style:
|
|
48
|
-
children:
|
|
49
|
-
}) :
|
|
47
|
+
return h ? /* @__PURE__ */ o("div", {
|
|
48
|
+
className: a(E, "slds-spinner_container"),
|
|
49
|
+
ref: l,
|
|
50
|
+
style: D,
|
|
51
|
+
children: k
|
|
52
|
+
}) : k;
|
|
50
53
|
});
|
|
51
54
|
l.displayName = e;
|
|
52
55
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/spinner/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 { forwardRef, useEffect, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { SPINNER } from '../../utilities/constants';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Spinner size options\n */\nexport type SpinnerSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Spinner color variant\n */\nexport type SpinnerVariant = 'base' | 'brand' | 'inverse';\n\n/**\n * Assistive text for Spinner\n */\nexport interface SpinnerAssistiveText {\n\t/** Text read by screen readers */\n\tlabel?: string;\n}\n\n/**\n * Props for the Spinner component\n */\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/spinner/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 { forwardRef, useEffect, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { SPINNER } from '../../utilities/constants';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Spinner size options\n */\nexport type SpinnerSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Spinner color variant\n */\nexport type SpinnerVariant = 'base' | 'brand' | 'inverse';\n\n/**\n * Where the spinner sits: in a container (`container`), inline in the document flow\n * (`inline`), or inside an input field (`input`).\n */\nexport type SpinnerPlacement = 'container' | 'inline' | 'input';\n\n/**\n * Assistive text for Spinner\n */\nexport interface SpinnerAssistiveText {\n\t/** Text read by screen readers */\n\tlabel?: string;\n}\n\n/**\n * Props for the Spinner component\n */\ninterface SpinnerBaseProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: SpinnerAssistiveText;\n\t/**\n\t * CSS classes for the root element: the `.slds-spinner_container` div, or the\n\t * `.slds-spinner` div when `hasContainer` is `false`.\n\t */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the `.slds-spinner` div */\n\tclassNameSpinner?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `className`, which lands on the container when `hasContainer` is `true`. */\n\tcontainerClassName?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `style`, which lands on the container when `hasContainer` is `true`. */\n\tcontainerStyle?: CSSProperties;\n\t/** Render inside a container div */\n\thasContainer?: boolean;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Add 300ms delay before showing */\n\tisDelayed?: boolean;\n\t/** Size of the spinner */\n\tsize?: SpinnerSize;\n\t/** Styles for the root element (see `className`) */\n\tstyle?: CSSProperties;\n\t/** Color variant */\n\tvariant?: SpinnerVariant;\n}\n\n/** Where the spinner sits. Replaces `isInline` and `isInput`. */\ninterface SpinnerPlacementProps {\n\t/** Where the spinner sits. Defaults to `container`. */\n\tplacement?: SpinnerPlacement;\n\tisInline?: never;\n\tisInput?: never;\n}\n\n/** @deprecated Use `placement=\"inline\"`. */\ninterface SpinnerInlineProps {\n\t/** @deprecated Use `placement=\"inline\"`. */\n\tisInline?: boolean;\n\tisInput?: never;\n\tplacement?: never;\n}\n\n/** @deprecated Use `placement=\"input\"`. */\ninterface SpinnerInputProps {\n\t/** @deprecated Use `placement=\"input\"`. */\n\tisInput?: boolean;\n\tisInline?: never;\n\tplacement?: never;\n}\n\n/**\n * Props for the Spinner component. A spinner is in one place at a time, so\n * `placement` replaces the exclusive `isInline` and `isInput` flags.\n */\nexport type SpinnerProps = SpinnerBaseProps &\n\t(SpinnerPlacementProps | SpinnerInlineProps | SpinnerInputProps);\n\nconst defaultAssistiveText: SpinnerAssistiveText = { label: 'Loading...' };\n\n/**\n * Spinners are CSS loading indicators that should be shown when retrieving data\n * or performing slow computations.\n */\nconst Spinner = forwardRef<HTMLDivElement, SpinnerProps>((props, ref) => {\n\tconst {\n\t\tassistiveText = defaultAssistiveText,\n\t\tclassName,\n\t\tclassNameSpinner,\n\t\tcontainerClassName,\n\t\tcontainerStyle,\n\t\thasContainer = true,\n\t\tid,\n\t\tisDelayed = false,\n\t\tisInline: deprecatedIsInline,\n\t\tisInput: deprecatedIsInput,\n\t\tplacement: propPlacement,\n\t\tsize = 'medium',\n\t\tstyle,\n\t\tvariant = 'base',\n\t} = props;\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tSPINNER,\n\t\t\t{\n\t\t\t\tcontainerClassName,\n\t\t\t\tcontainerStyle,\n\t\t\t\tisInline: deprecatedIsInline,\n\t\t\t\tisInput: deprecatedIsInput,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []); // Only run on mount\n\n\t// `isInline` and `isInput` are the deprecated spellings of `placement`\n\tconst placement =\n\t\tpropPlacement ??\n\t\t(deprecatedIsInput ? 'input' : deprecatedIsInline ? 'inline' : 'container');\n\n\tconst mergedAssistiveText = {\n\t\t...defaultAssistiveText,\n\t\t...assistiveText,\n\t}.label;\n\n\t// The deprecated container props only ever applied to the container\n\tconst rootClassName = hasContainer\n\t\t? classNames(containerClassName, className)\n\t\t: className;\n\tconst rootStyle = hasContainer ? { ...containerStyle, ...style } : style;\n\n\tconst spinnerClassName = classNames(\n\t\t'slds-spinner',\n\t\t{\n\t\t\t'slds-spinner_inline': placement === 'inline',\n\t\t\t'slds-input__spinner': placement === 'input',\n\t\t\t'slds-spinner_brand': variant === 'brand',\n\t\t\t'slds-spinner_inverse': variant === 'inverse',\n\t\t\t'slds-spinner_delayed': isDelayed,\n\t\t\t[`slds-spinner_${size}`]: size,\n\t\t},\n\t\tclassNameSpinner,\n\t\thasContainer ? undefined : rootClassName\n\t);\n\n\tconst spinner = (\n\t\t<div\n\t\t\taria-hidden=\"false\"\n\t\t\tclassName={spinnerClassName}\n\t\t\tid={id}\n\t\t\tref={hasContainer ? undefined : ref}\n\t\t\trole=\"status\"\n\t\t\tstyle={hasContainer ? undefined : rootStyle}\n\t\t>\n\t\t\t{mergedAssistiveText && (\n\t\t\t\t<span className=\"slds-assistive-text\">{mergedAssistiveText}</span>\n\t\t\t)}\n\t\t\t<div className=\"slds-spinner__dot-a\" />\n\t\t\t<div className=\"slds-spinner__dot-b\" />\n\t\t</div>\n\t);\n\n\tif (hasContainer) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(rootClassName, 'slds-spinner_container')}\n\t\t\t\tref={ref}\n\t\t\t\tstyle={rootStyle}\n\t\t\t>\n\t\t\t\t{spinner}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn spinner;\n});\n\nSpinner.displayName = SPINNER;\n\nexport default Spinner;\n"],"mappings":";;;;;;;AA+FA,IAAM,IAA6C,EAAE,OAAO,aAAa,GAMnE,IAAU,GAA0C,GAAO,MAAQ;CACxE,IAAM,EACL,mBAAgB,GAChB,cACA,qBACA,uBACA,mBACA,kBAAe,IACf,OACA,eAAY,IACZ,UAAU,GACV,SAAS,GACT,WAAW,GACX,UAAO,UACP,UACA,aAAU,WACP;CACJ,QAAgB;EACf,EACC,GACA;GACC;GACA;GACA,UAAU;GACV,SAAS;EACV,GACA,CACD;CAED,GAAG,CAAC,CAAC;CAGL,IAAM,IACL,MACC,IAAoB,UAAU,IAAqB,WAAW,cAE1D,IAAsB;EAC3B,GAAG;EACH,GAAG;CACJ,EAAE,OAGI,IAAgB,IACnB,EAAW,GAAoB,CAAS,IACxC,GACG,IAAY,IAAe;EAAE,GAAG;EAAgB,GAAG;CAAM,IAAI,GAE7D,IAAmB,EACxB,gBACA;EACC,uBAAuB,MAAc;EACrC,uBAAuB,MAAc;EACrC,sBAAsB,MAAY;EAClC,wBAAwB,MAAY;EACpC,wBAAwB;GACvB,gBAAgB,MAAS;CAC3B,GACA,GACA,IAAe,KAAA,IAAY,CAC5B,GAEM,IACL,kBAAC,OAAD;EACC,eAAY;EACZ,WAAW;EACP;EACJ,KAAK,IAAe,KAAA,IAAY;EAChC,MAAK;EACL,OAAO,IAAe,KAAA,IAAY;EANnC,UAAA;GAQE,KACA,kBAAC,QAAD;IAAM,WAAU;IAAuB,UAAA;GAA0B,CAAA;GAElE,kBAAC,OAAD,EAAK,WAAU,sBAAuB,CAAA;GACtC,kBAAC,OAAD,EAAK,WAAU,sBAAuB,CAAA;EAClC;;CAeN,OAZI,IAEF,kBAAC,OAAD;EACC,WAAW,EAAW,GAAe,wBAAwB;EACxD;EACL,OAAO;EAEN,UAAA;CACG,CAAA,IAIA;AACR,CAAC;AAED,EAAQ,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","names":[],"sources":["../../../../components/split-view/header.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 from 'react';\nimport classNames from 'classnames';\nimport PageHeader, { type PageHeaderProps } from '../page-header';\n\nimport { SPLIT_VIEW_HEADER } from '../../utilities/constants';\n\
|
|
1
|
+
{"version":3,"file":"header.js","names":[],"sources":["../../../../components/split-view/header.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 from 'react';\nimport classNames from 'classnames';\nimport PageHeader, { type PageHeaderProps } from '../page-header';\n\nimport { SPLIT_VIEW_HEADER } from '../../utilities/constants';\n\n/** The Split View Header takes the same properties as `PageHeader`. */\nexport type SplitViewHeaderProps = PageHeaderProps;\n\n/**\n * The Split View Header takes the same properties as the [PageHeader](https://react.lightningdesignsystem.com/components/page-headers/) component.\n */\nconst SplitViewHeader = ({\n\tclassName,\n\t...rest\n}: SplitViewHeaderProps): React.ReactElement => (\n\t<PageHeader\n\t\tclassName={classNames(\n\t\t\t'slds-split-view__header slds-has-bottom-magnet',\n\t\t\tclassName\n\t\t)}\n\t\t{...rest}\n\t/>\n);\n\nSplitViewHeader.displayName = SPLIT_VIEW_HEADER;\n\nexport default SplitViewHeader;\n"],"mappings":";;;;;;AAeA,IAAM,KAAmB,EACxB,cACA,GAAG,QAEH,kBAAC,GAAD;CACC,WAAW,EACV,kDACA,CACD;CACA,GAAI;AACJ,CAAA;AAGF,EAAgB,cAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SPLIT_VIEW_LISTBOX as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
2
|
+
import t from "../icon/index.js";
|
|
3
|
+
import n from "../../utilities/event.js";
|
|
4
4
|
import r from "./component.js";
|
|
5
5
|
import i from "./private/list-item-content.js";
|
|
6
6
|
import a from "./private/list-item-with-content.js";
|
|
@@ -70,10 +70,10 @@ var f = Object.freeze({
|
|
|
70
70
|
}
|
|
71
71
|
handleKeyDown(e) {
|
|
72
72
|
if (this.props.multiple && e.key === "a" && e.ctrlKey) {
|
|
73
|
-
|
|
74
|
-
let { options:
|
|
75
|
-
|
|
76
|
-
} else e.key === "ArrowUp" ? (
|
|
73
|
+
n.trap(e);
|
|
74
|
+
let { options: t } = this.props;
|
|
75
|
+
t.length > 0 && t.every((e) => this.isSelected(e)) ? this.deselectAllListItems(e) : this.selectAllListItems(e);
|
|
76
|
+
} else e.key === "ArrowUp" ? (n.trap(e), this.moveToPreviousItem(e)) : e.key === "ArrowDown" && (n.trap(e), this.moveToNextItem(e));
|
|
77
77
|
}
|
|
78
78
|
moveToNextItem(e) {
|
|
79
79
|
let t = this.state.currentFocusedListItem.index === this.props.options.length - 1 ? 0 : this.state.currentFocusedListItem.index + 1;
|
|
@@ -124,7 +124,7 @@ var f = Object.freeze({
|
|
|
124
124
|
this.selectListItem(t, e), this.focusItem(t);
|
|
125
125
|
}
|
|
126
126
|
sortDirection() {
|
|
127
|
-
return this.props.sortDirection ? /* @__PURE__ */ u(
|
|
127
|
+
return this.props.sortDirection ? /* @__PURE__ */ u(t, {
|
|
128
128
|
category: "utility",
|
|
129
129
|
name: this.props.sortDirection === f.DOWN ? "arrowdown" : "arrowup",
|
|
130
130
|
size: "xx-small",
|
|
@@ -138,7 +138,7 @@ var f = Object.freeze({
|
|
|
138
138
|
href: "#",
|
|
139
139
|
role: "button",
|
|
140
140
|
className: "slds-split-view__list-header slds-grid slds-text-link_reset",
|
|
141
|
-
onClick:
|
|
141
|
+
onClick: n.trappedHandler(this.props.events.onSort),
|
|
142
142
|
children: e
|
|
143
143
|
}) : /* @__PURE__ */ u("div", {
|
|
144
144
|
style: { borderTop: "0" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.js","names":[],"sources":["../../../../components/split-view/listbox.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/* eslint-disable class-methods-use-this */\n\nimport React, { type ReactNode, type SyntheticEvent } from 'react';\nimport classNames from 'classnames';\nimport eventUtil from '../../utilities/event';\n\nimport { SPLIT_VIEW_LISTBOX } from '../../utilities/constants';\n\nimport Icon from '../icon';\nimport SplitViewListItemContent, {\n\ttype SplitViewListItem,\n} from './private/list-item-content';\nimport listItemWithContent from './private/list-item-with-content';\nimport checkProps, { checkSelectionProps } from './listbox-check-props';\nimport componentDoc from './component.json';\n\nexport const SORT_OPTIONS = Object.freeze({\n\tUP: 'up',\n\tDOWN: 'down',\n});\n\nexport interface SplitViewListboxSortAssistiveText {\n\tsortedBy?: string;\n\tdescending?: string;\n\tascending?: string;\n}\n\nexport interface SplitViewListboxAssistiveText {\n\tlist?: string;\n\tsort?: SplitViewListboxSortAssistiveText;\n\tunreadItem?: string;\n}\n\nexport interface SplitViewListboxSelectData<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/** The requested selection, as item ids. Pass it back as `selection`. */\n\tselection: SplitViewListboxItemId[];\n\t/** The items of the requested selection */\n\tselectedItems: T[];\n\t/** The item that was clicked, or the range anchor for select-all (`null` when deselecting all) */\n\titem: T | null;\n}\n\nexport interface SplitViewListboxEvents<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/**\n\t * Called when the selection is asked to change (click, meta/shift-click, Ctrl+A).\n\t * `data.selection` is the requested selection; update `selection` to apply it.\n\t */\n\tonSelect: (\n\t\tevent: SyntheticEvent,\n\t\tdata: SplitViewListboxSelectData<T>\n\t) => void;\n\t/**\n\t * Called when the list is sorted.\n\t */\n\tonSort?: (event: SyntheticEvent) => void;\n}\n\nexport interface SplitViewListboxLabels {\n\t/** This is the header of the list. */\n\theader?: string;\n}\n\n/** An item's `id`, as used in `selection` and `unread` */\nexport type SplitViewListboxItemId = string | number;\n\n/**\n * Fields read by the default list item. Items with other fields are typed by\n * the `SplitViewListbox` type parameter, which flows to `renderListItem`, `listItem` and `onSelect`.\n */\nexport type SplitViewListboxItem = SplitViewListItem & {\n\t/** Unique id of the item, matched against `selection` and `unread` */\n\tid: SplitViewListboxItemId;\n};\n\n/**\n * Data passed to `renderListItem`\n */\nexport interface SplitViewListboxRenderListItemData<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/** Whether the item has keyboard focus (is the list's tab stop) */\n\tisFocused: boolean;\n\t/** Whether the item is in `selection` */\n\tisSelected: boolean;\n\t/** Whether the item is in `unread` */\n\tisUnread: boolean;\n\t/** The item from `options` */\n\titem: T;\n}\n\nexport interface SplitViewListboxProps<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/**\n\t * **Assistive text for accessibility**\n\t * * `list`: aria label for the list\n\t * * `sort`\n\t * * `sortedBy`: Clickable sort header for the list.\n\t * * `descending`: Descending sorting.\n\t * * `ascending`: Ascending sorting.\n\t */\n\tassistiveText?: SplitViewListboxAssistiveText;\n\t/**\n\t * CSS classes to be added to the parent `div` tag.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Event Callbacks\n\t * * `onSelect` (required): Called with `(event, { selection, selectedItems, item })` when the selection is asked to change. `selection` is the requested selection as item ids.\n\t * * `onSort`: Called when the list is sorted.\n\t */\n\tevents: SplitViewListboxEvents<T>;\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * **Text labels for internationalization**\n\t * * `header`: This is the header of the list.\n\t */\n\tlabels?: SplitViewListboxLabels;\n\t/**\n\t * The direction of the sort arrow. Option are:\n\t * * SORT_OPTIONS.UP: `up`\n\t * * SORT_OPTIONS.DOWN: `down`\n\t */\n\tsortDirection?: 'up' | 'down';\n\t/**\n\t * Allows multiple item to be selection\n\t */\n\tmultiple?: boolean;\n\t/**\n\t * The list of items.\n\t * It is recommended that you have a unique `id` for each item.\n\t */\n\toptions: T[];\n\t/**\n\t * Ids (`item.id`) of the selected items (`[]` for none). The listbox is controlled: it renders this\n\t * selection and reports changes through `events.onSelect`. For single selection, pass an array of one id.\n\t *\n\t * Passing item objects is deprecated: they are still matched by `id` (or by identity when an item\n\t * has no `id`), and the listbox warns.\n\t */\n\tselection: SplitViewListboxItemId[] | T[];\n\t/**\n\t * Ids (`item.id`) of the unread items.\n\t *\n\t * Passing item objects is deprecated: they are still matched by `id` (or by identity when an item\n\t * has no `id`), and the listbox warns.\n\t */\n\tunread?: SplitViewListboxItemId[] | T[];\n\t/**\n\t * @deprecated Use `renderListItem` instead, which is called as a function with `{ isFocused, isSelected, isUnread, item }`.\n\t */\n\tlistItem?: React.ComponentType<{ item: T }>;\n\t/**\n\t * Renders the content of each list item in place of the default label and text. The listbox still renders the option, its selection and the unread indicator around it. Receives `{ isFocused, isSelected, isUnread, item }`.\n\t */\n\trenderListItem?: (data: SplitViewListboxRenderListItemData<T>) => ReactNode;\n}\n\ninterface SplitViewListboxState<T extends SplitViewListboxItem> {\n\t/** Anchor of shift-click range selection: the last clicked item (ephemeral, not the selection) */\n\tanchorItem: T | null;\n\tcurrentFocusedListItem: {\n\t\tindex: number;\n\t\titem: T | null;\n\t};\n}\n\n// Typed by its keys (not `Partial<SplitViewListboxProps>`) so JSX still requires the other props\nconst defaultProps = {\n\tassistiveText: {\n\t\tlist: 'Select an item to open it in a new workspace tab.',\n\t\tsort: {\n\t\t\tsortedBy: 'Sorted by',\n\t\t\tdescending: 'Descending',\n\t\t\tascending: 'Ascending',\n\t\t},\n\t},\n\tlabels: {},\n} satisfies Partial<SplitViewListboxProps>;\n\nconst EMPTY: never[] = [];\n\n/**\n * Key an item, or an entry of `selection`/`unread`, is matched by: the id, or for an item object\n * without an `id` (deprecated object entries only), the object itself.\n */\nconst toKey = (entry: unknown): unknown =>\n\tentry !== null && typeof entry === 'object'\n\t\t? ((entry as { id?: unknown }).id ?? entry)\n\t\t: entry;\n\n/**\n * The menu with the ARIA role of a listbox.\n */\nclass SplitViewListbox<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> extends React.Component<SplitViewListboxProps<T>, SplitViewListboxState<T>> {\n\tstatic displayName = SPLIT_VIEW_LISTBOX;\n\n\tstatic defaultProps = defaultProps;\n\n\tlistItemComponents: Record<number, HTMLAnchorElement>;\n\n\tListItemWithContent: ReturnType<typeof listItemWithContent>;\n\n\tconstructor(props: SplitViewListboxProps<T>) {\n\t\tsuper(props);\n\n\t\tthis.listItemComponents = {};\n\n\t\tthis.state = {\n\t\t\tanchorItem: null,\n\t\t\tcurrentFocusedListItem: {\n\t\t\t\tindex: 0,\n\t\t\t\titem: null,\n\t\t\t},\n\t\t};\n\n\t\tcheckProps(SPLIT_VIEW_LISTBOX, props, componentDoc);\n\n\t\t// Generates the list item template\n\t\tthis.ListItemWithContent = listItemWithContent(\n\t\t\t(props.listItem as unknown as React.ComponentType<\n\t\t\t\timport('./private/list-item-with-content').ListItemWithContentProps\n\t\t\t>) ||\n\t\t\t\t(SplitViewListItemContent as unknown as React.ComponentType<\n\t\t\t\t\timport('./private/list-item-with-content').ListItemWithContentProps\n\t\t\t\t>)\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tcheckSelectionProps(SPLIT_VIEW_LISTBOX, this.props, componentDoc);\n\t\tthis.focusFirstItem();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tcheckSelectionProps(SPLIT_VIEW_LISTBOX, this.props, componentDoc);\n\t}\n\n\tisListItemFocused(item: T) {\n\t\tconst focusedItem = this.state.currentFocusedListItem.item;\n\t\treturn focusedItem !== null && toKey(focusedItem) === toKey(item);\n\t}\n\n\tisSelected(item: T) {\n\t\tconst key = toKey(item);\n\t\treturn (this.props.selection || EMPTY).some(\n\t\t\t(entry: unknown) => toKey(entry) === key\n\t\t);\n\t}\n\n\tisUnread(item: T) {\n\t\tconst key = toKey(item);\n\t\treturn (this.props.unread || EMPTY).some(\n\t\t\t(entry: unknown) => toKey(entry) === key\n\t\t);\n\t}\n\n\t/** The selected items, in `options` order */\n\tselectedItems(): T[] {\n\t\treturn this.props.options.filter((item) => this.isSelected(item));\n\t}\n\n\tindexOfItem(item: T | null): number {\n\t\tconst key = item === null ? undefined : toKey(item);\n\t\treturn key === undefined\n\t\t\t? -1\n\t\t\t: this.props.options.findIndex((option) => toKey(option) === key);\n\t}\n\n\treportSelection(event: SyntheticEvent, selectedItems: T[], item: T | null) {\n\t\tthis.props.events?.onSelect?.(event, {\n\t\t\tselection: selectedItems.map((selectedItem) => selectedItem.id),\n\t\t\tselectedItems,\n\t\t\titem,\n\t\t});\n\t}\n\n\thandleKeyDown(event: React.KeyboardEvent) {\n\t\tif (this.props.multiple && event.key === 'a' && event.ctrlKey) {\n\t\t\t// select / deselect all\n\t\t\teventUtil.trap(event);\n\t\t\tconst { options } = this.props;\n\t\t\tif (\n\t\t\t\toptions.length > 0 &&\n\t\t\t\toptions.every((option) => this.isSelected(option))\n\t\t\t) {\n\t\t\t\tthis.deselectAllListItems(event);\n\t\t\t} else {\n\t\t\t\tthis.selectAllListItems(event);\n\t\t\t}\n\t\t} else if (event.key === 'ArrowUp') {\n\t\t\teventUtil.trap(event);\n\t\t\tthis.moveToPreviousItem(event);\n\t\t} else if (event.key === 'ArrowDown') {\n\t\t\teventUtil.trap(event);\n\t\t\tthis.moveToNextItem(event);\n\t\t}\n\t}\n\n\tmoveToNextItem(event: SyntheticEvent) {\n\t\tconst nextFocusIndex =\n\t\t\tthis.state.currentFocusedListItem.index === this.props.options.length - 1\n\t\t\t\t? 0\n\t\t\t\t: this.state.currentFocusedListItem.index + 1;\n\n\t\tthis.moveToIndex(event, nextFocusIndex);\n\t}\n\n\tmoveToPreviousItem(event: SyntheticEvent) {\n\t\tconst previousFocusIndex =\n\t\t\tthis.state.currentFocusedListItem.index === 0\n\t\t\t\t? this.props.options.length - 1\n\t\t\t\t: this.state.currentFocusedListItem.index - 1;\n\n\t\tthis.moveToIndex(event, previousFocusIndex);\n\t}\n\n\tmoveToIndex(event: SyntheticEvent, index: number) {\n\t\tconst item = this.props.options[index];\n\n\t\tthis.focusItem(item);\n\t}\n\n\tfocusFirstItem() {\n\t\tconst firstSelectedItem =\n\t\t\tthis.props.options.find((item) => this.isSelected(item)) ||\n\t\t\tthis.props.options[0];\n\n\t\tif (firstSelectedItem) {\n\t\t\tthis.focusItem(firstSelectedItem, true);\n\t\t}\n\t}\n\n\tfocusItem(item: T, setDataOnly?: boolean) {\n\t\tconst index = this.props.options.indexOf(item);\n\n\t\tif (!setDataOnly) {\n\t\t\tthis.listItemComponents[index].focus();\n\t\t}\n\n\t\tthis.setState({\n\t\t\tcurrentFocusedListItem: {\n\t\t\t\tindex,\n\t\t\t\titem,\n\t\t\t},\n\t\t});\n\t}\n\n\tdeselectAllListItems(event: SyntheticEvent) {\n\t\tthis.setState({ anchorItem: null });\n\t\tthis.reportSelection(event, [], null);\n\t}\n\n\tselectAllListItems(event: SyntheticEvent) {\n\t\tthis.reportSelection(event, [...this.props.options], this.state.anchorItem);\n\t}\n\n\t// Reports the requested selection. The rendered selection only changes when `selection` does.\n\tselectListItem(item: T, event: React.MouseEvent) {\n\t\tlet selectedItems = [item];\n\n\t\tif (this.props.multiple) {\n\t\t\tconst currentItems = this.selectedItems();\n\t\t\tif (event.metaKey) {\n\t\t\t\tselectedItems = this.isSelected(item)\n\t\t\t\t\t? currentItems.filter((i) => toKey(i) !== toKey(item))\n\t\t\t\t\t: [item, ...currentItems];\n\t\t\t} else if (event.shiftKey) {\n\t\t\t\tconst itemIndex = this.indexOfItem(item);\n\t\t\t\t// Without an earlier click, the range starts at the first selected item\n\t\t\t\tconst anchorIndex = [\n\t\t\t\t\tthis.indexOfItem(this.state.anchorItem),\n\t\t\t\t\tthis.indexOfItem(currentItems[0] ?? null),\n\t\t\t\t\titemIndex,\n\t\t\t\t].find((index) => index !== -1) as number;\n\t\t\t\tconst begin = Math.min(anchorIndex, itemIndex);\n\t\t\t\tconst end = Math.max(anchorIndex, itemIndex);\n\n\t\t\t\tconst addToSelection = this.props.options.slice(begin, end + 1);\n\t\t\t\tconst addedKeys = addToSelection.map(toKey);\n\n\t\t\t\tselectedItems = [\n\t\t\t\t\t...addToSelection,\n\t\t\t\t\t...currentItems.filter((i) => !addedKeys.includes(toKey(i))),\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({ anchorItem: item });\n\n\t\tthis.reportSelection(event, selectedItems, item);\n\t}\n\n\thandleOnSelect(event: React.MouseEvent, { item }: { item: T }) {\n\t\tthis.selectListItem(item, event);\n\t\tthis.focusItem(item);\n\t}\n\n\tsortDirection(): ReactNode {\n\t\treturn this.props.sortDirection ? (\n\t\t\t<Icon\n\t\t\t\tcategory=\"utility\"\n\t\t\t\tname={\n\t\t\t\t\tthis.props.sortDirection === SORT_OPTIONS.DOWN\n\t\t\t\t\t\t? 'arrowdown'\n\t\t\t\t\t\t: 'arrowup'\n\t\t\t\t}\n\t\t\t\tsize=\"xx-small\"\n\t\t\t\tclassName=\"slds-align-top\"\n\t\t\t/>\n\t\t) : null;\n\t}\n\n\theaderWrapper(children: ReactNode): ReactNode {\n\t\treturn this.props.events?.onSort ? (\n\t\t\t<a\n\t\t\t\taria-live=\"polite\"\n\t\t\t\tstyle={{ borderTop: '0' }}\n\t\t\t\thref=\"#\"\n\t\t\t\trole=\"button\"\n\t\t\t\tclassName=\"slds-split-view__list-header slds-grid slds-text-link_reset\"\n\t\t\t\tonClick={eventUtil.trappedHandler(this.props.events.onSort)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t) : (\n\t\t\t<div\n\t\t\t\tstyle={{ borderTop: '0' }}\n\t\t\t\tclassName=\"slds-split-view__list-header slds-grid\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\theader(): ReactNode {\n\t\tconst sort = this.props.assistiveText?.sort || {};\n\t\treturn this.props.labels?.header\n\t\t\t? this.headerWrapper(\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-sort={\n\t\t\t\t\t\t\t(this.props.sortDirection === SORT_OPTIONS.DOWN\n\t\t\t\t\t\t\t\t? sort.descending\n\t\t\t\t\t\t\t\t: sort.ascending) as React.AriaAttributes['aria-sort']\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t{sort.sortedBy}\n\t\t\t\t\t\t\t{': '}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{this.props.labels.header}\n\t\t\t\t\t\t\t{this.sortDirection()}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t{'- '}\n\t\t\t\t\t\t\t{this.props.sortDirection === SORT_OPTIONS.DOWN\n\t\t\t\t\t\t\t\t? sort.descending\n\t\t\t\t\t\t\t\t: sort.ascending}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t: null;\n\t}\n\n\taddListItemComponent(component: HTMLAnchorElement, index: number) {\n\t\tthis.listItemComponents[index] = component;\n\t}\n\n\tlistItems(): ReactNode {\n\t\tconst { ListItemWithContent } = this;\n\t\tconst { renderListItem } = this.props;\n\n\t\treturn this.props.options.map((item, index) => (\n\t\t\t<ListItemWithContent\n\t\t\t\tkey={item.id || index}\n\t\t\t\tassistiveText={{\n\t\t\t\t\tunreadItem: this.props.assistiveText?.unreadItem,\n\t\t\t\t}}\n\t\t\t\tlistItemRef={(component: HTMLAnchorElement | null) => {\n\t\t\t\t\tif (component) {\n\t\t\t\t\t\tthis.addListItemComponent(component, index);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\titem={item}\n\t\t\t\tisFocused={this.isListItemFocused(item)}\n\t\t\t\tisSelected={this.isSelected(item)}\n\t\t\t\tisUnread={this.isUnread(item)}\n\t\t\t\tevents={{\n\t\t\t\t\tonClick: (event, meta) =>\n\t\t\t\t\t\tthis.handleOnSelect(event, {\n\t\t\t\t\t\t\titem: meta.item as T,\n\t\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t\tmultiple={this.props.multiple}\n\t\t\t\trenderContent={\n\t\t\t\t\trenderListItem\n\t\t\t\t\t\t? (data) => renderListItem({ ...data, item })\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t/>\n\t\t));\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tid={this.props.id}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-grid slds-grid_vertical slds-scrollable_none',\n\t\t\t\t\tthis.props.className as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{this.header()}\n\t\t\t\t<ul\n\t\t\t\t\tclassName=\"slds-scrollable_y\"\n\t\t\t\t\taria-label={this.props.assistiveText?.list}\n\t\t\t\t\taria-multiselectable={this.props.multiple}\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tonKeyDown={(event) => this.handleKeyDown(event)}\n\t\t\t\t>\n\t\t\t\t\t{this.listItems()}\n\t\t\t\t</ul>\n\t\t\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S;CAClC;CAEA,YAAuB;EACtB,IAAM,EAAE,2BAAwB,MAC1B,EAAE,sBAAmB,KAAK;EAEhC,OAAO,KAAK,MAAM,QAAQ,KAAK,GAAM,MACpC,kBAAC,GAAD;GAEC,eAAe,EACd,YAAY,KAAK,MAAM,eAAe,WACvC;GACA,cAAc,MAAwC;IACrD,AAAI,KACH,KAAK,qBAAqB,GAAW,CAAK;GAE5C;GACM;GACN,WAAW,KAAK,kBAAkB,CAAI;GACtC,YAAY,KAAK,WAAW,CAAI;GAChC,UAAU,KAAK,SAAS,CAAI;GAC5B,QAAQ,EACP,UAAU,GAAO,MAChB,KAAK,eAAe,GAAO,EAC1B,MAAM,EAAK,KACZ,CAAC,EACH;GACA,UAAU,KAAK,MAAM;GACrB,eACC,KACI,MAAS,EAAe;IAAE,GAAG;IAAM;GAAK,CAAC,IAC1C,KAAA;EAEJ,GAzBK,EAAK,MAAM,CAyBhB,CACD;CACF;CAEA,SAAS;EACR,OACC,kBAAC,OAAD;GACC,IAAI,KAAK,MAAM;GACf,WAAW,EACV,qDACA,KAAK,MAAM,SACZ;GALD,UAAA,CAOE,KAAK,OAAO,GACb,kBAAC,MAAD;IACC,WAAU;IACV,cAAY,KAAK,MAAM,eAAe;IACtC,wBAAsB,KAAK,MAAM;IACjC,MAAK;IACL,YAAY,MAAU,KAAK,cAAc,CAAK;IAE7C,UAAA,KAAK,UAAU;GACb,CAAA,CACA;;CAEP;AACD"}
|
|
1
|
+
{"version":3,"file":"listbox.js","names":[],"sources":["../../../../components/split-view/listbox.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/* eslint-disable class-methods-use-this */\n\nimport React, { type ReactNode, type SyntheticEvent } from 'react';\nimport classNames from 'classnames';\nimport eventUtil from '../../utilities/event';\n\nimport { SPLIT_VIEW_LISTBOX } from '../../utilities/constants';\n\nimport Icon from '../icon';\nimport SplitViewListItemContent from './private/list-item-content';\nimport listItemWithContent from './private/list-item-with-content';\nimport checkProps, { checkSelectionProps } from './listbox-check-props';\nimport componentDoc from './component.json';\nimport type { SplitViewListItem } from './types';\n\nexport type { SplitViewListItem };\n\nexport const SORT_OPTIONS = Object.freeze({\n\tUP: 'up',\n\tDOWN: 'down',\n});\n\nexport interface SplitViewListboxSortAssistiveText {\n\tsortedBy?: string;\n\tdescending?: string;\n\tascending?: string;\n}\n\nexport interface SplitViewListboxAssistiveText {\n\tlist?: string;\n\tsort?: SplitViewListboxSortAssistiveText;\n\tunreadItem?: string;\n}\n\nexport interface SplitViewListboxSelectData<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/** The requested selection, as item ids. Pass it back as `selection`. */\n\tselection: SplitViewListboxItemId[];\n\t/** The items of the requested selection */\n\tselectedItems: T[];\n\t/** The item that was clicked, or the range anchor for select-all (`null` when deselecting all) */\n\titem: T | null;\n}\n\nexport interface SplitViewListboxEvents<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/**\n\t * Called when the selection is asked to change (click, meta/shift-click, Ctrl+A).\n\t * `data.selection` is the requested selection; update `selection` to apply it.\n\t */\n\tonSelect: (\n\t\tevent: SyntheticEvent,\n\t\tdata: SplitViewListboxSelectData<T>\n\t) => void;\n\t/**\n\t * Called when the list is sorted.\n\t */\n\tonSort?: (event: SyntheticEvent) => void;\n}\n\nexport interface SplitViewListboxLabels {\n\t/** This is the header of the list. */\n\theader?: string;\n}\n\n/** An item's `id`, as used in `selection` and `unread` */\nexport type SplitViewListboxItemId = string | number;\n\n/**\n * Fields read by the default list item. Items with other fields are typed by\n * the `SplitViewListbox` type parameter, which flows to `renderListItem`, `listItem` and `onSelect`.\n */\nexport type SplitViewListboxItem = SplitViewListItem & {\n\t/** Unique id of the item, matched against `selection` and `unread` */\n\tid: SplitViewListboxItemId;\n};\n\n/**\n * Data passed to `renderListItem`\n */\nexport interface SplitViewListboxRenderListItemData<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/** Whether the item has keyboard focus (is the list's tab stop) */\n\tisFocused: boolean;\n\t/** Whether the item is in `selection` */\n\tisSelected: boolean;\n\t/** Whether the item is in `unread` */\n\tisUnread: boolean;\n\t/** The item from `options` */\n\titem: T;\n}\n\nexport interface SplitViewListboxProps<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> {\n\t/**\n\t * **Assistive text for accessibility**\n\t * * `list`: aria label for the list\n\t * * `sort`\n\t * * `sortedBy`: Clickable sort header for the list.\n\t * * `descending`: Descending sorting.\n\t * * `ascending`: Ascending sorting.\n\t */\n\tassistiveText?: SplitViewListboxAssistiveText;\n\t/**\n\t * CSS classes to be added to the parent `div` tag.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Event Callbacks\n\t * * `onSelect` (required): Called with `(event, { selection, selectedItems, item })` when the selection is asked to change. `selection` is the requested selection as item ids.\n\t * * `onSort`: Called when the list is sorted.\n\t */\n\tevents: SplitViewListboxEvents<T>;\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * **Text labels for internationalization**\n\t * * `header`: This is the header of the list.\n\t */\n\tlabels?: SplitViewListboxLabels;\n\t/**\n\t * The direction of the sort arrow. Option are:\n\t * * SORT_OPTIONS.UP: `up`\n\t * * SORT_OPTIONS.DOWN: `down`\n\t */\n\tsortDirection?: 'up' | 'down';\n\t/**\n\t * Allows multiple item to be selection\n\t */\n\tmultiple?: boolean;\n\t/**\n\t * The list of items.\n\t * It is recommended that you have a unique `id` for each item.\n\t */\n\toptions: T[];\n\t/**\n\t * Ids (`item.id`) of the selected items (`[]` for none). The listbox is controlled: it renders this\n\t * selection and reports changes through `events.onSelect`. For single selection, pass an array of one id.\n\t *\n\t * Passing item objects is deprecated: they are still matched by `id` (or by identity when an item\n\t * has no `id`), and the listbox warns.\n\t */\n\tselection: SplitViewListboxItemId[] | T[];\n\t/**\n\t * Ids (`item.id`) of the unread items.\n\t *\n\t * Passing item objects is deprecated: they are still matched by `id` (or by identity when an item\n\t * has no `id`), and the listbox warns.\n\t */\n\tunread?: SplitViewListboxItemId[] | T[];\n\t/**\n\t * @deprecated Use `renderListItem` instead, which is called as a function with `{ isFocused, isSelected, isUnread, item }`.\n\t */\n\tlistItem?: React.ComponentType<{ item: T }>;\n\t/**\n\t * Renders the content of each list item in place of the default label and text. The listbox still renders the option, its selection and the unread indicator around it. Receives `{ isFocused, isSelected, isUnread, item }`.\n\t */\n\trenderListItem?: (data: SplitViewListboxRenderListItemData<T>) => ReactNode;\n}\n\ninterface SplitViewListboxState<T extends SplitViewListboxItem> {\n\t/** Anchor of shift-click range selection: the last clicked item (ephemeral, not the selection) */\n\tanchorItem: T | null;\n\tcurrentFocusedListItem: {\n\t\tindex: number;\n\t\titem: T | null;\n\t};\n}\n\n// Typed by its keys (not `Partial<SplitViewListboxProps>`) so JSX still requires the other props\nconst defaultProps = {\n\tassistiveText: {\n\t\tlist: 'Select an item to open it in a new workspace tab.',\n\t\tsort: {\n\t\t\tsortedBy: 'Sorted by',\n\t\t\tdescending: 'Descending',\n\t\t\tascending: 'Ascending',\n\t\t},\n\t},\n\tlabels: {},\n} satisfies Partial<SplitViewListboxProps>;\n\nconst EMPTY: never[] = [];\n\n/**\n * Key an item, or an entry of `selection`/`unread`, is matched by: the id, or for an item object\n * without an `id` (deprecated object entries only), the object itself.\n */\nconst toKey = (entry: unknown): unknown =>\n\tentry !== null && typeof entry === 'object'\n\t\t? ((entry as { id?: unknown }).id ?? entry)\n\t\t: entry;\n\n/**\n * The menu with the ARIA role of a listbox.\n */\nclass SplitViewListbox<\n\tT extends SplitViewListboxItem = SplitViewListboxItem,\n> extends React.Component<SplitViewListboxProps<T>, SplitViewListboxState<T>> {\n\tstatic displayName = SPLIT_VIEW_LISTBOX;\n\n\tstatic defaultProps = defaultProps;\n\n\tlistItemComponents: Record<number, HTMLAnchorElement>;\n\n\tListItemWithContent: ReturnType<typeof listItemWithContent>;\n\n\tconstructor(props: SplitViewListboxProps<T>) {\n\t\tsuper(props);\n\n\t\tthis.listItemComponents = {};\n\n\t\tthis.state = {\n\t\t\tanchorItem: null,\n\t\t\tcurrentFocusedListItem: {\n\t\t\t\tindex: 0,\n\t\t\t\titem: null,\n\t\t\t},\n\t\t};\n\n\t\tcheckProps(SPLIT_VIEW_LISTBOX, props, componentDoc);\n\n\t\t// Generates the list item template\n\t\tthis.ListItemWithContent = listItemWithContent(\n\t\t\t(props.listItem as unknown as React.ComponentType<\n\t\t\t\timport('./private/list-item-with-content').ListItemWithContentProps\n\t\t\t>) ||\n\t\t\t\t(SplitViewListItemContent as unknown as React.ComponentType<\n\t\t\t\t\timport('./private/list-item-with-content').ListItemWithContentProps\n\t\t\t\t>)\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tcheckSelectionProps(SPLIT_VIEW_LISTBOX, this.props, componentDoc);\n\t\tthis.focusFirstItem();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tcheckSelectionProps(SPLIT_VIEW_LISTBOX, this.props, componentDoc);\n\t}\n\n\tisListItemFocused(item: T) {\n\t\tconst focusedItem = this.state.currentFocusedListItem.item;\n\t\treturn focusedItem !== null && toKey(focusedItem) === toKey(item);\n\t}\n\n\tisSelected(item: T) {\n\t\tconst key = toKey(item);\n\t\treturn (this.props.selection || EMPTY).some(\n\t\t\t(entry: unknown) => toKey(entry) === key\n\t\t);\n\t}\n\n\tisUnread(item: T) {\n\t\tconst key = toKey(item);\n\t\treturn (this.props.unread || EMPTY).some(\n\t\t\t(entry: unknown) => toKey(entry) === key\n\t\t);\n\t}\n\n\t/** The selected items, in `options` order */\n\tselectedItems(): T[] {\n\t\treturn this.props.options.filter((item) => this.isSelected(item));\n\t}\n\n\tindexOfItem(item: T | null): number {\n\t\tconst key = item === null ? undefined : toKey(item);\n\t\treturn key === undefined\n\t\t\t? -1\n\t\t\t: this.props.options.findIndex((option) => toKey(option) === key);\n\t}\n\n\treportSelection(event: SyntheticEvent, selectedItems: T[], item: T | null) {\n\t\tthis.props.events?.onSelect?.(event, {\n\t\t\tselection: selectedItems.map((selectedItem) => selectedItem.id),\n\t\t\tselectedItems,\n\t\t\titem,\n\t\t});\n\t}\n\n\thandleKeyDown(event: React.KeyboardEvent) {\n\t\tif (this.props.multiple && event.key === 'a' && event.ctrlKey) {\n\t\t\t// select / deselect all\n\t\t\teventUtil.trap(event);\n\t\t\tconst { options } = this.props;\n\t\t\tif (\n\t\t\t\toptions.length > 0 &&\n\t\t\t\toptions.every((option) => this.isSelected(option))\n\t\t\t) {\n\t\t\t\tthis.deselectAllListItems(event);\n\t\t\t} else {\n\t\t\t\tthis.selectAllListItems(event);\n\t\t\t}\n\t\t} else if (event.key === 'ArrowUp') {\n\t\t\teventUtil.trap(event);\n\t\t\tthis.moveToPreviousItem(event);\n\t\t} else if (event.key === 'ArrowDown') {\n\t\t\teventUtil.trap(event);\n\t\t\tthis.moveToNextItem(event);\n\t\t}\n\t}\n\n\tmoveToNextItem(event: SyntheticEvent) {\n\t\tconst nextFocusIndex =\n\t\t\tthis.state.currentFocusedListItem.index === this.props.options.length - 1\n\t\t\t\t? 0\n\t\t\t\t: this.state.currentFocusedListItem.index + 1;\n\n\t\tthis.moveToIndex(event, nextFocusIndex);\n\t}\n\n\tmoveToPreviousItem(event: SyntheticEvent) {\n\t\tconst previousFocusIndex =\n\t\t\tthis.state.currentFocusedListItem.index === 0\n\t\t\t\t? this.props.options.length - 1\n\t\t\t\t: this.state.currentFocusedListItem.index - 1;\n\n\t\tthis.moveToIndex(event, previousFocusIndex);\n\t}\n\n\tmoveToIndex(event: SyntheticEvent, index: number) {\n\t\tconst item = this.props.options[index];\n\n\t\tthis.focusItem(item);\n\t}\n\n\tfocusFirstItem() {\n\t\tconst firstSelectedItem =\n\t\t\tthis.props.options.find((item) => this.isSelected(item)) ||\n\t\t\tthis.props.options[0];\n\n\t\tif (firstSelectedItem) {\n\t\t\tthis.focusItem(firstSelectedItem, true);\n\t\t}\n\t}\n\n\tfocusItem(item: T, setDataOnly?: boolean) {\n\t\tconst index = this.props.options.indexOf(item);\n\n\t\tif (!setDataOnly) {\n\t\t\tthis.listItemComponents[index].focus();\n\t\t}\n\n\t\tthis.setState({\n\t\t\tcurrentFocusedListItem: {\n\t\t\t\tindex,\n\t\t\t\titem,\n\t\t\t},\n\t\t});\n\t}\n\n\tdeselectAllListItems(event: SyntheticEvent) {\n\t\tthis.setState({ anchorItem: null });\n\t\tthis.reportSelection(event, [], null);\n\t}\n\n\tselectAllListItems(event: SyntheticEvent) {\n\t\tthis.reportSelection(event, [...this.props.options], this.state.anchorItem);\n\t}\n\n\t// Reports the requested selection. The rendered selection only changes when `selection` does.\n\tselectListItem(item: T, event: React.MouseEvent) {\n\t\tlet selectedItems = [item];\n\n\t\tif (this.props.multiple) {\n\t\t\tconst currentItems = this.selectedItems();\n\t\t\tif (event.metaKey) {\n\t\t\t\tselectedItems = this.isSelected(item)\n\t\t\t\t\t? currentItems.filter((i) => toKey(i) !== toKey(item))\n\t\t\t\t\t: [item, ...currentItems];\n\t\t\t} else if (event.shiftKey) {\n\t\t\t\tconst itemIndex = this.indexOfItem(item);\n\t\t\t\t// Without an earlier click, the range starts at the first selected item\n\t\t\t\tconst anchorIndex = [\n\t\t\t\t\tthis.indexOfItem(this.state.anchorItem),\n\t\t\t\t\tthis.indexOfItem(currentItems[0] ?? null),\n\t\t\t\t\titemIndex,\n\t\t\t\t].find((index) => index !== -1) as number;\n\t\t\t\tconst begin = Math.min(anchorIndex, itemIndex);\n\t\t\t\tconst end = Math.max(anchorIndex, itemIndex);\n\n\t\t\t\tconst addToSelection = this.props.options.slice(begin, end + 1);\n\t\t\t\tconst addedKeys = addToSelection.map(toKey);\n\n\t\t\t\tselectedItems = [\n\t\t\t\t\t...addToSelection,\n\t\t\t\t\t...currentItems.filter((i) => !addedKeys.includes(toKey(i))),\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({ anchorItem: item });\n\n\t\tthis.reportSelection(event, selectedItems, item);\n\t}\n\n\thandleOnSelect(event: React.MouseEvent, { item }: { item: T }) {\n\t\tthis.selectListItem(item, event);\n\t\tthis.focusItem(item);\n\t}\n\n\tsortDirection(): ReactNode {\n\t\treturn this.props.sortDirection ? (\n\t\t\t<Icon\n\t\t\t\tcategory=\"utility\"\n\t\t\t\tname={\n\t\t\t\t\tthis.props.sortDirection === SORT_OPTIONS.DOWN\n\t\t\t\t\t\t? 'arrowdown'\n\t\t\t\t\t\t: 'arrowup'\n\t\t\t\t}\n\t\t\t\tsize=\"xx-small\"\n\t\t\t\tclassName=\"slds-align-top\"\n\t\t\t/>\n\t\t) : null;\n\t}\n\n\theaderWrapper(children: ReactNode): ReactNode {\n\t\treturn this.props.events?.onSort ? (\n\t\t\t<a\n\t\t\t\taria-live=\"polite\"\n\t\t\t\tstyle={{ borderTop: '0' }}\n\t\t\t\thref=\"#\"\n\t\t\t\trole=\"button\"\n\t\t\t\tclassName=\"slds-split-view__list-header slds-grid slds-text-link_reset\"\n\t\t\t\tonClick={eventUtil.trappedHandler(this.props.events.onSort)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t) : (\n\t\t\t<div\n\t\t\t\tstyle={{ borderTop: '0' }}\n\t\t\t\tclassName=\"slds-split-view__list-header slds-grid\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\theader(): ReactNode {\n\t\tconst sort = this.props.assistiveText?.sort || {};\n\t\treturn this.props.labels?.header\n\t\t\t? this.headerWrapper(\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-sort={\n\t\t\t\t\t\t\t(this.props.sortDirection === SORT_OPTIONS.DOWN\n\t\t\t\t\t\t\t\t? sort.descending\n\t\t\t\t\t\t\t\t: sort.ascending) as React.AriaAttributes['aria-sort']\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t{sort.sortedBy}\n\t\t\t\t\t\t\t{': '}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{this.props.labels.header}\n\t\t\t\t\t\t\t{this.sortDirection()}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t{'- '}\n\t\t\t\t\t\t\t{this.props.sortDirection === SORT_OPTIONS.DOWN\n\t\t\t\t\t\t\t\t? sort.descending\n\t\t\t\t\t\t\t\t: sort.ascending}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t: null;\n\t}\n\n\taddListItemComponent(component: HTMLAnchorElement, index: number) {\n\t\tthis.listItemComponents[index] = component;\n\t}\n\n\tlistItems(): ReactNode {\n\t\tconst { ListItemWithContent } = this;\n\t\tconst { renderListItem } = this.props;\n\n\t\treturn this.props.options.map((item, index) => (\n\t\t\t<ListItemWithContent\n\t\t\t\tkey={item.id || index}\n\t\t\t\tassistiveText={{\n\t\t\t\t\tunreadItem: this.props.assistiveText?.unreadItem,\n\t\t\t\t}}\n\t\t\t\tlistItemRef={(component: HTMLAnchorElement | null) => {\n\t\t\t\t\tif (component) {\n\t\t\t\t\t\tthis.addListItemComponent(component, index);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\titem={item}\n\t\t\t\tisFocused={this.isListItemFocused(item)}\n\t\t\t\tisSelected={this.isSelected(item)}\n\t\t\t\tisUnread={this.isUnread(item)}\n\t\t\t\tevents={{\n\t\t\t\t\tonClick: (event, meta) =>\n\t\t\t\t\t\tthis.handleOnSelect(event, {\n\t\t\t\t\t\t\titem: meta.item as T,\n\t\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t\tmultiple={this.props.multiple}\n\t\t\t\trenderContent={\n\t\t\t\t\trenderListItem\n\t\t\t\t\t\t? (data) => renderListItem({ ...data, item })\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t/>\n\t\t));\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tid={this.props.id}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-grid slds-grid_vertical slds-scrollable_none',\n\t\t\t\t\tthis.props.className as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{this.header()}\n\t\t\t\t<ul\n\t\t\t\t\tclassName=\"slds-scrollable_y\"\n\t\t\t\t\taria-label={this.props.assistiveText?.list}\n\t\t\t\t\taria-multiselectable={this.props.multiple}\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tonKeyDown={(event) => this.handleKeyDown(event)}\n\t\t\t\t>\n\t\t\t\t\t{this.listItems()}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default SplitViewListbox;\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,IAAe,OAAO,OAAO;CACzC,IAAI;CACJ,MAAM;AACP,CAAC,GA4JK,IAAe;CACpB,eAAe;EACd,MAAM;EACN,MAAM;GACL,UAAU;GACV,YAAY;GACZ,WAAW;EACZ;CACD;CACA,QAAQ,CAAC;AACV,GAEM,IAAiB,CAAC,GAMlB,KAAS,MACI,OAAO,KAAU,YAAnC,IACK,EAA2B,MAAM,IACnC,GAKE,IAAN,cAEU,EAAM,UAA8D;CAC7E,OAAO,cAAc;CAErB,OAAO,eAAe;CAEtB;CAEA;CAEA,YAAY,GAAiC;EAgB5C,AAfA,MAAM,CAAK,GAEX,KAAK,qBAAqB,CAAC,GAE3B,KAAK,QAAQ;GACZ,YAAY;GACZ,wBAAwB;IACvB,OAAO;IACP,MAAM;GACP;EACD,GAEA,EAAW,GAAoB,GAAO,CAAY,GAGlD,KAAK,sBAAsB,EACzB,EAAM,YAGL,CAGH;CACD;CAEA,oBAAoB;EAEnB,AADA,EAAoB,GAAoB,KAAK,OAAO,CAAY,GAChE,KAAK,eAAe;CACrB;CAEA,qBAAqB;EACpB,EAAoB,GAAoB,KAAK,OAAO,CAAY;CACjE;CAEA,kBAAkB,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AAK;IACL,YAAY,MAAU,KAAK,cAAc,CAAK;IAE7C,UAAA,KAAK,UAAU;GACb,CAAA,CACA;;CAEP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-content.js","names":[],"sources":["../../../../../components/split-view/private/list-item-content.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\
|
|
1
|
+
{"version":3,"file":"list-item-content.js","names":[],"sources":["../../../../../components/split-view/private/list-item-content.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 type { SplitViewListItem } from '../types';\n\nexport const DISPLAY_NAME = 'SLDSSplitViewListItemContent';\n\nexport interface SplitViewListItemContentProps {\n\t/**\n\t * **Item to be displayed**\n\t * * `label`: The main label displayed on the top left.\n\t * * `topRightText`: The text displayed on the top right.\n\t * * `bottomLeftText`: The text displayed on the bottom left.\n\t * * `bottomRightText`: The text displayed on the bottom right.\n\t */\n\titem?: SplitViewListItem;\n}\n\nconst SplitViewListItemContent = ({\n\titem = {},\n}: SplitViewListItemContentProps) => (\n\t<div>\n\t\t<div className=\"slds-grid slds-wrap\">\n\t\t\t<span\n\t\t\t\tclassName=\"slds-truncate slds-text-body_regular slds-text-color_default\"\n\t\t\t\ttitle={item.label}\n\t\t\t>\n\t\t\t\t{item.label}\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclassName=\"slds-truncate slds-col_bump-left\"\n\t\t\t\ttitle={item.topRightText}\n\t\t\t>\n\t\t\t\t{item.topRightText}\n\t\t\t</span>\n\t\t</div>\n\t\t<div className=\"slds-grid slds-wrap\">\n\t\t\t<span className=\"slds-truncate\" title={item.bottomLeftText}>\n\t\t\t\t{item.bottomLeftText}\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclassName=\"slds-truncate slds-col_bump-left\"\n\t\t\t\ttitle={item.bottomRightText}\n\t\t\t>\n\t\t\t\t{item.bottomRightText}\n\t\t\t</span>\n\t\t</div>\n\t</div>\n);\n\nSplitViewListItemContent.displayName = DISPLAY_NAME;\n\nexport default SplitViewListItemContent;\n"],"mappings":";;AAKA,IAAa,IAAe,gCAatB,KAA4B,EACjC,UAAO,CAAC,QAER,kBAAC,OAAD,EAAA,UAAA,CACC,kBAAC,OAAD;CAAK,WAAU;CAAf,UAAA,CACC,kBAAC,QAAD;EACC,WAAU;EACV,OAAO,EAAK;EAEX,UAAA,EAAK;CACD,CAAA,GACN,kBAAC,QAAD;EACC,WAAU;EACV,OAAO,EAAK;EAEX,UAAA,EAAK;CACD,CAAA,CACF;AACL,CAAA,GAAA,kBAAC,OAAD;CAAK,WAAU;CAAf,UAAA,CACC,kBAAC,QAAD;EAAM,WAAU;EAAgB,OAAO,EAAK;EAC1C,UAAA,EAAK;CACD,CAAA,GACN,kBAAC,QAAD;EACC,WAAU;EACV,OAAO,EAAK;EAEX,UAAA,EAAK;CACD,CAAA,CACF;AACD,CAAA,CAAA,EAAA,CAAA;AAGN,EAAyB,cAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TABS as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../../utilities/
|
|
3
|
-
import n from "../../utilities/
|
|
2
|
+
import t from "../../utilities/key-code.js";
|
|
3
|
+
import n from "../../utilities/event.js";
|
|
4
4
|
import r from "./private/tabs-list.js";
|
|
5
5
|
import i from "./private/tab.js";
|
|
6
6
|
import a from "./private/tab-panel.js";
|
|
@@ -88,7 +88,7 @@ var x = (x) => {
|
|
|
88
88
|
}, [V, B]), U = l((e) => {
|
|
89
89
|
if (V(e.target)) {
|
|
90
90
|
let r = L, i = !1;
|
|
91
|
-
e.
|
|
91
|
+
e.key === t.LEFT || e.key === t.UP ? (r = z(r), i = !0) : (e.key === t.RIGHT || e.key === t.DOWN) && (r = R(r), i = !0), i && n.trap(e), B(e, r, !0);
|
|
92
92
|
}
|
|
93
93
|
}, [
|
|
94
94
|
V,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/tabs/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\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseId,\n\ttype ReactNode,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n} from 'react';\nimport classNames from 'classnames';\n\n// Child components\nimport TabsList from './private/tabs-list';\nimport Tab from './private/tab';\nimport TabPanel from './private/tab-panel';\n\nimport { TABS } from '../../utilities/constants';\nimport KEYS from '../../utilities/key-code';\nimport EventUtil from '../../utilities/event';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Tabs variant types\n */\nexport type TabsVariant = 'default' | 'scoped' | 'vertical';\n\n/**\n * Tab child props (TabsPanel)\n */\nexport interface TabChildProps {\n\tlabel: ReactNode;\n\tvalue?: string;\n\tdisabled?: boolean;\n\thasError?: boolean;\n\tassistiveText?: {\n\t\twithErrorIcon?: string;\n\t};\n\tchildren?: ReactNode;\n\tkey?: string | number;\n}\n\n/**\n * Data passed to the Tabs `onSelect` callback\n */\nexport interface TabsSelectData {\n\t/**\n\t * `value` of the tab being selected: the panel's `value`, or its index as a\n\t * string (`'0'`, `'1'`, ...) when the panel has no `value`.\n\t */\n\tvalue: string;\n\t/**\n\t * `value` of the tab that was selected before this selection, or `undefined`\n\t * when no tab was selected.\n\t */\n\tpreviousValue: string | undefined;\n\t/** Index of the tab being selected */\n\tselectedIndex: number;\n\t/** Index of the tab that was selected before this selection, or `-1` when no tab was selected */\n\tpreviousIndex: number;\n}\n\n/**\n * Props shared by both ways of controlling the selected tab\n */\ninterface TabsBaseProps {\n\t/** TabsPanel children */\n\tchildren: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** HTML id */\n\tid?: string;\n\t/**\n\t * Called when a tab is requested by click or arrow key. Receives the triggering event and\n\t * `{ value, previousValue, selectedIndex, previousIndex }`. Tabs is controlled: update `value`\n\t * from this callback to change tabs. It is not called for a disabled tab or for the tab that is\n\t * already selected.\n\t */\n\tonSelect: (\n\t\tevent: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>,\n\t\tdata: TabsSelectData\n\t) => void;\n\t/** Tab style variant */\n\tvariant?: TabsVariant;\n}\n\n/**\n * Select the tab by the `value` of its `TabsPanel`.\n */\ninterface TabsValueProps {\n\t/**\n\t * `value` of the selected `TabsPanel` (required, controlled). A panel without a `value` is\n\t * matched by its index as a string (`'0'`, `'1'`, ...). When no panel matches, no tab is selected.\n\t */\n\tvalue: string;\n\tselectedIndex?: never;\n}\n\n/**\n * Select the tab by index (deprecated).\n */\ninterface TabsSelectedIndexProps {\n\tvalue?: undefined;\n\t/**\n\t * @deprecated Use `value` instead (set `value` on each `TabsPanel`, or use the index as a\n\t * string). Index of the selected tab, controlled. Used only when `value` is not passed.\n\t */\n\tselectedIndex: number;\n}\n\n/**\n * Props for the Tabs component\n */\nexport type TabsProps = TabsBaseProps &\n\t(TabsValueProps | TabsSelectedIndexProps);\n\n// The value a panel is matched by: its `value`, or its index as a string.\nconst getPanelValue = (\n\tchild: React.ReactElement<TabChildProps>,\n\tindex: number\n): string => child.props.value ?? String(index);\n\n// Determine if a node from event.target is a Tab element\nfunction isTabNode(node: HTMLElement): boolean {\n\treturn (\n\t\t(node.nodeName === 'A' && node.getAttribute('role') === 'tab') ||\n\t\t(node.nodeName === 'LI' &&\n\t\t\t(node.classList.contains('slds-tabs_default__item') ||\n\t\t\t\tnode.classList.contains('slds-tabs_scoped__item') ||\n\t\t\t\tnode.classList.contains('slds-vertical-tabs__nav-item')))\n\t);\n}\n\n// Determine if a tab node is disabled (from DOM)\nfunction isTabNodeDisabled(node: HTMLElement): boolean {\n\tif (node.classList?.contains('slds-disabled')) {\n\t\treturn true;\n\t}\n\tif (node.getAttribute?.('aria-disabled') === 'true') {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n// Determine if a tab React element is disabled\nfunction isTabDisabled(tab: React.ReactElement<TabChildProps>): boolean {\n\treturn Boolean(tab.props?.disabled);\n}\n\n/**\n * Tabs keeps related content in a single container that is shown and hidden through navigation.\n */\nconst Tabs = (props: TabsProps): React.ReactElement => {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tid: propId,\n\t\tonSelect,\n\t\tselectedIndex: selectedIndexProp,\n\t\tvalue,\n\t\tvariant = 'default',\n\t} = props;\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tTABS,\n\t\t\t{\n\t\t\t\tdefaultSelectedIndex: (props as { defaultSelectedIndex?: number })\n\t\t\t\t\t.defaultSelectedIndex,\n\t\t\t\tselectedIndex: selectedIndexProp,\n\t\t\t\tvalue,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\t});\n\n\tconst [focus, setFocus] = useState(false);\n\tconst tabsRef = useRef<\n\t\tArray<{ tab: React.ReactElement<TabChildProps>; node: HTMLElement | null }>\n\t>([]);\n\tconst tabsNodeRef = useRef<HTMLDivElement>(null);\n\n\tconst childArray = React.Children.toArray(\n\t\tchildren\n\t) as React.ReactElement<TabChildProps>[];\n\tconst tabsCount = childArray.length;\n\n\t// Selection is controlled: derived from `value`, or from the deprecated\n\t// `selectedIndex` when `value` is not passed. There is no internal copy.\n\tconst selectedIndex =\n\t\tvalue !== undefined\n\t\t\t? childArray.findIndex(\n\t\t\t\t\t(child, index) => getPanelValue(child, index) === value\n\t\t\t\t)\n\t\t\t: Number.isInteger(selectedIndexProp)\n\t\t\t\t? (selectedIndexProp as number)\n\t\t\t\t: -1;\n\n\tconst getNextTab = useCallback(\n\t\t(index: number): number => {\n\t\t\t// Look for non-disabled tab from index to the last tab\n\t\t\tfor (let i = index + 1; i < tabsCount; i++) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Continue from first tab\n\t\t\tfor (let i = 0; i < index; i++) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn index;\n\t\t},\n\t\t[tabsCount]\n\t);\n\n\tconst getPrevTab = useCallback(\n\t\t(index: number): number => {\n\t\t\t// Look for non-disabled tab backwards\n\t\t\tfor (let i = index - 1; i >= 0; i--) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Continue from last tab\n\t\t\tfor (let i = tabsCount - 1; i > index; i--) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn index;\n\t\t},\n\t\t[tabsCount]\n\t);\n\n\tconst setSelected = useCallback(\n\t\t(\n\t\t\tevent: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>,\n\t\t\tindex: number,\n\t\t\tshouldFocus?: boolean\n\t\t) => {\n\t\t\tif (index < 0 || index >= tabsCount || index === selectedIndex) return;\n\n\t\t\tconst previous =\n\t\t\t\tselectedIndex >= 0 ? childArray[selectedIndex] : undefined;\n\t\t\tonSelect?.(event, {\n\t\t\t\tvalue: getPanelValue(childArray[index], index),\n\t\t\t\tpreviousValue: previous\n\t\t\t\t\t? getPanelValue(previous, selectedIndex)\n\t\t\t\t\t: undefined,\n\t\t\t\tselectedIndex: index,\n\t\t\t\tpreviousIndex: selectedIndex,\n\t\t\t});\n\t\t\t// Focus follows the selection once the parent updates `value`.\n\t\t\tsetFocus(shouldFocus === true);\n\t\t},\n\t\t[tabsCount, onSelect, selectedIndex, childArray]\n\t);\n\n\tconst isTabFromContainer = useCallback((node: HTMLElement): boolean => {\n\t\tif (!isTabNode(node)) return false;\n\n\t\tlet nodeAncestor: HTMLElement | null = node.parentElement;\n\t\twhile (nodeAncestor) {\n\t\t\tif (nodeAncestor === tabsNodeRef.current) return true;\n\t\t\tif (nodeAncestor.getAttribute('data-tabs')) break;\n\t\t\tnodeAncestor = nodeAncestor.parentElement;\n\t\t}\n\t\treturn false;\n\t}, []);\n\n\tconst handleClick = useCallback(\n\t\t(e: MouseEvent<HTMLDivElement>) => {\n\t\t\tlet node = e.target as HTMLElement;\n\t\t\tdo {\n\t\t\t\tif (isTabFromContainer(node)) {\n\t\t\t\t\tif (isTabNodeDisabled(node)) return;\n\n\t\t\t\t\tlet parentNode = node.parentNode as HTMLElement;\n\t\t\t\t\tif (parentNode?.nodeName === 'LI') {\n\t\t\t\t\t\tnode = parentNode;\n\t\t\t\t\t\tparentNode = node.parentNode as HTMLElement;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst index = Array.from(parentNode.children).indexOf(node);\n\t\t\t\t\tsetSelected(e, index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tnode = node.parentNode as HTMLElement;\n\t\t\t} while (node !== null);\n\t\t},\n\t\t[isTabFromContainer, setSelected]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: KeyboardEvent<HTMLDivElement>) => {\n\t\t\tif (isTabFromContainer(event.target as HTMLElement)) {\n\t\t\t\tlet index = selectedIndex;\n\t\t\t\tlet preventDefault = false;\n\n\t\t\t\tif (event.keyCode === KEYS.LEFT || event.keyCode === KEYS.UP) {\n\t\t\t\t\tindex = getPrevTab(index);\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t} else if (\n\t\t\t\t\tevent.keyCode === KEYS.RIGHT ||\n\t\t\t\t\tevent.keyCode === KEYS.DOWN\n\t\t\t\t) {\n\t\t\t\t\tindex = getNextTab(index);\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t}\n\n\t\t\t\tif (preventDefault) {\n\t\t\t\t\tEventUtil.trap(event);\n\t\t\t\t}\n\n\t\t\t\tsetSelected(event, index, true);\n\t\t\t}\n\t\t},\n\t\t[isTabFromContainer, selectedIndex, getPrevTab, getNextTab, setSelected]\n\t);\n\n\tconst renderTabsList = () => (\n\t\t<TabsList id={id} variant={variant}>\n\t\t\t{childArray.map((child, index) => {\n\t\t\t\tconst tabId = `${id}-slds-tabs_tab-${index}`;\n\t\t\t\tconst panelId = `${id}-slds-tabs_panel-${index}`;\n\t\t\t\tconst isSelected = selectedIndex === index;\n\t\t\t\tconst shouldFocus = isSelected && focus;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Tab\n\t\t\t\t\t\tkey={child.key ?? index}\n\t\t\t\t\t\tref={(node: HTMLElement | null) => {\n\t\t\t\t\t\t\ttabsRef.current[index] = { tab: child, node };\n\t\t\t\t\t\t\tif (focus) {\n\t\t\t\t\t\t\t\tsetFocus(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfocus={shouldFocus}\n\t\t\t\t\t\tselected={isSelected}\n\t\t\t\t\t\tid={tabId}\n\t\t\t\t\t\tpanelId={panelId}\n\t\t\t\t\t\tdisabled={child.props.disabled}\n\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\thasError={child.props.hasError}\n\t\t\t\t\t\tassistiveText={child.props.assistiveText}\n\t\t\t\t\t>\n\t\t\t\t\t\t{child.props.label}\n\t\t\t\t\t</Tab>\n\t\t\t\t);\n\t\t\t})}\n\t\t</TabsList>\n\t);\n\n\tconst renderTabPanels = () =>\n\t\tchildArray.map((child, index) => {\n\t\t\tconst tabId = `${id}-slds-tabs_tab-${index}`;\n\t\t\tconst panelId = `${id}-slds-tabs_panel-${index}`;\n\t\t\tconst isSelected = selectedIndex === index;\n\n\t\t\treturn (\n\t\t\t\t<TabPanel\n\t\t\t\t\tkey={child.key ?? index}\n\t\t\t\t\tselected={isSelected}\n\t\t\t\t\tid={panelId}\n\t\t\t\t\ttabId={tabId}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t>\n\t\t\t\t\t{child}\n\t\t\t\t</TabPanel>\n\t\t\t);\n\t\t});\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\t{\n\t\t\t\t\t'slds-tabs_default': variant === 'default',\n\t\t\t\t\t'slds-tabs_scoped': variant === 'scoped',\n\t\t\t\t\t'slds-vertical-tabs': variant === 'vertical',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t\tonClick={handleClick}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tdata-tabs\n\t\t\tref={tabsNodeRef}\n\t\t>\n\t\t\t{renderTabsList()}\n\t\t\t{renderTabPanels()}\n\t\t</div>\n\t);\n};\n\nTabs.displayName = TABS;\n\nexport default Tabs;\n"],"mappings":";;;;;;;;;;;;AA0HA,IAAM,KACL,GACA,MACY,EAAM,MAAM,SAAS,OAAO,CAAK;AAG9C,SAAS,EAAU,GAA4B;CAC9C,OACE,EAAK,aAAa,OAAO,EAAK,aAAa,MAAM,MAAM,SACvD,EAAK,aAAa,SACjB,EAAK,UAAU,SAAS,yBAAyB,KACjD,EAAK,UAAU,SAAS,wBAAwB,KAChD,EAAK,UAAU,SAAS,8BAA8B;AAE1D;AAGA,SAAS,EAAkB,GAA4B;CAOtD,OAHA,GAHI,EAAK,WAAW,SAAS,eAAe,KAGxC,EAAK,eAAe,eAAe,MAAM;AAI9C;AAGA,SAAS,EAAc,GAAiD;CACvE,OAAO,EAAQ,EAAI,OAAO;AAC3B;AAKA,IAAM,KAAQ,MAAyC;CACtD,IAAM,EACL,aACA,cACA,IAAI,GACJ,aACA,eAAe,GACf,UACA,aAAU,cACP,GACE,IAAc,EAAM,GACpB,IAAK,KAAU;CAErB,QAAg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;EACJ,WAAW,EACV;GACC,qBAAqB,MAAY;GACjC,oBAAoB,MAAY;GAChC,sBAAsB,MAAY;EACnC,GACA,CACD;EACA,SAAS;EACT,WAAW;EACX,aAAA;EACA,KAAK;EAbN,UAAA,CApDA,kBAAC,GAAD;GAAc;GAAa;GACzB,UAAA,EAAW,KAAK,GAAO,MAAU;IACjC,IAAM,IAAQ,GAAG,EAAG,iBAAiB,KAC/B,IAAU,GAAG,EAAG,mBAAmB,KACnC,IAAa,MAAkB;IAGrC,OACC,kBAAC,GAAD;KAEC,MAAM,MAA6B;MAElC,AADA,EAAQ,QAAQ,KAAS;OAAE,KAAK;OAAO;MAAK,GACxC,KACH,EAAS,EAAK;KAEhB;KACA,OAXkB,KAAc;KAYhC,UAAU;KACV,IAAI;KACK;KACT,UAAU,EAAM,MAAM;KACb;KACT,UAAU,EAAM,MAAM;KACtB,eAAe,EAAM,MAAM;KAE1B,UAAA,EAAM,MAAM;IACT,GAjBC,EAAM,OAAO,CAiBd;GAEP,CAAC;EACQ,CAAA,GAIV,EAAW,KAAK,GAAO,MAAU;GAChC,IAAM,IAAQ,GAAG,EAAG,iBAAiB,KAC/B,IAAU,GAAG,EAAG,mBAAmB;GAGzC,OACC,kBAAC,GAAD;IAEC,UALiB,MAAkB;IAMnC,IAAI;IACG;IACE;IAER,UAAA;GACQ,GAPJ,EAAM,OAAO,CAOT;EAEZ,CAAC,CAoBI;;AAEP;AAEA,EAAK,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/tabs/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\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseId,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n} from 'react';\nimport classNames from 'classnames';\n\n// Child components\nimport TabsList from './private/tabs-list';\nimport Tab from './private/tab';\nimport TabPanel from './private/tab-panel';\nimport type { TabsPanelProps } from './panel';\nimport type { ChildrenOf } from '../../types/common';\n\nimport { TABS } from '../../utilities/constants';\nimport KEYS from '../../utilities/key-code';\nimport EventUtil from '../../utilities/event';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Tabs variant types\n */\nexport type TabsVariant = 'default' | 'scoped' | 'vertical';\n\n/** @deprecated Use `TabsPanelProps` from `tabs/panel`. */\nexport type TabChildProps = TabsPanelProps;\n\n/**\n * Data passed to the Tabs `onSelect` callback\n */\nexport interface TabsSelectData {\n\t/**\n\t * `value` of the tab being selected: the panel's `value`, or its index as a\n\t * string (`'0'`, `'1'`, ...) when the panel has no `value`.\n\t */\n\tvalue: string;\n\t/**\n\t * `value` of the tab that was selected before this selection, or `undefined`\n\t * when no tab was selected.\n\t */\n\tpreviousValue: string | undefined;\n\t/** Index of the tab being selected */\n\tselectedIndex: number;\n\t/** Index of the tab that was selected before this selection, or `-1` when no tab was selected */\n\tpreviousIndex: number;\n}\n\n/**\n * Props shared by both ways of controlling the selected tab\n */\ninterface TabsBaseProps {\n\t/** `TabsPanel` elements, one per tab. Tabs reads each panel's `label`, `value`, `disabled`, `hasError` and `assistiveText`. */\n\tchildren: ChildrenOf<TabsPanelProps>;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** HTML id */\n\tid?: string;\n\t/**\n\t * Called when a tab is requested by click or arrow key. Receives the triggering event and\n\t * `{ value, previousValue, selectedIndex, previousIndex }`. Tabs is controlled: update `value`\n\t * from this callback to change tabs. It is not called for a disabled tab or for the tab that is\n\t * already selected.\n\t */\n\tonSelect: (\n\t\tevent: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>,\n\t\tdata: TabsSelectData\n\t) => void;\n\t/** Tab style variant */\n\tvariant?: TabsVariant;\n}\n\n/**\n * Select the tab by the `value` of its `TabsPanel`.\n */\ninterface TabsValueProps {\n\t/**\n\t * `value` of the selected `TabsPanel` (required, controlled). A panel without a `value` is\n\t * matched by its index as a string (`'0'`, `'1'`, ...). When no panel matches, no tab is selected.\n\t */\n\tvalue: string;\n\tselectedIndex?: never;\n}\n\n/**\n * Select the tab by index (deprecated).\n */\ninterface TabsSelectedIndexProps {\n\tvalue?: undefined;\n\t/**\n\t * @deprecated Use `value` instead (set `value` on each `TabsPanel`, or use the index as a\n\t * string). Index of the selected tab, controlled. Used only when `value` is not passed.\n\t */\n\tselectedIndex: number;\n}\n\n/**\n * Props for the Tabs component\n */\nexport type TabsProps = TabsBaseProps &\n\t(TabsValueProps | TabsSelectedIndexProps);\n\n// The value a panel is matched by: its `value`, or its index as a string.\nconst getPanelValue = (\n\tchild: React.ReactElement<TabsPanelProps>,\n\tindex: number\n): string => child.props.value ?? String(index);\n\n// Determine if a node from event.target is a Tab element\nfunction isTabNode(node: HTMLElement): boolean {\n\treturn (\n\t\t(node.nodeName === 'A' && node.getAttribute('role') === 'tab') ||\n\t\t(node.nodeName === 'LI' &&\n\t\t\t(node.classList.contains('slds-tabs_default__item') ||\n\t\t\t\tnode.classList.contains('slds-tabs_scoped__item') ||\n\t\t\t\tnode.classList.contains('slds-vertical-tabs__nav-item')))\n\t);\n}\n\n// Determine if a tab node is disabled (from DOM)\nfunction isTabNodeDisabled(node: HTMLElement): boolean {\n\tif (node.classList?.contains('slds-disabled')) {\n\t\treturn true;\n\t}\n\tif (node.getAttribute?.('aria-disabled') === 'true') {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n// Determine if a tab React element is disabled\nfunction isTabDisabled(tab: React.ReactElement<TabsPanelProps>): boolean {\n\treturn Boolean(tab.props?.disabled);\n}\n\n/**\n * Tabs keeps related content in a single container that is shown and hidden through navigation.\n */\nconst Tabs = (props: TabsProps): React.ReactElement => {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tid: propId,\n\t\tonSelect,\n\t\tselectedIndex: selectedIndexProp,\n\t\tvalue,\n\t\tvariant = 'default',\n\t} = props;\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tTABS,\n\t\t\t{\n\t\t\t\tdefaultSelectedIndex: (props as { defaultSelectedIndex?: number })\n\t\t\t\t\t.defaultSelectedIndex,\n\t\t\t\tselectedIndex: selectedIndexProp,\n\t\t\t\tvalue,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\t});\n\n\tconst [focus, setFocus] = useState(false);\n\tconst tabsRef = useRef<\n\t\tArray<{ tab: React.ReactElement<TabsPanelProps>; node: HTMLElement | null }>\n\t>([]);\n\tconst tabsNodeRef = useRef<HTMLDivElement>(null);\n\n\tconst childArray = React.Children.toArray(\n\t\tchildren\n\t) as React.ReactElement<TabsPanelProps>[];\n\tconst tabsCount = childArray.length;\n\n\t// Selection is controlled: derived from `value`, or from the deprecated\n\t// `selectedIndex` when `value` is not passed. There is no internal copy.\n\tconst selectedIndex =\n\t\tvalue !== undefined\n\t\t\t? childArray.findIndex(\n\t\t\t\t\t(child, index) => getPanelValue(child, index) === value\n\t\t\t\t)\n\t\t\t: Number.isInteger(selectedIndexProp)\n\t\t\t\t? (selectedIndexProp as number)\n\t\t\t\t: -1;\n\n\tconst getNextTab = useCallback(\n\t\t(index: number): number => {\n\t\t\t// Look for non-disabled tab from index to the last tab\n\t\t\tfor (let i = index + 1; i < tabsCount; i++) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Continue from first tab\n\t\t\tfor (let i = 0; i < index; i++) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn index;\n\t\t},\n\t\t[tabsCount]\n\t);\n\n\tconst getPrevTab = useCallback(\n\t\t(index: number): number => {\n\t\t\t// Look for non-disabled tab backwards\n\t\t\tfor (let i = index - 1; i >= 0; i--) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Continue from last tab\n\t\t\tfor (let i = tabsCount - 1; i > index; i--) {\n\t\t\t\tconst tab = tabsRef.current[i];\n\t\t\t\tif (tab && !isTabDisabled(tab.tab)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn index;\n\t\t},\n\t\t[tabsCount]\n\t);\n\n\tconst setSelected = useCallback(\n\t\t(\n\t\t\tevent: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>,\n\t\t\tindex: number,\n\t\t\tshouldFocus?: boolean\n\t\t) => {\n\t\t\tif (index < 0 || index >= tabsCount || index === selectedIndex) return;\n\n\t\t\tconst previous =\n\t\t\t\tselectedIndex >= 0 ? childArray[selectedIndex] : undefined;\n\t\t\tonSelect?.(event, {\n\t\t\t\tvalue: getPanelValue(childArray[index], index),\n\t\t\t\tpreviousValue: previous\n\t\t\t\t\t? getPanelValue(previous, selectedIndex)\n\t\t\t\t\t: undefined,\n\t\t\t\tselectedIndex: index,\n\t\t\t\tpreviousIndex: selectedIndex,\n\t\t\t});\n\t\t\t// Focus follows the selection once the parent updates `value`.\n\t\t\tsetFocus(shouldFocus === true);\n\t\t},\n\t\t[tabsCount, onSelect, selectedIndex, childArray]\n\t);\n\n\tconst isTabFromContainer = useCallback((node: HTMLElement): boolean => {\n\t\tif (!isTabNode(node)) return false;\n\n\t\tlet nodeAncestor: HTMLElement | null = node.parentElement;\n\t\twhile (nodeAncestor) {\n\t\t\tif (nodeAncestor === tabsNodeRef.current) return true;\n\t\t\tif (nodeAncestor.getAttribute('data-tabs')) break;\n\t\t\tnodeAncestor = nodeAncestor.parentElement;\n\t\t}\n\t\treturn false;\n\t}, []);\n\n\tconst handleClick = useCallback(\n\t\t(e: MouseEvent<HTMLDivElement>) => {\n\t\t\tlet node = e.target as HTMLElement;\n\t\t\tdo {\n\t\t\t\tif (isTabFromContainer(node)) {\n\t\t\t\t\tif (isTabNodeDisabled(node)) return;\n\n\t\t\t\t\tlet parentNode = node.parentNode as HTMLElement;\n\t\t\t\t\tif (parentNode?.nodeName === 'LI') {\n\t\t\t\t\t\tnode = parentNode;\n\t\t\t\t\t\tparentNode = node.parentNode as HTMLElement;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst index = Array.from(parentNode.children).indexOf(node);\n\t\t\t\t\tsetSelected(e, index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tnode = node.parentNode as HTMLElement;\n\t\t\t} while (node !== null);\n\t\t},\n\t\t[isTabFromContainer, setSelected]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: KeyboardEvent<HTMLDivElement>) => {\n\t\t\tif (isTabFromContainer(event.target as HTMLElement)) {\n\t\t\t\tlet index = selectedIndex;\n\t\t\t\tlet preventDefault = false;\n\n\t\t\t\tif (event.key === KEYS.LEFT || event.key === KEYS.UP) {\n\t\t\t\t\tindex = getPrevTab(index);\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t} else if (event.key === KEYS.RIGHT || event.key === KEYS.DOWN) {\n\t\t\t\t\tindex = getNextTab(index);\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t}\n\n\t\t\t\tif (preventDefault) {\n\t\t\t\t\tEventUtil.trap(event);\n\t\t\t\t}\n\n\t\t\t\tsetSelected(event, index, true);\n\t\t\t}\n\t\t},\n\t\t[isTabFromContainer, selectedIndex, getPrevTab, getNextTab, setSelected]\n\t);\n\n\tconst renderTabsList = () => (\n\t\t<TabsList id={id} variant={variant}>\n\t\t\t{childArray.map((child, index) => {\n\t\t\t\tconst tabId = `${id}-slds-tabs_tab-${index}`;\n\t\t\t\tconst panelId = `${id}-slds-tabs_panel-${index}`;\n\t\t\t\tconst isSelected = selectedIndex === index;\n\t\t\t\tconst shouldFocus = isSelected && focus;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Tab\n\t\t\t\t\t\tkey={child.key ?? index}\n\t\t\t\t\t\tref={(node: HTMLElement | null) => {\n\t\t\t\t\t\t\ttabsRef.current[index] = { tab: child, node };\n\t\t\t\t\t\t\tif (focus) {\n\t\t\t\t\t\t\t\tsetFocus(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfocus={shouldFocus}\n\t\t\t\t\t\tselected={isSelected}\n\t\t\t\t\t\tid={tabId}\n\t\t\t\t\t\tpanelId={panelId}\n\t\t\t\t\t\tdisabled={child.props.disabled}\n\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\thasError={child.props.hasError}\n\t\t\t\t\t\tassistiveText={child.props.assistiveText}\n\t\t\t\t\t>\n\t\t\t\t\t\t{child.props.label}\n\t\t\t\t\t</Tab>\n\t\t\t\t);\n\t\t\t})}\n\t\t</TabsList>\n\t);\n\n\tconst renderTabPanels = () =>\n\t\tchildArray.map((child, index) => {\n\t\t\tconst tabId = `${id}-slds-tabs_tab-${index}`;\n\t\t\tconst panelId = `${id}-slds-tabs_panel-${index}`;\n\t\t\tconst isSelected = selectedIndex === index;\n\n\t\t\treturn (\n\t\t\t\t<TabPanel\n\t\t\t\t\tkey={child.key ?? index}\n\t\t\t\t\tselected={isSelected}\n\t\t\t\t\tid={panelId}\n\t\t\t\t\ttabId={tabId}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t>\n\t\t\t\t\t{child}\n\t\t\t\t</TabPanel>\n\t\t\t);\n\t\t});\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\t{\n\t\t\t\t\t'slds-tabs_default': variant === 'default',\n\t\t\t\t\t'slds-tabs_scoped': variant === 'scoped',\n\t\t\t\t\t'slds-vertical-tabs': variant === 'vertical',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t\tonClick={handleClick}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tdata-tabs\n\t\t\tref={tabsNodeRef}\n\t\t>\n\t\t\t{renderTabsList()}\n\t\t\t{renderTabPanels()}\n\t\t</div>\n\t);\n};\n\nTabs.displayName = TABS;\n\nexport default Tabs;\n"],"mappings":";;;;;;;;;;;;AA+GA,IAAM,KACL,GACA,MACY,EAAM,MAAM,SAAS,OAAO,CAAK;AAG9C,SAAS,EAAU,GAA4B;CAC9C,OACE,EAAK,aAAa,OAAO,EAAK,aAAa,MAAM,MAAM,SACvD,EAAK,aAAa,SACjB,EAAK,UAAU,SAAS,yBAAyB,KACjD,EAAK,UAAU,SAAS,wBAAwB,KAChD,EAAK,UAAU,SAAS,8BAA8B;AAE1D;AAGA,SAAS,EAAkB,GAA4B;CAOtD,OAHA,GAHI,EAAK,WAAW,SAAS,eAAe,KAGxC,EAAK,eAAe,eAAe,MAAM;AAI9C;AAGA,SAAS,EAAc,GAAkD;CACxE,OAAO,EAAQ,EAAI,OAAO;AAC3B;AAKA,IAAM,KAAQ,MAAyC;CACtD,IAAM,EACL,aACA,cACA,IAAI,GACJ,aACA,eAAe,GACf,UACA,aAAU,cACP,GACE,IAAc,EAAM,GACpB,IAAK,KAAU;CAErB,QAAgB;EACf,EACC,GACA;GACC,sBAAuB,EACrB;GACF,eAAe;GACf;EACD,GACA,CACD;CACD,CAAC;CAED,IAAM,CAAC,GAAO,KAAY,EAAS,EAAK,GAClC,IAAU,EAEd,CAAC,CAAC,GACE,IAAc,EAAuB,IAAI,GAEzC,IAAa,EAAM,SAAS,QACjC,CACD,GACM,IAAY,EAAW,QAIvB,IACL,MAAU,KAAA,IAIP,OAAO,UAAU,CAAiB,IAChC,IACD,KALD,EAAW,WACV,GAAO,MAAU,EAAc,GAAO,CAAK,MAAM,CACnD,GAKG,IAAa,GACjB,MAA0B;EAE1B,KAAK,IAAI,IAAI,IAAQ,GAAG,IAAI,GAAW,KAAK;GAC3C,IAAM,IAAM,EAAQ,QAAQ;GAC5B,IAAI,K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