@uxf/ui 1.0.0-beta.9 → 1.0.0-beta.91

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 (388) hide show
  1. package/_private-utils/get-provider-config.d.ts +2 -0
  2. package/_private-utils/get-provider-config.js +12 -0
  3. package/avatar/avatar.d.ts +5 -0
  4. package/avatar/avatar.js +14 -0
  5. package/avatar/avatar.spec.d.ts +1 -0
  6. package/avatar/avatar.spec.js +9 -0
  7. package/avatar/avatar.stories.d.ts +7 -0
  8. package/avatar/avatar.stories.js +21 -0
  9. package/avatar/index.d.ts +1 -0
  10. package/avatar/index.js +17 -0
  11. package/avatar-file-input/avatar-file-input.d.ts +32 -0
  12. package/avatar-file-input/avatar-file-input.js +69 -0
  13. package/avatar-file-input/avatar-file-input.stories.d.ts +7 -0
  14. package/avatar-file-input/avatar-file-input.stories.js +30 -0
  15. package/avatar-file-input/index.d.ts +1 -0
  16. package/{storybook → avatar-file-input}/index.js +1 -2
  17. package/badge/badge.d.ts +7 -0
  18. package/badge/badge.js +15 -0
  19. package/badge/badge.stories.d.ts +7 -0
  20. package/badge/badge.stories.js +39 -0
  21. package/badge/index.d.ts +1 -0
  22. package/badge/index.js +17 -0
  23. package/badge/theme.d.ts +5 -0
  24. package/badge/theme.js +2 -0
  25. package/button/button.d.ts +13 -13
  26. package/button/button.js +16 -12
  27. package/button/button.stories.d.ts +9 -5
  28. package/button/button.stories.js +56 -18
  29. package/button/index.d.ts +1 -2
  30. package/button/index.js +1 -8
  31. package/button/theme.d.ts +5 -2
  32. package/button/theme.js +0 -1
  33. package/checkbox/checkbox.d.ts +12 -0
  34. package/checkbox/checkbox.js +18 -0
  35. package/checkbox/checkbox.spec.d.ts +1 -0
  36. package/checkbox/checkbox.spec.js +11 -0
  37. package/checkbox/checkbox.stories.d.ts +7 -0
  38. package/checkbox/checkbox.stories.js +44 -0
  39. package/checkbox/index.d.ts +1 -0
  40. package/checkbox/index.js +17 -0
  41. package/checkbox-button/checkbox-button.d.ts +8 -0
  42. package/checkbox-button/checkbox-button.js +18 -0
  43. package/checkbox-button/checkbox-button.spec.d.ts +1 -0
  44. package/checkbox-button/checkbox-button.spec.js +10 -0
  45. package/checkbox-button/checkbox-button.stories.d.ts +7 -0
  46. package/checkbox-button/checkbox-button.stories.js +57 -0
  47. package/checkbox-button/index.d.ts +1 -0
  48. package/checkbox-button/index.js +17 -0
  49. package/checkbox-visual/checkbox-visual.d.ts +9 -0
  50. package/checkbox-visual/checkbox-visual.js +17 -0
  51. package/checkbox-visual/checkbox-visual.stories.d.ts +7 -0
  52. package/checkbox-visual/checkbox-visual.stories.js +44 -0
  53. package/checkbox-visual/index.d.ts +1 -0
  54. package/checkbox-visual/index.js +17 -0
  55. package/checkbox-visual/theme.d.ts +4 -0
  56. package/checkbox-visual/theme.js +2 -0
  57. package/chip/chip.d.ts +10 -0
  58. package/chip/chip.js +19 -0
  59. package/chip/chip.stories.d.ts +14 -0
  60. package/chip/chip.stories.js +32 -0
  61. package/chip/index.d.ts +1 -0
  62. package/chip/index.js +17 -0
  63. package/chip/theme.d.ts +14 -0
  64. package/chip/theme.js +2 -0
  65. package/color-radio-group/color-radio-group.d.ts +18 -0
  66. package/color-radio-group/color-radio-group.js +47 -0
  67. package/color-radio-group/color-radio-group.stories.d.ts +7 -0
  68. package/color-radio-group/color-radio-group.stories.js +79 -0
  69. package/color-radio-group/color-radio.d.ts +8 -0
  70. package/color-radio-group/color-radio.js +22 -0
  71. package/color-radio-group/index.d.ts +1 -0
  72. package/color-radio-group/index.js +17 -0
  73. package/combobox/combobox.d.ts +24 -0
  74. package/combobox/combobox.js +61 -0
  75. package/combobox/combobox.stories.d.ts +9 -0
  76. package/combobox/combobox.stories.js +67 -0
  77. package/combobox/index.d.ts +1 -0
  78. package/combobox/index.js +17 -0
  79. package/config/icons-config.d.ts +2 -0
  80. package/config/icons-config.js +5 -0
  81. package/config/icons.d.ts +77 -0
  82. package/config/icons.js +20 -0
  83. package/content/content-schema.d.ts +3 -0
  84. package/content/content-schema.js +2 -0
  85. package/content/types.d.ts +27 -0
  86. package/content/types.js +2 -0
  87. package/context/context.d.ts +15 -0
  88. package/context/context.js +5 -0
  89. package/context/index.d.ts +3 -0
  90. package/context/index.js +19 -0
  91. package/context/provider.d.ts +8 -0
  92. package/context/provider.js +13 -0
  93. package/context/use-component-context.d.ts +3 -0
  94. package/context/use-component-context.js +13 -0
  95. package/css/avatar-file-input.css +7 -0
  96. package/css/avatar.css +15 -0
  97. package/css/badge.css +23 -0
  98. package/css/button.css +221 -0
  99. package/css/button.old.css +231 -0
  100. package/css/checkbox-button.css +98 -0
  101. package/css/checkbox.css +142 -0
  102. package/css/chip.css +171 -0
  103. package/css/chip.old.css +37 -0
  104. package/css/color-radio-group.css +21 -0
  105. package/css/color-radio.css +21 -0
  106. package/css/combobox.css +108 -0
  107. package/css/combobox.old.css +102 -0
  108. package/css/component-structure-analyzer.css +31 -0
  109. package/css/date-picker-input.css +133 -0
  110. package/css/date-picker.css +90 -0
  111. package/css/dropdown.css +24 -0
  112. package/css/dropdown.old.css +24 -0
  113. package/css/error-message.css +3 -0
  114. package/css/flash-messages.css +20 -0
  115. package/css/form-control.css +7 -0
  116. package/css/icon.css +7 -0
  117. package/css/input-basic.css +18 -0
  118. package/css/input.css +205 -0
  119. package/css/input.old.css +193 -0
  120. package/css/label.css +15 -0
  121. package/css/layout.css +47 -0
  122. package/css/list-item.css +29 -0
  123. package/css/pagination.css +28 -0
  124. package/css/radio-group.css +160 -0
  125. package/css/radio.css +105 -0
  126. package/css/raster-image.css +20 -0
  127. package/css/select.css +72 -0
  128. package/css/select.old.css +66 -0
  129. package/css/tabs.css +131 -0
  130. package/css/text-link.css +12 -0
  131. package/css/textarea.css +117 -0
  132. package/css/time-picker-input.css +136 -0
  133. package/css/time-picker.css +27 -0
  134. package/css/toggle.css +80 -0
  135. package/date-picker-input/date-picker-day.d.ts +8 -0
  136. package/date-picker-input/date-picker-day.js +63 -0
  137. package/date-picker-input/date-picker-decade.d.ts +6 -0
  138. package/date-picker-input/date-picker-decade.js +71 -0
  139. package/date-picker-input/date-picker-input.d.ts +21 -0
  140. package/date-picker-input/date-picker-input.js +88 -0
  141. package/date-picker-input/date-picker-input.stories.d.ts +14 -0
  142. package/date-picker-input/date-picker-input.stories.js +54 -0
  143. package/date-picker-input/date-picker-month.d.ts +7 -0
  144. package/date-picker-input/date-picker-month.js +66 -0
  145. package/date-picker-input/date-picker-provider.d.ts +8 -0
  146. package/date-picker-input/date-picker-provider.js +26 -0
  147. package/date-picker-input/date-picker-year.d.ts +7 -0
  148. package/date-picker-input/date-picker-year.js +74 -0
  149. package/date-picker-input/date-picker.d.ts +3 -0
  150. package/date-picker-input/date-picker.js +53 -0
  151. package/date-picker-input/index.d.ts +3 -0
  152. package/date-picker-input/index.js +19 -0
  153. package/date-picker-input/types.d.ts +5 -0
  154. package/date-picker-input/types.js +2 -0
  155. package/dropdown/dropdown.d.ts +11 -0
  156. package/dropdown/dropdown.js +27 -0
  157. package/dropdown/dropdown.stories.d.ts +10 -0
  158. package/dropdown/dropdown.stories.js +30 -0
  159. package/dropdown/index.d.ts +1 -0
  160. package/dropdown/index.js +17 -0
  161. package/error-message/error-message.d.ts +7 -0
  162. package/error-message/error-message.js +11 -0
  163. package/error-message/error-message.stories.d.ts +8 -0
  164. package/error-message/error-message.stories.js +17 -0
  165. package/error-message/index.d.ts +1 -0
  166. package/error-message/index.js +17 -0
  167. package/flash-messages/flash-message.d.ts +16 -0
  168. package/flash-messages/flash-message.js +46 -0
  169. package/flash-messages/flash-messages-service.d.ts +5 -0
  170. package/flash-messages/flash-messages-service.js +15 -0
  171. package/flash-messages/flash-messages.d.ts +8 -0
  172. package/flash-messages/flash-messages.js +55 -0
  173. package/flash-messages/flash-messages.stories.d.ts +7 -0
  174. package/flash-messages/flash-messages.stories.js +31 -0
  175. package/flash-messages/theme.d.ts +4 -0
  176. package/flash-messages/theme.js +2 -0
  177. package/form-control/form-control.d.ts +13 -0
  178. package/form-control/form-control.js +19 -0
  179. package/form-control/form-control.stories.d.ts +12 -0
  180. package/form-control/form-control.stories.js +25 -0
  181. package/form-control/index.d.ts +1 -0
  182. package/form-control/index.js +17 -0
  183. package/hooks/use-dropdown.d.ts +2 -0
  184. package/hooks/use-dropdown.js +30 -0
  185. package/hooks/use-input-submit.d.ts +4 -0
  186. package/hooks/use-input-submit.js +40 -0
  187. package/icon/icon.d.ts +17 -0
  188. package/icon/icon.js +38 -0
  189. package/icon/icon.stories.d.ts +18 -0
  190. package/icon/icon.stories.js +53 -0
  191. package/icon/index.d.ts +1 -0
  192. package/icon/index.js +17 -0
  193. package/icon/theme.d.ts +2 -0
  194. package/icon/theme.js +2 -0
  195. package/icon/types.d.ts +2 -0
  196. package/icon/types.js +2 -0
  197. package/image-gallery/components/close-button.d.ts +6 -0
  198. package/image-gallery/components/close-button.js +12 -0
  199. package/image-gallery/components/dot.d.ts +6 -0
  200. package/image-gallery/components/dot.js +12 -0
  201. package/image-gallery/components/gallery.d.ts +11 -0
  202. package/image-gallery/components/gallery.js +72 -0
  203. package/image-gallery/components/next-button.d.ts +6 -0
  204. package/image-gallery/components/next-button.js +12 -0
  205. package/image-gallery/components/previous-button.d.ts +6 -0
  206. package/image-gallery/components/previous-button.js +12 -0
  207. package/image-gallery/context.d.ts +10 -0
  208. package/image-gallery/context.js +12 -0
  209. package/image-gallery/image-gallery.d.ts +6 -0
  210. package/image-gallery/image-gallery.js +55 -0
  211. package/image-gallery/image-gallery.stories.d.ts +13 -0
  212. package/image-gallery/image-gallery.stories.js +27 -0
  213. package/image-gallery/image.d.ts +4 -0
  214. package/image-gallery/image.js +14 -0
  215. package/image-gallery/index.d.ts +4 -0
  216. package/image-gallery/index.js +26 -0
  217. package/image-gallery/types.d.ts +7 -0
  218. package/image-gallery/types.js +2 -0
  219. package/image-gallery/use-image.d.ts +2 -0
  220. package/image-gallery/use-image.js +16 -0
  221. package/input/index.d.ts +12 -0
  222. package/input/index.js +16 -0
  223. package/input/input-element.d.ts +21 -0
  224. package/input/input-element.js +11 -0
  225. package/input/input-left-addon.d.ts +9 -0
  226. package/input/input-left-addon.js +12 -0
  227. package/input/input-left-element.d.ts +9 -0
  228. package/input/input-left-element.js +12 -0
  229. package/input/input-right-addon.d.ts +8 -0
  230. package/input/input-right-addon.js +12 -0
  231. package/input/input-right-element.d.ts +9 -0
  232. package/input/input-right-element.js +12 -0
  233. package/input/input.d.ts +8 -0
  234. package/input/input.js +65 -0
  235. package/input/input.stories.d.ts +15 -0
  236. package/input/input.stories.js +93 -0
  237. package/input/theme.d.ts +8 -0
  238. package/input/theme.js +2 -0
  239. package/label/index.d.ts +1 -0
  240. package/label/index.js +17 -0
  241. package/label/label.d.ts +12 -0
  242. package/label/label.js +14 -0
  243. package/label/label.stories.d.ts +7 -0
  244. package/label/label.stories.js +17 -0
  245. package/layout/index.d.ts +1 -0
  246. package/layout/index.js +17 -0
  247. package/layout/layout.d.ts +9 -0
  248. package/layout/layout.js +60 -0
  249. package/layout/layout.stories.d.ts +8 -0
  250. package/layout/layout.stories.js +21 -0
  251. package/layout/uxf-logo.d.ts +6 -0
  252. package/layout/uxf-logo.js +13 -0
  253. package/list-item/index.d.ts +1 -0
  254. package/list-item/index.js +17 -0
  255. package/list-item/list-item.d.ts +8 -0
  256. package/list-item/list-item.js +24 -0
  257. package/list-item/list-item.stories.d.ts +7 -0
  258. package/list-item/list-item.stories.js +32 -0
  259. package/package.json +18 -36
  260. package/pagination/pagination.d.ts +7 -0
  261. package/pagination/pagination.js +49 -0
  262. package/pagination/pagination.stories.d.ts +7 -0
  263. package/pagination/pagination.stories.js +47 -0
  264. package/radio/index.d.ts +1 -0
  265. package/radio/index.js +17 -0
  266. package/radio/radio.d.ts +9 -0
  267. package/radio/radio.js +16 -0
  268. package/radio/radio.spec.d.ts +1 -0
  269. package/radio/radio.spec.js +10 -0
  270. package/radio/radio.stories.d.ts +7 -0
  271. package/radio/radio.stories.js +35 -0
  272. package/radio/theme.d.ts +4 -0
  273. package/radio/theme.js +2 -0
  274. package/radio-group/index.d.ts +1 -0
  275. package/radio-group/index.js +17 -0
  276. package/radio-group/radio-group.d.ts +24 -0
  277. package/radio-group/radio-group.js +49 -0
  278. package/radio-group/radio-group.spec.d.ts +1 -0
  279. package/radio-group/radio-group.spec.js +24 -0
  280. package/radio-group/radio-group.stories.d.ts +7 -0
  281. package/radio-group/radio-group.stories.js +58 -0
  282. package/radio-group/theme.d.ts +5 -0
  283. package/radio-group/theme.js +2 -0
  284. package/raster-image/index.d.ts +1 -0
  285. package/raster-image/index.js +17 -0
  286. package/raster-image/raster-image.d.ts +30 -0
  287. package/raster-image/raster-image.js +35 -0
  288. package/raster-image/raster-image.stories.d.ts +30 -0
  289. package/raster-image/raster-image.stories.js +17 -0
  290. package/scripts/generate-tw-tokens.js +94 -0
  291. package/select/index.d.ts +1 -0
  292. package/select/index.js +17 -0
  293. package/select/select.d.ts +24 -0
  294. package/select/select.js +58 -0
  295. package/select/select.stories.d.ts +9 -0
  296. package/select/select.stories.js +81 -0
  297. package/tabs/index.d.ts +1 -0
  298. package/tabs/index.js +17 -0
  299. package/tabs/tabs.d.ts +19 -0
  300. package/tabs/tabs.js +68 -0
  301. package/tabs/tabs.stories.d.ts +11 -0
  302. package/tabs/tabs.stories.js +48 -0
  303. package/text-input/index.d.ts +1 -0
  304. package/text-input/index.js +17 -0
  305. package/text-input/text-input.d.ts +31 -0
  306. package/text-input/text-input.js +57 -0
  307. package/text-input/text-input.spec.d.ts +1 -0
  308. package/text-input/text-input.spec.js +9 -0
  309. package/text-input/text-input.stories.d.ts +8 -0
  310. package/text-input/text-input.stories.js +56 -0
  311. package/text-link/index.d.ts +1 -0
  312. package/text-link/index.js +17 -0
  313. package/text-link/text-link.d.ts +5 -0
  314. package/text-link/text-link.js +19 -0
  315. package/text-link/text-link.stories.d.ts +7 -0
  316. package/text-link/text-link.stories.js +24 -0
  317. package/textarea/index.d.ts +1 -0
  318. package/textarea/index.js +17 -0
  319. package/textarea/textarea.d.ts +18 -0
  320. package/textarea/textarea.js +81 -0
  321. package/textarea/textarea.stories.d.ts +7 -0
  322. package/textarea/textarea.stories.js +44 -0
  323. package/time-picker-input/index.d.ts +2 -0
  324. package/time-picker-input/index.js +18 -0
  325. package/time-picker-input/time-picker-hour.d.ts +5 -0
  326. package/time-picker-input/time-picker-hour.js +47 -0
  327. package/time-picker-input/time-picker-hours.d.ts +2 -0
  328. package/time-picker-input/time-picker-hours.js +14 -0
  329. package/time-picker-input/time-picker-input.d.ts +22 -0
  330. package/time-picker-input/time-picker-input.js +89 -0
  331. package/time-picker-input/time-picker-input.stories.d.ts +7 -0
  332. package/time-picker-input/time-picker-input.stories.js +45 -0
  333. package/time-picker-input/time-picker-minute.d.ts +5 -0
  334. package/time-picker-input/time-picker-minute.js +47 -0
  335. package/time-picker-input/time-picker-minutes.d.ts +2 -0
  336. package/time-picker-input/time-picker-minutes.js +14 -0
  337. package/time-picker-input/time-picker.d.ts +8 -0
  338. package/time-picker-input/time-picker.js +69 -0
  339. package/toggle/index.d.ts +1 -0
  340. package/toggle/index.js +17 -0
  341. package/toggle/theme.d.ts +4 -0
  342. package/toggle/theme.js +2 -0
  343. package/toggle/toggle.d.ts +12 -0
  344. package/toggle/toggle.js +19 -0
  345. package/toggle/toggle.stories.d.ts +7 -0
  346. package/toggle/toggle.stories.js +52 -0
  347. package/tw-tokens/tw-box-shadow.d.ts +11 -0
  348. package/tw-tokens/tw-box-shadow.js +14 -0
  349. package/tw-tokens/tw-colors.d.ts +328 -0
  350. package/tw-tokens/tw-colors.js +331 -0
  351. package/tw-tokens/tw-containers.d.ts +8 -0
  352. package/tw-tokens/tw-containers.js +11 -0
  353. package/tw-tokens/tw-font-size.d.ts +42 -0
  354. package/tw-tokens/tw-font-size.js +19 -0
  355. package/tw-tokens/tw-font-weight.d.ts +12 -0
  356. package/tw-tokens/tw-font-weight.js +15 -0
  357. package/tw-tokens/tw-line-height.d.ts +17 -0
  358. package/tw-tokens/tw-line-height.js +20 -0
  359. package/tw-tokens/tw-screens.d.ts +8 -0
  360. package/tw-tokens/tw-screens.js +11 -0
  361. package/tw-tokens/tw-spacing.d.ts +39 -0
  362. package/tw-tokens/tw-spacing.js +42 -0
  363. package/tw-tokens/tw-z-index.d.ts +19 -0
  364. package/tw-tokens/tw-z-index.js +22 -0
  365. package/types/form-control-props.d.ts +24 -0
  366. package/types/form-control-props.js +2 -0
  367. package/types/index.d.ts +1 -0
  368. package/types/index.js +17 -0
  369. package/utils/action.d.ts +2 -0
  370. package/utils/action.js +11 -0
  371. package/utils/component-structure-analyzer.d.ts +6 -0
  372. package/utils/component-structure-analyzer.js +10 -0
  373. package/utils/icons-config.js +73 -0
  374. package/utils/image.d.ts +19 -0
  375. package/utils/image.js +104 -0
  376. package/utils/is-light-background.d.ts +2 -0
  377. package/utils/is-light-background.js +11 -0
  378. package/utils/snap-test.d.ts +2 -0
  379. package/utils/snap-test.js +17 -0
  380. package/utils/storybook-config.d.ts +26 -0
  381. package/{storybook → utils}/storybook-config.js +12 -6
  382. package/utils/tailwind-config.js +170 -0
  383. package/stories/button.stories.tsx +0 -87
  384. package/storybook/index.d.ts +0 -1
  385. package/storybook/storybook-config.d.ts +0 -21
  386. package/tailwindui/button.css +0 -51
  387. package/types.d.ts +0 -3
  388. package/types.js +0 -3
