@govtechsg/sgds-web-component 3.2.0 → 3.3.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 +46 -15
- package/components/Badge/badge.js +1 -1
- package/components/Badge/index.umd.js +4532 -197
- package/components/Badge/index.umd.js.map +1 -1
- package/components/Badge/sgds-badge.js +70 -30
- package/components/Badge/sgds-badge.js.map +1 -1
- package/components/Breadcrumb/index.umd.js +3 -3
- package/components/Breadcrumb/index.umd.js.map +1 -1
- package/components/Card/index.umd.js +2 -2
- package/components/Card/index.umd.js.map +1 -1
- package/components/ComboBox/combo-box-item2.js +1 -1
- package/components/ComboBox/index.umd.js +1321 -174
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/Datepicker/index.umd.js +61 -17
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.js +29 -11
- package/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/components/DescriptionList/index.umd.js.map +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/index.umd.js +1 -1
- package/components/IconList/icon-list.js +1 -1
- package/components/IconList/index.umd.js +1 -1
- package/components/Input/index.umd.js +33 -6
- package/components/Input/index.umd.js.map +1 -1
- package/components/Input/input.js +1 -1
- package/components/Input/sgds-input.js +32 -5
- package/components/Input/sgds-input.js.map +1 -1
- package/components/Link/index.umd.js +2 -2
- package/components/Link/index.umd.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Link/sgds-link.js +1 -1
- package/components/Link/sgds-link.js.map +1 -1
- package/components/Mainnav/index.umd.js +4 -4
- package/components/Mainnav/index.umd.js.map +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Mainnav/sgds-mainnav.js +1 -1
- package/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/components/Masthead/index.umd.js +46 -15
- package/components/Masthead/index.umd.js.map +1 -1
- package/components/Masthead/masthead.js +1 -1
- package/components/Masthead/sgds-masthead.js +45 -14
- package/components/Masthead/sgds-masthead.js.map +1 -1
- package/components/Modal/index.umd.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +33 -6
- package/components/QuantityToggle/index.umd.js.map +1 -1
- package/components/Select/index.umd.js +1 -1
- package/components/Select/select-item2.js +1 -1
- package/components/Subnav/index.umd.js +1 -1
- package/components/Subnav/subnav.js +1 -1
- package/components/Switch/index.umd.js.map +1 -1
- package/components/Table/index.umd.js.map +1 -1
- package/components/Tooltip/index.umd.js +1 -1
- package/components/Tooltip/tooltip.js +1 -1
- package/components/index.umd.js +18901 -18771
- package/components/index.umd.js.map +1 -1
- package/css/reboot.css +0 -1
- package/index.umd.js +18885 -18755
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Badge/badge.cjs.js +1 -1
- package/react/components/Badge/badge.js +1 -1
- package/react/components/Badge/sgds-badge.cjs.js +69 -29
- package/react/components/Badge/sgds-badge.cjs.js.map +1 -1
- package/react/components/Badge/sgds-badge.js +70 -30
- package/react/components/Badge/sgds-badge.js.map +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/Datepicker/sgds-datepicker.cjs.js +29 -11
- package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
- package/react/components/Datepicker/sgds-datepicker.js +29 -11
- package/react/components/Datepicker/sgds-datepicker.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/IconList/icon-list.cjs.js +1 -1
- package/react/components/IconList/icon-list.js +1 -1
- package/react/components/Input/input.cjs.js +1 -1
- package/react/components/Input/input.js +1 -1
- package/react/components/Input/sgds-input.cjs.js +32 -5
- package/react/components/Input/sgds-input.cjs.js.map +1 -1
- package/react/components/Input/sgds-input.js +32 -5
- package/react/components/Input/sgds-input.js.map +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 +1 -1
- package/react/components/Link/sgds-link.cjs.js.map +1 -1
- package/react/components/Link/sgds-link.js +1 -1
- package/react/components/Link/sgds-link.js.map +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.cjs.js +1 -1
- package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.js +1 -1
- 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/Masthead/sgds-masthead.cjs.js +45 -14
- package/react/components/Masthead/sgds-masthead.cjs.js.map +1 -1
- package/react/components/Masthead/sgds-masthead.js +45 -14
- package/react/components/Masthead/sgds-masthead.js.map +1 -1
- package/react/components/Select/select-item.cjs2.js +1 -1
- package/react/components/Select/select-item2.js +1 -1
- package/react/components/Subnav/subnav.cjs.js +1 -1
- package/react/components/Subnav/subnav.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 +8 -8
- package/react/index.js +1 -1
- package/react/utils/slot.cjs.js +18 -0
- package/react/utils/slot.cjs.js.map +1 -1
- package/react/utils/slot.js +18 -1
- package/react/utils/slot.js.map +1 -1
- package/scripts/figma/sync-figma-to-tokens/__tests__/write-tokens-to-css-var.test.d.ts +0 -0
- package/scripts/figma/sync-figma-to-tokens/color.d.ts +8 -0
- package/scripts/figma/sync-figma-to-tokens/figma_api.d.ts +8 -0
- package/scripts/figma/sync-figma-to-tokens/sync-figma-to-tokens.d.ts +1 -0
- package/scripts/figma/sync-figma-to-tokens/token_export.d.ts +5 -0
- package/scripts/figma/sync-figma-to-tokens/token_types.d.ts +52 -0
- package/scripts/figma/sync-figma-to-tokens/utils.d.ts +3 -0
- package/scripts/figma/sync-figma-to-tokens/write-tokens-to-css-var.d.ts +8 -0
- package/{components → src/components}/Badge/sgds-badge.d.ts +11 -0
- package/{components → src/components}/Datepicker/sgds-datepicker.d.ts +13 -3
- package/{components → src/components}/Input/sgds-input.d.ts +5 -1
- package/{components → src/components}/Link/sgds-link.d.ts +2 -2
- package/themes/day.css +1 -0
- package/themes/night.css +1 -0
- package/themes/root.css +2 -0
- package/utils/slot.js +18 -1
- package/utils/slot.js.map +1 -1
- package/{base → src/base}/button-element.d.ts +0 -0
- package/{base → src/base}/card-element.d.ts +0 -0
- package/{base → src/base}/dropdown-element.d.ts +0 -0
- package/{base → src/base}/dropdown-list-element.d.ts +0 -0
- package/{base → src/base}/form-control-element.d.ts +0 -0
- package/{base → src/base}/link-element.d.ts +0 -0
- package/{base → src/base}/select-element.d.ts +0 -0
- package/{base → src/base}/sgds-element.d.ts +0 -0
- package/{components → src/components}/Accordion/index.d.ts +0 -0
- package/{components → src/components}/Accordion/sgds-accordion-item.d.ts +0 -0
- package/{components → src/components}/Accordion/sgds-accordion.d.ts +0 -0
- package/{components → src/components}/Alert/index.d.ts +0 -0
- package/{components → src/components}/Alert/sgds-alert-link.d.ts +0 -0
- package/{components → src/components}/Alert/sgds-alert.d.ts +0 -0
- package/{components → src/components}/Badge/index.d.ts +0 -0
- package/{components → src/components}/Breadcrumb/index.d.ts +0 -0
- package/{components → src/components}/Breadcrumb/sgds-breadcrumb-item.d.ts +0 -0
- package/{components → src/components}/Breadcrumb/sgds-breadcrumb.d.ts +0 -0
- package/{components → src/components}/Button/index.d.ts +0 -0
- package/{components → src/components}/Button/sgds-button.d.ts +0 -0
- package/{components → src/components}/Card/index.d.ts +0 -0
- package/{components → src/components}/Card/sgds-card.d.ts +0 -0
- package/{components → src/components}/Checkbox/index.d.ts +0 -0
- package/{components → src/components}/Checkbox/sgds-checkbox-group.d.ts +0 -0
- package/{components → src/components}/Checkbox/sgds-checkbox.d.ts +0 -0
- package/{components → src/components}/ComboBox/combo-box-item.d.ts +0 -0
- package/{components → src/components}/ComboBox/index.d.ts +0 -0
- package/{components → src/components}/ComboBox/sgds-combo-box.d.ts +0 -0
- package/{components → src/components}/Datepicker/datepicker-calendar.d.ts +0 -0
- package/{components → src/components}/Datepicker/datepicker-header.d.ts +0 -0
- package/{components → src/components}/Datepicker/datepicker-input.d.ts +0 -0
- package/{components → src/components}/Datepicker/index.d.ts +0 -0
- package/{components → src/components}/Datepicker/types.d.ts +0 -0
- package/{components → src/components}/DescriptionList/index.d.ts +0 -0
- package/{components → src/components}/DescriptionList/sgds-description-list-group.d.ts +0 -0
- package/{components → src/components}/DescriptionList/sgds-description-list.d.ts +0 -0
- package/{components → src/components}/Divider/index.d.ts +0 -0
- package/{components → src/components}/Divider/sgds-divider.d.ts +0 -0
- package/{components → src/components}/Drawer/index.d.ts +0 -0
- package/{components → src/components}/Drawer/sgds-drawer.d.ts +0 -0
- package/{components → src/components}/Dropdown/index.d.ts +0 -0
- package/{components → src/components}/Dropdown/sgds-dropdown-item.d.ts +0 -0
- package/{components → src/components}/Dropdown/sgds-dropdown.d.ts +0 -0
- package/{components → src/components}/FileUpload/index.d.ts +0 -0
- package/{components → src/components}/FileUpload/sgds-file-upload.d.ts +0 -0
- package/{components → src/components}/Footer/index.d.ts +0 -0
- package/{components → src/components}/Footer/sgds-footer-item.d.ts +0 -0
- package/{components → src/components}/Footer/sgds-footer.d.ts +0 -0
- package/{components → src/components}/Icon/icon-registry.d.ts +0 -0
- package/{components → src/components}/Icon/icons/archive.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-bar-down.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-bar-left.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-bar-right.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-bar-up.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-circle-down.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-circle-left.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-circle-right.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-circle-up.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-clockwise.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-down.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-left.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-repeat.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-right.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-square-down.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-square-left.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-square-right.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-square-up.d.ts +0 -0
- package/{components → src/components}/Icon/icons/arrow-up.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bank-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bell-slash.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bell.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bi-funnel.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bookmark-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bookmark.d.ts +0 -0
- package/{components → src/components}/Icon/icons/box-arrow-up-right.d.ts +0 -0
- package/{components → src/components}/Icon/icons/box-seam.d.ts +0 -0
- package/{components → src/components}/Icon/icons/building.d.ts +0 -0
- package/{components → src/components}/Icon/icons/bus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/calculator.d.ts +0 -0
- package/{components → src/components}/Icon/icons/calendar-check.d.ts +0 -0
- package/{components → src/components}/Icon/icons/calendar-x.d.ts +0 -0
- package/{components → src/components}/Icon/icons/calendar.d.ts +0 -0
- package/{components → src/components}/Icon/icons/camera.d.ts +0 -0
- package/{components → src/components}/Icon/icons/car.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chat-dots.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chat-left-text.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chat.d.ts +0 -0
- package/{components → src/components}/Icon/icons/check-circle-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/check-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/check.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chevron-down.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chevron-left.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chevron-right.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chevron-selector-vertical.d.ts +0 -0
- package/{components → src/components}/Icon/icons/chevron-up.d.ts +0 -0
- package/{components → src/components}/Icon/icons/clock.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cloud-check.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cloud-download.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cloud-upload.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cloud.d.ts +0 -0
- package/{components → src/components}/Icon/icons/compass.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cross.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cursor-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/cursor.d.ts +0 -0
- package/{components → src/components}/Icon/icons/dash-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/dash-square.d.ts +0 -0
- package/{components → src/components}/Icon/icons/dash.d.ts +0 -0
- package/{components → src/components}/Icon/icons/download.d.ts +0 -0
- package/{components → src/components}/Icon/icons/edit.d.ts +0 -0
- package/{components → src/components}/Icon/icons/exclamation-circle-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/exclamation-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/exclamation-triangle-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/exclamation-triangle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/exclamation.d.ts +0 -0
- package/{components → src/components}/Icon/icons/eye-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/eye-slash-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/eye-slash.d.ts +0 -0
- package/{components → src/components}/Icon/icons/eye.d.ts +0 -0
- package/{components → src/components}/Icon/icons/facebook.d.ts +0 -0
- package/{components → src/components}/Icon/icons/file-earmark-text.d.ts +0 -0
- package/{components → src/components}/Icon/icons/file-pdf.d.ts +0 -0
- package/{components → src/components}/Icon/icons/file-plus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/file-text.d.ts +0 -0
- package/{components → src/components}/Icon/icons/file.d.ts +0 -0
- package/{components → src/components}/Icon/icons/files.d.ts +0 -0
- package/{components → src/components}/Icon/icons/folder-check.d.ts +0 -0
- package/{components → src/components}/Icon/icons/folder-minus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/folder-plus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/folder.d.ts +0 -0
- package/{components → src/components}/Icon/icons/gear.d.ts +0 -0
- package/{components → src/components}/Icon/icons/geo-alt.d.ts +0 -0
- package/{components → src/components}/Icon/icons/geo-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/geo.d.ts +0 -0
- package/{components → src/components}/Icon/icons/globe-alt.d.ts +0 -0
- package/{components → src/components}/Icon/icons/globe.d.ts +0 -0
- package/{components → src/components}/Icon/icons/google.d.ts +0 -0
- package/{components → src/components}/Icon/icons/grid-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/hand-thumbs-down.d.ts +0 -0
- package/{components → src/components}/Icon/icons/hand-thumbs-up.d.ts +0 -0
- package/{components → src/components}/Icon/icons/hard-drive.d.ts +0 -0
- package/{components → src/components}/Icon/icons/heart.d.ts +0 -0
- package/{components → src/components}/Icon/icons/house-door.d.ts +0 -0
- package/{components → src/components}/Icon/icons/house.d.ts +0 -0
- package/{components → src/components}/Icon/icons/image.d.ts +0 -0
- package/{components → src/components}/Icon/icons/in-box.d.ts +0 -0
- package/{components → src/components}/Icon/icons/info-circle-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/info-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/instagram.d.ts +0 -0
- package/{components → src/components}/Icon/icons/laptop.d.ts +0 -0
- package/{components → src/components}/Icon/icons/layers.d.ts +0 -0
- package/{components → src/components}/Icon/icons/layout-text-window-reverse.d.ts +0 -0
- package/{components → src/components}/Icon/icons/layout-text-window.d.ts +0 -0
- package/{components → src/components}/Icon/icons/layout.d.ts +0 -0
- package/{components → src/components}/Icon/icons/lightbulb.d.ts +0 -0
- package/{components → src/components}/Icon/icons/link.d.ts +0 -0
- package/{components → src/components}/Icon/icons/linkedin.d.ts +0 -0
- package/{components → src/components}/Icon/icons/list.d.ts +0 -0
- package/{components → src/components}/Icon/icons/lock-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/lock.d.ts +0 -0
- package/{components → src/components}/Icon/icons/login.d.ts +0 -0
- package/{components → src/components}/Icon/icons/logout.d.ts +0 -0
- package/{components → src/components}/Icon/icons/luggage.d.ts +0 -0
- package/{components → src/components}/Icon/icons/mail.d.ts +0 -0
- package/{components → src/components}/Icon/icons/map.d.ts +0 -0
- package/{components → src/components}/Icon/icons/menu.d.ts +0 -0
- package/{components → src/components}/Icon/icons/microphone.d.ts +0 -0
- package/{components → src/components}/Icon/icons/monitor.d.ts +0 -0
- package/{components → src/components}/Icon/icons/paperclip.d.ts +0 -0
- package/{components → src/components}/Icon/icons/passport.d.ts +0 -0
- package/{components → src/components}/Icon/icons/pencil.d.ts +0 -0
- package/{components → src/components}/Icon/icons/pending-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/person-dash.d.ts +0 -0
- package/{components → src/components}/Icon/icons/person-plus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/person-x.d.ts +0 -0
- package/{components → src/components}/Icon/icons/person.d.ts +0 -0
- package/{components → src/components}/Icon/icons/phone.d.ts +0 -0
- package/{components → src/components}/Icon/icons/pin-map-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/pin.d.ts +0 -0
- package/{components → src/components}/Icon/icons/placeholder.d.ts +0 -0
- package/{components → src/components}/Icon/icons/plane.d.ts +0 -0
- package/{components → src/components}/Icon/icons/plus-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/plus-square.d.ts +0 -0
- package/{components → src/components}/Icon/icons/plus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/printer.d.ts +0 -0
- package/{components → src/components}/Icon/icons/question-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/rocket.d.ts +0 -0
- package/{components → src/components}/Icon/icons/save.d.ts +0 -0
- package/{components → src/components}/Icon/icons/search.d.ts +0 -0
- package/{components → src/components}/Icon/icons/send.d.ts +0 -0
- package/{components → src/components}/Icon/icons/sg-crest.d.ts +0 -0
- package/{components → src/components}/Icon/icons/share.d.ts +0 -0
- package/{components → src/components}/Icon/icons/slash-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/sliders.d.ts +0 -0
- package/{components → src/components}/Icon/icons/speedometer.d.ts +0 -0
- package/{components → src/components}/Icon/icons/star-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/star.d.ts +0 -0
- package/{components → src/components}/Icon/icons/stoplights.d.ts +0 -0
- package/{components → src/components}/Icon/icons/switch-horizontal.d.ts +0 -0
- package/{components → src/components}/Icon/icons/switch-vertical.d.ts +0 -0
- package/{components → src/components}/Icon/icons/tablet.d.ts +0 -0
- package/{components → src/components}/Icon/icons/telephone.d.ts +0 -0
- package/{components → src/components}/Icon/icons/three-dots-vertical.d.ts +0 -0
- package/{components → src/components}/Icon/icons/three-dots.d.ts +0 -0
- package/{components → src/components}/Icon/icons/ticket.d.ts +0 -0
- package/{components → src/components}/Icon/icons/toggle-off.d.ts +0 -0
- package/{components → src/components}/Icon/icons/toggle-on.d.ts +0 -0
- package/{components → src/components}/Icon/icons/train.d.ts +0 -0
- package/{components → src/components}/Icon/icons/translate.d.ts +0 -0
- package/{components → src/components}/Icon/icons/trash.d.ts +0 -0
- package/{components → src/components}/Icon/icons/truck.d.ts +0 -0
- package/{components → src/components}/Icon/icons/twitter-x.d.ts +0 -0
- package/{components → src/components}/Icon/icons/unlock.d.ts +0 -0
- package/{components → src/components}/Icon/icons/upload.d.ts +0 -0
- package/{components → src/components}/Icon/icons/user-circle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/user-square.d.ts +0 -0
- package/{components → src/components}/Icon/icons/users.d.ts +0 -0
- package/{components → src/components}/Icon/icons/video-recorder.d.ts +0 -0
- package/{components → src/components}/Icon/icons/volume-max.d.ts +0 -0
- package/{components → src/components}/Icon/icons/volume-x.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-dash.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-desktop.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-dock.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-fullscreen.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-plus.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-sidebar.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-split.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-stack.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window-x.d.ts +0 -0
- package/{components → src/components}/Icon/icons/window.d.ts +0 -0
- package/{components → src/components}/Icon/icons/xcircle-fill.d.ts +0 -0
- package/{components → src/components}/Icon/icons/xcircle.d.ts +0 -0
- package/{components → src/components}/Icon/icons/youtube.d.ts +0 -0
- package/{components → src/components}/Icon/icons/zoom-in.d.ts +0 -0
- package/{components → src/components}/Icon/icons/zoom-out.d.ts +0 -0
- package/{components → src/components}/Icon/index.d.ts +0 -0
- package/{components → src/components}/Icon/sgds-icon.d.ts +0 -0
- package/{components → src/components}/IconButton/index.d.ts +0 -0
- package/{components → src/components}/IconButton/sgds-icon-button.d.ts +0 -0
- package/{components → src/components}/IconList/index.d.ts +0 -0
- package/{components → src/components}/IconList/sgds-icon-list.d.ts +0 -0
- package/{components → src/components}/Input/index.d.ts +0 -0
- package/{components → src/components}/Link/index.d.ts +0 -0
- package/{components → src/components}/Mainnav/index.d.ts +0 -0
- package/{components → src/components}/Mainnav/mainnav-context.d.ts +0 -0
- package/{components → src/components}/Mainnav/sgds-mainnav-dropdown.d.ts +0 -0
- package/{components → src/components}/Mainnav/sgds-mainnav-item.d.ts +0 -0
- package/{components → src/components}/Mainnav/sgds-mainnav.d.ts +0 -0
- package/{components → src/components}/Masthead/index.d.ts +0 -0
- package/{components → src/components}/Masthead/sgds-masthead.d.ts +0 -0
- package/{components → src/components}/Modal/index.d.ts +0 -0
- package/{components → src/components}/Modal/sgds-modal.d.ts +0 -0
- package/{components → src/components}/Pagination/index.d.ts +0 -0
- package/{components → src/components}/Pagination/sgds-pagination.d.ts +0 -0
- package/{components → src/components}/ProgressBar/index.d.ts +0 -0
- package/{components → src/components}/ProgressBar/sgds-progress-bar.d.ts +0 -0
- package/{components → src/components}/QuantityToggle/index.d.ts +0 -0
- package/{components → src/components}/QuantityToggle/sgds-quantity-toggle.d.ts +0 -0
- package/{components → src/components}/Radio/index.d.ts +0 -0
- package/{components → src/components}/Radio/sgds-radio-group.d.ts +0 -0
- package/{components → src/components}/Radio/sgds-radio.d.ts +0 -0
- package/{components → src/components}/Select/index.d.ts +0 -0
- package/{components → src/components}/Select/select-item.d.ts +0 -0
- package/{components → src/components}/Select/sgds-select.d.ts +0 -0
- package/{components → src/components}/Sidenav/index.d.ts +0 -0
- package/{components → src/components}/Sidenav/sgds-sidenav-item.d.ts +0 -0
- package/{components → src/components}/Sidenav/sgds-sidenav-link.d.ts +0 -0
- package/{components → src/components}/Sidenav/sgds-sidenav.d.ts +0 -0
- package/{components → src/components}/Skeleton/index.d.ts +0 -0
- package/{components → src/components}/Skeleton/sgds-skeleton.d.ts +0 -0
- package/{components → src/components}/Spinner/index.d.ts +0 -0
- package/{components → src/components}/Spinner/sgds-spinner.d.ts +0 -0
- package/{components → src/components}/Stepper/index.d.ts +0 -0
- package/{components → src/components}/Stepper/sgds-stepper.d.ts +0 -0
- package/{components → src/components}/Subnav/index.d.ts +0 -0
- package/{components → src/components}/Subnav/sgds-subnav-item.d.ts +0 -0
- package/{components → src/components}/Subnav/sgds-subnav.d.ts +0 -0
- package/{components → src/components}/Switch/index.d.ts +0 -0
- package/{components → src/components}/Switch/sgds-switch.d.ts +0 -0
- package/{components → src/components}/Tab/index.d.ts +0 -0
- package/{components → src/components}/Tab/sgds-tab-group.d.ts +0 -0
- package/{components → src/components}/Tab/sgds-tab-panel.d.ts +0 -0
- package/{components → src/components}/Tab/sgds-tab.d.ts +0 -0
- package/{components → src/components}/Table/index.d.ts +0 -0
- package/{components → src/components}/Table/sgds-table-cell.d.ts +0 -0
- package/{components → src/components}/Table/sgds-table-head.d.ts +0 -0
- package/{components → src/components}/Table/sgds-table-row.d.ts +0 -0
- package/{components → src/components}/Table/sgds-table.d.ts +0 -0
- package/{components → src/components}/TableOfContents/index.d.ts +0 -0
- package/{components → src/components}/TableOfContents/sgds-table-of-contents.d.ts +0 -0
- package/{components → src/components}/Textarea/index.d.ts +0 -0
- package/{components → src/components}/Textarea/sgds-textarea.d.ts +0 -0
- package/{components → src/components}/Toast/index.d.ts +0 -0
- package/{components → src/components}/Toast/sgds-toast-container.d.ts +0 -0
- package/{components → src/components}/Toast/sgds-toast.d.ts +0 -0
- package/{components → src/components}/Tooltip/index.d.ts +0 -0
- package/{components → src/components}/Tooltip/sgds-tooltip.d.ts +0 -0
- package/{components → src/components}/index.d.ts +0 -0
- package/{index.d.ts → src/index.d.ts} +0 -0
- package/{internals → src/internals}/CloseButton/index.d.ts +0 -0
- package/{internals → src/internals}/CloseButton/sgds-close-button.d.ts +0 -0
- package/{internals → src/internals}/OverflowMenu/index.d.ts +0 -0
- package/{internals → src/internals}/OverflowMenu/sgds-overflow-menu.d.ts +0 -0
- package/{react → src/react}/accordion/index.d.ts +0 -0
- package/{react → src/react}/accordion-item/index.d.ts +0 -0
- package/{react → src/react}/alert/index.d.ts +0 -0
- package/{react → src/react}/alert-link/index.d.ts +0 -0
- package/{react → src/react}/badge/index.d.ts +0 -0
- package/{react → src/react}/breadcrumb/index.d.ts +0 -0
- package/{react → src/react}/breadcrumb-item/index.d.ts +0 -0
- package/{react → src/react}/button/index.d.ts +0 -0
- package/{react → src/react}/card/index.d.ts +0 -0
- package/{react → src/react}/checkbox/index.d.ts +0 -0
- package/{react → src/react}/checkbox-group/index.d.ts +0 -0
- package/{react → src/react}/combo-box/index.d.ts +0 -0
- package/{react → src/react}/datepicker/index.d.ts +0 -0
- package/{react → src/react}/description-list/index.d.ts +0 -0
- package/{react → src/react}/description-list-group/index.d.ts +0 -0
- package/{react → src/react}/divider/index.d.ts +0 -0
- package/{react → src/react}/drawer/index.d.ts +0 -0
- package/{react → src/react}/dropdown/index.d.ts +0 -0
- package/{react → src/react}/dropdown-item/index.d.ts +0 -0
- package/{react → src/react}/file-upload/index.d.ts +0 -0
- package/{react → src/react}/footer/index.d.ts +0 -0
- package/{react → src/react}/footer-item/index.d.ts +0 -0
- package/{react → src/react}/icon/index.d.ts +0 -0
- package/{react → src/react}/icon-button/index.d.ts +0 -0
- package/{react → src/react}/icon-list/index.d.ts +0 -0
- package/{react → src/react}/index.d.ts +1 -1
- /package/{react → src/react}/input/index.d.ts +0 -0
- /package/{react → src/react}/link/index.d.ts +0 -0
- /package/{react → src/react}/mainnav/index.d.ts +0 -0
- /package/{react → src/react}/mainnav-dropdown/index.d.ts +0 -0
- /package/{react → src/react}/mainnav-item/index.d.ts +0 -0
- /package/{react → src/react}/masthead/index.d.ts +0 -0
- /package/{react → src/react}/modal/index.d.ts +0 -0
- /package/{react → src/react}/pagination/index.d.ts +0 -0
- /package/{react → src/react}/progress-bar/index.d.ts +0 -0
- /package/{react → src/react}/quantity-toggle/index.d.ts +0 -0
- /package/{react → src/react}/radio/index.d.ts +0 -0
- /package/{react → src/react}/radio-group/index.d.ts +0 -0
- /package/{react → src/react}/select/index.d.ts +0 -0
- /package/{react → src/react}/sidenav/index.d.ts +0 -0
- /package/{react → src/react}/sidenav-item/index.d.ts +0 -0
- /package/{react → src/react}/sidenav-link/index.d.ts +0 -0
- /package/{react → src/react}/skeleton/index.d.ts +0 -0
- /package/{react → src/react}/spinner/index.d.ts +0 -0
- /package/{react → src/react}/stepper/index.d.ts +0 -0
- /package/{react → src/react}/subnav/index.d.ts +0 -0
- /package/{react → src/react}/subnav-item/index.d.ts +0 -0
- /package/{react → src/react}/switch/index.d.ts +0 -0
- /package/{react → src/react}/tab/index.d.ts +0 -0
- /package/{react → src/react}/tab-group/index.d.ts +0 -0
- /package/{react → src/react}/tab-panel/index.d.ts +0 -0
- /package/{react → src/react}/table/index.d.ts +0 -0
- /package/{react → src/react}/table-cell/index.d.ts +0 -0
- /package/{react → src/react}/table-head/index.d.ts +0 -0
- /package/{react → src/react}/table-of-contents/index.d.ts +0 -0
- /package/{react → src/react}/table-row/index.d.ts +0 -0
- /package/{react → src/react}/textarea/index.d.ts +0 -0
- /package/{react → src/react}/toast/index.d.ts +0 -0
- /package/{react → src/react}/toast-container/index.d.ts +0 -0
- /package/{react → src/react}/tooltip/index.d.ts +0 -0
- /package/{utils → src/utils}/animate.d.ts +0 -0
- /package/{utils → src/utils}/animation-registry.d.ts +0 -0
- /package/{utils → src/utils}/breakpoints.d.ts +0 -0
- /package/{utils → src/utils}/ce-registry.d.ts +0 -0
- /package/{utils → src/utils}/defaultvalue.d.ts +0 -0
- /package/{utils → src/utils}/event.d.ts +0 -0
- /package/{utils → src/utils}/formSubmitController.d.ts +0 -0
- /package/{utils → src/utils}/generateCustomElementName.d.ts +0 -0
- /package/{utils → src/utils}/generateId.d.ts +0 -0
- /package/{utils → src/utils}/inputValidationController.d.ts +0 -0
- /package/{utils → src/utils}/mergeDeep.d.ts +0 -0
- /package/{utils → src/utils}/modal.d.ts +0 -0
- /package/{utils → src/utils}/object.d.ts +0 -0
- /package/{utils → src/utils}/offset.d.ts +0 -0
- /package/{utils → src/utils}/scroll.d.ts +0 -0
- /package/{utils → src/utils}/slot.d.ts +0 -0
- /package/{utils → src/utils}/tabbable.d.ts +0 -0
- /package/{utils → src/utils}/test.d.ts +0 -0
- /package/{utils → src/utils}/time.d.ts +0 -0
- /package/{utils → src/utils}/validatorMixin.d.ts +0 -0
- /package/{utils → src/utils}/watch.d.ts +0 -0
|
@@ -32,7 +32,17 @@ export declare class SgdsDatepicker extends SgdsDatepicker_base implements SgdsF
|
|
|
32
32
|
name: string;
|
|
33
33
|
/** When true, adds disabled attribute to input and button element */
|
|
34
34
|
disabled: boolean;
|
|
35
|
-
/**
|
|
35
|
+
/** Sets the initial value of the datepicker. Replaces deprecated `initialValue`.
|
|
36
|
+
* Pass in dates in this format `dd/mm/yyyy` for single mode and `dd/mm/yyyy - dd/mm/yyyy` for range mode
|
|
37
|
+
* For example, `value="22/12/2023"` for single mode or `value="22/12/2023 - 25/12/2023"` for range mode
|
|
38
|
+
*/
|
|
39
|
+
value: string;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated since v3.1.1 in favour of `value`.
|
|
42
|
+
* The initial value of DatePicker on first load for single &
|
|
43
|
+
* range mode as array of string. eg.'["22/12/2023"]' for single &
|
|
44
|
+
* '["22/12/2023","25/12/2023"]' for range respectively
|
|
45
|
+
* */
|
|
36
46
|
initialValue: string[];
|
|
37
47
|
private dateFormat;
|
|
38
48
|
/** ISO date string to set the lowest allowable date value. e.g. "2016-05-19T12:00:00.000Z" */
|
|
@@ -55,8 +65,8 @@ export declare class SgdsDatepicker extends SgdsDatepicker_base implements SgdsF
|
|
|
55
65
|
drop: "up" | "down";
|
|
56
66
|
/** Provides the date context for Calendar to present the appropriate view. Defaults to today's date */
|
|
57
67
|
displayDate: Date;
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
/**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
|
|
69
|
+
defaultValue: string;
|
|
60
70
|
/**@internal */
|
|
61
71
|
invalid: boolean;
|
|
62
72
|
private view;
|
|
@@ -7,7 +7,8 @@ declare const SgdsInput_base: (new (...args: any[]) => import("../../utils/valid
|
|
|
7
7
|
* @summary Text inputs allow your users to enter letters, numbers and symbols on a single line.
|
|
8
8
|
*
|
|
9
9
|
* @slot icon - The slot for leading icon of text input
|
|
10
|
-
*
|
|
10
|
+
* @slot trailing-icon - The slot for trailing icon of text input. When present, it overrides valid icon and loading spinner rendered when valid prop or loading prop are true
|
|
11
|
+
* @slot action - The slot for call to action of the text input. It is recommended to use sgds-icon-button within this slot
|
|
11
12
|
* @event sgds-change - Emitted when an alteration to the control's value is committed by the user.
|
|
12
13
|
* @event sgds-input - Emitted when the control receives input and its value changes.
|
|
13
14
|
* @event sgds-focus - Emitted when input is in focus.
|
|
@@ -64,6 +65,7 @@ export declare class SgdsInput extends SgdsInput_base implements SgdsFormControl
|
|
|
64
65
|
/**The input's value attribute. */
|
|
65
66
|
value: string;
|
|
66
67
|
protected _isTouched: boolean;
|
|
68
|
+
private _showPassword;
|
|
67
69
|
/** Sets focus on the input. */
|
|
68
70
|
focus(options?: FocusOptions): void;
|
|
69
71
|
/** Sets blur on the input. */
|
|
@@ -98,6 +100,8 @@ export declare class SgdsInput extends SgdsInput_base implements SgdsFormControl
|
|
|
98
100
|
_handleIsTouched(): void;
|
|
99
101
|
_handleDisabledChange(): void;
|
|
100
102
|
protected _renderInput(): import("lit-html").TemplateResult;
|
|
103
|
+
protected _renderPasswordToggle(): import("lit-html").TemplateResult;
|
|
104
|
+
protected _inputType(): "number" | "text" | "email" | "password" | "search" | "tel" | "time" | "url";
|
|
101
105
|
protected _renderFeedback(): import("lit-html").TemplateResult;
|
|
102
106
|
protected _renderLabel(): import("lit-html").TemplateResult;
|
|
103
107
|
protected _renderHintText(): import("lit-html").TemplateResult;
|
|
@@ -7,9 +7,9 @@ import SgdsElement from "../../base/sgds-element";
|
|
|
7
7
|
export declare class SgdsLink extends SgdsElement {
|
|
8
8
|
static styles: import("lit").CSSResult[];
|
|
9
9
|
/** Determines the size of the link */
|
|
10
|
-
size: "sm" | "md" | "lg";
|
|
10
|
+
size: "xs" | "sm" | "md" | "lg";
|
|
11
11
|
/** when true, sets the active stylings of the link */
|
|
12
|
-
variant: "primary" | "danger" | "light" | "dark";
|
|
12
|
+
variant: "primary" | "danger" | "neutral" | "light" | "dark";
|
|
13
13
|
private _handleSlotChange;
|
|
14
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
15
15
|
}
|
package/themes/day.css
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
/* Semantic - Form Color */
|
|
130
130
|
--sgds-form-surface-default: var(--sgds-gray-000);
|
|
131
131
|
--sgds-form-surface-emphasis: var(--sgds-gray-700);
|
|
132
|
+
--sgds-form-surface-raised: var(--sgds-gray-100);
|
|
132
133
|
--sgds-form-surface-subtle: var(--sgds-gray-400);
|
|
133
134
|
--sgds-form-surface-muted: var(--sgds-gray-200);
|
|
134
135
|
--sgds-form-surface-inverse: var(--sgds-gray-900);
|
package/themes/night.css
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
/* Semantic - Form Color */
|
|
130
130
|
--sgds-form-surface-default: var(--sgds-gray-900);
|
|
131
131
|
--sgds-form-surface-emphasis: var(--sgds-gray-200);
|
|
132
|
+
--sgds-form-surface-raised: var(--sgds-gray-800);
|
|
132
133
|
--sgds-form-surface-subtle: var(--sgds-gray-500);
|
|
133
134
|
--sgds-form-surface-muted: var(--sgds-gray-700);
|
|
134
135
|
--sgds-form-surface-inverse: var(--sgds-gray-000);
|
package/themes/root.css
CHANGED
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
--sgds-font-weight-bold: 700;
|
|
133
133
|
|
|
134
134
|
/* Primitive - Font Size */
|
|
135
|
+
--sgds-font-size-0: 0.75rem;
|
|
135
136
|
--sgds-font-size-1: 0.875rem;
|
|
136
137
|
--sgds-font-size-2: 1rem;
|
|
137
138
|
--sgds-font-size-3: 1.25rem;
|
|
@@ -161,6 +162,7 @@
|
|
|
161
162
|
--sgds-line-height-body: 1.5;
|
|
162
163
|
--sgds-line-height-heading: 1.2;
|
|
163
164
|
--sgds-line-height-min: 20px;
|
|
165
|
+
--sgds-line-height-16: 16px;
|
|
164
166
|
|
|
165
167
|
/* Primitive - Opacity */
|
|
166
168
|
--sgds-opacity-0: 0;
|
package/utils/slot.js
CHANGED
|
@@ -47,6 +47,23 @@ class HasSlotController {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Given a slot, this function iterates over all of its assigned text nodes and returns the concatenated text as a
|
|
52
|
+
* string. This is useful because we can't use slot.textContent as an alternative.
|
|
53
|
+
*/
|
|
54
|
+
function getTextContent(slot) {
|
|
55
|
+
if (!slot) {
|
|
56
|
+
return "";
|
|
57
|
+
}
|
|
58
|
+
const nodes = slot.assignedNodes({ flatten: true });
|
|
59
|
+
let text = "";
|
|
60
|
+
[...nodes].forEach(node => {
|
|
61
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
62
|
+
text += node.textContent.trim();
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return text;
|
|
66
|
+
}
|
|
50
67
|
|
|
51
|
-
export { HasSlotController };
|
|
68
|
+
export { HasSlotController, getTextContent };
|
|
52
69
|
//# sourceMappingURL=slot.js.map
|
package/utils/slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sources":["../../src/utils/slot.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from \"lit\";\n\nexport class HasSlotController implements ReactiveController {\n host: ReactiveControllerHost & Element;\n slotNames: string[] = [];\n\n constructor(host: ReactiveControllerHost & Element, ...slotNames: string[]) {\n (this.host = host).addController(this);\n this.slotNames = slotNames;\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n private hasDefaultSlot() {\n return [...this.host.childNodes].some(node => {\n if (node.nodeType === node.TEXT_NODE && node.textContent?.trim() !== \"\") {\n return true;\n }\n\n if (node.nodeType === node.ELEMENT_NODE) {\n const el = node as HTMLElement;\n const tagName = el.tagName.toLowerCase();\n\n // Ignore visually hidden elements since they aren't rendered\n if (tagName === \"sl-visually-hidden\") {\n return false;\n }\n\n // If it doesn't have a slot attribute, it's part of the default slot\n if (!el.hasAttribute(\"slot\")) {\n return true;\n }\n }\n\n return false;\n });\n }\n\n private hasNamedSlot(name: string) {\n return this.host.querySelector(`:scope > [slot=\"${name}\"]`) !== null;\n }\n\n test(slotName: string) {\n return slotName === \"[default]\" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);\n }\n\n hostConnected() {\n this.host.shadowRoot?.addEventListener(\"slotchange\", this.handleSlotChange);\n }\n\n hostDisconnected() {\n this.host.shadowRoot?.removeEventListener(\"slotchange\", this.handleSlotChange);\n }\n\n handleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n\n if ((this.slotNames.includes(\"[default]\") && !slot.name) || (slot.name && this.slotNames.includes(slot.name))) {\n this.host.requestUpdate();\n }\n }\n}\n\n/**\n * Given a slot, this function iterates over all of its assigned element and text nodes and returns the concatenated\n * HTML as a string. This is useful because we can't use slot.innerHTML as an alternative.\n */\nexport function getInnerHTML(slot: HTMLSlotElement): string {\n const nodes = slot.assignedNodes({ flatten: true });\n let html = \"\";\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n html += (node as HTMLElement).outerHTML;\n }\n\n if (node.nodeType === Node.TEXT_NODE) {\n html += node.textContent;\n }\n });\n\n return html;\n}\n\n/**\n * Given a slot, this function iterates over all of its assigned text nodes and returns the concatenated text as a\n * string. This is useful because we can't use slot.textContent as an alternative.\n */\nexport function getTextContent(slot: HTMLSlotElement | undefined | null): string {\n if (!slot) {\n return \"\";\n }\n const nodes = slot.assignedNodes({ flatten: true });\n let text = \"\";\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent;\n }\n });\n\n return text;\n}\n"],"names":[],"mappings":"MAEa,iBAAiB,CAAA;IAI5B,WAAY,CAAA,IAAsC,EAAE,GAAG,SAAmB,EAAA;QAF1E,IAAS,CAAA,SAAA,GAAa,EAAE,CAAC;QAGvB,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;AACvC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC1D;IAEO,cAAc,GAAA;AACpB,QAAA,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,IAAG;;AAC3C,YAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,CAAA,MAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,EAAE,MAAK,EAAE,EAAE;AACvE,gBAAA,OAAO,IAAI,CAAC;aACb;YAED,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY,EAAE;gBACvC,MAAM,EAAE,GAAG,IAAmB,CAAC;gBAC/B,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;;AAGzC,gBAAA,IAAI,OAAO,KAAK,oBAAoB,EAAE;AACpC,oBAAA,OAAO,KAAK,CAAC;iBACd;;gBAGD,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;AAC5B,oBAAA,OAAO,IAAI,CAAC;iBACb;aACF;AAED,YAAA,OAAO,KAAK,CAAC;AACf,SAAC,CAAC,CAAC;KACJ;AAEO,IAAA,YAAY,CAAC,IAAY,EAAA;AAC/B,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAmB,gBAAA,EAAA,IAAI,CAAI,EAAA,CAAA,CAAC,KAAK,IAAI,CAAC;KACtE;AAED,IAAA,IAAI,CAAC,QAAgB,EAAA;AACnB,QAAA,OAAO,QAAQ,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACvF;IAED,aAAa,GAAA;;AACX,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,CAAC,UAAU,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAC7E;IAED,gBAAgB,GAAA;;AACd,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,CAAC,UAAU,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAChF;AAED,IAAA,gBAAgB,CAAC,KAAY,EAAA;AAC3B,QAAA,MAAM,IAAI,GAAG,KAAK,CAAC,MAAyB,CAAC;AAE7C,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;AAC7G,YAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;SAC3B;KACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"slot.js","sources":["../../src/utils/slot.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from \"lit\";\n\nexport class HasSlotController implements ReactiveController {\n host: ReactiveControllerHost & Element;\n slotNames: string[] = [];\n\n constructor(host: ReactiveControllerHost & Element, ...slotNames: string[]) {\n (this.host = host).addController(this);\n this.slotNames = slotNames;\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n private hasDefaultSlot() {\n return [...this.host.childNodes].some(node => {\n if (node.nodeType === node.TEXT_NODE && node.textContent?.trim() !== \"\") {\n return true;\n }\n\n if (node.nodeType === node.ELEMENT_NODE) {\n const el = node as HTMLElement;\n const tagName = el.tagName.toLowerCase();\n\n // Ignore visually hidden elements since they aren't rendered\n if (tagName === \"sl-visually-hidden\") {\n return false;\n }\n\n // If it doesn't have a slot attribute, it's part of the default slot\n if (!el.hasAttribute(\"slot\")) {\n return true;\n }\n }\n\n return false;\n });\n }\n\n private hasNamedSlot(name: string) {\n return this.host.querySelector(`:scope > [slot=\"${name}\"]`) !== null;\n }\n\n test(slotName: string) {\n return slotName === \"[default]\" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);\n }\n\n hostConnected() {\n this.host.shadowRoot?.addEventListener(\"slotchange\", this.handleSlotChange);\n }\n\n hostDisconnected() {\n this.host.shadowRoot?.removeEventListener(\"slotchange\", this.handleSlotChange);\n }\n\n handleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n\n if ((this.slotNames.includes(\"[default]\") && !slot.name) || (slot.name && this.slotNames.includes(slot.name))) {\n this.host.requestUpdate();\n }\n }\n}\n\n/**\n * Given a slot, this function iterates over all of its assigned element and text nodes and returns the concatenated\n * HTML as a string. This is useful because we can't use slot.innerHTML as an alternative.\n */\nexport function getInnerHTML(slot: HTMLSlotElement): string {\n const nodes = slot.assignedNodes({ flatten: true });\n let html = \"\";\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n html += (node as HTMLElement).outerHTML;\n }\n\n if (node.nodeType === Node.TEXT_NODE) {\n html += node.textContent;\n }\n });\n\n return html;\n}\n\n/**\n * Given a slot, this function iterates over all of its assigned text nodes and returns the concatenated text as a\n * string. This is useful because we can't use slot.textContent as an alternative.\n */\nexport function getTextContent(slot: HTMLSlotElement | undefined | null): string {\n if (!slot) {\n return \"\";\n }\n const nodes = slot.assignedNodes({ flatten: true });\n let text = \"\";\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent.trim();\n }\n });\n\n return text;\n}\n"],"names":[],"mappings":"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"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|