sveltacular 0.0.65 → 0.0.67
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/forms/phone-box/phone-box.svelte +2 -3
- package/dist/generic/card/card-container.svelte.d.ts +2 -2
- package/dist/generic/empty/empty.svelte.d.ts +1 -1
- package/dist/generic/phone/phone.svelte +8 -8
- package/dist/generic/phone/phone.svelte.d.ts +1 -1
- package/dist/layout/flex-col.svelte +19 -1
- package/dist/layout/flex-col.svelte.d.ts +3 -0
- package/dist/layout/flex-item.svelte +3 -3
- package/dist/layout/flex-item.svelte.d.ts +6 -14
- package/dist/layout/flex-row.svelte +21 -18
- package/dist/layout/flex-row.svelte.d.ts +3 -1
- package/dist/navigation/app-bar/app-nav.svelte.d.ts +2 -2
- package/dist/navigation/pagination/pagination.svelte.d.ts +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ const cleanValue = (value2) => {
|
|
|
28
28
|
};
|
|
29
29
|
const publishChange = () => {
|
|
30
30
|
value = cleanValue(`${areaCode}${localExt}${lastFour}`);
|
|
31
|
+
console.log("publishChange", value);
|
|
31
32
|
dispatch("change", value);
|
|
32
33
|
return value;
|
|
33
34
|
};
|
|
@@ -53,8 +54,7 @@ const valueChanged = (event) => {
|
|
|
53
54
|
}
|
|
54
55
|
props.target.value = newValue.slice(0, props.maxLength);
|
|
55
56
|
if (newValue.length >= props.maxLength) {
|
|
56
|
-
|
|
57
|
-
props.nextInput.focus();
|
|
57
|
+
setTimeout(() => props.nextInput && props.nextInput.focus(), 1);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
const keyDown = (event) => {
|
|
@@ -78,7 +78,6 @@ const keyDown = (event) => {
|
|
|
78
78
|
return isDelete ? props.value.slice(0, -1) : props.value + event.key;
|
|
79
79
|
})();
|
|
80
80
|
if (newValue.length >= props.maxLength) {
|
|
81
|
-
event.preventDefault();
|
|
82
81
|
props.target.value = newValue.slice(0, props.maxLength);
|
|
83
82
|
if (props.nextInput)
|
|
84
83
|
props.nextInput.focus();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
align?: "
|
|
5
|
-
spacing?: "none" | "
|
|
4
|
+
align?: "start" | "center" | "end" | "left" | "right" | undefined;
|
|
5
|
+
spacing?: "none" | "space-between" | "space-around" | "space-evenly" | "tight" | "compact" | "loose" | undefined;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -5,7 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
6
6
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
7
7
|
reverse?: boolean | undefined;
|
|
8
|
-
align?: "
|
|
8
|
+
align?: "start" | "center" | "end" | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<script>import { capitalize } from "../../helpers/capitalize.js";
|
|
2
2
|
import MobilePhoneIcon from "../../icons/mobile-phone-icon.svelte";
|
|
3
3
|
import PhoneIcon from "../../icons/phone-icon.svelte";
|
|
4
|
-
export let
|
|
4
|
+
export let value;
|
|
5
5
|
export let type = "mobile";
|
|
6
|
-
const getDigits = (
|
|
7
|
-
return
|
|
6
|
+
const getDigits = (phoneNumber) => {
|
|
7
|
+
return phoneNumber.replace(/[^0-9]/g, "");
|
|
8
8
|
};
|
|
9
|
-
const formatPhoneNumber = (
|
|
10
|
-
const cleaned = getDigits(
|
|
9
|
+
const formatPhoneNumber = (phoneNumber) => {
|
|
10
|
+
const cleaned = getDigits(phoneNumber);
|
|
11
11
|
const match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/);
|
|
12
12
|
if (match) {
|
|
13
13
|
return "(" + match[1] + ") " + match[2] + "-" + match[3];
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return phoneNumber;
|
|
16
16
|
};
|
|
17
17
|
$:
|
|
18
|
-
formattedPhoneNumber = formatPhoneNumber(
|
|
18
|
+
formattedPhoneNumber = formatPhoneNumber(value);
|
|
19
19
|
$:
|
|
20
|
-
phoneNumberDigits = getDigits(
|
|
20
|
+
phoneNumberDigits = getDigits(value);
|
|
21
21
|
$:
|
|
22
22
|
protocol = type === "sms" ? "sms:" : "tel:";
|
|
23
23
|
$:
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
<script>export let marginBottom = 0;
|
|
2
2
|
export let marginTop = 0;
|
|
3
3
|
export let gap = "1rem";
|
|
4
|
+
export let justifyContent = "start";
|
|
5
|
+
export let alignItems = "stretch";
|
|
6
|
+
export let alignContent = "stretch";
|
|
7
|
+
$:
|
|
8
|
+
_marginTop = typeof marginTop === "number" ? `${marginTop}px` : marginTop;
|
|
9
|
+
$:
|
|
10
|
+
_marginBottom = typeof marginBottom === "number" ? `${marginBottom}px` : marginBottom;
|
|
11
|
+
$:
|
|
12
|
+
_justifyContent = ["start", "end"].includes(justifyContent) ? `flex-${justifyContent}` : ["between", "around", "evenly"].includes(justifyContent) ? `space-${justifyContent}` : justifyContent;
|
|
13
|
+
$:
|
|
14
|
+
_alignContent = ["start", "end"].includes(alignContent) ? `flex-${alignContent}` : ["between", "around"].includes(alignContent) ? `space-${alignContent}` : alignContent;
|
|
15
|
+
$:
|
|
16
|
+
_alignItems = ["start", "end"].includes(alignItems) ? `flex-${alignItems}` : alignItems;
|
|
17
|
+
$:
|
|
18
|
+
_gap = typeof gap === "number" ? `${gap}px` : gap;
|
|
4
19
|
</script>
|
|
5
20
|
|
|
6
|
-
<div style={`
|
|
21
|
+
<div style={`
|
|
22
|
+
margin-top: ${_marginTop}; margin-bottom: ${_marginBottom};
|
|
23
|
+
gap: ${_gap}; jusify-content: ${_justifyContent}; align-items: ${_alignItems}; align-content: ${_alignContent}
|
|
24
|
+
`}>
|
|
7
25
|
<slot />
|
|
8
26
|
</div>
|
|
9
27
|
|
|
@@ -4,6 +4,9 @@ declare const __propDef: {
|
|
|
4
4
|
marginBottom?: string | number | undefined;
|
|
5
5
|
marginTop?: string | number | undefined;
|
|
6
6
|
gap?: string | number | undefined;
|
|
7
|
+
justifyContent?: "start" | "center" | "end" | "stretch" | "baseline" | "between" | "around" | "evenly" | undefined;
|
|
8
|
+
alignItems?: "auto" | "start" | "center" | "end" | "stretch" | undefined;
|
|
9
|
+
alignContent?: "start" | "center" | "end" | "stretch" | "between" | "around" | undefined;
|
|
7
10
|
};
|
|
8
11
|
events: {
|
|
9
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} FlexItemProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} FlexItemEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} FlexItemSlots */
|
|
4
|
-
export default class FlexItem extends SvelteComponent<{
|
|
5
|
-
grow?: boolean | undefined;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type FlexItemProps = typeof __propDef.props;
|
|
13
|
-
export type FlexItemEvents = typeof __propDef.events;
|
|
14
|
-
export type FlexItemSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponent } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
18
4
|
grow?: boolean | undefined;
|
|
5
|
+
align?: "auto" | "start" | "center" | "end" | "stretch" | undefined;
|
|
19
6
|
};
|
|
20
7
|
events: {
|
|
21
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -24,4 +11,9 @@ declare const __propDef: {
|
|
|
24
11
|
default: {};
|
|
25
12
|
};
|
|
26
13
|
};
|
|
14
|
+
export type FlexItemProps = typeof __propDef.props;
|
|
15
|
+
export type FlexItemEvents = typeof __propDef.events;
|
|
16
|
+
export type FlexItemSlots = typeof __propDef.slots;
|
|
17
|
+
export default class FlexItem extends SvelteComponent<FlexItemProps, FlexItemEvents, FlexItemSlots> {
|
|
18
|
+
}
|
|
27
19
|
export {};
|
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
<script>export let marginBottom = 0;
|
|
2
2
|
export let marginTop = 0;
|
|
3
3
|
export let gap = "1rem";
|
|
4
|
-
export let layout = "stretch";
|
|
5
4
|
export let size = "full";
|
|
6
5
|
export let wrap = false;
|
|
6
|
+
export let justifyContent = "space-between";
|
|
7
|
+
export let alignItems = "stretch";
|
|
8
|
+
export let alignContent = "stretch";
|
|
9
|
+
$:
|
|
10
|
+
_marginTop = typeof marginTop === "number" ? `${marginTop}px` : marginTop;
|
|
11
|
+
$:
|
|
12
|
+
_marginBottom = typeof marginBottom === "number" ? `${marginBottom}px` : marginBottom;
|
|
13
|
+
$:
|
|
14
|
+
_justifyContent = ["start", "end"].includes(justifyContent) ? `flex-${justifyContent}` : ["between", "around", "evenly"].includes(justifyContent) ? `space-${justifyContent}` : justifyContent;
|
|
15
|
+
$:
|
|
16
|
+
_alignContent = ["start", "end"].includes(alignContent) ? `flex-${alignContent}` : ["between", "around"].includes(alignContent) ? `space-${alignContent}` : alignContent;
|
|
17
|
+
$:
|
|
18
|
+
_alignItems = ["start", "end"].includes(alignItems) ? `flex-${alignItems}` : alignItems;
|
|
19
|
+
$:
|
|
20
|
+
_gap = typeof gap === "number" ? `${gap}px` : gap;
|
|
7
21
|
</script>
|
|
8
22
|
|
|
9
23
|
<div
|
|
10
|
-
style={`
|
|
11
|
-
|
|
24
|
+
style={`
|
|
25
|
+
margin-top: ${_marginTop}; margin-bottom: ${_marginBottom}; gap: ${_gap};
|
|
26
|
+
justify-content: ${_justifyContent}; align-items: ${_alignItems}; align-content: ${_alignContent};
|
|
27
|
+
`}
|
|
28
|
+
class="size-{size} {wrap ? 'wrap' : 'nowrap'}"
|
|
12
29
|
>
|
|
13
30
|
<slot />
|
|
14
31
|
</div>
|
|
@@ -16,26 +33,12 @@ export let wrap = false;
|
|
|
16
33
|
<style>div {
|
|
17
34
|
display: flex;
|
|
18
35
|
width: 100%;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
align-items: center;
|
|
21
36
|
flex-wrap: nowrap;
|
|
22
37
|
column-gap: 1rem;
|
|
23
38
|
}
|
|
24
|
-
div.auto {
|
|
39
|
+
div.size-auto {
|
|
25
40
|
width: auto;
|
|
26
41
|
}
|
|
27
42
|
div.wrap {
|
|
28
43
|
flex-wrap: wrap;
|
|
29
|
-
}
|
|
30
|
-
div.stretch {
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
align-items: stretch;
|
|
33
|
-
}
|
|
34
|
-
div.end {
|
|
35
|
-
justify-content: flex-end;
|
|
36
|
-
align-items: flex-end;
|
|
37
|
-
}
|
|
38
|
-
div.start {
|
|
39
|
-
justify-content: flex-start;
|
|
40
|
-
align-items: flex-start;
|
|
41
44
|
}</style>
|
|
@@ -4,9 +4,11 @@ declare const __propDef: {
|
|
|
4
4
|
marginBottom?: string | number | undefined;
|
|
5
5
|
marginTop?: string | number | undefined;
|
|
6
6
|
gap?: string | number | undefined;
|
|
7
|
-
layout?: "stretch" | "center" | "end" | "start" | undefined;
|
|
8
7
|
size?: "full" | "auto" | undefined;
|
|
9
8
|
wrap?: boolean | undefined;
|
|
9
|
+
justifyContent?: "start" | "center" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | "baseline" | undefined;
|
|
10
|
+
alignItems?: "auto" | "start" | "center" | "end" | "stretch" | undefined;
|
|
11
|
+
alignContent?: "start" | "center" | "end" | "stretch" | "space-between" | "space-around" | undefined;
|
|
10
12
|
};
|
|
11
13
|
events: {
|
|
12
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
align?: "
|
|
5
|
-
spacing?: "none" | "
|
|
4
|
+
align?: "start" | "center" | "end" | "left" | "right" | undefined;
|
|
5
|
+
spacing?: "none" | "space-between" | "space-around" | "space-evenly" | "tight" | "loose" | "medium" | undefined;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,7 +3,7 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
currentPage?: number | undefined;
|
|
5
5
|
totalPages?: number | undefined;
|
|
6
|
-
align?: "
|
|
6
|
+
align?: "start" | "center" | "end" | undefined;
|
|
7
7
|
style?: "default" | "flat" | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
9
9
|
};
|