sveltacular 0.0.49 → 0.0.50
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 +31 -31
- package/dist/forms/bool-box/bool-box.svelte +3 -3
- package/dist/forms/button/button.svelte +7 -7
- package/dist/forms/check-box/check-box-group.svelte +14 -14
- package/dist/forms/check-box/check-box.svelte +23 -23
- package/dist/forms/combo/new-or-existing-combo.svelte +56 -56
- package/dist/forms/date-box/date-box.svelte +19 -19
- package/dist/forms/file-area/file-area.svelte +31 -31
- package/dist/forms/file-box/file-box.svelte +23 -23
- package/dist/forms/form-field.svelte +7 -7
- package/dist/forms/form-footer.svelte +15 -15
- package/dist/forms/form-header.svelte +9 -9
- package/dist/forms/form-label.svelte +5 -5
- package/dist/forms/form-section.svelte +14 -14
- package/dist/forms/form.svelte +7 -7
- package/dist/forms/info-box/info-box.svelte +19 -19
- package/dist/forms/list-box/list-box.svelte +45 -45
- package/dist/forms/list-box/list-box.svelte.d.ts +2 -2
- package/dist/forms/money-box/money-box.svelte +5 -5
- package/dist/forms/number-box/number-box.svelte +29 -29
- package/dist/forms/phone-box/phone-box.svelte +50 -50
- package/dist/forms/radio-group/radio-box.svelte +15 -15
- package/dist/forms/radio-group/radio-group.svelte +12 -12
- package/dist/forms/switch-box/switch-box.svelte +16 -16
- package/dist/forms/text-area/text-area.svelte +10 -10
- package/dist/forms/text-box/text-box.svelte +34 -34
- package/dist/forms/url-box/url-box.svelte +14 -14
- package/dist/generic/address/address.svelte +16 -16
- package/dist/generic/card/card-container.svelte +7 -7
- package/dist/generic/card/card.svelte +10 -10
- package/dist/generic/date/date-time.svelte +3 -3
- package/dist/generic/divider/divider.svelte +3 -3
- package/dist/generic/dot/dot.svelte +5 -5
- package/dist/generic/email/email.svelte +12 -12
- package/dist/generic/empty/empty.svelte +14 -14
- package/dist/generic/header/header.svelte +17 -17
- package/dist/generic/link/link.svelte +13 -13
- package/dist/generic/menu/menu.svelte +39 -39
- package/dist/generic/menu/menu.svelte.d.ts +1 -1
- package/dist/generic/notice/notice.svelte +25 -25
- package/dist/generic/overlay.svelte +8 -8
- package/dist/generic/panel/panel.svelte +10 -10
- package/dist/generic/phone/phone.svelte +16 -16
- package/dist/generic/pill/pill.svelte +7 -7
- package/dist/generic/scorecard/scorecard.svelte +10 -10
- package/dist/generic/section/section.svelte +10 -10
- package/dist/icons/angle-right-icon.svelte +11 -11
- package/dist/icons/angle-up-icon.svelte +9 -9
- package/dist/icons/check-icon.svelte +15 -15
- package/dist/icons/envelope-icon.svelte +8 -8
- package/dist/icons/folder-open-icon.svelte +12 -12
- package/dist/icons/hamburger-icon.svelte +15 -15
- package/dist/icons/home-icon.svelte +7 -7
- package/dist/icons/link-icon.svelte +15 -15
- package/dist/icons/mobile-phone-icon.svelte +5 -5
- package/dist/icons/phone-icon.svelte +9 -9
- package/dist/icons/svg-icon.svelte +5 -5
- package/dist/icons/upload-icon.svelte +9 -9
- package/dist/images/icon.svelte +5 -5
- package/dist/images/image.svelte +28 -28
- package/dist/layout/flex-col.svelte +7 -7
- package/dist/layout/flex-item.svelte +7 -7
- package/dist/layout/flex-row.svelte +10 -10
- package/dist/layout/grid.svelte +17 -17
- package/dist/modals/alert.svelte +24 -24
- package/dist/modals/confirm.svelte +27 -27
- package/dist/modals/dialog-body.svelte +5 -5
- package/dist/modals/dialog-close-button.svelte +7 -7
- package/dist/modals/dialog-footer.svelte +9 -9
- package/dist/modals/dialog-header.svelte +5 -5
- package/dist/modals/dialog-window.svelte +9 -9
- package/dist/modals/modal.svelte +12 -12
- package/dist/modals/prompt.svelte +29 -29
- package/dist/navigation/accordian/accordian.svelte +17 -17
- package/dist/navigation/app-bar/app-bar.svelte +7 -7
- package/dist/navigation/app-bar/app-branding.svelte +18 -18
- package/dist/navigation/app-bar/app-logo.svelte +11 -11
- package/dist/navigation/app-bar/app-nav-item.svelte +14 -14
- package/dist/navigation/app-bar/app-nav.svelte +12 -12
- package/dist/navigation/breadcrumbs/breadcrumbs.svelte +25 -25
- package/dist/navigation/pagination/pagination.svelte +27 -27
- package/dist/navigation/side-bar/side-bar.svelte +10 -10
- package/dist/navigation/tabs/tab-group.svelte +20 -20
- package/dist/navigation/tabs/tab.svelte +13 -13
- package/dist/navigation/wizard/wizard-step.svelte +12 -12
- package/dist/navigation/wizard/wizard.svelte +27 -27
- package/dist/placeholders/loading.svelte +9 -9
- package/dist/placeholders/progress.svelte +9 -9
- package/dist/placeholders/skeleton-text.svelte +13 -13
- package/dist/tables/data-grid.svelte +80 -80
- package/dist/tables/table-body.svelte +3 -3
- package/dist/tables/table-caption.svelte +5 -5
- package/dist/tables/table-cell.svelte +7 -7
- package/dist/tables/table-footer-cell.svelte +21 -21
- package/dist/tables/table-footer-row.svelte +3 -3
- package/dist/tables/table-footer.svelte +13 -13
- package/dist/tables/table-header-cell.svelte +7 -7
- package/dist/tables/table-header-row.svelte +4 -4
- package/dist/tables/table-header.svelte +14 -14
- package/dist/tables/table-row.svelte +16 -16
- package/dist/tables/table.svelte +11 -11
- package/dist/timeline/timeline-item.svelte +26 -26
- package/dist/timeline/timeline.svelte +5 -5
- package/dist/types/form.d.ts +1 -1
- package/dist/typography/code-block.svelte +7 -7
- package/dist/typography/headline.svelte +19 -19
- package/dist/typography/paragraph.svelte +13 -13
- package/dist/typography/subtitle.svelte +7 -7
- package/dist/typography/text.svelte +7 -7
- package/package.json +101 -101
|
@@ -5,24 +5,24 @@ import FormLabel from "../form-label.svelte";
|
|
|
5
5
|
export let size = "md";
|
|
6
6
|
export let value;
|
|
7
7
|
export let href = void 0;
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<FormField {size}>
|
|
11
|
-
{#if $$slots.default}
|
|
12
|
-
<FormLabel><slot /></FormLabel>
|
|
13
|
-
{/if}
|
|
14
|
-
<div class="input">
|
|
15
|
-
{#if href}
|
|
16
|
-
<span class="icon">
|
|
17
|
-
<LinkIcon />
|
|
18
|
-
</span>
|
|
19
|
-
<a {href} class="text">{value}</a>
|
|
20
|
-
{:else}
|
|
21
|
-
<span class="text">{value}</span>
|
|
22
|
-
{/if}
|
|
23
|
-
</div>
|
|
24
|
-
</FormField>
|
|
25
|
-
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<FormField {size}>
|
|
11
|
+
{#if $$slots.default}
|
|
12
|
+
<FormLabel><slot /></FormLabel>
|
|
13
|
+
{/if}
|
|
14
|
+
<div class="input">
|
|
15
|
+
{#if href}
|
|
16
|
+
<span class="icon">
|
|
17
|
+
<LinkIcon />
|
|
18
|
+
</span>
|
|
19
|
+
<a {href} class="text">{value}</a>
|
|
20
|
+
{:else}
|
|
21
|
+
<span class="text">{value}</span>
|
|
22
|
+
{/if}
|
|
23
|
+
</div>
|
|
24
|
+
</FormField>
|
|
25
|
+
|
|
26
26
|
<style>.input {
|
|
27
27
|
background-color: var(--form-input-disabled-bg, #ccc);
|
|
28
28
|
color: var(--form-input-fg, #000);
|
|
@@ -53,4 +53,4 @@ export let href = void 0;
|
|
|
53
53
|
}
|
|
54
54
|
.input a:hover {
|
|
55
55
|
text-decoration: underline;
|
|
56
|
-
}</style>
|
|
56
|
+
}</style>
|
|
@@ -6,7 +6,7 @@ import Menu from "../../generic/menu/menu.svelte";
|
|
|
6
6
|
import AngleUpIcon from "../../icons/angle-up-icon.svelte";
|
|
7
7
|
import debounce from "../../helpers/debounce.js";
|
|
8
8
|
import { browser } from "$app/environment";
|
|
9
|
-
export let value =
|
|
9
|
+
export let value = null;
|
|
10
10
|
export let items = [];
|
|
11
11
|
export let size = "full";
|
|
12
12
|
export let disabled = false;
|
|
@@ -102,49 +102,49 @@ const updateText = async () => {
|
|
|
102
102
|
triggerSearch();
|
|
103
103
|
$:
|
|
104
104
|
open = isMenuOpen && !disabled;
|
|
105
|
-
</script>
|
|
106
|
-
|
|
107
|
-
<FormField {size}>
|
|
108
|
-
{#if $$slots.default}
|
|
109
|
-
<FormLabel {id} {required} {disabled}><slot /></FormLabel>
|
|
110
|
-
{/if}
|
|
111
|
-
<div class="{open ? 'open' : 'closed'} {disabled ? 'disabled' : 'enabled'}">
|
|
112
|
-
<input
|
|
113
|
-
type="text"
|
|
114
|
-
{id}
|
|
115
|
-
bind:value={text}
|
|
116
|
-
{required}
|
|
117
|
-
{disabled}
|
|
118
|
-
{placeholder}
|
|
119
|
-
readonly={!isSeachable}
|
|
120
|
-
on:focus={() => (isMenuOpen = true)}
|
|
121
|
-
on:keyup={onInputKeyPress}
|
|
122
|
-
data-value={value}
|
|
123
|
-
data-text={text}
|
|
124
|
-
/>
|
|
125
|
-
<button type="button" class="icon" on:click={clickArrow} on:keydown={clickArrow} {disabled}>
|
|
126
|
-
<AngleUpIcon />
|
|
127
|
-
</button>
|
|
128
|
-
{#if text && isSeachable}
|
|
129
|
-
<button type="button" class="clear" on:click={clear} on:keydown={clear} {disabled}>
|
|
130
|
-
X
|
|
131
|
-
</button>
|
|
132
|
-
{/if}
|
|
133
|
-
<div class="dropdown">
|
|
134
|
-
<Menu
|
|
135
|
-
items={filteredItems}
|
|
136
|
-
{open}
|
|
137
|
-
closeAfterSelect={false}
|
|
138
|
-
searchText={text}
|
|
139
|
-
on:select={onSelect}
|
|
140
|
-
size="full"
|
|
141
|
-
bind:highlightIndex
|
|
142
|
-
bind:value
|
|
143
|
-
/>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</FormField>
|
|
147
|
-
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<FormField {size}>
|
|
108
|
+
{#if $$slots.default}
|
|
109
|
+
<FormLabel {id} {required} {disabled}><slot /></FormLabel>
|
|
110
|
+
{/if}
|
|
111
|
+
<div class="{open ? 'open' : 'closed'} {disabled ? 'disabled' : 'enabled'}">
|
|
112
|
+
<input
|
|
113
|
+
type="text"
|
|
114
|
+
{id}
|
|
115
|
+
bind:value={text}
|
|
116
|
+
{required}
|
|
117
|
+
{disabled}
|
|
118
|
+
{placeholder}
|
|
119
|
+
readonly={!isSeachable}
|
|
120
|
+
on:focus={() => (isMenuOpen = true)}
|
|
121
|
+
on:keyup={onInputKeyPress}
|
|
122
|
+
data-value={value}
|
|
123
|
+
data-text={text}
|
|
124
|
+
/>
|
|
125
|
+
<button type="button" class="icon" on:click={clickArrow} on:keydown={clickArrow} {disabled}>
|
|
126
|
+
<AngleUpIcon />
|
|
127
|
+
</button>
|
|
128
|
+
{#if text && isSeachable}
|
|
129
|
+
<button type="button" class="clear" on:click={clear} on:keydown={clear} {disabled}>
|
|
130
|
+
X
|
|
131
|
+
</button>
|
|
132
|
+
{/if}
|
|
133
|
+
<div class="dropdown">
|
|
134
|
+
<Menu
|
|
135
|
+
items={filteredItems}
|
|
136
|
+
{open}
|
|
137
|
+
closeAfterSelect={false}
|
|
138
|
+
searchText={text}
|
|
139
|
+
on:select={onSelect}
|
|
140
|
+
size="full"
|
|
141
|
+
bind:highlightIndex
|
|
142
|
+
bind:value
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</FormField>
|
|
147
|
+
|
|
148
148
|
<style>div {
|
|
149
149
|
position: relative;
|
|
150
150
|
}
|
|
@@ -197,4 +197,4 @@ div .dropdown {
|
|
|
197
197
|
left: 0;
|
|
198
198
|
width: 100%;
|
|
199
199
|
z-index: 3;
|
|
200
|
-
}</style>
|
|
200
|
+
}</style>
|
|
@@ -3,7 +3,7 @@ import type { DropdownOption, FormFieldSizeOptions } from '../../types/form.js';
|
|
|
3
3
|
import type { SearchFunction } from './list-box.js';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
|
-
value?: string | undefined;
|
|
6
|
+
value?: string | null | undefined;
|
|
7
7
|
items?: DropdownOption[] | undefined;
|
|
8
8
|
size?: FormFieldSizeOptions | undefined;
|
|
9
9
|
disabled?: boolean | undefined;
|
|
@@ -13,7 +13,7 @@ declare const __propDef: {
|
|
|
13
13
|
placeholder?: string | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
|
-
change: CustomEvent<string>;
|
|
16
|
+
change: CustomEvent<string | null>;
|
|
17
17
|
} & {
|
|
18
18
|
[evt: string]: CustomEvent<any>;
|
|
19
19
|
};
|
|
@@ -9,8 +9,8 @@ export let min = 0;
|
|
|
9
9
|
export let max = 1e6;
|
|
10
10
|
$:
|
|
11
11
|
decimals = allowCents ? 2 : 0;
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<NumberBox bind:value prefix={symbol} {decimals} {placeholder} {size} {min} {max} {step}
|
|
15
|
-
><slot /></NumberBox
|
|
16
|
-
>
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<NumberBox bind:value prefix={symbol} {decimals} {placeholder} {size} {min} {max} {step}
|
|
15
|
+
><slot /></NumberBox
|
|
16
|
+
>
|
|
@@ -16,34 +16,34 @@ export let step = 1;
|
|
|
16
16
|
const valueChanged = () => {
|
|
17
17
|
value = roundToDecimals(value, decimals);
|
|
18
18
|
};
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<FormField {size}>
|
|
22
|
-
{#if $$slots.default}
|
|
23
|
-
<FormLabel {id}><slot /></FormLabel>
|
|
24
|
-
{/if}
|
|
25
|
-
<div class="input {type}">
|
|
26
|
-
{#if prefix}
|
|
27
|
-
<span class="prefix">{prefix}</span>
|
|
28
|
-
{/if}
|
|
29
|
-
|
|
30
|
-
<input
|
|
31
|
-
{id}
|
|
32
|
-
{placeholder}
|
|
33
|
-
bind:value
|
|
34
|
-
type="number"
|
|
35
|
-
{step}
|
|
36
|
-
{min}
|
|
37
|
-
{max}
|
|
38
|
-
on:change={valueChanged}
|
|
39
|
-
/>
|
|
40
|
-
|
|
41
|
-
{#if suffix}
|
|
42
|
-
<span class="suffix">{suffix}</span>
|
|
43
|
-
{/if}
|
|
44
|
-
</div>
|
|
45
|
-
</FormField>
|
|
46
|
-
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<FormField {size}>
|
|
22
|
+
{#if $$slots.default}
|
|
23
|
+
<FormLabel {id}><slot /></FormLabel>
|
|
24
|
+
{/if}
|
|
25
|
+
<div class="input {type}">
|
|
26
|
+
{#if prefix}
|
|
27
|
+
<span class="prefix">{prefix}</span>
|
|
28
|
+
{/if}
|
|
29
|
+
|
|
30
|
+
<input
|
|
31
|
+
{id}
|
|
32
|
+
{placeholder}
|
|
33
|
+
bind:value
|
|
34
|
+
type="number"
|
|
35
|
+
{step}
|
|
36
|
+
{min}
|
|
37
|
+
{max}
|
|
38
|
+
on:change={valueChanged}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
{#if suffix}
|
|
42
|
+
<span class="suffix">{suffix}</span>
|
|
43
|
+
{/if}
|
|
44
|
+
</div>
|
|
45
|
+
</FormField>
|
|
46
|
+
|
|
47
47
|
<style>.input {
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
@@ -88,4 +88,4 @@ const valueChanged = () => {
|
|
|
88
88
|
}
|
|
89
89
|
.input .suffix {
|
|
90
90
|
border-left: 1px solid var(--form-input-border, black);
|
|
91
|
-
}</style>
|
|
91
|
+
}</style>
|
|
@@ -89,55 +89,55 @@ const keyDown = (event) => {
|
|
|
89
89
|
setValue(value);
|
|
90
90
|
$:
|
|
91
91
|
areaCode || localExt || lastFour ? publishChange() : null;
|
|
92
|
-
</script>
|
|
93
|
-
|
|
94
|
-
<FormField {size}>
|
|
95
|
-
{#if $$slots.default}
|
|
96
|
-
<FormLabel id="{id}-areaCode"><slot /></FormLabel>
|
|
97
|
-
{/if}
|
|
98
|
-
<div class="input">
|
|
99
|
-
<span class="areaCode segment">
|
|
100
|
-
<span>(</span>
|
|
101
|
-
<input
|
|
102
|
-
id="{id}-areaCode"
|
|
103
|
-
type="text"
|
|
104
|
-
on:input={valueChanged}
|
|
105
|
-
on:change={valueChanged}
|
|
106
|
-
on:keypress={keyDown}
|
|
107
|
-
bind:value={areaCode}
|
|
108
|
-
name="areaCode"
|
|
109
|
-
data-maxlength="3"
|
|
110
|
-
/>
|
|
111
|
-
<span>)</span>
|
|
112
|
-
</span>
|
|
113
|
-
<span class="localExt segment">
|
|
114
|
-
<input
|
|
115
|
-
id="{id}-localExt"
|
|
116
|
-
type="text"
|
|
117
|
-
on:input={valueChanged}
|
|
118
|
-
on:change={valueChanged}
|
|
119
|
-
on:keypress={keyDown}
|
|
120
|
-
bind:value={localExt}
|
|
121
|
-
name="localExt"
|
|
122
|
-
data-maxlength="3"
|
|
123
|
-
/>
|
|
124
|
-
</span>
|
|
125
|
-
<span class="lastFour segment">
|
|
126
|
-
<span>-</span>
|
|
127
|
-
<input
|
|
128
|
-
id="{id}-lastFour"
|
|
129
|
-
type="text"
|
|
130
|
-
on:input={valueChanged}
|
|
131
|
-
on:change={valueChanged}
|
|
132
|
-
on:keypress={keyDown}
|
|
133
|
-
bind:value={lastFour}
|
|
134
|
-
name="lastFour"
|
|
135
|
-
data-maxlength="4"
|
|
136
|
-
/></span
|
|
137
|
-
>
|
|
138
|
-
</div>
|
|
139
|
-
</FormField>
|
|
140
|
-
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<FormField {size}>
|
|
95
|
+
{#if $$slots.default}
|
|
96
|
+
<FormLabel id="{id}-areaCode"><slot /></FormLabel>
|
|
97
|
+
{/if}
|
|
98
|
+
<div class="input">
|
|
99
|
+
<span class="areaCode segment">
|
|
100
|
+
<span>(</span>
|
|
101
|
+
<input
|
|
102
|
+
id="{id}-areaCode"
|
|
103
|
+
type="text"
|
|
104
|
+
on:input={valueChanged}
|
|
105
|
+
on:change={valueChanged}
|
|
106
|
+
on:keypress={keyDown}
|
|
107
|
+
bind:value={areaCode}
|
|
108
|
+
name="areaCode"
|
|
109
|
+
data-maxlength="3"
|
|
110
|
+
/>
|
|
111
|
+
<span>)</span>
|
|
112
|
+
</span>
|
|
113
|
+
<span class="localExt segment">
|
|
114
|
+
<input
|
|
115
|
+
id="{id}-localExt"
|
|
116
|
+
type="text"
|
|
117
|
+
on:input={valueChanged}
|
|
118
|
+
on:change={valueChanged}
|
|
119
|
+
on:keypress={keyDown}
|
|
120
|
+
bind:value={localExt}
|
|
121
|
+
name="localExt"
|
|
122
|
+
data-maxlength="3"
|
|
123
|
+
/>
|
|
124
|
+
</span>
|
|
125
|
+
<span class="lastFour segment">
|
|
126
|
+
<span>-</span>
|
|
127
|
+
<input
|
|
128
|
+
id="{id}-lastFour"
|
|
129
|
+
type="text"
|
|
130
|
+
on:input={valueChanged}
|
|
131
|
+
on:change={valueChanged}
|
|
132
|
+
on:keypress={keyDown}
|
|
133
|
+
bind:value={lastFour}
|
|
134
|
+
name="lastFour"
|
|
135
|
+
data-maxlength="4"
|
|
136
|
+
/></span
|
|
137
|
+
>
|
|
138
|
+
</div>
|
|
139
|
+
</FormField>
|
|
140
|
+
|
|
141
141
|
<style>.input {
|
|
142
142
|
background-color: var(--form-input-bg, #fff);
|
|
143
143
|
color: var(--form-input-fg, #000);
|
|
@@ -179,4 +179,4 @@ $:
|
|
|
179
179
|
}
|
|
180
180
|
.input input:focus {
|
|
181
181
|
outline: none;
|
|
182
|
-
}</style>
|
|
182
|
+
}</style>
|
|
@@ -4,20 +4,20 @@ export let value = void 0;
|
|
|
4
4
|
export let group = void 0;
|
|
5
5
|
export let disabled = false;
|
|
6
6
|
const id = uniqueId();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<label>
|
|
10
|
-
<input type="radio" bind:group {value} {disabled} {id} />
|
|
11
|
-
<span class="checkbox">
|
|
12
|
-
<span class="checkmark"><CheckIcon /></span>
|
|
13
|
-
</span>
|
|
14
|
-
{#if $$slots.default}
|
|
15
|
-
<div class="text">
|
|
16
|
-
<slot />
|
|
17
|
-
</div>
|
|
18
|
-
{/if}
|
|
19
|
-
</label>
|
|
20
|
-
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<label>
|
|
10
|
+
<input type="radio" bind:group {value} {disabled} {id} />
|
|
11
|
+
<span class="checkbox">
|
|
12
|
+
<span class="checkmark"><CheckIcon /></span>
|
|
13
|
+
</span>
|
|
14
|
+
{#if $$slots.default}
|
|
15
|
+
<div class="text">
|
|
16
|
+
<slot />
|
|
17
|
+
</div>
|
|
18
|
+
{/if}
|
|
19
|
+
</label>
|
|
20
|
+
|
|
21
21
|
<style>label {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: center;
|
|
@@ -64,4 +64,4 @@ label input:checked + .checkbox {
|
|
|
64
64
|
label input:checked + .checkbox .checkmark {
|
|
65
65
|
width: 100%;
|
|
66
66
|
height: 100%;
|
|
67
|
-
}</style>
|
|
67
|
+
}</style>
|
|
@@ -8,15 +8,15 @@ export let items = [];
|
|
|
8
8
|
export let size = "full";
|
|
9
9
|
export let disabled = false;
|
|
10
10
|
export let required = false;
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<FormField {size}>
|
|
14
|
-
{#if $$slots.default}
|
|
15
|
-
<FormLabel {id} {required}><slot /></FormLabel>
|
|
16
|
-
{/if}
|
|
17
|
-
<div>
|
|
18
|
-
{#each items as item}
|
|
19
|
-
<RadioBox bind:group={value} {disabled} value={item.value}>{item.name}</RadioBox>
|
|
20
|
-
{/each}
|
|
21
|
-
</div>
|
|
22
|
-
</FormField>
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<FormField {size}>
|
|
14
|
+
{#if $$slots.default}
|
|
15
|
+
<FormLabel {id} {required}><slot /></FormLabel>
|
|
16
|
+
{/if}
|
|
17
|
+
<div>
|
|
18
|
+
{#each items as item}
|
|
19
|
+
<RadioBox bind:group={value} {disabled} value={item.value}>{item.name}</RadioBox>
|
|
20
|
+
{/each}
|
|
21
|
+
</div>
|
|
22
|
+
</FormField>
|
|
@@ -4,21 +4,21 @@ export let checked = false;
|
|
|
4
4
|
export let size = "full";
|
|
5
5
|
const id = uniqueId();
|
|
6
6
|
const dispatch = createEventDispatcher();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<label class="switch-box {checked ? 'checked' : ''} {size}">
|
|
10
|
-
<input type="checkbox" bind:checked on:change={() => dispatch('change', checked)} {id} />
|
|
11
|
-
<!-- svelte-ignore a11y-interactive-supports-focus -->
|
|
12
|
-
<span class="switch">
|
|
13
|
-
<span class="slider" />
|
|
14
|
-
</span>
|
|
15
|
-
{#if $$slots.default}
|
|
16
|
-
<div class="text">
|
|
17
|
-
<slot />
|
|
18
|
-
</div>
|
|
19
|
-
{/if}
|
|
20
|
-
</label>
|
|
21
|
-
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<label class="switch-box {checked ? 'checked' : ''} {size}">
|
|
10
|
+
<input type="checkbox" bind:checked on:change={() => dispatch('change', checked)} {id} />
|
|
11
|
+
<!-- svelte-ignore a11y-interactive-supports-focus -->
|
|
12
|
+
<span class="switch">
|
|
13
|
+
<span class="slider" />
|
|
14
|
+
</span>
|
|
15
|
+
{#if $$slots.default}
|
|
16
|
+
<div class="text">
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
{/if}
|
|
20
|
+
</label>
|
|
21
|
+
|
|
22
22
|
<style>label {
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
@@ -140,4 +140,4 @@ label.full.checked .slider {
|
|
|
140
140
|
label.full .text {
|
|
141
141
|
font-size: 1rem;
|
|
142
142
|
margin-left: 0.65rem;
|
|
143
|
-
}</style>
|
|
143
|
+
}</style>
|
|
@@ -9,15 +9,15 @@ export let rows = 4;
|
|
|
9
9
|
export let disabled = false;
|
|
10
10
|
export let required = false;
|
|
11
11
|
export let readonly = false;
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<FormField {size}>
|
|
15
|
-
{#if $$slots.default}
|
|
16
|
-
<FormLabel {id} {required}><slot /></FormLabel>
|
|
17
|
-
{/if}
|
|
18
|
-
<textarea wrap="soft" {id} {placeholder} {rows} bind:value {required} {disabled} {readonly} />
|
|
19
|
-
</FormField>
|
|
20
|
-
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<FormField {size}>
|
|
15
|
+
{#if $$slots.default}
|
|
16
|
+
<FormLabel {id} {required}><slot /></FormLabel>
|
|
17
|
+
{/if}
|
|
18
|
+
<textarea wrap="soft" {id} {placeholder} {rows} bind:value {required} {disabled} {readonly} />
|
|
19
|
+
</FormField>
|
|
20
|
+
|
|
21
21
|
<style>textarea {
|
|
22
22
|
width: 100%;
|
|
23
23
|
height: auto;
|
|
@@ -36,4 +36,4 @@ export let readonly = false;
|
|
|
36
36
|
}
|
|
37
37
|
textarea::placeholder {
|
|
38
38
|
color: var(--form-input-placeholder, #a0aec0);
|
|
39
|
-
}</style>
|
|
39
|
+
}</style>
|
|
@@ -49,39 +49,39 @@ const onInput = (e) => {
|
|
|
49
49
|
}
|
|
50
50
|
dipatch("input", value);
|
|
51
51
|
};
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<FormField {size}>
|
|
55
|
-
{#if $$slots.default}
|
|
56
|
-
<FormLabel {id} {required}><slot /></FormLabel>
|
|
57
|
-
{/if}
|
|
58
|
-
<div class="input {disabled ? 'disabled' : 'enabled'}">
|
|
59
|
-
{#if prefix}
|
|
60
|
-
<div class="prefix">{prefix}</div>
|
|
61
|
-
{/if}
|
|
62
|
-
<input
|
|
63
|
-
{id}
|
|
64
|
-
{placeholder}
|
|
65
|
-
bind:value
|
|
66
|
-
{...{ type }}
|
|
67
|
-
{disabled}
|
|
68
|
-
{readonly}
|
|
69
|
-
{required}
|
|
70
|
-
{maxlength}
|
|
71
|
-
{minlength}
|
|
72
|
-
{pattern}
|
|
73
|
-
on:keypress={onKeyPress}
|
|
74
|
-
on:input={onInput}
|
|
75
|
-
/>
|
|
76
|
-
{#if suffix}
|
|
77
|
-
<div class="suffix">{suffix}</div>
|
|
78
|
-
{/if}
|
|
79
|
-
</div>
|
|
80
|
-
{#if helperText}
|
|
81
|
-
<div class="helper-text">{helperText}</div>
|
|
82
|
-
{/if}
|
|
83
|
-
</FormField>
|
|
84
|
-
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<FormField {size}>
|
|
55
|
+
{#if $$slots.default}
|
|
56
|
+
<FormLabel {id} {required}><slot /></FormLabel>
|
|
57
|
+
{/if}
|
|
58
|
+
<div class="input {disabled ? 'disabled' : 'enabled'}">
|
|
59
|
+
{#if prefix}
|
|
60
|
+
<div class="prefix">{prefix}</div>
|
|
61
|
+
{/if}
|
|
62
|
+
<input
|
|
63
|
+
{id}
|
|
64
|
+
{placeholder}
|
|
65
|
+
bind:value
|
|
66
|
+
{...{ type }}
|
|
67
|
+
{disabled}
|
|
68
|
+
{readonly}
|
|
69
|
+
{required}
|
|
70
|
+
{maxlength}
|
|
71
|
+
{minlength}
|
|
72
|
+
{pattern}
|
|
73
|
+
on:keypress={onKeyPress}
|
|
74
|
+
on:input={onInput}
|
|
75
|
+
/>
|
|
76
|
+
{#if suffix}
|
|
77
|
+
<div class="suffix">{suffix}</div>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
{#if helperText}
|
|
81
|
+
<div class="helper-text">{helperText}</div>
|
|
82
|
+
{/if}
|
|
83
|
+
</FormField>
|
|
84
|
+
|
|
85
85
|
<style>.input {
|
|
86
86
|
display: flex;
|
|
87
87
|
align-items: center;
|
|
@@ -135,4 +135,4 @@ const onInput = (e) => {
|
|
|
135
135
|
font-size: 0.75rem;
|
|
136
136
|
line-height: 1.25rem;
|
|
137
137
|
padding: 0.25rem;
|
|
138
|
-
}</style>
|
|
138
|
+
}</style>
|
|
@@ -10,17 +10,17 @@ const onInput = () => {
|
|
|
10
10
|
value = urlParts[1];
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<TextBox
|
|
16
|
-
bind:value
|
|
17
|
-
type="text"
|
|
18
|
-
{placeholder}
|
|
19
|
-
prefix={protocol + '://'}
|
|
20
|
-
{size}
|
|
21
|
-
on:input={onInput}
|
|
22
|
-
on:change={onInput}
|
|
23
|
-
allowSpaces={false}
|
|
24
|
-
>
|
|
25
|
-
<slot />
|
|
26
|
-
</TextBox>
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<TextBox
|
|
16
|
+
bind:value
|
|
17
|
+
type="text"
|
|
18
|
+
{placeholder}
|
|
19
|
+
prefix={protocol + '://'}
|
|
20
|
+
{size}
|
|
21
|
+
on:input={onInput}
|
|
22
|
+
on:change={onInput}
|
|
23
|
+
allowSpaces={false}
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</TextBox>
|
|
@@ -11,21 +11,21 @@ $:
|
|
|
11
11
|
flatAddress = nobr(
|
|
12
12
|
`${streetAddress}, ${city}, ${region} ${postalCode}, ${country}`.replace(/,\s+/g, ", ")
|
|
13
13
|
);
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<address>
|
|
17
|
-
<a href="https://maps.google.com/?q={flatAddress}" target="_blank" rel="noopener">
|
|
18
|
-
{#each streetAddressArray as line}
|
|
19
|
-
<div>{line}</div>
|
|
20
|
-
{/each}
|
|
21
|
-
<div>
|
|
22
|
-
{city}, {region}
|
|
23
|
-
{country}
|
|
24
|
-
{postalCode}
|
|
25
|
-
</div>
|
|
26
|
-
</a>
|
|
27
|
-
</address>
|
|
28
|
-
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<address>
|
|
17
|
+
<a href="https://maps.google.com/?q={flatAddress}" target="_blank" rel="noopener">
|
|
18
|
+
{#each streetAddressArray as line}
|
|
19
|
+
<div>{line}</div>
|
|
20
|
+
{/each}
|
|
21
|
+
<div>
|
|
22
|
+
{city}, {region}
|
|
23
|
+
{country}
|
|
24
|
+
{postalCode}
|
|
25
|
+
</div>
|
|
26
|
+
</a>
|
|
27
|
+
</address>
|
|
28
|
+
|
|
29
29
|
<style>address {
|
|
30
30
|
display: block;
|
|
31
31
|
margin-bottom: 1rem;
|
|
@@ -37,4 +37,4 @@ address a {
|
|
|
37
37
|
}
|
|
38
38
|
address a:hover {
|
|
39
39
|
text-decoration: underline;
|
|
40
|
-
}</style>
|
|
40
|
+
}</style>
|