@uxf/ui 1.0.0-beta.8 → 1.0.0-beta.80

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 (348) 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/{storybook → avatar-file-input}/index.js +1 -2
  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 -12
  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 +6 -2
  30. package/button/theme.js +0 -1
  31. package/checkbox/checkbox.d.ts +9 -0
  32. package/checkbox/checkbox.js +24 -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 +18 -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 +22 -0
  63. package/color-radio-group/index.d.ts +1 -0
  64. package/color-radio-group/index.js +17 -0
  65. package/combobox/combobox.d.ts +25 -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 +77 -0
  74. package/config/icons.js +20 -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 +7 -0
  88. package/css/avatar.css +15 -0
  89. package/css/badge.css +23 -0
  90. package/css/button.css +231 -0
  91. package/css/checkbox-button.css +98 -0
  92. package/css/checkbox-input.css +3 -0
  93. package/css/checkbox.css +102 -0
  94. package/css/chip.css +37 -0
  95. package/css/color-radio-group.css +21 -0
  96. package/css/color-radio.css +21 -0
  97. package/css/combobox.css +102 -0
  98. package/css/component-structure-analyzer.css +31 -0
  99. package/css/date-picker-input.css +133 -0
  100. package/css/date-picker.css +90 -0
  101. package/css/dropdown.css +24 -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 +7 -0
  106. package/css/input-basic.css +18 -0
  107. package/css/input.css +193 -0
  108. package/css/label.css +15 -0
  109. package/css/layout.css +47 -0
  110. package/css/list-item.css +29 -0
  111. package/css/pagination.css +27 -0
  112. package/css/radio-group.css +160 -0
  113. package/css/radio.css +89 -0
  114. package/css/raster-image.css +15 -0
  115. package/css/select.css +66 -0
  116. package/css/tabs.css +131 -0
  117. package/css/text-link.css +12 -0
  118. package/css/textarea.css +118 -0
  119. package/css/time-picker-input.css +133 -0
  120. package/css/time-picker.css +27 -0
  121. package/css/toggle.css +80 -0
  122. package/date-picker-input/date-picker-day.d.ts +8 -0
  123. package/date-picker-input/date-picker-day.js +63 -0
  124. package/date-picker-input/date-picker-decade.d.ts +6 -0
  125. package/date-picker-input/date-picker-decade.js +68 -0
  126. package/date-picker-input/date-picker-input.d.ts +21 -0
  127. package/date-picker-input/date-picker-input.js +60 -0
  128. package/date-picker-input/date-picker-input.stories.d.ts +7 -0
  129. package/date-picker-input/date-picker-input.stories.js +45 -0
  130. package/date-picker-input/date-picker-month.d.ts +7 -0
  131. package/date-picker-input/date-picker-month.js +63 -0
  132. package/date-picker-input/date-picker-provider.d.ts +8 -0
  133. package/date-picker-input/date-picker-provider.js +26 -0
  134. package/date-picker-input/date-picker-year.d.ts +7 -0
  135. package/date-picker-input/date-picker-year.js +72 -0
  136. package/date-picker-input/date-picker.d.ts +3 -0
  137. package/date-picker-input/date-picker.js +53 -0
  138. package/date-picker-input/index.d.ts +3 -0
  139. package/date-picker-input/index.js +19 -0
  140. package/date-picker-input/types.d.ts +5 -0
  141. package/date-picker-input/types.js +2 -0
  142. package/dropdown/dropdown.d.ts +11 -0
  143. package/dropdown/dropdown.js +27 -0
  144. package/dropdown/dropdown.stories.d.ts +10 -0
  145. package/dropdown/dropdown.stories.js +30 -0
  146. package/dropdown/index.d.ts +1 -0
  147. package/dropdown/index.js +17 -0
  148. package/error-message/error-message.d.ts +7 -0
  149. package/error-message/error-message.js +11 -0
  150. package/error-message/error-message.stories.d.ts +8 -0
  151. package/error-message/error-message.stories.js +17 -0
  152. package/error-message/index.d.ts +1 -0
  153. package/error-message/index.js +17 -0
  154. package/flash-messages/flash-message.d.ts +16 -0
  155. package/flash-messages/flash-message.js +46 -0
  156. package/flash-messages/flash-messages-service.d.ts +5 -0
  157. package/flash-messages/flash-messages-service.js +15 -0
  158. package/flash-messages/flash-messages.d.ts +8 -0
  159. package/flash-messages/flash-messages.js +55 -0
  160. package/flash-messages/flash-messages.stories.d.ts +7 -0
  161. package/flash-messages/flash-messages.stories.js +31 -0
  162. package/flash-messages/theme.d.ts +4 -0
  163. package/flash-messages/theme.js +2 -0
  164. package/form-control/form-control.d.ts +13 -0
  165. package/form-control/form-control.js +19 -0
  166. package/form-control/form-control.stories.d.ts +12 -0
  167. package/form-control/form-control.stories.js +25 -0
  168. package/form-control/index.d.ts +1 -0
  169. package/form-control/index.js +17 -0
  170. package/hooks/use-dropdown.d.ts +2 -0
  171. package/hooks/use-dropdown.js +28 -0
  172. package/hooks/use-input-submit.d.ts +4 -0
  173. package/hooks/use-input-submit.js +40 -0
  174. package/icon/icon.d.ts +17 -0
  175. package/icon/icon.js +38 -0
  176. package/icon/icon.stories.d.ts +11 -0
  177. package/icon/icon.stories.js +47 -0
  178. package/icon/index.d.ts +1 -0
  179. package/icon/index.js +17 -0
  180. package/icon/theme.d.ts +2 -0
  181. package/icon/theme.js +2 -0
  182. package/icon/types.d.ts +2 -0
  183. package/icon/types.js +2 -0
  184. package/image-gallery/components/close-button.d.ts +6 -0
  185. package/image-gallery/components/close-button.js +12 -0
  186. package/image-gallery/components/dot.d.ts +6 -0
  187. package/image-gallery/components/dot.js +12 -0
  188. package/image-gallery/components/gallery.d.ts +11 -0
  189. package/image-gallery/components/gallery.js +71 -0
  190. package/image-gallery/components/next-button.d.ts +6 -0
  191. package/image-gallery/components/next-button.js +12 -0
  192. package/image-gallery/components/previous-button.d.ts +6 -0
  193. package/image-gallery/components/previous-button.js +12 -0
  194. package/image-gallery/context.d.ts +10 -0
  195. package/image-gallery/context.js +12 -0
  196. package/image-gallery/image-gallery.d.ts +6 -0
  197. package/image-gallery/image-gallery.js +55 -0
  198. package/image-gallery/image-gallery.stories.d.ts +13 -0
  199. package/image-gallery/image-gallery.stories.js +26 -0
  200. package/image-gallery/image.d.ts +4 -0
  201. package/image-gallery/image.js +14 -0
  202. package/image-gallery/index.d.ts +4 -0
  203. package/image-gallery/index.js +26 -0
  204. package/image-gallery/types.d.ts +7 -0
  205. package/image-gallery/types.js +2 -0
  206. package/image-gallery/use-image.d.ts +2 -0
  207. package/image-gallery/use-image.js +16 -0
  208. package/input/index.d.ts +12 -0
  209. package/input/index.js +16 -0
  210. package/input/input-element.d.ts +21 -0
  211. package/input/input-element.js +11 -0
  212. package/input/input-left-addon.d.ts +9 -0
  213. package/input/input-left-addon.js +12 -0
  214. package/input/input-left-element.d.ts +9 -0
  215. package/input/input-left-element.js +12 -0
  216. package/input/input-right-addon.d.ts +8 -0
  217. package/input/input-right-addon.js +12 -0
  218. package/input/input-right-element.d.ts +9 -0
  219. package/input/input-right-element.js +12 -0
  220. package/input/input.d.ts +8 -0
  221. package/input/input.js +65 -0
  222. package/input/input.stories.d.ts +14 -0
  223. package/input/input.stories.js +83 -0
  224. package/input/theme.d.ts +7 -0
  225. package/input/theme.js +2 -0
  226. package/label/index.d.ts +1 -0
  227. package/label/index.js +17 -0
  228. package/label/label.d.ts +12 -0
  229. package/label/label.js +14 -0
  230. package/label/label.stories.d.ts +7 -0
  231. package/label/label.stories.js +17 -0
  232. package/layout/index.d.ts +1 -0
  233. package/layout/index.js +17 -0
  234. package/layout/layout.d.ts +9 -0
  235. package/layout/layout.js +60 -0
  236. package/layout/layout.stories.d.ts +8 -0
  237. package/layout/layout.stories.js +21 -0
  238. package/layout/uxf-logo.d.ts +6 -0
  239. package/layout/uxf-logo.js +13 -0
  240. package/list-item/index.d.ts +1 -0
  241. package/list-item/index.js +5 -0
  242. package/list-item/list-item.d.ts +8 -0
  243. package/list-item/list-item.js +24 -0
  244. package/list-item/list-item.stories.d.ts +7 -0
  245. package/list-item/list-item.stories.js +32 -0
  246. package/package.json +17 -36
  247. package/pagination/pagination.d.ts +7 -0
  248. package/pagination/pagination.js +49 -0
  249. package/pagination/pagination.stories.d.ts +7 -0
  250. package/pagination/pagination.stories.js +47 -0
  251. package/radio/index.d.ts +1 -0
  252. package/radio/index.js +17 -0
  253. package/radio/radio.d.ts +6 -0
  254. package/radio/radio.js +15 -0
  255. package/radio/radio.stories.d.ts +7 -0
  256. package/radio/radio.stories.js +42 -0
  257. package/radio-group/index.d.ts +1 -0
  258. package/radio-group/index.js +17 -0
  259. package/radio-group/radio-group.d.ts +22 -0
  260. package/radio-group/radio-group.js +48 -0
  261. package/radio-group/radio-group.stories.d.ts +7 -0
  262. package/radio-group/radio-group.stories.js +57 -0
  263. package/radio-group/theme.d.ts +5 -0
  264. package/radio-group/theme.js +2 -0
  265. package/raster-image/index.d.ts +1 -0
  266. package/raster-image/index.js +17 -0
  267. package/raster-image/raster-image.d.ts +16 -0
  268. package/raster-image/raster-image.js +21 -0
  269. package/raster-image/raster-image.stories.d.ts +7 -0
  270. package/raster-image/raster-image.stories.js +17 -0
  271. package/select/index.d.ts +1 -0
  272. package/select/index.js +17 -0
  273. package/select/select.d.ts +25 -0
  274. package/select/select.js +60 -0
  275. package/select/select.stories.d.ts +9 -0
  276. package/select/select.stories.js +72 -0
  277. package/tabs/index.d.ts +1 -0
  278. package/tabs/index.js +5 -0
  279. package/tabs/tabs.d.ts +19 -0
  280. package/tabs/tabs.js +68 -0
  281. package/tabs/tabs.stories.d.ts +11 -0
  282. package/tabs/tabs.stories.js +48 -0
  283. package/text-input/index.d.ts +1 -0
  284. package/text-input/index.js +17 -0
  285. package/text-input/text-input.d.ts +31 -0
  286. package/text-input/text-input.js +57 -0
  287. package/text-input/text-input.stories.d.ts +8 -0
  288. package/text-input/text-input.stories.js +56 -0
  289. package/text-link/index.d.ts +1 -0
  290. package/text-link/index.js +5 -0
  291. package/text-link/text-link.d.ts +5 -0
  292. package/text-link/text-link.js +19 -0
  293. package/text-link/text-link.stories.d.ts +7 -0
  294. package/text-link/text-link.stories.js +24 -0
  295. package/textarea/index.d.ts +1 -0
  296. package/textarea/index.js +17 -0
  297. package/textarea/textarea.d.ts +18 -0
  298. package/textarea/textarea.js +81 -0
  299. package/textarea/textarea.stories.d.ts +7 -0
  300. package/textarea/textarea.stories.js +44 -0
  301. package/time-picker-input/index.d.ts +2 -0
  302. package/time-picker-input/index.js +18 -0
  303. package/time-picker-input/time-picker-hour.d.ts +5 -0
  304. package/time-picker-input/time-picker-hour.js +47 -0
  305. package/time-picker-input/time-picker-hours.d.ts +2 -0
  306. package/time-picker-input/time-picker-hours.js +14 -0
  307. package/time-picker-input/time-picker-input.d.ts +22 -0
  308. package/time-picker-input/time-picker-input.js +64 -0
  309. package/time-picker-input/time-picker-input.stories.d.ts +7 -0
  310. package/time-picker-input/time-picker-input.stories.js +45 -0
  311. package/time-picker-input/time-picker-minute.d.ts +5 -0
  312. package/time-picker-input/time-picker-minute.js +47 -0
  313. package/time-picker-input/time-picker-minutes.d.ts +2 -0
  314. package/time-picker-input/time-picker-minutes.js +14 -0
  315. package/time-picker-input/time-picker.d.ts +8 -0
  316. package/time-picker-input/time-picker.js +69 -0
  317. package/toggle/index.d.ts +1 -0
  318. package/toggle/index.js +17 -0
  319. package/toggle/theme.d.ts +4 -0
  320. package/toggle/theme.js +2 -0
  321. package/toggle/toggle.d.ts +12 -0
  322. package/toggle/toggle.js +19 -0
  323. package/toggle/toggle.stories.d.ts +7 -0
  324. package/toggle/toggle.stories.js +52 -0
  325. package/types/form-control-props.d.ts +24 -0
  326. package/types/form-control-props.js +2 -0
  327. package/types/index.d.ts +1 -0
  328. package/types/index.js +17 -0
  329. package/utils/action.d.ts +2 -0
  330. package/utils/action.js +11 -0
  331. package/utils/component-structure-analyzer.d.ts +6 -0
  332. package/utils/component-structure-analyzer.js +10 -0
  333. package/utils/icons-config.js +73 -0
  334. package/utils/image.d.ts +9 -0
  335. package/utils/image.js +30 -0
  336. package/utils/is-light-background.d.ts +2 -0
  337. package/utils/is-light-background.js +11 -0
  338. package/utils/localized-dayjs.d.ts +2 -0
  339. package/utils/localized-dayjs.js +34 -0
  340. package/utils/storybook-config.d.ts +19 -0
  341. package/{storybook → utils}/storybook-config.js +7 -6
  342. package/utils/tailwind-config.js +163 -0
  343. package/stories/button.stories.tsx +0 -73
  344. package/storybook/index.d.ts +0 -1
  345. package/storybook/storybook-config.d.ts +0 -21
  346. package/tailwindui/button.css +0 -51
  347. package/types.d.ts +0 -3
  348. package/types.js +0 -3
