@universal-material/web 3.0.92 → 3.0.93

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.
Files changed (36) hide show
  1. package/custom-elements.json +10098 -8269
  2. package/field/field-base.d.ts +2 -0
  3. package/field/field-base.d.ts.map +1 -1
  4. package/field/field-base.js +13 -3
  5. package/field/field-base.js.map +1 -1
  6. package/field/field-base.styles.d.ts.map +1 -1
  7. package/field/field-base.styles.js +14 -6
  8. package/field/field-base.styles.js.map +1 -1
  9. package/index.d.ts +2 -0
  10. package/index.d.ts.map +1 -1
  11. package/index.js +2 -0
  12. package/index.js.map +1 -1
  13. package/package.json +1 -1
  14. package/shared/char-count-text-field/native-text-field-wrapper.d.ts +14 -0
  15. package/shared/char-count-text-field/native-text-field-wrapper.d.ts.map +1 -0
  16. package/shared/char-count-text-field/native-text-field-wrapper.js +54 -0
  17. package/shared/char-count-text-field/native-text-field-wrapper.js.map +1 -0
  18. package/shared/text-field-base/text-field-base.d.ts +1 -1
  19. package/shared/text-field-base/text-field-base.d.ts.map +1 -1
  20. package/shared/text-field-base/text-field-base.js +1 -0
  21. package/shared/text-field-base/text-field-base.js.map +1 -1
  22. package/text-area/text-area.d.ts +15 -0
  23. package/text-area/text-area.d.ts.map +1 -0
  24. package/text-area/text-area.js +51 -0
  25. package/text-area/text-area.js.map +1 -0
  26. package/text-area/text-area.styles.d.ts +2 -0
  27. package/text-area/text-area.styles.d.ts.map +1 -0
  28. package/text-area/text-area.styles.js +39 -0
  29. package/text-area/text-area.styles.js.map +1 -0
  30. package/text-field/text-field.d.ts +2 -7
  31. package/text-field/text-field.d.ts.map +1 -1
  32. package/text-field/text-field.js +9 -31
  33. package/text-field/text-field.js.map +1 -1
  34. package/text-field/text-field.styles.d.ts.map +1 -1
  35. package/text-field/text-field.styles.js +14 -0
  36. package/text-field/text-field.styles.js.map +1 -1
