@warp-ds/elements 2.8.2-next.6 → 2.9.0-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 +61 -2
- package/dist/index.d.ts +28 -6
- package/dist/packages/attention/attention.js +506 -233
- package/dist/packages/attention/attention.js.map +4 -4
- package/dist/packages/button/button.d.ts +8 -17
- package/dist/packages/button/button.js +494 -221
- package/dist/packages/button/button.js.map +4 -4
- package/dist/packages/button/button.react.stories.d.ts +1 -1
- package/dist/packages/button/styles/w-button.styles.d.ts +1 -0
- package/dist/packages/button/styles/w-button.styles.js +282 -0
- package/dist/packages/datepicker/datepicker.js +8 -15
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/datepicker/styles/w-datepicker.styles.js +3 -9
- package/dist/packages/link/link.js +197 -217
- package/dist/packages/link/link.js.map +4 -4
- package/dist/packages/link/link.test.js +0 -14
- package/dist/packages/link/styles/w-link.styles.js +213 -0
- package/dist/packages/slider/slider.js +18 -17
- package/dist/packages/slider/slider.js.map +3 -3
- package/dist/packages/slider/slider.react.stories.js +6 -2
- package/dist/packages/slider/slider.stories.js +18 -12
- package/dist/packages/slider-thumb/slider-thumb.js +12 -12
- package/dist/packages/slider-thumb/slider-thumb.js.map +2 -2
- package/dist/web-types.json +22 -6
- package/package.json +1 -1
- package/dist/packages/link/styles.js +0 -236
- /package/dist/packages/link/{styles.d.ts → styles/w-link.styles.d.ts} +0 -0
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.6",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -181,13 +181,17 @@
|
|
|
181
181
|
{
|
|
182
182
|
"name": "variant",
|
|
183
183
|
"value": {
|
|
184
|
-
"type": "'negative' | 'primary' | 'secondary' | 'utility' | 'pill' | 'link'"
|
|
184
|
+
"type": "'negative' | 'primary' | 'secondary' | 'negativeQuiet' | 'utility' | 'quiet' | 'utilityQuiet' | 'overlay' | 'overlayInverted' | 'overlayQuiet' | 'overlayInvertedQuiet' | 'pill' | 'link'"
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
"name": "quiet",
|
|
189
189
|
"value": { "type": "boolean", "default": "false" }
|
|
190
190
|
},
|
|
191
|
+
{
|
|
192
|
+
"name": "icon-only",
|
|
193
|
+
"value": { "type": "boolean", "default": "false" }
|
|
194
|
+
},
|
|
191
195
|
{
|
|
192
196
|
"name": "small",
|
|
193
197
|
"value": { "type": "boolean", "default": "false" }
|
|
@@ -198,6 +202,10 @@
|
|
|
198
202
|
},
|
|
199
203
|
{ "name": "href", "value": { "type": "string" } },
|
|
200
204
|
{ "name": "target", "value": { "type": "string" } },
|
|
205
|
+
{
|
|
206
|
+
"name": "disabled",
|
|
207
|
+
"value": { "type": "boolean", "default": "false" }
|
|
208
|
+
},
|
|
201
209
|
{ "name": "rel", "value": { "type": "string" } },
|
|
202
210
|
{
|
|
203
211
|
"name": "full-width",
|
|
@@ -214,13 +222,15 @@
|
|
|
214
222
|
{ "name": "autofocus", "type": "boolean" },
|
|
215
223
|
{
|
|
216
224
|
"name": "variant",
|
|
217
|
-
"type": "'negative' | 'primary' | 'secondary' | 'utility' | 'pill' | 'link'"
|
|
225
|
+
"type": "'negative' | 'primary' | 'secondary' | 'negativeQuiet' | 'utility' | 'quiet' | 'utilityQuiet' | 'overlay' | 'overlayInverted' | 'overlayQuiet' | 'overlayInvertedQuiet' | 'pill' | 'link'"
|
|
218
226
|
},
|
|
219
227
|
{ "name": "quiet", "type": "boolean" },
|
|
228
|
+
{ "name": "iconOnly", "type": "boolean" },
|
|
220
229
|
{ "name": "small", "type": "boolean" },
|
|
221
230
|
{ "name": "loading", "type": "boolean" },
|
|
222
231
|
{ "name": "href", "type": "string" },
|
|
223
232
|
{ "name": "target", "type": "string" },
|
|
233
|
+
{ "name": "disabled", "type": "boolean" },
|
|
224
234
|
{ "name": "rel", "type": "string" },
|
|
225
235
|
{ "name": "fullWidth", "type": "boolean" },
|
|
226
236
|
{ "name": "buttonClass", "type": "string" },
|
|
@@ -1436,7 +1446,7 @@
|
|
|
1436
1446
|
},
|
|
1437
1447
|
{
|
|
1438
1448
|
"name": "w-slider-thumb",
|
|
1439
|
-
"description": "Component to place inside a `<w-slider>`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)\n---\n\n\n### **Events:**\n - **slidervalidity**",
|
|
1449
|
+
"description": "Component to place inside a `<w-slider>`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)\n---\n\n\n### **Events:**\n - **thumbreset**\n- **slidervalidity**",
|
|
1440
1450
|
"doc-url": "",
|
|
1441
1451
|
"attributes": [
|
|
1442
1452
|
{ "name": "aria-label", "value": { "type": "string" } },
|
|
@@ -1445,7 +1455,10 @@
|
|
|
1445
1455
|
{ "name": "value", "value": { "type": "string" } },
|
|
1446
1456
|
{ "name": "placeholder", "value": { "type": "string" } }
|
|
1447
1457
|
],
|
|
1448
|
-
"events": [
|
|
1458
|
+
"events": [
|
|
1459
|
+
{ "name": "thumbreset", "type": "CustomEvent" },
|
|
1460
|
+
{ "name": "slidervalidity", "type": "CustomEvent" }
|
|
1461
|
+
],
|
|
1449
1462
|
"js": {
|
|
1450
1463
|
"properties": [
|
|
1451
1464
|
{ "name": "ariaLabel", "type": "string" },
|
|
@@ -1468,7 +1481,10 @@
|
|
|
1468
1481
|
},
|
|
1469
1482
|
{ "name": "ariaDescriptionText" }
|
|
1470
1483
|
],
|
|
1471
|
-
"events": [
|
|
1484
|
+
"events": [
|
|
1485
|
+
{ "name": "thumbreset", "type": "CustomEvent" },
|
|
1486
|
+
{ "name": "slidervalidity", "type": "CustomEvent" }
|
|
1487
|
+
]
|
|
1472
1488
|
}
|
|
1473
1489
|
},
|
|
1474
1490
|
{
|
package/package.json
CHANGED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const styles = css `.w-button,
|
|
3
|
-
.w-button--secondary {
|
|
4
|
-
/* Local scoped variables, given the default button (the secondary variant) as a default */
|
|
5
|
-
--_background: var(--background, var(--w-s-color-background));
|
|
6
|
-
--_background-hover: var(--background-hover, var(--w-s-color-background-hover));
|
|
7
|
-
--_background-active: var(--background-active, var(--w-s-color-background-active));
|
|
8
|
-
--_text-color: var(--color, var(--w-s-color-text-link));
|
|
9
|
-
--_border-width: var(--border-width, 2px);
|
|
10
|
-
--_border: var(--border, var(--w-s-color-border));
|
|
11
|
-
--_border-hover: var(--border-hover, var(--w-s-color-border-hover));
|
|
12
|
-
--_border-active: var(--border-active, var(--w-s-color-border-active));
|
|
13
|
-
--_border-radius: var(--w-button-radius-default, 8px);
|
|
14
|
-
--_font-size: var(--font-size, var(--w-font-size-m));
|
|
15
|
-
--_line-height: var(--line-height, var(--w-line-height-m));
|
|
16
|
-
--_font-weight: var(--font-weight, bold);
|
|
17
|
-
--_padding-x: var(--padding-x, 16px);
|
|
18
|
-
--_padding-y: var(--padding-y, 13px);
|
|
19
|
-
|
|
20
|
-
/* Base setup for all buttons */
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
align-items: center;
|
|
24
|
-
text-align: center;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
transition:
|
|
27
|
-
color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
28
|
-
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
29
|
-
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
30
|
-
fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
31
|
-
stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
|
-
|
|
33
|
-
/* Hook the local vars up to the button stuff */
|
|
34
|
-
background-color: var(--_background);
|
|
35
|
-
color: var(--_text-color);
|
|
36
|
-
border: var(--_border-width) solid var(--_border);
|
|
37
|
-
border-radius: var(--_border-radius);
|
|
38
|
-
padding: calc(var(--_padding-y) - var(--_border-width)) calc(var(--_padding-x) - var(--_border-width));
|
|
39
|
-
font-size: var(--_font-size);
|
|
40
|
-
line-height: var(--_line-height);
|
|
41
|
-
font-weight: var(--_font-weight);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.w-button:hover {
|
|
45
|
-
background-color: var(--_background-hover);
|
|
46
|
-
border-color: var(--_border-hover);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.w-button:active {
|
|
50
|
-
background-color: var(--_background-active);
|
|
51
|
-
border-color: var(--_border-active);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.w-button:focus-visible {
|
|
55
|
-
outline: 2px solid var(--w-s-color-border-focus);
|
|
56
|
-
outline-offset: var(--w-outline-offset, 1px);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Variants config */
|
|
60
|
-
.w-button--primary {
|
|
61
|
-
--background: var(--w-color-button-primary-background);
|
|
62
|
-
--background-hover: var(--w-color-button-primary-background-hover);
|
|
63
|
-
--background-active: var(--w-color-button-primary-background-active);
|
|
64
|
-
--color: var(--w-s-color-text-inverted);
|
|
65
|
-
--border-width: 0px;
|
|
66
|
-
}
|
|
67
|
-
.w-button--negative {
|
|
68
|
-
--background: var(--w-s-color-background-negative);
|
|
69
|
-
--background-hover: var(--w-s-color-background-negative-hover);
|
|
70
|
-
--background-active: var(--w-s-color-background-negative-active);
|
|
71
|
-
--color: var(--w-s-color-text-inverted);
|
|
72
|
-
--border-width: 0px;
|
|
73
|
-
}
|
|
74
|
-
.w-button--negative-quiet {
|
|
75
|
-
--background: transparent;
|
|
76
|
-
--background-hover: var(--w-s-color-background-negative-subtle-hover);
|
|
77
|
-
--background-active: var(--w-s-color-background-negative-subtle-active);
|
|
78
|
-
--color: var(--w-s-color-text-negative);
|
|
79
|
-
--border-width: 0px;
|
|
80
|
-
}
|
|
81
|
-
.w-button--utility {
|
|
82
|
-
--background: var(--w-s-color-background);
|
|
83
|
-
--background-hover: var(--w-s-color-background-hover);
|
|
84
|
-
--background-active: var(--w-s-color-background-active);
|
|
85
|
-
--color: var(--w-s-color-text);
|
|
86
|
-
--border-radius: var(--w-button-radius-utility, 4px);
|
|
87
|
-
--border-width: 1px;
|
|
88
|
-
}
|
|
89
|
-
.w-button--utility-quiet {
|
|
90
|
-
--background: transparent;
|
|
91
|
-
--color: var(--w-s-color-text);
|
|
92
|
-
--border-width: 0px;
|
|
93
|
-
}
|
|
94
|
-
.w-button--quiet {
|
|
95
|
-
--background: transparent;
|
|
96
|
-
--border-width: 0px;
|
|
97
|
-
}
|
|
98
|
-
.w-button--overlay {
|
|
99
|
-
--background: var(--w-color-background);
|
|
100
|
-
--background-hover: var(--w-color-background-hover);
|
|
101
|
-
--background-active: var(--w-color-background-active);
|
|
102
|
-
--color: var(--w-s-color-text);
|
|
103
|
-
--border-radius: 9999px;
|
|
104
|
-
--border-width: 0px;
|
|
105
|
-
}
|
|
106
|
-
.w-button--overlay-quiet {
|
|
107
|
-
--background: transparent;
|
|
108
|
-
--background-hover: var(--w-s-color-background-hover);
|
|
109
|
-
--background-active: var(--w-s-color-background-active);
|
|
110
|
-
--color: var(--w-s-color-text);
|
|
111
|
-
--border-radius: 9999px;
|
|
112
|
-
--border-width: 0px;
|
|
113
|
-
}
|
|
114
|
-
.w-button--overlay-inverted {
|
|
115
|
-
--background: var(--w-s-color-background-inverted);
|
|
116
|
-
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
117
|
-
--background-active: var(--w-s-color-background-inverted-active);
|
|
118
|
-
--color: var(--w-s-color-text-inverted);
|
|
119
|
-
--border-radius: 9999px;
|
|
120
|
-
--border-width: 0px;
|
|
121
|
-
}
|
|
122
|
-
.w-button--overlay-inverted-quiet {
|
|
123
|
-
--background: transparent;
|
|
124
|
-
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
125
|
-
--background-active: var(--w-s-color-background-inverted-active);
|
|
126
|
-
--color: var(--w-s-color-text-inverted);
|
|
127
|
-
--border-radius: 9999px;
|
|
128
|
-
--border-width: 0px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.w-button--link {
|
|
132
|
-
--background: none;
|
|
133
|
-
--background-hover: none;
|
|
134
|
-
--background-active: none;
|
|
135
|
-
--border-width: 0;
|
|
136
|
-
--font-weight: normal;
|
|
137
|
-
display: inline;
|
|
138
|
-
}
|
|
139
|
-
.w-button--overlay {
|
|
140
|
-
--background: var(--w-color-background);
|
|
141
|
-
--background-hover: var(--w-color-background-hover);
|
|
142
|
-
--background-active: var(--w-color-background-active);
|
|
143
|
-
--color: var(--w-s-color-text);
|
|
144
|
-
--border-radius: 9999px;
|
|
145
|
-
--border-width: 0px;
|
|
146
|
-
}
|
|
147
|
-
.w-button--overlay-quiet {
|
|
148
|
-
--background: transparent;
|
|
149
|
-
--background-hover: var(--w-s-color-background-hover);
|
|
150
|
-
--background-active: var(--w-s-color-background-active);
|
|
151
|
-
--color: var(--w-s-color-text);
|
|
152
|
-
--border-radius: 9999px;
|
|
153
|
-
--border-width: 0px;
|
|
154
|
-
}
|
|
155
|
-
.w-button--overlay-inverted {
|
|
156
|
-
--background: var(--w-s-color-background-inverted);
|
|
157
|
-
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
158
|
-
--background-active: var(--w-s-color-background-inverted-active);
|
|
159
|
-
--color: var(--w-s-color-text-inverted);
|
|
160
|
-
--border-radius: 9999px;
|
|
161
|
-
--border-width: 0px;
|
|
162
|
-
}
|
|
163
|
-
.w-button--overlay-inverted-quiet {
|
|
164
|
-
--background: transparent;
|
|
165
|
-
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
166
|
-
--background-active: var(--w-s-color-background-inverted-active);
|
|
167
|
-
--color: var(--w-s-color-text-inverted);
|
|
168
|
-
--border-radius: 9999px;
|
|
169
|
-
--border-width: 0px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/* States config, selects --loading as well since loading is always supposed to be disabled */
|
|
173
|
-
.w-button:disabled,
|
|
174
|
-
.w-button--disabled,
|
|
175
|
-
.w-button--loading {
|
|
176
|
-
--background: var(--w-s-color-background-disabled);
|
|
177
|
-
--background-hover: var(--w-s-color-background-disabled);
|
|
178
|
-
--background-active: var(--w-s-color-background-disabled);
|
|
179
|
-
--color: var(--w-s-color-text-inverted);
|
|
180
|
-
--border-width: 0px;
|
|
181
|
-
pointer-events: none;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.w-button--link:hover {
|
|
185
|
-
text-decoration: underline;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* Sizes config */
|
|
189
|
-
.w-button--small {
|
|
190
|
-
--padding-x: 12px;
|
|
191
|
-
--padding-y: 8px;
|
|
192
|
-
--font-size: var(--w-font-size-xs);
|
|
193
|
-
--line-height: var(--w-line-height-xs);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/* Width config */
|
|
197
|
-
.w-button--full-width {
|
|
198
|
-
width: 100%;
|
|
199
|
-
max-width: 100%;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.w-button--has-icon-only {
|
|
203
|
-
width: auto;
|
|
204
|
-
max-width: none;
|
|
205
|
-
--_padding-x: var(--_padding-y);
|
|
206
|
-
aspect-ratio: 1 / 1;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
a.w-button {
|
|
210
|
-
text-decoration: none !important;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* Copy of loading animation from warp */
|
|
214
|
-
.w-button--loading {
|
|
215
|
-
background-image: linear-gradient(
|
|
216
|
-
135deg,
|
|
217
|
-
rgba(0, 0, 0, 0.05) 25%,
|
|
218
|
-
transparent 25%,
|
|
219
|
-
transparent 50%,
|
|
220
|
-
rgba(0, 0, 0, 0.05) 50%,
|
|
221
|
-
rgba(0, 0, 0, 0.05) 75%,
|
|
222
|
-
transparent 75%,
|
|
223
|
-
transparent
|
|
224
|
-
);
|
|
225
|
-
background-size: 30px 30px;
|
|
226
|
-
animation: animate-inprogress 3s linear infinite;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@keyframes animate-inprogress {
|
|
230
|
-
0% {
|
|
231
|
-
background-position: 0 0;
|
|
232
|
-
}
|
|
233
|
-
100% {
|
|
234
|
-
background-position: 60px 0;
|
|
235
|
-
}
|
|
236
|
-
}`;
|
|
File without changes
|