@riverty/web-components 5.7.0 → 5.8.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 (115) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/custom-elements.json +28 -3
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/r-alert.cjs.entry.js +24 -8
  5. package/dist/cjs/r-button.cjs.entry.js +1 -1
  6. package/dist/cjs/r-checkbox-group.cjs.entry.js +27 -13
  7. package/dist/cjs/r-checkbox.cjs.entry.js +25 -10
  8. package/dist/cjs/r-icon-button.cjs.entry.js +1 -1
  9. package/dist/cjs/r-icon.cjs.entry.js +1 -1
  10. package/dist/cjs/r-input-code.cjs.entry.js +29 -16
  11. package/dist/cjs/r-input-date.cjs.entry.js +85 -15
  12. package/dist/cjs/r-input-password.cjs.entry.js +20 -7
  13. package/dist/cjs/r-input-phone-number.cjs.entry.js +27 -14
  14. package/dist/cjs/r-input.cjs.entry.js +24 -11
  15. package/dist/cjs/r-pagination.cjs.entry.js +1 -1
  16. package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
  17. package/dist/cjs/r-popover.cjs.entry.js +1 -1
  18. package/dist/cjs/r-radio-group.cjs.entry.js +20 -16
  19. package/dist/cjs/r-select.cjs.entry.js +112 -18
  20. package/dist/cjs/r-textarea.cjs.entry.js +18 -5
  21. package/dist/cjs/r-toast.cjs.entry.js +50 -19
  22. package/dist/cjs/web-components.cjs.js +1 -1
  23. package/dist/collection/components/alert/alert.css +52 -12
  24. package/dist/collection/components/alert/alert.js +48 -11
  25. package/dist/collection/components/alert/exports.js +1 -1
  26. package/dist/collection/components/button/button.css +6 -7
  27. package/dist/collection/components/checkbox/checkbox.js +45 -10
  28. package/dist/collection/components/checkbox-group/checkbox-group.js +47 -13
  29. package/dist/collection/components/icon/bundled-icons/riverty-kit.json +1 -1
  30. package/dist/collection/components/icon/riverty-kit.js +1 -1
  31. package/dist/collection/components/icon-button/icon-button.css +0 -7
  32. package/dist/collection/components/input/input.js +44 -11
  33. package/dist/collection/components/input-code/input-code.js +49 -16
  34. package/dist/collection/components/input-date/input-date.js +235 -16
  35. package/dist/collection/components/input-password/input-password.js +40 -7
  36. package/dist/collection/components/input-phone-number/input-phone-number.js +47 -14
  37. package/dist/collection/components/pagination/pagination.css +23 -23
  38. package/dist/collection/components/popover/popover.css +11 -3
  39. package/dist/collection/components/popover-action/popover-action.css +3 -5
  40. package/dist/collection/components/radio-group/radio-group.js +21 -17
  41. package/dist/collection/components/select/select.js +193 -21
  42. package/dist/collection/components/textarea/textarea.js +38 -5
  43. package/dist/collection/components/toast/toast.css +22 -14
  44. package/dist/collection/components/toast/toast.js +94 -20
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm/r-alert.entry.js +24 -8
  47. package/dist/esm/r-button.entry.js +1 -1
  48. package/dist/esm/r-checkbox-group.entry.js +27 -13
  49. package/dist/esm/r-checkbox.entry.js +25 -10
  50. package/dist/esm/r-icon-button.entry.js +1 -1
  51. package/dist/esm/r-icon.entry.js +1 -1
  52. package/dist/esm/r-input-code.entry.js +29 -16
  53. package/dist/esm/r-input-date.entry.js +85 -15
  54. package/dist/esm/r-input-password.entry.js +20 -7
  55. package/dist/esm/r-input-phone-number.entry.js +27 -14
  56. package/dist/esm/r-input.entry.js +24 -11
  57. package/dist/esm/r-pagination.entry.js +1 -1
  58. package/dist/esm/r-popover-action.entry.js +1 -1
  59. package/dist/esm/r-popover.entry.js +1 -1
  60. package/dist/esm/r-radio-group.entry.js +20 -16
  61. package/dist/esm/r-select.entry.js +112 -18
  62. package/dist/esm/r-textarea.entry.js +18 -5
  63. package/dist/esm/r-toast.entry.js +50 -19
  64. package/dist/esm/web-components.js +1 -1
  65. package/dist/types/components/alert/alert.d.ts +3 -0
  66. package/dist/types/components/alert/exports.d.ts +1 -1
  67. package/dist/types/components/checkbox/checkbox.d.ts +5 -0
  68. package/dist/types/components/checkbox-group/checkbox-group.d.ts +6 -0
  69. package/dist/types/components/input/input.d.ts +5 -0
  70. package/dist/types/components/input-code/input-code.d.ts +5 -0
  71. package/dist/types/components/input-date/input-date.d.ts +30 -0
  72. package/dist/types/components/input-password/input-password.d.ts +5 -0
  73. package/dist/types/components/input-phone-number/input-phone-number.d.ts +5 -0
  74. package/dist/types/components/radio-group/radio-group.d.ts +1 -2
  75. package/dist/types/components/select/select.d.ts +34 -2
  76. package/dist/types/components/textarea/textarea.d.ts +5 -0
  77. package/dist/types/components/toast/toast.d.ts +10 -2
  78. package/dist/types/components.d.ts +143 -8
  79. package/dist/web-components/bundled-icons/riverty-kit.json +1 -1
  80. package/dist/web-components/p-15ac0fdd.entry.js +1 -0
  81. package/dist/web-components/p-1c956370.entry.js +1 -0
  82. package/dist/web-components/p-2a512983.entry.js +1 -0
  83. package/dist/web-components/p-2e18e762.entry.js +1 -0
  84. package/dist/web-components/{p-72c0c0d8.entry.js → p-3078b2b8.entry.js} +1 -1
  85. package/dist/web-components/p-56da04d8.entry.js +1 -0
  86. package/dist/web-components/p-5744d75c.entry.js +1 -0
  87. package/dist/web-components/p-5bbd6e3c.entry.js +1 -0
  88. package/dist/web-components/p-5e6aabd8.entry.js +1 -0
  89. package/dist/web-components/p-656229de.entry.js +1 -0
  90. package/dist/web-components/p-6a4f3836.entry.js +1 -0
  91. package/dist/web-components/p-7775228c.entry.js +1 -0
  92. package/dist/web-components/p-8563a1ab.entry.js +1 -0
  93. package/dist/web-components/p-ad9b2a48.entry.js +1 -0
  94. package/dist/web-components/p-b87ad83b.entry.js +1 -0
  95. package/dist/web-components/{p-77155630.entry.js → p-b98ab649.entry.js} +1 -1
  96. package/dist/web-components/p-dbe579e8.entry.js +1 -0
  97. package/dist/web-components/p-f2577a3c.entry.js +1 -0
  98. package/dist/web-components/web-components.esm.js +1 -1
  99. package/package.json +1 -1
  100. package/dist/web-components/p-289eb4b0.entry.js +0 -1
  101. package/dist/web-components/p-2b8e12ae.entry.js +0 -1
  102. package/dist/web-components/p-2e2c8a5b.entry.js +0 -1
  103. package/dist/web-components/p-3a39932b.entry.js +0 -1
  104. package/dist/web-components/p-44be9992.entry.js +0 -1
  105. package/dist/web-components/p-4652635a.entry.js +0 -1
  106. package/dist/web-components/p-63474b32.entry.js +0 -1
  107. package/dist/web-components/p-74d2a563.entry.js +0 -1
  108. package/dist/web-components/p-8028c2a9.entry.js +0 -1
  109. package/dist/web-components/p-96ddeb7f.entry.js +0 -1
  110. package/dist/web-components/p-9d898089.entry.js +0 -1
  111. package/dist/web-components/p-9eb1f262.entry.js +0 -1
  112. package/dist/web-components/p-c300c22f.entry.js +0 -1
  113. package/dist/web-components/p-d93c240d.entry.js +0 -1
  114. package/dist/web-components/p-f770e22b.entry.js +0 -1
  115. package/dist/web-components/p-f952161b.entry.js +0 -1
