@warp-ds/elements 2.2.0-next.5 → 2.2.0-next.7
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 +677 -134
- package/dist/index.d.ts +2 -0
- package/dist/index.js +159 -107
- package/dist/index.js.map +4 -4
- package/dist/packages/button/index.d.ts +3 -0
- package/dist/packages/button/index.js.map +2 -2
- package/dist/packages/button/react.js.map +2 -2
- package/dist/packages/datepicker/datepicker.d.ts +98 -0
- package/dist/packages/datepicker/datepicker.stories.d.ts +11 -0
- package/dist/packages/datepicker/datepicker.test.d.ts +2 -0
- package/dist/packages/datepicker/index.d.ts +1 -0
- package/dist/packages/datepicker/index.js +2781 -0
- package/dist/packages/datepicker/index.js.map +7 -0
- package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
- package/dist/packages/datepicker/utils.d.ts +13 -0
- package/dist/packages/pageindicator/index.d.ts +14 -0
- package/dist/packages/pageindicator/index.js +32 -0
- package/dist/packages/pageindicator/index.js.map +7 -0
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
- package/dist/packages/pageindicator/react.d.ts +2 -0
- package/dist/packages/pageindicator/react.js +52 -0
- package/dist/packages/pageindicator/react.js.map +7 -0
- package/dist/packages/pageindicator/style.d.ts +1 -0
- package/dist/packages/pagination/index.d.ts +3 -0
- package/dist/packages/pagination/index.js +21 -13
- package/dist/packages/pagination/index.js.map +3 -3
- package/dist/packages/pagination/react.js +21 -13
- package/dist/packages/pagination/react.js.map +3 -3
- package/dist/packages/switch/index.d.ts +20 -0
- package/dist/packages/switch/index.js +2455 -0
- package/dist/packages/switch/index.js.map +7 -0
- package/dist/packages/switch/react.d.ts +2 -0
- package/dist/packages/switch/react.js +2475 -0
- package/dist/packages/switch/react.js.map +7 -0
- package/dist/packages/switch/styles.d.ts +1 -0
- package/dist/packages/switch/switch.stories.d.ts +9 -0
- package/dist/vscode.html-custom-data.json +75 -19
- package/dist/web-types.json +180 -38
- package/package.json +6 -5
package/dist/web-types.json
CHANGED
|
@@ -1,11 +1,45 @@
|
|
|
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.2.0-next.
|
|
4
|
+
"version": "2.2.0-next.6",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "w-alert",
|
|
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)\n---\n",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [
|
|
14
|
+
{
|
|
15
|
+
"name": "variant",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": "'negative' | 'positive' | 'warning' | 'info'",
|
|
18
|
+
"default": "'info'"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "show",
|
|
23
|
+
"value": { "type": "boolean", "default": "false" }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "role",
|
|
27
|
+
"value": { "type": "string", "default": "'alert'" }
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"events": [],
|
|
31
|
+
"js": {
|
|
32
|
+
"properties": [
|
|
33
|
+
{
|
|
34
|
+
"name": "variant",
|
|
35
|
+
"type": "'negative' | 'positive' | 'warning' | 'info'"
|
|
36
|
+
},
|
|
37
|
+
{ "name": "show", "type": "boolean" },
|
|
38
|
+
{ "name": "role", "type": "string" }
|
|
39
|
+
],
|
|
40
|
+
"events": []
|
|
41
|
+
}
|
|
42
|
+
},
|
|
9
43
|
{
|
|
10
44
|
"name": "w-affix",
|
|
11
45
|
"description": "This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)\n---\n",
|
|
@@ -43,40 +77,6 @@
|
|
|
43
77
|
"events": []
|
|
44
78
|
}
|
|
45
79
|
},
|
|
46
|
-
{
|
|
47
|
-
"name": "w-alert",
|
|
48
|
-
"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)\n---\n",
|
|
49
|
-
"doc-url": "",
|
|
50
|
-
"attributes": [
|
|
51
|
-
{
|
|
52
|
-
"name": "variant",
|
|
53
|
-
"value": {
|
|
54
|
-
"type": "'negative' | 'positive' | 'warning' | 'info'",
|
|
55
|
-
"default": "'info'"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "show",
|
|
60
|
-
"value": { "type": "boolean", "default": "false" }
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "role",
|
|
64
|
-
"value": { "type": "string", "default": "'alert'" }
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"events": [],
|
|
68
|
-
"js": {
|
|
69
|
-
"properties": [
|
|
70
|
-
{
|
|
71
|
-
"name": "variant",
|
|
72
|
-
"type": "'negative' | 'positive' | 'warning' | 'info'"
|
|
73
|
-
},
|
|
74
|
-
{ "name": "show", "type": "boolean" },
|
|
75
|
-
{ "name": "role", "type": "string" }
|
|
76
|
-
],
|
|
77
|
-
"events": []
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
80
|
{
|
|
81
81
|
"name": "w-badge",
|
|
82
82
|
"description": "`w-badge` is used for showing a small amount of non-interactive color-categorized metadata, like a status or count.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-badge--docs)\n---\n",
|
|
@@ -231,6 +231,80 @@
|
|
|
231
231
|
"events": []
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
|
+
{
|
|
235
|
+
"name": "w-datepicker",
|
|
236
|
+
"description": "An input for dates.\n\nUses the `lang` attribute on either the element or on `<html>` to determine the locale options.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-datepicker--docs)\n---\n",
|
|
237
|
+
"doc-url": "",
|
|
238
|
+
"attributes": [
|
|
239
|
+
{ "name": "label", "value": { "type": "string" } },
|
|
240
|
+
{
|
|
241
|
+
"name": "lang",
|
|
242
|
+
"description": "Takes precedence over the `<html>` lang attribute.",
|
|
243
|
+
"value": { "type": "string" }
|
|
244
|
+
},
|
|
245
|
+
{ "name": "name", "value": { "type": "string" } },
|
|
246
|
+
{ "name": "value", "value": { "type": "string" } },
|
|
247
|
+
{
|
|
248
|
+
"name": "header-format",
|
|
249
|
+
"description": "Decides the format of the date as shown in the calendar header.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
250
|
+
"value": { "type": "string", "default": "'MMMM yyyy'" }
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "weekday-format",
|
|
254
|
+
"description": "Decides the format of the weekday as shown above the grid of dates in the calendar.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
255
|
+
"value": { "type": "string", "default": "'EEEEEE'" }
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "day-format",
|
|
259
|
+
"description": "Decides the format of the day in the calendar as read to screen readers.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
260
|
+
"value": { "type": "string", "default": "'PPPP'" }
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"events": [],
|
|
264
|
+
"js": {
|
|
265
|
+
"properties": [
|
|
266
|
+
{ "name": "label", "type": "string" },
|
|
267
|
+
{
|
|
268
|
+
"name": "lang",
|
|
269
|
+
"description": "Takes precedence over the `<html>` lang attribute.",
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
{ "name": "name", "type": "string" },
|
|
273
|
+
{ "name": "value", "type": "string" },
|
|
274
|
+
{
|
|
275
|
+
"name": "headerFormat",
|
|
276
|
+
"description": "Decides the format of the date as shown in the calendar header.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "weekdayFormat",
|
|
281
|
+
"description": "Decides the format of the weekday as shown above the grid of dates in the calendar.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
282
|
+
"type": "string"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "isDayDisabled",
|
|
286
|
+
"description": "Lets you control if a date in the calendar should be disabled.\n\nThis needs to be set on the element instance in JavaScript, not as an HTML attribute.",
|
|
287
|
+
"type": "(day: Date) => boolean"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "dayFormat",
|
|
291
|
+
"description": "Decides the format of the day in the calendar as read to screen readers.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
292
|
+
"type": "string"
|
|
293
|
+
},
|
|
294
|
+
{ "name": "isCalendarOpen", "type": "boolean" },
|
|
295
|
+
{ "name": "navigationDate", "type": "Date" },
|
|
296
|
+
{ "name": "selectedDate", "type": "Date | null" },
|
|
297
|
+
{ "name": "month" },
|
|
298
|
+
{ "name": "weeks" },
|
|
299
|
+
{ "name": "calendar", "type": "HTMLDivElement" },
|
|
300
|
+
{ "name": "input", "type": "HTMLInputElement" },
|
|
301
|
+
{ "name": "toggleButton", "type": "HTMLButtonElement" },
|
|
302
|
+
{ "name": "wrapper", "type": "HTMLDivElement" },
|
|
303
|
+
{ "name": "selectedCell", "type": "HTMLTableCellElement" }
|
|
304
|
+
],
|
|
305
|
+
"events": []
|
|
306
|
+
}
|
|
307
|
+
},
|
|
234
308
|
{
|
|
235
309
|
"name": "w-dead-toggle",
|
|
236
310
|
"description": "Dead toggle can be used where the appearance of a checkbox or radio is needed - but for accessibility purposes an actual input element should not be present.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-dead-toggle--docs)\n---\n",
|
|
@@ -405,9 +479,42 @@
|
|
|
405
479
|
]
|
|
406
480
|
}
|
|
407
481
|
},
|
|
482
|
+
{
|
|
483
|
+
"name": "w-pageindicator",
|
|
484
|
+
"description": "\n---\n",
|
|
485
|
+
"doc-url": "",
|
|
486
|
+
"attributes": [
|
|
487
|
+
{
|
|
488
|
+
"name": "selected-page",
|
|
489
|
+
"description": "Currently selected page (1-based index)",
|
|
490
|
+
"value": { "type": "number", "default": "1" }
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "page-count",
|
|
494
|
+
"description": "Total number of pages",
|
|
495
|
+
"value": { "type": "number", "default": "1" }
|
|
496
|
+
}
|
|
497
|
+
],
|
|
498
|
+
"events": [],
|
|
499
|
+
"js": {
|
|
500
|
+
"properties": [
|
|
501
|
+
{
|
|
502
|
+
"name": "selectedPage",
|
|
503
|
+
"description": "Currently selected page (1-based index)",
|
|
504
|
+
"type": "number"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"name": "pageCount",
|
|
508
|
+
"description": "Total number of pages",
|
|
509
|
+
"type": "number"
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"events": []
|
|
513
|
+
}
|
|
514
|
+
},
|
|
408
515
|
{
|
|
409
516
|
"name": "w-pagination",
|
|
410
|
-
"description": "Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)\n---\n",
|
|
517
|
+
"description": "Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)\n---\n\n\n### **Events:**\n - **page-click** - Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.",
|
|
411
518
|
"doc-url": "",
|
|
412
519
|
"attributes": [
|
|
413
520
|
{ "name": "base-url", "value": { "type": "string" } },
|
|
@@ -421,7 +528,13 @@
|
|
|
421
528
|
"value": { "type": "number", "default": "7" }
|
|
422
529
|
}
|
|
423
530
|
],
|
|
424
|
-
"events": [
|
|
531
|
+
"events": [
|
|
532
|
+
{
|
|
533
|
+
"name": "page-click",
|
|
534
|
+
"type": "CustomEvent",
|
|
535
|
+
"description": "Triggered when a link button in the pagination is clicked. Contains the page number in `string` form."
|
|
536
|
+
}
|
|
537
|
+
],
|
|
425
538
|
"js": {
|
|
426
539
|
"properties": [
|
|
427
540
|
{ "name": "baseUrl", "type": "string" },
|
|
@@ -429,7 +542,13 @@
|
|
|
429
542
|
{ "name": "currentPageNumber", "type": "number" },
|
|
430
543
|
{ "name": "visiblePages", "type": "number" }
|
|
431
544
|
],
|
|
432
|
-
"events": [
|
|
545
|
+
"events": [
|
|
546
|
+
{
|
|
547
|
+
"name": "page-click",
|
|
548
|
+
"type": "CustomEvent",
|
|
549
|
+
"description": "Triggered when a link button in the pagination is clicked. Contains the page number in `string` form."
|
|
550
|
+
}
|
|
551
|
+
]
|
|
433
552
|
}
|
|
434
553
|
},
|
|
435
554
|
{
|
|
@@ -570,6 +689,29 @@
|
|
|
570
689
|
"events": []
|
|
571
690
|
}
|
|
572
691
|
},
|
|
692
|
+
{
|
|
693
|
+
"name": "w-switch",
|
|
694
|
+
"description": "\n---\n\n\n### **Events:**\n - **change**",
|
|
695
|
+
"doc-url": "",
|
|
696
|
+
"attributes": [
|
|
697
|
+
{
|
|
698
|
+
"name": "value",
|
|
699
|
+
"value": { "type": "boolean", "default": "false" }
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "disabled",
|
|
703
|
+
"value": { "type": "boolean", "default": "false" }
|
|
704
|
+
}
|
|
705
|
+
],
|
|
706
|
+
"events": [{ "name": "change", "type": "CustomEvent" }],
|
|
707
|
+
"js": {
|
|
708
|
+
"properties": [
|
|
709
|
+
{ "name": "value", "type": "boolean" },
|
|
710
|
+
{ "name": "disabled", "type": "boolean" }
|
|
711
|
+
],
|
|
712
|
+
"events": [{ "name": "change", "type": "CustomEvent" }]
|
|
713
|
+
}
|
|
714
|
+
},
|
|
573
715
|
{
|
|
574
716
|
"name": "w-textfield",
|
|
575
717
|
"description": "A single line text input element.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)\n---\n",
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-ds/elements",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.0-next.
|
|
4
|
+
"version": "2.2.0-next.7",
|
|
5
5
|
"packageManager": "pnpm@10.15.1",
|
|
6
6
|
"description": "Custom elements for Warp",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
|
-
"
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"./components/affix": "./dist/packages/affix/index.js",
|
|
13
13
|
"./components/alert": "./dist/packages/alert/index.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"./custom-elements.json": "./dist/custom-elements.json",
|
|
28
28
|
"./react/*": {
|
|
29
29
|
"types": "./dist/packages/*/react.d.ts",
|
|
30
|
-
"
|
|
30
|
+
"import": "./dist/packages/*/react.js"
|
|
31
31
|
},
|
|
32
32
|
"./*": {
|
|
33
33
|
"types": "./dist/packages/*/index.d.ts",
|
|
34
|
-
"
|
|
34
|
+
"import": "./dist/packages/*/index.js"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"main": "./dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"build": "rimraf dist && rimraf eik && pnpm run messages:compile && tsc && pnpm run build:manifest && pnpm run build:npm && pnpm build:eik",
|
|
53
53
|
"commit": "cz",
|
|
54
54
|
"dev": "vite",
|
|
55
|
-
"storybook": "storybook dev",
|
|
55
|
+
"storybook": "storybook dev --port 63900",
|
|
56
56
|
"lint:check": "eslint .",
|
|
57
57
|
"lint": "eslint . --fix",
|
|
58
58
|
"messages:compile": "lingui compile",
|
|
@@ -139,6 +139,7 @@
|
|
|
139
139
|
"@warp-ds/elements-core": "2.0.1",
|
|
140
140
|
"@warp-ds/icons": "2.5.0",
|
|
141
141
|
"@wc-toolkit/type-parser": "^1.2.0",
|
|
142
|
+
"date-fns": "^4.1.0",
|
|
142
143
|
"scroll-doctor": "2.0.2"
|
|
143
144
|
},
|
|
144
145
|
"publishConfig": {
|