@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.0 → 0.0.0-pr624.1

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.
@@ -4891,7 +4891,7 @@ class AuroDropdown extends AuroElement$3 {
4891
4891
 
4892
4892
  var dropdownVersion = '3.0.0';
4893
4893
 
4894
- var shapeSizeCss = css`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0;min-height:60px;max-height:60px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px}.shape-pill-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px 0 0 34px}.shape-pill-left-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 34px 34px 0}.shape-pill-right-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px}.shape-pill-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px 0 0 34px}.shape-pill-left-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 34px 34px 0}.shape-pill-right-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}`;
4894
+ var shapeSizeCss = css`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}`;
4895
4895
 
4896
4896
  var styleCss$4 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}`;
4897
4897
 
@@ -4901,6 +4901,10 @@ var colorBaseCss = css`.wrapper{border-color:var(--ds-auro-input-border-color);b
4901
4901
 
4902
4902
  var tokensCss$4 = css`:host(:not(ondark)){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
4903
4903
 
4904
+ var classicStyleCss = css`.layout-classic{display:flex;flex-direction:row}.layout-classic .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;flex:1;cursor:text}.layout-classic .mainContent label{cursor:text;padding-top:4px;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);padding-bottom:8px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);height:auto}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{justify-self:flex-start;padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;line-height:0;padding-bottom:0}.layout-classic .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-classic .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-classic .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color);justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}.layout-classic .accents.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}`;
4905
+
4906
+ var classicColorCss = css`.layout-default label{color:var(--ds-auro-input-label-text-color)}`;
4907
+
4904
4908
  var emphasizedStyleCss = css`:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{background:unset;width:100%;padding:0;border:0;outline:none;overflow:hidden;text-overflow:ellipsis}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.layout-emphasized,.layout-emphasized-left,.layout-emphasized-right{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-emphasized label,.layout-emphasized-left label,.layout-emphasized-right label{text-transform:uppercase;font-size:32px;line-height:38px}.layout-emphasized input,.layout-emphasized-left input,.layout-emphasized-right input{text-align:center;font-size:14px;line-height:20px}.layout-emphasized .mainContent,.layout-emphasized-left .mainContent,.layout-emphasized-right .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-emphasized .displayValue,.layout-emphasized-left .displayValue,.layout-emphasized-right .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-emphasized .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-left .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-right .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-emphasized .displayValueWrapper,.layout-emphasized-left .displayValueWrapper,.layout-emphasized-right .displayValueWrapper{transform:translateY(-50%)}.layout-emphasized .accents,.layout-emphasized-left .accents,.layout-emphasized-right .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-emphasized.withValue,.layout-emphasized-left.withValue,.layout-emphasized-right.withValue{justify-content:flex-start}.layout-emphasized.withValue label,.layout-emphasized-left.withValue label,.layout-emphasized-right.withValue label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized.withValue input,.layout-emphasized-left.withValue input,.layout-emphasized-right.withValue input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-left:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-right:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{justify-content:flex-start}.layout-emphasized:focus-within label,.layout-emphasized-left:focus-within label,.layout-emphasized-right:focus-within label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized:focus-within input,.layout-emphasized-left:focus-within input,.layout-emphasized-right:focus-within input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:focus-within .alertNotification,.layout-emphasized-left:focus-within .alertNotification,.layout-emphasized-right:focus-within .alertNotification{display:none}.layout-emphasized .accents.left,.layout-emphasized-left .accents.left,.layout-emphasized-right .accents.left{padding-left:24px}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:24px}.layout-emphasized-left .alertNotification{margin-right:8px}.layout-emphasized-left .clear{margin-left:8px}.layout-emphasized-right .alertNotification{margin-left:8px}.layout-emphasized-right .clear{margin-right:8px}`;
4905
4909
 
4906
4910
  var emphasizedColorCss = css`.layout-emphasized:focus-within,.layout-emphasized.withValue,.layout-emphasized-left:focus-within,.layout-emphasized-left.withValue,.layout-emphasized-right:focus-within,.layout-emphasized-right.withValue{--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{--auro-input-border-color: var(--ds-auro-input-border-color)}`;
@@ -9845,9 +9849,9 @@ class BaseInput extends AuroElement$1$1 {
9845
9849
  this.required = false;
9846
9850
  this.setCustomValidityForType = undefined;
9847
9851
 
9848
- this.layout = 'default';
9852
+ this.layout = 'classic';
9849
9853
  this.shape = 'rounded';
9850
- this.size = 'xl';
9854
+ this.size = 'lg';
9851
9855
  }
9852
9856
 
9853
9857
  /**
@@ -11977,6 +11981,8 @@ class AuroInput extends BaseInput {
11977
11981
  css`${styleCss$4}`,
11978
11982
  css`${styleDefaultCss}`,
11979
11983
  css`${tokensCss$4}`,
11984
+ css`${classicStyleCss}`,
11985
+ css`${classicColorCss}`,
11980
11986
  css`${emphasizedStyleCss}`,
11981
11987
  css`${emphasizedColorCss}`,
11982
11988
  css`${snowflakeStyleCss}`
@@ -12087,14 +12093,19 @@ class AuroInput extends BaseInput {
12087
12093
  /**
12088
12094
  * Returns HTML for the HTML5 input element.
12089
12095
  * @private
12096
+ * @param {boolean} [hideInputWhenBlurred=false] - If true, the input will be visually hidden when not focused and has no value.
12090
12097
  * @returns {html} - Returns HTML for the HTML5 input element.
12091
12098
  */
12092
- renderHtmlInput() {
12099
+ renderHtmlInput(hideInputWhenBlurred = false) {
12093
12100
  const displayValueClasses = {
12094
12101
  'displayValue': true,
12095
12102
  'hasContent': this.hasDisplayValueContent,
12096
12103
  'hasFocus': this.hasFocus,
12097
- 'withValue': this.value && this.value.length > 0
12104
+ 'withValue': this.value && this.value.length > 0,
12105
+ };
12106
+
12107
+ const inputClasses = {
12108
+ 'util_displayHiddenVisually': hideInputWhenBlurred && !this.hasFocus && !this.value
12098
12109
  };
12099
12110
 
12100
12111
  return html`
@@ -12117,6 +12128,7 @@ class AuroInput extends BaseInput {
12117
12128
  autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
12118
12129
  autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
12119
12130
  autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
12131
+ class="${classMap(inputClasses)}"
12120
12132
  id="${this.inputId}"
12121
12133
  inputMode="${ifDefined(this.inputMode ? this.inputMode : undefined)}"
12122
12134
  lang="${ifDefined(this.lang)}"
@@ -12262,137 +12274,32 @@ class AuroInput extends BaseInput {
12262
12274
  /**
12263
12275
  * Returns HTML for the default layout.
12264
12276
  * @private
12265
- * @returns {html} - Returns HTML for the default layout.
12277
+ * @returns {import("lit").TemplateResult} - Returns HTML for the default layout.
12266
12278
  */
12267
12279
  renderLayoutClassic() {
12268
- const wrapperClasses = {
12269
- 'layoutDefault': true
12270
- };
12271
-
12272
- // is-disabled class - THIS IS ONLY HERE TO MAKE A TEST PASS AS FAR AS I CAN TELL
12273
- const labelClasses = {
12274
- 'is-disabled': this.disabled,
12275
- 'withIcon': this.hasTypeIcon(),
12276
- 'withValue': this.value && this.value.length > 0
12277
- };
12278
-
12279
12280
  return html`
12280
- <div class="${classMap(wrapperClasses)}" part="wrapper">
12281
- <div class="main">
12282
- <div class="typeIcon">
12283
- ${this.type === 'credit-card' ? this.processCreditCard() : undefined}
12284
-
12285
- <!-- The repeat() method is used below in order to force auro-icon to re-render when the name value is updated.
12286
- This should be cleaned up when auro-icon issue #31 is resolved. -->
12287
- ${this.inputIconName
12288
- ? repeat([this.inputIconName], (val) => val, (name) => html`
12289
- <${this.iconTag}
12290
- class="accentIcon"
12291
- category="payment"
12292
- name="${name}"
12293
- part="accentIcon"
12294
- ?onDark="${this.onDark}"
12295
- variant="${this.disabled ? 'disabled' : 'muted'}">
12296
- </${this.iconTag}>
12297
- `) : undefined
12298
- }
12299
-
12300
- ${this.type === 'date'
12301
- ? html`
12302
- <${this.iconTag}
12303
- class="accentIcon"
12304
- category="interface"
12305
- name="calendar"
12306
- part="accentIcon"
12307
- ?onDark="${this.onDark}"
12308
- variant="${this.disabled ? 'disabled' : 'muted'}">
12309
- </${this.iconTag}>`
12310
- : undefined
12311
- }
12312
- </div>
12313
- <label for=${this.id} class="${classMap(labelClasses)}" part="label">
12314
- <slot name="label">
12315
- ${this.label}
12316
- </slot>
12317
- ${this.required ? '' : ` (${i18n(this.lang, 'optional')})`}
12318
- </label>
12319
-
12320
- ${this.renderHtmlInput()}
12281
+ <div
12282
+ @click="${this.handleClick}"
12283
+ class="${classMap(this.commonWrapperClasses)} thin"
12284
+ part="wrapper">
12285
+ <div class="accents left">
12286
+ ${this.renderHtmlTypeIcon()}
12321
12287
  </div>
12322
- <div
12323
- class="notificationIcons"
12324
- part="notificationIcons"
12325
- ?hasValue="${this.hasValue}">
12326
- ${this.validity && this.validity !== 'valid' ? html`
12327
- <div class="notification alertNotification">
12328
- <${this.iconTag}
12329
- category="alert"
12330
- customColor
12331
- name="error-stroke"
12332
- </${this.iconTag}>
12333
- </div>
12334
- ` : undefined}
12288
+ <div class="mainContent">
12289
+ ${this.renderHtmlInput(true)}
12290
+ </div>
12291
+ <div class="accents right">
12292
+ ${this.renderValidationErrorIconHtml()}
12335
12293
  ${this.hasValue ? html`
12336
- ${this.type === 'password' ? html`
12337
- <div class="notification">
12338
- <${this.buttonTag}
12339
- @click="${this.handleClickShowPassword}"
12340
- ?onDark="${this.onDark}"
12341
- aria-hidden="true"
12342
- class="notificationBtn passwordBtn"
12343
- tabindex="-1"
12344
- variant="flat">
12345
- <${this.iconTag}
12346
- ?hidden=${!this.showPassword}
12347
- category="interface"
12348
- customColor
12349
- name="hide-password-stroke">
12350
- </${this.iconTag}>
12351
- <${this.iconTag}
12352
- ?hidden=${this.showPassword}
12353
- category="interface"
12354
- customColor
12355
- name="view-password-stroke">
12356
- </${this.iconTag}>
12357
- </${this.buttonTag}>
12358
- </div>
12359
- ` : undefined}
12360
12294
  ${!this.disabled && !this.readonly ? html`
12361
- <div class="notification">
12362
- <${this.buttonTag}
12363
- @click="${this.handleClickClear}"
12364
- ?onDark="${this.onDark}"
12365
- arialabel="${i18n(this.lang, 'clearInput')}"
12366
- class="notificationBtn clearBtn"
12367
- variant="flat">
12368
- <${this.iconTag}
12369
- category="interface"
12370
- customColor
12371
- name="x-lg">
12372
- </${this.iconTag}>
12373
- </${this.buttonTag}>
12374
- </div>
12295
+ ${this.renderHtmlActionClear()}
12375
12296
  ` : undefined}
12376
12297
  ` : undefined}
12377
12298
  </div>
12378
12299
  </div>
12379
- <!-- Help text and error message template -->
12380
- ${!this.validity || this.validity === undefined || this.validity === 'valid'
12381
- ? html`
12382
- <${this.helpTextTag} ?onDark="${this.onDark}">
12383
- <p id="${this.uniqueId}" part="helpText">
12384
- <slot name="helptext">${this.getHelpText()}</slot>
12385
- </p>
12386
- </${this.helpTextTag}>
12387
- `
12388
- : html`
12389
- <${this.helpTextTag} error ?onDark="${this.onDark}">
12390
- <p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
12391
- ${this.errorMessage}
12392
- </p>
12393
- </${this.helpTextTag}>
12394
- `
12395
- }
12300
+ <div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
12301
+ ${this.renderHtmlHelpText()}
12302
+ </div>
12396
12303
  `;
12397
12304
  }
12398
12305
 
@@ -4891,7 +4891,7 @@ class AuroDropdown extends AuroElement$3 {
4891
4891
 
4892
4892
  var dropdownVersion = '3.0.0';
4893
4893
 
4894
- var shapeSizeCss = css`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0;min-height:60px;max-height:60px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px}.shape-pill-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px 0 0 34px}.shape-pill-left-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 34px 34px 0}.shape-pill-right-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px}.shape-pill-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px 0 0 34px}.shape-pill-left-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 34px 34px 0}.shape-pill-right-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}`;
4894
+ var shapeSizeCss = css`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}`;
4895
4895
 
4896
4896
  var styleCss$4 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}`;
4897
4897
 
@@ -4901,6 +4901,10 @@ var colorBaseCss = css`.wrapper{border-color:var(--ds-auro-input-border-color);b
4901
4901
 
4902
4902
  var tokensCss$4 = css`:host(:not(ondark)){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
4903
4903
 
4904
+ var classicStyleCss = css`.layout-classic{display:flex;flex-direction:row}.layout-classic .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;flex:1;cursor:text}.layout-classic .mainContent label{cursor:text;padding-top:4px;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);padding-bottom:8px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);height:auto}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{justify-self:flex-start;padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;line-height:0;padding-bottom:0}.layout-classic .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-classic .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-classic .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color);justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}.layout-classic .accents.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}`;
4905
+
4906
+ var classicColorCss = css`.layout-default label{color:var(--ds-auro-input-label-text-color)}`;
4907
+
4904
4908
  var emphasizedStyleCss = css`:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{background:unset;width:100%;padding:0;border:0;outline:none;overflow:hidden;text-overflow:ellipsis}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.layout-emphasized,.layout-emphasized-left,.layout-emphasized-right{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-emphasized label,.layout-emphasized-left label,.layout-emphasized-right label{text-transform:uppercase;font-size:32px;line-height:38px}.layout-emphasized input,.layout-emphasized-left input,.layout-emphasized-right input{text-align:center;font-size:14px;line-height:20px}.layout-emphasized .mainContent,.layout-emphasized-left .mainContent,.layout-emphasized-right .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-emphasized .displayValue,.layout-emphasized-left .displayValue,.layout-emphasized-right .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-emphasized .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-left .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-right .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-emphasized .displayValueWrapper,.layout-emphasized-left .displayValueWrapper,.layout-emphasized-right .displayValueWrapper{transform:translateY(-50%)}.layout-emphasized .accents,.layout-emphasized-left .accents,.layout-emphasized-right .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-emphasized.withValue,.layout-emphasized-left.withValue,.layout-emphasized-right.withValue{justify-content:flex-start}.layout-emphasized.withValue label,.layout-emphasized-left.withValue label,.layout-emphasized-right.withValue label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized.withValue input,.layout-emphasized-left.withValue input,.layout-emphasized-right.withValue input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-left:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-right:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{justify-content:flex-start}.layout-emphasized:focus-within label,.layout-emphasized-left:focus-within label,.layout-emphasized-right:focus-within label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized:focus-within input,.layout-emphasized-left:focus-within input,.layout-emphasized-right:focus-within input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:focus-within .alertNotification,.layout-emphasized-left:focus-within .alertNotification,.layout-emphasized-right:focus-within .alertNotification{display:none}.layout-emphasized .accents.left,.layout-emphasized-left .accents.left,.layout-emphasized-right .accents.left{padding-left:24px}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:24px}.layout-emphasized-left .alertNotification{margin-right:8px}.layout-emphasized-left .clear{margin-left:8px}.layout-emphasized-right .alertNotification{margin-left:8px}.layout-emphasized-right .clear{margin-right:8px}`;
4905
4909
 
4906
4910
  var emphasizedColorCss = css`.layout-emphasized:focus-within,.layout-emphasized.withValue,.layout-emphasized-left:focus-within,.layout-emphasized-left.withValue,.layout-emphasized-right:focus-within,.layout-emphasized-right.withValue{--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{--auro-input-border-color: var(--ds-auro-input-border-color)}`;
@@ -9845,9 +9849,9 @@ class BaseInput extends AuroElement$1$1 {
9845
9849
  this.required = false;
9846
9850
  this.setCustomValidityForType = undefined;
9847
9851
 
9848
- this.layout = 'default';
9852
+ this.layout = 'classic';
9849
9853
  this.shape = 'rounded';
9850
- this.size = 'xl';
9854
+ this.size = 'lg';
9851
9855
  }
9852
9856
 
9853
9857
  /**
@@ -11977,6 +11981,8 @@ class AuroInput extends BaseInput {
11977
11981
  css`${styleCss$4}`,
11978
11982
  css`${styleDefaultCss}`,
11979
11983
  css`${tokensCss$4}`,
11984
+ css`${classicStyleCss}`,
11985
+ css`${classicColorCss}`,
11980
11986
  css`${emphasizedStyleCss}`,
11981
11987
  css`${emphasizedColorCss}`,
11982
11988
  css`${snowflakeStyleCss}`
@@ -12087,14 +12093,19 @@ class AuroInput extends BaseInput {
12087
12093
  /**
12088
12094
  * Returns HTML for the HTML5 input element.
12089
12095
  * @private
12096
+ * @param {boolean} [hideInputWhenBlurred=false] - If true, the input will be visually hidden when not focused and has no value.
12090
12097
  * @returns {html} - Returns HTML for the HTML5 input element.
12091
12098
  */
12092
- renderHtmlInput() {
12099
+ renderHtmlInput(hideInputWhenBlurred = false) {
12093
12100
  const displayValueClasses = {
12094
12101
  'displayValue': true,
12095
12102
  'hasContent': this.hasDisplayValueContent,
12096
12103
  'hasFocus': this.hasFocus,
12097
- 'withValue': this.value && this.value.length > 0
12104
+ 'withValue': this.value && this.value.length > 0,
12105
+ };
12106
+
12107
+ const inputClasses = {
12108
+ 'util_displayHiddenVisually': hideInputWhenBlurred && !this.hasFocus && !this.value
12098
12109
  };
12099
12110
 
12100
12111
  return html`
@@ -12117,6 +12128,7 @@ class AuroInput extends BaseInput {
12117
12128
  autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
12118
12129
  autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
12119
12130
  autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
12131
+ class="${classMap(inputClasses)}"
12120
12132
  id="${this.inputId}"
12121
12133
  inputMode="${ifDefined(this.inputMode ? this.inputMode : undefined)}"
12122
12134
  lang="${ifDefined(this.lang)}"
@@ -12262,137 +12274,32 @@ class AuroInput extends BaseInput {
12262
12274
  /**
12263
12275
  * Returns HTML for the default layout.
12264
12276
  * @private
12265
- * @returns {html} - Returns HTML for the default layout.
12277
+ * @returns {import("lit").TemplateResult} - Returns HTML for the default layout.
12266
12278
  */
12267
12279
  renderLayoutClassic() {
12268
- const wrapperClasses = {
12269
- 'layoutDefault': true
12270
- };
12271
-
12272
- // is-disabled class - THIS IS ONLY HERE TO MAKE A TEST PASS AS FAR AS I CAN TELL
12273
- const labelClasses = {
12274
- 'is-disabled': this.disabled,
12275
- 'withIcon': this.hasTypeIcon(),
12276
- 'withValue': this.value && this.value.length > 0
12277
- };
12278
-
12279
12280
  return html`
12280
- <div class="${classMap(wrapperClasses)}" part="wrapper">
12281
- <div class="main">
12282
- <div class="typeIcon">
12283
- ${this.type === 'credit-card' ? this.processCreditCard() : undefined}
12284
-
12285
- <!-- The repeat() method is used below in order to force auro-icon to re-render when the name value is updated.
12286
- This should be cleaned up when auro-icon issue #31 is resolved. -->
12287
- ${this.inputIconName
12288
- ? repeat([this.inputIconName], (val) => val, (name) => html`
12289
- <${this.iconTag}
12290
- class="accentIcon"
12291
- category="payment"
12292
- name="${name}"
12293
- part="accentIcon"
12294
- ?onDark="${this.onDark}"
12295
- variant="${this.disabled ? 'disabled' : 'muted'}">
12296
- </${this.iconTag}>
12297
- `) : undefined
12298
- }
12299
-
12300
- ${this.type === 'date'
12301
- ? html`
12302
- <${this.iconTag}
12303
- class="accentIcon"
12304
- category="interface"
12305
- name="calendar"
12306
- part="accentIcon"
12307
- ?onDark="${this.onDark}"
12308
- variant="${this.disabled ? 'disabled' : 'muted'}">
12309
- </${this.iconTag}>`
12310
- : undefined
12311
- }
12312
- </div>
12313
- <label for=${this.id} class="${classMap(labelClasses)}" part="label">
12314
- <slot name="label">
12315
- ${this.label}
12316
- </slot>
12317
- ${this.required ? '' : ` (${i18n(this.lang, 'optional')})`}
12318
- </label>
12319
-
12320
- ${this.renderHtmlInput()}
12281
+ <div
12282
+ @click="${this.handleClick}"
12283
+ class="${classMap(this.commonWrapperClasses)} thin"
12284
+ part="wrapper">
12285
+ <div class="accents left">
12286
+ ${this.renderHtmlTypeIcon()}
12321
12287
  </div>
12322
- <div
12323
- class="notificationIcons"
12324
- part="notificationIcons"
12325
- ?hasValue="${this.hasValue}">
12326
- ${this.validity && this.validity !== 'valid' ? html`
12327
- <div class="notification alertNotification">
12328
- <${this.iconTag}
12329
- category="alert"
12330
- customColor
12331
- name="error-stroke"
12332
- </${this.iconTag}>
12333
- </div>
12334
- ` : undefined}
12288
+ <div class="mainContent">
12289
+ ${this.renderHtmlInput(true)}
12290
+ </div>
12291
+ <div class="accents right">
12292
+ ${this.renderValidationErrorIconHtml()}
12335
12293
  ${this.hasValue ? html`
12336
- ${this.type === 'password' ? html`
12337
- <div class="notification">
12338
- <${this.buttonTag}
12339
- @click="${this.handleClickShowPassword}"
12340
- ?onDark="${this.onDark}"
12341
- aria-hidden="true"
12342
- class="notificationBtn passwordBtn"
12343
- tabindex="-1"
12344
- variant="flat">
12345
- <${this.iconTag}
12346
- ?hidden=${!this.showPassword}
12347
- category="interface"
12348
- customColor
12349
- name="hide-password-stroke">
12350
- </${this.iconTag}>
12351
- <${this.iconTag}
12352
- ?hidden=${this.showPassword}
12353
- category="interface"
12354
- customColor
12355
- name="view-password-stroke">
12356
- </${this.iconTag}>
12357
- </${this.buttonTag}>
12358
- </div>
12359
- ` : undefined}
12360
12294
  ${!this.disabled && !this.readonly ? html`
12361
- <div class="notification">
12362
- <${this.buttonTag}
12363
- @click="${this.handleClickClear}"
12364
- ?onDark="${this.onDark}"
12365
- arialabel="${i18n(this.lang, 'clearInput')}"
12366
- class="notificationBtn clearBtn"
12367
- variant="flat">
12368
- <${this.iconTag}
12369
- category="interface"
12370
- customColor
12371
- name="x-lg">
12372
- </${this.iconTag}>
12373
- </${this.buttonTag}>
12374
- </div>
12295
+ ${this.renderHtmlActionClear()}
12375
12296
  ` : undefined}
12376
12297
  ` : undefined}
12377
12298
  </div>
12378
12299
  </div>
12379
- <!-- Help text and error message template -->
12380
- ${!this.validity || this.validity === undefined || this.validity === 'valid'
12381
- ? html`
12382
- <${this.helpTextTag} ?onDark="${this.onDark}">
12383
- <p id="${this.uniqueId}" part="helpText">
12384
- <slot name="helptext">${this.getHelpText()}</slot>
12385
- </p>
12386
- </${this.helpTextTag}>
12387
- `
12388
- : html`
12389
- <${this.helpTextTag} error ?onDark="${this.onDark}">
12390
- <p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
12391
- ${this.errorMessage}
12392
- </p>
12393
- </${this.helpTextTag}>
12394
- `
12395
- }
12300
+ <div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
12301
+ ${this.renderHtmlHelpText()}
12302
+ </div>
12396
12303
  `;
12397
12304
  }
12398
12305