@@ -48,10 +48,13 @@ export class Select {
48
48
  this.valueToDisplay = '';
49
49
  this.isInitializing = false;
50
50
  this.isResetting = false;
51
- this.isNewValue = false;
52
51
  this.focusedOption = null;
53
52
  this.isValueFocused = false;
54
53
  this.isNoResultsFound = false;
54
+ /** Indicates if the user has interacted with the select (focused/clicked) */
55
+ this.touched = false;
56
+ /** Indicates if the value has been changed by user interaction */
57
+ this.dirty = false;
55
58
  this.handleSlotChange = () => {
56
59
  setTimeout(() => {
57
60
  this.initialize();
@@ -65,16 +68,19 @@ export class Select {
65
68
  /** Unique id */
66
69
  this.uniqueId = `r-select-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
67
70
  this.getValidityStateData = (element) => {
71
+ let validityState = '';
72
+ let validityMessage = '';
68
73
  for (const state in element.validity) {
69
74
  if (element.validity[state]) {
70
- this.validityState = state;
75
+ validityState = state;
71
76
  if (this[state + 'Message']) {
72
- this.validityMessage = this[state + 'Message'];
73
- return;
77
+ validityMessage = this[state + 'Message'];
78
+ return { validityState, validityMessage };
74
79
  }
75
- this.validityMessage = element.validationMessage;
80
+ validityMessage = element.validationMessage;
76
81
  }
77
82
  }
83
+ return { validityState, validityMessage };
78
84
  };
79
85
  this.validateFormElement = (element = null) => {
80
86
  if (element === null)
@@ -83,7 +89,9 @@ export class Select {
83
89
  return;
84
90
  if (this.error)
85
91
  return;
86
- this.getValidityStateData(element);
92
+ const { validityState, validityMessage } = this.getValidityStateData(element);
93
+ this.validityState = validityState;
94
+ this.validityMessage = validityMessage;
87
95
  const isValid = this.validityState === 'valid';
88
96
  this.valid = isValid;
89
97
  this.invalid = !isValid;
@@ -105,6 +113,8 @@ export class Select {
105
113
  return;
106
114
  e.preventDefault();
107
115
  e.stopPropagation();
116
+ // Mark as touched when user clicks on the select
117
+ this.touched = true;
108
118
  this.toggle();
109
119
  if (!this.isExpanded)
110
120
  return;
@@ -119,7 +129,11 @@ export class Select {
119
129
  return () => {
120
130
  var _a;
121
131
  if (this.isExpanded) {
122
- this.setValue(((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '');
132
+ const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
133
+ if (newValue !== this.currentValue) {
134
+ this.dirty = true;
135
+ }
136
+ this.setValueFromUserInteraction(newValue);
123
137
  return;
124
138
  }
125
139
  this.expand();
@@ -140,7 +154,11 @@ export class Select {
140
154
  return;
141
155
  }
142
156
  if (this.focusedOption && altKey) {
143
- this.setValue(((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '');
157
+ const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
158
+ if (newValue !== this.currentValue) {
159
+ this.dirty = true;
160
+ }
161
+ this.setValueFromUserInteraction(newValue);
144
162
  return;
145
163
  }
146
164
  if (!this.combobox && this.focusedOption === this.optionElements[0])
@@ -214,7 +232,14 @@ export class Select {
214
232
  };
215
233
  }
216
234
  case 'Tab':
217
- return () => { var _a; return this.setValue(((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || ''); };
235
+ return () => {
236
+ var _a;
237
+ const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
238
+ if (newValue !== this.currentValue) {
239
+ this.dirty = true;
240
+ }
241
+ this.setValueFromUserInteraction(newValue);
242
+ };
218
243
  default:
219
244
  // No matching key handler: intentional no-op
220
245
  return () => { void 0; };
@@ -286,7 +311,11 @@ export class Select {
286
311
  return;
287
312
  }
288
313
  this.valueElement.value = '';
289
- this.setValue('');
314
+ const newValue = '';
315
+ if (newValue !== this.currentValue) {
316
+ this.dirty = true;
317
+ }
318
+ this.setValueFromUserInteraction(newValue);
290
319
  this.reportValidity();
291
320
  break;
292
321
  default:
@@ -303,6 +332,8 @@ export class Select {
303
332
  };
304
333
  this.onValueFocus = () => {
305
334
  this.isValueFocused = true;
335
+ // Mark as touched when user focuses on the select
336
+ this.touched = true;
306
337
  };
307
338
  this.filterOptionsListByComboboxValue = (value = '') => {
308
339
  const options = Array.from(this.host.querySelectorAll('r-select-option:not([data-no-results="true"])'));
@@ -348,6 +379,8 @@ export class Select {
348
379
  this.onResetForm = () => {
349
380
  // Clear validation results
350
381
  this.resetValidation();
382
+ // Reset touched and dirty states
383
+ this.markAsPristine();
351
384
  // Restore initial value
352
385
  this.setValue(this.initial['value']);
353
386
  // Emit rReset
@@ -387,15 +420,24 @@ export class Select {
387
420
  handleValueChange(value, oldValue) {
388
421
  if (this.isInitializing)
389
422
  return;
390
- this.isNewValue = oldValue !== value;
391
- this.isNewValue && this.setValue(value);
423
+ // Only process if this is not the initial load (oldValue is defined)
424
+ if (oldValue !== undefined && oldValue !== value) {
425
+ // This is a programmatic change from parent attribute
426
+ // Do NOT mark as dirty, do NOT emit rChange
427
+ this._renderSelected(value, false);
428
+ this.clearComboboxOptions();
429
+ }
392
430
  }
393
431
  /** Listen for custom event triggered by "onClick" event on `<r-select-option>` */
394
432
  optionSelectAction(e) {
395
433
  e.stopPropagation();
396
434
  if (this.disabled)
397
435
  return;
398
- this.setValue(e.target.value);
436
+ // Mark as dirty only if value actually changes
437
+ if (e.target.value !== this.currentValue) {
438
+ this.dirty = true;
439
+ }
440
+ this.setValueFromUserInteraction(e.target.value);
399
441
  }
400
442
  tooltipFocusAction() {
401
443
  this.collapse();
@@ -435,11 +477,28 @@ export class Select {
435
477
  if (this.isExpanded)
436
478
  this.defineListboxPositionState();
437
479
  }
438
- /** Set value of the select */
480
+ /**
481
+ * Set value of the select programmatically.
482
+ * Does NOT mark as dirty or emit change events.
483
+ * Use this for programmatic value updates.
484
+ */
439
485
  async setValue(value = '') {
440
486
  // Clear validation results
441
487
  this.resetValidation();
442
- this._renderSelected(value, this.currentValue !== value);
488
+ // Don't emit change event for programmatic updates
489
+ this._renderSelected(value, false);
490
+ this.clearComboboxOptions();
491
+ }
492
+ /**
493
+ * Internal method to set value from user interaction.
494
+ * Assumes dirty flag is already set by the caller.
495
+ * Will emit rChange if dirty flag is true.
496
+ */
497
+ setValueFromUserInteraction(value = '') {
498
+ // Clear validation results
499
+ this.resetValidation();
500
+ // Emit change event for user interactions (if dirty is set)
501
+ this._renderSelected(value, true);
443
502
  this.clearComboboxOptions();
444
503
  }
445
504
  /** Set value of the select */
@@ -450,6 +509,8 @@ export class Select {
450
509
  async reset() {
451
510
  // Clear validation results
452
511
  this.resetValidation();
512
+ // Reset touched and dirty states
513
+ this.markAsPristine();
453
514
  // Collapse options listbox
454
515
  this.collapse();
455
516
  // Restore unfiltered list
@@ -482,6 +543,35 @@ export class Select {
482
543
  this.invalid = this.initial['invalid'];
483
544
  this.valid = !this.invalid;
484
545
  }
546
+ /**
547
+ * Returns whether the select has been touched (focused/clicked by user).
548
+ * @returns A boolean indicating whether the select has been touched.
549
+ */
550
+ async isTouched() {
551
+ return this.touched;
552
+ }
553
+ /**
554
+ * Returns whether the select value has been changed by user interaction.
555
+ * @returns A boolean indicating whether the select is dirty.
556
+ */
557
+ async isDirty() {
558
+ return this.dirty;
559
+ }
560
+ /**
561
+ * Marks the select as untouched and pristine (not dirty).
562
+ */
563
+ async markAsPristine() {
564
+ this.touched = false;
565
+ this.dirty = false;
566
+ }
567
+ /**
568
+ * Validates the textarea without triggering UI and returns a boolean indicating its validity.
569
+ * @returns A boolean indicating whether the textarea is valid.
570
+ */
571
+ async checkValidity() {
572
+ const { validityState } = this.getValidityStateData(this.nativeElement);
573
+ return validityState === 'valid';
574
+ }
485
575
  /** Check validity and reveal validation state and message */
486
576
  async reportValidity() {
487
577
  this.validateFormElement(this.nativeElement);
@@ -614,7 +704,11 @@ export class Select {
614
704
  if (!this.isBusy) {
615
705
  this.reportValidity();
616
706
  }
617
- if (emitValue) {
707
+ // Only emit rChange if:
708
+ // 1. emitValue is true
709
+ // 2. Not during initialization or reset
710
+ // 3. The component is dirty (user has interacted)
711
+ if (emitValue && !this.isBusy && this.dirty) {
618
712
  this.rChange.emit({
619
713
  element: this.host,
620
714
  value: value
@@ -1004,8 +1098,8 @@ export class Select {
1004
1098
  disabled,
1005
1099
  required: isRequired
1006
1100
  };
1007
- return (h(Host, { key: '4faff470b9b6b8b7d61e3076e92791ef59337a48', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}` }, h("div", { key: '0e171d25d2210017b79c8e4298e24335087f0528', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: 'd23c28cea13b76464697eadca26ba34a3d1009cd', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: '5eed04830b9339a2c274f79eda156fa48eaa8249', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: '85c9eecfbff6e3d5412c99faafc142bf495aedb4' }, labelAttr), label)), h("slot", { key: '72a93bf0defe9a3f41d7b7be5cf3415e95874141', name: "popover" })), hint &&
1008
- h("r-hint", { key: 'd0b4a4bd2ca88ba642285dc85920d57f73298bb5', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: 'd859fdbd5f21ab2ec625712e5704f7e594ecff05', class: "r-select" }, h("select", Object.assign({ key: '388cf0c3f3234c2547aec144060f0d700df2fa57', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: 'e2409bf6c794e8360089fc113144dfcd7dffbbe2', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '8b813027f707bf37ccdf022c852838eb4801e03e', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'b6aa6ab7eb6390b05ac6d475546ca9647edb1a02', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: 'e84ce6b5e610147962c25a930967e1554a91f2a1', onSlotchange: this.handleSlotChange })))), h("div", { key: '92a91fc11ac5c98330bd677a97ab76a88af48f3b', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: 'c23f0cc7347fb7ceb61c4696d527534ececec403', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage, this.hasValidationSuccess && this.validMessage))));
1101
+ return (h(Host, { key: '9c22bae93d955802f695b20f25d3ff5c79fcc7d8', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: '2e8de0d2041d00c4d90caf5aba2aeb50fcfc86e5', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '273524030b099899861c93e9bba205c6c820d425', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'f050500698aa5a48d6db101074129fae09899de3', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'b5560ba5b8ee794eb775a555dec514f4d6e6546f' }, labelAttr), label)), h("slot", { key: 'bbbbe371702b95ac3d1636756eb673dc44c0dcb4', name: "popover" })), hint &&
1102
+ h("r-hint", { key: '27585bacce2143f20bdb20a3e03b5700dbb87d9b', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '92a69fbee0890d5ddab0353348cdb4d8eb772137', class: "r-select" }, h("select", Object.assign({ key: 'bc2de60d73dcebf750a99e7b88eacc701a8c0b85', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: 'b561dee21bdf58abe51786564a18812a20a0e97f', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '06984ccf7f6740e2480ef61924676e99d40044d4', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: '67888a456006e44869081876d35cdceca754942d', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '4f404790887ad37d488183d814bb69f33c262688', onSlotchange: this.handleSlotChange })))), h("div", { key: '0b223f242cfc90ce38a0cf83d38dc0c81348b36d', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: '57336df2dd79b8f91be950f7a4ca05258ec26184', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage, this.hasValidationSuccess && this.validMessage))));
1009
1103
  }
