@salesforce/design-system-react 11.0.0-alpha.6 → 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/badge/index.cjs +1 -1
- package/dist/cjs/components/badge/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/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/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/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/dynamic-icon/index.cjs +1 -1
- package/dist/cjs/components/dynamic-icon/index.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/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/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/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/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/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/split-view/check-props.cjs +1 -1
- package/dist/cjs/components/split-view/check-props.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/panel.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +1 -1
- package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/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/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/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/warning/deprecated-property-value.cjs +2 -0
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -0
- package/dist/es/components/accordion/panel.js +1 -1
- package/dist/es/components/accordion/panel.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/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/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 -109
- 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 +124 -112
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/combobox/check-props.js +1 -1
- package/dist/es/components/combobox/check-props.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +208 -200
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/index.js.map +1 -1
- package/dist/es/components/combobox/private/menu.js +5 -7
- package/dist/es/components/combobox/private/menu.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/input/index.js +138 -136
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/menu-dropdown/check-props.js +1 -1
- 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 +192 -185
- package/dist/es/components/menu-dropdown/menu-dropdown.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/popover/popover.js +130 -130
- 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/step.js +7 -7
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/check-props.js +1 -1
- package/dist/es/components/simple-data-table/check-props.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +17 -10
- package/dist/es/components/simple-data-table/index.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/split-view/check-props.js +2 -2
- package/dist/es/components/split-view/check-props.js.map +1 -1
- package/dist/es/components/split-view/index.js +8 -5
- 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/panel.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +11 -10
- package/dist/es/components/textarea/check-props.js.map +1 -1
- package/dist/es/components/textarea/index.js +59 -47
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +10 -9
- 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/tree.js +76 -74
- 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 +5 -3
- 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/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/warning/deprecated-property-value.js +18 -0
- package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -0
- package/dist/types/components/accordion/panel.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/builder-header/check-props.d.ts +3 -0
- 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/carousel/check-props.d.ts +3 -0
- package/dist/types/components/carousel/check-props.d.ts.map +1 -0
- package/dist/types/components/carousel/index.d.ts +9 -7
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/carousel/private/carousel-item.d.ts +4 -4
- 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 +9 -3
- package/dist/types/components/checkbox/index.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 +29 -15
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/index.d.ts +1 -1
- package/dist/types/components/combobox/index.d.ts.map +1 -1
- package/dist/types/components/combobox/private/menu.d.ts +11 -6
- package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
- package/dist/types/components/dynamic-icon/index.d.ts.map +1 -1
- package/dist/types/components/input/index.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 +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +22 -3
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/page-header/check-props.d.ts.map +1 -1
- package/dist/types/components/page-header/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/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/step.d.ts +12 -6
- 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/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 +3 -0
- 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/split-view/check-props.d.ts.map +1 -1
- package/dist/types/components/split-view/index.d.ts +9 -5
- package/dist/types/components/split-view/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox-check-props.d.ts +3 -0
- package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -0
- package/dist/types/components/split-view/listbox.d.ts +19 -3
- 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/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 +23 -3
- package/dist/types/components/textarea/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/tree.d.ts +12 -4
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/tree/types.d.ts +7 -1
- 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 +5 -1
- package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts +3 -1
- 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/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 +9 -3
- 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/package.json +5 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/constants.cjs"),n=require("../../../utilities/event.cjs"),r=require("../../icon/index.cjs"),i=require("./item-label.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=class extends a.default.Component{static displayName=t.LIST_ITEM;static defaultProps={data:{},href:`#`,inverted:!1,isSelected:!1,label:``,labelRenderer:i.default,value:null};getLabel=()=>{let e=
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/constants.cjs"),n=require("../../../utilities/event.cjs"),r=require("../../icon/index.cjs"),i=require("./item-label.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=class extends a.default.Component{static displayName=t.LIST_ITEM;static defaultProps={data:{},href:`#`,inverted:!1,isSelected:!1,label:``,labelRenderer:i.default,value:null};getLabel=()=>{let e={checkmark:this.props.checkmark,data:this.props.data,icon:this.getIcon(`left`),index:this.props.index,inverted:this.props.inverted,isSelected:this.props.isSelected,label:this.props.label,value:this.props.value};if(this.props.renderLabel)return this.props.renderLabel(e);let t=this.props.labelRenderer??i.default;return(0,s.jsx)(t,{...e})};getIcon=e=>{let t=[`slds-icon-text-default`],n=e===`left`?this.props.leftIcon:this.props.rightIcon;if(e===`left`?(this.props.isCheckmarkVariant&&(t.push(`slds-icon_selected`),n={category:`utility`,name:`check`}),t.push(`slds-m-right_x-small`)):t.push(`slds-m-left_small`),n){let i={className:(0,o.default)(t),position:e,size:`x-small`,...n};return(0,s.jsx)(r.default,{...i})}return null};handleClick=e=>{(this.props.type!==`link`||this.props.href===`javascript:void(0);`||this.props.href===`#`)&&n.default.trapImmediate(e),this.props.onSelect&&!this.props.disabled&&this.props.onSelect(this.props.index,e)};handleMouseDown=e=>{n.default.trapImmediate(e)};render(){switch(this.props.type){case`header`:return(0,s.jsx)(`li`,{ref:this.props.nodeRef,className:(0,o.default)(`slds-dropdown__header`,{"slds-has-divider_top-space":this.props.divider===`top`,"slds-has-divider_bottom-space":this.props.divider===`bottom`},this.props.className),onMouseDown:this.handleMouseDown,role:`separator`,children:(0,s.jsx)(`span`,{children:this.props.label})});case`divider`:return(0,s.jsx)(`li`,{ref:this.props.nodeRef,className:(0,o.default)(`slds-has-divider`,this.props.className),onMouseDown:this.handleMouseDown,role:`separator`});default:{let e=(0,s.jsxs)(`a`,{"aria-checked":this.props.checkmark&&this.props.isSelected?!0:void 0,"aria-disabled":this.props[`aria-disabled`],href:this.props.href,"data-index":this.props.index,onClick:this.handleClick,role:this.props.checkmark?`menuitemcheckbox`:`menuitem`,tabIndex:-1,children:[this.props.groupedBy&&(0,s.jsx)(`span`,{className:`slds-assistive-text`,children:`-${this.props.groupedBy}`}),this.getLabel(),this.getIcon(`right`)]});if(this.props.tooltipContent&&this.props.tooltipTemplate){let{...t}=this.props.tooltipTemplate.props,n={...t,content:this.props.tooltipContent,id:`${this.props.id}-tooltip`,triggerStyle:{width:`100%`,...t.triggerStyle||{}}};e=a.default.cloneElement(this.props.tooltipTemplate,n,e)}return(0,s.jsx)(`li`,{ref:this.props.nodeRef,"aria-selected":this.props.checkmark===null?this.props.isSelected:void 0,className:(0,o.default)(`slds-dropdown__item`,{"slds-is-selected":this.props.isSelected},this.props.className),id:this.props.id,onMouseDown:this.handleMouseDown,role:`presentation`,children:e})}}}};exports.default=c;
|
|
2
2
|
//# sourceMappingURL=item.cjs.map
|
|
@@ -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, 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 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, 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":"2UAoEA,IAAM,EAAN,cAAuB,EAAA,QAAM,SAAyB,CACrD,OAAO,YAAc,EAAA,UAErB,OAAO,aAAuC,CAC7C,KAAM,CAAC,EACP,KAAM,IACN,SAAU,GACV,WAAY,GACZ,MAAO,GACP,cAAe,EAAA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M,YAAc,KAAO,KAAK,MAAM,WAAa,IAAA,GAEzD,WAAA,EAAW,EAAA,QAAA,CACV,sBACA,CACC,mBAAoB,KAAK,MAAM,UAChC,EACA,KAAK,MAAM,SACZ,EACA,GAAI,KAAK,MAAM,GACf,YAAa,KAAK,gBAClB,KAAK,eAEJ,SAAA,CACE,CAAA,CAEN,CACD,CACD,CACD"}
|
|
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":"2UAsEA,IAAM,EAAN,cAAuB,EAAA,QAAM,SAAyB,CACrD,OAAO,YAAc,EAAA,UAErB,OAAO,aAAuC,CAC7C,KAAM,CAAC,EACP,KAAM,IACN,SAAU,GACV,WAAY,GACZ,MAAO,GACP,cAAe,EAAA,QACf,MAAO,IACR,EAEA,aAAiB,CAChB,IAAM,EAAiC,CACtC,UAAW,KAAK,MAAM,UACtB,KAAM,KAAK,MAAM,KACjB,KAAM,KAAK,QAAQ,MAAM,EACzB,MAAO,KAAK,MAAM,MAClB,SAAU,KAAK,MAAM,SACrB,WAAY,KAAK,MAAM,W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M,UAChC,EACA,KAAK,MAAM,SACZ,EACA,GAAI,KAAK,MAAM,GACf,YAAa,KAAK,gBAClB,KAAK,eAEJ,SAAA,CACE,CAAA,CAEN,CACD,CACD,CACD"}
|
|
@@ -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,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 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 ?
|
|
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, {\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';\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\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\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/** Render function for info actions */\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/** Render function for info actions */\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\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) =>\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{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":"iYA0HA,I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AY,WACd,CACD,EAEC,SAAA,EAAA,QAAM,SAAS,IAAI,EAAW,GAC9B,EAAA,QAAM,eAAe,CAAK,EACvB,EAAA,QAAM,aACN,EACA,CACC,SACD,CACD,EACC,CACJ,CACI,CAAA,CACJ,CAAA,CAAA,GAEF,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0CACb,SAAA,CACG,CAAA,CAEF,CAAA,CACD,CAAA,CACC,CAAA,CAET,EAEA,EAAW,YAAc,EAAA"}
|
|
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":"6bAmIA,IAAM,EAAkC,CACvC,oBAAqB,iBACtB,EAKM,GAAc,CACnB,WACA,YACA,yBACA,GAAI,EACJ,cACA,YACA,SAAS,GACT,OAAQ,EACR,iBACA,sBACA,UAAU,WACgC,CAC1C,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAK,GAAU,EACf,EAAS,CAAE,GAAG,EAAe,GAAG,CAAW,GAEjD,EAAA,EAAA,UAAA,KAAgB,CACf,EAAA,QAAW,EAAA,YAAa,CAAE,qBAAoB,EAAG,EAAA,OAAY,CAC9D,EAAG,CAAC,CAAmB,CAAC,EAGxB,GAAM,CAAE,aAAY,iBAAgB,aAAA,EAAa,EAAA,QAAA,KAAc,CAC9D,IAAM,EAAQ,EA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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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("warning");t=e.__toESM(t,1);var n=function(){};if(process.env.NODE_ENV!==`production`){let e={};n=function(n,{propAsString:r,propValue:i,deprecatedPropValue:a,replacementPropAsString:o,replacementPropAsValue:s,log:c},l){let u=l?` ${l}`:``,d=n+r+a,f=i===a,p=a&&o&&s?` Replace \`${r}="${a}"\` with \`${o}="${s}"\`.`:``;if(!e[d]){let i=`[Design System React] The value of \`${a}\`, for prop \`${r}\` will be removed in the next major version of ${n}. Please update your props.${p}${u}`;f&&c?c({message:i}):(0,t.default)(!f,i),e[d]=f}}}var r=n;exports.default=r;
|
|
2
|
+
//# sourceMappingURL=deprecated-property-value.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-property-value.cjs","names":[],"sources":["../../../../utilities/warning/deprecated-property-value.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\n/* eslint-disable import/no-mutable-exports */\n/* eslint-disable max-len */\n\n// This function will deliver an error message to the browser console about the future of a removal and moving of a property's valid value to another prop. This makes the most sense to be used with `oneOf` prop types.\nimport warning from 'warning';\n\nlet deprecated = function deprecatedFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tconst hasWarned = {};\n\n\tdeprecated = function deprecatedFunction(\n\t\tcontrol,\n\t\t{\n\t\t\tpropAsString, // key name of prop being warned about\n\t\t\tpropValue, // actual value of prop being warned about\n\t\t\tdeprecatedPropValue, // value that is being deprecated\n\t\t\treplacementPropAsString, // prop that value is being moved to\n\t\t\treplacementPropAsValue, // value that should be used in new prop\n\t\t\tlog, // log function that will disable console warning and pipe to another function log({ message })\n\t\t},\n\t\tcomment\n\t) {\n\t\tconst additionalComment = comment ? ` ${comment}` : '';\n\t\tconst warnOnFirstOccurrenceKey =\n\t\t\tcontrol + propAsString + deprecatedPropValue;\n\t\tconst triggerWarning = propValue === deprecatedPropValue;\n\t\tconst replacementSentence =\n\t\t\tdeprecatedPropValue && replacementPropAsString && replacementPropAsValue\n\t\t\t\t? ` Replace \\`${propAsString}=\"${deprecatedPropValue}\"\\` with \\`${replacementPropAsString}=\"${replacementPropAsValue}\"\\`.`\n\t\t\t\t: '';\n\n\t\tif (!hasWarned[warnOnFirstOccurrenceKey]) {\n\t\t\tconst message = `[Design System React] The value of \\`${deprecatedPropValue}\\`, for prop \\`${propAsString}\\` will be removed in the next major version of ${control}. Please update your props.${replacementSentence}${additionalComment}`;\n\n\t\t\tif (triggerWarning && log) {\n\t\t\t\tlog({ message });\n\t\t\t} else {\n\t\t\t\twarning(\n\t\t\t\t\t!triggerWarning, // false value triggers warning\n\t\t\t\t\tmessage\n\t\t\t\t);\n\t\t\t}\n\t\t\t// store global flag to limit warnings to first issue\n\t\t\thasWarned[warnOnFirstOccurrenceKey] = triggerWarning;\n\t\t}\n\t};\n}\n\nexport default deprecated;\n"],"mappings":"kGASA,IAAI,EAAa,UAA8B,CAAC,EAEhD,GAAA,QAAA,IAAA,WAA6B,aAAc,CAC1C,IAAM,EAAY,CAAC,EAEnB,EAAa,SACZ,EACA,CACC,eACA,YACA,sBACA,0BACA,yBACA,OAED,EACC,CACD,IAAM,EAAoB,EAAU,IAAI,IAAY,GAC9C,EACL,EAAU,EAAe,EACpB,EAAiB,IAAc,EAC/B,EACL,GAAuB,GAA2B,EAC/C,cAAc,EAAa,IAAI,EAAoB,aAAa,EAAwB,IAAI,EAAuB,MACnH,GAEJ,GAAI,CAAC,EAAU,GAA2B,CACzC,IAAM,EAAU,wCAAwC,EAAoB,iBAAiB,EAAa,kDAAkD,EAAQ,6BAA6B,IAAsB,IAEnN,GAAkB,EACrB,EAAI,CAAE,SAAQ,CAAC,GAEf,EAAA,EAAA,QAAA,CACC,CAAC,EACD,CACD,EAGD,EAAU,GAA4B,CACvC,CACD,CACD,CAEA,IAAA,EAAe"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/builder-header/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.onRenderActions,\n\t\t\t'onRenderActions',\n\t\t\t'actions',\n\t\t\tcreateDocUrl('actions')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;AAOA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAE9C,EACC,GACA,EAAM,iBACN,mBACA,WACA,EAAa,SAAS,CACvB;AACD;AAGD,IAAA,IAAe"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
//#region components/builder-header/component.json
|
|
2
|
+
var e = "builder-header", t = "prod", n = "BuilderHeader", r = [
|
|
3
|
+
{
|
|
4
|
+
component: "nav",
|
|
5
|
+
classKey: "BuilderHeaderNav"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
component: "nav-dropdown",
|
|
9
|
+
classKey: "BuilderHeaderNavDropdown"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
component: "nav-link",
|
|
13
|
+
classKey: "BuilderHeaderNavLink"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
component: "toolbar",
|
|
17
|
+
classKey: "BuilderHeaderToolbar"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
component: "utilities",
|
|
21
|
+
classKey: "BuilderHeaderUtilities"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
component: "misc",
|
|
25
|
+
classKey: "BuilderHeaderMisc"
|
|
26
|
+
}
|
|
27
|
+
], i = {
|
|
28
|
+
component: e,
|
|
29
|
+
status: t,
|
|
30
|
+
"display-name": "Builder Header",
|
|
31
|
+
classKey: n,
|
|
32
|
+
"SLDS-component-path": "/components/builder-header",
|
|
33
|
+
dependencies: r,
|
|
34
|
+
"site-stories": [
|
|
35
|
+
{
|
|
36
|
+
heading: "Base",
|
|
37
|
+
path: "/__examples__/base.jsx"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
heading: "Base with Toolbar",
|
|
41
|
+
path: "/__examples__/base-with-toolbar.jsx"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
heading: "Base with Utilities",
|
|
45
|
+
path: "/__examples__/base-with-utilities.jsx"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
heading: "Successful Save",
|
|
49
|
+
path: "/__examples__/successful-save.jsx"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
heading: "After Successful Save",
|
|
53
|
+
path: "/__examples__/after-successful-save.jsx"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
heading: "Save Error",
|
|
57
|
+
path: "/__examples__/failed-save.jsx"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"url-slug": "builder-header"
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { n as classKey, e as component, i as default, r as dependencies, t as status };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","names":[],"sources":["../../../../components/builder-header/component.json"],"sourcesContent":["{\n\t\"component\": \"builder-header\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Builder Header\",\n\t\"classKey\": \"BuilderHeader\",\n\t\"SLDS-component-path\": \"/components/builder-header\",\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"component\": \"nav\",\n\t\t\t\"classKey\": \"BuilderHeaderNav\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"nav-dropdown\",\n\t\t\t\"classKey\": \"BuilderHeaderNavDropdown\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"nav-link\",\n\t\t\t\"classKey\": \"BuilderHeaderNavLink\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"toolbar\",\n\t\t\t\"classKey\": \"BuilderHeaderToolbar\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"utilities\",\n\t\t\t\"classKey\": \"BuilderHeaderUtilities\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"misc\",\n\t\t\t\"classKey\": \"BuilderHeaderMisc\"\n\t\t}\n\t],\n\t\"site-stories\": [\n\t\t{\n\t\t\t\"heading\": \"Base\",\n\t\t\t\"path\": \"/__examples__/base.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Base with Toolbar\",\n\t\t\t\"path\": \"/__examples__/base-with-toolbar.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Base with Utilities\",\n\t\t\t\"path\": \"/__examples__/base-with-utilities.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Successful Save\",\n\t\t\t\"path\": \"/__examples__/successful-save.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"After Successful Save\",\n\t\t\t\"path\": \"/__examples__/after-successful-save.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Save Error\",\n\t\t\t\"path\": \"/__examples__/failed-save.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"builder-header\"\n}\n"],"mappings":""}
|
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import { BUILDER_HEADER_TOOLBAR as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
2
|
+
import t from "./check-props.js";
|
|
3
|
+
import n from "./component.js";
|
|
4
|
+
import r, { useEffect as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
6
|
//#region components/builder-header/toolbar.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var s = { actions: "Actions" }, c = ({ actions: c, assistiveText: l = s, children: u, onRenderActions: d }) => {
|
|
8
|
+
i(() => {
|
|
9
|
+
t(e, { onRenderActions: d }, n);
|
|
10
|
+
}, [d]);
|
|
11
|
+
let f = {
|
|
12
|
+
...s,
|
|
13
|
+
...l
|
|
9
14
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ o("div", {
|
|
11
16
|
className: "slds-builder-toolbar",
|
|
12
17
|
role: "toolbar",
|
|
13
|
-
children: [
|
|
18
|
+
children: [r.Children.map(u, (e) => r.isValidElement(e) && e.type.displayName === "SLDSButtonGroup" ? /* @__PURE__ */ a("div", {
|
|
14
19
|
className: "slds-builder-toolbar__item-group",
|
|
15
20
|
"aria-label": e.props.label,
|
|
16
21
|
children: e
|
|
17
|
-
}) : null), /* @__PURE__ */
|
|
22
|
+
}) : null), /* @__PURE__ */ a("div", {
|
|
18
23
|
className: "slds-builder-toolbar__actions",
|
|
19
|
-
"aria-label":
|
|
20
|
-
children:
|
|
24
|
+
"aria-label": f.actions,
|
|
25
|
+
children: c ?? d?.()
|
|
21
26
|
})]
|
|
22
27
|
});
|
|
23
28
|
};
|
|
24
|
-
|
|
29
|
+
c.displayName = e;
|
|
25
30
|
//#endregion
|
|
26
|
-
export {
|
|
31
|
+
export { c as default };
|
|
27
32
|
|
|
28
33
|
//# sourceMappingURL=toolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.js","names":[],"sources":["../../../../components/builder-header/toolbar.tsx"],"sourcesContent":["import React, { type ReactNode } from 'react';\n\nimport {\n\tBUILDER_HEADER_TOOLBAR,\n\tBUTTON_GROUP,\n} from '../../utilities/constants';\n\nexport interface BuilderHeaderToolbarAssistiveText {\n\t/** Used for the aria-label for the actions section of the toolbar. */\n\tactions?: string;\n}\n\nexport interface BuilderHeaderToolbarProps {\n\t/**\n\t * **Assistive text for accessibility**\n\t * This object is merged with the default props object on every render.\n\t * * `actions`: Used for the aria-label for the actions section of the toolbar.\n\t * * _Tested with snapshot testing._\n\t */\n\tassistiveText?: BuilderHeaderToolbarAssistiveText;\n\t/**\n\t * Provide children of the type `<ButtonGroup />` to define the structure of the toolbar section.\n\t * ```\n\t * <BuilderHeader>\n\t * <BuilderHeaderToolbar>\n\t * <ButtonGroup />\n\t * <ButtonGroup />\n\t * </BuilderHeaderToolbar>\n\t * </BuilderHeader>\n\t * ```\n\t */\n\tchildren?: ReactNode;\n\t
|
|
1
|
+
{"version":3,"file":"toolbar.js","names":[],"sources":["../../../../components/builder-header/toolbar.tsx"],"sourcesContent":["import React, { useEffect, type ReactNode } from 'react';\n\nimport {\n\tBUILDER_HEADER_TOOLBAR,\n\tBUTTON_GROUP,\n} from '../../utilities/constants';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nexport interface BuilderHeaderToolbarAssistiveText {\n\t/** Used for the aria-label for the actions section of the toolbar. */\n\tactions?: string;\n}\n\nexport interface BuilderHeaderToolbarProps {\n\t/**\n\t * Content rendered in the actions section of the toolbar, such as save or undo buttons.\n\t */\n\tactions?: ReactNode;\n\t/**\n\t * **Assistive text for accessibility**\n\t * This object is merged with the default props object on every render.\n\t * * `actions`: Used for the aria-label for the actions section of the toolbar.\n\t * * _Tested with snapshot testing._\n\t */\n\tassistiveText?: BuilderHeaderToolbarAssistiveText;\n\t/**\n\t * Provide children of the type `<ButtonGroup />` to define the structure of the toolbar section.\n\t * ```\n\t * <BuilderHeader>\n\t * <BuilderHeaderToolbar>\n\t * <ButtonGroup />\n\t * <ButtonGroup />\n\t * </BuilderHeaderToolbar>\n\t * </BuilderHeader>\n\t * ```\n\t */\n\tchildren?: ReactNode;\n\t/** @deprecated Use `actions` instead. */\n\tonRenderActions?: () => ReactNode;\n}\n\nconst defaultAssistiveText: BuilderHeaderToolbarAssistiveText = {\n\tactions: 'Actions',\n};\n\n/**\n * The toolbar section of the header.\n */\nconst BuilderHeaderToolbar = ({\n\tactions,\n\tassistiveText = defaultAssistiveText,\n\tchildren,\n\tonRenderActions,\n}: BuilderHeaderToolbarProps): React.ReactElement => {\n\tuseEffect(() => {\n\t\tcheckProps(BUILDER_HEADER_TOOLBAR, { onRenderActions }, componentDoc);\n\t}, [onRenderActions]);\n\n\tconst mergedAssistiveText = {\n\t\t...defaultAssistiveText,\n\t\t...assistiveText,\n\t};\n\treturn (\n\t\t<div className=\"slds-builder-toolbar\" role=\"toolbar\">\n\t\t\t{React.Children.map(children, (child) => {\n\t\t\t\tif (\n\t\t\t\t\tReact.isValidElement(child) &&\n\t\t\t\t\t(child.type as { displayName?: string }).displayName === BUTTON_GROUP\n\t\t\t\t) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"slds-builder-toolbar__item-group\"\n\t\t\t\t\t\t\taria-label={(child.props as { label?: string }).label}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{child}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t})}\n\t\t\t<div\n\t\t\t\tclassName=\"slds-builder-toolbar__actions\"\n\t\t\t\taria-label={mergedAssistiveText.actions}\n\t\t\t>\n\t\t\t\t{actions ?? onRenderActions?.()}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nBuilderHeaderToolbar.displayName = BUILDER_HEADER_TOOLBAR;\n\nexport default BuilderHeaderToolbar;\n"],"mappings":";;;;;;AA0CA,IAAM,IAA0D,EAC/D,SAAS,UACV,GAKM,KAAwB,EAC7B,YACA,mBAAgB,GAChB,aACA,yBACoD;CACpD,QAAgB;EACf,EAAW,GAAwB,EAAE,mBAAgB,GAAG,CAAY;CACrE,GAAG,CAAC,CAAe,CAAC;CAEpB,IAAM,IAAsB;EAC3B,GAAG;EACH,GAAG;CACJ;CACA,OACC,kBAAC,OAAD;EAAK,WAAU;EAAuB,MAAK;EAA3C,UAAA,CACE,EAAM,SAAS,IAAI,IAAW,MAE7B,EAAM,eAAe,CAAK,KACzB,EAAM,KAAkC,gBAAA,oBAGxC,kBAAC,OAAD;GACC,WAAU;GACV,cAAa,EAAM,MAA6B;GAE/C,UAAA;EACG,CAAA,IAGA,IACP,GACD,kBAAC,OAAD;GACC,WAAU;GACV,cAAY,EAAoB;GAE/B,UAAA,KAAW,IAAkB;EAC1B,CAAA,CACD;;AAEP;AAEA,EAAqB,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/carousel/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.onRenderItem, "onRenderItem", "renderItem", a("renderItem"));
|
|
8
|
+
});
|
|
9
|
+
var r = n;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as default };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=check-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/carousel/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.onRenderItem,\n\t\t\t'onRenderItem',\n\t\t\t'renderItem',\n\t\t\tcreateDocUrl('renderItem')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;AAOA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAE9C,EACC,GACA,EAAM,cACN,gBACA,cACA,EAAa,YAAY,CAC1B;AACD;AAGD,IAAA,IAAe"}
|