solid-tiny-ui 0.4.0 → 0.6.0

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 (369) hide show
  1. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/alert/alert.js +5 -0
  2. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/alert/alert.jsx +5 -0
  3. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.js +1 -1
  4. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.jsx +1 -1
  5. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.js +5 -0
  6. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.jsx +5 -0
  7. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.js +5 -0
  8. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.jsx +5 -0
  9. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.js +5 -0
  10. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.jsx +5 -0
  11. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.js +5 -0
  12. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.jsx +5 -0
  13. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.js +5 -0
  14. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.jsx +5 -0
  15. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.js +5 -0
  16. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.jsx +5 -0
  17. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.js +5 -0
  18. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.jsx +5 -0
  19. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.js +5 -0
  20. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.jsx +5 -0
  21. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.js +5 -0
  22. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.jsx +5 -0
  23. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.js +5 -0
  24. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.jsx +5 -0
  25. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/textarea/textarea.js +5 -0
  26. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/textarea/textarea.jsx +5 -0
  27. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/time-picker/time-picker.js +5 -0
  28. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/time-picker/time-picker.jsx +5 -0
  29. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.js +1 -1
  30. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.jsx +1 -1
  31. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.js +1 -1
  32. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.jsx +1 -1
  33. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.js +5 -0
  34. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.jsx +5 -0
  35. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/popover/popover.js +1 -1
  36. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/popover/popover.jsx +1 -1
  37. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.js +1 -1
  38. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.jsx +1 -1
  39. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.js +1 -1
  40. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.jsx +1 -1
  41. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/toaster/toaster.js +5 -0
  42. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/toaster/toaster.jsx +5 -0
  43. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tooltip/tooltip.js +1 -1
  44. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tooltip/tooltip.jsx +1 -1
  45. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.js +5 -0
  46. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.jsx +5 -0
  47. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/root-provider/global.js +1 -1
  48. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/root-provider/global.jsx +1 -1
  49. package/dist/components/alert/alert.d.ts +25 -0
  50. package/dist/components/alert/alert.js +186 -0
  51. package/dist/components/alert/alert.jsx +73 -0
  52. package/dist/components/alert/index.d.ts +1 -0
  53. package/dist/components/alert/index.js +1 -0
  54. package/dist/components/alert/index.jsx +1 -0
  55. package/dist/components/buttons/basic-button/basic-button.d.ts +2 -2
  56. package/dist/components/buttons/basic-button/basic-button.js +20 -29
  57. package/dist/components/buttons/basic-button/basic-button.jsx +6 -7
  58. package/dist/components/buttons/state-button/state-button.d.ts +2 -2
  59. package/dist/components/buttons/state-button/state-button.js +2 -2
  60. package/dist/components/buttons/state-button/state-button.jsx +2 -2
  61. package/dist/components/drawer/helpers.d.ts +25 -0
  62. package/dist/components/drawer/helpers.js +104 -0
  63. package/dist/components/drawer/helpers.jsx +60 -0
  64. package/dist/components/drawer/index.d.ts +42 -0
  65. package/dist/components/drawer/index.js +95 -0
  66. package/dist/components/drawer/index.jsx +57 -0
  67. package/dist/components/field/index.d.ts +10 -0
  68. package/dist/components/field/index.js +11 -0
  69. package/dist/components/field/index.jsx +11 -0
  70. package/dist/components/field/parts.d.ts +24 -0
  71. package/dist/components/field/parts.js +69 -0
  72. package/dist/components/field/parts.jsx +41 -0
  73. package/dist/components/form-components/checkbox/checkbox.d.ts +26 -0
  74. package/dist/components/form-components/checkbox/checkbox.js +118 -0
  75. package/dist/components/form-components/checkbox/checkbox.jsx +42 -0
  76. package/dist/components/form-components/checkbox/index.d.ts +1 -0
  77. package/dist/components/form-components/checkbox/index.js +1 -0
  78. package/dist/components/form-components/checkbox/index.jsx +1 -0
  79. package/dist/components/form-components/checkbox-group/checkbox-group.d.ts +26 -0
  80. package/dist/components/form-components/checkbox-group/checkbox-group.js +76 -0
  81. package/dist/components/form-components/checkbox-group/checkbox-group.jsx +34 -0
  82. package/dist/components/form-components/checkbox-group/index.d.ts +1 -0
  83. package/dist/components/form-components/checkbox-group/index.js +1 -0
  84. package/dist/components/form-components/checkbox-group/index.jsx +1 -0
  85. package/dist/components/{combobox → form-components/combobox}/combobox.d.ts +6 -4
  86. package/dist/components/{combobox → form-components/combobox}/combobox.js +18 -14
  87. package/dist/components/{combobox → form-components/combobox}/combobox.jsx +10 -10
  88. package/dist/components/form-components/index.d.ts +19 -0
  89. package/dist/components/form-components/index.js +19 -0
  90. package/dist/components/form-components/index.jsx +19 -0
  91. package/dist/components/form-components/number-input/index.d.ts +1 -0
  92. package/dist/components/form-components/number-input/index.js +1 -0
  93. package/dist/components/form-components/number-input/index.jsx +1 -0
  94. package/dist/components/form-components/number-input/number-input.d.ts +33 -0
  95. package/dist/components/form-components/number-input/number-input.js +113 -0
  96. package/dist/components/form-components/number-input/number-input.jsx +59 -0
  97. package/dist/components/form-components/password-input/index.d.ts +1 -0
  98. package/dist/components/form-components/password-input/index.js +1 -0
  99. package/dist/components/form-components/password-input/index.jsx +1 -0
  100. package/dist/components/form-components/password-input/password-input.d.ts +31 -0
  101. package/dist/components/form-components/password-input/password-input.js +95 -0
  102. package/dist/components/form-components/password-input/password-input.jsx +36 -0
  103. package/dist/components/form-components/radio-group/index.d.ts +1 -0
  104. package/dist/components/form-components/radio-group/index.js +1 -0
  105. package/dist/components/form-components/radio-group/index.jsx +1 -0
  106. package/dist/components/form-components/radio-group/radio-group.d.ts +26 -0
  107. package/dist/components/form-components/radio-group/radio-group.js +118 -0
  108. package/dist/components/form-components/radio-group/radio-group.jsx +45 -0
  109. package/dist/components/form-components/switcher/index.d.ts +1 -0
  110. package/dist/components/form-components/switcher/index.js +1 -0
  111. package/dist/components/form-components/switcher/index.jsx +1 -0
  112. package/dist/components/form-components/switcher/switcher.d.ts +23 -0
  113. package/dist/components/form-components/switcher/switcher.js +92 -0
  114. package/dist/components/form-components/switcher/switcher.jsx +32 -0
  115. package/dist/components/form-components/text-field/index.d.ts +1 -0
  116. package/dist/components/form-components/text-field/index.js +1 -0
  117. package/dist/components/form-components/text-field/index.jsx +1 -0
  118. package/dist/components/form-components/text-field/text-field.d.ts +30 -0
  119. package/dist/components/form-components/text-field/text-field.js +112 -0
  120. package/dist/components/form-components/text-field/text-field.jsx +40 -0
  121. package/dist/components/{textarea → form-components/textarea}/textarea.d.ts +5 -2
  122. package/dist/components/form-components/textarea/textarea.js +55 -0
  123. package/dist/components/form-components/textarea/textarea.jsx +24 -0
  124. package/dist/components/form-components/time-picker/index.d.ts +27 -0
  125. package/dist/components/form-components/time-picker/index.js +106 -0
  126. package/dist/components/form-components/time-picker/index.jsx +44 -0
  127. package/dist/components/form-components/time-picker/panel.js +185 -0
  128. package/dist/components/form-components/time-picker/panel.jsx +108 -0
  129. package/dist/components/form-components/time-picker/trigger.js +68 -0
  130. package/dist/components/form-components/time-picker/trigger.jsx +37 -0
  131. package/dist/components/modal/helpers.js +1 -1
  132. package/dist/components/modal/helpers.jsx +1 -1
  133. package/dist/components/modal/index.d.ts +5 -8
  134. package/dist/components/modal/index.js +13 -10
  135. package/dist/components/modal/index.jsx +7 -4
  136. package/dist/components/pagination/index.d.ts +1 -0
  137. package/dist/components/pagination/index.js +1 -0
  138. package/dist/components/pagination/index.jsx +1 -0
  139. package/dist/components/pagination/pagination.d.ts +32 -0
  140. package/dist/components/pagination/pagination.js +336 -0
  141. package/dist/components/pagination/pagination.jsx +104 -0
  142. package/dist/components/popover/index.js +4 -3
  143. package/dist/components/popover/index.jsx +2 -1
  144. package/dist/components/progress/circle-progress.d.ts +7 -0
  145. package/dist/components/progress/circle-progress.js +33 -14
  146. package/dist/components/progress/circle-progress.jsx +15 -12
  147. package/dist/components/progress/line-progress.d.ts +2 -2
  148. package/dist/components/progress/line-progress.js +6 -5
  149. package/dist/components/progress/line-progress.jsx +6 -5
  150. package/dist/components/progress/loading-bar.d.ts +2 -2
  151. package/dist/components/spin/spin-ring.d.ts +2 -2
  152. package/dist/components/spin/spin-ring.js +1 -1
  153. package/dist/components/spin/spin-ring.jsx +1 -1
  154. package/dist/components/spin/spin.js +8 -7
  155. package/dist/components/spin/spin.jsx +6 -5
  156. package/dist/components/tabs/index.d.ts +7 -0
  157. package/dist/components/tabs/index.js +40 -12
  158. package/dist/components/tabs/index.jsx +9 -7
  159. package/dist/components/toaster/context.js +31 -0
  160. package/dist/components/toaster/context.jsx +31 -0
  161. package/dist/components/toaster/icon.js +50 -0
  162. package/dist/components/toaster/icon.jsx +27 -0
  163. package/dist/components/toaster/index.d.ts +3 -0
  164. package/dist/components/toaster/index.js +2 -0
  165. package/dist/components/toaster/index.jsx +2 -0
  166. package/dist/components/toaster/locator.js +67 -0
  167. package/dist/components/toaster/locator.jsx +54 -0
  168. package/dist/components/toaster/one-toaster.js +146 -0
  169. package/dist/components/toaster/one-toaster.jsx +104 -0
  170. package/dist/components/toaster/provider.d.ts +11 -0
  171. package/dist/components/toaster/provider.js +64 -0
  172. package/dist/components/toaster/provider.jsx +51 -0
  173. package/dist/components/toaster/type.d.ts +15 -0
  174. package/dist/components/toaster/use-toaster.d.ts +48 -0
  175. package/dist/components/toaster/use-toaster.js +72 -0
  176. package/dist/components/toaster/use-toaster.jsx +72 -0
  177. package/dist/components/tooltip/tooltip.d.ts +7 -0
  178. package/dist/components/tooltip/tooltip.js +9 -2
  179. package/dist/components/tooltip/tooltip.jsx +4 -2
  180. package/dist/components/visually-hidden/index.js +19 -0
  181. package/dist/components/visually-hidden/index.jsx +12 -0
  182. package/dist/icons/arrow-down-s-line.d.ts +3 -2
  183. package/dist/icons/arrow-down-s-line.js +4 -4
  184. package/dist/icons/arrow-down-s-line.jsx +2 -2
  185. package/dist/icons/arrow-left.d.ts +7 -0
  186. package/dist/icons/arrow-left.js +13 -0
  187. package/dist/icons/arrow-left.jsx +11 -0
  188. package/dist/icons/arrow-right.d.ts +7 -0
  189. package/dist/icons/arrow-right.js +13 -0
  190. package/dist/icons/arrow-right.jsx +11 -0
  191. package/dist/icons/check-bold.d.ts +7 -0
  192. package/dist/icons/check-bold.js +13 -0
  193. package/dist/icons/check-bold.jsx +11 -0
  194. package/dist/icons/check-line.d.ts +7 -0
  195. package/dist/icons/check-line.js +13 -0
  196. package/dist/icons/check-line.jsx +11 -0
  197. package/dist/icons/checkbox-circle-line.d.ts +7 -0
  198. package/dist/icons/checkbox-circle-line.js +13 -0
  199. package/dist/icons/checkbox-circle-line.jsx +11 -0
  200. package/dist/icons/close-line.d.ts +3 -2
  201. package/dist/icons/close-line.js +4 -4
  202. package/dist/icons/close-line.jsx +2 -2
  203. package/dist/icons/common.d.ts +9 -0
  204. package/dist/icons/common.js +12 -2
  205. package/dist/icons/common.jsx +1 -1
  206. package/dist/icons/ellipsis.d.ts +7 -0
  207. package/dist/icons/ellipsis.js +13 -0
  208. package/dist/icons/ellipsis.jsx +11 -0
  209. package/dist/icons/error-warning-line.d.ts +7 -0
  210. package/dist/icons/error-warning-line.js +13 -0
  211. package/dist/icons/error-warning-line.jsx +11 -0
  212. package/dist/icons/eye-line.d.ts +7 -0
  213. package/dist/icons/eye-line.js +13 -0
  214. package/dist/icons/eye-line.jsx +11 -0
  215. package/dist/icons/eye-off-line.d.ts +7 -0
  216. package/dist/icons/eye-off-line.js +13 -0
  217. package/dist/icons/eye-off-line.jsx +11 -0
  218. package/dist/icons/index.d.ts +13 -1
  219. package/dist/icons/index.js +13 -1
  220. package/dist/icons/index.jsx +13 -1
  221. package/dist/icons/information-line.d.ts +7 -0
  222. package/dist/icons/information-line.js +13 -0
  223. package/dist/icons/information-line.jsx +11 -0
  224. package/dist/icons/loading.d.ts +13 -0
  225. package/dist/icons/loading.js +18 -0
  226. package/dist/icons/loading.jsx +19 -0
  227. package/dist/icons/subtract.d.ts +7 -0
  228. package/dist/icons/subtract.js +13 -0
  229. package/dist/icons/subtract.jsx +11 -0
  230. package/dist/index.d.ts +23 -8
  231. package/dist/index.js +23 -9
  232. package/dist/index.jsx +23 -9
  233. package/dist/layout/flex/index.d.ts +5 -4
  234. package/dist/layout/flex/index.js +25 -15
  235. package/dist/layout/flex/index.jsx +23 -10
  236. package/dist/layout/index.d.ts +1 -2
  237. package/dist/layout/index.js +0 -1
  238. package/dist/layout/index.jsx +0 -1
  239. package/dist/primitives/animated-group/context.d.ts +9 -9
  240. package/dist/primitives/animated-group/panel.js +14 -13
  241. package/dist/primitives/animated-group/panel.jsx +7 -6
  242. package/dist/primitives/animated-group/root.d.ts +4 -4
  243. package/dist/primitives/animated-group/root.js +2 -3
  244. package/dist/primitives/animated-group/root.jsx +2 -3
  245. package/dist/primitives/checkbox/context.d.ts +63 -0
  246. package/dist/primitives/checkbox/context.js +13 -0
  247. package/dist/primitives/checkbox/context.jsx +13 -0
  248. package/dist/primitives/checkbox/index.d.ts +26 -0
  249. package/dist/primitives/checkbox/index.js +13 -0
  250. package/dist/primitives/checkbox/index.jsx +13 -0
  251. package/dist/primitives/checkbox/parts.d.ts +10 -0
  252. package/dist/primitives/checkbox/parts.js +62 -0
  253. package/dist/primitives/checkbox/parts.jsx +28 -0
  254. package/dist/primitives/checkbox/root.d.ts +16 -0
  255. package/dist/primitives/checkbox/root.js +25 -0
  256. package/dist/primitives/checkbox/root.jsx +24 -0
  257. package/dist/primitives/checkbox-group/context.js +21 -0
  258. package/dist/primitives/checkbox-group/context.jsx +21 -0
  259. package/dist/primitives/checkbox-group/index.js +12 -0
  260. package/dist/primitives/checkbox-group/index.jsx +12 -0
  261. package/dist/primitives/checkbox-group/parts.js +33 -0
  262. package/dist/primitives/checkbox-group/parts.jsx +21 -0
  263. package/dist/primitives/checkbox-group/root.js +24 -0
  264. package/dist/primitives/checkbox-group/root.jsx +23 -0
  265. package/dist/primitives/fake-scroll-list/context.js +30 -0
  266. package/dist/primitives/fake-scroll-list/context.jsx +30 -0
  267. package/dist/primitives/fake-scroll-list/index.d.ts +52 -0
  268. package/dist/primitives/fake-scroll-list/index.js +36 -0
  269. package/dist/primitives/fake-scroll-list/index.jsx +36 -0
  270. package/dist/primitives/fake-scroll-list/item.d.ts +11 -0
  271. package/dist/primitives/fake-scroll-list/item.js +30 -0
  272. package/dist/primitives/fake-scroll-list/item.jsx +13 -0
  273. package/dist/primitives/fake-scroll-list/listbox.d.ts +8 -0
  274. package/dist/primitives/fake-scroll-list/listbox.js +72 -0
  275. package/dist/primitives/fake-scroll-list/listbox.jsx +61 -0
  276. package/dist/primitives/fake-scroll-list/root.d.ts +15 -0
  277. package/dist/primitives/fake-scroll-list/root.js +52 -0
  278. package/dist/primitives/fake-scroll-list/root.jsx +40 -0
  279. package/dist/primitives/floating/content.js +12 -11
  280. package/dist/primitives/floating/content.jsx +7 -6
  281. package/dist/primitives/floating/context.d.ts +10 -9
  282. package/dist/primitives/floating/context.js +1 -1
  283. package/dist/primitives/floating/context.jsx +1 -1
  284. package/dist/primitives/floating/index.d.ts +3 -2
  285. package/dist/primitives/floating/trigger.js +1 -1
  286. package/dist/primitives/floating/trigger.jsx +1 -1
  287. package/dist/primitives/floating/types.d.ts +2 -1
  288. package/dist/primitives/index.d.ts +8 -1
  289. package/dist/primitives/index.js +8 -3
  290. package/dist/primitives/index.jsx +8 -3
  291. package/dist/primitives/listbox/listbox.d.ts +3 -3
  292. package/dist/primitives/modal/content.d.ts +3 -3
  293. package/dist/primitives/modal/content.js +2 -3
  294. package/dist/primitives/modal/content.jsx +2 -3
  295. package/dist/primitives/modal/context.d.ts +16 -29
  296. package/dist/primitives/modal/context.js +2 -4
  297. package/dist/primitives/modal/context.jsx +2 -4
  298. package/dist/primitives/modal/index.d.ts +5 -8
  299. package/dist/primitives/modal/portal.js +1 -1
  300. package/dist/primitives/modal/portal.jsx +1 -1
  301. package/dist/primitives/modal/root.d.ts +2 -3
  302. package/dist/primitives/modal/root.js +10 -10
  303. package/dist/primitives/modal/root.jsx +10 -10
  304. package/dist/primitives/pagination/context.d.ts +89 -0
  305. package/dist/primitives/pagination/context.js +88 -0
  306. package/dist/primitives/pagination/context.jsx +88 -0
  307. package/dist/primitives/pagination/index.d.ts +33 -0
  308. package/dist/primitives/pagination/index.js +12 -0
  309. package/dist/primitives/pagination/index.jsx +12 -0
  310. package/dist/primitives/pagination/items.d.ts +9 -0
  311. package/dist/primitives/pagination/items.js +19 -0
  312. package/dist/primitives/pagination/items.jsx +11 -0
  313. package/dist/primitives/pagination/root.d.ts +16 -0
  314. package/dist/primitives/pagination/root.js +24 -0
  315. package/dist/primitives/pagination/root.jsx +23 -0
  316. package/dist/primitives/radio-group/context.d.ts +91 -0
  317. package/dist/primitives/radio-group/context.js +16 -0
  318. package/dist/primitives/radio-group/context.jsx +16 -0
  319. package/dist/primitives/radio-group/index.d.ts +34 -0
  320. package/dist/primitives/radio-group/index.js +15 -0
  321. package/dist/primitives/radio-group/index.jsx +15 -0
  322. package/dist/primitives/radio-group/item.d.ts +19 -0
  323. package/dist/primitives/radio-group/item.js +74 -0
  324. package/dist/primitives/radio-group/item.jsx +44 -0
  325. package/dist/primitives/radio-group/root.d.ts +14 -0
  326. package/dist/primitives/radio-group/root.js +23 -0
  327. package/dist/primitives/radio-group/root.jsx +22 -0
  328. package/dist/root-provider/context.d.ts +16 -9
  329. package/dist/root-provider/context.js +4 -1
  330. package/dist/root-provider/context.jsx +4 -1
  331. package/dist/root-provider/gen-colors.js +138 -0
  332. package/dist/root-provider/gen-colors.jsx +138 -0
  333. package/dist/root-provider/provider.js +4 -3
  334. package/dist/root-provider/provider.jsx +3 -2
  335. package/dist/utils/duration.js +10 -0
  336. package/dist/utils/duration.jsx +10 -0
  337. package/dist/utils/index.js +1 -4
  338. package/dist/utils/index.jsx +1 -4
  339. package/dist/utils/types.d.ts +4 -8
  340. package/package.json +9 -8
  341. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/combobox/combobox.js +0 -5
  342. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/combobox/combobox.jsx +0 -5
  343. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/input/input.js +0 -5
  344. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/input/input.jsx +0 -5
  345. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/textarea/textarea.js +0 -5
  346. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/textarea/textarea.jsx +0 -5
  347. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/layout/input-compact/input-compact.js +0 -5
  348. package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/layout/input-compact/input-compact.jsx +0 -5
  349. package/dist/components/input/index.d.ts +0 -1
  350. package/dist/components/input/index.js +0 -1
  351. package/dist/components/input/index.jsx +0 -1
  352. package/dist/components/input/input.d.ts +0 -15
  353. package/dist/components/input/input.js +0 -44
  354. package/dist/components/input/input.jsx +0 -16
  355. package/dist/components/textarea/textarea.js +0 -49
  356. package/dist/components/textarea/textarea.jsx +0 -24
  357. package/dist/layout/input-compact/index.d.ts +0 -13
  358. package/dist/layout/input-compact/index.js +0 -42
  359. package/dist/layout/input-compact/index.jsx +0 -32
  360. package/dist/root-provider/gen-brand.js +0 -55
  361. package/dist/root-provider/gen-brand.jsx +0 -55
  362. package/dist/utils/types.js +0 -7
  363. package/dist/utils/types.jsx +0 -7
  364. /package/dist/components/{combobox → form-components/combobox}/index.d.ts +0 -0
  365. /package/dist/components/{combobox → form-components/combobox}/index.js +0 -0
  366. /package/dist/components/{combobox → form-components/combobox}/index.jsx +0 -0
  367. /package/dist/components/{textarea → form-components/textarea}/index.d.ts +0 -0
  368. /package/dist/components/{textarea → form-components/textarea}/index.js +0 -0
  369. /package/dist/components/{textarea → form-components/textarea}/index.jsx +0 -0
