@g4rcez/components 3.0.0-0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/dist/ai/SKILL.md +266 -0
  2. package/dist/ai/docs/Alert.md +167 -0
  3. package/dist/ai/docs/AnimatedList.md +205 -0
  4. package/dist/ai/docs/Autocomplete.md +225 -0
  5. package/dist/ai/docs/Button.md +182 -0
  6. package/dist/ai/docs/Calendar.md +219 -0
  7. package/dist/ai/docs/Card.md +174 -0
  8. package/dist/ai/docs/Checkbox.md +199 -0
  9. package/dist/ai/docs/CommandPalette.md +293 -0
  10. package/dist/ai/docs/DatePicker.md +171 -0
  11. package/dist/ai/docs/Dropdown.md +223 -0
  12. package/dist/ai/docs/Empty.md +163 -0
  13. package/dist/ai/docs/Expand.md +143 -0
  14. package/dist/ai/docs/FileUpload.md +225 -0
  15. package/dist/ai/docs/Form.md +107 -0
  16. package/dist/ai/docs/FormReset.md +117 -0
  17. package/dist/ai/docs/Heading.md +88 -0
  18. package/dist/ai/docs/Input.md +237 -0
  19. package/dist/ai/docs/InputField.md +170 -0
  20. package/dist/ai/docs/List.md +205 -0
  21. package/dist/ai/docs/Menu.md +166 -0
  22. package/dist/ai/docs/Modal.md +280 -0
  23. package/dist/ai/docs/MultiSelect.md +196 -0
  24. package/dist/ai/docs/Notifications.md +231 -0
  25. package/dist/ai/docs/PageCalendar.md +271 -0
  26. package/dist/ai/docs/Polymorph.md +159 -0
  27. package/dist/ai/docs/Progress.md +145 -0
  28. package/dist/ai/docs/Radiobox.md +128 -0
  29. package/dist/ai/docs/RenderOnView.md +138 -0
  30. package/dist/ai/docs/Resizable.md +159 -0
  31. package/dist/ai/docs/Select.md +284 -0
  32. package/dist/ai/docs/Shortcut.md +105 -0
  33. package/dist/ai/docs/Skeleton.md +166 -0
  34. package/dist/ai/docs/Slider.md +144 -0
  35. package/dist/ai/docs/Slot.md +173 -0
  36. package/dist/ai/docs/Spinner.md +118 -0
  37. package/dist/ai/docs/Stats.md +137 -0
  38. package/dist/ai/docs/Step.md +159 -0
  39. package/dist/ai/docs/Switch.md +167 -0
  40. package/dist/ai/docs/Table.md +298 -0
  41. package/dist/ai/docs/Tabs.md +191 -0
  42. package/dist/ai/docs/Tag.md +224 -0
  43. package/dist/ai/docs/TaskList.md +144 -0
  44. package/dist/ai/docs/Textarea.md +167 -0
  45. package/dist/ai/docs/Timeline.md +210 -0
  46. package/dist/ai/docs/Toolbar.md +132 -0
  47. package/dist/ai/docs/Tooltip.md +231 -0
  48. package/dist/ai/docs/TransferList.md +142 -0
  49. package/dist/ai/docs/Typography.md +187 -0
  50. package/dist/ai/docs/Wizard.md +213 -0
  51. package/dist/ai/docs/index.md +183 -0
  52. package/dist/components/core/button.d.ts +2 -8
  53. package/dist/components/core/button.d.ts.map +1 -1
  54. package/dist/components/core/polymorph.d.ts.map +1 -1
  55. package/dist/components/core/slot.d.ts +1 -1
  56. package/dist/components/core/slot.d.ts.map +1 -1
  57. package/dist/components/core/tag.d.ts +2 -2
  58. package/dist/components/core/tag.d.ts.map +1 -1
  59. package/dist/components/core/typography.d.ts.map +1 -1
  60. package/dist/components/display/alert.d.ts.map +1 -1
  61. package/dist/components/display/calendar.d.ts.map +1 -1
  62. package/dist/components/display/card.d.ts.map +1 -1
  63. package/dist/components/display/list.d.ts.map +1 -1
  64. package/dist/components/display/notifications.d.ts +2 -0
  65. package/dist/components/display/notifications.d.ts.map +1 -1
  66. package/dist/components/display/progress.d.ts.map +1 -1
  67. package/dist/components/display/skeleton.d.ts.map +1 -1
  68. package/dist/components/display/step.d.ts.map +1 -1
  69. package/dist/components/display/tabs.d.ts.map +1 -1
  70. package/dist/components/floating/command-palette.d.ts +1 -0
  71. package/dist/components/floating/command-palette.d.ts.map +1 -1
  72. package/dist/components/floating/dropdown.d.ts +1 -0
  73. package/dist/components/floating/dropdown.d.ts.map +1 -1
  74. package/dist/components/floating/menu.d.ts +2 -2
  75. package/dist/components/floating/menu.d.ts.map +1 -1
  76. package/dist/components/floating/modal.d.ts +20 -53
  77. package/dist/components/floating/modal.d.ts.map +1 -1
  78. package/dist/components/floating/tooltip.d.ts.map +1 -1
  79. package/dist/components/floating/wizard.d.ts +1 -1
  80. package/dist/components/floating/wizard.d.ts.map +1 -1
  81. package/dist/components/form/autocomplete.d.ts.map +1 -1
  82. package/dist/components/form/date-picker.d.ts.map +1 -1
  83. package/dist/components/form/free-text.d.ts.map +1 -1
  84. package/dist/components/form/input-field.d.ts +3 -2
  85. package/dist/components/form/input-field.d.ts.map +1 -1
  86. package/dist/components/form/multi-select.d.ts.map +1 -1
  87. package/dist/components/form/select.d.ts.map +1 -1
  88. package/dist/components/form/slider.d.ts.map +1 -1
  89. package/dist/components/index.d.ts +2 -0
  90. package/dist/components/index.d.ts.map +1 -1
  91. package/dist/components/page-calendar/calendar-header.d.ts +16 -0
  92. package/dist/components/page-calendar/calendar-header.d.ts.map +1 -0
  93. package/dist/components/page-calendar/day-view.d.ts +12 -0
  94. package/dist/components/page-calendar/day-view.d.ts.map +1 -0
  95. package/dist/components/page-calendar/event-pill.d.ts +9 -0
  96. package/dist/components/page-calendar/event-pill.d.ts.map +1 -0
  97. package/dist/components/page-calendar/index.d.ts +4 -0
  98. package/dist/components/page-calendar/index.d.ts.map +1 -0
  99. package/dist/components/page-calendar/month-view.d.ts +11 -0
  100. package/dist/components/page-calendar/month-view.d.ts.map +1 -0
  101. package/dist/components/page-calendar/page-calendar.d.ts +18 -0
  102. package/dist/components/page-calendar/page-calendar.d.ts.map +1 -0
  103. package/dist/components/page-calendar/page-calendar.types.d.ts +18 -0
  104. package/dist/components/page-calendar/page-calendar.types.d.ts.map +1 -0
  105. package/dist/components/page-calendar/page-calendar.utils.d.ts +18 -0
  106. package/dist/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
  107. package/dist/components/page-calendar/week-view.d.ts +11 -0
  108. package/dist/components/page-calendar/week-view.d.ts.map +1 -0
  109. package/dist/components/table/index.d.ts.map +1 -1
  110. package/dist/components/table/inner-table.d.ts.map +1 -1
  111. package/dist/components/table/metadata.d.ts.map +1 -1
  112. package/dist/components/table/row.d.ts.map +1 -1
  113. package/dist/components/table/table-lib.d.ts.map +1 -1
  114. package/dist/components/table/thead.d.ts.map +1 -1
  115. package/dist/config/context.d.ts.map +1 -1
  116. package/dist/config/default-translations.d.ts +21 -4
  117. package/dist/config/default-translations.d.ts.map +1 -1
  118. package/dist/constants.d.ts.map +1 -1
  119. package/dist/hooks/use-components-provider.d.ts.map +1 -1
  120. package/dist/hooks/use-form.d.ts +11 -11
  121. package/dist/hooks/use-form.d.ts.map +1 -1
  122. package/dist/hooks/use-input-id.d.ts.map +1 -1
  123. package/dist/hooks/use-preferences.d.ts.map +1 -1
  124. package/dist/hooks/use-previous.d.ts.map +1 -1
  125. package/dist/hooks/use-reactive.d.ts.map +1 -1
  126. package/dist/hooks/use-resize-observer.d.ts.map +1 -1
  127. package/dist/hooks/use-stable-ref.d.ts.map +1 -1
  128. package/dist/hooks/use-swipe.d.ts.map +1 -1
  129. package/dist/hooks/use-translations.d.ts +21 -4
  130. package/dist/hooks/use-translations.d.ts.map +1 -1
  131. package/dist/index.css +1 -0
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +28 -20
  134. package/dist/index.js.map +1 -1
  135. package/dist/index.mjs +13862 -12512
  136. package/dist/index.mjs.map +1 -1
  137. package/dist/index.umd.js +24 -17
  138. package/dist/index.umd.js.map +1 -1
  139. package/dist/lib/dom.d.ts +1 -0
  140. package/dist/lib/dom.d.ts.map +1 -1
  141. package/dist/lib/fns.d.ts.map +1 -1
  142. package/dist/preset/plugin.tailwind.d.ts +9 -0
  143. package/dist/preset/plugin.tailwind.d.ts.map +1 -0
  144. package/dist/preset/plugin.tailwind.js +27 -0
  145. package/dist/preset/preset.tailwind.d.ts +8 -0
  146. package/dist/preset/preset.tailwind.d.ts.map +1 -0
  147. package/dist/preset/preset.tailwind.js +54 -0
  148. package/dist/preset/src/styles/common.d.ts +2 -14
  149. package/dist/preset/src/styles/common.d.ts.map +1 -1
  150. package/dist/preset/src/styles/common.js +1 -0
  151. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  152. package/dist/preset/src/styles/dark.js +119 -114
  153. package/dist/preset/src/styles/light.d.ts.map +1 -1
  154. package/dist/preset/src/styles/light.js +111 -106
  155. package/dist/preset/src/styles/theme.types.d.ts +17 -8
  156. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  157. package/dist/styles/common.d.ts +2 -14
  158. package/dist/styles/common.d.ts.map +1 -1
  159. package/dist/styles/dark.d.ts.map +1 -1
  160. package/dist/styles/light.d.ts.map +1 -1
  161. package/dist/styles/theme.types.d.ts +17 -8
  162. package/dist/styles/theme.types.d.ts.map +1 -1
  163. package/package.json +299 -301
  164. package/dist/components/core/button.jsx +0 -86
  165. package/dist/components/core/heading.jsx +0 -4
  166. package/dist/components/core/polymorph.jsx +0 -5
  167. package/dist/components/core/render-on-view.jsx +0 -31
  168. package/dist/components/core/resizable.jsx +0 -51
  169. package/dist/components/core/slot.jsx +0 -163
  170. package/dist/components/core/tag.jsx +0 -51
  171. package/dist/components/core/typography.jsx +0 -26
  172. package/dist/components/display/alert.jsx +0 -56
  173. package/dist/components/display/calendar.jsx +0 -301
  174. package/dist/components/display/card.jsx +0 -43
  175. package/dist/components/display/empty.jsx +0 -11
  176. package/dist/components/display/list.jsx +0 -81
  177. package/dist/components/display/notifications.jsx +0 -98
  178. package/dist/components/display/progress.jsx +0 -13
  179. package/dist/components/display/shortcut.jsx +0 -23
  180. package/dist/components/display/skeleton.jsx +0 -14
  181. package/dist/components/display/spinner.jsx +0 -7
  182. package/dist/components/display/stats.jsx +0 -20
  183. package/dist/components/display/step.jsx +0 -131
  184. package/dist/components/display/tabs.jsx +0 -100
  185. package/dist/components/display/timeline.jsx +0 -25
  186. package/dist/components/floating/command-palette.jsx +0 -172
  187. package/dist/components/floating/dropdown.jsx +0 -53
  188. package/dist/components/floating/expand.jsx +0 -44
  189. package/dist/components/floating/menu.jsx +0 -147
  190. package/dist/components/floating/modal.jsx +0 -241
  191. package/dist/components/floating/toolbar.jsx +0 -5
  192. package/dist/components/floating/tooltip.jsx +0 -64
  193. package/dist/components/floating/wizard.jsx +0 -164
  194. package/dist/components/form/autocomplete.jsx +0 -275
  195. package/dist/components/form/checkbox.jsx +0 -12
  196. package/dist/components/form/date-picker.jsx +0 -115
  197. package/dist/components/form/file-upload.jsx +0 -133
  198. package/dist/components/form/form.jsx +0 -10
  199. package/dist/components/form/formReset.jsx +0 -17
  200. package/dist/components/form/free-text.jsx +0 -41
  201. package/dist/components/form/input-field.jsx +0 -54
  202. package/dist/components/form/input.jsx +0 -36
  203. package/dist/components/form/multi-select.jsx +0 -328
  204. package/dist/components/form/radiobox.jsx +0 -6
  205. package/dist/components/form/select.jsx +0 -42
  206. package/dist/components/form/slider.jsx +0 -45
  207. package/dist/components/form/switch.jsx +0 -46
  208. package/dist/components/form/task-list.jsx +0 -26
  209. package/dist/components/form/textarea.jsx +0 -12
  210. package/dist/components/form/transfer-list.jsx +0 -39
  211. package/dist/components/index.js +0 -43
  212. package/dist/components/table/filter.jsx +0 -141
  213. package/dist/components/table/group.jsx +0 -68
  214. package/dist/components/table/index.jsx +0 -60
  215. package/dist/components/table/inner-table.jsx +0 -104
  216. package/dist/components/table/metadata.jsx +0 -37
  217. package/dist/components/table/pagination.jsx +0 -73
  218. package/dist/components/table/row.jsx +0 -58
  219. package/dist/components/table/sort.jsx +0 -105
  220. package/dist/components/table/table-lib.js +0 -84
  221. package/dist/components/table/table.context.jsx +0 -4
  222. package/dist/components/table/thead.jsx +0 -103
  223. package/dist/config/context.js +0 -12
  224. package/dist/config/default-translations.jsx +0 -66
  225. package/dist/config/default-tweaks.js +0 -4
  226. package/dist/constants.js +0 -2
  227. package/dist/hooks/use-click-outside.js +0 -17
  228. package/dist/hooks/use-color-parser.js +0 -9
  229. package/dist/hooks/use-components-provider.jsx +0 -16
  230. package/dist/hooks/use-debounce.js +0 -12
  231. package/dist/hooks/use-floating-ref.js +0 -6
  232. package/dist/hooks/use-form.js +0 -549
  233. package/dist/hooks/use-hover.js +0 -18
  234. package/dist/hooks/use-input-id.js +0 -5
  235. package/dist/hooks/use-is-coarse-device.js +0 -12
  236. package/dist/hooks/use-locale.js +0 -10
  237. package/dist/hooks/use-media-query.js +0 -25
  238. package/dist/hooks/use-on-event.js +0 -7
  239. package/dist/hooks/use-parent.js +0 -21
  240. package/dist/hooks/use-preferences.js +0 -23
  241. package/dist/hooks/use-previous.js +0 -8
  242. package/dist/hooks/use-reactive.js +0 -8
  243. package/dist/hooks/use-remove-scroll.js +0 -61
  244. package/dist/hooks/use-resize-observer.js +0 -17
  245. package/dist/hooks/use-stable-ref.js +0 -8
  246. package/dist/hooks/use-swipe.js +0 -16
  247. package/dist/hooks/use-translations.js +0 -9
  248. package/dist/hooks/use-tweaks.js +0 -9
  249. package/dist/hooks/use-window-size.js +0 -14
  250. package/dist/lib/combi-keys.js +0 -60
  251. package/dist/lib/dict.js +0 -39
  252. package/dist/lib/dom.js +0 -44
  253. package/dist/lib/fns.js +0 -46
  254. package/dist/lib/fzf.js +0 -117
  255. package/dist/lib/keyboard-area.js +0 -14
  256. package/dist/preset/tailwindcssv4.d.ts +0 -3
  257. package/dist/preset/tailwindcssv4.d.ts.map +0 -1
  258. package/dist/preset/tailwindcssv4.js +0 -75
  259. package/dist/styles/common.js +0 -28
  260. package/dist/styles/dark.js +0 -209
  261. package/dist/styles/design-tokens.js +0 -69
  262. package/dist/styles/light.js +0 -209
  263. package/dist/styles/theme.js +0 -4
  264. package/dist/styles/theme.types.js +0 -1
  265. package/dist/types.js +0 -1
