q2-tecton-elements 1.66.0 → 1.66.2
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/bundle-report.json +469 -468
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +2 -2
- package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.entry.cjs.js.map +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +3 -3
- package/dist/cjs/q2-tab-container.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tab-container.entry.cjs.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +3 -3
- package/dist/collection/components/q2-data-table/q2-data-table.js +12 -12
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
- package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.js +3 -3
- package/dist/collection/components/q2-grid/q2-grid.js +30 -30
- package/dist/collection/components/q2-grid-area/q2-grid-area.js +42 -42
- package/dist/collection/components/q2-input/q2-input.js +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +5 -5
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +4 -4
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +3 -3
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/components/q2-checkbox2.js +1 -1
- package/dist/components/q2-checkbox2.js.map +1 -1
- package/dist/components/q2-editable-field.js +2 -2
- package/dist/components/q2-editable-field.js.map +1 -1
- package/dist/components/q2-tab-container.js +3 -3
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tag.js +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +2 -2
- package/dist/esm/q2-editable-field.entry.js.map +1 -1
- package/dist/esm/q2-tab-container.entry.js +3 -3
- package/dist/esm/q2-tab-container.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-checkbox.entry.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +2 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tab-container.entry.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-tab-container.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tag.entry.js +12 -12
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
- package/package.json +72 -70
- /package/dist/types/{Users/kvanhouten/Documents/Work → builds/q2e/development/tecton}/tecton/packages/q2-tecton-elements/.stencil/jest.e2e-coverage.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work → builds/q2e/development/tecton}/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work → builds/q2e/development/tecton}/tecton/packages/q2-tecton-elements/.stencil/scripts/docs-generator/index.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work → builds/q2e/development/tecton}/tecton/packages/q2-tecton-elements/.stencil/scripts/docs-generator/markdown-generator.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work → builds/q2e/development/tecton}/tecton/packages/q2-tecton-elements/.stencil/scripts/docs-generator/tag-handlers.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work → builds/q2e/development/tecton}/tecton/packages/q2-tecton-elements/.stencil/scripts/docs-generator/types.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-tab-container.js","sourceRoot":"","sources":["../../../../src/components/q2-tab-container/q2-tab-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,KAAK,EACL,MAAM,EACN,KAAK,EACL,CAAC,EACD,QAAQ,EACR,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAWrE;;;;GAIG;AAEH,MAAM,OAAO,cAAc;IAD3B;QAEI,yBAAyB;QAEzB,SAAI,GAAW,UAAU,EAAE,CAAC;QAC5B,gBAAW,GAAY,KAAK,CAAC;QAC7B,iBAAY,GAAW,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAIhD,yBAAoB,GAAmB,EAAE,CAAC;QAQ1C,aAAa;QACb,2BAA2B;QAG3B,YAAO,GAAY,KAAK,CAAC;QAGzB,aAAQ,GAAY,KAAK,CAAC;QAG1B,kBAAa,GAAY,KAAK,CAAC;QAG/B,mBAAc,GAAY,KAAK,CAAC;QAGhC,oBAAe,GAAY,KAAK,CAAC;QA4BjC,oHAAoH;QAEpH,YAAO,GAAY,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,CACN,CACF,CACd;gBAED,2DACI,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EAClC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EACvC,IAAI,EAAC,SAAS,IAEb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CACzD,CACH;YACN,4DAAK,KAAK,EAAC,aAAa;gBACpB,6DAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,GAAI,CAC/C,CACC,CACd,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n ComponentInterface,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Listen,\n Watch,\n h,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, loc, overrideFocus, isEventFromElement } from 'src/utils';\nimport mirrorEmit from '@/utils/mirror-emit';\nimport { JSX } from '../../components';\nimport { Q2Badge } from '../q2-badge/q2-badge';\nimport { filterChildren, hasValidChildren } from '@/utils/component';\n\ntype TabPane = {\n label: string;\n value: string;\n badgeCount: number;\n badgeDescription: string;\n badgeTheme: Q2Badge['theme'];\n badgeStatus: Q2Badge['status'];\n};\n\n/**\n * @name Tab Container\n * @category Display\n * @summary Use for switching between multiple views within the same context.\n */\n@Component({ tag: 'q2-tab-container', shadow: true, styleUrl: 'q2-tab-container.scss' })\nexport class Q2TabContainer implements ComponentInterface {\n // #region Own Properties\n\n guid: number = createGuid();\n hasValidTab: boolean = false;\n lastScrolled: number = new Date(null).getTime();\n listElement: HTMLUListElement;\n mutationObserver: MutationObserver;\n resizeObserver: ResizeObserver;\n scheduledAfterRender: (() => void)[] = [];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n hasLeft: boolean = false;\n\n @State()\n hasRight: boolean = false;\n\n @State()\n scrollEnabled: boolean = false;\n\n @State()\n showScrollLeft: boolean = false;\n\n @State()\n showScrollRight: boolean = false;\n\n @State()\n tabs: TabPane[];\n\n // #endregion\n // #region Public Property API\n\n /**\n * Controls which variables are used to color the tab controls.\n *\n * - `undefined` (default)\n * - Uses `--t-tab-active` and `--t-tab-inactive`.\n * - `alt`\n * - Uses `--t-tab-alt-active` and `--t-tab-alt-inactive`.\n * - The default fallback for these variables is `inherit`.\n */\n @Prop({ reflect: true })\n color: 'alt' | undefined;\n\n /**\n * Used to establish a relationship between `q2-tab-container` and its associated tab panes.\n * @warning\n * The element can fail if this property is not set. Nested tab containers without the `name` property will not render correctly.\n */\n @Prop({ reflect: true })\n name: string;\n\n /** Controls visibility of tab list in a print view. Tab content will still be visible even if `noPrint` is true. */\n @Prop({ reflect: true })\n noPrint: boolean = false;\n\n /** Determines the font size of the tab controls. */\n @Prop({ reflect: true })\n type: 'main' | 'section';\n\n /** Corresponds to the value of the selected tab pane. */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the selected tab changes.\n * @legacyEvent\n * @deprecated Use 'tctChange' instead\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n /**\n * Emitted when the component has finished rendering.\n * @private\n */\n @Event()\n settled: EventEmitter<undefined>;\n\n /**\n * Emitted when the selected tab changes.\n * @legacyEvent\n */\n @Event()\n tctChange: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n if (!hasValidChildren(this.hostElement, 'q2-tab-pane')) {\n filterChildren(this.hostElement, 'q2-tab-pane');\n }\n const observer = new MutationObserver(() => this.updateTabs());\n observer.observe(this.hostElement, { childList: true, attributes: true });\n this.mutationObserver = observer;\n this.resizeObserver = new ResizeObserver(() => this.checkScrollState());\n this.updateTabs();\n }\n\n componentDidLoad() {\n this.resizeObserver?.observe(this.listElement);\n this.checkScrollState();\n overrideFocus(this.hostElement);\n this.scheduledAfterRender.push(() => this.determineTabMove());\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n this.settled.emit();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('badge')\n onBadge() {\n this.setTabs();\n }\n\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const index = this.tabs.findIndex(el => el.value === this.selectedTabValue);\n this.moveToTab(index, true);\n }\n\n @Listen('resize', { target: 'window' })\n onResize() {\n this.checkScrollState();\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * A method to select a tab pane corresponding with the value.\n *\n * @testOnly\n */\n @Method()\n async selectTab(value: string) {\n const paneButton = this.hostElement.shadowRoot.querySelector(`[test-id=\"tabLink\"][data-value=\"${value}\"]`);\n (paneButton as HTMLButtonElement)?.click();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('name')\n nameObserver() {\n this.updateTabs();\n }\n\n @Watch('value')\n valueObserver() {\n this.updateTabs();\n this.scheduledAfterRender.push(this.resizeIframe);\n const index = this.tabs.findIndex(el => el.value === this.value);\n if (index > -1) {\n this.scheduledAfterRender.push(() => this.moveToTab(index, false));\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get selectedTabValue() {\n return this.value || '';\n }\n\n get tabList() {\n return this.hostElement.shadowRoot.querySelector('.tab-list');\n }\n\n get tabPanes() {\n const tabPanes = this.hostElement.querySelectorAll<HTMLQ2TabPaneElement | HTMLTectonTabPaneElement>(\n 'q2-tab-pane, tecton-tab-pane'\n );\n\n if (tabPanes.length === 0) {\n return [];\n }\n\n return Array.from(tabPanes).filter(pane => pane.name === this.name);\n }\n\n checkScrollState = () => {\n if (!this.listElement) return;\n const { scrollLeft, scrollWidth, clientWidth } = this.listElement;\n this.scrollEnabled = scrollWidth > clientWidth;\n this.showScrollLeft = scrollLeft > 0;\n this.showScrollRight = scrollWidth > Math.ceil(scrollLeft) + clientWidth;\n };\n\n determineTabMove() {\n if (!this.tabs) return;\n const index = this.tabs.findIndex(el => el.value === this.value);\n if (index === -1) return;\n this.moveToTab(index, false);\n }\n\n moveToAdjacentTab = (value: string, direction: 'next' | 'prev' | 'first' | 'last') => {\n const index = this.tabs.map(({ value }) => value).indexOf(value);\n\n let newIndex;\n switch (direction) {\n case 'next':\n newIndex = Math.min(index + 1, this.tabs.length - 1);\n break;\n\n case 'prev':\n newIndex = Math.max(index - 1, 0);\n break;\n\n case 'first':\n newIndex = 0;\n break;\n\n case 'last':\n newIndex = this.tabs.length - 1;\n break;\n }\n\n if (index === newIndex) return;\n\n this.moveToTab(newIndex, true);\n };\n\n moveToTab = (index: number, shouldFocus: boolean = true) => {\n const focusedValue = this.tabs[index].value;\n const focusedTab = this.listElement.querySelector<HTMLButtonElement>(`[data-value=\"${focusedValue}\"]`);\n if (shouldFocus) {\n focusedTab.focus({ preventScroll: true });\n }\n\n const left = focusedTab.offsetLeft - this.listElement.clientWidth / 2;\n this.listElement.scrollTo({\n left,\n behavior: 'smooth',\n });\n };\n\n onScrollBtnClick = (direction?: 'left' | 'right') => {\n const { scrollLeft, scrollWidth, clientWidth } = this.listElement;\n const halfWidth = Math.floor(clientWidth / 2);\n let scrollAmount: number = 0;\n if (direction === 'left') {\n scrollAmount = -Math.min(halfWidth, Math.abs(scrollLeft));\n } else {\n scrollAmount = Math.min(halfWidth, Math.abs(scrollWidth - scrollLeft - clientWidth));\n }\n this.listElement.scrollBy({ left: scrollAmount, behavior: 'smooth' });\n };\n\n onSlotChange = () => {\n this.checkScrollState();\n };\n\n onTabClick = (event: MouseEvent) => {\n const targetValue = ((event.target as HTMLButtonElement).closest('button[role=\"tab\"]') as HTMLButtonElement)\n .dataset.value;\n const isAlreadySelected = this.value === targetValue;\n if (isAlreadySelected) return;\n\n mirrorEmit(this, ['change', 'tctChange'], {\n value: targetValue,\n });\n };\n\n onTabKeyDown = (event: KeyboardEvent) => {\n const value = (event.target as HTMLElement).dataset.value;\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'next');\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'prev');\n break;\n\n case 'Home':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'first');\n break;\n\n case 'End':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'last');\n break;\n\n case 'Space':\n case 'Enter':\n event.preventDefault();\n mirrorEmit(this, ['change', 'tctChange'], { value });\n break;\n }\n };\n\n resizeIframe() {\n return window.TectonElements?.resizeIframe?.();\n }\n\n setTabs = () => {\n this.tabs = this.tabPanes.map(({ label, value, badgeCount, badgeDescription, badgeTheme, badgeStatus }) => ({\n label: (label && loc(label)) || '',\n value,\n badgeCount,\n badgeDescription,\n badgeTheme,\n badgeStatus,\n }));\n };\n\n updateTabPaneProps = () => {\n this.tabPanes.forEach((tab, index) => {\n tab.selected = tab.value === this.selectedTabValue;\n tab.guid = this.guid;\n tab.index = index;\n });\n };\n\n updateTabs = () => {\n const validTabPreUpdate = this.hasValidTab;\n this.updateTabPaneProps();\n this.setTabs();\n // Check if we now have a valid tab\n this.hasValidTab = this.tabs.some(tab => tab.value === this.value);\n // Only move if we didn't have a valid tab before but do now\n if (!validTabPreUpdate && this.hasValidTab) {\n this.scheduledAfterRender.push(() => this.determineTabMove());\n }\n };\n\n // #endregion\n // #region Render Methods\n\n renderTab(tab: TabPane, index: number): JSX.IntrinsicElements {\n const { label, value } = tab;\n const isSelected = this.selectedTabValue === value;\n return (\n <li role=\"presentation\">\n <button\n id={`tab-${this.guid}-${index}`}\n data-value={value}\n test-id=\"tabLink\"\n tabIndex={isSelected ? 0 : -1}\n role=\"tab\"\n aria-selected={`${isSelected}`}\n onClick={this.onTabClick}\n onKeyDown={this.onTabKeyDown}\n >\n {tab.badgeCount === undefined ? label : this.renderTabWithBadge(tab, isSelected)}\n </button>\n </li>\n );\n }\n\n renderTabWithBadge(tab: TabPane, isSelected: boolean): JSX.IntrinsicElements {\n let theme;\n if (!tab.badgeStatus && isSelected) theme = tab.badgeTheme || 'primary';\n let description;\n if (tab.badgeDescription) description = loc(tab.badgeDescription);\n else if (tab.badgeStatus) description = loc(`tecton.element.tab.pane.${tab.badgeStatus}`, [tab.badgeCount]);\n else description = loc('tecton.element.tab.pane.new');\n\n return (\n <div\n class=\"tab-pane-badge\"\n aria-label={`${tab.label}, ${tab.badgeCount} ${description}`}\n >\n {tab.label}\n <q2-badge\n value={tab.badgeCount}\n theme={theme}\n status={tab.badgeStatus}\n />\n </div>\n );\n }\n\n render() {\n return (\n <Fragment>\n <div class=\"tab-container\">\n {this.scrollEnabled && (\n <Fragment>\n <div\n class=\"gradient-left\"\n hidden={!this.showScrollLeft}\n ></div>\n <div\n class=\"gradient-right\"\n hidden={!this.showScrollRight}\n ></div>\n\n <q2-btn\n class=\"btn-left\"\n hidden={!this.showScrollLeft}\n onTctClick={() => this.onScrollBtnClick('left')}\n >\n <q2-icon\n type=\"chevron-left\"\n label=\"scroll left\"\n ></q2-icon>\n </q2-btn>\n\n <q2-btn\n class=\"btn-right\"\n hidden={!this.showScrollRight}\n onTctClick={() => this.onScrollBtnClick('right')}\n >\n <q2-icon\n type=\"chevron-right\"\n label=\"scroll right\"\n ></q2-icon>\n </q2-btn>\n </Fragment>\n )}\n\n <ul\n onScroll={this.checkScrollState}\n ref={el => (this.listElement = el)}\n class={this.noPrint ? 'no-print' : null}\n role=\"tablist\"\n >\n {this.tabs.map((tab, index) => this.renderTab(tab, index))}\n </ul>\n </div>\n <div class=\"tab-content\">\n <slot onSlotchange={() => this.onSlotChange()} />\n </div>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"q2-tab-container.js","sourceRoot":"","sources":["../../../../src/components/q2-tab-container/q2-tab-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,KAAK,EACL,MAAM,EACN,KAAK,EACL,CAAC,EACD,QAAQ,EACR,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAWrE;;;;GAIG;AAEH,MAAM,OAAO,cAAc;IAD3B;QAEI,yBAAyB;QAEzB,SAAI,GAAW,UAAU,EAAE,CAAC;QAC5B,gBAAW,GAAY,KAAK,CAAC;QAC7B,iBAAY,GAAW,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAIhD,yBAAoB,GAAmB,EAAE,CAAC;QAQ1C,aAAa;QACb,2BAA2B;QAG3B,YAAO,GAAY,KAAK,CAAC;QAGzB,aAAQ,GAAY,KAAK,CAAC;QAG1B,kBAAa,GAAY,KAAK,CAAC;QAG/B,mBAAc,GAAY,KAAK,CAAC;QAGhC,oBAAe,GAAY,KAAK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AAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;wBAEhD,gEACI,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,cAAc,GACb,CACN,CACF,CACd;gBAED,2DACI,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EAClC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EACvC,IAAI,EAAC,SAAS,IAEb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CACzD,CACH;YACN,4DAAK,KAAK,EAAC,aAAa;gBACpB,6DAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,GAAI,CAC/C,CACC,CACd,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n ComponentInterface,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Listen,\n Watch,\n h,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, loc, overrideFocus, isEventFromElement } from 'src/utils';\nimport mirrorEmit from '@/utils/mirror-emit';\nimport { JSX } from '../../components';\nimport { Q2Badge } from '../q2-badge/q2-badge';\nimport { filterChildren, hasValidChildren } from '@/utils/component';\n\ntype TabPane = {\n label: string;\n value: string;\n badgeCount: number;\n badgeDescription: string;\n badgeTheme: Q2Badge['theme'];\n badgeStatus: Q2Badge['status'];\n};\n\n/**\n * @name Tab Container\n * @category Display\n * @summary Use for switching between multiple views within the same context.\n */\n@Component({ tag: 'q2-tab-container', shadow: true, styleUrl: 'q2-tab-container.scss' })\nexport class Q2TabContainer implements ComponentInterface {\n // #region Own Properties\n\n guid: number = createGuid();\n hasValidTab: boolean = false;\n lastScrolled: number = new Date(null).getTime();\n listElement: HTMLUListElement;\n mutationObserver: MutationObserver;\n resizeObserver: ResizeObserver;\n scheduledAfterRender: (() => void)[] = [];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n hasLeft: boolean = false;\n\n @State()\n hasRight: boolean = false;\n\n @State()\n scrollEnabled: boolean = false;\n\n @State()\n showScrollLeft: boolean = false;\n\n @State()\n showScrollRight: boolean = false;\n\n @State()\n tabs: TabPane[];\n\n // #endregion\n // #region Public Property API\n\n /**\n * Controls which variables are used to color the tab controls.\n *\n * - `undefined` (default)\n * - Uses `--t-tab-active` and `--t-tab-inactive`.\n * - `alt`\n * - Uses `--t-tab-alt-active` and `--t-tab-alt-inactive`.\n * - The default fallback for these variables is `inherit`.\n */\n @Prop({ reflect: true })\n color: 'alt' | undefined;\n\n /**\n * Used to establish a relationship between `q2-tab-container` and its associated tab panes.\n * @warning\n * The element can fail if this property is not set. Nested tab containers without the `name` property will not render correctly.\n */\n @Prop({ reflect: true })\n name: string;\n\n /** Controls visibility of tab list in a print view. Tab content will still be visible even if `noPrint` is true. */\n @Prop({ reflect: true })\n noPrint: boolean = false;\n\n /** Determines the font size of the tab controls. */\n @Prop({ reflect: true })\n type: 'main' | 'section';\n\n /** Corresponds to the value of the selected tab pane. */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the selected tab changes.\n * @legacyEvent\n * @deprecated Use 'tctChange' instead\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n /**\n * Emitted when the component has finished rendering.\n * @private\n */\n @Event()\n settled: EventEmitter<undefined>;\n\n /**\n * Emitted when the selected tab changes.\n * @legacyEvent\n */\n @Event()\n tctChange: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n if (!hasValidChildren(this.hostElement, ['q2-tab-pane', 'tecton-tab-pane'])) {\n filterChildren(this.hostElement, ['q2-tab-pane', 'tecton-tab-pane']);\n }\n const observer = new MutationObserver(() => this.updateTabs());\n observer.observe(this.hostElement, { childList: true, attributes: true });\n this.mutationObserver = observer;\n this.resizeObserver = new ResizeObserver(() => this.checkScrollState());\n this.updateTabs();\n }\n\n componentDidLoad() {\n this.resizeObserver?.observe(this.listElement);\n this.checkScrollState();\n overrideFocus(this.hostElement);\n this.scheduledAfterRender.push(() => this.determineTabMove());\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n this.settled.emit();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('badge')\n onBadge() {\n this.setTabs();\n }\n\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const index = this.tabs.findIndex(el => el.value === this.selectedTabValue);\n this.moveToTab(index, true);\n }\n\n @Listen('resize', { target: 'window' })\n onResize() {\n this.checkScrollState();\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * A method to select a tab pane corresponding with the value.\n *\n * @testOnly\n */\n @Method()\n async selectTab(value: string) {\n const paneButton = this.hostElement.shadowRoot.querySelector(`[test-id=\"tabLink\"][data-value=\"${value}\"]`);\n (paneButton as HTMLButtonElement)?.click();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('name')\n nameObserver() {\n this.updateTabs();\n }\n\n @Watch('value')\n valueObserver() {\n this.updateTabs();\n this.scheduledAfterRender.push(this.resizeIframe);\n const index = this.tabs.findIndex(el => el.value === this.value);\n if (index > -1) {\n this.scheduledAfterRender.push(() => this.moveToTab(index, false));\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get selectedTabValue() {\n return this.value || '';\n }\n\n get tabList() {\n return this.hostElement.shadowRoot.querySelector('.tab-list');\n }\n\n get tabPanes() {\n const tabPanes = this.hostElement.querySelectorAll<HTMLQ2TabPaneElement | HTMLTectonTabPaneElement>(\n 'q2-tab-pane, tecton-tab-pane'\n );\n\n if (tabPanes.length === 0) {\n return [];\n }\n\n return Array.from(tabPanes).filter(pane => pane.name === this.name);\n }\n\n checkScrollState = () => {\n if (!this.listElement) return;\n const { scrollLeft, scrollWidth, clientWidth } = this.listElement;\n this.scrollEnabled = scrollWidth > clientWidth;\n this.showScrollLeft = scrollLeft > 0;\n this.showScrollRight = scrollWidth > Math.ceil(scrollLeft) + clientWidth;\n };\n\n determineTabMove() {\n if (!this.tabs) return;\n const index = this.tabs.findIndex(el => el.value === this.value);\n if (index === -1) return;\n this.moveToTab(index, false);\n }\n\n moveToAdjacentTab = (value: string, direction: 'next' | 'prev' | 'first' | 'last') => {\n const index = this.tabs.map(({ value }) => value).indexOf(value);\n\n let newIndex;\n switch (direction) {\n case 'next':\n newIndex = Math.min(index + 1, this.tabs.length - 1);\n break;\n\n case 'prev':\n newIndex = Math.max(index - 1, 0);\n break;\n\n case 'first':\n newIndex = 0;\n break;\n\n case 'last':\n newIndex = this.tabs.length - 1;\n break;\n }\n\n if (index === newIndex) return;\n\n this.moveToTab(newIndex, true);\n };\n\n moveToTab = (index: number, shouldFocus: boolean = true) => {\n const focusedValue = this.tabs[index].value;\n const focusedTab = this.listElement.querySelector<HTMLButtonElement>(`[data-value=\"${focusedValue}\"]`);\n if (shouldFocus) {\n focusedTab.focus({ preventScroll: true });\n }\n\n const left = focusedTab.offsetLeft - this.listElement.clientWidth / 2;\n this.listElement.scrollTo({\n left,\n behavior: 'smooth',\n });\n };\n\n onScrollBtnClick = (direction?: 'left' | 'right') => {\n const { scrollLeft, scrollWidth, clientWidth } = this.listElement;\n const halfWidth = Math.floor(clientWidth / 2);\n let scrollAmount: number = 0;\n if (direction === 'left') {\n scrollAmount = -Math.min(halfWidth, Math.abs(scrollLeft));\n } else {\n scrollAmount = Math.min(halfWidth, Math.abs(scrollWidth - scrollLeft - clientWidth));\n }\n this.listElement.scrollBy({ left: scrollAmount, behavior: 'smooth' });\n };\n\n onSlotChange = () => {\n this.checkScrollState();\n };\n\n onTabClick = (event: MouseEvent) => {\n const targetValue = ((event.target as HTMLButtonElement).closest('button[role=\"tab\"]') as HTMLButtonElement)\n .dataset.value;\n const isAlreadySelected = this.value === targetValue;\n if (isAlreadySelected) return;\n\n mirrorEmit(this, ['change', 'tctChange'], {\n value: targetValue,\n });\n };\n\n onTabKeyDown = (event: KeyboardEvent) => {\n const value = (event.target as HTMLElement).dataset.value;\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'next');\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'prev');\n break;\n\n case 'Home':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'first');\n break;\n\n case 'End':\n event.preventDefault();\n this.moveToAdjacentTab(value, 'last');\n break;\n\n case 'Space':\n case 'Enter':\n event.preventDefault();\n mirrorEmit(this, ['change', 'tctChange'], { value });\n break;\n }\n };\n\n resizeIframe() {\n return window.TectonElements?.resizeIframe?.();\n }\n\n setTabs = () => {\n this.tabs = this.tabPanes.map(({ label, value, badgeCount, badgeDescription, badgeTheme, badgeStatus }) => ({\n label: (label && loc(label)) || '',\n value,\n badgeCount,\n badgeDescription,\n badgeTheme,\n badgeStatus,\n }));\n };\n\n updateTabPaneProps = () => {\n this.tabPanes.forEach((tab, index) => {\n tab.selected = tab.value === this.selectedTabValue;\n tab.guid = this.guid;\n tab.index = index;\n });\n };\n\n updateTabs = () => {\n const validTabPreUpdate = this.hasValidTab;\n this.updateTabPaneProps();\n this.setTabs();\n // Check if we now have a valid tab\n this.hasValidTab = this.tabs.some(tab => tab.value === this.value);\n // Only move if we didn't have a valid tab before but do now\n if (!validTabPreUpdate && this.hasValidTab) {\n this.scheduledAfterRender.push(() => this.determineTabMove());\n }\n };\n\n // #endregion\n // #region Render Methods\n\n renderTab(tab: TabPane, index: number): JSX.IntrinsicElements {\n const { label, value } = tab;\n const isSelected = this.selectedTabValue === value;\n return (\n <li role=\"presentation\">\n <button\n id={`tab-${this.guid}-${index}`}\n data-value={value}\n test-id=\"tabLink\"\n tabIndex={isSelected ? 0 : -1}\n role=\"tab\"\n aria-selected={`${isSelected}`}\n onClick={this.onTabClick}\n onKeyDown={this.onTabKeyDown}\n >\n {tab.badgeCount === undefined ? label : this.renderTabWithBadge(tab, isSelected)}\n </button>\n </li>\n );\n }\n\n renderTabWithBadge(tab: TabPane, isSelected: boolean): JSX.IntrinsicElements {\n let theme;\n if (!tab.badgeStatus && isSelected) theme = tab.badgeTheme || 'primary';\n let description;\n if (tab.badgeDescription) description = loc(tab.badgeDescription);\n else if (tab.badgeStatus) description = loc(`tecton.element.tab.pane.${tab.badgeStatus}`, [tab.badgeCount]);\n else description = loc('tecton.element.tab.pane.new');\n\n return (\n <div\n class=\"tab-pane-badge\"\n aria-label={`${tab.label}, ${tab.badgeCount} ${description}`}\n >\n {tab.label}\n <q2-badge\n value={tab.badgeCount}\n theme={theme}\n status={tab.badgeStatus}\n />\n </div>\n );\n }\n\n render() {\n return (\n <Fragment>\n <div class=\"tab-container\">\n {this.scrollEnabled && (\n <Fragment>\n <div\n class=\"gradient-left\"\n hidden={!this.showScrollLeft}\n ></div>\n <div\n class=\"gradient-right\"\n hidden={!this.showScrollRight}\n ></div>\n\n <q2-btn\n class=\"btn-left\"\n hidden={!this.showScrollLeft}\n onTctClick={() => this.onScrollBtnClick('left')}\n >\n <q2-icon\n type=\"chevron-left\"\n label=\"scroll left\"\n ></q2-icon>\n </q2-btn>\n\n <q2-btn\n class=\"btn-right\"\n hidden={!this.showScrollRight}\n onTctClick={() => this.onScrollBtnClick('right')}\n >\n <q2-icon\n type=\"chevron-right\"\n label=\"scroll right\"\n ></q2-icon>\n </q2-btn>\n </Fragment>\n )}\n\n <ul\n onScroll={this.checkScrollState}\n ref={el => (this.listElement = el)}\n class={this.noPrint ? 'no-print' : null}\n role=\"tablist\"\n >\n {this.tabs.map((tab, index) => this.renderTab(tab, index))}\n </ul>\n </div>\n <div class=\"tab-content\">\n <slot onSlotchange={() => this.onSlotChange()} />\n </div>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"]}
|
|
@@ -198,7 +198,7 @@ export class Q2Tag {
|
|
|
198
198
|
if (this.optionCount)
|
|
199
199
|
wrapperClassNames.push('has-options');
|
|
200
200
|
const shouldShowOptions = this.optionCount > 0;
|
|
201
|
-
return (h(Host, { key: '
|
|
201
|
+
return (h(Host, { key: '2ce592e9fc8db8d547cad71623270837ec0539d6' }, h("click-elsewhere", { key: 'b0a0ad314e84ccae1e06b197bc6fec8f1c333349', onChange: this.onClickElsewhere }, shouldShowOptions ? (h(Fragment, null, h("div", { class: "btn-wrapper", onClick: this.handleWrapperClick }, h("button", { class: "tag-wrapper", ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-expanded": open ? 'true' : 'false', "aria-describedby": "option-description", "aria-label": loc(this.label) }, h("div", { class: wrapperClassNames.join(' ') }, loc(this.label)), h("q2-icon", { type: "options" }))), this.renderHiddenElement())) : (h("div", { class: "tag-wrapper", onClick: e => e.stopPropagation() }, h("div", { class: wrapperClassNames.join(' ') }, h("slot", { name: "decorator" }), loc(this.label)))), shouldShowOptions && (h("q2-popover", { key: 'd67e1d087a62530ef3c013f070ae522531acd508', ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '6c2484d7110eeff81dfebef4c05dec99adffe935', id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", label: loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, h("slot", { key: 'db0c912240b4e2425c16bce894abb8be42ab67e2' })))))));
|
|
202
202
|
}
|
|
203
203
|
static get is() { return "q2-tag"; }
|
|
204
204
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,9 +49,9 @@ export class TectonTabPane {
|
|
|
49
49
|
// #endregion
|
|
50
50
|
// #region Render Methods
|
|
51
51
|
render() {
|
|
52
|
-
return (h("div", { key: '
|
|
52
|
+
return (h("div", { key: 'ace595f724970ba699a0ca62c27b393de637d9ea', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", { key: 'ee8fe1eda2ed564d8afbfcbc2a80b9aa93b68d93' }, h("slot", { key: '9da63a65b251f15c84508eccf89c5457b4412de4', name: "loading-wrapper" }), h("iframe", { key: 'dd0b576edfa8ce64d864ab0215d6c51995841d57', hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
|
|
53
53
|
return (h("input", { type: "hidden", value: element.value, name: element.key }));
|
|
54
|
-
}))) : (''))), h("div", { key: '
|
|
54
|
+
}))) : (''))), h("div", { key: '8a160438d70d8e488fa43815949cd4990dea2f5e', class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", { key: 'ac6d5a0e507221c1f2efa6b26506ebdb5eed7de1' }))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "tecton-tab-pane"; }
|
|
57
57
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@ import { c as createGuid, h as handleAriaLabel, o as overrideFocus, i as isEvent
|
|
|
3
3
|
import { m as mirrorEmit } from './mirror-emit.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './q2-icon2.js';
|
|
5
5
|
|
|
6
|
-
const q2CheckboxCss = "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-checkbox-padding:var(--tct-checkbox-padding, var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, 8px)) 0);display:block;position:relative;padding:var(--comp-checkbox-padding);--comp-default-checkbox-margin:var(--tct-checkbox-margin-top, var(--t-checkbox-margin-top, 0px)) 0 var(--tct-checkbox-margin-bottom, var(--t-checkbox-margin-bottom, 0px));margin:var(--tct-checkbox-margin, var(--comp-default-checkbox-margin))}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 24px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 38px));--comp-checkbox-toggle-track-fill:var(--tct-checkbox-toggle-track-fill, var(--tct-checkbox-toggle-track-color, transparent));--comp-checkbox-toggle-track-fill-active:var(--tct-checkbox-toggle-active-track-fill, var(--tct-checkbox-toggle-active-track-color, var(--tct-checkbox-toggle-active-color, var(--t-primary-l1, #7755af))));--comp-checkbox-toggle-track-fill-hover:var(--tct-checkbox-toggle-hover-track-fill, var(--tct-checkbox-toggle-hover-track-color, var(--comp-checkbox-toggle-track-fill)));--comp-checkbox-toggle-track-fill-error:var(--tct-checkbox-toggle-error-track-fill, var(--tct-checkbox-toggle-error-track-color, var(--comp-checkbox-toggle-track-fill)));--comp-checkbox-toggle-track-fill-error-hover:var(--tct-checkbox-toggle-error-hover-track-fill, var(--tct-checkbox-toggle-error-hover-track-color, var(--comp-checkbox-toggle-track-fill-error)));--comp-checkbox-toggle-track-fill-error-active:var(--tct-checkbox-toggle-error-active-track-fill, var(--tct-checkbox-toggle-error-active-track-color, var(--comp-checkbox-toggle-track-fill-error)));--comp-checkbox-toggle-error-color:var(--tct-checkbox-toggle-error-color, var(--comp-checkbox-error-color));--comp-checkbox-toggle-color:var(--tct-checkbox-toggle-color, var(--t-gray-8, #808080));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-fill-color:var(--tct-checkbox-checked-outer-fill-color, var(--t-primary, #040404));--comp-checkbox-checked-color:var(--tct-checkbox-checkmark-stroke-color, var(--tct-white, var(--app-white, #FFFFFF)));--comp-control-width:var(--comp-checkbox-size);--comp-checkbox-error-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));--comp-checkbox-bold-fallback-stroke-width:var(--tct-checkbox-bold-fallback-stroke-width, 0.7px);--comp-checkbox-stroke-width:var(--tct-checkbox-stroke-width, unset);--comp-checkbox-checked-stroke-width:var(--tct-checkbox-checked-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-hover-stroke-width:var(--tct-checkbox-hover-stroke-width, unset);--comp-checkbox-focused-stroke-width:var(--tct-checkbox-focused-stroke-width, unset);--comp-checkbox-checked-hover-stroke-width:var(--tct-checkbox-checked-hover-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-checked-focused-stroke-width:var(--tct-checkbox-checked-focused-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-description-stroke-width:var(--tct-checkbox-description-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-description-focused-stroke-width:var(--tct-checkbox-description-focused-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-description-hover-stroke-width:var(--tct-checkbox-description-hover-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([hide-label]:not([hide-label=false])) .container{grid-template-areas:\"svg\";grid-template-columns:var(--comp-control-width)}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label}:host([description]) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-description-stroke-width);text-stroke-width:var(--comp-checkbox-description-stroke-width)}:host([checked]:not([checked=false])) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-checked-stroke-width);text-stroke-width:var(--comp-checkbox-checked-stroke-width)}:host(:hover) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-hover-stroke-width);text-stroke-width:var(--comp-checkbox-hover-stroke-width)}:host(:focus-within) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-focused-stroke-width);text-stroke-width:var(--comp-checkbox-focused-stroke-width)}:host([description]:hover) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-description-hover-stroke-width);text-stroke-width:var(--comp-checkbox-description-hover-stroke-width)}:host([checked]:not([checked=false]):hover) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-checked-hover-stroke-width);text-stroke-width:var(--comp-checkbox-checked-hover-stroke-width)}:host([description]:focus-within) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-description-focused-stroke-width);text-stroke-width:var(--comp-checkbox-description-focused-stroke-width)}:host([checked]:not([checked=false]):focus-within) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-checked-focused-stroke-width);text-stroke-width:var(--comp-checkbox-checked-focused-stroke-width)}:host(:active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-active-stroke-width, unset)}:host([checked]:not([checked=false]):active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-active-stroke-width, unset)}:host([has-error]:not([has-error=false]):hover) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-error-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-hover-stroke-width, unset)}:host([has-error]:not([has-error=false]):focus-within) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-error-focused-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-focused-stroke-width, unset)}:host([has-error]:not([has-error=false]):active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-error-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-active-stroke-width, unset)}:host([checked]:not([checked=false])[has-error]:not([has-error=false]):hover) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-error-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-hover-stroke-width, unset)}:host([checked]:not([checked=false])[has-error]:not([has-error=false]):focus-within) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-error-focused-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-focused-stroke-width, unset)}:host([checked]:not([checked=false])[has-error]:not([has-error=false]):active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-error-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-active-stroke-width, unset)}.label-text label{line-height:var(--tct-checkbox-label-line-height, 24px)}.label-text label .label-content{display:inline;font-size:var(--tct-checkbox-label-font-size, inherit)}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}:host(:hover) .description-text{font-weight:var(--tct-checkbox-hover-description-font-weight, var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400)))}label{color:var(--tct-checkbox-label-color);cursor:pointer;hyphens:var(--tct-checkbox-label-hyphens, auto);word-break:var(--tct-checkbox-label-word-break, break-word);word-wrap:var(--tct-checkbox-label-word-wrap, break-word)}.checkbox-icon{width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 4px))));stroke:var(--comp-checkbox-outer-stroke-color);fill:var(--comp-checkbox-outer-fill-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));flex-shrink:0;box-shadow:var(--tct-checkbox-box-shadow)}.checkbox-icon rect{transition:fill var(--tct-checkbox-tween, var(--app-tween-2, 0.4s ease))}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon{stroke:var(--comp-checkbox-checked-fill-color, var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color))))}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--comp-checkbox-checked-fill-color)}:host([has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color));box-shadow:var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-box-shadow))}:host([has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color))}:host([has-error]:not([has-error=false]):not([type=favorite])[checked]:not([checked=false])) .checkbox-icon rect{fill:var(--tct-checkbox-error-checked-outer-fill-color)}:host([indeterminate]:not([indeterminate=false]):not([type=favorite])) .checkbox-icon{stroke:var(--comp-checkbox-checked-fill-color, var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color))))}:host([indeterminate]:not([indeterminate=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--comp-checkbox-checked-fill-color)}:host(:hover:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-hover-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));box-shadow:var(--tct-checkbox-hover-box-shadow, var(--tct-checkbox-box-shadow))}:host(:hover:not([type=favorite])) .checkbox-icon rect{fill:var(--tct-checkbox-hover-outer-fill-color, var(--comp-checkbox-outer-fill-color))}:host(:hover[has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-hover-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));box-shadow:var(--tct-checkbox-error-hover-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-hover-box-shadow, var(--tct-checkbox-box-shadow))))}:host(:hover[has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--tct-checkbox-error-hover-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)))}:host(:focus-within:not([type=favorite])) .checkbox-icon{--comp-checkbox-focused-box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));fill:var(--tct-checkbox-focused-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-focused-box-shadow, var(--tct-checkbox-box-shadow, var(--comp-checkbox-focused-box-shadow)))}:host(:focus-within[has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-focused-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-focused-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-focused-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-box-shadow, var(--comp-checkbox-focused-box-shadow))))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host(:hover[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-stroke-color, var(--tct-checkbox-favorite-stroke-color, var(--comp-checkbox-favorite-fill-color)));fill:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked]:not([checked=false])[type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-hover-stroke-color, var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-fill-primary:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-focused-stroke-color, var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([has-error]:not([has-error=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}:host([has-error]:not([has-error=false])[type=favorite][checked]:not([checked=false])) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}.checkbox-fill{fill:none;stroke:var(--tct-checkbox-checkmark-stroke-color, var(--comp-checkbox-checked-color));stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([has-error]:not([has-error=false]):not([type=favorite])) .checkbox-fill{stroke:var(--tct-checkbox-error-checkmark-stroke-color, #d20a0a);stroke-width:var(--tct-checkbox-error-checkmark-stroke-width, 2.5)}.checked-fill{stroke-dasharray:16;stroke-dashoffset:16;animation:draw-checkmark 350ms ease-out forwards}@keyframes draw-checkmark{to{stroke-dashoffset:0}}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg-container{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-indicator,.toggle-track{position:absolute;top:50%;transform:translateY(-50%)}.toggle-indicator{transition:left var(--comp-checkbox-tween), height var(--comp-checkbox-tween), width var(--comp-checkbox-tween);height:16px;width:16px;left:4px;border-radius:50%}.toggle-track{--comp-default-track-box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-color);height:24px;width:38px;fill:var(--comp-checkbox-toggle-track-fill);border-radius:var(--app-border-radius-3, 12px);box-shadow:var(--tct-checkbox-toggle-track-box-shadow, var(--comp-default-track-box-shadow));transition:fill var(--comp-checkbox-tween), box-shadow var(--comp-checkbox-tween)}.toggle-circle{mask:url(#xMask);fill:var(--comp-checkbox-toggle-color);transition:fill var(--comp-checkbox-tween)}.toggle-icon{stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--tct-checkbox-toggle-icon-stroke-width, 2);stroke:black}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{--comp-default-hover-track-box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-color);box-shadow:var(--tct-checkbox-toggle-hover-track-box-shadow, var(--comp-default-hover-track-box-shadow));fill:var(--comp-checkbox-toggle-track-fill-hover)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-hover-circle-color, var(--t-primary-d1, var(--t-gray-6, #4d4d4d)))}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-label-hover-color, inherit)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--comp-checkbox-toggle-track-fill-active)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-label-active-color, inherit)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-description-active-stroke-width, unset)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-track{box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-error-color);fill:var(--comp-checkbox-toggle-track-fill-error)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-circle{fill:var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-error-color);fill:var(--comp-checkbox-toggle-track-fill-error-hover)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-error-hover-color, var(--comp-checkbox-toggle-error-color))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-label-hover-color, inherit)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--comp-checkbox-toggle-track-fill-error-active)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--tct-checkbox-toggle-error-active-color, var(--comp-checkbox-toggle-error-color))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-error-label-active-color, inherit)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-error-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-error-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-description-active-stroke-width, unset)}:host([checked]:not([checked=false])) .toggle-indicator{left:18px}:host([checked]:not([checked=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-track-color, var(--t-primary, #6a4a9e));border:none}:host([checked]:not([checked=false])) .toggle-circle{mask:url(#checkMask);fill:var(--tct-checkbox-toggle-checked-circle-color, var(--t-base, #ffffff))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-hover-track-color, var(--t-primary-d1, #5f438e))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-checked-label-hover-color, inherit)}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-checked-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-description-hover-stroke-width, unset)}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-active-track-color, var(--t-primary-l1, #7755af))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-checked-label-active-color, inherit)}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-checked-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-description-active-stroke-width, unset)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-hover-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-checked-error-label-hover-color, inherit)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-checked-error-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-error-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-description-hover-stroke-width, unset)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-active-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-checked-error-label-active-color, inherit)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-checked-error-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-error-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-description-active-stroke-width, unset)}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))){cursor:not-allowed;opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))) label{cursor:not-allowed}";
|
|
6
|
+
const q2CheckboxCss = "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-checkbox-padding:var(--tct-checkbox-padding, var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, 8px)) 0);display:block;position:relative;padding:var(--comp-checkbox-padding);--comp-default-checkbox-margin:var(--tct-checkbox-margin-top, var(--t-checkbox-margin-top, 0px)) 0 var(--tct-checkbox-margin-bottom, var(--t-checkbox-margin-bottom, 0px));margin:var(--tct-checkbox-margin, var(--comp-default-checkbox-margin))}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 24px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 38px));--comp-checkbox-toggle-track-fill:var(--tct-checkbox-toggle-track-fill, var(--tct-checkbox-toggle-track-color, transparent));--comp-checkbox-toggle-track-fill-active:var(--tct-checkbox-toggle-active-track-fill, var(--tct-checkbox-toggle-active-track-color, var(--tct-checkbox-toggle-active-color, var(--t-primary-l1, #7755af))));--comp-checkbox-toggle-track-fill-hover:var(--tct-checkbox-toggle-hover-track-fill, var(--tct-checkbox-toggle-hover-track-color, var(--comp-checkbox-toggle-track-fill)));--comp-checkbox-toggle-track-fill-error:var(--tct-checkbox-toggle-error-track-fill, var(--tct-checkbox-toggle-error-track-color, var(--comp-checkbox-toggle-track-fill)));--comp-checkbox-toggle-track-fill-error-hover:var(--tct-checkbox-toggle-error-hover-track-fill, var(--tct-checkbox-toggle-error-hover-track-color, var(--comp-checkbox-toggle-track-fill-error)));--comp-checkbox-toggle-track-fill-error-active:var(--tct-checkbox-toggle-error-active-track-fill, var(--tct-checkbox-toggle-error-active-track-color, var(--comp-checkbox-toggle-track-fill-error)));--comp-checkbox-toggle-error-color:var(--tct-checkbox-toggle-error-color, var(--comp-checkbox-error-color));--comp-checkbox-toggle-color:var(--tct-checkbox-toggle-color, var(--t-gray-8, #808080));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-fill-color:var(--tct-checkbox-checked-fill-color, var(--t-primary, #040404));--comp-checkbox-checked-color:var(--tct-checkbox-checked-stroke-color, var(--tct-white, var(--app-white, #FFFFFF)));--comp-control-width:var(--comp-checkbox-size);--comp-checkbox-error-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));--comp-checkbox-bold-fallback-stroke-width:var(--tct-checkbox-bold-fallback-stroke-width, 0.7px);--comp-checkbox-stroke-width:var(--tct-checkbox-stroke-width, unset);--comp-checkbox-checked-stroke-width:var(--tct-checkbox-checked-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-hover-stroke-width:var(--tct-checkbox-hover-stroke-width, unset);--comp-checkbox-focused-stroke-width:var(--tct-checkbox-focused-stroke-width, unset);--comp-checkbox-checked-hover-stroke-width:var(--tct-checkbox-checked-hover-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-checked-focused-stroke-width:var(--tct-checkbox-checked-focused-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-description-stroke-width:var(--tct-checkbox-description-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-description-focused-stroke-width:var(--tct-checkbox-description-focused-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));--comp-checkbox-description-hover-stroke-width:var(--tct-checkbox-description-hover-stroke-width, var(--comp-checkbox-bold-fallback-stroke-width));display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([hide-label]:not([hide-label=false])) .container{grid-template-areas:\"svg\";grid-template-columns:var(--comp-control-width)}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label}:host([description]) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-description-stroke-width);text-stroke-width:var(--comp-checkbox-description-stroke-width)}:host([checked]:not([checked=false])) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-checked-stroke-width);text-stroke-width:var(--comp-checkbox-checked-stroke-width)}:host(:hover) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-hover-stroke-width);text-stroke-width:var(--comp-checkbox-hover-stroke-width)}:host(:focus-within) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-focused-stroke-width);text-stroke-width:var(--comp-checkbox-focused-stroke-width)}:host([description]:hover) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-description-hover-stroke-width);text-stroke-width:var(--comp-checkbox-description-hover-stroke-width)}:host([checked]:not([checked=false]):hover) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-checked-hover-stroke-width);text-stroke-width:var(--comp-checkbox-checked-hover-stroke-width)}:host([description]:focus-within) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-description-focused-stroke-width);text-stroke-width:var(--comp-checkbox-description-focused-stroke-width)}:host([checked]:not([checked=false]):focus-within) .label-text{-webkit-text-stroke-width:var(--comp-checkbox-checked-focused-stroke-width);text-stroke-width:var(--comp-checkbox-checked-focused-stroke-width)}:host(:active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-active-stroke-width, unset)}:host([checked]:not([checked=false]):active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-active-stroke-width, unset)}:host([has-error]:not([has-error=false]):hover) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-error-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-hover-stroke-width, unset)}:host([has-error]:not([has-error=false]):focus-within) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-error-focused-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-focused-stroke-width, unset)}:host([has-error]:not([has-error=false]):active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-error-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-active-stroke-width, unset)}:host([checked]:not([checked=false])[has-error]:not([has-error=false]):hover) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-error-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-hover-stroke-width, unset)}:host([checked]:not([checked=false])[has-error]:not([has-error=false]):focus-within) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-error-focused-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-focused-stroke-width, unset)}:host([checked]:not([checked=false])[has-error]:not([has-error=false]):active) .label-text{-webkit-text-stroke-width:var(--tct-checkbox-checked-error-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-active-stroke-width, unset)}.label-text label{line-height:var(--tct-checkbox-label-line-height, 24px)}.label-text label .label-content{display:inline;font-size:var(--tct-checkbox-label-font-size, inherit)}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}:host(:hover) .description-text{font-weight:var(--tct-checkbox-hover-description-font-weight, var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400)))}label{color:var(--tct-checkbox-label-color);cursor:pointer;hyphens:var(--tct-checkbox-label-hyphens, auto);word-break:var(--tct-checkbox-label-word-break, break-word);word-wrap:var(--tct-checkbox-label-word-wrap, break-word)}.checkbox-icon{width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 4px))));stroke:var(--comp-checkbox-outer-stroke-color);fill:var(--comp-checkbox-outer-fill-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));flex-shrink:0;box-shadow:var(--tct-checkbox-box-shadow)}.checkbox-icon rect{transition:fill var(--tct-checkbox-tween, var(--app-tween-2, 0.4s ease))}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon{stroke:var(--comp-checkbox-checked-fill-color, var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color))))}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--comp-checkbox-checked-fill-color)}:host([has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color));box-shadow:var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-box-shadow))}:host([has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color))}:host([has-error]:not([has-error=false]):not([type=favorite])[checked]:not([checked=false])) .checkbox-icon rect{fill:var(--tct-checkbox-error-checked-outer-fill-color)}:host([indeterminate]:not([indeterminate=false]):not([type=favorite])) .checkbox-icon{stroke:var(--comp-checkbox-checked-fill-color, var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color))))}:host([indeterminate]:not([indeterminate=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--comp-checkbox-checked-fill-color)}:host(:hover:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-hover-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));box-shadow:var(--tct-checkbox-hover-box-shadow, var(--tct-checkbox-box-shadow))}:host(:hover:not([type=favorite])) .checkbox-icon rect{fill:var(--tct-checkbox-hover-outer-fill-color, var(--comp-checkbox-outer-fill-color))}:host(:hover[has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-hover-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));box-shadow:var(--tct-checkbox-error-hover-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-hover-box-shadow, var(--tct-checkbox-box-shadow))))}:host(:hover[has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon rect{fill:var(--tct-checkbox-error-hover-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)))}:host(:focus-within:not([type=favorite])) .checkbox-icon{--comp-checkbox-focused-box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));fill:var(--tct-checkbox-focused-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-focused-box-shadow, var(--tct-checkbox-box-shadow, var(--comp-checkbox-focused-box-shadow)))}:host(:focus-within[has-error]:not([has-error=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-focused-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-focused-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-focused-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-box-shadow, var(--comp-checkbox-focused-box-shadow))))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host(:hover[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-stroke-color, var(--tct-checkbox-favorite-stroke-color, var(--comp-checkbox-favorite-fill-color)));fill:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked]:not([checked=false])[type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-hover-stroke-color, var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-fill-primary:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-focused-stroke-color, var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([has-error]:not([has-error=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}:host([has-error]:not([has-error=false])[type=favorite][checked]:not([checked=false])) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}.checkbox-fill{fill:none;stroke:var(--comp-checkbox-checked-color);stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([has-error]:not([has-error=false]):not([type=favorite])) .checkbox-fill{stroke:var(--tct-checkbox-error-checkmark-stroke-color, #d20a0a);stroke-width:var(--tct-checkbox-error-checkmark-stroke-width, 2.5)}.checked-fill{stroke-dasharray:16;stroke-dashoffset:16;animation:draw-checkmark 350ms ease-out forwards}@keyframes draw-checkmark{to{stroke-dashoffset:0}}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg-container{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-indicator,.toggle-track{position:absolute;top:50%;transform:translateY(-50%)}.toggle-indicator{transition:left var(--comp-checkbox-tween), height var(--comp-checkbox-tween), width var(--comp-checkbox-tween);height:16px;width:16px;left:4px;border-radius:50%}.toggle-track{--comp-default-track-box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-color);height:24px;width:38px;fill:var(--comp-checkbox-toggle-track-fill);border-radius:var(--app-border-radius-3, 12px);box-shadow:var(--tct-checkbox-toggle-track-box-shadow, var(--comp-default-track-box-shadow));transition:fill var(--comp-checkbox-tween), box-shadow var(--comp-checkbox-tween)}.toggle-circle{mask:url(#xMask);fill:var(--comp-checkbox-toggle-color);transition:fill var(--comp-checkbox-tween)}.toggle-icon{stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--tct-checkbox-toggle-icon-stroke-width, 2);stroke:black}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{--comp-default-hover-track-box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-color);box-shadow:var(--tct-checkbox-toggle-hover-track-box-shadow, var(--comp-default-hover-track-box-shadow));fill:var(--comp-checkbox-toggle-track-fill-hover)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-hover-circle-color, var(--t-primary-d1, var(--t-gray-6, #4d4d4d)))}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-label-hover-color, inherit)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--comp-checkbox-toggle-track-fill-active)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-label-active-color, inherit)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-description-active-stroke-width, unset)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-track{box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-error-color);fill:var(--comp-checkbox-toggle-track-fill-error)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-circle{fill:var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-error-color);fill:var(--comp-checkbox-toggle-track-fill-error-hover)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-error-hover-color, var(--comp-checkbox-toggle-error-color))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-label-hover-color, inherit)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-description-hover-stroke-width, unset)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--comp-checkbox-toggle-track-fill-error-active)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--tct-checkbox-toggle-error-active-color, var(--comp-checkbox-toggle-error-color))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-error-label-active-color, inherit)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-error-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-error-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-error-description-active-stroke-width, unset)}:host([checked]:not([checked=false])) .toggle-indicator{left:18px}:host([checked]:not([checked=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-track-color, var(--t-primary, #6a4a9e));border:none}:host([checked]:not([checked=false])) .toggle-circle{mask:url(#checkMask);fill:var(--tct-checkbox-toggle-checked-circle-color, var(--t-base, #ffffff))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-hover-track-color, var(--t-primary-d1, #5f438e))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-checked-label-hover-color, inherit)}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-checked-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-description-hover-stroke-width, unset)}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-active-track-color, var(--t-primary-l1, #7755af))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-checked-label-active-color, inherit)}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-checked-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-description-active-stroke-width, unset)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-hover-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .label-text,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .label-text{color:var(--tct-checkbox-checked-error-label-hover-color, inherit)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .description-text,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .description-text{color:var(--tct-checkbox-checked-error-description-hover-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-error-description-hover-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-description-hover-stroke-width, unset)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-active-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .label-text{color:var(--tct-checkbox-checked-error-label-active-color, inherit)}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .description-text{color:var(--tct-checkbox-checked-error-description-active-color, inherit);-webkit-text-stroke-width:var(--tct-checkbox-checked-error-description-active-stroke-width, unset);text-stroke-width:var(--tct-checkbox-checked-error-description-active-stroke-width, unset)}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))){cursor:not-allowed;opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))) label{cursor:not-allowed}";
|
|
7
7
|
|
|
8
8
|
const Q2Checkbox = /*@__PURE__*/ proxyCustomElement(class Q2Checkbox extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-checkbox2.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,wm9BAAwm9B;;MCKjn9B,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAA,WAAA,CAAA;AADvB,IAAA,WAAA,GAAA;;;;;;;AAII,QAAA,IAAA,CAAA,GAAG,GAAW,YAAY,UAAU,EAAE,E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stencil_proxyCustomElement"],"sources":["src/components/q2-checkbox/q2-checkbox.scss?tag=q2-checkbox&encapsulation=shadow","src/components/q2-checkbox/q2-checkbox.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-checkbox-padding: #{var-list(\n --tct-checkbox-padding,\n unquote('#{var-list(var-prefixer(checkbox-vertical-padding), 8px)} 0')\n )};\n\n display: block;\n position: relative;\n padding: var(--comp-checkbox-padding);\n --comp-default-checkbox-margin: #{var-list(var-prefixer(checkbox-margin-top), 0px) 0\n var-list(var-prefixer(checkbox-margin-bottom), 0px)};\n margin: var-list(--tct-checkbox-margin, --comp-default-checkbox-margin);\n}\n\n.container {\n --comp-checkbox-size: #{var-list(var-prefixer(checkbox-size), 24px)};\n --comp-checkbox-default-column-gap: var(--app-scale-2x, 10px);\n --comp-checkbox-default-row-gap: 0;\n --comp-checkbox-default-gap: #{var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap)};\n --comp-checkbox-tween: #{var-list(--tct-tween-1, --app-tween-1, unquote('0.2s ease'))};\n --comp-checkbox-toggle-width: #{var-list(var-prefixer(checkbox-toggle-width), 38px)};\n\n --comp-checkbox-toggle-track-fill: #{var-list(\n --tct-checkbox-toggle-track-fill,\n --tct-checkbox-toggle-track-color,\n transparent\n )};\n --comp-checkbox-toggle-track-fill-active: #{var-list(\n --tct-checkbox-toggle-active-track-fill,\n --tct-checkbox-toggle-active-track-color,\n --tct-checkbox-toggle-active-color,\n --t-primary-l1,\n #7755af\n )};\n --comp-checkbox-toggle-track-fill-hover: #{var-list(\n --tct-checkbox-toggle-hover-track-fill,\n --tct-checkbox-toggle-hover-track-color,\n --comp-checkbox-toggle-track-fill\n )};\n --comp-checkbox-toggle-track-fill-error: #{var-list(\n --tct-checkbox-toggle-error-track-fill,\n --tct-checkbox-toggle-error-track-color,\n --comp-checkbox-toggle-track-fill\n )};\n --comp-checkbox-toggle-track-fill-error-hover: #{var-list(\n --tct-checkbox-toggle-error-hover-track-fill,\n --tct-checkbox-toggle-error-hover-track-color,\n --comp-checkbox-toggle-track-fill-error\n )};\n --comp-checkbox-toggle-track-fill-error-active: #{var-list(\n --tct-checkbox-toggle-error-active-track-fill,\n --tct-checkbox-toggle-error-active-track-color,\n --comp-checkbox-toggle-track-fill-error\n )};\n\n --comp-checkbox-toggle-error-color: #{var-list(--tct-checkbox-toggle-error-color, --comp-checkbox-error-color)};\n --comp-checkbox-toggle-color: #{var-list(--tct-checkbox-toggle-color, --t-gray-8, #808080)};\n --comp-checkbox-gap: #{var-list(var-prefixer(checkbox-gap), --comp-checkbox-default-gap)};\n --comp-checkbox-outer-stroke-color: #{var-list(\n var-prefixer(checkbox-outer-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-outer-fill-color: #{var-list(\n var-prefixer(checkbox-outer-fill-color),\n --tct-white,\n --app-white,\n #ffffff\n )};\n --comp-checkbox-checked-fill-color: #{var-list(\n var-prefixer(checkbox-checked-outer-fill-color),\n --tct-checkbox-checked-outer-fill-color,\n --t-primary,\n #040404\n )};\n --comp-checkbox-checked-color: #{var-list(\n --tct-checkbox-checkmark-stroke-color,\n --tct-white,\n --app-white,\n #FFFFFF\n )};\n --comp-control-width: var(--comp-checkbox-size);\n --comp-checkbox-error-color: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n\n --comp-checkbox-bold-fallback-stroke-width: #{var-list(--tct-checkbox-bold-fallback-stroke-width, 0.7px)};\n --comp-checkbox-stroke-width: #{var-list(--tct-checkbox-stroke-width, unset)};\n --comp-checkbox-checked-stroke-width: #{var-list(\n --tct-checkbox-checked-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-hover-stroke-width: #{var-list(--tct-checkbox-hover-stroke-width, unset)};\n --comp-checkbox-focused-stroke-width: #{var-list(--tct-checkbox-focused-stroke-width, unset)};\n --comp-checkbox-checked-hover-stroke-width: #{var-list(\n --tct-checkbox-checked-hover-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-checked-focused-stroke-width: #{var-list(\n --tct-checkbox-checked-focused-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-description-stroke-width: #{var-list(\n --tct-checkbox-description-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-description-focused-stroke-width: #{var-list(\n --tct-checkbox-description-focused-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-description-hover-stroke-width: #{var-list(\n --tct-checkbox-description-hover-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n\n :host([type='favorite']) & {\n --comp-checkbox-favorite-stroke-color: #{var-list(\n var-prefixer(checkbox-favorite-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-favorite-fill-color: #{var-list(var-prefixer(checkbox-favorite-fill-color), #db7d24)};\n }\n\n display: grid;\n grid-template-areas:\n 'svg label'\n 'svg description';\n align-items: center;\n gap: var(--comp-checkbox-gap);\n grid-template-columns: var(--comp-control-width) calc(\n 100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)\n );\n\n :host([hide-label]:not([hide-label='false'])) & {\n grid-template-areas: 'svg';\n grid-template-columns: var(--comp-control-width);\n }\n\n :host([type='toggle']) & {\n --comp-control-width: var(--comp-checkbox-toggle-width);\n }\n\n :host([alignment='right']) &,\n :host([type='toggle']:not([alignment])) & {\n grid-template-areas:\n 'label svg'\n 'description svg';\n grid-template-columns: calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(\n --comp-control-width\n );\n }\n}\n\n.label-control {\n align-items: center;\n display: flex;\n}\n\n.label-text {\n grid-area: label;\n\n :host([description]) & {\n -webkit-text-stroke-width: var(--comp-checkbox-description-stroke-width);\n text-stroke-width: var(--comp-checkbox-description-stroke-width);\n }\n :host([checked]:not([checked='false'])) & {\n -webkit-text-stroke-width: var(--comp-checkbox-checked-stroke-width);\n text-stroke-width: var(--comp-checkbox-checked-stroke-width);\n }\n :host(:hover) & {\n -webkit-text-stroke-width: var(--comp-checkbox-hover-stroke-width);\n text-stroke-width: var(--comp-checkbox-hover-stroke-width);\n }\n :host(:focus-within) & {\n -webkit-text-stroke-width: var(--comp-checkbox-focused-stroke-width);\n text-stroke-width: var(--comp-checkbox-focused-stroke-width);\n }\n :host([description]:hover) & {\n -webkit-text-stroke-width: var(--comp-checkbox-description-hover-stroke-width);\n text-stroke-width: var(--comp-checkbox-description-hover-stroke-width);\n }\n :host([checked]:not([checked='false']):hover) & {\n -webkit-text-stroke-width: var(--comp-checkbox-checked-hover-stroke-width);\n text-stroke-width: var(--comp-checkbox-checked-hover-stroke-width);\n }\n :host([description]:focus-within) & {\n -webkit-text-stroke-width: var(--comp-checkbox-description-focused-stroke-width);\n text-stroke-width: var(--comp-checkbox-description-focused-stroke-width);\n }\n :host([checked]:not([checked='false']):focus-within) & {\n -webkit-text-stroke-width: var(--comp-checkbox-checked-focused-stroke-width);\n text-stroke-width: var(--comp-checkbox-checked-focused-stroke-width);\n }\n :host(:active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-active-stroke-width, unset);\n }\n :host([checked]:not([checked='false']):active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-active-stroke-width, unset);\n }\n :host([has-error]:not([has-error='false']):hover) & {\n -webkit-text-stroke-width: var(--tct-checkbox-error-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-hover-stroke-width, unset);\n }\n :host([has-error]:not([has-error='false']):focus-within) & {\n -webkit-text-stroke-width: var(--tct-checkbox-error-focused-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-focused-stroke-width, unset);\n }\n :host([has-error]:not([has-error='false']):active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-error-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-active-stroke-width, unset);\n }\n :host([checked]:not([checked='false'])[has-error]:not([has-error='false']):hover) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-hover-stroke-width, unset);\n }\n :host([checked]:not([checked='false'])[has-error]:not([has-error='false']):focus-within) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-focused-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-focused-stroke-width, unset);\n }\n :host([checked]:not([checked='false'])[has-error]:not([has-error='false']):active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-active-stroke-width, unset);\n }\n\n label {\n line-height: var-list(--tct-checkbox-label-line-height, 24px);\n .label-content {\n display: inline;\n font-size: var(--tct-checkbox-label-font-size, inherit);\n }\n }\n}\n\n.description-text {\n grid-area: description;\n font-weight: var-list(var-prefixer(checkbox-description-font-weight), 400);\n\n :host(:hover) & {\n font-weight: var-list(\n --tct-checkbox-hover-description-font-weight,\n var-prefixer(checkbox-description-font-weight),\n 400\n );\n }\n}\n\nlabel {\n color: var-list(--tct-checkbox-label-color);\n cursor: pointer;\n hyphens: var-list(--tct-checkbox-label-hyphens, auto);\n word-break: var-list(--tct-checkbox-label-word-break, break-word);\n word-wrap: var-list(--tct-checkbox-label-word-wrap, break-word);\n}\n\n.checkbox-icon {\n width: var(--comp-checkbox-size);\n height: var(--comp-checkbox-size);\n border-radius: var-list(\n var-prefixer(checkbox-outer-border-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n );\n stroke: var(--comp-checkbox-outer-stroke-color);\n fill: var(--comp-checkbox-outer-fill-color);\n stroke-width: var-list(var-prefixer(checkbox-outer-stroke-width), 2);\n flex-shrink: 0;\n box-shadow: var(--tct-checkbox-box-shadow);\n\n rect {\n transition: fill var-list(--tct-checkbox-tween, --app-tween-2, unquote('0.4s ease'));\n }\n\n :host([checked]:not([checked='false']):not([type='favorite'])) & {\n stroke: var-list(\n --comp-checkbox-checked-fill-color,\n var-prefixer(checkbox-checked-outer-stroke-color),\n --comp-checkbox-outer-stroke-color\n );\n\n rect {\n fill: var(--comp-checkbox-checked-fill-color);\n }\n }\n\n :host([has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-error-outer-stroke-color, --comp-checkbox-error-color);\n box-shadow: var-list(--tct-checkbox-error-box-shadow, --tct-checkbox-box-shadow);\n\n rect {\n fill: var-list(--tct-checkbox-error-outer-fill-color, --comp-checkbox-outer-fill-color);\n }\n }\n\n :host([has-error]:not([has-error='false']):not([type='favorite'])[checked]:not([checked='false'])) & {\n rect {\n fill: var-list(--tct-checkbox-error-checked-outer-fill-color);\n }\n }\n\n :host([indeterminate]:not([indeterminate='false']):not([type='favorite'])) & {\n stroke: var-list(\n --comp-checkbox-checked-fill-color,\n var-prefixer(checkbox-checked-outer-stroke-color),\n --comp-checkbox-outer-stroke-color\n );\n \n rect {\n fill: var(--comp-checkbox-checked-fill-color);\n }\n }\n\n :host(:hover:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-hover-outer-stroke-color, --comp-checkbox-outer-stroke-color);\n box-shadow: var-list(--tct-checkbox-hover-box-shadow, --tct-checkbox-box-shadow);\n rect {\n fill: var-list(--tct-checkbox-hover-outer-fill-color, --comp-checkbox-outer-fill-color);\n }\n }\n :host(:hover[has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-hover-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-hover-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-hover-box-shadow,\n --tct-checkbox-box-shadow\n );\n rect {\n fill: var-list(\n --tct-checkbox-error-hover-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n }\n }\n\n :host(:focus-within:not([type='favorite'])) & {\n --comp-checkbox-focused-box-shadow: #{var(--const-double-focus-ring),\n var-list(--tct-global-focus, unquote('0 0 0 2px #33b4ff'))};\n\n stroke: var-list(var-prefixer(checkbox-focused-outer-stroke-color), --comp-checkbox-outer-stroke-color);\n fill: var-list(--tct-checkbox-focused-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var-list(\n --tct-checkbox-focused-box-shadow,\n --tct-checkbox-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n :host(:focus-within[has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-focused-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-focused-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-focused-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n\n // Favorite\n :host([type='favorite']) & {\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-stroke-width), 1)};\n --tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host(:hover[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n // Checked favorite\n :host([checked]:not([checked='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-stroke-color,\n --tct-checkbox-favorite-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n fill: var-list(--tct-checkbox-favorite-checked-fill-color, --comp-checkbox-favorite-fill-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:hover) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-hover-stroke-color,\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-fill-primary: #{var-list(\n --tct-checkbox-favorite-checked-fill-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-focused-stroke-color,\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([has-error]:not([has-error='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n :host([has-error]:not([has-error='false'])[type='favorite'][checked]:not([checked='false'])) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n}\n\n.checkbox-fill {\n fill: none;\n stroke: var-list(--tct-checkbox-checkmark-stroke-color, --comp-checkbox-checked-color);\n stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n\n :host([has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var(--tct-checkbox-error-checkmark-stroke-color, #d20a0a);\n stroke-width: var(--tct-checkbox-error-checkmark-stroke-width, 2.5);\n }\n}\n\n.checked-fill {\n stroke-dasharray: 16;\n stroke-dashoffset: 16;\n animation: draw-checkmark 350ms ease-out forwards;\n}\n\n@keyframes draw-checkmark {\n to {\n stroke-dashoffset: 0;\n }\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg-container {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-indicator,\n.toggle-track {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n.toggle-indicator {\n transition:\n left var(--comp-checkbox-tween),\n height var(--comp-checkbox-tween),\n width var(--comp-checkbox-tween);\n height: 16px;\n width: 16px;\n left: 4px;\n border-radius: 50%;\n}\n\n.toggle-track {\n --comp-default-track-box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-color);\n height: 24px;\n width: 38px;\n fill: var(--comp-checkbox-toggle-track-fill);\n border-radius: var(--app-border-radius-3, 12px);\n box-shadow: var-list(--tct-checkbox-toggle-track-box-shadow, --comp-default-track-box-shadow);\n transition:\n fill var(--comp-checkbox-tween),\n box-shadow var(--comp-checkbox-tween);\n}\n\n.toggle-circle {\n mask: url(#xMask);\n fill: var(--comp-checkbox-toggle-color);\n transition: fill var(--comp-checkbox-tween);\n}\n\n.toggle-icon {\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: var(--tct-checkbox-toggle-icon-stroke-width, 2);\n stroke: black;\n}\n\n:host(:is(:not([checked]), [checked='false'])) {\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n --comp-default-hover-track-box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-color);\n box-shadow: var-list(\n --tct-checkbox-toggle-hover-track-box-shadow,\n --comp-default-hover-track-box-shadow\n );\n fill: var(--comp-checkbox-toggle-track-fill-hover);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-hover-circle-color, --t-primary-d1, --t-gray-6, #4d4d4d);\n }\n .label-text {\n color: var(--tct-checkbox-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n }\n }\n :active {\n .toggle-circle {\n fill: var(--comp-checkbox-toggle-track-fill-active);\n }\n .label-text {\n color: var(--tct-checkbox-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-description-active-stroke-width, unset);\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-error-color);\n fill: var(--comp-checkbox-toggle-track-fill-error);\n }\n .toggle-circle {\n fill: var(--comp-checkbox-toggle-error-color);\n }\n\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-error-color);\n fill: var(--comp-checkbox-toggle-track-fill-error-hover);\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-hover-color, --comp-checkbox-toggle-error-color);\n }\n .label-text {\n color: var(--tct-checkbox-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n }\n }\n :active {\n .toggle-track {\n fill: var(--comp-checkbox-toggle-track-fill-error-active);\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-active-color, --comp-checkbox-toggle-error-color);\n }\n .label-text {\n color: var(--tct-checkbox-error-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-error-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-error-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-description-active-stroke-width, unset);\n }\n }\n }\n }\n}\n\n:host([checked]:not([checked='false'])) {\n .toggle-indicator {\n left: 18px;\n }\n\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-track-color, --t-primary, #6a4a9e);\n border: none;\n }\n .toggle-circle {\n mask: url(#checkMask);\n fill: var-list(--tct-checkbox-toggle-checked-circle-color, --t-base, #ffffff);\n }\n\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-hover-track-color, --t-primary-d1, #5f438e);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .label-text {\n color: var(--tct-checkbox-checked-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-description-hover-stroke-width, unset);\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-active-track-color, --t-primary-l1, #7755af);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .label-text {\n color: var(--tct-checkbox-checked-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-description-active-stroke-width, unset);\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-error-track-color, --comp-checkbox-toggle-error-color);\n }\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-hover-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n .label-text {\n color: var(--tct-checkbox-checked-error-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-error-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-description-hover-stroke-width, unset);\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-active-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n .label-text {\n color: var(--tct-checkbox-checked-error-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-error-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-description-active-stroke-width, unset);\n }\n }\n }\n }\n}\n\n:host(:is([disabled]:not([disabled='false']), [group-disabled]:not([group-disabled='false']))) {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n label {\n cursor: not-allowed;\n }\n}\n","import { Component, ComponentInterface, Prop, Element, Listen, Watch, Event, EventEmitter, h } from '@stencil/core';\nimport { createGuid, handleAriaLabel, isEventFromElement, loc, overrideFocus } from 'src/utils';\nimport mirrorEmit from '@/utils/mirror-emit';\n\n@Component({ tag: 'q2-checkbox', shadow: true, styleUrl: 'q2-checkbox.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true })\n alignment: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true })\n groupDisabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n hasError: boolean = false;\n\n /**\n * Hide's the field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * Used on a parent checkbox in a checkbox group (e.g. \"Select All\") to indicate that some, but not all, checkboxes in a group are checked.\n *\n * When `true`, the \"indeterminate\" selection style is applied.\n * To apply the standard \"checked\" selection style, `checked` must be true, and `indeterminate` must be `false`.\n */\n @Prop({ reflect: true })\n indeterminate: boolean;\n\n /**\n * The visible label text for the checkbox. Appears to the right of the box for 'default' and 'favorite' checkboxes, and to the left for 'toggle' checkboxes.\n * Yielded content will be adjacent to this text.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true })\n name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n slotReadonly: boolean;\n\n /** The visual style of the checkbox. This does not need to be defined for a standard checkbox. */\n @Prop({ reflect: true })\n type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the checkbox is toggled.\n * @deprecated Use 'tctChange' instead\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string; checked: boolean }>;\n\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event()\n tctChange: EventEmitter<{ value: string; checked: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.hostElement.click = () => this.inputElement.click();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n // We use setTimeout to give an opportunity to call preventDefault\n setTimeout(() => this.handleChangeEvent(event), 0);\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.hostElement.shadowRoot.querySelector('input').focus();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n // #endregion\n // #region Local Methods\n\n handleChangeEvent(event: CustomEvent<{ checked: boolean; value: string }>) {\n if (\n this.readonly ||\n this.disabled ||\n this.hostElement.onchange ||\n event.defaultPrevented ||\n event.target !== this.hostElement ||\n !event.detail\n ) {\n return;\n }\n this.checked = event.detail.checked;\n }\n\n onInputClick = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n\n const isNotInteractive = this.disabled || this.readonly || this.slotReadonly;\n if (isNotInteractive) return;\n if (!(event.target instanceof HTMLInputElement)) return;\n const { value, checked } = event.target;\n\n mirrorEmit(this, ['change', 'tctChange'], {\n value,\n checked,\n });\n this.inputElement.focus();\n };\n\n // #endregion\n // #region Render Methods\n\n renderCheckboxSVG() {\n if (this.type === 'favorite') {\n return (\n <q2-icon\n type=\"star\"\n class=\"checkbox-icon\"\n />\n );\n }\n\n if (this.type === 'toggle') {\n return this.renderToggleSVG();\n }\n\n return (\n <svg\n aria-hidden=\"true\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n class=\"checkbox-icon\"\n focusable=\"false\"\n >\n <rect\n x=\"1\"\n y=\"1\"\n width=\"18\"\n height=\"18\"\n rx=\"3\"\n />\n {(this.checked || this.indeterminate) && this.renderCheckBoxSVGFill()}\n </svg>\n );\n }\n\n renderCheckBoxSVGFill() {\n if (this.indeterminate) {\n return (\n <line\n class=\"checkbox-fill indeterminate-fill\"\n x1=\"4\"\n y1=\"10\"\n x2=\"16\"\n y2=\"10\"\n />\n );\n }\n return (\n <polyline\n class=\"checkbox-fill checked-fill\"\n points=\"5 11 8.5 14.5 15 6\"\n key={`checkmark-${this.checked}`}\n />\n );\n }\n\n renderToggleSVG() {\n return (\n <div class=\"toggle-svg-container\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 38 24\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <rect\n width=\"38\"\n height=\"24\"\n rx=\"12\"\n ></rect>\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 18 18\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <defs>\n {/* Mask for the X icon */}\n <mask\n id=\"xMask\"\n maskUnits=\"userSpaceOnUse\"\n >\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n ></rect>\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"6.5\"\n x2=\"11.5\"\n y2=\"11.5\"\n stroke=\"black\"\n stroke-width=\"2\"\n ></line>\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"11.5\"\n x2=\"11.5\"\n y2=\"6.5\"\n stroke=\"black\"\n stroke-width=\"2\"\n ></line>\n </mask>\n {/* Mask for the checkmark icon */}\n <mask id=\"checkMask\">\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n />\n <polyline\n class=\"toggle-icon\"\n points=\"6,8.5 8.5,11 12.5,6.5\"\n fill=\"none\"\n />\n </mask>\n </defs>\n <circle\n class=\"toggle-circle\"\n cx=\"9\"\n cy=\"9\"\n r=\"9\"\n mask=\"url(#xMask)\"\n ></circle>\n </svg>\n </div>\n );\n }\n\n render() {\n const textLabelClasses = ['label-text'];\n if (this.hideLabel) textLabelClasses.push('sr');\n return (\n <div class=\"container\">\n <input\n ref={el => (this.inputElement = el)}\n aria-describedby={this.description ? 'description' : undefined}\n aria-invalid={this.hasError === undefined ? undefined : `${this.hasError}`}\n checked={this.indeterminate || this.checked || false}\n class=\"sr\"\n disabled={!!this.disabled || !!this.groupDisabled}\n id={this._id}\n name={this.name || this._id}\n onClick={this.onInputClick}\n test-id=\"q2CheckboxInnerCheckBox\"\n type=\"checkbox\"\n value={this.value}\n />\n <label\n htmlFor={this._id}\n class=\"label-control\"\n test-id=\"checkboxButton\"\n aria-label={loc(this.label)}\n >\n {this.renderCheckboxSVG()}\n </label>\n <div class={textLabelClasses.join(' ')}>\n <label\n test-id=\"checkboxLabel\"\n htmlFor={this._id}\n aria-hidden=\"true\"\n >\n <div class=\"label-content\">\n {loc(this.label)}\n <slot />\n </div>\n </label>\n </div>\n {this.description && (\n <div\n class=\"description-text\"\n test-id=\"checkboxDescription\"\n id=\"description\"\n >\n {loc(this.description)}\n </div>\n )}\n </div>\n );\n }\n\n // #endregion\n}\n"],"version":3}
|
|
1
|
+
{"file":"q2-checkbox2.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,oj9BAAoj9B;;MCK7j9B,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAA,WAAA,CAAA;AADvB,IAAA,WAAA,GAAA;;;;;;;AAII,QAAA,IAAA,CAAA,GAAG,GAAW,YAAY,UAAU,EAAE,EAAE;;AAsBxC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;;AAsBxB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAsHzB,QAAA,IAAA,CAAA,YAAY,GAAG,CAAC,KAAY,KAAI;YAC5B,KAAK,CAAC,eAAe,EAAE;YACvB,KAAK,CAAC,cAAc,EAAE;AAEtB,YAAA,MAAM,gBAA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E,IAAI,CAAC,KAAK,EACnB,CAAA,EACF,CACI,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,OAAO,EAAE,IAAI,CAAC,GAAG,EACjB,KAAK,EAAC,eAAe,EACb,SAAA,EAAA,gBAAgB,gBACZ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAE1B,IAAI,CAAC,iBAAiB,EAAE,CACrB,EACR,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAA,EAClC,CACY,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,SAAA,EAAA,eAAe,EACvB,OAAO,EAAE,IAAI,CAAC,GAAG,iBACL,MAAM,EAAA,EAElB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACrB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAChB,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACN,CACF,CACN,EACL,IAAI,CAAC,WAAW,KACb,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACI,KAAK,EAAC,kBAAkB,EAChB,SAAA,EAAA,qBAAqB,EAC7B,EAAE,EAAC,aAAa,EAAA,EAEf,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CACpB,CACT,CACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/q2-checkbox/q2-checkbox.scss?tag=q2-checkbox&encapsulation=shadow","src/components/q2-checkbox/q2-checkbox.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-checkbox-padding: #{var-list(\n --tct-checkbox-padding,\n unquote('#{var-list(var-prefixer(checkbox-vertical-padding), 8px)} 0')\n )};\n\n display: block;\n position: relative;\n padding: var(--comp-checkbox-padding);\n --comp-default-checkbox-margin: #{var-list(var-prefixer(checkbox-margin-top), 0px) 0\n var-list(var-prefixer(checkbox-margin-bottom), 0px)};\n margin: var-list(--tct-checkbox-margin, --comp-default-checkbox-margin);\n}\n\n.container {\n --comp-checkbox-size: #{var-list(var-prefixer(checkbox-size), 24px)};\n --comp-checkbox-default-column-gap: var(--app-scale-2x, 10px);\n --comp-checkbox-default-row-gap: 0;\n --comp-checkbox-default-gap: #{var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap)};\n --comp-checkbox-tween: #{var-list(--tct-tween-1, --app-tween-1, unquote('0.2s ease'))};\n --comp-checkbox-toggle-width: #{var-list(var-prefixer(checkbox-toggle-width), 38px)};\n\n --comp-checkbox-toggle-track-fill: #{var-list(\n --tct-checkbox-toggle-track-fill,\n --tct-checkbox-toggle-track-color,\n transparent\n )};\n --comp-checkbox-toggle-track-fill-active: #{var-list(\n --tct-checkbox-toggle-active-track-fill,\n --tct-checkbox-toggle-active-track-color,\n --tct-checkbox-toggle-active-color,\n --t-primary-l1,\n #7755af\n )};\n --comp-checkbox-toggle-track-fill-hover: #{var-list(\n --tct-checkbox-toggle-hover-track-fill,\n --tct-checkbox-toggle-hover-track-color,\n --comp-checkbox-toggle-track-fill\n )};\n --comp-checkbox-toggle-track-fill-error: #{var-list(\n --tct-checkbox-toggle-error-track-fill,\n --tct-checkbox-toggle-error-track-color,\n --comp-checkbox-toggle-track-fill\n )};\n --comp-checkbox-toggle-track-fill-error-hover: #{var-list(\n --tct-checkbox-toggle-error-hover-track-fill,\n --tct-checkbox-toggle-error-hover-track-color,\n --comp-checkbox-toggle-track-fill-error\n )};\n --comp-checkbox-toggle-track-fill-error-active: #{var-list(\n --tct-checkbox-toggle-error-active-track-fill,\n --tct-checkbox-toggle-error-active-track-color,\n --comp-checkbox-toggle-track-fill-error\n )};\n\n --comp-checkbox-toggle-error-color: #{var-list(--tct-checkbox-toggle-error-color, --comp-checkbox-error-color)};\n --comp-checkbox-toggle-color: #{var-list(--tct-checkbox-toggle-color, --t-gray-8, #808080)};\n --comp-checkbox-gap: #{var-list(var-prefixer(checkbox-gap), --comp-checkbox-default-gap)};\n --comp-checkbox-outer-stroke-color: #{var-list(\n var-prefixer(checkbox-outer-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-outer-fill-color: #{var-list(\n var-prefixer(checkbox-outer-fill-color),\n --tct-white,\n --app-white,\n #ffffff\n )};\n --comp-checkbox-checked-fill-color: #{var-list(\n --tct-checkbox-checked-fill-color,\n --t-primary,\n #040404\n )};\n --comp-checkbox-checked-color: #{var-list(\n --tct-checkbox-checked-stroke-color,\n --tct-white,\n --app-white,\n #FFFFFF\n )};\n --comp-control-width: var(--comp-checkbox-size);\n --comp-checkbox-error-color: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n\n --comp-checkbox-bold-fallback-stroke-width: #{var-list(--tct-checkbox-bold-fallback-stroke-width, 0.7px)};\n --comp-checkbox-stroke-width: #{var-list(--tct-checkbox-stroke-width, unset)};\n --comp-checkbox-checked-stroke-width: #{var-list(\n --tct-checkbox-checked-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-hover-stroke-width: #{var-list(--tct-checkbox-hover-stroke-width, unset)};\n --comp-checkbox-focused-stroke-width: #{var-list(--tct-checkbox-focused-stroke-width, unset)};\n --comp-checkbox-checked-hover-stroke-width: #{var-list(\n --tct-checkbox-checked-hover-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-checked-focused-stroke-width: #{var-list(\n --tct-checkbox-checked-focused-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-description-stroke-width: #{var-list(\n --tct-checkbox-description-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-description-focused-stroke-width: #{var-list(\n --tct-checkbox-description-focused-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n --comp-checkbox-description-hover-stroke-width: #{var-list(\n --tct-checkbox-description-hover-stroke-width,\n --comp-checkbox-bold-fallback-stroke-width\n )};\n\n :host([type='favorite']) & {\n --comp-checkbox-favorite-stroke-color: #{var-list(\n var-prefixer(checkbox-favorite-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-favorite-fill-color: #{var-list(var-prefixer(checkbox-favorite-fill-color), #db7d24)};\n }\n\n display: grid;\n grid-template-areas:\n 'svg label'\n 'svg description';\n align-items: center;\n gap: var(--comp-checkbox-gap);\n grid-template-columns: var(--comp-control-width) calc(\n 100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)\n );\n\n :host([hide-label]:not([hide-label='false'])) & {\n grid-template-areas: 'svg';\n grid-template-columns: var(--comp-control-width);\n }\n\n :host([type='toggle']) & {\n --comp-control-width: var(--comp-checkbox-toggle-width);\n }\n\n :host([alignment='right']) &,\n :host([type='toggle']:not([alignment])) & {\n grid-template-areas:\n 'label svg'\n 'description svg';\n grid-template-columns: calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(\n --comp-control-width\n );\n }\n}\n\n.label-control {\n align-items: center;\n display: flex;\n}\n\n.label-text {\n grid-area: label;\n\n :host([description]) & {\n -webkit-text-stroke-width: var(--comp-checkbox-description-stroke-width);\n text-stroke-width: var(--comp-checkbox-description-stroke-width);\n }\n :host([checked]:not([checked='false'])) & {\n -webkit-text-stroke-width: var(--comp-checkbox-checked-stroke-width);\n text-stroke-width: var(--comp-checkbox-checked-stroke-width);\n }\n :host(:hover) & {\n -webkit-text-stroke-width: var(--comp-checkbox-hover-stroke-width);\n text-stroke-width: var(--comp-checkbox-hover-stroke-width);\n }\n :host(:focus-within) & {\n -webkit-text-stroke-width: var(--comp-checkbox-focused-stroke-width);\n text-stroke-width: var(--comp-checkbox-focused-stroke-width);\n }\n :host([description]:hover) & {\n -webkit-text-stroke-width: var(--comp-checkbox-description-hover-stroke-width);\n text-stroke-width: var(--comp-checkbox-description-hover-stroke-width);\n }\n :host([checked]:not([checked='false']):hover) & {\n -webkit-text-stroke-width: var(--comp-checkbox-checked-hover-stroke-width);\n text-stroke-width: var(--comp-checkbox-checked-hover-stroke-width);\n }\n :host([description]:focus-within) & {\n -webkit-text-stroke-width: var(--comp-checkbox-description-focused-stroke-width);\n text-stroke-width: var(--comp-checkbox-description-focused-stroke-width);\n }\n :host([checked]:not([checked='false']):focus-within) & {\n -webkit-text-stroke-width: var(--comp-checkbox-checked-focused-stroke-width);\n text-stroke-width: var(--comp-checkbox-checked-focused-stroke-width);\n }\n :host(:active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-active-stroke-width, unset);\n }\n :host([checked]:not([checked='false']):active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-active-stroke-width, unset);\n }\n :host([has-error]:not([has-error='false']):hover) & {\n -webkit-text-stroke-width: var(--tct-checkbox-error-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-hover-stroke-width, unset);\n }\n :host([has-error]:not([has-error='false']):focus-within) & {\n -webkit-text-stroke-width: var(--tct-checkbox-error-focused-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-focused-stroke-width, unset);\n }\n :host([has-error]:not([has-error='false']):active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-error-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-active-stroke-width, unset);\n }\n :host([checked]:not([checked='false'])[has-error]:not([has-error='false']):hover) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-hover-stroke-width, unset);\n }\n :host([checked]:not([checked='false'])[has-error]:not([has-error='false']):focus-within) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-focused-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-focused-stroke-width, unset);\n }\n :host([checked]:not([checked='false'])[has-error]:not([has-error='false']):active) & {\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-active-stroke-width, unset);\n }\n\n label {\n line-height: var-list(--tct-checkbox-label-line-height, 24px);\n .label-content {\n display: inline;\n font-size: var(--tct-checkbox-label-font-size, inherit);\n }\n }\n}\n\n.description-text {\n grid-area: description;\n font-weight: var-list(var-prefixer(checkbox-description-font-weight), 400);\n\n :host(:hover) & {\n font-weight: var-list(\n --tct-checkbox-hover-description-font-weight,\n var-prefixer(checkbox-description-font-weight),\n 400\n );\n }\n}\n\nlabel {\n color: var-list(--tct-checkbox-label-color);\n cursor: pointer;\n hyphens: var-list(--tct-checkbox-label-hyphens, auto);\n word-break: var-list(--tct-checkbox-label-word-break, break-word);\n word-wrap: var-list(--tct-checkbox-label-word-wrap, break-word);\n}\n\n.checkbox-icon {\n width: var(--comp-checkbox-size);\n height: var(--comp-checkbox-size);\n border-radius: var-list(\n var-prefixer(checkbox-outer-border-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n );\n stroke: var(--comp-checkbox-outer-stroke-color);\n fill: var(--comp-checkbox-outer-fill-color);\n stroke-width: var-list(var-prefixer(checkbox-outer-stroke-width), 2);\n flex-shrink: 0;\n box-shadow: var(--tct-checkbox-box-shadow);\n\n rect {\n transition: fill var-list(--tct-checkbox-tween, --app-tween-2, unquote('0.4s ease'));\n }\n\n :host([checked]:not([checked='false']):not([type='favorite'])) & {\n stroke: var-list(\n --comp-checkbox-checked-fill-color,\n var-prefixer(checkbox-checked-outer-stroke-color),\n --comp-checkbox-outer-stroke-color\n );\n\n rect {\n fill: var(--comp-checkbox-checked-fill-color);\n }\n }\n\n :host([has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-error-outer-stroke-color, --comp-checkbox-error-color);\n box-shadow: var-list(--tct-checkbox-error-box-shadow, --tct-checkbox-box-shadow);\n\n rect {\n fill: var-list(--tct-checkbox-error-outer-fill-color, --comp-checkbox-outer-fill-color);\n }\n }\n\n :host([has-error]:not([has-error='false']):not([type='favorite'])[checked]:not([checked='false'])) & {\n rect {\n fill: var-list(--tct-checkbox-error-checked-outer-fill-color);\n }\n }\n\n :host([indeterminate]:not([indeterminate='false']):not([type='favorite'])) & {\n stroke: var-list(\n --comp-checkbox-checked-fill-color,\n var-prefixer(checkbox-checked-outer-stroke-color),\n --comp-checkbox-outer-stroke-color\n );\n\n rect {\n fill: var(--comp-checkbox-checked-fill-color);\n }\n }\n\n :host(:hover:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-hover-outer-stroke-color, --comp-checkbox-outer-stroke-color);\n box-shadow: var-list(--tct-checkbox-hover-box-shadow, --tct-checkbox-box-shadow);\n rect {\n fill: var-list(--tct-checkbox-hover-outer-fill-color, --comp-checkbox-outer-fill-color);\n }\n }\n :host(:hover[has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-hover-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-hover-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-hover-box-shadow,\n --tct-checkbox-box-shadow\n );\n rect {\n fill: var-list(\n --tct-checkbox-error-hover-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n }\n }\n\n :host(:focus-within:not([type='favorite'])) & {\n --comp-checkbox-focused-box-shadow: #{var(--const-double-focus-ring),\n var-list(--tct-global-focus, unquote('0 0 0 2px #33b4ff'))};\n\n stroke: var-list(var-prefixer(checkbox-focused-outer-stroke-color), --comp-checkbox-outer-stroke-color);\n fill: var-list(--tct-checkbox-focused-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var-list(\n --tct-checkbox-focused-box-shadow,\n --tct-checkbox-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n :host(:focus-within[has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-focused-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-focused-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-focused-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n\n // Favorite\n :host([type='favorite']) & {\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-stroke-width), 1)};\n --tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host(:hover[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n // Checked favorite\n :host([checked]:not([checked='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-stroke-color,\n --tct-checkbox-favorite-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n fill: var-list(--tct-checkbox-favorite-checked-fill-color, --comp-checkbox-favorite-fill-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:hover) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-hover-stroke-color,\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-fill-primary: #{var-list(\n --tct-checkbox-favorite-checked-fill-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-focused-stroke-color,\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([has-error]:not([has-error='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n :host([has-error]:not([has-error='false'])[type='favorite'][checked]:not([checked='false'])) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n}\n\n.checkbox-fill {\n fill: none;\n stroke: var-list(--comp-checkbox-checked-color);\n stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n\n :host([has-error]:not([has-error='false']):not([type='favorite'])) & {\n stroke: var(--tct-checkbox-error-checkmark-stroke-color, #d20a0a);\n stroke-width: var(--tct-checkbox-error-checkmark-stroke-width, 2.5);\n }\n}\n\n.checked-fill {\n stroke-dasharray: 16;\n stroke-dashoffset: 16;\n animation: draw-checkmark 350ms ease-out forwards;\n}\n\n@keyframes draw-checkmark {\n to {\n stroke-dashoffset: 0;\n }\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg-container {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-indicator,\n.toggle-track {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n.toggle-indicator {\n transition:\n left var(--comp-checkbox-tween),\n height var(--comp-checkbox-tween),\n width var(--comp-checkbox-tween);\n height: 16px;\n width: 16px;\n left: 4px;\n border-radius: 50%;\n}\n\n.toggle-track {\n --comp-default-track-box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-color);\n height: 24px;\n width: 38px;\n fill: var(--comp-checkbox-toggle-track-fill);\n border-radius: var(--app-border-radius-3, 12px);\n box-shadow: var-list(--tct-checkbox-toggle-track-box-shadow, --comp-default-track-box-shadow);\n transition:\n fill var(--comp-checkbox-tween),\n box-shadow var(--comp-checkbox-tween);\n}\n\n.toggle-circle {\n mask: url(#xMask);\n fill: var(--comp-checkbox-toggle-color);\n transition: fill var(--comp-checkbox-tween);\n}\n\n.toggle-icon {\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: var(--tct-checkbox-toggle-icon-stroke-width, 2);\n stroke: black;\n}\n\n:host(:is(:not([checked]), [checked='false'])) {\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n --comp-default-hover-track-box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-color);\n box-shadow: var-list(\n --tct-checkbox-toggle-hover-track-box-shadow,\n --comp-default-hover-track-box-shadow\n );\n fill: var(--comp-checkbox-toggle-track-fill-hover);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-hover-circle-color, --t-primary-d1, --t-gray-6, #4d4d4d);\n }\n .label-text {\n color: var(--tct-checkbox-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n }\n }\n :active {\n .toggle-circle {\n fill: var(--comp-checkbox-toggle-track-fill-active);\n }\n .label-text {\n color: var(--tct-checkbox-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-description-active-stroke-width, unset);\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-error-color);\n fill: var(--comp-checkbox-toggle-track-fill-error);\n }\n .toggle-circle {\n fill: var(--comp-checkbox-toggle-error-color);\n }\n\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-error-color);\n fill: var(--comp-checkbox-toggle-track-fill-error-hover);\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-hover-color, --comp-checkbox-toggle-error-color);\n }\n .label-text {\n color: var(--tct-checkbox-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-description-hover-stroke-width, unset);\n }\n }\n :active {\n .toggle-track {\n fill: var(--comp-checkbox-toggle-track-fill-error-active);\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-active-color, --comp-checkbox-toggle-error-color);\n }\n .label-text {\n color: var(--tct-checkbox-error-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-error-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-error-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-error-description-active-stroke-width, unset);\n }\n }\n }\n }\n}\n\n:host([checked]:not([checked='false'])) {\n .toggle-indicator {\n left: 18px;\n }\n\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-track-color, --t-primary, #6a4a9e);\n border: none;\n }\n .toggle-circle {\n mask: url(#checkMask);\n fill: var-list(--tct-checkbox-toggle-checked-circle-color, --t-base, #ffffff);\n }\n\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-hover-track-color, --t-primary-d1, #5f438e);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .label-text {\n color: var(--tct-checkbox-checked-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-description-hover-stroke-width, unset);\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-active-track-color, --t-primary-l1, #7755af);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .label-text {\n color: var(--tct-checkbox-checked-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-description-active-stroke-width, unset);\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-error-track-color, --comp-checkbox-toggle-error-color);\n }\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-hover-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n .label-text {\n color: var(--tct-checkbox-checked-error-label-hover-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-error-description-hover-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-description-hover-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-description-hover-stroke-width, unset);\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-active-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n .label-text {\n color: var(--tct-checkbox-checked-error-label-active-color, inherit);\n }\n .description-text {\n color: var(--tct-checkbox-checked-error-description-active-color, inherit);\n -webkit-text-stroke-width: var(--tct-checkbox-checked-error-description-active-stroke-width, unset);\n text-stroke-width: var(--tct-checkbox-checked-error-description-active-stroke-width, unset);\n }\n }\n }\n }\n}\n\n:host(:is([disabled]:not([disabled='false']), [group-disabled]:not([group-disabled='false']))) {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n label {\n cursor: not-allowed;\n }\n}\n","import { Component, ComponentInterface, Prop, Element, Listen, Watch, Event, EventEmitter, h } from '@stencil/core';\nimport { createGuid, handleAriaLabel, isEventFromElement, loc, overrideFocus } from 'src/utils';\nimport mirrorEmit from '@/utils/mirror-emit';\n\n@Component({ tag: 'q2-checkbox', shadow: true, styleUrl: 'q2-checkbox.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true })\n alignment: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true })\n groupDisabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n hasError: boolean = false;\n\n /**\n * Hide's the field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * Used on a parent checkbox in a checkbox group (e.g. \"Select All\") to indicate that some, but not all, checkboxes in a group are checked.\n *\n * When `true`, the \"indeterminate\" selection style is applied.\n * To apply the standard \"checked\" selection style, `checked` must be true, and `indeterminate` must be `false`.\n */\n @Prop({ reflect: true })\n indeterminate: boolean;\n\n /**\n * The visible label text for the checkbox. Appears to the right of the box for 'default' and 'favorite' checkboxes, and to the left for 'toggle' checkboxes.\n * Yielded content will be adjacent to this text.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true })\n name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n slotReadonly: boolean;\n\n /** The visual style of the checkbox. This does not need to be defined for a standard checkbox. */\n @Prop({ reflect: true })\n type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the checkbox is toggled.\n * @deprecated Use 'tctChange' instead\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string; checked: boolean }>;\n\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event()\n tctChange: EventEmitter<{ value: string; checked: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.hostElement.click = () => this.inputElement.click();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n // We use setTimeout to give an opportunity to call preventDefault\n setTimeout(() => this.handleChangeEvent(event), 0);\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.hostElement.shadowRoot.querySelector('input').focus();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n // #endregion\n // #region Local Methods\n\n handleChangeEvent(event: CustomEvent<{ checked: boolean; value: string }>) {\n if (\n this.readonly ||\n this.disabled ||\n this.hostElement.onchange ||\n event.defaultPrevented ||\n event.target !== this.hostElement ||\n !event.detail\n ) {\n return;\n }\n this.checked = event.detail.checked;\n }\n\n onInputClick = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n\n const isNotInteractive = this.disabled || this.readonly || this.slotReadonly;\n if (isNotInteractive) return;\n if (!(event.target instanceof HTMLInputElement)) return;\n const { value, checked } = event.target;\n\n mirrorEmit(this, ['change', 'tctChange'], {\n value,\n checked,\n });\n this.inputElement.focus();\n };\n\n // #endregion\n // #region Render Methods\n\n renderCheckboxSVG() {\n if (this.type === 'favorite') {\n return (\n <q2-icon\n type=\"star\"\n class=\"checkbox-icon\"\n />\n );\n }\n\n if (this.type === 'toggle') {\n return this.renderToggleSVG();\n }\n\n return (\n <svg\n aria-hidden=\"true\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n class=\"checkbox-icon\"\n focusable=\"false\"\n >\n <rect\n x=\"1\"\n y=\"1\"\n width=\"18\"\n height=\"18\"\n rx=\"3\"\n />\n {(this.checked || this.indeterminate) && this.renderCheckBoxSVGFill()}\n </svg>\n );\n }\n\n renderCheckBoxSVGFill() {\n if (this.indeterminate) {\n return (\n <line\n class=\"checkbox-fill indeterminate-fill\"\n x1=\"4\"\n y1=\"10\"\n x2=\"16\"\n y2=\"10\"\n />\n );\n }\n return (\n <polyline\n class=\"checkbox-fill checked-fill\"\n points=\"5 11 8.5 14.5 15 6\"\n key={`checkmark-${this.checked}`}\n />\n );\n }\n\n renderToggleSVG() {\n return (\n <div class=\"toggle-svg-container\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 38 24\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <rect\n width=\"38\"\n height=\"24\"\n rx=\"12\"\n ></rect>\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 18 18\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <defs>\n {/* Mask for the X icon */}\n <mask\n id=\"xMask\"\n maskUnits=\"userSpaceOnUse\"\n >\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n ></rect>\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"6.5\"\n x2=\"11.5\"\n y2=\"11.5\"\n stroke=\"black\"\n stroke-width=\"2\"\n ></line>\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"11.5\"\n x2=\"11.5\"\n y2=\"6.5\"\n stroke=\"black\"\n stroke-width=\"2\"\n ></line>\n </mask>\n {/* Mask for the checkmark icon */}\n <mask id=\"checkMask\">\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n />\n <polyline\n class=\"toggle-icon\"\n points=\"6,8.5 8.5,11 12.5,6.5\"\n fill=\"none\"\n />\n </mask>\n </defs>\n <circle\n class=\"toggle-circle\"\n cx=\"9\"\n cy=\"9\"\n r=\"9\"\n mask=\"url(#xMask)\"\n ></circle>\n </svg>\n </div>\n );\n }\n\n render() {\n const textLabelClasses = ['label-text'];\n if (this.hideLabel) textLabelClasses.push('sr');\n return (\n <div class=\"container\">\n <input\n ref={el => (this.inputElement = el)}\n aria-describedby={this.description ? 'description' : undefined}\n aria-invalid={this.hasError === undefined ? undefined : `${this.hasError}`}\n checked={this.indeterminate || this.checked || false}\n class=\"sr\"\n disabled={!!this.disabled || !!this.groupDisabled}\n id={this._id}\n name={this.name || this._id}\n onClick={this.onInputClick}\n test-id=\"q2CheckboxInnerCheckBox\"\n type=\"checkbox\"\n value={this.value}\n />\n <label\n htmlFor={this._id}\n class=\"label-control\"\n test-id=\"checkboxButton\"\n aria-label={loc(this.label)}\n >\n {this.renderCheckboxSVG()}\n </label>\n <div class={textLabelClasses.join(' ')}>\n <label\n test-id=\"checkboxLabel\"\n htmlFor={this._id}\n aria-hidden=\"true\"\n >\n <div class=\"label-content\">\n {loc(this.label)}\n <slot />\n </div>\n </label>\n </div>\n {this.description && (\n <div\n class=\"description-text\"\n test-id=\"checkboxDescription\"\n id=\"description\"\n >\n {loc(this.description)}\n </div>\n )}\n </div>\n );\n }\n\n // #endregion\n}\n"],"version":3}
|
|
@@ -205,7 +205,7 @@ const Q2EditableField$1 = /*@__PURE__*/ proxyCustomElement(class Q2EditableField
|
|
|
205
205
|
return `q2-editable-field-wrapper ${this.editing ? 'editing' : ''}`;
|
|
206
206
|
}
|
|
207
207
|
generateEditStateDOM() {
|
|
208
|
-
return (h("div", { class: this.wrapperClass, hidden: !this.editing }, h("q2-input", { ref: el => (this.inputElement = el), label: this.locLabel, hideLabel: this.hideLabel, value: this.value, hints: this.hasHints ? this.hints : undefined, errors: this.hasErrors ? this.errors : undefined, type: this.type, disabled: this.disabled, formatModifier: this.formatModifier, maxlength: this.maxlength, "test-id": "editableInput", onInput: e => e.stopImmediatePropagation(), onTctInput: this.inputInput, onTctChange: this.inputChange, onKeyDown: this.inputKeyDown, onClick: this.inputClick }), h("q2-btn", { ref: el => (this.cancelBtnElement = el), class: "cancel-edit", label: `${loc('tecton.element.editableField.cancel')} ${this.locLabel}`, "hide-label": true, "test-id": "cancelButton", onClick: e => e.stopImmediatePropagation(), onTctClick: this.cancelClick }, h("q2-icon", { type: "close" })), h("q2-btn", { ref: el => (this.saveBtnElement = el), class: "save-edit", label: `${loc('tecton.element.editableField.save')} ${this.locLabel}`, "hide-label": true, "test-id": "saveButton", onClick: e => e.stopImmediatePropagation(), onTctClick: this.saveClick }, h("q2-icon", { type: "checkmark" }))));
|
|
208
|
+
return (h("div", { class: this.wrapperClass, hidden: !this.editing }, h("q2-input", { ref: el => (this.inputElement = el), label: this.locLabel, hideLabel: this.hideLabel, value: this.value, hints: this.hasHints ? this.hints : undefined, errors: this.hasErrors ? this.errors : undefined, type: this.type, disabled: this.disabled, formatModifier: this.formatModifier, maxlength: this.maxlength, "test-id": "editableInput", onChange: e => e.stopImmediatePropagation(), onInput: e => e.stopImmediatePropagation(), onTctInput: this.inputInput, onTctChange: this.inputChange, onKeyDown: this.inputKeyDown, onClick: this.inputClick }), h("q2-btn", { ref: el => (this.cancelBtnElement = el), class: "cancel-edit", label: `${loc('tecton.element.editableField.cancel')} ${this.locLabel}`, "hide-label": true, "test-id": "cancelButton", onClick: e => e.stopImmediatePropagation(), onTctClick: this.cancelClick }, h("q2-icon", { type: "close" })), h("q2-btn", { ref: el => (this.saveBtnElement = el), class: "save-edit", label: `${loc('tecton.element.editableField.save')} ${this.locLabel}`, "hide-label": true, "test-id": "saveButton", onClick: e => e.stopImmediatePropagation(), onTctClick: this.saveClick }, h("q2-icon", { type: "checkmark" }))));
|
|
209
209
|
}
|
|
210
210
|
generateReadStateDOM() {
|
|
211
211
|
if (this.persistentLabel && this.locLabel) {
|
|
@@ -216,7 +216,7 @@ const Q2EditableField$1 = /*@__PURE__*/ proxyCustomElement(class Q2EditableField
|
|
|
216
216
|
// #endregion
|
|
217
217
|
// #region Render Methods
|
|
218
218
|
render() {
|
|
219
|
-
return (h("div", { key: '
|
|
219
|
+
return (h("div", { key: 'dfabd2ca37dc085e1d01e31b1229909eb582988b' }, this.generateEditStateDOM(), this.generateReadStateDOM()));
|
|
220
220
|
}
|
|
221
221
|
get hostElement() { return this; }
|
|
222
222
|
static get watchers() { return {
|