@@ -11,7 +11,9 @@ export declare abstract class UmFieldBase extends LitElement {
11
11
  * The floating label for the field
12
12
  */
13
13
  label: string | undefined;
14
+ protected _innerCounter: string | undefined;
14
15
  counter: string | undefined;
16
+ hideCounter: boolean;
15
17
  /**
16
18
  * Supporting text conveys additional information about the field, such as how it will be used
17
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"field-base.d.ts","sourceRoot":"","sources":["../../src/field/field-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAahE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,8BAAsB,WAAY,SAAQ,UAAU;;IAClD,OAAgB,MAAM,EAAE,cAAc,CAAwB;IAI9D,OAAO,CAAC,MAAM,CAA8B;IAEhC,OAAO,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAY;IAElE;;OAEG;IACS,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC;;OAEG;IACyC,cAAc,EACtD,MAAM,GACN,SAAS,CAAC;IAEd;;;OAGG;IACoC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAErE;;OAEG;IACyC,KAAK,UAAS;IACd,QAAQ,UAAS;IAE7D;;OAEG;IACyC,OAAO,UAAS;IAE5D,MAAM,CAAC,WAAW,CAChB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,eAAe,GACtB,eAAe,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAOzD;;;;OAIG;IAEH,cAAc,UAAS;IAEvB;;;;OAIG;IAEH,eAAe,UAAS;IAExB;;;;OAIG;IAEH,YAAY,UAAS;IAGrB,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAiB;IAGtD,OAAO,CAAC,QAAQ,C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,MAAM,GAAG,SAAS,CAAC;IAErE;;OAEG;IACyC,KAAK,UAAS;IACd,QAAQ,UAAS;IAE7D;;OAEG;IACyC,OAAO,UAAS;IAE5D,MAAM,CAAC,WAAW,CAChB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,eAAe,GACtB,eAAe,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAOzD;;;;OAIG;IAEH,cAAc,UAAS;IAEvB;;;;OAIG;IAEH,eAAe,UAAS;IAExB;;;;OAIG;IAEH,YAAY,UAAS;IAGrB,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAiB;IAGtD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAiB;IAGvD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiB;IAEnC,OAAO,CAAC,aAAa,CAAe;IAChC,SAAS,CAAC,UAAU,EAAG,WAAW,CAAC;IAExD,OAAO,CAAC,iBAAiB,CAA+B;;cAOrC,MAAM,IAAI,cAAc;IA4C3C,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,cAAc;IAClD,SAAS,CAAC,kBAAkB,IAAI,cAAc;IAIrC,iBAAiB;IAOjB,oBAAoB;IAgB7B,OAAO,CAAC,2BAA2B;IASnC,OAAO,CAAC,4BAA4B;IAIpC,OAAO,CAAC,yBAAyB;IAIjC,OAAO,CAAC,uBAAuB;IAc/B,SAAS,CAAC,yBAAyB,IAAI,cAAc,GAAG,OAAO,OAAO;CAGvE"}
@@ -22,6 +22,7 @@ export class UmFieldBase extends LitElement {
22
22
  constructor() {
23
23
  super();
24
24
  this.variant = 'filled';
25
+ this.hideCounter = false;
25
26
  /**
26
27
  * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.
27
28
  */
@@ -56,6 +57,11 @@ export class UmFieldBase extends LitElement {
56
57
  const classes = {
57
58
  [this.variant ?? this.config?.variant ?? 'filled']: true,
58
59
  };
60
+ const counter = html `
61
+ <slot class="counter" name="counter">
62
+ <div>${this.counter ?? this._innerCounter}</div>
63
+ </slot>
64
+ `;
59
65
  return html `
60
66
  <div class="container ${classMap(classes)}">
61
67
  <slot
@@ -83,9 +89,7 @@ export class UmFieldBase extends LitElement {
83
89
  <slot name="supporting-text" id="supporting-text">
84
90
  <div>${this.supportingText}</div>
85
91
  </slot>
86
- <slot class="counter" name="counter">
87
- <div>${this.counter}</div>
88
- </slot>
92
+ ${this.hideCounter ? nothing : counter}
89
93
  </div>
90
94
  ${this.renderAfterContent()}
91
95
  `;
@@ -146,9 +150,15 @@ __decorate([
146
150
  __decorate([
147
151
  property()
148
152
  ], UmFieldBase.prototype, "label", void 0);
153
+ __decorate([
154
+ state()
155
+ ], UmFieldBase.prototype, "_innerCounter", void 0);
149
156
  __decorate([
150
157
  property()
151
158
  ], UmFieldBase.prototype, "counter", void 0);
159
+ __decorate([
160
+ property({ type: Boolean, attribute: 'hide-counter' })
161
+ ], UmFieldBase.prototype, "hideCounter", void 0);
152
162
  __decorate([
153
163
  property({ attribute: 'supporting-text' })
154
164
  ], UmFieldBase.prototype, "supportingText", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"field-base.js","sourceRoot":"","sources":["../../src/field/field-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,EAAW,eAAe,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,MAAM,OAAgB,WAAY,SAAQ,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I,EAAE,CAAC;mDACnD;AAQvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDACnD;AAQxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACnD;AAGJ;IADhB,qBAAqB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDACT;AAGrC;IADhB,qBAAqB,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0DACT;AAGtC;IADhB,qBAAqB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACT;AAE3B;IAAxB,KAAK,CAAC,QAAQ,CAAC;kDAAqC;AACtB;IAA9B,KAAK,CAAC,YAAY,CAAC;+CAAoC","sourcesContent":["import { consume, Context, ContextProvider } from '@lit/context';\nimport { CSSResultGroup } from '@lit/reactive-element/css-tag';\nimport { html, LitElement, nothing, TemplateResult } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { styles as baseStyles } from '../shared/base.styles.js';\nimport { styles } from './field-base.styles.js';\n\nimport { fieldDefaultsContext } from './field-defaults-context.js';\nimport { UmFieldDefaults } from './field-defaults.js';\n\nexport abstract class UmFieldBase extends LitElement {\n static override styles: CSSResultGroup = [baseStyles, styles];\n\n @consume({ context: fieldDefaultsContext, subscribe: true })\n @state()\n private config: UmFieldDefaults | undefined;\n\n @property() variant: 'filled' | 'outlined' | undefined = 'filled';\n\n /**\n * The floating label for the field\n */\n @property() label: string | undefined;\n @property() counter: string | undefined;\n\n /**\n * Supporting text conveys additional information about the field, such as how it will be used\n */\n @property({ attribute: 'supporting-text' }) supportingText:\n | string\n | undefined;\n\n /**\n * For text fields that validate their content (such as passwords), replace supporting text with error text when applicable.\n * If `errorText` is not an empty string, changing the property `invalid` to `true` will show the `errorText` instead of `supportingText`\n */\n @property({ attribute: 'error-text' }) errorText: string | undefined;\n\n /**\n * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.\n */\n @property({ type: Boolean, reflect: true }) empty = false;\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Get or sets where or not the field is in a visually invalid state.\n */\n @property({ type: Boolean, reflect: true }) invalid = false;\n\n static setDefaults(\n contextRoot: HTMLElement,\n config: UmFieldDefaults,\n ): ContextProvider<Context<HTMLElement, UmFieldDefaults>> {\n return new ContextProvider(contextRoot, {\n context: fieldDefaultsContext,\n initialValue: config,\n });\n }\n\n /**\n * Whether the field has a leading icon or not\n *\n * _Note:_ Readonly\n */\n @property({ type: Boolean, attribute: 'has-leading-icon', reflect: true })\n hasLeadingIcon = false;\n\n /**\n * Whether the field has a trailing icon or not\n *\n * _Note:_ Readonly\n */\n @property({ type: Boolean, attribute: 'has-trailing-icon', reflect: true })\n hasTrailingIcon = false;\n\n /**\n * Whether the field has an error text or not\n *\n * _Note:_ Readonly\n */\n @property({ type: Boolean, attribute: 'has-error-text', reflect: true })\n hasErrorText = false;\n\n @queryAssignedElements({ slot: 'leading-icon', flatten: true })\n private readonly assignedLeadingIcons!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'trailing-icon', flatten: true })\n private readonly assignedTrailingIcons!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'error-text', flatten: true })\n private readonly assignedErrorTexts!: HTMLElement[];\n\n @query('.label') private _labelElement!: HTMLElement;\n @query('.container') protected _container!: HTMLElement;\n\n private labelSizeObserver: ResizeObserver | null = null;\n\n constructor() {\n super();\n this.variant = undefined;\n }\n\n protected override render(): TemplateResult {\n const classes = {\n [this.variant ?? this.config?.variant ?? 'filled']: true,\n };\n\n return html`\n <div class=\"container ${classMap(classes)}\">\n <slot\n class=\"icon leading-icon\"\n name=\"leading-icon\"\n @slotchange=\"${this.handleLeadingIconSlotChange}\"></slot>\n <label class=\"label\" slot=\"label\" id=\"label\">\n <slot name=\"label\">${this.label}</slot>\n </label>\n <div class=\"input-wrapper\" part=\"wrapper\">${this.renderControl()}</div>\n <slot\n class=\"icon trailing-icon\"\n name=\"trailing-icon\"\n @slotchange=\"${this.handleTrailingIconSlotChange}\">\n <span>${this.renderDefaultTrailingIcon()}</span>\n </slot>\n </div>\n <div class=\"supporting-text\" id=\"supporting-text\">\n <slot\n class=\"error-text\"\n name=\"error-text\"\n @slotchange=\"${this.handleErrorTextSlotChange}\">\n <div>${this.errorText}</div>\n </slot>\n <slot name=\"supporting-text\" id=\"supporting-text\">\n <div>${this.supportingText}</div>\n </slot>\n <slot class=\"counter\" name=\"counter\">\n <div>${this.counter}</div>\n </slot>\n </div>\n ${this.renderAfterContent()}\n `;\n }\n\n protected abstract renderControl(): TemplateResult;\n protected renderAfterContent(): TemplateResult {\n return html``;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.hasLeadingIcon = !!this.assignedLeadingIcons.length;\n\n this.#attach();\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n\n this.labelSizeObserver?.disconnect();\n this.labelSizeObserver = null;\n }\n\n async #attach(): Promise<void> {\n await this.updateComplete;\n this.labelSizeObserver = new ResizeObserver(() =>\n this.setLabelWidthProperties(),\n );\n this.labelSizeObserver.observe(this._labelElement);\n this.setLabelWidthProperties();\n }\n\n private handleLeadingIconSlotChange() {\n this._labelElement.style.transition = 'none';\n this.hasLeadingIcon = this.assignedLeadingIcons.length > 0;\n\n setTimeout(() => {\n this._labelElement.style.transition = '';\n });\n }\n\n private handleTrailingIconSlotChange() {\n this.hasTrailingIcon = this.assignedTrailingIcons.length > 0;\n }\n\n private handleErrorTextSlotChange() {\n this.hasErrorText = this.assignedErrorTexts.length > 0;\n }\n\n private setLabelWidthProperties() {\n const width = this._labelElement.offsetWidth;\n\n this.style.setProperty('--u-field-label-width', `${width}px`);\n this.style.setProperty('--u-field-label-half-width', `${width / 2}px`);\n\n if (!width) {\n this._container.classList.add('no-label');\n return;\n }\n\n this._container.classList.remove('no-label');\n }\n\n protected renderDefaultTrailingIcon(): TemplateResult | typeof nothing {\n return nothing;\n }\n}\n"]}
1
+ {"version":3,"file":"field-base.js","sourceRoot":"","sources":["../../src/field/field-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,EAAW,eAAe,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,MAAM,OAAgB,WAAY,SAAQ,UAAU;aAClC,WAAM,GAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvC,CAAwC;IA0C9D,MAAM,CAAC,WAAW,CAChB,WAAwB,EACxB,MAAuB;QAEvB,OAAO,IAAI,eAAe,CAAC,WAAW,EAAE;YACtC,OAAO,EAAE,oBAAoB;YAC7B,YAAY,EAAE,MAAM;SACrB,CAAC,CAAC;IACL,CAAC;IAwCD;QACE,KAAK,EAAE,CAAC;QArFE,YAAO,GAAsC,QAAQ,CAAC;QAUV,gBAAW,GAAG,KAAK,CAAC;QAe5E;;WAEG;QACyC,UAAK,GAAG,KAAK,CAAC;QACd,aAAQ,GAAG,KAAK,CAAC;QAE7D;;WAEG;QACyC,YAAO,GAAG,KAAK,CAAC;QAY5D;;;;WAIG;QAEH,mBAAc,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O,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACnD;AAGJ;IADhB,qBAAqB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDACT;AAGrC;IADhB,qBAAqB,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0DACT;AAGtC;IADhB,qBAAqB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACT;AAE3B;IAAxB,KAAK,CAAC,QAAQ,CAAC;kDAAqC;AACtB;IAA9B,KAAK,CAAC,YAAY,CAAC;+CAAoC","sourcesContent":["import { consume, Context, ContextProvider } from '@lit/context';\nimport { CSSResultGroup } from '@lit/reactive-element/css-tag';\nimport { html, LitElement, nothing, TemplateResult } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { styles as baseStyles } from '../shared/base.styles.js';\nimport { styles } from './field-base.styles.js';\n\nimport { fieldDefaultsContext } from './field-defaults-context.js';\nimport { UmFieldDefaults } from './field-defaults.js';\n\nexport abstract class UmFieldBase extends LitElement {\n static override styles: CSSResultGroup = [baseStyles, styles];\n\n @consume({ context: fieldDefaultsContext, subscribe: true })\n @state()\n private config: UmFieldDefaults | undefined;\n\n @property() variant: 'filled' | 'outlined' | undefined = 'filled';\n\n /**\n * The floating label for the field\n */\n @property() label: string | undefined;\n\n @state() protected _innerCounter: string | undefined;\n @property() counter: string | undefined;\n\n @property({ type: Boolean, attribute: 'hide-counter' }) hideCounter = false;\n\n /**\n * Supporting text conveys additional information about the field, such as how it will be used\n */\n @property({ attribute: 'supporting-text' }) supportingText:\n | string\n | undefined;\n\n /**\n * For text fields that validate their content (such as passwords), replace supporting text with error text when applicable.\n * If `errorText` is not an empty string, changing the property `invalid` to `true` will show the `errorText` instead of `supportingText`\n */\n @property({ attribute: 'error-text' }) errorText: string | undefined;\n\n /**\n * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.\n */\n @property({ type: Boolean, reflect: true }) empty = false;\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Get or sets where or not the field is in a visually invalid state.\n */\n @property({ type: Boolean, reflect: true }) invalid = false;\n\n static setDefaults(\n contextRoot: HTMLElement,\n config: UmFieldDefaults,\n ): ContextProvider<Context<HTMLElement, UmFieldDefaults>> {\n return new ContextProvider(contextRoot, {\n context: fieldDefaultsContext,\n initialValue: config,\n });\n }\n\n /**\n * Whether the field has a leading icon or not\n *\n * _Note:_ Readonly\n */\n @property({ type: Boolean, attribute: 'has-leading-icon', reflect: true })\n hasLeadingIcon = false;\n\n /**\n * Whether the field has a trailing icon or not\n *\n * _Note:_ Readonly\n */\n @property({ type: Boolean, attribute: 'has-trailing-icon', reflect: true })\n hasTrailingIcon = false;\n\n /**\n * Whether the field has an error text or not\n *\n * _Note:_ Readonly\n */\n @property({ type: Boolean, attribute: 'has-error-text', reflect: true })\n hasErrorText = false;\n\n @queryAssignedElements({ slot: 'leading-icon', flatten: true })\n private readonly assignedLeadingIcons!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'trailing-icon', flatten: true })\n private readonly assignedTrailingIcons!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'error-text', flatten: true })\n private readonly assignedErrorTexts!: HTMLElement[];\n\n @query('.label') private _labelElement!: HTMLElement;\n @query('.container') protected _container!: HTMLElement;\n\n private labelSizeObserver: ResizeObserver | null = null;\n\n constructor() {\n super();\n this.variant = undefined;\n }\n\n protected override render(): TemplateResult {\n const classes = {\n [this.variant ?? this.config?.variant ?? 'filled']: true,\n };\n\n const counter = html`\n <slot class=\"counter\" name=\"counter\">\n <div>${this.counter ?? this._innerCounter}</div>\n </slot>\n `;\n\n return html`\n <div class=\"container ${classMap(classes)}\">\n <slot\n class=\"icon leading-icon\"\n name=\"leading-icon\"\n @slotchange=\"${this.handleLeadingIconSlotChange}\"></slot>\n <label class=\"label\" slot=\"label\" id=\"label\">\n <slot name=\"label\">${this.label}</slot>\n </label>\n <div class=\"input-wrapper\" part=\"wrapper\">${this.renderControl()}</div>\n <slot\n class=\"icon trailing-icon\"\n name=\"trailing-icon\"\n @slotchange=\"${this.handleTrailingIconSlotChange}\">\n <span>${this.renderDefaultTrailingIcon()}</span>\n </slot>\n </div>\n <div class=\"supporting-text\" id=\"supporting-text\">\n <slot\n class=\"error-text\"\n name=\"error-text\"\n @slotchange=\"${this.handleErrorTextSlotChange}\">\n <div>${this.errorText}</div>\n </slot>\n <slot name=\"supporting-text\" id=\"supporting-text\">\n <div>${this.supportingText}</div>\n </slot>\n ${this.hideCounter ? nothing : counter}\n </div>\n ${this.renderAfterContent()}\n `;\n }\n\n protected abstract renderControl(): TemplateResult;\n protected renderAfterContent(): TemplateResult {\n return html``;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.hasLeadingIcon = !!this.assignedLeadingIcons.length;\n\n this.#attach();\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n\n this.labelSizeObserver?.disconnect();\n this.labelSizeObserver = null;\n }\n\n async #attach(): Promise<void> {\n await this.updateComplete;\n this.labelSizeObserver = new ResizeObserver(() =>\n this.setLabelWidthProperties(),\n );\n this.labelSizeObserver.observe(this._labelElement);\n this.setLabelWidthProperties();\n }\n\n private handleLeadingIconSlotChange() {\n this._labelElement.style.transition = 'none';\n this.hasLeadingIcon = this.assignedLeadingIcons.length > 0;\n\n setTimeout(() => {\n this._labelElement.style.transition = '';\n });\n }\n\n private handleTrailingIconSlotChange() {\n this.hasTrailingIcon = this.assignedTrailingIcons.length > 0;\n }\n\n private handleErrorTextSlotChange() {\n this.hasErrorText = this.assignedErrorTexts.length > 0;\n }\n\n private setLabelWidthProperties() {\n const width = this._labelElement.offsetWidth;\n\n this.style.setProperty('--u-field-label-width', `${width}px`);\n this.style.setProperty('--u-field-label-half-width', `${width / 2}px`);\n\n if (!width) {\n this._container.classList.add('no-label');\n return;\n }\n\n this._container.classList.remove('no-label');\n }\n\n protected renderDefaultTrailingIcon(): TemplateResult | typeof nothing {\n return nothing;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"field-base.styles.d.ts","sourceRoot":"","sources":["../../src/field/field-base.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAqTlB,CAAC"}
1
+ {"version":3,"file":"field-base.styles.d.ts","sourceRoot":"","sources":["../../src/field/field-base.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA6TlB,CAAC"}
@@ -117,6 +117,7 @@ export const styles = css `
117
117
  .input:focus {
118
118
  outline: 0;
119
119
  }
120
+ .input textarea,
120
121
  .input select,
121
122
  .input input,
122
123
  .input ::slotted(*) {
@@ -136,12 +137,17 @@ export const styles = css `
136
137
  background: transparent;
137
138
  border: none;
138
139
  outline: 0 !important;
140
+ caret-color: var(--_color-primary);
139
141
  }
140
142
  .input,
143
+ .input textarea::placeholder,
144
+ .input input::placeholder,
141
145
  .input ::slotted(select),
142
146
  .input ::slotted(:is(input, textarea))::placeholder {
143
147
  transition: color 150ms 100ms;
144
148
  }
149
+ .input textarea::placeholder,
150
+ .input input::placeholder,
145
151
  .input ::slotted(:is(input, textarea))::placeholder {
146
152
  color: var(--_field-placeholder-color);
147
153
  }
@@ -268,12 +274,12 @@ export const styles = css `
268
274
  pointer-events: none;
269
275
  top: calc(var(--_field-min-height) / 2 - var(--_label-line-height) / 2);
270
276
  }
271
- :host([empty]:not(:focus-within)) .input-wrapper {
272
- opacity: 0;
273
- }
274
- :host([empty]:not(:focus-within)) .input,
275
- :host([empty]:not(:focus-within)) ::slotted(:is(input, textarea))::placeholder,
276
- :host([empty]:not(:focus-within)) ::slotted(select) {
277
+ :host([empty]:not(:focus-within)) .container:not(.no-label) .input-wrapper,
278
+ :host([empty]:not(:focus-within)) .container:not(.no-label) .input,
279
+ :host([empty]:not(:focus-within)) .container:not(.no-label) .input input::placeholder,
280
+ :host([empty]:not(:focus-within)) .container:not(.no-label) .input textarea::placeholder,
281
+ :host([empty]:not(:focus-within)) .container:not(.no-label) ::slotted(:is(input, textarea))::placeholder,
282
+ :host([empty]:not(:focus-within)) .container:not(.no-label) ::slotted(select) {
277
283
  color: transparent;
278
284
  transition: color 150ms;
279
285
  }
@@ -296,6 +302,8 @@ export const styles = css `
296
302
  }
297
303
  :host([disabled]) .input select,
298
304
  :host([disabled]) .input select::placeholder,
305
+ :host([disabled]) .input textarea,
306
+ :host([disabled]) .input textarea::placeholder,
299
307
  :host([disabled]) .input input,
300
308
  :host([disabled]) .input input::placeholder,
301
309
  :host([disabled]) .input ::slotted(*),
@@ -1 +1 @@
1
- {"version":3,"file":"field-base.styles.js","sourceRoot":"","sources":["../../src/field/field-base.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqTzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_control-line-height: var(--u-field-control-line-height, 1.5rem);\n --_label-line-height: var(--u-field-label-line-height, 1rem);\n --_field-icon-size: var(--u-field-icon-size, 1.5rem);\n --_field-control-padding: var(--u-field-control-padding, 16px);\n --_field-control-inline-padding: var(--u-field-control-inline-padding, var(--_field-control-padding));\n --_field-control-block-padding: var(--u-field-control-block-padding, var(--_field-control-padding));\n --_field-min-height: var(--u-field-min-height, 56px);\n --_field-placeholder-color: var(--u-field-placeholder-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_disabled-color: var(--u-field-disabled-color, rgba(var(--u-color-on-surface-rgb, 29, 27, 32), var(--u-field-disabled-opacity, .38)));\n --_disabled-bg-color: var(--u-filled-field-disabled-bg-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-filled-field-background-disabled-opacity, .12)));\n --_color-primary: var(--u-color-primary, rgb(103, 80, 164));\n --_color-error: var(--u-field-error-color, var(--u-color-error, rgb(179, 38, 30)));\n --_active-indicator-opacity: 1;\n --_vertical-padding: var(--u-field-vertical-padding, 8px);\n --_icon-size: var(--u-field-icon-size, 1.5rem);\n --_icon-padding: var(--u-field-icon-padding, 12px);\n --_icon-color: var(--u-icon-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_focus-border-width: var(--u-text-field-focus-border-width, 2px);\n --_field-control-leading-padding: var(--_field-control-inline-padding);\n --_outlined-label-margin: var(--u-outlined-field-label-margin, 12px);\n --_outlined-label-padding: var(--u-outlined-field-label-padding, 4px);\n --u-label-input-start: auto;\n --u-label-input-span-leading-offset: 0;\n --u-label-input-span-trailing-offset: 0;\n --u-text-field-horizontal-padding: 12px;\n display: block;\n }\n\n .container {\n display: flex;\n align-items: center;\n position: relative;\n }\n .container::before, .container::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n pointer-events: none;\n }\n .container::before {\n background: var(--u-color-on-surface, rgb(29, 27, 32));\n transition: opacity 150ms;\n opacity: 0;\n }\n .container::after {\n border-width: var(--u-field-border-width, 1px);\n border-color: var(--u-field-border-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n }\n\n @media (hover: hover) {\n :host(:not([disabled]):not([invalid]):hover) .container.filled::before {\n opacity: var(--u-state-hover-opacity, 0.08);\n }\n :host(:not([disabled]):not([invalid]):not(:focus-within):hover) .container::after {\n border-color: var(--u-field-hover-border-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n }\n }\n .icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--_icon-size);\n color: var(--_icon-color);\n font-size: var(--_icon-size);\n line-height: var(--_icon-size);\n }\n .icon::slotted(*) {\n flex-shrink: 0;\n }\n\n .leading-icon {\n margin-inline-start: var(--_icon-padding);\n }\n\n .trailing-icon {\n margin-inline-end: var(--_icon-padding);\n }\n\n .label {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-label-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-label-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-label-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n font-size: var(--u-field-label-font-size, var(--u-body-s-font-size, 0.75rem));\n display: block;\n position: absolute;\n inset-inline-start: var(--_field-control-leading-padding);\n margin-bottom: 0;\n line-height: var(--_label-line-height);\n color: var(--u-field-label-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n transition: inset 200ms, font-size 200ms;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n flex: 1;\n padding-block: var(--_vertical-padding);\n padding-inline: var(--_field-control-inline-padding);\n min-height: var(--_field-min-height);\n transition: opacity 150ms;\n }\n\n .input {\n color: var(--u-field-input-text-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n flex: 1;\n }\n .input:focus {\n outline: 0;\n }\n .input select,\n .input input,\n .input ::slotted(*) {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-control-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-control-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-control-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-control-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n display: block;\n width: 100%;\n color: var(--u-field-input-text-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n min-height: var(--_control-line-height);\n line-height: var(--_control-line-height);\n padding: 0;\n margin: 0;\n appearance: none;\n background: transparent;\n border: none;\n outline: 0 !important;\n }\n .input,\n .input ::slotted(select),\n .input ::slotted(:is(input, textarea))::placeholder {\n transition: color 150ms 100ms;\n }\n .input ::slotted(:is(input, textarea))::placeholder {\n color: var(--_field-placeholder-color);\n }\n\n .supporting-text {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-supporting-text-line-height, var(--u-body-s-line-height, 1rem));\n font-size: var(--u-field-supporting-text-font-size, var(--u-body-s-font-size, 0.75rem));\n letter-spacing: var(--u-field-supporting-text-letter-spacing, var(--u-body-s-letter-spacing, 0.0333333333rem));\n font-weight: var(--u-field-supporting-text-font-weight, var(--u-body-s-font-weight, var(--u-font-weight-regular, 400)));\n display: flex;\n color: var(--u-field-supporting-text, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n padding-inline: 16px;\n gap: 16px;\n }\n .supporting-text div:empty {\n display: none;\n }\n .supporting-text div,\n .supporting-text ::slotted(*) {\n display: inline-block;\n margin-top: 4px;\n }\n\n .error-text {\n display: none;\n }\n\n .counter div, .counter::slotted(*) {\n margin-inline-start: auto;\n }\n\n :host([has-leading-icon]) {\n --_field-control-leading-padding: calc(var(--_icon-padding) + var(--_icon-size) + var(--_field-control-inline-padding)) ;\n }\n\n :host(:not([has-leading-icon])) .leading-icon {\n display: none;\n }\n\n :host(:not([has-trailing-icon])) .container:has(slot[name=trailing-icon] span:empty) .trailing-icon {\n display: none;\n }\n\n :host(:focus-within) {\n --u-field-border-width: var(--_focus-border-width);\n }\n :host(:focus-within) .container::after {\n border-color: var(--u-field-focused-border-color, var(--_color-primary));\n }\n :host(:focus-within) .label {\n color: var(--u-field-label-focused-color, var(--_color-primary));\n }\n\n :host([invalid]) .container::after {\n border-color: var(--u-field-error-border-color, var(--_color-error));\n }\n :host([invalid]) .label {\n color: var(--u-field-label-error-color, var(--_color-error));\n }\n :host([invalid]) .supporting-text {\n color: var(--u-field-supporting-text-error-color, var(--_color-error));\n }\n :host([invalid]) .trailing-icon {\n color: var(--u-field-trailing-icon-error-color, var(--_color-error));\n }\n :host([invalid]) .leading-icon {\n color: var(--u-field-leading-icon-error-color, var(--_icon-color));\n }\n\n :host([invalid]) .supporting-text:has(.error-text div:not(:empty)) .error-text,\n :host([invalid][has-error-text]) .error-text {\n display: contents;\n }\n :host([invalid]) .supporting-text:has(.error-text div:not(:empty)) slot[name=supporting-text],\n :host([invalid][has-error-text]) slot[name=supporting-text] {\n display: none;\n }\n\n .container.filled {\n border-radius: var(--u-field-filled-border-radius, 4px 4px 0 0);\n background-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));\n }\n .container.filled::after {\n border-bottom-style: solid;\n }\n .container.filled:not(.no-label) .input-wrapper {\n padding-top: calc(var(--_vertical-padding) + var(--_label-line-height));\n padding-bottom: var(--_vertical-padding);\n }\n .container.filled .label {\n top: var(--_vertical-padding);\n }\n .container.filled .input ::slotted(:is(input, textarea, select, button)) {\n display: block;\n }\n .container.outlined::after {\n --_mid-point: calc(var(--u-field-label-half-width) + var(--_outlined-label-margin) + var(--_outlined-label-padding));\n border-radius: var(--u-outlined-field-shape-corder, var(--u-shape-corner-small, 8px));\n border-style: solid;\n clip-path: polygon(0 0, var(--_mid-point) 0, var(--_mid-point) var(--_focus-border-width), var(--_mid-point) var(--_focus-border-width), var(--_mid-point) 0, 100% 0, 100% 100%, 0 100%);\n transition: clip-path 100ms;\n }\n .container.outlined .label {\n top: calc(var(--_label-line-height) / -2);\n }\n\n .container.outlined:focus-within::after,\n :host(:not([empty])) .container.outlined::after {\n --_end-point: calc(var(--u-field-label-width) + var(--_outlined-label-margin) + (var(--_outlined-label-padding) * 2));\n clip-path: polygon(0 0, var(--_outlined-label-margin) 0, var(--_outlined-label-margin) var(--_focus-border-width), var(--_end-point) var(--_focus-border-width), var(--_end-point) 0, 100% 0, 100% 100%, 0 100%);\n }\n .container.outlined:focus-within .label,\n :host(:not([empty])) .container.outlined .label {\n inset-inline-start: calc(var(--_outlined-label-margin) + var(--_outlined-label-padding));\n }\n\n :host([empty]) ::slotted(select) {\n color: var(--_field-placeholder-color);\n }\n\n :host([empty]:not(:focus-within)) .label {\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n pointer-events: none;\n top: calc(var(--_field-min-height) / 2 - var(--_label-line-height) / 2);\n }\n :host([empty]:not(:focus-within)) .input-wrapper {\n opacity: 0;\n }\n :host([empty]:not(:focus-within)) .input,\n :host([empty]:not(:focus-within)) ::slotted(:is(input, textarea))::placeholder,\n :host([empty]:not(:focus-within)) ::slotted(select) {\n color: transparent;\n transition: color 150ms;\n }\n\n .container.no-label::after {\n clip-path: none !important;\n }\n\n :host([disabled]) .container .filled {\n background-color: var(--u-filled-field-disabled-bg-color, rgba(var(--u-color-on-surface-rgb, 29, 27, 32), var(--u-filled-field-background-disabled-opacity, 0.04)));\n }\n :host([disabled]) .container::after {\n border-color: var(--u-field-disabled-border-color, var(--_disabled-color));\n }\n :host([disabled]) .supporting-text {\n color: var(--u-field-supporting-text-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .label {\n color: var(--u-field-label-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .input select,\n :host([disabled]) .input select::placeholder,\n :host([disabled]) .input input,\n :host([disabled]) .input input::placeholder,\n :host([disabled]) .input ::slotted(*),\n :host([disabled]) .input ::slotted(:is(input, textarea))::placeholder {\n color: var(--u-field-input-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .trailing-icon {\n color: var(--u-field-trailing-icon-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .leading-icon {\n color: var(--u-field-leading-icon-disabled-color, var(--_disabled-color));\n }\n`;\n"]}
1
+ {"version":3,"file":"field-base.styles.js","sourceRoot":"","sources":["../../src/field/field-base.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6TzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_control-line-height: var(--u-field-control-line-height, 1.5rem);\n --_label-line-height: var(--u-field-label-line-height, 1rem);\n --_field-icon-size: var(--u-field-icon-size, 1.5rem);\n --_field-control-padding: var(--u-field-control-padding, 16px);\n --_field-control-inline-padding: var(--u-field-control-inline-padding, var(--_field-control-padding));\n --_field-control-block-padding: var(--u-field-control-block-padding, var(--_field-control-padding));\n --_field-min-height: var(--u-field-min-height, 56px);\n --_field-placeholder-color: var(--u-field-placeholder-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_disabled-color: var(--u-field-disabled-color, rgba(var(--u-color-on-surface-rgb, 29, 27, 32), var(--u-field-disabled-opacity, .38)));\n --_disabled-bg-color: var(--u-filled-field-disabled-bg-color, rgba(var(--u-color-on-surface-rgb, ), var(--u-filled-field-background-disabled-opacity, .12)));\n --_color-primary: var(--u-color-primary, rgb(103, 80, 164));\n --_color-error: var(--u-field-error-color, var(--u-color-error, rgb(179, 38, 30)));\n --_active-indicator-opacity: 1;\n --_vertical-padding: var(--u-field-vertical-padding, 8px);\n --_icon-size: var(--u-field-icon-size, 1.5rem);\n --_icon-padding: var(--u-field-icon-padding, 12px);\n --_icon-color: var(--u-icon-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n --_focus-border-width: var(--u-text-field-focus-border-width, 2px);\n --_field-control-leading-padding: var(--_field-control-inline-padding);\n --_outlined-label-margin: var(--u-outlined-field-label-margin, 12px);\n --_outlined-label-padding: var(--u-outlined-field-label-padding, 4px);\n --u-label-input-start: auto;\n --u-label-input-span-leading-offset: 0;\n --u-label-input-span-trailing-offset: 0;\n --u-text-field-horizontal-padding: 12px;\n display: block;\n }\n\n .container {\n display: flex;\n align-items: center;\n position: relative;\n }\n .container::before, .container::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n pointer-events: none;\n }\n .container::before {\n background: var(--u-color-on-surface, rgb(29, 27, 32));\n transition: opacity 150ms;\n opacity: 0;\n }\n .container::after {\n border-width: var(--u-field-border-width, 1px);\n border-color: var(--u-field-border-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n }\n\n @media (hover: hover) {\n :host(:not([disabled]):not([invalid]):hover) .container.filled::before {\n opacity: var(--u-state-hover-opacity, 0.08);\n }\n :host(:not([disabled]):not([invalid]):not(:focus-within):hover) .container::after {\n border-color: var(--u-field-hover-border-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n }\n }\n .icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--_icon-size);\n color: var(--_icon-color);\n font-size: var(--_icon-size);\n line-height: var(--_icon-size);\n }\n .icon::slotted(*) {\n flex-shrink: 0;\n }\n\n .leading-icon {\n margin-inline-start: var(--_icon-padding);\n }\n\n .trailing-icon {\n margin-inline-end: var(--_icon-padding);\n }\n\n .label {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-label-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-label-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-label-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n font-size: var(--u-field-label-font-size, var(--u-body-s-font-size, 0.75rem));\n display: block;\n position: absolute;\n inset-inline-start: var(--_field-control-leading-padding);\n margin-bottom: 0;\n line-height: var(--_label-line-height);\n color: var(--u-field-label-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n transition: inset 200ms, font-size 200ms;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n flex: 1;\n padding-block: var(--_vertical-padding);\n padding-inline: var(--_field-control-inline-padding);\n min-height: var(--_field-min-height);\n transition: opacity 150ms;\n }\n\n .input {\n color: var(--u-field-input-text-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n flex: 1;\n }\n .input:focus {\n outline: 0;\n }\n .input textarea,\n .input select,\n .input input,\n .input ::slotted(*) {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-control-line-height, var(--u-body-l-line-height, 1.5rem));\n font-size: var(--u-field-control-font-size, var(--u-body-l-font-size, 1rem));\n letter-spacing: var(--u-field-control-letter-spacing, var(--u-body-l-letter-spacing, 0.03125rem));\n font-weight: var(--u-field-control-font-weight, var(--u-body-l-font-weight, var(--u-font-weight-regular, 400)));\n display: block;\n width: 100%;\n color: var(--u-field-input-text-color, var(--u-color-on-surface, rgb(29, 27, 32)));\n min-height: var(--_control-line-height);\n line-height: var(--_control-line-height);\n padding: 0;\n margin: 0;\n appearance: none;\n background: transparent;\n border: none;\n outline: 0 !important;\n caret-color: var(--_color-primary);\n }\n .input,\n .input textarea::placeholder,\n .input input::placeholder,\n .input ::slotted(select),\n .input ::slotted(:is(input, textarea))::placeholder {\n transition: color 150ms 100ms;\n }\n .input textarea::placeholder,\n .input input::placeholder,\n .input ::slotted(:is(input, textarea))::placeholder {\n color: var(--_field-placeholder-color);\n }\n\n .supporting-text {\n font-family: var(--u-font-family, var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"));\n line-height: var(--u-field-supporting-text-line-height, var(--u-body-s-line-height, 1rem));\n font-size: var(--u-field-supporting-text-font-size, var(--u-body-s-font-size, 0.75rem));\n letter-spacing: var(--u-field-supporting-text-letter-spacing, var(--u-body-s-letter-spacing, 0.0333333333rem));\n font-weight: var(--u-field-supporting-text-font-weight, var(--u-body-s-font-weight, var(--u-font-weight-regular, 400)));\n display: flex;\n color: var(--u-field-supporting-text, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n padding-inline: 16px;\n gap: 16px;\n }\n .supporting-text div:empty {\n display: none;\n }\n .supporting-text div,\n .supporting-text ::slotted(*) {\n display: inline-block;\n margin-top: 4px;\n }\n\n .error-text {\n display: none;\n }\n\n .counter div, .counter::slotted(*) {\n margin-inline-start: auto;\n }\n\n :host([has-leading-icon]) {\n --_field-control-leading-padding: calc(var(--_icon-padding) + var(--_icon-size) + var(--_field-control-inline-padding)) ;\n }\n\n :host(:not([has-leading-icon])) .leading-icon {\n display: none;\n }\n\n :host(:not([has-trailing-icon])) .container:has(slot[name=trailing-icon] span:empty) .trailing-icon {\n display: none;\n }\n\n :host(:focus-within) {\n --u-field-border-width: var(--_focus-border-width);\n }\n :host(:focus-within) .container::after {\n border-color: var(--u-field-focused-border-color, var(--_color-primary));\n }\n :host(:focus-within) .label {\n color: var(--u-field-label-focused-color, var(--_color-primary));\n }\n\n :host([invalid]) .container::after {\n border-color: var(--u-field-error-border-color, var(--_color-error));\n }\n :host([invalid]) .label {\n color: var(--u-field-label-error-color, var(--_color-error));\n }\n :host([invalid]) .supporting-text {\n color: var(--u-field-supporting-text-error-color, var(--_color-error));\n }\n :host([invalid]) .trailing-icon {\n color: var(--u-field-trailing-icon-error-color, var(--_color-error));\n }\n :host([invalid]) .leading-icon {\n color: var(--u-field-leading-icon-error-color, var(--_icon-color));\n }\n\n :host([invalid]) .supporting-text:has(.error-text div:not(:empty)) .error-text,\n :host([invalid][has-error-text]) .error-text {\n display: contents;\n }\n :host([invalid]) .supporting-text:has(.error-text div:not(:empty)) slot[name=supporting-text],\n :host([invalid][has-error-text]) slot[name=supporting-text] {\n display: none;\n }\n\n .container.filled {\n border-radius: var(--u-field-filled-border-radius, 4px 4px 0 0);\n background-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));\n }\n .container.filled::after {\n border-bottom-style: solid;\n }\n .container.filled:not(.no-label) .input-wrapper {\n padding-top: calc(var(--_vertical-padding) + var(--_label-line-height));\n padding-bottom: var(--_vertical-padding);\n }\n .container.filled .label {\n top: var(--_vertical-padding);\n }\n .container.filled .input ::slotted(:is(input, textarea, select, button)) {\n display: block;\n }\n .container.outlined::after {\n --_mid-point: calc(var(--u-field-label-half-width) + var(--_outlined-label-margin) + var(--_outlined-label-padding));\n border-radius: var(--u-outlined-field-shape-corder, var(--u-shape-corner-small, 8px));\n border-style: solid;\n clip-path: polygon(0 0, var(--_mid-point) 0, var(--_mid-point) var(--_focus-border-width), var(--_mid-point) var(--_focus-border-width), var(--_mid-point) 0, 100% 0, 100% 100%, 0 100%);\n transition: clip-path 100ms;\n }\n .container.outlined .label {\n top: calc(var(--_label-line-height) / -2);\n }\n\n .container.outlined:focus-within::after,\n :host(:not([empty])) .container.outlined::after {\n --_end-point: calc(var(--u-field-label-width) + var(--_outlined-label-margin) + (var(--_outlined-label-padding) * 2));\n clip-path: polygon(0 0, var(--_outlined-label-margin) 0, var(--_outlined-label-margin) var(--_focus-border-width), var(--_end-point) var(--_focus-border-width), var(--_end-point) 0, 100% 0, 100% 100%, 0 100%);\n }\n .container.outlined:focus-within .label,\n :host(:not([empty])) .container.outlined .label {\n inset-inline-start: calc(var(--_outlined-label-margin) + var(--_outlined-label-padding));\n }\n\n :host([empty]) ::slotted(select) {\n color: var(--_field-placeholder-color);\n }\n\n :host([empty]:not(:focus-within)) .label {\n font-size: var(--u-field-label-font-size, var(--u-body-l-font-size, 1rem));\n pointer-events: none;\n top: calc(var(--_field-min-height) / 2 - var(--_label-line-height) / 2);\n }\n :host([empty]:not(:focus-within)) .container:not(.no-label) .input-wrapper,\n :host([empty]:not(:focus-within)) .container:not(.no-label) .input,\n :host([empty]:not(:focus-within)) .container:not(.no-label) .input input::placeholder,\n :host([empty]:not(:focus-within)) .container:not(.no-label) .input textarea::placeholder,\n :host([empty]:not(:focus-within)) .container:not(.no-label) ::slotted(:is(input, textarea))::placeholder,\n :host([empty]:not(:focus-within)) .container:not(.no-label) ::slotted(select) {\n color: transparent;\n transition: color 150ms;\n }\n\n .container.no-label::after {\n clip-path: none !important;\n }\n\n :host([disabled]) .container .filled {\n background-color: var(--u-filled-field-disabled-bg-color, rgba(var(--u-color-on-surface-rgb, 29, 27, 32), var(--u-filled-field-background-disabled-opacity, 0.04)));\n }\n :host([disabled]) .container::after {\n border-color: var(--u-field-disabled-border-color, var(--_disabled-color));\n }\n :host([disabled]) .supporting-text {\n color: var(--u-field-supporting-text-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .label {\n color: var(--u-field-label-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .input select,\n :host([disabled]) .input select::placeholder,\n :host([disabled]) .input textarea,\n :host([disabled]) .input textarea::placeholder,\n :host([disabled]) .input input,\n :host([disabled]) .input input::placeholder,\n :host([disabled]) .input ::slotted(*),\n :host([disabled]) .input ::slotted(:is(input, textarea))::placeholder {\n color: var(--u-field-input-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .trailing-icon {\n color: var(--u-field-trailing-icon-disabled-color, var(--_disabled-color));\n }\n :host([disabled]) .leading-icon {\n color: var(--u-field-leading-icon-disabled-color, var(--_disabled-color));\n }\n`;\n"]}
package/index.d.ts CHANGED
@@ -17,6 +17,7 @@ import './switch/switch-list-item.js';
17
17
  import './elevation/elevation.js';
18
18
  import './field/field.js';
19
19
  import './text-field/text-field.js';
20
+ import './text-area/text-area.js';
20
21
  import './select/select.js';
21
22
  import './list/list.js';
22
23
  import './list/list-item.js';
@@ -53,6 +54,7 @@ export * from './switch/switch-list-item.js';
53
54
  export * from './elevation/elevation.js';
54
55
  export * from './field/field.js';
55
56
  export * from './text-field/text-field.js';
57
+ export * from './text-area/text-area.js';
56
58
  export * from './select/select.js';
57
59
  export * from './select/option.js';
58
60
  export * from './list/list.js';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAClC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,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,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
package/index.js CHANGED
@@ -17,6 +17,7 @@ import './switch/switch-list-item.js';
17
17
  import './elevation/elevation.js';
18
18
  import './field/field.js';
19
19
  import './text-field/text-field.js';
20
+ import './text-area/text-area.js';
20
21
  import './select/select.js';
21
22
  import './list/list.js';
22
23
  import './list/list-item.js';
@@ -53,6 +54,7 @@ export * from './switch/switch-list-item.js';
53
54
  export * from './elevation/elevation.js';
54
55
  export * from './field/field.js';
55
56
  export * from './text-field/text-field.js';
57
+ export * from './text-area/text-area.js';
56
58
  export * from './select/select.js';
57
59
  export * from './select/option.js';
58
60
  export * from './list/list.js';
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAClC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AACtC,OAAO,0BAA0B,CAAC;AAClC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,4BAA4B,CAAC;A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;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC","sourcesContent":["import './app-bar/top-app-bar.js';\nimport './button/button.js';\nimport './button/button-set.js';\nimport './button/fab.js';\nimport './button/icon-button.js';\nimport './card/card.js';\nimport './chip/chip.js';\nimport './chip/chip-set.js';\nimport './chip-field/chip-field.js';\nimport './dialog/dialog.js';\nimport './checkbox/checkbox.js';\nimport './checkbox/checkbox-list-item.js';\nimport './radio/radio.js';\nimport './radio/radio-list-item.js';\nimport './switch/switch.js';\nimport './switch/switch-list-item.js';\nimport './elevation/elevation.js';\nimport './field/field.js';\nimport './text-field/text-field.js';\nimport './select/select.js';\nimport './list/list.js';\nimport './list/list-item.js';\nimport './menu/menu.js';\nimport './menu/menu-item.js';\nimport './navigation/drawer.js';\nimport './navigation/drawer-item.js';\nimport './navigation/side-navigation.js';\nimport './progress/circular-progress.js';\nimport './progress/progress-bar.js';\nimport './ripple/ripple.js';\nimport './snackbar/snackbar.js';\nimport './tab-bar/tab-bar.js';\nimport './tab-bar/tab.js';\nimport './typeahead/highlight.js';\nimport './typeahead/typeahead.js';\n\nexport * from './app-bar/top-app-bar.js';\nexport * from './button/button.js';\nexport * from './button/button-base.js';\nexport * from './button/button-set.js';\nexport * from './button/fab.js';\nexport * from './button/icon-button.js';\nexport * from './card/card.js';\nexport * from './card/card-content.js';\nexport * from './card/card-media.js';\nexport * from './chip/chip.js';\nexport * from './chip-field/chip-field.js';\nexport * from './chip/chip-set.js';\nexport * from './dialog/dialog.js';\nexport * from './checkbox/checkbox.js';\nexport * from './radio/radio.js';\nexport * from './switch/switch.js';\nexport * from './switch/switch-list-item.js';\nexport * from './elevation/elevation.js';\nexport * from './field/field.js';\nexport * from './text-field/text-field.js';\nexport * from './select/select.js';\nexport * from './select/option.js';\nexport * from './list/list.js';\nexport * from './list/list-item.js';\nexport * from './menu/menu.js';\nexport * from './menu/menu-item.js';\nexport * from './navigation/drawer.js';\nexport * from './navigation/drawer-item.js';\nexport * from './navigation/side-navigation.js';\nexport * from './progress/circular-progress.js';\nexport * from './progress/progress-bar.js';\nexport * from './ripple/ripple.js';\nexport * from './snackbar/snackbar.js';\nexport * from './tab-bar/tab-bar.js';\nexport * from './tab-bar/tab.js';\nexport * from './theme/theme-builder.js';\nexport * from './typeahead/highlight.js';\nexport * from './typeahead/typeahead.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAClC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AACtC,OAAO,0BAA0B,CAAC;AAClC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,gBAAgB,CAAC;AACxB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,wBAAwB,CAAC;AAChC,OAAO,6BAA6B,CAAC;AACrC,OAAO,iCAAiC,CAAC;AACzC,OAAO,iCAAiC,CAAC;AACzC,OAA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import './app-bar/top-app-bar.js';\nimport './button/button.js';\nimport './button/button-set.js';\nimport './button/fab.js';\nimport './button/icon-button.js';\nimport './card/card.js';\nimport './chip/chip.js';\nimport './chip/chip-set.js';\nimport './chip-field/chip-field.js';\nimport './dialog/dialog.js';\nimport './checkbox/checkbox.js';\nimport './checkbox/checkbox-list-item.js';\nimport './radio/radio.js';\nimport './radio/radio-list-item.js';\nimport './switch/switch.js';\nimport './switch/switch-list-item.js';\nimport './elevation/elevation.js';\nimport './field/field.js';\nimport './text-field/text-field.js';\nimport './text-area/text-area.js';\nimport './select/select.js';\nimport './list/list.js';\nimport './list/list-item.js';\nimport './menu/menu.js';\nimport './menu/menu-item.js';\nimport './navigation/drawer.js';\nimport './navigation/drawer-item.js';\nimport './navigation/side-navigation.js';\nimport './progress/circular-progress.js';\nimport './progress/progress-bar.js';\nimport './ripple/ripple.js';\nimport './snackbar/snackbar.js';\nimport './tab-bar/tab-bar.js';\nimport './tab-bar/tab.js';\nimport './typeahead/highlight.js';\nimport './typeahead/typeahead.js';\n\nexport * from './app-bar/top-app-bar.js';\nexport * from './button/button.js';\nexport * from './button/button-base.js';\nexport * from './button/button-set.js';\nexport * from './button/fab.js';\nexport * from './button/icon-button.js';\nexport * from './card/card.js';\nexport * from './card/card-content.js';\nexport * from './card/card-media.js';\nexport * from './chip/chip.js';\nexport * from './chip-field/chip-field.js';\nexport * from './chip/chip-set.js';\nexport * from './dialog/dialog.js';\nexport * from './checkbox/checkbox.js';\nexport * from './radio/radio.js';\nexport * from './switch/switch.js';\nexport * from './switch/switch-list-item.js';\nexport * from './elevation/elevation.js';\nexport * from './field/field.js';\nexport * from './text-field/text-field.js';\nexport * from './text-area/text-area.js';\nexport * from './select/select.js';\nexport * from './select/option.js';\nexport * from './list/list.js';\nexport * from './list/list-item.js';\nexport * from './menu/menu.js';\nexport * from './menu/menu-item.js';\nexport * from './navigation/drawer.js';\nexport * from './navigation/drawer-item.js';\nexport * from './navigation/side-navigation.js';\nexport * from './progress/circular-progress.js';\nexport * from './progress/progress-bar.js';\nexport * from './ripple/ripple.js';\nexport * from './snackbar/snackbar.js';\nexport * from './tab-bar/tab-bar.js';\nexport * from './tab-bar/tab.js';\nexport * from './theme/theme-builder.js';\nexport * from './typeahead/highlight.js';\nexport * from './typeahead/typeahead.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-material/web",
3
- "version": "3.0.92",
3
+ "version": "3.0.93",
4
4
  "description": "Material web components",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -0,0 +1,14 @@
1
+ import { UmTextFieldBase } from '../text-field-base/text-field-base.js';
2
+ export declare abstract class UmNativeTextFieldWrapper extends UmTextFieldBase {
3
+ #private;
4
+ protected _value: string;
5
+ get value(): string;
6
+ set value(value: string);
7
+ autocomplete: 'on' | 'off' | string | undefined;
8
+ get maxlength(): number | undefined;
9
+ set maxlength(value: number);
10
+ focus(): void;
11
+ abstract input: HTMLInputElement | HTMLTextAreaElement;
12
+ protected _handleInput(): void;
13
+ }
14
+ //# sourceMappingURL=native-text-field-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-text-field-wrapper.d.ts","sourceRoot":"","sources":["../../../src/shared/char-count-text-field/native-text-field-wrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,8BAAsB,wBAAyB,SAAQ,eAAe;;IACpE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAM;IAC9B,IACI,KAAK,IAGQ,MAAM,CADtB;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAItB;IAE4B,YAAY,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAI7E,IACI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAG1B;IAEQ,KAAK;IAId,QAAQ,CAAC,KAAK,EAAE,gBAAgB,GAAG,mBAAmB,CAAC;IAEvD,SAAS,CAAC,YAAY;CAavB"}
@@ -0,0 +1,54 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { property } from 'lit/decorators.js';
8
+ import { UmTextFieldBase } from '../text-field-base/text-field-base.js';
9
+ export class UmNativeTextFieldWrapper extends UmTextFieldBase {
10
+ constructor() {
11
+ super(...arguments);
12
+ this._value = '';
13
+ }
14
+ get value() {
15
+ return this._value;
16
+ }
17
+ set value(value) {
18
+ this._value = value;
19
+ this.empty = !value;
20
+ this.elementInternals.setFormValue(value);
21
+ }
22
+ #maxlength;
23
+ get maxlength() {
24
+ return this.#maxlength;
25
+ }
26
+ set maxlength(value) {
27
+ this.#maxlength = value;
28
+ this.#updateCounter();
29
+ }
30
+ focus() {
31
+ this.input.focus();
32
+ }
33
+ _handleInput() {
34
+ this.value = this.input.value;
35
+ this.#updateCounter();
36
+ }
37
+ #updateCounter() {
38
+ if (this.maxlength) {
39
+ this._innerCounter = `${this.value.length}/${this.maxlength}`;
40
+ return;
41
+ }
42
+ this._innerCounter = undefined;
43
+ }
44
+ }
45
+ __decorate([
46
+ property()
47
+ ], UmNativeTextFieldWrapper.prototype, "value", null);
48
+ __decorate([
49
+ property({ reflect: true })
50
+ ], UmNativeTextFieldWrapper.prototype, "autocomplete", void 0);
51
+ __decorate([
52
+ property({ type: Number, reflect: true })
53
+ ], UmNativeTextFieldWrapper.prototype, "maxlength", null);
54
+ //# sourceMappingURL=native-text-field-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-text-field-wrapper.js","sourceRoot":"","sources":["../../../src/shared/char-count-text-field/native-text-field-wrapper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,MAAM,OAAgB,wBAAyB,SAAQ,eAAe;IAAtE;;QACY,WAAM,GAAW,EAAE,CAAC;IA2ChC,CAAC;IAzCC,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,IAAI,KAAK,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;QACpB,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAID,UAAU,CAAqB;IAG/B,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,IAAI,SAAS,CAAC,KAAa;QACzB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEQ,KAAK;QACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAIS,YAAY;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,cAAc;QACZ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,aAAa,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9D,OAAO;QACT,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;IACjC,CAAC;CACF;AAzCC;IADC,QAAQ,EAAE;qDAGV;AAO4B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8DAAiD;AAK7E;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDAGzC","sourcesContent":["import { property } from 'lit/decorators.js';\n\nimport { UmTextFieldBase } from '../text-field-base/text-field-base.js';\n\nexport abstract class UmNativeTextFieldWrapper extends UmTextFieldBase {\n protected _value: string = '';\n @property()\n get value() {\n return this._value;\n }\n set value(value: string) {\n this._value = value;\n this.empty = !value;\n this.elementInternals.setFormValue(value);\n }\n\n @property({ reflect: true }) autocomplete: 'on' | 'off' | string | undefined;\n\n #maxlength: number | undefined;\n\n @property({ type: Number, reflect: true })\n get maxlength(): number | undefined {\n return this.#maxlength;\n }\n set maxlength(value: number) {\n this.#maxlength = value;\n this.#updateCounter();\n }\n\n override focus() {\n this.input.focus();\n }\n\n abstract input: HTMLInputElement | HTMLTextAreaElement;\n\n protected _handleInput() {\n this.value = this.input.value;\n this.#updateCounter();\n }\n\n #updateCounter() {\n if (this.maxlength) {\n this._innerCounter = `${this.value.length}/${this.maxlength}`;\n return;\n }\n\n this._innerCounter = undefined;\n }\n}\n"]}
@@ -8,7 +8,7 @@ export declare abstract class UmTextFieldBase extends UmFieldBase {
8
8
  * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.
9
9
  */
10
10
  empty: boolean;
11
- placeholder: string | undefined;
11
+ placeholder: string;
12
12
  get form(): HTMLFormElement | null;
13
13
  protected readonly elementInternals: ElementInternals;
14
14
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"text-field-base.d.ts","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAM/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,8BAAsB,eAAgB,SAAQ,WAAW;IACvD,MAAM,CAAC,QAAQ,CAAC,cAAc,QAAQ;IAEtC,OAAgB,MAAM,EAAE,cAAc,CAAgC;IAEtE,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF;;OAEG;IACM,KAAK,UAAQ;IAEK,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3D,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;;CAMvD"}
1
+ {"version":3,"file":"text-field-base.d.ts","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAM/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,8BAAsB,eAAgB,SAAQ,WAAW;IACvD,MAAM,CAAC,QAAQ,CAAC,cAAc,QAAQ;IAEtC,OAAgB,MAAM,EAAE,cAAc,CAAgC;IAEtE,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF;;OAEG;IACM,KAAK,UAAQ;IAEO,WAAW,EAAE,MAAM,CAAM;IAEtD,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;;CAMvD"}
@@ -24,6 +24,7 @@ export class UmTextFieldBase extends UmFieldBase {
24
24
  * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.
25
25
  */
26
26
  this.empty = true;
27
+ this.placeholder = '';
27
28
  this.elementInternals = this.attachInternals();
28
29
  }
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"text-field-base.js","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,OAAgB,eAAgB,SAAQ,WAAW;aACvC,mBAAc,GAAG,IAAI,AAAP,CAAQ;aAEtB,WAAM,GAAmB,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,AAA/C,CAAgD;aAEtD,sBAAiB,GAAmB;QAClD,GAAG,UAAU,CAAC,iBAAiB;QAC/B,cAAc,EAAE,IAAI;KACrB,AAHgC,CAG/B;IASF,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC;IAID;QACE,KAAK,EAAE,CAAC;QAdV;;WAEG;QACM,UAAK,GAAG,IAAI,CAAC;QAYpB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IACjD,CAAC;;AAX0B;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;oDAAiC","sourcesContent":["import { CSSResultGroup } from '@lit/reactive-element/css-tag';\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { styles } from './text-field-base.styles.js';\n\nimport { UmFieldBase } from '../../field/field-base.js';\n\nexport abstract class UmTextFieldBase extends UmFieldBase {\n static readonly formAssociated = true;\n\n static override styles: CSSResultGroup = [UmFieldBase.styles, styles];\n\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.\n */\n override empty = true;\n\n @property({reflect: true}) placeholder: string | undefined;\n\n get form(): HTMLFormElement | null {\n return this.elementInternals.form;\n }\n\n protected readonly elementInternals: ElementInternals;\n\n constructor() {\n super();\n this.elementInternals = this.attachInternals();\n }\n}\n"]}
1
+ {"version":3,"file":"text-field-base.js","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,OAAgB,eAAgB,SAAQ,WAAW;aACvC,mBAAc,GAAG,IAAI,AAAP,CAAQ;aAEtB,WAAM,GAAmB,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,AAA/C,CAAgD;aAEtD,sBAAiB,GAAmB;QAClD,GAAG,UAAU,CAAC,iBAAiB;QAC/B,cAAc,EAAE,IAAI;KACrB,AAHgC,CAG/B;IASF,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC;IAID;QACE,KAAK,EAAE,CAAC;QAdV;;WAEG;QACM,UAAK,GAAG,IAAI,CAAC;QAEO,gBAAW,GAAW,EAAE,CAAC;QAUpD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IACjD,CAAC;;AAX4B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA0B","sourcesContent":["import { CSSResultGroup } from '@lit/reactive-element/css-tag';\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { styles } from './text-field-base.styles.js';\n\nimport { UmFieldBase } from '../../field/field-base.js';\n\nexport abstract class UmTextFieldBase extends UmFieldBase {\n static readonly formAssociated = true;\n\n static override styles: CSSResultGroup = [UmFieldBase.styles, styles];\n\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.\n */\n override empty = true;\n\n @property({ reflect: true }) placeholder: string = '';\n\n get form(): HTMLFormElement | null {\n return this.elementInternals.form;\n }\n\n protected readonly elementInternals: ElementInternals;\n\n constructor() {\n super();\n this.elementInternals = this.attachInternals();\n }\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import { CSSResultGroup } from '@lit/reactive-element/css-tag';
2
+ import { HTMLTemplateResult } from 'lit';
3
+ import { UmNativeTextFieldWrapper } from '../shared/char-count-text-field/native-text-field-wrapper.js';
4
+ export declare class UmTextArea extends UmNativeTextFieldWrapper {
5
+ static styles: CSSResultGroup;
6
+ rows: number;
7
+ input: HTMLTextAreaElement;
8
+ protected renderControl(): HTMLTemplateResult;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ 'u-text-area': UmTextArea;
13
+ }
14
+ }
15
+ //# sourceMappingURL=text-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-area.d.ts","sourceRoot":"","sources":["../../src/text-area/text-area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAQ,kBAAkB,EAAW,MAAM,KAAK,CAAC;AAMxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AAGxG,qBACa,UAAW,SAAQ,wBAAwB;IACtD,OAAgB,MAAM,EAAE,cAAc,CAAoC;IAE9C,IAAI,SAAK;IAET,KAAK,EAAG,mBAAmB,CAAC;cAErC,aAAa,IAAI,kBAAkB;CAqBvD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -0,0 +1,51 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, nothing } from 'lit';
8
+ import { customElement, property, query } from 'lit/decorators.js';
9
+ import { live } from 'lit/directives/live.js';
10
+ import { styles } from './text-area.styles.js';
11
+ import { UmNativeTextFieldWrapper } from '../shared/char-count-text-field/native-text-field-wrapper.js';
12
+ import { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js';
13
+ let UmTextArea = class UmTextArea extends UmNativeTextFieldWrapper {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.rows = 2;
17
+ }
18
+ static { this.styles = [UmTextFieldBase.styles, styles]; }
19
+ renderControl() {
20
+ return html `
21
+ <div class="input">
22
+ <textarea
23
+ part="input"
24
+ id=${this.id || nothing}
25
+ aria-labelledby="label"
26
+ aria-describedBy="supporting-text"
27
+ ?disabled=${this.disabled}
28
+ spellcheck=${this.spellcheck}
29
+ autocomplete=${this.autocomplete}
30
+ autocapitalize=${this.autocapitalize}
31
+ role=${this.role}
32
+ maxlength=${this.maxlength ?? nothing}
33
+ .rows=${this.rows}
34
+ .placeholder=${this.placeholder}
35
+ .value=${live(this._value)}
36
+ @input=${this._handleInput}></textarea>
37
+ </div>
38
+ `;
39
+ }
40
+ };
41
+ __decorate([
42
+ property({ type: Number })
43
+ ], UmTextArea.prototype, "rows", void 0);
44
+ __decorate([
45
+ query('textarea')
46
+ ], UmTextArea.prototype, "input", void 0);
47
+ UmTextArea = __decorate([
48
+ customElement('u-text-area')
49
+ ], UmTextArea);
50
+ export { UmTextArea };
51
+ //# sourceMappingURL=text-area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-area.js","sourceRoot":"","sources":["../../src/text-area/text-area.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,IAAI,EAAsB,OAAO,EAAE,MAAM,KAAK,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAGxE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,wBAAwB;IAAjD;;QAGuB,SAAI,GAAG,CAAC,CAAC;IAyBvC,CAAC;aA3BiB,WAAM,GAAmB,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnD,CAAoD;IAMvD,aAAa;QAC9B,OAAO,IAAI,CAAA;;;;eAIA,IAAI,CAAC,EAAE,IAAI,OAAO;;;sBAGX,IAAI,CAAC,QAAQ;uBACZ,IAAI,CAAC,UAAU;yBACb,IAAI,CAAC,YAAY;2BACf,IAAI,CAAC,cAAc;iBAC7B,IAAI,CAAC,IAAI;sBACJ,IAAI,CAAC,SAAS,IAAI,OAAO;kBAC7B,IAAI,CAAC,IAAI;yBACF,IAAI,CAAC,WAAW;mBACtB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;mBACjB,IAAI,CAAC,YAAY;;KAE/B,CAAC;IACJ,CAAC;;AAxB2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAU;AAET;IAA3B,KAAK,CAAC,UAAU,CAAC;yCAAsC;AAL7C,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA4BtB","sourcesContent":["import { CSSResultGroup } from '@lit/reactive-element/css-tag';\nimport { html, HTMLTemplateResult, nothing } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { live } from 'lit/directives/live.js';\n\nimport { styles } from './text-area.styles.js';\n\nimport { UmNativeTextFieldWrapper } from '../shared/char-count-text-field/native-text-field-wrapper.js';\nimport { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js';\n\n@customElement('u-text-area')\nexport class UmTextArea extends UmNativeTextFieldWrapper {\n static override styles: CSSResultGroup = [UmTextFieldBase.styles, styles];\n\n @property({ type: Number }) rows = 2;\n\n @query('textarea') override input!: HTMLTextAreaElement;\n\n protected override renderControl(): HTMLTemplateResult {\n return html`\n <div class=\"input\">\n <textarea\n part=\"input\"\n id=${this.id || nothing}\n aria-labelledby=\"label\"\n aria-describedBy=\"supporting-text\"\n ?disabled=${this.disabled}\n spellcheck=${this.spellcheck}\n autocomplete=${this.autocomplete}\n autocapitalize=${this.autocapitalize}\n role=${this.role}\n maxlength=${this.maxlength ?? nothing}\n .rows=${this.rows}\n .placeholder=${this.placeholder}\n .value=${live(this._value)}\n @input=${this._handleInput}></textarea>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-text-area': UmTextArea;\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=text-area.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-area.styles.d.ts","sourceRoot":"","sources":["../../src/text-area/text-area.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAoClB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `
3
+ :host {
4
+ resize: both;
5
+ }
6
+
7
+ .container,
8
+ .input-wrapper {
9
+ resize: inherit;
10
+ }
11
+
12
+ .input-wrapper,
13
+ .input,
14
+ textarea,
15
+ .container {
16
+ height: 100%;
17
+ }
18
+
19
+ .input-wrapper {
20
+ padding: 0 !important;
21
+ overflow: hidden;
22
+ }
23
+
24
+ textarea {
25
+ margin: 0;
26
+ resize: none;
27
+ }
28
+
29
+ .input textarea {
30
+ border-block: var(--_vertical-padding) solid transparent;
31
+ padding-inline: var(--_field-control-inline-padding);
32
+ }
33
+
34
+ .container.filled:not(.no-label) textarea {
35
+ border-top: calc(var(--_vertical-padding) + var(--_label-line-height)) solid transparent;
36
+ border-bottom: var(--_vertical-padding) solid transparent;
37
+ }
38
+ `;
39
+ //# sourceMappingURL=text-area.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-area.styles.js","sourceRoot":"","sources":["../../src/text-area/text-area.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n resize: both;\n }\n\n .container,\n .input-wrapper {\n resize: inherit;\n }\n\n .input-wrapper,\n .input,\n textarea,\n .container {\n height: 100%;\n }\n\n .input-wrapper {\n padding: 0 !important;\n overflow: hidden;\n }\n\n textarea {\n margin: 0;\n resize: none;\n }\n\n .input textarea {\n border-block: var(--_vertical-padding) solid transparent;\n padding-inline: var(--_field-control-inline-padding);\n }\n\n .container.filled:not(.no-label) textarea {\n border-top: calc(var(--_vertical-padding) + var(--_label-line-height)) solid transparent;\n border-bottom: var(--_vertical-padding) solid transparent;\n }\n`;\n"]}
@@ -1,18 +1,13 @@
1
1
  import { CSSResultGroup } from '@lit/reactive-element/css-tag';
2
2
  import { HTMLTemplateResult } from 'lit';
3
- import { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js';
4
- export declare class UmTextField extends UmTextFieldBase {
5
- #private;
3
+ import { UmNativeTextFieldWrapper } from '../shared/char-count-text-field/native-text-field-wrapper.js';
4
+ export declare class UmTextField extends UmNativeTextFieldWrapper {
6
5
  static styles: CSSResultGroup;
7
- get value(): string;
8
- set value(value: string);
9
6
  type: string;
10
7
  prefixText: string | undefined;
11
8
  suffixText: string | undefined;
12
- autocomplete: 'on' | 'off' | string | undefined;
13
9
  autocapitalize: string;
14
10
  input: HTMLInputElement;
15
- focus(): void;
16
11
  protected renderControl(): HTMLTemplateResult;
17
12
  }
18
13
  declare global {