@riverty/web-components 6.0.0 → 6.1.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 (107) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/custom-elements.json +99 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/r-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/r-icon-button_2.cjs.entry.js +4 -4
  6. package/dist/cjs/r-icon.cjs.entry.js +1 -1
  7. package/dist/cjs/r-input-code.cjs.entry.js +7 -7
  8. package/dist/cjs/r-input.cjs.entry.js +4 -2
  9. package/dist/cjs/r-list-item.cjs.entry.js +16 -15
  10. package/dist/cjs/r-panel.cjs.entry.js +5 -5
  11. package/dist/cjs/r-stepper-item.cjs.entry.js +1 -1
  12. package/dist/cjs/r-stepper.cjs.entry.js +1 -1
  13. package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
  14. package/dist/cjs/r-tab.cjs.entry.js +6 -2
  15. package/dist/cjs/r-tabs-list.cjs.entry.js +160 -2
  16. package/dist/cjs/r-tabs.cjs.entry.js +34 -6
  17. package/dist/cjs/r-textarea.cjs.entry.js +1 -1
  18. package/dist/cjs/r-toast-group.cjs.entry.js +2 -2
  19. package/dist/cjs/r-toast.cjs.entry.js +30 -10
  20. package/dist/cjs/web-components.cjs.js +1 -1
  21. package/dist/collection/components/alert/alert.css +2 -3
  22. package/dist/collection/components/icon/bundled-icons/riverty-kit.json +1 -1
  23. package/dist/collection/components/icon/riverty-kit.js +1 -1
  24. package/dist/collection/components/icon-button/icon-button.js +22 -3
  25. package/dist/collection/components/input/exports.js +2 -0
  26. package/dist/collection/components/input/input.js +54 -2
  27. package/dist/collection/components/input-code/exports.js +2 -2
  28. package/dist/collection/components/input-code/input-code.js +13 -13
  29. package/dist/collection/components/list-item/list-item/list-item.css +46 -12
  30. package/dist/collection/components/list-item/list-item/list-item.js +34 -14
  31. package/dist/collection/components/panel/panel.css +40 -17
  32. package/dist/collection/components/panel/panel.js +6 -6
  33. package/dist/collection/components/stepper/stepper.css +1 -1
  34. package/dist/collection/components/stepper-item/stepper-item.css +3 -3
  35. package/dist/collection/components/tab/tab.css +29 -29
  36. package/dist/collection/components/tab/tab.js +5 -1
  37. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  38. package/dist/collection/components/tabs/tabs.js +34 -6
  39. package/dist/collection/components/tabs-list/exports.js +2 -0
  40. package/dist/collection/components/tabs-list/tabs-list.css +43 -2
  41. package/dist/collection/components/tabs-list/tabs-list.js +277 -1
  42. package/dist/collection/components/textarea/textarea.css +1 -1
  43. package/dist/collection/components/toast/toast.css +35 -9
  44. package/dist/collection/components/toast/toast.js +43 -9
  45. package/dist/collection/components/toast-group/toast-group.css +1 -1
  46. package/dist/collection/components/toast-group/toast-group.js +1 -1
  47. package/dist/collection/components/tooltip/tooltip.js +2 -2
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/r-alert.entry.js +1 -1
  50. package/dist/esm/r-icon-button_2.entry.js +4 -4
  51. package/dist/esm/r-icon.entry.js +1 -1
  52. package/dist/esm/r-input-code.entry.js +7 -7
  53. package/dist/esm/r-input.entry.js +4 -2
  54. package/dist/esm/r-list-item.entry.js +16 -15
  55. package/dist/esm/r-panel.entry.js +5 -5
  56. package/dist/esm/r-stepper-item.entry.js +1 -1
  57. package/dist/esm/r-stepper.entry.js +1 -1
  58. package/dist/esm/r-tab-panel.entry.js +1 -1
  59. package/dist/esm/r-tab.entry.js +6 -2
  60. package/dist/esm/r-tabs-list.entry.js +161 -3
  61. package/dist/esm/r-tabs.entry.js +34 -6
  62. package/dist/esm/r-textarea.entry.js +1 -1
  63. package/dist/esm/r-toast-group.entry.js +2 -2
  64. package/dist/esm/r-toast.entry.js +30 -10
  65. package/dist/esm/web-components.js +1 -1
  66. package/dist/types/components/icon/exports.d.ts +1 -0
  67. package/dist/types/components/icon/icon-data.d.ts +1 -0
  68. package/dist/types/components/icon/riverty-kit.d.ts +1 -0
  69. package/dist/types/components/icon-button/icon-button.d.ts +4 -0
  70. package/dist/types/components/input/exports.d.ts +4 -0
  71. package/dist/types/components/input/input.d.ts +17 -1
  72. package/dist/types/components/input-code/exports.d.ts +4 -4
  73. package/dist/types/components/input-code/input-code.d.ts +3 -3
  74. package/dist/types/components/list-item/list-item/list-item.d.ts +5 -3
  75. package/dist/types/components/tabs/tabs.d.ts +1 -0
  76. package/dist/types/components/tabs-list/exports.d.ts +4 -0
  77. package/dist/types/components/tabs-list/tabs-list.d.ts +38 -0
  78. package/dist/types/components/toast/toast.d.ts +11 -0
  79. package/dist/types/components.d.ts +89 -12
  80. package/dist/web-components/bundled-icons/riverty-kit.json +1 -1
  81. package/dist/web-components/{p-3a5a67e7.entry.js → p-159822fe.entry.js} +1 -1
  82. package/dist/web-components/p-19407a14.entry.js +1 -0
  83. package/dist/web-components/{p-4254a383.entry.js → p-4f261b63.entry.js} +1 -1
  84. package/dist/web-components/{p-673dbfd0.entry.js → p-50893211.entry.js} +1 -1
  85. package/dist/web-components/{p-e5945c01.entry.js → p-5eeb7002.entry.js} +1 -1
  86. package/dist/web-components/p-6bb44ec6.entry.js +1 -0
  87. package/dist/web-components/p-7ce57332.entry.js +1 -0
  88. package/dist/web-components/p-92c7cf33.entry.js +1 -0
  89. package/dist/web-components/{p-ae251d2f.entry.js → p-b96d59ca.entry.js} +1 -1
  90. package/dist/web-components/p-ba801820.entry.js +1 -0
  91. package/dist/web-components/p-bfc8c077.entry.js +1 -0
  92. package/dist/web-components/p-c05b05da.entry.js +1 -0
  93. package/dist/web-components/p-c95b6470.entry.js +1 -0
  94. package/dist/web-components/{p-05738503.entry.js → p-cd5daad2.entry.js} +1 -1
  95. package/dist/web-components/p-cdd88c5a.entry.js +1 -0
  96. package/dist/web-components/{p-a71485d8.entry.js → p-e4dc60f0.entry.js} +1 -1
  97. package/dist/web-components/web-components.esm.js +1 -1
  98. package/package.json +1 -1
  99. package/dist/web-components/p-0e4c8bf1.entry.js +0 -1
  100. package/dist/web-components/p-5441b746.entry.js +0 -1
  101. package/dist/web-components/p-60ca994e.entry.js +0 -1
  102. package/dist/web-components/p-6303b9fe.entry.js +0 -1
  103. package/dist/web-components/p-6a4f3836.entry.js +0 -1
  104. package/dist/web-components/p-8b4d2448.entry.js +0 -1
  105. package/dist/web-components/p-a0dbde7c.entry.js +0 -1
  106. package/dist/web-components/p-b9e3b3d6.entry.js +0 -1
  107. package/dist/web-components/p-e2188953.entry.js +0 -1
