igniteui-webcomponents 3.3.0 → 3.4.0
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/CHANGELOG.md +24 -0
- package/README.md +7 -2
- package/components/accordion/accordion.js +3 -1
- package/components/accordion/accordion.js.map +1 -1
- package/components/button/button-base.js +7 -2
- package/components/button/button-base.js.map +1 -1
- package/components/button/themes/button/light/button.base.css.js +1 -1
- package/components/button/themes/button/light/button.base.css.js.map +1 -1
- package/components/button/themes/button/light/button.material.css.js +1 -1
- package/components/button/themes/button/light/button.material.css.js.map +1 -1
- package/components/calendar/common/calendar-base.js +3 -1
- package/components/calendar/common/calendar-base.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +2 -0
- package/components/calendar/days-view/days-view.js +17 -5
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/checkbox/checkbox-base.js +7 -2
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/chip/chip.d.ts +1 -0
- package/components/chip/chip.js +9 -0
- package/components/chip/chip.js.map +1 -1
- package/components/common/decorators/blazorDeepImport.d.ts +4 -0
- package/components/common/decorators/blazorDeepImport.js +2 -0
- package/components/common/decorators/blazorDeepImport.js.map +1 -0
- package/components/common/util.d.ts +1 -0
- package/components/common/util.js +3 -0
- package/components/common/util.js.map +1 -1
- package/components/dialog/dialog.d.ts +69 -0
- package/components/dialog/dialog.js +168 -0
- package/components/dialog/dialog.js.map +1 -0
- package/components/dialog/themes/light/dialog.base.css.d.ts +1 -0
- package/components/dialog/themes/light/dialog.base.css.js +3 -0
- package/components/dialog/themes/light/dialog.base.css.js.map +1 -0
- package/components/dialog/themes/light/dialog.bootstrap.css.d.ts +1 -0
- package/components/dialog/themes/light/dialog.bootstrap.css.js +3 -0
- package/components/dialog/themes/light/dialog.bootstrap.css.js.map +1 -0
- package/components/dialog/themes/light/dialog.fluent.css.d.ts +1 -0
- package/components/dialog/themes/light/dialog.fluent.css.js +3 -0
- package/components/dialog/themes/light/dialog.fluent.css.js.map +1 -0
- package/components/dialog/themes/light/dialog.indigo.css.d.ts +1 -0
- package/components/dialog/themes/light/dialog.indigo.css.js +3 -0
- package/components/dialog/themes/light/dialog.indigo.css.js.map +1 -0
- package/components/dialog/themes/light/dialog.material.css.d.ts +1 -0
- package/components/dialog/themes/light/dialog.material.css.js +3 -0
- package/components/dialog/themes/light/dialog.material.css.js.map +1 -0
- package/components/dropdown/dropdown-group.d.ts +2 -2
- package/components/dropdown/dropdown-group.js +1 -1
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown-header.d.ts +1 -1
- package/components/dropdown/dropdown-header.js.map +1 -1
- package/components/dropdown/dropdown-item.d.ts +1 -1
- package/components/dropdown/dropdown-item.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +10 -8
- package/components/dropdown/dropdown.js +15 -10
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/dropdown/themes/light/dropdown-group.base.css.js +1 -1
- package/components/dropdown/themes/light/dropdown-group.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown-group.fluent.css.js +1 -1
- package/components/dropdown/themes/light/dropdown-group.fluent.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown-item.base.css.js +1 -1
- package/components/dropdown/themes/light/dropdown-item.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown.base.css.js +1 -1
- package/components/dropdown/themes/light/dropdown.base.css.js.map +1 -1
- package/components/dropdown/themes/light/dropdown.fluent.css.js +1 -1
- package/components/dropdown/themes/light/dropdown.fluent.css.js.map +1 -1
- package/components/form/form.js +4 -3
- package/components/form/form.js.map +1 -1
- package/components/icon/icon.js +3 -1
- package/components/icon/icon.js.map +1 -1
- package/components/input/input-base.js +3 -1
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +1 -0
- package/components/input/input.js +5 -0
- package/components/input/input.js.map +1 -1
- package/components/input/themes/light/input.base.css.js +1 -1
- package/components/input/themes/light/input.base.css.js.map +1 -1
- package/components/input/themes/light/input.bootstrap.css.js +1 -1
- package/components/input/themes/light/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/light/input.fluent.css.js +1 -1
- package/components/input/themes/light/input.fluent.css.js.map +1 -1
- package/components/input/themes/light/input.indigo.css.js +1 -1
- package/components/input/themes/light/input.indigo.css.js.map +1 -1
- package/components/mask-input/mask-input-base.js +7 -2
- package/components/mask-input/mask-input-base.js.map +1 -1
- package/components/progress/linear-progress.js +1 -0
- package/components/progress/linear-progress.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.fluent.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.fluent.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.indigo.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.indigo.css.js.map +1 -1
- package/components/radio-group/radio-group.d.ts +0 -1
- package/components/radio-group/radio-group.js +7 -6
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating.d.ts +21 -9
- package/components/rating/rating.js +50 -33
- package/components/rating/rating.js.map +1 -1
- package/components/select/select-group.d.ts +31 -0
- package/components/select/select-group.js +69 -0
- package/components/select/select-group.js.map +1 -0
- package/components/select/select-header.d.ts +15 -0
- package/components/select/select-header.js +5 -0
- package/components/select/select-header.js.map +1 -0
- package/components/select/select-item.d.ts +30 -0
- package/components/select/select-item.js +39 -0
- package/components/select/select-item.js.map +1 -0
- package/components/select/select.d.ts +112 -0
- package/components/select/select.js +343 -0
- package/components/select/select.js.map +1 -0
- package/components/select/themes/dark/select.bootstrap.css.d.ts +1 -0
- package/components/select/themes/dark/select.bootstrap.css.js +3 -0
- package/components/select/themes/dark/select.bootstrap.css.js.map +1 -0
- package/components/select/themes/dark/select.fluent.css.d.ts +1 -0
- package/components/select/themes/dark/select.fluent.css.js +3 -0
- package/components/select/themes/dark/select.fluent.css.js.map +1 -0
- package/components/select/themes/dark/select.indigo.css.d.ts +1 -0
- package/components/select/themes/dark/select.indigo.css.js +3 -0
- package/components/select/themes/dark/select.indigo.css.js.map +1 -0
- package/components/select/themes/dark/select.material.css.d.ts +1 -0
- package/components/select/themes/dark/select.material.css.js +3 -0
- package/components/select/themes/dark/select.material.css.js.map +1 -0
- package/components/select/themes/light/select.base.css.d.ts +1 -0
- package/components/select/themes/light/select.base.css.js +3 -0
- package/components/select/themes/light/select.base.css.js.map +1 -0
- package/components/select/themes/light/select.bootstrap.css.d.ts +1 -0
- package/components/select/themes/light/select.bootstrap.css.js +3 -0
- package/components/select/themes/light/select.bootstrap.css.js.map +1 -0
- package/components/select/themes/light/select.fluent.css.d.ts +1 -0
- package/components/select/themes/light/select.fluent.css.js +3 -0
- package/components/select/themes/light/select.fluent.css.js.map +1 -0
- package/components/select/themes/light/select.indigo.css.d.ts +1 -0
- package/components/select/themes/light/select.indigo.css.js +3 -0
- package/components/select/themes/light/select.indigo.css.js.map +1 -0
- package/components/select/themes/light/select.material.css.d.ts +1 -0
- package/components/select/themes/light/select.material.css.js +3 -0
- package/components/select/themes/light/select.material.css.js.map +1 -0
- package/components/slider/range-slider.d.ts +2 -0
- package/components/slider/range-slider.js +61 -0
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.d.ts +7 -8
- package/components/slider/slider-base.js +8 -8
- package/components/slider/slider-base.js.map +1 -1
- package/components/tabs/tabs.d.ts +0 -1
- package/components/tabs/tabs.js +7 -9
- package/components/tabs/tabs.js.map +1 -1
- package/components/toast/toast.d.ts +1 -0
- package/components/toast/toast.js +9 -0
- package/components/toast/toast.js.map +1 -1
- package/components/toggle/toggle.controller.d.ts +7 -2
- package/components/toggle/toggle.controller.js +21 -20
- package/components/toggle/toggle.controller.js.map +1 -1
- package/components/tree/themes/light/tree.base.css.js +1 -1
- package/components/tree/themes/light/tree.base.css.js.map +1 -1
- package/custom-elements.json +613 -14
- package/index.d.ts +5 -0
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/themes/dark/bootstrap.css +1 -1
- package/themes/dark/fluent.css +1 -1
- package/themes/dark/indigo.css +1 -1
- package/themes/dark/material.css +1 -1
- package/vscode-html-custom-data.json +282 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/components/form/form.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAkBxE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,iBAAiB,CAG7D,UAAU,CAAC;IAkCX;QACE,KAAK,EAAE,CAAC;QA1BF,yBAAoB,GAAG;YAC7B,OAAO;YACP,OAAO;YACP,WAAW;YACX,YAAY;YACZ,cAAc;SACf,CAAC;QACM,uBAAkB,GAAG;YAC3B,OAAO;YACP,WAAW;YACX,gBAAgB;YAChB,UAAU;YACV,YAAY;YACZ,qBAAqB;SACtB,CAAC;QACM,wBAAmB,GAAG;YAC5B,OAAO;YACP,QAAQ;YACR,YAAY;YACZ,iBAAiB;SAClB,CAAC;QAGiD,eAAU,GAAG,KAAK,CAAC;QAKpE,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAIM,MAAM;QACX,MAAM,QAAQ,GAAG,IAAI,CAAC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AAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACtE,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ,EAC7C;YACA,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;aAAM,IAAI,CAAA,MAAA,aAAa,CAAC,IAAI,0CAAE,WAAW,EAAE,MAAK,OAAO,EAAE;YACxD,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAhKsB,wBAAO,GAAG,UAAU,CAAC;AAE9B,uBAAM,GAAG,GAAG,CAAA;;;;GAIzB,CAAC;AAyB0C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA2B;AAUtE;IADC,aAAa,CAAC,eAAe,CAAC;8CAS9B;AAID;IADC,aAAa,CAAC,cAAc,CAAC;6CA6B7B;AAsBD;IADC,cAAc,EAAE;mDA8BhB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { Constructor } from '../common/mixins/constructor.js';\nimport { alternateName } from '../common/decorators/alternateName.js';\nimport { blazorSuppress } from '../common/decorators/blazorSuppress.js';\n\nexport interface IgcFormEventMap {\n igcSubmit: CustomEvent<FormData>;\n igcReset: CustomEvent;\n}\n\n/**\n * The form is a component used to collect user input from\n * interactive controls.\n *\n * @element igc-form\n *\n * @slot - Default slot for the form.\n *\n * @fires igcSubmit - Emitted when the form is submitted.\n * @fires igcReset - Emitted when the form is reset.\n */\nexport default class IgcFormComponent extends EventEmitterMixin<\n IgcFormEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-form';\n\n public static styles = css`\n :host {\n display: block;\n }\n `;\n\n private _controlsWithChecked = [\n 'input',\n 'radio',\n 'igc-radio',\n 'igc-switch',\n 'igc-checkbox',\n ];\n private _controlsWithValue = [\n 'input',\n 'igc-input',\n 'igc-mask-input',\n 'textarea',\n 'igc-rating',\n 'igc-date-time-input',\n ];\n private _controlsThatSubmit = [\n 'input',\n 'button',\n 'igc-button',\n 'igc-icon-button',\n ];\n\n /** Specifies if form data validation should be skipped on submit. */\n @property({ type: Boolean, reflect: true }) public novalidate = false;\n\n constructor() {\n super();\n\n this.addEventListener('click', this.handleClick);\n }\n\n /** Submits the form. */\n @alternateName('performSubmit')\n public submit(): boolean {\n const formData = this.getFormData();\n if (!this.novalidate && !this.reportValidity()) {\n return false;\n }\n\n this.emitEvent('igcSubmit', { detail: formData });\n return true;\n }\n\n /** Resets the form. */\n @alternateName('performReset')\n public reset() {\n const formElements = this.getFormElements();\n formElements.forEach((element) => {\n const tagName = element.tagName.toLowerCase();\n if (tagName === 'select') {\n for (let i = 0; i < element.options.length; i++) {\n const option = element.options[i];\n option.selected = option.defaultSelected;\n }\n } else if (\n (tagName === 'input' &&\n (element.type === 'checkbox' || element.type == 'radio')) ||\n (tagName !== 'input' && this._controlsWithChecked.includes(tagName))\n ) {\n element.checked = element.hasAttribute('checked');\n } else if (\n tagName === 'igc-input' ||\n tagName === 'igc-rating' ||\n tagName === 'igc-mask-input' ||\n tagName === 'igc-date-time-input'\n ) {\n element.value = element.getAttribute('value');\n } else if (this._controlsWithValue.includes(tagName)) {\n element.value = element.defaultValue;\n }\n });\n\n this.emitEvent('igcReset');\n }\n\n private getFormElements(): any[] {\n const slot = this.shadowRoot?.querySelector('slot');\n const assignedElements = slot?.assignedElements({ flatten: true });\n const formElements: any[] = [];\n assignedElements?.forEach((element: any) => {\n if (!element.disabled) {\n formElements.push(element);\n }\n const children = Array.from(element.getElementsByTagName('*')).filter(\n (element: any) => !element.disabled\n );\n formElements.push(...children);\n });\n\n return formElements;\n }\n\n //suppressing in blazor for now due to an issue, bringing it back later\n /** Retrieves the data from the form in the format of a FormData object. */\n @blazorSuppress()\n public getFormData() {\n const formData = new FormData();\n\n const formElements = this.getFormElements();\n formElements.forEach((element) => {\n const tagName = element.tagName.toLowerCase();\n if (tagName === 'select') {\n for (let i = 0; i < element.options.length; i++) {\n const option = element.options[i];\n if (option.selected) {\n formData.append(element.name, option.value);\n }\n }\n } else if (\n this._controlsWithChecked.includes(tagName) &&\n element.checked\n ) {\n formData.append(element.name, element.value || 'on');\n } else if (\n this._controlsWithValue.includes(tagName) &&\n element.type !== 'checkbox' &&\n element.type !== 'radio' &&\n element.type !== 'submit'\n ) {\n formData.append(element.name, element.value);\n }\n });\n\n return formData;\n }\n\n /** Checks for validity of the form. */\n public reportValidity(): boolean {\n const formElements = this.getFormElements();\n return !formElements.some(\n (element) =>\n typeof element.reportValidity === 'function' &&\n element.reportValidity() === false\n );\n }\n\n private handleClick(event: MouseEvent) {\n const targetElement: any = event.target as HTMLElement;\n if (\n this._controlsThatSubmit.includes(targetElement.tagName.toLowerCase()) &&\n targetElement.type.toLowerCase() === 'submit'\n ) {\n this.submit();\n } else if (targetElement.type?.toLowerCase() === 'reset') {\n this.reset();\n }\n\n return true;\n }\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-form': IgcFormComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/components/form/form.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAkBxE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,iBAAiB,CAG7D,UAAU,CAAC;IAmCX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EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aAC9C;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAGM,cAAc;QACnB,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC5C,OAAO,CAAC,YAAY,CAAC,IAAI,CACvB,CAAC,OAAO,EAAE,EAAE,CACV,OAAO,OAAO,CAAC,cAAc,KAAK,UAAU;YAC5C,OAAO,CAAC,cAAc,EAAE,KAAK,KAAK,CACrC,CAAC;IACJ,CAAC;IAEO,WAAW,CAAC,KAAiB;;QACnC,MAAM,aAAa,GAAQ,KAAK,CAAC,MAAqB,CAAC;QACvD,IACE,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACtE,CAAA,MAAA,aAAa,CAAC,IAAI,0CAAE,WAAW,EAAE,MAAK,QAAQ,EAC9C;YACA,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;aAAM,IAAI,CAAA,MAAA,aAAa,CAAC,IAAI,0CAAE,WAAW,EAAE,MAAK,OAAO,EAAE;YACxD,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAjKsB,wBAAO,GAAG,UAAU,CAAC;AAE9B,uBAAM,GAAG,GAAG,CAAA;;;;GAIzB,CAAC;AA0B0C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA2B;AAUtE;IADC,aAAa,CAAC,eAAe,CAAC;8CAS9B;AAID;IADC,aAAa,CAAC,cAAc,CAAC;6CA6B7B;AAsBD;IADC,cAAc,EAAE;mDA8BhB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { Constructor } from '../common/mixins/constructor.js';\nimport { alternateName } from '../common/decorators/alternateName.js';\nimport { blazorSuppress } from '../common/decorators/blazorSuppress.js';\n\nexport interface IgcFormEventMap {\n igcSubmit: CustomEvent<FormData>;\n igcReset: CustomEvent;\n}\n\n/**\n * The form is a component used to collect user input from\n * interactive controls.\n *\n * @element igc-form\n *\n * @slot - Default slot for the form.\n *\n * @fires igcSubmit - Emitted when the form is submitted.\n * @fires igcReset - Emitted when the form is reset.\n */\nexport default class IgcFormComponent extends EventEmitterMixin<\n IgcFormEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-form';\n\n public static styles = css`\n :host {\n display: block;\n }\n `;\n\n private _controlsWithChecked = [\n 'input',\n 'radio',\n 'igc-radio',\n 'igc-switch',\n 'igc-checkbox',\n ];\n private _controlsWithValue = [\n 'input',\n 'igc-input',\n 'igc-mask-input',\n 'textarea',\n 'igc-rating',\n 'igc-select',\n 'igc-date-time-input',\n ];\n private _controlsThatSubmit = [\n 'input',\n 'button',\n 'igc-button',\n 'igc-icon-button',\n ];\n\n /** Specifies if form data validation should be skipped on submit. */\n @property({ type: Boolean, reflect: true }) public novalidate = false;\n\n constructor() {\n super();\n\n this.addEventListener('click', this.handleClick);\n }\n\n /** Submits the form. */\n @alternateName('performSubmit')\n public submit(): boolean {\n const formData = this.getFormData();\n if (!this.novalidate && !this.reportValidity()) {\n return false;\n }\n\n this.emitEvent('igcSubmit', { detail: formData });\n return true;\n }\n\n /** Resets the form. */\n @alternateName('performReset')\n public reset() {\n const formElements = this.getFormElements();\n formElements.forEach((element) => {\n const tagName = element.tagName.toLowerCase();\n if (tagName === 'select') {\n for (let i = 0; i < element.options.length; i++) {\n const option = element.options[i];\n option.selected = option.defaultSelected;\n }\n } else if (\n (tagName === 'input' &&\n (element.type === 'checkbox' || element.type == 'radio')) ||\n (tagName !== 'input' && this._controlsWithChecked.includes(tagName))\n ) {\n element.checked = element.hasAttribute('checked');\n } else if (\n tagName === 'igc-input' ||\n tagName === 'igc-rating' ||\n tagName === 'igc-mask-input' ||\n tagName === 'igc-date-time-input'\n ) {\n element.value = element.getAttribute('value');\n } else if (this._controlsWithValue.includes(tagName)) {\n element.value = element.defaultValue;\n }\n });\n\n this.emitEvent('igcReset');\n }\n\n private getFormElements(): any[] {\n const slot = this.shadowRoot?.querySelector('slot');\n const assignedElements = slot?.assignedElements({ flatten: true });\n const formElements: any[] = [];\n assignedElements?.forEach((element: any) => {\n if (!element.disabled) {\n formElements.push(element);\n }\n const children = Array.from(element.getElementsByTagName('*')).filter(\n (element: any) => !element.disabled\n );\n formElements.push(...children);\n });\n\n return formElements;\n }\n\n //suppressing in blazor for now due to an issue, bringing it back later\n /** Retrieves the data from the form in the format of a FormData object. */\n @blazorSuppress()\n public getFormData() {\n const formData = new FormData();\n\n const formElements = this.getFormElements();\n formElements.forEach((element) => {\n const tagName = element.tagName.toLowerCase();\n if (tagName === 'select') {\n for (let i = 0; i < element.options.length; i++) {\n const option = element.options[i];\n if (option.selected) {\n formData.append(element.name, option.value);\n }\n }\n } else if (\n this._controlsWithChecked.includes(tagName) &&\n element.checked\n ) {\n formData.append(element.name, element.value || 'on');\n } else if (\n this._controlsWithValue.includes(tagName) &&\n element.type !== 'checkbox' &&\n element.type !== 'radio' &&\n element.type !== 'submit'\n ) {\n formData.append(element.name, element.value);\n }\n });\n\n return formData;\n }\n\n /** Checks for validity of the form. */\n public reportValidity(): boolean {\n const formElements = this.getFormElements();\n return !formElements.some(\n (element) =>\n typeof element.reportValidity === 'function' &&\n element.reportValidity() === false\n );\n }\n\n private handleClick(event: MouseEvent) {\n const targetElement: any = event.target as HTMLElement;\n if (\n this._controlsThatSubmit.includes(targetElement.tagName.toLowerCase()) &&\n targetElement.type?.toLowerCase() === 'submit'\n ) {\n this.submit();\n } else if (targetElement.type?.toLowerCase() === 'reset') {\n this.reset();\n }\n\n return true;\n }\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-form': IgcFormComponent;\n }\n}\n"]}
|
package/components/icon/icon.js
CHANGED
|
@@ -46,7 +46,9 @@ export default class IgcIconComponent extends SizableMixin(LitElement) {
|
|
|
46
46
|
}
|
|
47
47
|
connectedCallback() {
|
|
48
48
|
super.connectedCallback();
|
|
49
|
-
this.
|
|
49
|
+
if (!this.hasAttribute('role')) {
|
|
50
|
+
this.setAttribute('role', 'img');
|
|
51
|
+
}
|
|
50
52
|
IconsRegistry.instance().subscribe(this.iconLoaded);
|
|
51
53
|
}
|
|
52
54
|
disconnectedCallback() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/icon/icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACL,aAAa,EACb,YAAY,IAAI,iBAAiB,EACjC,oBAAoB,IAAI,yBAAyB,GAClD,MAAM,oBAAoB,CAAC;AAS5B,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY,CAAC,UAAU,CAAC;IAqDpE;QACE,KAAK,EAAE,CAAC;QAjDO,QAAG,GAAG,EAAE,CAAC;QAElB,UAAK,GAAG,EAAE,CAAC;QAEX,gBAAW,GAAG,SAAS,CAAC;QA0CzB,aAAQ,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRo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;IACjD,CAAC;IAGS,oBAAoB,CAC5B,IAAY,EACZ,QAAgB,EAChB,UAAU,GAAG,SAAS;QAEtB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC;;AAxGsB,wBAAO,GAAG,UAAU,CAAC;AAErB,uBAAM,GAAG,MAAM,CAAC;AAE9B;IAAR,KAAK,EAAE;6CAAkB;AAQ1B;IAFC,QAAQ,EAAE;IACV,aAAa,CAAC,UAAU,CAAC;4CAMzB;AAyBD;IADC,QAAQ,EAAE;kDAGV;AAMD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACnB;AAuCxB;IADC,aAAa,EAAE;oDAOf;AAGD;IADC,aAAa,EAAE;4DAOf","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport { alternateName } from '../common/decorators/alternateName.js';\nimport { blazorInclude } from '../common/decorators/blazorInclude.js';\nimport { SizableMixin } from '../common/mixins/sizable.js';\nimport { styles } from './icon.material.css.js';\nimport {\n IconsRegistry,\n registerIcon as registerIcon_impl,\n registerIconFromText as registerIconFromText_impl,\n} from './icon.registry.js';\n\n/**\n * Icon component\n *\n * @element igc-icon\n *\n *\n */\nexport default class IgcIconComponent extends SizableMixin(LitElement) {\n public static readonly tagName = 'igc-icon';\n\n public static override styles = styles;\n\n @state() private svg = '';\n\n private _name = '';\n\n private _collection = 'default';\n\n @property()\n @alternateName('iconName')\n public set name(value: string) {\n if (this._name !== value) {\n this._name = value;\n this.getIcon();\n }\n }\n\n /**\n * The name of the icon glyph to draw.\n *\n * @attr [name=\"\"]\n */\n public get name(): string {\n return this._name;\n }\n\n public set collection(value: string) {\n if (this._collection !== value) {\n this._collection = value;\n this.getIcon();\n }\n }\n\n /**\n * The name of the registered collection for look up of icons.\n * Defaults to `default`.\n *\n * @attr [collection=default]\n */\n @property()\n public get collection(): string {\n return this._collection;\n }\n\n /**\n * Whether to flip the icon. Useful for RTL layouts.\n */\n @property({ type: Boolean, reflect: true })\n public mirrored = false;\n\n constructor() {\n super();\n this.size = 'medium';\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n IconsRegistry.instance().subscribe(this.iconLoaded);\n }\n\n public override disconnectedCallback() {\n super.disconnectedCallback();\n IconsRegistry.instance().unsubscribe(this.iconLoaded);\n }\n\n private iconLoaded = (name: string, collection: string) => {\n if (this.name === name && this.collection === collection) {\n this.getIcon();\n }\n };\n\n private getIcon() {\n const svg =\n this._name && this._collection\n ? IconsRegistry.instance().getIcon(this._name, this._collection)\n : '';\n this.svg = svg ?? '';\n }\n\n protected override render() {\n return html` ${unsafeSVG(this.svg)} `;\n }\n\n @blazorInclude()\n protected async registerIcon(\n name: string,\n url: string,\n collection = 'default'\n ) {\n await registerIcon_impl(name, url, collection);\n }\n\n @blazorInclude()\n protected registerIconFromText(\n name: string,\n iconText: string,\n collection = 'default'\n ) {\n registerIconFromText_impl(name, iconText, collection);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-icon': IgcIconComponent;\n }\n}\n"]}
|
|
@@ -9,6 +9,7 @@ import { html, LitElement, nothing } from 'lit';
|
|
|
9
9
|
import { property, query, queryAssignedElements } from 'lit/decorators.js';
|
|
10
10
|
import { themes } from '../../theming/theming-decorator.js';
|
|
11
11
|
import { alternateName } from '../common/decorators/alternateName.js';
|
|
12
|
+
import { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';
|
|
12
13
|
import { blazorSuppress } from '../common/decorators/blazorSuppress.js';
|
|
13
14
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
14
15
|
import { SizableMixin } from '../common/mixins/sizable.js';
|
|
@@ -164,7 +165,8 @@ __decorate([
|
|
|
164
165
|
alternateName('blurComponent')
|
|
165
166
|
], IgcInputBaseComponent.prototype, "blur", null);
|
|
166
167
|
IgcInputBaseComponent = IgcInputBaseComponent_1 = __decorate([
|
|
167
|
-
themes({ bootstrap, material, fluent, indigo })
|
|
168
|
+
themes({ bootstrap, material, fluent, indigo }),
|
|
169
|
+
blazorDeepImport
|
|
168
170
|
], IgcInputBaseComponent);
|
|
169
171
|
export { IgcInputBaseComponent };
|
|
170
172
|
//# sourceMappingURL=input-base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-base.js","sourceRoot":"","sources":["../../../src/components/input/input-base.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAY1E,IAAsB,qBAAqB,6BAA3C,MAAsB,qBACpB,SAAQ,YAAY,CAClB,iBAAiB,CAA4C,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,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACL;AAkBtB;IADC,aAAa,CAAC,gBAAgB,CAAC;kDAG/B;AAID;IADC,aAAa,CAAC,eAAe,CAAC;iDAG9B;AAzFmB,qBAAqB;IAD1C,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GAC1B,qBAAqB,CA2L1C;SA3LqB,qBAAqB","sourcesContent":["import { html, LitElement, nothing, TemplateResult } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport type { ReactiveTheme, ThemeController } from '../../theming/types.js';\nimport { alternateName } from '../common/decorators/alternateName.js';\nimport { blazorSuppress } from '../common/decorators/blazorSuppress.js';\nimport { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { SizableMixin } from '../common/mixins/sizable.js';\nimport { Direction } from '../common/types.js';\nimport { createCounter, partNameMap } from '../common/util.js';\nimport { styles } from './themes/light/input.base.css.js';\nimport { styles as bootstrap } from './themes/light/input.bootstrap.css.js';\nimport { styles as fluent } from './themes/light/input.fluent.css.js';\nimport { styles as indigo } from './themes/light/input.indigo.css.js';\nimport { styles as material } from './themes/light/input.material.css.js';\n\nexport interface IgcInputEventMap {\n /* alternateName: inputOcurred */\n igcInput: CustomEvent<string>;\n /* blazorSuppress */\n igcChange: CustomEvent<string>;\n igcFocus: CustomEvent<void>;\n igcBlur: CustomEvent<void>;\n}\n\n@themes({ bootstrap, material, fluent, indigo })\nexport abstract class IgcInputBaseComponent\n extends SizableMixin(\n EventEmitterMixin<IgcInputEventMap, Constructor<LitElement>>(LitElement)\n )\n implements ReactiveTheme\n{\n protected static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n public static styles = styles;\n private static readonly increment = createCounter();\n\n protected inputId = `input-${IgcInputBaseComponent.increment()}`;\n\n /** The value attribute of the control. */\n @blazorSuppress()\n public abstract value: string | Date | null;\n\n @query('input', true)\n protected input!: HTMLInputElement;\n\n @queryAssignedElements({ slot: 'prefix' })\n protected prefixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'suffix' })\n protected suffixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'helper-text' })\n protected helperText!: Array<HTMLElement>;\n\n protected themeController!: ThemeController;\n\n /** The direction attribute of the control. */\n @property({ reflect: true })\n @blazorSuppress()\n public override dir: Direction = 'auto';\n\n /** The name attribute of the control. */\n @property()\n public name!: string;\n\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /** Makes the control a required field. */\n @property({ reflect: true, type: Boolean })\n public required = false;\n\n /** Makes the control a disabled field. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Makes the control a readonly field. */\n @property({ reflect: true, type: Boolean })\n public readonly = false;\n\n /** The placeholder attribute of the control. */\n @property({ type: String })\n public placeholder!: string;\n\n /** The label for the control. */\n @property({ type: String })\n public label!: string;\n\n constructor() {\n super();\n this.size = 'medium';\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n this.shadowRoot!.addEventListener('slotchange', () => this.requestUpdate());\n }\n\n public themeAdopted(controller: ThemeController): void {\n this.themeController = controller;\n }\n\n /** Sets focus on the control. */\n @alternateName('focusComponent')\n public override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the control. */\n @alternateName('blurComponent')\n public override blur() {\n this.input.blur();\n }\n\n protected abstract renderInput(): TemplateResult;\n\n protected resolvePartNames(base: string) {\n return {\n [base]: true,\n prefixed: this.prefixes.length > 0,\n suffixed: this.suffixes.length > 0,\n filled: !!this.value,\n };\n }\n\n protected handleFocus() {\n this.emitEvent('igcFocus');\n }\n\n protected handleBlur() {\n this.emitEvent('igcBlur');\n }\n\n // protected handleChange() {\n // this.value = this.input.value;\n // this.emitEvent('igcChange', { detail: this.value });\n // }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: 'backward' | 'forward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the input. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n this.input.setRangeText(replacement, start, end, selectMode);\n }\n\n private renderPrefix() {\n return html`<div part=\"prefix\">\n <slot name=\"prefix\"></slot>\n </div>`;\n }\n\n private renderSuffix() {\n return html`<div part=\"suffix\">\n <slot name=\"suffix\"></slot>\n </div>`;\n }\n\n private renderLabel() {\n return this.label\n ? html`<label part=\"label\" for=\"${this.inputId}\"> ${this.label} </label>`\n : nothing;\n }\n\n private renderMaterial() {\n return html`\n <div\n part=\"${partNameMap({\n ...this.resolvePartNames('container'),\n labelled: this.label,\n })}\"\n >\n <div part=\"start\">${this.renderPrefix()}</div>\n ${this.renderInput()}\n <div part=\"notch\">${this.renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this.renderSuffix()}</div>\n </div>\n <div part=\"helper-text\" .hidden=\"${this.helperText.length == 0}\">\n <slot name=\"helper-text\"></slot>\n </div>\n `;\n }\n\n private renderStandard() {\n return html`${this.renderLabel()}\n <div part=\"${partNameMap(this.resolvePartNames('container'))}\">\n ${this.renderPrefix()} ${this.renderInput()} ${this.renderSuffix()}\n </div>\n <div part=\"helper-text\" .hidden=\"${this.helperText.length == 0}\">\n <slot name=\"helper-text\"></slot>\n </div>`;\n }\n\n protected override render() {\n return html`${this.themeController.theme === 'material'\n ? this.renderMaterial()\n : this.renderStandard()}`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"input-base.js","sourceRoot":"","sources":["../../../src/components/input/input-base.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAA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;IADC,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;uDACF;AAGxC;IADC,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;uDACF;AAGxC;IADC,qBAAqB,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;yDACL;AAO1C;IAFC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,cAAc,EAAE;kDACuB;AAIxC;IADC,QAAQ,EAAE;mDACU;AAGrB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACnB;AAIxB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACnB;AAIxB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACnB;AAIxB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACnB;AAIxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DACC;AAI5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACL;AAkBtB;IADC,aAAa,CAAC,gBAAgB,CAAC;kDAG/B;AAID;IADC,aAAa,CAAC,eAAe,CAAC;iDAG9B;AAzFmB,qBAAqB;IAF1C,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC/C,gBAAgB;GACK,qBAAqB,CA2L1C;SA3LqB,qBAAqB","sourcesContent":["import { html, LitElement, nothing, TemplateResult } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport type { ReactiveTheme, ThemeController } from '../../theming/types.js';\nimport { alternateName } from '../common/decorators/alternateName.js';\nimport { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';\nimport { blazorSuppress } from '../common/decorators/blazorSuppress.js';\nimport { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { SizableMixin } from '../common/mixins/sizable.js';\nimport { Direction } from '../common/types.js';\nimport { createCounter, partNameMap } from '../common/util.js';\nimport { styles } from './themes/light/input.base.css.js';\nimport { styles as bootstrap } from './themes/light/input.bootstrap.css.js';\nimport { styles as fluent } from './themes/light/input.fluent.css.js';\nimport { styles as indigo } from './themes/light/input.indigo.css.js';\nimport { styles as material } from './themes/light/input.material.css.js';\n\nexport interface IgcInputEventMap {\n /* alternateName: inputOcurred */\n igcInput: CustomEvent<string>;\n /* blazorSuppress */\n igcChange: CustomEvent<string>;\n igcFocus: CustomEvent<void>;\n igcBlur: CustomEvent<void>;\n}\n\n@themes({ bootstrap, material, fluent, indigo })\n@blazorDeepImport\nexport abstract class IgcInputBaseComponent\n extends SizableMixin(\n EventEmitterMixin<IgcInputEventMap, Constructor<LitElement>>(LitElement)\n )\n implements ReactiveTheme\n{\n protected static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n public static styles = styles;\n private static readonly increment = createCounter();\n\n protected inputId = `input-${IgcInputBaseComponent.increment()}`;\n\n /** The value attribute of the control. */\n @blazorSuppress()\n public abstract value: string | Date | null;\n\n @query('input', true)\n protected input!: HTMLInputElement;\n\n @queryAssignedElements({ slot: 'prefix' })\n protected prefixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'suffix' })\n protected suffixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'helper-text' })\n protected helperText!: Array<HTMLElement>;\n\n protected themeController!: ThemeController;\n\n /** The direction attribute of the control. */\n @property({ reflect: true })\n @blazorSuppress()\n public override dir: Direction = 'auto';\n\n /** The name attribute of the control. */\n @property()\n public name!: string;\n\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /** Makes the control a required field. */\n @property({ reflect: true, type: Boolean })\n public required = false;\n\n /** Makes the control a disabled field. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Makes the control a readonly field. */\n @property({ reflect: true, type: Boolean })\n public readonly = false;\n\n /** The placeholder attribute of the control. */\n @property({ type: String })\n public placeholder!: string;\n\n /** The label for the control. */\n @property({ type: String })\n public label!: string;\n\n constructor() {\n super();\n this.size = 'medium';\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n this.shadowRoot!.addEventListener('slotchange', () => this.requestUpdate());\n }\n\n public themeAdopted(controller: ThemeController): void {\n this.themeController = controller;\n }\n\n /** Sets focus on the control. */\n @alternateName('focusComponent')\n public override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the control. */\n @alternateName('blurComponent')\n public override blur() {\n this.input.blur();\n }\n\n protected abstract renderInput(): TemplateResult;\n\n protected resolvePartNames(base: string) {\n return {\n [base]: true,\n prefixed: this.prefixes.length > 0,\n suffixed: this.suffixes.length > 0,\n filled: !!this.value,\n };\n }\n\n protected handleFocus() {\n this.emitEvent('igcFocus');\n }\n\n protected handleBlur() {\n this.emitEvent('igcBlur');\n }\n\n // protected handleChange() {\n // this.value = this.input.value;\n // this.emitEvent('igcChange', { detail: this.value });\n // }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: 'backward' | 'forward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the input. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n this.input.setRangeText(replacement, start, end, selectMode);\n }\n\n private renderPrefix() {\n return html`<div part=\"prefix\">\n <slot name=\"prefix\"></slot>\n </div>`;\n }\n\n private renderSuffix() {\n return html`<div part=\"suffix\">\n <slot name=\"suffix\"></slot>\n </div>`;\n }\n\n private renderLabel() {\n return this.label\n ? html`<label part=\"label\" for=\"${this.inputId}\"> ${this.label} </label>`\n : nothing;\n }\n\n private renderMaterial() {\n return html`\n <div\n part=\"${partNameMap({\n ...this.resolvePartNames('container'),\n labelled: this.label,\n })}\"\n >\n <div part=\"start\">${this.renderPrefix()}</div>\n ${this.renderInput()}\n <div part=\"notch\">${this.renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this.renderSuffix()}</div>\n </div>\n <div part=\"helper-text\" .hidden=\"${this.helperText.length == 0}\">\n <slot name=\"helper-text\"></slot>\n </div>\n `;\n }\n\n private renderStandard() {\n return html`${this.renderLabel()}\n <div part=\"${partNameMap(this.resolvePartNames('container'))}\">\n ${this.renderPrefix()} ${this.renderInput()} ${this.renderSuffix()}\n </div>\n <div part=\"helper-text\" .hidden=\"${this.helperText.length == 0}\">\n <slot name=\"helper-text\"></slot>\n </div>`;\n }\n\n protected override render() {\n return html`${this.themeController.theme === 'material'\n ? this.renderMaterial()\n : this.renderStandard()}`;\n }\n}\n"]}
|
|
@@ -43,6 +43,7 @@ export default class IgcInputComponent extends IgcInputBaseComponent {
|
|
|
43
43
|
autofocus: boolean;
|
|
44
44
|
/** The autocomplete attribute of the control. */
|
|
45
45
|
autocomplete: string;
|
|
46
|
+
tabIndex: number;
|
|
46
47
|
/** Checks for validity of the control and shows the browser message if it's invalid. */
|
|
47
48
|
reportValidity(): boolean;
|
|
48
49
|
/** Replaces the selected text in the input. */
|
|
@@ -20,6 +20,7 @@ export default class IgcInputComponent extends IgcInputBaseComponent {
|
|
|
20
20
|
this.value = '';
|
|
21
21
|
this.type = 'text';
|
|
22
22
|
this.invalid = false;
|
|
23
|
+
this.tabIndex = 0;
|
|
23
24
|
}
|
|
24
25
|
reportValidity() {
|
|
25
26
|
return this.input.reportValidity();
|
|
@@ -71,6 +72,7 @@ export default class IgcInputComponent extends IgcInputBaseComponent {
|
|
|
71
72
|
?disabled="${this.disabled}"
|
|
72
73
|
?required="${this.required}"
|
|
73
74
|
?autofocus="${this.autofocus}"
|
|
75
|
+
tabindex=${this.tabIndex}
|
|
74
76
|
autocomplete="${ifDefined(this.autocomplete)}"
|
|
75
77
|
inputmode="${ifDefined(this.inputmode)}"
|
|
76
78
|
min="${ifDefined(this.min)}"
|
|
@@ -127,6 +129,9 @@ __decorate([
|
|
|
127
129
|
__decorate([
|
|
128
130
|
property()
|
|
129
131
|
], IgcInputComponent.prototype, "autocomplete", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: Number })
|
|
134
|
+
], IgcInputComponent.prototype, "tabIndex", void 0);
|
|
130
135
|
__decorate([
|
|
131
136
|
blazorSuppress()
|
|
132
137
|
], IgcInputComponent.prototype, "setRangeText", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAqBxD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,qBAAqB;IAApE;;QAKS,UAAK,GAAG,EAAE,CAAC;QAKX,SAAI,GAOC,MAAM,CAAC;QAoBZ,YAAO,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"input.js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1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACD;AAI1B;IADC,QAAQ,EAAE;8CACkB;AAI7B;IADC,QAAQ,EAAE;8CACkB;AAI7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACN;AAIrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACQ;AAIpC;IADC,QAAQ,EAAE;uDACkB;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACE;AAS7B;IADC,cAAc,EAAE;qDAShB;AA2CD;IADC,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;0DAK9C","sourcesContent":["import { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { alternateName } from '../common/decorators/alternateName.js';\nimport { blazorSuppress } from '../common/decorators/blazorSuppress.js';\nimport { blazorTwoWayBind } from '../common/decorators/blazorTwoWayBind.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { partNameMap } from '../common/util.js';\nimport { IgcInputBaseComponent } from './input-base.js';\n\n/**\n * @element igc-input\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n *\n * @fires igcInput - Emitted when the control input receives user input.\n * @fires igcChange - Emitted when the control's checked state changes.\n * @fires igcFocus - Emitted when the control gains focus.\n * @fires igcBlur - Emitted when the control loses focus.\n *\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart label - The native label element.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart helper-text - The helper text wrapper.\n */\nexport default class IgcInputComponent extends IgcInputBaseComponent {\n public static readonly tagName = 'igc-input';\n\n @property()\n @blazorTwoWayBind('igcChange', 'detail')\n public value = '';\n\n /** The type attribute of the control. */\n @alternateName('displayType')\n @property({ reflect: true })\n public type:\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'url' = 'text';\n\n /** The input mode attribute of the control. */\n @property()\n public inputmode!:\n | 'none'\n | 'txt'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n /** The pattern attribute of the control. */\n @property({ type: String })\n public pattern!: string;\n\n /** Controls the validity of the control. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** The minlength attribute of the control. */\n @property({ type: Number })\n public minlength!: number;\n\n /** The maxlength attribute of the control. */\n @property({ type: Number })\n public maxlength!: number;\n\n /** The min attribute of the control. */\n @property()\n public min!: number | string;\n\n /** The max attribute of the control. */\n @property()\n public max!: number | string;\n\n /** The step attribute of the control. */\n @property({ type: Number })\n public step!: number;\n\n /** The autofocus attribute of the control. */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /** The autocomplete attribute of the control. */\n @property()\n public autocomplete!: string;\n\n @property({ type: Number })\n public override tabIndex = 0;\n\n /** Checks for validity of the control and shows the browser message if it's invalid. */\n public reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Replaces the selected text in the input. */\n @blazorSuppress()\n public override setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n super.setRangeText(replacement, start, end, selectMode);\n this.value = this.input.value;\n }\n\n /**\n * Sets a custom validation message for the control.\n * As long as `message` is not empty, the control is considered invalid.\n */\n public setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.invalid = !this.input.checkValidity();\n }\n\n /** Selects all text within the input. */\n public select() {\n return this.input.select();\n }\n\n /** Increments the numeric value of the input by one or more steps. */\n public stepUp(n?: number) {\n this.input.stepUp(n);\n this.handleChange();\n }\n\n /** Decrements the numeric value of the input by one or more steps. */\n public stepDown(n?: number) {\n this.input.stepDown(n);\n this.handleChange();\n }\n\n private handleInvalid() {\n this.invalid = true;\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n protected handleValueChange() {\n this.updateComplete.then(\n () => (this.invalid = !this.input.checkValidity())\n );\n }\n\n protected renderInput() {\n return html`\n <input\n id=\"${this.inputId}\"\n part=\"${partNameMap(this.resolvePartNames('input'))}\"\n name=\"${ifDefined(this.name)}\"\n type=\"${ifDefined(this.type)}\"\n pattern=\"${ifDefined(this.pattern)}\"\n placeholder=\"${ifDefined(this.placeholder)}\"\n .value=\"${live(this.value)}\"\n ?readonly=\"${this.readonly}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n ?autofocus=\"${this.autofocus}\"\n tabindex=${this.tabIndex}\n autocomplete=\"${ifDefined(this.autocomplete as any)}\"\n inputmode=\"${ifDefined(this.inputmode)}\"\n min=\"${ifDefined(this.min)}\"\n max=\"${ifDefined(this.max)}\"\n minlength=\"${ifDefined(this.minlength)}\"\n maxlength=\"${ifDefined(this.maxlength)}\"\n step=\"${ifDefined(this.step)}\"\n aria-invalid=\"${this.invalid ? 'true' : 'false'}\"\n @invalid=\"${this.handleInvalid}\"\n @change=\"${this.handleChange}\"\n @input=\"${this.handleInput}\"\n @focus=\"${this.handleFocus}\"\n @blur=\"${this.handleBlur}\"\n />\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-input': IgcInputComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}[part~=suffixed] [part=suffix],[part~=prefixed] [part=prefix]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host{position:relative;display:block;font-family:var(--igc-font-family);outline-style:none}[part=label]{display:inline-block;white-space:nowrap}[part~=input]{width:100%;height:100%;border:none;outline-style:none;color:
|
|
2
|
+
export const styles = css `:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}[part~=suffixed] [part=suffix],[part~=prefixed] [part=prefix]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host{position:relative;display:block;font-family:var(--igc-font-family);outline-style:none}[part=label]{display:inline-block;white-space:nowrap}[part~=input]{width:100%;height:100%;border:none;outline-style:none;color:inherit;font-family:var(--igc-font-family);z-index:1}[part^=container]{position:relative;display:grid;color:hsla(var(--igc-gray-900), var(--igc-gray-a))}[part=prefix],[part=suffix]{display:none;overflow:hidden}:host([required]) [part=label]::after{content:"*"}[part=helper-text]{font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom)}:host([size=large]) [part~=input],:host([size=large]) [part~=container]{height:3.5rem}:host([size=medium]) [part~=input],:host([size=medium]) [part~=container]{height:3rem}:host([size=small]) [part~=input],:host([size=small]) [part~=container]{height:2.5rem}`;
|
|
3
3
|
//# sourceMappingURL=input.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.base.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"input.base.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,mlEAAmlE,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}[part~=suffixed] [part=suffix],[part~=prefixed] [part=prefix]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host{position:relative;display:block;font-family:var(--igc-font-family);outline-style:none}[part=label]{display:inline-block;white-space:nowrap}[part~=input]{width:100%;height:100%;border:none;outline-style:none;color:inherit;font-family:var(--igc-font-family);z-index:1}[part^=container]{position:relative;display:grid;color:hsla(var(--igc-gray-900), var(--igc-gray-a))}[part=prefix],[part=suffix]{display:none;overflow:hidden}:host([required]) [part=label]::after{content:\"*\"}[part=helper-text]{font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom)}:host([size=large]) [part~=input],:host([size=large]) [part~=container]{height:3.5rem}:host([size=medium]) [part~=input],:host([size=medium]) [part~=container]{height:3rem}:host([size=small]) [part~=input],:host([size=small]) [part~=container]{height:2.5rem}`;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host::after{background:none}:host [part~=
|
|
2
|
+
export const styles = css `:host::after{background:none}:host [part~=container]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);border-style:none;grid-template-columns:auto 1fr auto;background:var(--input-background, #fff)}:host [part~=container]::after{display:none}:host [part~=input]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);padding:initial;background:inherit;-webkit-box-shadow:0 0 0 0 rgba(0,0,0,0);box-shadow:0 0 0 0 rgba(0,0,0,0);z-index:1;border:1px solid hsla(var(--igc-gray-400), var(--igc-gray-a));-webkit-transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out,-webkit-box-shadow .15s ease-out;grid-area:1/2}:host [part*="input prefixed"]{border-start-start-radius:0;border-end-start-radius:0}:host [part*="input suffixed"]{border-start-end-radius:0;border-end-end-radius:0}:host [part*="input prefixed suffixed"]{border-radius:0}:host label{line-height:1.5rem;margin-bottom:.25rem;color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host label:empty{display:none}:host [part=prefix],:host [part=suffix]{position:relative;padding:rem(16px);border-radius:none;min-width:auto;color:hsla(var(--igc-gray-800), var(--igc-gray-a));background:hsla(var(--igc-gray-300), var(--igc-gray-a));-webkit-transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out,-webkit-box-shadow .15s ease-out}:host [part=prefix]:focus-within,:host [part=suffix]:focus-within{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-gray-300), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-gray-300), 0.38)}:host [part=prefix]{grid-area:1/1;border-style:solid;border-color:hsla(var(--igc-gray-400), var(--igc-gray-a));border-inline-start-width:1px;border-inline-end-width:0;border-block-start-width:1px;border-block-end-width:1px;border-start-start-radius:.25rem;border-end-start-radius:.25rem}:host [part=suffix]{grid-area:1/3;border-style:solid;border-color:hsla(var(--igc-gray-400), var(--igc-gray-a));border-inline-start-width:0;border-inline-end-width:1px;border-block-start-width:1px;border-block-end-width:1px;border-start-end-radius:.25rem;border-end-end-radius:.25rem}:host [part=helper-text]{font-family:var(--igc-body-2-font-family);font-weight:var(--igc-body-2-font-weight);font-size:var(--igc-body-2-font-size);font-style:var(--igc-body-2-font-style);letter-spacing:var(--igc-body-2-letter-spacing);text-transform:var(--igc-body-2-text-transform);line-height:var(--igc-body-2-line-height);margin-top:var(--igc-body-2-margin-top);margin-bottom:var(--igc-body-2-margin-bottom);margin-top:rem(4px);color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host([size=large]) [part~=container],:host([size=large]) [part~=input]{height:3rem}:host([size=large]) [part~=input]{font-size:1.25rem;padding:.5rem 1rem}:host([size=large]) [part=prefix],:host([size=large]) [part=suffix]{font-size:rem(20px);padding:.5rem 1rem}:host([size=medium]) [part~=container],:host([size=medium]) [part~=input]{height:2.375rem}:host([size=medium]) [part~=input]{font-size:1rem;padding:.375rem .75rem}:host([size=medium]) [part=prefix],:host([size=medium]) [part=suffix]{font-size:1rem;padding:.375rem .75rem}:host([size=small]) [part~=container],:host([size=small]) [part~=input]{height:1.9375rem}:host([size=small]) [part~=input]{font-size:1rem;padding:.25rem .5rem}:host([size=small]) [part=prefix],:host([size=small]) [part=suffix]{font-size:.875rem;padding:.25rem .5rem}:host(:focus-within) [part~=input]{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-primary-500), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-primary-500), 0.38);border-color:hsla(var(--igc-primary-500), var(--igc-primary-a))}:host([invalid]:focus-within) [part~=input]{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-error-500), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-error-500), 0.38);border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part~=container],:host([readonly]) [part=prefix],:host([readonly]) [part=suffix],:host([readonly]) [part~=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a));color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part~=input],:host([readonly]) [part~=input]{border-color:hsla(var(--igc-gray-300), var(--igc-gray-a))}:host([readonly]) [part=prefix],:host([readonly]) [part=suffix],:host([readonly]) [part~=container]{color:hsla(var(--igc-gray-800), var(--igc-gray-a))}:host(:focus-within[readonly]) [part~=input]{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-gray-400), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-gray-400), 0.38);border-color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;
|
|
3
3
|
//# sourceMappingURL=input.bootstrap.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.bootstrap.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.bootstrap.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"input.bootstrap.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.bootstrap.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,q+JAAq+J,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host::after{background:none}:host [part~=container]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);border-style:none;grid-template-columns:auto 1fr auto;background:var(--input-background, #fff)}:host [part~=container]::after{display:none}:host [part~=input]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);padding:initial;background:inherit;-webkit-box-shadow:0 0 0 0 rgba(0,0,0,0);box-shadow:0 0 0 0 rgba(0,0,0,0);z-index:1;border:1px solid hsla(var(--igc-gray-400), var(--igc-gray-a));-webkit-transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out,-webkit-box-shadow .15s ease-out;grid-area:1/2}:host [part*=\"input prefixed\"]{border-start-start-radius:0;border-end-start-radius:0}:host [part*=\"input suffixed\"]{border-start-end-radius:0;border-end-end-radius:0}:host [part*=\"input prefixed suffixed\"]{border-radius:0}:host label{line-height:1.5rem;margin-bottom:.25rem;color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host label:empty{display:none}:host [part=prefix],:host [part=suffix]{position:relative;padding:rem(16px);border-radius:none;min-width:auto;color:hsla(var(--igc-gray-800), var(--igc-gray-a));background:hsla(var(--igc-gray-300), var(--igc-gray-a));-webkit-transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;transition:border .15s ease-out,-webkit-box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out;transition:box-shadow .15s ease-out,border .15s ease-out,-webkit-box-shadow .15s ease-out}:host [part=prefix]:focus-within,:host [part=suffix]:focus-within{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-gray-300), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-gray-300), 0.38)}:host [part=prefix]{grid-area:1/1;border-style:solid;border-color:hsla(var(--igc-gray-400), var(--igc-gray-a));border-inline-start-width:1px;border-inline-end-width:0;border-block-start-width:1px;border-block-end-width:1px;border-start-start-radius:.25rem;border-end-start-radius:.25rem}:host [part=suffix]{grid-area:1/3;border-style:solid;border-color:hsla(var(--igc-gray-400), var(--igc-gray-a));border-inline-start-width:0;border-inline-end-width:1px;border-block-start-width:1px;border-block-end-width:1px;border-start-end-radius:.25rem;border-end-end-radius:.25rem}:host [part=helper-text]{font-family:var(--igc-body-2-font-family);font-weight:var(--igc-body-2-font-weight);font-size:var(--igc-body-2-font-size);font-style:var(--igc-body-2-font-style);letter-spacing:var(--igc-body-2-letter-spacing);text-transform:var(--igc-body-2-text-transform);line-height:var(--igc-body-2-line-height);margin-top:var(--igc-body-2-margin-top);margin-bottom:var(--igc-body-2-margin-bottom);margin-top:rem(4px);color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host([size=large]) [part~=container],:host([size=large]) [part~=input]{height:3rem}:host([size=large]) [part~=input]{font-size:1.25rem;padding:.5rem 1rem}:host([size=large]) [part=prefix],:host([size=large]) [part=suffix]{font-size:rem(20px);padding:.5rem 1rem}:host([size=medium]) [part~=container],:host([size=medium]) [part~=input]{height:2.375rem}:host([size=medium]) [part~=input]{font-size:1rem;padding:.375rem .75rem}:host([size=medium]) [part=prefix],:host([size=medium]) [part=suffix]{font-size:1rem;padding:.375rem .75rem}:host([size=small]) [part~=container],:host([size=small]) [part~=input]{height:1.9375rem}:host([size=small]) [part~=input]{font-size:1rem;padding:.25rem .5rem}:host([size=small]) [part=prefix],:host([size=small]) [part=suffix]{font-size:.875rem;padding:.25rem .5rem}:host(:focus-within) [part~=input]{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-primary-500), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-primary-500), 0.38);border-color:hsla(var(--igc-primary-500), var(--igc-primary-a))}:host([invalid]:focus-within) [part~=input]{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-error-500), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-error-500), 0.38);border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part~=container],:host([readonly]) [part=prefix],:host([readonly]) [part=suffix],:host([readonly]) [part~=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a));color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part~=input],:host([readonly]) [part~=input]{border-color:hsla(var(--igc-gray-300), var(--igc-gray-a))}:host([readonly]) [part=prefix],:host([readonly]) [part=suffix],:host([readonly]) [part~=container]{color:hsla(var(--igc-gray-800), var(--igc-gray-a))}:host(:focus-within[readonly]) [part~=input]{-webkit-box-shadow:0 0 0 .25rem hsla(var(--igc-gray-400), 0.38);box-shadow:0 0 0 .25rem hsla(var(--igc-gray-400), 0.38);border-color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host [part=prefix],:host [part=suffix]{padding:0 .625rem;color:hsla(var(--igc-gray-700), var(--igc-gray-a));background:hsla(var(--igc-gray-100), var(--igc-gray-a));font-size:.875rem}:host [part=prefix]{grid-area:1/1}:host [part=suffix]{grid-area:1/3}:host [part=label]{margin-bottom:.5rem;font-size:.875rem;font-weight:600;color:hsla(var(--igc-gray-900), var(--igc-gray-a))}:host [part^=container]{border-radius:clamp(0rem,var(--igc-radius-factor)*2px,2px);border:0.0625rem solid hsla(var(--igc-gray-500), var(--igc-gray-a));-webkit-transition:none;-o-transition:none;transition:none;background:var(--container-background, hsla(var(--igc-surface-500), var(--igc-surface-a)));cursor:text;grid-template-columns:auto 1fr auto;overflow:hidden}:host [part^=container]::after{background:rgba(0,0,0,0);-webkit-transform:none;-ms-transform:none;transform:none;height:initial}:host [part~=input]{background:initial;font-size:.875rem;padding:.5rem;height:100%;max-height:100%;border:none;grid-area:1/2}:host [part=helper-text]{padding:0;margin-top:.5rem;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host([size=large]) [part^=container]{height:3rem}:host([size=large]) [part~=input]{height:2.875rem}:host([size=medium]) [part^=container]{height:2.5rem}:host([size=medium]) [part~=input]{height:2.375rem}:host([size=small]) [part^=container]{height:2rem}:host([size=small]) [part~=input]{height:1.875rem}:host([size=large]:focus-within) [part~=input]{height:2.75rem}:host([size=medium]:focus-within) [part~=input]{height:2.25rem}:host([size=small]:focus-within) [part~=input]{height:1.75rem}:host(:not([invalid]):hover) [part^=container]{border-color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host(:focus-within) [part^=container]{border-width:0.125rem}:host(:focus-within) [part=prefix]{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}:host(:focus-within) [part=suffix]{-webkit-margin-end:-0.0625rem;margin-inline-end:-0.0625rem}:host(:not([invalid]):focus-within) [part^=container],:host(:not([invalid]):focus-within:hover) [part^=container]{border-color:hsla(var(--igc-primary-500), var(--igc-primary-a))}:host([required]) [part=label]::after,:host([outlined][required]) [part=label]::after{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part^=container],:host([outlined][invalid]) [part^=container]{border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part=helper-text],:host([outlined][invalid]) [part=helper-text]{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]){pointer-events:none}:host([disabled]) [part^=container]{border-color:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host([disabled]) [part^=container],:host([disabled]) [part=prefix],:host([disabled]) [part=suffix]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part=label],:host([disabled]) [part
|
|
2
|
+
export const styles = css `:host [part=prefix],:host [part=suffix]{padding:0 .625rem;color:hsla(var(--igc-gray-700), var(--igc-gray-a));background:hsla(var(--igc-gray-100), var(--igc-gray-a));font-size:.875rem}:host [part=prefix]{grid-area:1/1}:host [part=suffix]{grid-area:1/3}:host [part=label]{margin-bottom:.5rem;font-size:.875rem;font-weight:600;color:hsla(var(--igc-gray-900), var(--igc-gray-a))}:host [part^=container]{border-radius:clamp(0rem,var(--igc-radius-factor)*2px,2px);border:0.0625rem solid hsla(var(--igc-gray-500), var(--igc-gray-a));-webkit-transition:none;-o-transition:none;transition:none;background:var(--container-background, hsla(var(--igc-surface-500), var(--igc-surface-a)));cursor:text;grid-template-columns:auto 1fr auto;overflow:hidden}:host [part^=container]::after{background:rgba(0,0,0,0);-webkit-transform:none;-ms-transform:none;transform:none;height:initial}:host [part~=input]{background:initial;font-size:.875rem;padding:.5rem;height:100%;max-height:100%;border:none;grid-area:1/2}:host [part=helper-text]{padding:0;margin-top:.5rem;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host([size=large]) [part^=container]{height:3rem}:host([size=large]) [part~=input]{height:2.875rem}:host([size=medium]) [part^=container]{height:2.5rem}:host([size=medium]) [part~=input]{height:2.375rem}:host([size=small]) [part^=container]{height:2rem}:host([size=small]) [part~=input]{height:1.875rem}:host([size=large]:focus-within) [part~=input]{height:2.75rem}:host([size=medium]:focus-within) [part~=input]{height:2.25rem}:host([size=small]:focus-within) [part~=input]{height:1.75rem}:host(:not([invalid]):hover) [part^=container]{border-color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host(:focus-within) [part^=container]{border-width:0.125rem}:host(:focus-within) [part=prefix]{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}:host(:focus-within) [part=suffix]{-webkit-margin-end:-0.0625rem;margin-inline-end:-0.0625rem}:host(:not([invalid]):focus-within) [part^=container],:host(:not([invalid]):focus-within:hover) [part^=container]{border-color:hsla(var(--igc-primary-500), var(--igc-primary-a))}:host([required]) [part=label]::after,:host([outlined][required]) [part=label]::after{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part^=container],:host([outlined][invalid]) [part^=container]{border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part=helper-text],:host([outlined][invalid]) [part=helper-text]{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]){pointer-events:none}:host([disabled]) [part^=container]{border-color:hsla(var(--igc-gray-100), var(--igc-gray-a));color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part^=container],:host([disabled]) [part=prefix],:host([disabled]) [part=suffix]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part=label],:host([disabled]) [part=helper-text]{color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;
|
|
3
3
|
//# sourceMappingURL=input.fluent.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.fluent.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.fluent.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"input.fluent.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.fluent.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,q/FAAq/F,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host [part=prefix],:host [part=suffix]{padding:0 .625rem;color:hsla(var(--igc-gray-700), var(--igc-gray-a));background:hsla(var(--igc-gray-100), var(--igc-gray-a));font-size:.875rem}:host [part=prefix]{grid-area:1/1}:host [part=suffix]{grid-area:1/3}:host [part=label]{margin-bottom:.5rem;font-size:.875rem;font-weight:600;color:hsla(var(--igc-gray-900), var(--igc-gray-a))}:host [part^=container]{border-radius:clamp(0rem,var(--igc-radius-factor)*2px,2px);border:0.0625rem solid hsla(var(--igc-gray-500), var(--igc-gray-a));-webkit-transition:none;-o-transition:none;transition:none;background:var(--container-background, hsla(var(--igc-surface-500), var(--igc-surface-a)));cursor:text;grid-template-columns:auto 1fr auto;overflow:hidden}:host [part^=container]::after{background:rgba(0,0,0,0);-webkit-transform:none;-ms-transform:none;transform:none;height:initial}:host [part~=input]{background:initial;font-size:.875rem;padding:.5rem;height:100%;max-height:100%;border:none;grid-area:1/2}:host [part=helper-text]{padding:0;margin-top:.5rem;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host([size=large]) [part^=container]{height:3rem}:host([size=large]) [part~=input]{height:2.875rem}:host([size=medium]) [part^=container]{height:2.5rem}:host([size=medium]) [part~=input]{height:2.375rem}:host([size=small]) [part^=container]{height:2rem}:host([size=small]) [part~=input]{height:1.875rem}:host([size=large]:focus-within) [part~=input]{height:2.75rem}:host([size=medium]:focus-within) [part~=input]{height:2.25rem}:host([size=small]:focus-within) [part~=input]{height:1.75rem}:host(:not([invalid]):hover) [part^=container]{border-color:hsla(var(--igc-gray-700), var(--igc-gray-a))}:host(:focus-within) [part^=container]{border-width:0.125rem}:host(:focus-within) [part=prefix]{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}:host(:focus-within) [part=suffix]{-webkit-margin-end:-0.0625rem;margin-inline-end:-0.0625rem}:host(:not([invalid]):focus-within) [part^=container],:host(:not([invalid]):focus-within:hover) [part^=container]{border-color:hsla(var(--igc-primary-500), var(--igc-primary-a))}:host([required]) [part=label]::after,:host([outlined][required]) [part=label]::after{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part^=container],:host([outlined][invalid]) [part^=container]{border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part=helper-text],:host([outlined][invalid]) [part=helper-text]{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]){pointer-events:none}:host([disabled]) [part^=container]{border-color:hsla(var(--igc-gray-100), var(--igc-gray-a));color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part^=container],:host([disabled]) [part=prefix],:host([disabled]) [part=suffix]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part=label],:host([disabled]) [part=helper-text]{color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host [part=prefix],:host [part=suffix]{padding-top:.5rem;padding-bottom:.5rem;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host [part=prefix]{-webkit-padding-start:.5rem;padding-inline-start:.5rem;grid-area:1/1}:host [part=suffix]{-webkit-padding-end:.5rem;padding-inline-end:.5rem;grid-area:1/3}:host [part=label]{color:hsla(var(--igc-gray-600), var(--igc-gray-a));margin-bottom:.25rem;font-size:initial}:host [part^=container]{background:rgba(0,0,0,0);border-bottom:1px solid hsla(var(--igc-gray-500), var(--igc-gray-a));-webkit-transition:background .25s ease-out;-o-transition:background .25s ease-out;transition:background .25s ease-out;grid-template-columns:auto 1fr auto}:host [part^=container]::after{position:absolute;content:"";width:100%;height:.125rem;left:0;right:0;bottom:-1px;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a));-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);-o-transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform-origin:bottom center;-ms-transform-origin:bottom center;transform-origin:bottom center}:host [part~=input]{font-size:1rem;background:initial;padding:.5rem;border:none;grid-area:1/2}:host [part=helper-text]{padding:0;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host(:hover) [part^=container],:host([outlined]:hover) [part^=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host(:focus-within) [part^=container],:host([outlined]:focus-within) [part^=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host(:focus-within) [part^=container]::after,:host([outlined]:focus-within) [part^=container]::after{-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}:host(:focus-within) [part=label],:host([outlined]:focus-within) [part=label]{color:var(--label-focus-color, hsla(var(--igc-primary-500), var(--igc-primary-a)))}:host([invalid]) [part^=container]{border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part^=container]::after{background:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part=label],:host([invalid]) [part^=helper-text]{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]){pointer-events:none}:host([disabled]) [part^=container]{border-color:hsla(var(--igc-gray-300), var(--igc-gray-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part=label],:host([disabled]) [part
|
|
2
|
+
export const styles = css `:host [part=prefix],:host [part=suffix]{padding-top:.5rem;padding-bottom:.5rem;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host [part=prefix]{-webkit-padding-start:.5rem;padding-inline-start:.5rem;grid-area:1/1}:host [part=suffix]{-webkit-padding-end:.5rem;padding-inline-end:.5rem;grid-area:1/3}:host [part=label]{color:hsla(var(--igc-gray-600), var(--igc-gray-a));margin-bottom:.25rem;font-size:initial}:host [part^=container]{background:rgba(0,0,0,0);border-bottom:1px solid hsla(var(--igc-gray-500), var(--igc-gray-a));-webkit-transition:background .25s ease-out;-o-transition:background .25s ease-out;transition:background .25s ease-out;grid-template-columns:auto 1fr auto}:host [part^=container]::after{position:absolute;content:"";width:100%;height:.125rem;left:0;right:0;bottom:-1px;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a));-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);-o-transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform-origin:bottom center;-ms-transform-origin:bottom center;transform-origin:bottom center}:host [part~=input]{font-size:1rem;background:initial;padding:.5rem;border:none;grid-area:1/2}:host [part=helper-text]{padding:0;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host(:hover) [part^=container],:host([outlined]:hover) [part^=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host(:focus-within) [part^=container],:host([outlined]:focus-within) [part^=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host(:focus-within) [part^=container]::after,:host([outlined]:focus-within) [part^=container]::after{-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}:host(:focus-within) [part=label],:host([outlined]:focus-within) [part=label]{color:var(--label-focus-color, hsla(var(--igc-primary-500), var(--igc-primary-a)))}:host([invalid]) [part^=container]{border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part^=container]::after{background:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part=label],:host([invalid]) [part^=helper-text]{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]){pointer-events:none}:host([disabled]) [part^=container]{border-color:hsla(var(--igc-gray-300), var(--igc-gray-a));color:hsla(var(--igc-gray-300), var(--igc-gray-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part=label],:host([disabled]) [part=helper-text]{color:hsla(var(--igc-gray-300), var(--igc-gray-a))}`;
|
|
3
3
|
//# sourceMappingURL=input.indigo.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.indigo.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.indigo.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"input.indigo.css.js","sourceRoot":"","sources":["../../../../../src/components/input/themes/light/input.indigo.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,ihGAAihG,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host [part=prefix],:host [part=suffix]{padding-top:.5rem;padding-bottom:.5rem;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host [part=prefix]{-webkit-padding-start:.5rem;padding-inline-start:.5rem;grid-area:1/1}:host [part=suffix]{-webkit-padding-end:.5rem;padding-inline-end:.5rem;grid-area:1/3}:host [part=label]{color:hsla(var(--igc-gray-600), var(--igc-gray-a));margin-bottom:.25rem;font-size:initial}:host [part^=container]{background:rgba(0,0,0,0);border-bottom:1px solid hsla(var(--igc-gray-500), var(--igc-gray-a));-webkit-transition:background .25s ease-out;-o-transition:background .25s ease-out;transition:background .25s ease-out;grid-template-columns:auto 1fr auto}:host [part^=container]::after{position:absolute;content:\"\";width:100%;height:.125rem;left:0;right:0;bottom:-1px;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a));-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);-o-transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform-origin:bottom center;-ms-transform-origin:bottom center;transform-origin:bottom center}:host [part~=input]{font-size:1rem;background:initial;padding:.5rem;border:none;grid-area:1/2}:host [part=helper-text]{padding:0;color:hsla(var(--igc-gray-600), var(--igc-gray-a))}:host(:hover) [part^=container],:host([outlined]:hover) [part^=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host(:focus-within) [part^=container],:host([outlined]:focus-within) [part^=container]{background:hsla(var(--igc-gray-100), var(--igc-gray-a))}:host(:focus-within) [part^=container]::after,:host([outlined]:focus-within) [part^=container]::after{-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}:host(:focus-within) [part=label],:host([outlined]:focus-within) [part=label]{color:var(--label-focus-color, hsla(var(--igc-primary-500), var(--igc-primary-a)))}:host([invalid]) [part^=container]{border-color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part^=container]::after{background:hsla(var(--igc-error-500), var(--igc-error-a))}:host([invalid]) [part=label],:host([invalid]) [part^=helper-text]{color:hsla(var(--igc-error-500), var(--igc-error-a))}:host([disabled]){pointer-events:none}:host([disabled]) [part^=container]{border-color:hsla(var(--igc-gray-300), var(--igc-gray-a));color:hsla(var(--igc-gray-300), var(--igc-gray-a))}:host([disabled]) [part=prefix],:host([disabled]) [part=suffix],:host([disabled]) [part=label],:host([disabled]) [part=helper-text]{color:hsla(var(--igc-gray-300), var(--igc-gray-a))}`;\n"]}
|
|
@@ -5,10 +5,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { property, state } from 'lit/decorators.js';
|
|
8
|
+
import { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';
|
|
8
9
|
import { blazorSuppress } from '../common/decorators/blazorSuppress.js';
|
|
9
10
|
import { IgcInputBaseComponent } from '../input/input-base.js';
|
|
10
11
|
import { MaskParser } from './mask-parser.js';
|
|
11
|
-
|
|
12
|
+
let IgcMaskInputBaseComponent = class IgcMaskInputBaseComponent extends IgcInputBaseComponent {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.parser = new MaskParser();
|
|
@@ -88,7 +89,7 @@ export class IgcMaskInputBaseComponent extends IgcInputBaseComponent {
|
|
|
88
89
|
super.setSelectionRange(start, end, direction);
|
|
89
90
|
this.selection = { start, end };
|
|
90
91
|
}
|
|
91
|
-
}
|
|
92
|
+
};
|
|
92
93
|
__decorate([
|
|
93
94
|
state()
|
|
94
95
|
], IgcMaskInputBaseComponent.prototype, "hasFocus", void 0);
|
|
@@ -107,4 +108,8 @@ __decorate([
|
|
|
107
108
|
__decorate([
|
|
108
109
|
blazorSuppress()
|
|
109
110
|
], IgcMaskInputBaseComponent.prototype, "setSelectionRange", null);
|
|
111
|
+
IgcMaskInputBaseComponent = __decorate([
|
|
112
|
+
blazorDeepImport
|
|
113
|
+
], IgcMaskInputBaseComponent);
|
|
114
|
+
export { IgcMaskInputBaseComponent };
|
|
110
115
|
//# sourceMappingURL=mask-input-base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-input-base.js","sourceRoot":"","sources":["../../../src/components/mask-input/mask-input-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"mask-input-base.js","sourceRoot":"","sources":["../../../src/components/mask-input/mask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AAI,CAAC,SAAS,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IAClC,CAAC;CAOF,CAAA;AAtIC;IADC,KAAK,EAAE;2DACmB;AAG3B;IADC,KAAK,EAAE;8DACmB;AAG3B;IADC,KAAK,EAAE;wDACa;AAIrB;IADC,QAAQ,EAAE;yDACY;AAIvB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DACpB;AA0GvB;IADC,cAAc,EAAE;kEAQhB;AArImB,yBAAyB;IAD9C,gBAAgB;GACK,yBAAyB,CA4I9C;SA5IqB,yBAAyB","sourcesContent":["import { property, state } from 'lit/decorators.js';\nimport { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';\nimport { blazorSuppress } from '../common/decorators/blazorSuppress.js';\nimport { IgcInputBaseComponent } from '../input/input-base.js';\nimport { MaskParser } from './mask-parser.js';\ninterface MaskSelection {\n start: number;\n end: number;\n}\n\n@blazorDeepImport\nexport abstract class IgcMaskInputBaseComponent extends IgcInputBaseComponent {\n protected parser = new MaskParser();\n protected selection: MaskSelection = { start: 0, end: 0 };\n protected compositionStart = 0;\n\n @state()\n protected hasFocus = false;\n\n @state()\n protected maskedValue = '';\n\n @state()\n protected _mask = '';\n\n /** The prompt symbol to use for unfilled parts of the mask. */\n @property()\n public prompt!: string;\n\n /** Controls the validity of the control. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n protected get inputSelection(): MaskSelection {\n return {\n start: this.input.selectionStart || 0,\n end: this.input.selectionEnd || 0,\n };\n }\n\n protected get emptyMask(): string {\n return this.parser.apply();\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n\n this._mask = this._mask || this.parser.mask;\n this.prompt = this.prompt || this.parser.prompt;\n }\n\n /**\n * Sets a custom validation message for the control.\n * As long as `message` is not empty, the control is considered invalid.\n */\n public setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.invalid = !this.input.checkValidity();\n }\n\n /** Selects all text within the input. */\n public select() {\n this.input.select();\n }\n\n protected handleInput({ inputType, isComposing }: InputEvent) {\n const value = this.input.value;\n const start = this.selection.start;\n let end = this.selection.end;\n\n switch (inputType) {\n case 'deleteContentForward':\n this.updateInput('', start, (end = start === end ? ++end : end));\n return this.updateComplete.then(() =>\n this.input.setSelectionRange(end, end)\n );\n\n case 'deleteContentBackward':\n if (isComposing) return;\n return this.updateInput('', this.inputSelection.start, end);\n\n case 'deleteByCut':\n return this.updateInput('', start, end);\n\n case 'insertText':\n return this.updateInput(\n value.substring(start, this.inputSelection.end),\n start,\n end\n );\n\n case 'insertFromPaste':\n return this.updateInput(\n value.substring(start, this.inputSelection.end),\n start,\n this.inputSelection.start\n );\n\n case 'insertFromDrop':\n return this.updateInput(\n value.substring(this.inputSelection.start, this.inputSelection.end),\n this.inputSelection.start,\n this.inputSelection.end\n );\n }\n }\n\n protected handleKeydown(e: KeyboardEvent) {\n if (!e.key) {\n return;\n }\n this.selection = this.inputSelection;\n }\n\n protected handleCut() {\n this.selection = this.inputSelection;\n }\n\n protected handleDragStart() {\n this.selection = this.inputSelection;\n }\n\n protected handleCompositionStart() {\n this.compositionStart = this.inputSelection.start;\n }\n\n protected handleCompositionEnd({ data }: CompositionEvent) {\n const start = this.compositionStart,\n end = this.inputSelection.end;\n this.updateInput(data, start, end);\n }\n\n protected handleInvalid() {\n this.invalid = true;\n }\n\n @blazorSuppress()\n public override setSelectionRange(\n start: number,\n end: number,\n direction?: 'backward' | 'forward' | 'none'\n ): void {\n super.setSelectionRange(start, end, direction);\n this.selection = { start, end };\n }\n\n protected abstract updateInput(\n part: string,\n start: number,\n finish: number\n ): void;\n}\n"]}
|
|
@@ -51,6 +51,7 @@ let IgcLinearProgressComponent = class IgcLinearProgressComponent extends IgcPro
|
|
|
51
51
|
part="${partNameMap(this.wrapperParts)}"
|
|
52
52
|
style="${styleMap(this.animInfo)}"
|
|
53
53
|
></div>
|
|
54
|
+
<div part="${partNameMap(this.wrapperParts)} secondary"></div>
|
|
54
55
|
</div>
|
|
55
56
|
${this.renderDefaultSlot()}
|
|
56
57
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear-progress.js","sourceRoot":"","sources":["../../../src/components/progress/linear-progress.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAC;AACrE,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAuB5D,IAAqB,0BAA0B,GAA/C,MAAqB,0BAA2B,SAAQ,wBAAwB;IAAhF;;QAMS,YAAO,GAAG,KAAK,CAAC;QAIhB,eAAU,GAME,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"linear-progress.js","sourceRoot":"","sources":["../../../src/components/progress/linear-progress.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,MAAM,EA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C,YAAY,CAAC;mBAC7B,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;qBAErB,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;;QAE3C,IAAI,CAAC,iBAAiB,EAAE;KAC3B,CAAC;IACJ,CAAC;CACF,CAAA;AAvDwB,kCAAO,GAAG,qBAAsB,CAAA;AAChC,iCAAM,GAAG,MAAO,CAAA;AAIvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2DACpB;AAIvB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8DAOvB;AAhBZ,0BAA0B;IAD9C,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACjB,0BAA0B,CAwD9C;eAxDoB,0BAA0B","sourcesContent":["import { html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { asPercent, partNameMap } from '../common/util.js';\nimport { IgcProgressBaseComponent } from './base.js';\nimport { styles } from './themes/linear/linear.progress.base.css.js';\nimport { styles as bootstrap } from './themes/linear/linear.progress.bootstrap.css.js';\nimport { styles as fluent } from './themes/linear/linear.progress.fluent.css.js';\nimport { styles as indigo } from './themes/linear/linear.progress.indigo.css.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { themes } from '../../theming/theming-decorator.js';\n\n/**\n * A linear progress indicator used to express unspecified wait time or display\n * the length of a process.\n *\n * @element igc-linear-progress\n *\n * @slot - The text area container.\n *\n * @csspart track\n * @csspart fill\n * @csspart striped\n * @csspart label\n * @csspart value\n * @csspart indeterminate\n * @csspart primary\n * @csspart danger\n * @csspart warning\n * @csspart info\n * @csspart success\n */\n@themes({ bootstrap, indigo, fluent })\nexport default class IgcLinearProgressComponent extends IgcProgressBaseComponent {\n public static readonly tagName = 'igc-linear-progress';\n public static override styles = styles;\n\n /** Sets the striped look of the control. */\n @property({ type: Boolean, reflect: true })\n public striped = false;\n\n /** The position for the default label of the control. */\n @property({ attribute: 'label-align', reflect: true })\n public labelAlign:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end' = 'top-start';\n\n protected get wrapperParts() {\n return {\n fill: true,\n striped: this.striped,\n indeterminate: this.indeterminate,\n primary: this.variant === 'primary',\n success: this.variant === 'success',\n danger: this.variant === 'danger',\n warning: this.variant === 'warning',\n info: this.variant === 'info',\n };\n }\n\n protected get animInfo() {\n return {\n width: asPercent(this.value, this.max) + '%',\n '--duration': this.animationDuration + 'ms',\n };\n }\n\n protected override render() {\n return html`\n <div\n part=\"track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=${this.max}\n aria-valuenow=${this.indeterminate ? nothing : this.value}\n >\n <div\n part=\"${partNameMap(this.wrapperParts)}\"\n style=\"${styleMap(this.animInfo)}\"\n ></div>\n <div part=\"${partNameMap(this.wrapperParts)} secondary\"></div>\n </div>\n ${this.renderDefaultSlot()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-linear-progress': IgcLinearProgressComponent;\n }\n}\n"]}
|