@warp-ds/elements 2.8.2-next.1 → 2.8.2-next.3

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 (172) hide show
  1. package/dist/custom-elements.json +195 -121
  2. package/dist/index.d.ts +52 -22
  3. package/dist/packages/affix/affix.hydration.test.d.ts +1 -0
  4. package/dist/packages/affix/affix.hydration.test.js +33 -0
  5. package/dist/packages/affix/affix.js +5 -5
  6. package/dist/packages/affix/affix.js.map +3 -3
  7. package/dist/packages/alert/alert.d.ts +1 -0
  8. package/dist/packages/alert/alert.hydration.test.d.ts +1 -0
  9. package/dist/packages/alert/alert.hydration.test.js +47 -0
  10. package/dist/packages/alert/alert.js +7 -7
  11. package/dist/packages/alert/alert.js.map +3 -3
  12. package/dist/packages/alert/alert.test.js +21 -0
  13. package/dist/packages/attention/attention.hydration.test.d.ts +1 -0
  14. package/dist/packages/attention/attention.hydration.test.js +66 -0
  15. package/dist/packages/attention/attention.js +15 -15
  16. package/dist/packages/attention/attention.js.map +3 -3
  17. package/dist/packages/badge/badge.hydration.test.d.ts +1 -0
  18. package/dist/packages/badge/badge.hydration.test.js +50 -0
  19. package/dist/packages/badge/badge.js +2 -2
  20. package/dist/packages/badge/badge.js.map +3 -3
  21. package/dist/packages/badge/badge.test.js +14 -0
  22. package/dist/packages/box/box.hydration.test.d.ts +1 -0
  23. package/dist/packages/box/box.hydration.test.js +37 -0
  24. package/dist/packages/breadcrumbs/breadcrumbs.d.ts +1 -1
  25. package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.d.ts +1 -0
  26. package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +141 -0
  27. package/dist/packages/breadcrumbs/breadcrumbs.js +7 -7
  28. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  29. package/dist/packages/breadcrumbs/breadcrumbs.test.js +3 -1
  30. package/dist/packages/button/button.hydration.test.d.ts +1 -0
  31. package/dist/packages/button/button.hydration.test.js +43 -0
  32. package/dist/packages/button/button.js +9 -9
  33. package/dist/packages/button/button.js.map +3 -3
  34. package/dist/packages/button/button.react.stories.d.ts +1 -1
  35. package/dist/packages/card/card.hydration.test.d.ts +1 -0
  36. package/dist/packages/card/card.hydration.test.js +38 -0
  37. package/dist/packages/card/card.react.stories.d.ts +1 -1
  38. package/dist/packages/checkbox/checkbox.d.ts +17 -1
  39. package/dist/packages/checkbox/checkbox.hydration.test.d.ts +1 -0
  40. package/dist/packages/checkbox/checkbox.hydration.test.js +47 -0
  41. package/dist/packages/checkbox/checkbox.js +20 -19
  42. package/dist/packages/checkbox/checkbox.js.map +3 -3
  43. package/dist/packages/checkbox/styles.js +10 -9
  44. package/dist/packages/checkbox-group/checkbox-group.d.ts +7 -0
  45. package/dist/packages/checkbox-group/checkbox-group.hydration.test.d.ts +2 -0
  46. package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +40 -0
  47. package/dist/packages/checkbox-group/checkbox-group.js +14 -14
  48. package/dist/packages/checkbox-group/checkbox-group.js.map +3 -3
  49. package/dist/packages/checkbox-group/checkbox-group.test.js +10 -0
  50. package/dist/packages/combobox/combobox.hydration.test.d.ts +1 -0
  51. package/dist/packages/combobox/combobox.hydration.test.js +43 -0
  52. package/dist/packages/combobox/combobox.js +2 -2
  53. package/dist/packages/combobox/combobox.js.map +2 -2
  54. package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
  55. package/dist/packages/combobox/combobox.test.js +5 -2
  56. package/dist/packages/datepicker/datepicker.hydration.test.d.ts +1 -0
  57. package/dist/packages/datepicker/datepicker.hydration.test.js +40 -0
  58. package/dist/packages/datepicker/datepicker.js +5 -5
  59. package/dist/packages/datepicker/datepicker.js.map +3 -3
  60. package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
  61. package/dist/packages/expandable/expandable.hydration.test.d.ts +1 -0
  62. package/dist/packages/expandable/expandable.hydration.test.js +47 -0
  63. package/dist/packages/expandable/expandable.js +12 -12
  64. package/dist/packages/expandable/expandable.js.map +3 -3
  65. package/dist/packages/icon/icon.hydration.test.d.ts +1 -0
  66. package/dist/packages/icon/icon.hydration.test.js +47 -0
  67. package/dist/packages/icon/icon.js +2 -2
  68. package/dist/packages/icon/icon.js.map +3 -3
  69. package/dist/packages/icon/icon.test.d.ts +1 -0
  70. package/dist/packages/icon/icon.test.js +51 -0
  71. package/dist/packages/link/link.hydration.test.d.ts +1 -0
  72. package/dist/packages/link/link.hydration.test.js +54 -0
  73. package/dist/packages/link/link.js +4 -4
  74. package/dist/packages/link/link.js.map +3 -3
  75. package/dist/packages/link/link.test.js +14 -0
  76. package/dist/packages/modal/modal.hydration.test.d.ts +1 -0
  77. package/dist/packages/modal/modal.hydration.test.js +25 -0
  78. package/dist/packages/modal-header/modal-header.js +6 -6
  79. package/dist/packages/modal-header/modal-header.js.map +3 -3
  80. package/dist/packages/page-indicator/page-indicator.hydration.test.d.ts +1 -0
  81. package/dist/packages/page-indicator/page-indicator.hydration.test.js +41 -0
  82. package/dist/packages/page-indicator/page-indicator.js +7 -7
  83. package/dist/packages/page-indicator/page-indicator.js.map +3 -3
  84. package/dist/packages/page-indicator/page-indicator.test.js +23 -0
  85. package/dist/packages/pagination/pagination.d.ts +4 -0
  86. package/dist/packages/pagination/pagination.hydration.test.d.ts +1 -0
  87. package/dist/packages/pagination/pagination.hydration.test.js +38 -0
  88. package/dist/packages/pagination/pagination.js +20 -20
  89. package/dist/packages/pagination/pagination.js.map +3 -3
  90. package/dist/packages/pagination/pagination.react.stories.d.ts +1 -1
  91. package/dist/packages/pagination/pagination.test.js +18 -0
  92. package/dist/packages/pill/pill.hydration.test.d.ts +1 -0
  93. package/dist/packages/pill/pill.hydration.test.js +32 -0
  94. package/dist/packages/pill/pill.js +5 -5
  95. package/dist/packages/pill/pill.js.map +3 -3
  96. package/dist/packages/radio/radio.a11y.test.js +15 -6
  97. package/dist/packages/radio/radio.d.ts +33 -1
  98. package/dist/packages/radio/radio.hydration.test.d.ts +1 -0
  99. package/dist/packages/radio/radio.hydration.test.js +29 -0
  100. package/dist/packages/radio/radio.js +7 -7
  101. package/dist/packages/radio/radio.js.map +3 -3
  102. package/dist/packages/radio/radio.test.js +22 -15
  103. package/dist/packages/radio-group/radio-group.a11y.test.js +4 -0
  104. package/dist/packages/radio-group/radio-group.hydration.test.d.ts +2 -0
  105. package/dist/packages/radio-group/radio-group.hydration.test.js +32 -0
  106. package/dist/packages/radio-group/radio-group.js +17 -17
  107. package/dist/packages/radio-group/radio-group.js.map +3 -3
  108. package/dist/packages/radio-group/radio-group.test.js +3 -2
  109. package/dist/packages/select/select.hydration.test.d.ts +1 -0
  110. package/dist/packages/select/select.hydration.test.js +37 -0
  111. package/dist/packages/select/select.js +13 -13
  112. package/dist/packages/select/select.js.map +3 -3
  113. package/dist/packages/select/select.react.stories.d.ts +1 -1
  114. package/dist/packages/slider/slider.hydration.test.d.ts +1 -0
  115. package/dist/packages/slider/slider.hydration.test.js +33 -0
  116. package/dist/packages/slider/slider.js +9 -9
  117. package/dist/packages/slider/slider.js.map +3 -3
  118. package/dist/packages/slider/slider.test.js +54 -0
  119. package/dist/packages/slider-thumb/slider-thumb.hydration.test.d.ts +1 -0
  120. package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +35 -0
  121. package/dist/packages/slider-thumb/slider-thumb.js +16 -16
  122. package/dist/packages/slider-thumb/slider-thumb.js.map +3 -3
  123. package/dist/packages/step/step.d.ts +1 -0
  124. package/dist/packages/step/step.hydration.test.d.ts +1 -0
  125. package/dist/packages/step/step.hydration.test.js +25 -0
  126. package/dist/packages/step/step.js +4 -4
  127. package/dist/packages/step/step.js.map +3 -3
  128. package/dist/packages/step-indicator/step-indicator.a11y.test.js +3 -1
  129. package/dist/packages/step-indicator/step-indicator.hydration.test.d.ts +1 -0
  130. package/dist/packages/step-indicator/step-indicator.hydration.test.js +25 -0
  131. package/dist/packages/switch/switch.a11y.test.js +23 -9
  132. package/dist/packages/switch/switch.d.ts +6 -0
  133. package/dist/packages/switch/switch.hydration.test.d.ts +1 -0
  134. package/dist/packages/switch/switch.hydration.test.js +54 -0
  135. package/dist/packages/switch/switch.js +7 -13
  136. package/dist/packages/switch/switch.js.map +3 -3
  137. package/dist/packages/switch/switch.test.js +0 -5
  138. package/dist/packages/tab/tab.d.ts +39 -2
  139. package/dist/packages/tab/tab.hydration.test.d.ts +1 -0
  140. package/dist/packages/tab/tab.hydration.test.js +25 -0
  141. package/dist/packages/tab/tab.js +22 -12
  142. package/dist/packages/tab/tab.js.map +3 -3
  143. package/dist/packages/tab-panel/tab-panel.d.ts +23 -1
  144. package/dist/packages/tab-panel/tab-panel.hydration.test.d.ts +1 -0
  145. package/dist/packages/tab-panel/tab-panel.hydration.test.js +21 -0
  146. package/dist/packages/tab-panel/tab-panel.js +18 -3
  147. package/dist/packages/tab-panel/tab-panel.js.map +3 -3
  148. package/dist/packages/tabs/tabs.a11y.test.js +59 -8
  149. package/dist/packages/tabs/tabs.hydration.test.d.ts +1 -0
  150. package/dist/packages/tabs/tabs.hydration.test.js +20 -0
  151. package/dist/packages/tabs/tabs.js +6 -6
  152. package/dist/packages/tabs/tabs.js.map +3 -3
  153. package/dist/packages/tabs/tabs.test.js +93 -1
  154. package/dist/packages/textarea/textarea.hydration.test.d.ts +1 -0
  155. package/dist/packages/textarea/textarea.hydration.test.js +43 -0
  156. package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
  157. package/dist/packages/textfield/textfield.hydration.test.d.ts +1 -0
  158. package/dist/packages/textfield/textfield.hydration.test.js +43 -0
  159. package/dist/packages/textfield/textfield.js +2 -2
  160. package/dist/packages/textfield/textfield.js.map +2 -2
  161. package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
  162. package/dist/packages/textfield/textfield.test.js +26 -0
  163. package/dist/packages/toast/toast.js +6 -6
  164. package/dist/packages/toast/toast.js.map +3 -3
  165. package/dist/packages/toast/toast.test.d.ts +1 -0
  166. package/dist/packages/toast/toast.test.js +58 -0
  167. package/dist/setup-tests.d.ts +2 -1
  168. package/dist/setup-tests.js +4 -3
  169. package/dist/tests/react-hydration.d.ts +20 -0
  170. package/dist/tests/react-hydration.js +138 -0
  171. package/dist/web-types.json +67 -63
  172. package/package.json +4 -3
