@uxf/ui 10.0.0-beta.9 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/_file-input-base/file-input-base.js +15 -1
  2. package/_file-input-base/index.d.ts +1 -1
  3. package/_input-with-popover/input-with-popover.d.ts +4 -3
  4. package/_input-with-popover/input-with-popover.js +26 -26
  5. package/_select-base/_select-base.d.ts +3 -2
  6. package/_select-base/_select-base.js +6 -5
  7. package/_select-base/index.d.ts +1 -1
  8. package/alert-bubble/alert-bubble.d.ts +8 -0
  9. package/alert-bubble/alert-bubble.js +22 -0
  10. package/alert-bubble/alert-bubble.spec.d.ts +1 -0
  11. package/alert-bubble/alert-bubble.spec.js +9 -0
  12. package/alert-bubble/alert-bubble.stories.d.ts +7 -0
  13. package/alert-bubble/alert-bubble.stories.js +50 -0
  14. package/alert-bubble/index.d.ts +3 -0
  15. package/alert-bubble/index.js +5 -0
  16. package/alert-bubble/theme.d.ts +16 -0
  17. package/alert-bubble/theme.js +2 -0
  18. package/avatar/README.md +8 -0
  19. package/avatar/avatar.stories.js +1 -1
  20. package/avatar/index.d.ts +1 -1
  21. package/avatar-file-input/README.md +1 -0
  22. package/avatar-file-input/avatar-file-input.d.ts +3 -0
  23. package/avatar-file-input/avatar-file-input.js +12 -6
  24. package/avatar-file-input/avatar-file-input.stories.js +5 -5
  25. package/avatar-file-input/index.d.ts +1 -1
  26. package/avatar-file-input/theme.d.ts +5 -0
  27. package/avatar-file-input/theme.js +2 -0
  28. package/badge/README.md +1 -0
  29. package/badge/badge.d.ts +1 -1
  30. package/badge/badge.stories.js +1 -1
  31. package/badge/index.d.ts +1 -1
  32. package/button/README.md +68 -0
  33. package/button/button.stories.js +0 -1
  34. package/button/index.d.ts +1 -1
  35. package/button/theme.d.ts +1 -0
  36. package/button-group/README.md +1 -0
  37. package/button-group/button-group.js +1 -1
  38. package/button-group/button-group.stories.js +1 -1
  39. package/button-group/index.d.ts +1 -1
  40. package/button-list/README.md +1 -0
  41. package/button-list/button-list.d.ts +1 -1
  42. package/button-list/button-list.js +22 -22
  43. package/button-list/index.d.ts +1 -1
  44. package/calendar/README.md +1 -0
  45. package/calendar/calendar-day-cell.d.ts +4 -1
  46. package/calendar/calendar-day-cell.js +18 -18
  47. package/{date-picker/date-picker-navigation.d.ts → calendar/calendar-navigation.d.ts} +2 -3
  48. package/{date-picker/date-picker-navigation.js → calendar/calendar-navigation.js} +6 -6
  49. package/calendar/calendar-provider.js +2 -2
  50. package/calendar/calendar.d.ts +5 -0
  51. package/calendar/calendar.js +6 -9
  52. package/calendar/calendar.stories.js +1 -1
  53. package/calendar/index.d.ts +4 -1
  54. package/calendar/index.js +5 -15
  55. package/checkbox/README.md +1 -0
  56. package/checkbox/checkbox.stories.js +1 -1
  57. package/checkbox/index.d.ts +1 -1
  58. package/checkbox-button/README.md +1 -0
  59. package/checkbox-button/checkbox-button.js +2 -2
  60. package/checkbox-button/checkbox-button.stories.js +1 -1
  61. package/checkbox-button/index.d.ts +1 -1
  62. package/checkbox-input/README.md +1 -0
  63. package/checkbox-input/checkbox-input.d.ts +1 -1
  64. package/checkbox-input/checkbox-input.stories.js +1 -1
  65. package/checkbox-input/index.d.ts +1 -1
  66. package/chip/README.md +1 -0
  67. package/chip/chip.d.ts +1 -1
  68. package/chip/chip.js +5 -3
  69. package/chip/chip.stories.js +37 -31
  70. package/chip/index.d.ts +2 -2
  71. package/color-radio/README.md +8 -0
  72. package/color-radio/color-radio.js +1 -1
  73. package/color-radio/index.d.ts +1 -1
  74. package/color-radio-group/README.md +9 -0
  75. package/color-radio-group/color-radio-group.js +3 -3
  76. package/color-radio-group/color-radio-group.stories.js +1 -1
  77. package/color-radio-group/index.d.ts +1 -1
  78. package/combobox/README.md +12 -0
  79. package/combobox/combobox.d.ts +1 -1
  80. package/combobox/combobox.js +1 -1
  81. package/combobox/combobox.stories.d.ts +2 -1
  82. package/combobox/combobox.stories.js +7 -3
  83. package/combobox/index.d.ts +1 -1
  84. package/config/icons-config.d.ts +1 -1
  85. package/config/icons-config.js +1 -1
  86. package/config/icons.d.ts +13 -3
  87. package/config/icons.js +3 -1
  88. package/content/types.d.ts +1 -1
  89. package/context/provider.js +1 -1
  90. package/create-component-preview-page/create-component-preview-page.d.ts +8 -0
  91. package/create-component-preview-page/create-component-preview-page.js +40 -0
  92. package/create-component-preview-page/index.d.ts +2 -0
  93. package/create-component-preview-page/index.js +18 -0
  94. package/create-component-preview-page/ui-components.d.ts +237 -0
  95. package/create-component-preview-page/ui-components.js +263 -0
  96. package/create-component-preview-page/ui-readmes.d.ts +2 -0
  97. package/create-component-preview-page/ui-readmes.js +102 -0
  98. package/css/alert-bubble.css +100 -0
  99. package/css/avatar-file-input.css +54 -20
  100. package/css/avatar.css +4 -4
  101. package/css/badge.css +5 -5
  102. package/css/button-group.css +1 -1
  103. package/css/button-list.css +2 -2
  104. package/css/button.css +78 -32
  105. package/css/calendar.css +115 -51
  106. package/css/checkbox-button.css +10 -10
  107. package/css/checkbox.css +9 -9
  108. package/css/chip.css +5 -3
  109. package/css/color-radio-group.css +1 -1
  110. package/css/color-radio.css +3 -3
  111. package/css/component-structure-analyzer.css +12 -12
  112. package/css/date-picker.css +10 -3
  113. package/css/date-range-picker.css +21 -0
  114. package/css/datetime-picker.css +2 -2
  115. package/css/dialog.css +55 -0
  116. package/css/dropdown.css +11 -3
  117. package/css/dropzone.css +6 -6
  118. package/css/error-message.css +1 -1
  119. package/css/file-input.css +2 -2
  120. package/css/flash-messages.css +133 -9
  121. package/css/icon.css +1 -1
  122. package/css/image-gallery.css +8 -8
  123. package/css/input-with-popover.css +1 -1
  124. package/css/input.css +10 -10
  125. package/css/layout.css +4 -4
  126. package/css/list-item.css +2 -2
  127. package/css/message.css +92 -0
  128. package/css/modal.css +10 -54
  129. package/css/multi-combobox.css +12 -12
  130. package/css/pagination.css +14 -14
  131. package/css/paper.css +1 -1
  132. package/css/radio-group.css +3 -3
  133. package/css/radio.css +7 -7
  134. package/css/raster-image.css +1 -1
  135. package/css/select-base.css +1 -1
  136. package/css/tabs.css +16 -16
  137. package/css/text-link.css +4 -4
  138. package/css/textarea.css +68 -76
  139. package/css/time-picker.css +12 -16
  140. package/css/toggle.css +3 -3
  141. package/css/tooltip.css +2 -2
  142. package/date-picker/README.md +9 -0
  143. package/date-picker/date-picker-content.d.ts +5 -2
  144. package/date-picker/date-picker-content.js +4 -3
  145. package/date-picker/date-picker-decade.js +10 -10
  146. package/date-picker/date-picker-month.js +6 -6
  147. package/date-picker/date-picker-year.js +2 -2
  148. package/date-picker/date-picker.d.ts +4 -1
  149. package/date-picker/date-picker.js +4 -2
  150. package/date-picker/date-picker.stories.js +2 -1
  151. package/date-picker/index.d.ts +1 -1
  152. package/date-picker-input/README.md +11 -0
  153. package/date-picker-input/date-picker-input.d.ts +2 -0
  154. package/date-picker-input/date-picker-input.js +5 -3
  155. package/date-picker-input/date-picker-input.stories.js +1 -1
  156. package/date-picker-input/index.d.ts +1 -1
  157. package/date-picker-input/index.js +3 -3
  158. package/date-range-picker/README.md +1 -0
  159. package/date-range-picker/date-range-picker-content.d.ts +5 -0
  160. package/date-range-picker/date-range-picker-content.js +56 -0
  161. package/date-range-picker/date-range-picker-decade.d.ts +6 -0
  162. package/date-range-picker/date-range-picker-decade.js +72 -0
  163. package/date-range-picker/date-range-picker-month.d.ts +8 -0
  164. package/date-range-picker/date-range-picker-month.js +69 -0
  165. package/date-range-picker/date-range-picker-year.d.ts +7 -0
  166. package/date-range-picker/date-range-picker-year.js +80 -0
  167. package/date-range-picker/date-range-picker.d.ts +11 -0
  168. package/date-range-picker/date-range-picker.js +51 -0
  169. package/date-range-picker/date-range-picker.spec.d.ts +1 -0
  170. package/date-range-picker/date-range-picker.spec.js +9 -0
  171. package/date-range-picker/date-range-picker.stories.d.ts +7 -0
  172. package/date-range-picker/date-range-picker.stories.js +43 -0
  173. package/date-range-picker/index.d.ts +3 -0
  174. package/date-range-picker/index.js +5 -0
  175. package/date-range-picker/types.d.ts +5 -0
  176. package/date-range-picker/types.js +2 -0
  177. package/date-range-picker-input/README.md +1 -0
  178. package/date-range-picker-input/date-range-picker-input.d.ts +17 -0
  179. package/date-range-picker-input/date-range-picker-input.js +62 -0
  180. package/date-range-picker-input/date-range-picker-input.spec.d.ts +1 -0
  181. package/date-range-picker-input/date-range-picker-input.spec.js +9 -0
  182. package/date-range-picker-input/date-range-picker-input.stories.d.ts +10 -0
  183. package/date-range-picker-input/date-range-picker-input.stories.js +53 -0
  184. package/date-range-picker-input/index.d.ts +2 -0
  185. package/date-range-picker-input/index.js +5 -0
  186. package/datetime-picker/README.md +13 -0
  187. package/datetime-picker/datetime-picker.d.ts +3 -1
  188. package/datetime-picker/datetime-picker.js +5 -5
  189. package/datetime-picker/index.d.ts +1 -1
  190. package/datetime-picker/index.js +2 -2
  191. package/datetime-picker-input/README.md +1 -0
  192. package/datetime-picker-input/datetime-picker-input.d.ts +2 -0
  193. package/datetime-picker-input/datetime-picker-input.js +5 -3
  194. package/datetime-picker-input/datetime-picker-input.stories.js +1 -1
  195. package/datetime-picker-input/index.d.ts +1 -1
  196. package/datetime-picker-input/index.js +2 -2
  197. package/dialog/dialog.d.ts +11 -0
  198. package/{modal/modal-dialog.js → dialog/dialog.js} +9 -10
  199. package/dialog/dialog.spec.d.ts +1 -0
  200. package/dialog/dialog.spec.js +9 -0
  201. package/dialog/dialog.stories.d.ts +7 -0
  202. package/dialog/dialog.stories.js +47 -0
  203. package/dialog/index.d.ts +2 -0
  204. package/dialog/index.js +5 -0
  205. package/dialog/theme.d.ts +4 -0
  206. package/dialog/theme.js +2 -0
  207. package/dropdown/README.md +1 -0
  208. package/dropdown/dropdown.stories.js +2 -2
  209. package/dropdown/index.d.ts +1 -1
  210. package/dropzone/README.md +8 -0
  211. package/dropzone/dropzone-input.js +10 -6
  212. package/dropzone/dropzone-list.js +2 -16
  213. package/dropzone/dropzone.stories.js +7 -7
  214. package/error-message/README.md +7 -0
  215. package/error-message/error-message.stories.js +1 -1
  216. package/file-input/README.md +11 -0
  217. package/file-input/file-input.d.ts +3 -0
  218. package/file-input/file-input.js +10 -22
  219. package/file-input/file-input.stories.js +5 -5
  220. package/file-input/index.d.ts +1 -1
  221. package/flash-messages/README.md +23 -0
  222. package/flash-messages/flash-message.d.ts +1 -1
  223. package/flash-messages/flash-message.js +1 -1
  224. package/flash-messages/flash-messages.js +52 -18
  225. package/flash-messages/flash-messages.stories.js +12 -0
  226. package/flash-messages/index.d.ts +2 -2
  227. package/flash-messages/index.js +4 -4
  228. package/form-component/README.md +7 -0
  229. package/form-component/index.d.ts +1 -1
  230. package/hooks/use-dropdown.d.ts +16 -8
  231. package/icon/README.md +11 -0
  232. package/icon/icon.stories.js +1 -1
  233. package/icon/index.d.ts +1 -1
  234. package/image-gallery/components/close-button.d.ts +2 -1
  235. package/image-gallery/components/close-button.js +2 -3
  236. package/image-gallery/components/gallery.d.ts +4 -1
  237. package/image-gallery/components/gallery.js +6 -5
  238. package/image-gallery/components/next-button.d.ts +7 -0
  239. package/image-gallery/components/next-button.js +14 -0
  240. package/image-gallery/components/prev-button.d.ts +7 -0
  241. package/image-gallery/components/prev-button.js +14 -0
  242. package/image-gallery/image-gallery.d.ts +4 -1
  243. package/image-gallery/image-gallery.js +2 -2
  244. package/image-gallery/image-gallery.stories.js +5 -1
  245. package/image-gallery/image.d.ts +1 -1
  246. package/image-gallery/image.js +1 -1
  247. package/image-gallery/use-image.js +1 -1
  248. package/input/README.md +8 -0
  249. package/input/input-element.d.ts +1 -0
  250. package/input/input-element.js +1 -1
  251. package/input/input.d.ts +2 -2
  252. package/input/input.js +3 -3
  253. package/input/input.stories.js +3 -3
  254. package/label/README.md +7 -0
  255. package/label/index.d.ts +1 -1
  256. package/label/label.stories.js +1 -1
  257. package/layout/index.d.ts +1 -1
  258. package/layout/layout.js +28 -28
  259. package/list-item/README.md +7 -0
  260. package/list-item/index.d.ts +1 -1
  261. package/list-item/list-item.stories.js +1 -1
  262. package/loader/README.md +7 -0
  263. package/loader/index.d.ts +1 -1
  264. package/message/README.md +1 -0
  265. package/message/index.d.ts +3 -0
  266. package/message/index.js +7 -0
  267. package/message/message-content.d.ts +17 -0
  268. package/message/message-content.js +41 -0
  269. package/message/message-service.d.ts +13 -0
  270. package/message/message-service.js +29 -0
  271. package/message/message.d.ts +20 -0
  272. package/message/message.js +47 -0
  273. package/message/message.spec.d.ts +1 -0
  274. package/message/message.spec.js +9 -0
  275. package/message/message.stories.d.ts +7 -0
  276. package/message/message.stories.js +82 -0
  277. package/message/theme.d.ts +12 -0
  278. package/message/theme.js +2 -0
  279. package/modal/README.md +24 -0
  280. package/modal/index.d.ts +3 -2
  281. package/modal/index.js +3 -3
  282. package/modal/modal.d.ts +6 -4
  283. package/modal/modal.js +9 -9
  284. package/modal/modal.stories.js +12 -0
  285. package/modal/theme.d.ts +7 -0
  286. package/multi-combobox/README.md +10 -0
  287. package/multi-combobox/_multi-combobox-base.js +28 -22
  288. package/multi-combobox/multi-combobox.js +1 -1
  289. package/multi-combobox/multi-combobox.stories.js +7 -4
  290. package/multi-combobox/types.d.ts +5 -1
  291. package/multi-select/README.md +11 -0
  292. package/multi-select/_multi-select-base.js +21 -21
  293. package/multi-select/index.d.ts +1 -1
  294. package/multi-select/multi-select.js +1 -1
  295. package/multi-select/multi-select.stories.js +6 -3
  296. package/multi-select/types.d.ts +1 -1
  297. package/package.json +17 -12
  298. package/pagination/README.md +31 -0
  299. package/pagination/index.d.ts +1 -1
  300. package/pagination/pagination.d.ts +1 -1
  301. package/pagination/pagination.js +2 -2
  302. package/pagination/pagination.stories.d.ts +0 -3
  303. package/pagination/pagination.stories.js +14 -30
  304. package/paper/README.md +7 -0
  305. package/paper/index.d.ts +1 -1
  306. package/paper/paper.stories.js +1 -1
  307. package/radio/README.md +7 -0
  308. package/radio/index.d.ts +1 -1
  309. package/radio/radio.stories.js +1 -1
  310. package/radio-group/README.md +8 -0
  311. package/radio-group/index.d.ts +2 -2
  312. package/radio-group/radio-group.d.ts +3 -3
  313. package/radio-group/radio-group.js +2 -2
  314. package/radio-group/radio-group.stories.js +5 -5
  315. package/raster-image/README.md +7 -0
  316. package/raster-image/index.d.ts +1 -1
  317. package/raster-image/raster-image.js +1 -1
  318. package/scripts/generate-tw-tokens.js +40 -32
  319. package/select/README.md +11 -0
  320. package/select/index.d.ts +1 -1
  321. package/select/select.d.ts +1 -4
  322. package/select/select.js +2 -2
  323. package/select/select.stories.d.ts +2 -1
  324. package/select/select.stories.js +9 -3
  325. package/tabs/README.md +7 -0
  326. package/tabs/index.d.ts +1 -1
  327. package/text-input/README.md +10 -0
  328. package/text-input/index.d.ts +1 -1
  329. package/text-input/text-input.d.ts +1 -0
  330. package/text-input/text-input.js +2 -2
  331. package/text-link/README.md +19 -0
  332. package/text-link/index.d.ts +1 -1
  333. package/text-link/text-link.d.ts +1 -1
  334. package/textarea/README.md +9 -0
  335. package/textarea/index.d.ts +1 -1
  336. package/textarea/textarea.js +5 -5
  337. package/textarea/textarea.stories.js +1 -1
  338. package/time-picker/README.md +8 -0
  339. package/time-picker/index.d.ts +1 -1
  340. package/time-picker/time-picker-hour.js +6 -6
  341. package/time-picker/time-picker-hours.js +2 -2
  342. package/time-picker/time-picker-input.stories.js +2 -1
  343. package/time-picker/time-picker-minute.js +6 -6
  344. package/time-picker/time-picker-minutes.js +2 -2
  345. package/time-picker/time-picker.d.ts +2 -1
  346. package/time-picker/time-picker.js +7 -6
  347. package/time-picker-input/README.md +9 -0
  348. package/time-picker-input/index.d.ts +1 -1
  349. package/time-picker-input/index.js +3 -3
  350. package/time-picker-input/time-picker-input.js +6 -4
  351. package/time-picker-input/time-picker-input.stories.js +1 -1
  352. package/toggle/README.md +7 -0
  353. package/toggle/index.d.ts +1 -1
  354. package/toggle/toggle.js +8 -8
  355. package/toggle/toggle.stories.js +1 -1
  356. package/tooltip/README.md +7 -0
  357. package/tooltip/index.d.ts +2 -2
  358. package/tooltip/tooltip.js +27 -25
  359. package/tooltip/tooltip.stories.js +1 -1
  360. package/tooltip/use-tooltip.d.ts +19 -11
  361. package/tooltip/use-tooltip.js +15 -15
  362. package/tw-tokens/tw-colors.d.ts +283 -282
  363. package/tw-tokens/tw-colors.js +283 -282
  364. package/tw-tokens/tw-line-height.d.ts +8 -8
  365. package/tw-tokens/tw-line-height.js +8 -8
  366. package/tw-tokens/tw-spacing.d.ts +34 -34
  367. package/tw-tokens/tw-spacing.js +34 -34
  368. package/tw-tokens/tw-z-index.d.ts +7 -7
  369. package/tw-tokens/tw-z-index.js +7 -7
  370. package/types/index.d.ts +1 -1
  371. package/types/index.js +1 -1
  372. package/typography/README.md +7 -0
  373. package/utils/action.d.ts +2 -1
  374. package/utils/action.js +2 -2
  375. package/utils/files/get-file-icon.d.ts +2 -0
  376. package/utils/files/get-file-icon.js +19 -0
  377. package/utils/icons-config.js +13 -3
  378. package/utils/mocks/{uploadFIle.mock.js → upload-file.mock.js} +1 -1
  379. package/utils/snap-test.js +1 -1
  380. package/utils/storybook-config.d.ts +12 -2
  381. package/utils/storybook-config.js +9 -1
  382. package/utils/tailwind-config.js +10 -1
  383. package/image-gallery/components/arrow-button.d.ts +0 -7
  384. package/image-gallery/components/arrow-button.js +0 -14
  385. package/modal/modal-dialog.d.ts +0 -11
  386. /package/utils/mocks/{uploadFIle.mock.d.ts → upload-file.mock.d.ts} +0 -0
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.Default = void 0;
27
- const index_1 = require("./index");
28
27
  const react_1 = __importStar(require("react"));
