@solid-design-system/components 1.36.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/components/es/checkbox-group.js +1 -1
  2. package/dist/components/es/checkbox.js +1 -1
  3. package/dist/components/es/form.js +1 -1
  4. package/dist/components/es/input.js +1 -1
  5. package/dist/components/es/option.js +1 -1
  6. package/dist/components/es/radio-group.js +1 -1
  7. package/dist/components/es/radio.js +1 -1
  8. package/dist/components/es/select.js +2 -2
  9. package/dist/components/es/solid-element.js +1 -1
  10. package/dist/components/es/switch.js +1 -1
  11. package/dist/components/es/textarea.js +1 -1
  12. package/dist/components/umd/solid-components.js +18 -18
  13. package/dist/custom-elements.json +1 -1
  14. package/dist/package/components/checkbox/checkbox.d.ts +2 -0
  15. package/dist/package/components/checkbox/checkbox.js +23 -6
  16. package/dist/package/components/checkbox-group/checkbox-group.js +1 -1
  17. package/dist/package/components/input/input.d.ts +3 -0
  18. package/dist/package/components/input/input.js +20 -19
  19. package/dist/package/components/option/option.js +0 -2
  20. package/dist/package/components/radio/radio.js +3 -3
  21. package/dist/package/components/radio-group/radio-group.d.ts +4 -3
  22. package/dist/package/components/radio-group/radio-group.js +25 -27
  23. package/dist/package/components/select/select.d.ts +3 -3
  24. package/dist/package/components/select/select.js +18 -23
  25. package/dist/package/components/switch/switch.d.ts +2 -0
  26. package/dist/package/components/switch/switch.js +15 -7
  27. package/dist/package/components/textarea/textarea.d.ts +3 -0
  28. package/dist/package/components/textarea/textarea.js +30 -24
  29. package/dist/package/internal/form.d.ts +3 -1
  30. package/dist/package/internal/form.js +38 -10
  31. package/dist/package/internal/solid-element.d.ts +2 -0
  32. package/dist/package/styles/tailwind.css.js +1 -1
  33. package/dist/versioned-components/es/accordion-group.js +1 -1
  34. package/dist/versioned-components/es/accordion.js +1 -1
  35. package/dist/versioned-components/es/badge.js +1 -1
  36. package/dist/versioned-components/es/brandshape.js +1 -1
  37. package/dist/versioned-components/es/button.js +1 -1
  38. package/dist/versioned-components/es/carousel-item.js +1 -1
  39. package/dist/versioned-components/es/carousel.js +3 -3
  40. package/dist/versioned-components/es/checkbox-group.js +1 -1
  41. package/dist/versioned-components/es/checkbox.js +1 -1
  42. package/dist/versioned-components/es/divider.js +1 -1
  43. package/dist/versioned-components/es/drawer.js +1 -1
  44. package/dist/versioned-components/es/dropdown.js +1 -1
  45. package/dist/versioned-components/es/form.js +1 -1
  46. package/dist/versioned-components/es/header.js +1 -1
  47. package/dist/versioned-components/es/icon.js +1 -1
  48. package/dist/versioned-components/es/include.js +1 -1
  49. package/dist/versioned-components/es/input.js +1 -1
  50. package/dist/versioned-components/es/link.js +1 -1
  51. package/dist/versioned-components/es/navigation-item.js +1 -1
  52. package/dist/versioned-components/es/notification.js +1 -1
  53. package/dist/versioned-components/es/option.js +1 -1
  54. package/dist/versioned-components/es/popup.js +1 -1
  55. package/dist/versioned-components/es/radio-button.js +1 -1
  56. package/dist/versioned-components/es/radio-group.js +1 -1
  57. package/dist/versioned-components/es/radio.js +1 -1
  58. package/dist/versioned-components/es/select.js +2 -2
  59. package/dist/versioned-components/es/solid-element.js +1 -1
  60. package/dist/versioned-components/es/spinner.js +1 -1
  61. package/dist/versioned-components/es/switch.js +1 -1
  62. package/dist/versioned-components/es/tag.js +1 -1
  63. package/dist/versioned-components/es/teaser.js +1 -1
  64. package/dist/versioned-components/es/textarea.js +1 -1
  65. package/dist/versioned-components/es/tooltip.js +2 -2
  66. package/dist/versioned-components/es/video.js +1 -1
  67. package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
  68. package/dist/versioned-package/_components/button-group/button-group.js +11 -11
  69. package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
  70. package/dist/versioned-package/components/accordion/accordion.js +2 -2
  71. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
  72. package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
  73. package/dist/versioned-package/components/badge/badge.d.ts +1 -1
  74. package/dist/versioned-package/components/badge/badge.js +1 -1
  75. package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
  76. package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
  77. package/dist/versioned-package/components/button/button.d.ts +1 -1
  78. package/dist/versioned-package/components/button/button.js +4 -4
  79. package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
  80. package/dist/versioned-package/components/carousel/carousel.js +6 -6
  81. package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
  82. package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
  83. package/dist/versioned-package/components/checkbox/checkbox.d.ts +3 -1
  84. package/dist/versioned-package/components/checkbox/checkbox.js +27 -10
  85. package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
  86. package/dist/versioned-package/components/checkbox-group/checkbox-group.js +6 -6
  87. package/dist/versioned-package/components/divider/divider.d.ts +1 -1
  88. package/dist/versioned-package/components/divider/divider.js +2 -2
  89. package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
  90. package/dist/versioned-package/components/drawer/drawer.js +2 -2
  91. package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
  92. package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
  93. package/dist/versioned-package/components/header/header.d.ts +1 -1
  94. package/dist/versioned-package/components/header/header.js +4 -4
  95. package/dist/versioned-package/components/icon/icon.d.ts +1 -1
  96. package/dist/versioned-package/components/icon/icon.js +1 -1
  97. package/dist/versioned-package/components/include/include.d.ts +1 -1
  98. package/dist/versioned-package/components/include/include.js +1 -1
  99. package/dist/versioned-package/components/input/input.d.ts +4 -1
  100. package/dist/versioned-package/components/input/input.js +23 -22
  101. package/dist/versioned-package/components/link/link.d.ts +1 -1
  102. package/dist/versioned-package/components/link/link.js +2 -2
  103. package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
  104. package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
  105. package/dist/versioned-package/components/notification/notification.d.ts +1 -1
  106. package/dist/versioned-package/components/notification/notification.js +5 -5
  107. package/dist/versioned-package/components/option/option.d.ts +1 -1
  108. package/dist/versioned-package/components/option/option.js +2 -4
  109. package/dist/versioned-package/components/popup/popup.d.ts +1 -1
  110. package/dist/versioned-package/components/popup/popup.js +1 -1
  111. package/dist/versioned-package/components/radio/radio.d.ts +1 -1
  112. package/dist/versioned-package/components/radio/radio.js +5 -5
  113. package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
  114. package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
  115. package/dist/versioned-package/components/radio-group/radio-group.d.ts +6 -5
  116. package/dist/versioned-package/components/radio-group/radio-group.js +38 -40
  117. package/dist/versioned-package/components/select/select.d.ts +7 -7
  118. package/dist/versioned-package/components/select/select.js +44 -49
  119. package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
  120. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  121. package/dist/versioned-package/components/switch/switch.d.ts +3 -1
  122. package/dist/versioned-package/components/switch/switch.js +17 -9
  123. package/dist/versioned-package/components/tag/tag.d.ts +1 -1
  124. package/dist/versioned-package/components/tag/tag.js +2 -2
  125. package/dist/versioned-package/components/teaser/teaser.js +1 -1
  126. package/dist/versioned-package/components/textarea/textarea.d.ts +4 -1
  127. package/dist/versioned-package/components/textarea/textarea.js +32 -26
  128. package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
  129. package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
  130. package/dist/versioned-package/components/video/video.d.ts +1 -1
  131. package/dist/versioned-package/components/video/video.js +2 -2
  132. package/dist/versioned-package/internal/form.d.ts +3 -1
  133. package/dist/versioned-package/internal/form.js +40 -12
  134. package/dist/versioned-package/internal/solid-element.d.ts +2 -0
  135. package/dist/versioned-package/styles/tailwind.css.js +1 -1
  136. package/dist/versioned-styles/solid-styles.css +1 -1
  137. package/dist/vscode.html-custom-data.json +44 -34
  138. package/dist/web-types.json +78 -18
  139. package/package.json +1 -1
  140. package/dist/components/es/form-control.styles.js +0 -1
  141. package/dist/package/styles/form-control.styles.d.ts +0 -2
  142. package/dist/package/styles/form-control.styles.js +0 -5
  143. package/dist/versioned-components/es/form-control.styles.js +0 -1
  144. package/dist/versioned-package/styles/form-control.styles.d.ts +0 -2
  145. package/dist/versioned-package/styles/form-control.styles.js +0 -5
