@warp-ds/elements 2.2.0-next.21 → 2.2.0-next.22
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/README.md +26 -37
- package/dist/custom-elements.json +101 -101
- package/dist/index.d.ts +31 -31
- package/dist/packages/affix/index.js.map +2 -2
- package/dist/packages/alert/index.js +1 -1
- package/dist/packages/alert/index.js.map +2 -2
- package/dist/packages/alert/styles.js +1 -1
- package/dist/packages/attention/attention.stories.d.ts +1 -0
- package/dist/packages/attention/attention.stories.js +15 -8
- package/dist/packages/attention/index.js +1 -1
- package/dist/packages/attention/index.js.map +2 -2
- package/dist/packages/attention/styles.js +1 -1
- package/dist/packages/badge/index.js.map +2 -2
- package/dist/packages/box/index.js.map +2 -2
- package/dist/packages/breadcrumbs/index.js.map +2 -2
- package/dist/packages/button/index.js.map +2 -2
- package/dist/packages/card/index.js.map +2 -2
- package/dist/packages/combobox/index.js.map +2 -2
- package/dist/packages/expandable/index.js.map +2 -2
- package/dist/packages/pagination/index.js.map +2 -2
- package/dist/packages/pill/index.js +1 -1
- package/dist/packages/pill/index.js.map +2 -2
- package/dist/packages/pill/styles.js +1 -1
- package/dist/packages/select/index.js +1 -1
- package/dist/packages/select/index.js.map +2 -2
- package/dist/packages/select/styles.js +1 -1
- package/dist/packages/slider/index.js +1 -1
- package/dist/packages/slider/index.js.map +2 -2
- package/dist/packages/slider/slider-thumb.js +1 -1
- package/dist/packages/slider/slider-thumb.js.map +2 -2
- package/dist/packages/slider/styles.js +1 -1
- package/dist/packages/steps/index.js.map +2 -2
- package/dist/packages/switch/index.js.map +2 -2
- package/dist/packages/textfield/index.js +1 -1
- package/dist/packages/textfield/index.js.map +2 -2
- package/dist/packages/textfield/styles.js +1 -1
- package/dist/vscode.html-custom-data.json +18 -18
- package/dist/web-types.json +35 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ start by reviewing the [contributing guidelines](CONTRIBUTING.md).
|
|
|
14
14
|
|
|
15
15
|
### Installation
|
|
16
16
|
|
|
17
|
-
Warp custom elements are supplied by the Eik CDN.
|
|
17
|
+
Warp custom elements are supplied by the Eik CDN.
|
|
18
18
|
In addition, you can install the `@warp-ds/elements` package to get intellisense
|
|
19
19
|
in your editor.
|
|
20
20
|
|
|
@@ -138,34 +138,19 @@ Add `@warp-ds/elements` to tsconfig types in compilerOptions.
|
|
|
138
138
|
|
|
139
139
|
#### Visual Studio Code
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
Install the [Web Components Language Server](https://wc-toolkit.com/integrations/web-components-language-server/) extension. The extension automatically picks up the [Custom Element Manifest](https://wc-toolkit.com/getting-started/) that we ship with `@warp-ds/elements`.
|
|
142
142
|
|
|
143
143
|
##### Using Warp Elements in a plain HTML page
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Install Warp Elements locally using npm:
|
|
146
146
|
|
|
147
147
|
```
|
|
148
148
|
npm install @warp-ds/elements
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
Install the [Web Components Language Server](https://wc-toolkit.com/integrations/web-components-language-server/) extension.
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"html.customData": [
|
|
158
|
-
"./node_modules/@warp-ds/elements/dist/vscode.html-custom-data.json"
|
|
159
|
-
],
|
|
160
|
-
"css.customData": [
|
|
161
|
-
"./node_modules/@warp-ds/elements/dist/vscode.css-custom-data.json"
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
restart vscode
|
|
167
|
-
|
|
168
|
-
Now, inside any .html files, you will get intellisense when using Warp Elements
|
|
153
|
+
Now, inside any `.html` files, you will get IntelliSense when using Warp Elements:
|
|
169
154
|
|
|
170
155
|
```html
|
|
171
156
|
<w-button variant=""><w-button>
|
|
@@ -177,28 +162,15 @@ IntelliSense in JavaScript strings is not supported without additional plugins a
|
|
|
177
162
|
|
|
178
163
|
##### Using Warp Elements in Lit html tagged template literals
|
|
179
164
|
|
|
180
|
-
|
|
165
|
+
Install Warp Elements locally using npm:
|
|
181
166
|
|
|
182
167
|
```
|
|
183
168
|
npm install @warp-ds/elements
|
|
184
169
|
```
|
|
185
170
|
|
|
186
|
-
|
|
171
|
+
Install the [Web Components Language Server](https://wc-toolkit.com/integrations/web-components-language-server/) extension.
|
|
187
172
|
|
|
188
|
-
.
|
|
189
|
-
|
|
190
|
-
```json
|
|
191
|
-
{
|
|
192
|
-
"html.customData": [
|
|
193
|
-
"./node_modules/@warp-ds/elements/dist/vscode.html-custom-data.json"
|
|
194
|
-
],
|
|
195
|
-
"css.customData": [
|
|
196
|
-
"./node_modules/@warp-ds/elements/dist/vscode.css-custom-data.json"
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
Install the lit-plugin vscode extension and restart vscode
|
|
173
|
+
Install the [lit-plugin](https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin) extension.
|
|
202
174
|
|
|
203
175
|
Now, inside any html`` tagged template literals, you will get intellisense when using Warp Elements.
|
|
204
176
|
|
|
@@ -222,7 +194,7 @@ Now, inside your react components, you will get intellisense when using Warp Ele
|
|
|
222
194
|
|
|
223
195
|
React 18 and earlier do not support custom elements.
|
|
224
196
|
|
|
225
|
-
If you are on React 18 or early, we strongly urge you to please consider upgrading to React v19.
|
|
197
|
+
If you are on React 18 or early, we strongly urge you to please consider upgrading to React v19.
|
|
226
198
|
|
|
227
199
|
If you cannot upgrade right away, Warp supplies custom element wrappers to add backwards compatibility. Use them like so:
|
|
228
200
|
|
|
@@ -244,6 +216,23 @@ and use the component
|
|
|
244
216
|
|
|
245
217
|
you should get intellisense when using Warp Elements.
|
|
246
218
|
|
|
219
|
+
#### CustomData fallback
|
|
220
|
+
|
|
221
|
+
`@warp-ds/elements` also includes [Custom HTML and CSS data for Visual Studio Code](https://code.visualstudio.com/blogs/2020/02/24/custom-data-format).
|
|
222
|
+
|
|
223
|
+
If you can't get the Web Components Language Server to work, add the following snippet to `.vscode/settings.json`, then restart VS Code.
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"html.customData": [
|
|
228
|
+
"./node_modules/@warp-ds/elements/dist/vscode.html-custom-data.json"
|
|
229
|
+
],
|
|
230
|
+
"css.customData": [
|
|
231
|
+
"./node_modules/@warp-ds/elements/dist/vscode.css-custom-data.json"
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
247
236
|
#### JetBrains products
|
|
248
237
|
|
|
249
238
|
We ship `web-types.json` which should get picked up automatically by JetBrains IDEA and similar products.
|
|
@@ -2,107 +2,6 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "packages/alert/index.ts",
|
|
8
|
-
"declarations": [
|
|
9
|
-
{
|
|
10
|
-
"kind": "class",
|
|
11
|
-
"description": "Alert is an inline component used for displaying different types of messages.\n\nFor accessibility reasons, alert should appear close to the element that triggered it.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/feedback-alert--docs)",
|
|
12
|
-
"name": "WarpAlert",
|
|
13
|
-
"members": [
|
|
14
|
-
{
|
|
15
|
-
"kind": "field",
|
|
16
|
-
"name": "variant",
|
|
17
|
-
"type": {
|
|
18
|
-
"text": "AlertVariants"
|
|
19
|
-
},
|
|
20
|
-
"default": "'info'",
|
|
21
|
-
"attribute": "variant",
|
|
22
|
-
"reflects": true,
|
|
23
|
-
"parsedType": {
|
|
24
|
-
"text": "'negative' | 'positive' | 'warning' | 'info'"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"kind": "field",
|
|
29
|
-
"name": "show",
|
|
30
|
-
"type": {
|
|
31
|
-
"text": "boolean"
|
|
32
|
-
},
|
|
33
|
-
"default": "false",
|
|
34
|
-
"attribute": "show",
|
|
35
|
-
"reflects": true
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"kind": "field",
|
|
39
|
-
"name": "role",
|
|
40
|
-
"type": {
|
|
41
|
-
"text": "string"
|
|
42
|
-
},
|
|
43
|
-
"default": "'alert'",
|
|
44
|
-
"attribute": "role",
|
|
45
|
-
"reflects": true
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"attributes": [
|
|
49
|
-
{
|
|
50
|
-
"name": "variant",
|
|
51
|
-
"type": {
|
|
52
|
-
"text": "AlertVariants"
|
|
53
|
-
},
|
|
54
|
-
"default": "'info'",
|
|
55
|
-
"fieldName": "variant",
|
|
56
|
-
"parsedType": {
|
|
57
|
-
"text": "'negative' | 'positive' | 'warning' | 'info'"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "show",
|
|
62
|
-
"type": {
|
|
63
|
-
"text": "boolean"
|
|
64
|
-
},
|
|
65
|
-
"default": "false",
|
|
66
|
-
"fieldName": "show"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "role",
|
|
70
|
-
"type": {
|
|
71
|
-
"text": "string"
|
|
72
|
-
},
|
|
73
|
-
"default": "'alert'",
|
|
74
|
-
"fieldName": "role"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"superclass": {
|
|
78
|
-
"name": "LitElement",
|
|
79
|
-
"package": "lit"
|
|
80
|
-
},
|
|
81
|
-
"tagName": "w-alert",
|
|
82
|
-
"customElement": true,
|
|
83
|
-
"modulePath": "packages/alert/index.ts",
|
|
84
|
-
"definitionPath": "packages/alert/index.ts"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"exports": [
|
|
88
|
-
{
|
|
89
|
-
"kind": "custom-element-definition",
|
|
90
|
-
"name": "w-alert",
|
|
91
|
-
"declaration": {
|
|
92
|
-
"name": "WarpAlert",
|
|
93
|
-
"module": "packages/alert/index.ts"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"kind": "js",
|
|
98
|
-
"name": "WarpAlert",
|
|
99
|
-
"declaration": {
|
|
100
|
-
"name": "WarpAlert",
|
|
101
|
-
"module": "packages/alert/index.ts"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
5
|
{
|
|
107
6
|
"kind": "javascript-module",
|
|
108
7
|
"path": "packages/affix/index.ts",
|
|
@@ -244,6 +143,107 @@
|
|
|
244
143
|
}
|
|
245
144
|
]
|
|
246
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"kind": "javascript-module",
|
|
148
|
+
"path": "packages/alert/index.ts",
|
|
149
|
+
"declarations": [
|
|
150
|
+
{
|
|
151
|
+
"kind": "class",
|
|
152
|
+
"description": "Alert is an inline component used for displaying different types of messages.\n\nFor accessibility reasons, alert should appear close to the element that triggered it.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/feedback-alert--docs)",
|
|
153
|
+
"name": "WarpAlert",
|
|
154
|
+
"members": [
|
|
155
|
+
{
|
|
156
|
+
"kind": "field",
|
|
157
|
+
"name": "variant",
|
|
158
|
+
"type": {
|
|
159
|
+
"text": "AlertVariants"
|
|
160
|
+
},
|
|
161
|
+
"default": "'info'",
|
|
162
|
+
"attribute": "variant",
|
|
163
|
+
"reflects": true,
|
|
164
|
+
"parsedType": {
|
|
165
|
+
"text": "'negative' | 'positive' | 'warning' | 'info'"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"kind": "field",
|
|
170
|
+
"name": "show",
|
|
171
|
+
"type": {
|
|
172
|
+
"text": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"default": "false",
|
|
175
|
+
"attribute": "show",
|
|
176
|
+
"reflects": true
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "field",
|
|
180
|
+
"name": "role",
|
|
181
|
+
"type": {
|
|
182
|
+
"text": "string"
|
|
183
|
+
},
|
|
184
|
+
"default": "'alert'",
|
|
185
|
+
"attribute": "role",
|
|
186
|
+
"reflects": true
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"attributes": [
|
|
190
|
+
{
|
|
191
|
+
"name": "variant",
|
|
192
|
+
"type": {
|
|
193
|
+
"text": "AlertVariants"
|
|
194
|
+
},
|
|
195
|
+
"default": "'info'",
|
|
196
|
+
"fieldName": "variant",
|
|
197
|
+
"parsedType": {
|
|
198
|
+
"text": "'negative' | 'positive' | 'warning' | 'info'"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "show",
|
|
203
|
+
"type": {
|
|
204
|
+
"text": "boolean"
|
|
205
|
+
},
|
|
206
|
+
"default": "false",
|
|
207
|
+
"fieldName": "show"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "role",
|
|
211
|
+
"type": {
|
|
212
|
+
"text": "string"
|
|
213
|
+
},
|
|
214
|
+
"default": "'alert'",
|
|
215
|
+
"fieldName": "role"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"superclass": {
|
|
219
|
+
"name": "LitElement",
|
|
220
|
+
"package": "lit"
|
|
221
|
+
},
|
|
222
|
+
"tagName": "w-alert",
|
|
223
|
+
"customElement": true,
|
|
224
|
+
"modulePath": "packages/alert/index.ts",
|
|
225
|
+
"definitionPath": "packages/alert/index.ts"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"exports": [
|
|
229
|
+
{
|
|
230
|
+
"kind": "custom-element-definition",
|
|
231
|
+
"name": "w-alert",
|
|
232
|
+
"declaration": {
|
|
233
|
+
"name": "WarpAlert",
|
|
234
|
+
"module": "packages/alert/index.ts"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "js",
|
|
239
|
+
"name": "WarpAlert",
|
|
240
|
+
"declaration": {
|
|
241
|
+
"name": "WarpAlert",
|
|
242
|
+
"module": "packages/alert/index.ts"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
247
|
{
|
|
248
248
|
"kind": "javascript-module",
|
|
249
249
|
"path": "packages/utils/index.js",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import type { WarpAlert } from "./packages/alert/index.ts";
|
|
3
2
|
import type { ccSuffix, ccPrefix, WarpAffix } from "./packages/affix/index.ts";
|
|
3
|
+
import type { WarpAlert } from "./packages/alert/index.ts";
|
|
4
4
|
import type { WarpLink } from "./packages/link/index.ts";
|
|
5
5
|
import type { ccButton, WarpButton } from "./packages/button/index.ts";
|
|
6
6
|
import type { ccAttention, WarpAttention } from "./packages/attention/index.ts";
|
|
@@ -111,18 +111,6 @@ type BaseEvents = {
|
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
export type WarpAlertProps = {
|
|
115
|
-
/** */
|
|
116
|
-
"variant"?: WarpAlert['variant'];
|
|
117
|
-
/** */
|
|
118
|
-
"show"?: WarpAlert['show'];
|
|
119
|
-
/** */
|
|
120
|
-
"role"?: WarpAlert['role'];
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
114
|
export type WarpAffixProps = {
|
|
127
115
|
/** */
|
|
128
116
|
"aria-label"?: WarpAffix['ariaLabel'];
|
|
@@ -143,6 +131,18 @@ Set an `aria-label` that explains the action when using this. */
|
|
|
143
131
|
}
|
|
144
132
|
|
|
145
133
|
|
|
134
|
+
export type WarpAlertProps = {
|
|
135
|
+
/** */
|
|
136
|
+
"variant"?: WarpAlert['variant'];
|
|
137
|
+
/** */
|
|
138
|
+
"show"?: WarpAlert['show'];
|
|
139
|
+
/** */
|
|
140
|
+
"role"?: WarpAlert['role'];
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
146
|
export type WarpLinkProps = {
|
|
147
147
|
/** */
|
|
148
148
|
"autofocus"?: WarpLink['autofocus'];
|
|
@@ -921,24 +921,6 @@ export type WarpToastContainerProps = {
|
|
|
921
921
|
export type CustomElements = {
|
|
922
922
|
|
|
923
923
|
|
|
924
|
-
/**
|
|
925
|
-
* Alert is an inline component used for displaying different types of messages.
|
|
926
|
-
*
|
|
927
|
-
* For accessibility reasons, alert should appear close to the element that triggered it.
|
|
928
|
-
*
|
|
929
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/feedback-alert--docs)
|
|
930
|
-
*
|
|
931
|
-
* ## Attributes & Properties
|
|
932
|
-
*
|
|
933
|
-
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
934
|
-
*
|
|
935
|
-
* - `variant`: undefined
|
|
936
|
-
* - `show`: undefined
|
|
937
|
-
* - `role`: undefined
|
|
938
|
-
*/
|
|
939
|
-
"w-alert": Partial<WarpAlertProps & BaseProps<WarpAlert> & BaseEvents>;
|
|
940
|
-
|
|
941
|
-
|
|
942
924
|
/**
|
|
943
925
|
* This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.
|
|
944
926
|
*
|
|
@@ -960,6 +942,24 @@ export type WarpToastContainerProps = {
|
|
|
960
942
|
"w-affix": Partial<WarpAffixProps & BaseProps<WarpAffix> & BaseEvents>;
|
|
961
943
|
|
|
962
944
|
|
|
945
|
+
/**
|
|
946
|
+
* Alert is an inline component used for displaying different types of messages.
|
|
947
|
+
*
|
|
948
|
+
* For accessibility reasons, alert should appear close to the element that triggered it.
|
|
949
|
+
*
|
|
950
|
+
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/feedback-alert--docs)
|
|
951
|
+
*
|
|
952
|
+
* ## Attributes & Properties
|
|
953
|
+
*
|
|
954
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
955
|
+
*
|
|
956
|
+
* - `variant`: undefined
|
|
957
|
+
* - `show`: undefined
|
|
958
|
+
* - `role`: undefined
|
|
959
|
+
*/
|
|
960
|
+
"w-alert": Partial<WarpAlertProps & BaseProps<WarpAlert> & BaseEvents>;
|
|
961
|
+
|
|
962
|
+
|
|
963
963
|
/**
|
|
964
964
|
* Buttons are used to perform actions, with different visuals for different needs.
|
|
965
965
|
*
|