@dosgato/dialog 1.1.20 → 1.1.22
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/Button.svelte.d.ts +6 -6
- package/dist/ButtonGroup.svelte.d.ts +4 -4
- package/dist/Checkbox.svelte.d.ts +4 -4
- package/dist/Container.svelte +3 -3
- package/dist/Container.svelte.d.ts +2 -2
- package/dist/Dialog.svelte.d.ts +9 -9
- package/dist/FieldAutocomplete.svelte.d.ts +8 -8
- package/dist/FieldCheckbox.svelte.d.ts +5 -5
- package/dist/FieldChoices.svelte +1 -1
- package/dist/FieldChoices.svelte.d.ts +5 -5
- package/dist/FieldChooserLink.svelte.d.ts +8 -8
- package/dist/FieldDate.svelte.d.ts +5 -5
- package/dist/FieldDateTime.svelte.d.ts +5 -5
- package/dist/FieldDualListbox.svelte.d.ts +7 -7
- package/dist/FieldHidden.svelte.d.ts +4 -4
- package/dist/FieldIdentifier.svelte.d.ts +1 -1
- package/dist/FieldMultiple.svelte.d.ts +7 -7
- package/dist/FieldMultiselect.svelte.d.ts +8 -8
- package/dist/FieldNumber.svelte.d.ts +6 -6
- package/dist/FieldRadio.svelte.d.ts +10 -10
- package/dist/FieldSelect.svelte.d.ts +12 -12
- package/dist/FieldStandard.svelte.d.ts +8 -8
- package/dist/FieldText.svelte.d.ts +10 -10
- package/dist/FieldTextArea.svelte.d.ts +7 -7
- package/dist/FileIcon.svelte.d.ts +3 -3
- package/dist/Form.svelte.d.ts +41 -7
- package/dist/FormDialog.svelte.d.ts +8 -8
- package/dist/Icon.svelte.d.ts +1 -1
- package/dist/Input.svelte.d.ts +9 -9
- package/dist/Listbox.svelte.d.ts +6 -6
- package/dist/Radio.svelte.d.ts +4 -4
- package/dist/Switcher.svelte.d.ts +10 -10
- package/dist/Tabs.svelte.d.ts +3 -3
- package/dist/Tooltip.svelte.d.ts +5 -5
- package/dist/chooser/Chooser.svelte.d.ts +5 -5
- package/dist/chooser/Details.svelte.d.ts +1 -1
- package/dist/chooser/Thumbnail.svelte.d.ts +3 -3
- package/dist/chooser/UploadUI.svelte.d.ts +5 -5
- package/dist/code/CodeEditor.svelte.d.ts +4 -4
- package/dist/code/FieldCodeEditor.svelte.d.ts +9 -9
- package/dist/colorpicker/FieldColorPicker.svelte.d.ts +5 -5
- package/dist/cropper/FieldCropper.svelte +1 -1
- package/dist/cropper/FieldCropper.svelte.d.ts +4 -4
- package/dist/iconpicker/FieldIconPicker.svelte +27 -8
- package/dist/iconpicker/FieldIconPicker.svelte.d.ts +3 -3
- package/dist/imageposition/FieldImagePosition.svelte +197 -0
- package/dist/imageposition/FieldImagePosition.svelte.d.ts +25 -0
- package/dist/imageposition/index.d.ts +2 -0
- package/dist/imageposition/index.js +2 -0
- package/dist/imageposition/position.d.ts +4 -0
- package/dist/imageposition/position.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/tree/Tree.svelte.d.ts +2 -2
- package/package.json +8 -9
package/dist/Form.svelte.d.ts
CHANGED
|
@@ -1,14 +1,48 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { type FormStore, type Feedback, type SubmitResponse } from '@txstate-mws/svelte-forms';
|
|
3
|
+
import { type Client } from './';
|
|
4
|
+
declare class __sveltets_Render<T extends Record<string, any>, F extends any> {
|
|
5
|
+
props(): {
|
|
6
|
+
class?: string;
|
|
7
|
+
submit?: ((state: T) => Promise<SubmitResponse<T>>) | undefined;
|
|
8
|
+
validate?: ((state: T) => Promise<Feedback[]>) | undefined;
|
|
9
|
+
store?: FormStore<T> | undefined;
|
|
10
|
+
chooserClient?: Client<F> | undefined;
|
|
11
|
+
autocomplete?: string | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
preload?: T | undefined;
|
|
14
|
+
};
|
|
4
15
|
events(): {
|
|
16
|
+
saved: any;
|
|
17
|
+
} & {
|
|
5
18
|
[evt: string]: CustomEvent<any>;
|
|
6
19
|
};
|
|
7
|
-
slots():
|
|
20
|
+
slots(): {
|
|
21
|
+
default: {
|
|
22
|
+
messages: Feedback[];
|
|
23
|
+
allMessages: Feedback[];
|
|
24
|
+
saved: boolean;
|
|
25
|
+
validating: boolean;
|
|
26
|
+
submitting: boolean;
|
|
27
|
+
valid: boolean;
|
|
28
|
+
invalid: boolean;
|
|
29
|
+
showingInlineErrors: boolean;
|
|
30
|
+
data: Partial<T>;
|
|
31
|
+
};
|
|
32
|
+
submit: {
|
|
33
|
+
saved: boolean;
|
|
34
|
+
validating: boolean;
|
|
35
|
+
submitting: boolean;
|
|
36
|
+
allMessages: Feedback[];
|
|
37
|
+
valid: boolean;
|
|
38
|
+
invalid: boolean;
|
|
39
|
+
showingInlineErrors: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
8
42
|
}
|
|
9
|
-
export type FormProps<T extends
|
|
10
|
-
export type FormEvents<T extends
|
|
11
|
-
export type FormSlots<T extends
|
|
12
|
-
export default class Form<T extends
|
|
43
|
+
export type FormProps<T extends Record<string, any>, F extends any> = ReturnType<__sveltets_Render<T, F>['props']>;
|
|
44
|
+
export type FormEvents<T extends Record<string, any>, F extends any> = ReturnType<__sveltets_Render<T, F>['events']>;
|
|
45
|
+
export type FormSlots<T extends Record<string, any>, F extends any> = ReturnType<__sveltets_Render<T, F>['slots']>;
|
|
46
|
+
export default class Form<T extends Record<string, any>, F extends any> extends SvelteComponentTyped<FormProps<T, F>, FormEvents<T, F>, FormSlots<T, F>> {
|
|
13
47
|
}
|
|
14
48
|
export {};
|
|
@@ -2,17 +2,17 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { IconifyIcon } from '@iconify/svelte';
|
|
3
3
|
import type { Feedback, FormStore, SubmitResponse } from '@txstate-mws/svelte-forms';
|
|
4
4
|
import { type Client } from './';
|
|
5
|
-
declare class __sveltets_Render<T extends any
|
|
5
|
+
declare class __sveltets_Render<T extends Record<string, any>> {
|
|
6
6
|
props(): {
|
|
7
7
|
submit: (state: T) => Promise<SubmitResponse<T>>;
|
|
8
8
|
validate?: ((state: T) => Promise<Feedback[]>) | undefined;
|
|
9
9
|
store?: FormStore<T> | undefined;
|
|
10
|
-
chooserClient?: Client
|
|
10
|
+
chooserClient?: Client | undefined;
|
|
11
11
|
autocomplete?: string | undefined;
|
|
12
12
|
name?: string | undefined;
|
|
13
|
-
title?: string
|
|
13
|
+
title?: string;
|
|
14
14
|
icon?: IconifyIcon | undefined;
|
|
15
|
-
size?: "
|
|
15
|
+
size?: "tiny" | "small" | "normal" | "large";
|
|
16
16
|
preload?: T | undefined;
|
|
17
17
|
};
|
|
18
18
|
events(): {
|
|
@@ -33,9 +33,9 @@ declare class __sveltets_Render<T extends any> {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
export type FormDialogProps<T extends any
|
|
37
|
-
export type FormDialogEvents<T extends any
|
|
38
|
-
export type FormDialogSlots<T extends any
|
|
39
|
-
export default class FormDialog<T extends any
|
|
36
|
+
export type FormDialogProps<T extends Record<string, any>> = ReturnType<__sveltets_Render<T>['props']>;
|
|
37
|
+
export type FormDialogEvents<T extends Record<string, any>> = ReturnType<__sveltets_Render<T>['events']>;
|
|
38
|
+
export type FormDialogSlots<T extends Record<string, any>> = ReturnType<__sveltets_Render<T>['slots']>;
|
|
39
|
+
export default class FormDialog<T extends Record<string, any>> extends SvelteComponentTyped<FormDialogProps<T>, FormDialogEvents<T>, FormDialogSlots<T>> {
|
|
40
40
|
}
|
|
41
41
|
export {};
|
package/dist/Icon.svelte.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
icon: IconifyIcon | undefined;
|
|
6
6
|
/** Label used in a `<ScreenReaderOnly>`. */ hiddenLabel?: string | undefined;
|
|
7
|
-
inline?: boolean
|
|
7
|
+
inline?: boolean;
|
|
8
8
|
width?: string | number | undefined;
|
|
9
9
|
height?: string | number | undefined;
|
|
10
10
|
tooltip?: string | undefined;
|
package/dist/Input.svelte.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import { type HTMLActionEntry } from '@txstate-mws/svelte-components';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
class?: string
|
|
5
|
+
class?: string;
|
|
6
6
|
name: string;
|
|
7
7
|
value: string;
|
|
8
|
-
type?: string
|
|
9
|
-
allowlastpass?: boolean
|
|
8
|
+
type?: string;
|
|
9
|
+
allowlastpass?: boolean;
|
|
10
10
|
maxlength?: number | undefined;
|
|
11
11
|
min?: string | Date | {
|
|
12
12
|
toJSDate: () => Date;
|
|
@@ -16,18 +16,18 @@ declare const __propDef: {
|
|
|
16
16
|
} | number | undefined;
|
|
17
17
|
step?: number | undefined;
|
|
18
18
|
id?: string | undefined;
|
|
19
|
-
disabled?: boolean
|
|
20
|
-
autocomplete?: string
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
autocomplete?: string;
|
|
21
21
|
extradescid?: string | undefined;
|
|
22
22
|
messagesid?: string | undefined;
|
|
23
23
|
helptextid?: string | undefined;
|
|
24
|
-
valid?: boolean
|
|
25
|
-
invalid?: boolean
|
|
24
|
+
valid?: boolean;
|
|
25
|
+
invalid?: boolean;
|
|
26
26
|
onChange: any;
|
|
27
27
|
onBlur: any;
|
|
28
28
|
onSelect?: any;
|
|
29
|
-
use?: HTMLActionEntry[]
|
|
30
|
-
inputelement?: HTMLInputElement
|
|
29
|
+
use?: HTMLActionEntry[];
|
|
30
|
+
inputelement?: HTMLInputElement;
|
|
31
31
|
};
|
|
32
32
|
events: {
|
|
33
33
|
[evt: string]: CustomEvent<any>;
|
package/dist/Listbox.svelte.d.ts
CHANGED
|
@@ -2,16 +2,16 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import { type PopupMenuItem } from '@txstate-mws/svelte-components';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
items?: PopupMenuItem[]
|
|
5
|
+
items?: PopupMenuItem[];
|
|
6
6
|
label: string;
|
|
7
|
-
multiselect?: boolean
|
|
7
|
+
multiselect?: boolean;
|
|
8
8
|
selected?: {
|
|
9
9
|
value: string;
|
|
10
|
-
label?: string
|
|
11
|
-
}[]
|
|
10
|
+
label?: string;
|
|
11
|
+
}[];
|
|
12
12
|
descid?: string | undefined;
|
|
13
|
-
valid?: boolean
|
|
14
|
-
invalid?: boolean
|
|
13
|
+
valid?: boolean;
|
|
14
|
+
invalid?: boolean;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
17
|
change: CustomEvent<any>;
|
package/dist/Radio.svelte.d.ts
CHANGED
|
@@ -4,15 +4,15 @@ declare const __propDef: {
|
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
name: string;
|
|
6
6
|
value: string;
|
|
7
|
-
selected?: boolean
|
|
7
|
+
selected?: boolean;
|
|
8
8
|
onChange?: any;
|
|
9
9
|
onBlur?: any;
|
|
10
10
|
messagesid?: string | undefined;
|
|
11
11
|
helptextid?: string | undefined;
|
|
12
12
|
extradescid?: string | undefined;
|
|
13
|
-
disabled?: boolean
|
|
14
|
-
valid?: boolean
|
|
15
|
-
invalid?: boolean
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
valid?: boolean;
|
|
15
|
+
invalid?: boolean;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
|
18
18
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,25 +2,25 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Feedback } from '@txstate-mws/svelte-forms';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
class?: string
|
|
5
|
+
class?: string;
|
|
6
6
|
id?: string | undefined;
|
|
7
|
-
path?: string
|
|
8
|
-
name?: string
|
|
7
|
+
path?: string;
|
|
8
|
+
name?: string;
|
|
9
9
|
choices: {
|
|
10
10
|
label?: string;
|
|
11
11
|
value: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
}[];
|
|
14
|
-
horizontal?: boolean
|
|
14
|
+
horizontal?: boolean;
|
|
15
15
|
label: string;
|
|
16
|
-
required?: boolean
|
|
17
|
-
related?:
|
|
16
|
+
required?: boolean;
|
|
17
|
+
related?: true | number;
|
|
18
18
|
extradescid?: string | undefined;
|
|
19
19
|
helptext?: string | undefined;
|
|
20
|
-
messages?: Feedback[]
|
|
21
|
-
iptValue?: string
|
|
22
|
-
valid?: boolean
|
|
23
|
-
invalid?: boolean
|
|
20
|
+
messages?: Feedback[];
|
|
21
|
+
iptValue?: string;
|
|
22
|
+
valid?: boolean;
|
|
23
|
+
invalid?: boolean;
|
|
24
24
|
onBlur?: (() => void | Promise<void>) | undefined;
|
|
25
25
|
};
|
|
26
26
|
events: {
|
package/dist/Tabs.svelte.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
tabs: TabDef[];
|
|
6
6
|
active?: string | undefined;
|
|
7
|
-
store?: TabStore
|
|
8
|
-
disableDialogControl?: boolean
|
|
9
|
-
accordionOnMobile?: boolean
|
|
7
|
+
store?: TabStore;
|
|
8
|
+
disableDialogControl?: boolean;
|
|
9
|
+
accordionOnMobile?: boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Takes the width of the tabs area, in pixels, and returns the number of tabs that should be
|
|
12
12
|
* displayed at that width.
|
package/dist/Tooltip.svelte.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
tip?: string | undefined;
|
|
5
|
-
top?: boolean
|
|
6
|
-
right?: boolean
|
|
7
|
-
bottom?: boolean
|
|
8
|
-
left?: boolean
|
|
9
|
-
active?: boolean
|
|
5
|
+
top?: boolean;
|
|
6
|
+
right?: boolean;
|
|
7
|
+
bottom?: boolean;
|
|
8
|
+
left?: boolean;
|
|
9
|
+
active?: boolean;
|
|
10
10
|
};
|
|
11
11
|
events: {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -4,11 +4,11 @@ import { ChooserStore } from './ChooserStore';
|
|
|
4
4
|
declare class __sveltets_Render<F> {
|
|
5
5
|
props(): {
|
|
6
6
|
label?: string | undefined;
|
|
7
|
-
images?: boolean
|
|
8
|
-
pages?: boolean
|
|
9
|
-
assets?: boolean
|
|
10
|
-
folders?: boolean
|
|
11
|
-
required?: boolean
|
|
7
|
+
images?: boolean;
|
|
8
|
+
pages?: boolean;
|
|
9
|
+
assets?: boolean;
|
|
10
|
+
folders?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
12
|
initialSource?: string | undefined;
|
|
13
13
|
initialPath?: string | undefined;
|
|
14
14
|
activeSources?: string[] | undefined;
|
|
@@ -4,9 +4,9 @@ import type { BrokenURL, RawURL } from './ChooserStore';
|
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
item: AnyItem | RawURL | BrokenURL;
|
|
7
|
-
larger?: boolean
|
|
8
|
-
expandable?: boolean
|
|
9
|
-
expanded?: boolean
|
|
7
|
+
larger?: boolean;
|
|
8
|
+
expandable?: boolean;
|
|
9
|
+
expanded?: boolean;
|
|
10
10
|
};
|
|
11
11
|
events: {
|
|
12
12
|
thumbnailsizechange: CustomEvent<any>;
|
|
@@ -4,11 +4,11 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
title: string;
|
|
6
6
|
folder: Folder;
|
|
7
|
-
maxFiles?: number
|
|
8
|
-
escapable?: boolean
|
|
9
|
-
mimeWhitelist?: string[]
|
|
10
|
-
mimeBlacklist?: string[]
|
|
11
|
-
uploader: NonNullable<Client[
|
|
7
|
+
maxFiles?: number;
|
|
8
|
+
escapable?: boolean;
|
|
9
|
+
mimeWhitelist?: string[];
|
|
10
|
+
mimeBlacklist?: string[];
|
|
11
|
+
uploader: NonNullable<Client["upload"]>;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
saved: CustomEvent<any>;
|
|
@@ -2,11 +2,11 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import { type HTMLActionEntry } from '@txstate-mws/svelte-components';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
class?: string
|
|
5
|
+
class?: string;
|
|
6
6
|
id?: string | undefined;
|
|
7
|
-
rows?: number
|
|
8
|
-
language:
|
|
9
|
-
use?: HTMLActionEntry[]
|
|
7
|
+
rows?: number;
|
|
8
|
+
language: "js" | "css" | "html";
|
|
9
|
+
use?: HTMLActionEntry[];
|
|
10
10
|
inputelement?: HTMLElement | undefined;
|
|
11
11
|
extradescid?: string | undefined;
|
|
12
12
|
helptextid?: string | undefined;
|
|
@@ -2,21 +2,21 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { HTMLActionEntry } from '@txstate-mws/svelte-components';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
class?: string
|
|
5
|
+
class?: string;
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
path: string;
|
|
8
|
-
label?: string
|
|
9
|
-
notNull?: boolean
|
|
8
|
+
label?: string;
|
|
9
|
+
notNull?: boolean;
|
|
10
10
|
defaultValue?: any;
|
|
11
|
-
rows?: number
|
|
11
|
+
rows?: number;
|
|
12
12
|
conditional?: boolean | undefined;
|
|
13
|
-
required?: boolean
|
|
14
|
-
use?: HTMLActionEntry[]
|
|
15
|
-
inputelement?: HTMLElement
|
|
16
|
-
related?:
|
|
13
|
+
required?: boolean;
|
|
14
|
+
use?: HTMLActionEntry[];
|
|
15
|
+
inputelement?: HTMLElement;
|
|
16
|
+
related?: true | number;
|
|
17
17
|
extradescid?: string | undefined;
|
|
18
18
|
helptext?: string | undefined;
|
|
19
|
-
language:
|
|
19
|
+
language: "js" | "css" | "html";
|
|
20
20
|
};
|
|
21
21
|
events: {
|
|
22
22
|
paste: ClipboardEvent;
|
|
@@ -3,13 +3,13 @@ import type { ColorPickerOption } from './colorpicker';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
id?: string | undefined;
|
|
6
|
-
class?: string
|
|
6
|
+
class?: string;
|
|
7
7
|
path: string;
|
|
8
8
|
options: ColorPickerOption[];
|
|
9
|
-
addAllOption?: boolean
|
|
10
|
-
label?: string
|
|
11
|
-
required?: boolean
|
|
12
|
-
notNull?: boolean
|
|
9
|
+
addAllOption?: boolean;
|
|
10
|
+
label?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
notNull?: boolean;
|
|
13
13
|
defaultValue?: any;
|
|
14
14
|
conditional?: boolean | undefined;
|
|
15
15
|
helptext?: string | undefined;
|
|
@@ -4,10 +4,10 @@ declare const __propDef: {
|
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
path: string;
|
|
6
6
|
imageSrc: string | undefined;
|
|
7
|
-
selectionAspectRatio?: number
|
|
8
|
-
minSelection?: number
|
|
9
|
-
label?: string
|
|
10
|
-
required?: boolean
|
|
7
|
+
selectionAspectRatio?: number;
|
|
8
|
+
minSelection?: number;
|
|
9
|
+
label?: string;
|
|
10
|
+
required?: boolean;
|
|
11
11
|
conditional?: boolean | undefined;
|
|
12
12
|
helptext?: string | undefined;
|
|
13
13
|
};
|
|
@@ -48,10 +48,11 @@ function onCancel(val) {
|
|
|
48
48
|
}
|
|
49
49
|
function onSearch() {
|
|
50
50
|
visibleIcons = FontAwesomeIcons.filter(i => {
|
|
51
|
-
|
|
51
|
+
const searchValLC = searchVal.toLowerCase();
|
|
52
|
+
if (i.class.toLowerCase().includes(searchValLC))
|
|
52
53
|
return true;
|
|
53
54
|
for (const term of i.search.terms) {
|
|
54
|
-
if (term.includes(
|
|
55
|
+
if (term.toLowerCase().includes(searchValLC))
|
|
55
56
|
return true;
|
|
56
57
|
}
|
|
57
58
|
return false;
|
|
@@ -128,7 +129,7 @@ function onKeyDown(e) {
|
|
|
128
129
|
</div>
|
|
129
130
|
<fieldset>
|
|
130
131
|
<ScreenReaderOnly><legend class="sr-only">Icons</legend></ScreenReaderOnly>
|
|
131
|
-
<div class="icon-picker-items" role="radiogroup">
|
|
132
|
+
<div class="icon-picker-items" role="radiogroup" class:empty={visibleIcons.length === 0}>
|
|
132
133
|
{#each visibleIcons as icon, idx (icon.class)}
|
|
133
134
|
|
|
134
135
|
<div bind:this={iconElements[idx]} id={icon.class} class="icon-picker-item" role="radio" aria-checked={icon.class === selected.icon} tabindex={icon.class === selected.icon ? 0 : -1} data-index={idx} on:click={() => onSelectIcon(icon.class)} on:keydown={onKeyDown}>
|
|
@@ -234,23 +235,41 @@ function onKeyDown(e) {
|
|
|
234
235
|
|
|
235
236
|
/* Styles for the icon picker grid */
|
|
236
237
|
|
|
237
|
-
.icon-picker-items{
|
|
238
|
+
.icon-picker-items {
|
|
238
239
|
margin-top: 5px;
|
|
239
240
|
padding: 5px;
|
|
241
|
+
display: grid;
|
|
242
|
+
grid-template-columns: repeat(7, 1fr);
|
|
243
|
+
row-gap: 1em;
|
|
244
|
+
column-gap: 1em;
|
|
245
|
+
justify-items: center;
|
|
246
|
+
align-items: center;
|
|
247
|
+
}
|
|
248
|
+
.icon-picker-items.empty {
|
|
249
|
+
display: block;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@media (max-width: 800px) {
|
|
253
|
+
.icon-picker-items {
|
|
254
|
+
grid-template-columns: repeat(5, 1fr);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@media (max-width: 500px) {
|
|
259
|
+
.icon-picker-items {
|
|
260
|
+
grid-template-columns: repeat(4, 1fr);
|
|
261
|
+
}
|
|
240
262
|
}
|
|
241
263
|
|
|
242
264
|
.icon-picker-item {
|
|
243
|
-
float: left;
|
|
244
|
-
margin: 0px 11px 12px 11px;
|
|
245
265
|
text-align: center;
|
|
246
266
|
cursor: pointer;
|
|
247
267
|
color: inherit;
|
|
248
|
-
width: 10%;
|
|
249
268
|
position: relative;
|
|
250
269
|
font-size: 28px;
|
|
251
270
|
}
|
|
252
271
|
|
|
253
|
-
.icon-picker-item[aria-checked=true]
|
|
272
|
+
.icon-picker-item[aria-checked=true] {
|
|
254
273
|
outline: 4px solid #93BBC4;
|
|
255
274
|
background-color: #eee;
|
|
256
275
|
}
|
|
@@ -3,12 +3,12 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
path: string;
|
|
6
|
-
label?: string
|
|
7
|
-
required?: boolean
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
8
|
defaultValue?: {
|
|
9
9
|
icon: string;
|
|
10
10
|
prefix: string;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
conditional?: boolean | undefined;
|
|
13
13
|
helptext?: string | undefined;
|
|
14
14
|
};
|