@fluid-topics/ft-text-input 1.3.20 → 1.3.21

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.
@@ -1594,7 +1594,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
1594
1594
  >
1595
1595
  </ftds-button>
1596
1596
  `:Zt.html`
1597
- <ft-icon aria-label="${Rr(l)}" aria-hidden="${!!l}" .value=${o}></ft-icon>`}};G.elementDefinitions={"ftds-input-helper-text":Oe,"ftds-input-label":nt,"ft-icon":ae,"ftds-button":je,"ft-tooltip":j};G.styles=[Oc];de([(0,Q.property)()],G.prototype,"status",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"disabled",void 0);de([(0,Q.property)()],G.prototype,"label",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"hideLabel",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"raiseLabel",void 0);de([(0,Q.property)()],G.prototype,"helperText",void 0);de([(0,Q.property)()],G.prototype,"appendIcon",void 0);de([(0,Q.property)()],G.prototype,"appendIconVariant",void 0);de([(0,Q.property)()],G.prototype,"appendIconLabel",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"appendIconIsClickable",void 0);de([(0,Q.property)()],G.prototype,"prependIcon",void 0);de([(0,Q.property)()],G.prototype,"prependIconVariant",void 0);de([(0,Q.property)()],G.prototype,"prependIconLabel",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"prependIconIsClickable",void 0);de([(0,Q.state)()],G.prototype,"errorMessages",void 0);de([(0,Q.state)()],G.prototype,"warningMessages",void 0);de([(0,Q.state)()],G.prototype,"hasFocus",void 0);de([(0,Q.query)(".ft-base-input")],G.prototype,"container",void 0);de([(0,Q.query)("slot:not([name])")],G.prototype,"mainSlot",void 0);(0,Ec.customElement)("ftds-base-input")(G);var Vo=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},ia=class extends Event{constructor(){super("clear")}},et=class extends No((0,ht.toFtInput)(ht.FtdsBase)){constructor(){var r;super(),this.type=Ae.text,this.clearable=!1,this.showClearPassword=!1,this.value=(r=this.value)!==null&&r!==void 0?r:"",this.addI18nContext(Gt,El)}get inputType(){return this.type===Ae.password&&this.showClearPassword?Ae.text:this.type}onInput(){var r;this.value=((r=this.input)===null||r===void 0?void 0:r.value)||"",super.onInput()}connectedCallback(){this.updateTypeBasedAdditionalRules(this.type),super.connectedCallback()}willUpdate(r){super.willUpdate(r),r.has("type")&&this.updateTypeBasedAdditionalRules(this.type)}get appendIcon(){if(!this.disabled){if(this.type===Ae.password)return this.showClearPassword?Be.EYE_SLASH:Be.EYE;if(this.clearable&&this.value)return Be.X_MARK}}get appendIconLabel(){return this.type===Ae.password?this.showClearPassword?Gt.messages.hidePassword():Gt.messages.showPassword():this.clearable?Gt.messages.clear():""}render(){let r=(0,Ac.classMap)({"ftds-input":!0,...this.getDesignSystemBaseClasses()});return wc.html`
1597
+ <ft-icon aria-label="${Rr(l)}" aria-hidden="${!!l}" .value=${o}></ft-icon>`}};G.elementDefinitions={"ftds-input-helper-text":Oe,"ftds-input-label":nt,"ft-icon":ae,"ftds-button":je,"ft-tooltip":j};G.styles=[Oc];de([(0,Q.property)()],G.prototype,"status",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"disabled",void 0);de([(0,Q.property)()],G.prototype,"label",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"hideLabel",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"raiseLabel",void 0);de([(0,Q.property)()],G.prototype,"helperText",void 0);de([(0,Q.property)()],G.prototype,"appendIcon",void 0);de([(0,Q.property)()],G.prototype,"appendIconVariant",void 0);de([(0,Q.property)()],G.prototype,"appendIconLabel",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"appendIconIsClickable",void 0);de([(0,Q.property)()],G.prototype,"prependIcon",void 0);de([(0,Q.property)()],G.prototype,"prependIconVariant",void 0);de([(0,Q.property)()],G.prototype,"prependIconLabel",void 0);de([(0,Q.property)({type:Boolean})],G.prototype,"prependIconIsClickable",void 0);de([(0,Q.state)()],G.prototype,"errorMessages",void 0);de([(0,Q.state)()],G.prototype,"warningMessages",void 0);de([(0,Q.state)()],G.prototype,"hasFocus",void 0);de([(0,Q.query)(".ft-base-input")],G.prototype,"container",void 0);de([(0,Q.query)("slot:not([name])")],G.prototype,"mainSlot",void 0);(0,Ec.customElement)("ftds-base-input")(G);var Vo=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},ia=class extends Event{constructor(){super("clear")}},et=class extends No((0,ht.toFtInput)(ht.FtdsBase)){constructor(){var r;super(),this.type=Ae.text,this.clearable=!1,this.showClearPassword=!1,this.value=(r=this.value)!==null&&r!==void 0?r:"",this.addI18nContext(Gt,El)}get inputType(){return this.type===Ae.password&&this.showClearPassword?Ae.text:this.type}onInput(){var r;this.value=((r=this.input)===null||r===void 0?void 0:r.value)||"",super.onInput()}connectedCallback(){this.updateTypeBasedAdditionalRules(this.type),super.connectedCallback()}focus(){var r;(r=this.input)===null||r===void 0||r.focus()}willUpdate(r){super.willUpdate(r),r.has("type")&&this.updateTypeBasedAdditionalRules(this.type)}get appendIcon(){if(!this.disabled){if(this.type===Ae.password)return this.showClearPassword?Be.EYE_SLASH:Be.EYE;if(this.clearable&&this.value)return Be.X_MARK}}get appendIconLabel(){return this.type===Ae.password?this.showClearPassword?Gt.messages.hidePassword():Gt.messages.showPassword():this.clearable?Gt.messages.clear():""}render(){let r=(0,Ac.classMap)({"ftds-input":!0,...this.getDesignSystemBaseClasses()});return wc.html`
1598
1598
  <ftds-base-input
