@universal-material/web 3.0.29 → 3.0.31
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/checkbox/checkbox.styles.js +1 -1
- package/checkbox/checkbox.styles.js.map +1 -1
- package/custom-elements.json +2460 -2460
- package/field/field.styles.js +1 -1
- package/field/field.styles.js.map +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.d.ts.map +1 -1
- package/menu/menu.js.map +1 -1
- package/package.json +1 -1
- package/shared/base.styles.d.ts.map +1 -1
- package/shared/base.styles.js +1 -0
- package/shared/base.styles.js.map +1 -1
package/field/field.styles.js
CHANGED
|
@@ -231,7 +231,7 @@ export const styles = css `
|
|
|
231
231
|
|
|
232
232
|
:host([variant=filled]) .field {
|
|
233
233
|
border-radius: var(--u-field-filled-border-radius, 4px 4px 0 0);
|
|
234
|
-
background-color: var(--u-color-surface-variant);
|
|
234
|
+
background-color: var(--u-color-on-surface-variant, rgb(73, 69, 79));
|
|
235
235
|
}
|
|
236
236
|
:host([variant=filled]) .field::after {
|
|
237
237
|
border-bottom-style: solid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.styles.js","sourceRoot":"","sources":["../../src/field/field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8RzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_control-line-height: var(--u-field-control-line-height, 1.5rem);\n --_label-line-height: var(--u-field-label-line-height, 1rem);\n --_field-icon-size: var(--u-field-icon-size, 1.5rem);\n --_field-control-padding: var(--u-field-control-padding, 16px);\n --_field-control-inline-padding: var(--u-field-control-inline-padding, var(--_field-control-padding));\n --_field-control-block-padding: var(--u-field-control-block-padding, var(--_field-control-padding));\n --_field-min-height: var(--u-field-min-height, 56px);\n --_field-placeholder-color: var(--u-field-placeholder-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_disabled-color: var(--u-field-disabled-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-field-disabled-opacity, .38)));\n --_disabled-background-color: var(--u-filled-field-disabled-background-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-filled-field-background-disabled-opacity, .12)));\n --_color-primary: var(--u-color-primary, rgb(103, 80, 164));\n --_color-error: var(--u-field-error-color, var(--u-color-error, rgb(179, 38, 30)));\n --_active-indicator-opacity: 1;\n --_vertical-padding: var(--u-field-vertical-padding, 8px);\n --_icon-size: var(--u-field-icon-size, 1.5rem);\n --_icon-padding: var(--u-field-icon-padding, 12px);\n --_icon-color: var(--u-icon-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_focus-border-width: var(--u-text-field-focus-border-width, 2px);\n --_field-control-leading-padding: var(--_field-control-inline-padding);\n --_field-control-trailing-padding: var(--_field-control-inline-padding);\n --_outlined-label-margin: var(--u-outlined-field-label-margin, 12px);\n --_outlined-label-padding: var(--u-outlined-field-label-padding, 4px);\n --u-label-input-start: auto;\n --u-label-input-span-leading-offset: 0;\n --u-label-input-span-trailing-offset: 0;\n --u-text-field-horizontal-padding: 12px;\n }\n\n .field {\n display: block;\n position: relative;\n }\n .field::before, .field::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n pointer-events: none;\n }\n .field::before {\n background: var(--u-color-on-surface, rgb(29, 27, 32));\n transition: opacity 150ms;\n opacity: 0;\n }\n .field::after {\n border-width: var(--u-field-border-width, 1px);\n border-color: var(--u-field-border-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n }\n\n @media (hover: hover) {\n :host([variant=filled]:not([disabled]):not([invalid]):hover) .field::before {\n opacity: var(--u-state-hover-opacity, 0.08);\n }\n :host(:not([disabled]):not([invalid]):not(:focus-within):hover) .field::after {\n border-color: var(--u-field-hover-border-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n }\n }\n .icon {\n position: absolute;\n width: var(--_icon-size);\n height: 100%;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--_icon-color);\n font-size: var(--_icon-size);\n line-height: var(--_icon-size);\n }\n .icon::slotted(*) {\n flex-shrink: 0;\n }\n\n .leading-icon {\n inset-inline-start: var(--_icon-padding);\n }\n\n .trailing-icon {\n inset-inline-end: var(--_icon-padding);\n }\n\n .label {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-label-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-label-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-label-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n font-size: var(--u-field-label-font-size, var(--u-body-s-font-size, 0.75rem));\n display: block;\n position: absolute;\n inset-inline-start: var(--_field-control-leading-padding);\n margin-bottom: 0;\n line-height: var(--_label-line-height);\n color: var(--u-field-label-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n transition: inset 200ms, font-size 200ms;\n }\n\n .input {\n display: block;\n color: var(--u-on-surface-color);\n }\n .input:focus {\n outline: 0;\n }\n .input::slotted(*) {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-control-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-control-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-control-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-control-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n width: 100%;\n color: var(--u-field-input-text-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n min-height: var(--_field-min-height);\n line-height: var(--_control-line-height);\n padding-block: 0;\n padding-inline: var(--_field-control-leading-padding) var(--_field-control-trailing-padding);\n appearance: none;\n background: transparent;\n border: none;\n outline: 0 !important;\n }\n .input, .input::slotted(select), .input::slotted(:is(input, textarea))::placeholder {\n transition: color 150ms 100ms;\n }\n .input::slotted(:is(input, textarea))::placeholder {\n color: var(--_field-placeholder-color);\n }\n\n .supporting-text {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-supporting-text-line-height, var(--u-body-s-line-height, 1rem));\n font-size: var(--u-field-supporting-text-font-size, var(--u-body-s-font-size, 0.75rem));\n letter-spacing: var(--u-field-supporting-text-letter-spacing, var(--u-body-s-letter-spacing, 0.0333333333rem));\n font-weight: var(--u-field-supporting-text-font-weight, var(--u-body-s-font-weight, var(--u-font-weight-regular, 400)));\n display: flex;\n color: var(--u-field-supporting-text, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n padding-inline: 16px;\n gap: 16px;\n }\n .supporting-text .supporting-text-slot {\n display: block;\n }\n .supporting-text ::slotted(*) {\n display: inline-block;\n margin-top: 4px;\n }\n\n .error-text {\n display: none;\n }\n\n .counter {\n display: none;\n margin-inline-start: auto;\n }\n\n :host([has-counter]) .counter {\n display: block;\n }\n\n :host([has-leading-icon]) {\n --_field-control-leading-padding: calc(var(--_icon-padding) + var(--_icon-size) + var(--_field-control-inline-padding)) ;\n }\n\n :host([has-trailing-icon]) {\n --_field-control-trailing-padding: calc(var(--_icon-padding) + var(--_icon-size) + var(--_field-control-inline-padding)) ;\n }\n\n :host(:focus-within) {\n --u-field-border-width: var(--_focus-border-width);\n }\n :host(:focus-within) .field::after {\n border-color: var(--u-field-focused-border-color, var(--_color-primary));\n }\n :host(:focus-within) .label {\n color: var(--u-field-label-focused-color, var(--_color-primary));\n }\n\n :host([invalid]) .field::after {\n border-color: var(--u-field-error-border-color, var(--_color-error));\n }\n :host([invalid]) .label {\n color: var(--u-field-label-error-color, var(--_color-error));\n }\n :host([invalid]) .supporting-text {\n color: var(--u-field-supporting-text-error-color, var(--_color-error));\n }\n :host([invalid]) .trailing-icon {\n --u-standard-icon-button-color: var(--u-field-trailing-icon-error-color, var(--_color-error));\n color: var(--u-field-trailing-icon-error-color, var(--_color-error));\n }\n :host([invalid]) .leading-icon {\n --u-standard-icon-button-color: var(--u-field-leading-icon-error-color, var(--_color-error));\n color: var(--u-field-leading-icon-error-color, var(--_icon-color));\n }\n\n :host([invalid][has-error-text]) .error-text {\n display: block;\n }\n :host([invalid][has-error-text]) .supporting-text-slot {\n display: none;\n }\n\n :host([disabled]) .field::after {\n border-color: var(--u-field-disabled-border-color, var(--_disabled-color));\n }\n :host([disabled]) .supporting-text {\n color: var(--u-field-supporting-text-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .label {\n color: var(--u-field-label-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .input::slotted(*) {\n color: var(--u-field-input-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .input::slotted(:is(input, textarea))::placeholder {\n color: var(--u-field-input-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .trailing-icon {\n color: var(--u-field-trailing-icon-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .leading-icon {\n color: var(--u-field-leading-icon-disabled-color, var(--_disabled-color));\n }\n\n :host([variant=filled]) .field {\n border-radius: var(--u-field-filled-border-radius, 4px 4px 0 0);\n background-color: var(--u-color-surface-variant);\n }\n :host([variant=filled]) .field::after {\n border-bottom-style: solid;\n }\n :host([variant=filled]) .label {\n top: var(--_vertical-padding);\n }\n :host([variant=filled]) .input::slotted(:is(input, textarea, select, button)) {\n display: block;\n border-top: calc(var(--_vertical-padding) + var(--_label-line-height)) solid transparent;\n border-bottom: var(--_vertical-padding) solid transparent;\n }\n\n :host([variant=filled][disabled]) .field {\n background-color: var(--u-filled-field-disabled-background-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-filled-field-background-disabled-opacity, 0.12)));\n }\n\n :host([variant=outlined]) .field::after {\n --_mid-point: calc(var(--u-field-label-half-width) + var(--_outlined-label-margin) + var(--_outlined-label-padding));\n border-radius: var(--u-outlined-field-shape-corder, var(--u-shape-corner-small, 8px));\n border-style: solid;\n clip-path: polygon(0 0, var(--_mid-point) 0, var(--_mid-point) var(--_focus-border-width), var(--_mid-point) var(--_focus-border-width), var(--_mid-point) 0, 100% 0, 100% 100%, 0 100%);\n transition: clip-path 100ms;\n }\n :host([variant=outlined]) .label {\n top: calc(var(--_label-line-height) / -2);\n }\n\n :host([variant=outlined]:focus-within) .field::after,\n :host([variant=outlined]:not([empty])) .field::after {\n --_end-point: calc(var(--u-field-label-width) + var(--_outlined-label-margin) + (var(--_outlined-label-padding) * 2));\n clip-path: polygon(0 0, var(--_outlined-label-margin) 0, var(--_outlined-label-margin) var(--_focus-border-width), var(--_end-point) var(--_focus-border-width), var(--_end-point) 0, 100% 0, 100% 100%, 0 100%);\n }\n :host([variant=outlined]:focus-within) .label,\n :host([variant=outlined]:not([empty])) .label {\n inset-inline-start: calc(var(--_outlined-label-margin) + var(--_outlined-label-padding));\n }\n\n :host([empty]) ::slotted(select) {\n color: var(--_field-placeholder-color);\n }\n\n :host([empty]:not(:focus-within)) .label {\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n pointer-events: none;\n top: calc(var(--_field-min-height) / 2 - var(--_label-line-height) / 2);\n }\n :host([empty]:not(:focus-within)) .input,\n :host([empty]:not(:focus-within)) ::slotted(:is(input, textarea))::placeholder,\n :host([empty]:not(:focus-within)) ::slotted(select) {\n color: transparent;\n transition: color 150ms;\n }\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"field.styles.js","sourceRoot":"","sources":["../../src/field/field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8RzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_control-line-height: var(--u-field-control-line-height, 1.5rem);\n --_label-line-height: var(--u-field-label-line-height, 1rem);\n --_field-icon-size: var(--u-field-icon-size, 1.5rem);\n --_field-control-padding: var(--u-field-control-padding, 16px);\n --_field-control-inline-padding: var(--u-field-control-inline-padding, var(--_field-control-padding));\n --_field-control-block-padding: var(--u-field-control-block-padding, var(--_field-control-padding));\n --_field-min-height: var(--u-field-min-height, 56px);\n --_field-placeholder-color: var(--u-field-placeholder-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_disabled-color: var(--u-field-disabled-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-field-disabled-opacity, .38)));\n --_disabled-background-color: var(--u-filled-field-disabled-background-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-filled-field-background-disabled-opacity, .12)));\n --_color-primary: var(--u-color-primary, rgb(103, 80, 164));\n --_color-error: var(--u-field-error-color, var(--u-color-error, rgb(179, 38, 30)));\n --_active-indicator-opacity: 1;\n --_vertical-padding: var(--u-field-vertical-padding, 8px);\n --_icon-size: var(--u-field-icon-size, 1.5rem);\n --_icon-padding: var(--u-field-icon-padding, 12px);\n --_icon-color: var(--u-icon-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_focus-border-width: var(--u-text-field-focus-border-width, 2px);\n --_field-control-leading-padding: var(--_field-control-inline-padding);\n --_field-control-trailing-padding: var(--_field-control-inline-padding);\n --_outlined-label-margin: var(--u-outlined-field-label-margin, 12px);\n --_outlined-label-padding: var(--u-outlined-field-label-padding, 4px);\n --u-label-input-start: auto;\n --u-label-input-span-leading-offset: 0;\n --u-label-input-span-trailing-offset: 0;\n --u-text-field-horizontal-padding: 12px;\n }\n\n .field {\n display: block;\n position: relative;\n }\n .field::before, .field::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n pointer-events: none;\n }\n .field::before {\n background: var(--u-color-on-surface, rgb(29, 27, 32));\n transition: opacity 150ms;\n opacity: 0;\n }\n .field::after {\n border-width: var(--u-field-border-width, 1px);\n border-color: var(--u-field-border-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n }\n\n @media (hover: hover) {\n :host([variant=filled]:not([disabled]):not([invalid]):hover) .field::before {\n opacity: var(--u-state-hover-opacity, 0.08);\n }\n :host(:not([disabled]):not([invalid]):not(:focus-within):hover) .field::after {\n border-color: var(--u-field-hover-border-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n }\n }\n .icon {\n position: absolute;\n width: var(--_icon-size);\n height: 100%;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--_icon-color);\n font-size: var(--_icon-size);\n line-height: var(--_icon-size);\n }\n .icon::slotted(*) {\n flex-shrink: 0;\n }\n\n .leading-icon {\n inset-inline-start: var(--_icon-padding);\n }\n\n .trailing-icon {\n inset-inline-end: var(--_icon-padding);\n }\n\n .label {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-label-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-label-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-label-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n font-size: var(--u-field-label-font-size, var(--u-body-s-font-size, 0.75rem));\n display: block;\n position: absolute;\n inset-inline-start: var(--_field-control-leading-padding);\n margin-bottom: 0;\n line-height: var(--_label-line-height);\n color: var(--u-field-label-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n transition: inset 200ms, font-size 200ms;\n }\n\n .input {\n display: block;\n color: var(--u-on-surface-color);\n }\n .input:focus {\n outline: 0;\n }\n .input::slotted(*) {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-control-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-control-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-control-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-control-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n width: 100%;\n color: var(--u-field-input-text-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n min-height: var(--_field-min-height);\n line-height: var(--_control-line-height);\n padding-block: 0;\n padding-inline: var(--_field-control-leading-padding) var(--_field-control-trailing-padding);\n appearance: none;\n background: transparent;\n border: none;\n outline: 0 !important;\n }\n .input, .input::slotted(select), .input::slotted(:is(input, textarea))::placeholder {\n transition: color 150ms 100ms;\n }\n .input::slotted(:is(input, textarea))::placeholder {\n color: var(--_field-placeholder-color);\n }\n\n .supporting-text {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-supporting-text-line-height, var(--u-body-s-line-height, 1rem));\n font-size: var(--u-field-supporting-text-font-size, var(--u-body-s-font-size, 0.75rem));\n letter-spacing: var(--u-field-supporting-text-letter-spacing, var(--u-body-s-letter-spacing, 0.0333333333rem));\n font-weight: var(--u-field-supporting-text-font-weight, var(--u-body-s-font-weight, var(--u-font-weight-regular, 400)));\n display: flex;\n color: var(--u-field-supporting-text, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n padding-inline: 16px;\n gap: 16px;\n }\n .supporting-text .supporting-text-slot {\n display: block;\n }\n .supporting-text ::slotted(*) {\n display: inline-block;\n margin-top: 4px;\n }\n\n .error-text {\n display: none;\n }\n\n .counter {\n display: none;\n margin-inline-start: auto;\n }\n\n :host([has-counter]) .counter {\n display: block;\n }\n\n :host([has-leading-icon]) {\n --_field-control-leading-padding: calc(var(--_icon-padding) + var(--_icon-size) + var(--_field-control-inline-padding)) ;\n }\n\n :host([has-trailing-icon]) {\n --_field-control-trailing-padding: calc(var(--_icon-padding) + var(--_icon-size) + var(--_field-control-inline-padding)) ;\n }\n\n :host(:focus-within) {\n --u-field-border-width: var(--_focus-border-width);\n }\n :host(:focus-within) .field::after {\n border-color: var(--u-field-focused-border-color, var(--_color-primary));\n }\n :host(:focus-within) .label {\n color: var(--u-field-label-focused-color, var(--_color-primary));\n }\n\n :host([invalid]) .field::after {\n border-color: var(--u-field-error-border-color, var(--_color-error));\n }\n :host([invalid]) .label {\n color: var(--u-field-label-error-color, var(--_color-error));\n }\n :host([invalid]) .supporting-text {\n color: var(--u-field-supporting-text-error-color, var(--_color-error));\n }\n :host([invalid]) .trailing-icon {\n --u-standard-icon-button-color: var(--u-field-trailing-icon-error-color, var(--_color-error));\n color: var(--u-field-trailing-icon-error-color, var(--_color-error));\n }\n :host([invalid]) .leading-icon {\n --u-standard-icon-button-color: var(--u-field-leading-icon-error-color, var(--_color-error));\n color: var(--u-field-leading-icon-error-color, var(--_icon-color));\n }\n\n :host([invalid][has-error-text]) .error-text {\n display: block;\n }\n :host([invalid][has-error-text]) .supporting-text-slot {\n display: none;\n }\n\n :host([disabled]) .field::after {\n border-color: var(--u-field-disabled-border-color, var(--_disabled-color));\n }\n :host([disabled]) .supporting-text {\n color: var(--u-field-supporting-text-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .label {\n color: var(--u-field-label-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .input::slotted(*) {\n color: var(--u-field-input-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .input::slotted(:is(input, textarea))::placeholder {\n color: var(--u-field-input-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .trailing-icon {\n color: var(--u-field-trailing-icon-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .leading-icon {\n color: var(--u-field-leading-icon-disabled-color, var(--_disabled-color));\n }\n\n :host([variant=filled]) .field {\n border-radius: var(--u-field-filled-border-radius, 4px 4px 0 0);\n background-color: var(--u-color-on-surface-variant, rgb(73, 69, 79));\n }\n :host([variant=filled]) .field::after {\n border-bottom-style: solid;\n }\n :host([variant=filled]) .label {\n top: var(--_vertical-padding);\n }\n :host([variant=filled]) .input::slotted(:is(input, textarea, select, button)) {\n display: block;\n border-top: calc(var(--_vertical-padding) + var(--_label-line-height)) solid transparent;\n border-bottom: var(--_vertical-padding) solid transparent;\n }\n\n :host([variant=filled][disabled]) .field {\n background-color: var(--u-filled-field-disabled-background-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-filled-field-background-disabled-opacity, 0.12)));\n }\n\n :host([variant=outlined]) .field::after {\n --_mid-point: calc(var(--u-field-label-half-width) + var(--_outlined-label-margin) + var(--_outlined-label-padding));\n border-radius: var(--u-outlined-field-shape-corder, var(--u-shape-corner-small, 8px));\n border-style: solid;\n clip-path: polygon(0 0, var(--_mid-point) 0, var(--_mid-point) var(--_focus-border-width), var(--_mid-point) var(--_focus-border-width), var(--_mid-point) 0, 100% 0, 100% 100%, 0 100%);\n transition: clip-path 100ms;\n }\n :host([variant=outlined]) .label {\n top: calc(var(--_label-line-height) / -2);\n }\n\n :host([variant=outlined]:focus-within) .field::after,\n :host([variant=outlined]:not([empty])) .field::after {\n --_end-point: calc(var(--u-field-label-width) + var(--_outlined-label-margin) + (var(--_outlined-label-padding) * 2));\n clip-path: polygon(0 0, var(--_outlined-label-margin) 0, var(--_outlined-label-margin) var(--_focus-border-width), var(--_end-point) var(--_focus-border-width), var(--_end-point) 0, 100% 0, 100% 100%, 0 100%);\n }\n :host([variant=outlined]:focus-within) .label,\n :host([variant=outlined]:not([empty])) .label {\n inset-inline-start: calc(var(--_outlined-label-margin) + var(--_outlined-label-padding));\n }\n\n :host([empty]) ::slotted(select) {\n color: var(--_field-placeholder-color);\n }\n\n :host([empty]:not(:focus-within)) .label {\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n pointer-events: none;\n top: calc(var(--_field-min-height) / 2 - var(--_label-line-height) / 2);\n }\n :host([empty]:not(:focus-within)) .input,\n :host([empty]:not(:focus-within)) ::slotted(:is(input, textarea))::placeholder,\n :host([empty]:not(:focus-within)) ::slotted(select) {\n color: transparent;\n transition: color 150ms;\n }\n`;\n"]}
|
package/menu/menu.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class UmMenu extends LitElement {
|
|
|
28
28
|
* Set a selector to auto attach to a toggle element
|
|
29
29
|
*/
|
|
30
30
|
get toggleSelector(): string | undefined;
|
|
31
|
-
set toggleSelector(selector: string);
|
|
31
|
+
set toggleSelector(selector: string | undefined);
|
|
32
32
|
menu: HTMLElement;
|
|
33
33
|
get anchorElement(): HTMLElement;
|
|
34
34
|
private toggleElement;
|
package/menu/menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAM3D,OAAO,2BAA2B,CAAC;AASnC,qBACa,MAAO,SAAQ,UAAU;;IAEpC,OAAgB,MAAM,4BAAwB;IAK9C;;OAEG;IACH,IACI,IAAI,IAAI,OAAO,CAAsB;IACzC,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,EAUrB;IAED;;;OAGG;IACoD,YAAY,EAAE,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAe;IAEzI;;;;;OAKG;IACwB,SAAS,EAAE,OAAO,GAAG,KAAK,CAAS;IAE9D;;OAEG;IACuE,eAAe,UAAQ;IAEjG;;OAEG;IACH,IACI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IACD,IAAI,cAAc,CAAC,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,E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AC,CAAC;4CAGvD;AAYe;IAAf,KAAK,CAAC,OAAO,CAAC;oCAAoB;AA7DxB,MAAM;IADlB,aAAa,CAAC,QAAQ,CAAC;GACX,MAAM,CAoNlB","sourcesContent":["import { html, HTMLTemplateResult, LitElement } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles.js';\nimport { styles } from './menu.styles.js';\n\nimport '../elevation/elevation.js';\n\ninterface MenuRect {\n x?: number;\n y?: number;\n width: number;\n height: number;\n}\n\n@customElement('u-menu')\nexport class UmMenu extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n #open = false;\n #justShow = false;\n\n /**\n * Opens the menu and makes it visible. Alternative to the `.show()`, `.close()` and `.toggle()` methods\n */\n @property({type: Boolean, reflect: true})\n get open(): boolean { return this.#open }\n set open(open: boolean) {\n if (!open) {\n this.#open = open;\n return;\n }\n \n this.calcDropdownPositioning();\n this.#open = open;\n\n setTimeout(() => this.querySelector<HTMLElement>('u-menu-item:not([disabled])')?.focus());\n }\n\n /**\n * The corner of the anchor which to align the menu in the standard logical\n * property style of <block>-<inline> e.g. `'end-start'`.\n */\n @property({attribute: 'anchor-corner', reflect: true}) anchorCorner: 'start-start' | 'start-end' | 'end-start' | 'end-end' = 'end-start';\n\n /**\n * The direction of the menu. e.g. `'end'`.\n *\n * NOTE: This value may not be respected by the menu positioning algorithm\n * if the menu would render outside the viewport.\n */\n @property({reflect: true}) direction: 'start' | 'end' = 'end';\n\n /**\n * Limit the height of the menu to not overflow the viewport\n */\n @property({type: Boolean, attribute: 'auto-scroll-block', reflect: true}) autoScrollBlock = true;\n\n /**\n * Set a selector to auto attach to a toggle element\n */\n @property({attribute: 'toggle-selector', reflect: true})\n get toggleSelector(): string | undefined {\n return this.attributes.getNamedItem('toggle-selector')?.value;\n }\n set toggleSelector(selector: string) {\n this.toggleElement?.removeEventListener('click', this.toggle);\n\n if (!selector) {\n return;\n }\n\n this.toggleElement = document.querySelector(selector);\n this.toggleElement?.addEventListener('click', this.toggle);\n }\n\n @query('.menu') menu!: HTMLElement;\n\n get anchorElement(): HTMLElement {\n return this.parentElement!;\n }\n\n private toggleElement: HTMLElement | null = null;\n\n protected override render(): HTMLTemplateResult {\n return html`\n <div class=\"menu\" part=\"menu\" ?inert=${!this.open}>\n <u-elevation></u-elevation>\n <div role=\"menu\" class=\"content\" part=\"content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n window.addEventListener('click', this.close);\n this.role = \"listbox\";\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('click', this.close);\n }\n\n toggle = () => {\n if (this.open) {\n this.close();\n return;\n }\n\n this.show();\n };\n\n show(): void {\n if (this.open) {\n return;\n }\n\n this.#justShow = true;\n this.open = true;\n }\n\n close = () => {\n if (this.open && !this.#justShow) {\n this.open = false;\n return;\n }\n\n this.#justShow = false;\n }\n\n private calcDropdownPositioning() {\n const anchorRect = this.getAnchorRect();\n const menuRect = this.getMenuRect()\n\n this.resetMenu();\n this.setToOpenUpOrDown(anchorRect, menuRect);\n this.setToOpenToStartOrEnd(anchorRect, menuRect);\n }\n\n private resetMenu() {\n this.menu.className = 'menu';\n this.menu.style.maxHeight = '';\n }\n\n private setToOpenUpOrDown(anchorRect: MenuRect, menuRect: MenuRect): void {\n const viewPortHeight = window.innerHeight;\n\n if (viewPortHeight - (anchorRect.y! + menuRect.height) >= 0) {\n return;\n }\n\n if (anchorRect.y! <= viewPortHeight / 2) {\n this.menu.style.maxHeight = this.autoScrollBlock\n ? `${viewPortHeight - anchorRect.y!}px`\n : '';\n return;\n }\n\n this.menu.classList.add('up');\n this.menu.style.maxHeight = this.autoScrollBlock\n ? `${anchorRect.y!}px`\n : '';\n }\n\n private setToOpenToStartOrEnd(anchorRect: MenuRect, menuRect: MenuRect): void {\n if (this.direction === 'start') {\n this.ensureMenuCanOpenToStart(anchorRect, menuRect);\n return;\n }\n\n this.ensureMenuCanOpenToEnd(anchorRect, menuRect);\n }\n\n private ensureMenuCanOpenToStart(anchorRect: MenuRect, menuRect: MenuRect): void {\n const viewPortWidth = window.innerWidth;\n\n if (viewPortWidth - (anchorRect.x! - menuRect.width) >= 0) {\n this.menu.classList.add('start');\n }\n }\n\n private ensureMenuCanOpenToEnd(anchorRect: MenuRect, menuRect: MenuRect): void {\n const viewPortWidth = window.innerWidth;\n\n if (viewPortWidth - (anchorRect.x! + menuRect.width) >= 0) {\n return;\n }\n\n this.menu.classList.add('start');\n }\n\n private getAnchorRect(): MenuRect {\n const anchorElement = this.anchorElement;\n const rect = anchorElement.getBoundingClientRect() as DOMRect\n const styles = getComputedStyle(anchorElement);\n const width = parseInt(styles.width, 10);\n const height = parseInt(styles.height, 10);\n const xOffset = this.anchorCorner.endsWith('-end')\n ? width\n : 0;\n\n const yOffset = this.anchorCorner.startsWith('end-')\n ? height\n : 0;\n\n return {\n y: rect.y + yOffset,\n x: rect.x + xOffset,\n width: width,\n height: height\n };\n }\n\n private getMenuRect(): MenuRect {\n const menu = this.menu;\n const styles = getComputedStyle(menu);\n const width = parseInt(styles.width, 10);\n const height = parseInt(styles.height, 10);\n\n return {\n width: width,\n height: height\n };\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-menu': UmMenu;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/menu/menu.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,2BAA2B,CAAC;AAU5B,IAAM,MAAM,GAAZ,MAAM,MAAO,SA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AO;YACnB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;IAEO,WAAW;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAE3C,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;;;;AAjNe,aAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAS9C;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;kCACA;AAiBc;IAAtD,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;4CAAmF;AAQ9G;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;yCAAoC;AAKY;IAAzE,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;+CAAwB;AAMjG;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;4CAGvD;AAYe;IAAf,KAAK,CAAC,OAAO,CAAC;oCAAoB;AA7DxB,MAAM;IADlB,aAAa,CAAC,QAAQ,CAAC;GACX,MAAM,CAoNlB","sourcesContent":["import { html, HTMLTemplateResult, LitElement } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles.js';\nimport { styles } from './menu.styles.js';\n\nimport '../elevation/elevation.js';\n\ninterface MenuRect {\n x?: number;\n y?: number;\n width: number;\n height: number;\n}\n\n@customElement('u-menu')\nexport class UmMenu extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n #open = false;\n #justShow = false;\n\n /**\n * Opens the menu and makes it visible. Alternative to the `.show()`, `.close()` and `.toggle()` methods\n */\n @property({type: Boolean, reflect: true})\n get open(): boolean { return this.#open }\n set open(open: boolean) {\n if (!open) {\n this.#open = open;\n return;\n }\n \n this.calcDropdownPositioning();\n this.#open = open;\n\n setTimeout(() => this.querySelector<HTMLElement>('u-menu-item:not([disabled])')?.focus());\n }\n\n /**\n * The corner of the anchor which to align the menu in the standard logical\n * property style of <block>-<inline> e.g. `'end-start'`.\n */\n @property({attribute: 'anchor-corner', reflect: true}) anchorCorner: 'start-start' | 'start-end' | 'end-start' | 'end-end' = 'end-start';\n\n /**\n * The direction of the menu. e.g. `'end'`.\n *\n * NOTE: This value may not be respected by the menu positioning algorithm\n * if the menu would render outside the viewport.\n */\n @property({reflect: true}) direction: 'start' | 'end' = 'end';\n\n /**\n * Limit the height of the menu to not overflow the viewport\n */\n @property({type: Boolean, attribute: 'auto-scroll-block', reflect: true}) autoScrollBlock = true;\n\n /**\n * Set a selector to auto attach to a toggle element\n */\n @property({attribute: 'toggle-selector', reflect: true})\n get toggleSelector(): string | undefined {\n return this.attributes.getNamedItem('toggle-selector')?.value;\n }\n set toggleSelector(selector: string | undefined) {\n this.toggleElement?.removeEventListener('click', this.toggle);\n\n if (!selector) {\n return;\n }\n\n this.toggleElement = document.querySelector(selector);\n this.toggleElement?.addEventListener('click', this.toggle);\n }\n\n @query('.menu') menu!: HTMLElement;\n\n get anchorElement(): HTMLElement {\n return this.parentElement!;\n }\n\n private toggleElement: HTMLElement | null = null;\n\n protected override render(): HTMLTemplateResult {\n return html`\n <div class=\"menu\" part=\"menu\" ?inert=${!this.open}>\n <u-elevation></u-elevation>\n <div role=\"menu\" class=\"content\" part=\"content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n window.addEventListener('click', this.close);\n this.role = \"listbox\";\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('click', this.close);\n }\n\n toggle = () => {\n if (this.open) {\n this.close();\n return;\n }\n\n this.show();\n };\n\n show(): void {\n if (this.open) {\n return;\n }\n\n this.#justShow = true;\n this.open = true;\n }\n\n close = () => {\n if (this.open && !this.#justShow) {\n this.open = false;\n return;\n }\n\n this.#justShow = false;\n }\n\n private calcDropdownPositioning() {\n const anchorRect = this.getAnchorRect();\n const menuRect = this.getMenuRect()\n\n this.resetMenu();\n this.setToOpenUpOrDown(anchorRect, menuRect);\n this.setToOpenToStartOrEnd(anchorRect, menuRect);\n }\n\n private resetMenu() {\n this.menu.className = 'menu';\n this.menu.style.maxHeight = '';\n }\n\n private setToOpenUpOrDown(anchorRect: MenuRect, menuRect: MenuRect): void {\n const viewPortHeight = window.innerHeight;\n\n if (viewPortHeight - (anchorRect.y! + menuRect.height) >= 0) {\n return;\n }\n\n if (anchorRect.y! <= viewPortHeight / 2) {\n this.menu.style.maxHeight = this.autoScrollBlock\n ? `${viewPortHeight - anchorRect.y!}px`\n : '';\n return;\n }\n\n this.menu.classList.add('up');\n this.menu.style.maxHeight = this.autoScrollBlock\n ? `${anchorRect.y!}px`\n : '';\n }\n\n private setToOpenToStartOrEnd(anchorRect: MenuRect, menuRect: MenuRect): void {\n if (this.direction === 'start') {\n this.ensureMenuCanOpenToStart(anchorRect, menuRect);\n return;\n }\n\n this.ensureMenuCanOpenToEnd(anchorRect, menuRect);\n }\n\n private ensureMenuCanOpenToStart(anchorRect: MenuRect, menuRect: MenuRect): void {\n const viewPortWidth = window.innerWidth;\n\n if (viewPortWidth - (anchorRect.x! - menuRect.width) >= 0) {\n this.menu.classList.add('start');\n }\n }\n\n private ensureMenuCanOpenToEnd(anchorRect: MenuRect, menuRect: MenuRect): void {\n const viewPortWidth = window.innerWidth;\n\n if (viewPortWidth - (anchorRect.x! + menuRect.width) >= 0) {\n return;\n }\n\n this.menu.classList.add('start');\n }\n\n private getAnchorRect(): MenuRect {\n const anchorElement = this.anchorElement;\n const rect = anchorElement.getBoundingClientRect() as DOMRect\n const styles = getComputedStyle(anchorElement);\n const width = parseInt(styles.width, 10);\n const height = parseInt(styles.height, 10);\n const xOffset = this.anchorCorner.endsWith('-end')\n ? width\n : 0;\n\n const yOffset = this.anchorCorner.startsWith('end-')\n ? height\n : 0;\n\n return {\n y: rect.y + yOffset,\n x: rect.x + xOffset,\n width: width,\n height: height\n };\n }\n\n private getMenuRect(): MenuRect {\n const menu = this.menu;\n const styles = getComputedStyle(menu);\n const width = parseInt(styles.width, 10);\n const height = parseInt(styles.height, 10);\n\n return {\n width: width,\n height: height\n };\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-menu': UmMenu;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.styles.d.ts","sourceRoot":"","sources":["../../src/shared/base.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"base.styles.d.ts","sourceRoot":"","sources":["../../src/shared/base.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA0BlB,CAAC"}
|
package/shared/base.styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.styles.js","sourceRoot":"","sources":["../../src/shared/base.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"base.styles.js","sourceRoot":"","sources":["../../src/shared/base.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host,\n * {\n font-family: var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n box-sizing: border-box;\n outline: 0;\n }\n\n .focus-ring:focus-visible {\n --_color-primary: var(--u-color-primary, rgb(103, 80, 164));\n animation: u-focus-pulse 500ms ease;\n animation-fill-mode: forwards;\n outline-offset: 2px;\n }\n\n @keyframes u-focus-pulse {\n 0% {\n outline: 0 solid var(--u-color-primary);\n }\n 50% {\n outline: 6px solid var(--u-color-primary);\n }\n 100% {\n outline: 4px solid var(--u-color-primary);\n }\n }\n`;\n"]}
|