@warp-ds/elements 2.9.0-next.1 → 2.9.0-next.3

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.
Files changed (92) hide show
  1. package/dist/custom-elements.json +17 -10
  2. package/dist/docs/affix/affix.md +56 -0
  3. package/dist/docs/affix/api.md +48 -0
  4. package/dist/docs/alert/accessibility.md +30 -0
  5. package/dist/docs/alert/alert.md +208 -0
  6. package/dist/docs/alert/api.md +39 -0
  7. package/dist/docs/alert/examples.md +84 -0
  8. package/dist/docs/alert/usage.md +42 -0
  9. package/dist/docs/attention/api.md +132 -0
  10. package/dist/docs/attention/attention.md +138 -0
  11. package/dist/docs/badge/api.md +28 -0
  12. package/dist/docs/badge/badge.md +36 -0
  13. package/dist/docs/box/api.md +52 -0
  14. package/dist/docs/box/box.md +60 -0
  15. package/dist/docs/breadcrumbs/api.md +20 -0
  16. package/dist/docs/breadcrumbs/breadcrumbs.md +28 -0
  17. package/dist/docs/button/api.md +155 -0
  18. package/dist/docs/button/button.md +163 -0
  19. package/dist/docs/card/api.md +44 -0
  20. package/dist/docs/card/card.md +52 -0
  21. package/dist/docs/combobox/api.md +132 -0
  22. package/dist/docs/combobox/combobox.md +140 -0
  23. package/dist/docs/datepicker/api.md +192 -0
  24. package/dist/docs/datepicker/datepicker.md +202 -0
  25. package/dist/docs/expandable/api.md +100 -0
  26. package/dist/docs/expandable/expandable.md +108 -0
  27. package/dist/docs/link/api.md +87 -0
  28. package/dist/docs/link/link.md +95 -0
  29. package/dist/docs/page-indicator/api.md +28 -0
  30. package/dist/docs/page-indicator/page-indicator.md +35 -0
  31. package/dist/docs/pagination/api.md +44 -0
  32. package/dist/docs/pagination/pagination.md +52 -0
  33. package/dist/docs/pill/api.md +76 -0
  34. package/dist/docs/pill/pill.md +84 -0
  35. package/dist/docs/select/api.md +116 -0
  36. package/dist/docs/select/select.md +124 -0
  37. package/dist/docs/slider/api.md +214 -0
  38. package/dist/docs/slider/slider.md +222 -0
  39. package/dist/docs/slider-thumb/api.md +116 -0
  40. package/dist/docs/slider-thumb/slider-thumb.md +124 -0
  41. package/dist/docs/step/api.md +28 -0
  42. package/dist/docs/step/step.md +34 -0
  43. package/dist/docs/step-indicator/api.md +28 -0
  44. package/dist/docs/step-indicator/step-indicator.md +36 -0
  45. package/dist/docs/switch/api.md +52 -0
  46. package/dist/docs/switch/switch.md +58 -0
  47. package/dist/docs/tab/api.md +76 -0
  48. package/dist/docs/tab/tab.md +84 -0
  49. package/dist/docs/tab-panel/api.md +21 -0
  50. package/dist/docs/tab-panel/tab-panel.md +30 -0
  51. package/dist/docs/tabs/api.md +36 -0
  52. package/dist/docs/tabs/tabs.md +44 -0
  53. package/dist/docs/textarea/api.md +156 -0
  54. package/dist/docs/textarea/textarea.md +164 -0
  55. package/dist/docs/textfield/api.md +194 -0
  56. package/dist/docs/textfield/textfield.md +202 -0
  57. package/dist/docs/toast-container/api.md +14 -0
  58. package/dist/docs/toast-container/toast-container.md +20 -0
  59. package/dist/index.d.ts +0 -2
  60. package/dist/packages/affix/affix.js +5 -5
  61. package/dist/packages/affix/affix.js.map +2 -2
  62. package/dist/packages/alert/alert.d.ts +15 -0
  63. package/dist/packages/alert/alert.js +6 -6
  64. package/dist/packages/alert/alert.js.map +2 -2
  65. package/dist/packages/alert/alert.test.js +1 -1
  66. package/dist/packages/attention/attention.d.ts +0 -1
  67. package/dist/packages/attention/attention.js +21 -21
  68. package/dist/packages/attention/attention.js.map +4 -4
  69. package/dist/packages/datepicker/DatePicker.test.js +5 -5
  70. package/dist/packages/datepicker/datepicker.js +1 -1
  71. package/dist/packages/datepicker/datepicker.js.map +2 -2
  72. package/dist/packages/expandable/expandable.js +7 -7
  73. package/dist/packages/expandable/expandable.js.map +2 -2
  74. package/dist/packages/icon/icon.js +2 -2
  75. package/dist/packages/icon/icon.js.map +2 -2
  76. package/dist/packages/icon/icon.test.js +14 -0
  77. package/dist/packages/modal-header/modal-header.js +6 -6
  78. package/dist/packages/modal-header/modal-header.js.map +2 -2
  79. package/dist/packages/pagination/pagination.js +3 -3
  80. package/dist/packages/pagination/pagination.js.map +2 -2
  81. package/dist/packages/pill/pill.js +3 -3
  82. package/dist/packages/pill/pill.js.map +2 -2
  83. package/dist/packages/select/select.js +4 -4
  84. package/dist/packages/select/select.js.map +2 -2
  85. package/dist/packages/step/step.js +4 -4
  86. package/dist/packages/step/step.js.map +2 -2
  87. package/dist/packages/toast/toast.js +4 -4
  88. package/dist/packages/toast/toast.js.map +2 -2
  89. package/dist/web-types.json +18 -5
  90. package/package.json +26 -23
  91. package/dist/packages/utils/index.d.ts +0 -10
  92. package/dist/packages/utils/index.js +0 -37