@@ -0,0 +1,60 @@
1
+ import { CloseLine } from "../../icons/close-line.jsx";
2
+ import { ModalCore } from "../../primitives/modal/index.jsx";
3
+ import drawer_helper_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.jsx";
4
+ import { Flex } from "../../layout/flex/index.jsx";
5
+ import "../../layout/index.jsx";
6
+ import "../../primitives/index.jsx";
7
+ import { Show, onMount, splitProps } from "solid-js";
8
+ import { combineClass, combineStyle, makeEventListener, mountStyle } from "solid-tiny-utils";
9
+ import { Ref } from "@solid-primitives/refs";
10
+
11
+ //#region src/components/drawer/helpers.tsx
12
+ function Root(props) {
13
+ mountStyle(drawer_helper_default, "tiny-drawer-helper");
14
+ const [local, others] = splitProps(props, ["class", "style"]);
15
+ return <Flex vertical {...others} class={combineClass("tiny-drawer-helper", local.class)} style={combineStyle({ height: "100%" }, local.style)} />;
16
+ }
17
+ function Header(props) {
18
+ return <div class="tiny-drawer__header">
19
+ {props.title}
20
+ <Show when={props.closable}>
21
+ <Close>
22
+ <button class="tiny-drawer__header-close" type="button">
23
+ <CloseLine />
24
+ </button>
25
+ </Close>
26
+ </Show>
27
+ </div>;
28
+ }
29
+ function Body(props) {
30
+ return <div class="tiny-drawer__body">{props.children}</div>;
31
+ }
32
+ function Footer(props) {
33
+ const [local, others] = splitProps(props, [
34
+ "gap",
35
+ "justify",
36
+ "align",
37
+ "class",
38
+ "style"
39
+ ]);
40
+ return <Flex {...others} align={local.align ?? "center"} class={combineClass("tiny-drawer__footer", local.class)} gap={local.gap ?? "sm"} justify={local.justify ?? "flex-end"} style={combineStyle({}, local.style)} />;
41
+ }
42
+ function Close(props) {
43
+ const [, actions] = ModalCore.useContext();
44
+ let ref;
45
+ onMount(() => {
46
+ makeEventListener(ref, "click", () => {
47
+ actions.setState("open", false);
48
+ });
49
+ });
50
+ return <Ref ref={ref}>{props.children}</Ref>;
51
+ }
52
+ const DrawerHelper = Object.assign(Root, {
53
+ Header,
54
+ Body,
55
+ Footer,
56
+ Close
57
+ });
58
+
59
+ //#endregion
60
+ export { DrawerHelper };
@@ -0,0 +1,42 @@
1
+ import { ClassNames, Styles } from "../../utils/types.js";
2
+ import { Trigger } from "../../primitives/modal/trigger.js";
3
+ import { ModalCore } from "../../primitives/modal/index.js";
4
+ import { DrawerHelper } from "./helpers.js";
5
+ import { JSX } from "solid-js";
6
+ import * as solid_tiny_utils2 from "solid-tiny-utils";
7
+ import * as solid_js_store8 from "solid-js/store";
8
+
9
+ //#region src/components/drawer/index.d.ts
10
+ declare function Root(props: Parameters<typeof ModalCore>[0]): JSX.Element;
11
+ declare function Content(props: {
12
+ children: JSX.Element;
13
+ placement?: "left" | "right" | "top" | "bottom";
14
+ /**
15
+ * width or height can be set according to the placement
16
+ */
17
+ size?: string;
18
+ classNames?: ClassNames<"mask" | "wrapper" | "content">;
19
+ styles?: Styles<"mask" | "wrapper" | "content">;
20
+ }): JSX.Element;
21
+ declare const Drawer: typeof Root & {
22
+ Trigger: typeof Trigger;
23
+ Content: typeof Content;
24
+ useContext: () => [Readonly<{
25
+ open: boolean;
26
+ refContent: HTMLElement | null;
27
+ closeOnClickMask: boolean;
28
+ closeOnEsc: boolean;
29
+ } & {}>, Omit<{}, "setState"> & {
30
+ setState: solid_js_store8.SetStoreFunction<{
31
+ open: boolean;
32
+ refContent: HTMLElement | null;
33
+ closeOnClickMask: boolean;
34
+ closeOnEsc: boolean;
35
+ }>;
36
+ }, {
37
+ isMounted: () => boolean;
38
+ presencePhase: () => solid_tiny_utils2.PresencePhase;
39
+ }];
40
+ };
41
+ //#endregion
42
+ export { Drawer };
@@ -0,0 +1,95 @@
1
+ import { createClassStyles } from "../../utils/index.js";
2
+ import drawer_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.js";
3
+ import { ModalCore } from "../../primitives/modal/index.js";
4
+ import { DrawerHelper } from "./helpers.js";
5
+ import { createComponent } from "solid-js/web";
6
+ import { createMemo } from "solid-js";
7
+ import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
8
+
9
+ //#region src/components/drawer/index.tsx
10
+ function Root(props) {
11
+ return createComponent(ModalCore, props);
12
+ }
13
+ function Content(props) {
14
+ mountStyle(drawer_default, "tiny-drawer");
15
+ const [, , { presencePhase }] = ModalCore.useContext();
16
+ const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles);
17
+ const placement = () => props.placement || "right";
18
+ const isEntering = createMemo(() => ["pre-enter", "entering"].includes(presencePhase()));
19
+ const isExiting = createMemo(() => ["exiting"].includes(presencePhase()));
20
+ const getSize = () => {
21
+ if (placement() === "left" || placement() === "right") return {
22
+ width: props.size || "378px",
23
+ height: "100%"
24
+ };
25
+ return {
26
+ width: "100%",
27
+ height: props.size || "378px"
28
+ };
29
+ };
30
+ const translateFrom = createMemo(() => {
31
+ switch (placement()) {
32
+ case "left": return "-100%, 0";
33
+ case "right": return "100%, 0";
34
+ case "top": return "0, -100%";
35
+ case "bottom": return "0, 100%";
36
+ default: return "";
37
+ }
38
+ });
39
+ return createComponent(ModalCore.Portal, { get children() {
40
+ return [createComponent(ModalCore.Mask, {
41
+ get ["class"]() {
42
+ return combineClass("tiny-drawer__mask", classes().mask);
43
+ },
44
+ get ["data-entering"]() {
45
+ return dataIf(isEntering());
46
+ },
47
+ get ["data-exiting"]() {
48
+ return dataIf(isExiting());
49
+ },
50
+ get style() {
51
+ return styles().mask;
52
+ }
53
+ }), createComponent(ModalCore.ContentWrapper, {
54
+ get ["class"]() {
55
+ return combineClass("tiny-drawer__wrapper", classes().wrapper);
56
+ },
57
+ get style() {
58
+ return combineStyle({}, styles().wrapper);
59
+ },
60
+ get children() {
61
+ return createComponent(ModalCore.Content, {
62
+ get ["class"]() {
63
+ return combineClass("tiny-drawer__content", classes().content);
64
+ },
65
+ get ["data-entering"]() {
66
+ return dataIf(isEntering());
67
+ },
68
+ get ["data-exiting"]() {
69
+ return dataIf(isExiting());
70
+ },
71
+ get ["data-placement"]() {
72
+ return placement();
73
+ },
74
+ get style() {
75
+ return combineStyle({
76
+ ...getSize(),
77
+ "--translate-from": translateFrom()
78
+ }, styles().content);
79
+ },
80
+ get children() {
81
+ return props.children;
82
+ }
83
+ });
84
+ }
85
+ })];
86
+ } });
87
+ }
88
+ const Drawer = Object.assign(Root, {
89
+ Trigger: ModalCore.Trigger,
90
+ Content,
91
+ useContext: ModalCore.useContext
92
+ });
93
+
94
+ //#endregion
95
+ export { Drawer };
@@ -0,0 +1,57 @@
1
+ import { createClassStyles } from "../../utils/index.jsx";
2
+ import drawer_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.jsx";
3
+ import { ModalCore } from "../../primitives/modal/index.jsx";
4
+ import { DrawerHelper } from "./helpers.jsx";
5
+ import { createMemo } from "solid-js";
6
+ import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
7
+
8
+ //#region src/components/drawer/index.tsx
9
+ function Root(props) {
10
+ return <ModalCore {...props} />;
11
+ }
12
+ function Content(props) {
13
+ mountStyle(drawer_default, "tiny-drawer");
14
+ const [, , { presencePhase }] = ModalCore.useContext();
15
+ const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles);
16
+ const placement = () => props.placement || "right";
17
+ const isEntering = createMemo(() => ["pre-enter", "entering"].includes(presencePhase()));
18
+ const isExiting = createMemo(() => ["exiting"].includes(presencePhase()));
19
+ const getSize = () => {
20
+ if (placement() === "left" || placement() === "right") return {
21
+ width: props.size || "378px",
22
+ height: "100%"
23
+ };
24
+ return {
25
+ width: "100%",
26
+ height: props.size || "378px"
27
+ };
28
+ };
29
+ const translateFrom = createMemo(() => {
30
+ switch (placement()) {
31
+ case "left": return "-100%, 0";
32
+ case "right": return "100%, 0";
33
+ case "top": return "0, -100%";
34
+ case "bottom": return "0, 100%";
35
+ default: return "";
36
+ }
37
+ });
38
+ return <ModalCore.Portal>
39
+ <ModalCore.Mask class={combineClass("tiny-drawer__mask", classes().mask)} data-entering={dataIf(isEntering())} data-exiting={dataIf(isExiting())} style={styles().mask} />
40
+ <ModalCore.ContentWrapper class={combineClass("tiny-drawer__wrapper", classes().wrapper)} style={combineStyle({}, styles().wrapper)}>
41
+ <ModalCore.Content class={combineClass("tiny-drawer__content", classes().content)} data-entering={dataIf(isEntering())} data-exiting={dataIf(isExiting())} data-placement={placement()} style={combineStyle({
42
+ ...getSize(),
43
+ "--translate-from": translateFrom()
44
+ }, styles().content)}>
45
+ {props.children}
46
+ </ModalCore.Content>
47
+ </ModalCore.ContentWrapper>
48
+ </ModalCore.Portal>;
49
+ }
50
+ const Drawer = Object.assign(Root, {
51
+ Trigger: ModalCore.Trigger,
52
+ Content,
53
+ useContext: ModalCore.useContext
54
+ });
55
+
56
+ //#endregion
57
+ export { Drawer };
@@ -0,0 +1,10 @@
1
+ import { Description, RequiredIndicator, Root, Title } from "./parts.js";
2
+
3
+ //#region src/components/field/index.d.ts
4
+ declare const Field: typeof Root & {
5
+ Title: typeof Title;
6
+ Description: typeof Description;
7
+ RequiredIndicator: typeof RequiredIndicator;
8
+ };
9
+ //#endregion
10
+ export { Field };
@@ -0,0 +1,11 @@
1
+ import { Description, RequiredIndicator, Root, Title } from "./parts.js";
2
+
3
+ //#region src/components/field/index.ts
4
+ const Field = Object.assign(Root, {
5
+ Title,
6
+ Description,
7
+ RequiredIndicator
8
+ });
9
+
10
+ //#endregion
11
+ export { Field };
@@ -0,0 +1,11 @@
1
+ import { Description, RequiredIndicator, Root, Title } from "./parts.jsx";
2
+
3
+ //#region src/components/field/index.ts
4
+ const Field = Object.assign(Root, {
5
+ Title,
6
+ Description,
7
+ RequiredIndicator
8
+ });
9
+
10
+ //#endregion
11
+ export { Field };
@@ -0,0 +1,24 @@
1
+ import { OmitComponentProps } from "../../utils/types.js";
2
+ import { Flex } from "../../layout/flex/index.js";
3
+ import "../../layout/index.js";
4
+ import { JSX } from "solid-js";
5
+ import { MaybeCallableChild } from "solid-tiny-utils";
6
+
7
+ //#region src/components/field/parts.d.ts
8
+ declare function Root(props: {
9
+ orientation?: "horizontal" | "vertical";
10
+ children?: MaybeCallableChild<[{
11
+ uniqueId: string;
12
+ }]>;
13
+ } & OmitComponentProps<typeof Flex, "vertical" | "children">): JSX.Element;
14
+ declare function Title(props: {
15
+ children?: JSX.Element;
16
+ } & OmitComponentProps<typeof Flex<"label">, "children">): JSX.Element;
17
+ declare function RequiredIndicator(props: {
18
+ show?: boolean;
19
+ }): JSX.Element;
20
+ declare function Description(props: {
21
+ children?: JSX.Element;
22
+ }): JSX.Element;
23
+ //#endregion
24
+ export { Description, RequiredIndicator, Root, Title };
@@ -0,0 +1,69 @@
1
+ import { Flex } from "../../layout/flex/index.js";
2
+ import "../../layout/index.js";
3
+ import field_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.js";
4
+ import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
5
+ import { Show, createUniqueId, splitProps } from "solid-js";
6
+ import { callMaybeCallableChild, combineClass, mountStyle } from "solid-tiny-utils";
7
+
8
+ //#region src/components/field/parts.tsx
9
+ var _tmpl$ = /* @__PURE__ */ template(`<span aria-hidden=true class=tiny-field__required-indicator>*`), _tmpl$2 = /* @__PURE__ */ template(`<p class=tiny-field__description>`);
10
+ function Root(props) {
11
+ mountStyle(field_default, "tiny-field");
12
+ const [local, others] = splitProps(props, [
13
+ "orientation",
14
+ "children",
15
+ "gap"
16
+ ]);
17
+ return createComponent(Flex, mergeProps(others, {
18
+ get gap() {
19
+ return local.gap ?? "sm";
20
+ },
21
+ get vertical() {
22
+ return local.orientation !== "horizontal";
23
+ },
24
+ get children() {
25
+ return callMaybeCallableChild(local.children, { uniqueId: `field_${createUniqueId()}` });
26
+ }
27
+ }));
28
+ }
29
+ function Title(props) {
30
+ const [local, others] = splitProps(props, [
31
+ "children",
32
+ "class",
33
+ "gap"
34
+ ]);
35
+ return createComponent(Flex, mergeProps(others, {
36
+ get as() {
37
+ return others.for ? "label" : "div";
38
+ },
39
+ get ["class"]() {
40
+ return combineClass("tiny-field__label", local.class);
41
+ },
42
+ get gap() {
43
+ return local.gap ?? "xs";
44
+ },
45
+ get children() {
46
+ return local.children;
47
+ }
48
+ }));
49
+ }
50
+ function RequiredIndicator(props) {
51
+ return createComponent(Show, {
52
+ get when() {
53
+ return props.show;
54
+ },
55
+ get children() {
56
+ return _tmpl$();
57
+ }
58
+ });
59
+ }
60
+ function Description(props) {
61
+ return (() => {
62
+ var _el$2 = _tmpl$2();
63
+ insert(_el$2, () => props.children);
64
+ return _el$2;
65
+ })();
66
+ }
67
+
68
+ //#endregion
69
+ export { Description, RequiredIndicator, Root, Title };
@@ -0,0 +1,41 @@
1
+ import { Flex } from "../../layout/flex/index.jsx";
2
+ import "../../layout/index.jsx";
3
+ import field_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.jsx";
4
+ import { Show, createUniqueId, splitProps } from "solid-js";
5
+ import { callMaybeCallableChild, combineClass, mountStyle } from "solid-tiny-utils";
6
+
7
+ //#region src/components/field/parts.tsx
8
+ function Root(props) {
9
+ mountStyle(field_default, "tiny-field");
10
+ const [local, others] = splitProps(props, [
11
+ "orientation",
12
+ "children",
13
+ "gap"
14
+ ]);
15
+ return <Flex {...others} gap={local.gap ?? "sm"} vertical={local.orientation !== "horizontal"}>
16
+ {callMaybeCallableChild(local.children, { uniqueId: `field_${createUniqueId()}` })}
17
+ </Flex>;
18
+ }
19
+ function Title(props) {
20
+ const [local, others] = splitProps(props, [
21
+ "children",
22
+ "class",
23
+ "gap"
24
+ ]);
25
+ return <Flex {...others} as={others.for ? "label" : "div"} class={combineClass("tiny-field__label", local.class)} gap={local.gap ?? "xs"}>
26
+ {local.children}
27
+ </Flex>;
28
+ }
29
+ function RequiredIndicator(props) {
30
+ return <Show when={props.show}>
31
+ <span aria-hidden="true" class="tiny-field__required-indicator">
32
+ *
33
+ </span>
34
+ </Show>;
35
+ }
36
+ function Description(props) {
37
+ return <p class="tiny-field__description">{props.children}</p>;
38
+ }
39
+
40
+ //#endregion
41
+ export { Description, RequiredIndicator, Root, Title };
@@ -0,0 +1,26 @@
1
+ import { ClassNames, Styles } from "../../../utils/types.js";
2
+ import { JSX } from "solid-js";
3
+
4
+ //#region src/components/form-components/checkbox/checkbox.d.ts
5
+ declare function Checkbox(props: {
6
+ checked?: boolean;
7
+ disabled?: boolean;
8
+ onChange?: (checked: boolean) => void;
9
+ value?: string;
10
+ name?: string;
11
+ id?: string;
12
+ children?: JSX.Element;
13
+ indeterminate?: boolean;
14
+ classNames?: ClassNames<"root" | "box" | "indicator" | "label", {
15
+ checked: boolean;
16
+ disabled: boolean;
17
+ indeterminate: boolean;
18
+ }>;
19
+ styles?: Styles<"root" | "box" | "indicator" | "label", {
20
+ checked: boolean;
21
+ disabled: boolean;
22
+ indeterminate: boolean;
23
+ }>;
24
+ }): JSX.Element;
25
+ //#endregion
26
+ export { Checkbox };
@@ -0,0 +1,118 @@
1
+ import { CheckBold } from "../../../icons/check-bold.js";
2
+ import { IconSubtract } from "../../../icons/subtract.js";
3
+ import "../../../icons/index.js";
4
+ import { createClassStyles } from "../../../utils/index.js";
5
+ import { CheckboxCore } from "../../../primitives/checkbox/index.js";
6
+ import "../../../primitives/index.js";
7
+ import checkbox_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.js";
8
+ import { className, createComponent, effect, insert, style, template } from "solid-js/web";
9
+ import { Show, children } from "solid-js";
10
+ import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
11
+
12
+ //#region src/components/form-components/checkbox/checkbox.tsx
13
+ var _tmpl$ = /* @__PURE__ */ template(`<div><div>`), _tmpl$2 = /* @__PURE__ */ template(`<span>`);
14
+ function Checkbox(props) {
15
+ mountStyle(checkbox_default, "tiny-checkbox");
16
+ const label = children(() => props.children);
17
+ return createComponent(CheckboxCore, {
18
+ get checked() {
19
+ return props.checked;
20
+ },
21
+ get disabled() {
22
+ return props.disabled;
23
+ },
24
+ get indeterminate() {
25
+ return props.indeterminate;
26
+ },
27
+ get name() {
28
+ return props.name;
29
+ },
30
+ get onChange() {
31
+ return props.onChange;
32
+ },
33
+ get value() {
34
+ return props.value;
35
+ },
36
+ children: (state) => {
37
+ const [stateClasses, stateStyles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
38
+ checked: state.checked,
39
+ disabled: state.disabled,
40
+ indeterminate: state.indeterminate
41
+ }));
42
+ return createComponent(CheckboxCore.Label, {
43
+ get ["class"]() {
44
+ return combineClass("tiny-checkbox", stateClasses().root);
45
+ },
46
+ get ["data-checked"]() {
47
+ return dataIf(state.checked);
48
+ },
49
+ get ["data-disabled"]() {
50
+ return dataIf(state.disabled);
51
+ },
52
+ get ["data-indeterminate"]() {
53
+ return dataIf(state.indeterminate);
54
+ },
55
+ get style() {
56
+ return combineStyle({}, stateStyles().root);
57
+ },
58
+ get children() {
59
+ return [
60
+ createComponent(CheckboxCore.Input, { get id() {
61
+ return props.id;
62
+ } }),
63
+ (() => {
64
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
65
+ insert(_el$2, createComponent(Show, {
66
+ get fallback() {
67
+ return createComponent(IconSubtract, { size: "100%" });
68
+ },
69
+ get when() {
70
+ return !props.indeterminate;
71
+ },
72
+ get children() {
73
+ return createComponent(CheckBold, { size: "100%" });
74
+ }
75
+ }));
76
+ effect((_p$) => {
77
+ var _v$ = combineClass("tiny-checkbox-box", stateClasses().box), _v$2 = combineStyle({}, stateStyles().box), _v$3 = combineClass("tiny-checkbox-indicator", stateClasses().indicator), _v$4 = combineStyle({}, stateStyles().indicator);
78
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
79
+ _p$.t = style(_el$, _v$2, _p$.t);
80
+ _v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
81
+ _p$.o = style(_el$2, _v$4, _p$.o);
82
+ return _p$;
83
+ }, {
84
+ e: void 0,
85
+ t: void 0,
86
+ a: void 0,
87
+ o: void 0
88
+ });
89
+ return _el$;
90
+ })(),
91
+ createComponent(Show, {
92
+ get when() {
93
+ return label();
94
+ },
95
+ get children() {
96
+ var _el$3 = _tmpl$2();
97
+ insert(_el$3, label);
98
+ effect((_p$) => {
99
+ var _v$5 = combineClass("tiny-checkbox-label", stateClasses().label), _v$6 = combineStyle({}, stateStyles().label);
100
+ _v$5 !== _p$.e && className(_el$3, _p$.e = _v$5);
101
+ _p$.t = style(_el$3, _v$6, _p$.t);
102
+ return _p$;
103
+ }, {
104
+ e: void 0,
105
+ t: void 0
106
+ });
107
+ return _el$3;
108
+ }
109
+ })
110
+ ];
111
+ }
112
+ });
113
+ }
114
+ });
115
+ }
116
+
117
+ //#endregion
118
+ export { Checkbox };
@@ -0,0 +1,42 @@
1
+ import { CheckBold } from "../../../icons/check-bold.jsx";
2
+ import { IconSubtract } from "../../../icons/subtract.jsx";
3
+ import "../../../icons/index.jsx";
4
+ import { createClassStyles } from "../../../utils/index.jsx";
5
+ import { CheckboxCore } from "../../../primitives/checkbox/index.jsx";
6
+ import "../../../primitives/index.jsx";
7
+ import checkbox_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.jsx";
8
+ import { Show, children } from "solid-js";
9
+ import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
10
+
11
+ //#region src/components/form-components/checkbox/checkbox.tsx
12
+ function Checkbox(props) {
13
+ mountStyle(checkbox_default, "tiny-checkbox");
14
+ const label = children(() => props.children);
15
+ return <CheckboxCore checked={props.checked} disabled={props.disabled} indeterminate={props.indeterminate} name={props.name} onChange={props.onChange} value={props.value}>
16
+ {(state) => {
17
+ const [stateClasses, stateStyles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
18
+ checked: state.checked,
19
+ disabled: state.disabled,
20
+ indeterminate: state.indeterminate
21
+ }));
22
+ return <CheckboxCore.Label class={combineClass("tiny-checkbox", stateClasses().root)} data-checked={dataIf(state.checked)} data-disabled={dataIf(state.disabled)} data-indeterminate={dataIf(state.indeterminate)} style={combineStyle({}, stateStyles().root)}>
23
+ <CheckboxCore.Input id={props.id} />
24
+ <div class={combineClass("tiny-checkbox-box", stateClasses().box)} style={combineStyle({}, stateStyles().box)}>
25
+ <div class={combineClass("tiny-checkbox-indicator", stateClasses().indicator)} style={combineStyle({}, stateStyles().indicator)}>
26
+ <Show fallback={<IconSubtract size="100%" />} when={!props.indeterminate}>
27
+ <CheckBold size="100%" />
28
+ </Show>
29
+ </div>
30
+ </div>
31
+ <Show when={label()}>
32
+ <span class={combineClass("tiny-checkbox-label", stateClasses().label)} style={combineStyle({}, stateStyles().label)}>
33
+ {label()}
34
+ </span>
35
+ </Show>
36
+ </CheckboxCore.Label>;
37
+ }}
38
+ </CheckboxCore>;
39
+ }
40
+
41
+ //#endregion
42
+ export { Checkbox };
@@ -0,0 +1 @@
1
+ import { Checkbox } from "./checkbox.js";
@@ -0,0 +1 @@
1
+ import { Checkbox } from "./checkbox.js";
@@ -0,0 +1 @@
1
+ import { Checkbox } from "./checkbox.jsx";
@@ -0,0 +1,26 @@
1
+ import { ClassNames, OmitComponentProps, Styles } from "../../../utils/types.js";
2
+ import { Flex } from "../../../layout/flex/index.js";
3
+ import "../../../layout/index.js";
4
+ import { JSX } from "solid-js/jsx-runtime";
5
+
6
+ //#region src/components/form-components/checkbox-group/checkbox-group.d.ts
7
+ interface CheckboxOption<T> {
8
+ label: JSX.Element;
9
+ value: T;
10
+ disabled?: boolean;
11
+ }
12
+ declare function CheckboxGroup<T extends string | number>(props: {
13
+ options?: CheckboxOption<T>[];
14
+ value?: T[];
15
+ onChange?: (value: T[]) => void;
16
+ disabled?: boolean;
17
+ name?: string;
18
+ classNames?: ClassNames<"root", {
19
+ disabled: boolean;
20
+ }>;
21
+ styles?: Styles<"root", {
22
+ disabled: boolean;
23
+ }>;
24
+ } & OmitComponentProps<typeof Flex, "children">): JSX.Element;
25
+ //#endregion
26
+ export { CheckboxGroup, CheckboxOption };