@@ -0,0 +1 @@
1
+ import './toast.js';
@@ -0,0 +1,58 @@
1
+ import { html } from 'lit';
2
+ import { expect, test } from 'vitest';
3
+ import { render } from 'vitest-browser-lit';
4
+ import './toast.js';
5
+ test('renders the toast with text', async () => {
6
+ const component = html `<w-toast text="Test message" data-testid="toast"></w-toast>`;
7
+ const page = render(component);
8
+ await expect.element(page.getByTestId('toast')).toBeVisible();
9
+ await expect.element(page.getByText('Test message')).toBeVisible();
10
+ });
11
+ test('defaults to success type when no type attribute is set', async () => {
12
+ const component = html `<w-toast text="Success message" data-testid="toast"></w-toast>`;
13
+ const page = render(component);
14
+ const el = page.getByTestId('toast').element();
15
+ // The type attribute should not be reflected (to avoid hydration mismatch)
16
+ expect(el.hasAttribute('type')).toBe(false);
17
+ // But the success icon should be rendered (default behavior)
18
+ await expect
19
+ .poll(() => {
20
+ const icon = el.shadowRoot?.querySelector('w-icon');
21
+ return icon?.getAttribute('name');
22
+ })
23
+ .toBe('Success');
24
+ });
25
+ test('generates unique id when no id attribute is set', async () => {
26
+ const component = html `<w-toast text="Test message" data-testid="toast"></w-toast>`;
27
+ const page = render(component);
28
+ const el = page.getByTestId('toast').element();
29
+ // An id should be generated
30
+ expect(el.id).toBeTruthy();
31
+ expect(el.id.length).toBeGreaterThan(0);
32
+ });
33
+ test('uses specified type when type attribute is set', async () => {
34
+ const component = html `<w-toast text="Warning message" type="warning" data-testid="toast"></w-toast>`;
35
+ const page = render(component);
36
+ const el = page.getByTestId('toast').element();
37
+ // The type attribute should be reflected
38
+ expect(el.getAttribute('type')).toBe('warning');
39
+ // And the warning icon should be rendered
40
+ await expect
41
+ .poll(() => {
42
+ const icon = el.shadowRoot?.querySelector('w-icon');
43
+ return icon?.getAttribute('name');
44
+ })
45
+ .toBe('Warning');
46
+ });
47
+ test('renders error type correctly', async () => {
48
+ const component = html `<w-toast text="Error message" type="error" data-testid="toast"></w-toast>`;
49
+ const page = render(component);
50
+ const el = page.getByTestId('toast').element();
51
+ // The error icon should be rendered
52
+ await expect
53
+ .poll(() => {
54
+ const icon = el.shadowRoot?.querySelector('w-icon');
55
+ return icon?.getAttribute('name');
56
+ })
57
+ .toBe('Error');
58
+ });
@@ -1,6 +1,7 @@
1
1
  import 'vitest-browser-lit';
