@warp-ds/elements 2.9.2-next.1 → 2.10.0-next.10

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 (283) hide show
  1. package/README.md +4 -0
  2. package/dist/api.js +1 -1
  3. package/dist/api.js.map +1 -1
  4. package/dist/custom-elements.json +508 -145
  5. package/dist/docs/affix/affix.md +2 -2
  6. package/dist/docs/affix/styling.md +1 -0
  7. package/dist/docs/alert/alert.md +2 -2
  8. package/dist/docs/alert/styling.md +1 -0
  9. package/dist/docs/attention/attention.md +2 -0
  10. package/dist/docs/attention/styling.md +1 -0
  11. package/dist/docs/badge/badge.md +2 -0
  12. package/dist/docs/badge/styling.md +1 -0
  13. package/dist/docs/box/box.md +22 -40
  14. package/dist/docs/box/examples.md +20 -38
  15. package/dist/docs/box/styling.md +1 -0
  16. package/dist/docs/breadcrumbs/breadcrumbs.md +8 -2
  17. package/dist/docs/breadcrumbs/examples.md +7 -1
  18. package/dist/docs/breadcrumbs/styling.md +1 -0
  19. package/dist/docs/button/accessibility.md +42 -0
  20. package/dist/docs/button/api.md +63 -39
  21. package/dist/docs/button/button.md +395 -42
  22. package/dist/docs/button/examples.md +126 -0
  23. package/dist/docs/button/styling.md +72 -0
  24. package/dist/docs/button/usage.md +89 -0
  25. package/dist/docs/card/accessibility.md +74 -0
  26. package/dist/docs/card/api.md +9 -3
  27. package/dist/docs/card/card.md +236 -5
  28. package/dist/docs/card/examples.md +75 -0
  29. package/dist/docs/card/styling.md +1 -0
  30. package/dist/docs/card/usage.md +76 -0
  31. package/dist/docs/checkbox/api.md +128 -0
  32. package/dist/docs/checkbox/checkbox.md +134 -0
  33. package/dist/docs/checkbox-group/accessibility.md +71 -0
  34. package/dist/docs/checkbox-group/api.md +79 -0
  35. package/dist/docs/checkbox-group/checkbox-group.md +492 -0
  36. package/dist/docs/checkbox-group/examples.md +105 -0
  37. package/dist/docs/checkbox-group/styling.md +132 -0
  38. package/dist/docs/checkbox-group/usage.md +95 -0
  39. package/dist/docs/combobox/accessibility.md +71 -0
  40. package/dist/docs/combobox/api.md +60 -30
  41. package/dist/docs/combobox/combobox.md +205 -32
  42. package/dist/docs/combobox/examples.md +44 -0
  43. package/dist/docs/combobox/styling.md +1 -0
  44. package/dist/docs/combobox/usage.md +28 -0
  45. package/dist/docs/datepicker/accessibility.md +25 -0
  46. package/dist/docs/datepicker/api.md +22 -14
  47. package/dist/docs/datepicker/datepicker.md +208 -16
  48. package/dist/docs/datepicker/examples.md +75 -0
  49. package/dist/docs/datepicker/styling.md +1 -0
  50. package/dist/docs/datepicker/usage.md +84 -0
  51. package/dist/docs/expandable/api.md +20 -32
  52. package/dist/docs/expandable/examples.md +54 -0
  53. package/dist/docs/expandable/expandable.md +74 -32
  54. package/dist/docs/expandable/styling.md +1 -0
  55. package/dist/docs/icon/accessibility.md +5 -0
  56. package/dist/docs/icon/api.md +43 -0
  57. package/dist/docs/icon/examples.md +45 -0
  58. package/dist/docs/icon/icon.md +115 -0
  59. package/dist/docs/icon/styling.md +1 -0
  60. package/dist/docs/icon/usage.md +11 -0
  61. package/dist/docs/index.md +46 -0
  62. package/dist/docs/link/api.md +18 -22
  63. package/dist/docs/link/examples.md +75 -0
  64. package/dist/docs/link/link.md +113 -24
  65. package/dist/docs/link/styling.md +1 -0
  66. package/dist/docs/link/usage.md +18 -0
  67. package/dist/docs/modal/api.md +51 -0
  68. package/dist/docs/modal/examples.md +67 -0
  69. package/dist/docs/modal/modal.md +240 -0
  70. package/dist/docs/modal/styling.md +1 -0
  71. package/dist/docs/modal/usage.md +110 -0
  72. package/dist/docs/modal-footer/api.md +11 -0
  73. package/dist/docs/modal-footer/modal-footer.md +17 -0
  74. package/dist/docs/modal-header/api.md +42 -0
  75. package/dist/docs/modal-header/modal-header.md +48 -0
  76. package/dist/docs/page-indicator/api.md +6 -6
  77. package/dist/docs/page-indicator/examples.md +8 -0
  78. package/dist/docs/page-indicator/page-indicator.md +25 -6
  79. package/dist/docs/page-indicator/styling.md +1 -0
  80. package/dist/docs/page-indicator/usage.md +8 -0
  81. package/dist/docs/pagination/api.md +12 -10
  82. package/dist/docs/pagination/examples.md +20 -0
  83. package/dist/docs/pagination/pagination.md +52 -12
  84. package/dist/docs/pagination/styling.md +1 -0
  85. package/dist/docs/pagination/usage.md +18 -0
  86. package/dist/docs/pill/accessibility.md +2 -0
  87. package/dist/docs/pill/api.md +10 -26
  88. package/dist/docs/pill/examples.md +23 -0
  89. package/dist/docs/pill/pill.md +45 -28
  90. package/dist/docs/pill/styling.md +1 -0
  91. package/dist/docs/pill/usage.md +8 -0
  92. package/dist/docs/radio/radio.md +1 -7
  93. package/dist/docs/select/select.md +2 -0
  94. package/dist/docs/select/styling.md +1 -0
  95. package/dist/docs/slider/slider.md +2 -0
  96. package/dist/docs/slider/styling.md +1 -0
  97. package/dist/docs/slider-thumb/slider-thumb.md +2 -0
  98. package/dist/docs/slider-thumb/styling.md +1 -0
  99. package/dist/docs/step-indicator/step-indicator.md +2 -0
  100. package/dist/docs/step-indicator/styling.md +1 -0
  101. package/dist/docs/switch/styling.md +1 -0
  102. package/dist/docs/switch/switch.md +2 -0
  103. package/dist/docs/tabs/styling.md +1 -0
  104. package/dist/docs/tabs/tabs.md +2 -0
  105. package/dist/docs/textarea/styling.md +1 -0
  106. package/dist/docs/textarea/textarea.md +2 -0
  107. package/dist/docs/textfield/styling.md +1 -0
  108. package/dist/docs/textfield/textfield.md +2 -0
  109. package/dist/index.d.ts +950 -602
  110. package/dist/packages/affix/affix.hydration.test.js +1 -1
  111. package/dist/packages/affix/affix.js +4 -4
  112. package/dist/packages/affix/affix.js.map +4 -4
  113. package/dist/packages/alert/alert.hydration.test.js +1 -1
  114. package/dist/packages/alert/alert.js +3 -3
  115. package/dist/packages/alert/alert.js.map +3 -3
  116. package/dist/packages/attention/attention.hydration.test.js +1 -1
  117. package/dist/packages/attention/attention.js +397 -444
  118. package/dist/packages/attention/attention.js.map +4 -4
  119. package/dist/packages/attention/attention.test.js +1 -1
  120. package/dist/packages/badge/badge.hydration.test.js +1 -1
  121. package/dist/packages/box/box.hydration.test.js +1 -1
  122. package/dist/packages/box/box.js +1 -1
  123. package/dist/packages/box/box.js.map +1 -1
  124. package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +3 -2
  125. package/dist/packages/breadcrumbs/breadcrumbs.js +4 -4
  126. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  127. package/dist/packages/button/button.d.ts +54 -37
  128. package/dist/packages/button/button.hydration.test.js +1 -1
  129. package/dist/packages/button/button.js +385 -432
  130. package/dist/packages/button/button.js.map +4 -4
  131. package/dist/packages/button/button.react.stories.d.ts +2 -2
  132. package/dist/packages/button/button.stories.d.ts +29 -0
  133. package/dist/packages/button/button.stories.js +176 -2
  134. package/dist/packages/button/react.d.ts +1 -1
  135. package/dist/packages/button/styles.d.ts +22 -1
  136. package/dist/packages/button/styles.js +390 -1
  137. package/dist/packages/card/card.d.ts +9 -6
  138. package/dist/packages/card/card.hydration.test.js +1 -1
  139. package/dist/packages/card/card.js +3 -3
  140. package/dist/packages/card/card.js.map +4 -4
  141. package/dist/packages/checkbox/checkbox.d.ts +45 -14
  142. package/dist/packages/checkbox/checkbox.hydration.test.js +1 -1
  143. package/dist/packages/checkbox/checkbox.js +3 -3
  144. package/dist/packages/checkbox/checkbox.js.map +3 -3
  145. package/dist/packages/checkbox/checkbox.react.stories.d.ts +1 -1
  146. package/dist/packages/checkbox/checkbox.stories.d.ts +2 -2
  147. package/dist/packages/checkbox/checkbox.test.js +1 -1
  148. package/dist/packages/checkbox/react.d.ts +2 -2
  149. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +1 -1
  150. package/dist/packages/checkbox-group/checkbox-group.d.ts +35 -8
  151. package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +1 -1
  152. package/dist/packages/checkbox-group/checkbox-group.js +6 -6
  153. package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
  154. package/dist/packages/checkbox-group/react.d.ts +3 -3
  155. package/dist/packages/combobox/combobox.a11y.test.js +24 -0
  156. package/dist/packages/combobox/combobox.d.ts +65 -45
  157. package/dist/packages/combobox/combobox.hydration.test.js +39 -1
  158. package/dist/packages/combobox/combobox.js +21 -21
  159. package/dist/packages/combobox/combobox.js.map +4 -4
  160. package/dist/packages/combobox/combobox.stories.js +28 -15
  161. package/dist/packages/combobox/combobox.test.js +110 -0
  162. package/dist/packages/datepicker/DatePicker.test.js +1 -1
  163. package/dist/packages/datepicker/datepicker.d.ts +22 -30
  164. package/dist/packages/datepicker/datepicker.hydration.test.js +1 -1
  165. package/dist/packages/datepicker/datepicker.js +49 -49
  166. package/dist/packages/datepicker/datepicker.js.map +4 -4
  167. package/dist/packages/datepicker/datepicker.test.js +1 -1
  168. package/dist/packages/expandable/expandable.d.ts +11 -32
  169. package/dist/packages/expandable/expandable.hydration.test.js +1 -1
  170. package/dist/packages/expandable/expandable.js +11 -11
  171. package/dist/packages/expandable/expandable.js.map +3 -3
  172. package/dist/packages/expandable/expandable.react.stories.d.ts +2 -2
  173. package/dist/packages/expandable/react.d.ts +1 -1
  174. package/dist/packages/icon/icon.d.ts +16 -4
  175. package/dist/packages/icon/icon.hydration.test.js +1 -1
  176. package/dist/packages/icon/icon.js +2 -2
  177. package/dist/packages/icon/icon.js.map +3 -3
  178. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  179. package/dist/packages/icon/react.d.ts +2 -2
  180. package/dist/packages/link/link.d.ts +15 -16
  181. package/dist/packages/link/link.hydration.test.js +1 -1
  182. package/dist/packages/link/link.js +420 -190
  183. package/dist/packages/link/link.js.map +4 -4
  184. package/dist/packages/link/link.test.js +1 -1
  185. package/dist/packages/link/styles.d.ts +5 -0
  186. package/dist/packages/link/styles.js +80 -0
  187. package/dist/packages/modal/index.d.ts +4 -4
  188. package/dist/packages/modal/index.js +4 -4
  189. package/dist/packages/modal/modal.d.ts +22 -12
  190. package/dist/packages/modal/modal.hydration.test.js +1 -1
  191. package/dist/packages/modal/modal.js +5 -5
  192. package/dist/packages/modal/modal.js.map +3 -3
  193. package/dist/packages/modal/modal.react.stories.d.ts +3 -3
  194. package/dist/packages/modal/modal.stories.d.ts +2 -1
  195. package/dist/packages/modal/modal.stories.js +85 -3
  196. package/dist/packages/modal/react.d.ts +2 -2
  197. package/dist/packages/modal-footer/modal-footer.d.ts +5 -3
  198. package/dist/packages/modal-footer/modal-footer.js +4 -4
  199. package/dist/packages/modal-footer/modal-footer.js.map +3 -3
  200. package/dist/packages/modal-footer/react.d.ts +1 -1
  201. package/dist/packages/modal-header/modal-header.d.ts +21 -11
  202. package/dist/packages/modal-header/modal-header.js +11 -9
  203. package/dist/packages/modal-header/modal-header.js.map +4 -4
  204. package/dist/packages/modal-header/react.d.ts +2 -2
  205. package/dist/packages/page-indicator/page-indicator.d.ts +9 -14
  206. package/dist/packages/page-indicator/page-indicator.hydration.test.js +1 -1
  207. package/dist/packages/page-indicator/page-indicator.js +5 -5
  208. package/dist/packages/page-indicator/page-indicator.js.map +4 -4
  209. package/dist/packages/pagination/pagination.d.ts +11 -11
  210. package/dist/packages/pagination/pagination.hydration.test.js +1 -1
  211. package/dist/packages/pagination/pagination.js +4 -4
  212. package/dist/packages/pagination/pagination.js.map +4 -4
  213. package/dist/packages/pagination/pagination.test.js +1 -1
  214. package/dist/packages/pill/pill.d.ts +14 -29
  215. package/dist/packages/pill/pill.hydration.test.js +1 -1
  216. package/dist/packages/pill/pill.js +3 -3
  217. package/dist/packages/pill/pill.js.map +4 -4
  218. package/dist/packages/pill/pill.react.stories.d.ts +2 -2
  219. package/dist/packages/pill/react.d.ts +1 -1
  220. package/dist/packages/radio/radio.hydration.test.js +1 -1
  221. package/dist/packages/radio/radio.js +3 -3
  222. package/dist/packages/radio/radio.js.map +3 -3
  223. package/dist/packages/radio/radio.test.js +1 -1
  224. package/dist/packages/radio-group/radio-group.a11y.test.js +7 -3
  225. package/dist/packages/radio-group/radio-group.hydration.test.js +6 -2
  226. package/dist/packages/radio-group/radio-group.js +11 -11
  227. package/dist/packages/radio-group/radio-group.js.map +4 -4
  228. package/dist/packages/select/select.a11y.test.js +6 -2
  229. package/dist/packages/select/select.hydration.test.js +1 -1
  230. package/dist/packages/select/select.js +7 -7
  231. package/dist/packages/select/select.js.map +4 -4
  232. package/dist/packages/select/select.test.js +4 -2
  233. package/dist/packages/slider/slider.hydration.test.js +7 -2
  234. package/dist/packages/slider/slider.js +5 -5
  235. package/dist/packages/slider/slider.js.map +4 -4
  236. package/dist/packages/slider/slider.react.stories.js +2 -2
  237. package/dist/packages/slider/slider.test.js +1 -1
  238. package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +1 -1
  239. package/dist/packages/slider-thumb/slider-thumb.js +20 -20
  240. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  241. package/dist/packages/step/step.hydration.test.js +1 -1
  242. package/dist/packages/step/step.js +8 -8
  243. package/dist/packages/step/step.js.map +4 -4
  244. package/dist/packages/step-indicator/step-indicator.hydration.test.js +1 -1
  245. package/dist/packages/switch/switch.a11y.test.js +1 -1
  246. package/dist/packages/switch/switch.hydration.test.js +1 -1
  247. package/dist/packages/switch/switch.js +1 -1
  248. package/dist/packages/switch/switch.js.map +1 -1
  249. package/dist/packages/tab/tab.hydration.test.js +1 -1
  250. package/dist/packages/tab/tab.js +10 -10
  251. package/dist/packages/tab/tab.js.map +2 -2
  252. package/dist/packages/tab-panel/tab-panel.hydration.test.js +1 -1
  253. package/dist/packages/tab-panel/tab-panel.js +3 -3
  254. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  255. package/dist/packages/tabs/tabs.a11y.test.js +2 -2
  256. package/dist/packages/tabs/tabs.hydration.test.js +1 -1
  257. package/dist/packages/tabs/tabs.js +1 -1
  258. package/dist/packages/tabs/tabs.js.map +2 -2
  259. package/dist/packages/tabs/tabs.test.js +4 -4
  260. package/dist/packages/textarea/textarea.hydration.test.js +1 -1
  261. package/dist/packages/textarea/textarea.js +4 -4
  262. package/dist/packages/textarea/textarea.js.map +3 -3
  263. package/dist/packages/textarea/textarea.test.js +1 -1
  264. package/dist/packages/textfield/textfield.hydration.test.js +1 -1
  265. package/dist/packages/textfield/textfield.js +1 -1
  266. package/dist/packages/textfield/textfield.js.map +1 -1
  267. package/dist/packages/textfield/textfield.test.js +1 -1
  268. package/dist/packages/toast/toast.js +6 -6
  269. package/dist/packages/toast/toast.js.map +4 -4
  270. package/dist/packages/toast/toast.stories.d.ts +1 -5
  271. package/dist/packages/toast/toast.stories.js +0 -17
  272. package/dist/packages/toast-container/toast-container.js +2 -2
  273. package/dist/packages/toast-container/toast-container.js.map +2 -2
  274. package/dist/web-types.json +509 -172
  275. package/eik/index.js +2536 -0
  276. package/package.json +18 -12
  277. package/dist/docs/radio/examples.md +0 -1
  278. package/dist/docs/radio/usage.md +0 -1
  279. package/dist/packages/button/styles/w-button.styles.d.ts +0 -1
  280. package/dist/packages/button/styles/w-button.styles.js +0 -282
  281. package/dist/packages/link/styles/w-link.styles.d.ts +0 -1
  282. package/dist/packages/link/styles/w-link.styles.js +0 -213
  283. /package/dist/docs/{radio → modal}/accessibility.md +0 -0
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@warp-ds/elements",
3
3
  "type": "module",
