@warp-ds/elements 2.10.0-next.23 → 2.10.0-next.24
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 +100 -18
- package/dist/docs/modal/api.md +3 -1
- package/dist/docs/modal/modal.md +82 -9
- package/dist/docs/modal/styling.md +75 -0
- package/dist/docs/modal/usage.md +4 -8
- package/dist/index.d.ts +134 -4
- package/dist/packages/modal/modal.d.ts +17 -2
- package/dist/packages/modal/modal.js +176 -129
- package/dist/packages/modal/modal.js.map +4 -4
- package/dist/packages/modal/modal.stories.d.ts +5 -4
- package/dist/packages/modal/modal.stories.js +41 -38
- package/dist/packages/modal/styles.d.ts +1 -0
- package/dist/packages/modal/styles.js +171 -0
- package/dist/packages/modal-footer/modal-footer.d.ts +5 -1
- package/dist/packages/modal-footer/modal-footer.js +25 -22
- package/dist/packages/modal-footer/modal-footer.js.map +4 -4
- package/dist/packages/modal-footer/styles.d.ts +1 -0
- package/dist/packages/modal-footer/styles.js +22 -0
- package/dist/packages/modal-header/modal-header.d.ts +12 -5
- package/dist/packages/modal-header/modal-header.js +149 -141
- package/dist/packages/modal-header/modal-header.js.map +4 -4
- package/dist/packages/modal-header/styles.d.ts +1 -0
- package/dist/packages/modal-header/styles.js +96 -0
- package/dist/packages/textarea/react.d.ts +1 -1
- package/dist/packages/textarea/textarea.d.ts +2 -4
- package/dist/packages/textarea/textarea.js.map +2 -2
- package/dist/packages/textarea/textarea.react.stories.d.ts +19 -2
- package/dist/packages/textarea/textarea.react.stories.js +17 -0
- package/dist/packages/textfield/textfield.react.stories.d.ts +30 -0
- package/dist/packages/textfield/textfield.react.stories.js +32 -0
- package/dist/web-types.json +50 -4
- package/eik/index.js +16 -16
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Textarea } from "./react";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<Omit<Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "optional" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "
|
|
6
|
+
render(args: Omit<Omit<Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "optional" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "setCustomValidity" | "maxRows" | "minRows" | "_textareaStyles"> & {
|
|
7
7
|
onBlur?: ((e: Event) => void) | undefined;
|
|
8
8
|
onblur?: ((e: Event) => void) | undefined;
|
|
9
9
|
onChange?: ((e: Event) => void) | undefined;
|
|
@@ -18,7 +18,7 @@ declare const _default: {
|
|
|
18
18
|
minRows?: number;
|
|
19
19
|
readOnly?: boolean;
|
|
20
20
|
} & React.RefAttributes<import("./textarea").WarpTextarea>): React.JSX.Element;
|
|
21
|
-
component: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "optional" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "
|
|
21
|
+
component: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "optional" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "setCustomValidity" | "maxRows" | "minRows" | "_textareaStyles"> & {
|
|
22
22
|
onBlur?: ((e: Event) => void) | undefined;
|
|
23
23
|
onblur?: ((e: Event) => void) | undefined;
|
|
24
24
|
onChange?: ((e: Event) => void) | undefined;
|
|
@@ -33,6 +33,23 @@ declare const _default: {
|
|
|
33
33
|
minRows?: number;
|
|
34
34
|
readOnly?: boolean;
|
|
35
35
|
} & React.RefAttributes<import("./textarea").WarpTextarea>>;
|
|
36
|
+
args: {
|
|
37
|
+
optional: false;
|
|
38
|
+
required: false;
|
|
39
|
+
disabled: false;
|
|
40
|
+
invalid: false;
|
|
41
|
+
readOnly: false;
|
|
42
|
+
maxRows: undefined;
|
|
43
|
+
minRows: undefined;
|
|
44
|
+
};
|
|
45
|
+
argTypes: {
|
|
46
|
+
maxRows: {
|
|
47
|
+
type: "number";
|
|
48
|
+
};
|
|
49
|
+
minRows: {
|
|
50
|
+
type: "number";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
36
53
|
};
|
|
37
54
|
export default _default;
|
|
38
55
|
export type Story = StoryObj<typeof Textarea>;
|
|
@@ -6,6 +6,23 @@ export default {
|
|
|
6
6
|
return React.createElement(Textarea, { ...args });
|
|
7
7
|
},
|
|
8
8
|
component: Textarea,
|
|
9
|
+
args: {
|
|
10
|
+
optional: false,
|
|
11
|
+
required: false,
|
|
12
|
+
disabled: false,
|
|
13
|
+
invalid: false,
|
|
14
|
+
readOnly: false,
|
|
15
|
+
maxRows: undefined,
|
|
16
|
+
minRows: undefined,
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
maxRows: {
|
|
20
|
+
type: "number",
|
|
21
|
+
},
|
|
22
|
+
minRows: {
|
|
23
|
+
type: "number",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
9
26
|
};
|
|
10
27
|
export const Default = {
|
|
11
28
|
args: {
|
|
@@ -33,6 +33,36 @@ declare const _default: {
|
|
|
33
33
|
maxLength?: number;
|
|
34
34
|
readOnly?: boolean;
|
|
35
35
|
} & React.RefAttributes<import("./textfield").WarpTextField>>;
|
|
36
|
+
args: {
|
|
37
|
+
type: string;
|
|
38
|
+
optional: false;
|
|
39
|
+
required: false;
|
|
40
|
+
disabled: false;
|
|
41
|
+
invalid: false;
|
|
42
|
+
size: undefined;
|
|
43
|
+
max: undefined;
|
|
44
|
+
maxLength: undefined;
|
|
45
|
+
min: undefined;
|
|
46
|
+
minLength: undefined;
|
|
47
|
+
readOnly: false;
|
|
48
|
+
};
|
|
49
|
+
argTypes: {
|
|
50
|
+
max: {
|
|
51
|
+
type: "number";
|
|
52
|
+
};
|
|
53
|
+
min: {
|
|
54
|
+
type: "number";
|
|
55
|
+
};
|
|
56
|
+
maxLength: {
|
|
57
|
+
type: "number";
|
|
58
|
+
};
|
|
59
|
+
minLength: {
|
|
60
|
+
type: "number";
|
|
61
|
+
};
|
|
62
|
+
size: {
|
|
63
|
+
type: "number";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
36
66
|
};
|
|
37
67
|
export default _default;
|
|
38
68
|
export type Story = StoryObj<typeof TextField>;
|
|
@@ -11,11 +11,43 @@ export default {
|
|
|
11
11
|
return React.createElement(TextField, { ...args });
|
|
12
12
|
},
|
|
13
13
|
component: TextField,
|
|
14
|
+
args: {
|
|
15
|
+
type: "text",
|
|
16
|
+
optional: false,
|
|
17
|
+
required: false,
|
|
18
|
+
disabled: false,
|
|
19
|
+
invalid: false,
|
|
20
|
+
size: undefined,
|
|
21
|
+
max: undefined,
|
|
22
|
+
maxLength: undefined,
|
|
23
|
+
min: undefined,
|
|
24
|
+
minLength: undefined,
|
|
25
|
+
readOnly: false,
|
|
26
|
+
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
max: {
|
|
29
|
+
type: "number",
|
|
30
|
+
},
|
|
31
|
+
min: {
|
|
32
|
+
type: "number",
|
|
33
|
+
},
|
|
34
|
+
maxLength: {
|
|
35
|
+
type: "number",
|
|
36
|
+
},
|
|
37
|
+
minLength: {
|
|
38
|
+
type: "number",
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
type: "number",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
14
44
|
};
|
|
15
45
|
export const Default = {
|
|
16
46
|
args: {
|
|
17
47
|
label: "Email",
|
|
18
48
|
type: "email",
|
|
49
|
+
optional: false,
|
|
50
|
+
required: false,
|
|
19
51
|
},
|
|
20
52
|
};
|
|
21
53
|
export const WithPlaceholder = {
|
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.10.0-next.
|
|
4
|
+
"version": "2.10.0-next.23",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -1543,7 +1543,7 @@
|
|
|
1543
1543
|
},
|
|
1544
1544
|
{
|
|
1545
1545
|
"name": "w-modal",
|
|
1546
|
-
"description": "Modals (or dialogs) display important information that users need to acknowledge.\n---\n\n\n### **Events:**\n - **shown**\n- **hidden**\n\n### **Slots:**\n - **header** - Typically where you would use the `w-modal-header` component.\n- **content** - The main content of the modal.\n- **footer** - Typically where you would use the `w-modal-footer` component, for things like actions.",
|
|
1546
|
+
"description": "Modals (or dialogs) display important information that users need to acknowledge.\n---\n\n\n### **Events:**\n - **shown**\n- **hidden**\n\n### **Slots:**\n - **header** - Typically where you would use the `w-modal-header` component.\n- **content** - The main content of the modal.\n- **footer** - Typically where you would use the `w-modal-footer` component, for things like actions.\n\n### **CSS Properties:**\n - **--w-c-modal-backdrop-color** - undefined _(default: undefined)_\n- **--w-c-modal-bg** - undefined _(default: undefined)_\n- **--w-c-modal-box-shadow** - undefined _(default: undefined)_\n- **--w-c-modal-color** - undefined _(default: undefined)_\n- **--w-c-modal-height** - undefined _(default: undefined)_\n- **--w-c-modal-max-height** - undefined _(default: undefined)_\n- **--w-c-modal-min-height** - undefined _(default: undefined)_\n- **--w-c-modal-translate-distance** - undefined _(default: undefined)_\n- **--w-c-modal-width** - undefined _(default: undefined)_\n\n### **CSS Parts:**\n - **dialog** - the root element inside the component (`<dialog>` element).\n- **wrapper** - container for all elements, direct child of `<dialog>`.\n- **content** - the container for the `content` slot items (children).",
|
|
1547
1547
|
"doc-url": "",
|
|
1548
1548
|
"attributes": [
|
|
1549
1549
|
{
|
|
@@ -1598,7 +1598,7 @@
|
|
|
1598
1598
|
},
|
|
1599
1599
|
{
|
|
1600
1600
|
"name": "w-modal-footer",
|
|
1601
|
-
"description": "The footer section of a modal, typically where you place actions.\n---\n",
|
|
1601
|
+
"description": "The footer section of a modal, typically where you place actions.\n---\n\n\n### **CSS Properties:**\n - **--w-c-modal-footer-gap** - adjusts the flex gap between actions in the footer. _(default: undefined)_\n\n### **CSS Parts:**\n - **footer** - the container for slotted items (children).",
|
|
1602
1602
|
"doc-url": "",
|
|
1603
1603
|
"attributes": [],
|
|
1604
1604
|
"events": [],
|
|
@@ -1606,7 +1606,7 @@
|
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
1608
|
"name": "w-modal-header",
|
|
1609
|
-
"description": "The header section of a modal, typically where you place the title and a close button.\n---\n\n\n### **Events:**\n - **backClicked**\n\n### **Slots:**\n - **top** - Customize the title bar, for example to have a header image that reaches the modal's edges. See the With Image story for an example.",
|
|
1609
|
+
"description": "The header section of a modal, typically where you place the title and a close button.\n---\n\n\n### **Events:**\n - **backClicked**\n\n### **Slots:**\n - **top** - Customize the title bar, for example to have a header image that reaches the modal's edges. See the With Image story for an example.\n\n### **CSS Properties:**\n - **--w-c-modal-header-font-size** - undefined _(default: undefined)_\n- **--w-c-modal-header-line-height** - undefined _(default: undefined)_\n- **--w-c-modal-header-margin-bottom** - undefined _(default: undefined)_\n\n### **CSS Parts:**\n - **header** - the root element inside the component.\n- **top** - the container for the image (`top` slot).\n- **back** - the back button, if visible.\n- **title** - the title element.\n- **close** - the close button, if visible.",
|
|
1610
1610
|
"doc-url": "",
|
|
1611
1611
|
"attributes": [
|
|
1612
1612
|
{
|
|
@@ -2845,6 +2845,22 @@
|
|
|
2845
2845
|
},
|
|
2846
2846
|
"css": {
|
|
2847
2847
|
"properties": [
|
|
2848
|
+
{ "name": "--w-c-modal-backdrop-color" },
|
|
2849
|
+
{ "name": "--w-c-modal-bg" },
|
|
2850
|
+
{ "name": "--w-c-modal-box-shadow" },
|
|
2851
|
+
{ "name": "--w-c-modal-color" },
|
|
2852
|
+
{ "name": "--w-c-modal-height" },
|
|
2853
|
+
{ "name": "--w-c-modal-max-height" },
|
|
2854
|
+
{ "name": "--w-c-modal-min-height" },
|
|
2855
|
+
{ "name": "--w-c-modal-translate-distance" },
|
|
2856
|
+
{ "name": "--w-c-modal-width" },
|
|
2857
|
+
{
|
|
2858
|
+
"name": "--w-c-modal-footer-gap",
|
|
2859
|
+
"description": " adjusts the flex gap between actions in the footer."
|
|
2860
|
+
},
|
|
2861
|
+
{ "name": "--w-c-modal-header-font-size" },
|
|
2862
|
+
{ "name": "--w-c-modal-header-line-height" },
|
|
2863
|
+
{ "name": "--w-c-modal-header-margin-bottom" },
|
|
2848
2864
|
{ "name": "--w-c-snackbar-item-radius" },
|
|
2849
2865
|
{ "name": "--w-c-snackbar-item-max-width" },
|
|
2850
2866
|
{ "name": "--w-c-snackbar-item-min-width" },
|
|
@@ -2864,6 +2880,36 @@
|
|
|
2864
2880
|
{ "name": "--w-c-snackbar-z-index" }
|
|
2865
2881
|
],
|
|
2866
2882
|
"pseudo-elements": [
|
|
2883
|
+
{
|
|
2884
|
+
"name": "part(dialog)",
|
|
2885
|
+
"description": "the root element inside the component (`<dialog>` element)."
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
"name": "part(wrapper)",
|
|
2889
|
+
"description": "container for all elements, direct child of `<dialog>`."
|
|
2890
|
+
},
|
|
2891
|
+
{
|
|
2892
|
+
"name": "part(content)",
|
|
2893
|
+
"description": "the container for the `content` slot items (children)."
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
"name": "part(footer)",
|
|
2897
|
+
"description": "the container for slotted items (children)."
|
|
2898
|
+
},
|
|
2899
|
+
{
|
|
2900
|
+
"name": "part(header)",
|
|
2901
|
+
"description": "the root element inside the component."
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
"name": "part(top)",
|
|
2905
|
+
"description": "the container for the image (`top` slot)."
|
|
2906
|
+
},
|
|
2907
|
+
{ "name": "part(back)", "description": "the back button, if visible." },
|
|
2908
|
+
{ "name": "part(title)", "description": "the title element." },
|
|
2909
|
+
{
|
|
2910
|
+
"name": "part(close)",
|
|
2911
|
+
"description": "the close button, if visible."
|
|
2912
|
+
},
|
|
2867
2913
|
{
|
|
2868
2914
|
"name": "part(item)",
|
|
2869
2915
|
"description": "the container wrapping the message, icon and actions."
|