@govtechsg/sgds-web-component 3.19.0-rc.0 → 3.19.0-rc.1
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/base/card.js +1 -1
- package/base/option.js +1 -1
- package/components/Accordion/accordion-item.js +1 -1
- package/components/Accordion/index.umd.min.js +1 -1
- package/components/Alert/index.umd.min.js +8 -8
- package/components/Alert/index.umd.min.js.map +1 -1
- package/components/Badge/index.umd.min.js +9 -9
- package/components/Badge/index.umd.min.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +2 -2
- package/components/Card/index.umd.min.js +1 -1
- package/components/Checkbox/checkbox-group.js +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.min.js +2238 -32
- package/components/Checkbox/index.umd.min.js.map +1 -1
- package/components/Checkbox/sgds-checkbox-group.d.ts +5 -0
- package/components/Checkbox/sgds-checkbox-group.js +6 -6
- package/components/Checkbox/sgds-checkbox-group.js.map +1 -1
- package/components/Checkbox/sgds-checkbox.d.ts +5 -0
- package/components/Checkbox/sgds-checkbox.js +6 -6
- package/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/components/CloseButton/close-button.js +1 -1
- package/components/CloseButton/index.umd.min.js +6 -6
- package/components/CloseButton/index.umd.min.js.map +1 -1
- package/components/CloseButton/sgds-close-button.js +1 -1
- package/components/CloseButton/sgds-close-button.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +7 -12
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/datepicker-calendar2.js +1 -1
- package/components/Datepicker/index.umd.min.js +2 -2
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Drawer/index.umd.min.js +8 -8
- package/components/Drawer/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/FileUpload/index.umd.min.js +8 -8
- package/components/FileUpload/index.umd.min.js.map +1 -1
- package/components/Footer/index.umd.min.js +1 -1
- package/components/IconCard/index.umd.min.js +1 -1
- package/components/ImageCard/index.umd.min.js +1 -1
- package/components/Input/index.umd.min.js +1 -1
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/Link/index.umd.min.js +1 -1
- package/components/Link/link.js +1 -1
- package/components/Mainnav/index.umd.min.js +3 -3
- package/components/Mainnav/mainnav-dropdown.js +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Modal/index.umd.min.js +9 -9
- package/components/Modal/index.umd.min.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/Pagination/index.umd.min.js +1 -1
- package/components/Pagination/pagination.js +1 -1
- package/components/QuantityToggle/index.umd.min.js +2 -2
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Radio/index.umd.min.js +2 -2
- package/components/Radio/index.umd.min.js.map +1 -1
- package/components/Radio/radio-group.js +1 -1
- package/components/Select/index.umd.min.js +2 -2
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Sidenav/index.umd.min.js +2 -2
- package/components/Sidenav/sidenav-item.js +1 -1
- package/components/Sidenav/sidenav-link.js +1 -1
- package/components/Subnav/index.umd.min.js +1 -1
- package/components/Subnav/subnav-item.js +1 -1
- package/components/Switch/index.umd.min.js +1 -1
- package/components/Switch/switch.js +1 -1
- package/components/SystemBanner/index.umd.min.js +2 -2
- package/components/SystemBanner/index.umd.min.js.map +1 -1
- package/components/Tab/index.umd.min.js +1 -1
- package/components/Tab/tab.js +1 -1
- package/components/Table/index.umd.min.js +1 -1
- package/components/Table/index.umd.min.js.map +1 -1
- package/components/Table/table.js +1 -1
- package/components/Textarea/index.umd.min.js +10 -10
- package/components/Textarea/index.umd.min.js.map +1 -1
- package/components/Textarea/textarea.js +1 -1
- package/components/ThumbnailCard/index.umd.min.js +1 -1
- package/components/Toast/index.umd.min.js +5 -5
- package/components/Toast/index.umd.min.js.map +1 -1
- package/components/index.umd.min.js +58 -68
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +2 -2
- package/custom-elements.json +908 -908
- package/index.umd.min.js +25 -35
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/card.cjs.js +1 -1
- package/react/base/card.js +1 -1
- package/react/base/option.cjs.js +1 -1
- package/react/base/option.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/Checkbox/checkbox-group.cjs.js +1 -1
- package/react/components/Checkbox/checkbox-group.js +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox-group.cjs.js +6 -6
- package/react/components/Checkbox/sgds-checkbox-group.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox-group.js +6 -6
- package/react/components/Checkbox/sgds-checkbox-group.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js +6 -6
- package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.js +6 -6
- package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/react/components/CloseButton/close-button.cjs.js +1 -1
- package/react/components/CloseButton/close-button.js +1 -1
- package/react/components/CloseButton/sgds-close-button.cjs.js +1 -1
- package/react/components/CloseButton/sgds-close-button.cjs.js.map +1 -1
- package/react/components/CloseButton/sgds-close-button.js +1 -1
- package/react/components/CloseButton/sgds-close-button.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/Dropdown/dropdown-item.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-item.js +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +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/Pagination/pagination.cjs.js +1 -1
- package/react/components/Pagination/pagination.js +1 -1
- package/react/components/Radio/radio-group.cjs.js +1 -1
- package/react/components/Radio/radio-group.js +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/Subnav/subnav-item.cjs.js +1 -1
- package/react/components/Subnav/subnav-item.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/table.cjs.js +1 -1
- package/react/components/Table/table.js +1 -1
- package/react/components/Textarea/textarea.cjs.js +1 -1
- package/react/components/Textarea/textarea.js +1 -1
- package/react/index.cjs.js +6 -6
- package/react/index.d.ts +2 -2
- package/react/index.js +2 -2
- package/react/styles/form-check.cjs.js +1 -1
- package/react/styles/form-check.js +1 -1
- package/react/styles/form-hint.cjs.js +1 -1
- package/react/styles/form-hint.js +1 -1
- package/react/styles/form-label.cjs.js +1 -1
- package/react/styles/form-label.js +1 -1
- package/react/styles/form-text-control.cjs.js +1 -1
- package/react/styles/form-text-control.js +1 -1
- package/styles/form-check.js +1 -1
- package/styles/form-hint.js +1 -1
- package/styles/form-label.js +1 -1
- package/styles/form-text-control.js +1 -1
- package/types/react.d.ts +40 -40
package/base/card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`:host([disabled]){cursor:not-allowed}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([stretchedLink]) .card:after{display:none}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-
|
|
3
|
+
var css_248z = css`:host([disabled]){cursor:not-allowed}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([stretchedLink]) .card:after{display:none}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-40);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-lg);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.card-title,slot[name=title]::slotted(*){color:var(--sgds-color-default);font-size:var(--sgds-font-size-heading-sm)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-tight)!important;line-height:var(--sgds-line-height-sm)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-overline-md)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-2-xs)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){color:var(--sgds-link-color-default);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);margin-bottom:var(--sgds-margin-none)!important}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-2-xs);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),slot[name=link]::slotted(a:focus),slot[name=link]::slotted(a:hover),slot[name=title]::slotted(a:focus),slot[name=title]::slotted(a:hover){color:var(--sgds-link-color-emphasis)}slot[name=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=card.js.map
|
package/base/option.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`:host([active]) .dropdown-item{background-color:var(--sgds-
|
|
3
|
+
var css_248z = css`:host([active]) .dropdown-item{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item{background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-form-color-default);cursor:pointer;font-size:var(--sgds-font-size-label-md);height:100%;overflow-wrap:anywhere;padding:var(--sgds-padding-sm) var(--sgds-padding-md);text-align:inherit;white-space:normal}.dropdown-item.disabled{opacity:var(--sgds-opacity-40);pointer-events:none}.dropdown-item .normal-item-content{align-items:center;display:flex;justify-content:space-between}:host([active]) .dropdown-item .normal-item-content{color:var(--sgds-form-primary-color-default)}.dropdown-item:hover{background:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{background:var(--sgds-bg-translucent-subtle);outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=option.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`:host([variant=border][last-of-type]) .accordion-item{border-bottom:none}:host([density=compact]) .accordion-btn{font-size:var(--sgds-font-size-subtitle-sm);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-md)}:host([density=compact]) .accordion-body{font-size:var(--sgds-font-size-body-sm);line-height:var(--sgds-line-height-2-xs)}:host([density=compact]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-md) var(--sgds-padding-md)}:host([density=spacious]) .accordion-btn{font-size:var(--sgds-font-size-heading-sm);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-sm);padding:var(--sgds-padding-xl)}:host([density=spacious]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-xl) var(--sgds-padding-xl)}.accordion-item{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.accordion-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;color:var(--sgds-color-default);display:flex;font-size:var(--sgds-font-size-subtitle-md);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-md);line-height:var(--sgds-line-height-xs);overflow-anchor:none;padding:var(--sgds-padding-lg);text-align:left;width:100%}@media (prefers-reduced-motion:reduce){.accordion-btn,.accordion-btn:after{transition:none}}.accordion-btn:not(.disabled):hover,.accordion-btn:not(:disabled):hover{background-color:var(--sgds-bg-translucent-subtle);z-index:2}.accordion-btn:not(.disabled):focus,.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus,.accordion-btn:not(:disabled):focus-visible{background-color:var(--sgds-bg-translucent-subtle);z-index:3}.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.accordion-btn.disabled,.accordion-btn:disabled{cursor:not-allowed;opacity:var(--sgds-opacity-
|
|
3
|
+
var css_248z = css`:host([variant=border][last-of-type]) .accordion-item{border-bottom:none}:host([density=compact]) .accordion-btn{font-size:var(--sgds-font-size-subtitle-sm);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-md)}:host([density=compact]) .accordion-body{font-size:var(--sgds-font-size-body-sm);line-height:var(--sgds-line-height-2-xs)}:host([density=compact]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-md) var(--sgds-padding-md)}:host([density=spacious]) .accordion-btn{font-size:var(--sgds-font-size-heading-sm);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-sm);padding:var(--sgds-padding-xl)}:host([density=spacious]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-xl) var(--sgds-padding-xl)}.accordion-item{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.accordion-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;color:var(--sgds-color-default);display:flex;font-size:var(--sgds-font-size-subtitle-md);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-md);line-height:var(--sgds-line-height-xs);overflow-anchor:none;padding:var(--sgds-padding-lg);text-align:left;width:100%}@media (prefers-reduced-motion:reduce){.accordion-btn,.accordion-btn:after{transition:none}}.accordion-btn:not(.disabled):hover,.accordion-btn:not(:disabled):hover{background-color:var(--sgds-bg-translucent-subtle);z-index:2}.accordion-btn:not(.disabled):focus,.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus,.accordion-btn:not(:disabled):focus-visible{background-color:var(--sgds-bg-translucent-subtle);z-index:3}.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.accordion-btn.disabled,.accordion-btn:disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}slot[name=badge]::slotted(*){margin-left:auto}.accordion-header__trailing{display:flex;gap:var(--sgds-gap-md);margin-left:auto}slot[name=caret] sgds-icon,slot[name=caret]::slotted(*){color:var(--sgds-color-subtle);transition:transform .2s ease-in-out}.accordion-btn:not(.collapsed) slot[name=caret] sgds-icon,.accordion-btn:not(.collapsed) slot[name=caret]::slotted(*){transform:rotate(-180deg)}.accordion-body{color:var(--sgds-body-color-subtle);font-size:var(--sgds-font-size-body-md);line-height:var(--sgds-line-height-xs);overflow:hidden;padding:0}.content{display:block;padding:var(--sgds-padding-xs) var(--sgds-padding-lg) var(--sgds-padding-lg)}.hidden{display:none}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=accordion-item.js.map
|
|
@@ -52,7 +52,7 @@ const Ae=1;class Le{constructor(e){}get _$isConnected(){return this._$parent._$i
|
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2018 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const Re=(We=class extends Le{constructor(e){if(super(e),e.type!==Ae||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const s=e.element.classList;for(const e of this._previousClasses)e in t||(s.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(s.add(e),this._previousClasses.add(e)):(s.remove(e),this._previousClasses.delete(e)))}return te}},(...e)=>({_$litDirective$:We,values:e}));var We;function De(e,t,s){return new Promise(i=>{if((null==s?void 0:s.duration)===1/0)throw new Error("Promise-based animations must be finite.");const n=e.animate(t,Object.assign(Object.assign({},s),{duration:Ie()?0:null==s?void 0:s.duration}));n.addEventListener("cancel",i,{once:!0}),n.addEventListener("finish",i,{once:!0})})}function Ie(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(e,t){return e.map(e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height}))}function qe(e){return Promise.all(e.getAnimations().map(e=>new Promise(t=>{const s=requestAnimationFrame(t);e.addEventListener("cancel",()=>s,{once:!0}),e.addEventListener("finish",()=>s,{once:!0}),e.cancel()})))}const He=new Map,Fe=new WeakMap;function Be(e,t){const s=Fe.get(e);if(null==s?void 0:s[t])return s[t];const i=He.get(t);return i||{keyframes:[],options:{duration:0}}}function Ze(e,t){He.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function Je(e,t){return new Promise(s=>{e.addEventListener(t,function i(n){n.target===e&&(e.removeEventListener(t,i),s())})})}var Ke=r`:host([variant=border][last-of-type]) .accordion-item{border-bottom:none}:host([density=compact]) .accordion-btn{font-size:var(--sgds-font-size-subtitle-sm);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-md)}:host([density=compact]) .accordion-body{font-size:var(--sgds-font-size-body-sm);line-height:var(--sgds-line-height-2-xs)}:host([density=compact]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-md) var(--sgds-padding-md)}:host([density=spacious]) .accordion-btn{font-size:var(--sgds-font-size-heading-sm);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-sm);padding:var(--sgds-padding-xl)}:host([density=spacious]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-xl) var(--sgds-padding-xl)}.accordion-item{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.accordion-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;color:var(--sgds-color-default);display:flex;font-size:var(--sgds-font-size-subtitle-md);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-md);line-height:var(--sgds-line-height-xs);overflow-anchor:none;padding:var(--sgds-padding-lg);text-align:left;width:100%}@media (prefers-reduced-motion:reduce){.accordion-btn,.accordion-btn:after{transition:none}}.accordion-btn:not(.disabled):hover,.accordion-btn:not(:disabled):hover{background-color:var(--sgds-bg-translucent-subtle);z-index:2}.accordion-btn:not(.disabled):focus,.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus,.accordion-btn:not(:disabled):focus-visible{background-color:var(--sgds-bg-translucent-subtle);z-index:3}.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.accordion-btn.disabled,.accordion-btn:disabled{cursor:not-allowed;opacity:var(--sgds-opacity-
|
|
55
|
+
*/const Re=(We=class extends Le{constructor(e){if(super(e),e.type!==Ae||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const s=e.element.classList;for(const e of this._previousClasses)e in t||(s.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(s.add(e),this._previousClasses.add(e)):(s.remove(e),this._previousClasses.delete(e)))}return te}},(...e)=>({_$litDirective$:We,values:e}));var We;function De(e,t,s){return new Promise(i=>{if((null==s?void 0:s.duration)===1/0)throw new Error("Promise-based animations must be finite.");const n=e.animate(t,Object.assign(Object.assign({},s),{duration:Ie()?0:null==s?void 0:s.duration}));n.addEventListener("cancel",i,{once:!0}),n.addEventListener("finish",i,{once:!0})})}function Ie(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(e,t){return e.map(e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height}))}function qe(e){return Promise.all(e.getAnimations().map(e=>new Promise(t=>{const s=requestAnimationFrame(t);e.addEventListener("cancel",()=>s,{once:!0}),e.addEventListener("finish",()=>s,{once:!0}),e.cancel()})))}const He=new Map,Fe=new WeakMap;function Be(e,t){const s=Fe.get(e);if(null==s?void 0:s[t])return s[t];const i=He.get(t);return i||{keyframes:[],options:{duration:0}}}function Ze(e,t){He.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function Je(e,t){return new Promise(s=>{e.addEventListener(t,function i(n){n.target===e&&(e.removeEventListener(t,i),s())})})}var Ke=r`:host([variant=border][last-of-type]) .accordion-item{border-bottom:none}:host([density=compact]) .accordion-btn{font-size:var(--sgds-font-size-subtitle-sm);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-md)}:host([density=compact]) .accordion-body{font-size:var(--sgds-font-size-body-sm);line-height:var(--sgds-line-height-2-xs)}:host([density=compact]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-md) var(--sgds-padding-md)}:host([density=spacious]) .accordion-btn{font-size:var(--sgds-font-size-heading-sm);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-sm);padding:var(--sgds-padding-xl)}:host([density=spacious]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-xl) var(--sgds-padding-xl)}.accordion-item{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.accordion-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;color:var(--sgds-color-default);display:flex;font-size:var(--sgds-font-size-subtitle-md);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-md);line-height:var(--sgds-line-height-xs);overflow-anchor:none;padding:var(--sgds-padding-lg);text-align:left;width:100%}@media (prefers-reduced-motion:reduce){.accordion-btn,.accordion-btn:after{transition:none}}.accordion-btn:not(.disabled):hover,.accordion-btn:not(:disabled):hover{background-color:var(--sgds-bg-translucent-subtle);z-index:2}.accordion-btn:not(.disabled):focus,.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus,.accordion-btn:not(:disabled):focus-visible{background-color:var(--sgds-bg-translucent-subtle);z-index:3}.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.accordion-btn.disabled,.accordion-btn:disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}slot[name=badge]::slotted(*){margin-left:auto}.accordion-header__trailing{display:flex;gap:var(--sgds-gap-md);margin-left:auto}slot[name=caret] sgds-icon,slot[name=caret]::slotted(*){color:var(--sgds-color-subtle);transition:transform .2s ease-in-out}.accordion-btn:not(.collapsed) slot[name=caret] sgds-icon,.accordion-btn:not(.collapsed) slot[name=caret]::slotted(*){transform:rotate(-180deg)}.accordion-body{color:var(--sgds-body-color-subtle);font-size:var(--sgds-font-size-body-md);line-height:var(--sgds-line-height-xs);overflow:hidden;padding:0}.content{display:block;padding:var(--sgds-padding-xs) var(--sgds-padding-lg) var(--sgds-padding-lg)}.hidden{display:none}`;class Ye extends Ue{constructor(){super(...arguments),this.open=!1,this.disabled=!1,this.density="default"}handleSummaryClick(){this.open?this.hide():this.show(),this.header.focus()}handleSummaryKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==e.key&&"ArrowLeft"!==e.key||(e.preventDefault(),this.hide()),"ArrowDown"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await qe(this.body),this.body.classList.remove("hidden");const{keyframes:e,options:t}=Be(this,"accordion.show");await De(this.body,je(e,this.body.scrollHeight),t),this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await qe(this.body);const{keyframes:e,options:t}=Be(this,"accordion.hide"),s=t.duration;setTimeout(()=>{this.body.classList.add("hidden")},s-20),await De(this.body,je(e,this.body.scrollHeight),t),this.emit("sgds-after-hide")}}async show(){if(!this.open)return this.open=!0,Je(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,Je(this,"sgds-after-hide")}firstUpdated(){this.open||this.body.classList.add("hidden")}render(){return Q`
|
|
56
56
|
<div class="accordion-item">
|
|
57
57
|
<button
|
|
58
58
|
class=${Re({"accordion-btn":!0,disabled:this.disabled,collapsed:!this.open})}
|
|
@@ -10,7 +10,7 @@ const t=globalThis,l=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const b=globalThis,_=e=>{b.emitLitDebugLogEvents&&b.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let y,B=0;b.litIssuedWarnings??=new Set,y=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",b.litIssuedWarnings.has(t)||b.litIssuedWarnings.has(e)||(console.warn(t),b.litIssuedWarnings.add(t))},queueMicrotask(()=>{y("dev-mode","Lit is in dev mode. Not recommended for production!")});const $=b.ShadyDOM?.inUse&&!0===b.ShadyDOM?.noPatch?b.ShadyDOM.wrap:e=>e,A=b.trustedTypes,L=A?A.createPolicy("lit-html",{createHTML:e=>e}):void 0,S=e=>e,k=(e,t,l)=>S,P=e=>{if(ce!==k)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ce=e},E=()=>{ce=k},z=(e,t,l)=>ce(e,t,l),T="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+N,O=`<${U}>`,R=document,I=()=>R.createComment(""),W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,D=Array.isArray,j="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,J=/>/g,Y=new RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,G=/"/g,K=/^(?:script|style|textarea|title)$/i,Q=(ee=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&y("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),ae=new WeakMap,ie=R.createTreeWalker(R,129);let ce=k;function oe(e,t){if(!D(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==L?L.createHTML(t):t}class re{constructor({strings:e,_$litType$:t},l){let a;this.parts=[];let i=0,c=0;const o=e.length-1,r=this.parts,[s,n]=((e,t)=>{const l=e.length-1,a=[];let i,c=2===t?"<svg>":3===t?"<math>":"",o=q;for(let t=0;t<l;t++){const l=e[t];let r,s,n=-1,h=0;for(;h<l.length&&(o.lastIndex=h,s=o.exec(l),null!==s);)if(h=o.lastIndex,o===q){if("!--"===s[1])o=F;else if(void 0!==s[1])o=J;else if(void 0!==s[2])K.test(s[2])&&(i=new RegExp(`</${s[2]}`,"g")),o=Y;else if(void 0!==s[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===Y?">"===s[0]?(o=i??q,n=-1):void 0===s[1]?n=-2:(n=o.lastIndex-s[2].length,r=s[1],o=void 0===s[3]?Y:'"'===s[3]?G:X):o===G||o===X?o=Y:o===F||o===J?o=q:(o=Y,i=void 0);console.assert(-1===n||o===Y||o===X||o===G,"unexpected parse state B");const d=o===Y&&e[t+1].startsWith("/>")?" ":"";c+=o===q?l+O:n>=0?(a.push(r),l.slice(0,n)+T+l.slice(n)+N+d):l+N+(-2===n?t:d)}return[oe(e,c+(e[l]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(e,t);if(this.el=re.createElement(s,l),ie.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(a=ie.nextNode())&&r.length<o;){if(1===a.nodeType){{const e=a.localName;if(/^(?:textarea|template)$/i.test(e)&&a.innerHTML.includes(N)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);y("",t)}}if(a.hasAttributes())for(const e of a.getAttributeNames())if(e.endsWith(T)){const t=n[c++],l=a.getAttribute(e).split(N),o=/([.?@])?(.*)/.exec(t);r.push({type:1,index:i,name:o[2],strings:l,ctor:"."===o[1]?ve:"?"===o[1]?ge:"@"===o[1]?we:de}),a.removeAttribute(e)}else e.startsWith(N)&&(r.push({type:6,index:i}),a.removeAttribute(e));if(K.test(a.tagName)){const e=a.textContent.split(N),t=e.length-1;if(t>0){a.textContent=A?A.emptyScript:"";for(let l=0;l<t;l++)a.append(e[l],I()),ie.nextNode(),r.push({type:2,index:++i});a.append(e[t],I())}}}else if(8===a.nodeType){if(a.data===U)r.push({type:2,index:i});else{let e=-1;for(;-1!==(e=a.data.indexOf(N,e+1));)r.push({type:7,index:i}),e+=N.length-1}}i++}if(n.length!==c)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");_&&_({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const l=R.createElement("template");return l.innerHTML=e,l}}function se(e,t,l=e,a){if(t===te)return t;let i=void 0!==a?l.__directives?.[a]:l.__directive;const c=W(t)?void 0:t._$litDirective$;return i?.constructor!==c&&(i?._$notifyDirectiveConnectionChanged?.(!1),void 0===c?i=void 0:(i=new c(e),i._$initialize(e,l,a)),void 0!==a?(l.__directives??=[])[a]=i:l.__directive=i),void 0!==i&&(t=se(e,i._$resolve(e,t.values),i,a)),t}class ne{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:l}=this._$template,a=(e?.creationScope??R).importNode(t,!0);ie.currentNode=a;let i=ie.nextNode(),c=0,o=0,r=l[0];for(;void 0!==r;){if(c===r.index){let t;2===r.type?t=new he(i,i.nextSibling,this,e):1===r.type?t=new r.ctor(i,r.name,r.strings,this,e):6===r.type&&(t=new pe(i,this,e)),this._$parts.push(t),r=l[++o]}c!==r?.index&&(i=ie.nextNode(),c++)}return ie.currentNode=R,a}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(_&&_({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,l,a){this.type=2,this._$committedValue=le,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=l,this.options=a,this.__isConnected=a?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=$(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=se(this,e,t),W(e))e===le||null==e||""===e?(this._$committedValue!==le&&(_&&_({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=le):e!==this._$committedValue&&e!==te&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>D(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return $($(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ce!==k){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}_&&_({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==le&&W(this._$committedValue)){const t=$(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),_&&_({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),_&&_({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,a="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=re.createElement(oe(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===a)_&&_({kind:"template updating",template:a,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new ne(a,this),l=e._clone(this.options);_&&_({kind:"template instantiated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),_&&_({kind:"template instantiated and updated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new re(e)),t}_commitIterable(e){D(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let l,a=0;for(const i of e)a===t.length?t.push(l=new he(this._insert(I()),this._insert(I()),this,this.options)):l=t[a],l._$setValue(i),a++;a<t.length&&(this._$clear(l&&$(l._$endNode).nextSibling,a),t.length=a)}_$clear(e=$(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=$(e).nextSibling;$(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class de{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,l,a,i){this.type=1,this._$committedValue=le,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=a,this.options=i,l.length>2||""!==l[0]||""!==l[1]?(this._$committedValue=new Array(l.length-1).fill(new String),this.strings=l):this._$committedValue=le,this._sanitizer=void 0}_$setValue(e,t=this,l,a){const i=this.strings;let c=!1;if(void 0===i)e=se(this,e,t,0),c=!W(e)||e!==this._$committedValue&&e!==te,c&&(this._$committedValue=e);else{const a=e;let o,r;for(e=i[0],o=0;o<i.length-1;o++)r=se(this,a[l+o],t,o),r===te&&(r=this._$committedValue[o]),c||=!W(r)||r!==this._$committedValue[o],r===le?e=le:e!==le&&(e+=(r??"")+i[o+1]),this._$committedValue[o]=r}c&&!a&&this._commitValue(e)}_commitValue(e){e===le?$(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ce(this.element,this.name,"attribute")),e=this._sanitizer(e??""),_&&_({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),$(this.element).setAttribute(this.name,e??""))}}class ve extends de{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ce(this.element,this.name,"property")),e=this._sanitizer(e),_&&_({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===le?void 0:e}}class ge extends de{constructor(){super(...arguments),this.type=4}_commitValue(e){_&&_({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===le),options:this.options}),$(this.element).toggleAttribute(this.name,!!e&&e!==le)}}class we extends de{constructor(e,t,l,a,i){if(super(e,t,l,a,i),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=se(this,e,t,0)??le)===te)return;const l=this._$committedValue,a=e===le&&l!==le||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,i=e!==le&&(l===le||a);_&&_({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:a,addListener:i,oldListener:l}),a&&this.element.removeEventListener(this.name,this,l),i&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class pe{constructor(e,t,l){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=l}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){_&&_({kind:"commit to element binding",element:this.element,value:e,options:this.options}),se(this,e)}}const ue=b.litHtmlPolyfillSupportDevMode;ue?.(re,he),(b.litHtmlVersions??=[]).push("3.3.2"),b.litHtmlVersions.length>1&&queueMicrotask(()=>{y("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const fe=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const a=B++,i=l?.renderBefore??t;let c=i._$litPart$;if(_&&_({kind:"begin render",id:a,value:e,container:t,options:l,part:c}),void 0===c){const e=l?.renderBefore??null;i._$litPart$=c=new he(t.insertBefore(I(),e),e,void 0,l??{})}return c._$setValue(e),_&&_({kind:"end render",id:a,value:e,container:t,options:l,part:c}),c};fe.setSanitizer=P,fe.createSanitizer=z,fe._testOnlyClearSanitizerFactoryDoNotCallOrElse=E;
|
|
13
|
+
const _=globalThis,b=e=>{_.emitLitDebugLogEvents&&_.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let y,B=0;_.litIssuedWarnings??=new Set,y=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",_.litIssuedWarnings.has(t)||_.litIssuedWarnings.has(e)||(console.warn(t),_.litIssuedWarnings.add(t))},queueMicrotask(()=>{y("dev-mode","Lit is in dev mode. Not recommended for production!")});const $=_.ShadyDOM?.inUse&&!0===_.ShadyDOM?.noPatch?_.ShadyDOM.wrap:e=>e,A=_.trustedTypes,L=A?A.createPolicy("lit-html",{createHTML:e=>e}):void 0,S=e=>e,k=(e,t,l)=>S,P=e=>{if(ce!==k)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ce=e},E=()=>{ce=k},z=(e,t,l)=>ce(e,t,l),T="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+N,O=`<${U}>`,R=document,I=()=>R.createComment(""),W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,D=Array.isArray,j="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,J=/>/g,Y=new RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,G=/"/g,K=/^(?:script|style|textarea|title)$/i,Q=(ee=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&y("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),ae=new WeakMap,ie=R.createTreeWalker(R,129);let ce=k;function oe(e,t){if(!D(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==L?L.createHTML(t):t}class re{constructor({strings:e,_$litType$:t},l){let a;this.parts=[];let i=0,c=0;const o=e.length-1,r=this.parts,[s,n]=((e,t)=>{const l=e.length-1,a=[];let i,c=2===t?"<svg>":3===t?"<math>":"",o=q;for(let t=0;t<l;t++){const l=e[t];let r,s,n=-1,h=0;for(;h<l.length&&(o.lastIndex=h,s=o.exec(l),null!==s);)if(h=o.lastIndex,o===q){if("!--"===s[1])o=F;else if(void 0!==s[1])o=J;else if(void 0!==s[2])K.test(s[2])&&(i=new RegExp(`</${s[2]}`,"g")),o=Y;else if(void 0!==s[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===Y?">"===s[0]?(o=i??q,n=-1):void 0===s[1]?n=-2:(n=o.lastIndex-s[2].length,r=s[1],o=void 0===s[3]?Y:'"'===s[3]?G:X):o===G||o===X?o=Y:o===F||o===J?o=q:(o=Y,i=void 0);console.assert(-1===n||o===Y||o===X||o===G,"unexpected parse state B");const d=o===Y&&e[t+1].startsWith("/>")?" ":"";c+=o===q?l+O:n>=0?(a.push(r),l.slice(0,n)+T+l.slice(n)+N+d):l+N+(-2===n?t:d)}return[oe(e,c+(e[l]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(e,t);if(this.el=re.createElement(s,l),ie.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(a=ie.nextNode())&&r.length<o;){if(1===a.nodeType){{const e=a.localName;if(/^(?:textarea|template)$/i.test(e)&&a.innerHTML.includes(N)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);y("",t)}}if(a.hasAttributes())for(const e of a.getAttributeNames())if(e.endsWith(T)){const t=n[c++],l=a.getAttribute(e).split(N),o=/([.?@])?(.*)/.exec(t);r.push({type:1,index:i,name:o[2],strings:l,ctor:"."===o[1]?ve:"?"===o[1]?ge:"@"===o[1]?we:de}),a.removeAttribute(e)}else e.startsWith(N)&&(r.push({type:6,index:i}),a.removeAttribute(e));if(K.test(a.tagName)){const e=a.textContent.split(N),t=e.length-1;if(t>0){a.textContent=A?A.emptyScript:"";for(let l=0;l<t;l++)a.append(e[l],I()),ie.nextNode(),r.push({type:2,index:++i});a.append(e[t],I())}}}else if(8===a.nodeType){if(a.data===U)r.push({type:2,index:i});else{let e=-1;for(;-1!==(e=a.data.indexOf(N,e+1));)r.push({type:7,index:i}),e+=N.length-1}}i++}if(n.length!==c)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");b&&b({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const l=R.createElement("template");return l.innerHTML=e,l}}function se(e,t,l=e,a){if(t===te)return t;let i=void 0!==a?l.__directives?.[a]:l.__directive;const c=W(t)?void 0:t._$litDirective$;return i?.constructor!==c&&(i?._$notifyDirectiveConnectionChanged?.(!1),void 0===c?i=void 0:(i=new c(e),i._$initialize(e,l,a)),void 0!==a?(l.__directives??=[])[a]=i:l.__directive=i),void 0!==i&&(t=se(e,i._$resolve(e,t.values),i,a)),t}class ne{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:l}=this._$template,a=(e?.creationScope??R).importNode(t,!0);ie.currentNode=a;let i=ie.nextNode(),c=0,o=0,r=l[0];for(;void 0!==r;){if(c===r.index){let t;2===r.type?t=new he(i,i.nextSibling,this,e):1===r.type?t=new r.ctor(i,r.name,r.strings,this,e):6===r.type&&(t=new pe(i,this,e)),this._$parts.push(t),r=l[++o]}c!==r?.index&&(i=ie.nextNode(),c++)}return ie.currentNode=R,a}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(b&&b({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,l,a){this.type=2,this._$committedValue=le,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=l,this.options=a,this.__isConnected=a?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=$(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=se(this,e,t),W(e))e===le||null==e||""===e?(this._$committedValue!==le&&(b&&b({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=le):e!==this._$committedValue&&e!==te&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>D(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return $($(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ce!==k){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}b&&b({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==le&&W(this._$committedValue)){const t=$(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),b&&b({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),b&&b({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,a="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=re.createElement(oe(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===a)b&&b({kind:"template updating",template:a,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new ne(a,this),l=e._clone(this.options);b&&b({kind:"template instantiated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),b&&b({kind:"template instantiated and updated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new re(e)),t}_commitIterable(e){D(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let l,a=0;for(const i of e)a===t.length?t.push(l=new he(this._insert(I()),this._insert(I()),this,this.options)):l=t[a],l._$setValue(i),a++;a<t.length&&(this._$clear(l&&$(l._$endNode).nextSibling,a),t.length=a)}_$clear(e=$(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=$(e).nextSibling;$(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class de{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,l,a,i){this.type=1,this._$committedValue=le,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=a,this.options=i,l.length>2||""!==l[0]||""!==l[1]?(this._$committedValue=new Array(l.length-1).fill(new String),this.strings=l):this._$committedValue=le,this._sanitizer=void 0}_$setValue(e,t=this,l,a){const i=this.strings;let c=!1;if(void 0===i)e=se(this,e,t,0),c=!W(e)||e!==this._$committedValue&&e!==te,c&&(this._$committedValue=e);else{const a=e;let o,r;for(e=i[0],o=0;o<i.length-1;o++)r=se(this,a[l+o],t,o),r===te&&(r=this._$committedValue[o]),c||=!W(r)||r!==this._$committedValue[o],r===le?e=le:e!==le&&(e+=(r??"")+i[o+1]),this._$committedValue[o]=r}c&&!a&&this._commitValue(e)}_commitValue(e){e===le?$(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ce(this.element,this.name,"attribute")),e=this._sanitizer(e??""),b&&b({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),$(this.element).setAttribute(this.name,e??""))}}class ve extends de{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ce(this.element,this.name,"property")),e=this._sanitizer(e),b&&b({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===le?void 0:e}}class ge extends de{constructor(){super(...arguments),this.type=4}_commitValue(e){b&&b({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===le),options:this.options}),$(this.element).toggleAttribute(this.name,!!e&&e!==le)}}class we extends de{constructor(e,t,l,a,i){if(super(e,t,l,a,i),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=se(this,e,t,0)??le)===te)return;const l=this._$committedValue,a=e===le&&l!==le||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,i=e!==le&&(l===le||a);b&&b({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:a,addListener:i,oldListener:l}),a&&this.element.removeEventListener(this.name,this,l),i&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class pe{constructor(e,t,l){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=l}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){b&&b({kind:"commit to element binding",element:this.element,value:e,options:this.options}),se(this,e)}}const ue=_.litHtmlPolyfillSupportDevMode;ue?.(re,he),(_.litHtmlVersions??=[]).push("3.3.2"),_.litHtmlVersions.length>1&&queueMicrotask(()=>{y("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const fe=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const a=B++,i=l?.renderBefore??t;let c=i._$litPart$;if(b&&b({kind:"begin render",id:a,value:e,container:t,options:l,part:c}),void 0===c){const e=l?.renderBefore??null;i._$litPart$=c=new he(t.insertBefore(I(),e),e,void 0,l??{})}return c._$setValue(e),b&&b({kind:"end render",id:a,value:e,container:t,options:l,part:c}),c};fe.setSanitizer=P,fe.createSanitizer=z,fe._testOnlyClearSanitizerFactoryDoNotCallOrElse=E;
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
@@ -22,7 +22,7 @@ const me=globalThis;let Ze;me.litIssuedWarnings??=new Set,Ze=(e,t)=>{t+=` See ht
|
|
|
22
22
|
* Copyright 2017 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
24
|
*/
|
|
25
|
-
let He;Me?.({LitElement:Ce}),(me.litElementVersions??=[]).push("4.2.2"),me.litElementVersions.length>1&&queueMicrotask(()=>{Ze("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,He=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Ve={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:M},
|
|
25
|
+
let He;Me?.({LitElement:Ce}),(me.litElementVersions??=[]).push("4.2.2"),me.litElementVersions.length>1&&queueMicrotask(()=>{Ze("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,He=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Ve={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:M},_e=(e=Ve,t,l)=>{const{kind:a,metadata:i}=l;null==i&&He("missing-class-metadata",`The class ${t} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let c=globalThis.litPropertyMetadata.get(i);if(void 0===c&&globalThis.litPropertyMetadata.set(i,c=new Map),"setter"===a&&((e=Object.create(e)).wrapped=!0),c.set(l.name,e),"accessor"===a){const{name:a}=l;return{set(l){const i=t.get.call(this);t.set.call(this,l),this.requestUpdate(a,i,e,!0,l)},init(t){return void 0!==t&&this._$changeProperty(a,void 0,e,t),t}}}if("setter"===a){const{name:a}=l;return function(l){const i=this[a];t.call(this,l),this.requestUpdate(a,i,e,!0,l)}}throw new Error(`Unsupported decorator location: ${a}`)};function be(e){return(t,l)=>"object"==typeof l?_e(e,t,l):((e,t,l)=>{const a=t.hasOwnProperty(l);return t.constructor.createProperty(l,e),a?Object.getOwnPropertyDescriptor(t,l):void 0})(e,t,l)}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
@@ -43,11 +43,11 @@ const ye=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
|
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2020 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/var Ae;const Le=Symbol.for(""),Se=e=>{if(e?.r===Le)return e?._$litStatic$},ke=new Map,Pe=(Ee=Q,(e,...t)=>{const l=t.length;let a,i;const c=[],o=[];let r,s=0,n=!1;for(;s<l;){for(r=e[s];s<l&&void 0!==(i=t[s],a=Se(i));)r+=a+e[++s],n=!0;s!==l&&o.push(i),c.push(r),s++}if(s===l&&c.push(e[l]),n){const l=c.join("$$lit$$");void 0===(e=ke.get(l))&&(c.raw=c,ke.set(l,e=c)),t=o}return Ee(e,...t)});var Ee,ze=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;color:var(--sgds-body-color-default,#1a1a1a);display:block;font-family:var(--sgds-font-family-brand,"Inter",system-ui,sans-serif);font-size:var(--sgds-font-size-body-md,1rem);font-weight:var(--sgds-font-weight-regular,400);line-height:var(--sgds-line-height-xs,24px);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 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.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.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.039h4.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.468-.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.774c-.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-.525-.042-1.175-.042-1.993V9.774c0-.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-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.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' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 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.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.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.039h4.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.468-.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.774c-.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-.525-.042-1.175-.042-1.993V9.774c0-.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-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.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;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Te extends Ce{emit(e,t){const l=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(l),l}static define(e,t=this,l={}){if(customElements.get(e));else try{customElements.define(e,t,l)}catch(a){customElements.define(e,class extends t{},l)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Te.styles=[ze],Te.dependencies={},e([
|
|
46
|
+
*/var Ae;const Le=Symbol.for(""),Se=e=>{if(e?.r===Le)return e?._$litStatic$},ke=new Map,Pe=(Ee=Q,(e,...t)=>{const l=t.length;let a,i;const c=[],o=[];let r,s=0,n=!1;for(;s<l;){for(r=e[s];s<l&&void 0!==(i=t[s],a=Se(i));)r+=a+e[++s],n=!0;s!==l&&o.push(i),c.push(r),s++}if(s===l&&c.push(e[l]),n){const l=c.join("$$lit$$");void 0===(e=ke.get(l))&&(c.raw=c,ke.set(l,e=c)),t=o}return Ee(e,...t)});var Ee,ze=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;color:var(--sgds-body-color-default,#1a1a1a);display:block;font-family:var(--sgds-font-family-brand,"Inter",system-ui,sans-serif);font-size:var(--sgds-font-size-body-md,1rem);font-weight:var(--sgds-font-weight-regular,400);line-height:var(--sgds-line-height-xs,24px);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 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.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.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.039h4.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.468-.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.774c-.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-.525-.042-1.175-.042-1.993V9.774c0-.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-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.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' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 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.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.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.039h4.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.468-.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.774c-.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-.525-.042-1.175-.042-1.993V9.774c0-.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-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.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;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Te extends Ce{emit(e,t){const l=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(l),l}static define(e,t=this,l={}){if(customElements.get(e));else try{customElements.define(e,t,l)}catch(a){customElements.define(e,class extends t{},l)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Te.styles=[ze],Te.dependencies={},e([be({type:Boolean,reflect:!0})],Te.prototype,"ssr",void 0);var Ne=o`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}:host([size=sm]) .btn-close{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}:host([tone=fixed-light]) .btn-close{color:var(--sgds-color-fixed-light)}:host([tone=fixed-dark]) .btn-close{color:var(--sgds-color-fixed-dark)}.btn-close{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-close-btn-border-radius);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.btn-close:focus,.btn-close:focus-visible,.btn-close:hover{background-color:var(--sgds-bg-translucent)}:host([tone=fixed-light]) .btn-close:focus,:host([tone=fixed-light]) .btn-close:focus-visible,:host([tone=fixed-light]) .btn-close:hover{background-color:var(--sgds-bg-translucent-fixed-light)}:host([tone=fixed-dark]) .btn-close:focus,:host([tone=fixed-dark]) .btn-close:focus-visible,:host([tone=fixed-dark]) .btn-close:hover{background-color:var(--sgds-bg-translucent-fixed-dark)}.btn-close:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;function Ue(e,t){customElements.get(e)||customElements.define(e,t)}function Oe(e){return!!function(e){return!!customElements.get(e)}(e)||(console.error(`Custom element of name : ${e} is not registered. Remember to import the component file for custom element registration`),!1)}class Re extends Te{constructor(){super(...arguments),this.size="md",this.tone="default",this._clickHandler=()=>{}}_handleClick(){this.removeEventListener("click",this._clickHandler),this.addEventListener("click",this._clickHandler)}firstUpdated(e){super.firstUpdated(e),Oe("sgds-icon")}render(){return Q`
|
|
47
47
|
<button class="btn-close" aria-label="Close button" @click=${this._handleClick}>
|
|
48
|
-
<sgds-icon name="cross" size
|
|
48
|
+
<sgds-icon name="cross" size="sm"></sgds-icon>
|
|
49
49
|
</button>
|
|
50
|
-
`}}Re.styles=[...Te.styles,Ne],e([
|
|
50
|
+
`}}Re.styles=[...Te.styles,Ne],e([be({type:String,reflect:!0})],Re.prototype,"size",void 0),e([be({type:String,reflect:!0})],Re.prototype,"tone",void 0);var Ie=Q`
|
|
51
51
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
52
52
|
<path
|
|
53
53
|
fill="currentColor"
|
|
@@ -2263,7 +2263,7 @@ const ye=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
|
|
|
2263
2263
|
clip-rule="evenodd"
|
|
2264
2264
|
/>
|
|
2265
2265
|
</svg>
|
|
2266
|
-
`};var it=o`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class ct extends Te{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=at[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||le}}ct.styles=[...Te.styles,it],e([
|
|
2266
|
+
`};var it=o`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class ct extends Te{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=at[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||le}}ct.styles=[...Te.styles,it],e([be({type:String,reflect:!0})],ct.prototype,"name",void 0),e([be({type:String,reflect:!0})],ct.prototype,"size",void 0);var ot=o`:host([variant=success]) .alert{background-color:var(--sgds-success-surface-default)}:host([variant=warning]) .alert{--sgds-alert-color:var(--sgds-warning-fixed-dark);background-color:var(--sgds-warning-surface-default)}:host([variant=danger]) .alert{background-color:var(--sgds-danger-surface-default)}:host([variant=neutral]) .alert{background-color:var(--sgds-neutral-surface-emphasis)}:host([variant=success][outlined]) .alert{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted)}:host([variant=warning][outlined]) .alert{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted)}:host([variant=danger][outlined]) .alert{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted)}:host([variant=neutral][outlined]) .alert{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted)}:host([outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-primary-color-fixed-dark)}:host([variant=success][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-success-color-fixed-dark)}:host([variant=warning][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-warning-color-fixed-light)}:host([variant=danger][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-danger-color-fixed-dark)}:host([variant=neutral][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-color-fixed-dark)}.alert{--sgds-alert-color:var(--sgds-color-fixed-light);background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);color:var(--sgds-alert-color);display:flex;flex-direction:row;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-lg);position:relative}.alert.outlined{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted)}.alert-content{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-md);padding-right:var(--sgds-padding-2-xl)}.alert-content__upper{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.alert-title{font-size:var(--sgds-font-size-subtitle-sm);font-style:normal;font-weight:var(--sgds-font-weight-semibold);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(*){font-size:var(--sgds-font-size-body-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert sgds-close-button{position:absolute;right:14px;top:14px}`;class rt extends Te{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.variant="info",this.outlined=!1,this.title=""}close(){this.show=!1}_handleShowChange(){this.show?this.emit("sgds-show"):this.emit("sgds-hide")}render(){return this.dismissible&&this.show||!this.dismissible?Pe`
|
|
2267
2267
|
<div
|
|
2268
2268
|
class="${$e({alert:!0,show:this.show,"alert-dismissible":this.dismissible,outlined:this.outlined})}"
|
|
2269
2269
|
role="alert"
|
|
@@ -2283,7 +2283,7 @@ const ye=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
|
|
|
2283
2283
|
tone=${this.outlined||"warning"===this.variant?"fixed-dark":"fixed-light"}
|
|
2284
2284
|
></sgds-close-button>`:le}
|
|
2285
2285
|
</div>
|
|
2286
|
-
`:le}}rt.styles=[...Te.styles,ot],rt.dependencies={"sgds-close-button":Re,"sgds-icon":ct},e([
|
|
2286
|
+
`:le}}rt.styles=[...Te.styles,ot],rt.dependencies={"sgds-close-button":Re,"sgds-icon":ct},e([be({type:Boolean,reflect:!0})],rt.prototype,"show",void 0),e([be({type:Boolean,reflect:!0})],rt.prototype,"dismissible",void 0),e([be({type:String,reflect:!0})],rt.prototype,"variant",void 0),e([be({type:Boolean,reflect:!0})],rt.prototype,"outlined",void 0),e([be({type:String,reflect:!0})],rt.prototype,"title",void 0),e([function(e,t){const l=Object.assign({waitUntilFirstUpdate:!1},t);return(t,a)=>{const{update:i}=t;if(e in t){const c=e;t.update=function(e){if(e.has(c)){const t=e.get(c),i=this[c];t!==i&&(l.waitUntilFirstUpdate&&!this.hasUpdated||this[a](t,i))}i.call(this,e)}}}}("show")],rt.prototype,"_handleShowChange",null);
|
|
2287
2287
|
/**
|
|
2288
2288
|
* @license
|
|
2289
2289
|
* Copyright 2018 Google LLC
|
|
@@ -2291,5 +2291,5 @@ const ye=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
|
|
|
2291
2291
|
*/
|
|
2292
2292
|
const st=e=>e??le;var nt=o`:host{cursor:pointer;display:inline-block}.alert-link,.alert-link:hover{color:var(--sgds-alert-color);font-size:var(--sgds-font-size-body-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs);text-decoration-line:underline}.alert-link:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,ht=o`::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 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.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.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.039h4.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.468-.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.774c-.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-.525-.042-1.175-.042-1.993V9.774c0-.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-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.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' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 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.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.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.039h4.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.468-.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.774c-.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-.525-.042-1.175-.042-1.993V9.774c0-.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-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.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;vertical-align:top;width:1em}`;class dt extends Te{render(){return Pe`
|
|
2293
2293
|
<a class="alert-link" href=${st(this.href)} target=${st(this.target)} tabindex="0"><slot></slot></a>
|
|
2294
|
-
`}}dt.styles=[...Te.styles,ht,nt],e([
|
|
2294
|
+
`}}dt.styles=[...Te.styles,ht,nt],e([be({type:String,reflect:!0})],dt.prototype,"href",void 0),e([be()],dt.prototype,"target",void 0),Ue("sgds-alert",rt),Ue("sgds-alert-link",dt)});
|
|
2295
2295
|
//# sourceMappingURL=index.umd.min.js.map
|