@uxf/ui 1.0.0-beta.6 → 1.0.0-beta.61

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 (310) hide show
  1. package/_private-utils/get-provider-config.d.ts +2 -0
  2. package/_private-utils/get-provider-config.js +8 -0
  3. package/avatar/avatar.d.ts +5 -0
  4. package/avatar/avatar.js +14 -0
  5. package/avatar/avatar.stories.d.ts +7 -0
  6. package/avatar/avatar.stories.js +21 -0
  7. package/avatar/index.d.ts +1 -0
  8. package/avatar/index.js +5 -0
  9. package/avatar-file-input/avatar-file-input.d.ts +32 -0
  10. package/avatar-file-input/avatar-file-input.js +69 -0
  11. package/avatar-file-input/avatar-file-input.stories.d.ts +7 -0
  12. package/avatar-file-input/avatar-file-input.stories.js +30 -0
  13. package/avatar-file-input/index.d.ts +1 -0
  14. package/{theme → avatar-file-input}/index.js +1 -3
  15. package/badge/badge.d.ts +7 -0
  16. package/badge/badge.js +15 -0
  17. package/badge/badge.stories.d.ts +7 -0
  18. package/badge/badge.stories.js +39 -0
  19. package/badge/index.d.ts +1 -0
  20. package/badge/index.js +5 -0
  21. package/badge/theme.d.ts +5 -0
  22. package/badge/theme.js +2 -0
  23. package/button/button.d.ts +13 -13
  24. package/button/button.js +16 -14
  25. package/button/button.stories.d.ts +7 -0
  26. package/button/button.stories.js +59 -0
  27. package/button/index.d.ts +1 -2
  28. package/button/index.js +1 -8
  29. package/button/theme.d.ts +8 -4
  30. package/button/theme.js +0 -1
  31. package/checkbox/checkbox.d.ts +9 -0
  32. package/checkbox/checkbox.js +23 -0
  33. package/checkbox/checkbox.stories.d.ts +7 -0
  34. package/checkbox/checkbox.stories.js +57 -0
  35. package/checkbox/index.d.ts +1 -0
  36. package/checkbox/index.js +17 -0
  37. package/checkbox-button/checkbox-button.d.ts +8 -0
  38. package/checkbox-button/checkbox-button.js +21 -0
  39. package/checkbox-button/checkbox-button.stories.d.ts +7 -0
  40. package/checkbox-button/checkbox-button.stories.js +57 -0
  41. package/checkbox-button/index.d.ts +1 -0
  42. package/checkbox-button/index.js +17 -0
  43. package/checkbox-input/checkbox-input.d.ts +2 -0
  44. package/checkbox-input/checkbox-input.js +12 -0
  45. package/checkbox-input/checkbox-input.stories.d.ts +7 -0
  46. package/checkbox-input/checkbox-input.stories.js +17 -0
  47. package/checkbox-input/index.d.ts +1 -0
  48. package/checkbox-input/index.js +17 -0
  49. package/chip/chip.d.ts +7 -0
  50. package/chip/chip.js +14 -0
  51. package/chip/chip.stories.d.ts +7 -0
  52. package/chip/chip.stories.js +22 -0
  53. package/chip/index.d.ts +1 -0
  54. package/chip/index.js +5 -0
  55. package/chip/theme.d.ts +5 -0
  56. package/chip/theme.js +2 -0
  57. package/color-radio-group/color-radio-group.d.ts +17 -0
  58. package/color-radio-group/color-radio-group.js +47 -0
  59. package/color-radio-group/color-radio-group.stories.d.ts +7 -0
  60. package/color-radio-group/color-radio-group.stories.js +79 -0
  61. package/color-radio-group/color-radio.d.ts +8 -0
  62. package/color-radio-group/color-radio.js +28 -0
  63. package/color-radio-group/index.d.ts +1 -0
  64. package/color-radio-group/index.js +5 -0
  65. package/combobox/combobox.d.ts +24 -0
  66. package/combobox/combobox.js +63 -0
  67. package/combobox/combobox.stories.d.ts +9 -0
  68. package/combobox/combobox.stories.js +67 -0
  69. package/combobox/index.d.ts +1 -0
  70. package/combobox/index.js +17 -0
  71. package/config/icons-config.d.ts +2 -0
  72. package/config/icons-config.js +5 -0
  73. package/config/icons.d.ts +57 -0
  74. package/config/icons.js +16 -0
  75. package/content/content-schema.d.ts +3 -0
  76. package/content/content-schema.js +2 -0
  77. package/content/types.d.ts +27 -0
  78. package/content/types.js +2 -0
  79. package/context/context.d.ts +12 -0
  80. package/context/context.js +5 -0
  81. package/context/index.d.ts +3 -0
  82. package/context/index.js +19 -0
  83. package/context/provider.d.ts +8 -0
  84. package/context/provider.js +10 -0
  85. package/context/use-component-context.d.ts +3 -0
  86. package/context/use-component-context.js +13 -0
  87. package/css/avatar-file-input.css +9 -0
  88. package/css/avatar.css +15 -0
  89. package/css/badge.css +23 -0
  90. package/css/button.css +223 -0
  91. package/css/checkbox-button.css +99 -0
  92. package/css/checkbox-input.css +4 -0
  93. package/css/checkbox.css +103 -0
  94. package/css/chip.css +37 -0
  95. package/css/color-radio-group.css +26 -0
  96. package/css/color-radio.css +21 -0
  97. package/css/combobox.css +73 -0
  98. package/css/component-structure-analyzer.css +31 -0
  99. package/css/date-picker-input.css +123 -0
  100. package/css/date-picker.css +34 -0
  101. package/css/dropdown.css +19 -0
  102. package/css/error-message.css +3 -0
  103. package/css/flash-messages.css +20 -0
  104. package/css/form-control.css +7 -0
  105. package/css/icon.css +8 -0
  106. package/css/input-basic.css +18 -0
  107. package/css/input.css +162 -0
  108. package/css/label.css +14 -0
  109. package/css/list-item.css +24 -0
  110. package/css/radio-group.css +143 -0
  111. package/css/radio.css +90 -0
  112. package/css/raster-image.css +16 -0
  113. package/css/select.css +54 -0
  114. package/css/tabs.css +104 -0
  115. package/css/text-link.css +12 -0
  116. package/css/textarea.css +98 -0
  117. package/css/toggle.css +60 -0
  118. package/date-picker-input/date-picker-day.d.ts +8 -0
  119. package/date-picker-input/date-picker-day.js +63 -0
  120. package/date-picker-input/date-picker-decade.d.ts +6 -0
  121. package/date-picker-input/date-picker-decade.js +68 -0
  122. package/date-picker-input/date-picker-input.d.ts +20 -0
  123. package/date-picker-input/date-picker-input.js +60 -0
  124. package/date-picker-input/date-picker-input.stories.d.ts +7 -0
  125. package/date-picker-input/date-picker-input.stories.js +45 -0
  126. package/date-picker-input/date-picker-month.d.ts +7 -0
  127. package/date-picker-input/date-picker-month.js +63 -0
  128. package/date-picker-input/date-picker-provider.d.ts +8 -0
  129. package/date-picker-input/date-picker-provider.js +26 -0
  130. package/date-picker-input/date-picker-year.d.ts +7 -0
  131. package/date-picker-input/date-picker-year.js +73 -0
  132. package/date-picker-input/date-picker.d.ts +3 -0
  133. package/date-picker-input/date-picker.js +53 -0
  134. package/date-picker-input/index.d.ts +3 -0
  135. package/date-picker-input/index.js +19 -0
  136. package/date-picker-input/types.d.ts +5 -0
  137. package/date-picker-input/types.js +2 -0
  138. package/dropdown/dropdown.d.ts +10 -0
  139. package/dropdown/dropdown.js +27 -0
  140. package/dropdown/index.d.ts +1 -0
  141. package/dropdown/index.js +17 -0
  142. package/error-message/error-message.d.ts +7 -0
  143. package/error-message/error-message.js +11 -0
  144. package/error-message/error-message.stories.d.ts +8 -0
  145. package/error-message/error-message.stories.js +17 -0
  146. package/error-message/index.d.ts +1 -0
  147. package/error-message/index.js +17 -0
  148. package/flash-messages/flash-message.d.ts +16 -0
  149. package/flash-messages/flash-message.js +46 -0
  150. package/flash-messages/flash-messages-service.d.ts +5 -0
  151. package/flash-messages/flash-messages-service.js +15 -0
  152. package/flash-messages/flash-messages.d.ts +8 -0
  153. package/flash-messages/flash-messages.js +55 -0
  154. package/flash-messages/flash-messages.stories.d.ts +7 -0
  155. package/flash-messages/flash-messages.stories.js +31 -0
  156. package/flash-messages/theme.d.ts +4 -0
  157. package/flash-messages/theme.js +2 -0
  158. package/form-control/form-control.d.ts +12 -0
  159. package/form-control/form-control.js +19 -0
  160. package/form-control/form-control.stories.d.ts +12 -0
  161. package/form-control/form-control.stories.js +23 -0
  162. package/form-control/index.d.ts +1 -0
  163. package/form-control/index.js +17 -0
  164. package/hooks/use-dropdown.d.ts +2 -0
  165. package/hooks/use-dropdown.js +28 -0
  166. package/hooks/use-input-submit.d.ts +4 -0
  167. package/hooks/use-input-submit.js +40 -0
  168. package/icon/icon.d.ts +17 -0
  169. package/icon/icon.js +31 -0
  170. package/icon/icon.stories.d.ts +7 -0
  171. package/icon/icon.stories.js +74 -0
  172. package/icon/index.d.ts +1 -0
  173. package/icon/index.js +17 -0
  174. package/icon/theme.d.ts +2 -0
  175. package/icon/theme.js +2 -0
  176. package/icon/types.d.ts +2 -0
  177. package/icon/types.js +2 -0
  178. package/image-gallery/components/close-button.d.ts +6 -0
  179. package/image-gallery/components/close-button.js +12 -0
  180. package/image-gallery/components/dot.d.ts +6 -0
  181. package/image-gallery/components/dot.js +12 -0
  182. package/image-gallery/components/gallery.d.ts +11 -0
  183. package/image-gallery/components/gallery.js +71 -0
  184. package/image-gallery/components/next-button.d.ts +6 -0
  185. package/image-gallery/components/next-button.js +12 -0
  186. package/image-gallery/components/previous-button.d.ts +6 -0
  187. package/image-gallery/components/previous-button.js +12 -0
  188. package/image-gallery/context.d.ts +10 -0
  189. package/image-gallery/context.js +12 -0
  190. package/image-gallery/image-gallery.d.ts +6 -0
  191. package/image-gallery/image-gallery.js +55 -0
  192. package/image-gallery/image-gallery.stories.d.ts +13 -0
  193. package/image-gallery/image-gallery.stories.js +26 -0
  194. package/image-gallery/image.d.ts +4 -0
  195. package/image-gallery/image.js +14 -0
  196. package/image-gallery/index.d.ts +4 -0
  197. package/image-gallery/index.js +26 -0
  198. package/image-gallery/types.d.ts +7 -0
  199. package/image-gallery/types.js +2 -0
  200. package/image-gallery/use-image.d.ts +2 -0
  201. package/image-gallery/use-image.js +16 -0
  202. package/input/index.d.ts +12 -0
  203. package/input/index.js +16 -0
  204. package/input/input-element.d.ts +21 -0
  205. package/input/input-element.js +11 -0
  206. package/input/input-left-addon.d.ts +9 -0
  207. package/input/input-left-addon.js +12 -0
  208. package/input/input-left-element.d.ts +9 -0
  209. package/input/input-left-element.js +12 -0
  210. package/input/input-right-addon.d.ts +8 -0
  211. package/input/input-right-addon.js +12 -0
  212. package/input/input-right-element.d.ts +9 -0
  213. package/input/input-right-element.js +12 -0
  214. package/input/input.d.ts +8 -0
  215. package/input/input.js +64 -0
  216. package/input/input.stories.d.ts +14 -0
  217. package/input/input.stories.js +81 -0
  218. package/input/theme.d.ts +6 -0
  219. package/input/theme.js +2 -0
  220. package/label/index.d.ts +1 -0
  221. package/label/index.js +17 -0
  222. package/label/label.d.ts +11 -0
  223. package/label/label.js +14 -0
  224. package/label/label.stories.d.ts +7 -0
  225. package/label/label.stories.js +17 -0
  226. package/list-item/index.d.ts +1 -0
  227. package/list-item/index.js +5 -0
  228. package/list-item/list-item.d.ts +7 -0
  229. package/list-item/list-item.js +23 -0
  230. package/list-item/list-item.stories.d.ts +7 -0
  231. package/list-item/list-item.stories.js +28 -0
  232. package/package.json +17 -34
  233. package/radio/index.d.ts +1 -0
  234. package/radio/index.js +17 -0
  235. package/radio/radio.d.ts +6 -0
  236. package/radio/radio.js +15 -0
  237. package/radio/radio.stories.d.ts +7 -0
  238. package/radio/radio.stories.js +42 -0
  239. package/radio-group/index.d.ts +1 -0
  240. package/radio-group/index.js +17 -0
  241. package/radio-group/radio-group.d.ts +20 -0
  242. package/radio-group/radio-group.js +49 -0
  243. package/radio-group/radio-group.stories.d.ts +7 -0
  244. package/radio-group/radio-group.stories.js +61 -0
  245. package/raster-image/index.d.ts +1 -0
  246. package/raster-image/index.js +17 -0
  247. package/raster-image/raster-image.d.ts +16 -0
  248. package/raster-image/raster-image.js +21 -0
  249. package/raster-image/raster-image.stories.d.ts +7 -0
  250. package/raster-image/raster-image.stories.js +17 -0
  251. package/select/index.d.ts +1 -0
  252. package/select/index.js +17 -0
  253. package/select/select.d.ts +24 -0
  254. package/select/select.js +60 -0
  255. package/select/select.stories.d.ts +9 -0
  256. package/select/select.stories.js +71 -0
  257. package/tabs/index.d.ts +1 -0
  258. package/tabs/index.js +5 -0
  259. package/tabs/tabs.d.ts +7 -0
  260. package/tabs/tabs.js +64 -0
  261. package/tabs/tabs.stories.d.ts +7 -0
  262. package/tabs/tabs.stories.js +33 -0
  263. package/text-input/index.d.ts +1 -0
  264. package/text-input/index.js +17 -0
  265. package/text-input/text-input.d.ts +30 -0
  266. package/text-input/text-input.js +57 -0
  267. package/text-input/text-input.stories.d.ts +8 -0
  268. package/text-input/text-input.stories.js +54 -0
  269. package/text-link/index.d.ts +1 -0
  270. package/text-link/index.js +5 -0
  271. package/text-link/text-link.d.ts +5 -0
  272. package/text-link/text-link.js +19 -0
  273. package/text-link/text-link.stories.d.ts +7 -0
  274. package/text-link/text-link.stories.js +24 -0
  275. package/textarea/index.d.ts +1 -0
  276. package/textarea/index.js +17 -0
  277. package/textarea/textarea.d.ts +17 -0
  278. package/textarea/textarea.js +81 -0
  279. package/textarea/textarea.stories.d.ts +7 -0
  280. package/textarea/textarea.stories.js +44 -0
  281. package/toggle/index.d.ts +1 -0
  282. package/toggle/index.js +17 -0
  283. package/toggle/toggle.d.ts +8 -0
  284. package/toggle/toggle.js +16 -0
  285. package/toggle/toggle.stories.d.ts +7 -0
  286. package/toggle/toggle.stories.js +51 -0
  287. package/types/form-control-props.d.ts +24 -0
  288. package/types/form-control-props.js +2 -0
  289. package/types/index.d.ts +1 -0
  290. package/types/index.js +17 -0
  291. package/utils/action.d.ts +2 -0
  292. package/utils/action.js +11 -0
  293. package/utils/component-structure-analyzer.d.ts +6 -0
  294. package/utils/component-structure-analyzer.js +10 -0
  295. package/utils/icons-config.js +53 -0
  296. package/utils/image.d.ts +9 -0
  297. package/utils/image.js +30 -0
  298. package/utils/localized-dayjs.d.ts +2 -0
  299. package/utils/localized-dayjs.js +34 -0
  300. package/utils/storybook-config.d.ts +19 -0
  301. package/utils/storybook-config.js +47 -0
  302. package/utils/tailwind-config.js +152 -0
  303. package/stories/button.stories.tsx +0 -29
  304. package/theme/index.d.ts +0 -2
  305. package/theme/theme-context.d.ts +0 -9
  306. package/theme/theme-context.js +0 -59
  307. package/theme/theme.d.ts +0 -14
  308. package/theme/theme.js +0 -3
  309. package/types.d.ts +0 -3
  310. package/types.js +0 -3
