@salesforce/design-system-react 11.0.0-alpha.2 → 11.0.0-alpha.4
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/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/illustration/check-props.cjs +2 -0
- package/dist/cjs/components/illustration/check-props.cjs.map +1 -0
- package/dist/cjs/components/illustration/index.cjs +1 -1
- package/dist/cjs/components/illustration/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/modal/trigger.cjs +1 -1
- package/dist/cjs/components/page-header/index.cjs.map +1 -1
- package/dist/cjs/components/pill/index.cjs +1 -1
- package/dist/cjs/components/pill/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/private/selected-listbox.cjs +1 -1
- package/dist/cjs/components/pill-container/private/selected-listbox.cjs.map +1 -1
- package/dist/cjs/components/{data-table → simple-data-table}/cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/column-check-props.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/column.cjs +2 -0
- package/dist/cjs/components/simple-data-table/column.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/component.cjs +2 -0
- package/dist/cjs/components/simple-data-table/component.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/highlight-cell.cjs +2 -0
- package/dist/cjs/components/simple-data-table/highlight-cell.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/index.cjs +2 -0
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/interactive-element.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/interactive-link.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/cell-context.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/cell-fixed.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/context-helper.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/link.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/mode.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/row.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/table-context.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table.cjs +1 -0
- package/dist/cjs/components/tree/private/item.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs.map +1 -1
- package/dist/cjs/utilities/constants.cjs +1 -1
- package/dist/cjs/utilities/constants.cjs.map +1 -1
- package/dist/es/components/combobox/combobox.js +131 -117
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +150 -145
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js +6 -18
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/illustration/check-props.js +11 -0
- package/dist/es/components/illustration/check-props.js.map +1 -0
- package/dist/es/components/illustration/index.js +37 -25
- package/dist/es/components/illustration/index.js.map +1 -1
- package/dist/es/components/index.js +95 -121
- package/dist/es/components/modal/trigger.js +4 -4
- package/dist/es/components/page-header/index.js.map +1 -1
- package/dist/es/components/pill/index.js +32 -30
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +1 -0
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/pill-container/private/selected-listbox.js +3 -1
- package/dist/es/components/pill-container/private/selected-listbox.js.map +1 -1
- package/dist/es/components/{data-table → simple-data-table}/cell.js +2 -2
- package/dist/es/components/simple-data-table/cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/check-props.js +2 -2
- package/dist/es/components/simple-data-table/check-props.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/column-check-props.js +1 -1
- package/dist/es/components/simple-data-table/column-check-props.js.map +1 -0
- package/dist/es/components/simple-data-table/column.js +8 -0
- package/dist/es/components/simple-data-table/column.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/component.js +6 -10
- package/dist/es/components/simple-data-table/component.js.map +1 -0
- package/dist/es/components/simple-data-table/highlight-cell.js +18 -0
- package/dist/es/components/simple-data-table/highlight-cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/index.js +78 -183
- package/dist/es/components/simple-data-table/index.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/interactive-element.js +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/interactive-link.js +1 -1
- package/dist/es/components/simple-data-table/interactive-link.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/cell-context.js +1 -1
- package/dist/es/components/simple-data-table/private/cell-context.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/cell-fixed.js +1 -1
- package/dist/es/components/simple-data-table/private/cell-fixed.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/context-helper.js +1 -1
- package/dist/es/components/simple-data-table/private/context-helper.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/head.js +2 -2
- package/dist/es/components/simple-data-table/private/head.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/header-cell.js +2 -2
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/link.js +1 -1
- package/dist/es/components/simple-data-table/private/link.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/mode.js +1 -1
- package/dist/es/components/simple-data-table/private/mode.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/row.js +6 -6
- package/dist/es/components/simple-data-table/private/row.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/table-context.js +1 -1
- package/dist/es/components/simple-data-table/private/table-context.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/row-actions.js +2 -2
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -0
- package/dist/es/components/simple-data-table.js +2 -0
- package/dist/es/components/tree/private/item.js +4 -4
- package/dist/es/components/tree/private/render-branch.js +9 -9
- package/dist/es/components/utilities/dialog/index.js +2 -2
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +6 -2
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/illustration/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +14 -66
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page-header/index.d.ts +1 -1
- package/dist/types/components/page-header/index.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +4 -0
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts +7 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts.map +1 -1
- package/dist/types/components/{data-table → simple-data-table}/cell.d.ts +5 -5
- package/dist/types/components/simple-data-table/cell.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/column-check-props.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/column.d.ts +6 -6
- package/dist/types/components/simple-data-table/column.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/highlight-cell.d.ts +14 -0
- package/dist/types/components/simple-data-table/highlight-cell.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/index.d.ts +13 -40
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/interactive-link.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/cell-context.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/cell-fixed.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/context-helper.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/head.d.ts +6 -6
- package/dist/types/components/simple-data-table/private/head.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/header-cell.d.ts +3 -3
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/link.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/mode.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/row.d.ts +11 -11
- package/dist/types/components/simple-data-table/private/row.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/table-context.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/row-actions.d.ts +5 -5
- package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/simple-data-table.d.ts +15 -0
- package/dist/types/components/simple-data-table/simple-data-table.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/types.d.ts +56 -71
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -0
- package/dist/types/components/simple-data-table.d.ts +2 -0
- package/dist/types/utilities/constants.d.ts +7 -7
- package/dist/types/utilities/constants.d.ts.map +1 -1
- package/package.json +6 -2
- package/dist/cjs/components/app-launcher/check-props.cjs +0 -2
- package/dist/cjs/components/app-launcher/check-props.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/component.cjs +0 -2
- package/dist/cjs/components/app-launcher/component.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/expandable-section.cjs +0 -2
- package/dist/cjs/components/app-launcher/expandable-section.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/index.cjs +0 -2
- package/dist/cjs/components/app-launcher/index.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/link.cjs +0 -2
- package/dist/cjs/components/app-launcher/link.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/tile.cjs +0 -2
- package/dist/cjs/components/app-launcher/tile.cjs.map +0 -1
- package/dist/cjs/components/app-launcher.cjs +0 -1
- package/dist/cjs/components/brand-band/index.cjs +0 -2
- package/dist/cjs/components/brand-band/index.cjs.map +0 -1
- package/dist/cjs/components/brand-band.cjs +0 -1
- package/dist/cjs/components/data-table/cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/check-props.cjs.map +0 -1
- package/dist/cjs/components/data-table/column-check-props.cjs.map +0 -1
- package/dist/cjs/components/data-table/column.cjs +0 -2
- package/dist/cjs/components/data-table/column.cjs.map +0 -1
- package/dist/cjs/components/data-table/component.cjs +0 -2
- package/dist/cjs/components/data-table/component.cjs.map +0 -1
- package/dist/cjs/components/data-table/highlight-cell.cjs +0 -2
- package/dist/cjs/components/data-table/highlight-cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/index.cjs +0 -2
- package/dist/cjs/components/data-table/index.cjs.map +0 -1
- package/dist/cjs/components/data-table/interactive-element.cjs.map +0 -1
- package/dist/cjs/components/data-table/interactive-link.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/cell-context.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/cell-fixed.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/context-helper.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/head.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/header-cell.cjs +0 -2
- package/dist/cjs/components/data-table/private/header-cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/link.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/mode.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/row.cjs +0 -2
- package/dist/cjs/components/data-table/private/row.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/table-context.cjs.map +0 -1
- package/dist/cjs/components/data-table/row-actions.cjs.map +0 -1
- package/dist/cjs/components/data-table.cjs +0 -1
- package/dist/cjs/components/expression/condition.cjs +0 -2
- package/dist/cjs/components/expression/condition.cjs.map +0 -1
- package/dist/cjs/components/expression/formula.cjs +0 -2
- package/dist/cjs/components/expression/formula.cjs.map +0 -1
- package/dist/cjs/components/expression/group.cjs +0 -2
- package/dist/cjs/components/expression/group.cjs.map +0 -1
- package/dist/cjs/components/expression/index.cjs +0 -2
- package/dist/cjs/components/expression/index.cjs.map +0 -1
- package/dist/cjs/components/expression.cjs +0 -1
- package/dist/cjs/components/global-header/button.cjs +0 -2
- package/dist/cjs/components/global-header/button.cjs.map +0 -1
- package/dist/cjs/components/global-header/check-props.cjs +0 -2
- package/dist/cjs/components/global-header/check-props.cjs.map +0 -1
- package/dist/cjs/components/global-header/dropdown.cjs +0 -2
- package/dist/cjs/components/global-header/dropdown.cjs.map +0 -1
- package/dist/cjs/components/global-header/favorites.cjs +0 -2
- package/dist/cjs/components/global-header/favorites.cjs.map +0 -1
- package/dist/cjs/components/global-header/help.cjs +0 -2
- package/dist/cjs/components/global-header/help.cjs.map +0 -1
- package/dist/cjs/components/global-header/index.cjs +0 -2
- package/dist/cjs/components/global-header/index.cjs.map +0 -1
- package/dist/cjs/components/global-header/notifications.cjs +0 -2
- package/dist/cjs/components/global-header/notifications.cjs.map +0 -1
- package/dist/cjs/components/global-header/private/dropdown-trigger.cjs +0 -2
- package/dist/cjs/components/global-header/private/dropdown-trigger.cjs.map +0 -1
- package/dist/cjs/components/global-header/profile.cjs +0 -2
- package/dist/cjs/components/global-header/profile.cjs.map +0 -1
- package/dist/cjs/components/global-header/search.cjs +0 -2
- package/dist/cjs/components/global-header/search.cjs.map +0 -1
- package/dist/cjs/components/global-header/setup.cjs +0 -2
- package/dist/cjs/components/global-header/setup.cjs.map +0 -1
- package/dist/cjs/components/global-header/task.cjs +0 -2
- package/dist/cjs/components/global-header/task.cjs.map +0 -1
- package/dist/cjs/components/global-header.cjs +0 -1
- package/dist/cjs/components/global-navigation-bar/button.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/button.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/check-props.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/check-props.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/component.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/component.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/dropdown-trigger.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/dropdown-trigger.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/dropdown.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/dropdown.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/index.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/index.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/label.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/label.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/link.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/link.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/region.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/region.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar.cjs +0 -1
- package/dist/cjs/components/location-map/index.cjs +0 -2
- package/dist/cjs/components/location-map/index.cjs.map +0 -1
- package/dist/cjs/components/location-map.cjs +0 -1
- package/dist/cjs/components/utilities/truncate/index.cjs +0 -2
- package/dist/cjs/components/utilities/truncate/index.cjs.map +0 -1
- package/dist/cjs/components/utilities/truncate.cjs +0 -1
- package/dist/cjs/utilities/warning/one-of-component.cjs +0 -2
- package/dist/cjs/utilities/warning/one-of-component.cjs.map +0 -1
- package/dist/es/components/app-launcher/check-props.js +0 -17
- package/dist/es/components/app-launcher/check-props.js.map +0 -1
- package/dist/es/components/app-launcher/component.js +0 -31
- package/dist/es/components/app-launcher/component.js.map +0 -1
- package/dist/es/components/app-launcher/expandable-section.js +0 -42
- package/dist/es/components/app-launcher/expandable-section.js.map +0 -1
- package/dist/es/components/app-launcher/index.js +0 -96
- package/dist/es/components/app-launcher/index.js.map +0 -1
- package/dist/es/components/app-launcher/link.js +0 -29
- package/dist/es/components/app-launcher/link.js.map +0 -1
- package/dist/es/components/app-launcher/tile.js +0 -101
- package/dist/es/components/app-launcher/tile.js.map +0 -1
- package/dist/es/components/app-launcher.js +0 -2
- package/dist/es/components/brand-band/index.js +0 -27
- package/dist/es/components/brand-band/index.js.map +0 -1
- package/dist/es/components/brand-band.js +0 -2
- package/dist/es/components/data-table/cell.js.map +0 -1
- package/dist/es/components/data-table/check-props.js.map +0 -1
- package/dist/es/components/data-table/column-check-props.js.map +0 -1
- package/dist/es/components/data-table/column.js +0 -8
- package/dist/es/components/data-table/column.js.map +0 -1
- package/dist/es/components/data-table/component.js.map +0 -1
- package/dist/es/components/data-table/highlight-cell.js +0 -18
- package/dist/es/components/data-table/highlight-cell.js.map +0 -1
- package/dist/es/components/data-table/index.js.map +0 -1
- package/dist/es/components/data-table/interactive-element.js.map +0 -1
- package/dist/es/components/data-table/interactive-link.js.map +0 -1
- package/dist/es/components/data-table/private/cell-context.js.map +0 -1
- package/dist/es/components/data-table/private/cell-fixed.js.map +0 -1
- package/dist/es/components/data-table/private/context-helper.js.map +0 -1
- package/dist/es/components/data-table/private/head.js.map +0 -1
- package/dist/es/components/data-table/private/header-cell.js.map +0 -1
- package/dist/es/components/data-table/private/link.js.map +0 -1
- package/dist/es/components/data-table/private/mode.js.map +0 -1
- package/dist/es/components/data-table/private/row.js.map +0 -1
- package/dist/es/components/data-table/private/table-context.js.map +0 -1
- package/dist/es/components/data-table/row-actions.js.map +0 -1
- package/dist/es/components/data-table.js +0 -2
- package/dist/es/components/expression/condition.js +0 -124
- package/dist/es/components/expression/condition.js.map +0 -1
- package/dist/es/components/expression/formula.js +0 -105
- package/dist/es/components/expression/formula.js.map +0 -1
- package/dist/es/components/expression/group.js +0 -153
- package/dist/es/components/expression/group.js.map +0 -1
- package/dist/es/components/expression/index.js +0 -33
- package/dist/es/components/expression/index.js.map +0 -1
- package/dist/es/components/expression.js +0 -2
- package/dist/es/components/global-header/button.js +0 -19
- package/dist/es/components/global-header/button.js.map +0 -1
- package/dist/es/components/global-header/check-props.js +0 -20
- package/dist/es/components/global-header/check-props.js.map +0 -1
- package/dist/es/components/global-header/dropdown.js +0 -33
- package/dist/es/components/global-header/dropdown.js.map +0 -1
- package/dist/es/components/global-header/favorites.js +0 -74
- package/dist/es/components/global-header/favorites.js.map +0 -1
- package/dist/es/components/global-header/help.js +0 -39
- package/dist/es/components/global-header/help.js.map +0 -1
- package/dist/es/components/global-header/index.js +0 -90
- package/dist/es/components/global-header/index.js.map +0 -1
- package/dist/es/components/global-header/notifications.js +0 -51
- package/dist/es/components/global-header/notifications.js.map +0 -1
- package/dist/es/components/global-header/private/dropdown-trigger.js +0 -50
- package/dist/es/components/global-header/private/dropdown-trigger.js.map +0 -1
- package/dist/es/components/global-header/profile.js +0 -47
- package/dist/es/components/global-header/profile.js.map +0 -1
- package/dist/es/components/global-header/search.js +0 -12
- package/dist/es/components/global-header/search.js.map +0 -1
- package/dist/es/components/global-header/setup.js +0 -39
- package/dist/es/components/global-header/setup.js.map +0 -1
- package/dist/es/components/global-header/task.js +0 -38
- package/dist/es/components/global-header/task.js.map +0 -1
- package/dist/es/components/global-header.js +0 -2
- package/dist/es/components/global-navigation-bar/button.js +0 -22
- package/dist/es/components/global-navigation-bar/button.js.map +0 -1
- package/dist/es/components/global-navigation-bar/check-props.js +0 -13
- package/dist/es/components/global-navigation-bar/check-props.js.map +0 -1
- package/dist/es/components/global-navigation-bar/component.js +0 -43
- package/dist/es/components/global-navigation-bar/component.js.map +0 -1
- package/dist/es/components/global-navigation-bar/dropdown-trigger.js +0 -66
- package/dist/es/components/global-navigation-bar/dropdown-trigger.js.map +0 -1
- package/dist/es/components/global-navigation-bar/dropdown.js +0 -34
- package/dist/es/components/global-navigation-bar/dropdown.js.map +0 -1
- package/dist/es/components/global-navigation-bar/index.js +0 -27
- package/dist/es/components/global-navigation-bar/index.js.map +0 -1
- package/dist/es/components/global-navigation-bar/label.js +0 -25
- package/dist/es/components/global-navigation-bar/label.js.map +0 -1
- package/dist/es/components/global-navigation-bar/link.js +0 -50
- package/dist/es/components/global-navigation-bar/link.js.map +0 -1
- package/dist/es/components/global-navigation-bar/region.js +0 -50
- package/dist/es/components/global-navigation-bar/region.js.map +0 -1
- package/dist/es/components/global-navigation-bar.js +0 -2
- package/dist/es/components/location-map/index.js +0 -75
- package/dist/es/components/location-map/index.js.map +0 -1
- package/dist/es/components/location-map.js +0 -2
- package/dist/es/components/utilities/truncate/index.js +0 -91
- package/dist/es/components/utilities/truncate/index.js.map +0 -1
- package/dist/es/components/utilities/truncate.js +0 -2
- package/dist/es/utilities/warning/one-of-component.js +0 -15
- package/dist/es/utilities/warning/one-of-component.js.map +0 -1
- package/dist/types/components/app-launcher/check-props.d.ts.map +0 -1
- package/dist/types/components/app-launcher/expandable-section.d.ts +0 -62
- package/dist/types/components/app-launcher/expandable-section.d.ts.map +0 -1
- package/dist/types/components/app-launcher/index.d.ts +0 -48
- package/dist/types/components/app-launcher/index.d.ts.map +0 -1
- package/dist/types/components/app-launcher/link.d.ts +0 -39
- package/dist/types/components/app-launcher/link.d.ts.map +0 -1
- package/dist/types/components/app-launcher/section.d.ts +0 -55
- package/dist/types/components/app-launcher/section.d.ts.map +0 -1
- package/dist/types/components/app-launcher/tile.d.ts +0 -74
- package/dist/types/components/app-launcher/tile.d.ts.map +0 -1
- package/dist/types/components/app-launcher.d.ts +0 -2
- package/dist/types/components/brand-band/check-props.d.ts +0 -3
- package/dist/types/components/brand-band/check-props.d.ts.map +0 -1
- package/dist/types/components/brand-band/index.d.ts +0 -39
- package/dist/types/components/brand-band/index.d.ts.map +0 -1
- package/dist/types/components/brand-band.d.ts +0 -2
- package/dist/types/components/bread-crumb/index.d.ts +0 -3
- package/dist/types/components/bread-crumb/index.d.ts.map +0 -1
- package/dist/types/components/bread-crumb.d.ts +0 -2
- package/dist/types/components/data-table/cell.d.ts.map +0 -1
- package/dist/types/components/data-table/check-props.d.ts +0 -3
- package/dist/types/components/data-table/check-props.d.ts.map +0 -1
- package/dist/types/components/data-table/column-check-props.d.ts.map +0 -1
- package/dist/types/components/data-table/column.d.ts.map +0 -1
- package/dist/types/components/data-table/data-table.d.ts +0 -15
- package/dist/types/components/data-table/data-table.d.ts.map +0 -1
- package/dist/types/components/data-table/highlight-cell.d.ts +0 -14
- package/dist/types/components/data-table/highlight-cell.d.ts.map +0 -1
- package/dist/types/components/data-table/index.d.ts.map +0 -1
- package/dist/types/components/data-table/interactive-element.d.ts.map +0 -1
- package/dist/types/components/data-table/interactive-link.d.ts.map +0 -1
- package/dist/types/components/data-table/private/cell-context.d.ts.map +0 -1
- package/dist/types/components/data-table/private/cell-fixed.d.ts.map +0 -1
- package/dist/types/components/data-table/private/context-helper.d.ts.map +0 -1
- package/dist/types/components/data-table/private/head.d.ts.map +0 -1
- package/dist/types/components/data-table/private/header-cell.d.ts.map +0 -1
- package/dist/types/components/data-table/private/link.d.ts.map +0 -1
- package/dist/types/components/data-table/private/mode.d.ts.map +0 -1
- package/dist/types/components/data-table/private/row.d.ts.map +0 -1
- package/dist/types/components/data-table/private/table-context.d.ts.map +0 -1
- package/dist/types/components/data-table/row-actions.d.ts.map +0 -1
- package/dist/types/components/data-table/types.d.ts.map +0 -1
- package/dist/types/components/data-table.d.ts +0 -2
- package/dist/types/components/expression/condition.d.ts +0 -105
- package/dist/types/components/expression/condition.d.ts.map +0 -1
- package/dist/types/components/expression/formula.d.ts +0 -88
- package/dist/types/components/expression/formula.d.ts.map +0 -1
- package/dist/types/components/expression/group.d.ts +0 -114
- package/dist/types/components/expression/group.d.ts.map +0 -1
- package/dist/types/components/expression/index.d.ts +0 -72
- package/dist/types/components/expression/index.d.ts.map +0 -1
- package/dist/types/components/expression.d.ts +0 -2
- package/dist/types/components/forms/input/index.d.ts +0 -3
- package/dist/types/components/forms/input/index.d.ts.map +0 -1
- package/dist/types/components/forms/input/search.d.ts +0 -3
- package/dist/types/components/forms/input/search.d.ts.map +0 -1
- package/dist/types/components/forms/input.d.ts +0 -2
- package/dist/types/components/forms/radio/index.d.ts +0 -3
- package/dist/types/components/forms/radio/index.d.ts.map +0 -1
- package/dist/types/components/forms/radio.d.ts +0 -2
- package/dist/types/components/forms/textarea/index.d.ts +0 -3
- package/dist/types/components/forms/textarea/index.d.ts.map +0 -1
- package/dist/types/components/forms/textarea.d.ts +0 -2
- package/dist/types/components/global-header/button.d.ts +0 -15
- package/dist/types/components/global-header/button.d.ts.map +0 -1
- package/dist/types/components/global-header/check-props.d.ts +0 -3
- package/dist/types/components/global-header/check-props.d.ts.map +0 -1
- package/dist/types/components/global-header/dropdown.d.ts +0 -59
- package/dist/types/components/global-header/dropdown.d.ts.map +0 -1
- package/dist/types/components/global-header/favorites.d.ts +0 -42
- package/dist/types/components/global-header/favorites.d.ts.map +0 -1
- package/dist/types/components/global-header/help.d.ts +0 -25
- package/dist/types/components/global-header/help.d.ts.map +0 -1
- package/dist/types/components/global-header/index.d.ts +0 -38
- package/dist/types/components/global-header/index.d.ts.map +0 -1
- package/dist/types/components/global-header/notifications.d.ts +0 -33
- package/dist/types/components/global-header/notifications.d.ts.map +0 -1
- package/dist/types/components/global-header/private/dropdown-trigger.d.ts +0 -78
- package/dist/types/components/global-header/private/dropdown-trigger.d.ts.map +0 -1
- package/dist/types/components/global-header/profile.d.ts +0 -38
- package/dist/types/components/global-header/profile.d.ts.map +0 -1
- package/dist/types/components/global-header/search.d.ts +0 -14
- package/dist/types/components/global-header/search.d.ts.map +0 -1
- package/dist/types/components/global-header/setup.d.ts +0 -25
- package/dist/types/components/global-header/setup.d.ts.map +0 -1
- package/dist/types/components/global-header/task.d.ts +0 -25
- package/dist/types/components/global-header/task.d.ts.map +0 -1
- package/dist/types/components/global-header.d.ts +0 -2
- package/dist/types/components/global-navigation-bar/button.d.ts +0 -18
- package/dist/types/components/global-navigation-bar/button.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/check-props.d.ts +0 -3
- package/dist/types/components/global-navigation-bar/check-props.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/dropdown-trigger.d.ts +0 -88
- package/dist/types/components/global-navigation-bar/dropdown-trigger.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/dropdown.d.ts +0 -64
- package/dist/types/components/global-navigation-bar/dropdown.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/index.d.ts +0 -35
- package/dist/types/components/global-navigation-bar/index.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/label.d.ts +0 -25
- package/dist/types/components/global-navigation-bar/label.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/link.d.ts +0 -84
- package/dist/types/components/global-navigation-bar/link.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/region.d.ts +0 -36
- package/dist/types/components/global-navigation-bar/region.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar.d.ts +0 -2
- package/dist/types/components/location-map/index.d.ts +0 -49
- package/dist/types/components/location-map/index.d.ts.map +0 -1
- package/dist/types/components/location-map.d.ts +0 -2
- package/dist/types/components/navigation/index.d.ts +0 -3
- package/dist/types/components/navigation/index.d.ts.map +0 -1
- package/dist/types/components/navigation.d.ts +0 -2
- package/dist/types/components/popover-tooltip/index.d.ts +0 -3
- package/dist/types/components/popover-tooltip/index.d.ts.map +0 -1
- package/dist/types/components/popover-tooltip.d.ts +0 -2
- /package/dist/cjs/components/{data-table → simple-data-table}/column-check-props.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/interactive-element.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/interactive-link.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/cell-context.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/cell-fixed.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/context-helper.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/link.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/mode.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/table-context.cjs +0 -0
- /package/dist/types/components/{app-launcher → simple-data-table}/check-props.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/column-check-props.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/interactive-element.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/interactive-link.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/cell-context.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/cell-fixed.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/context-helper.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/link.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/mode.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/table-context.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.cjs","names":[],"sources":["../../../../components/global-header/setup.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// # Global Header Setup Component\n// Implements the [Global Header Setup design pattern](https://www.lightningdesignsystem.com/components/global-header/#Setup) in React.\n\nimport React, { type ReactElement } from 'react';\nimport assign from 'lodash.assign';\nimport Button from '../button';\nimport Dropdown from '../menu-dropdown';\nimport DropdownTrigger from '../menu-dropdown/button-trigger';\n\nimport { GLOBAL_HEADER_SETUP } from '../../utilities/constants';\n\nexport interface GlobalHeaderSetupAssistiveText {\n\ttriggerButton?: string;\n}\n\nexport interface GlobalHeaderSetupProps {\n\t/**\n\t * **Assistive text for accessibility**\n\t * * `triggerButton`: Assistive text for the GlobalHeaderSetup trigger button. The default is `Setup`.\n\t */\n\tassistiveText?: GlobalHeaderSetupAssistiveText;\n\t/**\n\t * A `Dropdown` component. The props from this dropdown will be merged and override any default props. This also allows custom content to be passed as children and rendered in the dropdown.\n\t */\n\tdropdown?: ReactElement;\n}\n\n/**\n * A GlobalHeaderSetup component.\n */\nclass GlobalHeaderSetup extends React.Component<GlobalHeaderSetupProps> {\n\tstatic displayName = GLOBAL_HEADER_SETUP;\n\n\tstatic defaultProps: Partial<GlobalHeaderSetupProps> = {\n\t\tassistiveText: {\n\t\t\ttriggerButton: 'Setup',\n\t\t},\n\t};\n\n\trender() {\n\t\tconst buttonAriaProps = {\n\t\t\t'aria-haspopup': true,\n\t\t};\n\t\tconst dropdownProps: Record<string, unknown> = assign(\n\t\t\t{\n\t\t\t\talign: 'right',\n\t\t\t\tnubbinPosition: 'top right',\n\t\t\t},\n\t\t\tthis.props.dropdown ? this.props.dropdown.props : {}\n\t\t);\n\t\tconst dropdownChildren = dropdownProps.children || null;\n\n\t\tdelete dropdownProps.children;\n\n\t\tconst assistiveText = this.props\n\t\t\t.assistiveText as GlobalHeaderSetupAssistiveText;\n\n\t\treturn (\n\t\t\t<Dropdown {...(dropdownProps as React.ComponentProps<typeof Dropdown>)}>\n\t\t\t\t<DropdownTrigger>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={{ icon: assistiveText.triggerButton }}\n\t\t\t\t\t\tclassName=\"slds-button_icon slds-global-actions__setup slds-global-actions__item-action\"\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonClassName=\"slds-global-header__icon\"\n\t\t\t\t\t\ticonName=\"setup\"\n\t\t\t\t\t\ticonSize=\"small\"\n\t\t\t\t\t\ticonVariant=\"container\"\n\t\t\t\t\t\ttitle={assistiveText.triggerButton}\n\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t{...buttonAriaProps}\n\t\t\t\t\t/>\n\t\t\t\t</DropdownTrigger>\n\t\t\t\t{dropdownChildren as React.ReactNode}\n\t\t\t</Dropdown>\n\t\t);\n\t}\n}\n\nexport default GlobalHeaderSetup;\n"],"mappings":"oVAiCA,IAAM,EAAN,cAAgC,EAAA,QAAM,SAAkC,CACvE,OAAO,YAAc,EAAA,oBAErB,OAAO,aAAgD,CACtD,cAAe,CACd,cAAe,OAChB,CACD,EAEA,QAAS,CACR,IAAM,EAAkB,CACvB,gBAAiB,EAClB,EACM,GAAA,EAAyC,EAAA,QAAA,CAC9C,CACC,MAAO,QACP,eAAgB,WACjB,EACA,KAAK,MAAM,SAAW,KAAK,MAAM,SAAS,MAAQ,CAAC,CACpD,EACM,EAAmB,EAAc,UAAY,KAEnD,OAAO,EAAc,SAErB,IAAM,EAAgB,KAAK,MACzB,cAEF,OACC,EAAA,EAAA,KAAA,CAAC,EAAA,QAAD,CAAU,GAAK,EAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAA,UACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,KAAM,EAAc,aAAc,EACnD,UAAU,+EACV,aAAa,UACb,cAAc,2BACd,SAAS,QACT,SAAS,QACT,YAAY,YACZ,MAAO,EAAc,cACrB,QAAQ,OACR,GAAI,CACJ,CAAA,CACe,CAAA,EAChB,CACQ,GAEZ,CACD"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../button/index.cjs"),r=require("../menu-dropdown/button-trigger.cjs"),i=require("../menu-dropdown/index.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime"),s=require("lodash.assign");s=e.__toESM(s,1);var c=class extends a.default.Component{static displayName=t.GLOBAL_HEADER_TASK;static defaultProps={assistiveText:{triggerButton:`Global Actions`}};render(){let e={"aria-haspopup":!0},t=(0,s.default)({align:`right`,nubbinPosition:`top right`},this.props.dropdown?this.props.dropdown.props:{}),a=t.children||null;delete t.children;let c=this.props.assistiveText;return(0,o.jsxs)(i.default,{...t,children:[(0,o.jsx)(r.default,{children:(0,o.jsx)(n.default,{assistiveText:{icon:c.triggerButton},className:`slds-button_icon slds-global-actions__task slds-global-actions__item-action`,iconCategory:`utility`,iconName:`add`,iconSize:`small`,iconVariant:`container`,title:c.triggerButton,variant:`icon`,...e})}),a]})}};exports.default=c;
|
|
2
|
-
//# sourceMappingURL=task.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.cjs","names":[],"sources":["../../../../components/global-header/task.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// # Global Header Task Component\n// Implements the [Global Header Task design pattern](https://www.lightningdesignsystem.com/components/global-header/#Task) in React.\n\nimport React, { type ReactElement } from 'react';\nimport assign from 'lodash.assign';\nimport Button from '../button';\nimport Dropdown from '../menu-dropdown';\nimport DropdownTrigger from '../menu-dropdown/button-trigger';\n\nimport { GLOBAL_HEADER_TASK } from '../../utilities/constants';\n\nexport interface GlobalHeaderTaskAssistiveText {\n\ttriggerButton?: string;\n}\n\nexport interface GlobalHeaderTaskProps {\n\t/**\n\t * **Assistive text for accessibility**\n\t * * `triggerButton`: Assistive text for the GlobalHeaderTask trigger button. The default is `Global Actions`.\n\t */\n\tassistiveText?: GlobalHeaderTaskAssistiveText;\n\t/**\n\t * A `Dropdown` component. The props from this dropdown will be merged and override any default props. This also allows custom content to be passed as children and rendered in the dropdown.\n\t */\n\tdropdown?: ReactElement;\n}\n\n/**\n * A GlobalHeaderTask component.\n */\nclass GlobalHeaderTask extends React.Component<GlobalHeaderTaskProps> {\n\tstatic displayName = GLOBAL_HEADER_TASK;\n\n\tstatic defaultProps: Partial<GlobalHeaderTaskProps> = {\n\t\tassistiveText: {\n\t\t\ttriggerButton: 'Global Actions',\n\t\t},\n\t};\n\n\trender() {\n\t\tconst buttonAriaProps = {\n\t\t\t'aria-haspopup': true,\n\t\t};\n\t\tconst dropdownProps: Record<string, unknown> = assign(\n\t\t\t{\n\t\t\t\talign: 'right',\n\t\t\t\tnubbinPosition: 'top right',\n\t\t\t},\n\t\t\tthis.props.dropdown ? this.props.dropdown.props : {}\n\t\t);\n\t\tconst dropdownChildren = dropdownProps.children || null;\n\n\t\tdelete dropdownProps.children;\n\n\t\tconst assistiveText = this.props\n\t\t\t.assistiveText as GlobalHeaderTaskAssistiveText;\n\n\t\treturn (\n\t\t\t<Dropdown {...(dropdownProps as React.ComponentProps<typeof Dropdown>)}>\n\t\t\t\t<DropdownTrigger>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={{ icon: assistiveText.triggerButton }}\n\t\t\t\t\t\tclassName=\"slds-button_icon slds-global-actions__task slds-global-actions__item-action\"\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonName=\"add\"\n\t\t\t\t\t\ticonSize=\"small\"\n\t\t\t\t\t\ticonVariant=\"container\"\n\t\t\t\t\t\ttitle={assistiveText.triggerButton}\n\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t{...buttonAriaProps}\n\t\t\t\t\t/>\n\t\t\t\t</DropdownTrigger>\n\t\t\t\t{dropdownChildren as React.ReactNode}\n\t\t\t</Dropdown>\n\t\t);\n\t}\n}\n\nexport default GlobalHeaderTask;\n"],"mappings":"oVAiCA,IAAM,EAAN,cAA+B,EAAA,QAAM,SAAiC,CACrE,OAAO,YAAc,EAAA,mBAErB,OAAO,aAA+C,CACrD,cAAe,CACd,cAAe,gBAChB,CACD,EAEA,QAAS,CACR,IAAM,EAAkB,CACvB,gBAAiB,EAClB,EACM,GAAA,EAAyC,EAAA,QAAA,CAC9C,CACC,MAAO,QACP,eAAgB,WACjB,EACA,KAAK,MAAM,SAAW,KAAK,MAAM,SAAS,MAAQ,CAAC,CACpD,EACM,EAAmB,EAAc,UAAY,KAEnD,OAAO,EAAc,SAErB,IAAM,EAAgB,KAAK,MACzB,cAEF,OACC,EAAA,EAAA,KAAA,CAAC,EAAA,QAAD,CAAU,GAAK,EAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAA,UACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,KAAM,EAAc,aAAc,EACnD,UAAU,8EACV,aAAa,UACb,SAAS,MACT,SAAS,QACT,YAAY,YACZ,MAAO,EAAc,cACrB,QAAQ,OACR,GAAI,CACJ,CAAA,CACe,CAAA,EAChB,CACQ,GAEZ,CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./global-header/index.cjs');
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../button/index.cjs");let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({className:e=`slds-context-bar__label-action slds-text-body_regular`,style:t={lineHeight:`inherit`},variant:a=`base`,active:o,dividerPosition:s,...c})=>(0,i.jsx)(`li`,{className:(0,r.default)(`slds-context-bar__item`,{"slds-is-active":o,[`slds-context-bar__item_divider-${s}`]:s}),children:(0,i.jsx)(n.default,{className:e,style:t,variant:a,...c})});a.displayName=t.GLOBAL_NAVIGATION_BAR_BUTTON,exports.default=a;
|
|
2
|
-
//# sourceMappingURL=button.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.cjs","names":[],"sources":["../../../../components/global-navigation-bar/button.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// # Global Navigation Bar Button Component\n\n// ## Dependencies\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### Button\nimport Button, { type ButtonProps } from '../button';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_BUTTON } from '../../utilities/constants';\n\nexport interface GlobalNavigationButtonProps extends ButtonProps {\n\t/**\n\t * Whether the item is active or not.\n\t */\n\tactive?: boolean;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n}\n\n/**\n * A helper component that renders a Button as an item in the Global Navigation Bar. All props are passed onto `Button` except `active` and `dividerPosition`.\n */\nconst GlobalNavigationButton = ({\n\tclassName = 'slds-context-bar__label-action slds-text-body_regular',\n\tstyle = { lineHeight: 'inherit' },\n\tvariant = 'base',\n\tactive,\n\tdividerPosition,\n\t...props\n}: GlobalNavigationButtonProps) => (\n\t<li\n\t\tclassName={classNames('slds-context-bar__item', {\n\t\t\t'slds-is-active': active,\n\t\t\t[`slds-context-bar__item_divider-${dividerPosition}`]: dividerPosition,\n\t\t})}\n\t>\n\t\t<Button className={className} style={style} variant={variant} {...props} />\n\t</li>\n);\n\nGlobalNavigationButton.displayName = GLOBAL_NAVIGATION_BAR_BUTTON;\n\nexport default GlobalNavigationButton;\n"],"mappings":"oNA8BA,IAAM,GAA0B,CAC/B,YAAY,wDACZ,QAAQ,CAAE,WAAY,SAAU,EAChC,UAAU,OACV,SACA,kBACA,GAAG,MAEH,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CAAW,yBAA0B,CAC/C,iBAAkB,GACjB,kCAAkC,KAAoB,CACxD,CAAC,EAED,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAmB,YAAkB,QAAgB,UAAS,GAAI,CAAQ,CAAA,CACvE,CAAA,EAGL,EAAuB,YAAc,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../utilities/warning/sunset-property.cjs"),t=require("../../utilities/get-component-doc.cjs");var n=function(){};process.env.NODE_ENV!==`production`&&(n=function(n,r,i){let a=t.default(i);typeof r.assistiveText==`string`&&e.default(n,r.assistiveText,`assistiveText`,`\`assistiveText\` as a string has been deprecated and is now an object to allow for multiple uses in the component. Please use \`assistiveText.icon\` instead. ${a(`assistiveText`)}`)});var r=n;exports.default=r;
|
|
2
|
-
//# sourceMappingURL=check-props.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-props.cjs","names":[],"sources":["../../../../components/global-navigation-bar/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 sunsetProperty from '../../utilities/warning/sunset-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\tif (typeof props.assistiveText === 'string') {\n\t\t\tsunsetProperty(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops.assistiveText,\n\t\t\t\t'assistiveText',\n\t\t\t\t`\\`assistiveText\\` as a string has been deprecated and is now an object to allow for multiple uses in the component. Please use \\`assistiveText.icon\\` instead. ${createDocUrl(\n\t\t\t\t\t'assistiveText'\n\t\t\t\t)}`\n\t\t\t);\n\t\t}\n\t};\n}\n\nexport default checkProps;\n"],"mappings":"kHAOA,IAAI,EAAa,UAA8B,CAAC,EAEhD,QAAA,IAAA,WAA6B,eAC5B,EAAa,SAA4B,EAAW,EAAO,EAAS,CACnE,IAAM,EAAe,EAAA,QAAkB,CAAO,EAE1C,OAAO,EAAM,eAAkB,UAClC,EAAA,QACC,EACA,EAAM,cACN,gBACA,kKAAkK,EACjK,eACD,GACD,CAEF,GAGD,IAAA,EAAe"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=`global-navigation-bar`,t=`prod`,n=`GlobalNavigationBar`,r=[{component:`button`,classKey:`GlobalNavigationBarButton`},{component:`dropdown`,classKey:`GlobalNavigationBarDropdown`},{component:`label`,classKey:`GlobalNavigationBarLabel`},{component:`link`,classKey:`GlobalNavigationBarLink`},{component:`region`,classKey:`GlobalNavigationBarRegion`}],i={component:e,status:t,"display-name":`Global Navigation Bar`,classKey:n,"last-accessibility-review":{"date-iso-8601":`2017/05/02`,"commit-sha":`ad6b6c6523ee21cada11be5f7ea4d99abc530726`},"SLDS-component-path":`/components/global-navigation`,dependencies:r,"site-stories":[{heading:`Default`,path:`/__examples__/default.jsx`}],"url-slug":`global-navigation-bar`};exports.classKey=n,exports.component=e,exports.default=i,exports.dependencies=r,exports.status=t;
|
|
2
|
-
//# sourceMappingURL=component.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.cjs","names":[],"sources":["../../../../components/global-navigation-bar/component.json"],"sourcesContent":["{\n\t\"component\": \"global-navigation-bar\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Global Navigation Bar\",\n\t\"classKey\": \"GlobalNavigationBar\",\n\t\"last-accessibility-review\": {\n\t\t\"date-iso-8601\": \"2017/05/02\",\n\t\t\"commit-sha\": \"ad6b6c6523ee21cada11be5f7ea4d99abc530726\"\n\t},\n\t\"SLDS-component-path\": \"/components/global-navigation\",\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"component\": \"button\",\n\t\t\t\"classKey\": \"GlobalNavigationBarButton\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"dropdown\",\n\t\t\t\"classKey\": \"GlobalNavigationBarDropdown\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"label\",\n\t\t\t\"classKey\": \"GlobalNavigationBarLabel\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"link\",\n\t\t\t\"classKey\": \"GlobalNavigationBarLink\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"region\",\n\t\t\t\"classKey\": \"GlobalNavigationBarRegion\"\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],\n\t\"url-slug\": \"global-navigation-bar\"\n}\n"],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../button/index.cjs"),r=require("../../utilities/design-tokens/dist/salesforce-skin.common.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=class extends o.default.Component{static displayName=t.MENU_DROPDOWN_TRIGGER;static defaultProps={assistiveText:{icon:`Open menu item submenu`}};constructor(e){super(e),i.default(t.MENU_DROPDOWN_TRIGGER,this.props,a.default)}render(){let{active:e,activeBackgroundColor:t,className:i,dividerPosition:a,id:o,isOpen:l,label:u,menu:d,onBlur:f,onClick:p,onFocus:m,onKeyDown:h,onMouseDown:g,onMouseEnter:_,onMouseLeave:v,triggerRef:y,...b}=this.props,x={},S=r.default.brandPrimaryTransparent10;return e&&(x.backgroundColor=t,x.borderBottomColor=t),l&&(x.backgroundColor=S),(0,c.jsxs)(`li`,{"aria-haspopup":`true`,className:(0,s.default)(`slds-context-bar__item slds-context-bar__dropdown-trigger slds-dropdown-trigger slds-dropdown-trigger_click`,{"slds-is-open":l,"slds-is-active":e,[`slds-context-bar__item_divider-${a}`]:a},i),id:o,onBlur:f,onClick:p,onFocus:m,onKeyDown:h,onMouseDown:g,onMouseEnter:_,onMouseLeave:v,ref:y,style:x,children:[(0,c.jsx)(`a`,{className:`slds-context-bar__label-action`,title:u,children:(0,c.jsx)(`span`,{className:`slds-truncate`,title:u,children:u})}),(0,c.jsx)(`div`,{className:`slds-context-bar__icon-action slds-p-left_none`,children:(0,c.jsx)(n.default,{assistiveText:this.props.assistiveText,...b,className:`slds-context-bar__button`,"aria-haspopup":`true`,iconCategory:`utility`,iconName:`chevrondown`,iconVariant:`bare`,variant:`icon`})}),d]})}};exports.default=l;
|
|
2
|
-
//# sourceMappingURL=dropdown-trigger.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-trigger.cjs","names":[],"sources":["../../../../components/global-navigation-bar/dropdown-trigger.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// # Global Navigation Dropdown Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type ReactNode, type CSSProperties } from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\nimport colors from '../../utilities/design-tokens/dist/salesforce-skin.common.js';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport Button from '../button';\n\n// ## Constants\nimport { MENU_DROPDOWN_TRIGGER } from '../../utilities/constants';\n\nexport interface GlobalNavigationDropdownTriggerAssistiveText {\n\ticon?: string;\n}\n\nexport interface GlobalNavigationDropdownTriggerProps {\n\t/**\n\t * Whether the item is active or not.\n\t */\n\tactive?: boolean;\n\t/**\n\t * Allows alignment of active item with active application background color.\n\t */\n\tactiveBackgroundColor?: string;\n\t/**\n\t * **Assistive text for accessibility.**\n\t * This object is merged with the default props object on every render.\n\t * * `icon`: Text that is visually hidden but read aloud by screenreaders to tell the user what the icon means. If the button has an icon and a visible label, you can omit the <code>assistiveText.icon</code> prop and use the <code>label</code> prop.\n\t */\n\tassistiveText?: GlobalNavigationDropdownTriggerAssistiveText;\n\t/**\n\t * CSS classes to be added to the 'li'.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * A unique ID is needed in order to support keyboard navigation, ARIA support, and connect the dropdown to the triggering button.\n\t */\n\tid?: string;\n\t/**\n\t * Allows the dropdown menu to style itself accordingly when open since CSS hover rules cannot take effect if the menu is not inline.\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Visible label on the dropdown menu trigger button.\n\t */\n\tlabel?: string;\n\t/**\n\t * The dropdown menu.\n\t */\n\tmenu?: ReactNode;\n\t/**\n\t * Is only called when `openOn` is set to `hover` and when the triggering li loses focus.\n\t */\n\tonBlur?: React.FocusEventHandler<HTMLLIElement>;\n\t/**\n\t * This prop is passed onto the triggering `li`. Triggered when the trigger li is clicked.\n\t */\n\tonClick?: React.MouseEventHandler<HTMLLIElement>;\n\t/**\n\t * Is only called when `openOn` is set to `hover` and when the triggering li gains focus.\n\t */\n\tonFocus?: React.FocusEventHandler<HTMLLIElement>;\n\t/**\n\t * Called when a key pressed.\n\t */\n\tonKeyDown?: React.KeyboardEventHandler<HTMLLIElement>;\n\t/**\n\t * Called when mouse clicks down on the trigger `li`.\n\t */\n\tonMouseDown?: React.MouseEventHandler<HTMLLIElement>;\n\t/**\n\t * Called when mouse hovers over the trigger `li`.\n\t */\n\tonMouseEnter?: React.MouseEventHandler<HTMLLIElement>;\n\t/**\n\t * Called when mouse leaves trigger `li` or the menu.\n\t */\n\tonMouseLeave?: React.MouseEventHandler<HTMLLIElement>;\n\t/**\n\t * The ref of the actual triggering button.\n\t */\n\ttriggerRef?: React.Ref<HTMLLIElement>;\n\t[key: string]: unknown;\n}\n\n/**\n * The Dropdown Button Trigger renders the default trigger button for the dropdown menu. If this component has children, it does not render itself to the DOM. Instead, it renders its child element, `Button`, and all that child's properties. This component may be used as a template to create custom triggers that do not use `Button`.\n */\nclass GlobalNavigationDropdownTrigger extends React.Component<GlobalNavigationDropdownTriggerProps> {\n\t// ### Display Name\n\t// Always use the canonical component name (set in the core) as the React\n\t// display name.\n\tstatic displayName = MENU_DROPDOWN_TRIGGER;\n\n\tstatic defaultProps: Partial<GlobalNavigationDropdownTriggerProps> = {\n\t\tassistiveText: { icon: 'Open menu item submenu' },\n\t};\n\n\tconstructor(props: GlobalNavigationDropdownTriggerProps) {\n\t\tsuper(props);\n\t\t(\n\t\t\tcheckProps as (\n\t\t\t\tname: string,\n\t\t\t\tprops: unknown,\n\t\t\t\tdoc: unknown\n\t\t\t) => void\n\t\t)(MENU_DROPDOWN_TRIGGER, this.props, componentDoc);\n\t}\n\n\t// ### Render\n\trender() {\n\t\tconst {\n\t\t\tactive,\n\t\t\tactiveBackgroundColor,\n\t\t\tclassName,\n\t\t\tdividerPosition,\n\t\t\tid,\n\t\t\tisOpen,\n\t\t\tlabel,\n\t\t\tmenu,\n\t\t\tonBlur,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonKeyDown,\n\t\t\tonMouseDown,\n\t\t\tonMouseEnter,\n\t\t\tonMouseLeave,\n\t\t\ttriggerRef,\n\t\t\t...rest\n\t\t} = this.props;\n\n\t\tconst listItemstyle: CSSProperties = {};\n\t\t// Uses design token to get correct color\n\t\tconst hoverBackgroundColor = (colors as Record<string, string>)\n\t\t\t.brandPrimaryTransparent10;\n\n\t\tif (active) {\n\t\t\tlistItemstyle.backgroundColor = activeBackgroundColor;\n\t\t\tlistItemstyle.borderBottomColor = activeBackgroundColor;\n\t\t}\n\n\t\t// Per SLDS pattern, set trigger style like hover style, so that hover visuals and menu being open and closed are in same state\n\t\tif (isOpen) {\n\t\t\tlistItemstyle.backgroundColor = hoverBackgroundColor;\n\t\t}\n\n\t\treturn (\n\t\t\t// eslint-disable-next-line jsx-a11y/role-supports-aria-props\n\t\t\t<li\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__item slds-context-bar__dropdown-trigger slds-dropdown-trigger slds-dropdown-trigger_click',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-is-open': isOpen,\n\t\t\t\t\t\t'slds-is-active': active,\n\t\t\t\t\t\t[`slds-context-bar__item_divider-${dividerPosition}`]:\n\t\t\t\t\t\t\tdividerPosition,\n\t\t\t\t\t},\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\tid={id}\n\t\t\t\tonBlur={onBlur}\n\t\t\t\tonClick={onClick}\n\t\t\t\tonFocus={onFocus}\n\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\tonMouseDown={onMouseDown}\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\tref={triggerRef}\n\t\t\t\tstyle={listItemstyle}\n\t\t\t>\n\t\t\t\t<a className=\"slds-context-bar__label-action\" title={label}>\n\t\t\t\t\t<span className=\"slds-truncate\" title={label}>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</span>\n\t\t\t\t</a>\n\t\t\t\t<div className=\"slds-context-bar__icon-action slds-p-left_none\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={this.props.assistiveText}\n\t\t\t\t\t\t{...rest}\n\t\t\t\t\t\tclassName=\"slds-context-bar__button\"\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonName=\"chevrondown\"\n\t\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t{menu}\n\t\t\t</li>\n\t\t);\n\t}\n}\n\nexport default GlobalNavigationDropdownTrigger;\n"],"mappings":"mYA0GA,IAAM,EAAN,cAA8C,EAAA,QAAM,SAAgD,CAInG,OAAO,YAAc,EAAA,sBAErB,OAAO,aAA8D,CACpE,cAAe,CAAE,KAAM,wBAAyB,CACjD,EAEA,YAAY,EAA6C,CACxD,MAAM,CAAK,EACX,EAAA,QAME,EAAA,sBAAuB,KAAK,MAAO,EAAA,OAAY,CAClD,CAGA,QAAS,CACR,GAAM,CACL,SACA,wBACA,YACA,kBACA,KACA,SACA,QACA,OACA,SACA,UACA,UACA,YACA,cACA,eACA,eACA,aACA,GAAG,GACA,KAAK,MAEH,EAA+B,CAAC,EAEhC,EAAwB,EAAA,QAC5B,0BAYF,OAVI,IACH,EAAc,gBAAkB,EAChC,EAAc,kBAAoB,GAI/B,IACH,EAAc,gBAAkB,IAKhC,EAAA,EAAA,KAAA,CAAC,KAAD,CACC,gBAAc,OACd,WAAA,EAAW,EAAA,QAAA,CACV,8GACA,CACC,eAAgB,EAChB,iBAAkB,GACjB,kCAAkC,KAClC,CACF,EACA,CACD,EACI,KACI,SACC,UACA,UACE,YACE,cACC,eACA,eACd,IAAK,EACL,MAAO,EArBR,SAAA,EAuBC,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,iCAAiC,MAAO,EACpD,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,gBAAgB,MAAO,EACrC,SAAA,CACI,CAAA,CACJ,CAAA,GACH,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,iDACd,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,KAAK,MAAM,cAC1B,GAAI,EACJ,UAAU,2BACV,gBAAc,OACd,aAAa,UACb,SAAS,cACT,YAAY,OACZ,QAAQ,MACR,CAAA,CACG,CAAA,EACJ,CACE,GAEN,CACD"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../utilities/constants.cjs"),t=require("../menu-dropdown/index.cjs"),n=require("./check-props.cjs"),r=require("./component.cjs"),i=require("./dropdown-trigger.cjs");let a=require("react/jsx-runtime");var o=({align:o=`right`,length:s=null,active:c,activeBackgroundColor:l,assistiveText:u,dividerPosition:d,...f})=>(n.default(e.GLOBAL_NAVIGATION_BAR_DROPDOWN,{align:o,length:s,active:c,activeBackgroundColor:l,assistiveText:u,dividerPosition:d,...f},r.default),(0,a.jsx)(t.default,{align:`right`,hasStaticAlignment:!0,hoverCloseDelay:400,length:s??void 0,menuPosition:`relative`,...f,children:(0,a.jsx)(i.default,{active:c,assistiveText:u,activeBackgroundColor:l,dividerPosition:d})}));o.displayName=e.GLOBAL_NAVIGATION_BAR_DROPDOWN,exports.default=o;
|
|
2
|
-
//# sourceMappingURL=dropdown.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.cjs","names":[],"sources":["../../../../components/global-navigation-bar/dropdown.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// # Global Navigation Dropdown Component\n\n// ## Dependencies\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n// ### Dropdown\nimport MenuDropdown, { type MenuDropdownOption } from '../menu-dropdown';\nimport GlobalNavigationTrigger from './dropdown-trigger';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_DROPDOWN } from '../../utilities/constants';\n\nexport interface GlobalNavigationBarDropdownAssistiveText {\n\ticon?: string;\n}\n\nexport interface GlobalNavigationBarDropdownProps {\n\t/**\n\t * Whether the item is active or not.\n\t */\n\tactive?: boolean;\n\t/**\n\t * Allows alignment of active item with active application background color.\n\t */\n\tactiveBackgroundColor?: string;\n\t/**\n\t * **Assistive text for accessibility.**\n\t * This object is merged with the default props object on every render.\n\t * * `icon`: Text that is visually hidden but read aloud by screenreaders to tell the user what the icon means. If the button has an icon and a visible label, you can omit the <code>assistiveText.icon</code> prop and use the <code>label</code> prop.\n\t */\n\tassistiveText?: GlobalNavigationBarDropdownAssistiveText;\n\t/**\n\t * Aligns the right or left side of the menu with the respective side of the trigger. This is not intended for use with `nubbinPosition`.\n\t */\n\talign?: 'left' | 'right';\n\t/**\n\t * Extra classnames to apply to the dropdown menu.\n\t */\n\tclassName?: string;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * CSS classes to be added to `li` element.\n\t */\n\tbuttonClassName?: string[] | Record<string, boolean> | string;\n\t/**\n\t * A unique ID is needed in order to support keyboard navigation, ARIA support, and connect the dropdown to the triggering button.\n\t */\n\tid?: string;\n\t/**\n\t * Provided to List to indicate number of items visible in the List. Pass `null` to display all items, or a string containing one of the numeric option values listed under [Dropdown Height](https://www.lightningdesignsystem.com/components/menus/#flavor-dropdown-height) at the right (eg. '5').\n\t */\n\tlength?: null | '5' | '7' | '10';\n\t/**\n\t * Offset adds pixels to the absolutely positioned dropdown menu in the format: ([vertical]px [horizontal]px).\n\t */\n\toffset?: string;\n\t/**\n\t * Triggered when an item in the menu is clicked.\n\t */\n\tonSelect?: (...args: unknown[]) => void;\n\t/**\n\t * An array of menu item.\n\t */\n\toptions: MenuDropdownOption[];\n\t[key: string]: unknown;\n}\n\n/**\n * This component is an implementation of `MenuDropdown` with a custom trigger. All the properties listed below are provided to the `MenuDropdown` component. Any additional properties are provided to the Custom Trigger (that is the `Button` or `li` tag).\n */\nconst GlobalNavigationBarDropdown = ({\n\talign = 'right',\n\tlength = null,\n\tactive,\n\tactiveBackgroundColor,\n\tassistiveText,\n\tdividerPosition,\n\t...rest\n}: GlobalNavigationBarDropdownProps) => {\n\t(checkProps as (name: string, props: unknown, doc: unknown) => void)(\n\t\tGLOBAL_NAVIGATION_BAR_DROPDOWN,\n\t\t{\n\t\t\talign,\n\t\t\tlength,\n\t\t\tactive,\n\t\t\tactiveBackgroundColor,\n\t\t\tassistiveText,\n\t\t\tdividerPosition,\n\t\t\t...rest,\n\t\t},\n\t\tcomponentDoc\n\t);\n\n\treturn (\n\t\t<MenuDropdown\n\t\t\talign=\"right\"\n\t\t\thasStaticAlignment\n\t\t\t// only need if using hybrid or hover\n\t\t\thoverCloseDelay={400}\n\t\t\tlength={length ?? undefined}\n\t\t\tmenuPosition=\"relative\"\n\t\t\t{...rest}\n\t\t>\n\t\t\t<GlobalNavigationTrigger\n\t\t\t\tactive={active}\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveBackgroundColor={activeBackgroundColor}\n\t\t\t\tdividerPosition={dividerPosition}\n\t\t\t/>\n\t\t</MenuDropdown>\n\t);\n};\n\n// ### Display Name\n// Always use the canonical component name (set in the core) as the React\n// display name.\nGlobalNavigationBarDropdown.displayName = GLOBAL_NAVIGATION_BAR_DROPDOWN;\n\nexport default GlobalNavigationBarDropdown;\n"],"mappings":"4NA8EA,IAAM,GAA+B,CACpC,QAAQ,QACR,SAAS,KACT,SACA,wBACA,gBACA,kBACA,GAAG,MAEH,EAAA,QACC,EAAA,+BACA,CACC,QACA,SACA,SACA,wBACA,gBACA,kBACA,GAAG,CACJ,EACA,EAAA,OACD,GAGC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,MAAM,QACN,mBAAA,GAEA,gBAAiB,IACjB,OAAQ,GAAU,IAAA,GAClB,aAAa,WACb,GAAI,EAEJ,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACS,SACO,gBACQ,wBACN,iBACjB,CAAA,CACY,CAAA,GAOhB,EAA4B,YAAc,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
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");var a=e=>{let t,r=[],i;n.default.Children.forEach(e,e=>{if(e&&n.default.isValidElement(e)&&e.type.displayName===`SLDSGlobalNavigationBarRegion`){let n=e.props;n.region===`primary`?t=e:n.region===`secondary`?r.push(e):n.region===`tertiary`&&(i=e)}});let a=[];return t&&a.push(t),a.push(...r),i&&a.push(i),a},o=({children:e,className:t,cloud:n,theme:o})=>(0,i.jsx)(`div`,{className:(0,r.default)(`slds-context-bar`,{[`slds-context-bar_theme-${n}`]:n,[`slds-context-bar_theme-${o}`]:o},t),children:a(e)});o.displayName=t.GLOBAL_NAVIGATION_BAR,exports.default=o;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/global-navigation-bar/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, { type ReactNode, type ReactElement } from 'react';\nimport classNames from 'classnames';\nimport {\n\tGLOBAL_NAVIGATION_BAR,\n\tGLOBAL_NAVIGATION_BAR_REGION,\n} from '../../utilities/constants';\n\n/**\n * Theme options for GlobalNavigationBar\n */\nexport type GlobalNavigationBarTheme = 'light' | 'dark';\n\n/**\n * Region type for child components\n */\nexport type GlobalNavigationBarRegionType = 'primary' | 'secondary' | 'tertiary';\n\n/**\n * Props for region child components\n */\nexport interface GlobalNavigationBarRegionProps {\n\tregion?: GlobalNavigationBarRegionType;\n}\n\n/**\n * Props for the GlobalNavigationBar component\n */\nexport interface GlobalNavigationBarProps {\n\t/** Navigation bar items */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Cloud name for theming (e.g., \"sales\", \"marketing\") */\n\tcloud?: string;\n\t/** Theme for text and interactions */\n\ttheme?: GlobalNavigationBarTheme;\n}\n\n/**\n * Audit and organize children by region\n */\nconst auditChildren = (children: ReactNode): ReactElement[] => {\n\tlet primaryRegion: ReactElement | undefined;\n\tconst secondaryRegions: ReactElement[] = [];\n\tlet tertiaryRegion: ReactElement | undefined;\n\n\tReact.Children.forEach(children, (child) => {\n\t\tif (child && React.isValidElement(child)) {\n\t\t\tconst displayName = (child.type as { displayName?: string }).displayName;\n\t\t\tif (displayName === GLOBAL_NAVIGATION_BAR_REGION) {\n\t\t\t\tconst childProps = child.props as GlobalNavigationBarRegionProps;\n\t\t\t\tif (childProps.region === 'primary') {\n\t\t\t\t\tprimaryRegion = child;\n\t\t\t\t} else if (childProps.region === 'secondary') {\n\t\t\t\t\tsecondaryRegions.push(child);\n\t\t\t\t} else if (childProps.region === 'tertiary') {\n\t\t\t\t\ttertiaryRegion = child;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tconst result: ReactElement[] = [];\n\tif (primaryRegion) result.push(primaryRegion);\n\tresult.push(...secondaryRegions);\n\tif (tertiaryRegion) result.push(tertiaryRegion);\n\n\treturn result;\n};\n\n/**\n * Global Navigation Bar represents a list of links that either take the user\n * to another page or parts of the page the user is in.\n */\nconst GlobalNavigationBar = ({\n\tchildren,\n\tclassName,\n\tcloud,\n\ttheme,\n}: GlobalNavigationBarProps): React.ReactElement => (\n\t<div\n\t\tclassName={classNames(\n\t\t\t'slds-context-bar',\n\t\t\t{\n\t\t\t\t[`slds-context-bar_theme-${cloud}`]: cloud,\n\t\t\t\t[`slds-context-bar_theme-${theme}`]: theme,\n\t\t\t},\n\t\t\tclassName as string\n\t\t)}\n\t>\n\t\t{auditChildren(children)}\n\t</div>\n);\n\nGlobalNavigationBar.displayName = GLOBAL_NAVIGATION_BAR;\n\nexport default GlobalNavigationBar;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"2NA4CA,IAAM,EAAiB,GAAwC,CAC9D,IAAI,EACE,EAAmC,CAAC,EACtC,EAEJ,EAAA,QAAM,SAAS,QAAQ,EAAW,GAAU,CAC3C,GAAI,GAAS,EAAA,QAAM,eAAe,CAAK,GACjB,EAAM,KAAkC,cAAA,gCACX,CACjD,IAAM,EAAa,EAAM,MACrB,EAAW,SAAW,UACzB,EAAgB,EACN,EAAW,SAAW,YAChC,EAAiB,KAAK,CAAK,EACjB,EAAW,SAAW,aAChC,EAAiB,EAEnB,CAEF,CAAC,EAED,IAAM,EAAyB,CAAC,EAKhC,OAJI,GAAe,EAAO,KAAK,CAAa,EAC5C,EAAO,KAAK,GAAG,CAAgB,EAC3B,GAAgB,EAAO,KAAK,CAAc,EAEvC,CACR,EAMM,GAAuB,CAC5B,WACA,YACA,QACA,YAEA,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,mBACA,EACE,0BAA0B,KAAU,GACpC,0BAA0B,KAAU,CACtC,EACA,CACD,EAEC,SAAA,EAAc,CAAQ,CACnB,CAAA,EAGN,EAAoB,YAAc,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../../utilities/design-tokens/dist/salesforce-skin.common.cjs");let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=e=>{let{className:t,dividerPosition:a,id:o,label:s}=e;return(0,i.jsx)(`li`,{className:`slds-context-bar__item slds-no-hover`,children:(0,i.jsx)(`span`,{id:o,style:{color:n.default.colorTextLinkDisabled},className:(0,r.default)(`slds-context-bar__label-action`,{[`slds-context-bar__item_divider-${a}`]:a},t),children:(0,i.jsx)(`span`,{className:`slds-truncate`,children:s})})})};a.displayName=t.GLOBAL_NAVIGATION_BAR_LABEL,exports.default=a;
|
|
2
|
-
//# sourceMappingURL=label.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.cjs","names":[],"sources":["../../../../components/global-navigation-bar/label.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// # GlobalNavigationBar Label Component\n\n// ## Dependencies\n\n// ### classNames\nimport classNames from 'classnames';\n\nimport colors from '../../utilities/design-tokens/dist/salesforce-skin.common.js';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_LABEL } from '../../utilities/constants';\n\nexport interface GlobalNavigationBarLabelProps {\n\t/**\n\t * Class names to be added to the `span` element\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * Id string applied to first <span> inside of <li>\n\t */\n\tid?: string;\n\t/**\n\t * Text to show\n\t */\n\tlabel?: string;\n}\n\n/**\n * Wraps text in the proper markup and removes link styling to support use in the GlobalNavigationBar.\n */\nconst GlobalNavigationBarLabel = (props: GlobalNavigationBarLabelProps) => {\n\t// Separate props we care about in order to pass others along passively to the `span` tag\n\tconst { className, dividerPosition, id, label } = props;\n\n\treturn (\n\t\t<li className=\"slds-context-bar__item slds-no-hover\">\n\t\t\t<span\n\t\t\t\tid={id}\n\t\t\t\t// inline style override\n\t\t\t\tstyle={{ color: colors.colorTextLinkDisabled }}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__label-action',\n\t\t\t\t\t{\n\t\t\t\t\t\t[`slds-context-bar__item_divider-${dividerPosition}`]:\n\t\t\t\t\t\t\tdividerPosition,\n\t\t\t\t\t},\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<span className=\"slds-truncate\">{label}</span>\n\t\t\t</span>\n\t\t</li>\n\t);\n};\n\nGlobalNavigationBarLabel.displayName = GLOBAL_NAVIGATION_BAR_LABEL;\n\nexport default GlobalNavigationBarLabel;\n"],"mappings":"8PAqCA,IAAM,EAA4B,GAAyC,CAE1E,GAAM,CAAE,YAAW,kBAAiB,KAAI,SAAU,EAElD,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,uCACb,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CACK,KAEJ,MAAO,CAAE,MAAO,EAAA,QAAO,qBAAsB,EAC7C,WAAA,EAAW,EAAA,QAAA,CACV,iCACA,EACE,kCAAkC,KAClC,CACF,EACA,CACD,EAEA,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,gBAAiB,SAAA,CAAY,CAAA,CACxC,CAAA,CACH,CAAA,CAEN,EAEA,EAAyB,YAAc,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
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=>{let{active:t,activeBackgroundColor:n,assistiveText:o={activeDescriptor:`Current page:`},className:s,dividerPosition:c,href:l=`#`,id:u,label:d,onBlur:f,onClick:p,onFocus:m,onKeyDown:h,onKeyPress:g,onKeyUp:_,onMouseEnter:v,onMouseLeave:y,tabIndex:b}=e,x=t?{backgroundColor:n,borderBottomColor:n}:void 0;function S(e){((0,a.default)(p)||l===`#`)&&e.preventDefault(),(0,a.default)(p)&&p(e,{href:l})}return(0,i.jsx)(`li`,{className:(0,r.default)(`slds-context-bar__item`,{"slds-is-active":t,[`slds-context-bar__item_divider-${c}`]:c}),id:u,style:x,children:(0,i.jsxs)(`a`,{href:l,className:(0,r.default)(`slds-context-bar__label-action`,s),onBlur:f,onClick:S,onFocus:m,onKeyDown:h,onKeyPress:g,onKeyUp:_,onMouseEnter:v,onMouseLeave:y,tabIndex:b,title:d,children:[t?(0,i.jsx)(`span`,{className:`slds-assistive-text`,children:o.activeDescriptor}):null,(0,i.jsx)(`span`,{className:`slds-truncate`,title:d,children:d})]})})};o.displayName=t.GLOBAL_NAVIGATION_BAR_LINK,exports.default=o;
|
|
2
|
-
//# sourceMappingURL=link.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.cjs","names":[],"sources":["../../../../components/global-navigation-bar/link.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # GlobalNavigationBar Link Component\n\n// ## Dependencies\n\n// ### React\nimport React from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### isFunction\nimport isFunction from 'lodash.isfunction';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_LINK } from '../../utilities/constants';\n\nexport interface GlobalNavigationBarLinkAssistiveText {\n\tactiveDescriptor?: string;\n}\n\nexport interface GlobalNavigationBarLinkProps {\n\t/**\n\t * Whether the item is active or not.\n\t */\n\tactive?: boolean;\n\t/**\n\t * Allows alignment of active item with active application background color. If application background is dark, text color may need to be `#fff`. This can be done with the style prop.\n\t */\n\tactiveBackgroundColor?: string;\n\t/**\n\t * **Assistive text for accessibility.**\n\t * * `activeDescriptor`: The text that appears alongside a link that is currently active.\n\t */\n\tassistiveText?: GlobalNavigationBarLinkAssistiveText;\n\t/**\n\t * Class names to be added to the anchor element\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * The `href` attribute of the link. Please pass in bookmarkable URLs from your routing library. Use `GlobalNavigationBarButton` if a \"real URL\" is not desired. If the `onClick` callback is specified this URL will still be prevented from changing the browser's location.\n\t */\n\thref?: string;\n\t/**\n\t * The `id` attribute is applied to the `li` tag. _This was recently changed from being on the anchor tag._\n\t */\n\tid?: string;\n\t/**\n\t * Text to show for link item.\n\t */\n\tlabel?: string;\n\t/**\n\t * Triggered when focus is removed.\n\t */\n\tonBlur?: React.FocusEventHandler<HTMLAnchorElement>;\n\t/**\n\t * `function (event, href)` - fires when the link is clicked. If set, the browser location change to the `href` specified will be ignored, but the `href` will be included in an additional parameter passed to the callback.\n\t */\n\tonClick?: (\n\t\tevent: React.MouseEvent<HTMLAnchorElement>,\n\t\tdata: { href?: string }\n\t) => void;\n\t/**\n\t * Triggered when component is focused.\n\t */\n\tonFocus?: React.FocusEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a key is pressed down\n\t */\n\tonKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a key is pressed and released\n\t */\n\tonKeyPress?: React.KeyboardEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a key is released\n\t */\n\tonKeyUp?: React.KeyboardEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a mouse arrow hovers\n\t */\n\tonMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a mouse arrow no longer hovers\n\t */\n\tonMouseLeave?: React.MouseEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Write \"-1\" if you don't want the user to tab to the button.\n\t */\n\ttabIndex?: string;\n}\n\n/**\n * Wraps a link in the proper markup to support use in the GlobalNavigationBar.\n */\nconst GlobalNavigationBarLink = (props: GlobalNavigationBarLinkProps) => {\n\t// Separate props we care about in order to pass others along passively to the `a` tag\n\tconst {\n\t\tactive,\n\t\tactiveBackgroundColor,\n\t\tassistiveText = {\n\t\t\tactiveDescriptor: 'Current page:',\n\t\t},\n\t\tclassName,\n\t\tdividerPosition,\n\t\thref = '#',\n\t\tid,\n\t\tlabel,\n\t\tonBlur,\n\t\tonClick,\n\t\tonFocus,\n\t\tonKeyDown,\n\t\tonKeyPress,\n\t\tonKeyUp,\n\t\tonMouseEnter,\n\t\tonMouseLeave,\n\t\ttabIndex,\n\t} = props;\n\n\tconst listItemstyle = active\n\t\t? {\n\t\t\t\tbackgroundColor: activeBackgroundColor,\n\t\t\t\tborderBottomColor: activeBackgroundColor,\n\t\t }\n\t\t: undefined;\n\n\tfunction handleOnClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (isFunction(onClick) || href === '#') {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\tif (isFunction(onClick)) {\n\t\t\tonClick(event, { href });\n\t\t}\n\t}\n\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames('slds-context-bar__item', {\n\t\t\t\t'slds-is-active': active,\n\t\t\t\t[`slds-context-bar__item_divider-${dividerPosition}`]: dividerPosition,\n\t\t\t})}\n\t\t\tid={id}\n\t\t\tstyle={listItemstyle}\n\t\t>\n\t\t\t<a\n\t\t\t\thref={href}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__label-action',\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\tonBlur={onBlur}\n\t\t\t\tonClick={handleOnClick}\n\t\t\t\tonFocus={onFocus}\n\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\ttabIndex={tabIndex as unknown as number}\n\t\t\t\ttitle={label}\n\t\t\t>\n\t\t\t\t{active ? (\n\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t{assistiveText.activeDescriptor}\n\t\t\t\t\t</span>\n\t\t\t\t) : null}\n\t\t\t\t<span className=\"slds-truncate\" title={label}>\n\t\t\t\t\t{label}\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t);\n};\n\nGlobalNavigationBarLink.displayName = GLOBAL_NAVIGATION_BAR_LINK;\n\nexport default GlobalNavigationBarLink;\n"],"mappings":"2QAqGA,IAAM,EAA2B,GAAwC,CAExE,GAAM,CACL,SACA,wBACA,gBAAgB,CACf,iBAAkB,eACnB,EACA,YACA,kBACA,OAAO,IACP,KACA,QACA,SACA,UACA,UACA,YACA,aACA,UACA,eACA,eACA,YACG,EAEE,EAAgB,EACnB,CACA,gBAAiB,EACjB,kBAAmB,CACnB,EACA,IAAA,GAEH,SAAS,EAAc,EAA4C,GAClE,EAAI,EAAA,QAAA,CAAW,CAAO,GAAK,IAAS,MACnC,EAAM,eAAe,GAGtB,EAAI,EAAA,QAAA,CAAW,CAAO,GACrB,EAAQ,EAAO,CAAE,MAAK,CAAC,CAEzB,CAEA,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CAAW,yBAA0B,CAC/C,iBAAkB,GACjB,kCAAkC,KAAoB,CACxD,CAAC,EACG,KACJ,MAAO,EAEP,UAAA,EAAA,EAAA,KAAA,CAAC,IAAD,CACO,OACN,WAAA,EAAW,EAAA,QAAA,CACV,iCACA,CACD,EACQ,SACR,QAAS,EACA,UACE,YACC,aACH,UACK,eACA,eACJ,WACV,MAAO,EAfR,SAAA,CAiBE,GACA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sBACd,SAAA,EAAc,gBACV,CAAA,EACH,MACJ,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,gBAAgB,MAAO,EACrC,SAAA,CACI,CAAA,CACJ,GACA,CAAA,CAEN,EAEA,EAAwB,YAAc,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
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");var a=(e,t,n)=>(0,i.jsx)(`div`,{className:(0,r.default)(`slds-context-bar__primary`,e,t),children:n}),o=(e,t,n,a)=>{let o;return o=a?(0,i.jsx)(`nav`,{className:(0,r.default)(`slds-context-bar__secondary`,e,t),role:`navigation`,children:(0,i.jsx)(`ul`,{className:`slds-grid`,children:n})}):(0,i.jsx)(`div`,{className:(0,r.default)(`slds-context-bar__secondary`,e,t),children:(0,i.jsx)(`ul`,{className:`slds-grid`,children:n})}),o},s=(e,t,n)=>(0,i.jsx)(`div`,{className:(0,r.default)(`slds-context-bar__tertiary`,`slds-col_bump-left`,e,t),children:(0,i.jsx)(`ul`,{className:`slds-grid`,children:n})}),c=class extends n.default.Component{static displayName=t.GLOBAL_NAVIGATION_BAR_REGION;render(){let e,t=this.props.dividerPosition?`slds-context-bar__item_divider-${this.props.dividerPosition}`:null;switch(this.props.region){case`primary`:e=a(t,this.props.className,this.props.children);break;case`secondary`:e=o(t,this.props.className,this.props.children,this.props.navigation);break;case`tertiary`:e=s(t,this.props.className,this.props.children)}return e}};exports.default=c;
|
|
2
|
-
//# sourceMappingURL=region.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"region.cjs","names":[],"sources":["../../../../components/global-navigation-bar/region.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-redundant-roles */\n\n// # Global Navigation Bar Region Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type ReactNode } from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_REGION } from '../../utilities/constants';\n\ntype RegionClassName = unknown[] | Record<string, unknown> | string;\n\nexport interface RegionProps {\n\t/**\n\t * Contents of region. Expects `GlobalNavigationBarLink`, `GlobalNavigationBarDropdown`, `GlobalNavigationBarApplicationName`, `AppSwitcher`, but could be any component. This is the place to pass in an Object Switcher until that is supported.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * CSS classes to be added to the region\n\t */\n\tclassName?: RegionClassName;\n\t/**\n\t * Wraps the `secondary` region in a `nav` and adds a role attribute\n\t */\n\tnavigation?: boolean;\n\t/**\n\t * Region wrap children in styling specific to that region. When `tertiary`\n\t * region is used, secondary region only supports four list items.\n\t */\n\tregion: 'primary' | 'secondary' | 'tertiary';\n}\n\n// List regions for export\nconst regions = ['primary', 'secondary', 'tertiary'];\n\n/* eslint-disable react/display-name */\nconst renderPrimary = (\n\tdividerClass: string | null,\n\tclassName: RegionClassName | undefined,\n\tchildren: ReactNode\n) => (\n\t<div\n\t\tclassName={classNames(\n\t\t\t'slds-context-bar__primary',\n\t\t\tdividerClass,\n\t\t\tclassName as string\n\t\t)}\n\t>\n\t\t{children}\n\t</div>\n);\n\nconst renderSecondary = (\n\tdividerClass: string | null,\n\tclassName: RegionClassName | undefined,\n\tchildren: ReactNode,\n\tnavigation?: boolean\n) => {\n\tlet region;\n\n\tif (navigation) {\n\t\tregion = (\n\t\t\t<nav\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__secondary',\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\trole=\"navigation\"\n\t\t\t>\n\t\t\t\t<ul className=\"slds-grid\">{children}</ul>\n\t\t\t</nav>\n\t\t);\n\t} else {\n\t\tregion = (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__secondary',\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<ul className=\"slds-grid\">{children}</ul>\n\t\t\t</div>\n\t\t);\n\t}\n\treturn region;\n};\n\nconst renderTertiary = (\n\tdividerClass: string | null,\n\tclassName: RegionClassName | undefined,\n\tchildren: ReactNode\n) => (\n\t<div\n\t\tclassName={classNames(\n\t\t\t'slds-context-bar__tertiary',\n\t\t\t'slds-col_bump-left',\n\t\t\tdividerClass,\n\t\t\tclassName as string\n\t\t)}\n\t>\n\t\t<ul className=\"slds-grid\">{children}</ul>\n\t</div>\n);\n\n/* eslint-enable react/display-name */\n\n/**\n * Regions make up a GlobalNavigation Bar and typically contain links and dropdowns. The Primary region contains the AppSwitcher, Application Name, and Object Switcher. The secondary region typically has navigation betweens sections of the application. The tertiary region is aligned to the right side of the screen and contains shortcuts or actions.\n */\nclass Region extends React.Component<RegionProps> {\n\tstatic displayName = GLOBAL_NAVIGATION_BAR_REGION;\n\n\trender() {\n\t\tlet region;\n\t\tconst dividerClass = this.props.dividerPosition\n\t\t\t? `slds-context-bar__item_divider-${this.props.dividerPosition}`\n\t\t\t: null;\n\n\t\tswitch (this.props.region) {\n\t\t\tcase 'primary':\n\t\t\t\tregion = renderPrimary(\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tthis.props.children\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'secondary':\n\t\t\t\tregion = renderSecondary(\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tthis.props.children,\n\t\t\t\t\tthis.props.navigation\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'tertiary':\n\t\t\t\tregion = renderTertiary(\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tthis.props.children\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t// do nothing\n\t\t}\n\n\t\treturn region;\n\t}\n}\n\nexport default Region;\nexport { regions };\n"],"mappings":"2NAgDA,IAAM,GACL,EACA,EACA,KAEA,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,4BACA,EACA,CACD,EAEC,UACG,CAAA,EAGA,GACL,EACA,EACA,EACA,IACI,CACJ,IAAI,EA4BJ,MA1BA,CAcC,EAdG,GAEF,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,8BACA,EACA,CACD,EACA,KAAK,aAEL,UAAA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,YAAa,UAAa,CAAA,CACpC,CAAA,GAIL,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,8BACA,EACA,CACD,EAEA,UAAA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,YAAa,UAAa,CAAA,CACpC,CAAA,EAGA,CACR,EAEM,GACL,EACA,EACA,KAEA,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,6BACA,qBACA,EACA,CACD,EAEA,UAAA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,YAAa,UAAa,CAAA,CACpC,CAAA,EAQA,EAAN,cAAqB,EAAA,QAAM,SAAuB,CACjD,OAAO,YAAc,EAAA,6BAErB,QAAS,CACR,IAAI,EACE,EAAe,KAAK,MAAM,gBAC7B,kCAAkC,KAAK,MAAM,kBAC7C,KAEH,OAAQ,KAAK,MAAM,OAAnB,CACC,IAAK,UACJ,EAAS,EACR,EACA,KAAK,MAAM,UACX,KAAK,MAAM,QACZ,EACA,MACD,IAAK,YACJ,EAAS,EACR,EACA,KAAK,MAAM,UACX,KAAK,MAAM,SACX,KAAK,MAAM,UACZ,EACA,MACD,IAAK,WACJ,EAAS,EACR,EACA,KAAK,MAAM,UACX,KAAK,MAAM,QACZ,CAIF,CAEA,OAAO,CACR,CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./global-navigation-bar/index.cjs');
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../icon/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o={title:`Interactive Map`},s=({className:e,classNameContainer:t,defaultLocation:s,googleAPIKey:c,id:l,labels:u,locations:d,onClickLocation:f,selection:p})=>{let m=(0,r.useId)(),h=l||m,g={...o,...u},_=(0,r.useRef)(null),v=(0,r.useCallback)((e,t)=>{typeof f==`function`&&f(e,d[t]),_.current&&_.current.focus()},[f,d]),y=p?.address||s.address;return(0,a.jsxs)(`div`,{id:h,className:(0,i.default)(`slds-grid`,{"slds-has-coordinates":d},t),children:[(0,a.jsx)(`div`,{className:`slds-map_container`,style:{padding:`4px`},children:(0,a.jsx)(`div`,{className:(0,i.default)(`slds-map`,e),ref:_,tabIndex:0,title:g.title,children:(0,a.jsx)(`iframe`,{id:`${h}-google-map`,src:`https://www.google.com/maps/embed/v1/place?key=${c}&q=${encodeURIComponent(y)}`,title:g.title})})}),d.length>1?(0,a.jsxs)(`div`,{className:`slds-coordinates`,children:[(0,a.jsx)(`div`,{className:`slds-coordinates__header`,children:(0,a.jsx)(`h2`,{className:`slds-coordinates__title`,children:`${g.title} (${d.length})`})}),(0,a.jsx)(`ul`,{className:`slds-coordinates__list`,children:d.map((e,t)=>(0,a.jsxs)(`li`,{className:`slds-coordinates__item`,children:[(0,a.jsx)(`span`,{className:`slds-assistive-text`,"aria-live":`polite`,children:`${e.name} is currently selected`}),(0,a.jsxs)(`button`,{type:`button`,onClick:e=>v(e,t),className:`slds-coordinates__item-action slds-button_reset slds-media`,"aria-pressed":p?.id===e.id,children:[(0,a.jsx)(`span`,{className:`slds-media__figure`,children:(0,a.jsx)(n.default,{category:`standard`,name:`account`})}),(0,a.jsxs)(`span`,{className:`slds-media__body`,children:[(0,a.jsx)(`span`,{className:`slds-text-link`,children:e.name}),(0,a.jsx)(`span`,{children:e.address})]})]})]},e.id))})]}):null]})};s.displayName=t.LOCATION_MAP,exports.default=s;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/location-map/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, useRef, useCallback, type MouseEvent } from 'react';\nimport classNames from 'classnames';\nimport Icon from '../icon';\nimport { LOCATION_MAP } from '../../utilities/constants';\n\n/**\n * Location object for the map\n */\nexport interface LocationMapLocation {\n\t/** Unique identifier */\n\tid: string;\n\t/** Name of the location */\n\tname: string;\n\t/** Address of the location */\n\taddress: string;\n}\n\n/**\n * Labels for LocationMap\n */\nexport interface LocationMapLabels {\n\t/** Title for the map */\n\ttitle?: string;\n}\n\n/**\n * Props for the LocationMap component\n */\nexport interface LocationMapProps {\n\t/** CSS classes for the map */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** Default location to show */\n\tdefaultLocation: LocationMapLocation;\n\t/** Google Maps API key */\n\tgoogleAPIKey: string;\n\t/** HTML id */\n\tid?: string;\n\t/** Text labels */\n\tlabels?: LocationMapLabels;\n\t/** Array of locations */\n\tlocations: LocationMapLocation[];\n\t/** Callback when a location is clicked */\n\tonClickLocation?: (event: MouseEvent<HTMLButtonElement>, location: LocationMapLocation) => void;\n\t/** Currently selected location */\n\tselection?: LocationMapLocation;\n}\n\nconst defaultLabels: LocationMapLabels = {\n\ttitle: 'Interactive Map',\n};\n\n/**\n * A location map component is used to find and show locations.\n */\nconst LocationMap = ({\n\tclassName,\n\tclassNameContainer,\n\tdefaultLocation,\n\tgoogleAPIKey,\n\tid: propId,\n\tlabels: propLabels,\n\tlocations,\n\tonClickLocation,\n\tselection,\n}: LocationMapProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst labels = { ...defaultLabels, ...propLabels };\n\tconst mapRef = useRef<HTMLDivElement>(null);\n\n\tconst handleClick = useCallback(\n\t\t(event: MouseEvent<HTMLButtonElement>, index: number) => {\n\t\t\tif (typeof onClickLocation === 'function') {\n\t\t\t\tonClickLocation(event, locations[index]);\n\t\t\t}\n\t\t\tif (mapRef.current) {\n\t\t\t\tmapRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[onClickLocation, locations]\n\t);\n\n\tconst currentAddress = selection?.address || defaultLocation.address;\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-grid',\n\t\t\t\t{ 'slds-has-coordinates': locations },\n\t\t\t\tclassNameContainer as string\n\t\t\t)}\n\t\t>\n\t\t\t<div className=\"slds-map_container\" style={{ padding: '4px' }}>\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-map', className as string)}\n\t\t\t\t\tref={mapRef}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\ttitle={labels.title}\n\t\t\t\t>\n\t\t\t\t\t<iframe\n\t\t\t\t\t\tid={`${id}-google-map`}\n\t\t\t\t\t\tsrc={`https://www.google.com/maps/embed/v1/place?key=${googleAPIKey}&q=${encodeURIComponent(currentAddress)}`}\n\t\t\t\t\t\ttitle={labels.title}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{locations.length > 1 ? (\n\t\t\t\t<div className=\"slds-coordinates\">\n\t\t\t\t\t<div className=\"slds-coordinates__header\">\n\t\t\t\t\t\t<h2 className=\"slds-coordinates__title\">\n\t\t\t\t\t\t\t{`${labels.title} (${locations.length})`}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ul className=\"slds-coordinates__list\">\n\t\t\t\t\t\t{locations.map((location, i) => (\n\t\t\t\t\t\t\t<li key={location.id} className=\"slds-coordinates__item\">\n\t\t\t\t\t\t\t\t<span className=\"slds-assistive-text\" aria-live=\"polite\">\n\t\t\t\t\t\t\t\t\t{`${location.name} is currently selected`}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tonClick={(event) => handleClick(event, i)}\n\t\t\t\t\t\t\t\t\tclassName=\"slds-coordinates__item-action slds-button_reset slds-media\"\n\t\t\t\t\t\t\t\t\taria-pressed={selection?.id === location.id}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t\t\t\t\t<Icon category=\"standard\" name=\"account\" />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"slds-text-link\">{location.name}</span>\n\t\t\t\t\t\t\t\t\t\t<span>{location.address}</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n\nLocationMap.displayName = LOCATION_MAP;\n\nexport default LocationMap;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"0PAoDA,IAAM,EAAmC,CACxC,MAAO,iBACR,EAKM,GAAe,CACpB,YACA,qBACA,kBACA,eACA,GAAI,EACJ,OAAQ,EACR,YACA,kBACA,eAC2C,CAC3C,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAK,GAAU,EACf,EAAS,CAAE,GAAG,EAAe,GAAG,CAAW,EAC3C,GAAA,EAAS,EAAA,OAAA,CAAuB,IAAI,EAEpC,GAAA,EAAc,EAAA,YAAA,EAClB,EAAsC,IAAkB,CACpD,OAAO,GAAoB,YAC9B,EAAgB,EAAO,EAAU,EAAM,EAEpC,EAAO,SACV,EAAO,QAAQ,MAAM,CAEvB,EACA,CAAC,EAAiB,CAAS,CAC5B,EAEM,EAAiB,GAAW,SAAW,EAAgB,QAE7D,OACC,EAAA,EAAA,KAAA,CAAC,MAAD,CACK,KACJ,WAAA,EAAW,EAAA,QAAA,CACV,YACA,CAAE,uBAAwB,CAAU,EACpC,CACD,EAND,SAAA,EAQC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,qBAAqB,MAAO,CAAE,QAAS,KAAM,EAC3D,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,WAAA,EAAW,EAAA,QAAA,CAAW,WAAY,CAAmB,EACrD,IAAK,EACL,SAAU,EACV,MAAO,EAAO,MAEd,UAAA,EAAA,EAAA,IAAA,CAAC,SAAD,CACC,GAAI,GAAG,EAAG,aACV,IAAK,kDAAkD,EAAa,KAAK,mBAAmB,CAAc,IAC1G,MAAO,EAAO,KACd,CAAA,CACG,CAAA,CACD,CAAA,EACJ,EAAU,OAAS,GACnB,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,mBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,2BACd,UAAA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,0BACZ,SAAA,GAAG,EAAO,MAAM,IAAI,EAAU,OAAO,EACnC,CAAA,CACA,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,yBACZ,SAAA,EAAU,KAAK,EAAU,KACzB,EAAA,EAAA,KAAA,CAAC,KAAD,CAAsB,UAAU,yBAAhC,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sBAAsB,YAAU,SAC9C,SAAA,GAAG,EAAS,KAAK,uBACb,CAAA,GACN,EAAA,EAAA,KAAA,CAAC,SAAD,CACC,KAAK,SACL,QAAU,GAAU,EAAY,EAAO,CAAC,EACxC,UAAU,6DACV,eAAc,GAAW,KAAO,EAAS,GAJ1C,SAAA,EAMC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,qBACf,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAM,SAAS,WAAW,KAAK,SAAW,CAAA,CACrC,CAAA,GACN,EAAA,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,mBAAhB,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,iBAAkB,SAAA,EAAS,IAAW,CAAA,GACtD,EAAA,EAAA,IAAA,CAAC,OAAD,CAAA,SAAO,EAAS,OAAc,CAAA,CACzB,CACC,CAAA,CAAA,CACL,CAAA,CAAA,CAlBK,EAAA,EAAS,EAkBd,CACJ,CACE,CAAA,CACA,CACF,CAAA,EAAA,IACA,GAEP,EAEA,EAAY,YAAc,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./location-map/index.cjs');
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("memoize-one");r=e.__toESM(r,1);var i=typeof document<`u`,a,o,s,c=()=>0;i&&(a=document.createElement(`canvas`),a.getContext&&(o=document.createDocumentFragment(),o.appendChild(a),s=a.getContext(`2d`),c=(0,r.default)((e,t)=>s?(s.font=t,s.measureText(e).width):0)));var l=class extends t.Component{static displayName=`TextTruncate`;static defaultProps={line:1,text:``,truncateText:`…`};state={};scope=null;componentDidMount(){window.addEventListener(`resize`,this.onResize,!1)}componentDidUpdate(e){e.text!==this.props.text&&this.update(e)}componentWillUnmount(){window.removeEventListener(`resize`,this.onResize,!1)}onResize=()=>{this.update(this.props)};getRenderText=(e,t)=>{if(!e)return;this.scope=e;let r;r=t||this.props;let{containerClassName:i,line:a,prefix:o,suffix:s,text:l,textTruncateChild:u,truncateText:d,wrapper:f,...p}=r,m=l??``,h=d??`…`,g=a??1,_=this.scope.getBoundingClientRect().width,v=window.getComputedStyle(this.scope),y=[v[`font-weight`],v[`font-style`],v[`font-size`],v[`font-family`]].join(` `);if(_===0){this.setState({renderText:null});return}let b,x=m;if(_<c(m,y)){let e=1,t=m.length,n=``,r=0,i=0,a=g,l=0,d=!1,f=-1;for(;a!==0;){let u=``,p=0;for(o&&a===g-1&&(u+=` ${o}`,p=o.length*.66),a||(u+=h,s&&(u+=` ${s}`));e<=t;)if(n=m.substr(i,e),l=c(n+u,y)+p,l<_)r=m.indexOf(` `,e+1),r===-1?(e+=1,d=!1):(d=!0,e=r);else{let t=0;do{if(--e,n=m.substr(i,e),n[n.length-1]===` `&&(n=m.substr(i,e-1)),d&&(f=n.lastIndexOf(` `),f>-1&&(e=f,n=m.substr(i,e))),l=c(n+u,y)+p,l===t){e=0;break}t=l}while(l>=_);i+=e;break}if(e>=t){i=t;break}--a}i!==t&&(x=`${m.substr(0,i)}${h} `,b=u)}let S;S=f?f(x,b):(0,n.jsxs)(`div`,{...p,children:[x,b]}),this.setState({renderText:S})};update=e=>{this.getRenderText(this.scope,e)};render(){let{containerClassName:e}=this.props;return(0,n.jsx)(`div`,{ref:this.getRenderText,className:e,style:{overflow:`hidden`},children:this.state.renderText})}};exports.default=l;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../../components/utilities/truncate/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 { Component, type ReactNode } from 'react';\n\nimport memoize from 'memoize-one';\n\nconst documentDefined = typeof document !== 'undefined';\n\nlet canvas: HTMLCanvasElement | undefined;\nlet docFragment: DocumentFragment | undefined;\nlet canvasContext: CanvasRenderingContext2D | null;\nlet measureWidth: (text: string, font: string) => number = () => 0;\n\nif (documentDefined) {\n\tcanvas = document.createElement('canvas');\n\tif (canvas.getContext) {\n\t\tdocFragment = document.createDocumentFragment();\n\t\tdocFragment.appendChild(canvas);\n\t\tcanvasContext = canvas.getContext('2d');\n\t\tmeasureWidth = memoize((text: string, font: string) => {\n\t\t\tif (!canvasContext) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tcanvasContext.font = font;\n\t\t\treturn canvasContext.measureText(text).width;\n\t\t});\n\t}\n}\n\nexport interface TruncateProps {\n\tcontainerClassName?: string;\n\tline?: number;\n\tprefix?: string;\n\tsuffix?: string;\n\ttext?: string;\n\ttextTruncateChild?: ReactNode;\n\ttruncateText?: string;\n\twrapper?: (outputText: string, child?: ReactNode) => ReactNode;\n\t// Any additional props are spread onto the rendered element.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[key: string]: any;\n}\n\ninterface TruncateState {\n\trenderText?: ReactNode;\n}\n\nclass TextTruncate extends Component<TruncateProps, TruncateState> {\n\tstatic displayName = 'TextTruncate';\n\n\tstatic defaultProps: Partial<TruncateProps> = {\n\t\tline: 1,\n\t\ttext: '',\n\t\ttruncateText: '…',\n\t};\n\n\tstate: TruncateState = {};\n\n\tscope: HTMLElement | null = null;\n\n\tcomponentDidMount() {\n\t\twindow.addEventListener('resize', this.onResize, false);\n\t}\n\n\tcomponentDidUpdate(nextProps: TruncateProps) {\n\t\tif (nextProps.text !== this.props.text) {\n\t\t\tthis.update(nextProps);\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener('resize', this.onResize, false);\n\t}\n\n\tonResize = () => {\n\t\tthis.update(this.props);\n\t};\n\n\tgetRenderText = (ref: HTMLElement | null, nextProps?: TruncateProps) => {\n\t\tif (!ref) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.scope = ref;\n\n\t\t// nextProps will be undefined for resize events, but will change if search or other props are changed\n\t\tlet propsToRender;\n\t\tif (nextProps) {\n\t\t\tpropsToRender = nextProps;\n\t\t} else {\n\t\t\tpropsToRender = this.props;\n\t\t}\n\n\t\tconst {\n\t\t\tcontainerClassName, // eslint-disable-line no-unused-vars, @typescript-eslint/no-unused-vars\n\t\t\tline,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\ttext,\n\t\t\ttextTruncateChild,\n\t\t\ttruncateText,\n\t\t\twrapper,\n\t\t\t...props\n\t\t} = propsToRender;\n\n\t\tconst resolvedText = text ?? '';\n\t\tconst resolvedTruncateText = truncateText ?? '…';\n\t\tconst resolvedLine = line ?? 1;\n\n\t\tconst scopeWidth = this.scope.getBoundingClientRect().width;\n\t\tconst style = window.getComputedStyle(this.scope);\n\t\tconst font = [\n\t\t\tstyle['font-weight' as keyof CSSStyleDeclaration],\n\t\t\tstyle['font-style' as keyof CSSStyleDeclaration],\n\t\t\tstyle['font-size' as keyof CSSStyleDeclaration],\n\t\t\tstyle['font-family' as keyof CSSStyleDeclaration],\n\t\t].join(' ');\n\n\t\t// return if display:none\n\t\tif (scopeWidth === 0) {\n\t\t\tthis.setState({ renderText: null });\n\t\t\treturn;\n\t\t}\n\n\t\tlet child: ReactNode;\n\t\tlet outputText = resolvedText;\n\n\t\t// return if all of text can be displayed\n\t\tif (scopeWidth < measureWidth(resolvedText, font)) {\n\t\t\tlet currentPos = 1;\n\t\t\tconst maxTextLength = resolvedText.length;\n\t\t\tlet truncatedText = '';\n\t\t\tlet splitPos = 0;\n\t\t\tlet startPos = 0;\n\t\t\tlet displayLine = resolvedLine;\n\t\t\tlet width = 0;\n\t\t\tlet lastIsEng = false;\n\t\t\tlet lastSpaceIndex = -1;\n\n\t\t\twhile (displayLine !== 0) {\n\t\t\t\tlet ext = '';\n\t\t\t\tlet extraWidthDueToPrefixStyle = 0;\n\n\t\t\t\tif (prefix && displayLine === resolvedLine - 1) {\n\t\t\t\t\text += ` ${prefix}`;\n\t\t\t\t\t// MAGIC NUMBER: (width at letter-spacing of 0.25rems - width at normal) / number of letters\n\t\t\t\t\textraWidthDueToPrefixStyle = prefix.length * 0.66;\n\t\t\t\t}\n\n\t\t\t\tif (!displayLine) {\n\t\t\t\t\text += resolvedTruncateText;\n\n\t\t\t\t\tif (suffix) {\n\t\t\t\t\t\text += ` ${suffix}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile (currentPos <= maxTextLength) {\n\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos);\n\t\t\t\t\twidth =\n\t\t\t\t\t\tmeasureWidth(truncatedText + ext, font) +\n\t\t\t\t\t\textraWidthDueToPrefixStyle;\n\n\t\t\t\t\tif (width < scopeWidth) {\n\t\t\t\t\t\tsplitPos = resolvedText.indexOf(' ', currentPos + 1);\n\t\t\t\t\t\tif (splitPos === -1) {\n\t\t\t\t\t\t\tcurrentPos += 1;\n\t\t\t\t\t\t\tlastIsEng = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlastIsEng = true;\n\t\t\t\t\t\t\tcurrentPos = splitPos;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet lastWidth = 0;\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tcurrentPos -= 1;\n\t\t\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos);\n\t\t\t\t\t\t\tif (truncatedText[truncatedText.length - 1] === ' ') {\n\t\t\t\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (lastIsEng) {\n\t\t\t\t\t\t\t\tlastSpaceIndex = truncatedText.lastIndexOf(' ');\n\t\t\t\t\t\t\t\tif (lastSpaceIndex > -1) {\n\t\t\t\t\t\t\t\t\tcurrentPos = lastSpaceIndex;\n\t\t\t\t\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\t\tmeasureWidth(truncatedText + ext, font) +\n\t\t\t\t\t\t\t\textraWidthDueToPrefixStyle;\n\t\t\t\t\t\t\tif (width === lastWidth) {\n\t\t\t\t\t\t\t\tcurrentPos = 0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlastWidth = width;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (width >= scopeWidth);\n\t\t\t\t\t\tstartPos += currentPos;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (currentPos >= maxTextLength) {\n\t\t\t\t\tstartPos = maxTextLength;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdisplayLine -= 1; // iterate\n\t\t\t}\n\n\t\t\tif (startPos !== maxTextLength) {\n\t\t\t\toutputText = `${resolvedText.substr(0, startPos)}${resolvedTruncateText} `;\n\t\t\t\tchild = textTruncateChild;\n\t\t\t}\n\t\t}\n\n\t\tlet renderText;\n\t\tif (wrapper) {\n\t\t\trenderText = wrapper(outputText, child);\n\t\t} else {\n\t\t\trenderText = (\n\t\t\t\t<div {...props}>\n\t\t\t\t\t{outputText}\n\t\t\t\t\t{child}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tthis.setState({ renderText });\n\t};\n\n\tupdate = (nextProps?: TruncateProps) => {\n\t\tthis.getRenderText(this.scope, nextProps);\n\t};\n\n\trender() {\n\t\tconst { containerClassName } = this.props;\n\n\t\t// inline style override\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={this.getRenderText}\n\t\t\t\tclassName={containerClassName}\n\t\t\t\tstyle={{ overflow: 'hidden' }}\n\t\t\t>\n\t\t\t\t{this.state.renderText}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default TextTruncate;\n"],"mappings":"2JAOA,IAAM,EAAkB,OAAO,SAAa,IAExC,EACA,EACA,EACA,MAA6D,EAE7D,IACH,EAAS,SAAS,cAAc,QAAQ,EACpC,EAAO,aACV,EAAc,SAAS,uBAAuB,EAC9C,EAAY,YAAY,CAAM,EAC9B,EAAgB,EAAO,WAAW,IAAI,EACtC,GAAA,EAAe,EAAA,QAAA,EAAS,EAAc,IAChC,GAGL,EAAc,KAAO,EACd,EAAc,YAAY,CAAI,CAAC,CAAC,OAH/B,CAIR,IAsBH,IAAM,EAAN,cAA2B,EAAA,SAAwC,CAClE,OAAO,YAAc,eAErB,OAAO,aAAuC,CAC7C,KAAM,EACN,KAAM,GACN,aAAc,GACf,EAEA,MAAuB,CAAC,EAExB,MAA4B,KAE5B,mBAAoB,CACnB,OAAO,iBAAiB,SAAU,KAAK,SAAU,EAAK,CACvD,CAEA,mBAAmB,EAA0B,CACxC,EAAU,OAAS,KAAK,MAAM,MACjC,KAAK,OAAO,CAAS,CAEvB,CAEA,sBAAuB,CACtB,OAAO,oBAAoB,SAAU,KAAK,SAAU,EAAK,CAC1D,CAEA,aAAiB,CAChB,KAAK,OAAO,KAAK,KAAK,CACvB,EAEA,eAAiB,EAAyB,IAA8B,CACvE,GAAI,CAAC,EACJ,OAGD,KAAK,MAAQ,EAGb,IAAI,EACJ,AAGC,EAHG,GAGa,KAAK,MAGtB,GAAM,CACL,qBACA,OACA,SACA,SACA,OACA,oBACA,eACA,UACA,GAAG,GACA,EAEE,EAAe,GAAQ,GACvB,EAAuB,GAAgB,IACvC,EAAe,GAAQ,EAEvB,EAAa,KAAK,MAAM,sBAAsB,CAAC,CAAC,MAChD,EAAQ,OAAO,iBAAiB,KAAK,KAAK,EAC1C,EAAO,CACZ,EAAM,eACN,EAAM,cACN,EAAM,aACN,EAAM,cACP,CAAC,CAAC,KAAK,GAAG,EAGV,GAAI,IAAe,EAAG,CACrB,KAAK,SAAS,CAAE,WAAY,IAAK,CAAC,EAClC,MACD,CAEA,IAAI,EACA,EAAa,EAGjB,GAAI,EAAa,EAAa,EAAc,CAAI,EAAG,CAClD,IAAI,EAAa,EACX,EAAgB,EAAa,OAC/B,EAAgB,GAChB,EAAW,EACX,EAAW,EACX,EAAc,EACd,EAAQ,EACR,EAAY,GACZ,EAAiB,GAErB,KAAO,IAAgB,GAAG,CACzB,IAAI,EAAM,GACN,EAA6B,EAgBjC,IAdI,GAAU,IAAgB,EAAe,IAC5C,GAAO,IAAI,IAEX,EAA6B,EAAO,OAAS,KAGzC,IACJ,GAAO,EAEH,IACH,GAAO,IAAI,MAIN,GAAc,GAMpB,GALA,EAAgB,EAAa,OAAO,EAAU,CAAU,EACxD,EACC,EAAa,EAAgB,EAAK,CAAI,EACtC,EAEG,EAAQ,EACX,EAAW,EAAa,QAAQ,IAAK,EAAa,CAAC,EAC/C,IAAa,IAChB,GAAc,EACd,EAAY,KAEZ,EAAY,GACZ,EAAa,OAER,CACN,IAAI,EAAY,EAChB,EAAG,CAgBF,GAfA,IACA,EAAgB,EAAa,OAAO,EAAU,CAAU,EACpD,EAAc,EAAc,OAAS,KAAO,MAC/C,EAAgB,EAAa,OAAO,EAAU,EAAa,CAAC,GAEzD,IACH,EAAiB,EAAc,YAAY,GAAG,EAC1C,EAAiB,KACpB,EAAa,EACb,EAAgB,EAAa,OAAO,EAAU,CAAU,IAG1D,EACC,EAAa,EAAgB,EAAK,CAAI,EACtC,EACG,IAAU,EAAW,CACxB,EAAa,EACb,KACD,CACC,EAAY,CAEd,OAAS,GAAS,GAClB,GAAY,EACZ,KACD,CAGD,GAAI,GAAc,EAAe,CAChC,EAAW,EACX,KACD,CAEA,GACD,CAEI,IAAa,IAChB,EAAa,GAAG,EAAa,OAAO,EAAG,CAAQ,IAAI,EAAqB,GACxE,EAAQ,EAEV,CAEA,IAAI,EACJ,AAGC,EAHG,EACU,EAAQ,EAAY,CAAK,GAGrC,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,GAAI,EAAT,SAAA,CACE,EACA,CACG,IAIP,KAAK,SAAS,CAAE,YAAW,CAAC,CAC7B,EAEA,OAAU,GAA8B,CACvC,KAAK,cAAc,KAAK,MAAO,CAAS,CACzC,EAEA,QAAS,CACR,GAAM,CAAE,sBAAuB,KAAK,MAGpC,OACC,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,IAAK,KAAK,cACV,UAAW,EACX,MAAO,CAAE,SAAU,QAAS,EAE3B,SAAA,KAAK,MAAM,UACR,CAAA,CAEP,CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./truncate/index.cjs');
|
|
@@ -1,2 +0,0 @@
|
|
|
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,r,i,a,o,s){let c=o?` ${o}`:``,l;l=s?typeof s.type==`string`?s.type:s.type.displayName:typeof r[i].type==`string`?r[i].type:r[i].type.displayName,!(a.indexOf(l)>-1)&&!e[n]&&((0,t.default)(!1,`[Design System React] ${n} requires that prop '${i}' is an instance of one of the following components: ${a.join(`, `)}. An instance of '${l}' was given.${c}`),e[n]=!0)}}var r=n;exports.default=r;
|
|
2
|
-
//# sourceMappingURL=one-of-component.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"one-of-component.cjs","names":[],"sources":["../../../../utilities/warning/one-of-component.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\n// This function will deliver an error message to the browser console when all of the props passed in are undefined (falsey).\nimport warning from 'warning';\n\nlet oneOfComponent = function oneOfComponentFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tconst hasWarned = {};\n\toneOfComponent = function oneOfComponentFunction(\n\t\tcontrol,\n\t\tprops,\n\t\tpropName,\n\t\tallowedComponents,\n\t\tcomment,\n\t\tspecificTest // if this is set, it will be checked instead of props[propName]\n\t) {\n\t\tconst additionalComment = comment ? ` ${comment}` : '';\n\n\t\tlet componentType;\n\n\t\tif (specificTest) {\n\t\t\tif (typeof specificTest.type === 'string') {\n\t\t\t\tcomponentType = specificTest.type;\n\t\t\t} else {\n\t\t\t\tcomponentType = specificTest.type.displayName;\n\t\t\t}\n\t\t} else if (typeof props[propName].type === 'string') {\n\t\t\tcomponentType = props[propName].type;\n\t\t} else {\n\t\t\tcomponentType = props[propName].type.displayName;\n\t\t}\n\n\t\tconst allowedComponentFound = allowedComponents.indexOf(componentType) > -1;\n\n\t\tif (!allowedComponentFound && !hasWarned[control]) {\n\t\t\t/* eslint-disable max-len */\n\t\t\twarning(\n\t\t\t\tfalse,\n\t\t\t\t`[Design System React] ${control} requires that prop '${propName}' is an instance of one of the following components: ${allowedComponents.join(\n\t\t\t\t\t', '\n\t\t\t\t)}. An instance of '${componentType}' was given.${additionalComment}`\n\t\t\t);\n\t\t\t/* eslint-enable max-len */\n\t\t\thasWarned[control] = true;\n\t\t}\n\t};\n}\n\nexport default oneOfComponent;\n"],"mappings":"kGAQA,IAAI,EAAiB,UAAkC,CAAC,EAExD,GAAA,QAAA,IAAA,WAA6B,aAAc,CAC1C,IAAM,EAAY,CAAC,EACnB,EAAiB,SAChB,EACA,EACA,EACA,EACA,EACA,EACC,CACD,IAAM,EAAoB,EAAU,IAAI,IAAY,GAEhD,EAEJ,AASC,EATG,EACC,OAAO,EAAa,MAAS,SAChB,EAAa,KAEb,EAAa,KAAK,YAEzB,OAAO,EAAM,EAAS,CAAC,MAAS,SAC1B,EAAM,EAAS,CAAC,KAEhB,EAAM,EAAS,CAAC,KAAK,YAKlC,EAF0B,EAAkB,QAAQ,CAAa,EAAI,KAE3C,CAAC,EAAU,MAExC,EAAA,EAAA,QAAA,CACC,GACA,yBAAyB,EAAQ,uBAAuB,EAAS,uDAAuD,EAAkB,KACzI,IACD,EAAE,oBAAoB,EAAc,cAAc,GACnD,EAEA,EAAU,GAAW,GAEvB,CACD,CAEA,IAAA,EAAe"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "../../utilities/constants.js";
|
|
2
|
-
import e from "../../utilities/warning/sunset-property.js";
|
|
3
|
-
import t from "../../utilities/warning/deprecated-property.js";
|
|
4
|
-
import n from "../../utilities/get-component-doc.js";
|
|
5
|
-
import r from "../../utilities/warning/component-is-deprecated.js";
|
|
6
|
-
import i from "../../utilities/warning/one-of-component.js";
|
|
7
|
-
//#region components/app-launcher/check-props.js
|
|
8
|
-
var a = function() {};
|
|
9
|
-
process.env.NODE_ENV !== "production" && (a = function(a, o, s) {
|
|
10
|
-
let c = n(s);
|
|
11
|
-
a === "SLDSAppLauncher" ? (o.modalHeaderButton !== void 0 && i(a, o, "modalHeaderButton", ["SLDSButton"], c("modalHeaderButton")), t(a, o.triggerAssistiveText, "triggerAssistiveText", "assistiveText['trigger']", c("assistiveText"))) : a === "SLDSAppLauncherExpandableSection" ? t(a, o.collapseSectionAssistiveText, "collapseSectionAssistiveText", "assistiveText['collapseSection']", c("assistiveText")) : a === "SLDSAppLauncherSection" ? r(a, o, "App Launcher Section has been deprecated. Please use APP_LAUNCHER_EXPANDABLE_SECTION instead.") : a === "SLDSAppLauncherTile" && (t(a, o.descriptionHeading, "descriptionHeading", null, "Description headings are no longer a part of the SLDS App Launcher Tile spec. Please reach out to DSR admin if there is a special need for this feature"), e(a, o.size, "size", "App Launcher Tiles are now all a consistent size according to SLDS specifications"));
|
|
12
|
-
});
|
|
13
|
-
var o = a;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { o as default };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=check-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/app-launcher/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 componentIsDeprecated from '../../utilities/warning/component-is-deprecated';\nimport getComponentDocFn from '../../utilities/get-component-doc';\nimport oneOfComponent from '../../utilities/warning/one-of-component';\nimport sunsetProperty from '../../utilities/warning/sunset-property';\nimport {\n\tAPP_LAUNCHER,\n\tAPP_LAUNCHER_EXPANDABLE_SECTION,\n\tAPP_LAUNCHER_SECTION,\n\tAPP_LAUNCHER_TILE,\n} from '../../utilities/constants';\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\tif (COMPONENT === APP_LAUNCHER) {\n\t\t\tif (props.modalHeaderButton !== undefined) {\n\t\t\t\toneOfComponent(\n\t\t\t\t\tCOMPONENT,\n\t\t\t\t\tprops,\n\t\t\t\t\t'modalHeaderButton',\n\t\t\t\t\t['SLDSButton'],\n\t\t\t\t\tcreateDocUrl('modalHeaderButton')\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdeprecatedProperty(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops.triggerAssistiveText,\n\t\t\t\t'triggerAssistiveText',\n\t\t\t\t\"assistiveText['trigger']\",\n\t\t\t\tcreateDocUrl('assistiveText')\n\t\t\t);\n\t\t} else if (COMPONENT === APP_LAUNCHER_EXPANDABLE_SECTION) {\n\t\t\tdeprecatedProperty(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops.collapseSectionAssistiveText,\n\t\t\t\t'collapseSectionAssistiveText',\n\t\t\t\t\"assistiveText['collapseSection']\",\n\t\t\t\tcreateDocUrl('assistiveText')\n\t\t\t);\n\t\t} else if (COMPONENT === APP_LAUNCHER_SECTION) {\n\t\t\tcomponentIsDeprecated(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops,\n\t\t\t\t'App Launcher Section has been deprecated. Please use APP_LAUNCHER_EXPANDABLE_SECTION instead.'\n\t\t\t);\n\t\t} else if (COMPONENT === APP_LAUNCHER_TILE) {\n\t\t\tdeprecatedProperty(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops.descriptionHeading,\n\t\t\t\t'descriptionHeading',\n\t\t\t\tnull,\n\t\t\t\t'Description headings are no longer a part of the SLDS App Launcher Tile spec. Please reach out to DSR admin if there is a special need for this feature'\n\t\t\t);\n\n\t\t\tsunsetProperty(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops.size,\n\t\t\t\t'size',\n\t\t\t\t'App Launcher Tiles are now all a consistent size according to SLDS specifications'\n\t\t\t);\n\t\t}\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;;;;AAgBA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAE9C,AAAI,MAAA,qBACC,EAAM,sBAAsB,KAAA,KAC/B,EACC,GACA,GACA,qBACA,CAAC,YAAY,GACb,EAAa,mBAAmB,CACjC,GAGD,EACC,GACA,EAAM,sBACN,wBACA,4BACA,EAAa,eAAe,CAC7B,KACU,MAAA,qCACV,EACC,GACA,EAAM,8BACN,gCACA,oCACA,EAAa,eAAe,CAC7B,IACU,MAAA,2BACV,EACC,GACA,GACA,+FACD,IACU,MAAA,0BACV,EACC,GACA,EAAM,oBACN,sBACA,MACA,yJACD,GAEA,EACC,GACA,EAAM,MACN,QACA,mFACD;AAEF;AAGD,IAAA,IAAe"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//#region components/app-launcher/component.json
|
|
2
|
-
var e = "app-launcher", t = "prod", n = "AppLauncher", r = [
|
|
3
|
-
{
|
|
4
|
-
component: "expandable-section",
|
|
5
|
-
classKey: "AppLauncherExpandableSection"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
component: "link",
|
|
9
|
-
classKey: "AppLauncherLink"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
component: "tile",
|
|
13
|
-
classKey: "AppLauncherTile"
|
|
14
|
-
}
|
|
15
|
-
], i = {
|
|
16
|
-
component: e,
|
|
17
|
-
status: t,
|
|
18
|
-
"display-name": "App Launcher",
|
|
19
|
-
classKey: n,
|
|
20
|
-
"SLDS-component-path": "/components/app-launcher",
|
|
21
|
-
dependencies: r,
|
|
22
|
-
"site-stories": [{
|
|
23
|
-
heading: "Default",
|
|
24
|
-
path: "/__examples__/default.jsx"
|
|
25
|
-
}],
|
|
26
|
-
"url-slug": "app-launcher"
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { n as classKey, e as component, i as default, r as dependencies, t as status };
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","names":[],"sources":["../../../../components/app-launcher/component.json"],"sourcesContent":["{\n\t\"component\": \"app-launcher\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"App Launcher\",\n\t\"classKey\": \"AppLauncher\",\n\t\"SLDS-component-path\": \"/components/app-launcher\",\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"component\": \"expandable-section\",\n\t\t\t\"classKey\": \"AppLauncherExpandableSection\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"link\",\n\t\t\t\"classKey\": \"AppLauncherLink\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"tile\",\n\t\t\t\"classKey\": \"AppLauncherTile\"\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],\n\t\"url-slug\": \"app-launcher\"\n}\n"],"mappings":""}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { APP_LAUNCHER_EXPANDABLE_SECTION as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "./check-props.js";
|
|
3
|
-
import n from "./component.js";
|
|
4
|
-
import r from "../expandable-section/index.js";
|
|
5
|
-
import i from "react";
|
|
6
|
-
import a from "classnames";
|
|
7
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
-
//#region components/app-launcher/expandable-section.tsx
|
|
9
|
-
var s = class extends i.Component {
|
|
10
|
-
static displayName = e;
|
|
11
|
-
state = { isOpen: !0 };
|
|
12
|
-
constructor(r) {
|
|
13
|
-
super(r), t(e, r, n);
|
|
14
|
-
}
|
|
15
|
-
toggleOpen = (e, t) => {
|
|
16
|
-
this.props.onToggleOpen ? this.props.onToggleOpen(e, t) : this.setState((e) => ({ isOpen: !e.isOpen }));
|
|
17
|
-
};
|
|
18
|
-
render() {
|
|
19
|
-
let e = {
|
|
20
|
-
...this.props,
|
|
21
|
-
isOpen: this.props.isOpen === void 0 ? this.state.isOpen : this.props.isOpen,
|
|
22
|
-
onToggleOpen: this.toggleOpen
|
|
23
|
-
}, t = "tiles", n = i.Children.map(this.props.children, (e) => {
|
|
24
|
-
let n = "slds-p-horizontal_small slds-size_1-of-1 slds-medium-size_1-of-3", r = e;
|
|
25
|
-
return (r && r.type && r.type.displayName !== "SLDSAppLauncherTile" || r && !r.type) && (t = "links"), t === "links" && (n = "slds-col_padded slds-p-vertical_xx-small slds-size_1-of-5"), /* @__PURE__ */ o("li", {
|
|
26
|
-
className: n,
|
|
27
|
-
children: e
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
return /* @__PURE__ */ o(r, {
|
|
31
|
-
...e,
|
|
32
|
-
children: /* @__PURE__ */ o("ul", {
|
|
33
|
-
className: a("slds-grid slds-wrap", { "slds-grid_pull-padded": t === "tiles" }),
|
|
34
|
-
children: n
|
|
35
|
-
})
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
//#endregion
|
|
40
|
-
export { s as default };
|
|
41
|
-
|
|
42
|
-
//# sourceMappingURL=expandable-section.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section.js","names":[],"sources":["../../../../components/app-launcher/expandable-section.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// # App Launcher Expandable Section Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type MouseEvent, type ReactElement, type ReactNode } from 'react';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// A simple javascript utility for conditionally joining classNames together.\nimport classNames from 'classnames';\n\n// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n// ## Children\nimport ExpandableSection from '../expandable-section';\n\n// ## Constants\nimport {\n\tAPP_LAUNCHER_EXPANDABLE_SECTION,\n\tAPP_LAUNCHER_TILE,\n} from '../../utilities/constants';\n\nexport interface AppLauncherExpandableSectionAssistiveText {\n\t/** Label for the icon that expands / collapses the section */\n\ttoggleSection?: string;\n}\n\nexport interface AppLauncherExpandableSectionProps {\n\t/**\n\t * **Assistive text for accessibility.**\n\t * * `toggleSection`: Label for the icon that expands / collapses the section\n\t */\n\tassistiveText?: AppLauncherExpandableSectionAssistiveText;\n\t/**\n\t * Contents of the section\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Class names to be added to the `slds-section` classed node\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Unique identifier for the expandable section. The id is automatically generated if not provided\n\t */\n\tid?: string;\n\t/**\n\t * Specifies whether the section is expanded or collapsed. If not provided, component will use its own state to manage this itself\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Specifies whether the section can be expanded or collapsed. Defaults to `false`\n\t */\n\tnonCollapsible?: boolean;\n\t/**\n\t * Callback for when the section is expanded or collapsed. Passes event object and data object with `isOpen` bool.\n\t */\n\tonToggleOpen?: (event: MouseEvent, data: { isOpen: boolean }) => void;\n\t/**\n\t * The title for the section\n\t */\n\ttitle: string;\n}\n\ninterface AppLauncherExpandableSectionState {\n\tisOpen: boolean;\n}\n\n/**\n * App Launcher Sections allow users to categorize App Tiles & Links as well as toggle their display. It is a superset of components/expandable-section with content formatting.\n * All Expandable Section props are compatible with props passed to this component.\n */\nclass AppLauncherExpandableSection extends React.Component<\n\tAppLauncherExpandableSectionProps,\n\tAppLauncherExpandableSectionState\n> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = APP_LAUNCHER_EXPANDABLE_SECTION;\n\n\tstate = {\n\t\tisOpen: true,\n\t};\n\n\tconstructor(props: AppLauncherExpandableSectionProps) {\n\t\tsuper(props);\n\n\t\t(checkProps as (name: string, props: unknown, doc: unknown) => void)(\n\t\t\tAPP_LAUNCHER_EXPANDABLE_SECTION,\n\t\t\tprops,\n\t\t\tcomponentDoc\n\t\t);\n\t}\n\n\ttoggleOpen = (event: MouseEvent, data: { isOpen: boolean }) => {\n\t\tif (this.props.onToggleOpen) {\n\t\t\tthis.props.onToggleOpen(event, data);\n\t\t} else {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tisOpen: !prevState.isOpen,\n\t\t\t}));\n\t\t}\n\t};\n\n\trender() {\n\t\tconst expandableSectionProps = {\n\t\t\t...this.props,\n\t\t\t...{\n\t\t\t\tisOpen:\n\t\t\t\t\tthis.props.isOpen !== undefined\n\t\t\t\t\t\t? this.props.isOpen\n\t\t\t\t\t\t: this.state.isOpen,\n\t\t\t\tonToggleOpen: this.toggleOpen,\n\t\t\t},\n\t\t};\n\t\tlet ulChildrenType = 'tiles';\n\n\t\tconst ulContent = React.Children.map(this.props.children, (child) => {\n\t\t\tlet liClasses =\n\t\t\t\t'slds-p-horizontal_small slds-size_1-of-1 slds-medium-size_1-of-3';\n\n\t\t\tconst element = child as ReactElement & {\n\t\t\t\ttype?: { displayName?: string };\n\t\t\t};\n\t\t\tif (\n\t\t\t\t(element && element.type && element.type.displayName !== APP_LAUNCHER_TILE) ||\n\t\t\t\t(element && !element.type)\n\t\t\t) {\n\t\t\t\tulChildrenType = 'links';\n\t\t\t}\n\n\t\t\tif (ulChildrenType === 'links') {\n\t\t\t\tliClasses = 'slds-col_padded slds-p-vertical_xx-small slds-size_1-of-5';\n\t\t\t}\n\n\t\t\treturn <li className={liClasses}>{child}</li>;\n\t\t});\n\n\t\treturn (\n\t\t\t<ExpandableSection\n\t\t\t\t{...(expandableSectionProps as React.ComponentProps<\n\t\t\t\t\ttypeof ExpandableSection\n\t\t\t\t>)}\n\t\t\t>\n\t\t\t\t<ul\n\t\t\t\t\tclassName={classNames('slds-grid slds-wrap', {\n\t\t\t\t\t\t'slds-grid_pull-padded': ulChildrenType === 'tiles',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{ulContent}\n\t\t\t\t</ul>\n\t\t\t</ExpandableSection>\n\t\t);\n\t}\n}\n\nexport default AppLauncherExpandableSection;\n"],"mappings":";;;;;;;;AA6EA,IAAM,IAAN,cAA2C,EAAM,UAG/C;CAGD,OAAO,cAAc;CAErB,QAAQ,EACP,QAAQ,GACT;CAEA,YAAY,GAA0C;EAGrD,AAFA,MAAM,CAAK,GAEX,EACC,GACA,GACA,CACD;CACD;CAEA,cAAc,GAAmB,MAA8B;EAC9D,AAAI,KAAK,MAAM,eACd,KAAK,MAAM,aAAa,GAAO,CAAI,IAEnC,KAAK,UAAU,OAAe,EAC7B,QAAQ,CAAC,EAAU,OACpB,EAAE;CAEJ;CAEA,SAAS;EACR,IAAM,IAAyB;GAC9B,GAAG,KAAK;GAEP,QACC,KAAK,MAAM,WAAW,KAAA,IAEnB,KAAK,MAAM,SADX,KAAK,MAAM;GAEf,cAAc,KAAK;EAErB,GACI,IAAiB,SAEf,IAAY,EAAM,SAAS,IAAI,KAAK,MAAM,WAAW,MAAU;GACpE,IAAI,IACH,oEAEK,IAAU;GAchB,QAVE,KAAW,EAAQ,QAAQ,EAAQ,KAAK,gBAAA,yBACxC,KAAW,CAAC,EAAQ,UAErB,IAAiB,UAGd,MAAmB,YACtB,IAAY,8DAGN,kBAAC,MAAD;IAAI,WAAW;IAAY,UAAA;GAAU,CAAA;EAC7C,CAAC;EAED,OACC,kBAAC,GAAD;GACC,GAAK;GAIL,UAAA,kBAAC,MAAD;IACC,WAAW,EAAW,uBAAuB,EAC5C,yBAAyB,MAAmB,QAC7C,CAAC;IAEA,UAAA;GACE,CAAA;EACc,CAAA;CAErB;AACD"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { APP_LAUNCHER as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../modal/index.js";
|
|
3
|
-
import n, { useCallback as r, useId as i, useRef as a, useState as o } from "react";
|
|
4
|
-
import s from "classnames";
|
|
5
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
-
//#region components/app-launcher/index.tsx
|
|
7
|
-
var u = { trigger: "Open App Launcher" }, d = ({ assistiveText: e, ariaHideApp: d = !0, children: f, id: p, isOpen: m, modalClassName: h, modalHeaderButton: g, noTruncate: _ = !1, onClose: v, search: y, title: b = "App Launcher", triggerAssistiveText: x, triggerName: S, triggerOnClick: C }) => {
|
|
8
|
-
let w = i(), T = p || w, [E, D] = o(!1), O = a(!1), k = {
|
|
9
|
-
...u,
|
|
10
|
-
...e
|
|
11
|
-
}, A = x || k.trigger, j = m === void 0 ? E : m, M = r((e) => {
|
|
12
|
-
D(!0), typeof C == "function" && C(e, {});
|
|
13
|
-
}, [C]), N = r(() => {
|
|
14
|
-
D(!1), typeof v == "function" && v({}, {});
|
|
15
|
-
}, [v]), P = () => y ? /* @__PURE__ */ c("div", {
|
|
16
|
-
className: "slds-app-launcher__header-search",
|
|
17
|
-
ref: (e) => {
|
|
18
|
-
if (e) {
|
|
19
|
-
if (!O.current) {
|
|
20
|
-
let t = e.querySelector("input");
|
|
21
|
-
t && setTimeout(() => {
|
|
22
|
-
t.focus(), O.current = !0;
|
|
23
|
-
}, 0);
|
|
24
|
-
}
|
|
25
|
-
} else O.current = !1;
|
|
26
|
-
},
|
|
27
|
-
children: y
|
|
28
|
-
}) : null, F = _ ? { maxWidth: "none" } : void 0, I = /* @__PURE__ */ l(n.Fragment, { children: [
|
|
29
|
-
/* @__PURE__ */ c("h2", {
|
|
30
|
-
className: "slds-text-heading_medium",
|
|
31
|
-
id: `${T}-app-launcher-title`,
|
|
32
|
-
children: b
|
|
33
|
-
}),
|
|
34
|
-
P(),
|
|
35
|
-
g || /* @__PURE__ */ c("span", { className: "slds-size_1-of-7" })
|
|
36
|
-
] });
|
|
37
|
-
return /* @__PURE__ */ l("div", {
|
|
38
|
-
className: "slds-context-bar__item slds-context-bar__dropdown-trigger slds-dropdown-trigger slds-dropdown-trigger_click slds-no-hover",
|
|
39
|
-
style: F,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ c("div", {
|
|
42
|
-
className: "slds-context-bar__icon-action",
|
|
43
|
-
children: /* @__PURE__ */ l("button", {
|
|
44
|
-
"aria-haspopup": "true",
|
|
45
|
-
className: "slds-button slds-icon-waffle_container slds-context-bar__button",
|
|
46
|
-
onClick: M,
|
|
47
|
-
title: A,
|
|
48
|
-
type: "button",
|
|
49
|
-
children: [/* @__PURE__ */ l("span", {
|
|
50
|
-
className: "slds-icon-waffle",
|
|
51
|
-
children: [
|
|
52
|
-
/* @__PURE__ */ c("span", { className: "slds-r1" }),
|
|
53
|
-
/* @__PURE__ */ c("span", { className: "slds-r2" }),
|
|
54
|
-
/* @__PURE__ */ c("span", { className: "slds-r3" }),
|
|
55
|
-
/* @__PURE__ */ c("span", { className: "slds-r4" }),
|
|
56
|
-
/* @__PURE__ */ c("span", { className: "slds-r5" }),
|
|
57
|
-
/* @__PURE__ */ c("span", { className: "slds-r6" }),
|
|
58
|
-
/* @__PURE__ */ c("span", { className: "slds-r7" }),
|
|
59
|
-
/* @__PURE__ */ c("span", { className: "slds-r8" }),
|
|
60
|
-
/* @__PURE__ */ c("span", { className: "slds-r9" })
|
|
61
|
-
]
|
|
62
|
-
}), A && /* @__PURE__ */ c("span", {
|
|
63
|
-
className: "slds-assistive-text",
|
|
64
|
-
children: A
|
|
65
|
-
})]
|
|
66
|
-
})
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ c(t, {
|
|
69
|
-
ariaHideApp: d,
|
|
70
|
-
assistiveText: { dialogLabelledBy: `${T}-app-launcher-title` },
|
|
71
|
-
className: s("slds-app-launcher", h),
|
|
72
|
-
contentClassName: "slds-app-launcher__content slds-p-around_medium",
|
|
73
|
-
contentStyle: { minHeight: "90%" },
|
|
74
|
-
isOpen: j,
|
|
75
|
-
onRequestClose: N,
|
|
76
|
-
size: "large",
|
|
77
|
-
header: I,
|
|
78
|
-
headerClassName: "slds-grid slds-grid_align-spread slds-grid_vertical-align-center",
|
|
79
|
-
children: f
|
|
80
|
-
}),
|
|
81
|
-
S ? /* @__PURE__ */ c("span", {
|
|
82
|
-
className: "slds-context-bar__label-action slds-context-bar__app-name",
|
|
83
|
-
children: _ ? S : /* @__PURE__ */ c("span", {
|
|
84
|
-
className: "slds-truncate",
|
|
85
|
-
title: typeof S == "string" ? S : void 0,
|
|
86
|
-
children: S
|
|
87
|
-
})
|
|
88
|
-
}) : null
|
|
89
|
-
]
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
d.displayName = e;
|
|
93
|
-
//#endregion
|
|
94
|
-
export { d as default };
|
|
95
|
-
|
|
96
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/app-launcher/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseId,\n\tuseRef,\n\tuseCallback,\n\ttype ReactNode,\n\ttype MouseEvent,\n} from 'react';\nimport classNames from 'classnames';\nimport Modal from '../modal';\nimport { APP_LAUNCHER } from '../../utilities/constants';\n\n/**\n * Assistive text for AppLauncher\n */\nexport interface AppLauncherAssistiveText {\n\t/** Assistive text for the trigger button */\n\ttrigger?: string;\n}\n\n/**\n * Props for the AppLauncher component\n */\nexport interface AppLauncherProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: AppLauncherAssistiveText;\n\t/** Whether to hide the app element when modal is open */\n\tariaHideApp?: boolean;\n\t/** AppLauncherExpandableSection children */\n\tchildren: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Control open/close state */\n\tisOpen?: boolean;\n\t/** CSS classes for modal */\n\tmodalClassName?: string | string[] | Record<string, boolean>;\n\t/** Button in modal header */\n\tmodalHeaderButton?: ReactNode;\n\t/** Allow longer names without truncation */\n\tnoTruncate?: boolean;\n\t/** Callback when modal closes */\n\tonClose?: (event: MouseEvent | React.KeyboardEvent, data: Record<string, never>) => void;\n\t/** Search bar component */\n\tsearch?: ReactNode;\n\t/** Title text */\n\ttitle?: string;\n\t/** @deprecated Use assistiveText.trigger instead */\n\ttriggerAssistiveText?: string;\n\t/** Name displayed next to trigger */\n\ttriggerName?: ReactNode;\n\t/** Callback when trigger is clicked */\n\ttriggerOnClick?: (event: MouseEvent, data: Record<string, never>) => void;\n}\n\nconst defaultAssistiveText: AppLauncherAssistiveText = {\n\ttrigger: 'Open App Launcher',\n};\n\n/**\n * The App Launcher allows the user to quickly access all the apps and functionality\n * within their organization. The App Launcher should generally only be used as a\n * sub-component of the Global Navigation Bar.\n */\nconst AppLauncher = ({\n\tassistiveText: propAssistiveText,\n\tariaHideApp = true,\n\tchildren,\n\tid: propId,\n\tisOpen: controlledIsOpen,\n\tmodalClassName,\n\tmodalHeaderButton,\n\tnoTruncate = false,\n\tonClose,\n\tsearch,\n\ttitle = 'App Launcher',\n\ttriggerAssistiveText: propTriggerAssistiveText,\n\ttriggerName,\n\ttriggerOnClick,\n}: AppLauncherProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst [internalIsOpen, setInternalIsOpen] = useState(false);\n\tconst focusedOnSearchRef = useRef(false);\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst triggerAssistiveText = propTriggerAssistiveText || assistiveText.trigger;\n\n\tconst isOpen = controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen;\n\n\tconst openAppLauncher = useCallback(\n\t\t(event: MouseEvent<HTMLButtonElement>) => {\n\t\t\tsetInternalIsOpen(true);\n\t\t\tif (typeof triggerOnClick === 'function') {\n\t\t\t\ttriggerOnClick(event, {});\n\t\t\t}\n\t\t},\n\t\t[triggerOnClick]\n\t);\n\n\tconst closeAppLauncher = useCallback(() => {\n\t\tsetInternalIsOpen(false);\n\t\tif (typeof onClose === 'function') {\n\t\t\t// Note: Modal.onRequestClose doesn't pass event, so we create a synthetic one\n\t\t\tonClose({} as MouseEvent, {});\n\t\t}\n\t}, [onClose]);\n\n\tconst renderSearch = () => {\n\t\tif (!search) return null;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName=\"slds-app-launcher__header-search\"\n\t\t\t\tref={(component) => {\n\t\t\t\t\tif (component) {\n\t\t\t\t\t\tif (!focusedOnSearchRef.current) {\n\t\t\t\t\t\t\tconst input = component.querySelector('input');\n\t\t\t\t\t\t\tif (input) {\n\t\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t\tinput.focus();\n\t\t\t\t\t\t\t\t\tfocusedOnSearchRef.current = true;\n\t\t\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfocusedOnSearchRef.current = false;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{search}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst style = noTruncate ? { maxWidth: 'none' } : undefined;\n\n\tconst customModalHeader = (\n\t\t<React.Fragment>\n\t\t\t<h2\n\t\t\t\tclassName=\"slds-text-heading_medium\"\n\t\t\t\tid={`${id}-app-launcher-title`}\n\t\t\t>\n\t\t\t\t{title}\n\t\t\t</h2>\n\n\t\t\t{renderSearch()}\n\n\t\t\t{modalHeaderButton || <span className=\"slds-size_1-of-7\" />}\n\t\t</React.Fragment>\n\t);\n\n\tconst modalContentStaticHeight = '90%';\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"slds-context-bar__item slds-context-bar__dropdown-trigger slds-dropdown-trigger slds-dropdown-trigger_click slds-no-hover\"\n\t\t\tstyle={style}\n\t\t>\n\t\t\t<div className=\"slds-context-bar__icon-action\">\n\t\t\t\t<button\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tclassName=\"slds-button slds-icon-waffle_container slds-context-bar__button\"\n\t\t\t\t\tonClick={openAppLauncher}\n\t\t\t\t\ttitle={triggerAssistiveText}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-icon-waffle\">\n\t\t\t\t\t\t<span className=\"slds-r1\" />\n\t\t\t\t\t\t<span className=\"slds-r2\" />\n\t\t\t\t\t\t<span className=\"slds-r3\" />\n\t\t\t\t\t\t<span className=\"slds-r4\" />\n\t\t\t\t\t\t<span className=\"slds-r5\" />\n\t\t\t\t\t\t<span className=\"slds-r6\" />\n\t\t\t\t\t\t<span className=\"slds-r7\" />\n\t\t\t\t\t\t<span className=\"slds-r8\" />\n\t\t\t\t\t\t<span className=\"slds-r9\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t{triggerAssistiveText && (\n\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t{triggerAssistiveText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<Modal\n\t\t\t\tariaHideApp={ariaHideApp}\n\t\t\t\tassistiveText={{\n\t\t\t\t\tdialogLabelledBy: `${id}-app-launcher-title`,\n\t\t\t\t}}\n\t\t\t\tclassName={classNames('slds-app-launcher', modalClassName as string)}\n\t\t\t\tcontentClassName=\"slds-app-launcher__content slds-p-around_medium\"\n\t\t\t\tcontentStyle={{ minHeight: modalContentStaticHeight }}\n\t\t\t\tisOpen={isOpen}\n\t\t\t\tonRequestClose={closeAppLauncher}\n\t\t\t\tsize=\"large\"\n\t\t\t\theader={customModalHeader}\n\t\t\t\theaderClassName=\"slds-grid slds-grid_align-spread slds-grid_vertical-align-center\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Modal>\n\t\t\t{triggerName ? (\n\t\t\t\t<span className=\"slds-context-bar__label-action slds-context-bar__app-name\">\n\t\t\t\t\t{noTruncate ? (\n\t\t\t\t\t\ttriggerName\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span className=\"slds-truncate\" title={typeof triggerName === 'string' ? triggerName : undefined}>\n\t\t\t\t\t\t\t{triggerName}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n\nAppLauncher.displayName = APP_LAUNCHER;\n\nexport default AppLauncher;\n\n"],"mappings":";;;;;;AAyDA,IAAM,IAAiD,EACtD,SAAS,oBACV,GAOM,KAAe,EACpB,eAAe,GACf,iBAAc,IACd,aACA,IAAI,GACJ,QAAQ,GACR,mBACA,sBACA,gBAAa,IACb,YACA,WACA,WAAQ,gBACR,sBAAsB,GACtB,gBACA,wBAC2C;CAC3C,IAAM,IAAc,EAAM,GACpB,IAAK,KAAU,GACf,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,IAAqB,EAAO,EAAK,GAEjC,IAAgB;EAAE,GAAG;EAAsB,GAAG;CAAkB,GAChE,IAAuB,KAA4B,EAAc,SAEjE,IAAS,MAAqB,KAAA,IAA+B,IAAnB,GAE1C,IAAkB,GACtB,MAAyC;EAEzC,AADA,EAAkB,EAAI,GAClB,OAAO,KAAmB,cAC7B,EAAe,GAAO,CAAC,CAAC;CAE1B,GACA,CAAC,CAAc,CAChB,GAEM,IAAmB,QAAkB;EAE1C,AADA,EAAkB,EAAK,GACnB,OAAO,KAAY,cAEtB,EAAQ,CAAC,GAAiB,CAAC,CAAC;CAE9B,GAAG,CAAC,CAAO,CAAC,GAEN,UACA,IAGJ,kBAAC,OAAD;EACC,WAAU;EACV,MAAM,MAAc;GACnB,IAAI,GACC;QAAA,CAAC,EAAmB,SAAS;KAChC,IAAM,IAAQ,EAAU,cAAc,OAAO;KAC7C,AAAI,KACH,iBAAiB;MAEhB,AADA,EAAM,MAAM,GACZ,EAAmB,UAAU;KAC9B,GAAG,CAAC;IAEN;UAEA,EAAmB,UAAU;EAE/B;EAEC,UAAA;CACG,CAAA,IAtBc,MA0Bf,IAAQ,IAAa,EAAE,UAAU,OAAO,IAAI,KAAA,GAE5C,IACL,kBAAC,EAAM,UAAP,EAAA,UAAA;EACC,kBAAC,MAAD;GACC,WAAU;GACV,IAAI,GAAG,EAAG;GAET,UAAA;EACE,CAAA;EAEH,EAAa;EAEb,KAAqB,kBAAC,QAAD,EAAM,WAAU,mBAAoB,CAAA;CAC3C,EAAA,CAAA;CAKjB,OACC,kBAAC,OAAD;EACC,WAAU;EACH;EAFR,UAAA;GAIC,kBAAC,OAAD;IAAK,WAAU;IACd,UAAA,kBAAC,UAAD;KACC,iBAAc;KACd,WAAU;KACV,SAAS;KACT,OAAO;KACP,MAAK;KALN,UAAA,CAOC,kBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA;OACC,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;OAC3B,kBAAC,QAAD,EAAM,WAAU,UAAW,CAAA;MACtB;KACL,CAAA,GAAA,KACA,kBAAC,QAAD;MAAM,WAAU;MACd,UAAA;KACI,CAAA,CAEA;;GACJ,CAAA;GACL,kBAAC,GAAD;IACc;IACb,eAAe,EACd,kBAAkB,GAAG,EAAG,qBACzB;IACA,WAAW,EAAW,qBAAqB,CAAwB;IACnE,kBAAiB;IACjB,cAAc,EAAE,WAAW,MAAyB;IAC5C;IACR,gBAAgB;IAChB,MAAK;IACL,QAAQ;IACR,iBAAgB;IAEf;GACK,CAAA;GACN,IACA,kBAAC,QAAD;IAAM,WAAU;IACd,UAAA,IACA,IAEA,kBAAC,QAAD;KAAM,WAAU;KAAgB,OAAO,OAAO,KAAgB,WAAW,IAAc,KAAA;KACrF,UAAA;IACI,CAAA;GAEF,CAAA,IACH;EACA;;AAEP;AAEA,EAAY,cAAc"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { APP_LAUNCHER_LINK as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../utilities/highlighter/index.js";
|
|
3
|
-
import n from "react";
|
|
4
|
-
import r from "classnames";
|
|
5
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
//#region components/app-launcher/link.tsx
|
|
7
|
-
var a = class extends n.Component {
|
|
8
|
-
static displayName = e;
|
|
9
|
-
static defaultProps = { href: "#" };
|
|
10
|
-
render() {
|
|
11
|
-
let { title: e } = this.props;
|
|
12
|
-
return !e && typeof this.props.children == "string" && (e = this.props.children), /* @__PURE__ */ i("a", {
|
|
13
|
-
href: this.props.href,
|
|
14
|
-
className: r("slds-truncate", this.props.className),
|
|
15
|
-
onClick: (e) => {
|
|
16
|
-
this.props.href === "#" && e.preventDefault(), this.props.onClick && (e.preventDefault(), this.props.onClick(e, { href: this.props.href }));
|
|
17
|
-
},
|
|
18
|
-
title: e,
|
|
19
|
-
children: /* @__PURE__ */ i(t, {
|
|
20
|
-
search: this.props.search,
|
|
21
|
-
children: this.props.children
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { a as default };
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","names":[],"sources":["../../../../components/app-launcher/link.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # App Launcher Link Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type ReactNode } from 'react';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// A simple javascript utility for conditionally joining classNames together.\nimport classNames from 'classnames';\n\n// ### Children\nimport Highlighter from '../utilities/highlighter';\n\n// ## Constants\nimport { APP_LAUNCHER_LINK } from '../../utilities/constants';\n\nexport interface AppLauncherLinkProps {\n\t/**\n\t * Contents of the link\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Classes to be applied to the link\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * The `href` attribute of the link. If the `onClick` callback is specified this URL will be prevented from changing the browser's location.\n\t */\n\thref?: string;\n\t/**\n\t * Callback for when the link is clicked. Passes back event and data object with href prop. Prevents click from changing browser's location if set.\n\t */\n\tonClick?: (event: React.MouseEvent, data: { href?: string }) => void;\n\t/**\n\t * Text used to highlight content in link\n\t */\n\tsearch?: string;\n\t/**\n\t * The title for the link. If not provided it will attempt to use child content if that content is a string.\n\t */\n\ttitle?: string;\n}\n\n/**\n * App Launcher Link component creates simple links to be used in \"All Items\" sections\n */\nclass AppLauncherLink extends React.Component<AppLauncherLinkProps> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = APP_LAUNCHER_LINK;\n\n\t// ### Default Props\n\tstatic defaultProps: Partial<AppLauncherLinkProps> = {\n\t\thref: '#',\n\t};\n\n\trender() {\n\t\tlet { title } = this.props;\n\n\t\tif (!title && typeof this.props.children === 'string') {\n\t\t\ttitle = this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\thref={this.props.href}\n\t\t\t\tclassName={classNames('slds-truncate', this.props.className as string)}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (this.props.href === '#') {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tif (this.props.onClick) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.props.onClick(event, { href: this.props.href });\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\ttitle={title}\n\t\t\t>\n\t\t\t\t<Highlighter search={this.props.search}>\n\t\t\t\t\t{this.props.children}\n\t\t\t\t</Highlighter>\n\t\t\t</a>\n\t\t);\n\t}\n}\n\nexport default AppLauncherLink;\n"],"mappings":";;;;;;AAmDA,IAAM,IAAN,cAA8B,EAAM,UAAgC;CAGnE,OAAO,cAAc;CAGrB,OAAO,eAA8C,EACpD,MAAM,IACP;CAEA,SAAS;EACR,IAAI,EAAE,aAAU,KAAK;EAMrB,OAJI,CAAC,KAAS,OAAO,KAAK,MAAM,YAAa,aAC5C,IAAQ,KAAK,MAAM,WAInB,kBAAC,KAAD;GACC,MAAM,KAAK,MAAM;GACjB,WAAW,EAAW,iBAAiB,KAAK,MAAM,SAAmB;GACrE,UAAU,MAAU;IAInB,AAHI,KAAK,MAAM,SAAS,OACvB,EAAM,eAAe,GAElB,KAAK,MAAM,YACd,EAAM,eAAe,GACrB,KAAK,MAAM,QAAQ,GAAO,EAAE,MAAM,KAAK,MAAM,KAAK,CAAC;GAErD;GACO;GAEP,UAAA,kBAAC,GAAD;IAAa,QAAQ,KAAK,MAAM;IAC9B,UAAA,KAAK,MAAM;GACA,CAAA;EACX,CAAA;CAEL;AACD"}
|