4
- "version": "2.9.2-next.1",
5
- "packageManager": "pnpm@10.33.2",
4
+ "version": "2.10.0-next.10",
5
+ "packageManager": "pnpm@11.1.0",
6
+ "browserslist": [
7
+ "supports es6-module and > 0.25% in FI or > 0.25% in NO or > 0.25% in SE or > 0.25% in DK and not dead and not Safari < 15 and not iOS < 15",
8
+ "not chrome < 61"
9
+ ],
6
10
  "description": "Custom elements for Warp",
7
11
  "exports": {
8
12
  ".": {
@@ -140,16 +144,13 @@
140
144
  "types": "./dist/packages/*/react.d.ts",
141
145
  "import": "./dist/packages/*/react.js"
142
146
  },
143
- "./docs/*": {
144
- "default": "./dist/docs/*"
145
- },
146
147
  "./*": {
147
148
  "types": "./dist/packages/*/*.d.ts",
148
149
  "import": "./dist/packages/*/*.js"
149
150
  }
150
151
  },
151
- "main": "./dist/index.js",
152
- "module": "./dist/index.js",
152
+ "main": "./eik/index.js",
153
+ "module": "./eik/index.js",
153
154
  "customElements": "./dist/custom-elements.json",
154
155
  "web-types": "./dist/web-types.json",
