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

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 (368) 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 +16 -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 +9 -0
  34. package/checkbox/checkbox.js +24 -0
  35. package/checkbox/checkbox.stories.d.ts +7 -0
  36. package/checkbox/checkbox.stories.js +57 -0
  37. package/checkbox/index.d.ts +1 -0
  38. package/checkbox/index.js +17 -0
  39. package/checkbox-button/checkbox-button.d.ts +8 -0
  40. package/checkbox-button/checkbox-button.js +21 -0
  41. package/checkbox-button/checkbox-button.stories.d.ts +7 -0
  42. package/checkbox-button/checkbox-button.stories.js +57 -0
  43. package/checkbox-button/index.d.ts +1 -0
  44. package/checkbox-button/index.js +17 -0
  45. package/chip/chip.d.ts +10 -0
  46. package/chip/chip.js +19 -0
  47. package/chip/chip.stories.d.ts +14 -0
  48. package/chip/chip.stories.js +32 -0
  49. package/chip/index.d.ts +1 -0
  50. package/chip/index.js +17 -0
  51. package/chip/theme.d.ts +14 -0
  52. package/chip/theme.js +2 -0
  53. package/color-radio-group/color-radio-group.d.ts +18 -0
  54. package/color-radio-group/color-radio-group.js +47 -0
  55. package/color-radio-group/color-radio-group.stories.d.ts +7 -0
  56. package/color-radio-group/color-radio-group.stories.js +79 -0
  57. package/color-radio-group/color-radio.d.ts +8 -0
  58. package/color-radio-group/color-radio.js +22 -0
  59. package/color-radio-group/index.d.ts +1 -0
  60. package/color-radio-group/index.js +17 -0
  61. package/combobox/combobox.d.ts +24 -0
  62. package/combobox/combobox.js +61 -0
  63. package/combobox/combobox.stories.d.ts +9 -0
  64. package/combobox/combobox.stories.js +67 -0
  65. package/combobox/index.d.ts +1 -0
  66. package/combobox/index.js +17 -0
  67. package/config/icons-config.d.ts +2 -0
  68. package/config/icons-config.js +5 -0
  69. package/config/icons.d.ts +77 -0
  70. package/config/icons.js +20 -0
  71. package/content/content-schema.d.ts +3 -0
  72. package/content/content-schema.js +2 -0
  73. package/content/types.d.ts +27 -0
  74. package/content/types.js +2 -0
  75. package/context/context.d.ts +15 -0
  76. package/context/context.js +5 -0
  77. package/context/index.d.ts +3 -0
  78. package/context/index.js +19 -0
  79. package/context/provider.d.ts +8 -0
  80. package/context/provider.js +13 -0
  81. package/context/use-component-context.d.ts +3 -0
  82. package/context/use-component-context.js +13 -0
  83. package/css/avatar-file-input.css +7 -0
  84. package/css/avatar.css +15 -0
  85. package/css/badge.css +23 -0
  86. package/css/button.css +201 -0
  87. package/css/button.old.css +231 -0
  88. package/css/checkbox-button.css +98 -0
  89. package/css/checkbox.css +102 -0
  90. package/css/chip.css +171 -0
  91. package/css/chip.old.css +37 -0
  92. package/css/color-radio-group.css +21 -0
  93. package/css/color-radio.css +21 -0
  94. package/css/combobox.css +106 -0
  95. package/css/combobox.old.css +102 -0
  96. package/css/component-structure-analyzer.css +31 -0
  97. package/css/date-picker-input.css +133 -0
  98. package/css/date-picker.css +90 -0
  99. package/css/dropdown.css +24 -0
  100. package/css/dropdown.old.css +24 -0
  101. package/css/error-message.css +3 -0
  102. package/css/flash-messages.css +20 -0
  103. package/css/form-control.css +7 -0
  104. package/css/icon.css +7 -0
  105. package/css/input-basic.css +18 -0
  106. package/css/input.css +199 -0
  107. package/css/input.old.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 +28 -0
  112. package/css/radio-group.css +160 -0
  113. package/css/radio.css +89 -0
  114. package/css/raster-image.css +20 -0
  115. package/css/select.css +70 -0
  116. package/css/select.old.css +66 -0
  117. package/css/tabs.css +131 -0
  118. package/css/text-link.css +12 -0
  119. package/css/textarea.css +118 -0
  120. package/css/time-picker-input.css +136 -0
  121. package/css/time-picker.css +27 -0
  122. package/css/toggle.css +80 -0
  123. package/date-picker-input/date-picker-day.d.ts +8 -0
  124. package/date-picker-input/date-picker-day.js +63 -0
  125. package/date-picker-input/date-picker-decade.d.ts +6 -0
  126. package/date-picker-input/date-picker-decade.js +71 -0
  127. package/date-picker-input/date-picker-input.d.ts +21 -0
  128. package/date-picker-input/date-picker-input.js +88 -0
  129. package/date-picker-input/date-picker-input.stories.d.ts +14 -0
  130. package/date-picker-input/date-picker-input.stories.js +54 -0
  131. package/date-picker-input/date-picker-month.d.ts +7 -0
  132. package/date-picker-input/date-picker-month.js +66 -0
  133. package/date-picker-input/date-picker-provider.d.ts +8 -0
  134. package/date-picker-input/date-picker-provider.js +26 -0
  135. package/date-picker-input/date-picker-year.d.ts +7 -0
  136. package/date-picker-input/date-picker-year.js +74 -0
  137. package/date-picker-input/date-picker.d.ts +3 -0
  138. package/date-picker-input/date-picker.js +53 -0
  139. package/date-picker-input/index.d.ts +3 -0
  140. package/date-picker-input/index.js +19 -0
  141. package/date-picker-input/types.d.ts +5 -0
  142. package/date-picker-input/types.js +2 -0
  143. package/dropdown/dropdown.d.ts +11 -0
  144. package/dropdown/dropdown.js +27 -0
  145. package/dropdown/dropdown.stories.d.ts +10 -0
  146. package/dropdown/dropdown.stories.js +30 -0
  147. package/dropdown/index.d.ts +1 -0
  148. package/dropdown/index.js +17 -0
  149. package/error-message/error-message.d.ts +7 -0
  150. package/error-message/error-message.js +11 -0
  151. package/error-message/error-message.stories.d.ts +8 -0
  152. package/error-message/error-message.stories.js +17 -0
  153. package/error-message/index.d.ts +1 -0
  154. package/error-message/index.js +17 -0
  155. package/flash-messages/flash-message.d.ts +16 -0
  156. package/flash-messages/flash-message.js +46 -0
  157. package/flash-messages/flash-messages-service.d.ts +5 -0
  158. package/flash-messages/flash-messages-service.js +15 -0
  159. package/flash-messages/flash-messages.d.ts +8 -0
  160. package/flash-messages/flash-messages.js +55 -0
  161. package/flash-messages/flash-messages.stories.d.ts +7 -0
  162. package/flash-messages/flash-messages.stories.js +31 -0
  163. package/flash-messages/theme.d.ts +4 -0
  164. package/flash-messages/theme.js +2 -0
  165. package/form-control/form-control.d.ts +13 -0
  166. package/form-control/form-control.js +19 -0
  167. package/form-control/form-control.stories.d.ts +12 -0
  168. package/form-control/form-control.stories.js +25 -0
  169. package/form-control/index.d.ts +1 -0
  170. package/form-control/index.js +17 -0
  171. package/hooks/use-dropdown.d.ts +2 -0
  172. package/hooks/use-dropdown.js +30 -0
  173. package/hooks/use-input-submit.d.ts +4 -0
  174. package/hooks/use-input-submit.js +40 -0
  175. package/icon/icon.d.ts +17 -0
  176. package/icon/icon.js +38 -0
  177. package/icon/icon.stories.d.ts +18 -0
  178. package/icon/icon.stories.js +53 -0
  179. package/icon/index.d.ts +1 -0
  180. package/icon/index.js +17 -0
  181. package/icon/theme.d.ts +2 -0
  182. package/icon/theme.js +2 -0
  183. package/icon/types.d.ts +2 -0
  184. package/icon/types.js +2 -0
  185. package/image-gallery/components/close-button.d.ts +6 -0
  186. package/image-gallery/components/close-button.js +12 -0
  187. package/image-gallery/components/dot.d.ts +6 -0
  188. package/image-gallery/components/dot.js +12 -0
  189. package/image-gallery/components/gallery.d.ts +11 -0
  190. package/image-gallery/components/gallery.js +72 -0
  191. package/image-gallery/components/next-button.d.ts +6 -0
  192. package/image-gallery/components/next-button.js +12 -0
  193. package/image-gallery/components/previous-button.d.ts +6 -0
  194. package/image-gallery/components/previous-button.js +12 -0
  195. package/image-gallery/context.d.ts +10 -0
  196. package/image-gallery/context.js +12 -0
  197. package/image-gallery/image-gallery.d.ts +6 -0
  198. package/image-gallery/image-gallery.js +55 -0
  199. package/image-gallery/image-gallery.stories.d.ts +13 -0
  200. package/image-gallery/image-gallery.stories.js +27 -0
  201. package/image-gallery/image.d.ts +4 -0
  202. package/image-gallery/image.js +14 -0
  203. package/image-gallery/index.d.ts +4 -0
  204. package/image-gallery/index.js +26 -0
  205. package/image-gallery/types.d.ts +7 -0
  206. package/image-gallery/types.js +2 -0
  207. package/image-gallery/use-image.d.ts +2 -0
  208. package/image-gallery/use-image.js +16 -0
  209. package/input/index.d.ts +12 -0
  210. package/input/index.js +16 -0
  211. package/input/input-element.d.ts +21 -0
  212. package/input/input-element.js +11 -0
  213. package/input/input-left-addon.d.ts +9 -0
  214. package/input/input-left-addon.js +12 -0
  215. package/input/input-left-element.d.ts +9 -0
  216. package/input/input-left-element.js +12 -0
  217. package/input/input-right-addon.d.ts +8 -0
  218. package/input/input-right-addon.js +12 -0
  219. package/input/input-right-element.d.ts +9 -0
  220. package/input/input-right-element.js +12 -0
  221. package/input/input.d.ts +8 -0
  222. package/input/input.js +65 -0
  223. package/input/input.stories.d.ts +15 -0
  224. package/input/input.stories.js +93 -0
  225. package/input/theme.d.ts +8 -0
  226. package/input/theme.js +2 -0
  227. package/label/index.d.ts +1 -0
  228. package/label/index.js +17 -0
  229. package/label/label.d.ts +12 -0
  230. package/label/label.js +14 -0
  231. package/label/label.stories.d.ts +7 -0
  232. package/label/label.stories.js +17 -0
  233. package/layout/index.d.ts +1 -0
  234. package/layout/index.js +17 -0
  235. package/layout/layout.d.ts +9 -0
  236. package/layout/layout.js +60 -0
  237. package/layout/layout.stories.d.ts +8 -0
  238. package/layout/layout.stories.js +21 -0
  239. package/layout/uxf-logo.d.ts +6 -0
  240. package/layout/uxf-logo.js +13 -0
  241. package/list-item/index.d.ts +1 -0
  242. package/list-item/index.js +17 -0
  243. package/list-item/list-item.d.ts +8 -0
  244. package/list-item/list-item.js +24 -0
  245. package/list-item/list-item.stories.d.ts +7 -0
  246. package/list-item/list-item.stories.js +32 -0
  247. package/package.json +18 -36
  248. package/pagination/pagination.d.ts +7 -0
  249. package/pagination/pagination.js +49 -0
  250. package/pagination/pagination.stories.d.ts +7 -0
  251. package/pagination/pagination.stories.js +47 -0
  252. package/radio/index.d.ts +1 -0
  253. package/radio/index.js +17 -0
  254. package/radio/radio.d.ts +6 -0
  255. package/radio/radio.js +15 -0
  256. package/radio/radio.stories.d.ts +7 -0
  257. package/radio/radio.stories.js +42 -0
  258. package/radio-group/index.d.ts +1 -0
  259. package/radio-group/index.js +17 -0
  260. package/radio-group/radio-group.d.ts +22 -0
  261. package/radio-group/radio-group.js +48 -0
  262. package/radio-group/radio-group.stories.d.ts +7 -0
  263. package/radio-group/radio-group.stories.js +57 -0
  264. package/radio-group/theme.d.ts +5 -0
  265. package/radio-group/theme.js +2 -0
  266. package/raster-image/index.d.ts +1 -0
  267. package/raster-image/index.js +17 -0
  268. package/raster-image/raster-image.d.ts +30 -0
  269. package/raster-image/raster-image.js +35 -0
  270. package/raster-image/raster-image.stories.d.ts +30 -0
  271. package/raster-image/raster-image.stories.js +17 -0
  272. package/scripts/generate-tw-tokens.js +94 -0
  273. package/select/index.d.ts +1 -0
  274. package/select/index.js +17 -0
  275. package/select/select.d.ts +24 -0
  276. package/select/select.js +58 -0
  277. package/select/select.stories.d.ts +9 -0
  278. package/select/select.stories.js +72 -0
  279. package/tabs/index.d.ts +1 -0
  280. package/tabs/index.js +17 -0
  281. package/tabs/tabs.d.ts +19 -0
  282. package/tabs/tabs.js +68 -0
  283. package/tabs/tabs.stories.d.ts +11 -0
  284. package/tabs/tabs.stories.js +48 -0
  285. package/text-input/index.d.ts +1 -0
  286. package/text-input/index.js +17 -0
  287. package/text-input/test-input.spec.d.ts +1 -0
  288. package/text-input/test-input.spec.js +12 -0
  289. package/text-input/text-input.d.ts +31 -0
  290. package/text-input/text-input.js +57 -0
  291. package/text-input/text-input.stories.d.ts +8 -0
  292. package/text-input/text-input.stories.js +56 -0
  293. package/text-link/index.d.ts +1 -0
  294. package/text-link/index.js +17 -0
  295. package/text-link/text-link.d.ts +5 -0
  296. package/text-link/text-link.js +19 -0
  297. package/text-link/text-link.stories.d.ts +7 -0
  298. package/text-link/text-link.stories.js +24 -0
  299. package/textarea/index.d.ts +1 -0
  300. package/textarea/index.js +17 -0
  301. package/textarea/textarea.d.ts +18 -0
  302. package/textarea/textarea.js +81 -0
  303. package/textarea/textarea.stories.d.ts +7 -0
  304. package/textarea/textarea.stories.js +44 -0
  305. package/time-picker-input/index.d.ts +2 -0
  306. package/time-picker-input/index.js +18 -0
  307. package/time-picker-input/time-picker-hour.d.ts +5 -0
  308. package/time-picker-input/time-picker-hour.js +47 -0
  309. package/time-picker-input/time-picker-hours.d.ts +2 -0
  310. package/time-picker-input/time-picker-hours.js +14 -0
  311. package/time-picker-input/time-picker-input.d.ts +22 -0
  312. package/time-picker-input/time-picker-input.js +89 -0
  313. package/time-picker-input/time-picker-input.stories.d.ts +7 -0
  314. package/time-picker-input/time-picker-input.stories.js +45 -0
  315. package/time-picker-input/time-picker-minute.d.ts +5 -0
  316. package/time-picker-input/time-picker-minute.js +47 -0
  317. package/time-picker-input/time-picker-minutes.d.ts +2 -0
  318. package/time-picker-input/time-picker-minutes.js +14 -0
  319. package/time-picker-input/time-picker.d.ts +8 -0
  320. package/time-picker-input/time-picker.js +69 -0
  321. package/toggle/index.d.ts +1 -0
  322. package/toggle/index.js +17 -0
  323. package/toggle/theme.d.ts +4 -0
  324. package/toggle/theme.js +2 -0
  325. package/toggle/toggle.d.ts +12 -0
  326. package/toggle/toggle.js +19 -0
  327. package/toggle/toggle.stories.d.ts +7 -0
  328. package/toggle/toggle.stories.js +52 -0
  329. package/tw-tokens/tw-box-shadow.d.ts +11 -0
  330. package/tw-tokens/tw-box-shadow.js +14 -0
  331. package/tw-tokens/tw-colors.d.ts +328 -0
  332. package/tw-tokens/tw-colors.js +331 -0
  333. package/tw-tokens/tw-containers.d.ts +8 -0
  334. package/tw-tokens/tw-containers.js +11 -0
  335. package/tw-tokens/tw-font-size.d.ts +42 -0
  336. package/tw-tokens/tw-font-size.js +19 -0
  337. package/tw-tokens/tw-font-weight.d.ts +12 -0
  338. package/tw-tokens/tw-font-weight.js +15 -0
  339. package/tw-tokens/tw-line-height.d.ts +17 -0
  340. package/tw-tokens/tw-line-height.js +20 -0
  341. package/tw-tokens/tw-screens.d.ts +8 -0
  342. package/tw-tokens/tw-screens.js +11 -0
  343. package/tw-tokens/tw-spacing.d.ts +39 -0
  344. package/tw-tokens/tw-spacing.js +42 -0
  345. package/tw-tokens/tw-z-index.d.ts +19 -0
  346. package/tw-tokens/tw-z-index.js +22 -0
  347. package/types/form-control-props.d.ts +24 -0
  348. package/types/form-control-props.js +2 -0
  349. package/types/index.d.ts +1 -0
  350. package/types/index.js +17 -0
  351. package/utils/action.d.ts +2 -0
  352. package/utils/action.js +11 -0
  353. package/utils/component-structure-analyzer.d.ts +6 -0
  354. package/utils/component-structure-analyzer.js +10 -0
  355. package/utils/icons-config.js +73 -0
  356. package/utils/image.d.ts +19 -0
  357. package/utils/image.js +104 -0
  358. package/utils/is-light-background.d.ts +2 -0
  359. package/utils/is-light-background.js +11 -0
  360. package/utils/storybook-config.d.ts +26 -0
  361. package/{storybook → utils}/storybook-config.js +12 -6
  362. package/utils/tailwind-config.js +163 -0
  363. package/stories/button.stories.tsx +0 -87
  364. package/storybook/index.d.ts +0 -1
  365. package/storybook/storybook-config.d.ts +0 -21
  366. package/tailwindui/button.css +0 -51
  367. package/types.d.ts +0 -3
  368. package/types.js +0 -3
