fuma 0.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 (242) hide show
  1. package/README.md +58 -0
  2. package/dist/Meta.svelte +55 -0
  3. package/dist/Meta.svelte.d.ts +20 -0
  4. package/dist/action/index.d.ts +4 -0
  5. package/dist/action/index.js +4 -0
  6. package/dist/action/list/handlers.d.ts +16 -0
  7. package/dist/action/list/handlers.js +92 -0
  8. package/dist/action/list/index.css +40 -0
  9. package/dist/action/list/index.d.ts +23 -0
  10. package/dist/action/list/index.js +44 -0
  11. package/dist/action/list/store.d.ts +3 -0
  12. package/dist/action/list/store.js +1 -0
  13. package/dist/action/list/style.d.ts +2 -0
  14. package/dist/action/list/style.js +14 -0
  15. package/dist/action/list/trigger.d.ts +12 -0
  16. package/dist/action/list/trigger.js +124 -0
  17. package/dist/action/list/utils.d.ts +18 -0
  18. package/dist/action/list/utils.js +68 -0
  19. package/dist/action/portal.d.ts +3 -0
  20. package/dist/action/portal.js +9 -0
  21. package/dist/action/selector.d.ts +15 -0
  22. package/dist/action/selector.js +71 -0
  23. package/dist/action/tip.d.ts +6 -0
  24. package/dist/action/tip.js +12 -0
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.js +3 -0
  27. package/dist/server/index.d.ts +5 -0
  28. package/dist/server/index.js +5 -0
  29. package/dist/server/json.d.ts +1 -0
  30. package/dist/server/json.js +16 -0
  31. package/dist/server/parseFormData.d.ts +20 -0
  32. package/dist/server/parseFormData.js +63 -0
  33. package/dist/server/parseQuery.d.ts +11 -0
  34. package/dist/server/parseQuery.js +15 -0
  35. package/dist/server/sse.d.ts +6 -0
  36. package/dist/server/sse.js +35 -0
  37. package/dist/server/try.d.ts +6 -0
  38. package/dist/server/try.js +31 -0
  39. package/dist/store/index.d.ts +2 -0
  40. package/dist/store/index.js +2 -0
  41. package/dist/store/isSmallScreen.d.ts +2 -0
  42. package/dist/store/isSmallScreen.js +14 -0
  43. package/dist/store/param.d.ts +24 -0
  44. package/dist/store/param.js +61 -0
  45. package/dist/store/session.d.ts +2 -0
  46. package/dist/store/session.js +13 -0
  47. package/dist/ui/ButtonCopy.svelte +18 -0
  48. package/dist/ui/ButtonCopy.svelte.d.ts +18 -0
  49. package/dist/ui/ButtonDelete.svelte +43 -0
  50. package/dist/ui/ButtonDelete.svelte.d.ts +22 -0
  51. package/dist/ui/Dialog.svelte +58 -0
  52. package/dist/ui/Dialog.svelte.d.ts +25 -0
  53. package/dist/ui/DialogConfirm.svelte +22 -0
  54. package/dist/ui/DialogConfirm.svelte.d.ts +21 -0
  55. package/dist/ui/Icon.svelte +46 -0
  56. package/dist/ui/Icon.svelte.d.ts +24 -0
  57. package/dist/ui/Pagination.svelte +28 -0
  58. package/dist/ui/Pagination.svelte.d.ts +16 -0
  59. package/dist/ui/Placeholder.svelte +11 -0
  60. package/dist/ui/Placeholder.svelte.d.ts +19 -0
  61. package/dist/ui/PlaceholderImage.svelte +14 -0
  62. package/dist/ui/PlaceholderImage.svelte.d.ts +19 -0
  63. package/dist/ui/card/Card.svelte +38 -0
  64. package/dist/ui/card/Card.svelte.d.ts +26 -0
  65. package/dist/ui/card/CardBasic.svelte +14 -0
  66. package/dist/ui/card/CardBasic.svelte.d.ts +20 -0
  67. package/dist/ui/card/CardCollapse.svelte +61 -0
  68. package/dist/ui/card/CardCollapse.svelte.d.ts +22 -0
  69. package/dist/ui/card/CardFullScreen.svelte +28 -0
  70. package/dist/ui/card/CardFullScreen.svelte.d.ts +23 -0
  71. package/dist/ui/card/CardLink.svelte +21 -0
  72. package/dist/ui/card/CardLink.svelte.d.ts +20 -0
  73. package/dist/ui/card/index.d.ts +5 -0
  74. package/dist/ui/card/index.js +5 -0
  75. package/dist/ui/index.d.ts +14 -0
  76. package/dist/ui/index.js +14 -0
  77. package/dist/ui/input/FormControl.svelte +53 -0
  78. package/dist/ui/input/FormControl.svelte.d.ts +30 -0
  79. package/dist/ui/input/InputBoolean.svelte +29 -0
  80. package/dist/ui/input/InputBoolean.svelte.d.ts +21 -0
  81. package/dist/ui/input/InputCheckboxs.svelte +68 -0
  82. package/dist/ui/input/InputCheckboxs.svelte.d.ts +41 -0
  83. package/dist/ui/input/InputCheckboxsMenu.svelte +93 -0
  84. package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +43 -0
  85. package/dist/ui/input/InputCheckboxsTree.svelte +15 -0
  86. package/dist/ui/input/InputCheckboxsTree.svelte.d.ts +21 -0
  87. package/dist/ui/input/InputCheckboxsTreeNodes.svelte +60 -0
  88. package/dist/ui/input/InputCheckboxsTreeNodes.svelte.d.ts +23 -0
  89. package/dist/ui/input/InputDate.svelte +26 -0
  90. package/dist/ui/input/InputDate.svelte.d.ts +19 -0
  91. package/dist/ui/input/InputDatetime.svelte +21 -0
  92. package/dist/ui/input/InputDatetime.svelte.d.ts +19 -0
  93. package/dist/ui/input/InputImage.svelte +107 -0
  94. package/dist/ui/input/InputImage.svelte.d.ts +35 -0
  95. package/dist/ui/input/InputImagePreview.svelte +56 -0
  96. package/dist/ui/input/InputImagePreview.svelte.d.ts +23 -0
  97. package/dist/ui/input/InputNumber.svelte +22 -0
  98. package/dist/ui/input/InputNumber.svelte.d.ts +23 -0
  99. package/dist/ui/input/InputOptionInParam.svelte +34 -0
  100. package/dist/ui/input/InputOptionInParam.svelte.d.ts +20 -0
  101. package/dist/ui/input/InputOptions.svelte +79 -0
  102. package/dist/ui/input/InputOptions.svelte.d.ts +17 -0
  103. package/dist/ui/input/InputPassword.svelte +21 -0
  104. package/dist/ui/input/InputPassword.svelte.d.ts +36 -0
  105. package/dist/ui/input/InputRadio.svelte +79 -0
  106. package/dist/ui/input/InputRadio.svelte.d.ts +40 -0
  107. package/dist/ui/input/InputRelation.svelte +114 -0
  108. package/dist/ui/input/InputRelation.svelte.d.ts +52 -0
  109. package/dist/ui/input/InputRelations.svelte +138 -0
  110. package/dist/ui/input/InputRelations.svelte.d.ts +49 -0
  111. package/dist/ui/input/InputSearch.svelte +43 -0
  112. package/dist/ui/input/InputSearch.svelte.d.ts +23 -0
  113. package/dist/ui/input/InputSelect.svelte +59 -0
  114. package/dist/ui/input/InputSelect.svelte.d.ts +26 -0
  115. package/dist/ui/input/InputText.svelte +32 -0
  116. package/dist/ui/input/InputText.svelte.d.ts +31 -0
  117. package/dist/ui/input/InputTextarea.svelte +20 -0
  118. package/dist/ui/input/InputTextarea.svelte.d.ts +23 -0
  119. package/dist/ui/input/InputTime.svelte +19 -0
  120. package/dist/ui/input/InputTime.svelte.d.ts +19 -0
  121. package/dist/ui/input/RelationAfter.svelte +42 -0
  122. package/dist/ui/input/RelationAfter.svelte.d.ts +22 -0
  123. package/dist/ui/input/SelectorList.svelte +46 -0
  124. package/dist/ui/input/SelectorList.svelte.d.ts +40 -0
  125. package/dist/ui/input/action.d.ts +13 -0
  126. package/dist/ui/input/action.js +56 -0
  127. package/dist/ui/input/index.d.ts +25 -0
  128. package/dist/ui/input/index.js +25 -0
  129. package/dist/ui/input/textRich/InputTextRich.svelte +58 -0
  130. package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +20 -0
  131. package/dist/ui/input/textRich/SuggesionList.svelte +21 -0
  132. package/dist/ui/input/textRich/SuggesionList.svelte.d.ts +19 -0
  133. package/dist/ui/input/textRich/ToolMark.svelte +19 -0
  134. package/dist/ui/input/textRich/ToolMark.svelte.d.ts +21 -0
  135. package/dist/ui/input/textRich/ToolMarkColor.svelte +32 -0
  136. package/dist/ui/input/textRich/ToolMarkColor.svelte.d.ts +19 -0
  137. package/dist/ui/input/textRich/ToolMarkLink.svelte +63 -0
  138. package/dist/ui/input/textRich/ToolMarkLink.svelte.d.ts +17 -0
  139. package/dist/ui/input/textRich/ToolMenu.svelte +50 -0
  140. package/dist/ui/input/textRich/ToolMenu.svelte.d.ts +29 -0
  141. package/dist/ui/input/textRich/ToolMenuAlign.svelte +46 -0
  142. package/dist/ui/input/textRich/ToolMenuAlign.svelte.d.ts +17 -0
  143. package/dist/ui/input/textRich/ToolMenuInsert.svelte +49 -0
  144. package/dist/ui/input/textRich/ToolMenuInsert.svelte.d.ts +19 -0
  145. package/dist/ui/input/textRich/ToolMenuNode.svelte +56 -0
  146. package/dist/ui/input/textRich/ToolMenuNode.svelte.d.ts +17 -0
  147. package/dist/ui/input/textRich/ToolsBar.svelte +60 -0
  148. package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +18 -0
  149. package/dist/ui/input/textRich/extensions.d.ts +2 -0
  150. package/dist/ui/input/textRich/extensions.js +62 -0
  151. package/dist/ui/input/textRich/indent.d.ts +13 -0
  152. package/dist/ui/input/textRich/indent.js +112 -0
  153. package/dist/ui/input/textRich/suggestion.d.ts +9 -0
  154. package/dist/ui/input/textRich/suggestion.js +56 -0
  155. package/dist/ui/input/types.d.ts +15 -0
  156. package/dist/ui/input/types.js +1 -0
  157. package/dist/ui/menu/ContextMenu.svelte +47 -0
  158. package/dist/ui/menu/ContextMenu.svelte.d.ts +28 -0
  159. package/dist/ui/menu/DropDown.svelte +110 -0
  160. package/dist/ui/menu/DropDown.svelte.d.ts +38 -0
  161. package/dist/ui/menu/dropdown.css +33 -0
  162. package/dist/ui/menu/index.d.ts +2 -0
  163. package/dist/ui/menu/index.js +2 -0
  164. package/dist/ui/period/PeriodPicker.svelte +53 -0
  165. package/dist/ui/period/PeriodPicker.svelte.d.ts +22 -0
  166. package/dist/ui/period/PeriodPickerButton.svelte +73 -0
  167. package/dist/ui/period/PeriodPickerButton.svelte.d.ts +14 -0
  168. package/dist/ui/period/index.d.ts +6 -0
  169. package/dist/ui/period/index.js +2 -0
  170. package/dist/ui/table/Table.svelte +42 -0
  171. package/dist/ui/table/Table.svelte.d.ts +39 -0
  172. package/dist/ui/table/TableBody.svelte +29 -0
  173. package/dist/ui/table/TableBody.svelte.d.ts +33 -0
  174. package/dist/ui/table/TableCell.svelte +27 -0
  175. package/dist/ui/table/TableCell.svelte.d.ts +28 -0
  176. package/dist/ui/table/TableFieldsEdition.svelte +122 -0
  177. package/dist/ui/table/TableFieldsEdition.svelte.d.ts +31 -0
  178. package/dist/ui/table/TableHead.svelte +31 -0
  179. package/dist/ui/table/TableHead.svelte.d.ts +29 -0
  180. package/dist/ui/table/TableViewSelect.svelte +127 -0
  181. package/dist/ui/table/TableViewSelect.svelte.d.ts +24 -0
  182. package/dist/ui/table/cell/TableCellArray.svelte +10 -0
  183. package/dist/ui/table/cell/TableCellArray.svelte.d.ts +16 -0
  184. package/dist/ui/table/cell/TableCellBoolean.svelte +12 -0
  185. package/dist/ui/table/cell/TableCellBoolean.svelte.d.ts +16 -0
  186. package/dist/ui/table/cell/TableCellNumber.svelte +6 -0
  187. package/dist/ui/table/cell/TableCellNumber.svelte.d.ts +16 -0
  188. package/dist/ui/table/cell/TableCellString.svelte +7 -0
  189. package/dist/ui/table/cell/TableCellString.svelte.d.ts +18 -0
  190. package/dist/ui/table/cell/index.d.ts +4 -0
  191. package/dist/ui/table/cell/index.js +4 -0
  192. package/dist/ui/table/context.d.ts +14 -0
  193. package/dist/ui/table/context.js +10 -0
  194. package/dist/ui/table/field.d.ts +79 -0
  195. package/dist/ui/table/field.js +29 -0
  196. package/dist/ui/table/head/TableHeadBoolean.svelte +12 -0
  197. package/dist/ui/table/head/TableHeadBoolean.svelte.d.ts +17 -0
  198. package/dist/ui/table/head/TableHeadDate.svelte +100 -0
  199. package/dist/ui/table/head/TableHeadDate.svelte.d.ts +17 -0
  200. package/dist/ui/table/head/TableHeadDefault.svelte +7 -0
  201. package/dist/ui/table/head/TableHeadDefault.svelte.d.ts +17 -0
  202. package/dist/ui/table/head/TableHeadNumber.svelte +80 -0
  203. package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +17 -0
  204. package/dist/ui/table/head/TableHeadSelect.svelte +75 -0
  205. package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +20 -0
  206. package/dist/ui/table/head/TableHeadString.svelte +35 -0
  207. package/dist/ui/table/head/TableHeadString.svelte.d.ts +17 -0
  208. package/dist/ui/table/head/index.d.ts +19 -0
  209. package/dist/ui/table/head/index.js +22 -0
  210. package/dist/ui/table/index.d.ts +10 -0
  211. package/dist/ui/table/index.js +10 -0
  212. package/dist/ui/table/server.d.ts +1 -0
  213. package/dist/ui/table/server.js +32 -0
  214. package/dist/ui/tabs/Tabs.svelte +28 -0
  215. package/dist/ui/tabs/Tabs.svelte.d.ts +18 -0
  216. package/dist/ui/tabs/TabsIcon.svelte +56 -0
  217. package/dist/ui/tabs/TabsIcon.svelte.d.ts +20 -0
  218. package/dist/ui/tabs/index.d.ts +8 -0
  219. package/dist/ui/tabs/index.js +2 -0
  220. package/dist/utils/avatar.d.ts +1 -0
  221. package/dist/utils/avatar.js +5 -0
  222. package/dist/utils/component.d.ts +7 -0
  223. package/dist/utils/component.js +3 -0
  224. package/dist/utils/formatRange.d.ts +8 -0
  225. package/dist/utils/formatRange.js +25 -0
  226. package/dist/utils/index.d.ts +7 -0
  227. package/dist/utils/index.js +7 -0
  228. package/dist/utils/jsonParse.d.ts +1 -0
  229. package/dist/utils/jsonParse.js +10 -0
  230. package/dist/utils/normalizePath.d.ts +1 -0
  231. package/dist/utils/normalizePath.js +11 -0
  232. package/dist/utils/options.d.ts +7 -0
  233. package/dist/utils/options.js +20 -0
  234. package/dist/utils/tippy.d.ts +5 -0
  235. package/dist/utils/tippy.js +4 -0
  236. package/dist/validation/form.d.ts +31 -0
  237. package/dist/validation/form.js +94 -0
  238. package/dist/validation/index.d.ts +2 -0
  239. package/dist/validation/index.js +2 -0
  240. package/dist/validation/zod.d.ts +338 -0
  241. package/dist/validation/zod.js +100 -0
  242. package/package.json +86 -0
