@gov-design-system-ce/components 4.1.3-BETA-7 → 4.1.3-BETA-9
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/cjs/gov-flex_3.cjs.entry.js +5 -1
- package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +2 -0
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/utils/icon.utils.js +2 -0
- package/dist/collection/utils/icon.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/{p-f4ca9c18.js → p-792c5352.js} +2 -2
- package/dist/components/{p-2237d3a5.js → p-8e8a3300.js} +2 -2
- package/dist/components/{p-7d808445.js → p-92406c6d.js} +2 -2
- package/dist/components/{p-9992e831.js → p-939638b2.js} +2 -2
- package/dist/components/p-95bd5f39.js +2 -0
- package/dist/components/p-95bd5f39.js.map +1 -0
- package/dist/components/{p-c67a25ad.js → p-ba61e648.js} +2 -2
- package/dist/components/{p-94002301.js → p-f9161803.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/p-054aa25e.entry.js +2 -0
- package/dist/core/p-054aa25e.entry.js.map +1 -0
- package/dist/esm/gov-flex_3.entry.js +5 -1
- package/dist/esm/gov-flex_3.entry.js.map +1 -1
- package/dist/hydrate/index.js +5 -1
- package/dist/hydrate/index.mjs +5 -1
- package/package.json +1 -1
- package/dist/components/p-88b2667e.js +0 -2
- package/dist/components/p-88b2667e.js.map +0 -1
- package/dist/core/p-f14252eb.entry.js +0 -2
- package/dist/core/p-f14252eb.entry.js.map +0 -1
- /package/dist/components/{p-f4ca9c18.js.map → p-792c5352.js.map} +0 -0
- /package/dist/components/{p-2237d3a5.js.map → p-8e8a3300.js.map} +0 -0
- /package/dist/components/{p-7d808445.js.map → p-92406c6d.js.map} +0 -0
- /package/dist/components/{p-9992e831.js.map → p-939638b2.js.map} +0 -0
- /package/dist/components/{p-c67a25ad.js.map → p-ba61e648.js.map} +0 -0
- /package/dist/components/{p-94002301.js.map → p-f9161803.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["FlexClass","root","GovFlex","constructor","hostRef","this","h","govHost","host","render","Host","key","class","classes","pick","Sizes","IconColors","Colors","Types","IconClass","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","console","log","iconsPath","fetch","then","resp","status","text","Error","setCookie","value","days","isWindow","expires","date","Date","setTime","getTime","toUTCString","document","cookie","encodeURIComponent","getCookie","nameEQ","cookies","split","i","length","trim","decodeURIComponent","substring","isValidSVG","svgContent","parser","DOMParser","doc","parseFromString","parseError","querySelector","svgElement","documentElement","tagName","toLowerCase","error","GovIcon","validateSize","newValue","validateProp","validateColor","watchError","loadIconPathData","visible","Build","isBrowser","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","size","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","innerHTML","e","ThemeSwitchSizes","ThemeSwitchClass","indicator","iconLight","iconDark","ATTRIBUTE_THEME_NAME","ThemeList","GovThemeSwitch","setThemeState","state","theme","govChange","emit","component","ref","auto","watchTheme","htmlElement","setAttribute","classList","remove","Object","keys","add","storageValue","isSystemPrefersColorDark","matchMedia","matches","initDefaultState","options","currentState","htmlState","getAttribute","includes","isDark","dark","light","onClick","ariaLabelDark","ariaLabelLight","displayLabel","labelDark","labelLight"],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx","../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/helpers/Dom/document.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx","../../../packages/core/src/components/gov-theme-switch/constants.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.types.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.tsx"],"sourcesContent":["import {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const FlexSizes = Sizes\nexport type FlexSizesType = `${ValueOf<typeof FlexSizes>}`\n\nexport const FlexClass = {\n\troot: 'gov-flex',\n}\n\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FlexClass, FlexSizesType} from './constants'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-flex',\n})\nexport class GovFlex {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\n\t/**\n\t * Controls the flex direction of the container.\n\t */\n\t@Prop() direction: 'row' | 'row-reverse' | 'column' | 'column-reverse' = 'row';\n\n\t/**\n\t * Defines how the browser distributes space between and around content items along the main axis.\n\t */\n\t@Prop({\n\t\tattribute: 'justify-content',\n\t\treflect: true\n\t}) justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n\n\t/**\n\t * Aligns flex items along the cross axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-items',\n\t\treflect: true\n\t}) alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';\n\n\t/**\n\t * Controls whether the flex container is a single-line or multi-line flex container.\n\t */\n\t@Prop({reflect: true}) wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';\n\n\t/**\n\t * Aligns the flex container's lines within when there is extra space in the cross-axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-content',\n\t\treflect: true\n\t}) alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';\n\n\t/**\n\t * Sets the alignment of the flex container’s children along the flex container’s cross axis, overriding the `align-items` property for individual flex items.\n\t */\n\t@Prop({\n\t\tattribute: 'align-self',\n\t\treflect: true\n\t}) alignSelf?: 'auto' | 'normal' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch' | 'anchor-center';\n\n\t/**\n\t * The gap property creates consistent spacing between flex items in the container.\n\t */\n\t@Prop({\n\t\tattribute: 'gap',\n\t\treflect: true\n\t}) gap?: FlexSizesType;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FlexClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n","import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tconsole.log('cacheKey', cacheKey);\n\tconsole.log('iconCache[cacheKey]', iconCache, iconCache[cacheKey]);\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tconsole.log('requestCache[cacheKey]', requestCache, requestCache[cacheKey]);\n\n\tif (!requestCache[cacheKey]) {\n\t\tconsole.log('iconUrl(iconsPath(), name, type)', iconUrl(iconsPath(), name, type));\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport const isValidSVG = (svgContent: string): boolean => {\n\ttry {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(svgContent, \"image/svg+xml\");\n\t\tconst parseError = doc.querySelector(\"parsererror\");\n\t\tif (parseError) {\n\t\t\treturn false;\n\t\t}\n\t\tconst svgElement = doc.documentElement;\n\t\tif (svgElement.tagName.toLowerCase() !== \"svg\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t} catch (error) {\n\t\treturn false;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconColors, type IconColorType, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {isValidSVG} from \"../../helpers/Dom/document\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tconsole.log('GovIcon');\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"error\")\n\twatchError(newValue: string): void {\n\t\tconsole.log('error', newValue);\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tconsole.log('name, visible', name, visible);\n\t\tconsole.log('Build.isBrowser', Build.isBrowser);\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\tconsole.log('return');\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tconsole.log('connectedCallback icon', this.name);\n\t\tconsole.log('iconsLazyLoad()', iconsLazyLoad());\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tconsole.log('disconnectedCallback');\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tconsole.log('componentWillLoad');\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconsole.log('loadIcon -> name, type', name, type);\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isValidSVG(data)\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n","import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const ThemeSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ThemeSwitchSizesType = `${ValueOf<typeof ThemeSwitchSizes>}`\n\nexport const ThemeSwitchClass = {\n\troot: 'gov-theme-switch',\n\tindicator: 'gov-theme-switch__indicator',\n\ticonLight: 'gov-theme-switch__icon-light',\n\ticonDark: 'gov-theme-switch__icon-dark',\n}\n\nexport const ATTRIBUTE_THEME_NAME = 'data-theme'\n","import {GovBaseEvent} from \"../../types/event.types\";\n\nexport enum ThemeList {\n\tauto = 'auto',\n\tlight = 'light',\n\tdark = 'dark'\n}\n\nexport interface ThemeSwitchEvent extends GovBaseEvent {\n\tref: HTMLGovThemeSwitchElement;\n\tstate: ThemeList\n}\n\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\";\nimport {govHost} from \"../../helpers/Dom/template\";\nimport {ATTRIBUTE_THEME_NAME, ThemeSwitchClass, ThemeSwitchSizes, ThemeSwitchSizesType} from \"./constants\";\nimport {isWindow} from \"../../helpers/Dom/win\";\nimport {ThemeList, ThemeSwitchEvent} from \"./gov-theme-switch.types\";\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {getCookie, setCookie} from \"../../helpers/Dom/document\";\n\n@Component({\n\ttag: \"gov-theme-switch\",\n})\nexport class GovThemeSwitch {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovThemeSwitchElement\n\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: ThemeSwitchSizesType = \"m\"\n\t/**\n\t * Display switch label\n\t */\n\t@Prop({attribute: \"display-label\"}) readonly displayLabel? = false\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"aria-label-light\"}) readonly ariaLabelLight? = \"Přenout na tmavý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"aria-label-dark\"}) readonly ariaLabelDark? = \"Přepnout na světlý mód\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"label-light\"}) readonly labelLight? = \"Světlý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"label-dark\"}) readonly labelDark? = \"Tmavý mód\"\n\t/**\n\t * Called when the theme is changed by the user\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<ThemeSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ThemeSwitchSizes, newValue, ThemeSwitchClass.root)\n\t}\n\n\t@Watch(\"theme\")\n\twatchTheme(newValue: ThemeList): void {\n\t\tthis.htmlElement.setAttribute(ATTRIBUTE_THEME_NAME, newValue);\n\t\tthis.htmlElement.classList.remove(...Object.keys(ThemeList));\n\t\tthis.htmlElement.classList.add(newValue);\n\t\tsetCookie(ATTRIBUTE_THEME_NAME, newValue);\n\t}\n\n\t@State() theme: ThemeList = ThemeList.auto\n\n\tprivate get storageValue() {\n\t\treturn getCookie(ATTRIBUTE_THEME_NAME)\n\t}\n\n\tprivate get htmlElement(): HTMLElement {\n\t\treturn document.documentElement\n\t}\n\n\tprivate get isSystemPrefersColorDark(): boolean {\n\t\treturn isWindow && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.initDefaultState()\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate initDefaultState() {\n\t\tconst options = Object.keys(ThemeList);\n\t\tlet currentState = this.storageValue;\n\t\tconst htmlState = this.htmlElement.getAttribute(ATTRIBUTE_THEME_NAME)\n\n\t\tif (currentState && options.includes(currentState)) {\n\t\t\tthis.theme = currentState as ThemeList;\n\t\t} else if (htmlState && options.includes(htmlState)) {\n\t\t\tthis.theme = htmlState as ThemeList;\n\t\t} else {\n\t\t\tthis.theme = ThemeList.auto;\n\t\t}\n\t}\n\n\tprivate setThemeState = (state: ThemeList) => {\n\t\tthis.theme = state;\n\n\t\tthis.govChange.emit({\n\t\t\tcomponent: ThemeSwitchClass.root,\n\t\t\tstate: this.theme,\n\t\t\tref: this.host\n\t\t})\n\t}\n\n\trender() {\n\t\tlet isDark = this.theme === ThemeList.dark;\n\t\tif (this.theme === ThemeList.auto) {\n\t\t\tisDark = this.isSystemPrefersColorDark;\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ThemeSwitchClass.root)}\n\t\t\t\t theme={isDark ? ThemeList.dark : ThemeList.light}\n\t\t\t\t size={this.size}>\n\t\t\t\t<button onClick={() => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark)}\n\t\t\t\t\t\taria-current={this.theme}\n\t\t\t\t\t\taria-label={isDark ? this.ariaLabelDark : this.ariaLabelLight}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<span class={ThemeSwitchClass.indicator}>\n\t\t\t\t\t\t\t{ThemeList.light && <gov-icon name=\"sun\" class={ThemeSwitchClass.iconLight} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{ThemeList.dark && <gov-icon name=\"moon\" class={ThemeSwitchClass.iconDark} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{this.displayLabel && (isDark ? this.labelDark : this.labelLight)}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"oTAMO,MAAMA,EAAY,CACxBC,KAAM,Y,MCCMC,EAAO,MAGnB,WAAAC,CAAAC,G,yBASyE,M,oJARxEC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAuDvB,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOP,KAAKC,EAAEO,QAAQb,EAAUC,OACrCK,EAAA,QAAAK,IAAA,6C,6BCjEqBG,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,MAAO,OAAQ,OAAQ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AKhB,GAC5B,IAAIwB,EAAe1I,KAAKoI,aACxB,MAAMO,EAAY3I,KAAK6H,YAAYe,aAAa3B,GAEhD,GAAIyB,GAAgBD,EAAQI,SAASH,GAAe,CACnD1I,KAAKsH,MAAQoB,C,MACP,GAAIC,GAAaF,EAAQI,SAASF,GAAY,CACpD3I,KAAKsH,MAAQqB,C,KACP,CACN3I,KAAKsH,MAAQJ,EAAUS,I,EAczB,MAAAvH,GACC,IAAI0I,EAAS9I,KAAKsH,QAAUJ,EAAU6B,KACtC,GAAI/I,KAAKsH,QAAUJ,EAAUS,KAAM,CAClCmB,EAAS9I,KAAKqI,wB,CAEf,OACCpI,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOP,KAAKC,EAAEO,QAAQqG,EAAiBjH,MAC1C0H,MAAOwB,EAAS5B,EAAU6B,KAAO7B,EAAU8B,MAC3CnD,KAAM7F,KAAK6F,MACb5F,EAAA,UAAAK,IAAA,2CAAQ2I,QAAS,IAAMjJ,KAAKoH,cAAc0B,EAAS5B,EAAU8B,MAAQ9B,EAAU6B,MAAK,eACpE/I,KAAKsH,MAAK,aACZwB,EAAS9I,KAAKkJ,cAAgBlJ,KAAKmJ,gBAChDlJ,EAAA,QAAAK,IAAA,4CACCL,EAAA,QAAAK,IAAA,2CAAMC,MAAOsG,EAAiBC,WAC5BI,EAAU8B,OAAS/I,EAAA,YAAAK,IAAA,2CAAUkB,KAAK,MAAMjB,MAAOsG,EAAiBE,UAAWtF,KAAK,eAChFyF,EAAU6B,MAAQ9I,EAAA,YAAAK,IAAA,2CAAUkB,KAAK,OAAOjB,MAAOsG,EAAiBG,SAAUvF,KAAK,gBAEhFzB,KAAKoJ,eAAiBN,EAAS9I,KAAKqJ,UAAYrJ,KAAKsJ,c","ignoreList":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|