29
28
  const action_1 = require("../utils/action");
29
+ const index_1 = require("./index");
30
30
  exports.default = {
31
31
  title: "UI/ColorRadioGroup",
32
32
  component: index_1.ColorRadioGroup,
@@ -1,2 +1,2 @@
1
- export type { ColorRadioGroupOption, ColorRadioGroupOptionValue, ColorRadioGroupProps } from "./color-radio-group";
2
1
  export { ColorRadioGroup } from "./color-radio-group";
2
+ export type { ColorRadioGroupOption, ColorRadioGroupOptionValue, ColorRadioGroupProps } from "./color-radio-group";
@@ -0,0 +1,12 @@
1
+ # Combobox
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/label/label.css");
7
+ @import url("@uxf/ui/form-component/form-component.css");
8
+ @import url("@uxf/ui/dropdown/dropdown.css");
9
+ @import url("@uxf/ui/input/input.css");
10
+ @import url("@uxf/ui/_select-base/select-base.css");
11
+ @import url("@uxf/ui/input/input-basic.css");
12
+ ```
@@ -14,7 +14,7 @@ export interface ComboboxProps<ValueId = SelectBaseValueId, Option = ComboboxOpt
14
14
  loadOptions?: (query: string) => Promise<Option[]>;
15
15
  noQueryMessage?: string;
16
16
  notFoundMessage?: string;
17
- renderOption?: (option: Option) => ReactNode;
17
+ renderOption?: (option: Option, isSelected: boolean) => ReactNode;
18
18
  }
19
19
  export declare const Combobox: {
20
20
  <ValueId = SelectBaseValueId, Option = ComboboxOption<ValueId>, Value = Option>(props: ComboboxProps<ValueId, Option, Value>): React.JSX.Element;
@@ -42,7 +42,7 @@ const Combobox = (props) => {
42
42
  const onInputChange = (event) => setQuery(event.target.value);
43
43
  const displayValue = (item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : ""; };
44
44
  const selectedOption = (_d = props.value) !== null && _d !== void 0 ? _d : null;
45
- return (react_2.default.createElement(_select_base_1._SelectBase, { HUIComponent: react_1.Combobox, className: props.className, customInputElementDisplayName: react_1.Combobox.Input.displayName, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, emptyMessage: emptyMessage, forwardRef: props.forwardRef, helperText: props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: props.id, isClearable: props.isClearable, isDisabled: props.isDisabled, isFocused: props.isFocused, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, keyExtractor: props.keyExtractor, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, name: props.name, onBlur: props.onBlur, onChange: onChange, onFocus: props.onFocus, options: filteredData, placeholder: props.placeholder, renderOption: props.renderOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, value: selectedOption, variant: props.variant },
45
+ return (react_2.default.createElement(_select_base_1._SelectBase, { HUIComponent: react_1.Combobox, className: props.className, customInputElementDisplayName: react_1.Combobox.Input.displayName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, emptyMessage: emptyMessage, forwardRef: props.forwardRef, helperText: props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: props.id, isClearable: props.isClearable, isDisabled: props.isDisabled, isFocused: props.isFocused, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, keyExtractor: props.keyExtractor, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, name: props.name, onBlur: props.onBlur, onChange: onChange, onFocus: props.onFocus, options: filteredData, placeholder: props.placeholder, renderOption: props.renderOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, value: selectedOption, variant: props.variant },
46
46
  react_2.default.createElement(react_1.Combobox.Input, { autoComplete: "off", className: "uxf-input__element", displayValue: displayValue, onBlur: props.onBlur, onChange: onInputChange, placeholder: props.placeholder, type: "text" })));
47
47
  };
48
48
  exports.Combobox = Combobox;
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
+ import { ComboboxOption } from "./combobox";
2
3
  declare const _default: {
3
4
  title: string;
4
5
  component: {
5
- <ValueId = import("../_select-base").SelectBaseValueId, Option = import("./combobox").ComboboxOption<ValueId>, Value = Option>(props: import("./combobox").ComboboxProps<ValueId, Option, Value>): React.JSX.Element;
6
+ <ValueId = import("../_select-base").SelectBaseValueId, Option = ComboboxOption<ValueId>, Value = Option>(props: import("./combobox").ComboboxProps<ValueId, Option, Value>): React.JSX.Element;
6
7
  displayName: string;
7
8
  };
8
9
  };
@@ -28,16 +28,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ComponentStructure = exports.Async = exports.Default = void 0;
30
30
  const react_1 = __importStar(require("react"));
31
+ const action_1 = require("../utils/action");
31
32
  const component_structure_analyzer_1 = __importDefault(require("../utils/component-structure-analyzer"));
32
33
  const index_1 = require("./index");
33
- const action_1 = require("../utils/action");
34
34
  exports.default = {
35
35
  title: "UI/Combobox",
36
36
  component: index_1.Combobox,
37
37
  };
38
38
  const options = [
39
39
  { id: "one", label: "Option one" },
40
- { id: "two", label: "Option two" },
40
+ { id: "two", label: "Option two disabled", disabled: true },
41
41
  { id: "three", label: "Option three" },
42
42
  { id: "four", label: "Option with diacritics (ěščřžýáíé)" },
43
43
  ];
@@ -52,7 +52,11 @@ function Default() {
52
52
  react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
53
53
  react_1.default.createElement(index_1.Combobox, { helperText: "Start typing to see options...", id: "combobox-1", label: "Combobox with helper text", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
54
54
  react_1.default.createElement(index_1.Combobox, { helperText: "Error message", id: "combobox-1", isInvalid: true, isRequired: true, label: "Combobox invalid", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
55
- react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", label: "Combobox with dropdown top", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", isClearable: true, value: value })));
55
+ react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", label: "Combobox with dropdown top", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", isClearable: true, value: value }),
56
+ react_1.default.createElement(index_1.Combobox, { id: "combobox-render", label: "RenderOption", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", isClearable: true, value: value, renderOption: (option, isSelected) => (react_1.default.createElement(react_1.default.Fragment, null,
57
+ "Option: ",
58
+ option.label,
59
+ isSelected && " (selected)")) })));
56
60
  return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
57
61
  react_1.default.createElement("div", { className: "light space-y-2 p-20 lg:w-1/2" }, storyComboboxes),
58
62
  react_1.default.createElement("div", { className: "dark space-y-2 bg-gray-900 p-20 lg:w-1/2" }, storyComboboxes)));
@@ -1,2 +1,2 @@
1
- export type { ComboboxProps, ComboboxOption, ComboboxValue, ComboboxValueId } from "./combobox";
2
1
  export { Combobox } from "./combobox";
2
+ export type { ComboboxOption, ComboboxProps, ComboboxValue, ComboboxValueId } from "./combobox";
@@ -1,2 +1,2 @@
1
- export declare const ICONS_VERSION = "1685632683041";
1
+ export declare const ICONS_VERSION = "1696711976722";
2
2
  export declare const ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
4
- exports.ICONS_VERSION = "1685632683041";
4
+ exports.ICONS_VERSION = "1696711976722";
5
5
  exports.ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
package/config/icons.d.ts CHANGED
@@ -75,14 +75,22 @@ export declare const ICONS: {
75
75
  readonly w: 384;
76
76
  readonly h: 512;
77
77
  };
78
- readonly videoFile: {
79
- readonly w: 384;
78
+ readonly "triangle-exclamation": {
79
+ readonly w: 512;
80
80
  readonly h: 512;
81
81
  };
82
82
  readonly user: {
83
83
  readonly w: 448;
84
84
  readonly h: 512;
85
85
  };
86
+ readonly videoFile: {
87
+ readonly w: 384;
88
+ readonly h: 512;
89
+ };
90
+ readonly xmark: {
91
+ readonly w: 384;
92
+ readonly h: 512;
93
+ };
86
94
  readonly xmarkLarge: {
87
95
  readonly w: 448;
88
96
  readonly h: 512;
@@ -110,8 +118,10 @@ declare module "@uxf/ui/icon/theme" {
110
118
  "ellipsis-vertical": true;
111
119
  "file": true;
112
120
  "imageFile": true;
113
- "videoFile": true;
121
+ "triangle-exclamation": true;
114
122
  "user": true;
123
+ "videoFile": true;
124
+ "xmark": true;
115
125
  "xmarkLarge": true;
116
126
  }
117
127
  }
package/config/icons.js CHANGED
@@ -22,7 +22,9 @@ exports.ICONS = {
22
22
  "ellipsis-vertical": { w: 128, h: 512 },
23
23
  "file": { w: 384, h: 512 },
24
24
  "imageFile": { w: 384, h: 512 },
25
- "videoFile": { w: 384, h: 512 },
25
+ "triangle-exclamation": { w: 512, h: 512 },
26
26
  "user": { w: 448, h: 512 },
27
+ "videoFile": { w: 384, h: 512 },
28
+ "xmark": { w: 384, h: 512 },
27
29
  "xmarkLarge": { w: 448, h: 512 },
28
30
  };
@@ -1,5 +1,5 @@
1
- import { ReactNode, FC } from "react";
2
1
  import { ContentSchema } from "@uxf/ui/content/content-schema";
2
+ import { FC, ReactNode } from "react";
3
3
  import { UseControllerProps } from "react-hook-form";
4
4
  export type ContentType = keyof ContentSchema;
5
5
  interface ContentFormProps<TYPE extends ContentType> extends UseControllerProps<ContentSchema[TYPE]> {
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.UiContextProvider = void 0;
7
7
  const dayjs_1 = require("dayjs");
8
- const localizedFormat_1 = __importDefault(require("dayjs/plugin/localizedFormat"));
9
8
  const customParseFormat_1 = __importDefault(require("dayjs/plugin/customParseFormat"));
9
+ const localizedFormat_1 = __importDefault(require("dayjs/plugin/localizedFormat"));
10
10
  const react_1 = __importDefault(require("react"));
11
11
  const use_handle_color_scheme_1 = require("../color-scheme/use-handle-color-scheme");
12
12
  const context_1 = require("./context");
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export declare function createComponentPreviewPage(): {
3
+ (props: any): React.JSX.Element;
4
+ getInitialProps(ctx: any): {
5
+ componentName: any;
6
+ storyName: any;
7
+ };
8
+ };
@@ -0,0 +1,40 @@
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.createComponentPreviewPage = void 0;
7
+ const is_nil_1 = require("@uxf/core/utils/is-nil");
8
+ const react_1 = __importDefault(require("react"));
9
+ const ui_components_1 = require("./ui-components");
10
+ function ComponentPreview(props) {
11
+ return (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(props.stories).map(([key, Story]) => {
12
+ if (key === "default") {
13
+ return null;
14
+ }
15
+ return react_1.default.createElement(Story, { key: key });
16
+ })));
17
+ }
18
+ function createComponentPreviewPage() {
19
+ const component = (props) => {
20
+ const { componentName } = props;
21
+ if ((0, is_nil_1.isNil)(componentName)) {
22
+ return (react_1.default.createElement("div", { style: { padding: 32 } }, Object.entries(ui_components_1.uiComponents).map(([key, config]) => (react_1.default.createElement("div", { key: key, style: { marginTop: 32, marginBottom: 32 } },
23
+ react_1.default.createElement("h2", null, config.title),
24
+ react_1.default.createElement("div", { style: { border: "2px dashed gray", padding: 32, borderRadius: 4 } },
25
+ react_1.default.createElement(ComponentPreview, { stories: config.stories })))))));
26
+ }
27
+ const componentConfig = ui_components_1.uiComponents[componentName]; // TODO @vejvis
28
+ if ((0, is_nil_1.isNil)(componentConfig)) {
29
+ return react_1.default.createElement("div", null, "component not found");
30
+ }
31
+ return react_1.default.createElement(ComponentPreview, { stories: componentConfig.stories });
32
+ };
33
+ component.getInitialProps = (ctx) => {
34
+ var _a;
35
+ const [componentName, storyName] = (_a = ctx.query.slug) !== null && _a !== void 0 ? _a : [];
36
+ return { componentName, storyName };
37
+ };
38
+ return component;
39
+ }
40
+ exports.createComponentPreviewPage = createComponentPreviewPage;
@@ -0,0 +1,2 @@
1
+ export * from "./create-component-preview-page";
2
+ export * from "./ui-components";
@@ -0,0 +1,18 @@
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("./create-component-preview-page"), exports);
18
+ __exportStar(require("./ui-components"), exports);
@@ -0,0 +1,237 @@
1
+ import * as AvatarFileInputStories from "@uxf/ui/avatar-file-input/avatar-file-input.stories";
2
+ import * as AvatarStories from "@uxf/ui/avatar/avatar.stories";
3
+ import * as BadgeStories from "@uxf/ui/badge/badge.stories";
4
+ import * as ButtonGroupStories from "@uxf/ui/button-group/button-group.stories";
5
+ import * as ButtonListStories from "@uxf/ui/button-list/button-list.stories";
6
+ import * as ButtonStories from "@uxf/ui/button/button.stories";
7
+ import * as CalendarStories from "@uxf/ui/calendar/calendar.stories";
8
+ import * as CheckboxButtonStories from "@uxf/ui/checkbox-button/checkbox-button.stories";
9
+ import * as CheckboxInputStories from "@uxf/ui/checkbox-input/checkbox-input.stories";
10
+ import * as CheckboxStories from "@uxf/ui/checkbox/checkbox.stories";
11
+ import * as ChipStories from "@uxf/ui/chip/chip.stories";
12
+ import * as ColorRadioGroupStories from "@uxf/ui/color-radio-group/color-radio-group.stories";
13
+ import * as ColorRadioStories from "@uxf/ui/color-radio/color-radio.stories";
14
+ import * as ComboboxStories from "@uxf/ui/combobox/combobox.stories";
15
+ import * as DatePickerInputStories from "@uxf/ui/date-picker-input/date-picker-input.stories";
16
+ import * as DatePickerStories from "@uxf/ui/date-picker/date-picker.stories";
17
+ import * as DatetimePickerInputStories from "@uxf/ui/datetime-picker-input/datetime-picker-input.stories";
18
+ import * as DatetimePickerStories from "@uxf/ui/datetime-picker/datetime-picker.stories";
19
+ import * as DropdownStories from "@uxf/ui/dropdown/dropdown.stories";
20
+ import * as DropzoneStories from "@uxf/ui/dropzone/dropzone.stories";
21
+ import * as ErrorMessageStories from "@uxf/ui/error-message/error-message.stories";
22
+ import * as FileInputStories from "@uxf/ui/file-input/file-input.stories";
23
+ import * as FlashMessagesStories from "@uxf/ui/flash-messages/flash-messages.stories";
24
+ import * as FormComponentStories from "@uxf/ui/form-component/form-component.stories";
25
+ import * as IconStories from "@uxf/ui/icon/icon.stories";
26
+ import * as InputStories from "@uxf/ui/input/input.stories";
27
+ import * as LabelStories from "@uxf/ui/label/label.stories";
28
+ import * as ListItemStories from "@uxf/ui/list-item/list-item.stories";
29
+ import * as LoaderStories from "@uxf/ui/loader/loader.stories";
30
+ import * as ModalStories from "@uxf/ui/modal/modal.stories";
31
+ import * as MultiComboboxStories from "@uxf/ui/multi-combobox/multi-combobox.stories";
32
+ import * as MultiSelectStories from "@uxf/ui/multi-select/multi-select.stories";
33
+ import * as PaginationStories from "@uxf/ui/pagination/pagination.stories";
34
+ import * as PaperStories from "@uxf/ui/paper/paper.stories";
35
+ import * as RadioGroupStories from "@uxf/ui/radio-group/radio-group.stories";
36
+ import * as RadioStories from "@uxf/ui/radio/radio.stories";
37
+ import * as RasterImageStories from "@uxf/ui/raster-image/raster-image.stories";
38
+ import * as SelectStories from "@uxf/ui/select/select.stories";
39
+ import * as TabsStories from "@uxf/ui/tabs/tabs.stories";
40
+ import * as TextInputStories from "@uxf/ui/text-input/text-input.stories";
41
+ import * as TextLinkStories from "@uxf/ui/text-link/text-link.stories";
42
+ import * as TextareaStories from "@uxf/ui/textarea/textarea.stories";
43
+ import * as TimePickerInputStories from "@uxf/ui/time-picker-input/time-picker-input.stories";
44
+ import * as TimePickerStories from "@uxf/ui/time-picker/time-picker-input.stories";
45
+ import * as ToggleStories from "@uxf/ui/toggle/toggle.stories";
46
+ import * as TooltipStories from "@uxf/ui/tooltip/tooltip.stories";
47
+ import * as TypographyStories from "@uxf/ui/typography/typography.stories";
48
+ export declare const uiComponents: {
49
+ readonly avatar: {
50
+ readonly title: "Avatar";
51
+ readonly stories: typeof AvatarStories;
52
+ };
53
+ readonly "avatar-file-input": {
54
+ readonly title: "AvatarFileInput";
55
+ readonly stories: typeof AvatarFileInputStories;
56
+ };
57
+ readonly badge: {
58
+ readonly title: "Badge";
59
+ readonly stories: typeof BadgeStories;
60
+ };
61
+ readonly button: {
62
+ readonly title: "Button";
63
+ readonly stories: typeof ButtonStories;
64
+ };
65
+ readonly "button-group": {
66
+ readonly title: "ButtonGroup";
67
+ readonly stories: typeof ButtonGroupStories;
68
+ };
69
+ readonly "button-list": {
70
+ readonly title: "ButtonList";
71
+ readonly stories: typeof ButtonListStories;
72
+ };
73
+ readonly calendar: {
74
+ readonly title: "Calendar";
75
+ readonly stories: typeof CalendarStories;
76
+ };
77
+ readonly checkbox: {
78
+ readonly title: "Checkbox";
79
+ readonly stories: typeof CheckboxStories;
80
+ };
81
+ readonly "checkbox-button": {
82
+ readonly title: "CheckboxButton";
83
+ readonly stories: typeof CheckboxButtonStories;
84
+ };
85
+ readonly "checkbox-input": {
86
+ readonly title: "CheckboxInput";
87
+ readonly stories: typeof CheckboxInputStories;
88
+ };
89
+ readonly chip: {
90
+ readonly title: "Chip";
91
+ readonly stories: typeof ChipStories;
92
+ };
93
+ readonly "color-radio": {
94
+ readonly title: "ColorRadio";
95
+ readonly stories: typeof ColorRadioStories;
96
+ };
97
+ readonly "color-radio-group": {
98
+ readonly title: "ColorRadioGroup";
99
+ readonly stories: typeof ColorRadioGroupStories;
100
+ };
101
+ readonly combobox: {
102
+ readonly title: "Combobox";
103
+ readonly stories: typeof ComboboxStories;
104
+ };
105
+ readonly "date-picker": {
106
+ readonly title: "DatePicker";
107
+ readonly stories: typeof DatePickerStories;
108
+ };
109
+ readonly "date-picker-input": {
110
+ readonly title: "DatePickerInput";
111
+ readonly stories: typeof DatePickerInputStories;
112
+ };
113
+ readonly "datetime-picker": {
114
+ readonly title: "DatetimePicker";
115
+ readonly stories: typeof DatetimePickerStories;
116
+ };
117
+ readonly "datetime-picker-input": {
118
+ readonly title: "DatetimePickerInput";
119
+ readonly stories: typeof DatetimePickerInputStories;
120
+ };
121
+ readonly dropdown: {
122
+ readonly title: "Dropdown";
123
+ readonly stories: typeof DropdownStories;
124
+ };
125
+ readonly dropzone: {
126
+ readonly title: "Dropzone";
127
+ readonly stories: typeof DropzoneStories;
128
+ };
129
+ readonly "error-message": {
130
+ readonly title: "ErrorMessage";
131
+ readonly stories: typeof ErrorMessageStories;
132
+ };
133
+ readonly "file-input": {
134
+ readonly title: "FileInput";
135
+ readonly stories: typeof FileInputStories;
136
+ };
137
+ readonly "flash-messages": {
138
+ readonly title: "FlashMessages";
139
+ readonly stories: typeof FlashMessagesStories;
140
+ };
141
+ readonly "form-component": {
142
+ readonly title: "FormComponent";
143
+ readonly stories: typeof FormComponentStories;
144
+ };
145
+ readonly icon: {
146
+ readonly title: "Icon";
147
+ readonly stories: typeof IconStories;
148
+ };
149
+ readonly input: {
150
+ readonly title: "Input";
151
+ readonly stories: typeof InputStories;
152
+ };
153
+ readonly label: {
154
+ readonly title: "Label";
155
+ readonly stories: typeof LabelStories;
156
+ };
157
+ readonly "list-item": {
158
+ readonly title: "ListItem";
159
+ readonly stories: typeof ListItemStories;
160
+ };
161
+ readonly loader: {
162
+ readonly title: "Loader";
163
+ readonly stories: typeof LoaderStories;
164
+ };
165
+ readonly modal: {
166
+ readonly title: "Modal";
167
+ readonly stories: typeof ModalStories;
168
+ };
169
+ readonly "multi-combobox": {
170
+ readonly title: "MultiCombobox";
171
+ readonly stories: typeof MultiComboboxStories;
172
+ };
173
+ readonly "multi-select": {
174
+ readonly title: "MultiSelect";
175
+ readonly stories: typeof MultiSelectStories;
176
+ };
177
+ readonly pagination: {
178
+ readonly title: "Pagination";
179
+ readonly stories: typeof PaginationStories;
180
+ };
181
+ readonly paper: {
182
+ readonly title: "Paper";
183
+ readonly stories: typeof PaperStories;
184
+ };
185
+ readonly radio: {
186
+ readonly title: "Radio";
187
+ readonly stories: typeof RadioStories;
188
+ };
189
+ readonly "radio-group": {
190
+ readonly title: "RadioGroup";
191
+ readonly stories: typeof RadioGroupStories;
192
+ };
193
+ readonly "raster-image": {
194
+ readonly title: "RasterImage";
195
+ readonly stories: typeof RasterImageStories;
196
+ };
197
+ readonly select: {
198
+ readonly title: "Select";
199
+ readonly stories: typeof SelectStories;
200
+ };
201
+ readonly tabs: {
202
+ readonly title: "Tabs";
203
+ readonly stories: typeof TabsStories;
204
+ };
205
+ readonly "text-input": {
206
+ readonly title: "TextInput";
207
+ readonly stories: typeof TextInputStories;
208
+ };
209
+ readonly "text-link": {
210
+ readonly title: "TextLink";
211
+ readonly stories: typeof TextLinkStories;
212
+ };
213
+ readonly textarea: {
214
+ readonly title: "Textarea";
215
+ readonly stories: typeof TextareaStories;
216
+ };
217
+ readonly "time-picker": {
218
+ readonly title: "TimePicker";
219
+ readonly stories: typeof TimePickerStories;
220
+ };
221
+ readonly "time-picker-input": {
222
+ readonly title: "TimePickerInput";
223
+ readonly stories: typeof TimePickerInputStories;
224
+ };
225
+ readonly toggle: {
226
+ readonly title: "Toggle";
227
+ readonly stories: typeof ToggleStories;
228
+ };
229
+ readonly tooltip: {
230
+ readonly title: "Tooltip";
231
+ readonly stories: typeof TooltipStories;
232
+ };
233
+ readonly typography: {
234
+ readonly title: "Typography";
235
+ readonly stories: typeof TypographyStories;
236
+ };
237
+ };