@@ -0,0 +1,152 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+ const { em } = require("@uxf/styles/units/em");
3
+ const { rem } = require("@uxf/styles/units/rem");
4
+
5
+ /** @type {Record<string, string>} */
6
+ const CONTAINERS = {
7
+ xs: rem(540),
8
+ sm: rem(720),
9
+ md: rem(928),
10
+ lg: rem(1024),
11
+ xl: rem(1216),
12
+ };
13
+
14
+ /** @type {Record<string, string>} */
15
+ const SCREENS = {
16
+ xs: em(576),
17
+ sm: em(768),
18
+ md: em(992),
19
+ lg: em(1200),
20
+ xl: em(1440),
21
+ };
22
+
23
+ /** @type {import('tailwindcss').Config} */
24
+ module.exports = {
25
+ content: [],
26
+ theme: {
27
+ containers: CONTAINERS,
28
+ screens: SCREENS,
29
+ extend: {
30
+ borderRadius: {
31
+ inherit: "inherit",
32
+ },
33
+ colors: {
34
+ inherit: "inherit",
35
+ primary: {
36
+ 50: "#eff6ff",
37
+ 100: "#dbeafe",
38
+ 200: "#bfdbfe",
39
+ 300: "#93c5fd",
40
+ 400: "#60a5fa",
41
+ 500: "#3b82f6",
42
+ 600: "#2563eb",
43
+ 700: "#1d4ed8",
44
+ 800: "#1e40af",
45
+ 900: "#1e3a8a",
46
+ },
47
+ success: {
48
+ 50: "#f0fdf4",
49
+ 100: "#dcfce7",
50
+ 200: "#bbf7d0",
51
+ 300: "#86efac",
52
+ 400: "#4ade80",
53
+ 500: "#22c55e",
54
+ 600: "#16a34a",
55
+ 700: "#15803d",
56
+ 800: "#166534",
57
+ 900: "#14532d",
58
+ },
59
+ warning: {
60
+ 50: "#fff7ed",
61
+ 100: "#ffedd5",
62
+ 200: "#fed7aa",
63
+ 300: "#fdba74",
64
+ 400: "#fb923c",
65
+ 500: "#f97316",
66
+ 600: "#ea580c",
67
+ 700: "#c2410c",
68
+ 800: "#9a3412",
69
+ 900: "#7c2d12",
70
+ },
71
+ error: {
72
+ 50: "#fef2f2",
73
+ 100: "#fee2e2",
74
+ 200: "#fecaca",
75
+ 300: "#fca5a5",
76
+ 400: "#f87171",
77
+ 500: "#ef4444",
78
+ 600: "#dc2626",
79
+ 700: "#b91c1c",
80
+ 800: "#991b1b",
81
+ 900: "#7f1d1d",
82
+ },
83
+ },
84
+ zIndex: {
85
+ 1: "1",
86
+ focus: "5",
87
+ fixed: "10",
88
+ menu: "25",
89
+ header: "50",
90
+ modal: "100",
91
+ dropdown: "200",
92
+ flashMessage: "250",
93
+ tooltip: "300",
94
+ },
95
+ },
96
+ },
97
+ corePlugins: {
98
+ aspectRatio: false,
99
+ container: false,
100
+ },
101
+ plugins: [
102
+ require("@tailwindcss/aspect-ratio"),
103
+ require("@tailwindcss/line-clamp"),
104
+ plugin(
105
+ ({ addComponents, theme }) => {
106
+ const screens = theme("screens", SCREENS);
107
+ const containers = theme("containers", CONTAINERS);
108
+
109
+ const mqs = Object.entries(screens);
110
+ const widths = mqs
111
+ .map((item) => {
112
+ const key = item[0];
113
+ const value = item[1];
114
+ const width = containers[key];
115
+ if (width) {
116
+ return { [`@media (min-width: ${value})`]: { ".container": { "max-width": width } } };
117
+ }
118
+ })
119
+ .filter((i) => i);
120
+
121
+ addComponents([
122
+ {
123
+ ".container": {
124
+ "margin-left": "auto",
125
+ "margin-right": "auto",
126
+ width: "100%",
127
+ },
128
+ },
129
+ ...widths,
130
+ ]);
131
+ },
132
+ {
133
+ content: [],
134
+ theme: {
135
+ containers: CONTAINERS,
136
+ },
137
+ },
138
+ ),
139
+ plugin(({ addVariant }) => {
140
+ addVariant("is-active", "&.is-active");
141
+ addVariant("is-selected", "&.is-selected");
142
+ addVariant("is-hoverable", ["&.is-hoverable:active", "&.is-hoverable:hover"]);
143
+ addVariant("is-focused", "&.is-focused");
144
+ addVariant("is-required", ["&.is-required", "&:required"]);
145
+ addVariant("is-invalid", "&.is-invalid");
146
+ addVariant("is-loading", ["&.is-loading"]);
147
+ addVariant("is-readonly", ["&.is-readonly", "&:readonly"]);
148
+ addVariant("is-disabled", ["&.is-disabled", "&:disabled"]);
149
+ addVariant("is-empty", ["&.is-empty"]);
150
+ }),
151
+ ],
152
+ };
@@ -1,29 +0,0 @@
1
- import Button from "./button";
2
- import { useTheme } from "@uxf/ui/theme";
3
-
4
- export default {
5
- title: "UI/Button",
6
- component: Button,
7
- };
8
-
9
- export function Default() {
10
- const theme = useTheme().Button;
11
-
12
- return (
13
- <div className="space-y-2">
14
- {Object.keys(theme.variant).map((variant: any) => (
15
- <>
16
- {Object.keys(theme.color).map((color: any) => (
17
- <div className="space-x-2">
18
- {Object.keys(theme.size).map((size: any) => (
19
- <Button variant={variant} color={color} size={size}>
20
- Button
21
- </Button>
22
- ))}
23
- </div>
24
- ))}
25
- </>
26
- ))}
27
- </div>
28
- );
29
- }
package/theme/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "@uxf/ui/theme/theme-context";
2
- export * from "@uxf/ui/theme/theme";
@@ -1,9 +0,0 @@
1
- import { Theme } from "./theme";
2
- import { ReactNode } from "react";
3
- interface ThemeProviderProps {
4
- children: ReactNode;
5
- theme: Theme;
6
- }
7
- export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element;
8
- export declare const useTheme: () => Theme;
9
- export {};
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.useTheme = exports.ThemeProvider = void 0;
27
- var React = __importStar(require("react"));
28
- var react_1 = require("react");
29
- var theme = {
30
- Button: {
31
- size: {
32
- xs: "button--xs",
33
- sm: "button--sm",
34
- md: "button--md",
35
- lg: "button--lg",
36
- xl: "button--xl",
37
- },
38
- color: {
39
- primary: "button--primary",
40
- secondary: "button--secondary",
41
- },
42
- variant: {
43
- outlined: "button--outlined",
44
- contained: "button--contained",
45
- },
46
- disabled: "button--disabled",
47
- defaultColor: "primary",
48
- defaultSize: "md",
49
- defaultVariant: "outlined",
50
- },
51
- };
52
- var ThemeContext = React.createContext(theme);
53
- function ThemeProvider(props) {
54
- return (React.createElement(ThemeContext.Provider, { value: props.theme }, props.children));
55
- }
56
- exports.ThemeProvider = ThemeProvider;
57
- var useTheme = function () { return (0, react_1.useContext)(ThemeContext); };
58
- exports.useTheme = useTheme;
59
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUtY29udGV4dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90aGVtZS90aGVtZS1jb250ZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUErQjtBQUUvQiwrQkFBOEM7QUFFOUMsSUFBTSxLQUFLLEdBQVU7SUFDbkIsTUFBTSxFQUFFO1FBQ04sSUFBSSxFQUFFO1lBQ0osRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7U0FDakI7UUFDRCxLQUFLLEVBQUU7WUFDTCxPQUFPLEVBQUUsaUJBQWlCO1lBQzFCLFNBQVMsRUFBRSxtQkFBbUI7U0FDL0I7UUFDRCxPQUFPLEVBQUU7WUFDUCxRQUFRLEVBQUUsa0JBQWtCO1lBQzVCLFNBQVMsRUFBRSxtQkFBbUI7U0FDL0I7UUFDRCxRQUFRLEVBQUUsa0JBQWtCO1FBQzVCLFlBQVksRUFBRSxTQUFTO1FBQ3ZCLFdBQVcsRUFBRSxJQUFJO1FBQ2pCLGNBQWMsRUFBRSxVQUFVO0tBQzNCO0NBQ0YsQ0FBQztBQUVGLElBQU0sWUFBWSxHQUFHLEtBQUssQ0FBQyxhQUFhLENBQVEsS0FBSyxDQUFDLENBQUM7QUFNdkQsU0FBZ0IsYUFBYSxDQUFDLEtBQXlCO0lBQ3JELE9BQU8sQ0FDTCxvQkFBQyxZQUFZLENBQUMsUUFBUSxJQUFDLEtBQUssRUFBRSxLQUFLLENBQUMsS0FBSyxJQUN0QyxLQUFLLENBQUMsUUFBUSxDQUNPLENBQ3pCLENBQUM7QUFDSixDQUFDO0FBTkQsc0NBTUM7QUFFTSxJQUFNLFFBQVEsR0FBRyxjQUFNLE9BQUEsSUFBQSxrQkFBVSxFQUFDLFlBQVksQ0FBQyxFQUF4QixDQUF3QixDQUFDO0FBQTFDLFFBQUEsUUFBUSxZQUFrQyJ9
package/theme/theme.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import { ButtonColors, ButtonSizes, ButtonVariants } from "@uxf/ui/button";
2
- import { Classes } from "@uxf/ui/types";
3
- export declare type ButtonTheme = {
4
- disabled: string;
5
- size: Classes<keyof ButtonSizes>;
6
- color: Classes<keyof ButtonColors>;
7
- variant: Classes<keyof ButtonVariants>;
8
- defaultSize: keyof ButtonSizes;
9
- defaultColor: keyof ButtonColors;
10
- defaultVariant: keyof ButtonVariants;
11
- };
12
- export interface Theme {
13
- Button: ButtonTheme;
14
- }
package/theme/theme.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGhlbWUvdGhlbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
package/types.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export declare type Classes<T extends string> = {
2
- [key in T]: string;
3
- };
package/types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9