lutra 0.0.20 → 0.0.33
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/dist/color.css +0 -0
- package/dist/display/Avatar.svelte +1 -1
- package/dist/display/Avatar.svelte.d.ts +18 -22
- package/dist/display/Badge.svelte +2 -4
- package/dist/display/Badge.svelte.d.ts +28 -32
- package/dist/display/Callout.svelte +8 -8
- package/dist/display/Callout.svelte.d.ts +27 -35
- package/dist/display/Close.svelte.d.ts +17 -20
- package/dist/display/Code.svelte +26 -31
- package/dist/display/Code.svelte.d.ts +31 -30
- package/dist/display/ContextTip.svelte +2 -5
- package/dist/display/ContextTip.svelte.d.ts +16 -20
- package/dist/display/DataList.svelte +16 -0
- package/dist/display/DataList.svelte.d.ts +21 -0
- package/dist/display/Details.svelte.d.ts +25 -30
- package/dist/display/Hero.svelte.d.ts +24 -28
- package/dist/display/Icon.svelte +3 -4
- package/dist/display/Icon.svelte.d.ts +18 -23
- package/dist/display/IconButton.svelte +12 -5
- package/dist/display/IconButton.svelte.d.ts +26 -29
- package/dist/display/Image.svelte.d.ts +25 -36
- package/dist/display/Indicator.svelte.d.ts +21 -22
- package/dist/display/Inset.svelte.d.ts +16 -20
- package/dist/display/LineChart.svelte +385 -0
- package/dist/display/LineChart.svelte.d.ts +24 -0
- package/dist/display/LoadingIndicator.svelte +33 -0
- package/dist/display/LoadingIndicator.svelte.d.ts +15 -0
- package/dist/display/Modal.svelte +116 -0
- package/dist/display/Modal.svelte.d.ts +27 -0
- package/dist/display/Notification.svelte.d.ts +22 -41
- package/dist/display/Panel.svelte +23 -0
- package/dist/display/Panel.svelte.d.ts +19 -0
- package/dist/display/Popup.svelte.d.ts +23 -28
- package/dist/{data → display}/Stat.svelte +9 -17
- package/dist/display/Stat.svelte.d.ts +30 -0
- package/dist/display/Table.svelte +14 -10
- package/dist/display/Table.svelte.d.ts +22 -32
- package/dist/display/TablePaginator.svelte +51 -0
- package/dist/display/TablePaginator.svelte.d.ts +21 -0
- package/dist/display/Tag.svelte.d.ts +29 -32
- package/dist/display/Tooltip.svelte +5 -4
- package/dist/display/Tooltip.svelte.d.ts +21 -26
- package/dist/display/chart.d.ts +78 -0
- package/dist/display/chart.js +212 -0
- package/dist/display/index.d.ts +11 -1
- package/dist/display/index.js +11 -1
- package/dist/display/notifications.svelte.d.ts +3 -3
- package/dist/display/notifications.svelte.js +2 -2
- package/dist/form/Button.svelte +7 -2
- package/dist/form/Button.svelte.d.ts +25 -35
- package/dist/form/FieldActions.svelte +25 -3
- package/dist/form/FieldActions.svelte.d.ts +18 -22
- package/dist/form/FieldContainer.svelte +1 -1
- package/dist/form/FieldContainer.svelte.d.ts +17 -22
- package/dist/form/FieldContent.svelte +52 -33
- package/dist/form/FieldContent.svelte.d.ts +28 -56
- package/dist/form/FieldError.svelte.d.ts +17 -20
- package/dist/form/FieldSection.svelte.d.ts +18 -32
- package/dist/form/Fieldset.svelte.d.ts +29 -40
- package/dist/form/Form.svelte +55 -17
- package/dist/form/Form.svelte.d.ts +36 -31
- package/dist/form/ImageUpload.svelte +259 -0
- package/dist/form/ImageUpload.svelte.d.ts +31 -0
- package/dist/form/Input.svelte +192 -153
- package/dist/form/Input.svelte.d.ts +115 -140
- package/dist/form/InputLength.svelte.d.ts +19 -20
- package/dist/form/Label.svelte +21 -4
- package/dist/form/Label.svelte.d.ts +24 -30
- package/dist/form/LogoUpload.svelte +100 -0
- package/dist/form/LogoUpload.svelte.d.ts +29 -0
- package/dist/form/Select.svelte +84 -36
- package/dist/form/Select.svelte.d.ts +69 -96
- package/dist/form/Textarea.svelte +163 -0
- package/dist/form/Textarea.svelte.d.ts +108 -0
- package/dist/form/Toggle.svelte +2 -0
- package/dist/form/Toggle.svelte.d.ts +15 -0
- package/dist/form/client.svelte.d.ts +8 -9
- package/dist/form/client.svelte.js +18 -10
- package/dist/form/form.d.ts +6 -4
- package/dist/form/form.js +23 -9
- package/dist/form/index.d.ts +6 -3
- package/dist/form/index.js +6 -3
- package/dist/form/types.d.ts +11 -1
- package/dist/icons/IconAlert.svelte.d.ts +23 -0
- package/dist/icons/{Copy.svelte → IconCopy.svelte} +1 -1
- package/dist/icons/IconCopy.svelte.d.ts +23 -0
- package/dist/icons/IconDone.svelte.d.ts +23 -0
- package/dist/icons/IconError.svelte.d.ts +23 -0
- package/dist/icons/IconHelp.svelte.d.ts +23 -0
- package/dist/icons/IconHide.svelte.d.ts +23 -0
- package/dist/icons/IconInfo.svelte.d.ts +23 -0
- package/dist/icons/IconLink.svelte.d.ts +23 -0
- package/dist/icons/IconMenuBurger.svelte.d.ts +23 -0
- package/dist/icons/IconMenuDots.svelte.d.ts +23 -0
- package/dist/icons/IconSearch.svelte +3 -0
- package/dist/icons/IconSearch.svelte.d.ts +23 -0
- package/dist/icons/IconShow.svelte.d.ts +23 -0
- package/dist/icons/IconSuccess.svelte.d.ts +23 -0
- package/dist/icons/IconWarning.svelte.d.ts +23 -0
- package/dist/icons/index.d.ts +14 -11
- package/dist/icons/index.js +14 -11
- package/dist/layout/Layout.svelte +7 -5
- package/dist/layout/Layout.svelte.d.ts +19 -22
- package/dist/layout/LayoutFooter.svelte.d.ts +17 -18
- package/dist/layout/LayoutGrid.svelte.d.ts +25 -36
- package/dist/layout/LayoutHeader.svelte +3 -0
- package/dist/layout/LayoutHeader.svelte.d.ts +33 -38
- package/dist/layout/LayoutSideMenu.svelte +18 -17
- package/dist/layout/LayoutSideMenu.svelte.d.ts +18 -22
- package/dist/layout/Overlay.svelte.d.ts +22 -32
- package/dist/layout/OverlayContainer.svelte.d.ts +14 -15
- package/dist/layout/OverlayLayer.svelte +6 -11
- package/dist/layout/OverlayLayer.svelte.d.ts +17 -20
- package/dist/layout/PageContent.svelte +9 -24
- package/dist/layout/PageContent.svelte.d.ts +23 -26
- package/dist/layout/Theme.svelte +19 -4
- package/dist/layout/Theme.svelte.d.ts +17 -22
- package/dist/layout/UIContent.svelte.d.ts +16 -20
- package/dist/layout/index.d.ts +5 -1
- package/dist/layout/index.js +5 -1
- package/dist/layout/overlays.svelte.d.ts +2 -2
- package/dist/nav/Breadcrumb.svelte +1 -1
- package/dist/nav/Breadcrumb.svelte.d.ts +26 -31
- package/dist/nav/Menu.svelte +6 -13
- package/dist/nav/Menu.svelte.d.ts +25 -31
- package/dist/nav/MenuItem.svelte +15 -8
- package/dist/nav/MenuItem.svelte.d.ts +20 -24
- package/dist/nav/MenuTypes.d.ts +7 -7
- package/dist/nav/NavMenu.svelte +7 -9
- package/dist/nav/NavMenu.svelte.d.ts +17 -18
- package/dist/nav/TabbedContent.svelte +1 -1
- package/dist/nav/TabbedContent.svelte.d.ts +21 -22
- package/dist/nav/Tabs.svelte +53 -13
- package/dist/nav/Tabs.svelte.d.ts +24 -25
- package/dist/nav/index.d.ts +2 -1
- package/dist/nav/index.js +2 -1
- package/dist/style.css +176 -79
- package/dist/typo/Clamp.svelte.d.ts +22 -26
- package/dist/typo/H.svelte.d.ts +26 -30
- package/dist/typo/H1.svelte.d.ts +24 -28
- package/dist/typo/H2.svelte.d.ts +24 -28
- package/dist/typo/H3.svelte.d.ts +24 -28
- package/dist/typo/H4.svelte.d.ts +24 -28
- package/dist/typo/H5.svelte.d.ts +24 -28
- package/dist/typo/H6.svelte.d.ts +24 -28
- package/dist/typo/P.svelte.d.ts +24 -28
- package/dist/utils/StringOrComponent.svelte +14 -0
- package/dist/utils/StringOrComponent.svelte.d.ts +19 -0
- package/dist/utils/StringOrSnippet.svelte +11 -0
- package/dist/utils/StringOrSnippet.svelte.d.ts +19 -0
- package/dist/utils/color.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/isSnippet.d.ts +3 -5
- package/dist/utils/isSnippet.js +9 -4
- package/package.json +32 -25
- package/dist/data/Stat.svelte.d.ts +0 -39
- package/dist/data/index.d.ts +0 -1
- package/dist/data/index.js +0 -1
- package/dist/grid/Column.svelte +0 -11
- package/dist/grid/Column.svelte.d.ts +0 -22
- package/dist/grid/Grid.svelte +0 -19
- package/dist/grid/Grid.svelte.d.ts +0 -24
- package/dist/grid/Row.svelte +0 -44
- package/dist/grid/Row.svelte.d.ts +0 -24
- package/dist/icons/Alert.svelte.d.ts +0 -23
- package/dist/icons/Copy.svelte.d.ts +0 -23
- package/dist/icons/Done.svelte.d.ts +0 -23
- package/dist/icons/Error.svelte.d.ts +0 -23
- package/dist/icons/Help.svelte.d.ts +0 -23
- package/dist/icons/Hide.svelte.d.ts +0 -23
- package/dist/icons/Info.svelte.d.ts +0 -23
- package/dist/icons/Link.svelte.d.ts +0 -23
- package/dist/icons/MenuBurger.svelte.d.ts +0 -23
- package/dist/icons/MenuDots.svelte.d.ts +0 -23
- package/dist/icons/Show.svelte.d.ts +0 -23
- package/dist/icons/Success.svelte.d.ts +0 -23
- package/dist/icons/Warning.svelte.d.ts +0 -23
- package/dist/utils/StringOrComponentOrSnippet.svelte +0 -14
- package/dist/utils/StringOrComponentOrSnippet.svelte.d.ts +0 -24
- /package/dist/icons/{Alert.svelte → IconAlert.svelte} +0 -0
- /package/dist/icons/{Done.svelte → IconDone.svelte} +0 -0
- /package/dist/icons/{Error.svelte → IconError.svelte} +0 -0
- /package/dist/icons/{Help.svelte → IconHelp.svelte} +0 -0
- /package/dist/icons/{Hide.svelte → IconHide.svelte} +0 -0
- /package/dist/icons/{Info.svelte → IconInfo.svelte} +0 -0
- /package/dist/icons/{Link.svelte → IconLink.svelte} +0 -0
- /package/dist/icons/{MenuBurger.svelte → IconMenuBurger.svelte} +0 -0
- /package/dist/icons/{MenuDots.svelte → IconMenuDots.svelte} +0 -0
- /package/dist/icons/{Show.svelte → IconShow.svelte} +0 -0
- /package/dist/icons/{Success.svelte → IconSuccess.svelte} +0 -0
- /package/dist/icons/{Warning.svelte → IconWarning.svelte} +0 -0
@@ -1,142 +1,117 @@
|
|
1
|
-
import {
|
1
|
+
import { type Snippet } from "svelte";
|
2
2
|
import type { Autocomplete } from "./types.js";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
contained?: boolean | undefined;
|
13
|
-
copyable?: boolean | undefined;
|
14
|
-
defaultValue?: string | undefined;
|
15
|
-
dirname?: string | undefined;
|
16
|
-
disabled?: boolean | undefined;
|
17
|
-
enterkeyhint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
18
|
-
height?: number | undefined;
|
19
|
-
help?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
20
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
21
|
-
}) | undefined;
|
22
|
-
id?: import("svelte").Bindable<string | undefined>;
|
23
|
-
indeterminate?: boolean | undefined;
|
24
|
-
inputmode?: "none" | "search" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
25
|
-
label?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
26
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
27
|
-
}) | undefined;
|
28
|
-
labelTip?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
29
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
30
|
-
}) | undefined;
|
31
|
-
list?: string | undefined;
|
32
|
-
maxlength?: number | undefined;
|
33
|
-
minlength?: number | undefined;
|
34
|
-
max?: number | undefined;
|
35
|
-
min?: number | undefined;
|
36
|
-
multiple?: boolean | undefined;
|
37
|
-
name: string;
|
38
|
-
onblur?: ((e: FocusEvent) => void) | undefined;
|
39
|
-
onchange?: ((e: Event) => void) | undefined;
|
40
|
-
onclick?: ((e: MouseEvent) => void) | undefined;
|
41
|
-
onfocus?: ((e: FocusEvent) => void) | undefined;
|
42
|
-
onkeyup?: ((e: KeyboardEvent) => void) | undefined;
|
43
|
-
onkeydown?: ((e: KeyboardEvent) => void) | undefined;
|
44
|
-
onkeypress?: ((e: KeyboardEvent) => void) | undefined;
|
45
|
-
pattern?: string | undefined;
|
46
|
-
placeholder?: string | undefined;
|
47
|
-
suffix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
48
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
49
|
-
}) | undefined;
|
50
|
-
prefix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
51
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
52
|
-
}) | undefined;
|
53
|
-
readonly?: boolean | undefined;
|
54
|
-
required?: boolean | undefined;
|
55
|
-
results?: number | undefined;
|
56
|
-
shape?: "default" | "circle" | "rounded" | "pill" | undefined;
|
57
|
-
size?: number | undefined;
|
58
|
-
src?: string | undefined;
|
59
|
-
spellcheck?: boolean | undefined;
|
60
|
-
step?: number | undefined;
|
61
|
-
tabindex?: number | undefined;
|
62
|
-
title?: string | undefined;
|
63
|
-
type?: "number" | "color" | "button" | "search" | "time" | "image" | "text" | "submit" | "email" | "tel" | "url" | "date" | "checkbox" | "radio" | "hidden" | "password" | "file" | "range" | "datetime-local" | "month" | "week" | undefined;
|
64
|
-
value?: import("svelte").Bindable<string | undefined>;
|
65
|
-
viewable?: boolean | undefined;
|
66
|
-
webkitdirectory?: boolean | undefined;
|
67
|
-
};
|
68
|
-
events: {
|
69
|
-
[evt: string]: CustomEvent<any>;
|
70
|
-
};
|
71
|
-
slots: {};
|
72
|
-
};
|
73
|
-
export type InputProps = typeof __propDef.props;
|
74
|
-
export type InputEvents = typeof __propDef.events;
|
75
|
-
export type InputSlots = typeof __propDef.slots;
|
76
|
-
export default class Input extends SvelteComponent<InputProps, InputEvents, InputSlots> {
|
77
|
-
constructor(options?: import("svelte").ComponentConstructorOptions<{
|
78
|
-
alt?: string | undefined;
|
79
|
-
attrs?: Record<string, string> | undefined;
|
80
|
-
autocapitalize?: boolean | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
81
|
-
autocomplete?: Autocomplete | undefined;
|
82
|
-
autocorrect?: boolean | undefined;
|
83
|
-
capture?: "user" | "environment" | undefined;
|
84
|
-
checked?: boolean | undefined;
|
85
|
-
contained?: boolean | undefined;
|
86
|
-
copyable?: boolean | undefined;
|
87
|
-
defaultValue?: string | undefined;
|
88
|
-
dirname?: string | undefined;
|
89
|
-
disabled?: boolean | undefined;
|
90
|
-
enterkeyhint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
91
|
-
height?: number | undefined;
|
92
|
-
help?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
93
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
94
|
-
}) | undefined;
|
95
|
-
id?: import("svelte").Bindable<string | undefined>;
|
96
|
-
indeterminate?: boolean | undefined;
|
97
|
-
inputmode?: "none" | "search" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
98
|
-
label?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
99
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
100
|
-
}) | undefined;
|
101
|
-
labelTip?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
102
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
103
|
-
}) | undefined;
|
104
|
-
list?: string | undefined;
|
105
|
-
maxlength?: number | undefined;
|
106
|
-
minlength?: number | undefined;
|
107
|
-
max?: number | undefined;
|
108
|
-
min?: number | undefined;
|
109
|
-
multiple?: boolean | undefined;
|
110
|
-
name: string;
|
111
|
-
onblur?: ((e: FocusEvent) => void) | undefined;
|
112
|
-
onchange?: ((e: Event) => void) | undefined;
|
113
|
-
onclick?: ((e: MouseEvent) => void) | undefined;
|
114
|
-
onfocus?: ((e: FocusEvent) => void) | undefined;
|
115
|
-
onkeyup?: ((e: KeyboardEvent) => void) | undefined;
|
116
|
-
onkeydown?: ((e: KeyboardEvent) => void) | undefined;
|
117
|
-
onkeypress?: ((e: KeyboardEvent) => void) | undefined;
|
118
|
-
pattern?: string | undefined;
|
119
|
-
placeholder?: string | undefined;
|
120
|
-
suffix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
121
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
122
|
-
}) | undefined;
|
123
|
-
prefix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
124
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
125
|
-
}) | undefined;
|
126
|
-
readonly?: boolean | undefined;
|
127
|
-
required?: boolean | undefined;
|
128
|
-
results?: number | undefined;
|
129
|
-
shape?: "default" | "circle" | "rounded" | "pill" | undefined;
|
130
|
-
size?: number | undefined;
|
131
|
-
src?: string | undefined;
|
132
|
-
spellcheck?: boolean | undefined;
|
133
|
-
step?: number | undefined;
|
134
|
-
tabindex?: number | undefined;
|
135
|
-
title?: string | undefined;
|
136
|
-
type?: "number" | "color" | "button" | "search" | "time" | "image" | "text" | "submit" | "email" | "tel" | "url" | "date" | "checkbox" | "radio" | "hidden" | "password" | "file" | "range" | "datetime-local" | "month" | "week" | undefined;
|
137
|
-
value?: import("svelte").Bindable<string | undefined>;
|
138
|
-
viewable?: boolean | undefined;
|
139
|
-
webkitdirectory?: boolean | undefined;
|
140
|
-
}>);
|
3
|
+
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> {
|
4
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
5
|
+
$$bindings?: Bindings;
|
6
|
+
} & Exports;
|
7
|
+
(internal: unknown, props: Props & {
|
8
|
+
$$events?: Events;
|
9
|
+
$$slots?: Slots;
|
10
|
+
}): Exports;
|
11
|
+
z_$$bindings?: Bindings;
|
141
12
|
}
|
142
|
-
|
13
|
+
declare const Input: $$__sveltets_2_IsomorphicComponent<{
|
14
|
+
/** alt attribute for the image type. Required for accessibility */
|
15
|
+
alt?: string;
|
16
|
+
/** Whether the input should be autofocused. */
|
17
|
+
autofocus?: boolean;
|
18
|
+
/** Whether the input should be autocapitalized. */
|
19
|
+
autocapitalize?: boolean | "off" | "none" | "on" | "sentences" | "words" | "characters";
|
20
|
+
/** Specifies whether autocomplete is enabled for the input. */
|
21
|
+
autocomplete?: Autocomplete;
|
22
|
+
/** Whether the input should be autocorrected. (Safari only) */
|
23
|
+
autocorrect?: boolean;
|
24
|
+
/** A hint to the browser for which capture method to use. */
|
25
|
+
capture?: "user" | "environment";
|
26
|
+
/** Whether the input should be checked. */
|
27
|
+
checked?: boolean;
|
28
|
+
/** Whether the input should be contained. */
|
29
|
+
contained?: boolean;
|
30
|
+
/** Whether the input should be copyable. */
|
31
|
+
copyable?: boolean;
|
32
|
+
/** The default value of the input element. */
|
33
|
+
defaultValue?: string;
|
34
|
+
/** Whether the input should be disabled. */
|
35
|
+
disabled?: boolean;
|
36
|
+
/** A hint to the browser for which enter key to display for the input. */
|
37
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
38
|
+
/** The height of the input element. Valid for image inputs. */
|
39
|
+
height?: number;
|
40
|
+
/** Help text to display below the input. */
|
41
|
+
help?: string | Snippet;
|
42
|
+
/** A random id is generated if not provided. */
|
43
|
+
id?: string;
|
44
|
+
/** Whether the input should be indeterminate. */
|
45
|
+
indeterminate?: boolean;
|
46
|
+
/** A hint to the browser for which keyboard to display. This is only used for type="text" inputs. Strongly consider using type="email" or type="url" etc. instead */
|
47
|
+
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
48
|
+
/** The label for the input */
|
49
|
+
label?: string | Snippet;
|
50
|
+
/** Context tooltip for a label. Renders with a questionmark using ContextTip. */
|
51
|
+
labelTip?: string | Snippet;
|
52
|
+
/** The id of a datalist element that contains pre-defined options for the input element. */
|
53
|
+
list?: string;
|
54
|
+
/** The maximum number of characters (as UTF-16 code units) the user can enter into the input. Valid for text, search, url, tel, email, and password. */
|
55
|
+
maxlength?: number;
|
56
|
+
/** The minimum number of characters (as UTF-16 code units) the user can enter into the input. Valid for text, search, url, tel, email, and password. */
|
57
|
+
minlength?: number;
|
58
|
+
/** Allow multiple f
|
59
|
+
/** The maximum value of the input element. Valid for date, month, week, time, datetime-local, number, and range. */
|
60
|
+
max?: number;
|
61
|
+
/** The minimum value of the input element. Valid for date, month, week, time, datetime-local, number, and range. */
|
62
|
+
min?: number;
|
63
|
+
/** Whether the input should allow multiple values. Valid for email and file inputs. */
|
64
|
+
multiple?: boolean;
|
65
|
+
/** The name of the input element. */
|
66
|
+
name: string;
|
67
|
+
/** The onblur event handler */
|
68
|
+
onblur?: (e: FocusEvent) => void;
|
69
|
+
/** Onchange event handler */
|
70
|
+
onchange?: (e: Event) => void;
|
71
|
+
/** Onclick event handler */
|
72
|
+
onclick?: (e: MouseEvent) => void;
|
73
|
+
/** Onfocus event handler */
|
74
|
+
onfocus?: (e: FocusEvent) => void;
|
75
|
+
/** Keyup event handler */
|
76
|
+
onkeyup?: (e: KeyboardEvent) => void;
|
77
|
+
/** Keydown event handler */
|
78
|
+
onkeydown?: (e: KeyboardEvent) => void;
|
79
|
+
/** Keypress event handler */
|
80
|
+
onkeypress?: (e: KeyboardEvent) => void;
|
81
|
+
/** A regular expression that the input's value is checked against. Valid for text, search, url, tel, email, and password. */
|
82
|
+
pattern?: string;
|
83
|
+
/** Placeholder text to display when the input is empty. */
|
84
|
+
placeholder?: string;
|
85
|
+
/** Suffix content, to display after the input. */
|
86
|
+
suffix?: string | Snippet;
|
87
|
+
/** Prefix content, to display before the input. */
|
88
|
+
prefix?: string | Snippet;
|
89
|
+
/** Whether the input should be read-only. */
|
90
|
+
readonly?: boolean;
|
91
|
+
/** Whether the input should be required. */
|
92
|
+
required?: boolean;
|
93
|
+
/** The shape of the input element. */
|
94
|
+
shape?: "default" | "rounded" | "pill" | "circle";
|
95
|
+
/** The size of the input element. */
|
96
|
+
size?: number;
|
97
|
+
/** Source URL for the image type. */
|
98
|
+
src?: string;
|
99
|
+
/** A number that specifies the granularity that the value must adhere to. Valid for date, month, week, time, datetime-local, number, and range. */
|
100
|
+
step?: number;
|
101
|
+
/** A string that defines the title of the input element. */
|
102
|
+
title?: string;
|
103
|
+
/** The type of input to display. */
|
104
|
+
type?: "button" | "submit" | "checkbox" | "radio" | "hidden" | "text" | "password" | "file" | "image" | "email" | "number" | "tel" | "url" | "range" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color";
|
105
|
+
/** Unit of measurement for range inputs. */
|
106
|
+
unit?: string;
|
107
|
+
/** The value of the input element. */
|
108
|
+
value?: string | number | boolean | null;
|
109
|
+
/** Whether the input should be viewable. Valid for password inputs. */
|
110
|
+
viewable?: boolean;
|
111
|
+
/** Whether the input should only accept directory uploads. */
|
112
|
+
webkitdirectory?: boolean;
|
113
|
+
}, {
|
114
|
+
[evt: string]: CustomEvent<any>;
|
115
|
+
}, {}, {}, "value" | "id">;
|
116
|
+
type Input = InstanceType<typeof Input>;
|
117
|
+
export default Input;
|
@@ -1,21 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
slots: {};
|
11
|
-
};
|
12
|
-
export type InputLengthProps = typeof __propDef.props;
|
13
|
-
export type InputLengthEvents = typeof __propDef.events;
|
14
|
-
export type InputLengthSlots = typeof __propDef.slots;
|
15
|
-
export default class InputLength extends SvelteComponent<InputLengthProps, InputLengthEvents, InputLengthSlots> {
|
16
|
-
constructor(options?: import("svelte").ComponentConstructorOptions<{
|
17
|
-
value: string;
|
18
|
-
maxlength: number;
|
19
|
-
}>);
|
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
|
+
z_$$bindings?: Bindings;
|
20
10
|
}
|
21
|
-
|
11
|
+
declare const InputLength: $$__sveltets_2_IsomorphicComponent<{
|
12
|
+
/** The value of the input. */
|
13
|
+
value: string;
|
14
|
+
/** The maximum length of the input. */
|
15
|
+
maxlength: number;
|
16
|
+
}, {
|
17
|
+
[evt: string]: CustomEvent<any>;
|
18
|
+
}, {}, {}, "">;
|
19
|
+
type InputLength = InstanceType<typeof InputLength>;
|
20
|
+
export default InputLength;
|
package/dist/form/Label.svelte
CHANGED
@@ -2,16 +2,21 @@
|
|
2
2
|
let {
|
3
3
|
id,
|
4
4
|
label,
|
5
|
-
tip
|
5
|
+
tip,
|
6
|
+
required
|
6
7
|
} = $props();
|
7
8
|
</script>
|
8
9
|
|
9
10
|
{#if label}
|
10
|
-
<label for={id}>
|
11
|
+
<label for={id} class:hasTip={!!tip}>
|
11
12
|
{#if typeof label === 'string'}
|
12
|
-
|
13
|
+
<span>
|
14
|
+
{label} {#if required}<span aria-hidden="true">*</span>{/if}
|
15
|
+
</span>
|
13
16
|
{:else}
|
14
|
-
|
17
|
+
<span>
|
18
|
+
{@render label()}
|
19
|
+
</span>
|
15
20
|
{/if}
|
16
21
|
{#if tip}
|
17
22
|
<ContextTip {tip} />
|
@@ -23,5 +28,17 @@ let {
|
|
23
28
|
label {
|
24
29
|
cursor: var(--cursor, default);
|
25
30
|
text-wrap: balance;
|
31
|
+
display: inline-grid;
|
32
|
+
grid-template-columns: 1fr;
|
33
|
+
gap: 0.5em;
|
34
|
+
align-items: center;
|
35
|
+
}
|
36
|
+
label.hasTip {
|
37
|
+
grid-template-columns: 1fr auto;
|
38
|
+
}
|
39
|
+
label > span > span {
|
40
|
+
font-weight: 600;
|
41
|
+
color: var(--text-warn);
|
42
|
+
padding-inline: 0.175em;
|
26
43
|
}
|
27
44
|
</style>
|
@@ -1,31 +1,25 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
};
|
12
|
-
events: {
|
13
|
-
[evt: string]: CustomEvent<any>;
|
14
|
-
};
|
15
|
-
slots: {};
|
16
|
-
};
|
17
|
-
export type LabelProps = typeof __propDef.props;
|
18
|
-
export type LabelEvents = typeof __propDef.events;
|
19
|
-
export type LabelSlots = typeof __propDef.slots;
|
20
|
-
export default class Label extends SvelteComponent<LabelProps, LabelEvents, LabelSlots> {
|
21
|
-
constructor(options?: import("svelte").ComponentConstructorOptions<{
|
22
|
-
id?: string | undefined;
|
23
|
-
label?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
24
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
25
|
-
}) | undefined;
|
26
|
-
tip?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
|
27
|
-
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
28
|
-
}) | undefined;
|
29
|
-
}>);
|
1
|
+
import type { Snippet } from "svelte";
|
2
|
+
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> {
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
4
|
+
$$bindings?: Bindings;
|
5
|
+
} & Exports;
|
6
|
+
(internal: unknown, props: Props & {
|
7
|
+
$$events?: Events;
|
8
|
+
$$slots?: Slots;
|
9
|
+
}): Exports;
|
10
|
+
z_$$bindings?: Bindings;
|
30
11
|
}
|
31
|
-
|
12
|
+
declare const Label: $$__sveltets_2_IsomorphicComponent<{
|
13
|
+
/** The id of the input element */
|
14
|
+
id?: string;
|
15
|
+
/** The label for the input */
|
16
|
+
label?: string | Snippet;
|
17
|
+
/** The help text for the input */
|
18
|
+
tip?: string | Snippet;
|
19
|
+
/** Whether the input is required */
|
20
|
+
required?: boolean;
|
21
|
+
}, {
|
22
|
+
[evt: string]: CustomEvent<any>;
|
23
|
+
}, {}, {}, "">;
|
24
|
+
type Label = InstanceType<typeof Label>;
|
25
|
+
export default Label;
|
@@ -0,0 +1,100 @@
|
|
1
|
+
<script lang="ts">import Theme from "../layout/Theme.svelte";
|
2
|
+
import H5 from "../typo/H5.svelte";
|
3
|
+
import ImageUpload from "./ImageUpload.svelte";
|
4
|
+
import StringOrSnippet from "../utils/StringOrSnippet.svelte";
|
5
|
+
let {
|
6
|
+
lightLogoInputName = "logo_light_url",
|
7
|
+
darkLogoInputName = "logo_dark_url",
|
8
|
+
lightLogoUploadUrl,
|
9
|
+
darkLogoUploadUrl,
|
10
|
+
buttonText = "Select",
|
11
|
+
lightLogoSrc,
|
12
|
+
darkLogoSrc,
|
13
|
+
lightHelp = "This logo will be used on a light theme background.",
|
14
|
+
darkHelp = "If not set, the light theme logo will be used instead.",
|
15
|
+
accept = "image/png,image/jpg",
|
16
|
+
maxSize = 1024 * 1024 * 4,
|
17
|
+
// 4MB
|
18
|
+
removable = true
|
19
|
+
} = $props();
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<div class="LogoUpload">
|
23
|
+
<Theme theme="light">
|
24
|
+
<div class="Content">
|
25
|
+
<H5 hr>Light theme</H5>
|
26
|
+
<div class="Info">
|
27
|
+
<small><StringOrSnippet content={lightHelp} /></small>
|
28
|
+
<ImageUpload
|
29
|
+
compressMaxWidth={512}
|
30
|
+
compressSize={2}
|
31
|
+
{accept}
|
32
|
+
uploadUrl={lightLogoUploadUrl}
|
33
|
+
src={lightLogoSrc}
|
34
|
+
name={lightLogoInputName}
|
35
|
+
button={buttonText}
|
36
|
+
{removable}
|
37
|
+
{maxSize}
|
38
|
+
/>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
</Theme>
|
42
|
+
<Theme theme="dark">
|
43
|
+
<div class="Content">
|
44
|
+
<H5 hr>Dark theme</H5>
|
45
|
+
<div class="Info">
|
46
|
+
<small><StringOrSnippet content={darkHelp} /></small>
|
47
|
+
<ImageUpload
|
48
|
+
compressMaxWidth={512}
|
49
|
+
compressSize={2}
|
50
|
+
{accept}
|
51
|
+
uploadUrl={darkLogoUploadUrl}
|
52
|
+
src={darkLogoSrc}
|
53
|
+
name={darkLogoInputName}
|
54
|
+
button={buttonText}
|
55
|
+
{removable}
|
56
|
+
{maxSize}
|
57
|
+
/>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</Theme>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<style>
|
64
|
+
.LogoUpload {
|
65
|
+
border: var(--border);
|
66
|
+
overflow: hidden;
|
67
|
+
border-radius: var(--border-radius);
|
68
|
+
margin: 0;
|
69
|
+
padding: 0;
|
70
|
+
list-style: none;
|
71
|
+
display: grid;
|
72
|
+
grid-template-columns: 1fr;
|
73
|
+
container-type: inline-size;
|
74
|
+
}
|
75
|
+
.Content {
|
76
|
+
background: var(--bg-app);
|
77
|
+
}
|
78
|
+
.Info {
|
79
|
+
padding: 1rem 1.5rem;
|
80
|
+
display: grid;
|
81
|
+
grid-template-columns: 1fr;
|
82
|
+
gap: 1rem;
|
83
|
+
}
|
84
|
+
.Content :global(h5) {
|
85
|
+
margin-bottom: 0 !important;
|
86
|
+
padding: 1rem 1rem 1rem 1rem;
|
87
|
+
}
|
88
|
+
.Content :global(.Rows) {
|
89
|
+
padding: 0 1rem 1rem 1rem;
|
90
|
+
}
|
91
|
+
@container (min-width: 500px) {
|
92
|
+
.LogoUpload {
|
93
|
+
grid-template-columns: 1fr 1fr;
|
94
|
+
}
|
95
|
+
.Content :global(h5) {
|
96
|
+
margin-bottom: 0 !important;
|
97
|
+
padding: 1rem 1.5rem;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
</style>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import type { Snippet } from "svelte";
|
2
|
+
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> {
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
4
|
+
$$bindings?: Bindings;
|
5
|
+
} & Exports;
|
6
|
+
(internal: unknown, props: Props & {
|
7
|
+
$$events?: Events;
|
8
|
+
$$slots?: Slots;
|
9
|
+
}): Exports;
|
10
|
+
z_$$bindings?: Bindings;
|
11
|
+
}
|
12
|
+
declare const LogoUpload: $$__sveltets_2_IsomorphicComponent<{
|
13
|
+
lightLogoInputName?: string;
|
14
|
+
darkLogoInputName?: string;
|
15
|
+
lightLogoUploadUrl: string;
|
16
|
+
darkLogoUploadUrl: string;
|
17
|
+
buttonText?: string;
|
18
|
+
lightLogoSrc?: string | null;
|
19
|
+
darkLogoSrc?: string | null;
|
20
|
+
lightHelp?: string | Snippet;
|
21
|
+
darkHelp?: string | Snippet;
|
22
|
+
accept: string;
|
23
|
+
maxSize?: number;
|
24
|
+
removable?: boolean;
|
25
|
+
}, {
|
26
|
+
[evt: string]: CustomEvent<any>;
|
27
|
+
}, {}, {}, "">;
|
28
|
+
type LogoUpload = InstanceType<typeof LogoUpload>;
|
29
|
+
export default LogoUpload;
|