@warp-ds/elements 2.9.0 → 2.9.1-next.1
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 +18 -0
- package/dist/docs/box/accessibility.md +29 -0
- package/dist/docs/box/api.md +16 -11
- package/dist/docs/box/box.md +189 -11
- package/dist/docs/box/examples.md +98 -0
- package/dist/docs/box/usage.md +47 -0
- package/dist/index.d.ts +40 -20
- package/dist/packages/box/box.d.ts +15 -14
- package/dist/packages/box/box.js +6 -6
- package/dist/packages/box/box.js.map +4 -4
- package/dist/packages/box/box.react.stories.d.ts +1 -1
- package/dist/packages/box/box.stories.d.ts +1 -0
- package/dist/packages/box/box.stories.js +12 -5
- package/dist/web-types.json +35 -7
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { Box } from './react';
|
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: import("@lit/react").ReactWebComponent<import("./box").WarpBox, {}>;
|
|
7
|
-
render(args: Omit<React.HTMLAttributes<import("./box").WarpBox>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "info" | "neutral" | "_class" | "bleed" | "bordered"
|
|
7
|
+
render(args: Omit<React.HTMLAttributes<import("./box").WarpBox>, "form" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "resetFormControl" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "info" | "neutral" | "_class" | "bleed" | "bordered"> & {} & Partial<Omit<import("./box").WarpBox, keyof HTMLElement>> & React.RefAttributes<import("./box").WarpBox>): React.JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
10
10
|
export type Story = StoryObj<typeof Box>;
|
|
@@ -29,31 +29,38 @@ export const Default = {
|
|
|
29
29
|
bordered: false,
|
|
30
30
|
info: false,
|
|
31
31
|
neutral: false,
|
|
32
|
-
role: 'region',
|
|
33
32
|
},
|
|
34
33
|
};
|
|
35
34
|
export const Info = {
|
|
36
35
|
args: {
|
|
37
36
|
info: true,
|
|
38
|
-
role: 'region',
|
|
39
37
|
},
|
|
40
38
|
};
|
|
41
39
|
export const Neutral = {
|
|
42
40
|
args: {
|
|
43
41
|
neutral: true,
|
|
44
|
-
role: 'region',
|
|
45
42
|
},
|
|
46
43
|
};
|
|
47
44
|
export const Bordered = {
|
|
48
45
|
args: {
|
|
49
46
|
bordered: true,
|
|
50
|
-
role: 'region',
|
|
51
47
|
},
|
|
52
48
|
};
|
|
53
49
|
export const Bleed = {
|
|
54
50
|
args: {
|
|
55
51
|
bleed: true,
|
|
56
52
|
neutral: true,
|
|
57
|
-
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export const AccessibleRegion = {
|
|
56
|
+
args: {},
|
|
57
|
+
render: (args) => {
|
|
58
|
+
return html `
|
|
59
|
+
<w-box aria-labelledby="box-content">
|
|
60
|
+
<h3 id="box-content">Box Content</h3>
|
|
61
|
+
<p>Inspect this box in the accessibility tree to see that it is treated as a region.</p>
|
|
62
|
+
<p>If aria-labelled by is not used, the box will not be treated as a region.</p>
|
|
63
|
+
</w-box>
|
|
64
|
+
`;
|
|
58
65
|
},
|
|
59
66
|
};
|
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.9.0
|
|
4
|
+
"version": "2.9.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -666,30 +666,58 @@
|
|
|
666
666
|
"attributes": [
|
|
667
667
|
{
|
|
668
668
|
"name": "bleed",
|
|
669
|
+
"description": "Makes the box bleed to the container edge.\nExtends the box into the horizontal gutter on narrow screens. Adds negative horizontal margins and square side corners below the small breakpoint, then restores the normal margins and rounded corners from the small breakpoint and up.",
|
|
669
670
|
"value": { "type": "boolean", "default": "false" }
|
|
670
671
|
},
|
|
671
672
|
{
|
|
672
673
|
"name": "bordered",
|
|
674
|
+
"description": "Shows the box as a bordered surface.\nUse this when the content needs a clear visual boundary from the surrounding page.",
|
|
673
675
|
"value": { "type": "boolean", "default": "false" }
|
|
674
676
|
},
|
|
675
677
|
{
|
|
676
678
|
"name": "info",
|
|
679
|
+
"description": "Shows the box with information styling.\nUse this for supporting informational content that should be visually separated from the surrounding page.",
|
|
677
680
|
"value": { "type": "boolean", "default": "false" }
|
|
678
681
|
},
|
|
679
682
|
{
|
|
680
683
|
"name": "neutral",
|
|
684
|
+
"description": "Shows the box with neutral styling.\nUse this for quiet grouped content that needs a background without strong emphasis.",
|
|
681
685
|
"value": { "type": "boolean", "default": "false" }
|
|
682
686
|
},
|
|
683
|
-
{
|
|
687
|
+
{
|
|
688
|
+
"name": "role",
|
|
689
|
+
"description": "ARIA role for the box wrapper.\nDefaults to a role of `region`. Set `role=\"none\"` to override this behaviour for purely visual grouping, or set a specific role when the box has a clearer semantic purpose.",
|
|
690
|
+
"value": { "type": "string", "default": "'region'" }
|
|
691
|
+
}
|
|
684
692
|
],
|
|
685
693
|
"events": [],
|
|
686
694
|
"js": {
|
|
687
695
|
"properties": [
|
|
688
|
-
{
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
696
|
+
{
|
|
697
|
+
"name": "bleed",
|
|
698
|
+
"description": "Makes the box bleed to the container edge.\nExtends the box into the horizontal gutter on narrow screens. Adds negative horizontal margins and square side corners below the small breakpoint, then restores the normal margins and rounded corners from the small breakpoint and up.",
|
|
699
|
+
"type": "boolean"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "bordered",
|
|
703
|
+
"description": "Shows the box as a bordered surface.\nUse this when the content needs a clear visual boundary from the surrounding page.",
|
|
704
|
+
"type": "boolean"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "info",
|
|
708
|
+
"description": "Shows the box with information styling.\nUse this for supporting informational content that should be visually separated from the surrounding page.",
|
|
709
|
+
"type": "boolean"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "neutral",
|
|
713
|
+
"description": "Shows the box with neutral styling.\nUse this for quiet grouped content that needs a background without strong emphasis.",
|
|
714
|
+
"type": "boolean"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "role",
|
|
718
|
+
"description": "ARIA role for the box wrapper.\nDefaults to a role of `region`. Set `role=\"none\"` to override this behaviour for purely visual grouping, or set a specific role when the box has a clearer semantic purpose.",
|
|
719
|
+
"type": "string"
|
|
720
|
+
}
|
|
693
721
|
],
|
|
694
722
|
"events": []
|
|
695
723
|
}
|