@salesforce/design-system-react 11.0.0-alpha.10 → 11.0.0-alpha.11
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/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/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/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/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/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.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/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/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 +1 -1
- package/dist/cjs/components/files/file.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs +1 -1
- package/dist/cjs/components/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/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/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/radio.cjs.map +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.map +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs +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/tabs/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/index.cjs +1 -1
- package/dist/cjs/components/toast/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/check-props.cjs +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.map +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs +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/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/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/hooks/index.cjs +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/keyboard-navigable-dialog.cjs +1 -1
- package/dist/es/components/alert/index.js +17 -17
- package/dist/es/components/alert/index.js.map +1 -1
- package/dist/es/components/builder-header/index.js +5 -5
- package/dist/es/components/builder-header/nav-dropdown.js +5 -5
- 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/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 +2 -2
- 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/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/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.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 +312 -331
- 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/private/menu.js +7 -7
- 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/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 +3 -3
- package/dist/es/components/files/file.js.map +1 -1
- package/dist/es/components/files/private/file-actions.js +4 -4
- 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 +75 -76
- 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 +1 -4
- 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 +29 -30
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/check-props.js +6 -6
- package/dist/es/components/menu-dropdown/check-props.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +223 -226
- 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 +10 -16
- 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/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 +18 -14
- package/dist/es/components/panel/filtering/list.js.map +1 -1
- package/dist/es/components/pill/index.js +8 -8
- 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 +217 -200
- 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 +1 -1
- package/dist/es/components/progress-indicator/private/step.js.map +1 -1
- package/dist/es/components/progress-ring/index.js.map +1 -1
- package/dist/es/components/radio/check-props.js +2 -2
- package/dist/es/components/radio/check-props.js.map +1 -1
- package/dist/es/components/radio/index.js +31 -26
- package/dist/es/components/radio/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.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 +30 -25
- package/dist/es/components/scoped-notification/index.js.map +1 -1
- package/dist/es/components/setup-assistant/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js +8 -8
- 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 +56 -52
- 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 +5 -2
- 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/tabs/index.js +3 -3
- 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 +4 -4
- package/dist/es/components/tooltip/index.js +95 -91
- 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.map +1 -1
- package/dist/es/components/utilities/dialog/index.js +8 -8
- package/dist/es/components/utilities/menu-list/item.js +9 -9
- 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 +15 -15
- 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/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/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/hooks/index.js +4 -3
- 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/keyboard-navigable-dialog.js +5 -5
- package/dist/types/components/alert/index.d.ts +2 -2
- package/dist/types/components/alert/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/button/check-props.d.ts +1 -0
- package/dist/types/components/button/check-props.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 +5 -5
- 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 +2 -2
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
- 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/check-props.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/private/custom-color.d.ts.map +1 -1
- package/dist/types/components/color-picker/private/hsv-color.d.ts.map +1 -1
- package/dist/types/components/color-picker/private/swatch-option.d.ts.map +1 -1
- package/dist/types/components/color-picker/private/swatch-picker.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/check-props.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts +9 -5
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/private/menu.d.ts +10 -2
- package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
- package/dist/types/components/date-picker/check-props.d.ts.map +1 -1
- 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/date-picker/private/calendar-wrapper.d.ts +4 -3
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts.map +1 -1
- package/dist/types/components/date-picker/private/calendar.d.ts +2 -1
- package/dist/types/components/date-picker/private/calendar.d.ts.map +1 -1
- package/dist/types/components/date-picker/private/day.d.ts +2 -1
- package/dist/types/components/date-picker/private/day.d.ts.map +1 -1
- package/dist/types/components/date-picker/private/week.d.ts +2 -1
- package/dist/types/components/date-picker/private/week.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 +6 -5
- package/dist/types/components/files/file.d.ts.map +1 -1
- package/dist/types/components/filter/filter.d.ts +4 -1
- package/dist/types/components/filter/filter.d.ts.map +1 -1
- package/dist/types/components/filter/private/error-id-context.d.ts +7 -0
- package/dist/types/components/filter/private/error-id-context.d.ts.map +1 -0
- 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 +1 -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 +0 -2
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/input/check-props.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +54 -24
- 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 +1 -5
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/check-props.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +31 -15
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/page-header/check-props.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 +79 -21
- package/dist/types/components/page-header/index.d.ts.map +1 -1
- package/dist/types/components/page-header/private/base/index.d.ts.map +1 -1
- package/dist/types/components/page-header/private/controls.d.ts +0 -8
- package/dist/types/components/page-header/private/controls.d.ts.map +1 -1
- package/dist/types/components/page-header/private/detail-block.d.ts +1 -1
- 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 -1
- package/dist/types/components/page-header/private/detail-row.d.ts.map +1 -1
- package/dist/types/components/page-header/private/object-home/index.d.ts.map +1 -1
- package/dist/types/components/page-header/private/record-home/index.d.ts.map +1 -1
- package/dist/types/components/page-header/private/related-list/index.d.ts.map +1 -1
- package/dist/types/components/page-header/private/title.d.ts.map +1 -1
- package/dist/types/components/page-header/private/types.d.ts +0 -16
- package/dist/types/components/page-header/private/types.d.ts.map +1 -1
- 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.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/pill-container/private/selected-listbox.d.ts +6 -5
- package/dist/types/components/pill-container/private/selected-listbox.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 +34 -15
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/check-props.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/check-props.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/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 +15 -5
- 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/check-props.d.ts.map +1 -1
- package/dist/types/components/scoped-notification/index.d.ts +3 -3
- package/dist/types/components/scoped-notification/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/index.d.ts +18 -4
- package/dist/types/components/setup-assistant/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/column-check-props.d.ts.map +1 -1
- 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 +5 -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/private/head.d.ts +4 -15
- package/dist/types/components/simple-data-table/private/head.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/header-cell.d.ts +2 -8
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/link.d.ts +1 -3
- package/dist/types/components/simple-data-table/private/link.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/row.d.ts +2 -19
- package/dist/types/components/simple-data-table/private/row.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/table-context.d.ts +2 -0
- package/dist/types/components/simple-data-table/private/table-context.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +40 -38
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/spinner/check-props.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/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 +10 -5
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +5 -0
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/private/field-level-help-tooltip.d.ts +1 -7
- package/dist/types/components/tooltip/private/field-level-help-tooltip.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/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/vertical-navigation/private/item.d.ts +1 -1
- package/dist/types/components/vertical-navigation/private/item.d.ts.map +1 -1
- package/dist/types/components/visual-picker/check-props.d.ts.map +1 -0
- package/dist/types/components/visual-picker/index.d.ts +28 -11
- 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/info-badge.d.ts +2 -0
- package/dist/types/components/welcome-mat/info-badge.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/dist/types/utilities/hooks/index.d.ts +1 -0
- package/dist/types/utilities/hooks/index.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-latest-ref.d.ts +21 -0
- package/dist/types/utilities/hooks/use-latest-ref.d.ts.map +1 -0
- package/package.json +1 -1
- 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/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/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/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/{illustration → visual-picker}/check-props.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../../../utilities/
|
|
2
|
-
import t from "../../../utilities/
|
|
1
|
+
import e from "../../../utilities/key-code.js";
|
|
2
|
+
import t from "../../../utilities/event.js";
|
|
3
3
|
import n from "../../../utilities/key-callbacks.js";
|
|
4
4
|
import r from "../../pill/index.js";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
@@ -9,24 +9,24 @@ var o = r, s = {
|
|
|
9
9
|
assistiveText: { remove: ", Press delete or backspace to remove" },
|
|
10
10
|
labels: { remove: "Remove" },
|
|
11
11
|
events: {}
|
|
12
|
-
}, c = (
|
|
13
|
-
n(
|
|
14
|
-
[
|
|
12
|
+
}, c = (t, { events: r, data: i }) => {
|
|
13
|
+
n(t, { callbacks: {
|
|
14
|
+
[e.BACKSPACE]: {
|
|
15
15
|
callback: r.onRequestRemove,
|
|
16
16
|
data: i
|
|
17
17
|
},
|
|
18
|
-
[
|
|
18
|
+
[e.DELETE]: {
|
|
19
19
|
callback: r.onRequestRemove,
|
|
20
20
|
data: i
|
|
21
21
|
},
|
|
22
|
-
[
|
|
22
|
+
[e.LEFT]: {
|
|
23
23
|
callback: r.onRequestFocusOnPreviousPill,
|
|
24
24
|
data: {
|
|
25
25
|
...i,
|
|
26
26
|
direction: "previous"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
[
|
|
29
|
+
[e.RIGHT]: {
|
|
30
30
|
callback: r.onRequestFocusOnNextPill,
|
|
31
31
|
data: {
|
|
32
32
|
...i,
|
|
@@ -34,10 +34,10 @@ var o = r, s = {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
} });
|
|
37
|
-
}, l = (
|
|
38
|
-
|
|
39
|
-
}, u = ({ assistiveText:
|
|
40
|
-
let v = a({}, s.assistiveText,
|
|
37
|
+
}, l = (e, { events: n, data: r }) => {
|
|
38
|
+
t.trap(e), n.onRequestRemove?.(e, r);
|
|
39
|
+
}, u = ({ assistiveText: e = s.assistiveText, labels: n = s.labels, events: r = s.events, avatar: u, bare: d, hasError: f, tabIndex: p, icon: m, eventData: h, requestFocus: g, active: _ }) => {
|
|
40
|
+
let v = a({}, s.assistiveText, e), y = a({}, s.labels, n);
|
|
41
41
|
return /* @__PURE__ */ i(o, {
|
|
42
42
|
avatar: u,
|
|
43
43
|
bare: d,
|
|
@@ -55,8 +55,8 @@ var o = r, s = {
|
|
|
55
55
|
onFocus: (e) => {
|
|
56
56
|
r.onFocus && r.onFocus(e, { ...h });
|
|
57
57
|
},
|
|
58
|
-
onRemove: (
|
|
59
|
-
|
|
58
|
+
onRemove: (e) => {
|
|
59
|
+
t.trap(e), l(e, {
|
|
60
60
|
events: r,
|
|
61
61
|
data: h
|
|
62
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/vertical-navigation/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 {\n\tforwardRef,\n\tuseEffect,\n\tuseId,\n\ttype MouseEvent,\n\ttype ReactElement,\n} from 'react';\nimport classNames from 'classnames';\nimport { VERTICAL_NAVIGATION } from '../../utilities/constants';\nimport { checkRequiredProps } from './check-props';\nimport componentDoc from './component.json';\nimport type { BadgeProps } from '../badge';\nimport type { IconProps } from '../icon';\nimport Item from './private/item';\n\n/**\n * Navigation item structure\n */\nexport interface NavigationItem {\n\t/** Unique identifier */\n\tid: string;\n\t/** Display label */\n\tlabel: string;\n\t/** URL for the link */\n\turl
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/vertical-navigation/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 {\n\tforwardRef,\n\tuseEffect,\n\tuseId,\n\ttype MouseEvent,\n\ttype ReactElement,\n} from 'react';\nimport classNames from 'classnames';\nimport { VERTICAL_NAVIGATION } from '../../utilities/constants';\nimport { checkRequiredProps } from './check-props';\nimport componentDoc from './component.json';\nimport type { BadgeProps } from '../badge';\nimport type { IconProps } from '../icon';\nimport Item from './private/item';\n\n/**\n * Navigation item structure\n */\nexport interface NavigationItem {\n\t/** Unique identifier */\n\tid: string;\n\t/** Display label */\n\tlabel: string;\n\t/** URL for the link. Without one the item renders a button. */\n\turl?: string;\n\t/** `Icon` rendered before the label. Its `size` sets the right margin. */\n\ticon?: ReactElement<IconProps>;\n\t/** `Badge` rendered after the label, aligned right */\n\tnotificationBadge?: ReactElement<BadgeProps>;\n}\n\n/**\n * Navigation category structure\n */\nexport interface NavigationCategory {\n\t/** Unique identifier */\n\tid: string;\n\t/** Category label */\n\tlabel: string;\n\t/** Items in this category */\n\titems: NavigationItem[];\n}\n\n/**\n * Selection event data\n */\nexport interface NavigationSelectData {\n\titem: NavigationItem;\n}\n\n/**\n * Props for the VerticalNavigation component\n */\nexport interface VerticalNavigationProps {\n\t/** Array of navigation categories */\n\tcategories: NavigationCategory[];\n\t/** CSS classes for the root `nav.slds-nav-vertical` element */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** HTML id */\n\tid?: string;\n\t/**\n\t * Called when an item is clicked, with the click event and `{ item }`. The navigation is\n\t * controlled: update `selectedId` from this callback to change the selected item.\n\t * Items with a `url` render a link; items without one render a button.\n\t */\n\tonSelect: (\n\t\tevent: MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n\t\tdata: NavigationSelectData\n\t) => void;\n\t/**\n\t * `id` of the selected item (required, controlled). Pass `null` when no item is selected.\n\t */\n\tselectedId: string | null;\n}\n\n/**\n * Vertical Navigation represents a list of links that either take the user\n * to another page or parts of the page the user is in.\n */\nconst VerticalNavigation = forwardRef<HTMLElement, VerticalNavigationProps>(\n\t({ categories, className, id: propId, onSelect, selectedId }, ref) => {\n\t\tconst generatedId = useId();\n\t\tconst rootId = propId || generatedId;\n\n\t\t// Selection is controlled. Before v11 a missing `selectedId` selected the\n\t\t// first item, so warn in development when it is omitted.\n\t\tuseEffect(() => {\n\t\t\tcheckRequiredProps(VERTICAL_NAVIGATION, { selectedId }, componentDoc);\n\t\t});\n\n\t\treturn (\n\t\t\t<nav\n\t\t\t\tid={rootId}\n\t\t\t\tclassName={classNames('slds-nav-vertical', className)}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t{categories.map((category) => {\n\t\t\t\t\tconst categoryId = `${rootId}-${category.id}`;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={`${categoryId}-header`}\n\t\t\t\t\t\t\tclassName=\"slds-nav-vertical__section\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<h2 id={categoryId} className=\"slds-nav-vertical__title\">\n\t\t\t\t\t\t\t\t{category.label}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<ul key={categoryId}>\n\t\t\t\t\t\t\t\t{category.items.map((item) => (\n\t\t\t\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\tisSelected={selectedId != null && item.id === selectedId}\n\t\t\t\t\t\t\t\t\t\tcategoryId={categoryId}\n\t\t\t\t\t\t\t\t\t\tonSelect={onSelect}\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</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</nav>\n\t\t);\n\t}\n);\n\nVerticalNavigation.displayName = VERTICAL_NAVIGATION;\n\nexport default VerticalNavigation;\n"],"mappings":";;;;;;;;AAkFA,IAAM,IAAqB,GACzB,EAAE,eAAY,cAAW,IAAI,GAAQ,aAAU,iBAAc,MAAQ;CACrE,IAAM,IAAc,EAAM,GACpB,IAAS,KAAU;CAQzB,OAJA,QAAgB;EACf,EAAmB,GAAqB,EAAE,cAAW,GAAG,CAAY;CACrE,CAAC,GAGA,kBAAC,OAAD;EACC,IAAI;EACJ,WAAW,EAAW,qBAAqB,CAAS;EAC/C;EAEJ,UAAA,EAAW,KAAK,MAAa;GAC7B,IAAM,IAAa,GAAG,EAAO,GAAG,EAAS;GACzC,OACC,kBAAC,OAAD;IAEC,WAAU;IAFX,UAAA,CAIC,kBAAC,MAAD;KAAI,IAAI;KAAY,WAAU;KAC5B,UAAA,EAAS;IACP,CAAA,GACJ,kBAAC,MAAD,EAAA,UACE,EAAS,MAAM,KAAK,MACpB,kBAAC,GAAD;KAEO;KACN,YAAY,KAAc,QAAQ,EAAK,OAAO;KAClC;KACF;IACV,GALK,EAAK,EAKV,CACD,EACE,GAVK,CAUL,CACA;GAjBC,GAAA,GAAG,EAAW,QAiBf;EAEP,CAAC;CACG,CAAA;AAEP,CACD;AAEA,EAAmB,cAAc"}
|
|
@@ -2,29 +2,34 @@ import { VERTICAL_NAVIGATION_ITEM as e } from "../../../utilities/constants.js";
|
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "classnames";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import a from "lodash.isfunction";
|
|
6
5
|
//#region components/vertical-navigation/private/item.tsx
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className: n("slds-nav-vertical__item", { "slds-is-active": e }),
|
|
11
|
-
children: /* @__PURE__ */ i("a", {
|
|
12
|
-
"data-id": a.id,
|
|
13
|
-
href: a.url || "#",
|
|
14
|
-
className: "slds-nav-vertical__action",
|
|
15
|
-
"aria-describedby": s,
|
|
6
|
+
var a = ({ isSelected: e = !1, item: a, categoryId: o, onSelect: s }) => {
|
|
7
|
+
let c = {
|
|
8
|
+
"aria-describedby": o,
|
|
16
9
|
"aria-current": e ? "page" : void 0,
|
|
17
10
|
onClick: (e) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
children:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
s?.(e, { item: a });
|
|
12
|
+
}
|
|
13
|
+
}, l = /* @__PURE__ */ i(t.Fragment, { children: [a.icon ? /* @__PURE__ */ i(t.Fragment, { children: [t.cloneElement(a.icon, { className: n(a.icon.props.className, `slds-m-right_${a.icon.props.size || "medium"}`) }), a.label] }) : a.label, a.notificationBadge ? t.cloneElement(a.notificationBadge, { className: n(a.notificationBadge.props.className, "slds-col_bump-left") }) : /* @__PURE__ */ r(t.Fragment, {})] });
|
|
14
|
+
return /* @__PURE__ */ r("li", {
|
|
15
|
+
className: n("slds-nav-vertical__item", { "slds-is-active": e }),
|
|
16
|
+
children: a.url ? /* @__PURE__ */ r("a", {
|
|
17
|
+
"data-id": a.id,
|
|
18
|
+
href: a.url,
|
|
19
|
+
className: "slds-nav-vertical__action",
|
|
20
|
+
...c,
|
|
21
|
+
children: l
|
|
22
|
+
}) : /* @__PURE__ */ r("button", {
|
|
23
|
+
"data-id": a.id,
|
|
24
|
+
type: "button",
|
|
25
|
+
className: "slds-button_reset slds-nav-vertical__action",
|
|
26
|
+
...c,
|
|
27
|
+
children: l
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
a.displayName = e;
|
|
27
32
|
//#endregion
|
|
28
|
-
export {
|
|
33
|
+
export { a as default };
|
|
29
34
|
|
|
30
35
|
//# sourceMappingURL=item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","names":[],"sources":["../../../../../components/vertical-navigation/private/item.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';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// This project uses `classnames`, 'a simple javascript utility for conditionally\n// joining classNames together.'\nimport classNames from 'classnames';\n\
|
|
1
|
+
{"version":3,"file":"item.js","names":[],"sources":["../../../../../components/vertical-navigation/private/item.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';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// This project uses `classnames`, 'a simple javascript utility for conditionally\n// joining classNames together.'\nimport classNames from 'classnames';\n\nimport { VERTICAL_NAVIGATION_ITEM } from '../../../utilities/constants';\nimport { type NavigationItem, type NavigationSelectData } from '../index';\n\nexport interface ItemProps {\n\t/**\n\t * Item to be rendered.\n\t */\n\titem: NavigationItem;\n\t/**\n\t * Whether item is selected or not.\n\t */\n\tisSelected?: boolean;\n\t/**\n\t * ID of the category this item belongs to.\n\t */\n\tcategoryId: string;\n\t/**\n\t * Function that will run whenever an item is selected.\n\t */\n\tonSelect?: (\n\t\tevent: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n\t\tdata: NavigationSelectData\n\t) => void;\n}\n\ntype ItemElement = HTMLAnchorElement | HTMLButtonElement;\n\nconst Item = ({\n\tisSelected = false,\n\titem,\n\tcategoryId,\n\tonSelect,\n}: ItemProps) => {\n\tconst actionProps = {\n\t\t'aria-describedby': categoryId,\n\t\t'aria-current': isSelected ? ('page' as const) : undefined,\n\t\tonClick: (event: React.MouseEvent<ItemElement>) => {\n\t\t\tonSelect?.(event, { item });\n\t\t},\n\t};\n\tconst contents = (\n\t\t<React.Fragment>\n\t\t\t{item.icon ? (\n\t\t\t\t<React.Fragment>\n\t\t\t\t\t{React.cloneElement(item.icon, {\n\t\t\t\t\t\tclassName: classNames(\n\t\t\t\t\t\t\titem.icon.props.className,\n\t\t\t\t\t\t\t`slds-m-right_${item.icon.props.size || 'medium'}`\n\t\t\t\t\t\t),\n\t\t\t\t\t})}\n\t\t\t\t\t{item.label}\n\t\t\t\t</React.Fragment>\n\t\t\t) : (\n\t\t\t\titem.label\n\t\t\t)}\n\t\t\t{item.notificationBadge ? (\n\t\t\t\tReact.cloneElement(item.notificationBadge, {\n\t\t\t\t\tclassName: classNames(\n\t\t\t\t\t\titem.notificationBadge.props.className,\n\t\t\t\t\t\t'slds-col_bump-left'\n\t\t\t\t\t),\n\t\t\t\t})\n\t\t\t) : (\n\t\t\t\t<React.Fragment />\n\t\t\t)}\n\t\t</React.Fragment>\n\t);\n\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames('slds-nav-vertical__item', {\n\t\t\t\t'slds-is-active': isSelected,\n\t\t\t})}\n\t\t>\n\t\t\t{/* An item without a `url` goes nowhere, so it is a button rather than a `href=\"#\"` link. */}\n\t\t\t{item.url ? (\n\t\t\t\t<a\n\t\t\t\t\tdata-id={item.id}\n\t\t\t\t\thref={item.url}\n\t\t\t\t\tclassName=\"slds-nav-vertical__action\"\n\t\t\t\t\t{...actionProps}\n\t\t\t\t>\n\t\t\t\t\t{contents}\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<button\n\t\t\t\t\tdata-id={item.id}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName=\"slds-button_reset slds-nav-vertical__action\"\n\t\t\t\t\t{...actionProps}\n\t\t\t\t>\n\t\t\t\t\t{contents}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</li>\n\t);\n};\n\n// ### Display Name\n// Always use the canonical component name as the React display name.\nItem.displayName = VERTICAL_NAVIGATION_ITEM;\n\nexport default Item;\n"],"mappings":";;;;;AAsCA,IAAM,KAAQ,EACb,gBAAa,IACb,SACA,eACA,kBACgB;CAChB,IAAM,IAAc;EACnB,oBAAoB;EACpB,gBAAgB,IAAc,SAAmB,KAAA;EACjD,UAAU,MAAyC;GAClD,IAAW,GAAO,EAAE,QAAK,CAAC;EAC3B;CACD,GACM,IACL,kBAAC,EAAM,UAAP,EAAA,UAAA,CACE,EAAK,OACL,kBAAC,EAAM,UAAP,EAAA,UAAA,CACE,EAAM,aAAa,EAAK,MAAM,EAC9B,WAAW,EACV,EAAK,KAAK,MAAM,WAChB,gBAAgB,EAAK,KAAK,MAAM,QAAQ,UACzC,EACD,CAAC,GACA,EAAK,KACS,EAAA,CAAA,IAEhB,EAAK,OAEL,EAAK,oBACL,EAAM,aAAa,EAAK,mBAAmB,EAC1C,WAAW,EACV,EAAK,kBAAkB,MAAM,WAC7B,oBACD,EACD,CAAC,IAED,kBAAC,EAAM,UAAP,CAAiB,CAAA,CAEH,EAAA,CAAA;CAGjB,OACC,kBAAC,MAAD;EACC,WAAW,EAAW,2BAA2B,EAChD,kBAAkB,EACnB,CAAC;EAGA,UAAA,EAAK,MACL,kBAAC,KAAD;GACC,WAAS,EAAK;GACd,MAAM,EAAK;GACX,WAAU;GACV,GAAI;GAEH,UAAA;EACC,CAAA,IAEH,kBAAC,UAAD;GACC,WAAS,EAAK;GACd,MAAK;GACL,WAAU;GACV,GAAI;GAEH,UAAA;EACM,CAAA;CAEN,CAAA;AAEN;AAIA,EAAK,cAAc"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import e from "../../utilities/warning/required-property.js";
|
|
2
|
+
//#region components/visual-picker/check-props.js
|
|
3
|
+
var t = function() {};
|
|
4
|
+
process.env.NODE_ENV !== "production" && (t = function(t, n) {
|
|
5
|
+
e(t, n.href !== void 0, "href", "Without it the link renders an `<a>` that is not focusable and goes nowhere.");
|
|
6
|
+
});
|
|
7
|
+
var n = t;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as default };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=check-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/visual-picker/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 requiredProperty from '../../utilities/warning/required-property';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props) {\n\t\trequiredProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.href !== undefined,\n\t\t\t'href',\n\t\t\t'Without it the link renders an `<a>` that is not focusable and goes nowhere.'\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;AAMA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO;CAC1D,EACC,GACA,EAAM,SAAS,KAAA,GACf,QACA,8EACD;AACD;AAGD,IAAA,IAAe"}
|
|
@@ -3,36 +3,36 @@ import t, { useId as n } from "react";
|
|
|
3
3
|
import r from "classnames";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region components/visual-picker/index.tsx
|
|
6
|
-
var o = (
|
|
7
|
-
let p = n(),
|
|
8
|
-
if (
|
|
6
|
+
var o = (e) => {
|
|
7
|
+
let { children: o, className: s, coverable: c, id: l, label: u, links: d = !1, size: f = "medium", vertical: p } = e, m = n(), h = l || m;
|
|
8
|
+
if (d) return /* @__PURE__ */ i("div", {
|
|
9
9
|
className: "slds-form-element__control",
|
|
10
|
-
children:
|
|
10
|
+
children: o
|
|
11
11
|
});
|
|
12
|
-
let
|
|
12
|
+
let g = (e, n) => {
|
|
13
13
|
if (!t.isValidElement(e)) return e;
|
|
14
14
|
if (e.type === t.Fragment) {
|
|
15
15
|
let r = e.props;
|
|
16
|
-
return t.cloneElement(e, void 0, t.Children.map(r.children, (e, t) =>
|
|
16
|
+
return t.cloneElement(e, void 0, t.Children.map(r.children, (e, t) => g(e, `${n}-${t}`)));
|
|
17
17
|
}
|
|
18
18
|
let r = e.props;
|
|
19
19
|
return t.cloneElement(e, {
|
|
20
|
-
coverable: r.coverable ??
|
|
20
|
+
coverable: r.coverable ?? c,
|
|
21
21
|
variant: r.variant ?? "visual-picker",
|
|
22
|
-
name: r.name ?? `${
|
|
23
|
-
size: r.size ??
|
|
24
|
-
vertical: r.vertical ??
|
|
22
|
+
name: r.name ?? `${h}_options`,
|
|
23
|
+
size: r.size ?? f,
|
|
24
|
+
vertical: r.vertical ?? p
|
|
25
25
|
});
|
|
26
|
-
},
|
|
26
|
+
}, _ = t.Children.map(o, (e, t) => g(e, t));
|
|
27
27
|
return /* @__PURE__ */ a("fieldset", {
|
|
28
|
-
id:
|
|
29
|
-
className: r("slds-form-element",
|
|
28
|
+
id: h,
|
|
29
|
+
className: r("slds-form-element", s),
|
|
30
30
|
children: [/* @__PURE__ */ i("legend", {
|
|
31
31
|
className: "slds-form-element__legend slds-form-element__label",
|
|
32
|
-
children:
|
|
32
|
+
children: u
|
|
33
33
|
}), /* @__PURE__ */ i("div", {
|
|
34
34
|
className: "slds-form-element__control",
|
|
35
|
-
children:
|
|
35
|
+
children: _
|
|
36
36
|
})]
|
|
37
37
|
});
|
|
38
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/visual-picker/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, type ReactNode, type ReactElement } from 'react';\nimport classNames from 'classnames';\nimport { VISUAL_PICKER } from '../../utilities/constants';\nimport type { ChildrenOf } from '../../types/common';\nimport type { CheckboxProps } from '../checkbox';\nimport type { RadioProps } from '../radio';\nimport type { VisualPickerLinkProps } from './link';\n\n/**\n * Visual picker size options\n */\nexport type VisualPickerSize = 'medium' | 'large';\n\n/** Props the picker passes to each option when the option doesn't set them */\ninterface VisualPickerOptionProps {\n\tcoverable?: boolean;\n\tvariant?: string;\n\tname?: string;\n\tsize?: VisualPickerSize;\n\tvertical?: boolean;\n}\n\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/visual-picker/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, type ReactNode, type ReactElement } from 'react';\nimport classNames from 'classnames';\nimport { VISUAL_PICKER } from '../../utilities/constants';\nimport type { ChildrenOf } from '../../types/common';\nimport type { CheckboxProps } from '../checkbox';\nimport type { RadioProps } from '../radio';\nimport type { VisualPickerLinkProps } from './link';\n\n/**\n * Visual picker size options\n */\nexport type VisualPickerSize = 'medium' | 'large';\n\n/** Props the picker passes to each option when the option doesn't set them */\ninterface VisualPickerOptionProps {\n\tcoverable?: boolean;\n\tvariant?: string;\n\tname?: string;\n\tsize?: VisualPickerSize;\n\tvertical?: boolean;\n}\n\ninterface VisualPickerOptionsProps {\n\t/**\n\t * `Checkbox` or `Radio` elements. Each option gets `variant: 'visual-picker'`, a shared `name`,\n\t * and the picker's `coverable`, `size` and `vertical`, unless the option sets them itself.\n\t */\n\tchildren?: ChildrenOf<CheckboxProps | RadioProps>;\n\t/** CSS classes for the `fieldset` */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Whether items are coverable on selection */\n\tcoverable?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Label for the visual picker */\n\tlabel?: string;\n\t/** Whether the picker has links as children */\n\tlinks?: false;\n\t/** Size of the picker */\n\tsize?: VisualPickerSize;\n\t/** Whether layout is vertical */\n\tvertical?: boolean;\n}\n\n/**\n * A picker of `VisualPickerLink` elements. It renders a bare container with no\n * `fieldset`, legend, `id` or class, so none of the options props apply.\n */\ninterface VisualPickerLinksProps {\n\t/** `VisualPickerLink` elements */\n\tchildren?: ChildrenOf<VisualPickerLinkProps>;\n\t/** Whether the picker has links as children */\n\tlinks: true;\n\tclassName?: never;\n\tcoverable?: never;\n\tid?: never;\n\tlabel?: never;\n\tsize?: never;\n\tvertical?: never;\n}\n\n/**\n * Props for the VisualPicker component: a union on `links`, because the links\n * picker renders a different, bare container.\n */\nexport type VisualPickerProps =\n\tVisualPickerOptionsProps | VisualPickerLinksProps;\n\n/**\n * Visual Picker allows users to select an option from a set of visual choices.\n */\nconst VisualPicker = (props: VisualPickerProps): React.ReactElement => {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tcoverable,\n\t\tid: propId,\n\t\tlabel,\n\t\tlinks = false,\n\t\tsize = 'medium',\n\t\tvertical,\n\t} = props as VisualPickerOptionsProps & { links?: boolean };\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tif (links) {\n\t\treturn <div className=\"slds-form-element__control\">{children}</div>;\n\t}\n\n\t// Clone the picker props onto each real option element. When an option is a\n\t// `React.Fragment` (e.g. children grouped with `<>...</>`), the injected props\n\t// must NOT land on the Fragment — it only accepts `key`/`children` — so recurse\n\t// into its children instead.\n\tconst decorateOption = (\n\t\toption: ReactNode,\n\t\tindex: number | string\n\t): ReactNode => {\n\t\tif (!React.isValidElement(option)) return option;\n\n\t\tif (option.type === React.Fragment) {\n\t\t\tconst fragmentProps = option.props as { children?: ReactNode };\n\t\t\treturn React.cloneElement(\n\t\t\t\toption as ReactElement<{ children?: ReactNode }>,\n\t\t\t\tundefined,\n\t\t\t\tReact.Children.map(fragmentProps.children, (child, childIndex) =>\n\t\t\t\t\tdecorateOption(child, `${index}-${childIndex}`)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tconst optionProps = option.props as VisualPickerOptionProps;\n\t\treturn React.cloneElement(option as ReactElement<VisualPickerOptionProps>, {\n\t\t\tcoverable: optionProps.coverable ?? coverable,\n\t\t\tvariant: optionProps.variant ?? 'visual-picker',\n\t\t\tname: optionProps.name ?? `${id}_options`,\n\t\t\tsize: optionProps.size ?? size,\n\t\t\tvertical: optionProps.vertical ?? vertical,\n\t\t});\n\t};\n\n\tconst options = React.Children.map(children, (option, index) =>\n\t\tdecorateOption(option, index)\n\t);\n\n\treturn (\n\t\t<fieldset id={id} className={classNames('slds-form-element', className)}>\n\t\t\t<legend className=\"slds-form-element__legend slds-form-element__label\">\n\t\t\t\t{label}\n\t\t\t</legend>\n\t\t\t<div className=\"slds-form-element__control\">{options}</div>\n\t\t</fieldset>\n\t);\n};\n\nVisualPicker.displayName = VISUAL_PICKER;\n\nexport default VisualPicker;\n"],"mappings":";;;;;AA0EA,IAAM,KAAgB,MAAiD;CACtE,IAAM,EACL,aACA,cACA,cACA,IAAI,GACJ,UACA,WAAQ,IACR,UAAO,UACP,gBACG,GACE,IAAc,EAAM,GACpB,IAAK,KAAU;CAErB,IAAI,GACH,OAAO,kBAAC,OAAD;EAAK,WAAU;EAA8B;CAAc,CAAA;CAOnE,IAAM,KACL,GACA,MACe;EACf,IAAI,CAAC,EAAM,eAAe,CAAM,GAAG,OAAO;EAE1C,IAAI,EAAO,SAAS,EAAM,UAAU;GACnC,IAAM,IAAgB,EAAO;GAC7B,OAAO,EAAM,aACZ,GACA,KAAA,GACA,EAAM,SAAS,IAAI,EAAc,WAAW,GAAO,MAClD,EAAe,GAAO,GAAG,EAAM,GAAG,GAAY,CAC/C,CACD;EACD;EAEA,IAAM,IAAc,EAAO;EAC3B,OAAO,EAAM,aAAa,GAAiD;GAC1E,WAAW,EAAY,aAAa;GACpC,SAAS,EAAY,WAAW;GAChC,MAAM,EAAY,QAAQ,GAAG,EAAG;GAChC,MAAM,EAAY,QAAQ;GAC1B,UAAU,EAAY,YAAY;EACnC,CAAC;CACF,GAEM,IAAU,EAAM,SAAS,IAAI,IAAW,GAAQ,MACrD,EAAe,GAAQ,CAAK,CAC7B;CAEA,OACC,kBAAC,YAAD;EAAc;EAAI,WAAW,EAAW,qBAAqB,CAAS;EAAtE,UAAA,CACC,kBAAC,UAAD;GAAQ,WAAU;GAChB,UAAA;EACM,CAAA,GACR,kBAAC,OAAD;GAAK,WAAU;GAA8B,UAAA;EAAa,CAAA,CACjD;;AAEZ;AAEA,EAAa,cAAc"}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { VISUAL_PICKER_LINK as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
2
|
+
import t from "./check-props.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "classnames";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
6
|
//#region components/visual-picker/link.tsx
|
|
6
|
-
var
|
|
7
|
+
var o = class extends n.Component {
|
|
7
8
|
static displayName = e;
|
|
9
|
+
constructor(n) {
|
|
10
|
+
super(n), t(e, n);
|
|
11
|
+
}
|
|
8
12
|
render() {
|
|
9
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ a("a", {
|
|
10
14
|
href: this.props.href,
|
|
11
15
|
id: this.props.id,
|
|
12
|
-
className:
|
|
13
|
-
children: [/* @__PURE__ */
|
|
16
|
+
className: r("slds-box", "slds-box_link", "slds-theme_default", "slds-box_x-small", "slds-media", "slds-visual-picker_vertical", this.props.className),
|
|
17
|
+
children: [/* @__PURE__ */ i("div", {
|
|
14
18
|
className: "slds-media__figure slds-media__figure_fixed-width slds-align_absolute-center slds-m-left_xx-small",
|
|
15
19
|
children: this.props.icon
|
|
16
|
-
}), /* @__PURE__ */
|
|
20
|
+
}), /* @__PURE__ */ a("div", {
|
|
17
21
|
className: "slds-media__body slds-border_left slds-p-around_small",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ i("h2", {
|
|
19
23
|
className: "slds-truncate slds-text-heading_small",
|
|
20
24
|
title: this.props.title,
|
|
21
25
|
children: this.props.title
|
|
22
|
-
}), /* @__PURE__ */
|
|
26
|
+
}), /* @__PURE__ */ i("p", {
|
|
23
27
|
className: "slds-m-top_small",
|
|
24
28
|
children: this.props.description
|
|
25
29
|
})]
|
|
@@ -28,6 +32,6 @@ var a = class extends t.Component {
|
|
|
28
32
|
}
|
|
29
33
|
};
|
|
30
34
|
//#endregion
|
|
31
|
-
export {
|
|
35
|
+
export { o as default };
|
|
32
36
|
|
|
33
37
|
//# sourceMappingURL=link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","names":[],"sources":["../../../../components/visual-picker/link.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Visual Picker Link design pattern](https://lightningdesignsystem.com/components/visual-picker/) in React.\n// Based on SLDS v2.4.5\nimport React, { type ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport { VISUAL_PICKER_LINK } from '../../utilities/constants';\n\nexport interface VisualPickerLinkProps {\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * CSS classes to be added to tag with `.slds-form-element`. Uses `classNames` [API](https://github.com/JedWatson/classnames).\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * URL for the Link\n\t */\n\thref
|
|
1
|
+
{"version":3,"file":"link.js","names":[],"sources":["../../../../components/visual-picker/link.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Visual Picker Link design pattern](https://lightningdesignsystem.com/components/visual-picker/) in React.\n// Based on SLDS v2.4.5\nimport React, { type ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport { VISUAL_PICKER_LINK } from '../../utilities/constants';\nimport checkProps from './check-props';\n\nexport interface VisualPickerLinkProps {\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * CSS classes to be added to tag with `.slds-form-element`. Uses `classNames` [API](https://github.com/JedWatson/classnames).\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * URL for the Link (required: without it the `<a>` is not a link)\n\t */\n\thref: string;\n\t/**\n\t * Icon node for the Link\n\t */\n\ticon?: ReactNode;\n\t/**\n\t * Title for the Link\n\t */\n\ttitle?: string;\n\t/**\n\t * Description for the Link\n\t */\n\tdescription?: string;\n}\n\n/**\n * Visual Picker Link Component\n */\nclass VisualPickerLink extends React.Component<VisualPickerLinkProps> {\n\tstatic displayName = VISUAL_PICKER_LINK;\n\n\tconstructor(props: VisualPickerLinkProps) {\n\t\tsuper(props);\n\t\tcheckProps(VISUAL_PICKER_LINK, props as unknown as Record<string, unknown>);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<a\n\t\t\t\thref={this.props.href}\n\t\t\t\tid={this.props.id}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-box',\n\t\t\t\t\t'slds-box_link',\n\t\t\t\t\t'slds-theme_default',\n\t\t\t\t\t'slds-box_x-small',\n\t\t\t\t\t'slds-media',\n\t\t\t\t\t'slds-visual-picker_vertical',\n\t\t\t\t\tthis.props.className as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<div className=\"slds-media__figure slds-media__figure_fixed-width slds-align_absolute-center slds-m-left_xx-small\">\n\t\t\t\t\t{this.props.icon}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"slds-media__body slds-border_left slds-p-around_small\">\n\t\t\t\t\t<h2\n\t\t\t\t\t\tclassName=\"slds-truncate slds-text-heading_small\"\n\t\t\t\t\t\ttitle={this.props.title}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.title}\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"slds-m-top_small\">{this.props.description}</p>\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t);\n\t}\n}\n\nexport default VisualPickerLink;\n"],"mappings":";;;;;;AAyCA,IAAM,IAAN,cAA+B,EAAM,UAAiC;CACrE,OAAO,cAAc;CAErB,YAAY,GAA8B;EAEzC,AADA,MAAM,CAAK,GACX,EAAW,GAAoB,CAA2C;CAC3E;CAEA,SAAS;EACR,OACC,kBAAC,KAAD;GACC,MAAM,KAAK,MAAM;GACjB,IAAI,KAAK,MAAM;GACf,WAAW,EACV,YACA,iBACA,sBACA,oBACA,cACA,+BACA,KAAK,MAAM,SACZ;GAXD,UAAA,CAaC,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,KAAK,MAAM;GACR,CAAA,GACL,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,kBAAC,MAAD;KACC,WAAU;KACV,OAAO,KAAK,MAAM;KAEjB,UAAA,KAAK,MAAM;IACT,CAAA,GACJ,kBAAC,KAAD;KAAG,WAAU;KAAoB,UAAA,KAAK,MAAM;IAAe,CAAA,CACvD;GACH,CAAA,CAAA;;CAEL;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WELCOME_MAT_BADGE 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/generate-id.js";
|
|
4
4
|
import r from "./check-props.js";
|
|
5
5
|
import i from "./component.js";
|
|
6
6
|
import a from "react";
|
|
@@ -19,7 +19,7 @@ var c = e, l = {
|
|
|
19
19
|
static defaultProps = u;
|
|
20
20
|
generatedId;
|
|
21
21
|
constructor(e) {
|
|
22
|
-
super(e), this.generatedId =
|
|
22
|
+
super(e), this.generatedId = n();
|
|
23
23
|
}
|
|
24
24
|
componentDidMount() {
|
|
25
25
|
r(e, this.props, i);
|
|
@@ -45,14 +45,14 @@ var c = e, l = {
|
|
|
45
45
|
src: this.props.image,
|
|
46
46
|
width: "50",
|
|
47
47
|
height: "50",
|
|
48
|
-
alt: ""
|
|
49
|
-
}), /* @__PURE__ */ o(
|
|
48
|
+
alt: this.props.assistiveText?.image ?? ""
|
|
49
|
+
}), this.props.isComplete ? /* @__PURE__ */ o(t, {
|
|
50
50
|
category: "action",
|
|
51
51
|
name: "check",
|
|
52
52
|
assistiveText: { label: this.getCompletedText() },
|
|
53
53
|
containerStyle: l,
|
|
54
54
|
size: "xx-small"
|
|
55
|
-
})]
|
|
55
|
+
}) : null]
|
|
56
56
|
}),
|
|
57
57
|
this.props.children,
|
|
58
58
|
this.props.isComplete ? this.props.completeActions ?? this.props.onCompleteRenderActions?.() : null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-badge.js","names":[],"sources":["../../../../components/welcome-mat/info-badge.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Welcome Mat InfoBadge design pattern](https://lightningdesignsystem.com/components/welcome-mat/) in React.\n// Based on SLDS v2.4.0\nimport React, { type ReactNode } from 'react';\nimport Icon from '../icon';\n\nimport { WELCOME_MAT_BADGE } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nconst displayName = WELCOME_MAT_BADGE;\n\n// SLDS 2 only sizes and positions the complete check inside a tile, so the\n// badge's check needs the geometry SLDS 1 applied to every welcome mat check.\n// Visibility still comes from `.slds-welcome-mat__info-progress_complete`.\nconst completeCheckStyle: React.CSSProperties = {\n\tposition: 'absolute',\n\theight: '1.25rem',\n\twidth: '1.25rem',\n\tpadding: '0.25rem',\n\tborderRadius: '1.25rem',\n\tlineHeight: 0,\n\tbackground: 'var(--slds-g-color-success-1, #3ba755)',\n};\n\nexport interface WelcomeMatInfoBadgeProps {\n\t/**\n\t * **Assistive text for accessibility.**\n\t * * `completed` : For users of assistive technology, assistive text for completed icon.\n\t */\n\tassistiveText?: {\n\t\tcompleted?: string;\n\t};\n\t/**\n\t * Content rendered inside the badge container.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Actions shown when the trail is complete (`isComplete` is true)\n\t */\n\tcompleteActions?: ReactNode;\n\t/**\n\t * CSS class names to be added to the container element. `array`, `object`, or `string` are accepted.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * Icon for the tile\n\t */\n\timage?: string;\n\t/**\n\t * Whether the trail is completed\n\t */\n\tisComplete?: boolean;\n\t/** @deprecated Use `completeActions` instead. */\n\tonCompleteRenderActions?: () => ReactNode;\n}\n\nconst defaultProps: Partial<WelcomeMatInfoBadgeProps> = {\n\tisComplete: false,\n};\n\n/**\n * InfoBadge component item represents a tile in a Welcome Mat\n */\nclass InfoBadge extends React.Component<WelcomeMatInfoBadgeProps> {\n\tstatic displayName = displayName;\n\n\tstatic defaultProps = defaultProps;\n\n\tgeneratedId: string;\n\n\tconstructor(props: WelcomeMatInfoBadgeProps) {\n\t\tsuper(props);\n\n\t\tthis.generatedId = generateId();\n\t}\n\n\tcomponentDidMount() {\n\t\tcheckProps(WELCOME_MAT_BADGE, this.props, componentDoc);\n\t}\n\n\tcomponentDidUpdate() {\n\t\tcheckProps(WELCOME_MAT_BADGE, this.props, componentDoc);\n\t}\n\n\t/**\n\t * Get the Welcome Mat Info Badge's HTML id. Generate a new one if no ID present.\n\t */\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetCompletedText() {\n\t\treturn this.props.assistiveText && this.props.assistiveText.completed\n\t\t\t? this.props.assistiveText.completed\n\t\t\t: 'Completed';\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div id={this.getId()} className={this.props.className as string}>\n\t\t\t\t<div className=\"slds-welcome-mat__info-badge-container\">\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName=\"slds-welcome-mat__info-badge\"\n\t\t\t\t\t\tsrc={this.props.image}\n\t\t\t\t\t\twidth=\"50\"\n\t\t\t\t\t\theight=\"50\"\n\t\t\t\t\t\talt
|
|
1
|
+
{"version":3,"file":"info-badge.js","names":[],"sources":["../../../../components/welcome-mat/info-badge.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Welcome Mat InfoBadge design pattern](https://lightningdesignsystem.com/components/welcome-mat/) in React.\n// Based on SLDS v2.4.0\nimport React, { type ReactNode } from 'react';\nimport Icon from '../icon';\n\nimport { WELCOME_MAT_BADGE } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nconst displayName = WELCOME_MAT_BADGE;\n\n// SLDS 2 only sizes and positions the complete check inside a tile, so the\n// badge's check needs the geometry SLDS 1 applied to every welcome mat check.\n// Visibility still comes from `.slds-welcome-mat__info-progress_complete`.\nconst completeCheckStyle: React.CSSProperties = {\n\tposition: 'absolute',\n\theight: '1.25rem',\n\twidth: '1.25rem',\n\tpadding: '0.25rem',\n\tborderRadius: '1.25rem',\n\tlineHeight: 0,\n\tbackground: 'var(--slds-g-color-success-1, #3ba755)',\n};\n\nexport interface WelcomeMatInfoBadgeProps {\n\t/**\n\t * **Assistive text for accessibility.**\n\t * * `completed` : For users of assistive technology, assistive text for completed icon.\n\t * * `image` : Alt text for the badge `image`. Defaults to `''` (decorative).\n\t */\n\tassistiveText?: {\n\t\tcompleted?: string;\n\t\timage?: string;\n\t};\n\t/**\n\t * Content rendered inside the badge container.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Actions shown when the trail is complete (`isComplete` is true)\n\t */\n\tcompleteActions?: ReactNode;\n\t/**\n\t * CSS class names to be added to the container element. `array`, `object`, or `string` are accepted.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * HTML id for component.\n\t */\n\tid?: string;\n\t/**\n\t * Icon for the tile\n\t */\n\timage?: string;\n\t/**\n\t * Whether the trail is completed\n\t */\n\tisComplete?: boolean;\n\t/** @deprecated Use `completeActions` instead. */\n\tonCompleteRenderActions?: () => ReactNode;\n}\n\nconst defaultProps: Partial<WelcomeMatInfoBadgeProps> = {\n\tisComplete: false,\n};\n\n/**\n * InfoBadge component item represents a tile in a Welcome Mat\n */\nclass InfoBadge extends React.Component<WelcomeMatInfoBadgeProps> {\n\tstatic displayName = displayName;\n\n\tstatic defaultProps = defaultProps;\n\n\tgeneratedId: string;\n\n\tconstructor(props: WelcomeMatInfoBadgeProps) {\n\t\tsuper(props);\n\n\t\tthis.generatedId = generateId();\n\t}\n\n\tcomponentDidMount() {\n\t\tcheckProps(WELCOME_MAT_BADGE, this.props, componentDoc);\n\t}\n\n\tcomponentDidUpdate() {\n\t\tcheckProps(WELCOME_MAT_BADGE, this.props, componentDoc);\n\t}\n\n\t/**\n\t * Get the Welcome Mat Info Badge's HTML id. Generate a new one if no ID present.\n\t */\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetCompletedText() {\n\t\treturn this.props.assistiveText && this.props.assistiveText.completed\n\t\t\t? this.props.assistiveText.completed\n\t\t\t: 'Completed';\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div id={this.getId()} className={this.props.className as string}>\n\t\t\t\t<div className=\"slds-welcome-mat__info-badge-container\">\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName=\"slds-welcome-mat__info-badge\"\n\t\t\t\t\t\tsrc={this.props.image}\n\t\t\t\t\t\twidth=\"50\"\n\t\t\t\t\t\theight=\"50\"\n\t\t\t\t\t\talt={this.props.assistiveText?.image ?? ''}\n\t\t\t\t\t/>\n\t\t\t\t\t{this.props.isComplete ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tcategory=\"action\"\n\t\t\t\t\t\t\tname=\"check\"\n\t\t\t\t\t\t\tassistiveText={{ label: this.getCompletedText() }}\n\t\t\t\t\t\t\tcontainerStyle={completeCheckStyle}\n\t\t\t\t\t\t\tsize=\"xx-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t\t{this.props.children}\n\t\t\t\t{this.props.isComplete\n\t\t\t\t\t? (this.props.completeActions ??\n\t\t\t\t\t\tthis.props.onCompleteRenderActions?.())\n\t\t\t\t\t: null}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default InfoBadge;\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAc,GAKd,IAA0C;CAC/C,UAAU;CACV,QAAQ;CACR,OAAO;CACP,SAAS;CACT,cAAc;CACd,YAAY;CACZ,YAAY;AACb,GAwCM,IAAkD,EACvD,YAAY,GACb,GAKM,IAAN,cAAwB,EAAM,UAAoC;CACjE,OAAO,cAAc;CAErB,OAAO,eAAe;CAEtB;CAEA,YAAY,GAAiC;EAG5C,AAFA,MAAM,CAAK,GAEX,KAAK,cAAc,EAAW;CAC/B;CAEA,oBAAoB;EACnB,EAAW,GAAmB,KAAK,OAAO,CAAY;CACvD;CAEA,qBAAqB;EACpB,EAAW,GAAmB,KAAK,OAAO,CAAY;CACvD;CAKA,QAAQ;EACP,OAAO,KAAK,MAAM,MAAM,KAAK;CAC9B;CAEA,mBAAmB;EAClB,OAAO,KAAK,MAAM,iBAAiB,KAAK,MAAM,cAAc,YACzD,KAAK,MAAM,cAAc,YACzB;CACJ;CAEA,SAAS;EACR,OACC,kBAAC,OAAD;GAAK,IAAI,KAAK,MAAM;GAAG,WAAW,KAAK,MAAM;GAA7C,UAAA;IACC,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACC,kBAAC,OAAD;MACC,WAAU;MACV,KAAK,KAAK,MAAM;MAChB,OAAM;MACN,QAAO;MACP,KAAK,KAAK,MAAM,eAAe,SAAS;KACxC,CAAA,GACA,KAAK,MAAM,aACX,kBAAC,GAAD;MACC,UAAS;MACT,MAAK;MACL,eAAe,EAAE,OAAO,KAAK,iBAAiB,EAAE;MAChD,gBAAgB;MAChB,MAAK;KACL,CAAA,IACE,IACA;;IACJ,KAAK,MAAM;IACX,KAAK,MAAM,aACR,KAAK,MAAM,mBACb,KAAK,MAAM,0BAA0B,IACpC;GACC;;CAEP;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WELCOME_MAT_TILE 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/generate-id.js";
|
|
4
4
|
import r from "react";
|
|
5
5
|
import i from "classnames";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -14,7 +14,7 @@ var s = e, c = {
|
|
|
14
14
|
static defaultProps = c;
|
|
15
15
|
generatedId;
|
|
16
16
|
constructor(e) {
|
|
17
|
-
super(e), this.generatedId =
|
|
17
|
+
super(e), this.generatedId = n();
|
|
18
18
|
}
|
|
19
19
|
getId() {
|
|
20
20
|
return this.props.id || this.generatedId;
|
|
@@ -23,13 +23,13 @@ var s = e, c = {
|
|
|
23
23
|
let e = {
|
|
24
24
|
...c.assistiveText,
|
|
25
25
|
...this.props.assistiveText
|
|
26
|
-
},
|
|
26
|
+
}, n = /* @__PURE__ */ o(r.Fragment, { children: [/* @__PURE__ */ a("div", {
|
|
27
27
|
className: i("slds-media__figure", "slds-media__figure_fixed-width", "slds-align_absolute-center"),
|
|
28
28
|
children: /* @__PURE__ */ a("div", {
|
|
29
29
|
className: "slds-welcome-mat__tile-figure",
|
|
30
30
|
children: /* @__PURE__ */ o("div", {
|
|
31
31
|
className: "slds-welcome-mat__tile-icon-container",
|
|
32
|
-
children: [this.props.icon, this.props.isComplete && this.props.variant !== "info-only" ? /* @__PURE__ */ a(
|
|
32
|
+
children: [this.props.icon, this.props.isComplete && this.props.variant !== "info-only" ? /* @__PURE__ */ a(t, {
|
|
33
33
|
assistiveText: { label: e.completedIcon },
|
|
34
34
|
category: "action",
|
|
35
35
|
name: "check",
|
|
@@ -55,11 +55,11 @@ var s = e, c = {
|
|
|
55
55
|
className: i("slds-welcome-mat__tile", this.props.variant === "info-only" ? "slds-welcome-mat__tile_info-only" : null, this.props.isComplete && this.props.variant !== "info-only" ? "slds-welcome-mat__tile_complete" : null, this.props.className),
|
|
56
56
|
children: this.props.variant === "info-only" ? /* @__PURE__ */ a("div", {
|
|
57
57
|
className: "slds-media",
|
|
58
|
-
children:
|
|
58
|
+
children: n
|
|
59
59
|
}) : /* @__PURE__ */ a("a", {
|
|
60
60
|
href: this.props.href,
|
|
61
61
|
className: "slds-box slds-box_link slds-media",
|
|
62
|
-
children:
|
|
62
|
+
children: n
|
|
63
63
|
})
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region utilities/constants.js
|
|
2
|
-
var e = "SLDSAccordion", t = "SLDSAccordionPanel", n = "SLDSAlert", r = "SLDSAlertContainer", i = "SLDSAvatar", a = "SLDSBadge", o = "SLDSBreadcrumb", s = "SLDSBuilderHeader", c = "SLDSBuilderHeaderMisc", l = "SLDSBuilderHeaderUtilities", u = "SLDSBuilderHeaderNav", d = "SLDSBuilderHeaderNavDropdown", f = "SLDSBuilderHeaderNavLink", p = "SLDSBuilderHeaderToolbar", m = "SLDSButton", h = "SLDSButtonGroup", g = "SLDSButtonStateful", _ = "SLDSButtonIcon", v = "SLDSCard", y = "SLDSCardBody", b = "SLDSCardEmpty", x = "SLDSCardFilter", S = "SLDSCardFooter", C = "SLDSCardHeader", w = "SLDSCarousel", T = "SLDSCarouselIndicators", E = "SLDSCarouselItem", D = "SLDSCarouselNavigators", O = "SLDSCarouselAutoplayButton", k = "SLDSColorPicker", A = "SLDSCombobox", j = "SLDSSimpleDataTable", M = "SLDSSimpleDataTableCell", N = "SLDSSimpleDataTableColumn", P = "SLDSSimpleDataTableHead", F = "SLDSSimpleDataTableHeaderCell", I = "SLDSSimpleDataTableRowActions", L = "SLDSSimpleDataTableRow", R = "SLDSDatePicker", z = "SLDSDynamicIcon", B = "SLDSDialog", V = "SLDSFiles", H = "SLDSFilesFile", U = "SLDSFilesMore", W = "SLDSFilesFigure", G = "SLDSFilesActions", K = "SLDSExpandableSection", q = "SLDSFilter", J = "SLDSCheckbox", Y = "SLDSInput", X = "SLDSTextarea", Z = "SLDSSearch", Q = "SLDSHighlighter", $ = "SLDSIcon", ee = "SLDSIconSettings", te = "SLDSIconInput", ne = "
|
|
2
|
+
var e = "SLDSAccordion", t = "SLDSAccordionPanel", n = "SLDSAlert", r = "SLDSAlertContainer", i = "SLDSAvatar", a = "SLDSBadge", o = "SLDSBreadcrumb", s = "SLDSBuilderHeader", c = "SLDSBuilderHeaderMisc", l = "SLDSBuilderHeaderUtilities", u = "SLDSBuilderHeaderNav", d = "SLDSBuilderHeaderNavDropdown", f = "SLDSBuilderHeaderNavLink", p = "SLDSBuilderHeaderToolbar", m = "SLDSButton", h = "SLDSButtonGroup", g = "SLDSButtonStateful", _ = "SLDSButtonIcon", v = "SLDSCard", y = "SLDSCardBody", b = "SLDSCardEmpty", x = "SLDSCardFilter", S = "SLDSCardFooter", C = "SLDSCardHeader", w = "SLDSCarousel", T = "SLDSCarouselIndicators", E = "SLDSCarouselItem", D = "SLDSCarouselNavigators", O = "SLDSCarouselAutoplayButton", k = "SLDSColorPicker", A = "SLDSCombobox", j = "SLDSSimpleDataTable", M = "SLDSSimpleDataTableCell", N = "SLDSSimpleDataTableColumn", P = "SLDSSimpleDataTableHead", F = "SLDSSimpleDataTableHeaderCell", I = "SLDSSimpleDataTableRowActions", L = "SLDSSimpleDataTableRow", R = "SLDSDatePicker", z = "SLDSDynamicIcon", B = "SLDSDialog", V = "SLDSFiles", H = "SLDSFilesFile", U = "SLDSFilesMore", W = "SLDSFilesFigure", G = "SLDSFilesActions", K = "SLDSExpandableSection", q = "SLDSFilter", J = "SLDSCheckbox", Y = "SLDSInput", X = "SLDSTextarea", Z = "SLDSSearch", Q = "SLDSHighlighter", $ = "SLDSIcon", ee = "SLDSIconSettings", te = "SLDSIconInput", ne = "SLDSList", re = "SLDSListItem", ie = "SLDSListItemLabel", ae = "SLDSLookup", oe = "SLDSMediaObject", se = "SLDSMenuDropdown", ce = "SLDSMenuDropdownTrigger", le = "SLDSModal", ue = "SLDSPanel", de = "SLDSFilterGroup", fe = "SLDSFilterList", pe = "SLDSPanelFilterListHeading", me = "SLDSPageHeader", he = "SLDSPageHeaderControl", ge = "SLDSPill", _e = "SLDSPillContainer", ve = "SLDSPortalSettings", ye = "SLDSPopover", be = "SLDSPopoverEditDialog", xe = "SLDSPopoverTooltip", Se = "SLDSProgressIndicator", Ce = "SLDSProgressIndicatorPath", we = "SLDSProgressIndicatorProgress", Te = "SLDSProgressIndicatorStep", Ee = "SLDSProgressIndicatorStepVertical", De = "SLDSProgressRing", Oe = "SLDSProgressBar", ke = "SLDSSetupAssistant", Ae = "SLDSSetupAssistantStep", je = "SLDSScopedNotification", Me = "SLDSSlider", Ne = "SLDSSpinner", Pe = "SLDSSplitView", Fe = "SLDSSplitViewHeader", Ie = "SLDSSplitViewListbox", Le = "SLDSRadio", Re = "SLDSRadioGroup", ze = "SLDSRadioButtonGroup", Be = "SLDSTab", Ve = "SLDSTabPanel", He = "SLDSTabs", Ue = "SLDSTabsList", We = "SLDSTabsPanel", Ge = "SLDSTimepicker", Ke = "SLDSToast", qe = "SLDSToastContainer", Je = "SLDSTree", Ye = "SLDSTreeBranch", Xe = "SLDSTreeItem", Ze = "SLDSTrialBar", Qe = "SLDSTrialBarDropdown", $e = "SLDSTrialBarButton", et = "SLDSVerticalNavigation", tt = "SLDSVerticalNavigationItem", nt = "SLDSVisualPicker", rt = "SLDSVisualPickerLink", it = "SLDSWelcomeMat", at = "SLDSWelcomeMatTile", ot = "SLDSWelcomeMatBadge";
|
|
3
3
|
//#endregion
|
|
4
|
-
export { e as ACCORDION, t as ACCORDION_PANEL, n as ALERT, r as ALERT_CONTAINER, i as AVATAR, a as BADGE, o as BREADCRUMB, s as BUILDER_HEADER, c as BUILDER_HEADER_MISC, u as BUILDER_HEADER_NAV, d as BUILDER_HEADER_NAV_DROPDOWN, f as BUILDER_HEADER_NAV_LINK, p as BUILDER_HEADER_TOOLBAR, l as BUILDER_HEADER_UTILITIES, m as BUTTON, h as BUTTON_GROUP, _ as BUTTON_ICON, g as BUTTON_STATEFUL, v as CARD, y as CARD_BODY, b as CARD_EMPTY, x as CARD_FILTER, S as CARD_FOOTER, C as CARD_HEADER, w as CAROUSEL, O as CAROUSEL_AUTOPLAY_BUTTON, T as CAROUSEL_INDICATORS, E as CAROUSEL_ITEM, D as CAROUSEL_NAVIGATORS, J as CHECKBOX, k as COLOR_PICKER, A as COMBOBOX, R as DATE_PICKER, B as DIALOG, z as DYNAMIC_ICON, K as EXPANDABLE_SECTION, V as FILES, G as FILES_ACTIONS, W as FILES_FIGURE, H as FILES_FILE, U as FILES_MORE, q as FILTER, Q as HIGHLIGHTER, $ as ICON, te as ICON_INPUT, ee as ICON_SETTINGS,
|
|
4
|
+
export { e as ACCORDION, t as ACCORDION_PANEL, n as ALERT, r as ALERT_CONTAINER, i as AVATAR, a as BADGE, o as BREADCRUMB, s as BUILDER_HEADER, c as BUILDER_HEADER_MISC, u as BUILDER_HEADER_NAV, d as BUILDER_HEADER_NAV_DROPDOWN, f as BUILDER_HEADER_NAV_LINK, p as BUILDER_HEADER_TOOLBAR, l as BUILDER_HEADER_UTILITIES, m as BUTTON, h as BUTTON_GROUP, _ as BUTTON_ICON, g as BUTTON_STATEFUL, v as CARD, y as CARD_BODY, b as CARD_EMPTY, x as CARD_FILTER, S as CARD_FOOTER, C as CARD_HEADER, w as CAROUSEL, O as CAROUSEL_AUTOPLAY_BUTTON, T as CAROUSEL_INDICATORS, E as CAROUSEL_ITEM, D as CAROUSEL_NAVIGATORS, J as CHECKBOX, k as COLOR_PICKER, A as COMBOBOX, R as DATE_PICKER, B as DIALOG, z as DYNAMIC_ICON, K as EXPANDABLE_SECTION, V as FILES, G as FILES_ACTIONS, W as FILES_FIGURE, H as FILES_FILE, U as FILES_MORE, q as FILTER, Q as HIGHLIGHTER, $ as ICON, te as ICON_INPUT, ee as ICON_SETTINGS, Y as INPUT, ne as LIST, re as LIST_ITEM, ie as LIST_ITEM_LABEL, ae as LOOKUP, oe as MEDIA_OBJECT, se as MENU_DROPDOWN, ce as MENU_DROPDOWN_TRIGGER, le as MODAL, me as PAGE_HEADER, he as PAGE_HEADER_CONTROL, ue as PANEL, de as PANEL_FILTER_GROUP, fe as PANEL_FILTER_LIST, pe as PANEL_FILTER_LIST_HEADING, ge as PILL, _e as PILL_CONTAINER, ye as POPOVER, be as POPOVER_EDIT_DIALOG, xe as POPOVER_TOOLTIP, ve as PORTAL_SETTINGS, Oe as PROGRESS_BAR, Se as PROGRESS_INDICATOR, Ce as PROGRESS_INDICATOR_PATH, we as PROGRESS_INDICATOR_PROGRESS, Te as PROGRESS_INDICATOR_STEP, Ee as PROGRESS_INDICATOR_STEP_VERTICAL, De as PROGRESS_RING, Le as RADIO, ze as RADIO_BUTTON_GROUP, Re as RADIO_GROUP, je as SCOPED_NOTIFICATION, Z as SEARCH, ke as SETUP_ASSISTANT, Ae as SETUP_ASSISTANT_STEP, j as SIMPLE_DATA_TABLE, M as SIMPLE_DATA_TABLE_CELL, N as SIMPLE_DATA_TABLE_COLUMN, P as SIMPLE_DATA_TABLE_HEAD, F as SIMPLE_DATA_TABLE_HEADER_CELL, L as SIMPLE_DATA_TABLE_ROW, I as SIMPLE_DATA_TABLE_ROW_ACTIONS, Me as SLIDER, Ne as SPINNER, Pe as SPLIT_VIEW, Fe as SPLIT_VIEW_HEADER, Ie as SPLIT_VIEW_LISTBOX, Be as TAB, He as TABS, Ue as TABS_LIST, We as TABS_PANEL, Ve as TAB_PANEL, X as TEXTAREA, Ge as TIME_PICKER, Ke as TOAST, qe as TOAST_CONTAINER, Je as TREE, Ye as TREE_BRANCH, Xe as TREE_ITEM, Ze as TRIAL_BAR, $e as TRIAL_BAR_BUTTON, Qe as TRIAL_BAR_DROPDOWN, et as VERTICAL_NAVIGATION, tt as VERTICAL_NAVIGATION_ITEM, nt as VISUAL_PICKER, rt as VISUAL_PICKER_LINK, it as WELCOME_MAT, ot as WELCOME_MAT_BADGE, at as WELCOME_MAT_TILE };
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":[],"sources":["../../../utilities/constants.js"],"sourcesContent":["// ## Components\nexport const ACCORDION = 'SLDSAccordion';\nexport const ACCORDION_PANEL = 'SLDSAccordionPanel';\nexport const ALERT = 'SLDSAlert';\nexport const ALERT_CONTAINER = 'SLDSAlertContainer';\nexport const APP_LAUNCHER = 'SLDSAppLauncher';\nexport const APP_LAUNCHER_EXPANDABLE_SECTION =\n\t'SLDSAppLauncherExpandableSection';\n/* Remove at next breaking change */\nexport const APP_LAUNCHER_SECTION = 'SLDSAppLauncherSection';\nexport const APP_LAUNCHER_LINK = 'SLDSAppLauncherLink';\nexport const APP_LAUNCHER_TILE = 'SLDSAppLauncherTile';\nexport const APP_LAUNCHER_HEADER = 'SLDSAppLauncherHeader';\nexport const AVATAR = 'SLDSAvatar';\nexport const BADGE = 'SLDSBadge';\n\nexport const BRAND_BAND = 'SLDSBrandBand';\n\n/* Remove at next breaking change */\nexport const BREAD_CRUMB = 'SLDSBreadcrumb';\n\nexport const BREADCRUMB = 'SLDSBreadcrumb';\nexport const BUILDER_HEADER = 'SLDSBuilderHeader';\nexport const BUILDER_HEADER_MISC = 'SLDSBuilderHeaderMisc';\nexport const BUILDER_HEADER_UTILITIES = 'SLDSBuilderHeaderUtilities';\nexport const BUILDER_HEADER_NAV = 'SLDSBuilderHeaderNav';\nexport const BUILDER_HEADER_NAV_DROPDOWN = 'SLDSBuilderHeaderNavDropdown';\nexport const BUILDER_HEADER_NAV_LINK = 'SLDSBuilderHeaderNavLink';\nexport const BUILDER_HEADER_TOOLBAR = 'SLDSBuilderHeaderToolbar';\nexport const BUTTON = 'SLDSButton';\nexport const BUTTON_GROUP = 'SLDSButtonGroup';\nexport const BUTTON_STATEFUL = 'SLDSButtonStateful';\nexport const BUTTON_ICON = 'SLDSButtonIcon'; // a non-interctive icon wrapper for SLDSUtilityIcon\nexport const CARD = 'SLDSCard';\nexport const CARD_BODY = 'SLDSCardBody';\nexport const CARD_EMPTY = 'SLDSCardEmpty';\nexport const CARD_FILTER = 'SLDSCardFilter';\nexport const CARD_FOOTER = 'SLDSCardFooter';\nexport const CARD_HEADER = 'SLDSCardHeader';\nexport const CAROUSEL = 'SLDSCarousel';\nexport const CAROUSEL_INDICATORS = 'SLDSCarouselIndicators';\nexport const CAROUSEL_ITEM = 'SLDSCarouselItem';\nexport const CAROUSEL_NAVIGATORS = 'SLDSCarouselNavigators';\nexport const CAROUSEL_AUTOPLAY_BUTTON = 'SLDSCarouselAutoplayButton';\nexport const COLOR_PICKER = 'SLDSColorPicker';\nexport const COMBOBOX = 'SLDSCombobox';\nexport const SIMPLE_DATA_TABLE = 'SLDSSimpleDataTable';\nexport const SIMPLE_DATA_TABLE_CELL = 'SLDSSimpleDataTableCell';\nexport const SIMPLE_DATA_TABLE_COLUMN = 'SLDSSimpleDataTableColumn';\nexport const SIMPLE_DATA_TABLE_HEAD = 'SLDSSimpleDataTableHead';\nexport const SIMPLE_DATA_TABLE_HEADER_CELL = 'SLDSSimpleDataTableHeaderCell';\nexport const SIMPLE_DATA_TABLE_ROW_ACTIONS = 'SLDSSimpleDataTableRowActions';\nexport const SIMPLE_DATA_TABLE_ROW = 'SLDSSimpleDataTableRow';\nexport const DATE_PICKER = 'SLDSDatePicker';\nexport const DEPRECATED_WARNING = 'SLDSDeprecatedWarning';\nexport const DYNAMIC_ICON = 'SLDSDynamicIcon';\nexport const DIALOG = 'SLDSDialog';\nexport const FILES = 'SLDSFiles';\nexport const FILES_FILE = `SLDSFilesFile`;\nexport const FILES_MORE = `SLDSFilesMore`;\nexport const FILES_FIGURE = 'SLDSFilesFigure';\nexport const FILES_ACTIONS = 'SLDSFilesActions';\nexport const EXPANDABLE_SECTION = 'SLDSExpandableSection';\nexport const EXPRESSION = 'SLDSExpression';\nexport const EXPRESSION_GROUP = 'SLDSExpressionGroup';\nexport const EXPRESSION_CONDITION = 'SLDSExpressionCondition';\nexport const EXPRESSION_FORMULA = 'SLDSExpressionFormula';\nexport const FILTER = 'SLDSFilter';\nexport const CHECKBOX = 'SLDSCheckbox';\nexport const INPUT = 'SLDSInput';\nexport const TEXTAREA = 'SLDSTextarea';\nexport const SEARCH = 'SLDSSearch';\nexport const GLOBAL_HEADER = 'SLDSGlobalHeader';\nexport const GLOBAL_HEADER_BUTTON = 'SLDSGlobalHeaderButton';\nexport const GLOBAL_HEADER_DROPDOWN = 'SLDSGlobalHeaderDropdown';\nexport const GLOBAL_HEADER_FAVORITES = 'SLDSGlobalHeaderFavorites';\nexport const GLOBAL_HEADER_HELP = 'SLDSGlobalHeaderHelp';\nexport const GLOBAL_HEADER_NOTIFICATIONS = 'SLDSGlobalHeaderNotifications';\nexport const GLOBAL_HEADER_PROFILE = 'SLDSGlobalHeaderProfile';\nexport const GLOBAL_HEADER_SEARCH = 'SLDSGlobalHeaderSearch';\nexport const GLOBAL_HEADER_SETUP = 'SLDSGlobalHeaderSetup';\nexport const GLOBAL_HEADER_TASK = 'SLDSGlobalHeaderTask';\nexport const GLOBAL_HEADER_TOOL = 'SLDSGlobalHeaderTool';\nexport const GLOBAL_NAVIGATION_BAR = 'SLDSGlobalNavigationBar';\nexport const GLOBAL_NAVIGATION_BAR_BUTTON = 'SLDSGlobalNavigationBarButton';\nexport const GLOBAL_NAVIGATION_BAR_DROPDOWN = 'SLDSGlobalNavigationBarDropdown';\nexport const GLOBAL_NAVIGATION_BAR_LABEL = 'SLDSGlobalNavigationBarLabel';\nexport const GLOBAL_NAVIGATION_BAR_LINK = 'SLDSGlobalNavigationBarLink';\nexport const GLOBAL_NAVIGATION_BAR_REGION = 'SLDSGlobalNavigationBarRegion';\nexport const GLOBAL_NAVIGATION_BAR_APP_LAUNCHER =\n\t'SLDSGlobalNavigationBarAppLauncher';\nexport const GRID = 'SLDSGrid';\nexport const HIGHLIGHTER = 'SLDSHighlighter';\nexport const ICON = 'SLDSIcon';\nexport const ICON_SETTINGS = 'SLDSIconSettings';\nexport const ICON_INPUT = 'SLDSIconInput';\nexport const
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../../../utilities/constants.js"],"sourcesContent":["// ## Components\nexport const ACCORDION = 'SLDSAccordion';\nexport const ACCORDION_PANEL = 'SLDSAccordionPanel';\nexport const ALERT = 'SLDSAlert';\nexport const ALERT_CONTAINER = 'SLDSAlertContainer';\nexport const APP_LAUNCHER = 'SLDSAppLauncher';\nexport const APP_LAUNCHER_EXPANDABLE_SECTION =\n\t'SLDSAppLauncherExpandableSection';\n/* Remove at next breaking change */\nexport const APP_LAUNCHER_SECTION = 'SLDSAppLauncherSection';\nexport const APP_LAUNCHER_LINK = 'SLDSAppLauncherLink';\nexport const APP_LAUNCHER_TILE = 'SLDSAppLauncherTile';\nexport const APP_LAUNCHER_HEADER = 'SLDSAppLauncherHeader';\nexport const AVATAR = 'SLDSAvatar';\nexport const BADGE = 'SLDSBadge';\n\nexport const BRAND_BAND = 'SLDSBrandBand';\n\n/* Remove at next breaking change */\nexport const BREAD_CRUMB = 'SLDSBreadcrumb';\n\nexport const BREADCRUMB = 'SLDSBreadcrumb';\nexport const BUILDER_HEADER = 'SLDSBuilderHeader';\nexport const BUILDER_HEADER_MISC = 'SLDSBuilderHeaderMisc';\nexport const BUILDER_HEADER_UTILITIES = 'SLDSBuilderHeaderUtilities';\nexport const BUILDER_HEADER_NAV = 'SLDSBuilderHeaderNav';\nexport const BUILDER_HEADER_NAV_DROPDOWN = 'SLDSBuilderHeaderNavDropdown';\nexport const BUILDER_HEADER_NAV_LINK = 'SLDSBuilderHeaderNavLink';\nexport const BUILDER_HEADER_TOOLBAR = 'SLDSBuilderHeaderToolbar';\nexport const BUTTON = 'SLDSButton';\nexport const BUTTON_GROUP = 'SLDSButtonGroup';\nexport const BUTTON_STATEFUL = 'SLDSButtonStateful';\nexport const BUTTON_ICON = 'SLDSButtonIcon'; // a non-interctive icon wrapper for SLDSUtilityIcon\nexport const CARD = 'SLDSCard';\nexport const CARD_BODY = 'SLDSCardBody';\nexport const CARD_EMPTY = 'SLDSCardEmpty';\nexport const CARD_FILTER = 'SLDSCardFilter';\nexport const CARD_FOOTER = 'SLDSCardFooter';\nexport const CARD_HEADER = 'SLDSCardHeader';\nexport const CAROUSEL = 'SLDSCarousel';\nexport const CAROUSEL_INDICATORS = 'SLDSCarouselIndicators';\nexport const CAROUSEL_ITEM = 'SLDSCarouselItem';\nexport const CAROUSEL_NAVIGATORS = 'SLDSCarouselNavigators';\nexport const CAROUSEL_AUTOPLAY_BUTTON = 'SLDSCarouselAutoplayButton';\nexport const COLOR_PICKER = 'SLDSColorPicker';\nexport const COMBOBOX = 'SLDSCombobox';\nexport const SIMPLE_DATA_TABLE = 'SLDSSimpleDataTable';\nexport const SIMPLE_DATA_TABLE_CELL = 'SLDSSimpleDataTableCell';\nexport const SIMPLE_DATA_TABLE_COLUMN = 'SLDSSimpleDataTableColumn';\nexport const SIMPLE_DATA_TABLE_HEAD = 'SLDSSimpleDataTableHead';\nexport const SIMPLE_DATA_TABLE_HEADER_CELL = 'SLDSSimpleDataTableHeaderCell';\nexport const SIMPLE_DATA_TABLE_ROW_ACTIONS = 'SLDSSimpleDataTableRowActions';\nexport const SIMPLE_DATA_TABLE_ROW = 'SLDSSimpleDataTableRow';\nexport const DATE_PICKER = 'SLDSDatePicker';\nexport const DEPRECATED_WARNING = 'SLDSDeprecatedWarning';\nexport const DYNAMIC_ICON = 'SLDSDynamicIcon';\nexport const DIALOG = 'SLDSDialog';\nexport const FILES = 'SLDSFiles';\nexport const FILES_FILE = `SLDSFilesFile`;\nexport const FILES_MORE = `SLDSFilesMore`;\nexport const FILES_FIGURE = 'SLDSFilesFigure';\nexport const FILES_ACTIONS = 'SLDSFilesActions';\nexport const EXPANDABLE_SECTION = 'SLDSExpandableSection';\nexport const EXPRESSION = 'SLDSExpression';\nexport const EXPRESSION_GROUP = 'SLDSExpressionGroup';\nexport const EXPRESSION_CONDITION = 'SLDSExpressionCondition';\nexport const EXPRESSION_FORMULA = 'SLDSExpressionFormula';\nexport const FILTER = 'SLDSFilter';\nexport const CHECKBOX = 'SLDSCheckbox';\nexport const INPUT = 'SLDSInput';\nexport const TEXTAREA = 'SLDSTextarea';\nexport const SEARCH = 'SLDSSearch';\nexport const GLOBAL_HEADER = 'SLDSGlobalHeader';\nexport const GLOBAL_HEADER_BUTTON = 'SLDSGlobalHeaderButton';\nexport const GLOBAL_HEADER_DROPDOWN = 'SLDSGlobalHeaderDropdown';\nexport const GLOBAL_HEADER_FAVORITES = 'SLDSGlobalHeaderFavorites';\nexport const GLOBAL_HEADER_HELP = 'SLDSGlobalHeaderHelp';\nexport const GLOBAL_HEADER_NOTIFICATIONS = 'SLDSGlobalHeaderNotifications';\nexport const GLOBAL_HEADER_PROFILE = 'SLDSGlobalHeaderProfile';\nexport const GLOBAL_HEADER_SEARCH = 'SLDSGlobalHeaderSearch';\nexport const GLOBAL_HEADER_SETUP = 'SLDSGlobalHeaderSetup';\nexport const GLOBAL_HEADER_TASK = 'SLDSGlobalHeaderTask';\nexport const GLOBAL_HEADER_TOOL = 'SLDSGlobalHeaderTool';\nexport const GLOBAL_NAVIGATION_BAR = 'SLDSGlobalNavigationBar';\nexport const GLOBAL_NAVIGATION_BAR_BUTTON = 'SLDSGlobalNavigationBarButton';\nexport const GLOBAL_NAVIGATION_BAR_DROPDOWN = 'SLDSGlobalNavigationBarDropdown';\nexport const GLOBAL_NAVIGATION_BAR_LABEL = 'SLDSGlobalNavigationBarLabel';\nexport const GLOBAL_NAVIGATION_BAR_LINK = 'SLDSGlobalNavigationBarLink';\nexport const GLOBAL_NAVIGATION_BAR_REGION = 'SLDSGlobalNavigationBarRegion';\nexport const GLOBAL_NAVIGATION_BAR_APP_LAUNCHER =\n\t'SLDSGlobalNavigationBarAppLauncher';\nexport const GRID = 'SLDSGrid';\nexport const HIGHLIGHTER = 'SLDSHighlighter';\nexport const ICON = 'SLDSIcon';\nexport const ICON_SETTINGS = 'SLDSIconSettings';\nexport const ICON_INPUT = 'SLDSIconInput';\nexport const LIST = 'SLDSList';\nexport const LIST_ITEM = 'SLDSListItem';\nexport const LIST_ITEM_LABEL = 'SLDSListItemLabel';\nexport const LISTBOX_OF_PILL_OPTIONS = 'SLDSListboxOfPillOptions';\nexport const LOCATION_MAP = 'SLDSLocationMap';\nexport const LOOKUP = 'SLDSLookup';\nexport const MEDIA_OBJECT = 'SLDSMediaObject';\nexport const MENU_DROPDOWN = 'SLDSMenuDropdown';\nexport const MENU_DROPDOWN_TRIGGER = 'SLDSMenuDropdownTrigger';\nexport const MENU_PICKLIST = 'SLDSMenuPicklist';\nexport const MODAL = 'SLDSModal';\nexport const NOTIFICATION = 'SLDSNotification';\nexport const PANEL = 'SLDSPanel';\nexport const PANEL_FILTER_GROUP = 'SLDSFilterGroup';\nexport const PANEL_FILTER_LIST = 'SLDSFilterList';\nexport const PANEL_FILTER_LIST_HEADING = 'SLDSPanelFilterListHeading';\nexport const PAGE_HEADER = 'SLDSPageHeader';\nexport const PAGE_HEADER_CONTROL = 'SLDSPageHeaderControl';\nexport const PILL = 'SLDSPill';\nexport const PILL_CONTAINER = 'SLDSPillContainer';\nexport const PORTAL_SETTINGS = 'SLDSPortalSettings';\nexport const POPOVER = 'SLDSPopover';\nexport const POPOVER_EDIT_DIALOG = 'SLDSPopoverEditDialog';\nexport const POPOVER_TOOLTIP = 'SLDSPopoverTooltip';\nexport const PROGRESS_INDICATOR = 'SLDSProgressIndicator';\nexport const PROGRESS_INDICATOR_PATH = 'SLDSProgressIndicatorPath';\nexport const PROGRESS_INDICATOR_PROGRESS = 'SLDSProgressIndicatorProgress';\nexport const PROGRESS_INDICATOR_STEP = 'SLDSProgressIndicatorStep';\nexport const PROGRESS_INDICATOR_STEP_VERTICAL =\n\t'SLDSProgressIndicatorStepVertical';\nexport const PROGRESS_RING = 'SLDSProgressRing';\nexport const PROGRESS_BAR = 'SLDSProgressBar';\nexport const SETUP_ASSISTANT = 'SLDSSetupAssistant';\nexport const SETUP_ASSISTANT_STEP = 'SLDSSetupAssistantStep';\nexport const SCOPED_NOTIFICATION = 'SLDSScopedNotification';\nexport const SLIDER = 'SLDSSlider';\nexport const SPINNER = 'SLDSSpinner';\nexport const SPLIT_VIEW = 'SLDSSplitView';\nexport const SPLIT_VIEW_HEADER = 'SLDSSplitViewHeader';\nexport const SPLIT_VIEW_LISTBOX = 'SLDSSplitViewListbox';\nexport const RADIO = 'SLDSRadio';\nexport const RADIO_GROUP = 'SLDSRadioGroup';\nexport const RADIO_BUTTON_GROUP = 'SLDSRadioButtonGroup';\nexport const TAB = 'SLDSTab';\nexport const TAB_ITEM = 'SLDSTabItem';\nexport const TAB_PANEL = 'SLDSTabPanel';\nexport const TABS = 'SLDSTabs';\nexport const TABS_LIST = 'SLDSTabsList';\nexport const TABS_PANEL = 'SLDSTabsPanel';\nexport const TIME_PICKER = 'SLDSTimepicker';\nexport const TOAST = 'SLDSToast';\nexport const TOAST_CONTAINER = 'SLDSToastContainer';\nexport const TREE = 'SLDSTree';\nexport const TREE_BRANCH = 'SLDSTreeBranch';\nexport const TREE_ITEM = 'SLDSTreeItem';\nexport const TRIAL_BAR = 'SLDSTrialBar';\nexport const TRIAL_BAR_DROPDOWN = 'SLDSTrialBarDropdown';\nexport const TRIAL_BAR_BUTTON = 'SLDSTrialBarButton';\nexport const VERTICAL_NAVIGATION = 'SLDSVerticalNavigation';\nexport const VERTICAL_NAVIGATION_ITEM = 'SLDSVerticalNavigationItem';\nexport const VISUAL_PICKER = 'SLDSVisualPicker';\nexport const VISUAL_PICKER_LINK = 'SLDSVisualPickerLink';\nexport const WELCOME_MAT = 'SLDSWelcomeMat';\nexport const WELCOME_MAT_TILE = 'SLDSWelcomeMatTile';\nexport const WELCOME_MAT_BADGE = 'SLDSWelcomeMatBadge';\nexport const DOCKED_COMPOSER = 'SLDSDockedComposer';\n"],"mappings":";AACA,IAAa,IAAY,iBACZ,IAAkB,sBAClB,IAAQ,aACR,IAAkB,sBASlB,IAAS,cACT,IAAQ,aAOR,IAAa,kBACb,IAAiB,qBACjB,IAAsB,yBACtB,IAA2B,8BAC3B,IAAqB,wBACrB,IAA8B,gCAC9B,IAA0B,4BAC1B,IAAyB,4BACzB,IAAS,cACT,IAAe,mBACf,IAAkB,sBAClB,IAAc,kBACd,IAAO,YACP,IAAY,gBACZ,IAAa,iBACb,IAAc,kBACd,IAAc,kBACd,IAAc,kBACd,IAAW,gBACX,IAAsB,0BACtB,IAAgB,oBAChB,IAAsB,0BACtB,IAA2B,8BAC3B,IAAe,mBACf,IAAW,gBACX,IAAoB,uBACpB,IAAyB,2BACzB,IAA2B,6BAC3B,IAAyB,2BACzB,IAAgC,iCAChC,IAAgC,iCAChC,IAAwB,0BACxB,IAAc,kBAEd,IAAe,mBACf,IAAS,cACT,IAAQ,aACR,IAAa,iBACb,IAAa,iBACb,IAAe,mBACf,IAAgB,oBAChB,IAAqB,yBAKrB,IAAS,cACT,IAAW,gBACX,IAAQ,aACR,IAAW,gBACX,IAAS,cAqBT,IAAc,mBACd,IAAO,YACP,KAAgB,oBAChB,KAAa,iBACb,KAAO,YACP,KAAY,gBACZ,KAAkB,qBAGlB,KAAS,cACT,KAAe,mBACf,KAAgB,oBAChB,KAAwB,2BAExB,KAAQ,aAER,KAAQ,aACR,KAAqB,mBACrB,KAAoB,kBACpB,KAA4B,8BAC5B,KAAc,kBACd,KAAsB,yBACtB,KAAO,YACP,KAAiB,qBACjB,KAAkB,sBAClB,KAAU,eACV,KAAsB,yBACtB,KAAkB,sBAClB,KAAqB,yBACrB,KAA0B,6BAC1B,KAA8B,iCAC9B,KAA0B,6BAC1B,KACZ,qCACY,KAAgB,oBAChB,KAAe,mBACf,KAAkB,sBAClB,KAAuB,0BACvB,KAAsB,0BACtB,KAAS,cACT,KAAU,eACV,KAAa,iBACb,KAAoB,uBACpB,KAAqB,wBACrB,KAAQ,aACR,KAAc,kBACd,KAAqB,wBACrB,KAAM,WAEN,KAAY,gBACZ,KAAO,YACP,KAAY,gBACZ,KAAa,iBACb,KAAc,kBACd,KAAQ,aACR,KAAkB,sBAClB,KAAO,YACP,KAAc,kBACd,KAAY,gBACZ,KAAY,gBACZ,KAAqB,wBACrB,KAAmB,sBACnB,KAAsB,0BACtB,KAA2B,8BAC3B,KAAgB,oBAChB,KAAqB,wBACrB,KAAc,kBACd,KAAmB,sBACnB,KAAoB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import t from "./
|
|
1
|
+
import e from "./tabbable.js";
|
|
2
|
+
import t from "./key-code.js";
|
|
3
3
|
import { canUseDOM as n } from "./execution-environment.js";
|
|
4
4
|
//#region utilities/dom-element-focus.js
|
|
5
5
|
var r = null, i = null, a = (i) => {
|
|
6
|
-
if (!n || !r || i.keyCode !==
|
|
7
|
-
let a =
|
|
6
|
+
if (!n || !r || i.keyCode !== t.TAB) return;
|
|
7
|
+
let a = e(r);
|
|
8
8
|
(a[i.shiftKey ? 0 : a.length - 1] === document.activeElement || r === document.activeElement) && (i.preventDefault(), a[i.shiftKey ? a.length - 1 : 0].focus());
|
|
9
9
|
}, o = {
|
|
10
10
|
focusAncestor: ({ isPortal: e }) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import e from "./use-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { useControllableState as e } from "./use-controllable-state.js";
|
|
2
|
+
import t from "./use-click-outside.js";
|
|
3
|
+
import { useLatestRef as n } from "./use-latest-ref.js";
|
|
4
|
+
export { t as useClickOutside, e as useControllableState, n as useLatestRef };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-click-outside.js","names":[],"sources":["../../../../utilities/hooks/use-click-outside.ts"],"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 { useEffect, useCallback, type RefObject } from 'react';\n\n/**\n * Options for useClickOutside hook\n */\nexport interface UseClickOutsideOptions {\n\t/** Whether the click outside handler is active */\n\tenabled?: boolean;\n\t/** CSS class to ignore when detecting outside clicks */\n\tignoreClass?: string;\n\t/** Event type to listen for */\n\teventType?: 'mousedown' | 'mouseup' | 'click';\n}\n\n/**\n * Modern React 19 compatible hook for detecting clicks outside an element.\n * Replaces the deprecated react-onclickoutside library which uses findDOMNode.\n *\n * @param ref - React ref to the element to detect clicks outside of\n * @param callback - Function to call when a click outside is detected\n * @param options - Configuration options\n *\n * @example\n * ```tsx\n * const menuRef = useRef<HTMLDivElement>(null);\n *\n * useClickOutside(menuRef, () => {\n * setIsOpen(false);\n * }, { enabled: isOpen });\n * ```\n */\nexport function useClickOutside<T extends HTMLElement>(\n\tref: RefObject<T | null>,\n\tcallback: (event: MouseEvent | TouchEvent) => void,\n\toptions: UseClickOutsideOptions = {}\n): void {\n\tconst {\n\t\tenabled = true,\n\t\tignoreClass = 'ignore-react-onclickoutside',\n\t\teventType = 'mousedown',\n\t} = options;\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\tconst target = event.target as Node;\n\n\t\t\t// Check if click target has the ignore class\n\t\t\tif (target instanceof Element) {\n\t\t\t\tif (target.classList?.contains(ignoreClass)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Check if any ancestor has the ignore class\n\t\t\t\tif (target.closest(`.${ignoreClass}`)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if click is inside the ref element\n\t\t\tif (ref.current && !ref.current.contains(target)) {\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t},\n\t\t[ref, callback, ignoreClass]\n\t);\n\n\tuseEffect(() => {\n\t\tif (!enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add event listeners\n\t\tdocument.addEventListener(eventType, handleClickOutside);\n\t\tdocument.addEventListener('touchstart', handleClickOutside);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(eventType, handleClickOutside);\n\t\t\tdocument.removeEventListener('touchstart', handleClickOutside);\n\t\t};\n\t}, [enabled, eventType, handleClickOutside]);\n}\n\nexport default useClickOutside;\n
|
|
1
|
+
{"version":3,"file":"use-click-outside.js","names":[],"sources":["../../../../utilities/hooks/use-click-outside.ts"],"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 { useEffect, useCallback, type RefObject } from 'react';\n\n/**\n * Options for useClickOutside hook\n */\nexport interface UseClickOutsideOptions {\n\t/** Whether the click outside handler is active */\n\tenabled?: boolean;\n\t/** CSS class to ignore when detecting outside clicks */\n\tignoreClass?: string;\n\t/** Event type to listen for */\n\teventType?: 'mousedown' | 'mouseup' | 'click';\n}\n\n/**\n * Modern React 19 compatible hook for detecting clicks outside an element.\n * Replaces the deprecated react-onclickoutside library which uses findDOMNode.\n *\n * @param ref - React ref to the element to detect clicks outside of\n * @param callback - Function to call when a click outside is detected\n * @param options - Configuration options\n *\n * @example\n * ```tsx\n * const menuRef = useRef<HTMLDivElement>(null);\n *\n * useClickOutside(menuRef, () => {\n * setIsOpen(false);\n * }, { enabled: isOpen });\n * ```\n */\nexport function useClickOutside<T extends HTMLElement>(\n\tref: RefObject<T | null>,\n\tcallback: (event: MouseEvent | TouchEvent) => void,\n\toptions: UseClickOutsideOptions = {}\n): void {\n\tconst {\n\t\tenabled = true,\n\t\tignoreClass = 'ignore-react-onclickoutside',\n\t\teventType = 'mousedown',\n\t} = options;\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\tconst target = event.target as Node;\n\n\t\t\t// Check if click target has the ignore class\n\t\t\tif (target instanceof Element) {\n\t\t\t\tif (target.classList?.contains(ignoreClass)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Check if any ancestor has the ignore class\n\t\t\t\tif (target.closest(`.${ignoreClass}`)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if click is inside the ref element\n\t\t\tif (ref.current && !ref.current.contains(target)) {\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t},\n\t\t[ref, callback, ignoreClass]\n\t);\n\n\tuseEffect(() => {\n\t\tif (!enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add event listeners\n\t\tdocument.addEventListener(eventType, handleClickOutside);\n\t\tdocument.addEventListener('touchstart', handleClickOutside);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(eventType, handleClickOutside);\n\t\t\tdocument.removeEventListener('touchstart', handleClickOutside);\n\t\t};\n\t}, [enabled, eventType, handleClickOutside]);\n}\n\nexport default useClickOutside;\n"],"mappings":";;AAkCA,SAAgB,EACf,GACA,GACA,IAAkC,CAAC,GAC5B;CACP,IAAM,EACL,aAAU,IACV,iBAAc,+BACd,eAAY,gBACT,GAEE,IAAqB,GACzB,MAAmC;EACnC,IAAM,IAAS,EAAM;EAGjB,aAAkB,YACjB,EAAO,WAAW,SAAS,CAAW,KAItC,EAAO,QAAQ,IAAI,GAAa,MAMjC,EAAI,WAAW,CAAC,EAAI,QAAQ,SAAS,CAAM,KAC9C,EAAS,CAAK;CAEhB,GACA;EAAC;EAAK;EAAU;CAAW,CAC5B;CAEA,QAAgB;EACV,OAQL,OAHA,SAAS,iBAAiB,GAAW,CAAkB,GACvD,SAAS,iBAAiB,cAAc,CAAkB,SAE7C;GAEZ,AADA,SAAS,oBAAoB,GAAW,CAAkB,GAC1D,SAAS,oBAAoB,cAAc,CAAkB;EAC9D;CACD,GAAG;EAAC;EAAS;EAAW;CAAkB,CAAC;AAC5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useInsertionEffect as e, useRef as t } from "react";
|
|
2
|
+
//#region utilities/hooks/use-latest-ref.ts
|
|
3
|
+
function n(n) {
|
|
4
|
+
let r = t(n);
|
|
5
|
+
return e(() => {
|
|
6
|
+
r.current = n;
|
|
7
|
+
}), r;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as useLatestRef };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=use-latest-ref.js.map
|