@@ -53,12 +53,6 @@
53
53
  --r-list-item--background-color: var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));
54
54
  }
55
55
 
56
- :host(:focus-visible:not(:active)) .r-list-item {
57
- --r-list-item--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
58
- --r-list-item--outline: 2px solid var(--r-border-focused, #0071e3);
59
- --r-list-item--outline-offset: 2px;
60
- }
61
-
62
56
  :host(:focus-within) .r-list-item[href] {
63
57
  --r-list-item--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
64
58
  --r-list-item--outline: 2px solid var(--r-border-focused, #0071e3);
@@ -92,9 +86,9 @@
92
86
  display: var(--r-list-item--display, flex);
93
87
  align-items: var(--r-list-item--align-items, center);
94
88
  justify-content: var(--r-list-item--justify-content, center);
95
- gap: var(--r-list-item--gap, 16px);
89
+ gap: var(--r-list-item--gap, var(--r-spacing-100, 1rem));
96
90
  width: var(--r-list-item--width, inherit);
97
- padding: var(--r-list-item--padding, 16px);
91
+ padding: var(--r-list-item--padding, var(--r-spacing-100, 1rem));
98
92
  margin-left: var(--r-list-item--margin-left, 0);
99
93
  opacity: var(--r-list-item--opacity, 1);
100
94
  color: var(--r-list-item--color, inherit);
@@ -102,15 +96,23 @@
102
96
  outline: var(--r-list-item--outline, none);
103
97
  outline-offset: var(--r-list-item--outline-offset, 0);
104
98
  text-decoration: var(--r-list-item--text-decoration, none);
99
+ text-align: var(--r-list-item--text-align, left);
105
100
  background-color: var(--r-list-item--background-color, transparent);
106
101
  border-style: var(--r-list-item--border-style, solid);
107
102
  border-width: var(--r-list-item--border-width, 0);
108
103
  border-color: var(--r-list-item--border-color, transparent);
109
104
  cursor: var(--r-list-item--cursor, inherit);
110
105
  font-weight: var(--r-list-item--font-weight, var(--r-font-weight-regular, 400));
111
- outline: var(--r-list-item--outline, none);
106
+ font-family: var(--r-list-item--font-family, var(--r-font-family-text, system-ui));
107
+ }
108
+ .r-list-item:focus-visible {
109
+ --r-list-item--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
110
+ --r-list-item--outline: 2px solid var(--r-border-focused, #0071e3);
111
+ --r-list-item--outline-offset: 2px;
112
112
  }
113
113
  .r-list-item--leading {
114
+ display: var(--r-list-item--leading--display, flex);
115
+ align-items: var(--r-list-item--leading--align-items, center);
114
116
  color: var(--r-list-item--leading--color, var(--r-icon-soft, #686868));
115
117
  }
116
118
  .r-list-item--leading-icon {
@@ -119,7 +121,7 @@
119
121
  .r-list-item--trailing {
120
122
  display: var(--r-list-item--trailing--display, flex);
121
123
  align-self: var(--r-list-item--trailing--align-self, center);
122
- gap: var(--r-list-item--trailing--gap, 8px);
124
+ gap: var(--r-list-item--trailing--gap, var(--r-spacing-050, 0.5rem));
123
125
  color: var(--r-list-item--trailing--color, inherit);
124
126
  }
125
127
  .r-list-item--trailing-icon {
@@ -133,18 +135,21 @@
133
135
  }
134
136
  .r-list-item--trailing ::slotted(*) {
135
137
  display: var(--r-list-item--trailing-slotted--display, flex);
136
- gap: var(--r-list-item--trailing-slotted--display, 8px);
138
+ gap: var(--r-list-item--trailing-slotted--display, var(--r-spacing-050, 0.5rem));
137
139
  }
138
140
  .r-list-item--text {
139
141
  display: var(--r-list-item--text--display, flex);
140
142
  flex-grow: var(--r-list-item--text--flex-grow, 1);
141
143
  flex-direction: var(--r-list-item--text--flex-direction, column);
142
- gap: var(--r-list-item--text--gap, 2px);
144
+ gap: var(--r-list-item--text--gap, 0.125rem);
143
145
  white-space: var(--r-list-item--text--white-space, normal);
144
146
  overflow: var(--r-list-item--text--overflow, hidden);
145
147
  text-overflow: var(--r-list-item--text--text-overflow, ellipsis);
146
148
  font-weight: var(--r-list-item--trailing-text--font-weight, inherit);
147
149
  }
150
+ .r-list-item--sr-text {
151
+ display: var(--r-list-item--sr-text--display, none);
152
+ }
148
153
  .r-list-item--headline {
149
154
  font-size: var(--r-list-item--headline--font-size, 1rem);
150
155
  font-weight: var(--r-list-item--headline--font-weight, 600);
@@ -163,3 +168,32 @@
163
168
  .r-list-item--description ::slotted(a) {
164
169
  color: var(--r-list-item--description--color, inherit);
165
170
  }
171
+
172
+ .r-list-item-wrapper {
173
+ width: var(--r-list-item-wrapper--width, 100%);
174
+ }
175
+
176
+ .sub-items {
177
+ margin: var(--r-sub-items--margin, 0);
178
+ padding: var(--r-sub-items--padding, 0);
179
+ list-style-type: var(--r-sub-items--list-style-type, "");
180
+ }
181
+ .sub-items[aria-hidden=true] {
182
+ display: none;
183
+ }
184
+
185
+ .visually-hidden {
186
+ position: absolute;
187
+ width: 0.0625rem;
188
+ height: 0.0625rem;
189
+ clip: rect(0 0 0 0);
190
+ clip-path: inset(50%);
191
+ overflow: hidden;
192
+ white-space: nowrap;
193
+ }
194
+
195
+ @media (prefers-reduced-motion) {
196
+ .r-list-item--trailing-icon {
197
+ transition: none;
198
+ }
199
+ }
@@ -5,6 +5,8 @@ export class RListItem {
5
5
  this.variant = 'list-item';
6
6
  /** Determines whether the list item is expanded to show its subitems. It can be toggled programmatically or through user interaction. */
7
7
  this.expanded = false;
8
+ /** Unique id for each subItem list */
9
+ this.uniqueSubmitemsId = `r-list-item-subitems-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
8
10
  this.isEl = (selector) => {
9
11
  return this.host.querySelector(selector) !== null;
10
12
  };
@@ -46,6 +48,10 @@ export class RListItem {
46
48
  get isDescriptionSlot() {
47
49
  return this.isEl('[slot="description"]');
48
50
  }
51
+ get headlineContent() {
52
+ var _a;
53
+ return ((_a = this.host.querySelector('[slot="headline"]')) === null || _a === void 0 ? void 0 : _a.textContent) || this.headline;
54
+ }
49
55
  get hasSubitems() {
50
56
  return this.isEl('[variant="subitem"]');
51
57
  }
@@ -53,20 +59,12 @@ export class RListItem {
53
59
  var _a;
54
60
  return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[variant="subitem"]');
55
61
  }
56
- handleKeyDown(event) {
57
- if (event.key !== 'Enter' && event.key !== ' ')
58
- return;
59
- this.toggleSubitems();
60
- }
61
- /** Prevent the click from toggling the parent **/
62
- handleSubitemClick(event) {
63
- event.stopPropagation();
64
- }
65
62
  /** Function to set tabindex for sub-items */
66
63
  setTabIndexOnSubItems() {
67
64
  if (this.hasSubitems) {
68
65
  this.subItems.forEach((element) => {
69
- element.shadowRoot.querySelector('a.r-list-item').setAttribute('tabindex', this.disabled ? '-1' : '0');
66
+ var _a;
67
+ (_a = element.shadowRoot.querySelector('a.r-list-item')) === null || _a === void 0 ? void 0 : _a.setAttribute('tabindex', this.disabled ? '-1' : null);
70
68
  });
71
69
  }
72
70
  }
@@ -74,26 +72,29 @@ export class RListItem {
74
72
  this.setTabIndexOnSubItems();
75
73
  }
76
74
  get tagName() {
75
+ if (this.hasSubitems) {
76
+ return 'button';
77
+ }
77
78
  return this.href && !this.disabled ? 'a' : 'div';
78
79
  }
79
80
  render() {
80
81
  const { leadingIcon, leadingIconSrc, trailingIcon, trailingIconSrc, headline, trailingText, description } = this;
81
82
  const TagName = this.tagName;
82
- const itemAttrs = Object.assign({ href: TagName === 'a' ? this.href : null }, (this.disabled ? { role: 'link', 'aria-disabled': 'true' } : null));
83
- const ListItemContent = (h(TagName, Object.assign({ class: "r-list-item" }, itemAttrs), this.isLeading &&
83
+ const itemAttrs = Object.assign(Object.assign(Object.assign({ href: TagName === 'a' ? this.href : null, 'aria-current': this.active && TagName === 'a' ? 'page' : null }, (this.disabled ? { role: 'link', 'aria-disabled': 'true' } : null)), (this.hasSubitems ? { 'aria-expanded': `${this.expanded}` } : null)), (this.hasSubitems ? { 'aria-controls': `${this.uniqueSubmitemsId}` } : null));
84
+ const ListItemContent = (h(TagName, Object.assign({ class: "r-list-item" }, itemAttrs, { onClick: () => this.hasSubitems && this.toggleSubitems() }), this.isLeading &&
84
85
  h("span", { class: "r-list-item--leading" }, h("slot", { name: "leading" }, this.isLeadingIcon && !this.hideLeadingIcon &&
85
86
  h("r-icon", { class: "r-list-item--leading-icon", name: leadingIcon, src: leadingIconSrc }))), h("span", { class: "r-list-item--text" }, !this.isTextSlot ?
86
87
  h(Fragment, null, (this.isHeadlineSlot || headline) &&
87
88
  h("span", { class: "r-list-item--headline" }, h("slot", { name: "headline" }, headline)), (description || this.isDescriptionSlot) &&
88
89
  h("span", { class: "r-list-item--description" }, h("slot", { name: "description" }, description)))
89
90
  :
90
- h("slot", { name: "text" })), this.isTrailing &&
91
+ h("slot", { name: "text" })), h("span", { class: "r-list-item--sr-text visually-hidden" }, this.headlineContent), this.isTrailing &&
91
92
  h("span", { class: "r-list-item--trailing" }, h("slot", { name: "trailing" }, this.isTrailingIcon && !trailingText &&
92
93
  h("r-icon", { class: "r-list-item--trailing-icon", name: trailingIcon, src: trailingIconSrc }), trailingText && !this.isTrailingIcon &&
93
94
  h("span", { class: "r-list-item--trailing-text" }, trailingText)))));
94
95
  if (!this.hasSubitems)
95
96
  return h(Host, null, ListItemContent);
96
- return (h(Host, { onKeyDown: this.handleKeyDown, onClick: this.toggleSubitems, tabindex: `${this.disabled ? "-1" : "0"}` }, h("div", { class: "r-list-item-wrapper" }, ListItemContent, this.expanded && (h("span", { class: "sub-items", onClick: this.handleSubitemClick }, h("slot", null))))));
97
+ return (h(Host, null, h("div", { class: "r-list-item-wrapper" }, ListItemContent, h("ul", { "aria-hidden": `${!this.expanded}`, id: this.uniqueSubmitemsId, class: "sub-items" }, h("slot", null)))));
97
98
  }
98
99
  static get is() { return "r-list-item"; }
99
100
  static get encapsulation() { return "shadow"; }
@@ -419,6 +420,25 @@ export class RListItem {
419
420
  "setter": false,
420
421
  "reflect": true,
421
422
  "defaultValue": "false"
423
+ },
424
+ "active": {
425
+ "type": "boolean",
426
+ "attribute": "active",
427
+ "mutable": false,
428
+ "complexType": {
429
+ "original": "boolean",
430
+ "resolved": "boolean",
431
+ "references": {}
432
+ },
433
+ "required": false,
434
+ "optional": true,
435
+ "docs": {
436
+ "tags": [],
437
+ "text": "Indicates whether the list item is currently active (e.g., represents the current page)."
438
+ },
439
+ "getter": false,
440
+ "setter": false,
441
+ "reflect": true
422
442
  }
423
443
  };
424
444
  }
@@ -1,13 +1,13 @@
1
1
  :host {
2
- --r-panel--min-width: 300px;
2
+ --r-panel--min-width: 18.75rem;
3
3
  --r-panel--background-color: var(--r-background-soft, #F3F1F0);
4
4
  --r-panel--display: flex;
5
5
  --r-panel--flex-direction: column;
6
6
  --r-panel--position: fixed;
7
7
  --r-panel--align-items: flex-start;
8
8
  --r-panel--top: 0;
9
- --r-panel--padding: var(--spacing-050, 8px) 0;
10
- --r-panel--width: 300px;
9
+ --r-panel--padding: 8px 0;
10
+ --r-panel--width: 18.75rem;
11
11
  --r-panel--height: 100%;
12
12
  --r-panel--color: var(--r-text-regular, #282828);
13
13
  --r-panel--transition: all 250ms ease-in-out;
@@ -15,37 +15,41 @@
15
15
  --r-panel--font-family: var(--r-font-family-text);
16
16
  --r-panel--left: 0;
17
17
  --r-panel--header--display: flex;
18
- --r-panel--header--padding: var(--spacing-075, 12px) var(--spacing-100, 16px) var(--spacing-075, 12px) var(--spacing-100, 16px);
18
+ --r-panel--header--padding: 12px 16px;
19
19
  --r-panel--header--justify-content: space-between;
20
20
  --r-panel--header--align-items: center;
21
21
  --r-panel--header--align-self: stretch;
22
22
  --r-panel--header--icon-rotate: none;
23
23
  --r-panel--header--flex-direction: row;
24
- --r-panel--header--gap: 50px;
24
+ --r-panel--header--gap: 3.125rem;
25
25
  --r-panel--header--logo--img--width: 100%;
26
26
  --r-panel--header--logo--img--height: auto;
27
- --r-panel--header--logo--img--expanded--width: 192px;
28
- --r-panel--header--logo--img--collapsed--width: 30px;
27
+ --r-panel--header--logo--img--expanded--width: 12rem;
28
+ --r-panel--header--logo--img--collapsed--width: 1.875rem;
29
29
  --r-panel--header--height: unset;
30
30
  --r-panel--body--display: block;
31
31
  --r-panel--body--flex-grow: 1;
32
32
  --r-panel--body--align-self: stretch;
33
33
  --r-panel--body--overflow: auto;
34
- --r-panel--body--padding: var(--r-spacing-025, 4px) var(--spacing-050, 8px) 0;
34
+ --r-panel--body--padding: 4px 8px 0;
35
35
  --r-panel--body-header--color: var(--r-text-soft, #686868);
36
- --r-panel--body-header--padding: var(--spacing-100, 16px) 0 var(--spacing-100, 16px);
37
- --r-panel--body-header--width: 268px;
36
+ --r-panel--body-header--font-size: var(--r-font-size-400, 1rem);
37
+ --r-panel--body-header--font-weight: var(--r-font-weight-regular, 400);
38
+ --r-panel--body-header--padding: 16px 0;
39
+ --r-panel--body-header--width: 16.75rem;
40
+ --r-panel--body-header--margin: 0px;
38
41
  --r-panel--footer--dispay: flex;
39
- --r-panel--footer--padding: var(--spacing-100, 16px) var(--spacing-100, 16px) var(--spacing-150, 24px) var(--spacing-100, 16px);
42
+ --r-panel--footer--width: 100%;
43
+ --r-panel--footer--padding: 16px 16px 24px;
40
44
  --r-panel--footer--flex-direction: column;
41
45
  --r-panel--footer--justify-content: center;
42
- --r-panel--footer-gap: var(--spacing-100, 16px);
46
+ --r-panel--footer-gap: var(--spacing-100, 1rem);
43
47
  --r-panel--footer--align-self: stretch;
44
48
  --r-panel--footer--text-align: center;
45
49
  }
46
50
 
47
51
  :host([variant=drawer]) r-button {
48
- --r-button--padding: 10px;
52
+ --r-button--padding: 0.625rem;
49
53
  --r-button--background: var(--r-background-interactive-softer, #E7E4E2);
50
54
  --r-button--border-radius: 10%;
51
55
  --r-button--slot--position: relative;
@@ -53,13 +57,13 @@
53
57
  }
54
58
 
55
59
  :host([variant=drawer][collapsed]) {
56
- --r-panel--width: 72px;
60
+ --r-panel--width: var(--r-spacing-450, 4.5rem);
57
61
  --r-panel--header--display: none;
58
62
  --r-panel--header--icon-rotate: rotate(180deg);
59
63
  --r-panel--header--logo--expaned--display: none;
60
64
  --r-panel--header--logo--collapsed--display: block;
61
65
  --r-panel--header--flex-direction: column;
62
- --r-panel--header--gap: 12px;
66
+ --r-panel--header--gap: 0.625rem;
63
67
  --r-list-item--epxanded--background-color: rgba(40, 40, 40, 0.08);
64
68
  }
65
69
  :host([variant=drawer][collapsed]) r-button {
@@ -73,14 +77,15 @@
73
77
 
74
78
  :host([collapsed]:not([variant=modal])) {
75
79
  --r-panel--min-width: 0;
80
+ --r-list-item--sr-text--display: block;
76
81
  --r-list-item--text--display: none;
77
82
  --r-list-item--trailing--display: none;
78
83
  }
79
84
 
80
85
  :host([variant=drawer]:not([has-header]):not([collapsed])),
81
86
  :host([variant=drawer][has-header=false]:not([collapsed])) {
82
- --r-panel--header--height: 24px;
83
- --r-panel--header--padding: var(--spacing-075, 12px) var(--spacing-050, 8px) 0 var(--spacing-100, 16px);
87
+ --r-panel--header--height: var(--spacing-150, 1.5rem);
88
+ --r-panel--header--padding: 12px 8px 0 16px;
84
89
  }
85
90
  :host([variant=drawer]:not([has-header]):not([collapsed])) r-button,
86
91
  :host([variant=drawer][has-header=false]:not([collapsed])) r-button {
@@ -154,9 +159,15 @@
154
159
  }
155
160
  .r-panel--body ::slotted(.header) {
156
161
  color: var(--r-panel--body-header--color);
162
+ font-size: var(--r-panel--body-header--font-size);
163
+ font-weight: var(--r-panel--body-header--font-weight);
157
164
  padding: var(--r-panel--body-header--padding);
158
165
  display: var(--r-panel--header--display);
159
166
  width: var(--r-panel--body-header--width);
167
+ margin: var(--r-panel--body-header--margin);
168
+ }
169
+ .r-panel--footer {
170
+ width: var(--r-panel--footer--width);
160
171
  }
161
172
  .r-panel ::slotted([slot=footer]) {
162
173
  display: var(--r-panel--footer--dispay);
@@ -167,3 +178,15 @@
167
178
  align-self: var(--r-panel--footer--align-self);
168
179
  text-align: var(--r-panel--footer--text-align);
169
180
  }
181
+ .r-panel ::slotted(ul) {
182
+ margin: var(--r-panel--item-list--margin, 0);
183
+ padding: var(--r-panel--item-list--padding, 0);
184
+ list-style-type: var(--r-panel--item-list--list-style-type, "");
185
+ }
186
+
187
+ @media (prefers-reduced-motion) {
188
+ .r-panel,
189
+ :host([variant=drawer][collapsed]) r-button {
190
+ transition: none;
191
+ }
192
+ }
@@ -12,9 +12,9 @@ export class Panel {
12
12
  /** A boolean property that determines the collapsed state of the component. The default state is `false`. */
13
13
  this.collapsed = false;
14
14
  /** Aria-label text for collapse */
15
- this.labelCollapse = 'collapse-panel';
15
+ this.labelCollapse = 'Collapse panel';
16
16
  /** Aria-label text for expand */
17
- this.labelExpand = 'expand-panel';
17
+ this.labelExpand = 'Expand panel';
18
18
  this.isCollapsed = this.collapsed;
19
19
  // Pre-bound method for event listeners
20
20
  this.updateCurrentLocationBound = this.updateCurrentLocation.bind(this);
@@ -161,10 +161,10 @@ export class Panel {
161
161
  }
162
162
  }
163
163
  render() {
164
- return (h(Host, { key: '4898806bfe378b36f5fc784a6a4ea4477f164d86', collapsed: this.isCollapsed }, h("div", { key: 'f0acaedbc5e440b20a49791d5a3544955bdcd1f7', class: "r-panel" }, h("div", { key: '390898c282414aecd4cfd75e4da80fb6b04e8ffa', class: "r-panel--header" }, this.hasHeader && (h("a", { key: '9358558193e8c7ec82d8bf40240b9fb8d00d902d', class: "logo-wrapper", href: this.logoLink }, this.isCollapsed ?
164
+ return (h(Host, { key: 'aace877d6d376afd9cbac880bdc7d462ccee34e7', role: "navigation", collapsed: this.isCollapsed }, h("div", { key: 'c07a80d9fbefa984af49e105c37675585241dc96', class: "r-panel" }, h("div", { key: '6b16c3af37e340153a9449704bee1d9925309fd6', class: "r-panel--header" }, this.hasHeader && (h("a", { key: '56d04db007a0305db77010fc59b23467c4ab347a', class: "logo-wrapper", href: this.logoLink }, this.isCollapsed ?
165
165
  h("slot", { name: "logo-collapsed" })
166
166
  :
167
- h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", title: `${this.labelCollapse}`, icon: "cross", "r-aria-label": `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", title: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, icon: "angle-left", "r-aria-label": this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: '070e63b95136c2cab2bf7a1a84390568c1341c47', class: "r-panel--body" }, h("slot", { key: 'e595b40da67e61bb23638d5ea1a615005d705a41' })), this.hasFooter && !this.isCollapsed && (h("div", { key: '7adb855c7aa805299abba58795aacb27ce4e6ba5', class: "r-panel--footer" }, h("slot", { key: '6e438b003d443bf62b2faad2bf180a4466190e77', name: "footer" }))))));
167
+ h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "cross", rAriaLabel: `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "angle-left", rAriaLabel: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: '4d88759343c8172d7b0c8f4750ba3bbb0d027586', class: "r-panel--body" }, h("slot", { key: '8a238430717fa44459b784a27b45f12dcb0b20d3' })), this.hasFooter && !this.isCollapsed && (h("div", { key: '74bc26fe68ea907ea844f1b36ab78be45ffd1540', class: "r-panel--footer" }, h("slot", { key: 'bd294360e84e060493088d42b6dd022e4d3058a9', name: "footer" }))))));
168
168
  }
169
169
  static get is() { return "r-panel"; }
170
170
  static get encapsulation() { return "shadow"; }
@@ -342,7 +342,7 @@ export class Panel {
342
342
  "getter": false,
343
343
  "setter": false,
344
344
  "reflect": false,
345
- "defaultValue": "'collapse-panel'"
345
+ "defaultValue": "'Collapse panel'"
346
346
  },
347
347
  "labelExpand": {
348
348
  "type": "string",
@@ -362,7 +362,7 @@ export class Panel {
362
362
  "getter": false,
363
363
  "setter": false,
364
364
  "reflect": false,
365
- "defaultValue": "'expand-panel'"
365
+ "defaultValue": "'Expand panel'"
366
366
  }
367
367
  };
368
368
  }
@@ -18,5 +18,5 @@
18
18
  width: var(--r-stepper-divider--width, 100%);
19
19
  height: var(--r-stepper-divider--height, 1px);
20
20
  top: var(--r-stepper-divider--top, 10px);
21
- background-color: var(--r-stepper-divider--background-color, var(--r-border-soft, #686868));
21
+ background-color: var(--r-stepper-divider--background-color, var(--r-text-regular, #282828));
22
22
  }
@@ -18,7 +18,7 @@
18
18
  align-items: var(--r-stepper-item--align-items, center);
19
19
  justify-content: var(--r-stepper-item--justify-content, center);
20
20
  font-size: var(--r-stepper-item--font-size, var(--r-font-size-200, 13px));
21
- color: var(--r-stepper-item--color, var(--r-text-soft, #686868));
21
+ color: var(--r-stepper-item--color, var(--r-text-regular, #282828));
22
22
  font-family: var(--r-stepper-item--font-family, var(--r-font-family-text, system-ui));
23
23
  width: var(--r-stepper-item--width, 36px);
24
24
  white-space: var(--r-stepper-item--white-space, nowrap);
@@ -35,7 +35,7 @@
35
35
  align-items: var(--r-stepper-item--indicator--align-items, center);
36
36
  border-width: var(--r-stepper-item--indicator--border-width, 1px);
37
37
  border-style: var(--r-stepper-item--indicator--border-style, solid);
38
- border-color: var(--r-stepper-item--indicator--border-color, var(--r-border-soft, #686868));
38
+ border-color: var(--r-stepper-item--indicator--border-color, var(--r-text-regular, #282828));
39
39
  margin-left: var(--r-stepper-item--indicator--margin-left, 8px);
40
40
  margin-right: var(--r-stepper-item--indicator--margin-right, 8px);
41
41
  }
@@ -44,6 +44,6 @@
44
44
  }
45
45
  .r-stepper-item--text {
46
46
  font-size: var(--r-stepper-item--text--font-size, var(--r-font-size-200, 13px));
47
- color: var(--r-stepper-item--text--color, var(--r-text-soft, #686868));
47
+ color: var(--r-stepper-item--text--color, var(--r-text-regular, #282828));
48
48
  text-align: var(--r-stepper-item--text--text-align, center);
49
49
  }
@@ -6,42 +6,30 @@
6
6
  }
7
7
 
8
8
  :host(:hover:not([disabled]:not([disabled=false]))) {
9
- --r-tab--color: var(--r-text-strong);
10
- --r-tab--marker--height: 5px;
11
- --r-tab--marker--background-color: var(--r-border-softer, #c9c9c9);
12
- --r-tab--marker--visibility: visible;
9
+ --r-tab--background: var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));
13
10
  }
14
11
 
15
12
  :host(:active:not([disabled]:not([disabled=false]))) {
16
- --r-tab--background-color: var(--r-background-interactive-pressed, rgba(40,40,40,0.12));
13
+ --r-tab--background: var(--r-background-interactive-pressed, rgba(40,40,40,0.12));
17
14
  }
18
15
 
19
16
  :host(:focus-visible) {
20
- --r-tab--marker--visibility: visible;
21
- --r-tab--marker--height: 5px;
22
- --r-tab--marker--background-color: var(--r-background-interactive-pressed, rgba(40,40,40,0.12));
23
- --r-tab--slot--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
24
- --r-tab--slot--outline: 2px solid var(--r-border-focused, #0071e3);
25
- --r-tab--slot--outline-offset: 2px;
17
+ --r-tab--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
18
+ --r-tab--outline: 2px solid var(--r-border-focused, #0071e3);
19
+ --r-tab--outline-offset: 2px;
26
20
  }
27
21
 
28
22
  :host([active]:not([active=false])) {
29
23
  cursor: default;
30
24
  --r-tab--font-weight: var(--r-font-weight-semibold, 600);
31
- --r-tab--color: var(--r-text-strong, #000);
32
- --r-tab--padding-left: 0.5625rem;
33
- --r-tab--padding-right: 0.5625rem;
34
- --r-tab--marker--background-color: var(--r-border-regular, #282828);
35
25
  --r-tab--marker--visibility: visible;
36
- --r-tab--marker--height: 3px;
37
26
  }
38
27
 
39
28
  :host([disabled]:not([disabled=false])) {
40
- opacity: 0.4;
41
29
  cursor: not-allowed;
42
30
  --r-tab--pointer-events: none;
43
- --r-tab--marker--visibility: hidden;
44
- --r-tab--slot--box-shadow: none;
31
+ --r-tab--color: var(--r-text-soft, #686868);
32
+ --r-tab--marker--background-color: var(--r-border-soft, #686868) ;
45
33
  }
46
34
 
47
35
  .r-tab {
@@ -49,19 +37,26 @@
49
37
  font-family: var(--r-tab--font-family, var(--r-font-family-text, system-ui));
50
38
  font-weight: var(--r-tab--font-weight, var(--r-font-weight-regular, 400));
51
39
  font-size: var(--r-tab--font-size, var(--r-font-size-400, 1rem));
52
- line-height: var(--r-tab--line-height, 1);
40
+ line-height: var(--r-tab--line-height, var(--r-line-height-m, 1.5));
53
41
  cursor: var(--r-tab--cursor, inherit);
54
42
  pointer-events: var(--r-tab--pointer-events, initial);
55
- padding-top: var(--r-tab--padding-top, 0);
56
- padding-right: var(--r-tab--padding-right, 0.625rem);
57
- padding-bottom: var(--r-tab--padding-bottom, 1.25rem);
58
- padding-left: var(--r-tab--padding-left, 0.625rem);
43
+ display: var(--r-tab--display, flex);
44
+ align-items: var(--r-tab--align-items, center);
45
+ justify-content: var(--r-tab--justify-content, center);
46
+ gap: var(--r-tab--gap, var(--r-spacing-050, 0.5rem));
47
+ width: var(--r-tab--width, auto);
48
+ padding-top: var(--r-tab--padding-top, var(--r-spacing-025, 0.25rem));
49
+ padding-right: var(--r-tab--padding-right, var(--r-spacing-050, 0.5rem));
50
+ padding-bottom: var(--r-tab--padding-bottom, var(--r-spacing-100, 1rem));
51
+ padding-left: var(--r-tab--padding-left, var(--r-spacing-050, 0.5rem));
52
+ margin-bottom: var(--r-tab--margin-bottom, -1px);
59
53
  opacity: var(--r-tab--opacity, 1);
60
54
  background: var(--r-tab--background, none);
61
55
  color: var(--r-tab--color, var(--r-text-regular, #282828));
62
56
  border: var(--r-tab--border, none);
63
57
  box-shadow: var(--r-tab--box-shadow, none);
64
58
  outline: var(--r-tab--outline, none);
59
+ outline-offset: var(--r-tab--outline-offset, 0);
65
60
  }
66
61
  .r-tab::after {
67
62
  content: var(--r-tab--marker--content, "");
@@ -71,11 +66,16 @@
71
66
  bottom: var(--r-tab--marker--bottom, 0);
72
67
  left: var(--r-tab--marker--left, 0);
73
68
  visibility: var(--r-tab--marker--visibility, hidden);
74
- background-color: var(--r-tab--marker--background-color, rgba(0, 0, 0, 0));
69
+ background-color: var(--r-tab--marker--background-color, var(--r-border-regular, #282828));
75
70
  transition: var(--r-tab--marker--transition, all 0.1s ease-in);
76
71
  }
77
- .r-tab--slot {
78
- box-shadow: var(--r-tab--slot--box-shadow, none);
79
- outline: var(--r-tab--slot--outline, none);
80
- outline-offset: var(--r-tab--slot--outline-offset, 0);
72
+ .r-tab--disabled-icon,
73
+ .r-tab ::slotted([slot=icon]) {
74
+ color: var(--r-tab--icon--color, var(--r-icon-soft, #686868));
75
+ }
76
+
77
+ @media (prefers-reduced-motion) {
78
+ .r-tab::after {
79
+ transition: none;
80
+ }
81
81
  }
@@ -22,6 +22,8 @@ export class RTab {
22
22
  if (this.disabled)
23
23
  return;
24
24
  switch (event.code) {
25
+ case 'ArrowLeft':
26
+ case 'ArrowRight':
25
27
  case 'Space':
26
28
  case 'Home':
27
29
  case 'End':
@@ -41,7 +43,9 @@ export class RTab {
41
43
  'aria-selected': `${active}`,
42
44
  'aria-disabled': `${disabled}`
43
45
  };
44
- return (h(Host, Object.assign({ key: '04af619a56c41414b02e942d9d5bba11ef5eb1a0', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: 'e3fcc9b084de339aafcf98d8c5ca06f0e9615916', class: "r-tab" }, h("span", { key: 'bb52bf58758c2404a61b595706ecb3e3f71942ee', class: "r-tab--slot" }, h("slot", { key: '939a0e9618875e4909dbb763290f5f439122e312' })))));
46
+ return (h(Host, Object.assign({ key: '619d576a8efdfa1f941be9760312d7254a922f10', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: '15d69c67544bdb845df4b10411ff3e55fb5671a2', class: "r-tab" }, disabled ?
47
+ h("r-icon", { class: "r-tab--disabled-icon", size: "s", name: "circle-slash" })
48
+ : h("slot", { name: "icon" }), h("slot", { key: '59e5f0740a92f1cfeb71ab9709db2f2a13152fb4' }))));
45
49
  }
46
50
  static get is() { return "r-tab"; }
47
51
  static get encapsulation() { return "shadow"; }
@@ -12,7 +12,7 @@ export class RTabPanel {
12
12
  active,
13
13
  'aria-labelledby': tabId
14
14
  };
15
- return (h(Host, Object.assign({ key: 'de50044bd0be5598615c2f84e66f5a552edb4ab9', class: "r-typography" }, hostAttrs), h("div", { key: 'e4db4fd5b115c96474f31d9d16881f496b8f4fd2', class: "r-tab-panel" }, h("slot", { key: 'd2ad80745f97933fb173f6ecd3635829d3c890ac' }))));
15
+ return (h(Host, Object.assign({ key: 'db95a245a8aa8900e1cea5af71ac488352954299', class: "r-typography" }, hostAttrs), h("div", { key: '0e720978d72a9d9ba9da367794ac96c49737d854', class: "r-tab-panel" }, h("slot", { key: 'f16a0da6c7d3d2c1e0c57778837bdb47879468b4' }))));
16
16
  }
17
17
  static get is() { return "r-tab-panel"; }
18
18
  static get encapsulation() { return "shadow"; }
@@ -180,23 +180,51 @@ export class RTabs {
180
180
  history.pushState({ tabId, tabsGroup }, '', url.toString());
181
181
  }
182
182
  _changeFocusTab(tab, keycode) {
183
- var _a, _b, _c, _d;
184
183
  const tabs = Array.from(this.tabElements).filter(element => !element.disabled);
185
184
  const index = tabs.indexOf(tab);
185
+ let nextTab;
186
186
  switch (keycode) {
187
187
  case 'ArrowLeft':
188
- index === 0 ? (_a = tabs[tabs.length - 1]) === null || _a === void 0 ? void 0 : _a.focus() : tabs[index - 1].focus();
188
+ nextTab = index === 0 ? tabs[tabs.length - 1] : tabs[index - 1];
189
189
  break;
190
190
  case 'ArrowRight':
191
- index === tabs.length - 1 ? (_b = tabs[0]) === null || _b === void 0 ? void 0 : _b.focus() : tabs[index + 1].focus();
191
+ nextTab = index === tabs.length - 1 ? tabs[0] : tabs[index + 1];
192
192
  break;
193
193
  case 'Home':
194
- (_c = tabs[0]) === null || _c === void 0 ? void 0 : _c.focus();
194
+ nextTab = tabs[0];
195
195
  break;
196
196
  case 'End':
197
- (_d = tabs[tabs.length - 1]) === null || _d === void 0 ? void 0 : _d.focus();
197
+ nextTab = tabs[tabs.length - 1];
198
198
  break;
199
199
  }
200
+ if (nextTab) {
201
+ nextTab.focus();
202
+ this.scrollTabIntoView(nextTab);
203
+ }
204
+ }
205
+ scrollTabIntoView(tab) {
206
+ var _a;
207
+ const tabsList = this.host.querySelector('r-tabs-list');
208
+ if (!tabsList)
209
+ return;
210
+ const container = (_a = tabsList.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.r-tabs-list--tabs-container');
211
+ if (!container)
212
+ return;
213
+ const containerRect = container.getBoundingClientRect();
214
+ const tabRect = tab.getBoundingClientRect();
215
+ // Check if tab is fully visible
216
+ const isFullyVisible = tabRect.left >= containerRect.left - 1 &&
217
+ tabRect.right <= containerRect.right + 1;
218
+ if (isFullyVisible)
219
+ return;
220
+ // Calculate scroll offset to center the tab
221
+ const centerOffset = (tabRect.left - containerRect.left) -
222
+ (containerRect.width / 2) +
223
+ (tabRect.width / 2);
224
+ container.scrollBy({
225
+ left: centerOffset,
226
+ behavior: 'smooth'
227
+ });
200
228
  }
201
229
  /** Listen for "click" event on `<r-tab>` */
202
230
  tabChangeAction(event) {
@@ -233,7 +261,7 @@ export class RTabs {
233
261
  this._changeFocusTab(e.target, e.detail.keycode);
234
262
  }
235
263
  render() {
236
- return (h(Host, { key: '4c86b16a8af456854579e7141ff2b3d2b60627e5', class: "r-tabs" }, h("slot", { key: '589b8ae9f3f51df095ed28b896714e1407fd9d87' })));
264
+ return (h(Host, { key: 'b058fd461951dad54e7eb73f7dc5df838c864ebd', class: "r-tabs" }, h("slot", { key: '8e93fded06f0f01dc326e8368aac200d36613753' })));
237
265
  }
238
266
  static get is() { return "r-tabs"; }
239
267
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,2 @@
1
+ export const TabListVariantArray = ['expanded', 'compact'];
2
+ export const ActiveTabBorderArray = ['standard', 'branded'];