@@ -1,209 +0,0 @@
1
- import { rounded, spacing, zIndex } from "./common";
2
- export const DARK_THEME = {
3
- name: "dark",
4
- zIndex,
5
- rounded,
6
- spacing,
7
- shadow: {
8
- "shadow-notification": "1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)",
9
- "shadow-floating": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
10
- "shadow-card": "0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)",
11
- "shadow-table": "0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)",
12
- },
13
- colors: {
14
- foreground: "hsla(210, 50%, 98%)",
15
- background: "hsla(0, 0%, 9%)",
16
- border: "hsla(240, 7%, 27%)",
17
- muted: "hsla(210, 10%, 40%)",
18
- disabled: "hsla(240, 4%, 33%)",
19
- emphasis: {
20
- foreground: "hsla(251, 91%, 95%)",
21
- DEFAULT: "hsla(255, 92%, 76%)",
22
- subtle: "hsla(252, 95%, 85%)",
23
- hover: "hsla(262, 83%, 58%)",
24
- },
25
- primary: {
26
- foreground: "hsla(210, 40%, 98%)",
27
- DEFAULT: "hsla(200,98%,39%)",
28
- subtle: "hsla(199, 95%, 87%)",
29
- hover: "hsla(199, 97%, 40%)",
30
- },
31
- secondary: {
32
- DEFAULT: "hsla(210, 32%, 70%)",
33
- background: "hsla(210, 30%, 81%)",
34
- subtle: "hsla(210, 27%, 88%)",
35
- hover: "hsla(210, 10%, 58%)",
36
- foreground: "hsla(210, 20%, 30%)",
37
- },
38
- info: {
39
- DEFAULT: "hsla(219, 91%, 59%)",
40
- subtle: "hsla(219, 93%, 77%)",
41
- hover: "hsla(219, 83%, 41%)",
42
- foreground: "hsla(210, 40%, 98%)",
43
- notification: "hsla(219, 91%, 59%)",
44
- },
45
- warn: {
46
- DEFAULT: "hsla(27, 96%, 61%)",
47
- subtle: "hsla(45, 95%, 66%)",
48
- hover: "hsla(21, 90%, 48%)",
49
- foreground: "hsla(210, 40%, 98%)",
50
- notification: "hsla(32, 65%, 75%)",
51
- },
52
- danger: {
53
- DEFAULT: "hsla(358, 65%, 57%)",
54
- subtle: "hsla(0, 94%, 81%)",
55
- hover: "hsla(0, 82%, 47%)",
56
- foreground: "hsla(210, 40%, 98%)",
57
- notification: "hsla(358, 40%, 23%)",
58
- },
59
- success: {
60
- DEFAULT: "hsla(160, 73%, 36%)",
61
- subtle: "hsla(160, 75%, 75%)",
62
- hover: "hsla(160, 91%, 27%)",
63
- foreground: "hsla(160, 91%, 50%)",
64
- notification: "hsla(160,90%,5%)",
65
- },
66
- input: {
67
- border: "hsla(240, 4%, 25%)",
68
- placeholder: "hsla(210, 24%, 71%)",
69
- "mask-error": "hsla(0, 94%, 81%)",
70
- "switch-bg": "hsla(0, 0%, 9%)",
71
- switch: "hsla(0, 0%, 100%)",
72
- slider: "hsla(0, 0%, 100%)",
73
- },
74
- card: {
75
- muted: "hsla(0, 0%, 22%)",
76
- border: "hsla(240, 7%, 20%)",
77
- background: "hsla(0, 0%, 15%)",
78
- },
79
- floating: {
80
- foreground: "hsla(210, 40%, 98%)",
81
- background: "hsla(219, 15%, 12%)",
82
- hover: "hsla(221, 10%, 22%)",
83
- border: "hsla(240, 7%, 17%)",
84
- overlay: "hsla(0, 0%, 0%)",
85
- },
86
- tooltip: {
87
- foreground: "hsla(210, 40%, 98%)",
88
- background: "hsla(221, 5%, 15%)",
89
- hover: "hsla(221, 10%, 35%)",
90
- border: "hsla(0, 0%, 19%)",
91
- overlay: "hsla(0, 0%, 0%)",
92
- },
93
- table: {
94
- header: "hsla(0, 0%, 12%)",
95
- border: "hsla(240, 4%, 20%)",
96
- background: "hsla(0, 0%, 15%)",
97
- },
98
- button: {
99
- primary: {
100
- text: "hsla(200,98%,60%)",
101
- bg: "hsla(200,28%,19%)",
102
- },
103
- warn: {
104
- text: "hsla(26,100%,67%)",
105
- bg: "hsla(37,100%,15%)",
106
- },
107
- info: {
108
- text: "hsla(200,80%,70%)",
109
- bg: "hsla(206,66%,24%)",
110
- },
111
- success: {
112
- text: "hsla(151,65%,54%)",
113
- bg: "hsla(154,52%,19%)",
114
- },
115
- danger: {
116
- text: "hsla(2,100%,90%)",
117
- bg: "hsla(5,62%,23%)",
118
- },
119
- muted: {
120
- text: "hsla(0, 100%, 100%)",
121
- bg: "hsla(0, 0%, 12%)",
122
- },
123
- neutral: {
124
- text: "hsla(200,98%,60%)",
125
- bg: "hsla(200,28%,19%)",
126
- },
127
- secondary: {
128
- text: "hsla(216,10%,90%)",
129
- bg: "hsla(214,7%,19%)",
130
- },
131
- },
132
- tag: {
133
- primary: {
134
- text: "hsla(200,98%,60%)",
135
- bg: "hsla(200,28%,19%)",
136
- },
137
- warn: {
138
- text: "hsla(26,100%,67%)",
139
- bg: "hsla(37,100%,15%)",
140
- },
141
- info: {
142
- text: "hsla(200,80%,70%)",
143
- bg: "hsla(206,66%,24%)",
144
- },
145
- success: {
146
- text: "hsla(151,65%,54%)",
147
- bg: "hsla(154,52%,19%)",
148
- },
149
- danger: {
150
- text: "hsla(2,100%,79%)",
151
- bg: "hsla(5,62%,23%)",
152
- },
153
- neutral: {
154
- text: "hsla(200,98%,60%)",
155
- bg: "hsla(200,28%,19%)",
156
- },
157
- secondary: {
158
- text: "hsla(216,10%,90%)",
159
- bg: "hsla(214,7%,19%)",
160
- },
161
- muted: {
162
- text: "hsla(0, 100%, 100%)",
163
- bg: "hsla(0, 0%, 12%)",
164
- },
165
- },
166
- alert: {
167
- primary: {
168
- text: "hsla(210,100%,72%)",
169
- border: "hsla(212,69%,16%)",
170
- bg: "hsla(215,42%,9%)",
171
- },
172
- warn: {
173
- bg: "hsla(28,33%,9%)",
174
- border: "hsla(29,65%,12%)",
175
- text: "hsla(27,100%,78%)",
176
- },
177
- info: {
178
- text: "hsla(253,100%,83%)",
179
- bg: "hsla(263,28%,11%)",
180
- border: "hsla(252,34%,51%)",
181
- },
182
- success: {
183
- text: "hsla(144,79%,79%)",
184
- bg: "hsla(153,20%,9%)",
185
- border: "hsla(144,70%,14%)",
186
- },
187
- danger: {
188
- text: "hsla(350,100%,91%)",
189
- bg: "hsla(355,25%,15%)",
190
- border: "hsla(355,25%,10%)",
191
- },
192
- neutral: {
193
- text: "hsla(200,98%,60%)",
194
- bg: "hsla(200,28%,19%)",
195
- border: "hsla(200,90%,89%)",
196
- },
197
- secondary: {
198
- text: "hsla(220,9%,94%)",
199
- bg: "hsla(220,6%,10%)",
200
- border: "hsla(214,7%,19%)",
201
- },
202
- muted: {
203
- bg: "hsla(0, 0%, 12%)",
204
- border: "hsla(0, 0%, 40%)",
205
- text: "hsla(0, 100%, 100%)",
206
- },
207
- },
208
- },
209
- };
@@ -1,69 +0,0 @@
1
- export const parsers = {
2
- hex: (v) => v,
3
- raw: (v) => v,
4
- hsl: (v) => `hsl(${v})`,
5
- rgb: (v) => `rgb(${v})`,
6
- z: (_, __, k) => `var(--z-${k})`,
7
- hsla: (v) => `hsla(${v})`,
8
- rgba: (v) => `rgba(${v})`,
9
- cssVariable: (_, __, k) => `var(--${k})`,
10
- formatWithVar: (format) => (_, __, v) => `${format}(var(--${v}), <alpha-value>)`,
11
- };
12
- export const reduceTokens = (colors, parse, prefix = "", append = "") => Object.entries(colors).reduce((acc, [key, value]) => {
13
- const combine = append === "" ? `${prefix}${key}` : `${append}-${key}`;
14
- if (typeof value === "string") {
15
- const k = append === "" ? `${prefix}${key}` : key;
16
- return acc.concat(parse(value, k, combine));
17
- }
18
- return acc.concat(reduceTokens(value, parse, prefix, combine));
19
- }, []);
20
- export const createDesignTokens = (colors, parse, prefix = "", append = "") => Object.entries(colors).reduce((acc, [key, value]) => {
21
- const combine = append === "" ? `${prefix}${key}` : `${append}-${key}`;
22
- if (typeof value === "string") {
23
- const k = append === "" ? `${prefix}${key}` : key;
24
- return { ...acc, [k]: parse(value, key, combine) };
25
- }
26
- return {
27
- ...acc,
28
- [key]: createDesignTokens(value, parse, prefix, combine),
29
- };
30
- }, {});
31
- const modifiers = {
32
- default: (variables) => `:root { ${variables} }`,
33
- dark: (variables) => `html.dark {${variables}}`,
34
- };
35
- const createStyleContent = (tokens, modifiers) => {
36
- const v = modifiers.value || ((_, s) => s);
37
- const content = tokens.map((token) => `${token.key}: ${v(token.key, token.value)}`).join(";");
38
- return modifiers.result(content);
39
- };
40
- export const createStyles = {
41
- default: (tokens) => createStyleContent(tokens, { result: modifiers.default }),
42
- dark: (tokens) => createStyleContent(tokens, { result: modifiers.dark }),
43
- };
44
- const fn = (p) => (value, _, key) => {
45
- const r = { key: `--${key}`, value: `${value}` };
46
- return p ? p(r) : r;
47
- };
48
- const zIndexParser = (t) => ({ key: t.key.replace(/^--/, "--z-"), value: t.value });
49
- const createTokens = (theme, map) => {
50
- const colors = reduceTokens(theme.colors, fn(map?.colors));
51
- const spacing = reduceTokens(theme.spacing, fn(map?.spacing));
52
- const rounded = reduceTokens(theme.rounded, fn(map?.rounded));
53
- const shadow = reduceTokens(theme.shadow, fn(map?.rounded));
54
- const zIndex = reduceTokens(theme.zIndex, fn(map?.zIndex ?? zIndexParser));
55
- const customTokens = theme.custom ? reduceTokens(theme.custom, fn(map?.customTokens)) : [];
56
- return colors.concat(spacing, rounded, customTokens, zIndex, shadow);
57
- };
58
- export const createTheme = (theme, name) => createStyleContent(createTokens(theme), {
59
- result: (variables) => `html${name ? `.${name}` : ""} {${variables}}`,
60
- value: (_, v) => v.replace("hsla(", "").replace(")", ""),
61
- });
62
- export const createCssProperties = (theme, map) => {
63
- const tokens = createTokens(theme, map);
64
- return tokens.reduce((acc, el) => ({ ...acc, [el.key]: el.value }), {});
65
- };
66
- export const createTokenStyles = (theme, map) => createStyleContent(createTokens(theme, map), {
67
- result: (variables) => `html${map?.name ? `.${map.name}` : ""} {${variables}}`,
68
- value: (_, v) => v,
69
- });
@@ -1,209 +0,0 @@
1
- import { rounded, spacing, zIndex } from "./common";
2
- export const LIGHT_THEME = {
3
- rounded,
4
- spacing,
5
- name: "light",
6
- shadow: {
7
- "shadow-notification": "1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)",
8
- "shadow-floating": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
9
- "shadow-card": "0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)",
10
- "shadow-table": "0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)",
11
- },
12
- zIndex,
13
- colors: {
14
- foreground: "hsla(217, 15%, 30%)",
15
- background: "hsla(210, 40%, 98%)",
16
- border: "hsla(210, 25%, 88%)",
17
- muted: "hsla(210, 30%, 86%)",
18
- disabled: "hsla(240, 10%, 78%)",
19
- emphasis: {
20
- foreground: "hsla(251,91%,95%)",
21
- DEFAULT: "hsla(255,92%,76%)",
22
- subtle: "hsla(252,95%,85%)",
23
- hover: "hsla(262,83%,58%)",
24
- },
25
- primary: {
26
- foreground: "hsla(210, 40%, 98%)",
27
- DEFAULT: "hsla(199, 89%, 54%)",
28
- subtle: "hsla(199, 95%, 87%)",
29
- hover: "hsla(199, 97%, 40%)",
30
- },
31
- secondary: {
32
- background: "hsla(210, 25%, 35%)",
33
- DEFAULT: "hsla(210, 25%, 45%)",
34
- subtle: "hsla(207, 29%, 39%)",
35
- hover: "hsla(210, 21%, 67%)",
36
- foreground: "hsla(210, 40%, 98%)",
37
- },
38
- info: {
39
- DEFAULT: "hsla(219, 91%, 59%)",
40
- subtle: "hsla(219, 70%, 90%)",
41
- hover: "hsla(219, 83%, 41%)",
42
- foreground: "hsla(210, 34%, 96%)",
43
- notification: "hsla(219, 91%, 59%)",
44
- },
45
- danger: {
46
- DEFAULT: "hsla(0, 82%, 63%)",
47
- subtle: "hsla(0, 96%, 95%)",
48
- hover: "hsla(0, 82%, 47%)",
49
- foreground: "hsla(210, 34%, 96%)",
50
- notification: "hsla(0, 100%, 87%)",
51
- },
52
- warn: {
53
- DEFAULT: "hsla(27, 100%, 70%)",
54
- subtle: "hsla(45, 95%, 80%)",
55
- hover: "hsla(29, 85%, 50%)",
56
- foreground: "hsla(210, 34%, 96%)",
57
- notification: "hsla(27, 85%, 92%)",
58
- },
59
- success: {
60
- DEFAULT: "hsla(160, 73%, 36%)",
61
- subtle: "hsla(160, 75%, 90%)",
62
- hover: "hsla(160, 91%, 27%)",
63
- foreground: "hsla(160, 91%, 17%)",
64
- notification: "hsla(160, 75%, 80%)",
65
- },
66
- input: {
67
- border: "hsla(218, 22%, 85%)",
68
- placeholder: "hsla(210, 24%, 71%)",
69
- "mask-error": "hsla(0, 94%, 81%)",
70
- "switch-bg": "hsla(0, 0%, 45%)",
71
- switch: "hsla(0, 0%, 100%)",
72
- slider: "hsla(0, 0%, 100%)",
73
- },
74
- card: {
75
- muted: "hsla(210, 25%, 94%)",
76
- border: "hsla(210, 25%, 95%)",
77
- background: "hsla(0, 0%, 100%)",
78
- },
79
- floating: {
80
- foreground: "hsla(217, 15%, 20%)",
81
- background: "hsla(0, 0%, 100%)",
82
- hover: "hsla(0, 0%, 92%)",
83
- border: "hsla(210, 25%, 88%)",
84
- overlay: "hsla(0, 0%, 0%)",
85
- },
86
- tooltip: {
87
- foreground: "hsla(217, 15%, 20%)",
88
- background: "hsla(210, 25%, 98%)",
89
- hover: "hsla(210, 25%, 92%)",
90
- border: "hsla(200, 1%, 80%)",
91
- overlay: "hsla(0, 0%, 0%)",
92
- },
93
- table: {
94
- header: "hsla(210, 20%, 98%)",
95
- background: "hsla(0, 0%, 100%)",
96
- border: "hsla(210, 20%, 92%)",
97
- },
98
- button: {
99
- muted: {
100
- bg: "hsla(210, 30%, 86%)",
101
- text: "hsla(210, 10%, 15%)",
102
- },
103
- primary: {
104
- text: "hsla(0, 0%, 100%)",
105
- bg: "hsla(207,96%,48%)",
106
- },
107
- warn: {
108
- bg: "hsla(26,90%,60%)",
109
- text: "hsla(0, 0%, 100%)",
110
- },
111
- info: {
112
- text: "hsla(0, 0%, 100%)",
113
- bg: "hsla(210,60%,60%)",
114
- },
115
- success: {
116
- text: "hsla(0, 0%, 100%)",
117
- bg: "hsla(152,56%,39%)",
118
- },
119
- danger: {
120
- text: "hsla(0, 0%, 100%)",
121
- bg: "hsla(10,78%,54%)",
122
- },
123
- neutral: {
124
- text: "hsla(200,98%,60%)",
125
- bg: "hsla(200,28%,19%)",
126
- },
127
- secondary: {
128
- text: "hsla(216,10%,90%)",
129
- bg: "hsla(214,7%,19%)",
130
- },
131
- },
132
- tag: {
133
- muted: {
134
- bg: "hsla(210, 30%, 92%)",
135
- text: "hsla(210, 10%, 25%)",
136
- },
137
- primary: {
138
- text: "hsla(0, 0%, 100%)",
139
- bg: "hsla(207,70%,55%)",
140
- },
141
- warn: {
142
- bg: "hsla(30,100%,82%)",
143
- text: "hsla(23,100%,40%)",
144
- },
145
- info: {
146
- text: "hsla(196,100%,20%)",
147
- bg: "hsla(197,65%,80%)",
148
- },
149
- success: {
150
- text: "hsla(154,52%,19%)",
151
- bg: "hsla(152,56%,80%)",
152
- },
153
- danger: {
154
- text: "hsla(10,82%,45%)",
155
- bg: "hsla(359,94%,92%)",
156
- },
157
- neutral: {
158
- text: "hsla(200,98%,60%)",
159
- bg: "hsla(200,28%,19%)",
160
- },
161
- secondary: {
162
- text: "hsla(216,10%,90%)",
163
- bg: "hsla(214,7%,19%)",
164
- },
165
- },
166
- alert: {
167
- muted: {
168
- bg: "hsla(210, 30%, 86%)",
169
- text: "hsla(210, 30%, 86%)",
170
- border: "hsla(210, 10%, 70%)",
171
- },
172
- primary: {
173
- text: "hsla(206,70%,50%)",
174
- border: "hsla(206,90%,89%)",
175
- bg: "hsla(205,92%,95%)",
176
- },
177
- warn: {
178
- bg: "hsla(23,100%,96%)",
179
- text: "hsla(23,93%,53%)",
180
- border: "hsla(33,100%,85%)",
181
- },
182
- info: {
183
- text: "hsla(252,56%,57%)",
184
- bg: "hsla(256,100%,95%)",
185
- border: "hsla(252,76%,84%)",
186
- },
187
- success: {
188
- text: "hsla(152,56%,39%)",
189
- bg: "hsla(139,47%,93%)",
190
- border: "hsla(152,58%,78%)",
191
- },
192
- danger: {
193
- text: "hsla(358,69%,55%)",
194
- bg: "hsla(357,90%,96%)",
195
- border: "hsla(359,100%,90%)",
196
- },
197
- neutral: {
198
- text: "hsla(200,98%,60%)",
199
- bg: "hsla(200,28%,19%)",
200
- border: "hsla(200,90%,89%)",
201
- },
202
- secondary: {
203
- text: "hsla(216,10%,10%)",
204
- bg: "hsla(214,7%,92%)",
205
- border: "hsla(216,22%,78%)",
206
- },
207
- },
208
- },
209
- };
@@ -1,4 +0,0 @@
1
- import { DARK_THEME } from "./dark";
2
- import { LIGHT_THEME } from "./light";
3
- export const defaultDarkTheme = DARK_THEME;
4
- export const defaultLightTheme = LIGHT_THEME;
@@ -1 +0,0 @@
1
- export {};
package/dist/types.js DELETED
@@ -1 +0,0 @@
1
- export {};