fuma 2.0.50 → 2.1.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 (340) hide show
  1. package/dist/action/index.d.ts +2 -5
  2. package/dist/action/index.js +2 -5
  3. package/dist/action/list/handlers.d.ts +6 -6
  4. package/dist/action/list/handlers.js +6 -5
  5. package/dist/action/list/index.d.ts +1 -1
  6. package/dist/action/list/index.js +11 -5
  7. package/dist/action/list/trigger.js +6 -2
  8. package/dist/action/list/utils.js +1 -1
  9. package/dist/action/tip.js +2 -2
  10. package/dist/command/command.svelte.d.ts +16 -0
  11. package/dist/command/command.svelte.js +68 -0
  12. package/dist/command/index.d.ts +1 -0
  13. package/dist/command/index.js +1 -0
  14. package/dist/data.d.ts +87 -0
  15. package/dist/data.js +51 -0
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.js +5 -5
  18. package/dist/input/InputBoolean.svelte +107 -0
  19. package/dist/input/InputBoolean.svelte.d.ts +12 -0
  20. package/dist/input/InputNumber.svelte +33 -0
  21. package/dist/input/InputNumber.svelte.d.ts +10 -0
  22. package/dist/input/InputRadio.svelte +56 -0
  23. package/dist/input/InputRadio.svelte.d.ts +11 -0
  24. package/dist/input/InputRange.svelte +30 -0
  25. package/dist/input/InputRange.svelte.d.ts +10 -0
  26. package/dist/input/InputRelation.svelte +119 -0
  27. package/dist/input/InputRelation.svelte.d.ts +39 -0
  28. package/dist/input/InputSelect.svelte +113 -0
  29. package/dist/input/InputSelect.svelte.d.ts +37 -0
  30. package/dist/input/InputSelectNative.svelte +56 -0
  31. package/dist/input/InputSelectNative.svelte.d.ts +12 -0
  32. package/dist/input/InputString.svelte +48 -0
  33. package/dist/input/InputString.svelte.d.ts +11 -0
  34. package/dist/input/InputTextarea.svelte +47 -0
  35. package/dist/input/InputTextarea.svelte.d.ts +11 -0
  36. package/dist/input/Issues.svelte +21 -0
  37. package/dist/input/Issues.svelte.d.ts +7 -0
  38. package/dist/input/index.d.ts +11 -0
  39. package/dist/input/index.js +10 -0
  40. package/dist/input/type.d.ts +5 -0
  41. package/dist/popover/Popover.svelte +50 -0
  42. package/dist/popover/index.d.ts +2 -0
  43. package/dist/popover/index.js +2 -0
  44. package/dist/popover/popover.svelte.d.ts +26 -0
  45. package/dist/popover/popover.svelte.js +101 -0
  46. package/dist/remote/useForm.d.ts +6 -0
  47. package/dist/remote/useForm.js +22 -0
  48. package/dist/search/Spans.svelte +15 -0
  49. package/dist/search/Spans.svelte.d.ts +7 -0
  50. package/dist/search/index.d.ts +2 -0
  51. package/dist/search/index.js +2 -0
  52. package/dist/search/search.js +96 -0
  53. package/dist/server/index.d.ts +0 -4
  54. package/dist/server/index.js +0 -4
  55. package/dist/server/parseQuery.js +1 -1
  56. package/dist/server/sse.js +4 -4
  57. package/dist/server/table.js +1 -1
  58. package/dist/state/index.d.ts +1 -0
  59. package/dist/state/index.js +1 -0
  60. package/dist/state/param.svelte.d.ts +17 -0
  61. package/dist/state/param.svelte.js +64 -0
  62. package/dist/ui/button/ButtonDelete.svelte +49 -28
  63. package/dist/ui/button/ButtonDelete.svelte.d.ts +12 -31
  64. package/dist/ui/button/index.d.ts +0 -1
  65. package/dist/ui/button/index.js +0 -1
  66. package/dist/ui/copy/ButtonCopy.svelte +43 -0
  67. package/dist/ui/copy/ButtonCopy.svelte.d.ts +17 -0
  68. package/dist/ui/copy/index.d.ts +2 -0
  69. package/dist/ui/copy/index.js +2 -0
  70. package/dist/ui/copy/useCopy.svelte.d.ts +10 -0
  71. package/dist/ui/copy/useCopy.svelte.js +36 -0
  72. package/dist/ui/dialog/Dialog.svelte +56 -26
  73. package/dist/ui/dialog/Dialog.svelte.d.ts +14 -35
  74. package/dist/ui/dialog/index.d.ts +0 -1
  75. package/dist/ui/dialog/index.js +0 -1
  76. package/dist/ui/drawer/Drawer.svelte +53 -45
  77. package/dist/ui/drawer/Drawer.svelte.d.ts +8 -63
  78. package/dist/ui/drawer/drawerFly.js +1 -1
  79. package/dist/ui/drawer/useLayer.svelte.d.ts +5 -0
  80. package/dist/ui/drawer/useLayer.svelte.js +33 -0
  81. package/dist/ui/index.d.ts +4 -12
  82. package/dist/ui/index.js +4 -12
  83. package/dist/ui/menu/ContextMenu.svelte +27 -26
  84. package/dist/ui/menu/ContextMenu.svelte.d.ts +9 -35
  85. package/dist/ui/menu/DropDown.svelte +44 -26
  86. package/dist/ui/menu/DropDown.svelte.d.ts +18 -43
  87. package/dist/ui/menu/DropDownMenu.svelte +51 -41
  88. package/dist/ui/menu/DropDownMenu.svelte.d.ts +7 -29
  89. package/dist/ui/menu/dropdown.css +4 -4
  90. package/dist/ui/menu/index.d.ts +1 -1
  91. package/dist/ui/menu/index.js +2 -1
  92. package/dist/ui/mode/ToggleMode.svelte +25 -14
  93. package/dist/ui/mode/ToggleMode.svelte.d.ts +10 -35
  94. package/dist/ui/mode/index.d.ts +1 -1
  95. package/dist/ui/mode/index.js +1 -1
  96. package/dist/ui/mode/useMode.svelte.d.ts +8 -0
  97. package/dist/ui/mode/useMode.svelte.js +40 -0
  98. package/dist/ui/pagination/Pagination.svelte +18 -14
  99. package/dist/ui/pagination/Pagination.svelte.d.ts +4 -18
  100. package/dist/ui/range/RangePicker.svelte +3 -2
  101. package/dist/ui/range/RangePickerButton.svelte +49 -37
  102. package/dist/ui/range/RangePickerButton.svelte.d.ts +7 -21
  103. package/dist/ui/range/index.d.ts +1 -1
  104. package/dist/ui/range/index.js +1 -1
  105. package/dist/ui/table/Table.svelte +17 -24
  106. package/dist/ui/table/Table.svelte.d.ts +3 -3
  107. package/dist/ui/table/TableBody.svelte +1 -1
  108. package/dist/ui/table/TableBody.svelte.d.ts +1 -1
  109. package/dist/ui/table/TableFieldsEdition.svelte +90 -78
  110. package/dist/ui/table/TableFieldsEdition.svelte.d.ts +14 -13
  111. package/dist/ui/table/TableHead.svelte +1 -1
  112. package/dist/ui/table/TableViewSelect.svelte +71 -70
  113. package/dist/ui/table/TableViewSelect.svelte.d.ts +10 -23
  114. package/dist/ui/table/cell/TableCellArray.svelte +2 -2
  115. package/dist/ui/table/cell/TableCellBoolean.svelte +3 -4
  116. package/dist/ui/table/cell/index.d.ts +1 -1
  117. package/dist/ui/table/cell/index.js +1 -1
  118. package/dist/ui/table/field.d.ts +7 -7
  119. package/dist/ui/table/head/OrderButtons.svelte +18 -13
  120. package/dist/ui/table/head/OrderButtons.svelte.d.ts +11 -23
  121. package/dist/ui/table/head/TableHeadBoolean.svelte +3 -3
  122. package/dist/ui/table/head/TableHeadDate.svelte +40 -56
  123. package/dist/ui/table/head/TableHeadDate.svelte.d.ts +1 -1
  124. package/dist/ui/table/head/TableHeadDefault.svelte +2 -1
  125. package/dist/ui/table/head/TableHeadNumber.svelte +93 -108
  126. package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +13 -10
  127. package/dist/ui/table/head/TableHeadSelect.svelte +55 -52
  128. package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +13 -10
  129. package/dist/ui/table/head/TableHeadString.svelte +28 -34
  130. package/dist/ui/table/head/index.d.ts +3 -3
  131. package/dist/ui/table/head/index.js +3 -3
  132. package/dist/ui/table/index.d.ts +5 -5
  133. package/dist/ui/table/index.js +4 -5
  134. package/dist/utils/csv.js +1 -1
  135. package/dist/utils/eventEmitter.d.ts +2 -2
  136. package/dist/utils/eventEmitter.js +18 -11
  137. package/dist/utils/index.d.ts +4 -6
  138. package/dist/utils/index.js +4 -6
  139. package/dist/utils/normalizePath.js +1 -1
  140. package/dist/utils/options.d.ts +6 -5
  141. package/dist/utils/options.js +3 -2
  142. package/dist/utils/tippy.d.ts +1 -1
  143. package/dist/utils/tippy.js +1 -1
  144. package/dist/validation/index.d.ts +0 -1
  145. package/dist/validation/index.js +0 -1
  146. package/dist/validation/zod.d.ts +12 -393
  147. package/dist/validation/zod.js +22 -82
  148. package/package.json +115 -134
  149. package/dist/action/heightScreen.d.ts +0 -10
  150. package/dist/action/heightScreen.js +0 -24
  151. package/dist/action/portal.d.ts +0 -3
  152. package/dist/action/portal.js +0 -9
  153. package/dist/action/selector.d.ts +0 -15
  154. package/dist/action/selector.js +0 -71
  155. package/dist/api/client.d.ts +0 -3
  156. package/dist/api/client.js +0 -24
  157. package/dist/api/config.d.ts +0 -46
  158. package/dist/api/config.js +0 -7
  159. package/dist/api/index.d.ts +0 -3
  160. package/dist/api/index.js +0 -3
  161. package/dist/api/server.d.ts +0 -11
  162. package/dist/api/server.js +0 -17
  163. package/dist/private/Meta.svelte +0 -16
  164. package/dist/private/Meta.svelte.d.ts +0 -30
  165. package/dist/private/api.d.ts +0 -61
  166. package/dist/private/api.js +0 -10
  167. package/dist/private/constant.d.ts +0 -14
  168. package/dist/private/constant.js +0 -6
  169. package/dist/private/model.d.ts +0 -70
  170. package/dist/private/model.js +0 -25
  171. package/dist/private/prisma.d.ts +0 -2
  172. package/dist/private/prisma.js +0 -2
  173. package/dist/private/store.d.ts +0 -1
  174. package/dist/private/store.js +0 -2
  175. package/dist/server/auth.d.ts +0 -12
  176. package/dist/server/auth.js +0 -15
  177. package/dist/server/formAction.d.ts +0 -13
  178. package/dist/server/formAction.js +0 -8
  179. package/dist/server/json.d.ts +0 -1
  180. package/dist/server/json.js +0 -16
  181. package/dist/server/parseFormData.d.ts +0 -10
  182. package/dist/server/parseFormData.js +0 -85
  183. package/dist/server/try.d.ts +0 -9
  184. package/dist/server/try.js +0 -41
  185. package/dist/store/index.d.ts +0 -2
  186. package/dist/store/index.js +0 -2
  187. package/dist/store/isSmallScreen.d.ts +0 -1
  188. package/dist/store/isSmallScreen.js +0 -14
  189. package/dist/store/param.d.ts +0 -22
  190. package/dist/store/param.js +0 -61
  191. package/dist/store/session.d.ts +0 -1
  192. package/dist/store/session.js +0 -13
  193. package/dist/ui/badge/Badge.svelte +0 -9
  194. package/dist/ui/badge/Badge.svelte.d.ts +0 -21
  195. package/dist/ui/badge/index.d.ts +0 -1
  196. package/dist/ui/badge/index.js +0 -1
  197. package/dist/ui/button/ButtonCopy.svelte +0 -59
  198. package/dist/ui/button/ButtonCopy.svelte.d.ts +0 -27
  199. package/dist/ui/card/Card.svelte +0 -43
  200. package/dist/ui/card/Card.svelte.d.ts +0 -41
  201. package/dist/ui/card/CardBasic.svelte +0 -15
  202. package/dist/ui/card/CardBasic.svelte.d.ts +0 -31
  203. package/dist/ui/card/CardCollapse.svelte +0 -71
  204. package/dist/ui/card/CardCollapse.svelte.d.ts +0 -39
  205. package/dist/ui/card/CardFullScreen.svelte +0 -31
  206. package/dist/ui/card/CardFullScreen.svelte.d.ts +0 -38
  207. package/dist/ui/card/CardLink.svelte +0 -22
  208. package/dist/ui/card/CardLink.svelte.d.ts +0 -31
  209. package/dist/ui/card/index.d.ts +0 -5
  210. package/dist/ui/card/index.js +0 -5
  211. package/dist/ui/context.d.ts +0 -6
  212. package/dist/ui/context.js +0 -12
  213. package/dist/ui/dialog/DialogConfirm.svelte +0 -24
  214. package/dist/ui/dialog/DialogConfirm.svelte.d.ts +0 -35
  215. package/dist/ui/drawer/layers.d.ts +0 -7
  216. package/dist/ui/drawer/layers.js +0 -68
  217. package/dist/ui/form/Form.svelte +0 -168
  218. package/dist/ui/form/Form.svelte.d.ts +0 -62
  219. package/dist/ui/form/FormInput.svelte +0 -15
  220. package/dist/ui/form/FormSection.svelte +0 -78
  221. package/dist/ui/form/FormSection.svelte.d.ts +0 -39
  222. package/dist/ui/form/form.d.ts +0 -37
  223. package/dist/ui/form/form.js +0 -57
  224. package/dist/ui/form/formInput.js +0 -33
  225. package/dist/ui/form/index.d.ts +0 -3
  226. package/dist/ui/form/index.js +0 -3
  227. package/dist/ui/icon/Icon.svelte +0 -53
  228. package/dist/ui/icon/Icon.svelte.d.ts +0 -29
  229. package/dist/ui/icon/index.d.ts +0 -1
  230. package/dist/ui/icon/index.js +0 -1
  231. package/dist/ui/input/FormControl.svelte +0 -77
  232. package/dist/ui/input/FormControl.svelte.d.ts +0 -34
  233. package/dist/ui/input/InputBoolean.svelte +0 -33
  234. package/dist/ui/input/InputBoolean.svelte.d.ts +0 -46
  235. package/dist/ui/input/InputCheckboxs.svelte +0 -71
  236. package/dist/ui/input/InputCheckboxs.svelte.d.ts +0 -57
  237. package/dist/ui/input/InputCheckboxsMenu.svelte +0 -106
  238. package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +0 -59
  239. package/dist/ui/input/InputCheckboxsTree.svelte +0 -18
  240. package/dist/ui/input/InputCheckboxsTree.svelte.d.ts +0 -25
  241. package/dist/ui/input/InputCheckboxsTreeNodes.svelte +0 -68
  242. package/dist/ui/input/InputCheckboxsTreeNodes.svelte.d.ts +0 -27
  243. package/dist/ui/input/InputCombo.svelte +0 -99
  244. package/dist/ui/input/InputCombo.svelte.d.ts +0 -59
  245. package/dist/ui/input/InputDate.svelte +0 -47
  246. package/dist/ui/input/InputDate.svelte.d.ts +0 -46
  247. package/dist/ui/input/InputDateTime.svelte +0 -41
  248. package/dist/ui/input/InputDateTime.svelte.d.ts +0 -23
  249. package/dist/ui/input/InputImage.svelte +0 -116
  250. package/dist/ui/input/InputImage.svelte.d.ts +0 -48
  251. package/dist/ui/input/InputImagePreview.svelte +0 -60
  252. package/dist/ui/input/InputImagePreview.svelte.d.ts +0 -27
  253. package/dist/ui/input/InputNumber.svelte +0 -31
  254. package/dist/ui/input/InputNumber.svelte.d.ts +0 -23
  255. package/dist/ui/input/InputOptionInParam.svelte +0 -36
  256. package/dist/ui/input/InputOptionInParam.svelte.d.ts +0 -24
  257. package/dist/ui/input/InputOptions.svelte +0 -85
  258. package/dist/ui/input/InputOptions.svelte.d.ts +0 -21
  259. package/dist/ui/input/InputPassword.svelte +0 -25
  260. package/dist/ui/input/InputPassword.svelte.d.ts +0 -45
  261. package/dist/ui/input/InputRadio.svelte +0 -84
  262. package/dist/ui/input/InputRadio.svelte.d.ts +0 -56
  263. package/dist/ui/input/InputRelation.svelte +0 -171
  264. package/dist/ui/input/InputRelation.svelte.d.ts +0 -76
  265. package/dist/ui/input/InputRelations.svelte +0 -166
  266. package/dist/ui/input/InputRelations.svelte.d.ts +0 -55
  267. package/dist/ui/input/InputSearch.svelte +0 -59
  268. package/dist/ui/input/InputSearch.svelte.d.ts +0 -29
  269. package/dist/ui/input/InputSelect.svelte +0 -84
  270. package/dist/ui/input/InputSelect.svelte.d.ts +0 -29
  271. package/dist/ui/input/InputText.svelte +0 -46
  272. package/dist/ui/input/InputText.svelte.d.ts +0 -30
  273. package/dist/ui/input/InputTextarea.svelte +0 -23
  274. package/dist/ui/input/InputTextarea.svelte.d.ts +0 -23
  275. package/dist/ui/input/InputTime.svelte +0 -47
  276. package/dist/ui/input/InputTime.svelte.d.ts +0 -46
  277. package/dist/ui/input/RelationAfter.svelte +0 -34
  278. package/dist/ui/input/RelationAfter.svelte.d.ts +0 -26
  279. package/dist/ui/input/SelectorList.svelte +0 -50
  280. package/dist/ui/input/SelectorList.svelte.d.ts +0 -49
  281. package/dist/ui/input/action.d.ts +0 -13
  282. package/dist/ui/input/action.js +0 -56
  283. package/dist/ui/input/index.d.ts +0 -26
  284. package/dist/ui/input/index.js +0 -26
  285. package/dist/ui/input/textRich/InputTextRich.svelte +0 -72
  286. package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +0 -48
  287. package/dist/ui/input/textRich/SuggesionList.svelte +0 -25
  288. package/dist/ui/input/textRich/SuggesionList.svelte.d.ts +0 -23
  289. package/dist/ui/input/textRich/ToolMark.svelte +0 -22
  290. package/dist/ui/input/textRich/ToolMark.svelte.d.ts +0 -25
  291. package/dist/ui/input/textRich/ToolMarkColor.svelte +0 -36
  292. package/dist/ui/input/textRich/ToolMarkColor.svelte.d.ts +0 -23
  293. package/dist/ui/input/textRich/ToolMarkLink.svelte +0 -72
  294. package/dist/ui/input/textRich/ToolMarkLink.svelte.d.ts +0 -21
  295. package/dist/ui/input/textRich/ToolMenu.svelte +0 -66
  296. package/dist/ui/input/textRich/ToolMenu.svelte.d.ts +0 -33
  297. package/dist/ui/input/textRich/ToolMenuAlign.svelte +0 -50
  298. package/dist/ui/input/textRich/ToolMenuAlign.svelte.d.ts +0 -21
  299. package/dist/ui/input/textRich/ToolMenuInsert.svelte +0 -54
  300. package/dist/ui/input/textRich/ToolMenuInsert.svelte.d.ts +0 -23
  301. package/dist/ui/input/textRich/ToolMenuNode.svelte +0 -60
  302. package/dist/ui/input/textRich/ToolMenuNode.svelte.d.ts +0 -21
  303. package/dist/ui/input/textRich/ToolsBar.svelte +0 -61
  304. package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +0 -24
  305. package/dist/ui/input/textRich/extensions.d.ts +0 -2
  306. package/dist/ui/input/textRich/extensions.js +0 -62
  307. package/dist/ui/input/textRich/indent.d.ts +0 -13
  308. package/dist/ui/input/textRich/indent.js +0 -112
  309. package/dist/ui/input/textRich/index.d.ts +0 -3
  310. package/dist/ui/input/textRich/index.js +0 -3
  311. package/dist/ui/input/textRich/suggestion.d.ts +0 -7
  312. package/dist/ui/input/textRich/suggestion.js +0 -55
  313. package/dist/ui/input/textRich/tiptapParser.d.ts +0 -4
  314. package/dist/ui/input/textRich/tiptapParser.js +0 -29
  315. package/dist/ui/input/types.d.ts +0 -15
  316. package/dist/ui/input/types.js +0 -1
  317. package/dist/ui/login/Login.svelte +0 -99
  318. package/dist/ui/login/Login.svelte.d.ts +0 -20
  319. package/dist/ui/login/index.d.ts +0 -1
  320. package/dist/ui/login/index.js +0 -1
  321. package/dist/ui/placeholder/Placeholder.svelte +0 -12
  322. package/dist/ui/placeholder/Placeholder.svelte.d.ts +0 -30
  323. package/dist/ui/placeholder/PlaceholderImage.svelte +0 -16
  324. package/dist/ui/placeholder/PlaceholderImage.svelte.d.ts +0 -30
  325. package/dist/ui/placeholder/index.d.ts +0 -2
  326. package/dist/ui/placeholder/index.js +0 -2
  327. package/dist/ui/table/type.d.ts +0 -2
  328. package/dist/ui/tabs/Tabs.svelte +0 -32
  329. package/dist/ui/tabs/Tabs.svelte.d.ts +0 -22
  330. package/dist/ui/tabs/TabsIcon.svelte +0 -60
  331. package/dist/ui/tabs/TabsIcon.svelte.d.ts +0 -24
  332. package/dist/ui/tabs/index.d.ts +0 -8
  333. package/dist/ui/tabs/index.js +0 -2
  334. package/dist/utils/avatar.d.ts +0 -1
  335. package/dist/utils/avatar.js +0 -5
  336. package/dist/utils/component.d.ts +0 -6
  337. package/dist/utils/component.js +0 -3
  338. package/dist/validation/form.d.ts +0 -34
  339. package/dist/validation/form.js +0 -103
  340. /package/dist/{ui/table → input}/type.js +0 -0