1010
1104
  static get is() { return "r-select"; }
1011
1105
  static get encapsulation() { return "shadow"; }
@@ -1793,10 +1887,11 @@ export class Select {
1793
1887
  "valueToDisplay": {},
1794
1888
  "isInitializing": {},
1795
1889
  "isResetting": {},
1796
- "isNewValue": {},
1797
1890
  "focusedOption": {},
1798
1891
  "isValueFocused": {},
1799
- "isNoResultsFound": {}
1892
+ "isNoResultsFound": {},
1893
+ "touched": {},
1894
+ "dirty": {}
1800
1895
  };
1801
1896
  }
1802
1897
  static get events() {
@@ -1910,7 +2005,7 @@ export class Select {
1910
2005
  "return": "Promise<void>"
1911
2006
  },
1912
2007
  "docs": {
1913
- "text": "Set value of the select",
2008
+ "text": "Set value of the select programmatically.\nDoes NOT mark as dirty or emit change events.\nUse this for programmatic value updates.",
1914
2009
  "tags": []
1915
2010
  }
1916
2011
  },
@@ -1965,6 +2060,83 @@ export class Select {
1965
2060
  "tags": []
1966
2061
  }
1967
2062
  },
2063
+ "isTouched": {
2064
+ "complexType": {
2065
+ "signature": "() => Promise<boolean>",
2066
+ "parameters": [],
2067
+ "references": {
2068
+ "Promise": {
2069
+ "location": "global",
2070
+ "id": "global::Promise"
2071
+ }
2072
+ },
2073
+ "return": "Promise<boolean>"
2074
+ },
2075
+ "docs": {
2076
+ "text": "Returns whether the select has been touched (focused/clicked by user).",
2077
+ "tags": [{
2078
+ "name": "returns",
2079
+ "text": "A boolean indicating whether the select has been touched."
2080
+ }]
2081
+ }
2082
+ },
2083
+ "isDirty": {
2084
+ "complexType": {
2085
+ "signature": "() => Promise<boolean>",
2086
+ "parameters": [],
2087
+ "references": {
2088
+ "Promise": {
2089
+ "location": "global",
2090
+ "id": "global::Promise"
2091
+ }
2092
+ },
2093
+ "return": "Promise<boolean>"
2094
+ },
2095
+ "docs": {
2096
+ "text": "Returns whether the select value has been changed by user interaction.",
2097
+ "tags": [{
2098
+ "name": "returns",
2099
+ "text": "A boolean indicating whether the select is dirty."
2100
+ }]
2101
+ }
2102
+ },
2103
+ "markAsPristine": {
2104
+ "complexType": {
2105
+ "signature": "() => Promise<void>",
2106
+ "parameters": [],
2107
+ "references": {
2108
+ "Promise": {
2109
+ "location": "global",
2110
+ "id": "global::Promise"
2111
+ }
2112
+ },
2113
+ "return": "Promise<void>"
2114
+ },
2115
+ "docs": {
2116
+ "text": "Marks the select as untouched and pristine (not dirty).",
2117
+ "tags": []
2118
+ }
2119
+ },
2120
+ "checkValidity": {
2121
+ "complexType": {
2122
+ "signature": "() => Promise<boolean>",
2123
+ "parameters": [],
2124
+ "references": {
2125
+ "Promise": {
2126
+ "location": "global",
2127
+ "id": "global::Promise"
2128
+ }
2129
+ },
2130
+ "return": "Promise<boolean>"
2131
+ },
2132
+ "docs": {
2133
+ "text": "Validates the textarea without triggering UI and returns a boolean indicating its validity.",
2134
+ "tags": [{
2135
+ "name": "returns",
2136
+ "text": "A boolean indicating whether the textarea is valid."
2137
+ }]
2138
+ }
2139
+ },
1968
2140
  "reportValidity": {
1969
2141
  "complexType": {
1970
2142
  "signature": "() => Promise<boolean>",
@@ -72,16 +72,19 @@ export class RTextarea {
72
72
  this.rReset.emit({ element: host, value });
73
73
  };
74
74
  this.getValidityStateData = (element) => {
75
+ let validityState = '';
76
+ let validityMessage = '';
75
77
  for (const state in element.validity) {
76
78
  if (element.validity[state]) {
77
- this.validityState = state;
79
+ validityState = state;
78
80
  if (this[state + 'Message']) {
79
- this.validityMessage = this[state + 'Message'];
80
- return;
81
+ validityMessage = this[state + 'Message'];
82
+ return { validityState, validityMessage };
81
83
  }
82
- this.validityMessage = element.validationMessage;
84
+ validityMessage = element.validationMessage;
83
85
  }
84
86
  }
87
+ return { validityState, validityMessage };
85
88
  };
86
89
  this.validateFormElement = (element = null) => {
87
90
  if (element === null)
@@ -90,7 +93,9 @@ export class RTextarea {
90
93
  return;
91
94
  if (this.error)
92
95
  return;
93
- this.getValidityStateData(element);
96
+ const { validityState, validityMessage } = this.getValidityStateData(element);
97
+ this.validityState = validityState;
98
+ this.validityMessage = validityMessage;
94
99
  const isValid = this.validityState === 'valid';
95
100
  this.valid = isValid;
96
101
  this.invalid = !isValid;
@@ -144,6 +149,14 @@ export class RTextarea {
144
149
  this.customErrorMessage = message;
145
150
  this.validateFormElement(this.nativeElement);
146
151
  }
152
+ /**
153
+ * Validates the textarea without triggering UI and returns a boolean indicating its validity.
154
+ * @returns A boolean indicating whether the textarea is valid.
155
+ */
156
+ async checkValidity() {
157
+ const { validityState } = this.getValidityStateData(this.nativeElement);
158
+ return validityState === 'valid';
159
+ }
147
160
  /** Validates an element and displays validity state. */
148
161
  async reportValidity() {
149
162
  this.validateFormElement(this.nativeElement);
@@ -1151,6 +1164,26 @@ export class RTextarea {
1151
1164
  "tags": []
1152
1165
  }
1153
1166
  },
1167
+ "checkValidity": {
1168
+ "complexType": {
1169
+ "signature": "() => Promise<boolean>",
1170
+ "parameters": [],
1171
+ "references": {
1172
+ "Promise": {
1173
+ "location": "global",
1174
+ "id": "global::Promise"
1175
+ }
1176
+ },
1177
+ "return": "Promise<boolean>"
1178
+ },
1179
+ "docs": {
1180
+ "text": "Validates the textarea without triggering UI and returns a boolean indicating its validity.",
1181
+ "tags": [{
1182
+ "name": "returns",
1183
+ "text": "A boolean indicating whether the textarea is valid."
1184
+ }]
1185
+ }
1186
+ },
1154
1187
  "reportValidity": {
1155
1188
  "complexType": {
1156
1189
  "signature": "() => Promise<void>",
@@ -7,7 +7,7 @@
7
7
  :host([status=warning]) {
8
8
  --r-toast--border-color: var(--r-status-warning-regular, #ff7429);
9
9
  --r-toast--background-color: var(--r-status-warning-soft, #fef9f5);
10
- --r-toast--leading-icon--color: var(--r-status-warning-strong, #89411A);
10
+ --r-toast--leading-icon--color: var(--r-status-warning-regular, #89411A);
11
11
  }
12
12
 
13
13
  :host([status=error]) {
@@ -58,13 +58,6 @@
58
58
  :host ::slotted(p + ol) {
59
59
  margin-top: 1rem;
60
60
  }
61
- :host .r-toast--action-link:hover {
62
- --r-toast--action--color: var(--r-text-strong, #000000);
63
- }
64
- :host .r-toast--action-link:focus {
65
- outline: var(--r-toast--action-link--outline, 2px solid var(--r-border-focused, #0071e3));
66
- box-shadow: var(--r-toast--action-link--box-shadow, 0 0 0 1px var(--r-border-focused-outlined, #fff), 0 0 0 3px var(--r-border-focused, #0071e3), 0 0 0 4px var(--r-border-focused-outlined, #fff));
67
- }
68
61
  :host .r-toast--trailing-button {
69
62
  --r-button--width: 2.75rem;
70
63
  --r-button--height: 2.75rem;
@@ -95,8 +88,8 @@
95
88
  display: var(--r-toast--display, flex);
96
89
  flex-direction: var(--r-toast--flex-direction, row);
97
90
  align-items: var(--r-toast--align-items, stretch);
98
- gap: var(--r-toast--gap, var(--r-spacing-075, 0.75rem));
99
- padding: var(--r-toast--padding, 16px);
91
+ gap: var(--r-toast--gap, var(--r-spacing-050, 0.5rem));
92
+ padding: var(--r-toast--padding, 12px);
100
93
  border-width: var(--r-toast--border-width, 1px);
101
94
  border-style: var(--r-toast--border-style, solid);
102
95
  border-color: var(--r-toast--border-color, var(--r-status-info-regular, #3e5c73));
@@ -110,12 +103,13 @@
110
103
  .r-toast--leading-icon {
111
104
  color: var(--r-toast--leading-icon--color, var(--r-status-info-regular, #3e5c73));
112
105
  margin-top: var(--r-toast--leading-icon--margin-top, 0);
106
+ margin-right: var(--r-toast--leading-icon--margin-right, var(--r-spacing-025, 0.25rem));
113
107
  }
114
108
  .r-toast--headline {
115
109
  color: var(--r-toast--headline--color, var(--r-text-regular, #282828));
116
110
  font-size: var(--r-toast--headline--font-size, var(--r-font-size-400, 1rem));
117
111
  font-weight: var(--r-toast--headline--font-weight, var(--r-font-weight-semibold, 600));
118
- line-height: var(--r-toast--headline--line-height, 1);
112
+ line-height: var(--r-toast--headline--line-height, var(--r-line-height-m, 1.5));
119
113
  margin: var(--r-toast--headline--margin, 0);
120
114
  }
121
115
  .r-toast--content {
@@ -123,7 +117,7 @@
123
117
  color: var(--r-toast--content--color, var(--r-text-regular, #282828));
124
118
  line-height: var(--r-toast--content--line-height, var(--r-line-height-m, 1.5));
125
119
  font-size: var(--r-toast--content--font-size, var(--r-font-size-300, 0.875rem));
126
- font-weight: var(--r-toast--content--font-weight, var(--r-font-weight-light, 300));
120
+ font-weight: var(--r-toast--content--font-weight, var(--r-font-weight-regular, 400));
127
121
  margin-top: var(--r-toast--content--margin-top, 0);
128
122
  }
129
123
  .r-toast--action {
@@ -133,8 +127,22 @@
133
127
  font-size: var(--r-toast--action--font-size, var(--r-font-size-300, 0.875rem));
134
128
  font-weight: var(--r-toast--action--font-weight, var(--r-font-weight-light, 300));
135
129
  }
136
- .r-toast--action-link {
137
- color: var(--r-toast--action--color, var(--r-text-regular, #282828));
130
+ .r-toast--action-link,
131
+ .r-toast--action ::slotted(r-button) {
132
+ --r-button--background-color: transparent;
133
+ --r-button--border-width: 0;
134
+ --r-button--color: var(--r-text-regular);
135
+ --r-button--padding: 10px 2px 18px 2px;
136
+ --r-button--slot--text-decoration: underline;
137
+ --r-button--slot--text-underline-offset: 9px;
138
+ }
139
+ .r-toast--action-link:hover,
140
+ .r-toast--action ::slotted(r-button:hover:not([disabled]):not([disabled=true])) {
141
+ --r-button--background-color: var(--r-background-interactive-hovered);
142
+ }
143
+ .r-toast--action-link:active,
144
+ .r-toast--action ::slotted(r-button:active:not([disabled]):not([disabled=true])) {
145
+ --r-button--background-color: var(--r-background-interactive-pressed);
138
146
  }
139
147
  .r-toast--action ::slotted(*) {
140
148
  font-size: inherit;