2
+ import type { RunOptions } from 'axe-core';
2
3
  interface AxeMatchers {
3
- toHaveNoAxeViolations(): Promise<void>;
4
+ toHaveNoAxeViolations(options?: RunOptions): Promise<void>;
4
5
  }
5
6
  declare module 'vitest' {
6
7
  interface Assertion extends AxeMatchers {
@@ -17,12 +17,13 @@ function formatViolations(violations) {
17
17
  })
18
18
  .join('\n\n');
19
19
  }
20
- async function runAxe(container = document.body) {
20
+ async function runAxe(container = document.body, options = {}) {
21
21
  return axe.run(container, {
22
22
  runOnly: {
23
23
  type: 'tag',
24
24
  values: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'],
25
25
  },
26
+ ...options,
26
27
  });
27
28
  }
28
29
  function resolveAxeContainer(received) {
@@ -54,9 +55,9 @@ function toHaveNoViolations(results) {
54
55
  };
55
56
  }
56
57
  expect.extend({
57
- async toHaveNoAxeViolations(received) {
58
+ async toHaveNoAxeViolations(received, options) {
58
59
  const container = resolveAxeContainer(received);
59
- const results = await runAxe(container);
60
+ const results = await runAxe(container, options);
60
61
  return toHaveNoViolations(results);
61
62
  },
62
63
  });
@@ -0,0 +1,20 @@
1
+ declare global {
2
+ interface Window {
3
+ __HYDRATION_WARNINGS__: string[];
4
+ }
5
+ }
6
+ export declare function setupHydrationWarningCapture(): void;
7
+ /**
8
+ * Tests that a component hydrates without warnings.
9
+ * Takes tag name and props, generates both SSR HTML and React element from them.
10
+ */
11
+ export declare function testHydration(tagName: string, props?: Record<string, unknown>): Promise<string[]>;
12
+ /**
13
+ * Tests hydration for parent/child component structures.
14
+ * Takes parent tag, props, and children HTML string.
15
+ *
16
+ * This properly includes children in the React tree so that React can detect
17
+ * hydration mismatches when components modify their light DOM children
18
+ * (e.g., adding classes, moving children to shadow DOM).
19
+ */
20
+ export declare function testHydrationWithChildren(tagName: string, props: Record<string, unknown>, childrenHtml: string): Promise<string[]>;
@@ -0,0 +1,138 @@
1
+ import React from 'react';
2
+ import { hydrateRoot } from 'react-dom/client';
3
+ export function setupHydrationWarningCapture() {
4
+ window.__HYDRATION_WARNINGS__ = [];
5
+ const originalError = console.error;
6
+ console.error = (...args) => {
7
+ const msg = args.map((a) => (typeof a === 'string' ? a : String(a))).join(' ');
8
+ if (msg.includes('Hydration') ||
9
+ msg.includes('hydrat') ||
10
+ msg.includes('did not match') ||
11
+ msg.includes('server rendered HTML') ||
12
+ msg.includes('Text content does not match') ||
13
+ msg.includes('Expected server HTML')) {
14
+ window.__HYDRATION_WARNINGS__.push(msg);
15
+ }
16
+ originalError.apply(console, args);
17
+ };
18
+ }
19
+ /**
20
+ * Converts props to HTML attributes string
21
+ */
22
+ function propsToHtml(props) {
23
+ return Object.entries(props)
24
+ .map(([key, value]) => {
25
+ if (value === true)
26
+ return key;
27
+ if (value === false || value === undefined || value === null)
28
+ return '';
29
+ return `${key}="${value}"`;
30
+ })
31
+ .filter(Boolean)
32
+ .join(' ');
33
+ }
34
+ /**
35
+ * Converts a DOM node to a React element.
36
+ * Used to include children in the React tree for proper hydration testing.
37
+ */
38
+ function nodeToReact(node) {
39
+ if (node.nodeType === Node.TEXT_NODE) {
40
+ return node.textContent;
41
+ }
42
+ if (node.nodeType === Node.ELEMENT_NODE) {
43
+ const el = node;
44
+ const props = {};
45
+ for (const attr of el.attributes) {
46
+ // Convert HTML attributes to React props
47
+ let name = attr.name;
48
+ if (name === 'class')
49
+ name = 'className';
50
+ if (name === 'for')
51
+ name = 'htmlFor';
52
+ props[name] = attr.value;
53
+ }
54
+ const children = Array.from(el.childNodes).map(nodeToReact).filter(Boolean);
55
+ return React.createElement(el.tagName.toLowerCase(), props, ...children);
56
+ }
57
+ return null;
58
+ }
59
+ /**
60
+ * Converts an HTML string to an array of React elements.
61
+ */
62
+ function htmlToReactElements(html) {
63
+ const template = document.createElement('template');
64
+ template.innerHTML = html;
65
+ return Array.from(template.content.childNodes)
66
+ .map(nodeToReact)
67
+ .filter((node) => node !== null && (typeof node !== 'string' || node.trim()));
68
+ }
69
+ /**
70
+ * Tests that a component hydrates without warnings.
71
+ * Takes tag name and props, generates both SSR HTML and React element from them.
72
+ */
73
+ export async function testHydration(tagName, props = {}) {
74
+ const container = document.createElement('div');
75
+ container.id = 'hydration-test-root';
76
+ document.body.appendChild(container);
77
+ try {
78
+ // Generate SSR HTML from props
79
+ const attrs = propsToHtml(props);
80
+ const ssrHtml = `<${tagName}${attrs ? ` ${attrs}` : ''}></${tagName}>`;
81
+ container.innerHTML = ssrHtml;
82
+ // Create React element from same props and hydrate
83
+ // Use onRecoverableError to capture hydration errors (React 19+)
84
+ const element = React.createElement(tagName, props);
85
+ hydrateRoot(container, element, {
86
+ onRecoverableError: (error) => {
87
+ const msg = error instanceof Error ? error.message : String(error);
88
+ if (msg.includes('Hydration') || msg.includes('hydrat') || msg.includes('did not match')) {
89
+ window.__HYDRATION_WARNINGS__.push(msg);
90
+ }
91
+ },
92
+ });
93
+ // Wait for hydration, custom element upgrade, and async callbacks
94
+ await new Promise((resolve) => setTimeout(resolve, 200));
95
+ return window.__HYDRATION_WARNINGS__;
96
+ }
97
+ finally {
98
+ document.body.removeChild(container);
99
+ }
100
+ }
101
+ /**
102
+ * Tests hydration for parent/child component structures.
103
+ * Takes parent tag, props, and children HTML string.
104
+ *
105
+ * This properly includes children in the React tree so that React can detect
106
+ * hydration mismatches when components modify their light DOM children
107
+ * (e.g., adding classes, moving children to shadow DOM).
108
+ */
109
+ export async function testHydrationWithChildren(tagName, props, childrenHtml) {
110
+ const container = document.createElement('div');
111
+ container.id = 'hydration-test-root';
112
+ document.body.appendChild(container);
113
+ try {
114
+ // Generate SSR HTML from props with children
115
+ const attrs = propsToHtml(props);
116
+ const ssrHtml = `<${tagName}${attrs ? ` ${attrs}` : ''}>${childrenHtml}</${tagName}>`;
117
+ container.innerHTML = ssrHtml;
118
+ // Convert children HTML to React elements so they're part of React's tree.
119
+ // This allows React to detect mismatches when components modify children.
120
+ const reactChildren = htmlToReactElements(childrenHtml);
121
+ const element = React.createElement(tagName, props, ...reactChildren);
122
+ // Use onRecoverableError to capture hydration errors (React 19+)
123
+ hydrateRoot(container, element, {
124
+ onRecoverableError: (error) => {
125
+ const msg = error instanceof Error ? error.message : String(error);
126
+ if (msg.includes('Hydration') || msg.includes('hydrat') || msg.includes('did not match')) {
127
+ window.__HYDRATION_WARNINGS__.push(msg);
128
+ }
129
+ },
130
+ });
131
+ // Wait for hydration, custom element upgrade, and async callbacks
132
+ await new Promise((resolve) => setTimeout(resolve, 200));
133
+ return window.__HYDRATION_WARNINGS__;
134
+ }
135
+ finally {
136
+ document.body.removeChild(container);
137
+ }
138
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@warp-ds/elements",
4
- "version": "2.8.1",
4
+ "version": "2.8.2-next.2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -14,20 +14,17 @@
14
14
  {
15
15
  "name": "name",
16
16
  "description": "Icon filename (without .svg)",
17
- "value": { "type": "string", "default": "''" }
17
+ "value": { "type": "string" }
18
18
  },
19
19
  {
20
20
  "name": "size",
21
21
  "description": "Size: small, medium, large or pixel value (e.g. \"32px\")",
22
- "value": {
23
- "type": "'small' | 'medium' | 'large' | string",
24
- "default": "'medium'"
25
- }
22
+ "value": { "type": "'small' | 'medium' | 'large' | string" }
26
23
  },
27
24
  {
28
25
  "name": "locale",
29
26
  "description": "Locale used in CDN URL",
30
- "value": { "type": "string", "default": "'en'" }
27
+ "value": { "type": "string" }
31
28
  }
32
29
  ],
33
30
  "events": [],
@@ -97,14 +94,10 @@
97
94
  {
98
95
  "name": "variant",
99
96
  "value": {
100
- "type": "'negative' | 'positive' | 'warning' | 'info'",
101
- "default": "'info'"
97
+ "type": "'negative' | 'positive' | 'warning' | 'info'"
102
98
  }
103
99
  },
104
- {
105
- "name": "show",
106
- "value": { "type": "boolean", "default": "false" }
107
- },
100
+ { "name": "show", "value": { "type": "boolean" } },
108
101
  {
109
102
  "name": "role",
110
103
  "value": { "type": "string", "default": "'alert'" }
@@ -135,8 +128,7 @@
135
128
  {
136
129
  "name": "variant",
137
130
  "value": {
138
- "type": "'negative' | 'primary' | 'secondary' | 'negativeQuiet' | 'utility' | 'quiet' | 'utilityQuiet' | 'overlay' | 'overlayInverted' | 'overlayQuiet' | 'overlayInvertedQuiet'",
139
- "default": "'secondary'"
131
+ "type": "'negative' | 'primary' | 'secondary' | 'negativeQuiet' | 'utility' | 'quiet' | 'utilityQuiet' | 'overlay' | 'overlayInverted' | 'overlayQuiet' | 'overlayInvertedQuiet'"
140
132
  }
141
133
  },
142
134
  {
@@ -180,10 +172,7 @@
180
172
  "attributes": [
181
173
  {
182
174
  "name": "type",
183
- "value": {
184
- "type": "'button' | 'submit' | 'reset'",
185
- "default": "'button'"
186
- }
175
+ "value": { "type": "'button' | 'submit' | 'reset'" }
187
176
  },
188
177
  {
189
178
  "name": "autofocus",
@@ -192,8 +181,7 @@
192
181
  {
193
182
  "name": "variant",
194
183
  "value": {
195
- "type": "'negative' | 'primary' | 'secondary' | 'utility' | 'pill' | 'link'",
196
- "default": "'secondary'"
184
+ "type": "'negative' | 'primary' | 'secondary' | 'utility' | 'pill' | 'link'"
197
185
  }
198
186
  },
199
187
  {
@@ -331,8 +319,7 @@
331
319
  {
332
320
  "name": "variant",
333
321
  "value": {
334
- "type": "'neutral' | 'info' | 'positive' | 'warning' | 'negative' | 'disabled' | 'price' | 'sponsored'",
335
- "default": "'neutral'"
322
+ "type": "'neutral' | 'info' | 'positive' | 'warning' | 'negative' | 'disabled' | 'price' | 'sponsored'"
336
323
  }
337
324
  },
338
325
  {
@@ -396,14 +383,9 @@
396
383
  "name": "w-breadcrumbs",
397
384
  "description": "Breadcrumbs show the navigation structure for the current location.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-breadcrumbs--docs)\n---\n",
398
385
  "doc-url": "",
399
- "attributes": [
400
- { "name": "aria-label", "value": { "type": "string" } }
401
- ],
386
+ "attributes": [],
402
387
  "events": [],
403
- "js": {
404
- "properties": [{ "name": "ariaLabel", "type": "string" }],
405
- "events": []
406
- }
388
+ "js": { "properties": [{ "name": "ariaLabel" }], "events": [] }
407
389
  },
408
390
  {
409
391
  "name": "w-card",
@@ -442,7 +424,7 @@
442
424
  {
443
425
  "name": "name",
444
426
  "description": "The name of the checkbox, submitted as a name/value pair with form data.",
445
- "value": { "type": "string", "default": "''" }
427
+ "value": { "type": "string | undefined" }
446
428
  },
447
429
  {
448
430
  "name": "value",
@@ -482,7 +464,7 @@
482
464
  {
483
465
  "name": "name",
484
466
  "description": "The name of the checkbox, submitted as a name/value pair with form data.",
485
- "type": "string"
467
+ "type": "string | undefined"
486
468
  },
487
469
  {
488
470
  "name": "value",
@@ -514,6 +496,11 @@
514
496
  "description": "Draws the checkbox in an invalid state.",
515
497
  "type": "boolean"
516
498
  },
499
+ {
500
+ "name": "_computedInvalid",
501
+ "description": "Computed invalid state: combines own invalid with group invalid",
502
+ "type": "boolean"
503
+ },
517
504
  {
518
505
  "name": "validationMessage",
519
506
  "description": "Returns the validation message if the checkbox is invalid, otherwise an empty string",
@@ -671,7 +658,7 @@
671
658
  {
672
659
  "name": "autocomplete",
673
660
  "description": "Autocomplete attribute for the input field",
674
- "value": { "type": "string | undefined", "default": "'off'" }
661
+ "value": { "type": "string | undefined" }
675
662
  }
676
663
  ],
677
664
  "events": [],
@@ -997,12 +984,12 @@
997
984
  {
998
985
  "name": "selected-page",
999
986
  "description": "Currently selected page (1-based index, clamped to valid range)",
1000
- "value": { "type": "number", "default": "1" }
987
+ "value": { "type": "number" }
1001
988
  },
1002
989
  {
1003
990
  "name": "page-count",
1004
991
  "description": "Total number of pages (minimum 1)",
1005
- "value": { "type": "number", "default": "1" }
992
+ "value": { "type": "number" }
1006
993
  }
1007
994
  ],
1008
995
  "events": [],
@@ -1029,14 +1016,8 @@
1029
1016
  "attributes": [
1030
1017
  { "name": "base-url", "value": { "type": "string" } },
1031
1018
  { "name": "pages", "value": { "type": "number" } },
1032
- {
1033
- "name": "current-page",
1034
- "value": { "type": "number", "default": "1" }
1035
- },
1036
- {
1037
- "name": "visible-pages",
1038
- "value": { "type": "number", "default": "7" }
1039
- }
1019
+ { "name": "current-page", "value": { "type": "number" } },
1020
+ { "name": "visible-pages", "value": { "type": "number" } }
1040
1021
  ],
1041
1022
  "events": [
1042
1023
  {
@@ -1108,7 +1089,7 @@
1108
1089
  {
1109
1090
  "name": "name",
1110
1091
  "description": "The name of the radio, submitted as a name/value pair with form data.",
1111
- "value": { "type": "string", "default": "''" }
1092
+ "value": { "type": "string" }
1112
1093
  },
1113
1094
  {
1114
1095
  "name": "value",
@@ -1169,6 +1150,11 @@
1169
1150
  "description": "Draws the radio in an invalid state.",
1170
1151
  "type": "boolean"
1171
1152
  },
1153
+ {
1154
+ "name": "tabIndex",
1155
+ "description": "Override tabIndex setter to set _groupTabIndex (for backwards compatibility).\nRadio-group should use _groupTabIndex directly for clarity.",
1156
+ "type": "number"
1157
+ },
1172
1158
  {
1173
1159
  "name": "validationMessage",
1174
1160
  "description": "Returns the validation message if the radio is invalid, otherwise an empty string",
@@ -1178,6 +1164,11 @@
1178
1164
  "name": "validity",
1179
1165
  "description": "Returns the validity state of the radio",
1180
1166
  "type": "ValidityState"
1167
+ },
1168
+ {
1169
+ "name": "_standaloneTabIndex",
1170
+ "description": "Internal tabindex for standalone radios (not in a group).\nNon-reflecting to avoid DOM changes during hydration.",
1171
+ "type": "number | undefined"
1181
1172
  }
1182
1173
  ],
1183
1174
  "events": []
@@ -1402,10 +1393,7 @@
1402
1393
  "name": "required",
1403
1394
  "value": { "type": "boolean", "default": "false" }
1404
1395
  },
1405
- {
1406
- "name": "type",
1407
- "value": { "type": "string", "default": "'text'" }
1408
- },
1396
+ { "name": "type", "value": { "type": "string" } },
1409
1397
  { "name": "value", "value": { "type": "string" } },
1410
1398
  { "name": "name", "value": { "type": "string" } },
1411
1399
  { "name": "step", "value": { "type": "number" } },
@@ -1502,11 +1490,8 @@
1502
1490
  "description": "Whether or not to allow values outside the range such as \"Before 1950\" and \"2025+\".",
1503
1491
  "value": { "type": "boolean", "default": "false" }
1504
1492
  },
1505
- { "name": "error", "value": { "type": "string", "default": "''" } },
1506
- {
1507
- "name": "help-text",
1508
- "value": { "type": "string", "default": "''" }
1509
- },
1493
+ { "name": "error", "value": { "type": "string" } },
1494
+ { "name": "help-text", "value": { "type": "string" } },
1510
1495
  {
1511
1496
  "name": "invalid",
1512
1497
  "value": { "type": "boolean", "default": "false" }
@@ -1527,7 +1512,7 @@
1527
1512
  {
1528
1513
  "name": "suffix",
1529
1514
  "description": "Suffix used in text input fields and for the min and max values of the slider.",
1530
- "value": { "type": "string", "default": "''" }
1515
+ "value": { "type": "string" }
1531
1516
  },
1532
1517
  {
1533
1518
  "name": "hidden-textfield",
@@ -1670,8 +1655,8 @@
1670
1655
  "description": "\n---\n\n\n### **Events:**\n - **change**",
1671
1656
  "doc-url": "",
1672
1657
  "attributes": [
1673
- { "name": "name", "value": { "type": "string", "default": "''" } },
1674
- { "name": "value", "value": { "type": "string", "default": "''" } },
1658
+ { "name": "name", "value": { "type": "string" } },
1659
+ { "name": "value", "value": { "type": "string" } },
1675
1660
  {
1676
1661
  "name": "checked",
1677
1662
  "value": { "type": "boolean", "default": "false" }
@@ -1697,13 +1682,16 @@
1697
1682
  "description": "Individual tab component used within w-tabs container.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/tabs--docs)\n---\n",
1698
1683
  "doc-url": "",
1699
1684
  "attributes": [
1700
- { "name": "id", "value": { "type": "string", "default": "''" } },
1701
- { "name": "for", "value": { "type": "string", "default": "''" } },
1685
+ { "name": "id", "value": { "type": "string" } },
1686
+ { "name": "for", "value": { "type": "string" } },
1687
+ {
1688
+ "name": "aria-controls",
1689
+ "value": { "type": "string | undefined" }
1690
+ },
1702
1691
  {
1703
1692
  "name": "aria-selected",
1704
1693
  "value": { "type": "'true' | 'false'" }
1705
1694
  },
1706
- { "name": "tabindex", "value": { "type": "number" } },
1707
1695
  {
1708
1696
  "name": "active",
1709
1697
  "value": { "type": "boolean", "default": "false" }
@@ -1718,8 +1706,17 @@
1718
1706
  "properties": [
1719
1707
  { "name": "id", "type": "string" },
1720
1708
  { "name": "for", "type": "string" },
1709
+ {
1710
+ "name": "tabIndex",
1711
+ "description": "Override tabIndex setter to set _parentTabIndex (for backwards compatibility).",
1712
+ "type": "number"
1713
+ },
1714
+ {
1715
+ "name": "_computedAriaSelected",
1716
+ "description": "Computed aria-selected: prefers parent-managed, falls back to own property",
1717
+ "type": "'true' | 'false' | undefined"
1718
+ },
1721
1719
  { "name": "ariaSelected", "type": "'true' | 'false'" },
1722
- { "name": "tabIndex", "type": "number" },
1723
1720
  { "name": "active", "type": "boolean" },
1724
1721
  { "name": "over", "type": "boolean" }
1725
1722
  ],
@@ -1732,13 +1729,20 @@
1732
1729
  "doc-url": "",
1733
1730
  "attributes": [
1734
1731
  {
1735
- "name": "hidden",
1736
- "value": { "type": "boolean", "default": "true" }
1732
+ "name": "active",
1733
+ "description": "Whether this panel is active (visible).\nSet by parent w-tabs via the _parentActive property.",
1734
+ "value": { "type": "boolean" }
1737
1735
  }
1738
1736
  ],
1739
1737
  "events": [],
1740
1738
  "js": {
1741
- "properties": [{ "name": "hidden", "type": "boolean" }],
1739
+ "properties": [
1740
+ {
1741
+ "name": "active",
1742
+ "description": "Whether this panel is active (visible).\nSet by parent w-tabs via the _parentActive property.",
1743
+ "type": "boolean"
1744
+ }
1745
+ ],
1742
1746
  "events": []
1743
1747
  }
1744
1748
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-ds/elements",
3
3
  "type": "module",
4
- "version": "2.8.2-next.1",
4
+ "version": "2.8.2-next.3",
5
5
  "packageManager": "pnpm@10.30.3",
6
6
  "description": "Custom elements for Warp",
7
7
  "exports": {
@@ -365,7 +365,7 @@
365
365
  "rimraf": "6.0.1",
366
366
  "rollup": "^4.52.3",
367
367
  "scroll-doctor": "2.0.2",
368
- "semantic-release": "24.0.0",
368
+ "semantic-release": "25.0.3",
369
369
  "storybook": "^9.1.4",
370
370
  "tslib": "^2.8.1",
371
371
  "typescript": "5.5.3",
@@ -381,7 +381,8 @@
381
381
  "lit": "3.x"
382
382
  },
383
383
  "publishConfig": {
384
- "access": "public"
384
+ "access": "public",
385
+ "provenance": true
385
386
  },
386
387
  "eik": {
387
388
  "files": "eik",