@govtechsg/sgds-web-component 3.0.0-rc.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Masthead/index.js +2 -2
- package/README.md +2 -2
- package/base/button.js +1 -1
- package/base/card-element.d.ts +0 -3
- package/base/card-element.js +0 -3
- package/base/card-element.js.map +1 -1
- package/base/card.js +1 -1
- package/base/sgds-element2.js +1 -1
- package/components/Accordion/accordion-item.js +1 -1
- package/components/Accordion/accordion.js +1 -1
- package/components/Accordion/index.umd.js +137 -145
- package/components/Accordion/index.umd.js.map +1 -1
- package/components/Accordion/sgds-accordion-item.js +1 -5
- package/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/components/Accordion/sgds-accordion.js +1 -6
- package/components/Accordion/sgds-accordion.js.map +1 -1
- package/components/Alert/alert.js +1 -1
- package/components/Alert/index.umd.js +3 -3
- package/components/Badge/badge.js +1 -1
- package/components/Badge/index.umd.js +3 -3
- package/components/Breadcrumb/breadcrumb-item.js +1 -1
- package/components/Breadcrumb/index.umd.js +19 -7
- package/components/Breadcrumb/index.umd.js.map +1 -1
- package/components/Button/button.js +1 -1
- package/components/Button/index.umd.js +3 -3
- package/components/Card/card.js +1 -1
- package/components/Card/index.umd.js +6 -9
- package/components/Card/index.umd.js.map +1 -1
- package/components/Card/sgds-card.d.ts +3 -3
- package/components/Card/sgds-card.js +3 -3
- package/components/Card/sgds-card.js.map +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.js +3 -3
- package/components/ComboBox/combo-box-item2.js +1 -1
- package/components/ComboBox/combo-box.js +1 -1
- package/components/ComboBox/index.umd.js +14 -9
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +6 -1
- package/components/ComboBox/sgds-combo-box.js +6 -1
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/datepicker-calendar2.js +1 -1
- package/components/Datepicker/datepicker.js +1 -1
- package/components/Datepicker/index.umd.js +9 -9
- package/components/DescriptionList/description-list-group.js +1 -1
- package/components/DescriptionList/description-list.js +1 -1
- package/components/DescriptionList/index.umd.js +18 -20
- package/components/DescriptionList/index.umd.js.map +1 -1
- package/components/DescriptionList/sgds-description-list-group.d.ts +1 -1
- package/components/DescriptionList/sgds-description-list-group.js +11 -11
- package/components/DescriptionList/sgds-description-list-group.js.map +1 -1
- package/components/DescriptionList/sgds-description-list.js +4 -6
- package/components/DescriptionList/sgds-description-list.js.map +1 -1
- package/components/Divider/divider.js +1 -1
- package/components/Divider/index.umd.js +2 -2
- package/components/Drawer/drawer.js +1 -1
- package/components/Drawer/index.umd.js +31 -136
- package/components/Drawer/index.umd.js.map +1 -1
- package/components/Drawer/sgds-drawer.d.ts +3 -32
- package/components/Drawer/sgds-drawer.js +16 -73
- package/components/Drawer/sgds-drawer.js.map +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/index.umd.js +3 -3
- package/components/Dropdown/index.umd.js.map +1 -1
- package/components/Dropdown/sgds-dropdown-item.d.ts +2 -1
- package/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/components/FileUpload/file-upload.js +1 -1
- package/components/FileUpload/index.umd.js +8 -8
- package/components/FileUpload/index.umd.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.js +2 -2
- package/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/components/Footer/footer-item.js +1 -1
- package/components/Footer/footer.js +1 -1
- package/components/Footer/index.umd.js +3 -3
- package/components/Icon/index.umd.js +1 -1
- package/components/IconButton/index.umd.js +2 -2
- package/components/IconList/index.umd.js +1 -1
- package/components/Input/index.umd.js +4 -4
- package/components/Input/input.js +1 -1
- package/components/Link/index.umd.js +15 -3
- package/components/Link/index.umd.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Link/sgds-link.d.ts +2 -1
- package/components/Link/sgds-link.js +13 -1
- package/components/Link/sgds-link.js.map +1 -1
- package/components/Mainnav/index.umd.js +74 -93
- package/components/Mainnav/index.umd.js.map +1 -1
- package/components/Mainnav/mainnav-dropdown.js +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Mainnav/sgds-mainnav-dropdown.d.ts +1 -4
- package/components/Mainnav/sgds-mainnav-dropdown.js +24 -37
- package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/components/Mainnav/sgds-mainnav-item.d.ts +9 -2
- package/components/Mainnav/sgds-mainnav-item.js +58 -3
- package/components/Mainnav/sgds-mainnav-item.js.map +1 -1
- package/components/Mainnav/sgds-mainnav.js +7 -6
- package/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/components/Masthead/index.umd.js +2 -2
- package/components/Masthead/masthead.js +1 -1
- package/components/Modal/index.umd.js +3 -3
- package/components/Modal/modal.js +1 -1
- package/components/Pagination/index.umd.js +4 -4
- package/components/Pagination/pagination.js +1 -1
- package/components/ProgressBar/index.umd.js +3 -3
- package/components/ProgressBar/index.umd.js.map +1 -1
- package/components/ProgressBar/progress-bar.js +1 -1
- package/components/ProgressBar/sgds-progress-bar.d.ts +1 -1
- package/components/ProgressBar/sgds-progress-bar.js +1 -1
- package/components/ProgressBar/sgds-progress-bar.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +5 -10
- package/components/QuantityToggle/index.umd.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.d.ts +0 -2
- package/components/QuantityToggle/sgds-quantity-toggle.js +0 -5
- package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/components/Radio/index.umd.js +3 -3
- package/components/Radio/radio.js +1 -1
- package/components/Sidenav/index.umd.js +40 -44
- package/components/Sidenav/index.umd.js.map +1 -1
- package/components/Sidenav/sgds-sidenav-item.d.ts +14 -16
- package/components/Sidenav/sgds-sidenav-item.js +39 -43
- package/components/Sidenav/sgds-sidenav-item.js.map +1 -1
- package/components/Sidenav/sidenav-item.js +1 -1
- package/components/Sidenav/sidenav-link.js +1 -1
- package/components/Skeleton/index.umd.js +2 -2
- package/components/Skeleton/skeleton.js +1 -1
- package/components/Spinner/index.umd.js +2 -2
- package/components/Spinner/spinner.js +1 -1
- package/components/Stepper/index.umd.js +2 -2
- package/components/Stepper/stepper.js +1 -1
- package/components/Switch/index.umd.js +2 -2
- package/components/Switch/switch.js +1 -1
- package/components/Tab/index.umd.js +2 -2
- package/components/Tab/tab.js +1 -1
- package/components/Table/index.umd.js +63 -205
- package/components/Table/index.umd.js.map +1 -1
- package/components/Table/sgds-table.d.ts +12 -55
- package/components/Table/sgds-table.js +59 -201
- package/components/Table/sgds-table.js.map +1 -1
- package/components/Table/table.js +1 -1
- package/components/TableOfContents/index.d.ts +6 -0
- package/components/TableOfContents/index.js +4 -0
- package/components/TableOfContents/index.js.map +1 -0
- package/components/TableOfContents/index.umd.js +3995 -0
- package/components/TableOfContents/index.umd.js.map +1 -0
- package/components/TableOfContents/sgds-table-of-contents.d.ts +13 -0
- package/components/TableOfContents/sgds-table-of-contents.js +25 -0
- package/components/TableOfContents/sgds-table-of-contents.js.map +1 -0
- package/components/TableOfContents/table-of-contents.js +6 -0
- package/components/TableOfContents/table-of-contents.js.map +1 -0
- package/components/Textarea/index.umd.js +3 -3
- package/components/Textarea/textarea.js +1 -1
- package/components/Toast/index.umd.js +3 -3
- package/components/Toast/toast.js +1 -1
- package/components/Tooltip/index.umd.js +2 -2
- package/components/Tooltip/tooltip.js +1 -1
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/components/index.umd.js +2694 -3016
- package/components/index.umd.js.map +1 -1
- package/css/grid.css +110 -0
- package/css/reboot.css +7 -7
- package/css/sgds.css +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.umd.js +2949 -3271
- package/index.umd.js.map +1 -1
- package/internals/CloseButton/close-button.js +1 -1
- package/internals/OverflowMenu/overflow-menu.js +1 -1
- package/package.json +1 -1
- package/react/base/button.cjs.js +1 -1
- package/react/base/button.js +1 -1
- package/react/base/card-element.cjs.js +0 -3
- package/react/base/card-element.cjs.js.map +1 -1
- package/react/base/card-element.js +0 -3
- package/react/base/card-element.js.map +1 -1
- package/react/base/card.cjs.js +1 -1
- package/react/base/card.js +1 -1
- package/react/base/sgds-element.cjs2.js +1 -1
- package/react/base/sgds-element2.js +1 -1
- package/react/components/Accordion/accordion-item.cjs.js +1 -1
- package/react/components/Accordion/accordion-item.js +1 -1
- package/react/components/Accordion/accordion.cjs.js +1 -1
- package/react/components/Accordion/accordion.js +1 -1
- package/react/components/Accordion/sgds-accordion-item.cjs.js +1 -5
- package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
- package/react/components/Accordion/sgds-accordion-item.js +1 -5
- package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/react/components/Accordion/sgds-accordion.cjs.js +1 -6
- package/react/components/Accordion/sgds-accordion.cjs.js.map +1 -1
- package/react/components/Accordion/sgds-accordion.js +1 -6
- package/react/components/Accordion/sgds-accordion.js.map +1 -1
- package/react/components/Alert/alert.cjs.js +1 -1
- package/react/components/Alert/alert.js +1 -1
- package/react/components/Badge/badge.cjs.js +1 -1
- package/react/components/Badge/badge.js +1 -1
- package/react/components/Breadcrumb/breadcrumb-item.cjs.js +1 -1
- package/react/components/Breadcrumb/breadcrumb-item.js +1 -1
- package/react/components/Button/button.cjs.js +1 -1
- package/react/components/Button/button.js +1 -1
- package/react/components/Card/card.cjs.js +1 -1
- package/react/components/Card/card.js +1 -1
- package/react/components/Card/sgds-card.cjs.js +3 -3
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js +3 -3
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/ComboBox/combo-box-item.cjs2.js +1 -1
- package/react/components/ComboBox/combo-box-item2.js +1 -1
- package/react/components/ComboBox/combo-box.cjs.js +1 -1
- package/react/components/ComboBox/combo-box.js +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +6 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +6 -1
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/Datepicker/datepicker-calendar.cjs2.js +1 -1
- package/react/components/Datepicker/datepicker-calendar2.js +1 -1
- package/react/components/Datepicker/datepicker.cjs.js +1 -1
- package/react/components/Datepicker/datepicker.js +1 -1
- package/react/components/DescriptionList/description-list-group.cjs.js +1 -1
- package/react/components/DescriptionList/description-list-group.js +1 -1
- package/react/components/DescriptionList/description-list.cjs.js +1 -1
- package/react/components/DescriptionList/description-list.js +1 -1
- package/react/components/DescriptionList/sgds-description-list-group.cjs.js +11 -11
- package/react/components/DescriptionList/sgds-description-list-group.cjs.js.map +1 -1
- package/react/components/DescriptionList/sgds-description-list-group.js +11 -11
- package/react/components/DescriptionList/sgds-description-list-group.js.map +1 -1
- package/react/components/DescriptionList/sgds-description-list.cjs.js +4 -6
- package/react/components/DescriptionList/sgds-description-list.cjs.js.map +1 -1
- package/react/components/DescriptionList/sgds-description-list.js +4 -6
- package/react/components/DescriptionList/sgds-description-list.js.map +1 -1
- package/react/components/Divider/divider.cjs.js +1 -1
- package/react/components/Divider/divider.js +1 -1
- package/react/components/Drawer/drawer.cjs.js +1 -1
- package/react/components/Drawer/drawer.js +1 -1
- package/react/components/Drawer/sgds-drawer.cjs.js +15 -72
- package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
- package/react/components/Drawer/sgds-drawer.js +16 -73
- package/react/components/Drawer/sgds-drawer.js.map +1 -1
- package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-item.js +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/react/components/FileUpload/file-upload.cjs.js +1 -1
- package/react/components/FileUpload/file-upload.js +1 -1
- package/react/components/FileUpload/sgds-file-upload.cjs.js +2 -2
- package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
- package/react/components/FileUpload/sgds-file-upload.js +2 -2
- package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/react/components/Footer/footer-item.cjs.js +1 -1
- package/react/components/Footer/footer-item.js +1 -1
- package/react/components/Footer/footer.cjs.js +1 -1
- package/react/components/Footer/footer.js +1 -1
- package/react/components/Input/input.cjs.js +1 -1
- package/react/components/Input/input.js +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +1 -1
- package/react/components/Link/sgds-link.cjs.js +13 -1
- package/react/components/Link/sgds-link.cjs.js.map +1 -1
- package/react/components/Link/sgds-link.js +13 -1
- package/react/components/Link/sgds-link.js.map +1 -1
- package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.js +1 -1
- package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-item.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js +23 -36
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.js +24 -37
- package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-item.cjs.js +58 -3
- package/react/components/Mainnav/sgds-mainnav-item.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-item.js +58 -3
- package/react/components/Mainnav/sgds-mainnav-item.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.cjs.js +7 -6
- package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.js +7 -6
- package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/components/Modal/modal.cjs.js +1 -1
- package/react/components/Modal/modal.js +1 -1
- package/react/components/Pagination/pagination.cjs.js +1 -1
- package/react/components/Pagination/pagination.js +1 -1
- package/react/components/ProgressBar/progress-bar.cjs.js +1 -1
- package/react/components/ProgressBar/progress-bar.js +1 -1
- package/react/components/ProgressBar/sgds-progress-bar.cjs.js +1 -1
- package/react/components/ProgressBar/sgds-progress-bar.cjs.js.map +1 -1
- package/react/components/ProgressBar/sgds-progress-bar.js +1 -1
- package/react/components/ProgressBar/sgds-progress-bar.js.map +1 -1
- package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +0 -5
- package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
- package/react/components/QuantityToggle/sgds-quantity-toggle.js +0 -5
- package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/react/components/Radio/radio.cjs.js +1 -1
- package/react/components/Radio/radio.js +1 -1
- package/react/components/Sidenav/sgds-sidenav-item.cjs.js +37 -41
- package/react/components/Sidenav/sgds-sidenav-item.cjs.js.map +1 -1
- package/react/components/Sidenav/sgds-sidenav-item.js +39 -43
- package/react/components/Sidenav/sgds-sidenav-item.js.map +1 -1
- package/react/components/Sidenav/sidenav-item.cjs.js +1 -1
- package/react/components/Sidenav/sidenav-item.js +1 -1
- package/react/components/Sidenav/sidenav-link.cjs.js +1 -1
- package/react/components/Sidenav/sidenav-link.js +1 -1
- package/react/components/Skeleton/skeleton.cjs.js +1 -1
- package/react/components/Skeleton/skeleton.js +1 -1
- package/react/components/Spinner/spinner.cjs.js +1 -1
- package/react/components/Spinner/spinner.js +1 -1
- package/react/components/Stepper/stepper.cjs.js +1 -1
- package/react/components/Stepper/stepper.js +1 -1
- package/react/components/Switch/switch.cjs.js +1 -1
- package/react/components/Switch/switch.js +1 -1
- package/react/components/Tab/tab.cjs.js +1 -1
- package/react/components/Tab/tab.js +1 -1
- package/react/components/Table/sgds-table.cjs.js +59 -201
- package/react/components/Table/sgds-table.cjs.js.map +1 -1
- package/react/components/Table/sgds-table.js +59 -201
- package/react/components/Table/sgds-table.js.map +1 -1
- package/react/components/Table/table.cjs.js +1 -1
- package/react/components/Table/table.js +1 -1
- package/react/components/TableOfContents/sgds-table-of-contents.cjs.js +31 -0
- package/react/components/TableOfContents/sgds-table-of-contents.cjs.js.map +1 -0
- package/react/components/TableOfContents/sgds-table-of-contents.js +26 -0
- package/react/components/TableOfContents/sgds-table-of-contents.js.map +1 -0
- package/react/components/TableOfContents/table-of-contents.cjs.js +11 -0
- package/react/components/TableOfContents/table-of-contents.cjs.js.map +1 -0
- package/react/components/TableOfContents/table-of-contents.js +7 -0
- package/react/components/TableOfContents/table-of-contents.js.map +1 -0
- package/react/components/Textarea/textarea.cjs.js +1 -1
- package/react/components/Textarea/textarea.js +1 -1
- package/react/components/Toast/toast.cjs.js +1 -1
- package/react/components/Toast/toast.js +1 -1
- package/react/components/Tooltip/tooltip.cjs.js +1 -1
- package/react/components/Tooltip/tooltip.js +1 -1
- package/react/index.cjs.js +94 -94
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -1
- package/react/internals/CloseButton/close-button.cjs.js +1 -1
- package/react/internals/CloseButton/close-button.js +1 -1
- package/react/internals/OverflowMenu/overflow-menu.cjs.js +1 -1
- package/react/internals/OverflowMenu/overflow-menu.js +1 -1
- package/react/styles/feedback.cjs.js +1 -1
- package/react/styles/feedback.js +1 -1
- package/react/{action-card → table-of-contents}/index.cjs.js +5 -7
- package/react/table-of-contents/index.cjs.js.map +1 -0
- package/react/{action-card → table-of-contents}/index.js +5 -7
- package/react/table-of-contents/index.js.map +1 -0
- package/styles/feedback.js +1 -1
- package/themes/day.css +113 -105
- package/themes/night.css +117 -109
- package/themes/root.css +92 -85
- package/base/link-element.js +0 -55
- package/base/link-element.js.map +0 -1
- package/components/ActionCard/action-card.js +0 -6
- package/components/ActionCard/action-card.js.map +0 -1
- package/components/ActionCard/index.d.ts +0 -6
- package/components/ActionCard/index.js +0 -5
- package/components/ActionCard/index.js.map +0 -1
- package/components/ActionCard/index.umd.js +0 -5860
- package/components/ActionCard/index.umd.js.map +0 -1
- package/components/ActionCard/sgds-action-card.d.ts +0 -54
- package/components/ActionCard/sgds-action-card.js +0 -148
- package/components/ActionCard/sgds-action-card.js.map +0 -1
- package/react/action-card/index.cjs.js.map +0 -1
- package/react/action-card/index.js.map +0 -1
- package/react/base/link-element.cjs.js +0 -60
- package/react/base/link-element.cjs.js.map +0 -1
- package/react/base/link-element.js +0 -56
- package/react/base/link-element.js.map +0 -1
- package/react/components/ActionCard/action-card.cjs.js +0 -11
- package/react/components/ActionCard/action-card.cjs.js.map +0 -1
- package/react/components/ActionCard/action-card.js +0 -7
- package/react/components/ActionCard/action-card.js.map +0 -1
- package/react/components/ActionCard/sgds-action-card.cjs.js +0 -154
- package/react/components/ActionCard/sgds-action-card.cjs.js.map +0 -1
- package/react/components/ActionCard/sgds-action-card.js +0 -149
- package/react/components/ActionCard/sgds-action-card.js.map +0 -1
- /package/react/{action-card → table-of-contents}/index.d.ts +0 -0
|
@@ -3,10 +3,9 @@ import SgdsCloseButton from "../../internals/CloseButton/sgds-close-button";
|
|
|
3
3
|
/**
|
|
4
4
|
* @summary Drawers slide in from a container to expose additional options and information.
|
|
5
5
|
*
|
|
6
|
-
* @slot - The drawer's main content
|
|
7
|
-
* @slot
|
|
8
|
-
* @slot
|
|
9
|
-
* @slot footer - The drawer's footer, usually one or more buttons representing various options.
|
|
6
|
+
* @slot default - The drawer's main content
|
|
7
|
+
* @slot title - The title of the drawer
|
|
8
|
+
* @slot description - The description of the drawer
|
|
10
9
|
*
|
|
11
10
|
* @event sgds-show - Emitted when the drawer opens.
|
|
12
11
|
* @event sgds-after-show - Emitted after the drawer opens and all animations are complete.
|
|
@@ -19,22 +18,6 @@ import SgdsCloseButton from "../../internals/CloseButton/sgds-close-button";
|
|
|
19
18
|
* `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in
|
|
20
19
|
* destructive behavior such as data loss.
|
|
21
20
|
*
|
|
22
|
-
* @csspart base - The component's base wrapper.
|
|
23
|
-
* @csspart overlay - The overlay that covers the screen behind the drawer.
|
|
24
|
-
* @csspart panel - The drawer's panel (where the drawer and its content are rendered).
|
|
25
|
-
* @csspart header - The drawer's header. This element wraps the title and header actions.
|
|
26
|
-
* @csspart header-actions - Optional actions to add to the header.
|
|
27
|
-
* @csspart title - The drawer's title.
|
|
28
|
-
* @csspart close-button - The close button.
|
|
29
|
-
* @csspart body - The drawer's body.
|
|
30
|
-
* @csspart footer - The drawer's footer.
|
|
31
|
-
*
|
|
32
|
-
* @cssproperty --drawer-size - The preferred size of the drawer. This will be applied to the drawer's width or height
|
|
33
|
-
* depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.
|
|
34
|
-
* @cssproperty --drawer-padding - The amount of padding to use for the header, body and footer
|
|
35
|
-
* @cssproperty --drawer-bg - The drawer's background color.
|
|
36
|
-
* @cssproperty --drawer-button-gap - The drawer's flex gap between buttons.
|
|
37
|
-
*
|
|
38
21
|
*/
|
|
39
22
|
export declare class SgdsDrawer extends SgdsElement {
|
|
40
23
|
static styles: import("lit").CSSResult[];
|
|
@@ -43,8 +26,6 @@ export declare class SgdsDrawer extends SgdsElement {
|
|
|
43
26
|
"sgds-close-button": typeof SgdsCloseButton;
|
|
44
27
|
};
|
|
45
28
|
/** @internal */
|
|
46
|
-
private readonly hasSlotController;
|
|
47
|
-
/** @internal */
|
|
48
29
|
private originalTrigger;
|
|
49
30
|
/** @internal */
|
|
50
31
|
drawer: HTMLElement;
|
|
@@ -57,11 +38,6 @@ export declare class SgdsDrawer extends SgdsElement {
|
|
|
57
38
|
* use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.
|
|
58
39
|
*/
|
|
59
40
|
open: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* The drawer's label as displayed in the header. You should always include a relevant label even when using
|
|
62
|
-
* `noHeader`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
|
|
63
|
-
*/
|
|
64
|
-
label: string;
|
|
65
41
|
/** The direction from which the drawer will open. */
|
|
66
42
|
placement: "top" | "end" | "bottom" | "start";
|
|
67
43
|
/**
|
|
@@ -69,11 +45,6 @@ export declare class SgdsDrawer extends SgdsElement {
|
|
|
69
45
|
* its parent element, set this attribute and add `position: relative` to the parent.
|
|
70
46
|
*/
|
|
71
47
|
contained: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Removes the header. This will also remove the default close button, so please ensure you provide an easy,
|
|
74
|
-
* accessible way for users to dismiss the drawer.
|
|
75
|
-
*/
|
|
76
|
-
noHeader: boolean;
|
|
77
48
|
firstUpdated(): void;
|
|
78
49
|
disconnectedCallback(): void;
|
|
79
50
|
private uppercaseFirstLetter;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import { html
|
|
2
|
+
import { html } from 'lit';
|
|
3
3
|
import { query, property } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
5
|
import SgdsElement from '../../base/sgds-element.js';
|
|
7
6
|
import { animateTo, stopAnimations } from '../../utils/animate.js';
|
|
8
7
|
import { setDefaultAnimation, getAnimation } from '../../utils/animation-registry.js';
|
|
9
8
|
import { waitForEvent } from '../../utils/event.js';
|
|
10
9
|
import { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll.js';
|
|
11
|
-
import { HasSlotController } from '../../utils/slot.js';
|
|
12
10
|
import { watch } from '../../utils/watch.js';
|
|
13
11
|
import css_248z from './drawer.js';
|
|
14
12
|
import { SgdsCloseButton } from '../../internals/CloseButton/sgds-close-button.js';
|
|
@@ -16,10 +14,9 @@ import { SgdsCloseButton } from '../../internals/CloseButton/sgds-close-button.j
|
|
|
16
14
|
/**
|
|
17
15
|
* @summary Drawers slide in from a container to expose additional options and information.
|
|
18
16
|
*
|
|
19
|
-
* @slot - The drawer's main content
|
|
20
|
-
* @slot
|
|
21
|
-
* @slot
|
|
22
|
-
* @slot footer - The drawer's footer, usually one or more buttons representing various options.
|
|
17
|
+
* @slot default - The drawer's main content
|
|
18
|
+
* @slot title - The title of the drawer
|
|
19
|
+
* @slot description - The description of the drawer
|
|
23
20
|
*
|
|
24
21
|
* @event sgds-show - Emitted when the drawer opens.
|
|
25
22
|
* @event sgds-after-show - Emitted after the drawer opens and all animations are complete.
|
|
@@ -32,38 +29,15 @@ import { SgdsCloseButton } from '../../internals/CloseButton/sgds-close-button.j
|
|
|
32
29
|
* `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in
|
|
33
30
|
* destructive behavior such as data loss.
|
|
34
31
|
*
|
|
35
|
-
* @csspart base - The component's base wrapper.
|
|
36
|
-
* @csspart overlay - The overlay that covers the screen behind the drawer.
|
|
37
|
-
* @csspart panel - The drawer's panel (where the drawer and its content are rendered).
|
|
38
|
-
* @csspart header - The drawer's header. This element wraps the title and header actions.
|
|
39
|
-
* @csspart header-actions - Optional actions to add to the header.
|
|
40
|
-
* @csspart title - The drawer's title.
|
|
41
|
-
* @csspart close-button - The close button.
|
|
42
|
-
* @csspart body - The drawer's body.
|
|
43
|
-
* @csspart footer - The drawer's footer.
|
|
44
|
-
*
|
|
45
|
-
* @cssproperty --drawer-size - The preferred size of the drawer. This will be applied to the drawer's width or height
|
|
46
|
-
* depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.
|
|
47
|
-
* @cssproperty --drawer-padding - The amount of padding to use for the header, body and footer
|
|
48
|
-
* @cssproperty --drawer-bg - The drawer's background color.
|
|
49
|
-
* @cssproperty --drawer-button-gap - The drawer's flex gap between buttons.
|
|
50
|
-
*
|
|
51
32
|
*/
|
|
52
33
|
class SgdsDrawer extends SgdsElement {
|
|
53
34
|
constructor() {
|
|
54
35
|
super(...arguments);
|
|
55
|
-
/** @internal */
|
|
56
|
-
this.hasSlotController = new HasSlotController(this, "footer");
|
|
57
36
|
/**
|
|
58
37
|
* Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can
|
|
59
38
|
* use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.
|
|
60
39
|
*/
|
|
61
40
|
this.open = false;
|
|
62
|
-
/**
|
|
63
|
-
* The drawer's label as displayed in the header. You should always include a relevant label even when using
|
|
64
|
-
* `noHeader`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
|
|
65
|
-
*/
|
|
66
|
-
this.label = "";
|
|
67
41
|
/** The direction from which the drawer will open. */
|
|
68
42
|
this.placement = "end";
|
|
69
43
|
/**
|
|
@@ -71,11 +45,6 @@ class SgdsDrawer extends SgdsElement {
|
|
|
71
45
|
* its parent element, set this attribute and add `position: relative` to the parent.
|
|
72
46
|
*/
|
|
73
47
|
this.contained = false;
|
|
74
|
-
/**
|
|
75
|
-
* Removes the header. This will also remove the default close button, so please ensure you provide an easy,
|
|
76
|
-
* accessible way for users to dismiss the drawer.
|
|
77
|
-
*/
|
|
78
|
-
this.noHeader = false;
|
|
79
48
|
this.handleDocumentKeyDown = (event) => {
|
|
80
49
|
if (this.open && !this.contained && event.key === "Escape") {
|
|
81
50
|
event.stopPropagation();
|
|
@@ -224,7 +193,6 @@ class SgdsDrawer extends SgdsElement {
|
|
|
224
193
|
render() {
|
|
225
194
|
return html `
|
|
226
195
|
<div
|
|
227
|
-
part="base"
|
|
228
196
|
class=${classMap({
|
|
229
197
|
drawer: true,
|
|
230
198
|
"drawer-open": this.open,
|
|
@@ -233,47 +201,28 @@ class SgdsDrawer extends SgdsElement {
|
|
|
233
201
|
"drawer-bottom": this.placement === "bottom",
|
|
234
202
|
"drawer-start": this.placement === "start",
|
|
235
203
|
"drawer-contained": this.contained,
|
|
236
|
-
"drawer-fixed": !this.contained
|
|
237
|
-
"drawer-has-footer": this.hasSlotController.test("footer")
|
|
204
|
+
"drawer-fixed": !this.contained
|
|
238
205
|
})}
|
|
239
206
|
>
|
|
240
|
-
<div
|
|
207
|
+
<div class="drawer-overlay" @click=${() => this.requestClose("overlay")} tabindex="-1"></div>
|
|
241
208
|
|
|
242
209
|
<div
|
|
243
|
-
part="panel"
|
|
244
210
|
class="drawer-panel"
|
|
245
211
|
role="dialog"
|
|
246
212
|
aria-modal="true"
|
|
247
213
|
aria-hidden=${this.open ? "false" : "true"}
|
|
248
|
-
aria-label=${ifDefined(this.noHeader ? this.label : undefined)}
|
|
249
|
-
aria-labelledby=${ifDefined(!this.noHeader ? "title" : undefined)}
|
|
250
214
|
tabindex="0"
|
|
251
215
|
>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
part="close-button"
|
|
263
|
-
class="drawer-close"
|
|
264
|
-
aria-label="close drawer"
|
|
265
|
-
@click="${() => this.requestClose("close-button")}"
|
|
266
|
-
></sgds-close-button>
|
|
267
|
-
</div>
|
|
268
|
-
</header>
|
|
269
|
-
`
|
|
270
|
-
: nothing}
|
|
271
|
-
|
|
272
|
-
<slot part="body" class="drawer-body"></slot>
|
|
273
|
-
|
|
274
|
-
<footer part="footer" class="drawer-footer">
|
|
275
|
-
<slot name="footer"></slot>
|
|
276
|
-
</footer>
|
|
216
|
+
<header class="drawer-header">
|
|
217
|
+
<slot name="title"></slot>
|
|
218
|
+
<slot name="description"></slot>
|
|
219
|
+
<sgds-close-button
|
|
220
|
+
class="drawer-close"
|
|
221
|
+
aria-label="close drawer"
|
|
222
|
+
@click="${() => this.requestClose("close-button")}"
|
|
223
|
+
></sgds-close-button>
|
|
224
|
+
</header>
|
|
225
|
+
<slot class="drawer-body"></slot>
|
|
277
226
|
</div>
|
|
278
227
|
</div>
|
|
279
228
|
`;
|
|
@@ -296,18 +245,12 @@ __decorate([
|
|
|
296
245
|
__decorate([
|
|
297
246
|
property({ type: Boolean, reflect: true })
|
|
298
247
|
], SgdsDrawer.prototype, "open", void 0);
|
|
299
|
-
__decorate([
|
|
300
|
-
property({ type: String, reflect: true })
|
|
301
|
-
], SgdsDrawer.prototype, "label", void 0);
|
|
302
248
|
__decorate([
|
|
303
249
|
property({ type: String, reflect: true })
|
|
304
250
|
], SgdsDrawer.prototype, "placement", void 0);
|
|
305
251
|
__decorate([
|
|
306
252
|
property({ type: Boolean, reflect: true })
|
|
307
253
|
], SgdsDrawer.prototype, "contained", void 0);
|
|
308
|
-
__decorate([
|
|
309
|
-
property({ type: Boolean, reflect: true })
|
|
310
|
-
], SgdsDrawer.prototype, "noHeader", void 0);
|
|
311
254
|
__decorate([
|
|
312
255
|
watch("open", { waitUntilFirstUpdate: true })
|
|
313
256
|
], SgdsDrawer.prototype, "handleOpenChange", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-drawer.js","sources":["../../../src/components/Drawer/sgds-drawer.ts"],"sourcesContent":["import { html, nothing } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { animateTo, stopAnimations } from \"../../utils/animate.js\";\nimport { getAnimation, setDefaultAnimation } from \"../../utils/animation-registry.js\";\nimport { waitForEvent } from \"../../utils/event.js\";\nimport { lockBodyScrolling, unlockBodyScrolling } from \"../../utils/scroll.js\";\nimport { HasSlotController } from \"../../utils/slot.js\";\nimport { watch } from \"../../utils/watch.js\";\nimport drawerStyles from \"./drawer.css\";\nimport SgdsCloseButton from \"../../internals/CloseButton/sgds-close-button\";\n\n/**\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event sgds-show - Emitted when the drawer opens.\n * @event sgds-after-show - Emitted after the drawer opens and all animations are complete.\n * @event sgds-hide - Emitted when the drawer closes.\n * @event sgds-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event sgds-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} sgds-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --drawer-size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --drawer-padding - The amount of padding to use for the header, body and footer\n * @cssproperty --drawer-bg - The drawer's background color.\n * @cssproperty --drawer-button-gap - The drawer's flex gap between buttons.\n *\n */\nexport class SgdsDrawer extends SgdsElement {\n static styles = [...SgdsElement.styles, drawerStyles];\n /**@internal */\n static dependencies = {\n \"sgds-close-button\": SgdsCloseButton\n };\n /** @internal */\n private readonly hasSlotController = new HasSlotController(this, \"footer\");\n /** @internal */\n private originalTrigger: HTMLElement | null;\n /** @internal */\n @query(\".drawer\") drawer: HTMLElement;\n /** @internal */\n @query(\".drawer-panel\") panel: HTMLElement;\n /** @internal */\n @query(\".drawer-overlay\") overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `noHeader`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ type: String, reflect: true }) label = \"\";\n\n /** The direction from which the drawer will open. */\n @property({ type: String, reflect: true }) placement: \"top\" | \"end\" | \"bottom\" | \"start\" = \"end\";\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ type: Boolean, reflect: true }) noHeader = false;\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private uppercaseFirstLetter(string: string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n private requestClose(source: \"close-button\" | \"keyboard\" | \"overlay\") {\n const slRequestClose = this.emit(\"sgds-request-close\", {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, \"drawer.denyClose\");\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener(\"keydown\", this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener(\"keydown\", this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (this.open && !this.contained && event.key === \"Escape\") {\n event.stopPropagation();\n this.requestClose(\"keyboard\");\n }\n };\n\n @watch(\"open\", { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit(\"sgds-show\");\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n // Related: https://github.com/shoelace-style/shoelace/issues/693\n //\n const autoFocusTarget = this.querySelector(\"[autofocus]\");\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute(\"autofocus\");\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit(\"sgds-initial-focus\", { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute(\"autofocus\", \"\");\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${this.uppercaseFirstLetter(this.placement)}`);\n const overlayAnimation = getAnimation(this, \"drawer.overlay.show\");\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit(\"sgds-after-show\");\n } else {\n // Hide\n this.emit(\"sgds-hide\");\n this.removeOpenListeners();\n\n if (!this.contained) {\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${this.uppercaseFirstLetter(this.placement)}`);\n const overlayAnimation = getAnimation(this, \"drawer.overlay.hide\");\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === \"function\") {\n setTimeout(() => trigger.focus());\n }\n\n this.emit(\"sgds-after-hide\");\n }\n }\n\n @watch(\"contained\", { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n public async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, \"sgds-after-show\");\n }\n\n /** Hides the drawer */\n public async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, \"sgds-after-hide\");\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n \"drawer-open\": this.open,\n \"drawer-top\": this.placement === \"top\",\n \"drawer-end\": this.placement === \"end\",\n \"drawer-bottom\": this.placement === \"bottom\",\n \"drawer-start\": this.placement === \"start\",\n \"drawer-contained\": this.contained,\n \"drawer-fixed\": !this.contained,\n \"drawer-has-footer\": this.hasSlotController.test(\"footer\")\n })}\n >\n <div part=\"overlay\" class=\"drawer-overlay\" @click=${() => this.requestClose(\"overlay\")} tabindex=\"-1\"></div>\n\n <div\n part=\"panel\"\n class=\"drawer-panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? \"false\" : \"true\"}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? \"title\" : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer-header\">\n <h2 part=\"title\" class=\"drawer-title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer-header-actions\">\n <slot name=\"header-actions\"></slot>\n <sgds-close-button\n part=\"close-button\"\n class=\"drawer-close\"\n aria-label=\"close drawer\"\n @click=\"${() => this.requestClose(\"close-button\")}\"\n ></sgds-close-button>\n </div>\n </header>\n `\n : nothing}\n\n <slot part=\"body\" class=\"drawer-body\"></slot>\n\n <footer part=\"footer\" class=\"drawer-footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation(\"drawer.showTop\", {\n keyframes: [\n { opacity: 0, translate: \"0 -100%\" },\n { opacity: 1, translate: \"0 0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideTop\", {\n keyframes: [\n { opacity: 1, translate: \"0 0\" },\n { opacity: 0, translate: \"0 -100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// End\nsetDefaultAnimation(\"drawer.showEnd\", {\n keyframes: [\n { opacity: 0, translate: \"100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: \"-100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideEnd\", {\n keyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"100%\" }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"-100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// Bottom\nsetDefaultAnimation(\"drawer.showBottom\", {\n keyframes: [\n { opacity: 0, translate: \"0 100%\" },\n { opacity: 1, translate: \"0 0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideBottom\", {\n keyframes: [\n { opacity: 1, translate: \"0 0\" },\n { opacity: 0, translate: \"0 100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// Start\nsetDefaultAnimation(\"drawer.showStart\", {\n keyframes: [\n { opacity: 0, translate: \"-100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: \"100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideStart\", {\n keyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"-100%\" }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// Deny close\nsetDefaultAnimation(\"drawer.denyClose\", {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation(\"drawer.overlay.show\", {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation(\"drawer.overlay.hide\", {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\nexport default SgdsDrawer;\n"],"names":["drawerStyles"],"mappings":";;;;;;;;;;;;;;;AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCG;AACG,MAAO,UAAW,SAAQ,WAAW,CAAA;AAA3C,IAAA,WAAA,GAAA;;;QAOmB,IAAiB,CAAA,iBAAA,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAU3E;;;AAGG;QACyC,IAAI,CAAA,IAAA,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;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;AACzC,IAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AAC3C,IAAA,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;AAC3B,CAAA,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"sgds-drawer.js","sources":["../../../src/components/Drawer/sgds-drawer.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { animateTo, stopAnimations } from \"../../utils/animate.js\";\nimport { getAnimation, setDefaultAnimation } from \"../../utils/animation-registry.js\";\nimport { waitForEvent } from \"../../utils/event.js\";\nimport { lockBodyScrolling, unlockBodyScrolling } from \"../../utils/scroll.js\";\nimport { watch } from \"../../utils/watch.js\";\nimport drawerStyles from \"./drawer.css\";\nimport SgdsCloseButton from \"../../internals/CloseButton/sgds-close-button\";\n\n/**\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @slot default - The drawer's main content\n * @slot title - The title of the drawer\n * @slot description - The description of the drawer\n *\n * @event sgds-show - Emitted when the drawer opens.\n * @event sgds-after-show - Emitted after the drawer opens and all animations are complete.\n * @event sgds-hide - Emitted when the drawer closes.\n * @event sgds-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event sgds-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} sgds-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n */\nexport class SgdsDrawer extends SgdsElement {\n static styles = [...SgdsElement.styles, drawerStyles];\n /**@internal */\n static dependencies = {\n \"sgds-close-button\": SgdsCloseButton\n };\n\n /** @internal */\n private originalTrigger: HTMLElement | null;\n /** @internal */\n @query(\".drawer\") drawer: HTMLElement;\n /** @internal */\n @query(\".drawer-panel\") panel: HTMLElement;\n /** @internal */\n @query(\".drawer-overlay\") overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** The direction from which the drawer will open. */\n @property({ type: String, reflect: true }) placement: \"top\" | \"end\" | \"bottom\" | \"start\" = \"end\";\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private uppercaseFirstLetter(string: string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n private requestClose(source: \"close-button\" | \"keyboard\" | \"overlay\") {\n const slRequestClose = this.emit(\"sgds-request-close\", {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, \"drawer.denyClose\");\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener(\"keydown\", this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener(\"keydown\", this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (this.open && !this.contained && event.key === \"Escape\") {\n event.stopPropagation();\n this.requestClose(\"keyboard\");\n }\n };\n\n @watch(\"open\", { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit(\"sgds-show\");\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n // Related: https://github.com/shoelace-style/shoelace/issues/693\n //\n const autoFocusTarget = this.querySelector(\"[autofocus]\");\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute(\"autofocus\");\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit(\"sgds-initial-focus\", { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute(\"autofocus\", \"\");\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${this.uppercaseFirstLetter(this.placement)}`);\n const overlayAnimation = getAnimation(this, \"drawer.overlay.show\");\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit(\"sgds-after-show\");\n } else {\n // Hide\n this.emit(\"sgds-hide\");\n this.removeOpenListeners();\n\n if (!this.contained) {\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${this.uppercaseFirstLetter(this.placement)}`);\n const overlayAnimation = getAnimation(this, \"drawer.overlay.hide\");\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === \"function\") {\n setTimeout(() => trigger.focus());\n }\n\n this.emit(\"sgds-after-hide\");\n }\n }\n\n @watch(\"contained\", { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n public async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, \"sgds-after-show\");\n }\n\n /** Hides the drawer */\n public async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, \"sgds-after-hide\");\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n drawer: true,\n \"drawer-open\": this.open,\n \"drawer-top\": this.placement === \"top\",\n \"drawer-end\": this.placement === \"end\",\n \"drawer-bottom\": this.placement === \"bottom\",\n \"drawer-start\": this.placement === \"start\",\n \"drawer-contained\": this.contained,\n \"drawer-fixed\": !this.contained\n })}\n >\n <div class=\"drawer-overlay\" @click=${() => this.requestClose(\"overlay\")} tabindex=\"-1\"></div>\n\n <div\n class=\"drawer-panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? \"false\" : \"true\"}\n tabindex=\"0\"\n >\n <header class=\"drawer-header\">\n <slot name=\"title\"></slot>\n <slot name=\"description\"></slot>\n <sgds-close-button\n class=\"drawer-close\"\n aria-label=\"close drawer\"\n @click=\"${() => this.requestClose(\"close-button\")}\"\n ></sgds-close-button>\n </header>\n <slot class=\"drawer-body\"></slot>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation(\"drawer.showTop\", {\n keyframes: [\n { opacity: 0, translate: \"0 -100%\" },\n { opacity: 1, translate: \"0 0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideTop\", {\n keyframes: [\n { opacity: 1, translate: \"0 0\" },\n { opacity: 0, translate: \"0 -100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// End\nsetDefaultAnimation(\"drawer.showEnd\", {\n keyframes: [\n { opacity: 0, translate: \"100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: \"-100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideEnd\", {\n keyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"100%\" }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"-100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// Bottom\nsetDefaultAnimation(\"drawer.showBottom\", {\n keyframes: [\n { opacity: 0, translate: \"0 100%\" },\n { opacity: 1, translate: \"0 0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideBottom\", {\n keyframes: [\n { opacity: 1, translate: \"0 0\" },\n { opacity: 0, translate: \"0 100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// Start\nsetDefaultAnimation(\"drawer.showStart\", {\n keyframes: [\n { opacity: 0, translate: \"-100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: \"100%\" },\n { opacity: 1, translate: \"0\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\nsetDefaultAnimation(\"drawer.hideStart\", {\n keyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"-100%\" }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: \"0\" },\n { opacity: 0, translate: \"100%\" }\n ],\n options: { duration: 250, easing: \"ease\" }\n});\n\n// Deny close\nsetDefaultAnimation(\"drawer.denyClose\", {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation(\"drawer.overlay.show\", {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation(\"drawer.overlay.hide\", {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\nexport default SgdsDrawer;\n"],"names":["drawerStyles"],"mappings":";;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;AAkBG;AACG,MAAO,UAAW,SAAQ,WAAW,CAAA;AAA3C,IAAA,WAAA,GAAA;;AAgBE;;;AAGG;QACyC,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;;QAGd,IAAS,CAAA,SAAA,GAAuC,KAAK,CAAC;AAEjG;;;AAGG;QACyC,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AA8CtD,QAAA,IAAA,CAAA,qBAAqB,GAAG,CAAC,KAAoB,KAAI;AACvD,YAAA,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;gBAC1D,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,gBAAA,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;aAC/B;AACH,SAAC,CAAC;KAqKH;IAtNC,YAAY,GAAA;QACV,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAEhC,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb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-
var css_248z = css`.dropdown-item{align-items:center;background-color:var(--sgds-
|
|
3
|
+
var css_248z = css`.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit;white-space:nowrap}.dropdown-item:not(.nav-link):hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:not(.nav-link):focus,.dropdown-item:not(.nav-link):focus-visible{background-color:var(--sgds-bg-translucent-subtle);box-shadow:inset var(--sgds-form-box-shadow-focus);outline:0}.dropdown-item:not(.nav-link).active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-50);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}.nav-link{gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}.nav-link:hover{color:var(--sgds-primary-color-default)}.nav-link:focus,.nav-link:focus-visible{outline:0}.nav-link:focus-visible{box-shadow:var(--sgds-box-shadow-focus) inset;color:var(--sgds-primary-color-default)}.nav-link.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default)}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=dropdown-item.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-
|
|
3
|
+
var css_248z = css`.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1000}.dropdown .dropdown-menu{max-height:var(--sgds-dimension-192)}.dropdown-menu.show{display:block}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:576px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:992px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1200px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1400px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -7952,7 +7952,7 @@
|
|
|
7952
7952
|
return target;
|
|
7953
7953
|
};
|
|
7954
7954
|
|
|
7955
|
-
var css_248z$4 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}a[target=_blank]{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)
|
|
7955
|
+
var css_248z$4 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}a[target=_blank]{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.274 3.9H9.3a.6.6 0 0 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.361 6.41c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v5.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h5.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.469-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.274c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.524-.042-1.175-.042-1.993V9.274c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C7.805 3.9 8.456 3.9 9.274 3.9Zm3.626.6a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V5.949l-5.976 5.975a.6.6 0 0 1-.848-.848L18.05 5.1H13.5a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.274 3.9H9.3a.6.6 0 0 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.361 6.41c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v5.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h5.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.469-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.274c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.524-.042-1.175-.042-1.993V9.274c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C7.805 3.9 8.456 3.9 9.274 3.9Zm3.626.6a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V5.949l-5.976 5.975a.6.6 0 0 1-.848-.848L18.05 5.1H13.5a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;padding:0 .45em}::slotted(svg){vertical-align:middle}}`;
|
|
7956
7956
|
|
|
7957
7957
|
/**
|
|
7958
7958
|
* @cssprop --sgds-{stateColor} - State colors in hexadecimal value
|
|
@@ -8359,7 +8359,7 @@
|
|
|
8359
8359
|
};
|
|
8360
8360
|
}
|
|
8361
8361
|
|
|
8362
|
-
var css_248z$3 = css`.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-
|
|
8362
|
+
var css_248z$3 = css`.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1000}.dropdown .dropdown-menu{max-height:var(--sgds-dimension-192)}.dropdown-menu.show{display:block}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:576px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:992px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1200px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1400px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`;
|
|
8363
8363
|
|
|
8364
8364
|
var css_248z$2 = css`:host{position:relative}.dropdown{display:flex;height:100%}`;
|
|
8365
8365
|
|
|
@@ -8752,7 +8752,7 @@
|
|
|
8752
8752
|
state()
|
|
8753
8753
|
], SgdsIcon.prototype, "_svgContent", void 0);
|
|
8754
8754
|
|
|
8755
|
-
var css_248z = css`.dropdown-item{align-items:center;background-color:var(--sgds-
|
|
8755
|
+
var css_248z = css`.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit;white-space:nowrap}.dropdown-item:not(.nav-link):hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:not(.nav-link):focus,.dropdown-item:not(.nav-link):focus-visible{background-color:var(--sgds-bg-translucent-subtle);box-shadow:inset var(--sgds-form-box-shadow-focus);outline:0}.dropdown-item:not(.nav-link).active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-50);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}.nav-link{gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}.nav-link:hover{color:var(--sgds-primary-color-default)}.nav-link:focus,.nav-link:focus-visible{outline:0}.nav-link:focus-visible{box-shadow:var(--sgds-box-shadow-focus) inset;color:var(--sgds-primary-color-default)}.nav-link.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default)}`;
|
|
8756
8756
|
|
|
8757
8757
|
/**
|
|
8758
8758
|
* @summary `SgdsDropdownItem` are navigation links built with `HTMLAnchorElement`. It should be used in the default slot of `SgdsDropdown`
|