1599
1599
 
1600
1600
  .status=${this.status}
@@ -1674,7 +1674,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1674
1674
  >
1675
1675
  </ftds-button>
1676
1676
  `:U`
1677
- <ft-icon aria-label="${ho(s)}" aria-hidden="${!!s}" .value=${o}></ft-icon>`}};ee.elementDefinitions={"ftds-input-helper-text":Re,"ftds-input-label":bt,"ft-icon":pe,"ftds-button":qe,"ft-tooltip":re};ee.styles=[hd];fe([S()],ee.prototype,"status",void 0);fe([S({type:Boolean})],ee.prototype,"disabled",void 0);fe([S()],ee.prototype,"label",void 0);fe([S({type:Boolean})],ee.prototype,"hideLabel",void 0);fe([S({type:Boolean})],ee.prototype,"raiseLabel",void 0);fe([S()],ee.prototype,"helperText",void 0);fe([S()],ee.prototype,"appendIcon",void 0);fe([S()],ee.prototype,"appendIconVariant",void 0);fe([S()],ee.prototype,"appendIconLabel",void 0);fe([S({type:Boolean})],ee.prototype,"appendIconIsClickable",void 0);fe([S()],ee.prototype,"prependIcon",void 0);fe([S()],ee.prototype,"prependIconVariant",void 0);fe([S()],ee.prototype,"prependIconLabel",void 0);fe([S({type:Boolean})],ee.prototype,"prependIconIsClickable",void 0);fe([Y()],ee.prototype,"errorMessages",void 0);fe([Y()],ee.prototype,"warningMessages",void 0);fe([Y()],ee.prototype,"hasFocus",void 0);fe([ce(".ft-base-input")],ee.prototype,"container",void 0);fe([ce("slot:not([name])")],ee.prototype,"mainSlot",void 0);Q("ftds-base-input")(ee);var mn=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},rs=class extends Event{constructor(){super("clear")}},at=class extends dn(xc(Wt)){constructor(){var e;super(),this.type=ke.text,this.clearable=!1,this.showClearPassword=!1,this.value=(e=this.value)!==null&&e!==void 0?e:"",this.addI18nContext(tr,td)}get inputType(){return this.type===ke.password&&this.showClearPassword?ke.text:this.type}onInput(){var e;this.value=((e=this.input)===null||e===void 0?void 0:e.value)||"",super.onInput()}connectedCallback(){this.updateTypeBasedAdditionalRules(this.type),super.connectedCallback()}willUpdate(e){super.willUpdate(e),e.has("type")&&this.updateTypeBasedAdditionalRules(this.type)}get appendIcon(){if(!this.disabled){if(this.type===ke.password)return this.showClearPassword?je.EYE_SLASH:je.EYE;if(this.clearable&&this.value)return je.X_MARK}}get appendIconLabel(){return this.type===ke.password?this.showClearPassword?tr.messages.hidePassword():tr.messages.showPassword():this.clearable?tr.messages.clear():""}render(){let e=Ee({"ftds-input":!0,...this.getDesignSystemBaseClasses()});return U`
1677
+ <ft-icon aria-label="${ho(s)}" aria-hidden="${!!s}" .value=${o}></ft-icon>`}};ee.elementDefinitions={"ftds-input-helper-text":Re,"ftds-input-label":bt,"ft-icon":pe,"ftds-button":qe,"ft-tooltip":re};ee.styles=[hd];fe([S()],ee.prototype,"status",void 0);fe([S({type:Boolean})],ee.prototype,"disabled",void 0);fe([S()],ee.prototype,"label",void 0);fe([S({type:Boolean})],ee.prototype,"hideLabel",void 0);fe([S({type:Boolean})],ee.prototype,"raiseLabel",void 0);fe([S()],ee.prototype,"helperText",void 0);fe([S()],ee.prototype,"appendIcon",void 0);fe([S()],ee.prototype,"appendIconVariant",void 0);fe([S()],ee.prototype,"appendIconLabel",void 0);fe([S({type:Boolean})],ee.prototype,"appendIconIsClickable",void 0);fe([S()],ee.prototype,"prependIcon",void 0);fe([S()],ee.prototype,"prependIconVariant",void 0);fe([S()],ee.prototype,"prependIconLabel",void 0);fe([S({type:Boolean})],ee.prototype,"prependIconIsClickable",void 0);fe([Y()],ee.prototype,"errorMessages",void 0);fe([Y()],ee.prototype,"warningMessages",void 0);fe([Y()],ee.prototype,"hasFocus",void 0);fe([ce(".ft-base-input")],ee.prototype,"container",void 0);fe([ce("slot:not([name])")],ee.prototype,"mainSlot",void 0);Q("ftds-base-input")(ee);var mn=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},rs=class extends Event{constructor(){super("clear")}},at=class extends dn(xc(Wt)){constructor(){var e;super(),this.type=ke.text,this.clearable=!1,this.showClearPassword=!1,this.value=(e=this.value)!==null&&e!==void 0?e:"",this.addI18nContext(tr,td)}get inputType(){return this.type===ke.password&&this.showClearPassword?ke.text:this.type}onInput(){var e;this.value=((e=this.input)===null||e===void 0?void 0:e.value)||"",super.onInput()}connectedCallback(){this.updateTypeBasedAdditionalRules(this.type),super.connectedCallback()}focus(){var e;(e=this.input)===null||e===void 0||e.focus()}willUpdate(e){super.willUpdate(e),e.has("type")&&this.updateTypeBasedAdditionalRules(this.type)}get appendIcon(){if(!this.disabled){if(this.type===ke.password)return this.showClearPassword?je.EYE_SLASH:je.EYE;if(this.clearable&&this.value)return je.X_MARK}}get appendIconLabel(){return this.type===ke.password?this.showClearPassword?tr.messages.hidePassword():tr.messages.showPassword():this.clearable?tr.messages.clear():""}render(){let e=Ee({"ftds-input":!0,...this.getDesignSystemBaseClasses()});return U`
1678
1678
  <ftds-base-input
