@teseor/css 1.0.0

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 (298) hide show
  1. package/README.md +102 -0
  2. package/dist/compiled.css +4463 -0
  3. package/dist/index.css +4445 -0
  4. package/fonts/.gitkeep +9 -0
  5. package/package.json +38 -0
  6. package/src/00-config/layers/layers.scss +1 -0
  7. package/src/00-config/mixins/_border.scss +13 -0
  8. package/src/00-config/mixins/index.scss +1 -0
  9. package/src/00-config/tokens/_variables.scss +120 -0
  10. package/src/00-config/tokens/borders/index.scss +6 -0
  11. package/src/00-config/tokens/colors/colors.docs.json +168 -0
  12. package/src/00-config/tokens/colors/index.scss +25 -0
  13. package/src/00-config/tokens/grid/grid.docs.json +54 -0
  14. package/src/00-config/tokens/grid/index.scss +11 -0
  15. package/src/00-config/tokens/index.scss +15 -0
  16. package/src/00-config/tokens/input.scss +14 -0
  17. package/src/00-config/tokens/motion/index.scss +25 -0
  18. package/src/00-config/tokens/radius/index.scss +7 -0
  19. package/src/00-config/tokens/semantic/colors/index.scss +30 -0
  20. package/src/00-config/tokens/semantic/spacing/index.scss +10 -0
  21. package/src/00-config/tokens/shadows/index.scss +5 -0
  22. package/src/00-config/tokens/spacing/index.scss +15 -0
  23. package/src/00-config/tokens/spacing/spacing.docs.json +114 -0
  24. package/src/00-config/tokens/theming.docs.json +77 -0
  25. package/src/00-config/tokens/typography/index.scss +119 -0
  26. package/src/00-config/tokens/zindex/index.scss +14 -0
  27. package/src/01-reset/index.scss +1 -0
  28. package/src/01-reset/reset.scss +8 -0
  29. package/src/02-base/index.scss +2 -0
  30. package/src/02-base/root/root.scss +12 -0
  31. package/src/02-base/typography/typography.docs.json +94 -0
  32. package/src/02-base/typography/typography.scss +145 -0
  33. package/src/03-layout/app-shell/app-shell.api.json +26 -0
  34. package/src/03-layout/app-shell/app-shell.docs.json +119 -0
  35. package/src/03-layout/app-shell/index.scss +5 -0
  36. package/src/03-layout/box/box.api.json +15 -0
  37. package/src/03-layout/box/box.docs.json +57 -0
  38. package/src/03-layout/box/index.scss +34 -0
  39. package/src/03-layout/center/center.api.json +6 -0
  40. package/src/03-layout/center/center.docs.json +24 -0
  41. package/src/03-layout/center/index.scss +11 -0
  42. package/src/03-layout/cluster/cluster.api.json +10 -0
  43. package/src/03-layout/cluster/cluster.docs.json +129 -0
  44. package/src/03-layout/cluster/index.scss +18 -0
  45. package/src/03-layout/container/container.api.json +13 -0
  46. package/src/03-layout/container/index.scss +17 -0
  47. package/src/03-layout/flex/flex.api.json +15 -0
  48. package/src/03-layout/flex/flex.docs.json +56 -0
  49. package/src/03-layout/flex/index.scss +51 -0
  50. package/src/03-layout/grid/grid.api.json +10 -0
  51. package/src/03-layout/grid/grid.docs.json +116 -0
  52. package/src/03-layout/grid/index.scss +15 -0
  53. package/src/03-layout/index.scss +11 -0
  54. package/src/03-layout/main/index.scss +17 -0
  55. package/src/03-layout/main/main.api.json +13 -0
  56. package/src/03-layout/sidebar/index.scss +30 -0
  57. package/src/03-layout/sidebar/sidebar.api.json +13 -0
  58. package/src/03-layout/sidebar-nav/index.scss +209 -0
  59. package/src/03-layout/sidebar-nav/sidebar-nav-all.png +0 -0
  60. package/src/03-layout/sidebar-nav/sidebar-nav.api.json +115 -0
  61. package/src/03-layout/sidebar-nav/sidebar-nav.docs.json +100 -0
  62. package/src/03-layout/sidebar-nav/sidebar-nav.visual.spec.ts +14 -0
  63. package/src/03-layout/stack/index.scss +13 -0
  64. package/src/03-layout/stack/stack.api.json +10 -0
  65. package/src/03-layout/stack/stack.docs.json +131 -0
  66. package/src/04-components/accordion/accordion-visual.png +0 -0
  67. package/src/04-components/accordion/accordion.api.json +19 -0
  68. package/src/04-components/accordion/accordion.docs.json +51 -0
  69. package/src/04-components/accordion/accordion.visual.spec.ts +14 -0
  70. package/src/04-components/accordion/index.scss +78 -0
  71. package/src/04-components/alert/alert-visual.png +0 -0
  72. package/src/04-components/alert/alert.api.json +91 -0
  73. package/src/04-components/alert/alert.docs.json +79 -0
  74. package/src/04-components/alert/alert.visual.spec.ts +14 -0
  75. package/src/04-components/alert/index.scss +108 -0
  76. package/src/04-components/avatar/avatar-visual.png +0 -0
  77. package/src/04-components/avatar/avatar.api.json +70 -0
  78. package/src/04-components/avatar/avatar.docs.json +200 -0
  79. package/src/04-components/avatar/avatar.visual.spec.ts +14 -0
  80. package/src/04-components/avatar/index.scss +104 -0
  81. package/src/04-components/badge/badge-visual.png +0 -0
  82. package/src/04-components/badge/badge.api.json +86 -0
  83. package/src/04-components/badge/badge.docs.json +89 -0
  84. package/src/04-components/badge/badge.visual.spec.ts +14 -0
  85. package/src/04-components/badge/index.scss +64 -0
  86. package/src/04-components/breadcrumb/breadcrumb-visual.png +0 -0
  87. package/src/04-components/breadcrumb/breadcrumb.api.json +31 -0
  88. package/src/04-components/breadcrumb/breadcrumb.docs.json +59 -0
  89. package/src/04-components/breadcrumb/breadcrumb.visual.spec.ts +14 -0
  90. package/src/04-components/breadcrumb/index.scss +77 -0
  91. package/src/04-components/button/button-visual.png +0 -0
  92. package/src/04-components/button/button.api.json +138 -0
  93. package/src/04-components/button/button.docs.json +75 -0
  94. package/src/04-components/button/button.visual.spec.ts +14 -0
  95. package/src/04-components/button/index.scss +222 -0
  96. package/src/04-components/button-group/button-group-visual.png +0 -0
  97. package/src/04-components/button-group/button-group.api.json +11 -0
  98. package/src/04-components/button-group/button-group.docs.json +52 -0
  99. package/src/04-components/button-group/button-group.visual.spec.ts +14 -0
  100. package/src/04-components/button-group/index.scss +78 -0
  101. package/src/04-components/card/card-visual.png +0 -0
  102. package/src/04-components/card/card.api.json +53 -0
  103. package/src/04-components/card/card.docs.json +103 -0
  104. package/src/04-components/card/card.visual.spec.ts +14 -0
  105. package/src/04-components/card/index.scss +41 -0
  106. package/src/04-components/checkbox/checkbox-visual.png +0 -0
  107. package/src/04-components/checkbox/checkbox.api.json +50 -0
  108. package/src/04-components/checkbox/checkbox.docs.json +151 -0
  109. package/src/04-components/checkbox/checkbox.visual.spec.ts +14 -0
  110. package/src/04-components/checkbox/index.scss +104 -0
  111. package/src/04-components/code/code-visual.png +0 -0
  112. package/src/04-components/code/code.api.json +47 -0
  113. package/src/04-components/code/code.docs.json +84 -0
  114. package/src/04-components/code/code.visual.spec.ts +14 -0
  115. package/src/04-components/code/index.scss +64 -0
  116. package/src/04-components/data-list/data-list-visual.png +0 -0
  117. package/src/04-components/data-list/data-list.api.json +23 -0
  118. package/src/04-components/data-list/data-list.docs.json +79 -0
  119. package/src/04-components/data-list/data-list.visual.spec.ts +14 -0
  120. package/src/04-components/data-list/index.scss +98 -0
  121. package/src/04-components/dialog/dialog-visual.png +0 -0
  122. package/src/04-components/dialog/dialog.api.json +23 -0
  123. package/src/04-components/dialog/dialog.docs.json +58 -0
  124. package/src/04-components/dialog/dialog.visual.spec.ts +14 -0
  125. package/src/04-components/dialog/index.scss +74 -0
  126. package/src/04-components/disclosure/disclosure-visual.png +0 -0
  127. package/src/04-components/disclosure/disclosure.api.json +31 -0
  128. package/src/04-components/disclosure/disclosure.docs.json +73 -0
  129. package/src/04-components/disclosure/disclosure.visual.spec.ts +14 -0
  130. package/src/04-components/disclosure/index.scss +111 -0
  131. package/src/04-components/divider/divider-visual.png +0 -0
  132. package/src/04-components/divider/divider.api.json +30 -0
  133. package/src/04-components/divider/divider.docs.json +68 -0
  134. package/src/04-components/divider/divider.visual.spec.ts +14 -0
  135. package/src/04-components/divider/index.scss +115 -0
  136. package/src/04-components/drawer/drawer-visual.png +0 -0
  137. package/src/04-components/drawer/drawer.api.json +39 -0
  138. package/src/04-components/drawer/drawer.docs.json +78 -0
  139. package/src/04-components/drawer/drawer.visual.spec.ts +14 -0
  140. package/src/04-components/drawer/index.scss +251 -0
  141. package/src/04-components/field/field-visual.png +0 -0
  142. package/src/04-components/field/field.api.json +11 -0
  143. package/src/04-components/field/field.docs.json +59 -0
  144. package/src/04-components/field/field.visual.spec.ts +14 -0
  145. package/src/04-components/field/index.scss +44 -0
  146. package/src/04-components/form-error/form-error-visual.png +0 -0
  147. package/src/04-components/form-error/form-error.api.json +19 -0
  148. package/src/04-components/form-error/form-error.docs.json +40 -0
  149. package/src/04-components/form-error/form-error.visual.spec.ts +14 -0
  150. package/src/04-components/form-error/index.scss +31 -0
  151. package/src/04-components/form-helper/form-helper-visual.png +0 -0
  152. package/src/04-components/form-helper/form-helper.api.json +19 -0
  153. package/src/04-components/form-helper/form-helper.docs.json +31 -0
  154. package/src/04-components/form-helper/form-helper.visual.spec.ts +14 -0
  155. package/src/04-components/form-helper/index.scss +24 -0
  156. package/src/04-components/heading/heading-visual.png +0 -0
  157. package/src/04-components/heading/heading.api.json +83 -0
  158. package/src/04-components/heading/heading.docs.json +98 -0
  159. package/src/04-components/heading/heading.visual.spec.ts +14 -0
  160. package/src/04-components/heading/index.scss +61 -0
  161. package/src/04-components/icon/icon-visual.png +0 -0
  162. package/src/04-components/icon/icon.api.json +56 -0
  163. package/src/04-components/icon/icon.docs.json +155 -0
  164. package/src/04-components/icon/icon.visual.spec.ts +14 -0
  165. package/src/04-components/icon/index.scss +79 -0
  166. package/src/04-components/index.scss +41 -0
  167. package/src/04-components/input/index.scss +154 -0
  168. package/src/04-components/input/input-visual.png +0 -0
  169. package/src/04-components/input/input.api.json +85 -0
  170. package/src/04-components/input/input.docs.json +189 -0
  171. package/src/04-components/input/input.visual.spec.ts +14 -0
  172. package/src/04-components/label/index.scss +46 -0
  173. package/src/04-components/label/label-visual.png +0 -0
  174. package/src/04-components/label/label.api.json +27 -0
  175. package/src/04-components/label/label.docs.json +73 -0
  176. package/src/04-components/label/label.visual.spec.ts +14 -0
  177. package/src/04-components/link/index.scss +73 -0
  178. package/src/04-components/link/link-visual.png +0 -0
  179. package/src/04-components/link/link.api.json +39 -0
  180. package/src/04-components/link/link.docs.json +104 -0
  181. package/src/04-components/link/link.visual.spec.ts +14 -0
  182. package/src/04-components/menu/index.scss +145 -0
  183. package/src/04-components/menu/menu-visual.png +0 -0
  184. package/src/04-components/menu/menu.api.json +47 -0
  185. package/src/04-components/menu/menu.docs.json +81 -0
  186. package/src/04-components/menu/menu.visual.spec.ts +14 -0
  187. package/src/04-components/modal/index.scss +93 -0
  188. package/src/04-components/modal/modal-visual.png +0 -0
  189. package/src/04-components/modal/modal.api.json +43 -0
  190. package/src/04-components/modal/modal.docs.json +86 -0
  191. package/src/04-components/modal/modal.visual.spec.ts +14 -0
  192. package/src/04-components/overlay/index.scss +49 -0
  193. package/src/04-components/overlay/overlay-visual.png +0 -0
  194. package/src/04-components/overlay/overlay.api.json +23 -0
  195. package/src/04-components/overlay/overlay.docs.json +63 -0
  196. package/src/04-components/overlay/overlay.visual.spec.ts +14 -0
  197. package/src/04-components/pagination/index.scss +114 -0
  198. package/src/04-components/pagination/pagination-visual.png +0 -0
  199. package/src/04-components/pagination/pagination.api.json +39 -0
  200. package/src/04-components/pagination/pagination.docs.json +88 -0
  201. package/src/04-components/pagination/pagination.visual.spec.ts +14 -0
  202. package/src/04-components/popover/index.scss +114 -0
  203. package/src/04-components/popover/popover-visual.png +0 -0
  204. package/src/04-components/popover/popover.api.json +39 -0
  205. package/src/04-components/popover/popover.docs.json +70 -0
  206. package/src/04-components/popover/popover.visual.spec.ts +14 -0
  207. package/src/04-components/progress/index.scss +102 -0
  208. package/src/04-components/progress/progress-visual.png +0 -0
  209. package/src/04-components/progress/progress.api.json +23 -0
  210. package/src/04-components/progress/progress.docs.json +87 -0
  211. package/src/04-components/progress/progress.visual.spec.ts +14 -0
  212. package/src/04-components/radio/index.scss +96 -0
  213. package/src/04-components/radio/radio-visual.png +0 -0
  214. package/src/04-components/radio/radio.api.json +46 -0
  215. package/src/04-components/radio/radio.docs.json +159 -0
  216. package/src/04-components/radio/radio.visual.spec.ts +14 -0
  217. package/src/04-components/select/index.scss +113 -0
  218. package/src/04-components/select/select-visual.png +0 -0
  219. package/src/04-components/select/select.api.json +85 -0
  220. package/src/04-components/select/select.docs.json +162 -0
  221. package/src/04-components/select/select.visual.spec.ts +14 -0
  222. package/src/04-components/skeleton/index.scss +99 -0
  223. package/src/04-components/skeleton/skeleton-visual.png +0 -0
  224. package/src/04-components/skeleton/skeleton.api.json +19 -0
  225. package/src/04-components/skeleton/skeleton.docs.json +62 -0
  226. package/src/04-components/skeleton/skeleton.visual.spec.ts +14 -0
  227. package/src/04-components/spinner/index.scss +60 -0
  228. package/src/04-components/spinner/spinner-visual.png +0 -0
  229. package/src/04-components/spinner/spinner.api.json +63 -0
  230. package/src/04-components/spinner/spinner.docs.json +88 -0
  231. package/src/04-components/spinner/spinner.visual.spec.ts +15 -0
  232. package/src/04-components/status/index.scss +85 -0
  233. package/src/04-components/status/status-visual.png +0 -0
  234. package/src/04-components/status/status.api.json +19 -0
  235. package/src/04-components/status/status.docs.json +60 -0
  236. package/src/04-components/status/status.visual.spec.ts +14 -0
  237. package/src/04-components/table/index.scss +60 -0
  238. package/src/04-components/table/table-visual.png +0 -0
  239. package/src/04-components/table/table.api.json +27 -0
  240. package/src/04-components/table/table.docs.json +59 -0
  241. package/src/04-components/table/table.visual.spec.ts +14 -0
  242. package/src/04-components/tabs/index.scss +77 -0
  243. package/src/04-components/tabs/tabs-visual.png +0 -0
  244. package/src/04-components/tabs/tabs.api.json +31 -0
  245. package/src/04-components/tabs/tabs.docs.json +61 -0
  246. package/src/04-components/tabs/tabs.visual.spec.ts +14 -0
  247. package/src/04-components/tag/index.scss +98 -0
  248. package/src/04-components/tag/tag-visual.png +0 -0
  249. package/src/04-components/tag/tag.api.json +86 -0
  250. package/src/04-components/tag/tag.docs.json +108 -0
  251. package/src/04-components/tag/tag.visual.spec.ts +14 -0
  252. package/src/04-components/textarea/index.scss +124 -0
  253. package/src/04-components/textarea/textarea-visual.png +0 -0
  254. package/src/04-components/textarea/textarea.api.json +93 -0
  255. package/src/04-components/textarea/textarea.docs.json +191 -0
  256. package/src/04-components/textarea/textarea.visual.spec.ts +14 -0
  257. package/src/04-components/toast/index.scss +180 -0
  258. package/src/04-components/toast/toast-visual.png +0 -0
  259. package/src/04-components/toast/toast.api.json +43 -0
  260. package/src/04-components/toast/toast.docs.json +99 -0
  261. package/src/04-components/toast/toast.visual.spec.ts +14 -0
  262. package/src/04-components/toggle/index.scss +117 -0
  263. package/src/04-components/toggle/toggle-visual.png +0 -0
  264. package/src/04-components/toggle/toggle.api.json +43 -0
  265. package/src/04-components/toggle/toggle.docs.json +92 -0
  266. package/src/04-components/toggle/toggle.visual.spec.ts +14 -0
  267. package/src/04-components/tooltip/index.scss +102 -0
  268. package/src/04-components/tooltip/tooltip-visual.png +0 -0
  269. package/src/04-components/tooltip/tooltip.api.json +39 -0
  270. package/src/04-components/tooltip/tooltip.docs.json +63 -0
  271. package/src/04-components/tooltip/tooltip.visual.spec.ts +14 -0
  272. package/src/05-utilities/border/index.scss +21 -0
  273. package/src/05-utilities/display/display.api.json +6 -0
  274. package/src/05-utilities/display/display.docs.json +28 -0
  275. package/src/05-utilities/display/display.scss +195 -0
  276. package/src/05-utilities/index.scss +6 -0
  277. package/src/05-utilities/spacing/spacing.api.json +6 -0
  278. package/src/05-utilities/spacing/spacing.docs.json +43 -0
  279. package/src/05-utilities/spacing/spacing.scss +399 -0
  280. package/src/05-utilities/text/text.api.json +38 -0
  281. package/src/05-utilities/text/text.docs.json +132 -0
  282. package/src/05-utilities/text/text.scss +246 -0
  283. package/src/05-utilities/view-transition/index.scss +198 -0
  284. package/src/05-utilities/view-transition/view-transition.api.json +21 -0
  285. package/src/05-utilities/view-transition/view-transition.docs.json +63 -0
  286. package/src/05-utilities/visually-hidden/index.scss +38 -0
  287. package/src/05-utilities/visually-hidden/visually-hidden.api.json +8 -0
  288. package/src/05-utilities/visually-hidden/visually-hidden.docs.json +29 -0
  289. package/src/99-debug/grid-overlay.scss +79 -0
  290. package/src/99-debug/index.scss +1 -0
  291. package/src/index.scss +30 -0
  292. package/src/testing/api-types.ts +20 -0
  293. package/src/testing/grid-alignment.spec.ts +92 -0
  294. package/src/testing/html-generator.ts +151 -0
  295. package/src/testing/index.ts +15 -0
  296. package/src/testing/page-setup.ts +131 -0
  297. package/src/testing/rhythm.ts +146 -0
  298. package/src/testing/scaffold.ts +50 -0
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "tag",
3
+ "element": "span",
4
+ "modifiers": {
5
+ "size": {
6
+ "values": ["sm"]
7
+ },
8
+ "variant": {
9
+ "values": ["primary", "success", "warning", "danger"]
10
+ }
11
+ },
12
+ "cssVars": [
13
+ {
14
+ "name": "--ui-tag-height",
15
+ "default": "calc(#{t.$unit} * 3"
16
+ },
17
+ {
18
+ "name": "--ui-tag-padding-x",
19
+ "default": "var(--ui-space-1)"
20
+ },
21
+ {
22
+ "name": "--ui-tag-gap",
23
+ "default": "calc(#{t.$unit} * 0.5"
24
+ },
25
+ {
26
+ "name": "--ui-tag-radius",
27
+ "default": "var(--ui-radius-full)"
28
+ },
29
+ {
30
+ "name": "--ui-tag-font-size",
31
+ "default": "var(--ui-font-size-sm)"
32
+ },
33
+ {
34
+ "name": "--ui-tag-bg",
35
+ "default": "var(--ui-color-bg-muted)"
36
+ },
37
+ {
38
+ "name": "--ui-tag-color",
39
+ "default": "var(--ui-color-text)"
40
+ },
41
+ {
42
+ "name": "--ui-tag-height-sm",
43
+ "default": "calc(#{t.$unit} * 2.5"
44
+ },
45
+ {
46
+ "name": "--ui-tag-padding-x-sm",
47
+ "default": "calc(#{t.$unit} * 1"
48
+ },
49
+ {
50
+ "name": "--ui-tag-font-size-sm",
51
+ "default": "var(--ui-font-size-xs)"
52
+ },
53
+ {
54
+ "name": "--ui-tag-primary-bg",
55
+ "default": "var(--ui-color-primary)"
56
+ },
57
+ {
58
+ "name": "--ui-tag-primary-color",
59
+ "default": "var(--ui-color-text-inverse)"
60
+ },
61
+ {
62
+ "name": "--ui-tag-success-bg",
63
+ "default": "var(--ui-color-success)"
64
+ },
65
+ {
66
+ "name": "--ui-tag-success-color",
67
+ "default": "var(--ui-color-text-inverse)"
68
+ },
69
+ {
70
+ "name": "--ui-tag-warning-bg",
71
+ "default": "var(--ui-color-warning)"
72
+ },
73
+ {
74
+ "name": "--ui-tag-warning-color",
75
+ "default": "var(--ui-color-text)"
76
+ },
77
+ {
78
+ "name": "--ui-tag-danger-bg",
79
+ "default": "var(--ui-color-danger)"
80
+ },
81
+ {
82
+ "name": "--ui-tag-danger-color",
83
+ "default": "var(--ui-color-text-inverse)"
84
+ }
85
+ ]
86
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "id": "tag",
3
+ "type": "component",
4
+ "title": "Tag",
5
+ "description": "Keyword labels for categorization. Use for filtering, attributes, or status indicators.",
6
+ "api": "./tag.api.json",
7
+ "sections": [
8
+ {
9
+ "title": "Default",
10
+ "examples": [
11
+ {
12
+ "layout": "cluster",
13
+ "items": [
14
+ { "tag": "span", "class": "ui-tag", "text": "Tag" },
15
+ { "tag": "span", "class": "ui-tag", "text": "Category" },
16
+ { "tag": "span", "class": "ui-tag", "text": "Label" }
17
+ ],
18
+ "code": "<span class=\"ui-tag\">Tag</span>"
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "title": "Sizes",
24
+ "examples": [
25
+ {
26
+ "layout": "cluster",
27
+ "items": [
28
+ { "tag": "span", "class": "ui-tag ui-tag--sm", "text": "Small" },
29
+ { "tag": "span", "class": "ui-tag", "text": "Default" }
30
+ ],
31
+ "code": "<span class=\"ui-tag ui-tag--sm\">Small</span>\n<span class=\"ui-tag\">Default</span>"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "title": "Variants",
37
+ "examples": [
38
+ {
39
+ "layout": "cluster",
40
+ "items": [
41
+ { "tag": "span", "class": "ui-tag", "text": "Default" },
42
+ { "tag": "span", "class": "ui-tag ui-tag--primary", "text": "Primary" },
43
+ { "tag": "span", "class": "ui-tag ui-tag--success", "text": "Success" },
44
+ { "tag": "span", "class": "ui-tag ui-tag--warning", "text": "Warning" },
45
+ { "tag": "span", "class": "ui-tag ui-tag--danger", "text": "Danger" }
46
+ ],
47
+ "code": "<span class=\"ui-tag\">Default</span>\n<span class=\"ui-tag ui-tag--primary\">Primary</span>\n<span class=\"ui-tag ui-tag--success\">Success</span>\n<span class=\"ui-tag ui-tag--warning\">Warning</span>\n<span class=\"ui-tag ui-tag--danger\">Danger</span>"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "title": "With Remove Button",
53
+ "examples": [
54
+ {
55
+ "html": "<span class=\"ui-tag\">Removable<button class=\"ui-tag__remove\" aria-label=\"Remove\"><svg class=\"ui-icon ui-icon--xs\" viewBox=\"0 0 24 24\"><path d=\"M18 6 6 18M6 6l12 12\"></path></svg></button></span>",
56
+ "code": "<span class=\"ui-tag\">\n Removable\n <button class=\"ui-tag__remove\" aria-label=\"Remove\">\n <svg class=\"ui-icon\">...</svg>\n </button>\n</span>"
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "title": "Tag Group",
62
+ "examples": [
63
+ {
64
+ "html": "<div class=\"ui-tag-group\"><span class=\"ui-tag\">JavaScript</span><span class=\"ui-tag\">TypeScript</span><span class=\"ui-tag\">React</span><span class=\"ui-tag\">CSS</span></div>",
65
+ "code": "<div class=\"ui-tag-group\">\n <span class=\"ui-tag\">JavaScript</span>\n <span class=\"ui-tag\">TypeScript</span>\n <span class=\"ui-tag\">React</span>\n</div>"
66
+ }
67
+ ]
68
+ }
69
+ ],
70
+ "customization": [
71
+ {
72
+ "token": "--ui-tag-height",
73
+ "default": "calc(var(--unit) * 3)",
74
+ "description": "Default height"
75
+ },
76
+ {
77
+ "token": "--ui-tag-height-sm",
78
+ "default": "calc(var(--unit) * 2.5)",
79
+ "description": "Small height"
80
+ },
81
+ {
82
+ "token": "--ui-tag-padding-x",
83
+ "default": "var(--ui-space-1)",
84
+ "description": "Horizontal padding"
85
+ },
86
+ {
87
+ "token": "--ui-tag-gap",
88
+ "default": "calc(var(--unit) * 0.5)",
89
+ "description": "Gap between content and remove button"
90
+ },
91
+ {
92
+ "token": "--ui-tag-radius",
93
+ "default": "var(--ui-radius-full)",
94
+ "description": "Border radius"
95
+ },
96
+ {
97
+ "token": "--ui-tag-font-size",
98
+ "default": "var(--ui-font-size-sm)",
99
+ "description": "Font size"
100
+ },
101
+ {
102
+ "token": "--ui-tag-bg",
103
+ "default": "var(--ui-color-bg-muted)",
104
+ "description": "Background color"
105
+ },
106
+ { "token": "--ui-tag-color", "default": "var(--ui-color-text)", "description": "Text color" }
107
+ ]
108
+ }
@@ -0,0 +1,14 @@
1
+ import { resolve } from 'node:path';
2
+ import { expect, test } from '@playwright/test';
3
+ import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../testing';
4
+
5
+ const DOCS_PATH = resolve(__dirname, 'tag.docs.json');
6
+
7
+ test.describe('tag visual regression', () => {
8
+ test('all variations', async ({ page }) => {
9
+ await setupVisualTestFromDocs(page, DOCS_PATH);
10
+ await validateGridRhythm(page, 'tag');
11
+ await saveForLostPixel(page, 'tag');
12
+ await expect(page.locator('body')).toHaveScreenshot('tag.visual.png');
13
+ });
14
+ });
@@ -0,0 +1,124 @@
1
+ @use '../../00-config/tokens/variables' as t;
2
+
3
+ // @component textarea
4
+ // @element textarea
5
+
6
+ @layer components.tokens {
7
+ .textarea {
8
+ --_min-height: var(--ui-textarea-min-height, calc(#{t.$row} * 4));
9
+ --_padding-x: var(--ui-textarea-padding-x, var(--ui-space-1, #{t.$space-1}));
10
+ --_padding-y: var(--ui-textarea-padding-y, var(--ui-space-1, #{t.$space-1}));
11
+ --_font-size: var(--ui-textarea-font-size, var(--ui-font-size-sm, #{t.$font-size-sm}));
12
+ --_radius: var(--ui-textarea-radius, var(--ui-radius-md, #{t.$radius-md}));
13
+ --_bg: var(--ui-textarea-bg, var(--ui-color-bg, #{t.$color-bg}));
14
+ --_border-color: var(--ui-textarea-border-color, var(--ui-color-border-strong, #{t.$color-border-strong}));
15
+ --_border-color-focus: var(--ui-textarea-border-color-focus, var(--ui-color-primary, #{t.$color-primary}));
16
+ --_text: var(--ui-textarea-text, var(--ui-color-text, #{t.$color-text}));
17
+ --_placeholder: var(--ui-textarea-placeholder, var(--ui-color-text-muted, #{t.$color-text-muted}));
18
+ }
19
+
20
+ // @modifier size
21
+ .textarea--sm {
22
+ --_min-height: var(--ui-textarea-min-height-sm, calc(#{t.$row} * 3));
23
+ --_font-size: var(--ui-textarea-font-size-sm, var(--ui-font-size-xs, #{t.$font-size-xs}));
24
+ }
25
+
26
+ .textarea--lg {
27
+ --_min-height: var(--ui-textarea-min-height-lg, calc(#{t.$row} * 6));
28
+ --_padding-x: var(--ui-textarea-padding-x-lg, var(--ui-space-2, #{t.$space-2}));
29
+ --_padding-y: var(--ui-textarea-padding-y-lg, var(--ui-space-2, #{t.$space-2}));
30
+ --_font-size: var(--ui-textarea-font-size-lg, var(--ui-font-size-md, #{t.$font-size-md}));
31
+ }
32
+
33
+ // @modifier variant
34
+ .textarea--filled {
35
+ --_bg: var(--ui-textarea-filled-bg, var(--ui-color-bg-muted, #{t.$color-bg-muted}));
36
+ --_border-color: transparent;
37
+ }
38
+
39
+ .textarea--ghost {
40
+ --_bg: transparent;
41
+ --_border-color: transparent;
42
+ }
43
+
44
+ // @modifier state
45
+ .textarea--error {
46
+ --_border-color: var(--ui-textarea-error-border, var(--ui-color-danger, #{t.$color-danger}));
47
+ --_border-color-focus: var(--ui-textarea-error-border, var(--ui-color-danger, #{t.$color-danger}));
48
+ }
49
+
50
+ .textarea--success {
51
+ --_border-color: var(--ui-textarea-success-border, var(--ui-color-success, #{t.$color-success}));
52
+ --_border-color-focus: var(--ui-textarea-success-border, var(--ui-color-success, #{t.$color-success}));
53
+ }
54
+ }
55
+
56
+ @layer components.styles {
57
+ .textarea {
58
+ display: block;
59
+
60
+ box-sizing: border-box;
61
+ inline-size: 100%;
62
+ min-block-size: var(--_min-height);
63
+ padding-block: var(--_padding-y);
64
+ padding-inline: var(--_padding-x);
65
+
66
+ font-family: inherit;
67
+ font-size: var(--_font-size);
68
+ line-height: var(--ui-row-1, #{t.$row});
69
+ color: var(--_text);
70
+
71
+ background: var(--_bg);
72
+ border: none;
73
+ border-radius: var(--_radius);
74
+ outline: var(--ui-border-width-sm, #{t.$border-width-sm}) solid var(--_border-color);
75
+
76
+ transition:
77
+ border-color var(--ui-duration-fast, 150ms) var(--ui-ease-default, ease),
78
+ box-shadow var(--ui-duration-fast, 150ms) var(--ui-ease-default, ease);
79
+ outline-offset: calc(var(--ui-border-width-sm, #{t.$border-width-sm}) * -1);
80
+
81
+ // Default resize behavior
82
+ resize: vertical;
83
+
84
+ &::placeholder {
85
+ color: var(--_placeholder);
86
+ }
87
+
88
+ &:hover:not(:disabled, :focus) {
89
+ outline-color: var(--ui-color-border-strong, #{t.$color-border-strong});
90
+ }
91
+
92
+ &:focus,
93
+ &--focus {
94
+ outline-color: var(--_border-color-focus);
95
+
96
+ box-shadow: 0 0 0 var(--ui-border-width-md, #{t.$border-width-md}) var(--ui-color-focus, #{t.$color-focus});
97
+ }
98
+
99
+ &:disabled,
100
+ &--disabled {
101
+ opacity: 0.5;
102
+ cursor: not-allowed;
103
+ resize: none;
104
+ }
105
+
106
+ &:read-only {
107
+ background: var(--ui-color-bg-subtle, #{t.$color-bg-subtle});
108
+ resize: none;
109
+ }
110
+
111
+ // Resize variants
112
+ &--resize-none {
113
+ resize: none;
114
+ }
115
+
116
+ &--resize-horizontal {
117
+ resize: horizontal;
118
+ }
119
+
120
+ &--resize-both {
121
+ resize: both;
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "textarea",
3
+ "element": "textarea",
4
+ "modifiers": {
5
+ "size": {
6
+ "values": ["sm", "lg"]
7
+ },
8
+ "variant": {
9
+ "values": ["filled", "ghost"]
10
+ },
11
+ "state": {
12
+ "values": ["error", "success"]
13
+ }
14
+ },
15
+ "cssVars": [
16
+ {
17
+ "name": "--ui-textarea-min-height",
18
+ "default": "calc(#{t.$row} * 4"
19
+ },
20
+ {
21
+ "name": "--ui-textarea-padding-x",
22
+ "default": "var(--ui-space-1)"
23
+ },
24
+ {
25
+ "name": "--ui-textarea-padding-y",
26
+ "default": "var(--ui-space-1)"
27
+ },
28
+ {
29
+ "name": "--ui-textarea-font-size",
30
+ "default": "var(--ui-font-size-sm)"
31
+ },
32
+ {
33
+ "name": "--ui-textarea-radius",
34
+ "default": "var(--ui-radius-md)"
35
+ },
36
+ {
37
+ "name": "--ui-textarea-bg",
38
+ "default": "var(--ui-color-bg)"
39
+ },
40
+ {
41
+ "name": "--ui-textarea-border-color",
42
+ "default": "var(--ui-color-border-strong)"
43
+ },
44
+ {
45
+ "name": "--ui-textarea-border-color-focus",
46
+ "default": "var(--ui-color-primary)"
47
+ },
48
+ {
49
+ "name": "--ui-textarea-text",
50
+ "default": "var(--ui-color-text)"
51
+ },
52
+ {
53
+ "name": "--ui-textarea-placeholder",
54
+ "default": "var(--ui-color-text-muted)"
55
+ },
56
+ {
57
+ "name": "--ui-textarea-min-height-sm",
58
+ "default": "calc(#{t.$row} * 3"
59
+ },
60
+ {
61
+ "name": "--ui-textarea-font-size-sm",
62
+ "default": "var(--ui-font-size-xs)"
63
+ },
64
+ {
65
+ "name": "--ui-textarea-min-height-lg",
66
+ "default": "calc(#{t.$row} * 6"
67
+ },
68
+ {
69
+ "name": "--ui-textarea-padding-x-lg",
70
+ "default": "var(--ui-space-2)"
71
+ },
72
+ {
73
+ "name": "--ui-textarea-padding-y-lg",
74
+ "default": "var(--ui-space-2)"
75
+ },
76
+ {
77
+ "name": "--ui-textarea-font-size-lg",
78
+ "default": "var(--ui-font-size-md)"
79
+ },
80
+ {
81
+ "name": "--ui-textarea-filled-bg",
82
+ "default": "var(--ui-color-bg-muted)"
83
+ },
84
+ {
85
+ "name": "--ui-textarea-error-border",
86
+ "default": "var(--ui-color-danger)"
87
+ },
88
+ {
89
+ "name": "--ui-textarea-success-border",
90
+ "default": "var(--ui-color-success)"
91
+ }
92
+ ]
93
+ }
@@ -0,0 +1,191 @@
1
+ {
2
+ "id": "textarea",
3
+ "type": "component",
4
+ "title": "Textarea",
5
+ "description": "Multi-line text input for longer content like comments or descriptions.",
6
+ "api": "./textarea.api.json",
7
+ "sections": [
8
+ {
9
+ "title": "Default",
10
+ "examples": [
11
+ {
12
+ "html": "<textarea class=\"ui-textarea\" placeholder=\"Enter your message...\"></textarea>"
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "title": "Sizes",
18
+ "examples": [
19
+ {
20
+ "layout": "stack",
21
+ "items": [
22
+ {
23
+ "tag": "textarea",
24
+ "class": "ui-textarea ui-textarea--sm",
25
+ "attrs": { "placeholder": "Small (3 rows)" }
26
+ },
27
+ {
28
+ "tag": "textarea",
29
+ "class": "ui-textarea",
30
+ "attrs": { "placeholder": "Default (4 rows)" }
31
+ },
32
+ {
33
+ "tag": "textarea",
34
+ "class": "ui-textarea ui-textarea--lg",
35
+ "attrs": { "placeholder": "Large (6 rows)" }
36
+ }
37
+ ],
38
+ "code": "<textarea class=\"ui-textarea ui-textarea--sm\"></textarea>\n<textarea class=\"ui-textarea\"></textarea>\n<textarea class=\"ui-textarea ui-textarea--lg\"></textarea>"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "title": "Variants",
44
+ "examples": [
45
+ {
46
+ "layout": "stack",
47
+ "items": [
48
+ {
49
+ "tag": "textarea",
50
+ "class": "ui-textarea",
51
+ "attrs": { "placeholder": "Outline (default)" }
52
+ },
53
+ {
54
+ "tag": "textarea",
55
+ "class": "ui-textarea ui-textarea--filled",
56
+ "attrs": { "placeholder": "Filled" }
57
+ },
58
+ {
59
+ "tag": "textarea",
60
+ "class": "ui-textarea ui-textarea--ghost",
61
+ "attrs": { "placeholder": "Ghost" }
62
+ }
63
+ ],
64
+ "code": "<textarea class=\"ui-textarea\"></textarea>\n<textarea class=\"ui-textarea ui-textarea--filled\"></textarea>\n<textarea class=\"ui-textarea ui-textarea--ghost\"></textarea>"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "title": "States",
70
+ "examples": [
71
+ {
72
+ "layout": "stack",
73
+ "items": [
74
+ {
75
+ "tag": "textarea",
76
+ "class": "ui-textarea ui-textarea--error",
77
+ "text": "Invalid content"
78
+ },
79
+ {
80
+ "tag": "textarea",
81
+ "class": "ui-textarea ui-textarea--success",
82
+ "text": "Valid content"
83
+ },
84
+ {
85
+ "tag": "textarea",
86
+ "class": "ui-textarea",
87
+ "attrs": { "disabled": "", "placeholder": "Disabled" }
88
+ },
89
+ {
90
+ "tag": "textarea",
91
+ "class": "ui-textarea",
92
+ "attrs": { "readonly": "" },
93
+ "text": "Read only content"
94
+ }
95
+ ],
96
+ "code": "<textarea class=\"ui-textarea ui-textarea--error\">Invalid</textarea>\n<textarea class=\"ui-textarea ui-textarea--success\">Valid</textarea>\n<textarea class=\"ui-textarea\" disabled></textarea>\n<textarea class=\"ui-textarea\" readonly>Read only</textarea>"
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "title": "Resize Options",
102
+ "description": "Control how users can resize the textarea.",
103
+ "api": "./textarea.api.json",
104
+ "examples": [
105
+ {
106
+ "layout": "stack",
107
+ "items": [
108
+ {
109
+ "tag": "textarea",
110
+ "class": "ui-textarea",
111
+ "attrs": { "placeholder": "Vertical resize (default)" }
112
+ },
113
+ {
114
+ "tag": "textarea",
115
+ "class": "ui-textarea ui-textarea--resize-none",
116
+ "attrs": { "placeholder": "No resize" }
117
+ },
118
+ {
119
+ "tag": "textarea",
120
+ "class": "ui-textarea ui-textarea--resize-both",
121
+ "attrs": { "placeholder": "Resize both directions" }
122
+ }
123
+ ],
124
+ "code": "<textarea class=\"ui-textarea\">Vertical (default)</textarea>\n<textarea class=\"ui-textarea ui-textarea--resize-none\">No resize</textarea>\n<textarea class=\"ui-textarea ui-textarea--resize-both\">Both directions</textarea>"
125
+ }
126
+ ]
127
+ }
128
+ ],
129
+ "customization": [
130
+ {
131
+ "token": "--ui-textarea-min-height",
132
+ "default": "calc(var(--row) * 4)",
133
+ "description": "Default minimum height"
134
+ },
135
+ {
136
+ "token": "--ui-textarea-min-height-sm",
137
+ "default": "calc(var(--row) * 3)",
138
+ "description": "Small minimum height"
139
+ },
140
+ {
141
+ "token": "--ui-textarea-min-height-lg",
142
+ "default": "calc(var(--row) * 6)",
143
+ "description": "Large minimum height"
144
+ },
145
+ {
146
+ "token": "--ui-textarea-padding-x",
147
+ "default": "var(--ui-space-1)",
148
+ "description": "Horizontal padding"
149
+ },
150
+ {
151
+ "token": "--ui-textarea-padding-y",
152
+ "default": "var(--ui-space-1)",
153
+ "description": "Vertical padding"
154
+ },
155
+ {
156
+ "token": "--ui-textarea-font-size",
157
+ "default": "var(--ui-font-size-sm)",
158
+ "description": "Font size"
159
+ },
160
+ {
161
+ "token": "--ui-textarea-radius",
162
+ "default": "var(--ui-radius-md)",
163
+ "description": "Border radius"
164
+ },
165
+ {
166
+ "token": "--ui-textarea-bg",
167
+ "default": "var(--ui-color-bg)",
168
+ "description": "Background color"
169
+ },
170
+ {
171
+ "token": "--ui-textarea-border-color",
172
+ "default": "var(--ui-color-border-strong)",
173
+ "description": "Border color"
174
+ },
175
+ {
176
+ "token": "--ui-textarea-border-color-focus",
177
+ "default": "var(--ui-color-primary)",
178
+ "description": "Focus border color"
179
+ },
180
+ {
181
+ "token": "--ui-textarea-text",
182
+ "default": "var(--ui-color-text)",
183
+ "description": "Text color"
184
+ },
185
+ {
186
+ "token": "--ui-textarea-placeholder",
187
+ "default": "var(--ui-color-text-muted)",
188
+ "description": "Placeholder color"
189
+ }
190
+ ]
191
+ }
@@ -0,0 +1,14 @@
1
+ import { resolve } from 'node:path';
2
+ import { expect, test } from '@playwright/test';
3
+ import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../testing';
4
+
5
+ const DOCS_PATH = resolve(__dirname, 'textarea.docs.json');
6
+
7
+ test.describe('textarea visual regression', () => {
8
+ test('all variations', async ({ page }) => {
9
+ await setupVisualTestFromDocs(page, DOCS_PATH);
10
+ await validateGridRhythm(page, 'textarea');
11
+ await saveForLostPixel(page, 'textarea');
12
+ await expect(page.locator('body')).toHaveScreenshot('textarea.visual.png');
13
+ });
14
+ });