@@ -0,0 +1,170 @@
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
+ inputSize: {
30
+ xs: "30px",
31
+ sm: "34px",
32
+ default: "38px",
33
+ lg: "42px",
34
+ xl: "46px",
35
+ },
36
+ extend: {
37
+ borderRadius: {
38
+ inherit: "inherit",
39
+ },
40
+ colors: {
41
+ inherit: "inherit",
42
+ lightHigh: "#111827",
43
+ lightMedium: "#4b5563",
44
+ lightLow: "#9ca3af",
45
+ darkHigh: "#ffffff",
46
+ darkMedium: "#ffffffcc",
47
+ darkLow: "#ffffff80",
48
+ lightBorder: "#e5e7eb",
49
+ darkBorder: "#374151",
50
+ primary: {
51
+ 50: "#eff6ff",
52
+ 100: "#dbeafe",
53
+ 200: "#bfdbfe",
54
+ 300: "#93c5fd",
55
+ 400: "#60a5fa",
56
+ 500: "#3b82f6",
57
+ 600: "#2563eb",
58
+ 700: "#1d4ed8",
59
+ 800: "#1e40af",
60
+ 900: "#1e3a8a",
61
+ },
62
+ success: {
63
+ 50: "#f0fdf4",
64
+ 100: "#dcfce7",
65
+ 200: "#bbf7d0",
66
+ 300: "#86efac",
67
+ 400: "#4ade80",
68
+ 500: "#22c55e",
69
+ 600: "#16a34a",
70
+ 700: "#15803d",
71
+ 800: "#166534",
72
+ 900: "#14532d",
73
+ },
74
+ warning: {
75
+ 50: "#fff7ed",
76
+ 100: "#ffedd5",
77
+ 200: "#fed7aa",
78
+ 300: "#fdba74",
79
+ 400: "#fb923c",
80
+ 500: "#f97316",
81
+ 600: "#ea580c",
82
+ 700: "#c2410c",
83
+ 800: "#9a3412",
84
+ 900: "#7c2d12",
85
+ },
86
+ error: {
87
+ 50: "#fef2f2",
88
+ 100: "#fee2e2",
89
+ 200: "#fecaca",
90
+ 300: "#fca5a5",
91
+ 400: "#f87171",
92
+ 500: "#ef4444",
93
+ 600: "#dc2626",
94
+ 700: "#b91c1c",
95
+ 800: "#991b1b",
96
+ 900: "#7f1d1d",
97
+ },
98
+ },
99
+ spacing: {
100
+ inherit: "inherit",
101
+ },
102
+ zIndex: {
103
+ 1: "1",
104
+ focus: "5",
105
+ fixed: "10",
106
+ menu: "25",
107
+ header: "50",
108
+ modal: "100",
109
+ dropdown: "200",
110
+ flashMessage: "250",
111
+ tooltip: "300",
112
+ },
113
+ },
114
+ },
115
+ corePlugins: {
116
+ aspectRatio: false,
117
+ container: false,
118
+ },
119
+ plugins: [
120
+ require("@tailwindcss/aspect-ratio"),
121
+ require("@tailwindcss/line-clamp"),
122
+ plugin(
123
+ ({ addComponents, theme }) => {
124
+ const screens = theme("screens", SCREENS);
125
+ const containers = theme("containers", CONTAINERS);
126
+
127
+ const mqs = Object.entries(screens);
128
+ const widths = mqs
129
+ .map((item) => {
130
+ const key = item[0];
131
+ const value = item[1];
132
+ const width = containers[key];
133
+ if (width) {
134
+ return { [`@media (min-width: ${value})`]: { ".container": { "max-width": width } } };
135
+ }
136
+ })
137
+ .filter((i) => i);
138
+
139
+ addComponents([
140
+ {
141
+ ".container": {
142
+ "margin-left": "auto",
143
+ "margin-right": "auto",
144
+ width: "100%",
145
+ },
146
+ },
147
+ ...widths,
148
+ ]);
149
+ },
150
+ {
151
+ content: [],
152
+ theme: {
153
+ containers: CONTAINERS,
154
+ },
155
+ },
156
+ ),
157
+ plugin(({ addVariant }) => {
158
+ addVariant("is-active", "&.is-active");
159
+ addVariant("is-selected", "&.is-selected");
160
+ addVariant("is-hoverable", ["&.is-hoverable:active", "&.is-hoverable:hover"]);
161
+ addVariant("is-focused", "&.is-focused");
162
+ addVariant("is-required", ["&.is-required", "&:required"]);
163
+ addVariant("is-invalid", "&.is-invalid");
164
+ addVariant("is-loading", ["&.is-loading"]);
165
+ addVariant("is-readonly", ["&.is-readonly", "&:readonly"]);
166
+ addVariant("is-disabled", ["&.is-disabled", "&:disabled"]);
167
+ addVariant("is-empty", ["&.is-empty"]);
168
+ }),
169
+ ],
170
+ };
@@ -1,87 +0,0 @@
1
- import React from "react";
2
- import { Button } from "@uxf/ui/button";
3
- import { useStorybookConfig } from "@uxf/ui/storybook";
4
- import { Fragment } from "react";
5
-
6
- export default {
7
- title: "UI/Button",
8
- component: Button,
9
- };
10
-
11
- export function Default() {
12
- const config = useStorybookConfig("Button");
13
-
14
- return (
15
- <div className="space-y-2">
16
- {config.variants.map((variant) => (
17
- <Fragment key={variant}>
18
- {config.colors.map((color) => (
19
- <div key={color} className="space-x-2">
20
- {config.sizes.map((size) => (
21
- <Button key={size} variant={variant} color={color} size={size}>
22
- Button
23
- </Button>
24
- ))}
25
- </div>
26
- ))}
27
- </Fragment>
28
- ))}
29
- </div>
30
- );
31
- }
32
-
33
- export function Disabled() {
34
- const config = useStorybookConfig("Button");
35
-
36
- return (
37
- <div className="space-y-2">
38
- {config.variants.map((variant) => (
39
- <Fragment key={variant}>
40
- {config.colors.map((color) => (
41
- <div key={color} className="space-x-2">
42
- {config.sizes.map((size) => (
43
- <Button
44
- key={size}
45
- variant={variant}
46
- color={color}
47
- size={size}
48
- disabled
49
- >
50
- Button
51
- </Button>
52
- ))}
53
- </div>
54
- ))}
55
- </Fragment>
56
- ))}
57
- </div>
58
- );
59
- }
60
-
61
- export function Loading() {
62
- const config = useStorybookConfig("Button");
63
-
64
- return (
65
- <div className="space-y-2">
66
- {config.variants.map((variant) => (
67
- <Fragment key={variant}>
68
- {config.colors.map((color) => (
69
- <div key={color} className="space-x-2">
70
- {config.sizes.map((size) => (
71
- <Button
72
- key={size}
73
- variant={variant}
74
- color={color}
75
- size={size}
76
- loading
77
- >
78
- Button
79
- </Button>
80
- ))}
81
- </div>
82
- ))}
83
- </Fragment>
84
- ))}
85
- </div>
86
- );
87
- }
@@ -1 +0,0 @@
1
- export * from "./storybook-config";
@@ -1,21 +0,0 @@
1
- import { ButtonColors, ButtonSizes, ButtonVariants } from "@uxf/ui/button";
2
- import { ReactNode } from "react";
3
- export declare const defaultConfig: StorybookConfig;
4
- export interface StorybookConfig {
5
- Button: {
6
- sizes: Array<keyof ButtonSizes>;
7
- variants: Array<keyof ButtonVariants>;
8
- colors: Array<keyof ButtonColors>;
9
- };
10
- }
11
- export declare function useStorybookConfig(key: keyof StorybookConfig): {
12
- sizes: (keyof ButtonSizes)[];
13
- variants: (keyof ButtonVariants)[];
14
- colors: (keyof ButtonColors)[];
15
- };
16
- interface StorybookContextProviderProps {
17
- config: StorybookConfig;
18
- children: ReactNode;
19
- }
20
- export declare function StorybookContextProvider(props: StorybookContextProviderProps): JSX.Element;
21
- export {};
@@ -1,51 +0,0 @@
1
- .button {
2
- @apply inline-flex shadow-sm items-center shadow-sm font-medium rounded focus:outline-none focus:ring-2 focus:ring-offset-2;
3
-
4
- &.button--disabled {
5
- @apply pointer-events-none opacity-40;
6
- }
7
-
8
- &.button--size-xs {
9
- @apply px-2.5 py-1.5 text-xs;
10
- }
11
-
12
- &.button--size-sm {
13
- @apply px-3 py-2 text-sm leading-4;
14
- }
15
-
16
- &.button--size-default {
17
- @apply px-4 py-2 text-sm;
18
- }
19
-
20
- &.button--size-lg {
21
- @apply px-4 py-2 text-base;
22
- }
23
-
24
- &.button--size-xl {
25
- @apply px-6 py-3 border text-base;
26
- }
27
-
28
- &.button--variant-outlined {
29
- @apply border bg-white;
30
-
31
- &.button--color-default {
32
- @apply border-primary-300 text-primary-700 hover:bg-primary-50 focus:ring-primary-500;
33
- }
34
-
35
- &.button--color-secondary {
36
- @apply border-secondary-300 text-secondary-700 hover:bg-secondary-50 focus:ring-secondary-500;
37
- }
38
- }
39
-
40
- &.button--variant-default {
41
- @apply border-transparent text-white;
42
-
43
- &.button--color-default {
44
- @apply bg-primary-500 hover:bg-primary-600 focus:ring-primary-400;
45
- }
46
-
47
- &.button--color-secondary {
48
- @apply bg-secondary-500 hover:bg-secondary-600 focus:ring-secondary-400;
49
- }
50
- }
51
- }
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