1679
1679
 
1680
1680
  .status=${this.status}
@@ -17,6 +17,7 @@ export declare class FtdsTextInput extends FtdsTextInput_base implements FtdsTex
17
17
  get inputType(): FtdsTextInputType;
18
18
  onInput(): void;
19
19
  connectedCallback(): void;
20
+ focus(): void;
20
21
  protected willUpdate(props: PropertyValues): void;
21
22
  get appendIcon(): FtIcons.EYE_SLASH | FtIcons.X_MARK | FtIcons.EYE | undefined;
22
23
  get appendIconLabel(): string;
@@ -47,6 +47,10 @@ class FtdsTextInput extends withI18n(toFtInput(FtdsBase)) {
47
47
  this.updateTypeBasedAdditionalRules(this.type);
48
48
  super.connectedCallback();
49
49
  }
50
+ focus() {
51
+ var _a;
52
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
53
+ }
50
54
  willUpdate(props) {
51
55
  super.willUpdate(props);
52
56
  if (props.has("type")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-text-input",
3
- "version": "1.3.20",
3
+ "version": "1.3.21",
4
4
  "description": "Text Input",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,17 +19,17 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-base-input": "1.3.20",
23
- "@fluid-topics/ft-i18n": "1.3.20",
24
- "@fluid-topics/ft-icon": "1.3.20",
25
- "@fluid-topics/ft-input-helper-text": "1.3.20",
26
- "@fluid-topics/ft-input-label": "1.3.20",
27
- "@fluid-topics/ft-tooltip": "1.3.20",
28
- "@fluid-topics/ft-wc-utils": "1.3.20",
22
+ "@fluid-topics/ft-base-input": "1.3.21",
23
+ "@fluid-topics/ft-i18n": "1.3.21",
24
+ "@fluid-topics/ft-icon": "1.3.21",
25
+ "@fluid-topics/ft-input-helper-text": "1.3.21",
26
+ "@fluid-topics/ft-input-label": "1.3.21",
27
+ "@fluid-topics/ft-tooltip": "1.3.21",
28
+ "@fluid-topics/ft-wc-utils": "1.3.21",
29
29
  "lit": "3.1.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@fluid-topics/ft-wc-test-utils": "1.3.20"
32
+ "@fluid-topics/ft-wc-test-utils": "1.3.21"
33
33
  },
34
- "gitHead": "1bb0c50fc5a4fdb4f14d22b728ab719faddfc15e"
34
+ "gitHead": "fd30595cd89395cbcac48ca8146aecef2e9b8673"
35
35
  }