@@ -0,0 +1,22 @@
1
+ <script>import { Dialog } from "../index.js";
2
+ let dialog;
3
+ let klass = "";
4
+ export { klass as class };
5
+ </script>
6
+
7
+ <button type="button" on:click={() => dialog.showModal()} class="btn btn-ghost {klass}">
8
+ <slot name="activator">Confirm button</slot>
9
+ </button>
10
+
11
+ <Dialog bind:dialog>
12
+ <div slot="header" class="contents">
13
+ <slot name="header">Confirmation</slot>
14
+ </div>
15
+ <slot />
16
+ <div class="mt-10 flex justify-end gap-2">
17
+ <button type="button" class="btn btn-ghost btn-sm" on:click={() => dialog.close()}>
18
+ Annuler
19
+ </button>
20
+ <slot name="action" />
21
+ </div>
22
+ </Dialog>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ class?: string | undefined;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {
10
+ activator: {};
11
+ header: {};
12
+ default: {};
13
+ action: {};
14
+ };
15
+ };
16
+ export type DialogConfirmProps = typeof __propDef.props;
17
+ export type DialogConfirmEvents = typeof __propDef.events;
18
+ export type DialogConfirmSlots = typeof __propDef.slots;
19
+ export default class DialogConfirm extends SvelteComponent<DialogConfirmProps, DialogConfirmEvents, DialogConfirmSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,46 @@
1
+ <script>import { tippy } from "../utils/tippy.js";
2
+ import { onMount } from "svelte";
3
+ export let path;
4
+ export let title = "";
5
+ export let size = 24;
6
+ let klass = "";
7
+ export { klass as class };
8
+ export let style = "";
9
+ export let classSVG = "";
10
+ export let tippyProps = {};
11
+ export let disableTitlePropagation = false;
12
+ const viewWidth = 24;
13
+ const viewHeight = 24;
14
+ let icon;
15
+ let tip = null;
16
+ $:
17
+ tip?.setContent(title);
18
+ onMount(() => {
19
+ if (!title)
20
+ return;
21
+ const parent = icon.parentElement;
22
+ const isButton = parent?.tagName === "BUTTON" || parent?.tagName === "A";
23
+ const target = parent && isButton && !disableTitlePropagation ? parent : icon;
24
+ tip = tippy(target || icon, {
25
+ content: title,
26
+ trigger: "mouseenter",
27
+ ...tippyProps
28
+ });
29
+ return () => {
30
+ tip?.destroy();
31
+ };
32
+ });
33
+ </script>
34
+
35
+ <i bind:this={icon} class="grid place-content-center {klass}" {style}>
36
+ <svg
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ width={size}
39
+ height={size}
40
+ viewBox={`0 0 ${viewWidth} ${viewHeight}`}
41
+ style="display: inline-block;"
42
+ class={classSVG}
43
+ >
44
+ <path d={path} />
45
+ </svg>
46
+ </i>
@@ -0,0 +1,24 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type TippyProps } from '../utils/tippy.js';
3
+ declare const __propDef: {
4
+ props: {
5
+ path: string;
6
+ title?: string | undefined;
7
+ size?: number | undefined;
8
+ class?: string | undefined;
9
+ style?: string | undefined;
10
+ classSVG?: string | undefined;
11
+ tippyProps?: Partial<TippyProps> | undefined;
12
+ disableTitlePropagation?: boolean | undefined;
13
+ };
14
+ events: {
15
+ [evt: string]: CustomEvent<any>;
16
+ };
17
+ slots: {};
18
+ };
19
+ export type IconProps = typeof __propDef.props;
20
+ export type IconEvents = typeof __propDef.events;
21
+ export type IconSlots = typeof __propDef.slots;
22
+ export default class Icon extends SvelteComponent<IconProps, IconEvents, IconSlots> {
23
+ }
24
+ export {};
@@ -0,0 +1,28 @@
1
+ <script>import { mdiChevronLeft, mdiChevronRight } from "@mdi/js";
2
+ import { Icon } from "../index.js";
3
+ import { urlParam } from "../store/index.js";
4
+ export let take = 20;
5
+ $:
6
+ skip = +($urlParam.get("skip") || 0);
7
+ $:
8
+ _take = +($urlParam.get("take") || take);
9
+ </script>
10
+
11
+ <div class="join">
12
+ <a
13
+ href={$urlParam.with({ skip: skip - _take, take: _take })}
14
+ data-sveltekit-replacestate
15
+ class:btn-disabled={skip - _take < 0}
16
+ class="btn btn-square join-item btn-sm"
17
+ >
18
+ <Icon path={mdiChevronLeft} title="Afficher les données précédentes" />
19
+ </a>
20
+ <a
21
+ href={$urlParam.with({ skip: skip + _take, take: _take })}
22
+ data-sveltekit-replacestate
23
+ class="btn join-item btn-sm pr-1"
24
+ >
25
+ {skip + 1} - {skip + _take}
26
+ <Icon path={mdiChevronRight} title="Afficher les données suivantes" />
27
+ </a>
28
+ </div>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ take?: number | undefined;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {};
10
+ };
11
+ export type PaginationProps = typeof __propDef.props;
12
+ export type PaginationEvents = typeof __propDef.events;
13
+ export type PaginationSlots = typeof __propDef.slots;
14
+ export default class Pagination extends SvelteComponent<PaginationProps, PaginationEvents, PaginationSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,11 @@
1
+ <script>let klass = "";
2
+ export { klass as class };
3
+ export let style = "";
4
+ </script>
5
+
6
+ <div
7
+ {style}
8
+ class="rounded-box p-2 bg-base-200/40 h-32 grid place-content-center text-base-content/60 {klass}"
9
+ >
10
+ <slot>Aucun élément</slot>
11
+ </div>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ class?: string | undefined;
5
+ style?: string | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type PlaceholderProps = typeof __propDef.props;
15
+ export type PlaceholderEvents = typeof __propDef.events;
16
+ export type PlaceholderSlots = typeof __propDef.slots;
17
+ export default class Placeholder extends SvelteComponent<PlaceholderProps, PlaceholderEvents, PlaceholderSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,14 @@
1
+ <script>import { mdiPlus } from "@mdi/js";
2
+ import { Icon } from "../index.js";
3
+ export let x;
4
+ export let y;
5
+ </script>
6
+
7
+ <div style:width="{x}px" style:height="{y}px" class="rounded-lg bg-base-200 p-2">
8
+ <div class="grid h-full w-full content-center rounded-md border-4 border-dashed">
9
+ <span class="text-center text-sm font-medium text-base-content/60">
10
+ <slot>Pas d'image</slot>
11
+ </span>
12
+ <Icon path={mdiPlus} size={30} class="fill-base-content/60" />
13
+ </div>
14
+ </div>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type PlaceholderImageProps = typeof __propDef.props;
15
+ export type PlaceholderImageEvents = typeof __propDef.events;
16
+ export type PlaceholderImageSlots = typeof __propDef.slots;
17
+ export default class PlaceholderImage extends SvelteComponent<PlaceholderImageProps, PlaceholderImageEvents, PlaceholderImageSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,38 @@
1
+ <script>import { mdiArrowLeft } from "@mdi/js";
2
+ import { Icon } from "../../index.js";
3
+ let klass = "";
4
+ export { klass as class };
5
+ export let bodyClass = "";
6
+ export let headerClass = "";
7
+ export let returnUrl = "";
8
+ export let style = "";
9
+ </script>
10
+
11
+ <div class="card bordered border bg-base-100 shadow-lg {klass}" {style}>
12
+ <slot name="top" />
13
+
14
+ <div class="card-body rounded-b-2xl p-2 sm:p-8 {bodyClass}">
15
+ {#if $$slots.title || $$slots.action}
16
+ <div class="flex flex-wrap items-center gap-2 {headerClass}">
17
+ {#if returnUrl}
18
+ <a href={returnUrl} class="btn btn-square btn-ghost btn-sm">
19
+ <Icon path={mdiArrowLeft} size={20} />
20
+ </a>
21
+ {/if}
22
+
23
+ <div class="title grow">
24
+ <slot name="title" />
25
+ </div>
26
+ <slot name="action" />
27
+ </div>
28
+
29
+ {#if $$slots.subtitle}
30
+ <div class="my-4 text-sm opacity-80">
31
+ <slot name="subtitle" />
32
+ </div>
33
+ {/if}
34
+ {/if}
35
+
36
+ <slot />
37
+ </div>
38
+ </div>
@@ -0,0 +1,26 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ class?: string | undefined;
5
+ bodyClass?: string | undefined;
6
+ headerClass?: string | undefined;
7
+ returnUrl?: string | undefined;
8
+ style?: string | undefined;
9
+ };
10
+ events: {
11
+ [evt: string]: CustomEvent<any>;
12
+ };
13
+ slots: {
14
+ top: {};
15
+ title: {};
16
+ action: {};
17
+ subtitle: {};
18
+ default: {};
19
+ };
20
+ };
21
+ export type CardProps = typeof __propDef.props;
22
+ export type CardEvents = typeof __propDef.events;
23
+ export type CardSlots = typeof __propDef.slots;
24
+ export default class Card extends SvelteComponent<CardProps, CardEvents, CardSlots> {
25
+ }
26
+ export {};
@@ -0,0 +1,14 @@
1
+ <script>export let title = "";
2
+ let klass = "";
3
+ export { klass as class };
4
+ export let style = "";
5
+ </script>
6
+
7
+ <div class="{klass} bg-base-100 border rounded-lg p-2 sm:p-5" {style}>
8
+ {#if title}
9
+ <h2 class="font-medium mb-2">
10
+ {title}
11
+ </h2>
12
+ {/if}
13
+ <slot />
14
+ </div>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ title?: string | undefined;
5
+ class?: string | undefined;
6
+ style?: string | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export type CardBasicProps = typeof __propDef.props;
16
+ export type CardBasicEvents = typeof __propDef.events;
17
+ export type CardBasicSlots = typeof __propDef.slots;
18
+ export default class CardBasic extends SvelteComponent<CardBasicProps, CardBasicEvents, CardBasicSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,61 @@
1
+ <script>import { onDestroy } from "svelte";
2
+ import { slide } from "svelte/transition";
3
+ import { mdiChevronRight } from "@mdi/js";
4
+ import { Icon } from "../../index.js";
5
+ import { urlParam } from "../../store/index.js";
6
+ export let value;
7
+ let klass = "";
8
+ export { klass as class };
9
+ $:
10
+ isOpen = $urlParam.hasValue("section", value);
11
+ let card;
12
+ let timeout;
13
+ function handleClick() {
14
+ timeout = setTimeout(() => {
15
+ if (!card)
16
+ return;
17
+ const bound = card.getBoundingClientRect();
18
+ window.scrollTo({ top: bound.top, behavior: "smooth" });
19
+ }, 250);
20
+ }
21
+ onDestroy(() => {
22
+ clearTimeout(timeout);
23
+ });
24
+ </script>
25
+
26
+ <div class="card bordered border bg-base-100 shadow-md {klass}" bind:this={card}>
27
+ <div class="flex gap-2">
28
+ <slot name="logo" />
29
+
30
+ <a
31
+ id={value}
32
+ class="min-w-0 grow p-2 md:p-8 {$$slots.logo ? 'pl-0 md:pl-0' : ''}"
33
+ href={$urlParam.toggle({ section: value })}
34
+ data-sveltekit-noscroll
35
+ data-sveltekit-replacestate
36
+ on:click={handleClick}
37
+ >
38
+ <div class="flex gap-2">
39
+ <div class="title min-w-0 overflow-hidden text-ellipsis">
40
+ <slot name="title" />
41
+ </div>
42
+ <Icon
43
+ path={mdiChevronRight}
44
+ class="ml-auto transition-transform {isOpen ? 'rotate-90' : ''}"
45
+ />
46
+ </div>
47
+
48
+ {#if $$slots.subtitle}
49
+ <div class="mt-2 text-sm opacity-80">
50
+ <slot name="subtitle" />
51
+ </div>
52
+ {/if}
53
+ </a>
54
+ </div>
55
+
56
+ {#if isOpen}
57
+ <div class="card-body p-4 pt-0 md:p-8 md:pt-0" transition:slide={{ duration: 200 }}>
58
+ <slot />
59
+ </div>
60
+ {/if}
61
+ </div>
@@ -0,0 +1,22 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ value: string;
5
+ class?: string | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ logo: {};
12
+ title: {};
13
+ subtitle: {};
14
+ default: {};
15
+ };
16
+ };
17
+ export type CardCollapseProps = typeof __propDef.props;
18
+ export type CardCollapseEvents = typeof __propDef.events;
19
+ export type CardCollapseSlots = typeof __propDef.slots;
20
+ export default class CardCollapse extends SvelteComponent<CardCollapseProps, CardCollapseEvents, CardCollapseSlots> {
21
+ }
22
+ export {};
@@ -0,0 +1,28 @@
1
+ <script>import { Card, Icon } from "../../index.js";
2
+ import { mdiArrowCollapse, mdiArrowExpand } from "@mdi/js";
3
+ export let isFullScreen = false;
4
+ let klass = "";
5
+ export { klass as class };
6
+ </script>
7
+
8
+ <Card
9
+ class="{isFullScreen ? 'fixed inset-2 p-2' : ''} {klass}"
10
+ bodyClass={isFullScreen ? 'sm:p-2 grow overflow-hidden' : ''}
11
+ >
12
+ <div class="contents" slot="title">
13
+ <slot name="title" />
14
+ </div>
15
+
16
+ <div slot="action" class="flex gap-2">
17
+ <slot name="action" />
18
+ <button class="btn btn-square btn-sm" on:click={() => (isFullScreen = !isFullScreen)}>
19
+ {#if isFullScreen}
20
+ <Icon path={mdiArrowCollapse} />
21
+ {:else}
22
+ <Icon path={mdiArrowExpand} />
23
+ {/if}
24
+ </button>
25
+ </div>
26
+
27
+ <slot {isFullScreen} />
28
+ </Card>
@@ -0,0 +1,23 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ isFullScreen?: boolean | undefined;
5
+ class?: string | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ title: {};
12
+ action: {};
13
+ default: {
14
+ isFullScreen: boolean;
15
+ };
16
+ };
17
+ };
18
+ export type CardFullScreenProps = typeof __propDef.props;
19
+ export type CardFullScreenEvents = typeof __propDef.events;
20
+ export type CardFullScreenSlots = typeof __propDef.slots;
21
+ export default class CardFullScreen extends SvelteComponent<CardFullScreenProps, CardFullScreenEvents, CardFullScreenSlots> {
22
+ }
23
+ export {};
@@ -0,0 +1,21 @@
1
+ <script>export let href;
2
+ export let title = "";
3
+ let klass = "";
4
+ export { klass as class };
5
+ </script>
6
+
7
+ <div
8
+ class="
9
+ {klass} relative
10
+ shadow hover:shadow-md transition-all
11
+ bg-base-100 border rounded-lg p-2 sm:p-5
12
+ "
13
+ >
14
+ {#if title}
15
+ <h2 class="font-medium mb-2">
16
+ {title}
17
+ </h2>
18
+ {/if}
19
+ <slot />
20
+ <a {href} class="absolute inset-0">{' '}</a>
21
+ </div>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ href: string;
5
+ title?: string | undefined;
6
+ class?: string | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export type CardLinkProps = typeof __propDef.props;
16
+ export type CardLinkEvents = typeof __propDef.events;
17
+ export type CardLinkSlots = typeof __propDef.slots;
18
+ export default class CardLink extends SvelteComponent<CardLinkProps, CardLinkEvents, CardLinkSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,5 @@
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';
@@ -0,0 +1,5 @@
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';
@@ -0,0 +1,14 @@
1
+ export * from './menu/index.js';
2
+ export * from './tabs/index.js';
3
+ export * from './card/index.js';
4
+ export * from './input/index.js';
5
+ export * from './table/index.js';
6
+ export * from './period/index.js';
7
+ export { default as ButtonCopy } from './ButtonCopy.svelte';
8
+ export { default as ButtonDelete } from './ButtonDelete.svelte';
9
+ export { default as Dialog } from './Dialog.svelte';
10
+ export { default as DialogConfirm } from './DialogConfirm.svelte';
11
+ export { default as Icon } from './Icon.svelte';
12
+ export { default as Pagination } from './Pagination.svelte';
13
+ export { default as Placeholder } from './Placeholder.svelte';
14
+ export { default as PlaceholderImage } from './PlaceholderImage.svelte';
@@ -0,0 +1,14 @@
1
+ export * from './menu/index.js';
2
+ export * from './tabs/index.js';
3
+ export * from './card/index.js';
4
+ export * from './input/index.js';
5
+ export * from './table/index.js';
6
+ export * from './period/index.js';
7
+ export { default as ButtonCopy } from './ButtonCopy.svelte';
8
+ export { default as ButtonDelete } from './ButtonDelete.svelte';
9
+ export { default as Dialog } from './Dialog.svelte';
10
+ export { default as DialogConfirm } from './DialogConfirm.svelte';
11
+ export { default as Icon } from './Icon.svelte';
12
+ export { default as Pagination } from './Pagination.svelte';
13
+ export { default as Placeholder } from './Placeholder.svelte';
14
+ export { default as PlaceholderImage } from './PlaceholderImage.svelte';
@@ -0,0 +1,53 @@
1
+ <script>import { slide } from "svelte/transition";
2
+ import { onMount } from "svelte";
3
+ import { formContext } from "../../validation/form.js";
4
+ let klass = "";
5
+ export { klass as class };
6
+ export let classLabel = "";
7
+ export let key = "";
8
+ export let label = "";
9
+ export let error = "";
10
+ export let hint = "";
11
+ export let prefix = "";
12
+ export let prefixFor = "";
13
+ export let enhanceDisabled = false;
14
+ $:
15
+ _key = prefix && key ? `${prefix}_${key}` : key || "";
16
+ if (!enhanceDisabled) {
17
+ const { setError } = formContext.get();
18
+ setError[key] = (err) => error = err;
19
+ }
20
+ let formControl;
21
+ onMount(() => {
22
+ const input = formControl.querySelector("input, textarea");
23
+ if (!input)
24
+ return;
25
+ const handleInput = () => error = "";
26
+ input.addEventListener("input", handleInput);
27
+ return () => {
28
+ input.removeEventListener("input", handleInput);
29
+ };
30
+ });
31
+ </script>
32
+
33
+ <div class="form-control {klass}" bind:this={formControl}>
34
+ {#if label || $$slots.label}
35
+ <label for="{prefixFor}{_key}" class="label cursor-pointer {classLabel}">
36
+ <span class="label-text">{label}</span>
37
+ <slot name="label" />
38
+ <slot name="label_append" />
39
+ </label>
40
+ {/if}
41
+
42
+ <slot key={_key} />
43
+
44
+ {#if error}
45
+ <label for="{prefixFor}{_key}" class="label" transition:slide>
46
+ <span class="label-text-alt text-warning">{error}</span>
47
+ </label>
48
+ {:else if hint}
49
+ <label for="{prefixFor}{_key}" class="label" transition:slide>
50
+ <span class="label-text-alt text-neutral">{hint}</span>
51
+ </label>
52
+ {/if}
53
+ </div>
@@ -0,0 +1,30 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ class?: string | undefined;
5
+ classLabel?: string | undefined;
6
+ key?: string | undefined;
7
+ label?: string | undefined;
8
+ error?: string | undefined;
9
+ hint?: string | undefined;
10
+ prefix?: string | number | undefined;
11
+ prefixFor?: string | number | undefined;
12
+ enhanceDisabled?: boolean | undefined;
13
+ };
14
+ events: {
15
+ [evt: string]: CustomEvent<any>;
16
+ };
17
+ slots: {
18
+ label: {};
19
+ label_append: {};
20
+ default: {
21
+ key: string;
22
+ };
23
+ };
24
+ };
25
+ export type FormControlProps = typeof __propDef.props;
26
+ export type FormControlEvents = typeof __propDef.events;
27
+ export type FormControlSlots = typeof __propDef.slots;
28
+ export default class FormControl extends SvelteComponent<FormControlProps, FormControlEvents, FormControlSlots> {
29
+ }
30
+ export {};