@redvars/peacock 3.2.6 → 3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PeacockComponent-DMrFEGDh.js +80 -0
- package/dist/PeacockComponent-DMrFEGDh.js.map +1 -0
- package/dist/assets/components.css +2 -0
- package/dist/assets/components.css.map +1 -0
- package/dist/assets/styles.css +2 -0
- package/dist/assets/styles.css.map +1 -0
- package/dist/breadcrumb-item-DkhwoMAH.js +6879 -0
- package/dist/breadcrumb-item-DkhwoMAH.js.map +1 -0
- package/dist/button-BtpAXuLN.js +1180 -0
- package/dist/button-BtpAXuLN.js.map +1 -0
- package/dist/button-group.js +7 -6
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +5 -0
- package/dist/button.js.map +1 -0
- package/dist/{class-map-BmCohX9p.js → class-map-CbncA34D.js} +2 -3
- package/dist/class-map-CbncA34D.js.map +1 -0
- package/dist/code-highlighter.js +9 -8
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +4 -4
- package/dist/custom-elements.json +296 -154
- package/dist/index.js +87 -35
- package/dist/index.js.map +1 -1
- package/dist/number-counter.js +7 -6
- package/dist/number-counter.js.map +1 -1
- package/dist/peacock-loader.js +1006 -535
- package/dist/peacock-loader.js.map +1 -1
- package/dist/src/CssLoader.d.ts +5 -0
- package/dist/src/PeacockComponent.d.ts +1 -0
- package/dist/src/avatar/avatar.d.ts +1 -1
- package/dist/src/button/button/button.d.ts +1 -1
- package/dist/{state-CV1fRmOT.js → state-CEVpI7Vv.js} +2 -2
- package/dist/{state-CV1fRmOT.js.map → state-CEVpI7Vv.js.map} +1 -1
- package/dist/{style-map-CdmclYgz.js → style-map-mOmZwsJT.js} +2 -3
- package/dist/style-map-mOmZwsJT.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-BS8X6Gto.js → unsafe-html-Ca00SXpn.js} +2 -3
- package/dist/unsafe-html-Ca00SXpn.js.map +1 -0
- package/package.json +11 -5
- package/readme.md +2 -1
- package/scss/components.scss +3 -0
- package/scss/styles.scss +4 -0
- package/src/CssLoader.ts +66 -0
- package/src/PeacockComponent.ts +3 -0
- package/src/avatar/avatar.ts +1 -1
- package/src/button/button/button.ts +4 -2
- package/src/button/button-group/button-group.ts +2 -0
- package/src/code-highlighter/code-highlighter.ts +2 -0
- package/src/number-counter/number-counter.ts +2 -0
- package/src/peacock-loader.ts +14 -9
- package/dist/BaseButton.js +0 -209
- package/dist/BaseButton.js.map +0 -1
- package/dist/BaseInput.js +0 -27
- package/dist/BaseInput.js.map +0 -1
- package/dist/accordion-item.js +0 -191
- package/dist/accordion-item.js.map +0 -1
- package/dist/accordion.js +0 -142
- package/dist/accordion.js.map +0 -1
- package/dist/avatar.js +0 -106
- package/dist/avatar.js.map +0 -1
- package/dist/badge.js +0 -84
- package/dist/badge.js.map +0 -1
- package/dist/base-progress.js +0 -33
- package/dist/base-progress.js.map +0 -1
- package/dist/breadcrumb-item.js +0 -160
- package/dist/breadcrumb-item.js.map +0 -1
- package/dist/breadcrumb.js +0 -84
- package/dist/breadcrumb.js.map +0 -1
- package/dist/checkbox.js +0 -530
- package/dist/checkbox.js.map +0 -1
- package/dist/chip.js +0 -303
- package/dist/chip.js.map +0 -1
- package/dist/class-map-BmCohX9p.js.map +0 -1
- package/dist/clock.js +0 -83
- package/dist/clock.js.map +0 -1
- package/dist/container.js +0 -135
- package/dist/container.js.map +0 -1
- package/dist/directive-Cuw6h7YA.js +0 -9
- package/dist/directive-Cuw6h7YA.js.map +0 -1
- package/dist/divider.js +0 -126
- package/dist/divider.js.map +0 -1
- package/dist/elevation.js +0 -79
- package/dist/elevation.js.map +0 -1
- package/dist/empty-state.js +0 -171
- package/dist/empty-state.js.map +0 -1
- package/dist/field.js +0 -416
- package/dist/field.js.map +0 -1
- package/dist/focus-ring.js +0 -107
- package/dist/focus-ring.js.map +0 -1
- package/dist/icon.js +0 -183
- package/dist/icon.js.map +0 -1
- package/dist/link.js +0 -91
- package/dist/link.js.map +0 -1
- package/dist/lit-element-CA46RFZ_.js +0 -28
- package/dist/lit-element-CA46RFZ_.js.map +0 -1
- package/dist/menu-item.js +0 -232
- package/dist/menu-item.js.map +0 -1
- package/dist/menu-list.js +0 -108
- package/dist/menu-list.js.map +0 -1
- package/dist/menu.js +0 -117
- package/dist/menu.js.map +0 -1
- package/dist/property-DNVWDdPC.js +0 -45
- package/dist/property-DNVWDdPC.js.map +0 -1
- package/dist/query-QBcUV-L_.js +0 -15
- package/dist/query-QBcUV-L_.js.map +0 -1
- package/dist/ripple.js +0 -128
- package/dist/ripple.js.map +0 -1
- package/dist/skeleton.js +0 -113
- package/dist/skeleton.js.map +0 -1
- package/dist/spinner.js +0 -93
- package/dist/spinner.js.map +0 -1
- package/dist/spread-axRTFMoH.js +0 -32
- package/dist/spread-axRTFMoH.js.map +0 -1
- package/dist/style-map-CdmclYgz.js.map +0 -1
- package/dist/switch-CC-S5fbc.js +0 -2738
- package/dist/switch-CC-S5fbc.js.map +0 -1
- package/dist/tag.js +0 -323
- package/dist/tag.js.map +0 -1
- package/dist/tooltip.js +0 -1857
- package/dist/tooltip.js.map +0 -1
- package/dist/unsafe-html-BS8X6Gto.js.map +0 -1
- package/dist/utils.js +0 -277
- package/dist/utils.js.map +0 -1
- /package/{dist/assets/styles → scss}/tokens.css +0 -0
package/dist/peacock-loader.js
CHANGED
|
@@ -1,44 +1,967 @@
|
|
|
1
|
-
import { Elevation } from './
|
|
2
|
-
import {
|
|
3
|
-
import { Ripple } from './ripple.js';
|
|
4
|
-
import { Icon } from './icon.js';
|
|
5
|
-
import { Avatar } from './avatar.js';
|
|
6
|
-
import { Badge } from './badge.js';
|
|
7
|
-
import { Divider } from './divider.js';
|
|
8
|
-
import { S as Switch, b as TimePicker, D as DatePicker, T as Textarea, N as NumberField, a as Input, C as CircularProgress, L as LinearProgress, I as IconButton, B as Button } from './switch-CC-S5fbc.js';
|
|
1
|
+
import { A as Accordion, e as Container, g as EmptyState, l as Spinner, m as Switch, c as BreadcrumbItem, b as Breadcrumb, p as Tooltip, o as TimePicker, D as DatePicker, n as Textarea, N as NumberField, F as Field, j as Input, S as Skeleton, d as CircularProgress, L as LinearProgress, T as Tag, C as Chip, k as Link, R as Ripple, E as Elevation, f as Divider, i as IconButton, B as Badge, a as Avatar, h as FocusRing, I as Icon } from './breadcrumb-item-DkhwoMAH.js';
|
|
2
|
+
import { e, s as spread, B as Button } from './button-BtpAXuLN.js';
|
|
9
3
|
import { ButtonGroup } from './button-group.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var css_248z$3 = "/* -------------------------------------------\n * Autogenerated by ⛋ Terrazzo. DO NOT EDIT!\n * ------------------------------------------- */\n\n:root {\n --color-black: #000000;\n --color-blue: var(--color-blue-40);\n --color-blue-0: #000000;\n --color-blue-10: #001550;\n --color-blue-20: #00277f;\n --color-blue-30: #003ab2;\n --color-blue-40: #2352d5;\n --color-blue-50: #446def;\n --color-blue-60: #6789ff;\n --color-blue-70: #90a7ff;\n --color-blue-80: #b6c4ff;\n --color-blue-90: #dce1ff;\n --color-blue-100: #ffffff;\n --color-blue-container: var(--color-blue-90);\n --color-error: var(--color-red-40);\n --color-error-container: var(--color-red-90);\n --color-green: var(--color-green-40);\n --color-green-0: #000000;\n --color-green-10: #00210b;\n --color-green-20: #003917;\n --color-green-30: #005225;\n --color-green-40: #0f6d35;\n --color-green-50: #31874b;\n --color-green-60: #4da163;\n --color-green-70: #68bd7b;\n --color-green-80: #83d995;\n --color-green-90: #9ff6af;\n --color-green-100: #ffffff;\n --color-green-container: var(--color-green-90);\n --color-inverse-blue: var(--color-blue-80);\n --color-inverse-error: var(--color-red-80);\n --color-inverse-green: var(--color-green-80);\n --color-inverse-on-surface: var(--color-neutral-95);\n --color-inverse-orange: var(--color-orange-80);\n --color-inverse-primary: var(--color-primary-80);\n --color-inverse-purple: var(--color-purple-80);\n --color-inverse-red: var(--color-red-80);\n --color-inverse-secondary: var(--color-secondary-80);\n --color-inverse-success: var(--color-green-80);\n --color-inverse-surface: var(--color-neutral-20);\n --color-inverse-tertiary: var(--color-tertiary-80);\n --color-inverse-warning: var(--color-yellow-80);\n --color-inverse-yellow: var(--color-yellow-80);\n --color-neutral: #79767a;\n --color-neutral-0: #000000;\n --color-neutral-4: #0f0e11;\n --color-neutral-6: #141316;\n --color-neutral-10: #1c1b1e;\n --color-neutral-12: #201f23;\n --color-neutral-17: #2b292d;\n --color-neutral-20: #313033;\n --color-neutral-22: #363438;\n --color-neutral-30: #48464a;\n --color-neutral-40: #605d62;\n --color-neutral-50: #79767a;\n --color-neutral-60: #939094;\n --color-neutral-70: #aeaaaf;\n --color-neutral-80: #c9c5ca;\n --color-neutral-87: #ddd9dd;\n --color-neutral-90: #e6e1e6;\n --color-neutral-92: #ebe7ec;\n --color-neutral-94: #f1ecf1;\n --color-neutral-95: #f4eff4;\n --color-neutral-96: #f7f2f7;\n --color-neutral-98: #fdf8fd;\n --color-neutral-99: #fffbff;\n --color-neutral-100: #ffffff;\n --color-neutral-variant: #79757f;\n --color-neutral-variant-0: #000000;\n --color-neutral-variant-4: #0f0d15;\n --color-neutral-variant-6: #14121a;\n --color-neutral-variant-10: #1c1a22;\n --color-neutral-variant-12: #201e27;\n --color-neutral-variant-17: #2b2931;\n --color-neutral-variant-20: #312f38;\n --color-neutral-variant-22: #36333c;\n --color-neutral-variant-30: #48454e;\n --color-neutral-variant-40: #605d66;\n --color-neutral-variant-50: #79757f;\n --color-neutral-variant-60: #938f99;\n --color-neutral-variant-70: #aea9b4;\n --color-neutral-variant-80: #c9c4d0;\n --color-neutral-variant-87: #ddd8e3;\n --color-neutral-variant-90: #e6e0ec;\n --color-neutral-variant-92: #ece6f1;\n --color-neutral-variant-94: #f1ecf7;\n --color-neutral-variant-95: #f4eefa;\n --color-neutral-variant-96: #f7f1fd;\n --color-neutral-variant-98: #fdf8ff;\n --color-neutral-variant-99: #fffbff;\n --color-neutral-variant-100: #ffffff;\n --color-on-blue: var(--color-blue-100);\n --color-on-blue-container: var(--color-blue-10);\n --color-on-error: var(--color-red-100);\n --color-on-error-container: var(--color-red-10);\n --color-on-green: var(--color-green-100);\n --color-on-green-container: var(--color-green-10);\n --color-on-orange: var(--color-orange-100);\n --color-on-orange-container: var(--color-orange-10);\n --color-on-primary: var(--color-primary-100);\n --color-on-primary-container: var(--color-primary-10);\n --color-on-purple: var(--color-purple-100);\n --color-on-purple-container: var(--color-purple-10);\n --color-on-red: var(--color-red-100);\n --color-on-red-container: var(--color-red-10);\n --color-on-secondary: var(--color-secondary-100);\n --color-on-secondary-container: var(--color-secondary-10);\n --color-on-success: var(--color-green-100);\n --color-on-success-container: var(--color-green-10);\n --color-on-surface: var(--color-neutral-10);\n --color-on-surface-variant: var(--color-neutral-variant-30);\n --color-on-tertiary: var(--color-tertiary-100);\n --color-on-tertiary-container: var(--color-tertiary-10);\n --color-on-warning: var(--color-yellow-100);\n --color-on-warning-container: var(--color-yellow-10);\n --color-on-yellow: var(--color-yellow-100);\n --color-on-yellow-container: var(--color-yellow-10);\n --color-orange: var(--color-orange-40);\n --color-orange-0: #000000;\n --color-orange-10: #341100;\n --color-orange-20: #552100;\n --color-orange-30: #783100;\n --color-orange-40: #9e4300;\n --color-orange-50: #c55500;\n --color-orange-60: #ee6803;\n --color-orange-70: #ff8d4c;\n --color-orange-80: #ffb691;\n --color-orange-90: #ffdbcb;\n --color-orange-100: #ffffff;\n --color-orange-container: var(--color-orange-90);\n --color-outline: var(--color-neutral-variant-50);\n --color-outline-variant: var(--color-neutral-variant-80);\n --color-primary: var(--color-primary-40);\n --color-primary-0: #000000;\n --color-primary-10: #1d0061;\n --color-primary-20: #330098;\n --color-primary-30: #4a21bd;\n --color-primary-40: #6341d5;\n --color-primary-50: #7c5df0;\n --color-primary-60: #967cff;\n --color-primary-70: #b09dff;\n --color-primary-80: #cbbeff;\n --color-primary-90: #e7deff;\n --color-primary-95: #f4eeff;\n --color-primary-98: #fdf8ff;\n --color-primary-100: #ffffff;\n --color-primary-container: var(--color-primary-90);\n --color-purple: var(--color-purple-40);\n --color-purple-0: #000000;\n --color-purple-10: #3f001c;\n --color-purple-20: #650032;\n --color-purple-30: #8e0048;\n --color-purple-40: #ba0061;\n --color-purple-50: #e6067a;\n --color-purple-60: #ff4993;\n --color-purple-70: #ff84ad;\n --color-purple-80: #ffb1c7;\n --color-purple-90: #ffd9e2;\n --color-purple-100: #ffffff;\n --color-purple-container: var(--color-purple-90);\n --color-red: var(--color-red-40);\n --color-red-0: #000000;\n --color-red-10: #410001;\n --color-red-20: #690002;\n --color-red-30: #930005;\n --color-red-40: #be0c0e;\n --color-red-50: #e32e25;\n --color-red-60: #ff5545;\n --color-red-70: #ff8a7b;\n --color-red-80: #ffb4a9;\n --color-red-90: #ffdad5;\n --color-red-100: #ffffff;\n --color-red-container: var(--color-red-90);\n --color-scrim: var(--color-neutral-0);\n --color-secondary: var(--color-secondary-40);\n --color-secondary-0: #000000;\n --color-secondary-10: #1d192b;\n --color-secondary-20: #322e41;\n --color-secondary-30: #484458;\n --color-secondary-40: #605b71;\n --color-secondary-50: #79748a;\n --color-secondary-60: #938da5;\n --color-secondary-70: #aea8c0;\n --color-secondary-80: #cac3dc;\n --color-secondary-90: #e6dff9;\n --color-secondary-95: #f4eeff;\n --color-secondary-98: #fdf8ff;\n --color-secondary-100: #ffffff;\n --color-secondary-container: var(--color-secondary-90);\n --color-shadow: var(--color-neutral-0);\n --color-success: var(--color-green-40);\n --color-success-container: var(--color-green-90);\n --color-surface: var(--color-neutral-99);\n --color-surface-container: var(--color-neutral-94);\n --color-surface-container-high: var(--color-neutral-92);\n --color-surface-container-highest: var(--color-neutral-90);\n --color-surface-container-low: var(--color-neutral-96);\n --color-surface-container-lowest: var(--color-neutral-100);\n --color-surface-dim: var(--color-neutral-87);\n --color-surface-variant: var(--color-neutral-variant-90);\n --color-tertiary: var(--color-tertiary-40);\n --color-tertiary-0: #000000;\n --color-tertiary-10: #30111f;\n --color-tertiary-20: #492534;\n --color-tertiary-30: #623b4b;\n --color-tertiary-40: #7c5263;\n --color-tertiary-50: #986a7b;\n --color-tertiary-60: #b48395;\n --color-tertiary-70: #d09db0;\n --color-tertiary-80: #eeb8cb;\n --color-tertiary-90: #ffd9e5;\n --color-tertiary-95: #ffecf1;\n --color-tertiary-98: #fff8f8;\n --color-tertiary-100: #ffffff;\n --color-tertiary-container: var(--color-tertiary-90);\n --color-warning: var(--color-yellow-40);\n --color-warning-container: var(--color-yellow-90);\n --color-white: #ffffff;\n --color-yellow: var(--color-yellow-40);\n --color-yellow-0: #000000;\n --color-yellow-10: #241a00;\n --color-yellow-20: #3d2f00;\n --color-yellow-30: #574400;\n --color-yellow-40: #745b00;\n --color-yellow-50: #917400;\n --color-yellow-60: #b08d00;\n --color-yellow-70: #d0a600;\n --color-yellow-80: #f0c100;\n --color-yellow-90: #ffe089;\n --color-yellow-100: #ffffff;\n --color-yellow-container: var(--color-yellow-90);\n --container-lg: 1056px; /* Large container width. Intended for standard desktop layouts with typical content density. */\n --container-max: 1584px; /* Maximum container width. Use when constraining very wide layouts to maintain readable line lengths. */\n --container-md: 672px; /* Medium container width. Suitable for tablet layouts and compact desktop content areas. */\n --container-sm: 320px; /* Small container width. Use for narrow layouts and small screens such as mobile devices. */\n --container-xl: 1312px; /* Extra large container width. Use for wide desktop displays and content-heavy pages. */\n --duration-long1: 450ms; /* These durations are often paired with Emphasized easing. */\n --duration-long2: 500ms; /* These durations are often paired with Emphasized easing. */\n --duration-medium1: 250ms; /* These are used for medium duration transitions, like modal animations. */\n --duration-medium2: 300ms; /* These are used for medium duration transitions, like modal animations. */\n --duration-short1: 50ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --duration-short2: 100ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --duration-short3: 150ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --duration-short4: 200ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --easing-linear: cubic-bezier(0, 0, 1, 1);\n --easing-standard: cubic-bezier(0.2, 0, 0, 1);\n --font-family-brand: \"Noto Sans\", sans-serif; /* The font family used for brand headings and titles. */\n --font-family-monospace: \"Noto Sans Mono\", monospace; /* The font family used for code snippets and monospaced text. */\n --font-family-sans: \"Noto Sans\", sans-serif; /* The primary font family used for body text and general content. */\n --font-weight-bold: 700; /* Bold weight for emphasis. 700 weight. */\n --font-weight-medium: 500; /* Slightly heavier than regular weight. 500 weight. */\n --font-weight-regular: 400; /* Standard weight for regular text. 400 weight. */\n --font-weight-semi-bold: 600; /* Heavier than medium weight. 600 weight. */\n --global-avatar-border-radius: var(--shape-corner-full);\n --global-badge-color: var(--color-error);\n --shape-corner-extra-large: 28px;\n --shape-corner-extra-small: 4px;\n --shape-corner-full: 9999px;\n --shape-corner-large: 16px;\n --shape-corner-large-increased: 20px;\n --shape-corner-medium: 12px;\n --shape-corner-none: 0;\n --shape-corner-small: 8px;\n --spacing-000: 0; /* No spacing (base × 0). */\n --spacing-025: 0.125rem; /* 2px - Smallest increment (base × 0.125). */\n --spacing-050: 0.25rem; /* 4px - Extra small spacing (base × 0.25). */\n --spacing-100: 0.5rem; /* 8px - Small spacing (base × 0.5). */\n --spacing-150: 0.75rem; /* 12px - Small-medium spacing (base × 0.75). */\n --spacing-200: 1rem; /* 16px - Base spacing unit (base × 1). */\n --spacing-300: 1.5rem; /* 24px - Medium spacing (base × 1.5). */\n --spacing-400: 2rem; /* 32px - Medium-large spacing (base × 2). */\n --spacing-500: 2.5rem; /* 40px - Large spacing (base × 2.5). */\n --spacing-600: 3rem; /* 48px - Extra large spacing (base × 3). */\n --spacing-800: 4rem; /* 64px - Huge spacing (base × 4). */\n --spacing-1000: 5rem; /* 80px - Massive spacing (base × 5). */\n --spacing-1200: 6rem; /* 96px - Gigantic spacing (base × 6). */\n --spacing-2000: 10rem; /* 160px - Maximum defined spacing (base × 10). */\n --spacing-base: 1rem; /* Base spacing unit (1rem = 16px). */\n --typography-body-large-emphasized-font-family: var(--font-family-sans);\n --typography-body-large-emphasized-font-size: 1rem;\n --typography-body-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-body-large-emphasized-letter-spacing: 0.5px;\n --typography-body-large-emphasized-line-height: 1.5rem;\n --typography-body-large-font-family: var(--font-family-sans);\n --typography-body-large-font-size: 1rem;\n --typography-body-large-font-weight: var(--font-weight-regular);\n --typography-body-large-letter-spacing: 0.5px;\n --typography-body-large-line-height: 1.5rem;\n --typography-body-medium-emphasized-font-family: var(--font-family-sans);\n --typography-body-medium-emphasized-font-size: 0.875rem;\n --typography-body-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-body-medium-emphasized-letter-spacing: 0.25px;\n --typography-body-medium-emphasized-line-height: 1.25rem;\n --typography-body-medium-font-family: var(--font-family-sans);\n --typography-body-medium-font-size: 0.875rem;\n --typography-body-medium-font-weight: var(--font-weight-regular);\n --typography-body-medium-letter-spacing: 0.25px;\n --typography-body-medium-line-height: 1.25rem;\n --typography-body-small-emphasized-font-family: var(--font-family-sans);\n --typography-body-small-emphasized-font-size: 0.75rem;\n --typography-body-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-body-small-emphasized-letter-spacing: 0.4000000059604645px;\n --typography-body-small-emphasized-line-height: 1rem;\n --typography-body-small-font-family: var(--font-family-sans);\n --typography-body-small-font-size: 0.75rem;\n --typography-body-small-font-weight: var(--font-weight-regular);\n --typography-body-small-letter-spacing: 0.4000000059604645px;\n --typography-body-small-line-height: 1rem;\n --typography-code-large-emphasized-font-family: var(--font-family-monospace);\n --typography-code-large-emphasized-font-size: 1rem;\n --typography-code-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-code-large-emphasized-letter-spacing: 0.5px;\n --typography-code-large-emphasized-line-height: 1.5rem;\n --typography-code-large-font-family: var(--font-family-monospace);\n --typography-code-large-font-size: 1rem;\n --typography-code-large-font-weight: var(--font-weight-regular);\n --typography-code-large-letter-spacing: 0.5px;\n --typography-code-large-line-height: 1.5rem;\n --typography-code-medium-emphasized-font-family: var(--font-family-monospace);\n --typography-code-medium-emphasized-font-size: 0.875rem;\n --typography-code-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-code-medium-emphasized-letter-spacing: 0.25px;\n --typography-code-medium-emphasized-line-height: 1.25rem;\n --typography-code-medium-font-family: var(--font-family-monospace);\n --typography-code-medium-font-size: 0.875rem;\n --typography-code-medium-font-weight: var(--font-weight-regular);\n --typography-code-medium-letter-spacing: 0.25px;\n --typography-code-medium-line-height: 1.25rem;\n --typography-code-small-emphasized-font-family: var(--font-family-monospace);\n --typography-code-small-emphasized-font-size: 0.75rem;\n --typography-code-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-code-small-emphasized-letter-spacing: 0.4000000059604645px;\n --typography-code-small-emphasized-line-height: 1rem;\n --typography-code-small-font-family: var(--font-family-monospace);\n --typography-code-small-font-size: 0.75rem;\n --typography-code-small-font-weight: var(--font-weight-regular);\n --typography-code-small-letter-spacing: 0.4000000059604645px;\n --typography-code-small-line-height: 1rem;\n --typography-display-large-emphasized-font-family: var(--font-family-sans);\n --typography-display-large-emphasized-font-size: 3.5625rem;\n --typography-display-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-display-large-emphasized-letter-spacing: -0.25px;\n --typography-display-large-emphasized-line-height: 4rem;\n --typography-display-large-font-family: var(--font-family-sans);\n --typography-display-large-font-size: 3.5625rem;\n --typography-display-large-font-weight: var(--font-weight-regular);\n --typography-display-large-letter-spacing: -0.25px;\n --typography-display-large-line-height: 4rem;\n --typography-display-medium-emphasized-font-family: var(--font-family-sans);\n --typography-display-medium-emphasized-font-size: 2.8125rem;\n --typography-display-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-display-medium-emphasized-letter-spacing: 0;\n --typography-display-medium-emphasized-line-height: 3.25rem;\n --typography-display-medium-font-family: var(--font-family-sans);\n --typography-display-medium-font-size: 2.8125rem;\n --typography-display-medium-font-weight: var(--font-weight-regular);\n --typography-display-medium-letter-spacing: 0;\n --typography-display-medium-line-height: 3.25rem;\n --typography-display-small-emphasized-font-family: var(--font-family-sans);\n --typography-display-small-emphasized-font-size: 2.25rem;\n --typography-display-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-display-small-emphasized-letter-spacing: 0;\n --typography-display-small-emphasized-line-height: 2.75rem;\n --typography-display-small-font-family: var(--font-family-sans);\n --typography-display-small-font-size: 2.25rem;\n --typography-display-small-font-weight: var(--font-weight-regular);\n --typography-display-small-letter-spacing: 0;\n --typography-display-small-line-height: 2.75rem;\n --typography-headline-large-emphasized-font-family: var(--font-family-sans);\n --typography-headline-large-emphasized-font-size: 2rem;\n --typography-headline-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-headline-large-emphasized-letter-spacing: 0;\n --typography-headline-large-emphasized-line-height: 2.5rem;\n --typography-headline-large-font-family: var(--font-family-sans);\n --typography-headline-large-font-size: 2rem;\n --typography-headline-large-font-weight: var(--font-weight-regular);\n --typography-headline-large-letter-spacing: 0;\n --typography-headline-large-line-height: 2.5rem;\n --typography-headline-medium-emphasized-font-family: var(--font-family-sans);\n --typography-headline-medium-emphasized-font-size: 1.75rem;\n --typography-headline-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-headline-medium-emphasized-letter-spacing: 0;\n --typography-headline-medium-emphasized-line-height: 2.25rem;\n --typography-headline-medium-font-family: var(--font-family-sans);\n --typography-headline-medium-font-size: 1.75rem;\n --typography-headline-medium-font-weight: var(--font-weight-regular);\n --typography-headline-medium-letter-spacing: 0;\n --typography-headline-medium-line-height: 2.25rem;\n --typography-headline-small-emphasized-font-family: var(--font-family-sans);\n --typography-headline-small-emphasized-font-size: 1.5rem;\n --typography-headline-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-headline-small-emphasized-letter-spacing: 0;\n --typography-headline-small-emphasized-line-height: 2rem;\n --typography-headline-small-font-family: var(--font-family-sans);\n --typography-headline-small-font-size: 1.5rem;\n --typography-headline-small-font-weight: var(--font-weight-regular);\n --typography-headline-small-letter-spacing: 0;\n --typography-headline-small-line-height: 2rem;\n --typography-label-large-emphasized-font-family: var(--font-family-sans);\n --typography-label-large-emphasized-font-size: 0.875rem;\n --typography-label-large-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-label-large-emphasized-letter-spacing: 0.10000000149011612px;\n --typography-label-large-emphasized-line-height: 1.25rem;\n --typography-label-large-font-family: var(--font-family-sans);\n --typography-label-large-font-size: 0.875rem;\n --typography-label-large-font-weight: var(--font-weight-medium);\n --typography-label-large-letter-spacing: 0.10000000149011612px;\n --typography-label-large-line-height: 1.25rem;\n --typography-label-medium-emphasized-font-family: var(--font-family-sans);\n --typography-label-medium-emphasized-font-size: 0.75rem;\n --typography-label-medium-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-label-medium-emphasized-letter-spacing: 0.5px;\n --typography-label-medium-emphasized-line-height: 1rem;\n --typography-label-medium-font-family: var(--font-family-sans);\n --typography-label-medium-font-size: 0.75rem;\n --typography-label-medium-font-weight: var(--font-weight-medium);\n --typography-label-medium-letter-spacing: 0.5px;\n --typography-label-medium-line-height: 1rem;\n --typography-label-small-emphasized-font-family: var(--font-family-sans);\n --typography-label-small-emphasized-font-size: 0.6875rem;\n --typography-label-small-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-label-small-emphasized-letter-spacing: 0.5px;\n --typography-label-small-emphasized-line-height: 1rem;\n --typography-label-small-font-family: var(--font-family-sans);\n --typography-label-small-font-size: 0.6875rem;\n --typography-label-small-font-weight: var(--font-weight-medium);\n --typography-label-small-letter-spacing: 0.5px;\n --typography-label-small-line-height: 1rem;\n --typography-title-large-emphasized-font-family: var(--font-family-sans);\n --typography-title-large-emphasized-font-size: 1.375rem;\n --typography-title-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-title-large-emphasized-letter-spacing: 0;\n --typography-title-large-emphasized-line-height: 1.75rem;\n --typography-title-large-font-family: var(--font-family-sans);\n --typography-title-large-font-size: 1.375rem;\n --typography-title-large-font-weight: var(--font-weight-regular);\n --typography-title-large-letter-spacing: 0;\n --typography-title-large-line-height: 1.75rem;\n --typography-title-medium-emphasized-font-family: var(--font-family-sans);\n --typography-title-medium-emphasized-font-size: 1rem;\n --typography-title-medium-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-title-medium-emphasized-letter-spacing: 0.15000000596046448px;\n --typography-title-medium-emphasized-line-height: 1.5rem;\n --typography-title-medium-font-family: var(--font-family-sans);\n --typography-title-medium-font-size: 1rem;\n --typography-title-medium-font-weight: var(--font-weight-medium);\n --typography-title-medium-letter-spacing: 0.15000000596046448px;\n --typography-title-medium-line-height: 1.5rem;\n --typography-title-small-emphasized-font-family: var(--font-family-sans);\n --typography-title-small-emphasized-font-size: 0.875rem;\n --typography-title-small-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-title-small-emphasized-letter-spacing: 0.10000000149011612px;\n --typography-title-small-emphasized-line-height: 1.25rem;\n --typography-title-small-font-family: var(--font-family-sans);\n --typography-title-small-font-size: 0.875rem;\n --typography-title-small-font-weight: var(--font-weight-medium);\n --typography-title-small-letter-spacing: 0.10000000149011612px;\n --typography-title-small-line-height: 1.25rem;\n --z-index-badge: 10;\n color-scheme: light dark;\n}\n\n[data-theme='dark'] {\n --color-blue: var(--color-blue-80);\n --color-blue-container: var(--color-blue-30);\n --color-error: var(--color-red-80);\n --color-error-container: var(--color-red-30);\n --color-green: var(--color-green-80);\n --color-green-container: var(--color-green-30);\n --color-inverse-blue: var(--color-blue-40);\n --color-inverse-error: var(--color-red-40);\n --color-inverse-green: var(--color-green-40);\n --color-inverse-on-surface: var(--color-neutral-20);\n --color-inverse-orange: var(--color-orange-40);\n --color-inverse-primary: var(--color-primary-40);\n --color-inverse-purple: var(--color-purple-40);\n --color-inverse-red: var(--color-red-40);\n --color-inverse-secondary: var(--color-secondary-40);\n --color-inverse-success: var(--color-green-40);\n --color-inverse-surface: var(--color-neutral-90);\n --color-inverse-tertiary: var(--color-tertiary-40);\n --color-inverse-warning: var(--color-yellow-40);\n --color-inverse-yellow: var(--color-yellow-40);\n --color-on-blue: var(--color-blue-20);\n --color-on-blue-container: var(--color-blue-90);\n --color-on-error: var(--color-red-20);\n --color-on-error-container: var(--color-red-90);\n --color-on-green: var(--color-green-20);\n --color-on-green-container: var(--color-green-90);\n --color-on-orange: var(--color-orange-20);\n --color-on-orange-container: var(--color-orange-90);\n --color-on-primary: var(--color-primary-20);\n --color-on-primary-container: var(--color-primary-90);\n --color-on-purple: var(--color-purple-20);\n --color-on-purple-container: var(--color-purple-90);\n --color-on-red: var(--color-red-20);\n --color-on-red-container: var(--color-red-90);\n --color-on-secondary: var(--color-secondary-20);\n --color-on-secondary-container: var(--color-secondary-90);\n --color-on-success: var(--color-green-20);\n --color-on-success-container: var(--color-green-90);\n --color-on-surface: var(--color-neutral-90);\n --color-on-surface-variant: var(--color-neutral-variant-80);\n --color-on-tertiary: var(--color-tertiary-20);\n --color-on-tertiary-container: var(--color-tertiary-90);\n --color-on-warning: var(--color-yellow-20);\n --color-on-warning-container: var(--color-yellow-90);\n --color-on-yellow: var(--color-yellow-20);\n --color-on-yellow-container: var(--color-yellow-90);\n --color-orange: var(--color-orange-80);\n --color-orange-container: var(--color-orange-30);\n --color-outline: var(--color-neutral-variant-60);\n --color-outline-variant: var(--color-neutral-variant-30);\n --color-primary: var(--color-primary-80);\n --color-primary-container: var(--color-primary-30);\n --color-purple: var(--color-purple-80);\n --color-purple-container: var(--color-purple-30);\n --color-red: var(--color-red-80);\n --color-red-container: var(--color-red-30);\n --color-scrim: var(--color-neutral-0);\n --color-secondary: var(--color-secondary-80);\n --color-secondary-container: var(--color-secondary-30);\n --color-shadow: var(--color-neutral-0);\n --color-success: var(--color-green-80);\n --color-success-container: var(--color-green-30);\n --color-surface: var(--color-neutral-10);\n --color-surface-container: var(--color-neutral-12);\n --color-surface-container-high: var(--color-neutral-17);\n --color-surface-container-highest: var(--color-neutral-22);\n --color-surface-container-low: var(--color-neutral-10);\n --color-surface-container-lowest: var(--color-neutral-4);\n --color-surface-dim: var(--color-neutral-6);\n --color-surface-variant: var(--color-neutral-variant-30);\n --color-tertiary: var(--color-tertiary-80);\n --color-tertiary-container: var(--color-tertiary-30);\n --color-warning: var(--color-yellow-80);\n --color-warning-container: var(--color-yellow-30);\n --color-yellow: var(--color-yellow-80);\n --color-yellow-container: var(--color-yellow-30);\n}\n\n";
|
|
4
|
+
import { i, _ as __decorate, n, a as i$1, w, b } from './PeacockComponent-DMrFEGDh.js';
|
|
5
|
+
import { r } from './state-CEVpI7Vv.js';
|
|
6
|
+
import { e as e$1 } from './class-map-CbncA34D.js';
|
|
7
|
+
import './unsafe-html-Ca00SXpn.js';
|
|
8
|
+
import './style-map-mOmZwsJT.js';
|
|
9
|
+
|
|
10
|
+
var css_248z$3 = i`* {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.screen-reader-only {
|
|
15
|
+
display: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
--checkbox-size: 18px;
|
|
21
|
+
--checkbox-icon-size: 12px;
|
|
22
|
+
--checkbox-selected-color: var(--color-primary);
|
|
23
|
+
--checkbox-unselected-color: var(--color-on-surface-variant);
|
|
24
|
+
--checkbox-checkmark-color: var(--color-on-primary);
|
|
25
|
+
--checkbox-state-layer-size: 40px;
|
|
26
|
+
--checkbox-disabled-opacity: 0.38;
|
|
27
|
+
--checkbox-border-radius: 2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.checkbox {
|
|
31
|
+
position: relative;
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
user-select: none;
|
|
36
|
+
vertical-align: middle;
|
|
37
|
+
font-family: var(--typography-body-medium-font-family) !important;
|
|
38
|
+
font-size: var(--typography-body-medium-font-size) !important;
|
|
39
|
+
font-weight: var(--typography-body-medium-font-weight) !important;
|
|
40
|
+
line-height: var(--typography-body-medium-line-height) !important;
|
|
41
|
+
letter-spacing: var(--typography-body-medium-letter-spacing) !important;
|
|
42
|
+
}
|
|
43
|
+
.checkbox.has-content {
|
|
44
|
+
gap: 8px;
|
|
45
|
+
}
|
|
46
|
+
.checkbox .input-native {
|
|
47
|
+
position: absolute;
|
|
48
|
+
width: 1px;
|
|
49
|
+
height: 1px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin: -1px;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
clip: rect(0, 0, 0, 0);
|
|
54
|
+
border: 0;
|
|
55
|
+
}
|
|
56
|
+
.checkbox .container {
|
|
57
|
+
position: relative;
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
width: var(--checkbox-state-layer-size);
|
|
62
|
+
height: var(--checkbox-state-layer-size);
|
|
63
|
+
cursor: inherit;
|
|
64
|
+
outline: none;
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
}
|
|
67
|
+
.checkbox .state-layer {
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
opacity: 0;
|
|
72
|
+
transition: opacity var(--duration-short2) var(--easing-standard);
|
|
73
|
+
}
|
|
74
|
+
.checkbox .outline {
|
|
75
|
+
position: absolute;
|
|
76
|
+
width: var(--checkbox-size);
|
|
77
|
+
height: var(--checkbox-size);
|
|
78
|
+
border: 2px solid var(--checkbox-unselected-color);
|
|
79
|
+
border-radius: var(--checkbox-border-radius);
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
transition: border-color var(--duration-short2) var(--easing-standard);
|
|
82
|
+
}
|
|
83
|
+
.checkbox .background {
|
|
84
|
+
position: absolute;
|
|
85
|
+
width: var(--checkbox-size);
|
|
86
|
+
height: var(--checkbox-size);
|
|
87
|
+
background: var(--checkbox-selected-color);
|
|
88
|
+
border-radius: var(--checkbox-border-radius);
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transform: scale(0);
|
|
91
|
+
transition: transform var(--duration-short2) var(--easing-standard), opacity var(--duration-short2) var(--easing-standard);
|
|
92
|
+
}
|
|
93
|
+
.checkbox .icon {
|
|
94
|
+
position: absolute;
|
|
95
|
+
width: var(--checkbox-icon-size);
|
|
96
|
+
height: var(--checkbox-icon-size);
|
|
97
|
+
fill: none;
|
|
98
|
+
stroke: var(--checkbox-checkmark-color);
|
|
99
|
+
stroke-width: 2;
|
|
100
|
+
stroke-linecap: round;
|
|
101
|
+
stroke-linejoin: round;
|
|
102
|
+
opacity: 0;
|
|
103
|
+
transition: opacity var(--duration-short1) var(--easing-standard);
|
|
104
|
+
}
|
|
105
|
+
.checkbox .icon .checkmark {
|
|
106
|
+
stroke-dasharray: 14;
|
|
107
|
+
stroke-dashoffset: 14;
|
|
108
|
+
transition: stroke-dashoffset var(--duration-short4) var(--easing-emphasized);
|
|
109
|
+
}
|
|
110
|
+
.checkbox .icon .indeterminate {
|
|
111
|
+
transform-origin: center;
|
|
112
|
+
opacity: 0;
|
|
113
|
+
transition: opacity var(--duration-short1) var(--easing-standard);
|
|
114
|
+
}
|
|
115
|
+
.checkbox .label {
|
|
116
|
+
color: var(--color-on-surface);
|
|
117
|
+
cursor: inherit;
|
|
118
|
+
}
|
|
119
|
+
.checkbox:hover:not(.disabled):not(.readonly) .state-layer {
|
|
120
|
+
opacity: 0.08;
|
|
121
|
+
background: var(--color-on-surface);
|
|
122
|
+
}
|
|
123
|
+
.checkbox:hover:not(.disabled):not(.readonly).state-checked .state-layer, .checkbox:hover:not(.disabled):not(.readonly).state-indeterminate .state-layer {
|
|
124
|
+
background: var(--checkbox-selected-color);
|
|
125
|
+
}
|
|
126
|
+
.checkbox.has-focus:not(.active):not(.disabled):not(.readonly) .state-layer {
|
|
127
|
+
opacity: 0.12;
|
|
128
|
+
background: var(--color-on-surface);
|
|
129
|
+
}
|
|
130
|
+
.checkbox.has-focus:not(.active):not(.disabled):not(.readonly) .container {
|
|
131
|
+
outline: 3px solid var(--color-primary);
|
|
132
|
+
outline-offset: 2px;
|
|
133
|
+
border-radius: 50%;
|
|
134
|
+
}
|
|
135
|
+
.checkbox.has-focus:not(.active):not(.disabled):not(.readonly).state-checked .state-layer, .checkbox.has-focus:not(.active):not(.disabled):not(.readonly).state-indeterminate .state-layer {
|
|
136
|
+
background: var(--checkbox-selected-color);
|
|
137
|
+
}
|
|
138
|
+
.checkbox.active:not(.disabled):not(.readonly) .state-layer {
|
|
139
|
+
opacity: 0.12;
|
|
140
|
+
background: var(--color-on-surface);
|
|
141
|
+
}
|
|
142
|
+
.checkbox.active:not(.disabled):not(.readonly).state-checked .state-layer, .checkbox.active:not(.disabled):not(.readonly).state-indeterminate .state-layer {
|
|
143
|
+
background: var(--checkbox-selected-color);
|
|
144
|
+
}
|
|
145
|
+
.checkbox.rounded {
|
|
146
|
+
--checkbox-border-radius: 18px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.checkbox.state-checked .outline {
|
|
150
|
+
border-color: transparent;
|
|
151
|
+
}
|
|
152
|
+
.checkbox.state-checked .background {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
transform: scale(1);
|
|
155
|
+
}
|
|
156
|
+
.checkbox.state-checked .icon {
|
|
157
|
+
opacity: 1;
|
|
158
|
+
}
|
|
159
|
+
.checkbox.state-checked .icon .checkmark {
|
|
160
|
+
stroke-dashoffset: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.checkbox.state-indeterminate .outline {
|
|
164
|
+
border-color: transparent;
|
|
165
|
+
}
|
|
166
|
+
.checkbox.state-indeterminate .background {
|
|
167
|
+
opacity: 1;
|
|
168
|
+
transform: scale(1);
|
|
169
|
+
}
|
|
170
|
+
.checkbox.state-indeterminate .icon {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
fill: var(--checkbox-checkmark-color);
|
|
173
|
+
}
|
|
174
|
+
.checkbox.state-indeterminate .icon .indeterminate {
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.checkbox.size-sm {
|
|
179
|
+
--checkbox-size: 16px;
|
|
180
|
+
--checkbox-icon-size: 10px;
|
|
181
|
+
--checkbox-state-layer-size: 36px;
|
|
182
|
+
font-size: var(--font-size-body-small);
|
|
183
|
+
line-height: var(--line-height-body-small);
|
|
184
|
+
}
|
|
185
|
+
.checkbox.size-sm .icon {
|
|
186
|
+
stroke-width: 1.5;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.checkbox.size-md {
|
|
190
|
+
--checkbox-size: 18px;
|
|
191
|
+
--checkbox-icon-size: 12px;
|
|
192
|
+
--checkbox-state-layer-size: 40px;
|
|
193
|
+
}
|
|
194
|
+
.checkbox.size-md .icon {
|
|
195
|
+
stroke-width: 2;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.checkbox.size-lg {
|
|
199
|
+
--checkbox-size: 24px;
|
|
200
|
+
--checkbox-icon-size: 16px;
|
|
201
|
+
--checkbox-state-layer-size: 48px;
|
|
202
|
+
font-size: var(--font-size-body-large);
|
|
203
|
+
line-height: var(--line-height-body-large);
|
|
204
|
+
}
|
|
205
|
+
.checkbox.size-lg .icon {
|
|
206
|
+
stroke-width: 2.5;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.checkbox.readonly {
|
|
210
|
+
cursor: default;
|
|
211
|
+
}
|
|
212
|
+
.checkbox.readonly .label {
|
|
213
|
+
color: var(--color-on-surface);
|
|
214
|
+
}
|
|
215
|
+
.checkbox.readonly .outline {
|
|
216
|
+
border-color: var(--color-on-surface-variant);
|
|
217
|
+
}
|
|
218
|
+
.checkbox.readonly.state-checked .background, .checkbox.readonly.state-indeterminate .background {
|
|
219
|
+
background: var(--color-on-surface-variant);
|
|
220
|
+
}
|
|
221
|
+
.checkbox.readonly .state-layer {
|
|
222
|
+
display: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.checkbox.disabled {
|
|
226
|
+
cursor: not-allowed;
|
|
227
|
+
opacity: var(--checkbox-disabled-opacity);
|
|
228
|
+
}
|
|
229
|
+
.checkbox.disabled .label {
|
|
230
|
+
color: var(--color-on-surface);
|
|
231
|
+
}
|
|
232
|
+
.checkbox.disabled .outline {
|
|
233
|
+
border-color: var(--color-on-surface);
|
|
234
|
+
}
|
|
235
|
+
.checkbox.disabled.state-checked .background, .checkbox.disabled.state-indeterminate .background {
|
|
236
|
+
background: var(--color-on-surface);
|
|
237
|
+
}
|
|
238
|
+
.checkbox.disabled .state-layer {
|
|
239
|
+
display: none;
|
|
240
|
+
}`;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @label Checkbox
|
|
244
|
+
* @tag base-checkbox
|
|
245
|
+
* @rawTag checkbox
|
|
246
|
+
*
|
|
247
|
+
* @summary Captures boolean input with an optional indeterminate mode.
|
|
248
|
+
* @overview
|
|
249
|
+
* <p>Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.</p>
|
|
250
|
+
* <p>Material Design 3 checkboxes feature a smooth animation and clear visual states for checked, unchecked, and indeterminate.</p>
|
|
251
|
+
*
|
|
252
|
+
* @cssprop --checkbox-size: Size of the checkbox container.
|
|
253
|
+
* @cssprop --checkbox-selected-color: Color of the checkbox when selected.
|
|
254
|
+
* @cssprop --checkbox-unselected-color: Color of the checkbox border when unselected.
|
|
255
|
+
* @cssprop --checkbox-checkmark-color: Color of the checkmark icon.
|
|
256
|
+
* @cssprop --checkbox-state-layer-size: Size of the state layer for touch target.
|
|
257
|
+
*
|
|
258
|
+
* @fires {CustomEvent} change - Dispatched when the checkbox value changes.
|
|
259
|
+
* @fires {CustomEvent} blur - Dispatched when the checkbox loses focus.
|
|
260
|
+
* @fires {CustomEvent} focus - Dispatched when the checkbox receives focus.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```html
|
|
264
|
+
* <base-checkbox label="Accept terms"></base-checkbox>
|
|
265
|
+
* ```
|
|
266
|
+
* @tags input, form
|
|
267
|
+
*/
|
|
268
|
+
class Checkbox extends i$1 {
|
|
269
|
+
constructor() {
|
|
270
|
+
super(...arguments);
|
|
271
|
+
/**
|
|
272
|
+
* The input field name.
|
|
273
|
+
*/
|
|
274
|
+
this.name = '';
|
|
275
|
+
/**
|
|
276
|
+
* The checkbox label.
|
|
277
|
+
*/
|
|
278
|
+
this.label = '';
|
|
279
|
+
/**
|
|
280
|
+
* The input field value (checked state).
|
|
281
|
+
*/
|
|
282
|
+
this.value = false;
|
|
283
|
+
/**
|
|
284
|
+
* If true, displays the checkbox in an indeterminate state.
|
|
285
|
+
*/
|
|
286
|
+
this.indeterminate = false;
|
|
287
|
+
/**
|
|
288
|
+
* If true, the checkbox has rounded corners. Defaults to `false`.
|
|
289
|
+
*/
|
|
290
|
+
this.rounded = false;
|
|
291
|
+
/**
|
|
292
|
+
* The checkbox size.
|
|
293
|
+
* Possible values are: `"sm"`, `"md"`, `"lg"`. Defaults to `"md"`.
|
|
294
|
+
*/
|
|
295
|
+
this.size = 'md';
|
|
296
|
+
/**
|
|
297
|
+
* If true, required icon is shown. Defaults to `false`.
|
|
298
|
+
*/
|
|
299
|
+
this.required = false;
|
|
300
|
+
/**
|
|
301
|
+
* If true, the checkbox is readonly. Defaults to `false`.
|
|
302
|
+
*/
|
|
303
|
+
this.readonly = false;
|
|
304
|
+
/**
|
|
305
|
+
* If true, the user cannot interact with the checkbox. Defaults to `false`.
|
|
306
|
+
*/
|
|
307
|
+
this.disabled = false;
|
|
308
|
+
/**
|
|
309
|
+
* Configuration object for aria attributes.
|
|
310
|
+
*/
|
|
311
|
+
this.configAria = {};
|
|
312
|
+
this.hasFocus = false;
|
|
313
|
+
this.isActive = false;
|
|
314
|
+
this.slotHasContent = false;
|
|
315
|
+
this.windowMouseUp = () => {
|
|
316
|
+
if (this.isActive) {
|
|
317
|
+
this.isActive = false;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
this.windowKeyUp = (evt) => {
|
|
321
|
+
if (this.isActive && evt.key === ' ') {
|
|
322
|
+
this.isActive = false;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
this.mouseDownHandler = () => {
|
|
326
|
+
this.isActive = true;
|
|
327
|
+
};
|
|
328
|
+
this.keyDownHandler = (evt) => {
|
|
329
|
+
if (evt.key === ' ') {
|
|
330
|
+
evt.preventDefault();
|
|
331
|
+
this.isActive = true;
|
|
332
|
+
this.clickHandler(evt);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
this.clickHandler = (ev) => {
|
|
336
|
+
if (!this.disabled && !this.readonly) {
|
|
337
|
+
this.value = !this.value;
|
|
338
|
+
this.indeterminate = false;
|
|
339
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
340
|
+
detail: { value: this.value, originalEvent: ev },
|
|
341
|
+
bubbles: true,
|
|
342
|
+
composed: true,
|
|
343
|
+
}));
|
|
344
|
+
this.containerElement?.focus();
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
this.blurHandler = (ev) => {
|
|
348
|
+
this.hasFocus = false;
|
|
349
|
+
this.dispatchEvent(new CustomEvent('blur', {
|
|
350
|
+
detail: ev,
|
|
351
|
+
bubbles: true,
|
|
352
|
+
composed: true,
|
|
353
|
+
}));
|
|
354
|
+
};
|
|
355
|
+
this.focusHandler = (ev) => {
|
|
356
|
+
this.hasFocus = true;
|
|
357
|
+
this.dispatchEvent(new CustomEvent('focus', {
|
|
358
|
+
detail: ev,
|
|
359
|
+
bubbles: true,
|
|
360
|
+
composed: true,
|
|
361
|
+
}));
|
|
362
|
+
};
|
|
363
|
+
this.handleKeyUp = (evt) => {
|
|
364
|
+
if (evt.key === 'Enter') {
|
|
365
|
+
this.clickHandler(evt);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
connectedCallback() {
|
|
370
|
+
super.connectedCallback();
|
|
371
|
+
this.handleInitialAttributes();
|
|
372
|
+
window.addEventListener('mouseup', this.windowMouseUp);
|
|
373
|
+
window.addEventListener('keyup', this.windowKeyUp);
|
|
374
|
+
}
|
|
375
|
+
disconnectedCallback() {
|
|
376
|
+
super.disconnectedCallback();
|
|
377
|
+
window.removeEventListener('mouseup', this.windowMouseUp);
|
|
378
|
+
window.removeEventListener('keyup', this.windowKeyUp);
|
|
379
|
+
}
|
|
380
|
+
firstUpdated() {
|
|
381
|
+
this.slotHasContent = this.hasChildNodes();
|
|
382
|
+
}
|
|
383
|
+
handleInitialAttributes() {
|
|
384
|
+
if (this.hasAttribute('tabindex')) {
|
|
385
|
+
this.tabindex = this.getAttribute('tabindex') || undefined;
|
|
386
|
+
this.removeAttribute('tabindex');
|
|
387
|
+
}
|
|
388
|
+
Array.from(this.attributes).forEach(attr => {
|
|
389
|
+
if (attr.name.startsWith('aria-')) {
|
|
390
|
+
this.configAria[attr.name] = attr.value;
|
|
391
|
+
this.removeAttribute(attr.name);
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Sets focus on the checkbox.
|
|
397
|
+
*/
|
|
398
|
+
focus() {
|
|
399
|
+
this.containerElement?.focus();
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Removes focus from the checkbox.
|
|
403
|
+
*/
|
|
404
|
+
blur() {
|
|
405
|
+
this.containerElement?.blur();
|
|
406
|
+
}
|
|
407
|
+
render() {
|
|
408
|
+
const cssClasses = {
|
|
409
|
+
checkbox: true,
|
|
410
|
+
'state-checked': this.value,
|
|
411
|
+
'state-indeterminate': !this.value && this.indeterminate,
|
|
412
|
+
[`size-${this.size}`]: true,
|
|
413
|
+
'has-focus': this.hasFocus,
|
|
414
|
+
active: this.isActive,
|
|
415
|
+
disabled: this.disabled,
|
|
416
|
+
readonly: this.readonly,
|
|
417
|
+
required: this.required,
|
|
418
|
+
rounded: this.rounded,
|
|
419
|
+
'has-content': this.slotHasContent,
|
|
420
|
+
};
|
|
421
|
+
return b `
|
|
422
|
+
<label class=${e$1(cssClasses)}>
|
|
423
|
+
<div
|
|
424
|
+
class="container"
|
|
425
|
+
tabindex=${this.tabindex || 0}
|
|
426
|
+
@keyup=${this.handleKeyUp}
|
|
427
|
+
@mousedown=${this.mouseDownHandler}
|
|
428
|
+
@keydown=${this.keyDownHandler}
|
|
429
|
+
@blur=${this.blurHandler}
|
|
430
|
+
@focus=${this.focusHandler}
|
|
431
|
+
role="checkbox"
|
|
432
|
+
aria-disabled=${this.disabled}
|
|
433
|
+
aria-required=${this.required}
|
|
434
|
+
aria-checked=${this.value
|
|
435
|
+
? 'true'
|
|
436
|
+
: this.indeterminate
|
|
437
|
+
? 'mixed'
|
|
438
|
+
: 'false'}
|
|
439
|
+
${spread(this.configAria)}
|
|
440
|
+
>
|
|
441
|
+
<div class="state-layer"></div>
|
|
442
|
+
<div class="outline"></div>
|
|
443
|
+
<div class="background"></div>
|
|
444
|
+
<svg class="icon" viewBox="0 0 12 12">
|
|
445
|
+
${this.value
|
|
446
|
+
? w `
|
|
447
|
+
<path
|
|
448
|
+
class="checkmark"
|
|
449
|
+
d="M2 6L5 9L10 2"
|
|
450
|
+
/>
|
|
451
|
+
`
|
|
452
|
+
: this.indeterminate
|
|
453
|
+
? w `<rect
|
|
454
|
+
class="indeterminate"
|
|
455
|
+
x="2"
|
|
456
|
+
y="5"
|
|
457
|
+
width="8"
|
|
458
|
+
height="2"
|
|
459
|
+
/>`
|
|
460
|
+
: ''}
|
|
461
|
+
</svg>
|
|
462
|
+
</div>
|
|
463
|
+
|
|
464
|
+
<input
|
|
465
|
+
type="checkbox"
|
|
466
|
+
class="input-native"
|
|
467
|
+
name=${this.name}
|
|
468
|
+
.checked=${this.value}
|
|
469
|
+
.indeterminate=${this.indeterminate}
|
|
470
|
+
aria-hidden="true"
|
|
471
|
+
?required=${this.required}
|
|
472
|
+
tabindex="-1"
|
|
473
|
+
@click=${this.clickHandler}
|
|
474
|
+
/>
|
|
475
|
+
|
|
476
|
+
${this.label
|
|
477
|
+
? b `<div class="label">${this.label}</div>`
|
|
478
|
+
: b `<div class="label slot-container"><slot></slot></div>`}
|
|
479
|
+
</label>
|
|
480
|
+
`;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
Checkbox.styles = [css_248z$3];
|
|
484
|
+
__decorate([
|
|
485
|
+
n({ type: String })
|
|
486
|
+
], Checkbox.prototype, "name", void 0);
|
|
487
|
+
__decorate([
|
|
488
|
+
n({ type: String })
|
|
489
|
+
], Checkbox.prototype, "label", void 0);
|
|
490
|
+
__decorate([
|
|
491
|
+
n({ type: Boolean, reflect: true })
|
|
492
|
+
], Checkbox.prototype, "value", void 0);
|
|
493
|
+
__decorate([
|
|
494
|
+
n({ type: Boolean, reflect: true })
|
|
495
|
+
], Checkbox.prototype, "indeterminate", void 0);
|
|
496
|
+
__decorate([
|
|
497
|
+
n({ type: Boolean })
|
|
498
|
+
], Checkbox.prototype, "rounded", void 0);
|
|
499
|
+
__decorate([
|
|
500
|
+
n({ type: String })
|
|
501
|
+
], Checkbox.prototype, "size", void 0);
|
|
502
|
+
__decorate([
|
|
503
|
+
n({ type: Boolean, reflect: true })
|
|
504
|
+
], Checkbox.prototype, "required", void 0);
|
|
505
|
+
__decorate([
|
|
506
|
+
n({ type: Boolean, reflect: true })
|
|
507
|
+
], Checkbox.prototype, "readonly", void 0);
|
|
508
|
+
__decorate([
|
|
509
|
+
n({ type: Boolean, reflect: true })
|
|
510
|
+
], Checkbox.prototype, "disabled", void 0);
|
|
511
|
+
__decorate([
|
|
512
|
+
n({ type: Object })
|
|
513
|
+
], Checkbox.prototype, "configAria", void 0);
|
|
514
|
+
__decorate([
|
|
515
|
+
r()
|
|
516
|
+
], Checkbox.prototype, "hasFocus", void 0);
|
|
517
|
+
__decorate([
|
|
518
|
+
r()
|
|
519
|
+
], Checkbox.prototype, "isActive", void 0);
|
|
520
|
+
__decorate([
|
|
521
|
+
r()
|
|
522
|
+
], Checkbox.prototype, "slotHasContent", void 0);
|
|
523
|
+
__decorate([
|
|
524
|
+
e('.container')
|
|
525
|
+
], Checkbox.prototype, "containerElement", void 0);
|
|
526
|
+
__decorate([
|
|
527
|
+
e('.input-native')
|
|
528
|
+
], Checkbox.prototype, "nativeElement", void 0);
|
|
529
|
+
|
|
530
|
+
class Menu extends i$1 {
|
|
531
|
+
constructor() {
|
|
532
|
+
super();
|
|
533
|
+
this.open = false;
|
|
534
|
+
// Position: 'bottom-start' | 'bottom-end' | etc. (Simplified here to generic dropdown)
|
|
535
|
+
this.align = 'start';
|
|
536
|
+
this._boundClickOutside = this._handleClickOutside.bind(this);
|
|
537
|
+
}
|
|
538
|
+
connectedCallback() {
|
|
539
|
+
// eslint-disable-next-line wc/guard-super-call
|
|
540
|
+
super.connectedCallback();
|
|
541
|
+
window.addEventListener('click', this._boundClickOutside);
|
|
542
|
+
// Listen for menu-item clicks bubbling up
|
|
543
|
+
this.addEventListener('click', this._handleItemClick);
|
|
544
|
+
}
|
|
545
|
+
disconnectedCallback() {
|
|
546
|
+
// eslint-disable-next-line wc/guard-super-call
|
|
547
|
+
super.disconnectedCallback();
|
|
548
|
+
window.removeEventListener('click', this._boundClickOutside);
|
|
549
|
+
this.removeEventListener('click', this._handleItemClick);
|
|
550
|
+
}
|
|
551
|
+
_handleClickOutside(e) {
|
|
552
|
+
if (!this.open)
|
|
553
|
+
return;
|
|
554
|
+
const path = e.composedPath();
|
|
555
|
+
if (!path.includes(this)) {
|
|
556
|
+
this.open = false;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
_handleItemClick(e) {
|
|
560
|
+
const target = e.target;
|
|
561
|
+
// Check if the clicked element is a menu-item
|
|
562
|
+
if (target.tagName.toLowerCase() === 'menu-item') {
|
|
563
|
+
// Dispatch custom event with value
|
|
564
|
+
const value = target.value;
|
|
565
|
+
this.dispatchEvent(new CustomEvent('menu-selected', {
|
|
566
|
+
detail: { value },
|
|
567
|
+
bubbles: true,
|
|
568
|
+
composed: true,
|
|
569
|
+
}));
|
|
570
|
+
this.open = false;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
_toggleMenu(e) {
|
|
574
|
+
e.stopPropagation(); // Prevent immediate closing via window listener
|
|
575
|
+
this.open = !this.open;
|
|
576
|
+
}
|
|
577
|
+
render() {
|
|
578
|
+
return b `
|
|
579
|
+
<div class="trigger" @click="${this._toggleMenu}">
|
|
580
|
+
<slot name="trigger"></slot>
|
|
581
|
+
</div>
|
|
582
|
+
|
|
583
|
+
<div class="menu-wrapper">
|
|
584
|
+
<!-- We expect a menu-list to be passed here -->
|
|
585
|
+
<slot></slot>
|
|
586
|
+
</div>
|
|
587
|
+
`;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
Menu.styles = i `
|
|
591
|
+
:host {
|
|
592
|
+
display: inline-block;
|
|
593
|
+
position: relative;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.trigger {
|
|
597
|
+
cursor: pointer;
|
|
598
|
+
display: inline-block;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.menu-wrapper {
|
|
602
|
+
position: absolute;
|
|
603
|
+
top: 100%;
|
|
604
|
+
z-index: 10;
|
|
605
|
+
opacity: 0;
|
|
606
|
+
transform: scale(0.95);
|
|
607
|
+
transform-origin: top left;
|
|
608
|
+
transition:
|
|
609
|
+
opacity 0.1s ease-out,
|
|
610
|
+
transform 0.1s ease-out;
|
|
611
|
+
pointer-events: none; /* Prevent clicking when hidden */
|
|
612
|
+
margin-top: 4px; /* Slight gap */
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
:host([open]) .menu-wrapper {
|
|
616
|
+
opacity: 1;
|
|
617
|
+
transform: scale(1);
|
|
618
|
+
pointer-events: auto;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* Alignment logic */
|
|
622
|
+
:host([align='end']) .menu-wrapper {
|
|
623
|
+
right: 0;
|
|
624
|
+
transform-origin: top right;
|
|
625
|
+
}
|
|
626
|
+
:host([align='start']) .menu-wrapper {
|
|
627
|
+
left: 0;
|
|
628
|
+
transform-origin: top left;
|
|
629
|
+
}
|
|
630
|
+
`;
|
|
631
|
+
__decorate([
|
|
632
|
+
n({ type: Boolean, reflect: true })
|
|
633
|
+
], Menu.prototype, "open", void 0);
|
|
634
|
+
__decorate([
|
|
635
|
+
n({ type: String })
|
|
636
|
+
], Menu.prototype, "align", void 0);
|
|
637
|
+
__decorate([
|
|
638
|
+
e('.menu-wrapper')
|
|
639
|
+
], Menu.prototype, "menuWrapper", void 0);
|
|
640
|
+
|
|
641
|
+
var css_248z$2 = i`* {
|
|
642
|
+
box-sizing: border-box;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.screen-reader-only {
|
|
646
|
+
display: none !important;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
:host {
|
|
650
|
+
padding-inline: var(--spacing-050);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.menu-item {
|
|
654
|
+
position: relative;
|
|
655
|
+
height: 3rem;
|
|
656
|
+
display: flex;
|
|
657
|
+
align-items: center;
|
|
658
|
+
padding-inline: 0.75rem;
|
|
659
|
+
outline: 0;
|
|
660
|
+
font-family: var(--typography-label-large-font-family) !important;
|
|
661
|
+
font-size: var(--typography-label-large-font-size) !important;
|
|
662
|
+
font-weight: var(--typography-label-large-font-weight) !important;
|
|
663
|
+
line-height: var(--typography-label-large-line-height) !important;
|
|
664
|
+
letter-spacing: var(--typography-label-large-letter-spacing) !important;
|
|
665
|
+
}
|
|
666
|
+
.menu-item .menu-item-content {
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: center;
|
|
669
|
+
z-index: 1;
|
|
670
|
+
width: 100%;
|
|
671
|
+
gap: var(--spacing-100);
|
|
672
|
+
color: var(--_label-text-color);
|
|
673
|
+
opacity: var(--_label-text-opacity, 1);
|
|
674
|
+
--icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
675
|
+
--icon-color: var(--_label-text-color);
|
|
676
|
+
}
|
|
677
|
+
.menu-item .menu-item-content .slot-container {
|
|
678
|
+
flex: 1;
|
|
679
|
+
}
|
|
680
|
+
.menu-item .background {
|
|
681
|
+
display: block;
|
|
682
|
+
position: absolute;
|
|
683
|
+
left: 0;
|
|
684
|
+
top: 0;
|
|
685
|
+
width: 100%;
|
|
686
|
+
height: 100%;
|
|
687
|
+
background-color: var(--_container-color);
|
|
688
|
+
opacity: var(--_container-opacity, 1);
|
|
689
|
+
border-start-start-radius: var(--_container-shape-start-start);
|
|
690
|
+
border-start-end-radius: var(--_container-shape-start-end);
|
|
691
|
+
border-end-start-radius: var(--_container-shape-end-start);
|
|
692
|
+
border-end-end-radius: var(--_container-shape-end-end);
|
|
693
|
+
corner-shape: var(--_container-corner-shape-variant);
|
|
694
|
+
pointer-events: none;
|
|
695
|
+
}
|
|
696
|
+
.menu-item {
|
|
697
|
+
/*
|
|
698
|
+
Background layers
|
|
699
|
+
*/
|
|
700
|
+
}
|
|
701
|
+
.menu-item .focus-ring {
|
|
702
|
+
z-index: 2;
|
|
703
|
+
--focus-ring-container-shape-start-start: var(--_container-shape-start-start);
|
|
704
|
+
--focus-ring-container-shape-start-end: var(--_container-shape-start-end);
|
|
705
|
+
--focus-ring-container-shape-end-start: var(--_container-shape-end-start);
|
|
706
|
+
--focus-ring-container-shape-end-end: var(--_container-shape-end-end);
|
|
707
|
+
--focus-ring-container-shape-variant: var(--_container-corner-shape-variant);
|
|
708
|
+
}
|
|
709
|
+
.menu-item .ripple {
|
|
710
|
+
--ripple-state-opacity: var(--_container-state-opacity, 0);
|
|
711
|
+
--ripple-pressed-color: var(--_container-state-color);
|
|
712
|
+
border-start-start-radius: var(--_container-shape-start-start);
|
|
713
|
+
border-start-end-radius: var(--_container-shape-start-end);
|
|
714
|
+
border-end-start-radius: var(--_container-shape-end-start);
|
|
715
|
+
border-end-end-radius: var(--_container-shape-end-end);
|
|
716
|
+
corner-shape: var(--_container-corner-shape-variant);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.menu-item {
|
|
720
|
+
--_container-shape-start-start: var(--menu-item-container-shape-start-start, var(--shape-corner-extra-small));
|
|
721
|
+
--_container-shape-start-end: var(--menu-item-container-shape-start-end, var(--shape-corner-extra-small));
|
|
722
|
+
--_container-shape-end-start: var(--menu-item-container-shape-end-start, var(--shape-corner-extra-small));
|
|
723
|
+
--_container-shape-end-end: var(--menu-item-container-shape-end-end, var(--shape-corner-extra-small));
|
|
724
|
+
--_container-corner-shape-variant: none;
|
|
725
|
+
--_label-text-color: var(--menu-item-label-color);
|
|
726
|
+
--_container-state-color: var(--_label-text-color);
|
|
727
|
+
}
|
|
728
|
+
.menu-item:hover:not(:where(.disabled, .selected)) {
|
|
729
|
+
--_container-state-opacity: 0.08;
|
|
730
|
+
}
|
|
731
|
+
.menu-item.selected {
|
|
732
|
+
--_container-color: var(--menu-item-container-selected-color);
|
|
733
|
+
--_label-text-color: var(--menu-item-label-selected-color);
|
|
734
|
+
--_container-shape-start-start: var(--menu-item-container-shape-start-start, var(--shape-corner-large));
|
|
735
|
+
--_container-shape-start-end: var(--menu-item-container-shape-start-end, var(--shape-corner-large));
|
|
736
|
+
--_container-shape-end-start: var(--menu-item-container-shape-end-start, var(--shape-corner-large));
|
|
737
|
+
--_container-shape-end-end: var(--menu-item-container-shape-end-end, var(--shape-corner-large));
|
|
738
|
+
--_container-corner-shape-variant: none;
|
|
739
|
+
}
|
|
740
|
+
.menu-item.disabled {
|
|
741
|
+
cursor: not-allowed;
|
|
742
|
+
--_container-color: var(--color-on-surface);
|
|
743
|
+
--_container-opacity: 0.1;
|
|
744
|
+
--_label-text-color: var(--color-on-surface);
|
|
745
|
+
--_label-text-opacity: 0.38;
|
|
746
|
+
}
|
|
747
|
+
.menu-item.disabled .ripple {
|
|
748
|
+
display: none;
|
|
749
|
+
}`;
|
|
750
|
+
|
|
751
|
+
var css_248z$1 = i`:host-context(menu-list[variant=standard]) {
|
|
752
|
+
--menu-item-label-color: var(--color-on-surface-variant);
|
|
753
|
+
--menu-item-label-selected-color: var(--color-on-tertiary-container);
|
|
754
|
+
--menu-item-container-selected-color: var(--color-tertiary-container);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
:host-context(menu-list[variant=vibrant]) {
|
|
758
|
+
--menu-item-label-color: var(--color-on-tertiary-container);
|
|
759
|
+
--menu-item-label-selected-color: var(--color-on-tertiary);
|
|
760
|
+
--menu-item-container-selected-color: var(--color-tertiary);
|
|
761
|
+
}`;
|
|
762
|
+
|
|
763
|
+
class MenuItem extends i$1 {
|
|
764
|
+
constructor() {
|
|
765
|
+
super(...arguments);
|
|
766
|
+
this.disabled = false;
|
|
767
|
+
this.value = '';
|
|
768
|
+
this.selected = false;
|
|
769
|
+
/**
|
|
770
|
+
* Sets or retrieves the window or frame at which to target content.
|
|
771
|
+
*/
|
|
772
|
+
this.target = '_self';
|
|
773
|
+
this.variant = 'standard';
|
|
774
|
+
}
|
|
775
|
+
connectedCallback() {
|
|
776
|
+
// eslint-disable-next-line wc/guard-super-call
|
|
777
|
+
super.connectedCallback();
|
|
778
|
+
if (!this.hasAttribute('role')) {
|
|
779
|
+
this.setAttribute('role', 'menuitem');
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
// Handle keyboard activation (Enter/Space)
|
|
783
|
+
_handleKeyDown(e) {
|
|
784
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
785
|
+
e.preventDefault();
|
|
786
|
+
this.click();
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
__isLink() {
|
|
790
|
+
return !!this.href;
|
|
791
|
+
}
|
|
792
|
+
focus() {
|
|
793
|
+
this.menuItemElement?.focus();
|
|
794
|
+
}
|
|
795
|
+
blur() {
|
|
796
|
+
this.menuItemElement?.blur();
|
|
797
|
+
}
|
|
798
|
+
render() {
|
|
799
|
+
const isLink = this.__isLink();
|
|
800
|
+
const cssClasses = {
|
|
801
|
+
'menu-item': true,
|
|
802
|
+
disabled: this.disabled,
|
|
803
|
+
selected: this.selected,
|
|
804
|
+
};
|
|
805
|
+
if (isLink) {
|
|
806
|
+
return b `<a
|
|
807
|
+
class=${e$1(cssClasses)}
|
|
808
|
+
href=${this.href}
|
|
809
|
+
target=${this.target}
|
|
810
|
+
>
|
|
811
|
+
${this.renderContent()}
|
|
812
|
+
</a>
|
|
813
|
+
`;
|
|
814
|
+
}
|
|
815
|
+
return b `<div
|
|
816
|
+
class=${e$1(cssClasses)}
|
|
817
|
+
tabindex=${!this.disabled ? 0 : -1}
|
|
818
|
+
@keydown="${this._handleKeyDown}"
|
|
819
|
+
>
|
|
820
|
+
${this.renderContent()}
|
|
821
|
+
</div>
|
|
822
|
+
`;
|
|
823
|
+
}
|
|
824
|
+
renderContent() {
|
|
825
|
+
return b `
|
|
826
|
+
<focus-ring class="focus-ring" .control=${this} element="menuItemElement"></focus-ring>
|
|
827
|
+
<div class="background"></div>
|
|
828
|
+
<base-ripple class="ripple"></base-ripple>
|
|
829
|
+
|
|
830
|
+
<div class="menu-item-content">
|
|
831
|
+
<slot name="leading-icon"></slot>
|
|
832
|
+
<div class="slot-container">
|
|
833
|
+
<slot></slot>
|
|
834
|
+
</div>
|
|
835
|
+
<slot
|
|
836
|
+
name="trailing-supporting-text"
|
|
837
|
+
></slot>
|
|
838
|
+
</div>
|
|
839
|
+
`;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
MenuItem.styles = [css_248z$2, css_248z$1];
|
|
843
|
+
__decorate([
|
|
844
|
+
n({ type: Boolean, reflect: true })
|
|
845
|
+
], MenuItem.prototype, "disabled", void 0);
|
|
846
|
+
__decorate([
|
|
847
|
+
n({ type: String })
|
|
848
|
+
], MenuItem.prototype, "value", void 0);
|
|
849
|
+
__decorate([
|
|
850
|
+
n({ type: Boolean })
|
|
851
|
+
], MenuItem.prototype, "selected", void 0);
|
|
852
|
+
__decorate([
|
|
853
|
+
n({ reflect: true })
|
|
854
|
+
], MenuItem.prototype, "href", void 0);
|
|
855
|
+
__decorate([
|
|
856
|
+
n()
|
|
857
|
+
], MenuItem.prototype, "target", void 0);
|
|
858
|
+
__decorate([
|
|
859
|
+
n({ type: String, reflect: true })
|
|
860
|
+
], MenuItem.prototype, "variant", void 0);
|
|
861
|
+
__decorate([
|
|
862
|
+
e('.menu-item')
|
|
863
|
+
], MenuItem.prototype, "menuItemElement", void 0);
|
|
864
|
+
|
|
865
|
+
var css_248z = i`* {
|
|
866
|
+
box-sizing: border-box;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.screen-reader-only {
|
|
870
|
+
display: none !important;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.menu-list {
|
|
874
|
+
display: flex;
|
|
875
|
+
position: relative;
|
|
876
|
+
min-width: 112px;
|
|
877
|
+
padding-block: var(--spacing-050);
|
|
878
|
+
}
|
|
879
|
+
.menu-list .menu-list-content {
|
|
880
|
+
display: flex;
|
|
881
|
+
flex-direction: column;
|
|
882
|
+
gap: var(--spacing-050);
|
|
883
|
+
z-index: 1;
|
|
884
|
+
}
|
|
885
|
+
.menu-list .menu-list-content ::slotted(:first-child) {
|
|
886
|
+
--menu-item-container-shape-start-start: var(--shape-corner-medium);
|
|
887
|
+
--menu-item-container-shape-start-end: var(--shape-corner-medium);
|
|
888
|
+
}
|
|
889
|
+
.menu-list .menu-list-content ::slotted(:last-child) {
|
|
890
|
+
--menu-item-container-shape-end-start: var(--shape-corner-medium);
|
|
891
|
+
--menu-item-container-shape-end-end: var(--shape-corner-medium);
|
|
892
|
+
}
|
|
893
|
+
.menu-list .menu-list-content ::slotted(base-divider) {
|
|
894
|
+
--divider-spacing: var(--spacing-100);
|
|
895
|
+
padding-inline: var(--spacing-050);
|
|
896
|
+
}
|
|
897
|
+
.menu-list .background {
|
|
898
|
+
display: block;
|
|
899
|
+
position: absolute;
|
|
900
|
+
left: 0;
|
|
901
|
+
top: 0;
|
|
902
|
+
width: 100%;
|
|
903
|
+
height: 100%;
|
|
904
|
+
background-color: var(--_container-color);
|
|
905
|
+
opacity: var(--_container-opacity, 1);
|
|
906
|
+
border-start-start-radius: var(--_container-shape-start-start);
|
|
907
|
+
border-start-end-radius: var(--_container-shape-start-end);
|
|
908
|
+
border-end-start-radius: var(--_container-shape-end-start);
|
|
909
|
+
border-end-end-radius: var(--_container-shape-end-end);
|
|
910
|
+
pointer-events: none;
|
|
911
|
+
}
|
|
912
|
+
.menu-list .elevation {
|
|
913
|
+
--elevation-level: 2;
|
|
914
|
+
transition-duration: 280ms;
|
|
915
|
+
--elevation-container-shape-start-start: var(--_container-shape-start-start);
|
|
916
|
+
--elevation-container-shape-start-end: var(--_container-shape-start-end);
|
|
917
|
+
--elevation-container-shape-end-start: var(--_container-shape-end-start);
|
|
918
|
+
--elevation-container-shape-end-end: var(--_container-shape-end-end);
|
|
919
|
+
--elevation-container-shape-variant: var(--_container-corner-shape-variant);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.menu-list {
|
|
923
|
+
--_container-shape-start-start: var(--shape-corner-large);
|
|
924
|
+
--_container-shape-start-end: var(--shape-corner-large);
|
|
925
|
+
--_container-shape-end-start: var(--shape-corner-large);
|
|
926
|
+
--_container-shape-end-end: var(--shape-corner-large);
|
|
927
|
+
}
|
|
928
|
+
.menu-list.variant-standard {
|
|
929
|
+
--_container-color: var(--color-surface-container);
|
|
930
|
+
}
|
|
931
|
+
.menu-list.variant-vibrant {
|
|
932
|
+
--_container-color: var(--color-tertiary-container);
|
|
933
|
+
}`;
|
|
934
|
+
|
|
935
|
+
class MenuList extends i$1 {
|
|
936
|
+
constructor() {
|
|
937
|
+
super(...arguments);
|
|
938
|
+
this.variant = 'standard';
|
|
939
|
+
}
|
|
940
|
+
connectedCallback() {
|
|
941
|
+
// eslint-disable-next-line wc/guard-super-call
|
|
942
|
+
super.connectedCallback();
|
|
943
|
+
this.setAttribute('role', 'menu');
|
|
944
|
+
}
|
|
945
|
+
render() {
|
|
946
|
+
return b `<div
|
|
947
|
+
class=${e$1({
|
|
948
|
+
'menu-list': true,
|
|
949
|
+
[`variant-${this.variant}`]: true,
|
|
950
|
+
})}
|
|
951
|
+
>
|
|
952
|
+
<div class="background"></div>
|
|
953
|
+
<base-elevation class="elevation"></base-elevation>
|
|
954
|
+
|
|
955
|
+
<div class="menu-list-content">
|
|
956
|
+
<slot></slot>
|
|
957
|
+
</div>
|
|
958
|
+
</div>`;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
MenuList.styles = [css_248z];
|
|
962
|
+
__decorate([
|
|
963
|
+
n({ type: String, reflect: true })
|
|
964
|
+
], MenuList.prototype, "variant", void 0);
|
|
42
965
|
|
|
43
966
|
class LoaderUtils {
|
|
44
967
|
constructor(loaderConfig) {
|
|
@@ -116,506 +1039,54 @@ class LoaderUtils {
|
|
|
116
1039
|
}
|
|
117
1040
|
}
|
|
118
1041
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
.
|
|
142
|
-
|
|
143
|
-
align-items: center;
|
|
144
|
-
gap: 0.5em;
|
|
145
|
-
}`;
|
|
146
|
-
|
|
147
|
-
var css_248z$1 = i`* {
|
|
148
|
-
box-sizing: border-box;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.screen-reader-only {
|
|
152
|
-
display: none !important;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.text-display {
|
|
156
|
-
font-family: var(--typography-display-medium-font-family) !important;
|
|
157
|
-
font-size: var(--typography-display-medium-font-size) !important;
|
|
158
|
-
font-weight: var(--typography-display-medium-font-weight) !important;
|
|
159
|
-
line-height: var(--typography-display-medium-line-height) !important;
|
|
160
|
-
letter-spacing: var(--typography-display-medium-letter-spacing) !important;
|
|
161
|
-
margin-block-end: var(--spacing-400);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.text-display-emphasized {
|
|
165
|
-
font-family: var(--typography-display-medium-emphasized-font-family) !important;
|
|
166
|
-
font-size: var(--typography-display-medium-emphasized-font-size) !important;
|
|
167
|
-
font-weight: var(--typography-display-medium-emphasized-font-weight) !important;
|
|
168
|
-
line-height: var(--typography-display-medium-emphasized-line-height) !important;
|
|
169
|
-
letter-spacing: var(--typography-display-medium-emphasized-letter-spacing) !important;
|
|
170
|
-
margin-block-end: var(--spacing-400);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.text-display-large {
|
|
174
|
-
font-family: var(--typography-display-large-font-family) !important;
|
|
175
|
-
font-size: var(--typography-display-large-font-size) !important;
|
|
176
|
-
font-weight: var(--typography-display-large-font-weight) !important;
|
|
177
|
-
line-height: var(--typography-display-large-line-height) !important;
|
|
178
|
-
letter-spacing: var(--typography-display-large-letter-spacing) !important;
|
|
179
|
-
margin-block-end: var(--spacing-400);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.text-display-large-emphasized {
|
|
183
|
-
font-family: var(--typography-display-large-emphasized-font-family) !important;
|
|
184
|
-
font-size: var(--typography-display-large-emphasized-font-size) !important;
|
|
185
|
-
font-weight: var(--typography-display-large-emphasized-font-weight) !important;
|
|
186
|
-
line-height: var(--typography-display-large-emphasized-line-height) !important;
|
|
187
|
-
letter-spacing: var(--typography-display-large-emphasized-letter-spacing) !important;
|
|
188
|
-
margin-block-end: var(--spacing-400);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.text-display-medium {
|
|
192
|
-
font-family: var(--typography-display-medium-font-family) !important;
|
|
193
|
-
font-size: var(--typography-display-medium-font-size) !important;
|
|
194
|
-
font-weight: var(--typography-display-medium-font-weight) !important;
|
|
195
|
-
line-height: var(--typography-display-medium-line-height) !important;
|
|
196
|
-
letter-spacing: var(--typography-display-medium-letter-spacing) !important;
|
|
197
|
-
margin-block-end: var(--spacing-400);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.text-display-medium-emphasized {
|
|
201
|
-
font-family: var(--typography-display-medium-emphasized-font-family) !important;
|
|
202
|
-
font-size: var(--typography-display-medium-emphasized-font-size) !important;
|
|
203
|
-
font-weight: var(--typography-display-medium-emphasized-font-weight) !important;
|
|
204
|
-
line-height: var(--typography-display-medium-emphasized-line-height) !important;
|
|
205
|
-
letter-spacing: var(--typography-display-medium-emphasized-letter-spacing) !important;
|
|
206
|
-
margin-block-end: var(--spacing-400);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.text-display-small {
|
|
210
|
-
font-family: var(--typography-display-small-font-family) !important;
|
|
211
|
-
font-size: var(--typography-display-small-font-size) !important;
|
|
212
|
-
font-weight: var(--typography-display-small-font-weight) !important;
|
|
213
|
-
line-height: var(--typography-display-small-line-height) !important;
|
|
214
|
-
letter-spacing: var(--typography-display-small-letter-spacing) !important;
|
|
215
|
-
margin-block-end: var(--spacing-400);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.text-display-small-emphasized {
|
|
219
|
-
font-family: var(--typography-display-small-emphasized-font-family) !important;
|
|
220
|
-
font-size: var(--typography-display-small-emphasized-font-size) !important;
|
|
221
|
-
font-weight: var(--typography-display-small-emphasized-font-weight) !important;
|
|
222
|
-
line-height: var(--typography-display-small-emphasized-line-height) !important;
|
|
223
|
-
letter-spacing: var(--typography-display-small-emphasized-letter-spacing) !important;
|
|
224
|
-
margin-block-end: var(--spacing-400);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.text-headline {
|
|
228
|
-
font-family: var(--typography-headline-medium-font-family) !important;
|
|
229
|
-
font-size: var(--typography-headline-medium-font-size) !important;
|
|
230
|
-
font-weight: var(--typography-headline-medium-font-weight) !important;
|
|
231
|
-
line-height: var(--typography-headline-medium-line-height) !important;
|
|
232
|
-
letter-spacing: var(--typography-headline-medium-letter-spacing) !important;
|
|
233
|
-
margin-block-end: var(--spacing-200);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.text-headline-emphasized {
|
|
237
|
-
font-family: var(--typography-headline-medium-emphasized-font-family) !important;
|
|
238
|
-
font-size: var(--typography-headline-medium-emphasized-font-size) !important;
|
|
239
|
-
font-weight: var(--typography-headline-medium-emphasized-font-weight) !important;
|
|
240
|
-
line-height: var(--typography-headline-medium-emphasized-line-height) !important;
|
|
241
|
-
letter-spacing: var(--typography-headline-medium-emphasized-letter-spacing) !important;
|
|
242
|
-
margin-block-end: var(--spacing-200);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.text-headline-large {
|
|
246
|
-
font-family: var(--typography-headline-large-font-family) !important;
|
|
247
|
-
font-size: var(--typography-headline-large-font-size) !important;
|
|
248
|
-
font-weight: var(--typography-headline-large-font-weight) !important;
|
|
249
|
-
line-height: var(--typography-headline-large-line-height) !important;
|
|
250
|
-
letter-spacing: var(--typography-headline-large-letter-spacing) !important;
|
|
251
|
-
margin-block-end: var(--spacing-200);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.text-headline-large-emphasized {
|
|
255
|
-
font-family: var(--typography-headline-large-emphasized-font-family) !important;
|
|
256
|
-
font-size: var(--typography-headline-large-emphasized-font-size) !important;
|
|
257
|
-
font-weight: var(--typography-headline-large-emphasized-font-weight) !important;
|
|
258
|
-
line-height: var(--typography-headline-large-emphasized-line-height) !important;
|
|
259
|
-
letter-spacing: var(--typography-headline-large-emphasized-letter-spacing) !important;
|
|
260
|
-
margin-block-end: var(--spacing-200);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.text-headline-medium {
|
|
264
|
-
font-family: var(--typography-headline-medium-font-family) !important;
|
|
265
|
-
font-size: var(--typography-headline-medium-font-size) !important;
|
|
266
|
-
font-weight: var(--typography-headline-medium-font-weight) !important;
|
|
267
|
-
line-height: var(--typography-headline-medium-line-height) !important;
|
|
268
|
-
letter-spacing: var(--typography-headline-medium-letter-spacing) !important;
|
|
269
|
-
margin-block-end: var(--spacing-200);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.text-headline-medium-emphasized {
|
|
273
|
-
font-family: var(--typography-headline-medium-emphasized-font-family) !important;
|
|
274
|
-
font-size: var(--typography-headline-medium-emphasized-font-size) !important;
|
|
275
|
-
font-weight: var(--typography-headline-medium-emphasized-font-weight) !important;
|
|
276
|
-
line-height: var(--typography-headline-medium-emphasized-line-height) !important;
|
|
277
|
-
letter-spacing: var(--typography-headline-medium-emphasized-letter-spacing) !important;
|
|
278
|
-
margin-block-end: var(--spacing-200);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.text-headline-small {
|
|
282
|
-
font-family: var(--typography-headline-small-font-family) !important;
|
|
283
|
-
font-size: var(--typography-headline-small-font-size) !important;
|
|
284
|
-
font-weight: var(--typography-headline-small-font-weight) !important;
|
|
285
|
-
line-height: var(--typography-headline-small-line-height) !important;
|
|
286
|
-
letter-spacing: var(--typography-headline-small-letter-spacing) !important;
|
|
287
|
-
margin-block-end: var(--spacing-200);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.text-headline-small-emphasized {
|
|
291
|
-
font-family: var(--typography-headline-small-emphasized-font-family) !important;
|
|
292
|
-
font-size: var(--typography-headline-small-emphasized-font-size) !important;
|
|
293
|
-
font-weight: var(--typography-headline-small-emphasized-font-weight) !important;
|
|
294
|
-
line-height: var(--typography-headline-small-emphasized-line-height) !important;
|
|
295
|
-
letter-spacing: var(--typography-headline-small-emphasized-letter-spacing) !important;
|
|
296
|
-
margin-block-end: var(--spacing-200);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.text-body {
|
|
300
|
-
font-family: var(--typography-body-medium-font-family) !important;
|
|
301
|
-
font-size: var(--typography-body-medium-font-size) !important;
|
|
302
|
-
font-weight: var(--typography-body-medium-font-weight) !important;
|
|
303
|
-
line-height: var(--typography-body-medium-line-height) !important;
|
|
304
|
-
letter-spacing: var(--typography-body-medium-letter-spacing) !important;
|
|
305
|
-
margin-block-end: var(--spacing-200);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.text-body-emphasized {
|
|
309
|
-
font-family: var(--typography-body-medium-emphasized-font-family) !important;
|
|
310
|
-
font-size: var(--typography-body-medium-emphasized-font-size) !important;
|
|
311
|
-
font-weight: var(--typography-body-medium-emphasized-font-weight) !important;
|
|
312
|
-
line-height: var(--typography-body-medium-emphasized-line-height) !important;
|
|
313
|
-
letter-spacing: var(--typography-body-medium-emphasized-letter-spacing) !important;
|
|
314
|
-
margin-block-end: var(--spacing-200);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.text-body-large {
|
|
318
|
-
font-family: var(--typography-body-large-font-family) !important;
|
|
319
|
-
font-size: var(--typography-body-large-font-size) !important;
|
|
320
|
-
font-weight: var(--typography-body-large-font-weight) !important;
|
|
321
|
-
line-height: var(--typography-body-large-line-height) !important;
|
|
322
|
-
letter-spacing: var(--typography-body-large-letter-spacing) !important;
|
|
323
|
-
margin-block-end: var(--spacing-200);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.text-body-large-emphasized {
|
|
327
|
-
font-family: var(--typography-body-large-emphasized-font-family) !important;
|
|
328
|
-
font-size: var(--typography-body-large-emphasized-font-size) !important;
|
|
329
|
-
font-weight: var(--typography-body-large-emphasized-font-weight) !important;
|
|
330
|
-
line-height: var(--typography-body-large-emphasized-line-height) !important;
|
|
331
|
-
letter-spacing: var(--typography-body-large-emphasized-letter-spacing) !important;
|
|
332
|
-
margin-block-end: var(--spacing-200);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.text-body-medium {
|
|
336
|
-
font-family: var(--typography-body-medium-font-family) !important;
|
|
337
|
-
font-size: var(--typography-body-medium-font-size) !important;
|
|
338
|
-
font-weight: var(--typography-body-medium-font-weight) !important;
|
|
339
|
-
line-height: var(--typography-body-medium-line-height) !important;
|
|
340
|
-
letter-spacing: var(--typography-body-medium-letter-spacing) !important;
|
|
341
|
-
margin-block-end: var(--spacing-200);
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.text-body-medium-emphasized {
|
|
345
|
-
font-family: var(--typography-body-medium-emphasized-font-family) !important;
|
|
346
|
-
font-size: var(--typography-body-medium-emphasized-font-size) !important;
|
|
347
|
-
font-weight: var(--typography-body-medium-emphasized-font-weight) !important;
|
|
348
|
-
line-height: var(--typography-body-medium-emphasized-line-height) !important;
|
|
349
|
-
letter-spacing: var(--typography-body-medium-emphasized-letter-spacing) !important;
|
|
350
|
-
margin-block-end: var(--spacing-200);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.text-body-small {
|
|
354
|
-
font-family: var(--typography-body-small-font-family) !important;
|
|
355
|
-
font-size: var(--typography-body-small-font-size) !important;
|
|
356
|
-
font-weight: var(--typography-body-small-font-weight) !important;
|
|
357
|
-
line-height: var(--typography-body-small-line-height) !important;
|
|
358
|
-
letter-spacing: var(--typography-body-small-letter-spacing) !important;
|
|
359
|
-
margin-block-end: var(--spacing-200);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.text-body-small-emphasized {
|
|
363
|
-
font-family: var(--typography-body-small-emphasized-font-family) !important;
|
|
364
|
-
font-size: var(--typography-body-small-emphasized-font-size) !important;
|
|
365
|
-
font-weight: var(--typography-body-small-emphasized-font-weight) !important;
|
|
366
|
-
line-height: var(--typography-body-small-emphasized-line-height) !important;
|
|
367
|
-
letter-spacing: var(--typography-body-small-emphasized-letter-spacing) !important;
|
|
368
|
-
margin-block-end: var(--spacing-200);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.text-code {
|
|
372
|
-
font-family: var(--typography-code-medium-font-family) !important;
|
|
373
|
-
font-size: var(--typography-code-medium-font-size) !important;
|
|
374
|
-
font-weight: var(--typography-code-medium-font-weight) !important;
|
|
375
|
-
line-height: var(--typography-code-medium-line-height) !important;
|
|
376
|
-
letter-spacing: var(--typography-code-medium-letter-spacing) !important;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.text-code-emphasized {
|
|
380
|
-
font-family: var(--typography-code-medium-emphasized-font-family) !important;
|
|
381
|
-
font-size: var(--typography-code-medium-emphasized-font-size) !important;
|
|
382
|
-
font-weight: var(--typography-code-medium-emphasized-font-weight) !important;
|
|
383
|
-
line-height: var(--typography-code-medium-emphasized-line-height) !important;
|
|
384
|
-
letter-spacing: var(--typography-code-medium-emphasized-letter-spacing) !important;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.text-code-large {
|
|
388
|
-
font-family: var(--typography-code-large-font-family) !important;
|
|
389
|
-
font-size: var(--typography-code-large-font-size) !important;
|
|
390
|
-
font-weight: var(--typography-code-large-font-weight) !important;
|
|
391
|
-
line-height: var(--typography-code-large-line-height) !important;
|
|
392
|
-
letter-spacing: var(--typography-code-large-letter-spacing) !important;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.text-code-large-emphasized {
|
|
396
|
-
font-family: var(--typography-code-large-emphasized-font-family) !important;
|
|
397
|
-
font-size: var(--typography-code-large-emphasized-font-size) !important;
|
|
398
|
-
font-weight: var(--typography-code-large-emphasized-font-weight) !important;
|
|
399
|
-
line-height: var(--typography-code-large-emphasized-line-height) !important;
|
|
400
|
-
letter-spacing: var(--typography-code-large-emphasized-letter-spacing) !important;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.text-code-medium {
|
|
404
|
-
font-family: var(--typography-code-medium-font-family) !important;
|
|
405
|
-
font-size: var(--typography-code-medium-font-size) !important;
|
|
406
|
-
font-weight: var(--typography-code-medium-font-weight) !important;
|
|
407
|
-
line-height: var(--typography-code-medium-line-height) !important;
|
|
408
|
-
letter-spacing: var(--typography-code-medium-letter-spacing) !important;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.text-code-medium-emphasized {
|
|
412
|
-
font-family: var(--typography-code-medium-emphasized-font-family) !important;
|
|
413
|
-
font-size: var(--typography-code-medium-emphasized-font-size) !important;
|
|
414
|
-
font-weight: var(--typography-code-medium-emphasized-font-weight) !important;
|
|
415
|
-
line-height: var(--typography-code-medium-emphasized-line-height) !important;
|
|
416
|
-
letter-spacing: var(--typography-code-medium-emphasized-letter-spacing) !important;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.text-code-small {
|
|
420
|
-
font-family: var(--typography-code-small-font-family) !important;
|
|
421
|
-
font-size: var(--typography-code-small-font-size) !important;
|
|
422
|
-
font-weight: var(--typography-code-small-font-weight) !important;
|
|
423
|
-
line-height: var(--typography-code-small-line-height) !important;
|
|
424
|
-
letter-spacing: var(--typography-code-small-letter-spacing) !important;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.text-code-small-emphasized {
|
|
428
|
-
font-family: var(--typography-code-small-emphasized-font-family) !important;
|
|
429
|
-
font-size: var(--typography-code-small-emphasized-font-size) !important;
|
|
430
|
-
font-weight: var(--typography-code-small-emphasized-font-weight) !important;
|
|
431
|
-
line-height: var(--typography-code-small-emphasized-line-height) !important;
|
|
432
|
-
letter-spacing: var(--typography-code-small-emphasized-letter-spacing) !important;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.text-label {
|
|
436
|
-
font-family: var(--typography-label-medium-font-family) !important;
|
|
437
|
-
font-size: var(--typography-label-medium-font-size) !important;
|
|
438
|
-
font-weight: var(--typography-label-medium-font-weight) !important;
|
|
439
|
-
line-height: var(--typography-label-medium-line-height) !important;
|
|
440
|
-
letter-spacing: var(--typography-label-medium-letter-spacing) !important;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.text-label-emphasized {
|
|
444
|
-
font-family: var(--typography-label-medium-emphasized-font-family) !important;
|
|
445
|
-
font-size: var(--typography-label-medium-emphasized-font-size) !important;
|
|
446
|
-
font-weight: var(--typography-label-medium-emphasized-font-weight) !important;
|
|
447
|
-
line-height: var(--typography-label-medium-emphasized-line-height) !important;
|
|
448
|
-
letter-spacing: var(--typography-label-medium-emphasized-letter-spacing) !important;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.text-label-large {
|
|
452
|
-
font-family: var(--typography-label-large-font-family) !important;
|
|
453
|
-
font-size: var(--typography-label-large-font-size) !important;
|
|
454
|
-
font-weight: var(--typography-label-large-font-weight) !important;
|
|
455
|
-
line-height: var(--typography-label-large-line-height) !important;
|
|
456
|
-
letter-spacing: var(--typography-label-large-letter-spacing) !important;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.text-label-large-emphasized {
|
|
460
|
-
font-family: var(--typography-label-large-emphasized-font-family) !important;
|
|
461
|
-
font-size: var(--typography-label-large-emphasized-font-size) !important;
|
|
462
|
-
font-weight: var(--typography-label-large-emphasized-font-weight) !important;
|
|
463
|
-
line-height: var(--typography-label-large-emphasized-line-height) !important;
|
|
464
|
-
letter-spacing: var(--typography-label-large-emphasized-letter-spacing) !important;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.text-label-medium {
|
|
468
|
-
font-family: var(--typography-label-medium-font-family) !important;
|
|
469
|
-
font-size: var(--typography-label-medium-font-size) !important;
|
|
470
|
-
font-weight: var(--typography-label-medium-font-weight) !important;
|
|
471
|
-
line-height: var(--typography-label-medium-line-height) !important;
|
|
472
|
-
letter-spacing: var(--typography-label-medium-letter-spacing) !important;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.text-label-medium-emphasized {
|
|
476
|
-
font-family: var(--typography-label-medium-emphasized-font-family) !important;
|
|
477
|
-
font-size: var(--typography-label-medium-emphasized-font-size) !important;
|
|
478
|
-
font-weight: var(--typography-label-medium-emphasized-font-weight) !important;
|
|
479
|
-
line-height: var(--typography-label-medium-emphasized-line-height) !important;
|
|
480
|
-
letter-spacing: var(--typography-label-medium-emphasized-letter-spacing) !important;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.text-label-small {
|
|
484
|
-
font-family: var(--typography-label-small-font-family) !important;
|
|
485
|
-
font-size: var(--typography-label-small-font-size) !important;
|
|
486
|
-
font-weight: var(--typography-label-small-font-weight) !important;
|
|
487
|
-
line-height: var(--typography-label-small-line-height) !important;
|
|
488
|
-
letter-spacing: var(--typography-label-small-letter-spacing) !important;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.text-label-small-emphasized {
|
|
492
|
-
font-family: var(--typography-label-small-emphasized-font-family) !important;
|
|
493
|
-
font-size: var(--typography-label-small-emphasized-font-size) !important;
|
|
494
|
-
font-weight: var(--typography-label-small-emphasized-font-weight) !important;
|
|
495
|
-
line-height: var(--typography-label-small-emphasized-line-height) !important;
|
|
496
|
-
letter-spacing: var(--typography-label-small-emphasized-letter-spacing) !important;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.text-title {
|
|
500
|
-
font-family: var(--typography-title-medium-font-family) !important;
|
|
501
|
-
font-size: var(--typography-title-medium-font-size) !important;
|
|
502
|
-
font-weight: var(--typography-title-medium-font-weight) !important;
|
|
503
|
-
line-height: var(--typography-title-medium-line-height) !important;
|
|
504
|
-
letter-spacing: var(--typography-title-medium-letter-spacing) !important;
|
|
505
|
-
margin-block-end: var(--spacing-400);
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
.text-title-emphasized {
|
|
509
|
-
font-family: var(--typography-title-medium-emphasized-font-family) !important;
|
|
510
|
-
font-size: var(--typography-title-medium-emphasized-font-size) !important;
|
|
511
|
-
font-weight: var(--typography-title-medium-emphasized-font-weight) !important;
|
|
512
|
-
line-height: var(--typography-title-medium-emphasized-line-height) !important;
|
|
513
|
-
letter-spacing: var(--typography-title-medium-emphasized-letter-spacing) !important;
|
|
514
|
-
margin-block-end: var(--spacing-400);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
.text-title-large {
|
|
518
|
-
font-family: var(--typography-title-large-font-family) !important;
|
|
519
|
-
font-size: var(--typography-title-large-font-size) !important;
|
|
520
|
-
font-weight: var(--typography-title-large-font-weight) !important;
|
|
521
|
-
line-height: var(--typography-title-large-line-height) !important;
|
|
522
|
-
letter-spacing: var(--typography-title-large-letter-spacing) !important;
|
|
523
|
-
margin-block-end: var(--spacing-400);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.text-title-large-emphasized {
|
|
527
|
-
font-family: var(--typography-title-large-emphasized-font-family) !important;
|
|
528
|
-
font-size: var(--typography-title-large-emphasized-font-size) !important;
|
|
529
|
-
font-weight: var(--typography-title-large-emphasized-font-weight) !important;
|
|
530
|
-
line-height: var(--typography-title-large-emphasized-line-height) !important;
|
|
531
|
-
letter-spacing: var(--typography-title-large-emphasized-letter-spacing) !important;
|
|
532
|
-
margin-block-end: var(--spacing-400);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
.text-title-medium {
|
|
536
|
-
font-family: var(--typography-title-medium-font-family) !important;
|
|
537
|
-
font-size: var(--typography-title-medium-font-size) !important;
|
|
538
|
-
font-weight: var(--typography-title-medium-font-weight) !important;
|
|
539
|
-
line-height: var(--typography-title-medium-line-height) !important;
|
|
540
|
-
letter-spacing: var(--typography-title-medium-letter-spacing) !important;
|
|
541
|
-
margin-block-end: var(--spacing-400);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.text-title-medium-emphasized {
|
|
545
|
-
font-family: var(--typography-title-medium-emphasized-font-family) !important;
|
|
546
|
-
font-size: var(--typography-title-medium-emphasized-font-size) !important;
|
|
547
|
-
font-weight: var(--typography-title-medium-emphasized-font-weight) !important;
|
|
548
|
-
line-height: var(--typography-title-medium-emphasized-line-height) !important;
|
|
549
|
-
letter-spacing: var(--typography-title-medium-emphasized-letter-spacing) !important;
|
|
550
|
-
margin-block-end: var(--spacing-400);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.text-title-small {
|
|
554
|
-
font-family: var(--typography-title-small-font-family) !important;
|
|
555
|
-
font-size: var(--typography-title-small-font-size) !important;
|
|
556
|
-
font-weight: var(--typography-title-small-font-weight) !important;
|
|
557
|
-
line-height: var(--typography-title-small-line-height) !important;
|
|
558
|
-
letter-spacing: var(--typography-title-small-letter-spacing) !important;
|
|
559
|
-
margin-block-end: var(--spacing-400);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
.text-title-small-emphasized {
|
|
563
|
-
font-family: var(--typography-title-small-emphasized-font-family) !important;
|
|
564
|
-
font-size: var(--typography-title-small-emphasized-font-size) !important;
|
|
565
|
-
font-weight: var(--typography-title-small-emphasized-font-weight) !important;
|
|
566
|
-
line-height: var(--typography-title-small-emphasized-line-height) !important;
|
|
567
|
-
letter-spacing: var(--typography-title-small-emphasized-letter-spacing) !important;
|
|
568
|
-
margin-block-end: var(--spacing-400);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.text-code-block {
|
|
572
|
-
font-family: var(--font-family-monospace);
|
|
573
|
-
background: var(--color-primary-container);
|
|
574
|
-
border-radius: var(--shape-corner-extra-small);
|
|
575
|
-
padding-inline: var(--spacing-050);
|
|
576
|
-
}`;
|
|
577
|
-
|
|
578
|
-
var css_248z = i`* {
|
|
579
|
-
box-sizing: border-box;
|
|
1042
|
+
const sheetCache = new Map();
|
|
1043
|
+
async function loadCSS(url, options = {}) {
|
|
1044
|
+
const { priority = "high", cache = "force-cache", media = "all", } = options;
|
|
1045
|
+
// Return cached sheet immediately
|
|
1046
|
+
if (sheetCache.has(url)) {
|
|
1047
|
+
const cached = sheetCache.get(url);
|
|
1048
|
+
if (!document.adoptedStyleSheets.includes(cached)) {
|
|
1049
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, cached];
|
|
1050
|
+
}
|
|
1051
|
+
return cached;
|
|
1052
|
+
}
|
|
1053
|
+
const response = await fetch(url, {
|
|
1054
|
+
cache,
|
|
1055
|
+
priority,
|
|
1056
|
+
});
|
|
1057
|
+
if (!response.ok) {
|
|
1058
|
+
throw new Error(`Failed to load CSS [${response.status}]: ${url}`);
|
|
1059
|
+
}
|
|
1060
|
+
const css = await response.text();
|
|
1061
|
+
const sheet = new CSSStyleSheet({ media });
|
|
1062
|
+
sheet.replaceSync(css);
|
|
1063
|
+
sheetCache.set(url, sheet);
|
|
1064
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
1065
|
+
return sheet;
|
|
580
1066
|
}
|
|
581
1067
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
1068
|
+
// Eager loaded
|
|
1069
|
+
const distDirectory = `${import.meta.url}/..`;
|
|
1070
|
+
await loadCSS(`${distDirectory}/assets/styles.css`);
|
|
1071
|
+
/*
|
|
1072
|
+
import tooltipStyles from './popover/tooltip.css-component.scss';
|
|
585
1073
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
line-height: var(--typography-body-small-line-height) !important;
|
|
592
|
-
letter-spacing: var(--typography-body-small-letter-spacing) !important;
|
|
593
|
-
max-width: 17.5rem;
|
|
594
|
-
padding-inline: var(--spacing-100);
|
|
595
|
-
padding-block: var(--spacing-050);
|
|
596
|
-
color: var(--color-inverse-on-surface);
|
|
597
|
-
background-color: var(--color-inverse-surface);
|
|
598
|
-
border-radius: var(--shape-corner-extra-small);
|
|
1074
|
+
function buildSheet(styleSheet: any) {
|
|
1075
|
+
const sheet = new CSSStyleSheet();
|
|
1076
|
+
// Add rules
|
|
1077
|
+
sheet.replaceSync(styleSheet.toString());
|
|
1078
|
+
return sheet;
|
|
599
1079
|
}
|
|
600
1080
|
|
|
601
|
-
.tooltip-link {
|
|
602
|
-
border-bottom: 1px dashed var(--color-on-surface);
|
|
603
|
-
}`;
|
|
604
|
-
|
|
605
|
-
// Eager loaded
|
|
606
|
-
function buildSheet(styleSheet) {
|
|
607
|
-
const sheet = new CSSStyleSheet();
|
|
608
|
-
// Add rules
|
|
609
|
-
sheet.replaceSync(styleSheet.toString());
|
|
610
|
-
return sheet;
|
|
611
|
-
}
|
|
612
1081
|
const styleSheets = [
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
1082
|
+
// buildSheet(cssComponentsStyleSheet),
|
|
1083
|
+
// buildSheet(linkStyles),
|
|
1084
|
+
// buildSheet(textStylesheet),
|
|
1085
|
+
buildSheet(tooltipStyles),
|
|
617
1086
|
];
|
|
1087
|
+
|
|
618
1088
|
document.adoptedStyleSheets = styleSheets;
|
|
1089
|
+
*/
|
|
619
1090
|
const loaderConfig = {
|
|
620
1091
|
components: {
|
|
621
1092
|
'base-icon': {
|
|
@@ -647,7 +1118,7 @@ const loaderConfig = {
|
|
|
647
1118
|
CustomElementClass: Elevation,
|
|
648
1119
|
},
|
|
649
1120
|
'base-clock': {
|
|
650
|
-
importPath:
|
|
1121
|
+
importPath: `${distDirectory}/clock.js`,
|
|
651
1122
|
},
|
|
652
1123
|
'base-ripple': {
|
|
653
1124
|
CustomElementClass: Ripple,
|
|
@@ -698,10 +1169,10 @@ const loaderConfig = {
|
|
|
698
1169
|
CustomElementClass: Tooltip,
|
|
699
1170
|
},
|
|
700
1171
|
'number-counter': {
|
|
701
|
-
importPath:
|
|
1172
|
+
importPath: `${distDirectory}/number-counter.js`,
|
|
702
1173
|
},
|
|
703
1174
|
'code-highlighter': {
|
|
704
|
-
importPath:
|
|
1175
|
+
importPath: `${distDirectory}/code-highlighter.js`,
|
|
705
1176
|
},
|
|
706
1177
|
'base-breadcrumb': {
|
|
707
1178
|
CustomElementClass: Breadcrumb,
|