@cloudparker/moldex.js 0.0.124 → 4.1.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/dist/types.d.ts +6 -0
- package/dist/types.js +7 -0
- package/dist/views/core/button/components/button/button.svelte +135 -83
- package/dist/views/core/button/components/button-back/button-back.svelte +28 -15
- package/dist/views/core/button/components/button-close/button-close.svelte +4 -2
- package/dist/views/core/button/components/button-close-icon/button-close-icon.svelte +29 -15
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte +96 -72
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte.d.ts +1 -1
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte +98 -52
- package/dist/views/core/button/components/button-menu/button-menu.svelte +79 -43
- package/dist/views/core/button/components/button-ok/button-ok.svelte +4 -2
- package/dist/views/core/button/components/button-search/button-search.svelte +45 -21
- package/dist/views/core/button/components/switch/switch.svelte +50 -37
- package/dist/views/core/common/components/content-area/content-area.svelte +40 -27
- package/dist/views/core/common/components/loading/loading.svelte +9 -2
- package/dist/views/core/common/components/virtual-scrolling/virtual-scrolling-list.svelte +37 -20
- package/dist/views/core/dialog/components/cropper-dialog/cropper-dialog.svelte +52 -36
- package/dist/views/core/dialog/components/dialog/dialog.svelte +298 -177
- package/dist/views/core/dialog/components/loading-dialog/loading-dialog.svelte +30 -18
- package/dist/views/core/dialog/components/msg-dialog/msg-dialog.svelte +17 -7
- package/dist/views/core/dialog/components/number-field-dialog/number-field-dialog.svelte +41 -26
- package/dist/views/core/dialog/components/picker-dialog/picker-dialog.svelte +150 -105
- package/dist/views/core/dialog/components/text-field-dialog/text-field-dialog.svelte +40 -25
- package/dist/views/core/dialog/components/textarea-field-dialog/textarea-field-dialog.svelte +40 -25
- package/dist/views/core/drawer/components/drawer/drawer.svelte +58 -36
- package/dist/views/core/icon/components/icon/icon.svelte +24 -12
- package/dist/views/core/icon/components/icon-circle/icon-circle.svelte +10 -2
- package/dist/views/core/input/components/checkbox-field/checkbox-field.svelte +44 -25
- package/dist/views/core/input/components/color-field/color-field.svelte +81 -69
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte +359 -269
- package/dist/views/core/input/components/date-field/date-field.svelte +39 -30
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte +18 -12
- package/dist/views/core/input/components/email-field/email-field.svelte +17 -12
- package/dist/views/core/input/components/file-field/file-field.svelte +78 -64
- package/dist/views/core/input/components/input-field/input-field.svelte +267 -164
- package/dist/views/core/input/components/label/label.svelte +24 -10
- package/dist/views/core/input/components/number-field/number-field.svelte +18 -12
- package/dist/views/core/input/components/password-field/password-field.svelte +70 -57
- package/dist/views/core/input/components/phone-field/phone-field.svelte +155 -104
- package/dist/views/core/input/components/radio-field/radio-field.svelte +83 -52
- package/dist/views/core/input/components/range-field/range-field.svelte +67 -44
- package/dist/views/core/input/components/search-field/search-field.svelte +62 -45
- package/dist/views/core/input/components/text-field/text-field.svelte +21 -16
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte +17 -12
- package/dist/views/core/input/components/time-field/time-field.svelte +17 -12
- package/dist/views/core/navbar/components/navbar/navbar.svelte +76 -38
- package/dist/views/core/no-data/components/no-data/no-data.svelte +36 -19
- package/dist/views/core/pagination/components/pagination/pagination.svelte +90 -66
- package/dist/views/core/progressbar/components/progressbar/progressbar.svelte +36 -22
- package/dist/views/core/ruler/components/vertical-ruler/verticcal-ruler.svelte +5 -1
- package/dist/views/core/screen-detector/components/screen-detector.svelte +13 -9
- package/dist/views/core/sidebar/components/sidebar.svelte +36 -23
- package/dist/views/core/spinner/components/spinner/spinner.svelte +6 -1
- package/dist/views/core/text/components/text-await/text-await.svelte +9 -1
- package/dist/views/core/text/components/text-copy/text-copy.svelte +27 -16
- package/dist/views/core/text/components/text-currency/text-currency.svelte +13 -2
- package/dist/views/core/text/components/text-date/text-date.svelte +32 -20
- package/dist/views/core/text/components/text-email/text-email.svelte +12 -3
- package/dist/views/core/text/components/text-html/text-html.svelte +2 -1
- package/dist/views/core/text/components/text-phone/text-phone.svelte +12 -3
- package/dist/views/core/toast/components/toast/toast.svelte +43 -20
- package/dist/views/extra/fields/country-combobox-field.svelte +23 -15
- package/dist/views/extra/loaders/country-loader.svelte +33 -15
- package/dist/views/extra/texts/text-country-state.svelte +36 -28
- package/dist/views/extra/texts/text-country.svelte +16 -8
- package/package.json +3 -12
- package/readme.md +57 -2
- package/dist/tailwind.css +0 -1
- package/dist/theme.css +0 -27
|
@@ -1,28 +1,47 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
type CheckboxPropsType = {
|
|
3
|
+
className?: string;
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
desc?: string;
|
|
6
|
+
descClassName?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
onChange?: (value: boolean) => void;
|
|
12
|
+
position?: 'left' | 'right';
|
|
13
|
+
value?: boolean;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
className,
|
|
18
|
+
containerClassName,
|
|
19
|
+
desc,
|
|
20
|
+
descClassName,
|
|
21
|
+
id,
|
|
22
|
+
label,
|
|
23
|
+
labelClassName,
|
|
24
|
+
name,
|
|
25
|
+
onChange,
|
|
26
|
+
position = 'left',
|
|
27
|
+
value = $bindable(false)
|
|
28
|
+
}: CheckboxPropsType = $props();
|
|
29
|
+
|
|
30
|
+
let inputRef: HTMLInputElement | null = $state(null);
|
|
31
|
+
|
|
32
|
+
export function getElement() {
|
|
33
|
+
return inputRef;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function select() {
|
|
37
|
+
return inputRef && (inputRef as HTMLInputElement).select();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function handleChange(ev: Event) {
|
|
41
|
+
if (onChange) {
|
|
42
|
+
onChange(value);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
26
45
|
</script>
|
|
27
46
|
|
|
28
47
|
{#snippet labelSnippet()}
|
|
@@ -1,72 +1,84 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ripple } from '../../../../../actions';
|
|
3
|
+
import { colorToHex, isValidHexColor } from '../../../../../services';
|
|
4
|
+
import { mdiSquare } from '../../../icon';
|
|
5
|
+
import Icon from '../../../icon/components/icon/icon.svelte';
|
|
6
|
+
import InputField, { type InputFieldProps } from '../input-field/input-field.svelte';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
id,
|
|
10
|
+
name,
|
|
11
|
+
size,
|
|
12
|
+
appearance,
|
|
13
|
+
value = $bindable('#000000'),
|
|
14
|
+
...props
|
|
15
|
+
}: InputFieldProps & { value?: string } = $props();
|
|
16
|
+
|
|
17
|
+
let colorRef: HTMLInputElement;
|
|
18
|
+
let btnIconSizeClassName: string = $state('');
|
|
19
|
+
let btnRoundedClassName: string = $state('');
|
|
20
|
+
let colorValue: string = $state('#000000');
|
|
21
|
+
|
|
22
|
+
let inputRef: any | null = $state(null);
|
|
23
|
+
|
|
24
|
+
export function focus() {
|
|
25
|
+
inputRef?.focus();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function getElement() {
|
|
29
|
+
return inputRef;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function select() {
|
|
33
|
+
return inputRef && inputRef.select();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function handleColorBtnClick() {
|
|
37
|
+
if (colorRef) {
|
|
38
|
+
colorRef.click();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function handleColorPickerChange(ev: any) {
|
|
43
|
+
let input: HTMLInputElement = ev?.target;
|
|
44
|
+
if (input) {
|
|
45
|
+
value = input.value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$effect(() => {
|
|
50
|
+
if (isValidHexColor(value)) {
|
|
51
|
+
colorValue = value;
|
|
52
|
+
if (colorRef) {
|
|
53
|
+
colorRef.value = colorToHex(value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
$effect(() => {
|
|
59
|
+
if (size) {
|
|
60
|
+
switch (size) {
|
|
61
|
+
case 'lg':
|
|
62
|
+
btnIconSizeClassName = '!h-7 !w-7';
|
|
63
|
+
break;
|
|
64
|
+
case 'md':
|
|
65
|
+
btnIconSizeClassName = '!h-6 !w-6';
|
|
66
|
+
break;
|
|
67
|
+
case 'sm':
|
|
68
|
+
btnIconSizeClassName = '!h-5 !w-5';
|
|
69
|
+
break;
|
|
70
|
+
case 'xs':
|
|
71
|
+
btnIconSizeClassName = '!h-4 !w-4';
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
$effect(() => {
|
|
78
|
+
if (!appearance || appearance == 'normal') {
|
|
79
|
+
btnRoundedClassName = 'rounded-tr-lg rounded-br-lg';
|
|
80
|
+
}
|
|
81
|
+
});
|
|
70
82
|
</script>
|
|
71
83
|
|
|
72
84
|
{#snippet colorButton()}
|