@warp-ds/elements 2.8.2-next.2 → 2.8.2-next.4
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.
- package/dist/custom-elements.json +166 -69
- package/dist/index.d.ts +63 -11
- package/dist/packages/affix/affix.hydration.test.d.ts +1 -0
- package/dist/packages/affix/affix.hydration.test.js +33 -0
- package/dist/packages/affix/affix.js +3 -3
- package/dist/packages/affix/affix.js.map +3 -3
- package/dist/packages/alert/alert.hydration.test.d.ts +1 -0
- package/dist/packages/alert/alert.hydration.test.js +47 -0
- package/dist/packages/alert/alert.js +5 -5
- package/dist/packages/alert/alert.js.map +3 -3
- package/dist/packages/attention/attention.hydration.test.d.ts +1 -0
- package/dist/packages/attention/attention.hydration.test.js +66 -0
- package/dist/packages/attention/attention.js +11 -11
- package/dist/packages/attention/attention.js.map +3 -3
- package/dist/packages/badge/badge.hydration.test.d.ts +1 -0
- package/dist/packages/badge/badge.hydration.test.js +50 -0
- package/dist/packages/box/box.hydration.test.d.ts +1 -0
- package/dist/packages/box/box.hydration.test.js +37 -0
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.d.ts +1 -0
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +141 -0
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +2 -2
- package/dist/packages/button/button.hydration.test.d.ts +1 -0
- package/dist/packages/button/button.hydration.test.js +43 -0
- package/dist/packages/button/button.js +3 -3
- package/dist/packages/button/button.js.map +3 -3
- package/dist/packages/button/button.react.stories.d.ts +1 -1
- package/dist/packages/card/card.hydration.test.d.ts +1 -0
- package/dist/packages/card/card.hydration.test.js +38 -0
- package/dist/packages/card/card.react.stories.d.ts +1 -1
- package/dist/packages/checkbox/checkbox.d.ts +17 -1
- package/dist/packages/checkbox/checkbox.hydration.test.d.ts +1 -0
- package/dist/packages/checkbox/checkbox.hydration.test.js +47 -0
- package/dist/packages/checkbox/checkbox.js +20 -19
- package/dist/packages/checkbox/checkbox.js.map +3 -3
- package/dist/packages/checkbox/styles.js +10 -9
- package/dist/packages/checkbox-group/checkbox-group.d.ts +7 -0
- package/dist/packages/checkbox-group/checkbox-group.hydration.test.d.ts +2 -0
- package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +40 -0
- package/dist/packages/checkbox-group/checkbox-group.js +14 -14
- package/dist/packages/checkbox-group/checkbox-group.js.map +3 -3
- package/dist/packages/checkbox-group/checkbox-group.test.js +10 -0
- package/dist/packages/combobox/combobox.hydration.test.d.ts +1 -0
- package/dist/packages/combobox/combobox.hydration.test.js +43 -0
- package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.hydration.test.d.ts +1 -0
- package/dist/packages/datepicker/datepicker.hydration.test.js +40 -0
- package/dist/packages/datepicker/datepicker.js +1 -1
- package/dist/packages/datepicker/datepicker.js.map +3 -3
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
- package/dist/packages/expandable/expandable.hydration.test.d.ts +1 -0
- package/dist/packages/expandable/expandable.hydration.test.js +47 -0
- package/dist/packages/expandable/expandable.js +3 -3
- package/dist/packages/expandable/expandable.js.map +3 -3
- package/dist/packages/icon/icon.hydration.test.d.ts +1 -0
- package/dist/packages/icon/icon.hydration.test.js +47 -0
- package/dist/packages/icon/icon.js +2 -2
- package/dist/packages/icon/icon.js.map +3 -3
- package/dist/packages/link/link.hydration.test.d.ts +1 -0
- package/dist/packages/link/link.hydration.test.js +54 -0
- package/dist/packages/modal/modal.hydration.test.d.ts +1 -0
- package/dist/packages/modal/modal.hydration.test.js +25 -0
- package/dist/packages/modal-header/modal-header.js +6 -6
- package/dist/packages/modal-header/modal-header.js.map +3 -3
- package/dist/packages/page-indicator/page-indicator.hydration.test.d.ts +1 -0
- package/dist/packages/page-indicator/page-indicator.hydration.test.js +41 -0
- package/dist/packages/pagination/locales/da/messages.mjs +1 -1
- package/dist/packages/pagination/locales/en/messages.mjs +1 -1
- package/dist/packages/pagination/locales/fi/messages.mjs +1 -1
- package/dist/packages/pagination/locales/nb/messages.mjs +1 -1
- package/dist/packages/pagination/locales/sv/messages.mjs +1 -1
- package/dist/packages/pagination/pagination.hydration.test.d.ts +1 -0
- package/dist/packages/pagination/pagination.hydration.test.js +38 -0
- package/dist/packages/pagination/pagination.js +13 -13
- package/dist/packages/pagination/pagination.js.map +3 -3
- package/dist/packages/pill/pill.hydration.test.d.ts +1 -0
- package/dist/packages/pill/pill.hydration.test.js +32 -0
- package/dist/packages/pill/pill.js +1 -1
- package/dist/packages/pill/pill.js.map +3 -3
- package/dist/packages/radio/radio.d.ts +33 -1
- package/dist/packages/radio/radio.hydration.test.d.ts +1 -0
- package/dist/packages/radio/radio.hydration.test.js +29 -0
- package/dist/packages/radio/radio.js +7 -7
- package/dist/packages/radio/radio.js.map +3 -3
- package/dist/packages/radio/radio.test.js +15 -8
- package/dist/packages/radio-group/locales/da/messages.mjs +1 -1
- package/dist/packages/radio-group/locales/en/messages.mjs +1 -1
- package/dist/packages/radio-group/locales/fi/messages.mjs +1 -1
- package/dist/packages/radio-group/locales/nb/messages.mjs +1 -1
- package/dist/packages/radio-group/locales/sv/messages.mjs +1 -1
- package/dist/packages/radio-group/radio-group.a11y.test.js +4 -0
- package/dist/packages/radio-group/radio-group.hydration.test.d.ts +2 -0
- package/dist/packages/radio-group/radio-group.hydration.test.js +32 -0
- package/dist/packages/radio-group/radio-group.js +17 -17
- package/dist/packages/radio-group/radio-group.js.map +3 -3
- package/dist/packages/select/select.hydration.test.d.ts +1 -0
- package/dist/packages/select/select.hydration.test.js +37 -0
- package/dist/packages/select/select.js +1 -1
- package/dist/packages/select/select.js.map +3 -3
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/slider/slider.hydration.test.d.ts +1 -0
- package/dist/packages/slider/slider.hydration.test.js +33 -0
- package/dist/packages/slider/slider.js +9 -9
- package/dist/packages/slider/slider.js.map +3 -3
- package/dist/packages/slider/slider.test.js +13 -0
- package/dist/packages/slider-thumb/slider-thumb.hydration.test.d.ts +1 -0
- package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +35 -0
- package/dist/packages/slider-thumb/slider-thumb.js +16 -16
- package/dist/packages/slider-thumb/slider-thumb.js.map +3 -3
- package/dist/packages/step/step.hydration.test.d.ts +1 -0
- package/dist/packages/step/step.hydration.test.js +25 -0
- package/dist/packages/step/step.js +1 -1
- package/dist/packages/step/step.js.map +3 -3
- package/dist/packages/step-indicator/step-indicator.hydration.test.d.ts +1 -0
- package/dist/packages/step-indicator/step-indicator.hydration.test.js +25 -0
- package/dist/packages/switch/switch.a11y.test.js +13 -3
- package/dist/packages/switch/switch.d.ts +6 -0
- package/dist/packages/switch/switch.hydration.test.d.ts +1 -0
- package/dist/packages/switch/switch.hydration.test.js +54 -0
- package/dist/packages/switch/switch.js +7 -13
- package/dist/packages/switch/switch.js.map +2 -2
- package/dist/packages/tab/tab.d.ts +37 -2
- package/dist/packages/tab/tab.hydration.test.d.ts +1 -0
- package/dist/packages/tab/tab.hydration.test.js +25 -0
- package/dist/packages/tab/tab.js +22 -12
- package/dist/packages/tab/tab.js.map +3 -3
- package/dist/packages/tab-panel/tab-panel.d.ts +21 -0
- package/dist/packages/tab-panel/tab-panel.hydration.test.d.ts +1 -0
- package/dist/packages/tab-panel/tab-panel.hydration.test.js +21 -0
- package/dist/packages/tab-panel/tab-panel.js +16 -5
- package/dist/packages/tab-panel/tab-panel.js.map +3 -3
- package/dist/packages/tabs/tabs.a11y.test.js +45 -3
- package/dist/packages/tabs/tabs.hydration.test.d.ts +1 -0
- package/dist/packages/tabs/tabs.hydration.test.js +20 -0
- package/dist/packages/tabs/tabs.js +6 -6
- package/dist/packages/tabs/tabs.js.map +3 -3
- package/dist/packages/tabs/tabs.test.js +52 -4
- package/dist/packages/textarea/textarea.hydration.test.d.ts +1 -0
- package/dist/packages/textarea/textarea.hydration.test.js +43 -0
- package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.hydration.test.d.ts +1 -0
- package/dist/packages/textfield/textfield.hydration.test.js +43 -0
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/packages/toast/toast.js +4 -4
- package/dist/packages/toast/toast.js.map +3 -3
- package/dist/setup-tests.d.ts +2 -1
- package/dist/setup-tests.js +4 -3
- package/dist/tests/react-hydration.d.ts +20 -0
- package/dist/tests/react-hydration.js +138 -0
- package/dist/web-types.json +59 -21
- package/package.json +1 -1
package/dist/setup-tests.d.ts
CHANGED
|
@@ -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 {
|
package/dist/setup-tests.js
CHANGED
|
@@ -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
|
+
}
|
package/dist/web-types.json
CHANGED
|
@@ -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.2-next.
|
|
4
|
+
"version": "2.8.2-next.3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"name": "name",
|
|
16
16
|
"description": "Icon filename (without .svg)",
|
|
17
|
-
"value": { "type": "string"
|
|
17
|
+
"value": { "type": "string" }
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "size",
|
|
@@ -181,8 +181,7 @@
|
|
|
181
181
|
{
|
|
182
182
|
"name": "variant",
|
|
183
183
|
"value": {
|
|
184
|
-
"type": "'negative' | 'primary' | 'secondary' | 'utility' | 'pill' | 'link'"
|
|
185
|
-
"default": "'secondary'"
|
|
184
|
+
"type": "'negative' | 'primary' | 'secondary' | 'utility' | 'pill' | 'link'"
|
|
186
185
|
}
|
|
187
186
|
},
|
|
188
187
|
{
|
|
@@ -425,7 +424,7 @@
|
|
|
425
424
|
{
|
|
426
425
|
"name": "name",
|
|
427
426
|
"description": "The name of the checkbox, submitted as a name/value pair with form data.",
|
|
428
|
-
"value": { "type": "string
|
|
427
|
+
"value": { "type": "string | undefined" }
|
|
429
428
|
},
|
|
430
429
|
{
|
|
431
430
|
"name": "value",
|
|
@@ -465,7 +464,7 @@
|
|
|
465
464
|
{
|
|
466
465
|
"name": "name",
|
|
467
466
|
"description": "The name of the checkbox, submitted as a name/value pair with form data.",
|
|
468
|
-
"type": "string"
|
|
467
|
+
"type": "string | undefined"
|
|
469
468
|
},
|
|
470
469
|
{
|
|
471
470
|
"name": "value",
|
|
@@ -497,6 +496,11 @@
|
|
|
497
496
|
"description": "Draws the checkbox in an invalid state.",
|
|
498
497
|
"type": "boolean"
|
|
499
498
|
},
|
|
499
|
+
{
|
|
500
|
+
"name": "_computedInvalid",
|
|
501
|
+
"description": "Computed invalid state: combines own invalid with group invalid",
|
|
502
|
+
"type": "boolean"
|
|
503
|
+
},
|
|
500
504
|
{
|
|
501
505
|
"name": "validationMessage",
|
|
502
506
|
"description": "Returns the validation message if the checkbox is invalid, otherwise an empty string",
|
|
@@ -1085,7 +1089,7 @@
|
|
|
1085
1089
|
{
|
|
1086
1090
|
"name": "name",
|
|
1087
1091
|
"description": "The name of the radio, submitted as a name/value pair with form data.",
|
|
1088
|
-
"value": { "type": "string"
|
|
1092
|
+
"value": { "type": "string" }
|
|
1089
1093
|
},
|
|
1090
1094
|
{
|
|
1091
1095
|
"name": "value",
|
|
@@ -1146,6 +1150,11 @@
|
|
|
1146
1150
|
"description": "Draws the radio in an invalid state.",
|
|
1147
1151
|
"type": "boolean"
|
|
1148
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
|
+
},
|
|
1149
1158
|
{
|
|
1150
1159
|
"name": "validationMessage",
|
|
1151
1160
|
"description": "Returns the validation message if the radio is invalid, otherwise an empty string",
|
|
@@ -1155,6 +1164,11 @@
|
|
|
1155
1164
|
"name": "validity",
|
|
1156
1165
|
"description": "Returns the validity state of the radio",
|
|
1157
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"
|
|
1158
1172
|
}
|
|
1159
1173
|
],
|
|
1160
1174
|
"events": []
|
|
@@ -1476,11 +1490,8 @@
|
|
|
1476
1490
|
"description": "Whether or not to allow values outside the range such as \"Before 1950\" and \"2025+\".",
|
|
1477
1491
|
"value": { "type": "boolean", "default": "false" }
|
|
1478
1492
|
},
|
|
1479
|
-
{ "name": "error", "value": { "type": "string"
|
|
1480
|
-
{
|
|
1481
|
-
"name": "help-text",
|
|
1482
|
-
"value": { "type": "string", "default": "''" }
|
|
1483
|
-
},
|
|
1493
|
+
{ "name": "error", "value": { "type": "string" } },
|
|
1494
|
+
{ "name": "help-text", "value": { "type": "string" } },
|
|
1484
1495
|
{
|
|
1485
1496
|
"name": "invalid",
|
|
1486
1497
|
"value": { "type": "boolean", "default": "false" }
|
|
@@ -1501,7 +1512,7 @@
|
|
|
1501
1512
|
{
|
|
1502
1513
|
"name": "suffix",
|
|
1503
1514
|
"description": "Suffix used in text input fields and for the min and max values of the slider.",
|
|
1504
|
-
"value": { "type": "string"
|
|
1515
|
+
"value": { "type": "string" }
|
|
1505
1516
|
},
|
|
1506
1517
|
{
|
|
1507
1518
|
"name": "hidden-textfield",
|
|
@@ -1644,8 +1655,8 @@
|
|
|
1644
1655
|
"description": "\n---\n\n\n### **Events:**\n - **change**",
|
|
1645
1656
|
"doc-url": "",
|
|
1646
1657
|
"attributes": [
|
|
1647
|
-
{ "name": "name", "value": { "type": "string"
|
|
1648
|
-
{ "name": "value", "value": { "type": "string"
|
|
1658
|
+
{ "name": "name", "value": { "type": "string" } },
|
|
1659
|
+
{ "name": "value", "value": { "type": "string" } },
|
|
1649
1660
|
{
|
|
1650
1661
|
"name": "checked",
|
|
1651
1662
|
"value": { "type": "boolean", "default": "false" }
|
|
@@ -1671,13 +1682,16 @@
|
|
|
1671
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",
|
|
1672
1683
|
"doc-url": "",
|
|
1673
1684
|
"attributes": [
|
|
1674
|
-
{ "name": "id", "value": { "type": "string"
|
|
1675
|
-
{ "name": "for", "value": { "type": "string"
|
|
1685
|
+
{ "name": "id", "value": { "type": "string" } },
|
|
1686
|
+
{ "name": "for", "value": { "type": "string" } },
|
|
1687
|
+
{
|
|
1688
|
+
"name": "aria-controls",
|
|
1689
|
+
"value": { "type": "string | undefined" }
|
|
1690
|
+
},
|
|
1676
1691
|
{
|
|
1677
1692
|
"name": "aria-selected",
|
|
1678
1693
|
"value": { "type": "'true' | 'false'" }
|
|
1679
1694
|
},
|
|
1680
|
-
{ "name": "tabindex", "value": { "type": "number" } },
|
|
1681
1695
|
{
|
|
1682
1696
|
"name": "active",
|
|
1683
1697
|
"value": { "type": "boolean", "default": "false" }
|
|
@@ -1692,8 +1706,17 @@
|
|
|
1692
1706
|
"properties": [
|
|
1693
1707
|
{ "name": "id", "type": "string" },
|
|
1694
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
|
+
},
|
|
1695
1719
|
{ "name": "ariaSelected", "type": "'true' | 'false'" },
|
|
1696
|
-
{ "name": "tabIndex", "type": "number" },
|
|
1697
1720
|
{ "name": "active", "type": "boolean" },
|
|
1698
1721
|
{ "name": "over", "type": "boolean" }
|
|
1699
1722
|
],
|
|
@@ -1704,9 +1727,24 @@
|
|
|
1704
1727
|
"name": "w-tab-panel",
|
|
1705
1728
|
"description": "Tab panel component that holds content for individual tabs.\nEach tab panel should have a name that matches a corresponding tab.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/tabs--docs)\n---\n",
|
|
1706
1729
|
"doc-url": "",
|
|
1707
|
-
"attributes": [
|
|
1730
|
+
"attributes": [
|
|
1731
|
+
{
|
|
1732
|
+
"name": "active",
|
|
1733
|
+
"description": "Whether this panel is active (visible).\nSet by parent w-tabs via the _parentActive property.",
|
|
1734
|
+
"value": { "type": "boolean" }
|
|
1735
|
+
}
|
|
1736
|
+
],
|
|
1708
1737
|
"events": [],
|
|
1709
|
-
"js": {
|
|
1738
|
+
"js": {
|
|
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
|
+
],
|
|
1746
|
+
"events": []
|
|
1747
|
+
}
|
|
1710
1748
|
},
|
|
1711
1749
|
{
|
|
1712
1750
|
"name": "w-tabs",
|