@@ -1,59 +0,0 @@
1
- <script lang="ts">
2
- import { mdiClipboardTextOutline } from '@mdi/js'
3
- import { toast } from 'svelte-sonner'
4
- import { Icon } from '../icon/index.js'
5
- import { createEventDispatcher } from 'svelte'
6
- let valueOrGetValue: string | (() => Promise<string>)
7
- export { valueOrGetValue as value }
8
- export let title = ''
9
- export let label = ''
10
- export let icon = mdiClipboardTextOutline
11
- export let successMessage = 'Copied'
12
- let klass = ''
13
- export { klass as class }
14
-
15
- let isLoading = false
16
- const disptach = createEventDispatcher<{ success: void }>()
17
-
18
- async function loadValue(): Promise<string> {
19
- if (typeof valueOrGetValue === 'string') return valueOrGetValue
20
- return valueOrGetValue()
21
- }
22
-
23
- async function handleClick() {
24
- if (isLoading) return
25
- isLoading = true
26
- const value = await loadValue().finally(() => (isLoading = false))
27
-
28
- navigator.clipboard
29
- .writeText(value)
30
- .then(() => {
31
- toast.success(successMessage)
32
- disptach('success')
33
- })
34
- .catch((error) => {
35
- toast.error(error)
36
- })
37
- }
38
- </script>
39
-
40
- <div class="relative">
41
- {#if isLoading}
42
- <span class="loading loading-spinner absolute top-1 left-1 scale-125 opacity-25"></span>
43
- {/if}
44
- <button
45
- class={klass ? klass : `btn btn-sm ${label ? '' : ' btn-square'}`}
46
- on:click|preventDefault={handleClick}
47
- class:btn-disabled={isLoading}
48
- >
49
- <Icon
50
- path={icon}
51
- size={20}
52
- {title}
53
- class="transition-transform {isLoading ? 'scale-75' : ''}"
54
- />
55
- {#if label}
56
- <span>{label}</span>
57
- {/if}
58
- </button>
59
- </div>
@@ -1,27 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const ButtonCopy: $$__sveltets_2_IsomorphicComponent<{
15
- value: string | (() => Promise<string>);
16
- title?: string;
17
- label?: string;
18
- icon?: string;
19
- successMessage?: string;
20
- class?: string;
21
- }, {
22
- success: CustomEvent<void>;
23
- } & {
24
- [evt: string]: CustomEvent<any>;
25
- }, {}, {}, string>;
26
- type ButtonCopy = InstanceType<typeof ButtonCopy>;
27
- export default ButtonCopy;
@@ -1,43 +0,0 @@
1
- <script lang="ts">
2
- import { mdiArrowLeft } from '@mdi/js'
3
- import { Icon } from '../icon/index.js'
4
- import { contextContainer } from '../context.js'
5
-
6
- let klass = ''
7
- export { klass as class }
8
- export let bodyClass = ''
9
- export let headerClass = ''
10
- export let returnUrl = ''
11
- export let style = ''
12
-
13
- contextContainer.set('card')
14
- </script>
15
-
16
- <div class="card bordered border bg-base-100 shadow-lg {klass}" {style}>
17
- <slot name="top" />
18
-
19
- <div class="card-body rounded-b-2xl p-2 sm:p-8 {bodyClass}">
20
- {#if $$slots.title || $$slots.action}
21
- <div class="flex flex-wrap items-center gap-2 {headerClass}">
22
- {#if returnUrl}
23
- <a href={returnUrl} class="btn btn-square btn-ghost btn-sm">
24
- <Icon path={mdiArrowLeft} size={20} />
25
- </a>
26
- {/if}
27
-
28
- <div class="title grow">
29
- <slot name="title" />
30
- </div>
31
- <slot name="action" />
32
- </div>
33
-
34
- {#if $$slots.subtitle}
35
- <div class="my-4 text-sm opacity-80">
36
- <slot name="subtitle" />
37
- </div>
38
- {/if}
39
- {/if}
40
-
41
- <slot />
42
- </div>
43
- </div>
@@ -1,41 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const Card: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- class?: string;
21
- bodyClass?: string;
22
- headerClass?: string;
23
- returnUrl?: string;
24
- style?: string;
25
- }, {
26
- top: {};
27
- title: {};
28
- action: {};
29
- subtitle: {};
30
- default: {};
31
- }>, {
32
- [evt: string]: CustomEvent<any>;
33
- }, {
34
- top: {};
35
- title: {};
36
- action: {};
37
- subtitle: {};
38
- default: {};
39
- }, {}, string>;
40
- type Card = InstanceType<typeof Card>;
41
- export default Card;
@@ -1,15 +0,0 @@
1
- <script lang="ts">
2
- export let title = ''
3
- let klass = ''
4
- export { klass as class }
5
- export let style = ''
6
- </script>
7
-
8
- <div class="{klass} bg-base-100 border rounded-lg p-2 sm:p-5" {style}>
9
- {#if title}
10
- <h2 class="font-medium mb-2">
11
- {title}
12
- </h2>
13
- {/if}
14
- <slot />
15
- </div>
@@ -1,31 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const CardBasic: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- title?: string;
21
- class?: string;
22
- style?: string;
23
- }, {
24
- default: {};
25
- }>, {
26
- [evt: string]: CustomEvent<any>;
27
- }, {
28
- default: {};
29
- }, {}, string>;
30
- type CardBasic = InstanceType<typeof CardBasic>;
31
- export default CardBasic;
@@ -1,71 +0,0 @@
1
- <script lang="ts">
2
- import { onDestroy } from 'svelte'
3
- import { slide } from 'svelte/transition'
4
- import { mdiChevronRight } from '@mdi/js'
5
-
6
- import { Icon } from '../icon/index.js'
7
- import { urlParam } from '../../store/index.js'
8
- import { goto } from '$app/navigation'
9
-
10
- export let value: string
11
- let klass = ''
12
- export { klass as class }
13
- export let classHeader = ''
14
- export let classBody = ''
15
- export let classTitle = ''
16
-
17
- $: isOpen = $urlParam.hasValue('section', value)
18
- let header: HTMLDivElement
19
-
20
- let timeout: NodeJS.Timeout
21
- async function handleClick(event: MouseEvent | null) {
22
- if (isClickOnInteractiveElement(event)) return
23
- await goto($urlParam.toggle({ section: value }), { noScroll: true, keepFocus: true })
24
- }
25
-
26
- function isClickOnInteractiveElement(event: MouseEvent | null) {
27
- if (!event) return false
28
- const target = event.target as HTMLElement
29
- const elements = [...header.querySelectorAll('a, button')]
30
- return !!elements.filter((element) => element.contains(target)).length
31
- }
32
-
33
- onDestroy(() => {
34
- clearTimeout(timeout)
35
- })
36
- </script>
37
-
38
- <section class="card bordered border bg-base-100 shadow-md {klass}">
39
- <div
40
- id={value}
41
- bind:this={header}
42
- tabindex="0"
43
- class="min-w-0 grow cursor-pointer p-2 sm:px-5 sm:py-3 {classHeader}"
44
- role="link"
45
- on:click={handleClick}
46
- on:keydown={(e) => e.key === ' ' && handleClick(null)}
47
- >
48
- <slot name="header">
49
- <div class="flex gap-2">
50
- <div class="min-w-0 overflow-hidden text-ellipsis font-medium {classTitle}">
51
- <slot name="title" />
52
- </div>
53
- <Icon
54
- path={mdiChevronRight}
55
- class="ml-auto opacity-80 transition-transform {isOpen ? 'rotate-90' : ''}"
56
- />
57
- </div>
58
-
59
- <slot name="subtitle" />
60
- </slot>
61
- </div>
62
-
63
- {#if isOpen}
64
- <div
65
- class="card-body p-2 pt-0 sm:px-5 sm:py-3 {classBody}"
66
- transition:slide={{ duration: 200 }}
67
- >
68
- <slot />
69
- </div>
70
- {/if}
71
- </section>
@@ -1,39 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const CardCollapse: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- value: string;
21
- class?: string;
22
- classHeader?: string;
23
- classBody?: string;
24
- classTitle?: string;
25
- }, {
26
- header: {};
27
- title: {};
28
- subtitle: {};
29
- default: {};
30
- }>, {
31
- [evt: string]: CustomEvent<any>;
32
- }, {
33
- header: {};
34
- title: {};
35
- subtitle: {};
36
- default: {};
37
- }, {}, string>;
38
- type CardCollapse = InstanceType<typeof CardCollapse>;
39
- export default CardCollapse;
@@ -1,31 +0,0 @@
1
- <script lang="ts">
2
- import { mdiArrowCollapse, mdiArrowExpand } from '@mdi/js'
3
- import { Icon } from '../icon/index.js'
4
- import { Card } from './index.js'
5
-
6
- export let isFullScreen = false
7
- let klass = ''
8
- export { klass as class }
9
- </script>
10
-
11
- <Card
12
- class="{isFullScreen ? 'fixed inset-2 p-2' : ''} {klass}"
13
- bodyClass={isFullScreen ? 'sm:p-2 grow overflow-hidden' : ''}
14
- >
15
- <div class="contents" slot="title">
16
- <slot name="title" />
17
- </div>
18
-
19
- <div slot="action" class="flex gap-2">
20
- <slot name="action" />
21
- <button class="btn btn-square btn-sm" on:click={() => (isFullScreen = !isFullScreen)}>
22
- {#if isFullScreen}
23
- <Icon path={mdiArrowCollapse} />
24
- {:else}
25
- <Icon path={mdiArrowExpand} />
26
- {/if}
27
- </button>
28
- </div>
29
-
30
- <slot {isFullScreen} />
31
- </Card>
@@ -1,38 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const CardFullScreen: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- isFullScreen?: boolean;
21
- class?: string;
22
- }, {
23
- title: {};
24
- action: {};
25
- default: {
26
- isFullScreen: boolean;
27
- };
28
- }>, {
29
- [evt: string]: CustomEvent<any>;
30
- }, {
31
- title: {};
32
- action: {};
33
- default: {
34
- isFullScreen: boolean;
35
- };
36
- }, {}, string>;
37
- type CardFullScreen = InstanceType<typeof CardFullScreen>;
38
- export default CardFullScreen;
@@ -1,22 +0,0 @@
1
- <script lang="ts">
2
- export let href: string
3
- export let title = ''
4
- let klass = ''
5
- export { klass as class }
6
- </script>
7
-
8
- <div
9
- class="
10
- {klass} relative
11
- shadow hover:shadow-md transition-all
12
- bg-base-100 border rounded-lg p-2 sm:p-5
13
- "
14
- >
15
- {#if title}
16
- <h2 class="font-medium mb-2">
17
- {title}
18
- </h2>
19
- {/if}
20
- <slot />
21
- <a {href} class="absolute inset-0">{' '}</a>
22
- </div>
@@ -1,31 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const CardLink: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- href: string;
21
- title?: string;
22
- class?: string;
23
- }, {
24
- default: {};
25
- }>, {
26
- [evt: string]: CustomEvent<any>;
27
- }, {
28
- default: {};
29
- }, {}, string>;
30
- type CardLink = InstanceType<typeof CardLink>;
31
- export default CardLink;
@@ -1,5 +0,0 @@
1
- export { default as Card } from './Card.svelte';
2
- export { default as CardBasic } from './CardBasic.svelte';
3
- export { default as CardCollapse } from './CardCollapse.svelte';
4
- export { default as CardFullScreen } from './CardFullScreen.svelte';
5
- export { default as CardLink } from './CardLink.svelte';
@@ -1,5 +0,0 @@
1
- export { default as Card } from './Card.svelte';
2
- export { default as CardBasic } from './CardBasic.svelte';
3
- export { default as CardCollapse } from './CardCollapse.svelte';
4
- export { default as CardFullScreen } from './CardFullScreen.svelte';
5
- export { default as CardLink } from './CardLink.svelte';
@@ -1,6 +0,0 @@
1
- type Container = 'drawer' | 'card' | 'dialog';
2
- export declare const contextContainer: {
3
- set(container: Container): Container;
4
- get(): Container | null;
5
- };
6
- export {};
@@ -1,12 +0,0 @@
1
- import { getContext, setContext } from 'svelte';
2
- const KEYS = {
3
- container: 'container'
4
- };
5
- export const contextContainer = {
6
- set(container) {
7
- return setContext(KEYS.container, container);
8
- },
9
- get() {
10
- return getContext(KEYS.container);
11
- }
12
- };
@@ -1,24 +0,0 @@
1
- <script lang="ts">
2
- import { Dialog } from './index.js'
3
-
4
- let dialog: HTMLDialogElement
5
- let klass = ''
6
- export { klass as class }
7
- </script>
8
-
9
- <button type="button" on:click={() => dialog.showModal()} class="btn btn-ghost {klass}">
10
- <slot name="activator">Confirm button</slot>
11
- </button>
12
-
13
- <Dialog bind:dialog>
14
- <div slot="header" class="contents">
15
- <slot name="header">Confirmation</slot>
16
- </div>
17
- <slot />
18
- <div class="mt-10 flex justify-end gap-2">
19
- <button type="button" class="btn btn-ghost" on:click={() => dialog.close()}>
20
- Annuler
21
- </button>
22
- <slot name="action" />
23
- </div>
24
- </Dialog>
@@ -1,35 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const DialogConfirm: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- class?: string;
21
- }, {
22
- activator: {};
23
- header: {};
24
- default: {};
25
- action: {};
26
- }>, {
27
- [evt: string]: CustomEvent<any>;
28
- }, {
29
- activator: {};
30
- header: {};
31
- default: {};
32
- action: {};
33
- }, {}, string>;
34
- type DialogConfirm = InstanceType<typeof DialogConfirm>;
35
- export default DialogConfirm;
@@ -1,7 +0,0 @@
1
- import { type Readable } from 'svelte/store';
2
- export declare function subscibeDrawerLayers(key: string): {
3
- isActive: Readable<boolean>;
4
- index: Readable<number>;
5
- offset: Readable<number>;
6
- destroy(): void;
7
- };
@@ -1,68 +0,0 @@
1
- import { derived, writable } from 'svelte/store';
2
- import { page } from '$app/stores';
3
- import { browser } from '$app/environment';
4
- const layers = writable([]);
5
- const layersOffset = derived(layers, ($layers) => {
6
- const nbDrawer = $layers.length;
7
- return $layers.reduce((acc, layer, index) => {
8
- const drawerOffset = nbDrawer - index - 1;
9
- return { ...acc, [layer]: drawerOffset };
10
- }, {});
11
- });
12
- export function subscibeDrawerLayers(key) {
13
- const layerId = Math.random().toString().slice(2, 12);
14
- let isInitialized = false;
15
- const isActive = derived(page, ({ url }) => url.searchParams.has(key), false);
16
- const isActiveUnsubscribe = isActive.subscribe(($isActive) => {
17
- if ($isActive)
18
- addLayer();
19
- else if (isInitialized)
20
- removeLayer();
21
- isInitialized = true;
22
- });
23
- function addLayer() {
24
- layers.update(($layers) => {
25
- if ($layers.length === 0)
26
- hideRootScrollBar();
27
- return [...$layers, layerId];
28
- });
29
- }
30
- function removeLayer() {
31
- layers.update(($layers) => {
32
- if (!$layers.length)
33
- return $layers;
34
- if ($layers.length === 1) {
35
- restoreRootScrollBar();
36
- return [];
37
- }
38
- const index = $layers.indexOf(layerId);
39
- return $layers.toSpliced(index, 1);
40
- });
41
- }
42
- return {
43
- isActive,
44
- index: derived(layers, ($layers) => $layers.indexOf(layerId)),
45
- offset: derived(layersOffset, (offsets) => offsets[layerId]),
46
- destroy() {
47
- removeLayer();
48
- isActiveUnsubscribe();
49
- }
50
- };
51
- }
52
- function hideRootScrollBar() {
53
- if (!browser)
54
- return;
55
- const root = document.documentElement;
56
- const scrollbarWidth = window.innerWidth - root.offsetWidth;
57
- if (!scrollbarWidth)
58
- return;
59
- root.style.scrollbarWidth = 'none';
60
- root.style.paddingRight = `${scrollbarWidth}px`;
61
- }
62
- function restoreRootScrollBar() {
63
- if (!browser)
64
- return;
65
- const root = document.documentElement;
66
- root.style.scrollbarWidth = '';
67
- root.style.paddingRight = '';
68
- }