@@ -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.6",
4
+ "version": "2.9.0-next.2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -94,10 +94,14 @@
94
94
  {
95
95
  "name": "variant",
96
96
  "value": {
97
- "type": "'negative' | 'positive' | 'warning' | 'info'"
97
+ "type": "'negative' | 'positive' | 'warning' | 'info'",
98
+ "default": "'info'"
98
99
  }
99
100
  },
100
- { "name": "show", "value": { "type": "boolean" } },
101
+ {
102
+ "name": "show",
103
+ "value": { "type": "boolean", "default": "false" }
104
+ },
101
105
  {
102
106
  "name": "role",
103
107
  "value": { "type": "string", "default": "'alert'" }
@@ -108,10 +112,19 @@
108
112
  "properties": [
109
113
  {
110
114
  "name": "variant",
115
+ "description": "Controls both the color treatment and icon used by the component. Accepted values are `info`, `warning`, `positive`, and `negative`. Use the variant that matches the message severity so users can quickly distinguish informative messages from warnings, errors, and confirmations.",
111
116
  "type": "'negative' | 'positive' | 'warning' | 'info'"
112
117
  },
113
- { "name": "show", "type": "boolean" },
114
- { "name": "role", "type": "string" }
118
+ {
119
+ "name": "show",
120
+ "description": "Alerts are hidden by default (`false`). Set this to `true` to render and expand the content. This is reflected as an attribute, so visibility can be controlled from markup (`show`) or from JavaScript (`element.show = true`).",
121
+ "type": "boolean"
122
+ },
123
+ {
124
+ "name": "role",
125
+ "description": "Defaults to `alert` so urgent changes are announced by screen readers. Override this only when your use case requires a different announcement behavior, for example a less assertive live region strategy.",
126
+ "type": "string"
127
+ }
115
128
  ],
116
129
  "events": []
117
130
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@warp-ds/elements",
3
3
  "type": "module",
4
- "version": "2.9.0-next.1",
5
- "packageManager": "pnpm@10.30.3",
4
+ "version": "2.9.0-next.3",
5
+ "packageManager": "pnpm@10.33.0",
6
6
  "description": "Custom elements for Warp",
7
7
  "exports": {
8
8
  ".": {
@@ -140,6 +140,9 @@
140
140
  "types": "./dist/packages/*/react.d.ts",
141
141
  "import": "./dist/packages/*/react.js"
142
142
  },
143
+ "./docs/*": {
144
+ "default": "./dist/docs/*"
145
+ },
143
146
  "./*": {
144
147
  "types": "./dist/packages/*/*.d.ts",
145
148
  "import": "./dist/packages/*/*.js"
@@ -270,6 +273,7 @@
270
273
  "build:bundle": "tsc --project tsconfig.json --outDir .tmp --declaration false --sourceMap true && rollup -c ./build/bundle.js && rimraf .tmp",
271
274
  "build:cloak": "node ./build/cloak.js",
272
275
  "build:components": "node ./build/components.js",
276
+ "build:docs": "node ./build/docs.js",
273
277
  "build:eik-components-backwards-compat": "node ./build/components-eik.js",
274
278
  "build:editor": "node ./build/editor.js",
275
279
  "build:entrypoint": "node ./build/entrypoint.js",
@@ -277,7 +281,7 @@
277
281
  "build:polyfill": "node ./build/polyfill.js",
278
282
  "build:storybook": "pnpm run messages:compile && tsc && pnpm run build:manifest && pnpm run build:entrypoint && storybook build && pnpm run build:polyfill && touch ./storybook-static/.nojekyll",
279
283
  "build:styles": "node ./build/styles.js",
280
- "build": "rimraf dist && rimraf eik && pnpm messages:compile && tsc && pnpm build:manifest && pnpm build:editor && pnpm build:components && pnpm run build:cloak && pnpm build:bundle && pnpm build:eik-components-backwards-compat && pnpm run build:polyfill",
284
+ "build": "rimraf dist && rimraf eik && pnpm messages:compile && tsc && pnpm build:manifest && pnpm build:editor && pnpm build:components && pnpm run build:cloak && pnpm build:bundle && pnpm build:eik-components-backwards-compat && pnpm run build:polyfill && pnpm run build:docs",
281
285
  "check": "pnpm biome check --write .",
282
286
  "clean": "rimraf .pnpm-store node_modules dist eik storybook-static entrypoint.js",
283
287
  "commit": "cz",
@@ -319,29 +323,28 @@
319
323
  "@rollup/plugin-commonjs": "^29.0.0",
320
324
  "@rollup/plugin-node-resolve": "^16.0.1",
321
325
  "@rollup/plugin-replace": "^6.0.2",
322
- "@rollup/plugin-terser": "^0.4.4",
326
+ "@rollup/plugin-terser": "^1.0.0",
323
327
  "@semantic-release/changelog": "6.0.3",
324
328
  "@semantic-release/git": "10.0.1",
325
- "@storybook/addon-a11y": "^9.1.4",
326
- "@storybook/addon-docs": "^9.1.4",
327
- "@storybook/addon-essentials": "^8.6.14",
328
- "@storybook/addon-interactions": "^8.6.14",
329
- "@storybook/builder-vite": "^9.1.4",
330
- "@storybook/react": "^9.1.10",
331
- "@storybook/react-vite": "^9.1.10",
332
- "@storybook/web-components": "^9.1.4",
333
- "@storybook/web-components-vite": "^9.1.4",
329
+ "@storybook/addon-a11y": "^10.3.5",
330
+ "@storybook/addon-docs": "^10.3.5",
331
+ "@storybook/builder-vite": "^10.3.5",
332
+ "@storybook/react": "^10.3.5",
333
+ "@storybook/react-vite": "^10.3.5",
334
+ "@storybook/web-components": "^10.3.5",
335
+ "@storybook/web-components-vite": "^10.3.5",
334
336
  "@types/node": "24.10.15",
335
337
  "@types/react": "^19.2.0",
336
338
  "@types/react-dom": "^19.2.0",
337
- "@unocss/core": "^66.5.0",
338
- "@vitejs/plugin-react": "^5.0.2",
339
- "@vitest/browser": "^3.2.4",
340
- "@vitest/utils": "^3.2.4",
339
+ "@vitejs/plugin-react": "^6.0.1",
340
+ "@vitest/browser": "^4.1.4",
341
+ "@vitest/browser-playwright": "^4.1.4",
342
+ "@vitest/utils": "^4.1.4",
341
343
  "@warp-ds/core": "1.1.8",
342
344
  "@warp-ds/css": "2.1.1",
343
345
  "@warp-ds/uno": "2.1.0",
344
346
  "@wc-toolkit/cem-validator": "^1.0.3",
347
+ "@wc-toolkit/jsdoc-tags": "^1.2.0",
345
348
  "@wc-toolkit/jsx-types": "^1.4.2",
346
349
  "@wc-toolkit/storybook-helpers": "^10.0.0",
347
350
  "@wc-toolkit/type-parser": "^1.2.0",
@@ -366,14 +369,14 @@
366
369
  "rollup": "^4.52.3",
367
370
  "scroll-doctor": "2.0.2",
368
371
  "semantic-release": "25.0.3",
369
- "storybook": "^9.1.4",
372
+ "storybook": "^10.3.5",
370
373
  "tslib": "^2.8.1",
371
374
  "typescript": "5.5.3",
372
- "unocss": "0.x",
373
- "vite": "^6.0.0",
374
- "vitest": "^3.2.4",
375
- "vitest-browser-lit": "^0.1.0",
376
- "vitest-browser-react": "^1.0.1"
375
+ "unocss": "^66.6.8",
376
+ "vite": "^8.0.8",
377
+ "vitest": "^4.1.4",
378
+ "vitest-browser-lit": "^1.0.1",
379
+ "vitest-browser-react": "^2.2.0"
377
380
  },
378
381
  "dependencies": {
379
382
  "@lit/react": "^1.0.8",
@@ -1,10 +0,0 @@
1
- export function kebabCaseAttributes(constructor: any): {
2
- new (): {
3
- [x: string]: any;
4
- };
5
- [x: string]: any;
6
- createProperty(name: any, options: any): void;
7
- };
8
- export function classes(defn: any): string;
9
- export function fclasses(definition: any): import("lit/async-directive.js").DirectiveResult<typeof import("lit/directives/class-map.js").ClassMapDirective>;
10
- export function generateRandomId(): string;
@@ -1,37 +0,0 @@
1
- import { classMap } from 'lit/directives/class-map.js';
2
- const camelCaseToKebabCase = (str) => str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
3
- // Source: https://medium.com/@dayton-bobbitt/generating-attributes-for-litelement-properties-f972ef658137
4
- export function kebabCaseAttributes(constructor) {
5
- return class extends constructor {
6
- static createProperty(name, options) {
7
- let customOptions = options;
8
- // derive the attribute name if not already defined or disabled
9
- if (typeof options?.attribute === 'undefined' || options?.attribute === true) {
10
- customOptions = Object.assign({}, options, {
11
- attribute: camelCaseToKebabCase(name.toString()),
12
- });
13
- }
14
- super.createProperty(name, customOptions);
15
- }
16
- };
17
- }
18
- export function classes(defn) {
19
- const classes = [];
20
- for (const [key, value] of Object.entries(defn)) {
21
- if (value)
22
- classes.push(key);
23
- }
24
- return classes.join(' ');
25
- }
26
- export function fclasses(definition) {
27
- const defn = {};
28
- for (const [key, value] of Object.entries(definition)) {
29
- for (const className of key.split(' ')) {
30
- defn[className] = value;
31
- }
32
- }
33
- return classMap(defn);
34
- }
35
- export function generateRandomId() {
36
- return `m${Math.random().toString(36).slice(2)}`;
37
- }