@@ -13,7 +13,6 @@ import { waitForEvent } from "../../internal/event.js";
13
13
  import { watch } from "../../internal/watch.js";
14
14
  import componentStyles from "../../styles/component.styles.js";
15
15
  import cx from "classix";
16
- import formControlStyles from "../../styles/form-control.styles.js";
17
16
  import SdIcon from "../icon/icon.js";
18
17
  import SdPopup from "../popup/popup.js";
19
18
  import SdTag from "../tag/tag.js";
@@ -33,7 +32,7 @@ let SdSelect = class extends SolidElement {
33
32
  constructor() {
34
33
  super(...arguments);
35
34
  this.formControlController = new FormControlController(this, {
36
- assumeInteractionOn: ["sd-blur", "sd-1-36-0-input"]
35
+ assumeInteractionOn: ["sd-blur", "sd-1-37-0-input"]
37
36
  });
38
37
  this.hasSlotController = new HasSlotController(this, "help-text", "label");
39
38
  this.localize = new LocalizeController(this);
@@ -42,12 +41,12 @@ let SdSelect = class extends SolidElement {
42
41
  this.hasHover = false;
43
42
  this.displayLabel = "";
44
43
  this.selectedOptions = [];
45
- this.isValid = false;
46
- this.isInvalid = false;
44
+ this.showValidStyle = false;
45
+ this.showInvalidStyle = false;
47
46
  this.defaultValue = "";
48
47
  this.open = false;
49
48
  this.size = "lg";
50
- this.label = "Label";
49
+ this.label = "";
51
50
  this.placeholder = this.localize.term("selectDefaultPlaceholder");
52
51
  this.helpText = "";
53
52
  this.placement = "bottom";
@@ -63,11 +62,11 @@ let SdSelect = class extends SolidElement {
63
62
  this.required = false;
64
63
  this.hoist = false;
65
64
  this.getTag = (option) => {
66
- return html`<sd-1-36-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
65
+ return html`<sd-1-37-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
67
66
  base:tag__base,
68
67
  content:tag__content,
69
68
  removable-indicator:tag__removable-indicator,
70
- " size="${this.size === "sm" ? "sm" : "lg"}" removable @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-1-36-0-tag>`;
69
+ " size="${this.size === "sm" ? "sm" : "lg"}" removable @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-1-37-0-tag>`;
71
70
  };
72
71
  this.handleDocumentFocusIn = (event) => {
73
72
  const path = event.composedPath();
@@ -78,7 +77,7 @@ let SdSelect = class extends SolidElement {
78
77
  this.handleDocumentKeyDown = (event) => {
79
78
  const target = event.target;
80
79
  const isClearButton = target.closest(".select__clear") !== null;
81
- const isIconButton = target.closest("sd-1-36-0-icon-button") !== null;
80
+ const isIconButton = target.closest("sd-1-37-0-icon-button") !== null;
82
81
  if (isClearButton || isIconButton) {
83
82
  return;
84
83
  }
@@ -102,7 +101,7 @@ let SdSelect = class extends SolidElement {
102
101
  this.setSelectedOptions(this.currentOption);
103
102
  }
104
103
  this.updateComplete.then(() => {
105
- this.emit("sd-1-36-0-input");
104
+ this.emit("sd-1-37-0-input");
106
105
  this.emit("sd-change");
107
106
  });
108
107
  if (!this.multiple) {
@@ -187,15 +186,6 @@ let SdSelect = class extends SolidElement {
187
186
  this.applySizeToOptions();
188
187
  this.open = false;
189
188
  }
190
- /** Checks for the presence of the attributes 'data-user-valid' or 'data-user-invalid' and updates the corresponding state for reactive conditional styling. */
191
- updated() {
192
- if (this.hasAttribute("data-user-valid") && this.checkValidity()) {
193
- this.isValid = true;
194
- }
195
- if (this.hasAttribute("data-user-invalid") && !this.checkValidity()) {
196
- this.isInvalid = true;
197
- }
198
- }
199
189
  addOpenListeners() {
200
190
  document.addEventListener("focusin", this.handleDocumentFocusIn);
201
191
  document.addEventListener("keydown", this.handleDocumentKeyDown);
@@ -239,7 +229,7 @@ let SdSelect = class extends SolidElement {
239
229
  this.displayInput.focus({ preventScroll: true });
240
230
  this.updateComplete.then(() => {
241
231
  this.emit("sd-clear");
242
- this.emit("sd-1-36-0-input");
232
+ this.emit("sd-1-37-0-input");
243
233
  this.emit("sd-change");
244
234
  });
245
235
  }
@@ -250,7 +240,7 @@ let SdSelect = class extends SolidElement {
250
240
  }
251
241
  handleOptionClick(event) {
252
242
  const target = event.target;
253
- const option = target.closest("sd-1-36-0-option");
243
+ const option = target.closest("sd-1-37-0-option");
254
244
  const oldValue = this.value;
255
245
  if (option && !option.disabled) {
256
246
  if (this.multiple) {
@@ -261,7 +251,7 @@ let SdSelect = class extends SolidElement {
261
251
  this.updateComplete.then(() => this.displayInput.focus({ preventScroll: true }));
262
252
  if (this.value !== oldValue) {
263
253
  this.updateComplete.then(() => {
264
- this.emit("sd-1-36-0-input");
254
+ this.emit("sd-1-37-0-input");
265
255
  this.emit("sd-change");
266
256
  });
267
257
  }
@@ -275,7 +265,7 @@ let SdSelect = class extends SolidElement {
275
265
  const allOptions = this.getAllOptions();
276
266
  const value = Array.isArray(this.value) ? this.value : [this.value];
277
267
  const values = [];
278
- if (customElements.get("sd-1-36-0-option")) {
268
+ if (customElements.get("sd-1-37-0-option")) {
279
269
  allOptions.forEach((option) => {
280
270
  if (this.multiple) {
281
271
  option.checkbox = true;
@@ -284,7 +274,7 @@ let SdSelect = class extends SolidElement {
284
274
  });
285
275
  this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
286
276
  } else {
287
- customElements.whenDefined("sd-1-36-0-option").then(() => this.handleDefaultSlotChange());
277
+ customElements.whenDefined("sd-1-37-0-option").then(() => this.handleDefaultSlotChange());
288
278
  }
289
279
  }
290
280
  handleTagRemove(event, option) {
@@ -292,18 +282,18 @@ let SdSelect = class extends SolidElement {
292
282
  if (!this.disabled) {
293
283
  this.toggleOptionSelection(option, false);
294
284
  this.updateComplete.then(() => {
295
- this.emit("sd-1-36-0-input");
285
+ this.emit("sd-1-37-0-input");
296
286
  this.emit("sd-change");
297
287
  });
298
288
  }
299
289
  }
300
- // Gets an array of all <sd-1-36-0-option> elements
290
+ // Gets an array of all <sd-1-37-0-option> elements
301
291
  getAllOptions() {
302
- return [...this.querySelectorAll("sd-1-36-0-option")];
292
+ return [...this.querySelectorAll("sd-1-37-0-option")];
303
293
  }
304
- // Gets the first <sd-1-36-0-option> element
294
+ // Gets the first <sd-1-37-0-option> element
305
295
  getFirstOption() {
306
- return this.querySelector("sd-1-36-0-option");
296
+ return this.querySelector("sd-1-37-0-option");
307
297
  }
308
298
  // Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
309
299
  // option may be "current" at a time.
@@ -365,7 +355,7 @@ let SdSelect = class extends SolidElement {
365
355
  const tag = this.getTag(option, index);
366
356
  return html`<div @sd-remove="${(e) => this.handleTagRemove(e, option)}">${typeof tag === "string" ? unsafeHTML(tag) : tag}</div>`;
367
357
  } else if (index === this.maxOptionsVisible) {
368
- return html`<sd-1-36-0-tag size="${this.size === "sm" ? "sm" : "lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length - index}</sd-1-36-0-tag>`;
358
+ return html`<sd-1-37-0-tag size="${this.size === "sm" ? "sm" : "lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length - index}</sd-1-37-0-tag>`;
369
359
  }
370
360
  return html``;
371
361
  });
@@ -373,6 +363,7 @@ let SdSelect = class extends SolidElement {
373
363
  handleInvalid(event) {
374
364
  this.formControlController.setValidity(false);
375
365
  this.formControlController.emitInvalidEvent(event);
366
+ this.invalidMessage.textContent = event.target.validationMessage;
376
367
  }
377
368
  handleMouseEnter() {
378
369
  this.hasHover = true;
@@ -380,7 +371,7 @@ let SdSelect = class extends SolidElement {
380
371
  handleMouseLeave() {
381
372
  this.hasHover = false;
382
373
  }
383
- /** Receives incoming event detail from sd-1-36-0-popup and updates local state for conditional styling. */
374
+ /** Receives incoming event detail from sd-1-37-0-popup and updates local state for conditional styling. */
384
375
  handleCurrentPlacement(e) {
385
376
  const incomingPlacement = e.detail;
386
377
  if (incomingPlacement) {
@@ -389,7 +380,7 @@ let SdSelect = class extends SolidElement {
389
380
  }
390
381
  handleUseTagsChange() {
391
382
  const allOptions = this.getAllOptions();
392
- if (customElements.get("sd-1-36-0-option")) {
383
+ if (customElements.get("sd-1-37-0-option")) {
393
384
  allOptions.forEach((option) => {
394
385
  option.checkbox = this.multiple;
395
386
  });
@@ -494,7 +485,7 @@ let SdSelect = class extends SolidElement {
494
485
  const hasLabel = this.label ? true : !!slots["label"];
495
486
  const hasHelpText = this.helpText ? true : !!slots["helpText"];
496
487
  const hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;
497
- const selectState = this.disabled ? "disabled" : this.hasFocus && this.isInvalid ? "activeInvalid" : this.hasFocus && this.isValid ? "activeValid" : this.hasFocus || this.open ? "active" : this.isInvalid ? "invalid" : this.isValid ? "valid" : "default";
488
+ const selectState = this.disabled ? "disabled" : this.hasFocus && this.showInvalidStyle ? "activeInvalid" : this.hasFocus && this.showValidStyle ? "activeValid" : this.hasFocus || this.open ? "active" : this.showInvalidStyle ? "invalid" : this.showValidStyle ? "valid" : "default";
498
489
  const cursorStyles = this.disabled ? "cursor-not-allowed" : "cursor-pointer";
499
490
  const iconMarginLeft = { sm: "ml-1", md: "ml-2", lg: "ml-2" }[this.size];
500
491
  const iconSize = {
@@ -503,9 +494,12 @@ let SdSelect = class extends SolidElement {
503
494
  lg: "text-xl"
504
495
  }[this.size];
505
496
  return html`<div part="form-control" class="${cx(
506
- "form-control relative text-left",
497
+ "relative text-left",
507
498
  cursorStyles,
508
499
  this.size === "sm" ? "text-sm" : "text-base",
500
+ this.open && "z-50"
501
+ )}"><label id="label" part="form-control-label" class="${hasLabel && "inline-block mb-2"}" aria-hidden="${hasLabel ? "false" : "true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${cx(
502
+ "relative w-full bg-white",
509
503
  {
510
504
  disabled: "text-neutral-500",
511
505
  readonly: "text-black",
@@ -515,9 +509,8 @@ let SdSelect = class extends SolidElement {
515
509
  invalid: "text-error",
516
510
  valid: "text-success",
517
511
  default: "text-black"
518
- }[selectState],
519
- this.open && "z-10"
520
- )}"><label id="label" part="form-control-label" class="${hasLabel && "inline-block mb-2"}" aria-hidden="${hasLabel ? "false" : "true"}" @click="${this.handleLabelClick}"><slot name="label" class="${cx(this.disabled && "text-black")}">${this.label}</slot></label><div part="form-control-input" class="${cx("relative w-full bg-white")}"><div part="border" class="${cx(
512
+ }[selectState]
513
+ )}"><div part="border" class="${cx(
521
514
  "absolute top-0 w-full h-full pointer-events-none border rounded-default",
522
515
  this.hasHover && "bg-neutral-200",
523
516
  {
@@ -531,7 +524,7 @@ let SdSelect = class extends SolidElement {
531
524
  default: "border-neutral-800"
532
525
  }[selectState],
533
526
  this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
534
- )}"></div><sd-1-36-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
527
+ )}"></div><sd-1-37-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
535
528
  "inline-flex relative w-full",
536
529
  this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
537
530
  )}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10"><div part="combobox" class="${cx(
@@ -545,28 +538,27 @@ let SdSelect = class extends SolidElement {
545
538
  "appearance-none outline-none flex-grow bg-transparent",
546
539
  cursorStyles,
547
540
  this.multiple && this.useTags && this.value.length > 0 ? "hidden" : ""
548
- )}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled ? "true" : "false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple && this.useTags ? html`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>` : ""} <input class="${cx("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10", cursorStyles)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value) ? this.value.join(", ") : this.value}" tabindex="-1" aria-hidden="true" @focus="${() => this.focus()}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("select__clear flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-1-36-0-icon class="${cx("text-neutral-500", iconSize)}" library="system" name="closing-round"></sd-1-36-0-icon></slot></button>` : ""} ${this.isInvalid ? html`<sd-1-36-0-icon class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-1-36-0-icon>` : ""} ${this.isValid ? html`<sd-1-36-0-icon class="${cx("text-success", iconMarginLeft, iconSize)}" library="system" name="confirm"></sd-1-36-0-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx("inline-flex ml-2 transition-all", this.open ? "rotate-180" : "rotate-0", iconSize)}"><sd-1-36-0-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-1-36-0-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-multiselectable="${this.multiple ? "true" : "false"}" aria-labelledby="label" part="listbox" class="${cx(
541
+ )}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled ? "true" : "false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple && this.useTags ? html`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>` : ""} <input class="${cx("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10", cursorStyles)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value) ? this.value.join(", ") : this.value}" tabindex="-1" aria-hidden="true" @focus="${() => this.focus()}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("select__clear flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-1-37-0-icon class="${cx("text-neutral-500", iconSize)}" library="system" name="closing-round"></sd-1-37-0-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-1-37-0-icon class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-1-37-0-icon>` : ""} ${this.showValidStyle ? html`<sd-1-37-0-icon class="${cx("text-success", iconMarginLeft, iconSize)}" library="system" name="confirm"></sd-1-37-0-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx("inline-flex ml-2 transition-all", this.open ? "rotate-180" : "rotate-0", iconSize)}"><sd-1-37-0-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-1-37-0-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-multiselectable="${this.multiple ? "true" : "false"}" aria-labelledby="label" part="listbox" class="${cx(
549
542
  "bg-white px-2 py-3 relative",
550
543
  this.currentPlacement === "bottom" ? "border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default" : "border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default"
551
- )}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-1-36-0-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${hasHelpText ? "false" : "true"}"><slot name="help-text">${this.helpText}</slot></div></div>`;
544
+ )}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-1-37-0-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${hasHelpText ? "false" : "true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`;
552
545
  }
553
546
  };
554
547
  SdSelect.dependencies = {
555
- "sd-1-36-0-icon": SdIcon,
556
- "sd-1-36-0-popup": SdPopup,
557
- "sd-1-36-0-tag": SdTag
548
+ "sd-1-37-0-icon": SdIcon,
549
+ "sd-1-37-0-popup": SdPopup,
550
+ "sd-1-37-0-tag": SdTag
558
551
  };
559
552
  SdSelect.styles = [
560
553
  componentStyles,
561
- formControlStyles,
562
554
  SolidElement.styles,
563
- css`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-1-36-0-popup::part(popup){overflow-y:scroll}sd-1-36-0-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-1-36-0-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-1-36-0-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`
555
+ css`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-1-37-0-popup::part(popup){overflow-y:scroll}sd-1-37-0-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-1-37-0-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-1-37-0-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`
564
556
  ];
565
557
  __decorateClass([
566
- queryAssignedElements({ selector: "sd-1-36-0-option" })
558
+ queryAssignedElements({ selector: "sd-1-37-0-option" })
567
559
  ], SdSelect.prototype, "_optionsInDefaultSlot", 2);
568
560
  __decorateClass([
569
- query("sd-1-36-0-popup")
561
+ query("sd-1-37-0-popup")
570
562
  ], SdSelect.prototype, "popup", 2);
571
563
  __decorateClass([
572
564
  query('[part="combobox"]')
@@ -580,6 +572,9 @@ __decorateClass([
580
572
  __decorateClass([
581
573
  query('[part="listbox"]')
582
574
  ], SdSelect.prototype, "listbox", 2);
575
+ __decorateClass([
576
+ query("#invalid-message")
577
+ ], SdSelect.prototype, "invalidMessage", 2);
583
578
  __decorateClass([
584
579
  state()
585
580
  ], SdSelect.prototype, "hasFocus", 2);
@@ -597,10 +592,10 @@ __decorateClass([
597
592
  ], SdSelect.prototype, "selectedOptions", 2);
598
593
  __decorateClass([
599
594
  state()
600
- ], SdSelect.prototype, "isValid", 2);
595
+ ], SdSelect.prototype, "showValidStyle", 2);
601
596
  __decorateClass([
602
597
  state()
603
- ], SdSelect.prototype, "isInvalid", 2);
598
+ ], SdSelect.prototype, "showInvalidStyle", 2);
604
599
  __decorateClass([
605
600
  defaultValue()
606
601
  ], SdSelect.prototype, "defaultValue", 2);
@@ -679,7 +674,7 @@ __decorateClass([
679
674
  watch("value", { waitUntilFirstUpdate: true })
680
675
  ], SdSelect.prototype, "handleValueChange", 1);
681
676
  SdSelect = __decorateClass([
682
- customElement("sd-1-36-0-select")
677
+ customElement("sd-1-37-0-select")
683
678
  ], SdSelect);
684
679
  setDefaultAnimation("select.show", {
685
680
  keyframes: [
@@ -7,6 +7,6 @@ export default class SdSpinner extends SolidElement {
7
7
  }
8
8
  declare global {
9
9
  interface HTMLElementTagNameMap {
10
- 'sd-1-36-0-spinner': SdSpinner;
10
+ 'sd-1-37-0-spinner': SdSpinner;
11
11
  }
12
12
  }
@@ -40,7 +40,7 @@ __decorateClass([
40
40
  property({ reflect: true })
41
41
  ], SdSpinner.prototype, "color", 2);
42
42
  SdSpinner = __decorateClass([
43
- customElement("sd-1-36-0-spinner")
43
+ customElement("sd-1-37-0-spinner")
44
44
  ], SdSpinner);
45
45
  export {
46
46
  SdSpinner as default
@@ -3,6 +3,8 @@ import type { SolidFormControl } from '../../internal/solid-element';
3
3
  export default class SdSwitch extends SolidElement implements SolidFormControl {
4
4
  private readonly formControlController;
5
5
  input: HTMLInputElement;
6
+ invalidMessage: HTMLDivElement;
7
+ showInvalidStyle: boolean;
6
8
  title: string;
7
9
  name: string;
8
10
  value: string;
@@ -32,6 +34,6 @@ export default class SdSwitch extends SolidElement implements SolidFormControl {
32
34
  }
33
35
  declare global {
34
36
  interface HTMLElementTagNameMap {
35
- 'sd-1-36-0-switch': SdSwitch;
37
+ 'sd-1-37-0-switch': SdSwitch;
36
38
  }
37
39
  }
@@ -4,7 +4,7 @@ import { defaultValue } from "../../internal/default-value.js";
4
4
  import { FormControlController } from "../../internal/form.js";
5
5
  import { ifDefined } from "lit/directives/if-defined.js";
6
6
  import { live } from "lit/directives/live.js";
7
- import { query, property } from "lit/decorators.js";
7
+ import { query, state, property } from "lit/decorators.js";
8
8
  import { watch } from "../../internal/watch.js";
9
9
  import cx from "classix";
10
10
  import SolidElement from "../../internal/solid-element.js";
@@ -27,6 +27,7 @@ let SdSwitch = class extends SolidElement {
27
27
  defaultValue: (control) => control.defaultChecked,
28
28
  setValue: (control, checked) => control.checked = checked
29
29
  });
30
+ this.showInvalidStyle = false;
30
31
  this.title = "";
31
32
  this.name = "";
32
33
  this.disabled = false;
@@ -50,11 +51,12 @@ let SdSwitch = class extends SolidElement {
50
51
  this.emit("sd-blur");
51
52
  }
52
53
  handleInput() {
53
- this.emit("sd-1-36-0-input");
54
+ this.emit("sd-1-37-0-input");
54
55
  }
55
56
  handleInvalid(event) {
56
57
  this.formControlController.setValidity(false);
57
58
  this.formControlController.emitInvalidEvent(event);
59
+ this.invalidMessage.textContent = event.target.validationMessage;
58
60
  }
59
61
  handleFocus() {
60
62
  this.emit("sd-focus");
@@ -107,23 +109,29 @@ let SdSwitch = class extends SolidElement {
107
109
  `relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
108
110
  peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
109
111
  peer-focus-visible:outline-primary`,
110
- this.disabled && this.checked && "border-neutral-500 bg-neutral-500" || this.disabled && "border-neutral-500" || this.checked && "border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550" || "border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200"
112
+ this.disabled && this.checked ? "border-neutral-500 bg-neutral-500" : this.disabled ? "border-neutral-500" : this.showInvalidStyle ? "border-error bg-error hover:bg-error-400" : this.checked ? "border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550" : "border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200"
111
113
  )}"><span id="thumb" part="thumb" class="${cx(
112
114
  "w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",
113
- this.checked && "translate-x-2 bg-white" || this.disabled && this.checked && "bg-white" || this.disabled && "-translate-x-2 bg-neutral-500" || "bg-neutral-800 -translate-x-2"
115
+ this.disabled && this.checked ? "bg-white" : this.disabled ? "-translate-x-2 bg-neutral-500" : this.showInvalidStyle ? "bg-white -translate-x-2" : this.checked ? "translate-x-2 bg-white" : "bg-neutral-800 -translate-x-2"
114
116
  )}"></span> </span><span part="label" id="label" class="${cx(
115
- "select-none inline-block ml-2 text-black",
116
- this.disabled && "text-neutral-500" || "text-neutral-800"
117
- )}"><slot></slot></span></label>`;
117
+ "select-none inline-block ml-2",
118
+ this.disabled ? "text-neutral-500" : this.showInvalidStyle ? "text-error" : "text-black"
119
+ )}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`;
118
120
  }
119
121
  };
120
122
  SdSwitch.styles = [
121
123
  SolidElement.styles,
122
- css`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label::after{content:' *'}:host([data-user-invalid]) #label{color:rgb(var(--sd-color-error,204 25 55))}:host([data-user-invalid]) #control{border-color:rgb(var(--sd-color-error,204 25 55));background-color:rgb(var(--sd-color-error,204 25 55))}:host([data-user-invalid]) #thumb{background-color:rgb(var(--sd-white,255 255 255))}:host([data-user-invalid]) #input:hover~#control{background-color:rgb(var(--sd-color-error-400,172 25 56))}`
124
+ css`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label::after{content:' *'}`
123
125
  ];
124
126
  __decorateClass([
125
127
  query("input")
126
128
  ], SdSwitch.prototype, "input", 2);
129
+ __decorateClass([
130
+ query("#invalid-message")
131
+ ], SdSwitch.prototype, "invalidMessage", 2);
132
+ __decorateClass([
133
+ state()
134
+ ], SdSwitch.prototype, "showInvalidStyle", 2);
127
135
  __decorateClass([
128
136
  property()
129
137
  ], SdSwitch.prototype, "title", 2);
@@ -155,7 +163,7 @@ __decorateClass([
155
163
  watch(["checked"], { waitUntilFirstUpdate: true })
156
164
  ], SdSwitch.prototype, "handleStateChange", 1);
157
165
  SdSwitch = __decorateClass([
158
- customElement("sd-1-36-0-switch")
166
+ customElement("sd-1-37-0-switch")
159
167
  ], SdSwitch);
160
168
  export {
161
169
  SdSwitch as default
@@ -20,6 +20,6 @@ export default class SdTag extends SolidElement {
20
20
  }
21
21
  declare global {
22
22
  interface HTMLElementTagNameMap {
23
- 'sd-1-36-0-tag': SdTag;
23
+ 'sd-1-37-0-tag': SdTag;
24
24
  }
25
25
  }
@@ -74,7 +74,7 @@ let SdTag = class extends SolidElement {
74
74
  lg: "text-base",
75
75
  sm: "text-[12px]"
76
76
  }[this.size]
77
- )}"><sd-1-36-0-icon library="system" name="close" label="remove"></sd-1-36-0-icon></slot>` : ""}</${tag}>`;
77
+ )}"><sd-1-37-0-icon library="system" name="close" label="remove"></sd-1-37-0-icon></slot>` : ""}</${tag}>`;
78
78
  }
79
79
  };
80
80
  SdTag.styles = [
@@ -106,7 +106,7 @@ __decorateClass([
106
106
  property()
107
107
  ], SdTag.prototype, "download", 2);
108
108
  SdTag = __decorateClass([
109
- customElement("sd-1-36-0-tag")
109
+ customElement("sd-1-37-0-tag")
110
110
  ], SdTag);
111
111
  export {
112
112
  SdTag as default
@@ -96,7 +96,7 @@ __decorateClass([
96
96
  state()
97
97
  ], SdTeaser.prototype, "_orientation", 2);
98
98
  SdTeaser = __decorateClass([
99
- customElement("sd-1-36-0-teaser")
99
+ customElement("sd-1-37-0-teaser")
100
100
  ], SdTeaser);
101
101
  export {
102
102
  SdTeaser as default
@@ -4,7 +4,10 @@ export default class SdTextarea extends SolidElement implements SolidFormControl
4
4
  private readonly formControlController;
5
5
  private readonly hasSlotController;
6
6
  textarea: HTMLTextAreaElement;
7
+ invalidMessage: HTMLDivElement;
7
8
  private hasFocus;
9
+ showValidStyle: boolean;
10
+ showInvalidStyle: boolean;
8
11
  title: string;
9
12
  name: string;
10
13
  value: string;
@@ -62,6 +65,6 @@ export default class SdTextarea extends SolidElement implements SolidFormControl
62
65
  }
63
66
  declare global {
64
67
  interface HTMLElementTagNameMap {
65
- 'sd-1-36-0-textarea': SdTextarea;
68
+ 'sd-1-37-0-textarea': SdTextarea;
66
69
  }
67
70
  }
@@ -7,8 +7,8 @@ import { ifDefined } from "lit/directives/if-defined.js";
7
7
  import { live } from "lit/directives/live.js";
8
8
  import { query, state, property } from "lit/decorators.js";
9
9
  import { watch } from "../../internal/watch.js";
10
+ import componentStyles from "../../styles/component.styles.js";
10
11
  import cx from "classix";
11
- import formControlStyles from "../../styles/form-control.styles.js";
12
12
  import SolidElement from "../../internal/solid-element.js";
13
13
  var __defProp = Object.defineProperty;
14
14
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -27,6 +27,8 @@ let SdTextarea = class extends SolidElement {
27
27
  this.formControlController = new FormControlController(this);
28
28
  this.hasSlotController = new HasSlotController(this, "help-text", "label");
29
29
  this.hasFocus = false;
30
+ this.showValidStyle = false;
31
+ this.showInvalidStyle = false;
30
32
  this.title = "";
31
33
  this.name = "";
32
34
  this.value = "";
@@ -78,11 +80,12 @@ let SdTextarea = class extends SolidElement {
78
80
  handleInput() {
79
81
  this.value = this.textarea.value;
80
82
  this.formControlController.updateValidity();
81
- this.emit("sd-1-36-0-input");
83
+ this.emit("sd-1-37-0-input");
82
84
  }
83
85
  handleInvalid(event) {
84
86
  this.formControlController.setValidity(false);
85
87
  this.formControlController.emitInvalidEvent(event);
88
+ this.invalidMessage.textContent = event.target.validationMessage;
86
89
  }
87
90
  setTextareaHeight() {
88
91
  this.textarea.style.height = void 0;
@@ -164,17 +167,14 @@ let SdTextarea = class extends SolidElement {
164
167
  };
165
168
  const hasLabel = this.label ? true : !!slots["label"];
166
169
  const hasHelpText = this.helpText ? true : !!slots["helpText"];
167
- const hasValidationAttr = this.required || !!this.minlength || !!this.maxlength;
168
- const isInvalid = hasValidationAttr && !this.checkValidity();
169
- const isValid = hasValidationAttr && this.checkValidity();
170
- const inputState = this.disabled ? "disabled" : this.readonly ? "readonly" : this.hasFocus && isInvalid ? "activeInvalid" : this.hasFocus && isValid ? "activeValid" : this.hasFocus ? "active" : isInvalid ? "invalid" : isValid ? "valid" : "default";
170
+ const textareaState = this.disabled ? "disabled" : this.readonly ? "readonly" : this.hasFocus && this.showInvalidStyle ? "activeInvalid" : this.hasFocus && this.showValidStyle ? "activeValid" : this.hasFocus ? "active" : this.showInvalidStyle ? "invalid" : this.showValidStyle ? "valid" : "default";
171
171
  const textSize = this.size === "sm" ? "text-sm" : "text-base";
172
- return html`<div part="form-control" class="${cx(
173
- "form-control text-left",
174
- hasLabel && "form-control--has-label",
175
- hasHelpText && "form-control--has-help-text",
176
- this.disabled && "cursor-not-allowed"
177
- )}"><label part="form-control-label" id="label" class="${cx("form-control-label mb-2", hasLabel ? "has-label inline-block" : "hidden", textSize)}" for="input" aria-hidden="${hasLabel ? "false" : "true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="form-control-input relative w-full"><div part="border" class="${cx(
172
+ const iconSizeMarginLeft = {
173
+ sm: "text-base ml-1",
174
+ md: "text-lg ml-2",
175
+ lg: "text-xl ml-2"
176
+ }[this.size];
177
+ return html`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${cx("mb-2", hasLabel ? "inline-block" : "hidden", textSize)}" for="input" aria-hidden="${hasLabel ? "false" : "true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${cx("relative w-full", this.disabled && "cursor-not-allowed")}"><div part="border" class="${cx(
178
178
  "absolute w-full h-full pointer-events-none border rounded-default",
179
179
  {
180
180
  disabled: "border-neutral-500",
@@ -185,9 +185,9 @@ let SdTextarea = class extends SolidElement {
185
185
  invalid: "border-error",
186
186
  valid: "border-success",
187
187
  default: "border-neutral-800"
188
- }[inputState]
188
+ }[textareaState]
189
189
  )}"></div><div part="base" class="${cx(
190
- "textarea px-4 flex flex-row items-center rounded-default",
190
+ "textarea px-4 flex items-top rounded-default bg-white group",
191
191
  {
192
192
  sm: "textarea-sm py-1",
193
193
  md: "textarea-md py-1",
@@ -202,30 +202,36 @@ let SdTextarea = class extends SolidElement {
202
202
  invalid: "text-error",
203
203
  valid: "text-success",
204
204
  default: "text-black"
205
- }[inputState],
205
+ }[textareaState],
206
206
  !this.disabled && !this.readonly ? "hover:bg-neutral-200" : "",
207
- this.readonly && "bg-neutral-100",
208
- isInvalid && "form-control-input--invalid",
209
- !this.value && "textarea--empty"
207
+ this.readonly && "bg-neutral-100"
210
208
  )}"><textarea part="textarea" id="input" class="${cx(
211
209
  "flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",
212
- textSize,
213
- this.disabled && "cursor-not-allowed"
214
- )}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea></div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700", hasHelpText ? "block" : "hidden")}" aria-hidden="${hasHelpText ? "false" : "true"}">${this.helpText}</slot></div>`;
210
+ this.disabled && "cursor-not-allowed",
211
+ textSize
212
+ )}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-1-37-0-icon class="${cx("text-error absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="risk"></sd-1-37-0-icon>` : ""} ${this.showValidStyle ? html`<sd-1-37-0-icon class="${cx("text-success absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="confirm"></sd-1-37-0-icon>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700", hasHelpText ? "block" : "hidden")}" aria-hidden="${hasHelpText ? "false" : "true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`;
215
213
  }
216
214
  };
217
215
  SdTextarea.styles = [
218
- // componentStyles,
219
- formControlStyles,
216
+ componentStyles,
220
217
  SolidElement.styles,
221
- css`:host{display:block}:host([required]) #label.has-label::after{content:'*';margin-left:var(--sd-spacing-0-5,.125rem)}.no-scrollbar::-webkit-scrollbar{display:none}`
218
+ css`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`
222
219
  ];
223
220
  __decorateClass([
224
- query("[part=textarea]")
221
+ query("#input")
225
222
  ], SdTextarea.prototype, "textarea", 2);
223
+ __decorateClass([
224
+ query("#invalid-message")
225
+ ], SdTextarea.prototype, "invalidMessage", 2);
226
226
  __decorateClass([
227
227
  state()
228
228
  ], SdTextarea.prototype, "hasFocus", 2);
229
+ __decorateClass([
230
+ state()
231
+ ], SdTextarea.prototype, "showValidStyle", 2);
232
+ __decorateClass([
233
+ state()
234
+ ], SdTextarea.prototype, "showInvalidStyle", 2);
229
235
  __decorateClass([
230
236
  property()
231
237
  ], SdTextarea.prototype, "title", 2);
@@ -309,7 +315,7 @@ __decorateClass([
309
315
  watch("value", { waitUntilFirstUpdate: true })
310
316
  ], SdTextarea.prototype, "handleValueChange", 1);
311
317
  SdTextarea = __decorateClass([
312
- customElement("sd-1-36-0-textarea")
318
+ customElement("sd-1-37-0-textarea")
313
319
  ], SdTextarea);
314
320
  export {
315
321
  SdTextarea as default
@@ -34,6 +34,6 @@ export default class SdTooltip extends SolidElement {
34
34
  }
35
35
  declare global {
36
36
  interface HTMLElementTagNameMap {
37
- 'sd-1-36-0-tooltip': SdTooltip;
37
+ 'sd-1-37-0-tooltip': SdTooltip;
38
38
  }
39
39
  }