@@ -0,0 +1,47 @@
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.TimePickerMinute = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const time_picker_context_1 = require("@uxf/datepicker/contexts/time-picker-context");
29
+ const use_minute_1 = require("@uxf/datepicker/hooks/use-minute");
30
+ const cx_1 = require("@uxf/core/utils/cx");
31
+ const classes_1 = require("@uxf/core/constants/classes");
32
+ const button_1 = require("../button");
33
+ const TimePickerMinute = (props) => {
34
+ const minuteRef = (0, react_1.useRef)(null);
35
+ const { focusedMinute, isMinuteFocused, isMinuteSelected, onMinuteSelect, onMinuteFocus } = (0, react_1.useContext)(time_picker_context_1.TimePickerContext);
36
+ const { isSelected, onClick, onKeyDown, tabIndex } = (0, use_minute_1.useMinute)({
37
+ minute: props.minute,
38
+ minuteRef,
39
+ focusedMinute,
40
+ isMinuteFocused,
41
+ isMinuteSelected,
42
+ onMinuteFocus,
43
+ onMinuteSelect,
44
+ });
45
+ return (react_1.default.createElement(button_1.Button, { variant: "text", tabIndex: tabIndex, onKeyDown: onKeyDown, onClick: onClick, className: (0, cx_1.cx)("uxf-time-picker__minute", isSelected && classes_1.CLASSES.IS_SELECTED), ref: minuteRef }, props.label));
46
+ };
47
+ exports.TimePickerMinute = TimePickerMinute;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const TimePickerMinutes: FC;
@@ -0,0 +1,14 @@
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.TimePickerMinutes = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const time_picker_minute_1 = require("./time-picker-minute");
9
+ const use_minutes_1 = require("@uxf/datepicker/hooks/use-minutes");
10
+ const TimePickerMinutes = () => {
11
+ const { minutes } = (0, use_minutes_1.useMinutes)({});
12
+ return (react_1.default.createElement("div", { className: "uxf-time-picker__minutes" }, minutes.map((minute) => (react_1.default.createElement(time_picker_minute_1.TimePickerMinute, { minute: minute.value, label: minute.label, key: minute.value })))));
13
+ };
14
+ exports.TimePickerMinutes = TimePickerMinutes;
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { OnTimeChangeType, TimeType } from "@uxf/datepicker/hooks/use-time-picker";
3
+ export interface TimePickerProps {
4
+ closePopoverHandler: () => void;
5
+ onChange: (data: OnTimeChangeType) => void;
6
+ selectedTime: TimeType | null;
7
+ }
8
+ export declare const TimePicker: FC<TimePickerProps>;
@@ -0,0 +1,69 @@
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.TimePicker = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const time_picker_hours_1 = require("./time-picker-hours");
29
+ const time_picker_minutes_1 = require("./time-picker-minutes");
30
+ const use_time_picker_1 = require("@uxf/datepicker/hooks/use-time-picker");
31
+ const icon_1 = require("../icon");
32
+ const button_1 = require("../button");
33
+ const time_picker_context_1 = require("@uxf/datepicker/contexts/time-picker-context");
34
+ const TimePicker = (props) => {
35
+ const [viewMode, setViewMode] = (0, react_1.useState)("global");
36
+ const { goToNextMinute, goToPrevHour, goToPrevMinute, goToNextHour, ...contextProps } = (0, use_time_picker_1.useTimePicker)({
37
+ selectedTime: props.selectedTime,
38
+ onTimeChange: props.onChange,
39
+ onSelectCallback: () => setViewMode("global"),
40
+ });
41
+ const timePickerComponents = (0, react_1.useMemo)(() => {
42
+ var _a, _b;
43
+ return ({
44
+ global: (react_1.default.createElement("div", { className: "uxf-time-picker__global" },
45
+ react_1.default.createElement("div", { className: "uxf-time-picker__global__column" },
46
+ react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: goToNextHour, title: "Nadch\u00E1zej\u00EDc\u00ED", variant: "text" },
47
+ react_1.default.createElement(icon_1.Icon, { name: "chevronUp", size: 16 })),
48
+ react_1.default.createElement(button_1.Button, { variant: "text", onClick: () => setViewMode("hour") }, (_b = (_a = props.selectedTime) === null || _a === void 0 ? void 0 : _a.hour) !== null && _b !== void 0 ? _b : "0"),
49
+ react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: goToPrevHour, title: "P\u0159edchoz\u00ED", variant: "text" },
50
+ react_1.default.createElement(icon_1.Icon, { name: "chevronDown", size: 16 }))),
51
+ react_1.default.createElement("div", null, ":"),
52
+ react_1.default.createElement("div", { className: "uxf-time-picker__global__column" },
53
+ react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: goToNextMinute, title: "Nadch\u00E1zej\u00EDc\u00ED", variant: "text" },
54
+ react_1.default.createElement(icon_1.Icon, { name: "chevronUp", size: 16 })),
55
+ react_1.default.createElement(button_1.Button, { variant: "text", onClick: () => setViewMode("minute") }, props.selectedTime
56
+ ? props.selectedTime.minute < 10
57
+ ? "0" + props.selectedTime.minute
58
+ : props.selectedTime.minute
59
+ : "00"),
60
+ react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: goToPrevMinute, title: "P\u0159edchoz\u00ED", variant: "text" },
61
+ react_1.default.createElement(icon_1.Icon, { name: "chevronDown", size: 16 }))))),
62
+ hour: react_1.default.createElement(time_picker_hours_1.TimePickerHours, null),
63
+ minute: react_1.default.createElement(time_picker_minutes_1.TimePickerMinutes, null),
64
+ });
65
+ }, [goToPrevHour, props.selectedTime, goToNextHour, goToPrevMinute, goToNextMinute]);
66
+ return (react_1.default.createElement(time_picker_context_1.TimePickerContext.Provider, { value: contextProps },
67
+ react_1.default.createElement("div", null, timePickerComponents[viewMode])));
68
+ };
69
+ exports.TimePicker = TimePicker;
@@ -0,0 +1 @@
1
+ export * from "./toggle";
@@ -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("./toggle"), exports);
@@ -0,0 +1,4 @@
1
+ export interface ToggleVariants {
2
+ default: true;
3
+ reversed: true;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import React, { CSSProperties } from "react";
2
+ import { FormControlProps } from "../types";
3
+ import { ToggleVariants } from "./theme";
4
+ export declare type ToggleVariant = keyof ToggleVariants;
5
+ export interface ToggleProps extends FormControlProps<boolean> {
6
+ className?: string;
7
+ hiddenLabel?: boolean;
8
+ label: string;
9
+ style?: Partial<CSSProperties>;
10
+ variant?: ToggleVariant;
11
+ }
12
+ export declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,19 @@
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.Toggle = void 0;
7
+ const classes_1 = require("@uxf/core/constants/classes");
8
+ const cx_1 = require("@uxf/core/utils/cx");
9
+ const forwardRef_1 = require("@uxf/core/utils/forwardRef");
10
+ const react_1 = __importDefault(require("react"));
11
+ const react_2 = require("@headlessui/react");
12
+ exports.Toggle = (0, forwardRef_1.forwardRef)("Toggle", (props, ref) => {
13
+ var _a, _b;
14
+ return (react_1.default.createElement(react_2.Switch.Group, null,
15
+ react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-toggle__wrapper", `uxf-toggle__wrapper--${(_a = props.variant) !== null && _a !== void 0 ? _a : "default"}`, props.hiddenLabel && "uxf-toggle__wrapper--hiddenLabel", props.className) },
16
+ react_1.default.createElement(react_2.Switch, { checked: props.value, className: (0, cx_1.cx)(props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.value && classes_1.CLASSES.IS_SELECTED, "uxf-toggle", `uxf-toggle--${(_b = props.variant) !== null && _b !== void 0 ? _b : "default"}`), disabled: props.isDisabled, name: props.name, onChange: props.onChange, style: props.style, ref: ref },
17
+ react_1.default.createElement("span", { className: "uxf-toggle__inner" })),
18
+ react_1.default.createElement(react_2.Switch.Label, { hidden: props.hiddenLabel, className: "uxf-toggle__label" }, props.label))));
19
+ });
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.ForwardRefExoticComponent<import("./toggle").ToggleProps & React.RefAttributes<HTMLButtonElement>>;
5
+ };
6
+ export default _default;
7
+ export declare function Default(): JSX.Element;
@@ -0,0 +1,52 @@
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.Default = void 0;
27
+ const index_1 = require("./index");
28
+ const react_1 = __importStar(require("react"));
29
+ exports.default = {
30
+ title: "UI/Toggle",
31
+ component: index_1.Toggle,
32
+ };
33
+ function Default() {
34
+ const [checked, setChecked] = (0, react_1.useState)(true);
35
+ const storyToggles = (react_1.default.createElement(react_1.default.Fragment, null,
36
+ react_1.default.createElement(index_1.Toggle, { label: "Opravdu?", onChange: () => {
37
+ setChecked((prev) => !prev);
38
+ }, value: checked }),
39
+ react_1.default.createElement(index_1.Toggle, { label: "Opravdu?", onChange: () => {
40
+ setChecked((prev) => !prev);
41
+ }, value: checked, isDisabled: true }),
42
+ react_1.default.createElement(index_1.Toggle, { label: "Opravdu?", onChange: () => {
43
+ setChecked((prev) => !prev);
44
+ }, value: checked, hiddenLabel: true }),
45
+ react_1.default.createElement(index_1.Toggle, { label: "Opravdu? (reversed)", onChange: () => {
46
+ setChecked((prev) => !prev);
47
+ }, value: checked, variant: "reversed" })));
48
+ return (react_1.default.createElement("div", { className: "flex" },
49
+ react_1.default.createElement("div", { className: "light w-1/2 gap-4 p-20" }, storyToggles),
50
+ react_1.default.createElement("div", { className: "dark w-1/2 gap-4 bg-gray-900 p-20 text-white" }, storyToggles)));
51
+ }
52
+ exports.Default = Default;
@@ -0,0 +1,11 @@
1
+ export declare const twBoxShadow: {
2
+ sm: string;
3
+ DEFAULT: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ "2xl": string;
8
+ inner: string;
9
+ none: string;
10
+ };
11
+ export declare type TwBoxShadow = typeof twBoxShadow;
@@ -0,0 +1,14 @@
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.twBoxShadow = void 0;
5
+ exports.twBoxShadow = {
6
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
7
+ DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
8
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
9
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
10
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
11
+ "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
12
+ inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
13
+ none: "none",
14
+ };
@@ -0,0 +1,328 @@
1
+ export declare const twColors: {
2
+ inherit: string;
3
+ current: string;
4
+ transparent: string;
5
+ black: string;
6
+ white: string;
7
+ slate: {
8
+ 50: string;
9
+ 100: string;
10
+ 200: string;
11
+ 300: string;
12
+ 400: string;
13
+ 500: string;
14
+ 600: string;
15
+ 700: string;
16
+ 800: string;
17
+ 900: string;
18
+ };
19
+ gray: {
20
+ 50: string;
21
+ 100: string;
22
+ 200: string;
23
+ 300: string;
24
+ 400: string;
25
+ 500: string;
26
+ 600: string;
27
+ 700: string;
28
+ 800: string;
29
+ 900: string;
30
+ };
31
+ zinc: {
32
+ 50: string;
33
+ 100: string;
34
+ 200: string;
35
+ 300: string;
36
+ 400: string;
37
+ 500: string;
38
+ 600: string;
39
+ 700: string;
40
+ 800: string;
41
+ 900: string;
42
+ };
43
+ neutral: {
44
+ 50: string;
45
+ 100: string;
46
+ 200: string;
47
+ 300: string;
48
+ 400: string;
49
+ 500: string;
50
+ 600: string;
51
+ 700: string;
52
+ 800: string;
53
+ 900: string;
54
+ };
55
+ stone: {
56
+ 50: string;
57
+ 100: string;
58
+ 200: string;
59
+ 300: string;
60
+ 400: string;
61
+ 500: string;
62
+ 600: string;
63
+ 700: string;
64
+ 800: string;
65
+ 900: string;
66
+ };
67
+ red: {
68
+ 50: string;
69
+ 100: string;
70
+ 200: string;
71
+ 300: string;
72
+ 400: string;
73
+ 500: string;
74
+ 600: string;
75
+ 700: string;
76
+ 800: string;
77
+ 900: string;
78
+ };
79
+ orange: {
80
+ 50: string;
81
+ 100: string;
82
+ 200: string;
83
+ 300: string;
84
+ 400: string;
85
+ 500: string;
86
+ 600: string;
87
+ 700: string;
88
+ 800: string;
89
+ 900: string;
90
+ };
91
+ amber: {
92
+ 50: string;
93
+ 100: string;
94
+ 200: string;
95
+ 300: string;
96
+ 400: string;
97
+ 500: string;
98
+ 600: string;
99
+ 700: string;
100
+ 800: string;
101
+ 900: string;
102
+ };
103
+ yellow: {
104
+ 50: string;
105
+ 100: string;
106
+ 200: string;
107
+ 300: string;
108
+ 400: string;
109
+ 500: string;
110
+ 600: string;
111
+ 700: string;
112
+ 800: string;
113
+ 900: string;
114
+ };
115
+ lime: {
116
+ 50: string;
117
+ 100: string;
118
+ 200: string;
119
+ 300: string;
120
+ 400: string;
121
+ 500: string;
122
+ 600: string;
123
+ 700: string;
124
+ 800: string;
125
+ 900: string;
126
+ };
127
+ green: {
128
+ 50: string;
129
+ 100: string;
130
+ 200: string;
131
+ 300: string;
132
+ 400: string;
133
+ 500: string;
134
+ 600: string;
135
+ 700: string;
136
+ 800: string;
137
+ 900: string;
138
+ };
139
+ emerald: {
140
+ 50: string;
141
+ 100: string;
142
+ 200: string;
143
+ 300: string;
144
+ 400: string;
145
+ 500: string;
146
+ 600: string;
147
+ 700: string;
148
+ 800: string;
149
+ 900: string;
150
+ };
151
+ teal: {
152
+ 50: string;
153
+ 100: string;
154
+ 200: string;
155
+ 300: string;
156
+ 400: string;
157
+ 500: string;
158
+ 600: string;
159
+ 700: string;
160
+ 800: string;
161
+ 900: string;
162
+ };
163
+ cyan: {
164
+ 50: string;
165
+ 100: string;
166
+ 200: string;
167
+ 300: string;
168
+ 400: string;
169
+ 500: string;
170
+ 600: string;
171
+ 700: string;
172
+ 800: string;
173
+ 900: string;
174
+ };
175
+ sky: {
176
+ 50: string;
177
+ 100: string;
178
+ 200: string;
179
+ 300: string;
180
+ 400: string;
181
+ 500: string;
182
+ 600: string;
183
+ 700: string;
184
+ 800: string;
185
+ 900: string;
186
+ };
187
+ blue: {
188
+ 50: string;
189
+ 100: string;
190
+ 200: string;
191
+ 300: string;
192
+ 400: string;
193
+ 500: string;
194
+ 600: string;
195
+ 700: string;
196
+ 800: string;
197
+ 900: string;
198
+ };
199
+ indigo: {
200
+ 50: string;
201
+ 100: string;
202
+ 200: string;
203
+ 300: string;
204
+ 400: string;
205
+ 500: string;
206
+ 600: string;
207
+ 700: string;
208
+ 800: string;
209
+ 900: string;
210
+ };
211
+ violet: {
212
+ 50: string;
213
+ 100: string;
214
+ 200: string;
215
+ 300: string;
216
+ 400: string;
217
+ 500: string;
218
+ 600: string;
219
+ 700: string;
220
+ 800: string;
221
+ 900: string;
222
+ };
223
+ purple: {
224
+ 50: string;
225
+ 100: string;
226
+ 200: string;
227
+ 300: string;
228
+ 400: string;
229
+ 500: string;
230
+ 600: string;
231
+ 700: string;
232
+ 800: string;
233
+ 900: string;
234
+ };
235
+ fuchsia: {
236
+ 50: string;
237
+ 100: string;
238
+ 200: string;
239
+ 300: string;
240
+ 400: string;
241
+ 500: string;
242
+ 600: string;
243
+ 700: string;
244
+ 800: string;
245
+ 900: string;
246
+ };
247
+ pink: {
248
+ 50: string;
249
+ 100: string;
250
+ 200: string;
251
+ 300: string;
252
+ 400: string;
253
+ 500: string;
254
+ 600: string;
255
+ 700: string;
256
+ 800: string;
257
+ 900: string;
258
+ };
259
+ rose: {
260
+ 50: string;
261
+ 100: string;
262
+ 200: string;
263
+ 300: string;
264
+ 400: string;
265
+ 500: string;
266
+ 600: string;
267
+ 700: string;
268
+ 800: string;
269
+ 900: string;
270
+ };
271
+ lightHigh: string;
272
+ lightMedium: string;
273
+ lightLow: string;
274
+ darkHigh: string;
275
+ darkMedium: string;
276
+ darkLow: string;
277
+ lightBorder: string;
278
+ darkBorder: string;
279
+ primary: {
280
+ 50: string;
281
+ 100: string;
282
+ 200: string;
283
+ 300: string;
284
+ 400: string;
285
+ 500: string;
286
+ 600: string;
287
+ 700: string;
288
+ 800: string;
289
+ 900: string;
290
+ };
291
+ success: {
292
+ 50: string;
293
+ 100: string;
294
+ 200: string;
295
+ 300: string;
296
+ 400: string;
297
+ 500: string;
298
+ 600: string;
299
+ 700: string;
300
+ 800: string;
301
+ 900: string;
302
+ };
303
+ warning: {
304
+ 50: string;
305
+ 100: string;
306
+ 200: string;
307
+ 300: string;
308
+ 400: string;
309
+ 500: string;
310
+ 600: string;
311
+ 700: string;
312
+ 800: string;
313
+ 900: string;
314
+ };
315
+ error: {
316
+ 50: string;
317
+ 100: string;
318
+ 200: string;
319
+ 300: string;
320
+ 400: string;
321
+ 500: string;
322
+ 600: string;
323
+ 700: string;
324
+ 800: string;
325
+ 900: string;
326
+ };
327
+ };
328
+ export declare type TwColors = typeof twColors;