@salesforce/design-system-react 11.0.0-alpha.5 → 11.0.0-alpha.7
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/accordion/panel.cjs +1 -1
- package/dist/cjs/components/accordion/panel.cjs.map +1 -1
- package/dist/cjs/components/avatar/index.cjs +1 -1
- package/dist/cjs/components/avatar/index.cjs.map +1 -1
- package/dist/cjs/components/badge/index.cjs +1 -1
- package/dist/cjs/components/badge/index.cjs.map +1 -1
- package/dist/cjs/components/breadcrumb/index.cjs +1 -1
- package/dist/cjs/components/breadcrumb/index.cjs.map +1 -1
- package/dist/cjs/components/builder-header/check-props.cjs +2 -0
- package/dist/cjs/components/builder-header/check-props.cjs.map +1 -0
- package/dist/cjs/components/builder-header/component.cjs +2 -0
- package/dist/cjs/components/builder-header/component.cjs.map +1 -0
- package/dist/cjs/components/builder-header/toolbar.cjs +1 -1
- package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
- package/dist/cjs/components/button/index.cjs +1 -1
- package/dist/cjs/components/button/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/carousel/check-props.cjs +2 -0
- package/dist/cjs/components/carousel/check-props.cjs.map +1 -0
- package/dist/cjs/components/carousel/component.cjs +2 -0
- package/dist/cjs/components/carousel/component.cjs.map +1 -0
- package/dist/cjs/components/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs +2 -0
- package/dist/cjs/components/checkbox/check-props.cjs.map +1 -0
- package/dist/cjs/components/checkbox/component.cjs +2 -0
- package/dist/cjs/components/checkbox/component.cjs.map +1 -0
- package/dist/cjs/components/checkbox/index.cjs +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/combobox/add-subheadings.cjs +1 -1
- package/dist/cjs/components/combobox/add-subheadings.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/filter.cjs +1 -1
- package/dist/cjs/components/combobox/filter.cjs.map +1 -1
- package/dist/cjs/components/combobox/index.cjs.map +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
- package/dist/cjs/components/date-picker/check-props.cjs +1 -1
- package/dist/cjs/components/date-picker/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/dynamic-icon/index.cjs +1 -1
- package/dist/cjs/components/dynamic-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/search.cjs +1 -1
- package/dist/cjs/components/input/search.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/check-props.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/check-props.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/page-header/check-props.cjs +2 -0
- package/dist/cjs/components/page-header/check-props.cjs.map +1 -0
- package/dist/cjs/components/page-header/component.cjs +2 -0
- package/dist/cjs/components/page-header/component.cjs.map +1 -0
- 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/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/pill-container/check-props.cjs +2 -0
- package/dist/cjs/components/pill-container/check-props.cjs.map +1 -0
- package/dist/cjs/components/pill-container/component.cjs +2 -0
- package/dist/cjs/components/pill-container/component.cjs.map +1 -0
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/popover/index.cjs.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/component.cjs +2 -0
- package/dist/cjs/components/progress-indicator/component.cjs.map +1 -0
- package/dist/cjs/components/progress-indicator/index.cjs +1 -1
- package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/step-vertical.cjs +1 -1
- package/dist/cjs/components/progress-indicator/private/step-vertical.cjs.map +1 -1
- package/dist/cjs/components/radio/check-props.cjs +2 -0
- package/dist/cjs/components/radio/check-props.cjs.map +1 -0
- package/dist/cjs/components/radio/component.cjs +2 -0
- package/dist/cjs/components/radio/component.cjs.map +1 -0
- package/dist/cjs/components/radio/index.cjs +1 -1
- package/dist/cjs/components/radio/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/check-props.cjs +1 -1
- package/dist/cjs/components/setup-assistant/check-props.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/setup-assistant/step.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/index.cjs +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -1
- package/dist/cjs/components/slider/check-props.cjs +2 -0
- package/dist/cjs/components/slider/check-props.cjs.map +1 -0
- package/dist/cjs/components/slider/component.cjs +2 -0
- package/dist/cjs/components/slider/component.cjs.map +1 -0
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/spinner/index.cjs +1 -1
- package/dist/cjs/components/spinner/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/check-props.cjs +2 -0
- package/dist/cjs/components/split-view/check-props.cjs.map +1 -0
- package/dist/cjs/components/split-view/component.cjs +2 -0
- package/dist/cjs/components/split-view/component.cjs.map +1 -0
- package/dist/cjs/components/split-view/header.cjs.map +1 -1
- package/dist/cjs/components/split-view/index.cjs +1 -1
- package/dist/cjs/components/split-view/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox-check-props.cjs +2 -0
- package/dist/cjs/components/split-view/listbox-check-props.cjs.map +1 -0
- package/dist/cjs/components/split-view/listbox.cjs +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/list-item-content.cjs +1 -1
- package/dist/cjs/components/split-view/private/list-item-content.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/list-item-with-content.cjs +1 -1
- package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/toggle-button.cjs +1 -1
- package/dist/cjs/components/split-view/private/toggle-button.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/panel.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +2 -0
- package/dist/cjs/components/textarea/check-props.cjs.map +1 -0
- package/dist/cjs/components/textarea/component.cjs +2 -0
- package/dist/cjs/components/textarea/component.cjs.map +1 -0
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/index.cjs +1 -1
- package/dist/cjs/components/toast/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/check-props.cjs +1 -1
- package/dist/cjs/components/tooltip/check-props.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +2 -2
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/check-props.cjs.map +1 -1
- package/dist/cjs/components/tree/component.cjs +2 -0
- package/dist/cjs/components/tree/component.cjs.map +1 -0
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-initial-branch.cjs +1 -1
- package/dist/cjs/components/tree/private/render-initial-branch.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/check-props.cjs +2 -0
- package/dist/cjs/components/trial-bar/check-props.cjs.map +1 -0
- package/dist/cjs/components/trial-bar/component.cjs +2 -0
- package/dist/cjs/components/trial-bar/component.cjs.map +1 -0
- package/dist/cjs/components/trial-bar/index.cjs +1 -1
- package/dist/cjs/components/trial-bar/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/index.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs.map +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/welcome-mat/check-props.cjs +2 -0
- package/dist/cjs/components/welcome-mat/check-props.cjs.map +1 -0
- package/dist/cjs/components/welcome-mat/component.cjs +2 -0
- package/dist/cjs/components/welcome-mat/component.cjs.map +1 -0
- package/dist/cjs/components/welcome-mat/index.cjs +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
- package/dist/cjs/utilities/constants.cjs +1 -1
- package/dist/cjs/utilities/constants.cjs.map +1 -1
- package/dist/es/components/accordion/panel.js +1 -1
- package/dist/es/components/accordion/panel.js.map +1 -1
- package/dist/es/components/avatar/index.js +1 -1
- package/dist/es/components/avatar/index.js.map +1 -1
- package/dist/es/components/badge/index.js +6 -5
- package/dist/es/components/badge/index.js.map +1 -1
- package/dist/es/components/breadcrumb/index.js +1 -1
- package/dist/es/components/breadcrumb/index.js.map +1 -1
- package/dist/es/components/builder-header/check-props.js +13 -0
- package/dist/es/components/builder-header/check-props.js.map +1 -0
- package/dist/es/components/builder-header/component.js +65 -0
- package/dist/es/components/builder-header/component.js.map +1 -0
- package/dist/es/components/builder-header/toolbar.js +18 -13
- package/dist/es/components/builder-header/toolbar.js.map +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/index.js +1 -1
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/carousel/check-props.js +13 -0
- package/dist/es/components/carousel/check-props.js.map +1 -0
- package/dist/es/components/carousel/component.js +27 -0
- package/dist/es/components/carousel/component.js.map +1 -0
- package/dist/es/components/carousel/index.js +121 -113
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-item.js +1 -2
- package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
- package/dist/es/components/checkbox/check-props.js +14 -0
- package/dist/es/components/checkbox/check-props.js.map +1 -0
- package/dist/es/components/checkbox/component.js +35 -0
- package/dist/es/components/checkbox/component.js.map +1 -0
- package/dist/es/components/checkbox/index.js +125 -113
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/combobox/add-subheadings.js +2 -1
- package/dist/es/components/combobox/add-subheadings.js.map +1 -1
- package/dist/es/components/combobox/check-props.js +15 -5
- package/dist/es/components/combobox/check-props.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +292 -277
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/filter.js +1 -1
- package/dist/es/components/combobox/filter.js.map +1 -1
- package/dist/es/components/combobox/index.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 +4 -4
- package/dist/es/components/date-picker/date-picker.js +149 -142
- 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/dynamic-icon/index.js +1 -1
- package/dist/es/components/dynamic-icon/index.js.map +1 -1
- package/dist/es/components/index.js +41 -43
- package/dist/es/components/input/check-props.js +17 -18
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js +138 -136
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/search.js +1 -1
- package/dist/es/components/input/search.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/check-props.js +6 -6
- package/dist/es/components/menu-dropdown/check-props.js.map +1 -1
- package/dist/es/components/menu-dropdown/index.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +236 -232
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +104 -132
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/page-header/check-props.js +31 -0
- package/dist/es/components/page-header/check-props.js.map +1 -0
- package/dist/es/components/page-header/component.js +35 -0
- package/dist/es/components/page-header/component.js.map +1 -0
- package/dist/es/components/page-header/index.js +56 -38
- package/dist/es/components/page-header/index.js.map +1 -1
- package/dist/es/components/page-header/private/base/index.js +1 -1
- package/dist/es/components/page-header/private/base/index.js.map +1 -1
- package/dist/es/components/page-header/private/controls.js +1 -1
- package/dist/es/components/page-header/private/controls.js.map +1 -1
- package/dist/es/components/page-header/private/object-home/index.js +4 -4
- 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 +1 -1
- 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 +2 -2
- package/dist/es/components/page-header/private/related-list/index.js.map +1 -1
- package/dist/es/components/pill-container/check-props.js +13 -0
- package/dist/es/components/pill-container/check-props.js.map +1 -0
- package/dist/es/components/pill-container/component.js +31 -0
- package/dist/es/components/pill-container/component.js.map +1 -0
- package/dist/es/components/pill-container/index.js +65 -56
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +147 -146
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/check-props.js +11 -8
- package/dist/es/components/progress-indicator/check-props.js.map +1 -1
- package/dist/es/components/progress-indicator/component.js +35 -0
- package/dist/es/components/progress-indicator/component.js.map +1 -0
- package/dist/es/components/progress-indicator/index.js +74 -71
- package/dist/es/components/progress-indicator/index.js.map +1 -1
- package/dist/es/components/progress-indicator/private/step-vertical.js +23 -20
- package/dist/es/components/progress-indicator/private/step-vertical.js.map +1 -1
- package/dist/es/components/radio/check-props.js +13 -0
- package/dist/es/components/radio/check-props.js.map +1 -0
- package/dist/es/components/radio/component.js +24 -0
- package/dist/es/components/radio/component.js.map +1 -0
- package/dist/es/components/radio/index.js +94 -80
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/setup-assistant/check-props.js +12 -7
- package/dist/es/components/setup-assistant/check-props.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/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/check-props.js +4 -4
- package/dist/es/components/simple-data-table/check-props.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +17 -10
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/row-actions.js +2 -2
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
- package/dist/es/components/slider/check-props.js +17 -0
- package/dist/es/components/slider/check-props.js.map +1 -0
- package/dist/es/components/slider/component.js +35 -0
- package/dist/es/components/slider/component.js.map +1 -0
- package/dist/es/components/slider/index.js +69 -53
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/spinner/index.js +1 -1
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/split-view/check-props.js +13 -0
- package/dist/es/components/split-view/check-props.js.map +1 -0
- package/dist/es/components/split-view/component.js +46 -0
- package/dist/es/components/split-view/component.js.map +1 -0
- package/dist/es/components/split-view/header.js.map +1 -1
- package/dist/es/components/split-view/index.js +45 -36
- package/dist/es/components/split-view/index.js.map +1 -1
- package/dist/es/components/split-view/listbox-check-props.js +13 -0
- package/dist/es/components/split-view/listbox-check-props.js.map +1 -0
- package/dist/es/components/split-view/listbox.js +41 -35
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/split-view/private/list-item-content.js +1 -1
- package/dist/es/components/split-view/private/list-item-content.js.map +1 -1
- package/dist/es/components/split-view/private/list-item-with-content.js +6 -1
- package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
- package/dist/es/components/split-view/private/toggle-button.js +2 -2
- package/dist/es/components/split-view/private/toggle-button.js.map +1 -1
- package/dist/es/components/tabs/index.js +64 -64
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/panel.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +18 -0
- package/dist/es/components/textarea/check-props.js.map +1 -0
- package/dist/es/components/textarea/component.js +27 -0
- package/dist/es/components/textarea/component.js.map +1 -0
- package/dist/es/components/textarea/index.js +62 -46
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/index.js +18 -12
- package/dist/es/components/toast/index.js.map +1 -1
- package/dist/es/components/tooltip/check-props.js +9 -23
- package/dist/es/components/tooltip/check-props.js.map +1 -1
- package/dist/es/components/tooltip/index.js +70 -70
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +13 -12
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/component.js +25 -0
- package/dist/es/components/tree/component.js.map +1 -0
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/tree/private/render-initial-branch.js +5 -2
- package/dist/es/components/tree/private/render-initial-branch.js.map +1 -1
- package/dist/es/components/tree/tree.js +92 -65
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/trial-bar/check-props.js +13 -0
- package/dist/es/components/trial-bar/check-props.js.map +1 -0
- package/dist/es/components/trial-bar/component.js +24 -0
- package/dist/es/components/trial-bar/component.js.map +1 -0
- package/dist/es/components/trial-bar/index.js +27 -21
- package/dist/es/components/trial-bar/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/index.js +1 -0
- package/dist/es/components/utilities/menu-list/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item.js +6 -4
- package/dist/es/components/utilities/menu-list/item.js.map +1 -1
- package/dist/es/components/utilities/utility-icon/index.js +2 -1
- package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/vertical-navigation/private/item.js +1 -1
- package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
- package/dist/es/components/welcome-mat/check-props.js +13 -0
- package/dist/es/components/welcome-mat/check-props.js.map +1 -0
- package/dist/es/components/welcome-mat/component.js +46 -0
- package/dist/es/components/welcome-mat/component.js.map +1 -0
- package/dist/es/components/welcome-mat/index.js +61 -55
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/es/components/welcome-mat/info-badge.js +19 -11
- package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/types/components/accordion/panel.d.ts.map +1 -1
- package/dist/types/components/avatar/index.d.ts +1 -1
- package/dist/types/components/avatar/index.d.ts.map +1 -1
- package/dist/types/components/badge/index.d.ts +4 -2
- package/dist/types/components/badge/index.d.ts.map +1 -1
- package/dist/types/components/breadcrumb/index.d.ts +1 -1
- package/dist/types/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/types/components/builder-header/check-props.d.ts.map +1 -0
- package/dist/types/components/builder-header/toolbar.d.ts +6 -4
- package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
- package/dist/types/components/button/check-props.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +1 -1
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +1 -1
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/check-props.d.ts.map +1 -0
- package/dist/types/components/carousel/index.d.ts +38 -9
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/carousel/private/carousel-item.d.ts +5 -5
- package/dist/types/components/carousel/private/carousel-item.d.ts.map +1 -1
- package/dist/types/components/checkbox/check-props.d.ts +1 -0
- package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +10 -9
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +25 -7
- 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/combobox/add-subheadings.d.ts +1 -1
- package/dist/types/components/combobox/add-subheadings.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 +80 -33
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/filter.d.ts.map +1 -1
- package/dist/types/components/combobox/index.d.ts +2 -2
- package/dist/types/components/combobox/index.d.ts.map +1 -1
- package/dist/types/components/combobox/private/menu.d.ts +75 -9
- package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +52 -6
- 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/dynamic-icon/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +0 -4
- 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.map +1 -1
- package/dist/types/components/input/search.d.ts +1 -1
- package/dist/types/components/input/search.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts +1 -1
- 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/index.d.ts +2 -2
- package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +117 -27
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/index.d.ts +26 -3
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/page-header/check-props.d.ts.map +1 -1
- package/dist/types/components/page-header/index.d.ts +15 -4
- 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 +4 -4
- package/dist/types/components/page-header/private/controls.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/types.d.ts +6 -6
- package/dist/types/components/page-header/private/types.d.ts.map +1 -1
- package/dist/types/components/pill-container/check-props.d.ts.map +1 -0
- package/dist/types/components/pill-container/index.d.ts +24 -3
- package/dist/types/components/pill-container/index.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +41 -12
- 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 +7 -1
- package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/private/step-vertical.d.ts +4 -7
- package/dist/types/components/progress-indicator/private/step-vertical.d.ts.map +1 -1
- package/dist/types/components/radio/check-props.d.ts +1 -0
- package/dist/types/components/radio/check-props.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +10 -4
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/check-props.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/index.d.ts +7 -3
- package/dist/types/components/setup-assistant/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +19 -7
- package/dist/types/components/setup-assistant/step.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/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +21 -8
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/check-props.d.ts.map +1 -0
- package/dist/types/components/slider/index.d.ts +26 -5
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/spinner/index.d.ts +1 -1
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/split-view/check-props.d.ts.map +1 -0
- package/dist/types/components/split-view/header.d.ts +3 -3
- package/dist/types/components/split-view/header.d.ts.map +1 -1
- package/dist/types/components/split-view/index.d.ts +34 -8
- package/dist/types/components/split-view/index.d.ts.map +1 -1
- package/dist/types/components/{forms/input/inline-check-props.d.ts → split-view/listbox-check-props.d.ts} +1 -1
- package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -0
- package/dist/types/components/split-view/listbox.d.ts +45 -26
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/split-view/private/list-item-with-content.d.ts +10 -1
- package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
- package/dist/types/components/split-view/private/toggle-button.d.ts +3 -3
- package/dist/types/components/split-view/private/toggle-button.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts +16 -3
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/panel.d.ts +5 -1
- package/dist/types/components/tabs/panel.d.ts.map +1 -1
- package/dist/types/components/textarea/check-props.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +25 -5
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/index.d.ts +17 -2
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/check-props.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +1 -5
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.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/private/branch.d.ts +2 -4
- package/dist/types/components/tree/private/branch.d.ts.map +1 -1
- package/dist/types/components/tree/private/item.d.ts.map +1 -1
- package/dist/types/components/tree/private/render-branch.d.ts.map +1 -1
- package/dist/types/components/tree/private/render-initial-branch.d.ts +2 -3
- package/dist/types/components/tree/private/render-initial-branch.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +38 -9
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/tree/types.d.ts +62 -9
- package/dist/types/components/tree/types.d.ts.map +1 -1
- package/dist/types/components/trial-bar/check-props.d.ts +3 -0
- package/dist/types/components/trial-bar/check-props.d.ts.map +1 -0
- package/dist/types/components/trial-bar/index.d.ts +15 -7
- package/dist/types/components/trial-bar/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/index.d.ts +6 -2
- package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts +4 -2
- package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +7 -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/welcome-mat/check-props.d.ts +3 -0
- package/dist/types/components/welcome-mat/check-props.d.ts.map +1 -0
- package/dist/types/components/welcome-mat/index.d.ts +70 -15
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/info-badge.d.ts +7 -3
- 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/package.json +5 -3
- package/dist/cjs/components/forms/input/inline-check-props.cjs +0 -2
- package/dist/cjs/components/forms/input/inline-check-props.cjs.map +0 -1
- package/dist/cjs/components/forms/input/inline.cjs +0 -2
- package/dist/cjs/components/forms/input/inline.cjs.map +0 -1
- package/dist/cjs/components/modal/check-props.cjs +0 -2
- package/dist/cjs/components/modal/check-props.cjs.map +0 -1
- package/dist/cjs/components/modal/component.cjs +0 -2
- package/dist/cjs/components/modal/component.cjs.map +0 -1
- package/dist/cjs/components/modal/trigger.cjs +0 -2
- package/dist/cjs/components/modal/trigger.cjs.map +0 -1
- package/dist/es/components/forms/input/inline-check-props.js +0 -11
- package/dist/es/components/forms/input/inline-check-props.js.map +0 -1
- package/dist/es/components/forms/input/inline.js +0 -95
- package/dist/es/components/forms/input/inline.js.map +0 -1
- package/dist/es/components/modal/check-props.js +0 -13
- package/dist/es/components/modal/check-props.js.map +0 -1
- package/dist/es/components/modal/component.js +0 -35
- package/dist/es/components/modal/component.js.map +0 -1
- package/dist/es/components/modal/trigger.js +0 -22
- package/dist/es/components/modal/trigger.js.map +0 -1
- package/dist/types/components/avatar/check-props.d.ts.map +0 -1
- package/dist/types/components/breadcrumb/check-props.d.ts.map +0 -1
- package/dist/types/components/button-stateful/check-props.d.ts.map +0 -1
- package/dist/types/components/forms/checkbox/index.d.ts +0 -4
- package/dist/types/components/forms/checkbox/index.d.ts.map +0 -1
- package/dist/types/components/forms/checkbox.d.ts +0 -2
- package/dist/types/components/forms/input/inline-check-props.d.ts.map +0 -1
- package/dist/types/components/forms/input/inline.d.ts +0 -88
- package/dist/types/components/forms/input/inline.d.ts.map +0 -1
- package/dist/types/components/modal/check-props.d.ts.map +0 -1
- package/dist/types/components/modal/trigger.d.ts +0 -14
- package/dist/types/components/modal/trigger.d.ts.map +0 -1
- package/dist/types/components/spinner/check-props.d.ts.map +0 -1
- package/dist/types/components/tabs/pane.d.ts +0 -3
- package/dist/types/components/tabs/pane.d.ts.map +0 -1
- package/dist/types/utilities/warning/deprecated-event-parameter.d.ts +0 -3
- package/dist/types/utilities/warning/deprecated-event-parameter.d.ts.map +0 -1
- /package/dist/types/components/{avatar → builder-header}/check-props.d.ts +0 -0
- /package/dist/types/components/{breadcrumb → carousel}/check-props.d.ts +0 -0
- /package/dist/types/components/{button-stateful → pill-container}/check-props.d.ts +0 -0
- /package/dist/types/components/{modal → slider}/check-props.d.ts +0 -0
- /package/dist/types/components/{spinner → split-view}/check-props.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.cjs","names":[],"sources":["../../../../../components/utilities/menu-list/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\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n\n// # List Item Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type ComponentType, type ReactNode } from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### Icon\nimport Icon from '../../icon';\n\n// ## Children\nimport ListItemLabelRenderer, { type ListItemLabelProps } from './item-label';\n\n// ### Event Helpers\nimport EventUtil from '../../../utilities/event';\n\n// ## Constants\nimport { LIST_ITEM } from '../../../utilities/constants';\n\ninterface MenuListIconConfig {\n\tcategory?: string;\n\tname?: string;\n}\n\nexport interface ListItemProps {\n\t'aria-disabled'?: boolean;\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\tcheckmark?: boolean;\n\tdata?: Record<string, unknown>;\n\tdisabled?: boolean;\n\tdivider?: 'top' | 'bottom';\n\tgroupedBy?: string;\n\thref?: string;\n\tid: string;\n\tindex: number;\n\tinverted?: boolean;\n\tisSelected?: boolean;\n\tisCheckmarkVariant?: boolean;\n\tlabel?: string;\n\tlabelRenderer?: ComponentType<ListItemLabelProps>;\n\tleftIcon?: MenuListIconConfig;\n\t/**\n\t * Callback ref that receives the root `<li>` DOM node (or `null` on\n\t * unmount). Used by parents that need the list item's DOM element for\n\t * keyboard focus/scroll management. A DOM node is forwarded here rather\n\t * than attaching a `ref` to this class component, which would yield the\n\t * component instance instead of an element.\n\t */\n\tnodeRef?: (node: HTMLLIElement | null) => void;\n\tonSelect: (index: number) => void;\n\trightIcon?: MenuListIconConfig;\n\ttooltipContent?: ReactNode | string;\n\ttooltipTemplate?: React.ReactElement;\n\ttype?: string;\n\tvalue?: unknown;\n}\n\n/**\n * Component description.\n */\nclass ListItem extends React.Component<ListItemProps> {\n\tstatic displayName = LIST_ITEM;\n\n\tstatic defaultProps: Partial<ListItemProps> = {\n\t\tdata: {},\n\t\thref: '#',\n\t\tinverted: false,\n\t\tisSelected: false,\n\t\tlabel: '',\n\t\tlabelRenderer: ListItemLabelRenderer,\n\t\tvalue: null,\n\t};\n\n\tgetLabel = () => {\n\t\tconst Label = this.props.labelRenderer ?? ListItemLabelRenderer;\n\t\treturn (\n\t\t\t<Label\n\t\t\t\tcheckmark={this.props.checkmark}\n\t\t\t\tdata={this.props.data}\n\t\t\t\ticon={this.getIcon('left')}\n\t\t\t\tindex={this.props.index}\n\t\t\t\tinverted={this.props.inverted}\n\t\t\t\tisSelected={this.props.isSelected}\n\t\t\t\tlabel={this.props.label}\n\t\t\t\tvalue={this.props.value}\n\t\t\t/>\n\t\t);\n\t};\n\n\tgetIcon = (position: 'left' | 'right') => {\n\t\tconst classnames = ['slds-icon-text-default'];\n\t\tlet iconProps: MenuListIconConfig | undefined =\n\t\t\tposition === 'left' ? this.props.leftIcon : this.props.rightIcon;\n\n\t\tif (position === 'left') {\n\t\t\tif (this.props.isCheckmarkVariant) {\n\t\t\t\tclassnames.push('slds-icon_selected');\n\t\t\t\ticonProps = {\n\t\t\t\t\tcategory: 'utility',\n\t\t\t\t\tname: 'check',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tclassnames.push('slds-m-right_x-small');\n\t\t} else {\n\t\t\tclassnames.push('slds-m-left_small');\n\t\t}\n\n\t\tif (iconProps) {\n\t\t\t// `position` is not part of Icon's public props but is preserved for\n\t\t\t// backwards-compatible runtime behavior; spread through a permissive cast.\n\t\t\tconst iconElementProps = {\n\t\t\t\tclassName: classNames(classnames),\n\t\t\t\tposition,\n\t\t\t\tsize: 'x-small',\n\t\t\t\t...iconProps,\n\t\t\t} as Record<string, unknown>;\n\t\t\treturn <Icon {...iconElementProps} />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\thandleClick = (event: React.MouseEvent) => {\n\t\tif (\n\t\t\tthis.props.type !== 'link' ||\n\t\t\tthis.props.href === 'javascript:void(0);' || // eslint-disable-line no-script-url\n\t\t\tthis.props.href === '#'\n\t\t) {\n\t\t\tEventUtil.trapImmediate(event);\n\t\t}\n\n\t\tif (this.props.onSelect && !this.props.disabled) {\n\t\t\tthis.props.onSelect(this.props.index);\n\t\t}\n\t};\n\n\thandleMouseDown = (event: React.MouseEvent) => {\n\t\tEventUtil.trapImmediate(event);\n\t};\n\n\trender() {\n\t\tswitch (this.props.type) {\n\t\t\tcase 'header': {\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tref={this.props.nodeRef}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-dropdown__header',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-has-divider_top-space': this.props.divider === 'top',\n\t\t\t\t\t\t\t\t'slds-has-divider_bottom-space':\n\t\t\t\t\t\t\t\t\tthis.props.divider === 'bottom',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.className\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonMouseDown={this.handleMouseDown}\n\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>{this.props.label}</span>\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase 'divider': {\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tref={this.props.nodeRef}\n\t\t\t\t\t\tclassName={classNames('slds-has-divider', this.props.className)}\n\t\t\t\t\t\tonMouseDown={this.handleMouseDown}\n\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase 'link':\n\t\t\tcase 'item':\n\t\t\tdefault: {\n\t\t\t\t/* eslint-disable jsx-a11y/role-supports-aria-props */\n\t\t\t\tlet itemContents = (\n\t\t\t\t\t<a\n\t\t\t\t\t\taria-checked={\n\t\t\t\t\t\t\tthis.props.checkmark && this.props.isSelected ? true : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-disabled={this.props['aria-disabled']}\n\t\t\t\t\t\thref={this.props.href}\n\t\t\t\t\t\tdata-index={this.props.index}\n\t\t\t\t\t\tonClick={this.handleClick}\n\t\t\t\t\t\trole={this.props.checkmark ? 'menuitemcheckbox' : 'menuitem'}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.groupedBy && (\n\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">{`-${this.props.groupedBy}`}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.getLabel()}\n\t\t\t\t\t\t{this.getIcon('right')}\n\t\t\t\t\t</a>\n\t\t\t\t);\n\n\t\t\t\tif (this.props.tooltipContent && this.props.tooltipTemplate) {\n\t\t\t\t\tconst { ...tooltipTemplateProps } = this.props.tooltipTemplate\n\t\t\t\t\t\t.props as Record<string, unknown>;\n\t\t\t\t\tconst tooltipProps = {\n\t\t\t\t\t\t...tooltipTemplateProps,\n\t\t\t\t\t\tcontent: this.props.tooltipContent,\n\t\t\t\t\t\tid: `${this.props.id}-tooltip`,\n\t\t\t\t\t\ttriggerStyle: {\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t...((tooltipTemplateProps.triggerStyle as Record<\n\t\t\t\t\t\t\t\tstring,\n\t\t\t\t\t\t\t\tunknown\n\t\t\t\t\t\t\t>) || {}),\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\titemContents = React.cloneElement(\n\t\t\t\t\t\tthis.props.tooltipTemplate,\n\t\t\t\t\t\ttooltipProps,\n\t\t\t\t\t\titemContents\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t/* eslint-disable jsx-a11y/role-supports-aria-props */\n\t\t\t\t\t// disabled eslint, but using aria-selected on presentation role seems suspicious...\n\t\t\t\t\t<li\n\t\t\t\t\t\tref={this.props.nodeRef}\n\t\t\t\t\t\taria-selected={\n\t\t\t\t\t\t\tthis.props.checkmark === null\n\t\t\t\t\t\t\t\t? this.props.isSelected\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-dropdown__item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-selected': this.props.isSelected,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.className\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tid={this.props.id}\n\t\t\t\t\t\tonMouseDown={this.handleMouseDown}\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{itemContents}\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport default ListItem;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"item.cjs","names":[],"sources":["../../../../../components/utilities/menu-list/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\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n\n// # List Item Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type ComponentType, type ReactNode } from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### Icon\nimport Icon from '../../icon';\n\n// ## Children\nimport ListItemLabelRenderer, { type ListItemLabelProps } from './item-label';\n\n// ### Event Helpers\nimport EventUtil from '../../../utilities/event';\n\n// ## Constants\nimport { LIST_ITEM } from '../../../utilities/constants';\n\ninterface MenuListIconConfig {\n\tcategory?: string;\n\tname?: string;\n}\n\nexport interface ListItemProps {\n\t'aria-disabled'?: boolean;\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\tcheckmark?: boolean;\n\tdata?: Record<string, unknown>;\n\tdisabled?: boolean;\n\tdivider?: 'top' | 'bottom';\n\tgroupedBy?: string;\n\thref?: string;\n\tid: string;\n\tindex: number;\n\tinverted?: boolean;\n\tisSelected?: boolean;\n\tisCheckmarkVariant?: boolean;\n\tlabel?: string;\n\tlabelRenderer?: ComponentType<ListItemLabelProps>;\n\t/** Called to render the label. Takes precedence over `labelRenderer`. */\n\trenderLabel?: (props: ListItemLabelProps) => ReactNode;\n\tleftIcon?: MenuListIconConfig;\n\t/**\n\t * Callback ref that receives the root `<li>` DOM node (or `null` on\n\t * unmount). Used by parents that need the list item's DOM element for\n\t * keyboard focus/scroll management. A DOM node is forwarded here rather\n\t * than attaching a `ref` to this class component, which would yield the\n\t * component instance instead of an element.\n\t */\n\tnodeRef?: (node: HTMLLIElement | null) => void;\n\tonSelect: (index: number, event: React.MouseEvent) => void;\n\trightIcon?: MenuListIconConfig;\n\ttooltipContent?: ReactNode | string;\n\ttooltipTemplate?: React.ReactElement;\n\ttype?: string;\n\tvalue?: unknown;\n}\n\n/**\n * Component description.\n */\nclass ListItem extends React.Component<ListItemProps> {\n\tstatic displayName = LIST_ITEM;\n\n\tstatic defaultProps: Partial<ListItemProps> = {\n\t\tdata: {},\n\t\thref: '#',\n\t\tinverted: false,\n\t\tisSelected: false,\n\t\tlabel: '',\n\t\tlabelRenderer: ListItemLabelRenderer,\n\t\tvalue: null,\n\t};\n\n\tgetLabel = () => {\n\t\tconst labelProps: ListItemLabelProps = {\n\t\t\tcheckmark: this.props.checkmark,\n\t\t\tdata: this.props.data,\n\t\t\ticon: this.getIcon('left'),\n\t\t\tindex: this.props.index,\n\t\t\tinverted: this.props.inverted,\n\t\t\tisSelected: this.props.isSelected,\n\t\t\tlabel: this.props.label,\n\t\t\tvalue: this.props.value,\n\t\t};\n\t\tif (this.props.renderLabel) {\n\t\t\treturn this.props.renderLabel(labelProps);\n\t\t}\n\t\tconst Label = this.props.labelRenderer ?? ListItemLabelRenderer;\n\t\treturn <Label {...labelProps} />;\n\t};\n\n\tgetIcon = (position: 'left' | 'right') => {\n\t\tconst classnames = ['slds-icon-text-default'];\n\t\tlet iconProps: MenuListIconConfig | undefined =\n\t\t\tposition === 'left' ? this.props.leftIcon : this.props.rightIcon;\n\n\t\tif (position === 'left') {\n\t\t\tif (this.props.isCheckmarkVariant) {\n\t\t\t\tclassnames.push('slds-icon_selected');\n\t\t\t\ticonProps = {\n\t\t\t\t\tcategory: 'utility',\n\t\t\t\t\tname: 'check',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tclassnames.push('slds-m-right_x-small');\n\t\t} else {\n\t\t\tclassnames.push('slds-m-left_small');\n\t\t}\n\n\t\tif (iconProps) {\n\t\t\t// `position` is not part of Icon's public props but is preserved for\n\t\t\t// backwards-compatible runtime behavior; spread through a permissive cast.\n\t\t\tconst iconElementProps = {\n\t\t\t\tclassName: classNames(classnames),\n\t\t\t\tposition,\n\t\t\t\tsize: 'x-small',\n\t\t\t\t...iconProps,\n\t\t\t} as Record<string, unknown>;\n\t\t\treturn <Icon {...iconElementProps} />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\thandleClick = (event: React.MouseEvent) => {\n\t\tif (\n\t\t\tthis.props.type !== 'link' ||\n\t\t\tthis.props.href === 'javascript:void(0);' || // eslint-disable-line no-script-url\n\t\t\tthis.props.href === '#'\n\t\t) {\n\t\t\tEventUtil.trapImmediate(event);\n\t\t}\n\n\t\tif (this.props.onSelect && !this.props.disabled) {\n\t\t\tthis.props.onSelect(this.props.index, event);\n\t\t}\n\t};\n\n\thandleMouseDown = (event: React.MouseEvent) => {\n\t\tEventUtil.trapImmediate(event);\n\t};\n\n\trender() {\n\t\tswitch (this.props.type) {\n\t\t\tcase 'header': {\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tref={this.props.nodeRef}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-dropdown__header',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-has-divider_top-space': this.props.divider === 'top',\n\t\t\t\t\t\t\t\t'slds-has-divider_bottom-space':\n\t\t\t\t\t\t\t\t\tthis.props.divider === 'bottom',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.className\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonMouseDown={this.handleMouseDown}\n\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>{this.props.label}</span>\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase 'divider': {\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tref={this.props.nodeRef}\n\t\t\t\t\t\tclassName={classNames('slds-has-divider', this.props.className)}\n\t\t\t\t\t\tonMouseDown={this.handleMouseDown}\n\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase 'link':\n\t\t\tcase 'item':\n\t\t\tdefault: {\n\t\t\t\t/* eslint-disable jsx-a11y/role-supports-aria-props */\n\t\t\t\tlet itemContents = (\n\t\t\t\t\t<a\n\t\t\t\t\t\taria-checked={\n\t\t\t\t\t\t\tthis.props.checkmark && this.props.isSelected ? true : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-disabled={this.props['aria-disabled']}\n\t\t\t\t\t\thref={this.props.href}\n\t\t\t\t\t\tdata-index={this.props.index}\n\t\t\t\t\t\tonClick={this.handleClick}\n\t\t\t\t\t\trole={this.props.checkmark ? 'menuitemcheckbox' : 'menuitem'}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.props.groupedBy && (\n\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">{`-${this.props.groupedBy}`}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.getLabel()}\n\t\t\t\t\t\t{this.getIcon('right')}\n\t\t\t\t\t</a>\n\t\t\t\t);\n\n\t\t\t\tif (this.props.tooltipContent && this.props.tooltipTemplate) {\n\t\t\t\t\tconst { ...tooltipTemplateProps } = this.props.tooltipTemplate\n\t\t\t\t\t\t.props as Record<string, unknown>;\n\t\t\t\t\tconst tooltipProps = {\n\t\t\t\t\t\t...tooltipTemplateProps,\n\t\t\t\t\t\tcontent: this.props.tooltipContent,\n\t\t\t\t\t\tid: `${this.props.id}-tooltip`,\n\t\t\t\t\t\ttriggerStyle: {\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t...((tooltipTemplateProps.triggerStyle as Record<\n\t\t\t\t\t\t\t\tstring,\n\t\t\t\t\t\t\t\tunknown\n\t\t\t\t\t\t\t>) || {}),\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\titemContents = React.cloneElement(\n\t\t\t\t\t\tthis.props.tooltipTemplate,\n\t\t\t\t\t\ttooltipProps,\n\t\t\t\t\t\titemContents\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t/* eslint-disable jsx-a11y/role-supports-aria-props */\n\t\t\t\t\t// disabled eslint, but using aria-selected on presentation role seems suspicious...\n\t\t\t\t\t<li\n\t\t\t\t\t\tref={this.props.nodeRef}\n\t\t\t\t\t\taria-selected={\n\t\t\t\t\t\t\tthis.props.checkmark === null ? this.props.isSelected : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-dropdown__item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-selected': this.props.isSelected,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.className\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tid={this.props.id}\n\t\t\t\t\t\tonMouseDown={this.handleMouseDown}\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{itemContents}\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport default ListItem;\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./svg.cjs"),n=require("../../../icons/utility/index.cjs"),r=require("../../../icons/action/index.cjs"),i=require("../../../icons/custom/index.cjs"),a=require("../../../icons/doctype/index.cjs"),o=require("../../../icons/standard/index.cjs"),s=require("../UNSAFE_direction/index.cjs"),c=require("../UNSAFE_direction/private/language-direction.cjs"),l=require("../../icon-settings/index.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime");var f=({name:e=``,assistiveText:c,category:f=`utility`,icon:p,path:m,direction:h,...g})=>{let _=(0,u.useContext)(l.IconSettingsContext),v={action:r.default,custom:i.default,doctype:a.default,standard:o.default,utility:n.default},y;if(p)y=p;else if(Object.keys(v[f]).length){let t=v[f],n=t[e.toLowerCase()];n&&(y={...n,viewBox:t.viewBox})}let b;if(m)b=m;else if(_.onRequestIconPath)b=_.onRequestIconPath({category:f,name:e});else if(_[`${f}Sprite`])b=`${_[`${f}Sprite`]}#${e}`;else if(_.iconPath){let t=h===s.DIRECTIONS.RTL?`symbols-rtl.svg`:`symbols.svg`;b=`${_.iconPath}/${f}-sprite/svg/${t}#${e}`}if(y){let{className:n,style:r
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./svg.cjs"),n=require("../../../icons/utility/index.cjs"),r=require("../../../icons/action/index.cjs"),i=require("../../../icons/custom/index.cjs"),a=require("../../../icons/doctype/index.cjs"),o=require("../../../icons/standard/index.cjs"),s=require("../UNSAFE_direction/index.cjs"),c=require("../UNSAFE_direction/private/language-direction.cjs"),l=require("../../icon-settings/index.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime");var f=({name:e=``,assistiveText:c,category:f=`utility`,icon:p,path:m,direction:h,...g})=>{let _=(0,u.useContext)(l.IconSettingsContext),v={action:r.default,custom:i.default,doctype:a.default,standard:o.default,utility:n.default},y;if(p)y=p;else if(Object.keys(v[f]).length){let t=v[f],n=t[e.toLowerCase()];n&&(y={...n,viewBox:t.viewBox})}let b;if(m)b=m;else if(_.onRequestIconPath)b=_.onRequestIconPath({category:f,name:e});else if(_[`${f}Sprite`])b=`${_[`${f}Sprite`]}#${e}`;else if(_.iconPath){let t=h===s.DIRECTIONS.RTL?`symbols-rtl.svg`:`symbols.svg`;b=`${_.iconPath}/${f}-sprite/svg/${t}#${e}`}if(y){let{className:n,style:r,"aria-hidden":i}=g;return(0,d.jsx)(t.default,{"aria-hidden":i,data:y,name:e,className:n,style:r})}let{className:x,style:S,...C}=g;return(0,d.jsx)(`svg`,{className:x,style:S,...C,children:(0,d.jsx)(`use`,{href:b})},`${e}_${f}`)};f.displayName=`UtilityIcon`;var p=c.default(f);exports.default=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../../components/utilities/utility-icon/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, { useContext, type CSSProperties, type SVGProps } from 'react';\nimport Svg from './svg';\nimport SLDS_ICONS_UTILITY from '../../../icons/utility';\nimport SLDS_ICONS_ACTION from '../../../icons/action';\nimport SLDS_ICONS_CUSTOM from '../../../icons/custom';\nimport SLDS_ICONS_DOCTYPE from '../../../icons/doctype';\nimport SLDS_ICONS_STANDARD from '../../../icons/standard';\nimport { DIRECTIONS } from '../UNSAFE_direction';\nimport LanguageDirection from '../UNSAFE_direction/private/language-direction';\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../../components/utilities/utility-icon/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, { useContext, type CSSProperties, type SVGProps } from 'react';\nimport Svg from './svg';\nimport SLDS_ICONS_UTILITY from '../../../icons/utility';\nimport SLDS_ICONS_ACTION from '../../../icons/action';\nimport SLDS_ICONS_CUSTOM from '../../../icons/custom';\nimport SLDS_ICONS_DOCTYPE from '../../../icons/doctype';\nimport SLDS_ICONS_STANDARD from '../../../icons/standard';\nimport { DIRECTIONS } from '../UNSAFE_direction';\nimport LanguageDirection from '../UNSAFE_direction/private/language-direction';\nimport {\n\tIconSettingsContext,\n\ttype IconSettingsContextValue,\n} from '../../icon-settings/index';\nimport type { IconCategory } from '../../../types/common';\n\n/**\n * Shape of inline icon data from icon bundles\n */\nexport interface InlineIconData {\n\tviewBox?: string;\n\tpath?: Record<string, string> | Array<Record<string, string>>;\n\tg?: Record<string, unknown> | Array<Record<string, unknown>>;\n\tcircle?: Record<string, string> | Array<Record<string, string>>;\n\tellipse?: Record<string, string> | Array<Record<string, string>>;\n\t[key: string]: unknown;\n}\n\n/**\n * Icon bundle type\n */\ntype IconBundle = Record<string, InlineIconData> & { viewBox?: string };\n\n/**\n * Props for UtilityIcon component\n */\nexport interface UtilityIconProps extends Omit<\n\tSVGProps<SVGSVGElement>,\n\t'name'\n> {\n\t/** Assistive text for accessibility (not used directly, passed through) */\n\tassistiveText?: Record<string, string>;\n\t/** Icon category */\n\tcategory?: IconCategory;\n\t/** Custom SVG icon data */\n\ticon?: InlineIconData;\n\t/** Name of the icon */\n\tname?: string;\n\t/** Direct path to the icon sprite */\n\tpath?: string;\n\t/** Text direction for RTL support */\n\tdirection?: string;\n\t/** CSS class name */\n\tclassName?: string;\n\t/** Inline styles */\n\tstyle?: CSSProperties;\n}\n\n/**\n * Internal component that renders either inline SVG or external sprite reference.\n * If inline icons are present and icon bundle imports are not just an empty object,\n * then inline icons will be used instead of external icons that require HTTP access.\n */\nconst UtilityIcon = ({\n\tname = '',\n\tassistiveText, // eslint-disable-line @typescript-eslint/no-unused-vars\n\tcategory = 'utility',\n\ticon,\n\tpath,\n\tdirection,\n\t...rest\n}: UtilityIconProps): React.ReactElement | null => {\n\tconst context = useContext<IconSettingsContextValue>(IconSettingsContext);\n\n\tconst inlineIcons: Record<IconCategory, IconBundle> = {\n\t\taction: SLDS_ICONS_ACTION as IconBundle,\n\t\tcustom: SLDS_ICONS_CUSTOM as IconBundle,\n\t\tdoctype: SLDS_ICONS_DOCTYPE as IconBundle,\n\t\tstandard: SLDS_ICONS_STANDARD as IconBundle,\n\t\tutility: SLDS_ICONS_UTILITY as IconBundle,\n\t};\n\n\tlet inlineData: InlineIconData | undefined;\n\n\tif (icon) {\n\t\t// Use SVG data passed in with `icon` prop\n\t\tinlineData = icon;\n\t} else if (Object.keys(inlineIcons[category]).length) {\n\t\t// Use inline icon data if it exists\n\t\tconst categoryIcons = inlineIcons[category];\n\t\tconst iconData = categoryIcons[name.toLowerCase()];\n\t\tif (iconData) {\n\t\t\tinlineData = {\n\t\t\t\t...iconData,\n\t\t\t\tviewBox: categoryIcons.viewBox,\n\t\t\t};\n\t\t}\n\t}\n\n\tlet modifiedPath: string | undefined;\n\n\tif (path) {\n\t\t// Use `path` prop of Icon if present\n\t\tmodifiedPath = path;\n\t} else if (context.onRequestIconPath) {\n\t\tmodifiedPath = context.onRequestIconPath({ category, name });\n\t} else if (context[`${category}Sprite` as keyof IconSettingsContextValue]) {\n\t\t// Use category sprite file from IconSettings if present\n\t\tconst sprite = context[\n\t\t\t`${category}Sprite` as keyof IconSettingsContextValue\n\t\t] as string;\n\t\tmodifiedPath = `${sprite}#${name}`;\n\t} else if (context.iconPath) {\n\t\t// Otherwise, use external URLs for icons\n\t\tconst svgAssetName =\n\t\t\tdirection === DIRECTIONS.RTL ? 'symbols-rtl.svg' : 'symbols.svg';\n\t\tmodifiedPath = `${context.iconPath}/${category}-sprite/svg/${svgAssetName}#${name}`;\n\t}\n\n\tif (inlineData) {\n\t\tconst { className, style, 'aria-hidden': ariaHidden } = rest;\n\t\treturn (\n\t\t\t<Svg\n\t\t\t\taria-hidden={ariaHidden}\n\t\t\t\tdata={inlineData}\n\t\t\t\tname={name}\n\t\t\t\tclassName={className}\n\t\t\t\tstyle={style}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst { className: svgClassName, style: svgStyle, ...svgRest } = rest;\n\treturn (\n\t\t<svg\n\t\t\tkey={`${name}_${category}`}\n\t\t\tclassName={svgClassName}\n\t\t\tstyle={svgStyle}\n\t\t\t{...svgRest}\n\t\t>\n\t\t\t<use href={modifiedPath} />\n\t\t</svg>\n\t);\n};\n\nUtilityIcon.displayName = 'UtilityIcon';\n\nexport default LanguageDirection(UtilityIcon);\n"],"mappings":"whBAiEA,IAAM,GAAe,CACpB,OAAO,GACP,gBACA,WAAW,UACX,OACA,OACA,YACA,GAAG,KAC+C,CAClD,IAAM,GAAA,EAAU,EAAA,WAAA,CAAqC,EAAA,mBAAmB,EAElE,EAAgD,CACrD,OAAQ,EAAA,QACR,OAAQ,EAAA,QACR,QAAS,EAAA,QACT,SAAU,EAAA,QACV,QAAS,EAAA,OACV,EAEI,EAEJ,GAAI,EAEH,EAAa,OACP,GAAI,OAAO,KAAK,EAAY,EAAS,CAAC,CAAC,OAAQ,CAErD,IAAM,EAAgB,EAAY,GAC5B,EAAW,EAAc,EAAK,YAAY,GAC5C,IACH,EAAa,CACZ,GAAG,EACH,QAAS,EAAc,OACxB,EAEF,CAEA,IAAI,EAEJ,GAAI,EAEH,EAAe,OACT,GAAI,EAAQ,kBAClB,EAAe,EAAQ,kBAAkB,CAAE,WAAU,MAAK,CAAC,OACrD,GAAI,EAAQ,GAAG,EAAS,SAK9B,EAAe,GAHA,EACd,GAAG,EAAS,SAEY,GAAG,SACtB,GAAI,EAAQ,SAAU,CAE5B,IAAM,EACL,IAAc,EAAA,WAAW,IAAM,kBAAoB,cACpD,EAAe,GAAG,EAAQ,SAAS,GAAG,EAAS,cAAc,EAAa,GAAG,GAC9E,CAEA,GAAI,EAAY,CACf,GAAM,CAAE,YAAW,QAAO,cAAe,GAAe,EACxD,OACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAa,EACb,KAAM,EACA,OACK,YACJ,OACP,CAAA,CAEH,CAEA,GAAM,CAAE,UAAW,EAAc,MAAO,EAAU,GAAG,GAAY,EACjE,OACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAEC,UAAW,EACX,MAAO,EACP,GAAI,EAEJ,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,KAAM,CAAe,CAAA,CACtB,EANC,GAAG,EAAK,GAAG,GAMZ,CAEP,EAEA,EAAY,YAAc,cAE1B,IAAA,EAAe,EAAA,QAAkB,CAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","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 React, {
|
|
1
|
+
{"version":3,"file":"index.cjs","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 React, {\n\tuseId,\n\tuseMemo,\n\ttype MouseEvent,\n\ttype ReactElement,\n} from 'react';\nimport classNames from 'classnames';\nimport { VERTICAL_NAVIGATION } from '../../utilities/constants';\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: 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 */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** HTML id */\n\tid?: string;\n\t/** Selection callback */\n\tonSelect?: (\n\t\tevent: MouseEvent<HTMLAnchorElement>,\n\t\tdata: NavigationSelectData\n\t) => void;\n\t/** Currently selected item ID */\n\tselectedId?: string;\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 = ({\n\tcategories,\n\tclassName,\n\tid: propId,\n\tonSelect,\n\tselectedId: propSelectedId,\n}: VerticalNavigationProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst rootId = propId || generatedId;\n\n\t// Determine selected ID (default to first item if not specified)\n\tconst selectedId = useMemo(() => {\n\t\tif (propSelectedId) {\n\t\t\treturn propSelectedId;\n\t\t}\n\t\tif (categories.length > 0 && categories[0].items?.length > 0) {\n\t\t\treturn categories[0].items[0].id;\n\t\t}\n\t\treturn undefined;\n\t}, [propSelectedId, categories]);\n\n\treturn (\n\t\t<nav\n\t\t\tid={rootId}\n\t\t\tclassName={classNames('slds-nav-vertical', className as string)}\n\t\t>\n\t\t\t{categories.map((category) => {\n\t\t\t\tconst categoryId = `${rootId}-${category.id}`;\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={`${categoryId}-header`}\n\t\t\t\t\t\tclassName=\"slds-nav-vertical__section\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<h2 id={categoryId} className=\"slds-nav-vertical__title\">\n\t\t\t\t\t\t\t{category.label}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<ul key={categoryId}>\n\t\t\t\t\t\t\t{category.items.map((item) => (\n\t\t\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\tisSelected={item.id === selectedId}\n\t\t\t\t\t\t\t\t\tcategoryId={categoryId}\n\t\t\t\t\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t})}\n\t\t</nav>\n\t);\n};\n\nVerticalNavigation.displayName = VERTICAL_NAVIGATION;\n\nexport default VerticalNavigation;\n"],"mappings":"0VAyEA,IAAM,GAAsB,CAC3B,aACA,YACA,GAAI,EACJ,WACA,WAAY,KACsC,CAClD,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAS,GAAU,EAGnB,GAAA,EAAa,EAAA,QAAA,KAAc,CAChC,GAAI,EACH,OAAO,EAER,GAAI,EAAW,OAAS,GAAK,EAAW,EAAE,CAAC,OAAO,OAAS,EAC1D,OAAO,EAAW,EAAE,CAAC,MAAM,EAAE,CAAC,EAGhC,EAAG,CAAC,EAAgB,CAAU,CAAC,EAE/B,OACC,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,GAAI,EACJ,WAAA,EAAW,EAAA,QAAA,CAAW,oBAAqB,CAAmB,EAE7D,SAAA,EAAW,IAAK,GAAa,CAC7B,IAAM,EAAa,GAAG,EAAO,GAAG,EAAS,KACzC,OACC,EAAA,EAAA,KAAA,CAAC,MAAD,CAEC,UAAU,6BAFX,SAAA,EAIC,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,GAAI,EAAY,UAAU,2BAC5B,SAAA,EAAS,KACP,CAAA,GACJ,EAAA,EAAA,IAAA,CAAC,KAAD,CAAA,SACE,EAAS,MAAM,IAAK,IACpB,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAEO,OACN,WAAY,EAAK,KAAO,EACZ,aACF,UACV,EALK,EAAK,EAKV,CACD,CACE,EAVK,CAUL,CACA,CAjBC,EAAA,GAAG,EAAW,QAiBf,CAEP,CAAC,CACG,CAAA,CAEP,EAEA,EAAmB,YAAc,EAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/constants.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("lodash.isfunction");a=e.__toESM(a,1);var o=(e,{item:t,onSelect:n})=>{t.url||e.preventDefault(),(0,a.default)(n)&&n(e,{item:t})},s=({isSelected:e=!1,item:t,categoryId:a,onSelect:s})=>(0,i.jsx)(`li`,{className:(0,r.default)(`slds-nav-vertical__item`,{"slds-is-active":e}),children:(0,i.jsxs)(`a`,{"data-id":t.id,href:t.url||`#`,className:`slds-nav-vertical__action`,"aria-describedby":a,"aria-current":e
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/constants.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("lodash.isfunction");a=e.__toESM(a,1);var o=(e,{item:t,onSelect:n})=>{t.url||e.preventDefault(),(0,a.default)(n)&&n(e,{item:t})},s=({isSelected:e=!1,item:t,categoryId:a,onSelect:s})=>(0,i.jsx)(`li`,{className:(0,r.default)(`slds-nav-vertical__item`,{"slds-is-active":e}),children:(0,i.jsxs)(`a`,{"data-id":t.id,href:t.url||`#`,className:`slds-nav-vertical__action`,"aria-describedby":a,"aria-current":e?`page`:void 0,onClick:e=>{o(e,{item:t,onSelect:s})},children:[t.icon?(0,i.jsxs)(n.default.Fragment,{children:[n.default.cloneElement(t.icon,{className:(0,r.default)(t.icon.props.className,`slds-m-right_${t.icon.props.size||`medium`}`)}),t.label]}):t.label,t.notificationBadge?n.default.cloneElement(t.notificationBadge,{className:(0,r.default)(t.notificationBadge.props.className,`slds-col_bump-left`)}):(0,i.jsx)(n.default.Fragment,{})]})});s.displayName=t.VERTICAL_NAVIGATION_ITEM,exports.default=s;
|
|
2
2
|
//# sourceMappingURL=item.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.cjs","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
|
|
1
|
+
{"version":3,"file":"item.cjs","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\n// ### isFunction\nimport isFunction from 'lodash.isfunction';\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>,\n\t\tdata: NavigationSelectData\n\t) => void;\n}\n\nconst handleClick = (\n\tevent: React.MouseEvent<HTMLAnchorElement>,\n\t{ item, onSelect }: Pick<ItemProps, 'item' | 'onSelect'>\n) => {\n\tif (!item.url) {\n\t\tevent.preventDefault();\n\t}\n\n\tif (isFunction(onSelect)) {\n\t\tonSelect(event, {\n\t\t\titem,\n\t\t});\n\t}\n};\n\nconst Item = ({\n\tisSelected = false,\n\titem,\n\tcategoryId,\n\tonSelect,\n}: ItemProps) => (\n\t<li\n\t\tclassName={classNames('slds-nav-vertical__item', {\n\t\t\t'slds-is-active': isSelected,\n\t\t})}\n\t>\n\t\t<a\n\t\t\tdata-id={item.id}\n\t\t\thref={item.url || '#'}\n\t\t\tclassName=\"slds-nav-vertical__action\"\n\t\t\taria-describedby={categoryId}\n\t\t\taria-current={isSelected ? 'page' : undefined}\n\t\t\tonClick={(event) => {\n\t\t\t\thandleClick(event, { item, onSelect });\n\t\t\t}}\n\t\t>\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</a>\n\t</li>\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":"iRAuCA,IAAM,GACL,EACA,CAAE,OAAM,cACJ,CACC,EAAK,KACT,EAAM,eAAe,GAGtB,EAAI,EAAA,QAAA,CAAW,CAAQ,GACtB,EAAS,EAAO,CACf,MACD,CAAC,CAEH,EAEM,GAAQ,CACb,aAAa,GACb,OACA,aACA,eAEA,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CAAW,0BAA2B,CAChD,iBAAkB,CACnB,CAAC,EAED,UAAA,EAAA,EAAA,KAAA,CAAC,IAAD,CACC,UAAS,EAAK,GACd,KAAM,EAAK,KAAO,IAClB,UAAU,4BACV,mBAAkB,EAClB,eAAc,EAAa,OAAS,IAAA,GACpC,QAAU,GAAU,CACnB,EAAY,EAAO,CAAE,OAAM,UAAS,CAAC,CACtC,EARD,SAAA,CAUE,EAAK,MACL,EAAA,EAAA,KAAA,CAAC,EAAA,QAAM,SAAP,CAAA,SAAA,CACE,EAAA,QAAM,aAAa,EAAK,KAAM,CAC9B,WAAA,EAAW,EAAA,QAAA,CACV,EAAK,KAAK,MAAM,UAChB,gBAAgB,EAAK,KAAK,MAAM,MAAQ,UACzC,CACD,CAAC,EACA,EAAK,KACS,CAAA,CAAA,EAEhB,EAAK,MAEL,EAAK,kBACL,EAAA,QAAM,aAAa,EAAK,kBAAmB,CAC1C,WAAA,EAAW,EAAA,QAAA,CACV,EAAK,kBAAkB,MAAM,UAC7B,oBACD,CACD,CAAC,GAED,EAAA,EAAA,IAAA,CAAC,EAAA,QAAM,SAAP,CAAiB,CAAA,CAEhB,GACA,CAAA,EAKL,EAAK,YAAc,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../utilities/get-component-doc.cjs"),t=require("../../utilities/warning/deprecated-property.cjs");var n=function(){};process.env.NODE_ENV!==`production`&&(n=function(n,r,i){let a=e.default(i);t.default(n,r.onRenderInfoActions,`onRenderInfoActions`,`infoActions`,a(`infoActions`)),t.default(n,r.onCompleteRenderActions,`onCompleteRenderActions`,`completeActions`,a(`completeActions`))});var r=n;exports.default=r;
|
|
2
|
+
//# sourceMappingURL=check-props.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-props.cjs","names":[],"sources":["../../../../components/welcome-mat/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onRenderInfoActions,\n\t\t\t'onRenderInfoActions',\n\t\t\t'infoActions',\n\t\t\tcreateDocUrl('infoActions')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onCompleteRenderActions,\n\t\t\t'onCompleteRenderActions',\n\t\t\t'completeActions',\n\t\t\tcreateDocUrl('completeActions')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":"sHAOA,IAAI,EAAa,UAA8B,CAAC,EAEhD,QAAA,IAAA,WAA6B,eAC5B,EAAa,SAA4B,EAAW,EAAO,EAAS,CACnE,IAAM,EAAe,EAAA,QAAkB,CAAO,EAE9C,EAAA,QACC,EACA,EAAM,oBACN,sBACA,cACA,EAAa,aAAa,CAC3B,EACA,EAAA,QACC,EACA,EAAM,wBACN,0BACA,kBACA,EAAa,iBAAiB,CAC/B,CACD,GAGD,IAAA,EAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=`welcome-mat`,t=`prod`,n=`WelcomeMat`,r=[{component:`info-badge`,classKey:`WelcomeMatInfoBadge`},{component:`tile`,classKey:`WelcomeMatTile`}],i={component:e,status:t,"display-name":`Welcome Mat`,classKey:n,"SLDS-component-path":`/components/welcome-mat`,dependencies:r,"site-stories":[{heading:`Default`,path:`/__examples__/default.jsx`},{heading:`With Steps Completed`,path:`/__examples__/steps-complete.jsx`},{heading:`Info-Only`,path:`/__examples__/info-only.jsx`},{heading:`Splash`,path:`/__examples__/splash.jsx`},{heading:`Trailhead`,path:`/__examples__/trailhead.jsx`},{heading:`Trailhead - Complete`,path:`/__examples__/trailhead-complete.jsx`}],"url-slug":`welcome-mat`};exports.classKey=n,exports.component=e,exports.default=i,exports.dependencies=r,exports.status=t;
|
|
2
|
+
//# sourceMappingURL=component.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.cjs","names":[],"sources":["../../../../components/welcome-mat/component.json"],"sourcesContent":["{\n\t\"component\": \"welcome-mat\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Welcome Mat\",\n\t\"classKey\": \"WelcomeMat\",\n\t\"SLDS-component-path\": \"/components/welcome-mat\",\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"component\": \"info-badge\",\n\t\t\t\"classKey\": \"WelcomeMatInfoBadge\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"tile\",\n\t\t\t\"classKey\": \"WelcomeMatTile\"\n\t\t}\n\t],\n\t\"site-stories\": [\n\t\t{\n\t\t\t\"heading\": \"Default\",\n\t\t\t\"path\": \"/__examples__/default.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"With Steps Completed\",\n\t\t\t\"path\": \"/__examples__/steps-complete.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Info-Only\",\n\t\t\t\"path\": \"/__examples__/info-only.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Splash\",\n\t\t\t\"path\": \"/__examples__/splash.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Trailhead\",\n\t\t\t\"path\": \"/__examples__/trailhead.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Trailhead - Complete\",\n\t\t\t\"path\": \"/__examples__/trailhead-complete.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"welcome-mat\"\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../modal/index.cjs"),r=require("../progress-bar/index.cjs");let
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../modal/index.cjs"),r=require("../progress-bar/index.cjs"),i=require("./check-props.cjs"),a=require("./component.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l={unitsCompletedAfter:`units completed`},u=({children:e,className:u,doNotShowAgainCheckbox:d,id:f,infoActions:p,infoBadge:m,isOpen:h=!0,labels:g,onRequestClose:_,onRenderInfoActions:v,variant:y=`steps`})=>{let b=(0,o.useId)(),x=f||b,S={...l,...g};(0,o.useEffect)(()=>{i.default(t.WELCOME_MAT,{onRenderInfoActions:v},a.default)},[v]);let{totalSteps:C,completedSteps:w,progress:T}=(0,o.useMemo)(()=>{let t=o.default.Children.count(e),n=o.default.Children.toArray(e).filter(e=>o.default.isValidElement(e)&&e.props.isComplete).length;return{totalSteps:t,completedSteps:n,progress:t>0?n/t*100:0}},[e]),E=(0,c.jsxs)(`div`,{className:(0,s.default)(`slds-welcome-mat__info-content`,u),id:`${x}-content`,children:[(0,c.jsx)(`h2`,{className:`slds-welcome-mat__info-title`,id:`${x}-label`,children:S.title}),(0,c.jsx)(`div`,{className:`slds-welcome-mat__info-description slds-text-longform`,children:(0,c.jsx)(`p`,{children:S.description})}),(y===`info-only`||y===`splash`)&&(0,c.jsxs)(`div`,{className:`slds-welcome-mat__info-actions`,children:[p??v?.(),d&&(0,c.jsx)(`div`,{className:`slds-m-top_large`,children:d})]}),(y===`steps`||y===`trailhead-connected`)&&e&&(0,c.jsxs)(`div`,{className:(0,s.default)(`slds-welcome-mat__info-progress`,{"slds-welcome-mat__info-progress_complete":w===C}),children:[y===`trailhead-connected`&&o.default.Children.map(m,e=>o.default.isValidElement(e)?o.default.cloneElement(e,{isComplete:w===C||void 0}):e),(w!==C||y!==`trailhead-connected`)&&(0,c.jsxs)(c.Fragment,{children:[y===`trailhead-connected`?(0,c.jsxs)(`p`,{children:[w,`/`,C,` `,S.unitsCompletedAfter]}):(0,c.jsx)(`p`,{children:(0,c.jsxs)(`strong`,{children:[w,`/`,C,` `,S.unitsCompletedAfter]})}),(0,c.jsx)(r.default,{value:T,radius:`circular`})]})]})]});return(0,c.jsx)(n.default,{assistiveText:{dialogLabelledBy:`${x}-label`},isOpen:h,onRequestClose:_,size:`small`,id:`${x}-modal`,children:(0,c.jsx)(`div`,{className:(0,s.default)(`slds-welcome-mat`,{"slds-welcome-mat_info-only":y===`info-only`,"slds-welcome-mat_splash":!e}),id:x,children:(0,c.jsx)(`div`,{className:`slds-welcome-mat__content slds-grid`,children:e?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`div`,{className:`slds-welcome-mat__info slds-size_1-of-2`,children:E}),(0,c.jsx)(`div`,{className:(0,s.default)(`slds-welcome-mat__tiles`,`slds-size_1-of-2`,{"slds-welcome-mat__tiles_info-only":y===`info-only`}),children:o.default.Children.map(e,e=>o.default.isValidElement(e)?o.default.cloneElement(e,{variant:y}):e)})]}):(0,c.jsx)(`div`,{className:`slds-welcome-mat__info slds-size_1-of-1`,children:E})})})})};u.displayName=t.WELCOME_MAT,exports.default=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/welcome-mat/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, useMemo, type ReactNode, type ReactElement } from 'react';\nimport classNames from 'classnames';\nimport Modal from '../modal';\nimport ProgressBar from '../progress-bar';\nimport { WELCOME_MAT } from '../../utilities/constants';\n\n/**\n * Welcome mat variant types\n */\nexport type WelcomeMatVariant = 'steps' | 'info-only' | 'splash' | 'trailhead-connected';\n\n/**\n * Labels for WelcomeMat\n */\nexport interface WelcomeMatLabels {\n\t/** Title text */\n\ttitle?: string;\n\t/** Description text */\n\tdescription?: string;\n\t/** Text after units completed number */\n\tunitsCompletedAfter?: string;\n}\n\n/**\n * Props for the WelcomeMat component\n */\nexport interface WelcomeMatProps {\n\t/** WelcomeMatTile children */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Do not show again checkbox element */\n\tdoNotShowAgainCheckbox?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Info badge for trailhead variant */\n\tinfoBadge?: ReactNode;\n\t/** Whether modal is open */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: WelcomeMatLabels;\n\t/** Close request handler */\n\tonRequestClose?: () => void;\n\t/** Render function for info actions */\n\tonRenderInfoActions?: () => ReactNode;\n\t/** Component variant */\n\tvariant?: WelcomeMatVariant;\n}\n\nconst defaultLabels: WelcomeMatLabels = {\n\tunitsCompletedAfter: 'units completed',\n};\n\n/**\n * A Welcome Mat provides a series of unordered items a user can click to learn about a thematic topic.\n */\nconst WelcomeMat = ({\n\tchildren,\n\tclassName,\n\tdoNotShowAgainCheckbox,\n\tid: propId,\n\tinfoBadge,\n\tisOpen = true,\n\tlabels: propLabels,\n\tonRequestClose,\n\tonRenderInfoActions,\n\tvariant = 'steps',\n}: WelcomeMatProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst labels = { ...defaultLabels, ...propLabels };\n\n\t// Calculate progress from children\n\tconst { totalSteps, completedSteps, progress } = useMemo(() => {\n\t\tconst total = React.Children.count(children);\n\t\tconst completed = React.Children.toArray(children).filter(\n\t\t\t(c) => React.isValidElement(c) && (c.props as { isComplete?: boolean }).isComplete\n\t\t).length;\n\t\treturn {\n\t\t\ttotalSteps: total,\n\t\t\tcompletedSteps: completed,\n\t\t\tprogress: total > 0 ? (completed / total) * 100 : 0,\n\t\t};\n\t}, [children]);\n\n\tconst splash = (\n\t\t<div\n\t\t\tclassName={classNames('slds-welcome-mat__info-content', className as string)}\n\t\t\tid={`${id}-content`}\n\t\t>\n\t\t\t<h2 className=\"slds-welcome-mat__info-title\" id={`${id}-label`}>\n\t\t\t\t{labels.title}\n\t\t\t</h2>\n\t\t\t<div className=\"slds-welcome-mat__info-description slds-text-longform\">\n\t\t\t\t<p>{labels.description}</p>\n\t\t\t</div>\n\t\t\t{(variant === 'info-only' || variant === 'splash') && (\n\t\t\t\t<div className=\"slds-welcome-mat__info-actions\">\n\t\t\t\t\t{onRenderInfoActions?.()}\n\t\t\t\t\t{doNotShowAgainCheckbox && (\n\t\t\t\t\t\t<div className=\"slds-m-top_large\">{doNotShowAgainCheckbox}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{(variant === 'steps' || variant === 'trailhead-connected') && children && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-welcome-mat__info-progress', {\n\t\t\t\t\t\t'slds-welcome-mat__info-progress_complete': completedSteps === totalSteps,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{variant === 'trailhead-connected' &&\n\t\t\t\t\t\tReact.Children.map(infoBadge, (child) =>\n\t\t\t\t\t\t\tReact.isValidElement(child)\n\t\t\t\t\t\t\t\t? React.cloneElement(child as ReactElement<{ isComplete?: boolean }>, {\n\t\t\t\t\t\t\t\t\t\tisComplete: completedSteps === totalSteps || undefined,\n\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t: child\n\t\t\t\t\t\t)}\n\t\t\t\t\t{(completedSteps !== totalSteps || variant !== 'trailhead-connected') && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{variant === 'trailhead-connected' ? (\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t{completedSteps}/{totalSteps} {labels.unitsCompletedAfter}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t{completedSteps}/{totalSteps} {labels.unitsCompletedAfter}\n\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<ProgressBar value={progress} radius=\"circular\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<Modal\n\t\t\tassistiveText={{\n\t\t\t\tdialogLabelledBy: `${id}-label`,\n\t\t\t}}\n\t\t\tisOpen={isOpen}\n\t\t\tonRequestClose={onRequestClose}\n\t\t\tsize=\"small\"\n\t\t\tid={`${id}-modal`}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-welcome-mat',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-welcome-mat_info-only': variant === 'info-only',\n\t\t\t\t\t\t'slds-welcome-mat_splash': !children,\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t\tid={id}\n\t\t\t>\n\t\t\t\t<div className=\"slds-welcome-mat__content slds-grid\">\n\t\t\t\t\t{children ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"slds-welcome-mat__info slds-size_1-of-2\">{splash}</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-welcome-mat__tiles',\n\t\t\t\t\t\t\t\t\t'slds-size_1-of-2',\n\t\t\t\t\t\t\t\t\t{ 'slds-welcome-mat__tiles_info-only': variant === 'info-only' }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{React.Children.map(children, (child) =>\n\t\t\t\t\t\t\t\t\tReact.isValidElement(child)\n\t\t\t\t\t\t\t\t\t\t? React.cloneElement(child as ReactElement<{ variant?: WelcomeMatVariant }>, {\n\t\t\t\t\t\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t: child\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"slds-welcome-mat__info slds-size_1-of-1\">{splash}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n};\n\nWelcomeMat.displayName = WELCOME_MAT;\n\nexport default WelcomeMat;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/welcome-mat/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseEffect,\n\tuseId,\n\tuseMemo,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\nimport classNames from 'classnames';\nimport Modal, {\n\ttype ModalRequestCloseData,\n\ttype ModalRequestCloseEvent,\n\ttype ModalRequestCloseTrigger,\n} from '../modal';\nimport ProgressBar from '../progress-bar';\nimport { WELCOME_MAT } from '../../utilities/constants';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Welcome mat variant types\n */\nexport type WelcomeMatVariant =\n\t'steps' | 'info-only' | 'splash' | 'trailhead-connected';\n\n/**\n * Labels for WelcomeMat\n */\nexport interface WelcomeMatLabels {\n\t/** Title text */\n\ttitle?: string;\n\t/** Description text */\n\tdescription?: string;\n\t/** Text after units completed number */\n\tunitsCompletedAfter?: string;\n}\n\n/**\n * What caused a WelcomeMat close request (same as the underlying Modal's)\n */\nexport type WelcomeMatRequestCloseTrigger = ModalRequestCloseTrigger;\n\n/**\n * Data passed to `onRequestClose` (forwarded from the underlying Modal)\n */\nexport type WelcomeMatRequestCloseData = ModalRequestCloseData;\n\n/**\n * Event passed to `onRequestClose` (forwarded from the underlying Modal)\n */\nexport type WelcomeMatRequestCloseEvent = ModalRequestCloseEvent;\n\ninterface WelcomeMatBaseProps {\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** HTML id */\n\tid?: string;\n\t/** Whether modal is open */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: WelcomeMatLabels;\n\t/**\n\t * Close request handler, forwarded from the underlying Modal. Receives the triggering\n\t * click or keydown event and `data.trigger`: `'close-button'`, `'escape'`, or `'click-outside'`.\n\t */\n\tonRequestClose?: (\n\t\tevent: WelcomeMatRequestCloseEvent,\n\t\tdata: WelcomeMatRequestCloseData\n\t) => void;\n}\n\n/**\n * `variant` decides what the info panel shows. `steps` and\n * `trailhead-connected` show progress through `WelcomeMatTile` children;\n * `info-only` and `splash` show actions instead.\n */\nexport type WelcomeMatVariantProps =\n\t| {\n\t\t\t/** Tiles with a progress bar */\n\t\t\tvariant?: 'steps';\n\t\t\t/** WelcomeMatTile children */\n\t\t\tchildren: ReactNode;\n\t\t\tdoNotShowAgainCheckbox?: never;\n\t\t\tinfoBadge?: never;\n\t\t\tinfoActions?: never;\n\t\t\tonRenderInfoActions?: never;\n\t }\n\t| {\n\t\t\t/** Tiles with Trailhead progress and an info badge */\n\t\t\tvariant: 'trailhead-connected';\n\t\t\t/** WelcomeMatTile children */\n\t\t\tchildren: ReactNode;\n\t\t\tdoNotShowAgainCheckbox?: never;\n\t\t\t/** WelcomeMatInfoBadge shown above the progress */\n\t\t\tinfoBadge?: ReactNode;\n\t\t\tinfoActions?: never;\n\t\t\tonRenderInfoActions?: never;\n\t }\n\t| {\n\t\t\t/** Tiles with actions instead of progress */\n\t\t\tvariant: 'info-only';\n\t\t\t/** WelcomeMatTile children */\n\t\t\tchildren: ReactNode;\n\t\t\t/** Do not show again checkbox element */\n\t\t\tdoNotShowAgainCheckbox?: ReactNode;\n\t\t\tinfoBadge?: never;\n\t\t\t/** Actions shown below the description */\n\t\t\tinfoActions?: ReactNode;\n\t\t\t/** @deprecated Use `infoActions` instead. */\n\t\t\tonRenderInfoActions?: () => ReactNode;\n\t }\n\t| {\n\t\t\t/** Info panel only, with actions and no tiles */\n\t\t\tvariant: 'splash';\n\t\t\tchildren?: never;\n\t\t\t/** Do not show again checkbox element */\n\t\t\tdoNotShowAgainCheckbox?: ReactNode;\n\t\t\tinfoBadge?: never;\n\t\t\t/** Actions shown below the description */\n\t\t\tinfoActions?: ReactNode;\n\t\t\t/** @deprecated Use `infoActions` instead. */\n\t\t\tonRenderInfoActions?: () => ReactNode;\n\t };\n\n/**\n * Props for the WelcomeMat component\n */\nexport type WelcomeMatProps = WelcomeMatBaseProps & WelcomeMatVariantProps;\n\nconst defaultLabels: WelcomeMatLabels = {\n\tunitsCompletedAfter: 'units completed',\n};\n\n/**\n * A Welcome Mat provides a series of unordered items a user can click to learn about a thematic topic.\n */\nconst WelcomeMat = ({\n\tchildren,\n\tclassName,\n\tdoNotShowAgainCheckbox,\n\tid: propId,\n\tinfoActions,\n\tinfoBadge,\n\tisOpen = true,\n\tlabels: propLabels,\n\tonRequestClose,\n\tonRenderInfoActions,\n\tvariant = 'steps',\n}: WelcomeMatProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst labels = { ...defaultLabels, ...propLabels };\n\n\tuseEffect(() => {\n\t\tcheckProps(WELCOME_MAT, { onRenderInfoActions }, componentDoc);\n\t}, [onRenderInfoActions]);\n\n\t// Calculate progress from children\n\tconst { totalSteps, completedSteps, progress } = useMemo(() => {\n\t\tconst total = React.Children.count(children);\n\t\tconst completed = React.Children.toArray(children).filter(\n\t\t\t(c) =>\n\t\t\t\tReact.isValidElement(c) &&\n\t\t\t\t(c.props as { isComplete?: boolean }).isComplete\n\t\t).length;\n\t\treturn {\n\t\t\ttotalSteps: total,\n\t\t\tcompletedSteps: completed,\n\t\t\tprogress: total > 0 ? (completed / total) * 100 : 0,\n\t\t};\n\t}, [children]);\n\n\tconst splash = (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-welcome-mat__info-content',\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t\tid={`${id}-content`}\n\t\t>\n\t\t\t<h2 className=\"slds-welcome-mat__info-title\" id={`${id}-label`}>\n\t\t\t\t{labels.title}\n\t\t\t</h2>\n\t\t\t<div className=\"slds-welcome-mat__info-description slds-text-longform\">\n\t\t\t\t<p>{labels.description}</p>\n\t\t\t</div>\n\t\t\t{(variant === 'info-only' || variant === 'splash') && (\n\t\t\t\t<div className=\"slds-welcome-mat__info-actions\">\n\t\t\t\t\t{infoActions ?? onRenderInfoActions?.()}\n\t\t\t\t\t{doNotShowAgainCheckbox && (\n\t\t\t\t\t\t<div className=\"slds-m-top_large\">{doNotShowAgainCheckbox}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{(variant === 'steps' || variant === 'trailhead-connected') &&\n\t\t\t\tchildren && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames('slds-welcome-mat__info-progress', {\n\t\t\t\t\t\t\t'slds-welcome-mat__info-progress_complete':\n\t\t\t\t\t\t\t\tcompletedSteps === totalSteps,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{variant === 'trailhead-connected' &&\n\t\t\t\t\t\t\tReact.Children.map(infoBadge, (child) =>\n\t\t\t\t\t\t\t\tReact.isValidElement(child)\n\t\t\t\t\t\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\t\t\t\t\t\tchild as ReactElement<{ isComplete?: boolean }>,\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tisComplete: completedSteps === totalSteps || undefined,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t: child\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(completedSteps !== totalSteps ||\n\t\t\t\t\t\t\tvariant !== 'trailhead-connected') && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{variant === 'trailhead-connected' ? (\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t{completedSteps}/{totalSteps} {labels.unitsCompletedAfter}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{completedSteps}/{totalSteps} {labels.unitsCompletedAfter}\n\t\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<ProgressBar value={progress} radius=\"circular\" />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<Modal\n\t\t\tassistiveText={{\n\t\t\t\tdialogLabelledBy: `${id}-label`,\n\t\t\t}}\n\t\t\tisOpen={isOpen}\n\t\t\tonRequestClose={onRequestClose}\n\t\t\tsize=\"small\"\n\t\t\tid={`${id}-modal`}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-welcome-mat', {\n\t\t\t\t\t'slds-welcome-mat_info-only': variant === 'info-only',\n\t\t\t\t\t'slds-welcome-mat_splash': !children,\n\t\t\t\t})}\n\t\t\t\tid={id}\n\t\t\t>\n\t\t\t\t<div className=\"slds-welcome-mat__content slds-grid\">\n\t\t\t\t\t{children ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"slds-welcome-mat__info slds-size_1-of-2\">\n\t\t\t\t\t\t\t\t{splash}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-welcome-mat__tiles',\n\t\t\t\t\t\t\t\t\t'slds-size_1-of-2',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'slds-welcome-mat__tiles_info-only':\n\t\t\t\t\t\t\t\t\t\t\tvariant === 'info-only',\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>\n\t\t\t\t\t\t\t\t{React.Children.map(children, (child) =>\n\t\t\t\t\t\t\t\t\tReact.isValidElement(child)\n\t\t\t\t\t\t\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\t\t\t\t\t\t\tchild as ReactElement<{ variant?: WelcomeMatVariant }>,\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t: child\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"slds-welcome-mat__info slds-size_1-of-1\">\n\t\t\t\t\t\t\t{splash}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n};\n\nWelcomeMat.displayName = WELCOME_MAT;\n\nexport default WelcomeMat;\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../../utilities/generate-id.cjs"),r=require("../icon/index.cjs");let
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../../utilities/generate-id.cjs"),r=require("../icon/index.cjs"),i=require("./check-props.cjs"),a=require("./component.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=t.WELCOME_MAT_BADGE,l={isComplete:!1},u=class extends o.default.Component{static displayName=c;static defaultProps=l;generatedId;constructor(e){super(e),this.generatedId=n.default()}componentDidMount(){i.default(t.WELCOME_MAT_BADGE,this.props,a.default)}componentDidUpdate(){i.default(t.WELCOME_MAT_BADGE,this.props,a.default)}getId(){return this.props.id||this.generatedId}getCompletedText(){return this.props.assistiveText&&this.props.assistiveText.completed?this.props.assistiveText.completed:`Completed`}render(){return(0,s.jsxs)(`div`,{id:this.getId(),className:this.props.className,children:[(0,s.jsxs)(`div`,{className:`slds-welcome-mat__info-badge-container`,children:[(0,s.jsx)(`img`,{className:`slds-welcome-mat__info-badge`,src:this.props.image,width:`50`,height:`50`,alt:``}),(0,s.jsx)(r.default,{category:`action`,name:`check`,assistiveText:{label:this.getCompletedText()}})]}),this.props.children,this.props.isComplete?this.props.completeActions??this.props.onCompleteRenderActions?.():null]})}};exports.default=u;
|
|
2
2
|
//# sourceMappingURL=info-badge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-badge.cjs","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';\n\nconst displayName = WELCOME_MAT_BADGE;\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 * 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
|
|
1
|
+
{"version":3,"file":"info-badge.cjs","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\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=\"\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tcategory=\"action\"\n\t\t\t\t\t\tname=\"check\"\n\t\t\t\t\t\tassistiveText={{ label: this.getCompletedText() }}\n\t\t\t\t\t/>\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":"sTAaA,IAAM,EAAc,EAAA,kBAsCd,EAAkD,CACvD,WAAY,EACb,EAKM,EAAN,cAAwB,EAAA,QAAM,SAAoC,CACjE,OAAO,YAAc,EAErB,OAAO,aAAe,EAEtB,YAEA,YAAY,EAAiC,CAC5C,MAAM,CAAK,EAEX,KAAK,YAAc,EAAA,QAAW,CAC/B,CAEA,mBAAoB,CACnB,EAAA,QAAW,EAAA,kBAAmB,KAAK,MAAO,EAAA,OAAY,CACvD,CAEA,oBAAqB,CACpB,EAAA,QAAW,EAAA,kBAAmB,KAAK,MAAO,EAAA,OAAY,CACvD,CAKA,OAAQ,CACP,OAAO,KAAK,MAAM,IAAM,KAAK,WAC9B,CAEA,kBAAmB,CAClB,OAAO,KAAK,MAAM,eAAiB,KAAK,MAAM,cAAc,UACzD,KAAK,MAAM,cAAc,UACzB,WACJ,CAEA,QAAS,CACR,OACC,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,GAAI,KAAK,MAAM,EAAG,UAAW,KAAK,MAAM,UAA7C,SAAA,EACC,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yCAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,UAAU,+BACV,IAAK,KAAK,MAAM,MAChB,MAAM,KACN,OAAO,KACP,IAAI,EACJ,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,SAAS,SACT,KAAK,QACL,cAAe,CAAE,MAAO,KAAK,iBAAiB,CAAE,CAChD,CAAA,CACG,IACJ,KAAK,MAAM,SACX,KAAK,MAAM,WACR,KAAK,MAAM,iBACb,KAAK,MAAM,0BAA0B,EACpC,IACC,GAEP,CACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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=`
|
|
1
|
+
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=`SLDSIllustration`,re=`SLDSList`,ie=`SLDSListItem`,ae=`SLDSListItemLabel`,oe=`SLDSLookup`,se=`SLDSMediaObject`,ce=`SLDSMenuDropdown`,le=`SLDSMenuDropdownTrigger`,ue=`SLDSModal`,de=`SLDSPanel`,fe=`SLDSFilterGroup`,pe=`SLDSFilterList`,me=`SLDSPanelFilterListHeading`,he=`SLDSPageHeader`,ge=`SLDSPageHeaderControl`,_e=`SLDSPill`,ve=`SLDSPillContainer`,ye=`SLDSPortalSettings`,be=`SLDSPopover`,xe=`SLDSPopoverEditDialog`,Se=`SLDSPopoverTooltip`,Ce=`SLDSProgressIndicator`,we=`SLDSProgressIndicatorPath`,Te=`SLDSProgressIndicatorProgress`,Ee=`SLDSProgressIndicatorStep`,De=`SLDSProgressIndicatorStepVertical`,Oe=`SLDSProgressRing`,ke=`SLDSProgressBar`,Ae=`SLDSSetupAssistant`,je=`SLDSSetupAssistantStep`,Me=`SLDSScopedNotification`,Ne=`SLDSSlider`,Pe=`SLDSSpinner`,Fe=`SLDSSplitView`,Ie=`SLDSSplitViewHeader`,Le=`SLDSSplitViewListbox`,Re=`SLDSRadio`,ze=`SLDSRadioGroup`,Be=`SLDSRadioButtonGroup`,Ve=`SLDSTab`,He=`SLDSTabPanel`,Ue=`SLDSTabs`,We=`SLDSTabsList`,Ge=`SLDSTabsPanel`,Ke=`SLDSTimepicker`,qe=`SLDSToast`,Je=`SLDSToastContainer`,Ye=`SLDSTree`,Xe=`SLDSTreeBranch`,Ze=`SLDSTreeItem`,Qe=`SLDSTrialBar`,$e=`SLDSTrialBarDropdown`,et=`SLDSTrialBarButton`,tt=`SLDSVerticalNavigation`,nt=`SLDSVerticalNavigationItem`,rt=`SLDSVisualPicker`,it=`SLDSVisualPickerLink`,at=`SLDSWelcomeMat`,ot=`SLDSWelcomeMatTile`,st=`SLDSWelcomeMatBadge`;exports.ACCORDION=e,exports.ACCORDION_PANEL=t,exports.ALERT=n,exports.ALERT_CONTAINER=r,exports.AVATAR=i,exports.BADGE=a,exports.BREADCRUMB=o,exports.BUILDER_HEADER=s,exports.BUILDER_HEADER_MISC=c,exports.BUILDER_HEADER_NAV=u,exports.BUILDER_HEADER_NAV_DROPDOWN=d,exports.BUILDER_HEADER_NAV_LINK=f,exports.BUILDER_HEADER_TOOLBAR=p,exports.BUILDER_HEADER_UTILITIES=l,exports.BUTTON=m,exports.BUTTON_GROUP=h,exports.BUTTON_ICON=_,exports.BUTTON_STATEFUL=g,exports.CARD=v,exports.CARD_BODY=y,exports.CARD_EMPTY=b,exports.CARD_FILTER=x,exports.CARD_FOOTER=S,exports.CARD_HEADER=C,exports.CAROUSEL=w,exports.CAROUSEL_AUTOPLAY_BUTTON=O,exports.CAROUSEL_INDICATORS=T,exports.CAROUSEL_ITEM=E,exports.CAROUSEL_NAVIGATORS=D,exports.CHECKBOX=J,exports.COLOR_PICKER=k,exports.COMBOBOX=A,exports.DATE_PICKER=R,exports.DIALOG=B,exports.DYNAMIC_ICON=z,exports.EXPANDABLE_SECTION=K,exports.FILES=V,exports.FILES_ACTIONS=G,exports.FILES_FIGURE=W,exports.FILES_FILE=H,exports.FILES_MORE=U,exports.FILTER=q,exports.HIGHLIGHTER=Q,exports.ICON=$,exports.ICON_INPUT=te,exports.ICON_SETTINGS=ee,exports.ILLUSTRATION=ne,exports.INPUT=Y,exports.LIST=re,exports.LIST_ITEM=ie,exports.LIST_ITEM_LABEL=ae,exports.LOOKUP=oe,exports.MEDIA_OBJECT=se,exports.MENU_DROPDOWN=ce,exports.MENU_DROPDOWN_TRIGGER=le,exports.MODAL=ue,exports.PAGE_HEADER=he,exports.PAGE_HEADER_CONTROL=ge,exports.PANEL=de,exports.PANEL_FILTER_GROUP=fe,exports.PANEL_FILTER_LIST=pe,exports.PANEL_FILTER_LIST_HEADING=me,exports.PILL=_e,exports.PILL_CONTAINER=ve,exports.POPOVER=be,exports.POPOVER_EDIT_DIALOG=xe,exports.POPOVER_TOOLTIP=Se,exports.PORTAL_SETTINGS=ye,exports.PROGRESS_BAR=ke,exports.PROGRESS_INDICATOR=Ce,exports.PROGRESS_INDICATOR_PATH=we,exports.PROGRESS_INDICATOR_PROGRESS=Te,exports.PROGRESS_INDICATOR_STEP=Ee,exports.PROGRESS_INDICATOR_STEP_VERTICAL=De,exports.PROGRESS_RING=Oe,exports.RADIO=Re,exports.RADIO_BUTTON_GROUP=Be,exports.RADIO_GROUP=ze,exports.SCOPED_NOTIFICATION=Me,exports.SEARCH=Z,exports.SETUP_ASSISTANT=Ae,exports.SETUP_ASSISTANT_STEP=je,exports.SIMPLE_DATA_TABLE=j,exports.SIMPLE_DATA_TABLE_CELL=M,exports.SIMPLE_DATA_TABLE_COLUMN=N,exports.SIMPLE_DATA_TABLE_HEAD=P,exports.SIMPLE_DATA_TABLE_HEADER_CELL=F,exports.SIMPLE_DATA_TABLE_ROW=L,exports.SIMPLE_DATA_TABLE_ROW_ACTIONS=I,exports.SLIDER=Ne,exports.SPINNER=Pe,exports.SPLIT_VIEW=Fe,exports.SPLIT_VIEW_HEADER=Ie,exports.SPLIT_VIEW_LISTBOX=Le,exports.TAB=Ve,exports.TABS=Ue,exports.TABS_LIST=We,exports.TABS_PANEL=Ge,exports.TAB_PANEL=He,exports.TEXTAREA=X,exports.TIME_PICKER=Ke,exports.TOAST=qe,exports.TOAST_CONTAINER=Je,exports.TREE=Ye,exports.TREE_BRANCH=Xe,exports.TREE_ITEM=Ze,exports.TRIAL_BAR=Qe,exports.TRIAL_BAR_BUTTON=et,exports.TRIAL_BAR_DROPDOWN=$e,exports.VERTICAL_NAVIGATION=tt,exports.VERTICAL_NAVIGATION_ITEM=nt,exports.VISUAL_PICKER=rt,exports.VISUAL_PICKER_LINK=it,exports.WELCOME_MAT=at,exports.WELCOME_MAT_BADGE=st,exports.WELCOME_MAT_TILE=ot;
|
|
2
2
|
//# sourceMappingURL=constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs","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
|
|
1
|
+
{"version":3,"file":"constants.cjs","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 ILLUSTRATION = 'SLDSIllustration';\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,EAAY,gBACZ,EAAkB,qBAClB,EAAQ,YACR,EAAkB,qBASlB,EAAS,aACT,EAAQ,YAOR,EAAa,iBACb,EAAiB,oBACjB,EAAsB,wBACtB,EAA2B,6BAC3B,EAAqB,uBACrB,EAA8B,+BAC9B,EAA0B,2BAC1B,EAAyB,2BACzB,EAAS,aACT,EAAe,kBACf,EAAkB,qBAClB,EAAc,iBACd,EAAO,WACP,EAAY,eACZ,EAAa,gBACb,EAAc,iBACd,EAAc,iBACd,EAAc,iBACd,EAAW,eACX,EAAsB,yBACtB,EAAgB,mBAChB,EAAsB,yBACtB,EAA2B,6BAC3B,EAAe,kBACf,EAAW,eACX,EAAoB,sBACpB,EAAyB,0BACzB,EAA2B,4BAC3B,EAAyB,0BACzB,EAAgC,gCAChC,EAAgC,gCAChC,EAAwB,yBACxB,EAAc,iBAEd,EAAe,kBACf,EAAS,aACT,EAAQ,YACR,EAAa,gBACb,EAAa,gBACb,EAAe,kBACf,EAAgB,mBAChB,EAAqB,wBAKrB,EAAS,aACT,EAAW,eACX,EAAQ,YACR,EAAW,eACX,EAAS,aAqBT,EAAc,kBACd,EAAO,WACP,GAAgB,mBAChB,GAAa,gBACb,GAAe,mBACf,GAAO,WACP,GAAY,eACZ,GAAkB,oBAGlB,GAAS,aACT,GAAe,kBACf,GAAgB,mBAChB,GAAwB,0BAExB,GAAQ,YAER,GAAQ,YACR,GAAqB,kBACrB,GAAoB,iBACpB,GAA4B,6BAC5B,GAAc,iBACd,GAAsB,wBACtB,GAAO,WACP,GAAiB,oBACjB,GAAkB,qBAClB,GAAU,cACV,GAAsB,wBACtB,GAAkB,qBAClB,GAAqB,wBACrB,GAA0B,4BAC1B,GAA8B,gCAC9B,GAA0B,4BAC1B,GACZ,oCACY,GAAgB,mBAChB,GAAe,kBACf,GAAkB,qBAClB,GAAuB,yBACvB,GAAsB,yBACtB,GAAS,aACT,GAAU,cACV,GAAa,gBACb,GAAoB,sBACpB,GAAqB,uBACrB,GAAQ,YACR,GAAc,iBACd,GAAqB,uBACrB,GAAM,UAEN,GAAY,eACZ,GAAO,WACP,GAAY,eACZ,GAAa,gBACb,GAAc,iBACd,GAAQ,YACR,GAAkB,qBAClB,GAAO,WACP,GAAc,iBACd,GAAY,eACZ,GAAY,eACZ,GAAqB,uBACrB,GAAmB,qBACnB,GAAsB,yBACtB,GAA2B,6BAC3B,GAAgB,mBAChB,GAAqB,uBACrB,GAAc,iBACd,GAAmB,qBACnB,GAAoB"}
|
|
@@ -28,7 +28,7 @@ var a = ({ children: e, expanded: a, id: o, panelContentActions: s, summary: c,
|
|
|
28
28
|
variant: "base",
|
|
29
29
|
children: /* @__PURE__ */ r("span", {
|
|
30
30
|
className: "slds-truncate",
|
|
31
|
-
title: l || c,
|
|
31
|
+
title: l || (typeof c == "string" ? c : void 0),
|
|
32
32
|
children: c
|
|
33
33
|
})
|
|
34
34
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","names":[],"sources":["../../../../components/accordion/panel.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 [Accordion design\n// pattern](https://www.lightningdesignsystem.com/components/accordion/) in\n// React. Based on SLDS v2.3.2\n\nimport React, { type ReactNode, type KeyboardEvent, type MouseEvent } from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\n\nimport { ACCORDION_PANEL } from '../../utilities/constants';\n\nexport interface AccordionPanelProps {\n\t/**\n\t * The panel content for the Accordion component. Accordion panels should be added as <AccordionPanel />. Event handler for the accordion panels should be added to `<AccordionPanel />`. Optional `panelContentActions` component may be passed as prop. _Tested with Mocha framework and snapshot testing._\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Indicates whether item is expanded or not, which should be handled by `onTogglePanel`. _Tested with Mocha framework and snapshot testing._\n\t */\n\texpanded: boolean;\n\t/**\n\t * Id of the item belonging to this panel. _Tested with snapshot testing._\n\t */\n\tid: number | string;\n\t/**\n\t * Component that can be passed as prop to `<Panel />`. As an example, a menu dropdown could be used here to handle additional actions for each accordion panel. _Tested with Mocha framework._\n\t */\n\tpanelContentActions?: ReactNode;\n\t/**\n\t * Callback that will run whenever the panel summary is clicked.\n\t */\n\tonClickSummary?: () => void;\n\t/**\n\t * Callback that will run whenever there is a keydown on the panel button. Function doesn't change the state of the component.\n\t */\n\tonKeyDownSummary?: (event: KeyboardEvent) => void;\n\t/**\n\t * Callback that will run whenever a panel is toggled. Function should handle state to toggle `expanded` prop. _Tested with Mocha framework._\n\t */\n\tonTogglePanel: (event: MouseEvent) => void;\n\t/**\n\t * Ref callback that will pass in panel's `input` tag\n\t */\n\trefs?: {\n\t\tsummaryButton?: (component: HTMLElement | null) => void;\n\t};\n\t/**\n\t * Summary in the span element in the header of this panel. The summary is truncated and so the title element should contain the full text so that it is accessible on hover. _Tested with snapshot testing._\n\t */\n\tsummary: string | ReactNode;\n\t/**\n\t * HTML title attribute. _Tested with snapshot testing._\n\t */\n\ttitle?: string;\n}\n\n/**\n * The panel content for the Accordion component.\n */\nconst AccordionPanel = ({\n\tchildren,\n\texpanded,\n\tid,\n\tpanelContentActions,\n\tsummary,\n\ttitle,\n\tonClickSummary,\n\tonKeyDownSummary,\n\tonTogglePanel,\n\trefs = {},\n}: AccordionPanelProps): React.ReactElement => (\n\t<li className=\"slds-accordion__list-item\">\n\t\t<section\n\t\t\tclassName={classNames('slds-accordion__section', {\n\t\t\t\t'slds-is-open': expanded,\n\t\t\t})}\n\t\t>\n\t\t\t<div className=\"slds-accordion__summary\">\n\t\t\t\t<h3 className=\"slds-text-heading_small slds-accordion__summary-heading slds-has-flexi-truncate\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\taria-controls={`${id}-accordion-panel`}\n\t\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\t\tbuttonRef={refs.summaryButton}\n\t\t\t\t\t\tclassName=\"slds-button_reset slds-accordion__summary-action\"\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonClassName=\"slds-accordion__summary-action-icon slds-button__icon slds-button__icon_left\"\n\t\t\t\t\t\ticonName=\"switch\"\n\t\t\t\t\t\tid={`${id}-accordion-button`}\n\t\t\t\t\t\tonKeyDown={onKeyDownSummary}\n\t\t\t\t\t\tonClick={(e: MouseEvent) => {\n\t\t\t\t\t\t\tif (onClickSummary) {\n\t\t\t\t\t\t\t\tonClickSummary();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonTogglePanel(e);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span
|
|
1
|
+
{"version":3,"file":"panel.js","names":[],"sources":["../../../../components/accordion/panel.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 [Accordion design\n// pattern](https://www.lightningdesignsystem.com/components/accordion/) in\n// React. Based on SLDS v2.3.2\n\nimport React, { type ReactNode, type KeyboardEvent, type MouseEvent } from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\n\nimport { ACCORDION_PANEL } from '../../utilities/constants';\n\nexport interface AccordionPanelProps {\n\t/**\n\t * The panel content for the Accordion component. Accordion panels should be added as <AccordionPanel />. Event handler for the accordion panels should be added to `<AccordionPanel />`. Optional `panelContentActions` component may be passed as prop. _Tested with Mocha framework and snapshot testing._\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Indicates whether item is expanded or not, which should be handled by `onTogglePanel`. _Tested with Mocha framework and snapshot testing._\n\t */\n\texpanded: boolean;\n\t/**\n\t * Id of the item belonging to this panel. _Tested with snapshot testing._\n\t */\n\tid: number | string;\n\t/**\n\t * Component that can be passed as prop to `<Panel />`. As an example, a menu dropdown could be used here to handle additional actions for each accordion panel. _Tested with Mocha framework._\n\t */\n\tpanelContentActions?: ReactNode;\n\t/**\n\t * Callback that will run whenever the panel summary is clicked.\n\t */\n\tonClickSummary?: () => void;\n\t/**\n\t * Callback that will run whenever there is a keydown on the panel button. Function doesn't change the state of the component.\n\t */\n\tonKeyDownSummary?: (event: KeyboardEvent) => void;\n\t/**\n\t * Callback that will run whenever a panel is toggled. Function should handle state to toggle `expanded` prop. _Tested with Mocha framework._\n\t */\n\tonTogglePanel: (event: MouseEvent) => void;\n\t/**\n\t * Ref callback that will pass in panel's `input` tag\n\t */\n\trefs?: {\n\t\tsummaryButton?: (component: HTMLElement | null) => void;\n\t};\n\t/**\n\t * Summary in the span element in the header of this panel. The summary is truncated and so the title element should contain the full text so that it is accessible on hover. _Tested with snapshot testing._\n\t */\n\tsummary: string | ReactNode;\n\t/**\n\t * HTML title attribute. _Tested with snapshot testing._\n\t */\n\ttitle?: string;\n}\n\n/**\n * The panel content for the Accordion component.\n */\nconst AccordionPanel = ({\n\tchildren,\n\texpanded,\n\tid,\n\tpanelContentActions,\n\tsummary,\n\ttitle,\n\tonClickSummary,\n\tonKeyDownSummary,\n\tonTogglePanel,\n\trefs = {},\n}: AccordionPanelProps): React.ReactElement => (\n\t<li className=\"slds-accordion__list-item\">\n\t\t<section\n\t\t\tclassName={classNames('slds-accordion__section', {\n\t\t\t\t'slds-is-open': expanded,\n\t\t\t})}\n\t\t>\n\t\t\t<div className=\"slds-accordion__summary\">\n\t\t\t\t<h3 className=\"slds-text-heading_small slds-accordion__summary-heading slds-has-flexi-truncate\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\taria-controls={`${id}-accordion-panel`}\n\t\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\t\tbuttonRef={refs.summaryButton}\n\t\t\t\t\t\tclassName=\"slds-button_reset slds-accordion__summary-action\"\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonClassName=\"slds-accordion__summary-action-icon slds-button__icon slds-button__icon_left\"\n\t\t\t\t\t\ticonName=\"switch\"\n\t\t\t\t\t\tid={`${id}-accordion-button`}\n\t\t\t\t\t\tonKeyDown={onKeyDownSummary}\n\t\t\t\t\t\tonClick={(e: MouseEvent) => {\n\t\t\t\t\t\t\tif (onClickSummary) {\n\t\t\t\t\t\t\t\tonClickSummary();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonTogglePanel(e);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"slds-truncate\"\n\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\ttitle || (typeof summary === 'string' ? summary : undefined)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{summary}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Button>\n\t\t\t\t</h3>\n\t\t\t\t{panelContentActions}\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\taria-hidden={!expanded}\n\t\t\t\tclassName=\"slds-accordion__content\"\n\t\t\t\tid={`${id}-accordion-panel`}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</section>\n\t</li>\n);\n\nAccordionPanel.displayName = ACCORDION_PANEL;\n\nexport default AccordionPanel;\n"],"mappings":";;;;;;AA8DA,IAAM,KAAkB,EACvB,aACA,aACA,OACA,wBACA,YACA,UACA,mBACA,qBACA,kBACA,UAAO,CAAC,QAER,kBAAC,MAAD;CAAI,WAAU;CACb,UAAA,kBAAC,WAAD;EACC,WAAW,EAAW,2BAA2B,EAChD,gBAAgB,EACjB,CAAC;EAHF,UAAA,CAKC,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,kBAAC,MAAD;IAAI,WAAU;IACb,UAAA,kBAAC,GAAD;KACC,iBAAe,GAAG,EAAG;KACrB,iBAAe;KACf,WAAW,EAAK;KAChB,WAAU;KACV,cAAa;KACb,eAAc;KACd,UAAS;KACT,IAAI,GAAG,EAAG;KACV,WAAW;KACX,UAAU,MAAkB;MAI3B,AAHI,KACH,EAAe,GAEhB,EAAc,CAAC;KAChB;KACA,SAAQ;KAER,UAAA,kBAAC,QAAD;MACC,WAAU;MACV,OACC,MAAU,OAAO,KAAY,WAAW,IAAU,KAAA;MAGlD,UAAA;KACI,CAAA;IACC,CAAA;GACL,CAAA,GACH,CACG;EACL,CAAA,GAAA,kBAAC,OAAD;GACC,eAAa,CAAC;GACd,WAAU;GACV,IAAI,GAAG,EAAG;GAET;EACG,CAAA,CACG;;AACN,CAAA;AAGL,EAAe,cAAc"}
|
|
@@ -10,7 +10,7 @@ var o = { icon: "User or Account Icon" }, s = (e) => {
|
|
|
10
10
|
}, c = ({ assistiveText: e, imgAlt: c = "", imgSrc: l, initials: u, inverse: d, label: f, size: p = "medium", title: m = "user avatar", variant: h = "user" }) => {
|
|
11
11
|
let [g, _] = i(!1), v = r(() => {
|
|
12
12
|
_(!0);
|
|
13
|
-
}, []), y =
|
|
13
|
+
}, []), y = {
|
|
14
14
|
...o,
|
|
15
15
|
...e
|
|
16
16
|
}.icon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/avatar/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useState, useCallback } from 'react';\nimport classNames from '../../utilities/class-names';\nimport { AVATAR } from '../../utilities/constants';\nimport Icon from '../icon';\n\n/**\n * Avatar size options\n */\nexport type AvatarSize = 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Avatar variant - determines shape and default icon\n */\nexport type AvatarVariant = 'entity' | 'user';\n\n/**\n * Assistive text for Avatar\n */\nexport interface AvatarAssistiveText {\n\t/** Assistive text for the fallback icon */\n\ticon?: string;\n}\n\n/**\n * Props for the Avatar component\n */\nexport interface AvatarProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: AvatarAssistiveText
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/avatar/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useState, useCallback } from 'react';\nimport classNames from '../../utilities/class-names';\nimport { AVATAR } from '../../utilities/constants';\nimport Icon from '../icon';\n\n/**\n * Avatar size options\n */\nexport type AvatarSize = 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Avatar variant - determines shape and default icon\n */\nexport type AvatarVariant = 'entity' | 'user';\n\n/**\n * Assistive text for Avatar\n */\nexport interface AvatarAssistiveText {\n\t/** Assistive text for the fallback icon */\n\ticon?: string;\n}\n\n/**\n * Props for the Avatar component\n */\nexport interface AvatarProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: AvatarAssistiveText;\n\t/** Alt text for the image */\n\timgAlt?: string;\n\t/** Source URL for the image */\n\timgSrc?: string;\n\t/** Initials to display (overrides built initials from label) */\n\tinitials?: string;\n\t/** Use dark text on light background for initials */\n\tinverse?: boolean;\n\t/** Label used to build initials and as title for abbr element */\n\tlabel?: string;\n\t/** Size of the avatar */\n\tsize?: AvatarSize;\n\t/** Title attribute for the avatar container */\n\ttitle?: string;\n\t/** Variant determines shape (circle for user, square for entity) */\n\tvariant?: AvatarVariant;\n}\n\nconst defaultAssistiveText: AvatarAssistiveText = {\n\ticon: 'User or Account Icon',\n};\n\n/**\n * Build initials from a label/name string.\n * - Two words: first letter of each, capitalized\n * - One word: first two letters (first capitalized, second lowercase)\n * - Three+ words: first letter of first and last words, capitalized\n */\nconst buildInitials = (label: string): string => {\n\tconst name = label.trim();\n\tconst nameParts = name.split(' ');\n\tif (nameParts.length > 1) {\n\t\treturn (\n\t\t\tnameParts[0].charAt(0).toUpperCase() +\n\t\t\tnameParts[nameParts.length - 1].charAt(0).toUpperCase()\n\t\t);\n\t}\n\treturn (name[0] || '').toUpperCase() + (name[1] || '').toLowerCase();\n};\n\n/**\n * The Avatar component represents an object or entity.\n *\n * An image is the preferred format. If `imgSrc` is undefined and `label` or `initials`\n * is available, initials will be shown. Otherwise, a default icon is displayed.\n */\nconst Avatar = ({\n\tassistiveText: propAssistiveText,\n\timgAlt = '',\n\timgSrc,\n\tinitials,\n\tinverse,\n\tlabel,\n\tsize = 'medium',\n\ttitle = 'user avatar',\n\tvariant = 'user',\n}: AvatarProps): React.ReactElement => {\n\tconst [imgLoadError, setImgLoadError] = useState(false);\n\n\tconst handleImageError = useCallback(() => {\n\t\tsetImgLoadError(true);\n\t}, []);\n\n\t// Merge assistive text\n\tconst iconAssistiveText = {\n\t\t...defaultAssistiveText,\n\t\t...propAssistiveText,\n\t}.icon;\n\n\t// Render functions for different avatar states\n\tconst renderBaseAvatar = () => (\n\t\t<img alt={imgAlt} src={imgSrc} onError={handleImageError} title={title} />\n\t);\n\n\tconst renderIconAvatar = () => (\n\t\t<Icon\n\t\t\tassistiveText={{ label: iconAssistiveText }}\n\t\t\tcategory=\"standard\"\n\t\t\tname={variant === 'entity' ? 'account' : 'user'}\n\t\t/>\n\t);\n\n\tconst renderInitialsAvatar = () => (\n\t\t<abbr\n\t\t\tclassName={classNames('slds-avatar__initials', {\n\t\t\t\t'slds-avatar__initials_inverse': inverse,\n\t\t\t\t'slds-icon-standard-account': variant === 'entity',\n\t\t\t\t'slds-icon-standard-user': variant === 'user',\n\t\t\t})}\n\t\t\ttitle={label}\n\t\t>\n\t\t\t{initials || (label ? buildInitials(label) : '')}\n\t\t</abbr>\n\t);\n\n\t// Determine which avatar to render\n\tconst renderAvatar = () => {\n\t\tif (!imgLoadError && imgSrc) {\n\t\t\treturn renderBaseAvatar();\n\t\t}\n\t\tif (initials || (label && label.trim())) {\n\t\t\treturn renderInitialsAvatar();\n\t\t}\n\t\treturn renderIconAvatar();\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<span\n\t\t\t\tclassName={classNames('slds-avatar', {\n\t\t\t\t\t'slds-avatar_circle': variant === 'user',\n\t\t\t\t\t'slds-avatar_x-small': size === 'x-small',\n\t\t\t\t\t'slds-avatar_small': size === 'small',\n\t\t\t\t\t'slds-avatar_medium': size === 'medium',\n\t\t\t\t\t'slds-avatar_large': size === 'large',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{renderAvatar()}\n\t\t\t</span>\n\t\t</div>\n\t);\n};\n\nAvatar.displayName = AVATAR;\n\nexport default Avatar;\n"],"mappings":";;;;;;AAkDA,IAAM,IAA4C,EACjD,MAAM,uBACP,GAQM,KAAiB,MAA0B;CAChD,IAAM,IAAO,EAAM,KAAK,GAClB,IAAY,EAAK,MAAM,GAAG;CAOhC,OANI,EAAU,SAAS,IAErB,EAAU,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,IACnC,EAAU,EAAU,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,KAGhD,EAAK,MAAM,GAAA,CAAI,YAAY,KAAK,EAAK,MAAM,GAAA,CAAI,YAAY;AACpE,GAQM,KAAU,EACf,eAAe,GACf,YAAS,IACT,WACA,aACA,YACA,UACA,UAAO,UACP,WAAQ,eACR,aAAU,aAC4B;CACtC,IAAM,CAAC,GAAc,KAAmB,EAAS,EAAK,GAEhD,IAAmB,QAAkB;EAC1C,EAAgB,EAAI;CACrB,GAAG,CAAC,CAAC,GAGC,IAAoB;EACzB,GAAG;EACH,GAAG;CACJ,EAAE;CAuCF,OACC,kBAAC,OAAD,EAAA,UACC,kBAAC,QAAD;EACC,WAAW,EAAW,eAAe;GACpC,sBAAsB,MAAY;GAClC,uBAAuB,MAAS;GAChC,qBAAqB,MAAS;GAC9B,sBAAsB,MAAS;GAC/B,qBAAqB,MAAS;EAC/B,CAAC;EAEA,UApBC,CAAC,KAAgB,IA1BrB,kBAAC,OAAD;GAAK,KAAK;GAAQ,KAAK;GAAQ,SAAS;GAAyB;EAAQ,CAAA,IA6BrE,KAAa,KAAS,EAAM,KAAK,IAjBrC,kBAAC,QAAD;GACC,WAAW,EAAW,yBAAyB;IAC9C,iCAAiC;IACjC,8BAA8B,MAAY;IAC1C,2BAA2B,MAAY;GACxC,CAAC;GACD,OAAO;GAEN,UAAA,MAAa,IAAQ,EAAc,CAAK,IAAI;EACxC,CAAA,IAjBN,kBAAC,GAAD;GACC,eAAe,EAAE,OAAO,EAAkB;GAC1C,UAAS;GACT,MAAM,MAAY,WAAW,YAAY;EACzC,CAAA;CAuCM,CAAA,EACF,CAAA;AAEP;AAEA,EAAO,cAAc"}
|
|
@@ -3,14 +3,14 @@ import { useId as t } from "react";
|
|
|
3
3
|
import n from "classnames";
|
|
4
4
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region components/badge/index.tsx
|
|
6
|
-
var o = ({ className: e, color: o = "default", content: s, icon: c, iconAlignment: l = "left", id: u, style: d }) => {
|
|
7
|
-
let
|
|
6
|
+
var o = ({ className: e, color: o = "default", content: s, icon: c, iconAlignment: l = "left", id: u, style: d, styleIcon: f }) => {
|
|
7
|
+
let p = t(), m = u || p, h = c && /* @__PURE__ */ i("span", {
|
|
8
8
|
className: n("slds-badge__icon", `slds-badge__icon_${l}`),
|
|
9
|
-
style:
|
|
9
|
+
style: f,
|
|
10
10
|
children: c
|
|
11
11
|
});
|
|
12
12
|
return /* @__PURE__ */ i("span", {
|
|
13
|
-
id:
|
|
13
|
+
id: m,
|
|
14
14
|
className: n("slds-badge", {
|
|
15
15
|
"slds-badge_inverse": o === "inverse",
|
|
16
16
|
"slds-badge_lightest": o === "light",
|
|
@@ -19,7 +19,8 @@ var o = ({ className: e, color: o = "default", content: s, icon: c, iconAlignmen
|
|
|
19
19
|
"slds-theme_warning": o === "warning",
|
|
20
20
|
"slds-theme_error": o === "error"
|
|
21
21
|
}, e),
|
|
22
|
-
|
|
22
|
+
style: d,
|
|
23
|
+
children: l === "left" ? /* @__PURE__ */ a(r, { children: [h, s] }) : /* @__PURE__ */ a(r, { children: [s, h] })
|
|
23
24
|
});
|
|
24
25
|
};
|
|
25
26
|
o.displayName = e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/badge/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, type ReactNode, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { BADGE } from '../../utilities/constants';\n\n/**\n * Badge color variants\n */\nexport type BadgeColor =\n\t'default' | 'inverse' | 'light' | 'info' | 'success' | 'warning' | 'error';\n\n/**\n * Badge icon alignment\n */\nexport type BadgeIconAlignment = 'left' | 'right';\n\n/**\n * Props for the Badge component\n */\nexport interface BadgeProps {\n\t/** CSS classes for the badge */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Color variant */\n\tcolor?: BadgeColor;\n\t/** Content inside the badge */\n\tcontent?: ReactNode;\n\t/** Icon to display */\n\ticon?: ReactNode;\n\t/** Icon alignment relative to content */\n\ticonAlignment?: BadgeIconAlignment;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n}\n\n/**\n * Badges are labels which hold small amounts of information.\n */\nconst Badge = ({\n\tclassName,\n\tcolor = 'default',\n\tcontent,\n\ticon,\n\ticonAlignment = 'left',\n\tid: propId,\n\tstyle,\n}: BadgeProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst iconElement = icon && (\n\t\t<span\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-badge__icon',\n\t\t\t\t`slds-badge__icon_${iconAlignment}`\n\t\t\t)}\n\t\t\tstyle={
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/badge/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, type ReactNode, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { BADGE } from '../../utilities/constants';\n\n/**\n * Badge color variants\n */\nexport type BadgeColor =\n\t'default' | 'inverse' | 'light' | 'info' | 'success' | 'warning' | 'error';\n\n/**\n * Badge icon alignment\n */\nexport type BadgeIconAlignment = 'left' | 'right';\n\n/**\n * Props for the Badge component\n */\nexport interface BadgeProps {\n\t/** CSS classes for the badge */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Color variant */\n\tcolor?: BadgeColor;\n\t/** Content inside the badge */\n\tcontent?: ReactNode;\n\t/** Icon to display */\n\ticon?: ReactNode;\n\t/** Icon alignment relative to content */\n\ticonAlignment?: BadgeIconAlignment;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Custom styles for the badge */\n\tstyle?: CSSProperties;\n\t/** Custom styles for the icon container. Only applies when `icon` is set */\n\tstyleIcon?: CSSProperties;\n}\n\n/**\n * Badges are labels which hold small amounts of information.\n */\nconst Badge = ({\n\tclassName,\n\tcolor = 'default',\n\tcontent,\n\ticon,\n\ticonAlignment = 'left',\n\tid: propId,\n\tstyle,\n\tstyleIcon,\n}: BadgeProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst iconElement = icon && (\n\t\t<span\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-badge__icon',\n\t\t\t\t`slds-badge__icon_${iconAlignment}`\n\t\t\t)}\n\t\t\tstyle={styleIcon}\n\t\t>\n\t\t\t{icon}\n\t\t</span>\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-badge',\n\t\t\t\t{\n\t\t\t\t\t'slds-badge_inverse': color === 'inverse',\n\t\t\t\t\t'slds-badge_lightest': color === 'light',\n\t\t\t\t\t'slds-theme_info': color === 'info',\n\t\t\t\t\t'slds-theme_success': color === 'success',\n\t\t\t\t\t'slds-theme_warning': color === 'warning',\n\t\t\t\t\t'slds-theme_error': color === 'error',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{iconAlignment === 'left' ? (\n\t\t\t\t<>\n\t\t\t\t\t{iconElement}\n\t\t\t\t\t{content}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{content}\n\t\t\t\t\t{iconElement}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</span>\n\t);\n};\n\nBadge.displayName = BADGE;\n\nexport default Badge;\n"],"mappings":";;;;;AA2CA,IAAM,KAAS,EACd,cACA,WAAQ,WACR,YACA,SACA,mBAAgB,QAChB,IAAI,GACJ,UACA,mBACqC;CACrC,IAAM,IAAc,EAAM,GACpB,IAAK,KAAU,GAEf,IAAc,KACnB,kBAAC,QAAD;EACC,WAAW,EACV,oBACA,oBAAoB,GACrB;EACA,OAAO;EAEN,UAAA;CACI,CAAA;CAGP,OACC,kBAAC,QAAD;EACK;EACJ,WAAW,EACV,cACA;GACC,sBAAsB,MAAU;GAChC,uBAAuB,MAAU;GACjC,mBAAmB,MAAU;GAC7B,sBAAsB,MAAU;GAChC,sBAAsB,MAAU;GAChC,oBAAoB,MAAU;EAC/B,GACA,CACD;EACO;EAEN,UAAA,MAAkB,SAClB,kBAAA,GAAA,EAAA,UAAA,CACE,GACA,CACA,EAAA,CAAA,IAEF,kBAAA,GAAA,EAAA,UAAA,CACE,GACA,CACA,EAAA,CAAA;CAEE,CAAA;AAER;AAEA,EAAM,cAAc"}
|
|
@@ -17,7 +17,7 @@ var i = { label: "Breadcrumbs" }, a = (e, r) => {
|
|
|
17
17
|
children: /* @__PURE__ */ n(t, { ...i })
|
|
18
18
|
});
|
|
19
19
|
}, o = ({ assistiveText: e, id: t, overflowDropdownMenu: o, styleContainer: s, trail: c }) => {
|
|
20
|
-
let l =
|
|
20
|
+
let l = {
|
|
21
21
|
...i,
|
|
22
22
|
...e
|
|
23
23
|
}.label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/breadcrumb/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, {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/breadcrumb/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype CSSProperties,\n} from 'react';\nimport { BREADCRUMB } from '../../utilities/constants';\nimport Dropdown from '../menu-dropdown';\n\n/**\n * Assistive text for Breadcrumb\n */\nexport interface BreadcrumbAssistiveText {\n\t/** Label for the breadcrumb navigation */\n\tlabel?: string;\n}\n\n/**\n * Props for the Breadcrumb component\n */\nexport interface BreadcrumbProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: BreadcrumbAssistiveText;\n\t/** Unique identifier for the breadcrumb */\n\tid?: string;\n\t/** Overflow dropdown menu for condensed breadcrumbs */\n\toverflowDropdownMenu?: ReactElement;\n\t/** Custom styles for the nav container */\n\tstyleContainer?: CSSProperties;\n\t/** Array of anchor elements defining the breadcrumb path */\n\ttrail: ReactNode[];\n}\n\nconst defaultAssistiveText: BreadcrumbAssistiveText = {\n\tlabel: 'Breadcrumbs',\n};\n\n/**\n * Renders the overflow dropdown menu\n */\nconst getBreadcrumbDropdown = (\n\toverflowDropdownMenu: ReactElement,\n\tprops: { id?: string }\n) => {\n\tconst baseProps = overflowDropdownMenu.props as Record<string, unknown>;\n\tconst overflowDropdownMenuProps = {\n\t\t...baseProps,\n\t\tid: `${props.id}-dropdown`,\n\t\ticonCategory: 'utility' as const,\n\t\ticonName: 'threedots',\n\t\ticonVariant: 'bare' as const,\n\t\tthreedots: true,\n\t};\n\treturn (\n\t\t<li className=\"slds-breadcrumb__item\">\n\t\t\t<Dropdown {...overflowDropdownMenuProps} />\n\t\t</li>\n\t);\n};\n\n/**\n * Use breadcrumbs to note the path of a record and help the user navigate back to the parent.\n */\nconst Breadcrumb = ({\n\tassistiveText: propAssistiveText,\n\tid,\n\toverflowDropdownMenu,\n\tstyleContainer,\n\ttrail,\n}: BreadcrumbProps): React.ReactElement => {\n\tconst assistiveTextLabel = {\n\t\t...defaultAssistiveText,\n\t\t...propAssistiveText,\n\t}.label;\n\n\treturn (\n\t\t<nav\n\t\t\trole=\"navigation\"\n\t\t\taria-label={assistiveTextLabel}\n\t\t\tstyle={styleContainer}\n\t\t>\n\t\t\t<ol className=\"slds-breadcrumb slds-list_horizontal\">\n\t\t\t\t{overflowDropdownMenu &&\n\t\t\t\t\tgetBreadcrumbDropdown(overflowDropdownMenu, { id })}\n\t\t\t\t{trail.map((crumb, index) => (\n\t\t\t\t\t<li key={index} className=\"slds-breadcrumb__item\">\n\t\t\t\t\t\t{crumb}\n\t\t\t\t\t</li>\n\t\t\t\t))}\n\t\t\t</ol>\n\t\t</nav>\n\t);\n};\n\nBreadcrumb.displayName = BREADCRUMB;\n\nexport default Breadcrumb;\n"],"mappings":";;;;;AAmCA,IAAM,IAAgD,EACrD,OAAO,cACR,GAKM,KACL,GACA,MACI;CAEJ,IAAM,IAA4B;EACjC,GAFiB,EAAqB;EAGtC,IAAI,GAAG,EAAM,GAAG;EAChB,cAAc;EACd,UAAU;EACV,aAAa;EACb,WAAW;CACZ;CACA,OACC,kBAAC,MAAD;EAAI,WAAU;EACb,UAAA,kBAAC,GAAD,EAAU,GAAI,EAA4B,CAAA;CACvC,CAAA;AAEN,GAKM,KAAc,EACnB,eAAe,GACf,OACA,yBACA,mBACA,eAC0C;CAC1C,IAAM,IAAqB;EAC1B,GAAG;EACH,GAAG;CACJ,EAAE;CAEF,OACC,kBAAC,OAAD;EACC,MAAK;EACL,cAAY;EACZ,OAAO;EAEP,UAAA,kBAAC,MAAD;GAAI,WAAU;GAAd,UAAA,CACE,KACA,EAAsB,GAAsB,EAAE,MAAG,CAAC,GAClD,EAAM,KAAK,GAAO,MAClB,kBAAC,MAAD;IAAgB,WAAU;IACxB,UAAA;GACE,GAFK,CAEL,CACJ,CACE;;CACA,CAAA;AAEP;AAEA,EAAW,cAAc"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import e from "../../utilities/get-component-doc.js";
|
|
2
|
+
import t from "../../utilities/warning/deprecated-property.js";
|
|
3
|
+
//#region components/builder-header/check-props.js
|
|
4
|
+
var n = function() {};
|
|
5
|
+
process.env.NODE_ENV !== "production" && (n = function(n, r, i) {
|
|
6
|
+
let a = e(i);
|
|
7
|
+
t(n, r.onRenderActions, "onRenderActions", "actions", a("actions"));
|
|
8
|
+
});
|
|
9
|
+
var r = n;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as default };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=check-props.js.map
|