155
156
  "types": "./dist/index.d.ts",
@@ -267,7 +268,8 @@
267
268
  },
268
269
  "files": [
269
270
  "./dist/",
270
- "./dist/custom-elements.json"
271
+ "./dist/custom-elements.json",
272
+ "./eik/index.js"
271
273
  ],
272
274
  "scripts": {
273
275
  "build:bundle": "tsc --project tsconfig.json --outDir .tmp --declaration false --sourceMap true && rollup -c ./build/bundle.js && rimraf .tmp",
@@ -291,6 +293,7 @@
291
293
  "format": "pnpm biome format --write .",
292
294
  "lint:check": "pnpm biome lint .",
293
295
  "lint": "pnpm biome lint --write .",
296
+ "lint:package": "publint",
294
297
  "messages:compile": "lingui compile",
295
298
  "messages:extract": "lingui extract",
296
299
  "prepare": "husky",
@@ -307,7 +310,7 @@
307
310
  },
308
311
  "license": "Apache-2.0",
309
312
  "devDependencies": {
310
- "@biomejs/biome": "2.4.14",
313
+ "@biomejs/biome": "2.4.15",
311
314
  "@chbphone55/classnames": "2.0.0",
312
315
  "@custom-elements-manifest/analyzer": "^0.11.0",
313
316
  "@eik/cli": "2.0.39",
@@ -316,13 +319,14 @@
316
319
  "@lingui/cli": "5.9.5",
317
320
  "@lingui/conf": "5.9.5",
318
321
  "@lingui/core": "5.9.5",
319
- "@lit-labs/rollup-plugin-minify-html-literals": "^0.1.0",
322
+ "@lit-labs/rollup-plugin-minify-html-literals": "^0.2.0",
320
323
  "@oddbird/css-anchor-positioning": "^0.9.0",
321
324
  "@open-wc/form-control": "^1.0.0",
322
325
  "@open-wc/lit-helpers": "^0.7.0",
323
326
  "@rollup/plugin-commonjs": "^29.0.0",
324
327
  "@rollup/plugin-node-resolve": "^16.0.1",
325
328
  "@rollup/plugin-replace": "^6.0.2",
329
+ "@rollup/plugin-swc": "^0.4.0",
326
330
  "@rollup/plugin-terser": "^1.0.0",
327
331
  "@semantic-release/changelog": "6.0.3",
328
332
  "@semantic-release/git": "10.0.1",
@@ -333,7 +337,7 @@
333
337
  "@storybook/react-vite": "^10.3.5",
334
338
  "@storybook/web-components": "^10.3.5",
335
339
  "@storybook/web-components-vite": "^10.3.5",
336
- "@types/node": "24.12.2",
340
+ "@types/node": "24.12.4",
337
341
  "@types/react": "^19.2.0",
338
342
  "@types/react-dom": "^19.2.0",
339
343
  "@vitejs/plugin-react": "^6.0.1",
@@ -349,12 +353,13 @@
349
353
  "@wc-toolkit/storybook-helpers": "^10.0.0",
350
354
  "@wc-toolkit/type-parser": "^1.2.0",
351
355
  "axe-core": "^4.11.1",
356
+ "browserslist-to-esbuild": "^2.1.1",
352
357
  "custom-element-jet-brains-integration": "^1.7.0",
353
358
  "cz-conventional-changelog": "3.3.0",
354
359
  "date-fns": "^4.1.0",
355
360
  "element-collapse": "1.1.0",
356
361
  "esbuild": "0.28.0",
357
- "express": "4.22.1",
362
+ "express": "4.22.2",
358
363
  "glob": "13.0.6",
359
364
  "globals": "17.6.0",
360
365
  "html-format": "1.1.7",
@@ -363,6 +368,7 @@
363
368
  "nanoid": "^5.1.5",
364
369
  "playwright": "^1.55.0",
365
370
  "prettier": "3.8.3",
371
+ "publint": "^0.3.21",
366
372
  "react": "^19.1.1",
367
373
  "react-dom": "^19.1.1",
368
374
  "rimraf": "6.1.3",
@@ -1 +0,0 @@
1
- ## Examples
@@ -1 +0,0 @@
1
- ## Usage
@@ -1 +0,0 @@
1
- export declare const wButtonStyles: import("lit").CSSResult;
@@ -1,282 +0,0 @@
1
- import { css } from "lit";
2
- export const wButtonStyles = css `
3
- :host {
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(
7
- --background-hover,
8
- var(--w-s-color-background-hover)
9
- );
10
- --_background-active: var(
11
- --background-active,
12
- var(--w-s-color-background-active)
13
- );
14
- --_text-color: var(--color, var(--w-s-color-text-link));
15
- --_text-color-hover: var(--color-hover, var(--w-s-color-text-link));
16
- --_text-color-active: var(--color-active, var(--w-s-color-text-link));
17
- --_border-width: var(--border-width, 2px);
18
- --_border: var(--border, var(--w-s-color-border));
19
- --_border-hover: var(--border-hover, var(--w-s-color-border-hover));
20
- --_border-active: var(--border-active, var(--w-s-color-border-active));
21
- --_border-radius: var(--border-radius, var(--w-button-radius-default, 8px));
22
- --_font-size: var(--font-size, var(--w-font-size-m));
23
- --_line-height: var(--line-height, var(--w-line-height-m));
24
- --_font-weight: var(--font-weight, bold);
25
- --_padding-x: var(--padding-x, 16px);
26
- --_padding-y: var(--padding-y, 13px);
27
- }
28
-
29
- button {
30
- /* Base setup for all buttons */
31
- display: inline-flex;
32
- justify-content: center;
33
- align-items: center;
34
- text-align: center;
35
- cursor: pointer;
36
- transition:
37
- color 150ms cubic-bezier(0.4, 0, 0.2, 1),
38
- background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
39
- border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
40
- fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
41
- stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
42
-
43
- /* Hook the local vars up to the button stuff */
44
- background-color: var(--_background);
45
- color: var(--_text-color);
46
- border: var(--_border-width) solid var(--_border);
47
- border-radius: var(--_border-radius);
48
- padding: calc(var(--_padding-y) - var(--_border-width))
49
- calc(var(--_padding-x) - var(--_border-width));
50
- font-size: var(--_font-size);
51
- line-height: var(--_line-height);
52
- font-weight: var(--_font-weight);
53
- }
54
-
55
- button:hover {
56
- background-color: var(--_background-hover);
57
- border-color: var(--_border-hover);
58
- color: var(--_text-color-hover);
59
- }
60
-
61
- button:active {
62
- background-color: var(--_background-active);
63
- border-color: var(--_border-active);
64
- color: var(--_text-color-active);
65
- }
66
-
67
- button:focus-visible {
68
- outline: 2px solid var(--w-s-color-border-focus);
69
- outline-offset: var(--w-outline-offset, 1px);
70
- }
71
-
72
- /* Variants config */
73
- :host([variant="primary"]) {
74
- --background: var(--w-s-color-background-primary);
75
- --background-hover: var(--w-s-color-background-primary-hover);
76
- --background-active: var(--w-s-color-background-primary-active);
77
- --color: var(--w-s-color-text-inverted);
78
- --color-hover: var(--w-s-color-text-inverted);
79
- --color-active: var(--w-s-color-text-inverted);
80
- --border-width: 0px;
81
- }
82
- :host([variant="quiet"]),
83
- :host([quiet]) /* deprecated, backwards compatibility, use variant="quiet" */ {
84
- --background: transparent;
85
- --color: var(--w-s-color-text-link);
86
- --color-hover: var(--w-s-color-text-link-hover);
87
- --color-active: var(--w-s-color-text-link-active);
88
- --border-width: 0px;
89
- }
90
- :host([variant="negative"]) {
91
- --background: var(--w-s-color-background-negative);
92
- --background-hover: var(--w-s-color-background-negative-hover);
93
- --background-active: var(--w-s-color-background-negative-active);
94
- --color: var(--w-s-color-text-inverted);
95
- --color-hover: var(--w-s-color-text-inverted);
96
- --color-active: var(--w-s-color-text-inverted);
97
- --border-width: 0px;
98
- }
99
- :host([variant="negativeQuiet"]),
100
- :host([quiet][variant="negative"]) /* deprecated, backwards compatibility */ {
101
- --background: transparent;
102
- --background-hover: var(--w-s-color-background-negative-subtle-hover);
103
- --background-active: var(--w-s-color-background-negative-subtle-active);
104
- --color: var(--w-s-color-text-negative);
105
- --color-hover: var(--w-s-color-text-negative);
106
- --color-active: var(--w-s-color-text-negative);
107
- --border-width: 0px;
108
- }
109
- :host([variant="utility"]) {
110
- --background: var(--w-s-color-background);
111
- --background-hover: var(--w-s-color-background-hover);
112
- --background-active: var(--w-s-color-background-active);
113
- --color: var(--w-s-color-text);
114
- --color-hover: var(--w-s-color-text);
115
- --color-active: var(--w-s-color-text);
116
- --border-radius: var(--w-button-radius-utility, 4px);
117
- --border-width: 1px;
118
- }
119
- :host([variant="utilityQuiet"]),
120
- :host([quiet][variant="utility"]) /* deprecated, backwards compatibility */ {
121
- --background: transparent;
122
- --color: var(--w-s-color-text);
123
- --color-hover: var(--w-s-color-text);
124
- --color-active: var(--w-s-color-text);
125
- --border-width: 0px;
126
- }
127
- :host([variant="overlay"]) {
128
- --background: var(--w-color-background);
129
- --background-hover: var(--w-color-background-hover);
130
- --background-active: var(--w-color-background-active);
131
- --color: var(--w-s-color-text);
132
- --color-hover: var(--w-s-color-text);
133
- --color-active: var(--w-s-color-text);
134
- --border-radius: 9999px;
135
- --border-width: 0px;
136
- }
137
- :host([variant="overlayQuiet"]),
138
- :host([quiet][variant="overlay"]) /* deprecated, backwards compatibility */ {
139
- --background: transparent;
140
- --background-hover: var(--w-s-color-background-hover);
141
- --background-active: var(--w-s-color-background-active);
142
- --color: var(--w-s-color-text);
143
- --color-hover: var(--w-s-color-text);
144
- --color-active: var(--w-s-color-text);
145
- --border-radius: 9999px;
146
- --border-width: 0px;
147
- }
148
- :host([variant="overlayInverted"]) {
149
- --background: var(--w-s-color-background-inverted);
150
- --background-hover: var(--w-s-color-background-inverted-hover);
151
- --background-active: var(--w-s-color-background-inverted-active);
152
- --color: var(--w-s-color-text-inverted);
153
- --color-hover: var(--w-s-color-text-inverted);
154
- --color-active: var(--w-s-color-text-inverted);
155
- --border-radius: 9999px;
156
- --border-width: 0px;
157
- }
158
- :host([variant="overlayInvertedQuiet"]),
159
- :host([quiet][variant="overlayInverted"]) /* deprecated, backwards compatibility */ {
160
- --background: transparent;
161
- --background-hover: var(--w-s-color-background-inverted-hover);
162
- --background-active: var(--w-s-color-background-inverted-active);
163
- --color: var(--w-s-color-text-inverted);
164
- --color-hover: var(--w-s-color-text-inverted);
165
- --color-active: var(--w-s-color-text-inverted);
166
- --border-radius: 9999px;
167
- --border-width: 0px;
168
- }
169
-
170
- :host([variant="link"]) {
171
- --background: none;
172
- --background-hover: none;
173
- --background-active: none;
174
- --border-width: 0px;
175
- --font-weight: normal;
176
- display: inline;
177
- }
178
-
179
- :host([variant="pill"]) {
180
- --background: transparent;
181
- --background-hover: var(--w-color-button-pill-background-hover); /** TODO: this should use a semantic token */
182
- --background-active: var(--w-color-button-pill-background-active); /** TODO: this should use a semantic token */
183
- --border-radius: 50%;
184
- --border-width: 0px;
185
- --color: var(--w-s-color-icon);
186
- --color-hover: var(--w-s-color-icon-hover);
187
- --color-active: var(--w-s-color-icon-active);
188
- --padding-x: 14px; /* get a total height and width of 44px, matching atomic CSS variant */
189
- --padding-y: 14px;
190
- }
191
-
192
- /* States config, selects --loading as well since loading is always supposed to be disabled */
193
- :host(:disabled),
194
- :host([disabled]) {
195
- --background: var(--w-s-color-background-disabled);
196
- --background-hover: var(--w-s-color-background-disabled);
197
- --background-active: var(--w-s-color-background-disabled);
198
- --color: var(--w-s-color-text-inverted);
199
- --color-hover: var(--w-s-color-text-inverted);
200
- --color-active: var(--w-s-color-text-inverted);
201
- --border-width: 0px;
202
- }
203
-
204
- :host(:disabled) button,
205
- :host([disabled]) button {
206
- cursor: not-allowed;
207
- pointer-events: none;
208
- }
209
-
210
- :host([loading]) {
211
- --background: var(--w-s-color-background-subtle);
212
- --background-hover: var(--w-s-color-background-subtle);
213
- --background-active: var(--w-s-color-background-subtle);
214
- --color: var(--w-s-color-text);
215
- --color-hover: var(--w-s-color-text);
216
- --color-active: var(--w-s-color-text);
217
- --border-width: 0px;
218
- }
219
-
220
- :host([loading]) button {
221
- cursor: wait;
222
- pointer-events: none;
223
- }
224
-
225
- :host([variant="link"]):hover {
226
- text-decoration: underline;
227
- }
228
-
229
- /* Sizes config */
230
- :host([small]) {
231
- --padding-x: 12px;
232
- --padding-y: 8px;
233
- --font-size: var(--w-font-size-xs);
234
- --line-height: var(--w-line-height-xs);
235
- }
236
-
237
- :host([small][variant="pill"]) {
238
- --padding-x: 8px; /* get a total height and width of 32px, matching atomic CSS variant */
239
- --padding-y: 8px;
240
- }
241
-
242
- /* Width config */
243
- :host([full-width]) button {
244
- width: 100%;
245
- max-width: 100%;
246
- }
247
-
248
- :host([has-icon-only]) {
249
- --_padding-x: var(--_padding-y);
250
- }
251
-
252
- :host([has-icon-only]) button {
253
- width: auto;
254
- max-width: none;
255
- aspect-ratio: 1 / 1;
256
- }
257
-
258
- /* Copy of loading animation from warp */
259
- :host([loading]) button {
260
- background-image: linear-gradient(
261
- 135deg,
262
- rgba(0, 0, 0, 0.05) 25%,
263
- transparent 25%,
264
- transparent 50%,
265
- rgba(0, 0, 0, 0.05) 50%,
266
- rgba(0, 0, 0, 0.05) 75%,
267
- transparent 75%,
268
- transparent
269
- );
270
- background-size: 30px 30px;
271
- animation: animate-inprogress 3s linear infinite;
272
- }
273
-
274
- @keyframes animate-inprogress {
275
- 0% {
276
- background-position: 0 0;
277
- }
278
- 100% {
279
- background-position: 60px 0;
280
- }
281
- }
282
- `;
@@ -1 +0,0 @@
1
- export declare const styles: import("lit").CSSResult;
@@ -1,213 +0,0 @@
1
- import { css } from "lit";
2
- export const styles = css `
3
- /* If not a link variant this should look like a button */
4
- :host(:not([variant="link"])) {
5
- --_background: var(--background, var(--w-s-color-background));
6
- --_background-hover: var(
7
- --background-hover,
8
- var(--w-s-color-background-hover)
9
- );
10
- --_background-active: var(
11
- --background-active,
12
- var(--w-s-color-background-active)
13
- );
14
- --_text-color: var(--color, var(--w-s-color-text-link));
15
- --_text-color-hover: var(--color-hover, var(--w-s-color-text-link));
16
- --_text-color-active: var(--color-active, var(--w-s-color-text-link));
17
- --_border-width: var(--border-width, 2px);
18
- --_border: var(--border, var(--w-s-color-border));
19
- --_border-hover: var(--border-hover, var(--w-s-color-border-hover));
20
- --_border-active: var(--border-active, var(--w-s-color-border-active));
21
- --_border-radius: var(--border-radius, var(--w-button-radius-default, 8px));
22
- --_font-size: var(--font-size, var(--w-font-size-m));
23
- --_line-height: var(--line-height, var(--w-line-height-m));
24
- --_font-weight: var(--font-weight, bold);
25
- --_padding-x: var(--padding-x, 16px);
26
- --_padding-y: var(--padding-y, 13px);
27
- }
28
-
29
- :host(:not([variant="link"])) a {
30
- display: inline-flex;
31
- justify-content: center;
32
- align-items: center;
33
- text-align: center;
34
- text-decoration: none;
35
- cursor: pointer;
36
- transition:
37
- color 150ms cubic-bezier(0.4, 0, 0.2, 1),
38
- background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
39
- border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
40
- fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
41
- stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
42
-
43
- background-color: var(--_background);
44
- color: var(--_text-color);
45
- border: var(--_border-width) solid var(--_border);
46
- border-radius: var(--_border-radius);
47
- padding: calc(var(--_padding-y) - var(--_border-width))
48
- calc(var(--_padding-x) - var(--_border-width));
49
- font-size: var(--_font-size);
50
- line-height: var(--_line-height);
51
- font-weight: var(--_font-weight);
52
- }
53
-
54
- :host(:not([variant="link"])) a:hover {
55
- background-color: var(--_background-hover);
56
- border-color: var(--_border-hover);
57
- color: var(--_text-color-hover);
58
- }
59
-
60
- :host(:not([variant="link"])) a:active {
61
- background-color: var(--_background-active);
62
- border-color: var(--_border-active);
63
- color: var(--_text-color-active);
64
- }
65
-
66
- :host(:not([variant="link"])) a:focus-visible {
67
- outline: 2px solid var(--w-s-color-border-focus);
68
- outline-offset: var(--w-outline-offset, 1px);
69
- }
70
-
71
- /* Variants config */
72
- :host([variant="primary"]) {
73
- --background: var(--w-s-color-background-primary);
74
- --background-hover: var(--w-s-color-background-primary-hover);
75
- --background-active: var(--w-s-color-background-primary-active);
76
- --color: var(--w-s-color-text-inverted);
77
- --color-hover: var(--w-s-color-text-inverted);
78
- --color-active: var(--w-s-color-text-inverted);
79
- --border-width: 0px;
80
- }
81
- :host([variant="quiet"]),
82
- :host([quiet]) /* deprecated, backwards compatibility, use variant="quiet" */ {
83
- --background: transparent;
84
- --color: var(--w-s-color-text-link);
85
- --color-hover: var(--w-s-color-text-link-hover);
86
- --color-active: var(--w-s-color-text-link-active);
87
- --border-width: 0px;
88
- }
89
- :host([variant="negative"]) {
90
- --background: var(--w-s-color-background-negative);
91
- --background-hover: var(--w-s-color-background-negative-hover);
92
- --background-active: var(--w-s-color-background-negative-active);
93
- --color: var(--w-s-color-text-inverted);
94
- --color-hover: var(--w-s-color-text-inverted);
95
- --color-active: var(--w-s-color-text-inverted);
96
- --border-width: 0px;
97
- }
98
- :host([variant="negativeQuiet"]),
99
- :host([quiet][variant="negative"]) /* deprecated, backwards compatibility */ {
100
- --background: transparent;
101
- --background-hover: var(--w-s-color-background-negative-subtle-hover);
102
- --background-active: var(--w-s-color-background-negative-subtle-active);
103
- --color: var(--w-s-color-text-negative);
104
- --color-hover: var(--w-s-color-text-negative);
105
- --color-active: var(--w-s-color-text-negative);
106
- --border-width: 0px;
107
- }
108
- :host([variant="utility"]) {
109
- --background: var(--w-s-color-background);
110
- --background-hover: var(--w-s-color-background-hover);
111
- --background-active: var(--w-s-color-background-active);
112
- --color: var(--w-s-color-text);
113
- --color-hover: var(--w-s-color-text);
114
- --color-active: var(--w-s-color-text);
115
- --border-radius: var(--w-button-radius-utility, 4px);
116
- --border-width: 1px;
117
- }
118
- :host([variant="utilityQuiet"]),
119
- :host([quiet][variant="utility"]) /* deprecated, backwards compatibility */ {
120
- --background: transparent;
121
- --color: var(--w-s-color-text);
122
- --color-hover: var(--w-s-color-text);
123
- --color-active: var(--w-s-color-text);
124
- --border-width: 0px;
125
- }
126
- :host([variant="overlay"]) {
127
- --background: var(--w-color-background);
128
- --background-hover: var(--w-color-background-hover);
129
- --background-active: var(--w-color-background-active);
130
- --color: var(--w-s-color-text);
131
- --color-hover: var(--w-s-color-text);
132
- --color-active: var(--w-s-color-text);
133
- --border-radius: 9999px;
134
- --border-width: 0px;
135
- }
136
- :host([variant="overlayQuiet"]),
137
- :host([quiet][variant="overlay"]) /* deprecated, backwards compatibility */ {
138
- --background: transparent;
139
- --background-hover: var(--w-s-color-background-hover);
140
- --background-active: var(--w-s-color-background-active);
141
- --color: var(--w-s-color-text);
142
- --color-hover: var(--w-s-color-text);
143
- --color-active: var(--w-s-color-text);
144
- --border-radius: 9999px;
145
- --border-width: 0px;
146
- }
147
- :host([variant="overlayInverted"]) {
148
- --background: var(--w-s-color-background-inverted);
149
- --background-hover: var(--w-s-color-background-inverted-hover);
150
- --background-active: var(--w-s-color-background-inverted-active);
151
- --color: var(--w-s-color-text-inverted);
152
- --color-hover: var(--w-s-color-text-inverted);
153
- --color-active: var(--w-s-color-text-inverted);
154
- --border-radius: 9999px;
155
- --border-width: 0px;
156
- }
157
- :host([variant="overlayInvertedQuiet"]),
158
- :host([quiet][variant="overlayInverted"]) /* deprecated, backwards compatibility */ {
159
- --background: transparent;
160
- --background-hover: var(--w-s-color-background-inverted-hover);
161
- --background-active: var(--w-s-color-background-inverted-active);
162
- --color: var(--w-s-color-text-inverted);
163
- --color-hover: var(--w-s-color-text-inverted);
164
- --color-active: var(--w-s-color-text-inverted);
165
- --border-radius: 9999px;
166
- --border-width: 0px;
167
- }
168
-
169
- :host([variant="link"]) {
170
- --background: none;
171
- --background-hover: none;
172
- --background-active: none;
173
- --border-width: 0px;
174
- --font-weight: normal;
175
- display: inline;
176
- }
177
-
178
- /* States config, selects --loading as well since loading is always supposed to be disabled */
179
- :host(:disabled),
180
- :host([disabled]) {
181
- --background: var(--w-s-color-background-disabled);
182
- --background-hover: var(--w-s-color-background-disabled);
183
- --background-active: var(--w-s-color-background-disabled);
184
- --color: var(--w-s-color-text-inverted);
185
- --color-hover: var(--w-s-color-text-inverted);
186
- --color-active: var(--w-s-color-text-inverted);
187
- --border-width: 0px;
188
- }
189
-
190
- :host(:disabled) a,
191
- :host([disabled]) a {
192
- cursor: not-allowed;
193
- pointer-events: none;
194
- }
195
-
196
- :host([variant="link"]):hover a {
197
- text-decoration: underline;
198
- }
199
-
200
- /* Sizes config */
201
- :host([small]) {
202
- --padding-x: 12px;
203
- --padding-y: 8px;
204
- --font-size: var(--w-font-size-xs);
205
- --line-height: var(--w-line-height-xs);
206
- }
207
-
208
- /* Width config */
209
- :host([full-width]) a {
210
- width: 100%;
211
- max-width: 100%;
212
- }
213
- `;
File without changes