@@ -0,0 +1,67 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ComponentStructure = exports.Default = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const index_1 = require("./index");
32
+ const component_structure_analyzer_1 = __importDefault(require("../utils/component-structure-analyzer"));
33
+ exports.default = {
34
+ title: "UI/Combobox",
35
+ component: index_1.Combobox,
36
+ };
37
+ const options = [
38
+ { id: "one", label: "Option one escr" },
39
+ { id: "two", label: "Option two ěščř" },
40
+ { id: "three", label: "Option three" },
41
+ ];
42
+ function Default() {
43
+ const [value, setValue] = (0, react_1.useState)();
44
+ const handleChange = (v) => {
45
+ // eslint-disable-next-line no-console
46
+ console.log("Select value: ", v);
47
+ setValue(v);
48
+ };
49
+ const storyComboboxes = (react_1.default.createElement("div", { className: "space-y-8" },
50
+ react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange: handleChange, options: options, placeholder: "Vyberte ..", value: value }),
51
+ react_1.default.createElement(index_1.Combobox, { helperText: "Start typing to see options...", id: "combobox-1", label: "Combobox with helper text", name: "combobox", onChange: handleChange, options: options, placeholder: "Vyberte ..", value: value }),
52
+ react_1.default.createElement(index_1.Combobox, { helperText: "Error message", id: "combobox-1", isInvalid: true, isRequired: true, label: "Combobox invalid", name: "combobox", onChange: handleChange, options: options, placeholder: "Vyberte ..", value: value }),
53
+ react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", label: "Combobox with dropdown top", name: "combobox", onChange: handleChange, options: options, placeholder: "Vyberte ..", value: value })));
54
+ return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
55
+ react_1.default.createElement("div", { className: "light space-y-2 p-20 lg:w-1/2" }, storyComboboxes),
56
+ react_1.default.createElement("div", { className: "dark space-y-2 bg-gray-900 p-20 lg:w-1/2" }, storyComboboxes)));
57
+ }
58
+ exports.Default = Default;
59
+ function ComponentStructure() {
60
+ const [value, setValue] = (0, react_1.useState)(null);
61
+ const handleChange = (v) => {
62
+ setValue(v);
63
+ };
64
+ return (react_1.default.createElement(component_structure_analyzer_1.default, null,
65
+ react_1.default.createElement(index_1.Combobox, { id: "combobox-structure", name: "combobox", label: "Combobox with helper text", options: options, onChange: handleChange, value: value, helperText: "Start typing to see options..." })));
66
+ }
67
+ exports.ComponentStructure = ComponentStructure;
@@ -0,0 +1 @@
1
+ export * from "./combobox";
@@ -0,0 +1,17 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./combobox"), exports);
@@ -0,0 +1,2 @@
1
+ export declare const ICONS_VERSION = "1668632602549";
2
+ export declare const ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
4
+ exports.ICONS_VERSION = "1668632602549";
5
+ exports.ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
@@ -0,0 +1,77 @@
1
+ export declare const ICONS: {
2
+ readonly calendar: {
3
+ readonly w: 448;
4
+ readonly h: 512;
5
+ };
6
+ readonly camera: {
7
+ readonly w: 512;
8
+ readonly h: 512;
9
+ };
10
+ readonly caretDown: {
11
+ readonly w: 320;
12
+ readonly h: 512;
13
+ };
14
+ readonly clock: {
15
+ readonly w: 512;
16
+ readonly h: 512;
17
+ };
18
+ readonly bars: {
19
+ readonly w: 448;
20
+ readonly h: 512;
21
+ };
22
+ readonly check: {
23
+ readonly w: 512;
24
+ readonly h: 512;
25
+ };
26
+ readonly chevronDown: {
27
+ readonly w: 512;
28
+ readonly h: 512;
29
+ };
30
+ readonly chevronLeft: {
31
+ readonly w: 384;
32
+ readonly h: 512;
33
+ };
34
+ readonly chevronsLeft: {
35
+ readonly w: 512;
36
+ readonly h: 512;
37
+ };
38
+ readonly chevronRight: {
39
+ readonly w: 384;
40
+ readonly h: 512;
41
+ };
42
+ readonly chevronsRight: {
43
+ readonly w: 512;
44
+ readonly h: 512;
45
+ };
46
+ readonly chevronUp: {
47
+ readonly w: 512;
48
+ readonly h: 512;
49
+ };
50
+ readonly user: {
51
+ readonly w: 448;
52
+ readonly h: 512;
53
+ };
54
+ readonly xmarkLarge: {
55
+ readonly w: 448;
56
+ readonly h: 512;
57
+ };
58
+ };
59
+ export declare type IconsType = keyof typeof ICONS;
60
+ declare module "@uxf/ui/icon/theme" {
61
+ interface IconsSet {
62
+ calendar: true;
63
+ camera: true;
64
+ caretDown: true;
65
+ clock: true;
66
+ bars: true;
67
+ check: true;
68
+ chevronDown: true;
69
+ chevronLeft: true;
70
+ chevronsLeft: true;
71
+ chevronRight: true;
72
+ chevronsRight: true;
73
+ chevronUp: true;
74
+ user: true;
75
+ xmarkLarge: true;
76
+ }
77
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // this file is generated automatically, do not change anything manually in the contents of this file
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ICONS = void 0;
5
+ exports.ICONS = {
6
+ calendar: { w: 448, h: 512 },
7
+ camera: { w: 512, h: 512 },
8
+ caretDown: { w: 320, h: 512 },
9
+ clock: { w: 512, h: 512 },
10
+ bars: { w: 448, h: 512 },
11
+ check: { w: 512, h: 512 },
12
+ chevronDown: { w: 512, h: 512 },
13
+ chevronLeft: { w: 384, h: 512 },
14
+ chevronsLeft: { w: 512, h: 512 },
15
+ chevronRight: { w: 384, h: 512 },
16
+ chevronsRight: { w: 512, h: 512 },
17
+ chevronUp: { w: 512, h: 512 },
18
+ user: { w: 448, h: 512 },
19
+ xmarkLarge: { w: 448, h: 512 },
20
+ };
@@ -0,0 +1,3 @@
1
+ export interface ContentSchema {
2
+ wysiwyg: any;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ import { ReactNode, FC } from "react";
2
+ import { ContentSchema } from "@uxf/ui/content/content-schema";
3
+ import { UseControllerProps } from "react-hook-form";
4
+ export declare type ContentType = keyof ContentSchema;
5
+ interface ContentFormProps<TYPE extends ContentType> extends UseControllerProps<ContentSchema[TYPE]> {
6
+ type: TYPE;
7
+ index: number;
8
+ onRemove: () => void;
9
+ TypeInputProps: any;
10
+ }
11
+ export declare type ContentFormComponent<TYPE extends ContentType> = FC<ContentFormProps<TYPE>> & {
12
+ getConfig: () => {
13
+ type: TYPE;
14
+ label: ReactNode;
15
+ };
16
+ };
17
+ interface ContentRendererProps<TYPE extends ContentType> {
18
+ type: TYPE;
19
+ data: ContentSchema[TYPE];
20
+ index: number;
21
+ }
22
+ export declare type ContentRendererComponent<TYPE extends ContentType> = FC<ContentRendererProps<TYPE>> & {
23
+ getConfig: () => {
24
+ type: TYPE;
25
+ };
26
+ };
27
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { IconName } from "../icon/types";
3
+ export declare type UiContextType = {
4
+ icon: {
5
+ spriteFilePath: string;
6
+ iconsConfig: Record<IconName, {
7
+ w: number;
8
+ h: number;
9
+ }>;
10
+ };
11
+ };
12
+ export declare const UiContext: import("react").Context<UiContextType | undefined>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UiContext = void 0;
4
+ const react_1 = require("react");
5
+ exports.UiContext = (0, react_1.createContext)(undefined);
@@ -0,0 +1,3 @@
1
+ export * from "@uxf/ui/context/context";
2
+ export * from "@uxf/ui/context/provider";
3
+ export * from "@uxf/ui/context/use-component-context";
@@ -0,0 +1,19 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("@uxf/ui/context/context"), exports);
18
+ __exportStar(require("@uxf/ui/context/provider"), exports);
19
+ __exportStar(require("@uxf/ui/context/use-component-context"), exports);
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { UiContextType } from "./context";
3
+ declare type UiContextProviderProps = {
4
+ value: UiContextType;
5
+ children: ReactNode;
6
+ };
7
+ export declare const UiContextProvider: FC<UiContextProviderProps>;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UiContextProvider = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const context_1 = require("./context");
9
+ const UiContextProvider = (props) => (react_1.default.createElement(context_1.UiContext.Provider, { value: props.value }, props.children));
10
+ exports.UiContextProvider = UiContextProvider;
@@ -0,0 +1,3 @@
1
+ import { UiContextType } from "./context";
2
+ export declare type UiContextComponent = keyof UiContextType;
3
+ export declare const useComponentContext: <T extends "icon">(componentName: T) => UiContextType[T];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useComponentContext = void 0;
4
+ const react_1 = require("react");
5
+ const context_1 = require("./context");
6
+ const useComponentContext = (componentName) => {
7
+ const context = (0, react_1.useContext)(context_1.UiContext);
8
+ if (typeof context === "undefined") {
9
+ throw new Error(`If you want to use the "${componentName}" UI component, you have to wrap your code in the "UiContextProvider"`);
10
+ }
11
+ return context[componentName];
12
+ };
13
+ exports.useComponentContext = useComponentContext;
@@ -0,0 +1,7 @@
1
+ .uxf-avatar-file-input {
2
+ @apply overflow-hidden relative mx-auto h-24 w-24 rounded-full bg-gray-300 text-gray-300 transition
3
+ before:absolute before:inset-0 before:border before:border-dashed before:border-current before:rounded-full
4
+ hover:before:border-2 is-focused:text-gray-800 is-focused:bg-white
5
+ is-disabled:opacity-50 is-disabled:pointer-events-none is-readonly:pointer-events-none
6
+ is-invalid:text-red-600 is-invalid:is-focused:ring-red-300;
7
+ }
package/css/avatar.css ADDED
@@ -0,0 +1,15 @@
1
+ .uxf-avatar {
2
+ @apply relative inline-flex items-center justify-center h-10 w-10 rounded-full;
3
+
4
+ &__image {
5
+ @apply absolute left-0 top-0 block h-full w-full rounded-inherit object-cover;
6
+ }
7
+
8
+ :root .light & {
9
+ @apply text-gray-700 bg-gray-200;
10
+ }
11
+
12
+ :root .dark & {
13
+ @apply text-gray-200 bg-gray-800;
14
+ }
15
+ }
package/css/badge.css ADDED
@@ -0,0 +1,23 @@
1
+ .uxf-badge {
2
+ @apply inline-flex items-center justify-center font-bold;
3
+
4
+ &--size-small {
5
+ @apply h-6 min-w-[24px] text-sm rounded-[12px] px-1.5;
6
+ }
7
+
8
+ &--size-medium {
9
+ @apply h-8 min-w-[32px] text-base rounded-[16px] px-2;
10
+ }
11
+
12
+ &--size-large {
13
+ @apply h-10 min-w-[40px] text-lg rounded-[20px] px-2;
14
+ }
15
+
16
+ :root .light & {
17
+ @apply text-white bg-primary-500;
18
+ }
19
+
20
+ :root .dark & {
21
+ @apply text-gray-900 bg-white;
22
+ }
23
+ }
package/css/button.css ADDED
@@ -0,0 +1,231 @@
1
+ @keyframes spinner {
2
+ to {
3
+ transform: rotate(360deg);
4
+ }
5
+ }
6
+
7
+ .uxf-button {
8
+ @apply inline-flex items-center justify-center text-center rounded-lg before:rounded-lg font-semibold
9
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 relative cursor-pointer transition
10
+ before:transition;
11
+
12
+ &__text {
13
+ @apply truncate;
14
+ }
15
+
16
+ &--full-width {
17
+ @apply w-full flex flex-row justify-center;
18
+ }
19
+
20
+ &.is-disabled {
21
+ @apply pointer-events-none;
22
+ }
23
+
24
+ &.is-loading {
25
+ @apply pointer-events-none;
26
+
27
+ &::after {
28
+ animation: spinner 0.8s linear infinite;
29
+ border-radius: 50%;
30
+ border-right: 2px solid transparent;
31
+ border-top: 2px solid;
32
+ content: "";
33
+ height: 20px;
34
+ margin-left: 8px;
35
+ width: 20px;
36
+ }
37
+ }
38
+
39
+ &--size-xs {
40
+ @apply px-2.5 py-1.5 text-xs;
41
+
42
+ &.is-loading::after {
43
+ height: 14px;
44
+ width: 14px;
45
+ }
46
+
47
+ &.uxf-button--icon-button {
48
+ @apply p-0 h-7 w-7;
49
+ }
50
+ }
51
+
52
+ &--size-sm {
53
+ @apply px-3 py-2 text-sm leading-4;
54
+
55
+ &.is-loading::after {
56
+ height: 16px;
57
+ width: 16px;
58
+ }
59
+
60
+ &.uxf-button--icon-button {
61
+ @apply p-0 h-8 w-8;
62
+ }
63
+ }
64
+
65
+ &--size-default {
66
+ @apply px-4 py-3 text-base;
67
+
68
+ &.uxf-button--icon-button {
69
+ @apply p-0 h-12 w-12;
70
+ }
71
+ }
72
+
73
+ &--size-lg {
74
+ @apply px-8 py-5 text-base;
75
+
76
+ &.uxf-button--icon-button {
77
+ @apply p-0 h-16 w-16;
78
+ }
79
+ }
80
+
81
+ &--size-xl {
82
+ @apply px-10 py-6 text-base;
83
+
84
+ &.uxf-button--icon-button {
85
+ @apply p-0 h-[72px] w-[72px];
86
+ }
87
+ }
88
+
89
+ &--variant-outlined {
90
+ @apply before:absolute before:pointer-events-none before:inset-0 before:border is-hoverable:before:border-2
91
+ bg-transparent;
92
+
93
+ :root .light & {
94
+ @apply before:border-gray-300 is-hoverable:bg-primary-100 is-hoverable:before:border-primary-400
95
+ focus-visible:ring-primary-500 focus-visible:ring-offset-white;
96
+
97
+ &.is-disabled {
98
+ @apply before:border-gray-100 text-gray-400;
99
+ }
100
+ }
101
+
102
+ :root .dark & {
103
+ @apply before:border-gray-300 is-hoverable:bg-white/10 focus-visible:ring-primary-500
104
+ focus-visible:ring-offset-gray-900;
105
+
106
+ &.is-disabled {
107
+ @apply before:border-gray-700 text-gray-600;
108
+ }
109
+ }
110
+ }
111
+
112
+ &--variant-default {
113
+ @apply text-white;
114
+
115
+ &.uxf-button--color-default {
116
+ :root .light & {
117
+ @apply text-white bg-primary-500 is-hoverable:bg-primary-400 focus-visible:ring-primary-500;
118
+
119
+ &.is-disabled {
120
+ @apply bg-gray-100 text-gray-400;
121
+ }
122
+ }
123
+
124
+ :root .dark & {
125
+ @apply text-white bg-primary-500 is-hoverable:bg-primary-400 focus-visible:ring-primary-500
126
+ focus-visible:ring-offset-gray-900;
127
+
128
+ &.is-disabled {
129
+ @apply bg-gray-700 text-gray-400;
130
+ }
131
+ }
132
+ }
133
+
134
+ &.uxf-button--color-white {
135
+ :root .light & {
136
+ @apply bg-white is-hoverable:bg-gray-200 focus-visible:ring-gray-200;
137
+
138
+ &.is-disabled {
139
+ @apply bg-gray-100 text-gray-400;
140
+ }
141
+ }
142
+
143
+ :root .dark & {
144
+ @apply bg-white is-hoverable:bg-gray-200 focus-visible:ring-gray-200;
145
+
146
+ &.is-disabled {
147
+ @apply bg-gray-100 text-gray-400;
148
+ }
149
+ }
150
+
151
+ @apply bg-gray-50 text-gray-700 is-hoverable:bg-gray-100 focus-visible:ring-gray-500;
152
+ }
153
+
154
+ &.uxf-button--color-success {
155
+ :root .light & {
156
+ @apply text-white bg-success-500 is-hoverable:bg-success-400 focus-visible:ring-success-500;
157
+
158
+ &.is-disabled {
159
+ @apply bg-gray-100 text-gray-400;
160
+ }
161
+ }
162
+
163
+ :root .dark & {
164
+ @apply text-white bg-success-500 is-hoverable:bg-success-400 focus-visible:ring-success-500
165
+ focus-visible:ring-offset-gray-900;
166
+
167
+ &.is-disabled {
168
+ @apply bg-gray-700 text-gray-400;
169
+ }
170
+ }
171
+ }
172
+
173
+ &.uxf-button--color-warning {
174
+ :root .light & {
175
+ @apply text-white bg-warning-500 is-hoverable:bg-warning-400 focus-visible:ring-warning-500;
176
+
177
+ &.is-disabled {
178
+ @apply bg-gray-100 text-gray-400;
179
+ }
180
+ }
181
+
182
+ :root .dark & {
183
+ @apply text-white bg-warning-500 is-hoverable:bg-warning-400 focus-visible:ring-warning-500
184
+ focus-visible:ring-offset-gray-900;
185
+
186
+ &.is-disabled {
187
+ @apply bg-gray-700 text-gray-400;
188
+ }
189
+ }
190
+ }
191
+
192
+ &.uxf-button--color-error {
193
+ :root .light & {
194
+ @apply text-white bg-error-500 is-hoverable:bg-error-400 focus-visible:ring-error-500;
195
+
196
+ &.is-disabled {
197
+ @apply bg-gray-100 text-gray-400;
198
+ }
199
+ }
200
+
201
+ :root .dark & {
202
+ @apply text-white bg-error-500 is-hoverable:bg-error-400 focus-visible:ring-error-500
203
+ focus-visible:ring-offset-gray-900;
204
+
205
+ &.is-disabled {
206
+ @apply bg-gray-700 text-gray-400;
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ &--variant-text {
213
+ @apply before:border-transparent;
214
+
215
+ :root .light & {
216
+ @apply is-hoverable:bg-gray-200 focus-visible:ring-primary-500 focus-visible:ring-offset-white;
217
+
218
+ &.is-disabled {
219
+ @apply text-gray-400;
220
+ }
221
+ }
222
+
223
+ :root .dark & {
224
+ @apply is-hoverable:bg-gray-800 focus-visible:ring-primary-500 focus-visible:ring-offset-gray-900;
225
+
226
+ &.is-disabled {
227
+ @apply text-gray-600;
228
+ }
229
+ }
230
+ }
231
+ }