fuma 1.0.21 → 2.0.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.
- package/README.md +1 -1
- package/dist/action/list/handlers.d.ts +2 -2
- package/dist/action/list/index.d.ts +2 -0
- package/dist/action/list/index.js +1 -0
- package/dist/action/list/trigger.d.ts +7 -1
- package/dist/action/list/trigger.js +2 -2
- package/dist/private/Meta.svelte +32 -27
- package/dist/private/Meta.svelte.d.ts +29 -17
- package/dist/private/api.d.ts +1 -1
- package/dist/private/store.d.ts +0 -1
- package/dist/server/parseFormData.d.ts +1 -1
- package/dist/server/parseQuery.d.ts +1 -1
- package/dist/server/sse.d.ts +0 -1
- package/dist/store/isSmallScreen.d.ts +0 -1
- package/dist/store/param.d.ts +0 -2
- package/dist/store/session.d.ts +0 -1
- package/dist/ui/badge/Badge.svelte +4 -3
- package/dist/ui/badge/Badge.svelte.d.ts +19 -15
- package/dist/ui/button/ButtonCopy.svelte +35 -32
- package/dist/ui/button/ButtonCopy.svelte.d.ts +23 -21
- package/dist/ui/button/ButtonDelete.svelte +23 -21
- package/dist/ui/button/ButtonDelete.svelte.d.ts +32 -20
- package/dist/ui/card/Card.svelte +13 -10
- package/dist/ui/card/Card.svelte.d.ts +39 -24
- package/dist/ui/card/CardBasic.svelte +5 -4
- package/dist/ui/card/CardBasic.svelte.d.ts +29 -18
- package/dist/ui/card/CardCollapse.svelte +35 -31
- package/dist/ui/card/CardCollapse.svelte.d.ts +37 -23
- package/dist/ui/card/CardFullScreen.svelte +8 -6
- package/dist/ui/card/CardFullScreen.svelte.d.ts +35 -20
- package/dist/ui/card/CardLink.svelte +5 -4
- package/dist/ui/card/CardLink.svelte.d.ts +29 -18
- package/dist/ui/dialog/Dialog.svelte +41 -34
- package/dist/ui/dialog/Dialog.svelte.d.ts +36 -23
- package/dist/ui/dialog/DialogConfirm.svelte +6 -4
- package/dist/ui/dialog/DialogConfirm.svelte.d.ts +33 -19
- package/dist/ui/drawer/Drawer.svelte +47 -38
- package/dist/ui/drawer/Drawer.svelte.d.ts +81 -46
- package/dist/ui/drawer/drawerFly.d.ts +0 -1
- package/dist/ui/drawer/layers.d.ts +0 -1
- package/dist/ui/form/Form.svelte +106 -87
- package/dist/ui/form/Form.svelte.d.ts +29 -16
- package/dist/ui/form/FormInput.svelte +12 -6
- package/dist/ui/form/FormSection.svelte +24 -17
- package/dist/ui/form/FormSection.svelte.d.ts +37 -25
- package/dist/ui/icon/Icon.svelte +35 -32
- package/dist/ui/icon/Icon.svelte.d.ts +25 -21
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/input/FormControl.svelte +48 -36
- package/dist/ui/input/FormControl.svelte.d.ts +32 -30
- package/dist/ui/input/InputBoolean.svelte +29 -22
- package/dist/ui/input/InputBoolean.svelte.d.ts +43 -35
- package/dist/ui/input/InputCheckboxs.svelte +37 -34
- package/dist/ui/input/InputCheckboxs.svelte.d.ts +54 -39
- package/dist/ui/input/InputCheckboxsMenu.svelte +64 -47
- package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +56 -41
- package/dist/ui/input/InputCheckboxsTree.svelte +9 -6
- package/dist/ui/input/InputCheckboxsTree.svelte.d.ts +22 -18
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte +36 -28
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte.d.ts +20 -16
- package/dist/ui/input/InputCombo.svelte +76 -65
- package/dist/ui/input/InputCombo.svelte.d.ts +55 -39
- package/dist/ui/input/InputDate.svelte +36 -29
- package/dist/ui/input/InputDate.svelte.d.ts +20 -16
- package/dist/ui/input/InputDateTime.svelte +37 -30
- package/dist/ui/input/InputDateTime.svelte.d.ts +20 -16
- package/dist/ui/input/InputImage.svelte +52 -45
- package/dist/ui/input/InputImage.svelte.d.ts +40 -27
- package/dist/ui/input/InputImagePreview.svelte +24 -20
- package/dist/ui/input/InputImagePreview.svelte.d.ts +25 -21
- package/dist/ui/input/InputNumber.svelte +28 -22
- package/dist/ui/input/InputNumber.svelte.d.ts +20 -20
- package/dist/ui/input/InputOptionInParam.svelte +12 -10
- package/dist/ui/input/InputOptionInParam.svelte.d.ts +21 -17
- package/dist/ui/input/InputOptions.svelte +40 -34
- package/dist/ui/input/InputOptions.svelte.d.ts +19 -15
- package/dist/ui/input/InputPassword.svelte +22 -18
- package/dist/ui/input/InputPassword.svelte.d.ts +43 -35
- package/dist/ui/input/InputRadio.svelte +51 -46
- package/dist/ui/input/InputRadio.svelte.d.ts +53 -38
- package/dist/ui/input/InputRelation.svelte +129 -112
- package/dist/ui/input/InputRelation.svelte.d.ts +39 -53
- package/dist/ui/input/InputRelations.svelte +96 -90
- package/dist/ui/input/InputRelations.svelte.d.ts +35 -37
- package/dist/ui/input/InputSearch.svelte +14 -11
- package/dist/ui/input/InputSearch.svelte.d.ts +25 -21
- package/dist/ui/input/InputSelect.svelte +59 -46
- package/dist/ui/input/InputSelect.svelte.d.ts +23 -19
- package/dist/ui/input/InputText.svelte +29 -28
- package/dist/ui/input/InputText.svelte.d.ts +41 -28
- package/dist/ui/input/InputTextarea.svelte +20 -19
- package/dist/ui/input/InputTextarea.svelte.d.ts +20 -20
- package/dist/ui/input/InputTime.svelte +43 -36
- package/dist/ui/input/InputTime.svelte.d.ts +21 -36
- package/dist/ui/input/RelationAfter.svelte +13 -9
- package/dist/ui/input/RelationAfter.svelte.d.ts +24 -20
- package/dist/ui/input/SelectorList.svelte +16 -12
- package/dist/ui/input/SelectorList.svelte.d.ts +29 -20
- package/dist/ui/input/textRich/InputTextRich.svelte +63 -59
- package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +36 -38
- package/dist/ui/input/textRich/SuggesionList.svelte +13 -9
- package/dist/ui/input/textRich/SuggesionList.svelte.d.ts +19 -15
- package/dist/ui/input/textRich/ToolMark.svelte +12 -9
- package/dist/ui/input/textRich/ToolMark.svelte.d.ts +22 -18
- package/dist/ui/input/textRich/ToolMarkColor.svelte +16 -12
- package/dist/ui/input/textRich/ToolMarkColor.svelte.d.ts +21 -17
- package/dist/ui/input/textRich/ToolMarkLink.svelte +46 -38
- package/dist/ui/input/textRich/ToolMarkLink.svelte.d.ts +18 -14
- package/dist/ui/input/textRich/ToolMenu.svelte +34 -19
- package/dist/ui/input/textRich/ToolMenu.svelte.d.ts +30 -26
- package/dist/ui/input/textRich/ToolMenuAlign.svelte +13 -9
- package/dist/ui/input/textRich/ToolMenuAlign.svelte.d.ts +18 -14
- package/dist/ui/input/textRich/ToolMenuInsert.svelte +12 -7
- package/dist/ui/input/textRich/ToolMenuInsert.svelte.d.ts +20 -16
- package/dist/ui/input/textRich/ToolMenuNode.svelte +14 -10
- package/dist/ui/input/textRich/ToolMenuNode.svelte.d.ts +18 -14
- package/dist/ui/input/textRich/ToolsBar.svelte +21 -14
- package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +19 -17
- package/dist/ui/input/textRich/suggestion.d.ts +0 -1
- package/dist/ui/login/Login.svelte +37 -31
- package/dist/ui/login/Login.svelte.d.ts +18 -14
- package/dist/ui/menu/ContextMenu.svelte +37 -31
- package/dist/ui/menu/ContextMenu.svelte.d.ts +38 -25
- package/dist/ui/menu/DropDown.svelte +92 -83
- package/dist/ui/menu/DropDown.svelte.d.ts +46 -33
- package/dist/ui/menu/DropDownMenu.svelte +25 -18
- package/dist/ui/menu/DropDownMenu.svelte.d.ts +30 -19
- package/dist/ui/mode/ToggleMode.svelte +28 -16
- package/dist/ui/mode/ToggleMode.svelte.d.ts +34 -17
- package/dist/ui/pagination/Pagination.svelte +9 -8
- package/dist/ui/pagination/Pagination.svelte.d.ts +18 -14
- package/dist/ui/placeholder/Placeholder.svelte +4 -3
- package/dist/ui/placeholder/Placeholder.svelte.d.ts +28 -17
- package/dist/ui/placeholder/PlaceholderImage.svelte +6 -4
- package/dist/ui/placeholder/PlaceholderImage.svelte.d.ts +28 -17
- package/dist/ui/range/RangePicker.svelte +76 -63
- package/dist/ui/range/RangePicker.svelte.d.ts +29 -24
- package/dist/ui/range/RangePickerButton.svelte +45 -40
- package/dist/ui/range/RangePickerButton.svelte.d.ts +21 -19
- package/dist/ui/table/Table.svelte +35 -28
- package/dist/ui/table/Table.svelte.d.ts +24 -19
- package/dist/ui/table/TableBody.svelte +18 -12
- package/dist/ui/table/TableBody.svelte.d.ts +20 -15
- package/dist/ui/table/TableCell.svelte +13 -10
- package/dist/ui/table/TableCell.svelte.d.ts +19 -14
- package/dist/ui/table/TableFieldsEdition.svelte +58 -52
- package/dist/ui/table/TableFieldsEdition.svelte.d.ts +20 -15
- package/dist/ui/table/TableHead.svelte +20 -21
- package/dist/ui/table/TableHead.svelte.d.ts +19 -14
- package/dist/ui/table/TableViewSelect.svelte +50 -37
- package/dist/ui/table/TableViewSelect.svelte.d.ts +27 -23
- package/dist/ui/table/cell/TableCellArray.svelte +5 -3
- package/dist/ui/table/cell/TableCellArray.svelte.d.ts +18 -14
- package/dist/ui/table/cell/TableCellBoolean.svelte +4 -3
- package/dist/ui/table/cell/TableCellBoolean.svelte.d.ts +18 -14
- package/dist/ui/table/cell/TableCellNumber.svelte +2 -1
- package/dist/ui/table/cell/TableCellNumber.svelte.d.ts +18 -14
- package/dist/ui/table/cell/TableCellString.svelte +5 -2
- package/dist/ui/table/cell/TableCellString.svelte.d.ts +19 -25
- package/dist/ui/table/field.d.ts +32 -40
- package/dist/ui/table/field.js +1 -1
- package/dist/ui/table/head/TableHeadBoolean.svelte +6 -3
- package/dist/ui/table/head/TableHeadBoolean.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadDate.svelte +61 -113
- package/dist/ui/table/head/TableHeadDate.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadDefault.svelte +5 -2
- package/dist/ui/table/head/TableHeadDefault.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadNumber.svelte +67 -76
- package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadSelect.svelte +47 -41
- package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +21 -27
- package/dist/ui/table/head/TableHeadString.svelte +14 -8
- package/dist/ui/table/head/TableHeadString.svelte.d.ts +18 -24
- package/dist/ui/tabs/Tabs.svelte +8 -5
- package/dist/ui/tabs/Tabs.svelte.d.ts +19 -15
- package/dist/ui/tabs/TabsIcon.svelte +31 -28
- package/dist/ui/tabs/TabsIcon.svelte.d.ts +21 -17
- package/dist/utils/eventEmitter.d.ts +4 -4
- package/dist/utils/tippy.d.ts +1 -1
- package/dist/validation/form.d.ts +0 -1
- package/dist/validation/zod.d.ts +96 -162
- package/dist/validation/zod.js +2 -4
- package/package.json +134 -138
- package/dist/ui/form/FormInput.svelte.d.ts +0 -152
- package/dist/ui/form/formInput.d.ts +0 -90
- package/dist/ui/slot/Slot.svelte +0 -35
- package/dist/ui/slot/Slot.svelte.d.ts +0 -22
- package/dist/ui/slot/Span.svelte +0 -4
- package/dist/ui/slot/Span.svelte.d.ts +0 -16
- package/dist/ui/slot/index.d.ts +0 -1
- package/dist/ui/slot/index.js +0 -1
- package/dist/ui/table/head/OrderButtons.svelte +0 -37
- package/dist/ui/table/head/OrderButtons.svelte.d.ts +0 -20
- package/dist/ui/table/head/index.d.ts +0 -19
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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;
|
|
7
11
|
};
|
|
8
|
-
|
|
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> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
19
13
|
}
|
|
20
|
-
|
|
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,34 +1,38 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export let
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
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
|
+
})
|
|
32
36
|
</script>
|
|
33
37
|
|
|
34
38
|
<section class="card bordered border bg-base-100 shadow-md {klass}">
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
9
11
|
};
|
|
10
|
-
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
header: {};
|
|
15
|
-
title: {};
|
|
16
|
-
subtitle: {};
|
|
17
|
-
default: {};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export type CardCollapseProps = typeof __propDef.props;
|
|
21
|
-
export type CardCollapseEvents = typeof __propDef.events;
|
|
22
|
-
export type CardCollapseSlots = typeof __propDef.slots;
|
|
23
|
-
export default class CardCollapse extends SvelteComponent<CardCollapseProps, CardCollapseEvents, CardCollapseSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
24
13
|
}
|
|
25
|
-
|
|
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,9 +1,11 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
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 }
|
|
7
9
|
</script>
|
|
8
10
|
|
|
9
11
|
<Card
|
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
6
11
|
};
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
9
27
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
}>, {
|
|
29
|
+
[evt: string]: CustomEvent<any>;
|
|
30
|
+
}, {
|
|
31
|
+
title: {};
|
|
32
|
+
action: {};
|
|
33
|
+
default: {
|
|
34
|
+
isFullScreen: boolean;
|
|
16
35
|
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
export type CardFullScreenSlots = typeof __propDef.slots;
|
|
21
|
-
export default class CardFullScreen extends SvelteComponent<CardFullScreenProps, CardFullScreenEvents, CardFullScreenSlots> {
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
36
|
+
}, {}, string>;
|
|
37
|
+
type CardFullScreen = InstanceType<typeof CardFullScreen>;
|
|
38
|
+
export default CardFullScreen;
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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;
|
|
7
11
|
};
|
|
8
|
-
|
|
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> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
19
13
|
}
|
|
20
|
-
|
|
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,37 +1,44 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createEventDispatcher, onMount } from 'svelte'
|
|
3
|
+
import { mdiClose } from '@mdi/js'
|
|
4
|
+
import { Icon } from '../icon/index.js'
|
|
5
|
+
import { contextContainer } from '../context.js'
|
|
6
|
+
|
|
7
|
+
export let dialog: HTMLDialogElement
|
|
8
|
+
export let hideCloseButton = false
|
|
9
|
+
let klass = ''
|
|
10
|
+
export { klass as class }
|
|
11
|
+
|
|
12
|
+
const dispatch = createEventDispatcher<{ open: void; close: void }>()
|
|
13
|
+
contextContainer.set('dialog')
|
|
14
|
+
|
|
15
|
+
onMount(() => {
|
|
16
|
+
const inputsSelector = 'input:not([type=hidden], [tabindex="-1"])'
|
|
17
|
+
const inputs = dialog.querySelectorAll<HTMLInputElement>(inputsSelector)
|
|
18
|
+
const buttons = dialog.querySelectorAll<HTMLButtonElement>('button')
|
|
19
|
+
|
|
20
|
+
inputs.forEach((input) => (input.tabIndex = -1))
|
|
21
|
+
buttons.forEach((button) => (button.tabIndex = -1))
|
|
22
|
+
|
|
23
|
+
function onDialogOpen() {
|
|
24
|
+
dispatch('open')
|
|
25
|
+
inputs.forEach((input) => (input.tabIndex = 0))
|
|
26
|
+
buttons.forEach((button) => (button.tabIndex = 0))
|
|
27
|
+
if (!inputs[0]) return
|
|
28
|
+
inputs[0].focus()
|
|
29
|
+
inputs[0].select()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function onDialogClose() {
|
|
33
|
+
dispatch('close')
|
|
34
|
+
inputs.forEach((input) => (input.tabIndex = -1))
|
|
35
|
+
buttons.forEach((button) => (button.tabIndex = -1))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const observer = new MutationObserver(() => (dialog.open ? onDialogOpen() : onDialogClose()))
|
|
39
|
+
observer.observe(dialog, { attributeFilter: ['open'] })
|
|
40
|
+
return () => observer.disconnect()
|
|
41
|
+
})
|
|
35
42
|
</script>
|
|
36
43
|
|
|
37
44
|
<dialog bind:this={dialog} class="modal" tabindex="-1">
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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;
|
|
7
11
|
};
|
|
8
|
-
|
|
9
|
-
open: CustomEvent<void>;
|
|
10
|
-
close: CustomEvent<void>;
|
|
11
|
-
} & {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
};
|
|
14
|
-
slots: {
|
|
15
|
-
header: {};
|
|
16
|
-
default: {};
|
|
17
|
-
footer: {};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export type DialogProps = typeof __propDef.props;
|
|
21
|
-
export type DialogEvents = typeof __propDef.events;
|
|
22
|
-
export type DialogSlots = typeof __propDef.slots;
|
|
23
|
-
export default class Dialog extends SvelteComponent<DialogProps, DialogEvents, DialogSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
24
13
|
}
|
|
25
|
-
|
|
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 Dialog: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
dialog: HTMLDialogElement;
|
|
21
|
+
hideCloseButton?: boolean;
|
|
22
|
+
class?: string;
|
|
23
|
+
}, {
|
|
24
|
+
header: {};
|
|
25
|
+
default: {};
|
|
26
|
+
footer: {};
|
|
27
|
+
}>, {
|
|
28
|
+
open: CustomEvent<void>;
|
|
29
|
+
close: CustomEvent<void>;
|
|
30
|
+
} & {
|
|
31
|
+
[evt: string]: CustomEvent<any>;
|
|
32
|
+
}, {
|
|
33
|
+
header: {};
|
|
34
|
+
default: {};
|
|
35
|
+
footer: {};
|
|
36
|
+
}, {}, string>;
|
|
37
|
+
type Dialog = InstanceType<typeof Dialog>;
|
|
38
|
+
export default Dialog;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog } from './index.js'
|
|
3
|
+
|
|
4
|
+
let dialog: HTMLDialogElement
|
|
5
|
+
let klass = ''
|
|
6
|
+
export { klass as class }
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<button type="button" on:click={() => dialog.showModal()} class="btn btn-ghost {klass}">
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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;
|
|
5
11
|
};
|
|
6
|
-
|
|
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> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
20
13
|
}
|
|
21
|
-
|
|
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,40 +1,49 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
export let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
export let
|
|
20
|
-
export let
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onDestroy, onMount } from 'svelte'
|
|
3
|
+
import { fade } from 'svelte/transition'
|
|
4
|
+
import { mdiClose } from '@mdi/js'
|
|
5
|
+
|
|
6
|
+
import { goto } from '$app/navigation'
|
|
7
|
+
import { urlParam } from '../../store/param.js'
|
|
8
|
+
import { Icon } from '../icon/index.js'
|
|
9
|
+
import { subscibeDrawerLayers } from './layers.js'
|
|
10
|
+
import { contextContainer } from '../context.js'
|
|
11
|
+
import { drawerFly } from './drawerFly.js'
|
|
12
|
+
|
|
13
|
+
export let title = ''
|
|
14
|
+
/** Key used in url query params */
|
|
15
|
+
export let key: string
|
|
16
|
+
|
|
17
|
+
let klass = ''
|
|
18
|
+
export { klass as class }
|
|
19
|
+
export let maxWidth = '32rem'
|
|
20
|
+
export let classHeader = ''
|
|
21
|
+
export let classBody = ''
|
|
22
|
+
export let duration = 180
|
|
23
|
+
export let noOverlay = false
|
|
24
|
+
export let transitionX = 0
|
|
25
|
+
export let zIndex = 50
|
|
26
|
+
|
|
27
|
+
type GotoOptions = Parameters<typeof goto>[1]
|
|
28
|
+
export function open(value = 1, options: GotoOptions = {}) {
|
|
29
|
+
return goto($urlParam.with({ [key]: value }), {
|
|
30
|
+
...options,
|
|
31
|
+
replaceState: true,
|
|
32
|
+
noScroll: true
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
export function close(options: GotoOptions = {}) {
|
|
36
|
+
return goto($urlParam.without(key), { ...options, replaceState: true, noScroll: true })
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const { offset, index, destroy, isActive } = subscibeDrawerLayers(key)
|
|
40
|
+
onDestroy(destroy)
|
|
41
|
+
contextContainer.set('drawer')
|
|
42
|
+
let clientWidth = 0
|
|
43
|
+
|
|
44
|
+
onMount(() => {
|
|
45
|
+
transitionX = $isActive ? clientWidth : 0
|
|
46
|
+
})
|
|
38
47
|
</script>
|
|
39
48
|
|
|
40
49
|
{#if !noOverlay && $isActive}
|
|
@@ -45,7 +54,7 @@ onMount(() => {
|
|
|
45
54
|
transition:fade={{ duration }}
|
|
46
55
|
style="z-index: {zIndex + $index};"
|
|
47
56
|
class="fixed inset-0 bg-black/15 backdrop-blur-[1.5px] dark:bg-white/15"
|
|
48
|
-
|
|
57
|
+
></div>
|
|
49
58
|
{/if}
|
|
50
59
|
|
|
51
60
|
{#if $isActive}
|