@stubber/ui 1.0.9 → 1.0.11
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/Typography.svelte.d.ts +2 -0
- package/dist/atoms/Button.svelte +37 -41
- package/dist/atoms/Button.svelte.d.ts +8 -6
- package/dist/atoms/IconButton.svelte.d.ts +2 -0
- package/dist/atoms/SpinnerMessage.svelte.d.ts +2 -0
- package/dist/atoms/TextOnlyButton.svelte +37 -41
- package/dist/atoms/TextOnlyButton.svelte.d.ts +8 -6
- package/dist/components/Accordion.svelte.d.ts +2 -0
- package/dist/components/AdvancedSwitch.svelte.d.ts +2 -0
- package/dist/components/Alert.svelte.d.ts +2 -0
- package/dist/components/Breadcrumbs.svelte.d.ts +2 -0
- package/dist/components/Chip.svelte.d.ts +2 -0
- package/dist/components/HorizontalTabs.svelte.d.ts +2 -0
- package/dist/components/IconButton.svelte.d.ts +2 -0
- package/dist/components/Inputs/PasswordInput.svelte +14 -16
- package/dist/components/Inputs/PasswordInput.svelte.d.ts +4 -2
- package/dist/components/Inputs/SelectInput.svelte.d.ts +2 -0
- package/dist/components/Inputs/TextInput.svelte +14 -16
- package/dist/components/Inputs/TextInput.svelte.d.ts +4 -2
- package/dist/components/Modal.svelte.d.ts +2 -0
- package/dist/components/ModalIcon.svelte.d.ts +2 -0
- package/dist/components/NavProfile.svelte.d.ts +2 -0
- package/dist/components/OrgSwitcher.svelte.d.ts +2 -0
- package/dist/components/PasswordStrengthItem.svelte +9 -6
- package/dist/components/PasswordStrengthItem.svelte.d.ts +4 -2
- package/dist/components/PasswordStrengthValidator.svelte +28 -41
- package/dist/components/PasswordStrengthValidator.svelte.d.ts +4 -2
- package/dist/components/PrimaryButton.svelte.d.ts +2 -0
- package/dist/components/ProfileMenu.svelte.d.ts +2 -0
- package/dist/components/SideNav/SideNavExample.svelte.d.ts +2 -0
- package/dist/components/SideNav/SideNavItem.svelte.d.ts +2 -0
- package/dist/components/SideNav/SideNavTitle.svelte.d.ts +2 -0
- package/dist/components/Tabs.svelte.d.ts +2 -0
- package/dist/components/Toast.svelte.d.ts +4 -2
- package/dist/components/Tooltip.svelte.d.ts +2 -0
- package/dist/components/accordion/accordion-content.svelte +21 -0
- package/dist/components/accordion/accordion-content.svelte.d.ts +19 -0
- package/dist/components/accordion/accordion-item.svelte +10 -0
- package/dist/components/accordion/accordion-item.svelte.d.ts +19 -0
- package/dist/components/accordion/accordion-trigger.svelte +20 -0
- package/dist/components/accordion/accordion-trigger.svelte.d.ts +15 -0
- package/dist/components/accordion/index.d.ts +6 -0
- package/dist/components/accordion/index.js +8 -0
- package/dist/components/alert-dialog/alert-dialog-action.svelte.d.ts +1 -1
- package/dist/components/alert-dialog/alert-dialog-cancel.svelte.d.ts +1 -1
- package/dist/components/alert-dialog/alert-dialog-content.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-description.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-footer.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-header.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-overlay.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-portal.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-title.svelte.d.ts +2 -0
- package/dist/components/badge/badge.svelte +6 -3
- package/dist/components/badge/badge.svelte.d.ts +6 -4
- package/dist/components/badge/index.d.ts +2 -9
- package/dist/components/badge/index.js +0 -1
- package/dist/components/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-item.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-link.svelte +5 -6
- package/dist/components/breadcrumb/breadcrumb-link.svelte.d.ts +4 -2
- package/dist/components/breadcrumb/breadcrumb-list.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-page.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-separator.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb.svelte.d.ts +3 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/calendar/calendar-cell.svelte +17 -0
- package/dist/components/calendar/calendar-cell.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-day.svelte +37 -0
- package/dist/components/calendar/calendar-day.svelte.d.ts +38 -0
- package/dist/components/calendar/calendar-grid-body.svelte +9 -0
- package/dist/components/calendar/calendar-grid-body.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-grid-head.svelte +9 -0
- package/dist/components/calendar/calendar-grid-head.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-grid-row.svelte +9 -0
- package/dist/components/calendar/calendar-grid-row.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-grid.svelte +9 -0
- package/dist/components/calendar/calendar-grid.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-head-cell.svelte +12 -0
- package/dist/components/calendar/calendar-head-cell.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-header.svelte +12 -0
- package/dist/components/calendar/calendar-header.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-heading.svelte +15 -0
- package/dist/components/calendar/calendar-heading.svelte.d.ts +21 -0
- package/dist/components/calendar/calendar-months.svelte +11 -0
- package/dist/components/calendar/calendar-months.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-next-button.svelte +21 -0
- package/dist/components/calendar/calendar-next-button.svelte.d.ts +30 -0
- package/dist/components/calendar/calendar-prev-button.svelte +21 -0
- package/dist/components/calendar/calendar-prev-button.svelte.d.ts +30 -0
- package/dist/components/calendar/calendar.svelte +52 -0
- package/dist/components/calendar/calendar.svelte.d.ts +13 -0
- package/dist/components/calendar/index.d.ts +14 -0
- package/dist/components/calendar/index.js +16 -0
- package/dist/components/card/card-content.svelte.d.ts +2 -0
- package/dist/components/card/card-description.svelte.d.ts +2 -0
- package/dist/components/card/card-footer.svelte.d.ts +2 -0
- package/dist/components/card/card-header.svelte.d.ts +2 -0
- package/dist/components/card/card-title.svelte.d.ts +3 -1
- package/dist/components/card/card.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-content.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-item.svelte.d.ts +1 -1
- package/dist/components/context-menu/context-menu-label.svelte.d.ts +4 -2
- package/dist/components/context-menu/context-menu-radio-group.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-separator.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-shortcut.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-sub-content.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-sub-trigger.svelte.d.ts +3 -3
- package/dist/components/dialog/dialog-content.svelte +31 -9
- package/dist/components/dialog/dialog-content.svelte.d.ts +10 -0
- package/dist/components/dialog/dialog-description.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-footer.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-header.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-overlay.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-portal.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-title.svelte.d.ts +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.svelte +29 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.svelte +22 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.svelte +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.svelte.d.ts +17 -0
- package/dist/components/dropdown-menu/dropdown-menu-label.svelte +13 -0
- package/dist/components/dropdown-menu/dropdown-menu-label.svelte.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-group.svelte +7 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-item.svelte +29 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.svelte +10 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.svelte.d.ts +17 -0
- package/dist/components/dropdown-menu/dropdown-menu-shortcut.svelte +8 -0
- package/dist/components/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.svelte +25 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.svelte +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +21 -0
- package/dist/components/dropdown-menu/index.d.ts +16 -0
- package/dist/components/dropdown-menu/index.js +18 -0
- package/dist/components/fields/Checkbox.svelte.d.ts +2 -0
- package/dist/components/fields/Radio.svelte.d.ts +2 -0
- package/dist/components/fields/StandardInput.svelte.d.ts +4 -2
- package/dist/components/input/input.svelte.d.ts +1 -1
- package/dist/components/popover/popover-content.svelte.d.ts +2 -0
- package/dist/components/radio-group/radio-group.svelte.d.ts +2 -0
- package/dist/components/range-calendar/index.d.ts +14 -0
- package/dist/components/range-calendar/index.js +16 -0
- package/dist/components/range-calendar/range-calendar-cell.svelte +17 -0
- package/dist/components/range-calendar/range-calendar-cell.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-day.svelte +38 -0
- package/dist/components/range-calendar/range-calendar-day.svelte.d.ts +40 -0
- package/dist/components/range-calendar/range-calendar-grid-body.svelte +9 -0
- package/dist/components/range-calendar/range-calendar-grid-body.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-grid-head.svelte +9 -0
- package/dist/components/range-calendar/range-calendar-grid-head.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-grid-row.svelte +9 -0
- package/dist/components/range-calendar/range-calendar-grid-row.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-grid.svelte +12 -0
- package/dist/components/range-calendar/range-calendar-grid.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-head-cell.svelte +12 -0
- package/dist/components/range-calendar/range-calendar-head-cell.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-header.svelte +12 -0
- package/dist/components/range-calendar/range-calendar-header.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-heading.svelte +15 -0
- package/dist/components/range-calendar/range-calendar-heading.svelte.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-months.svelte +11 -0
- package/dist/components/range-calendar/range-calendar-months.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-next-button.svelte +21 -0
- package/dist/components/range-calendar/range-calendar-next-button.svelte.d.ts +30 -0
- package/dist/components/range-calendar/range-calendar-prev-button.svelte +21 -0
- package/dist/components/range-calendar/range-calendar-prev-button.svelte.d.ts +30 -0
- package/dist/components/range-calendar/range-calendar.svelte +54 -0
- package/dist/components/range-calendar/range-calendar.svelte.d.ts +13 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.svelte.d.ts +5 -3
- package/dist/components/scroll-area/scroll-area.svelte.d.ts +6 -4
- package/dist/components/select/select-label.svelte.d.ts +2 -0
- package/dist/components/select/select-separator.svelte.d.ts +2 -0
- package/dist/components/select/select-trigger.svelte.d.ts +1 -1
- package/dist/components/separator/separator.svelte.d.ts +2 -0
- package/dist/components/sheet/index.d.ts +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet-content.svelte.d.ts +4 -2
- package/dist/components/sheet/sheet-description.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-footer.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-header.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-overlay.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-portal.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-title.svelte.d.ts +2 -0
- package/dist/components/sonner/sonner.svelte +1 -2
- package/dist/components/sonner/sonner.svelte.d.ts +3 -1
- package/dist/components/tabs/tabs-content.svelte +1 -0
- package/dist/components/tabs/tabs-content.svelte.d.ts +2 -0
- package/dist/components/tabs/tabs-list.svelte.d.ts +2 -0
- package/dist/components/textarea/textarea.svelte.d.ts +1 -1
- package/dist/components/tooltip/tooltip-content.svelte +2 -2
- package/dist/components/tooltip/tooltip-content.svelte.d.ts +2 -0
- package/dist/decorators/DecoratorHorizontalTabs.svelte.d.ts +2 -0
- package/dist/decorators/DecoratorTransparentButton.svelte.d.ts +2 -0
- package/dist/decorators/FixedWidthDecorator.svelte.d.ts +2 -0
- package/dist/index.d.ts +0 -6
- package/dist/index.js +7 -7
- package/dist/styles/stubber/typography.css +6 -1
- package/dist/utils/shadcn-utils.d.ts +0 -1
- package/package.json +27 -18
package/dist/atoms/Button.svelte
CHANGED
|
@@ -6,51 +6,47 @@ export let size = "md";
|
|
|
6
6
|
export let style = "block";
|
|
7
7
|
export let disabled = false;
|
|
8
8
|
let isIcon = false;
|
|
9
|
-
$:
|
|
10
|
-
isIcon = icon !== "";
|
|
9
|
+
$: isIcon = icon !== "";
|
|
11
10
|
let colorClass;
|
|
12
11
|
let sizeClass;
|
|
13
12
|
let iconSizeClass;
|
|
14
13
|
let styleClass;
|
|
15
|
-
$:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
styleClass = "rounded-full";
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
14
|
+
$: switch (color) {
|
|
15
|
+
case "primary":
|
|
16
|
+
colorClass = "bg-primary-400 hover:bg-primary-500 focus:bg-primary-300";
|
|
17
|
+
break;
|
|
18
|
+
case "surface":
|
|
19
|
+
colorClass = "bg-surface-400 hover:bg-surface-500 focus:bg-surface-300";
|
|
20
|
+
break;
|
|
21
|
+
case "success":
|
|
22
|
+
colorClass = "bg-success-400 hover:bg-success-500 focus:bg-success-300";
|
|
23
|
+
break;
|
|
24
|
+
case "warning":
|
|
25
|
+
colorClass = "bg-warning-500 hover:bg-warning-600 focus:bg-warning-400";
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
$: switch (size) {
|
|
29
|
+
case "sm":
|
|
30
|
+
sizeClass = "text-label-sm";
|
|
31
|
+
iconSizeClass = "fa-xs";
|
|
32
|
+
break;
|
|
33
|
+
case "md":
|
|
34
|
+
sizeClass = "text-label-md";
|
|
35
|
+
iconSizeClass = "fa-sm";
|
|
36
|
+
break;
|
|
37
|
+
case "lg":
|
|
38
|
+
sizeClass = "text-label-lg";
|
|
39
|
+
iconSizeClass = "fa-md";
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
$: switch (style) {
|
|
43
|
+
case "block":
|
|
44
|
+
styleClass = "rounded-sm";
|
|
45
|
+
break;
|
|
46
|
+
case "rounded":
|
|
47
|
+
styleClass = "rounded-full";
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
54
50
|
</script>
|
|
55
51
|
|
|
56
52
|
<button
|
|
@@ -2,12 +2,12 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
label: string;
|
|
5
|
-
type?: "button" | "
|
|
6
|
-
icon?: string
|
|
7
|
-
color?: "primary" | "surface" | "success" | "warning"
|
|
8
|
-
size?: "sm" | "md" | "lg"
|
|
9
|
-
style?: "block" | "rounded"
|
|
10
|
-
disabled?: boolean
|
|
5
|
+
type?: "button" | "submit" | "reset";
|
|
6
|
+
icon?: string;
|
|
7
|
+
color?: "primary" | "surface" | "success" | "warning";
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
style?: "block" | "rounded";
|
|
10
|
+
disabled?: boolean;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
click: MouseEvent;
|
|
@@ -15,6 +15,8 @@ declare const __propDef: {
|
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
16
|
};
|
|
17
17
|
slots: {};
|
|
18
|
+
exports?: {} | undefined;
|
|
19
|
+
bindings?: string | undefined;
|
|
18
20
|
};
|
|
19
21
|
export type ButtonProps = typeof __propDef.props;
|
|
20
22
|
export type ButtonEvents = typeof __propDef.events;
|
|
@@ -7,6 +7,8 @@ declare const __propDef: {
|
|
|
7
7
|
[evt: string]: CustomEvent<any>;
|
|
8
8
|
};
|
|
9
9
|
slots: {};
|
|
10
|
+
exports?: {} | undefined;
|
|
11
|
+
bindings?: string | undefined;
|
|
10
12
|
};
|
|
11
13
|
export type SpinnerMessageProps = typeof __propDef.props;
|
|
12
14
|
export type SpinnerMessageEvents = typeof __propDef.events;
|
|
@@ -6,51 +6,47 @@ export let size = "md";
|
|
|
6
6
|
export let style = "block";
|
|
7
7
|
export let disabled = false;
|
|
8
8
|
let isIcon = false;
|
|
9
|
-
$:
|
|
10
|
-
isIcon = icon !== "";
|
|
9
|
+
$: isIcon = icon !== "";
|
|
11
10
|
let colorClass;
|
|
12
11
|
let sizeClass;
|
|
13
12
|
let iconSizeClass;
|
|
14
13
|
let styleClass;
|
|
15
|
-
$:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
styleClass = "rounded-full";
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
14
|
+
$: switch (color) {
|
|
15
|
+
case "primary":
|
|
16
|
+
colorClass = "bg-white text-primary-400 hover:bg-primary-50 hover:text-primary-500 focus:bg-primary-100 focus:text-primary-500";
|
|
17
|
+
break;
|
|
18
|
+
case "surface":
|
|
19
|
+
colorClass = "bg-white text-surface-700 hover:bg-surface-50 hover:text-surface-800 focus:bg-surface-100 focus:text-surface-800";
|
|
20
|
+
break;
|
|
21
|
+
case "success":
|
|
22
|
+
colorClass = "bg-white text-success-500 hover:bg-success-50 hover:text-success-600 focus:bg-success-100 focus:text-success-600";
|
|
23
|
+
break;
|
|
24
|
+
case "warning":
|
|
25
|
+
colorClass = "bg-white text-warning-500 hover:bg-warning-50 hover:text-warning-600 focus:bg-warning-100 focus:text-warning-600";
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
$: switch (size) {
|
|
29
|
+
case "sm":
|
|
30
|
+
sizeClass = "text-label-sm";
|
|
31
|
+
iconSizeClass = "fa-xs";
|
|
32
|
+
break;
|
|
33
|
+
case "md":
|
|
34
|
+
sizeClass = "text-label-md";
|
|
35
|
+
iconSizeClass = "fa-sm";
|
|
36
|
+
break;
|
|
37
|
+
case "lg":
|
|
38
|
+
sizeClass = "text-label-lg";
|
|
39
|
+
iconSizeClass = "fa-md";
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
$: switch (style) {
|
|
43
|
+
case "block":
|
|
44
|
+
styleClass = "rounded-sm";
|
|
45
|
+
break;
|
|
46
|
+
case "rounded":
|
|
47
|
+
styleClass = "rounded-full";
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
54
50
|
</script>
|
|
55
51
|
|
|
56
52
|
<button
|
|
@@ -2,12 +2,12 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
label: string;
|
|
5
|
-
type?: "button" | "
|
|
6
|
-
icon?: string
|
|
7
|
-
color?: "primary" | "surface" | "success" | "warning" | "none"
|
|
8
|
-
size?: "sm" | "md" | "lg"
|
|
9
|
-
style?: "block" | "rounded"
|
|
10
|
-
disabled?: boolean
|
|
5
|
+
type?: "button" | "submit" | "reset";
|
|
6
|
+
icon?: string;
|
|
7
|
+
color?: "primary" | "surface" | "success" | "warning" | "none";
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
style?: "block" | "rounded";
|
|
10
|
+
disabled?: boolean;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
click: MouseEvent;
|
|
@@ -15,6 +15,8 @@ declare const __propDef: {
|
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
16
|
};
|
|
17
17
|
slots: {};
|
|
18
|
+
exports?: {} | undefined;
|
|
19
|
+
bindings?: string | undefined;
|
|
18
20
|
};
|
|
19
21
|
export type TextOnlyButtonProps = typeof __propDef.props;
|
|
20
22
|
export type TextOnlyButtonEvents = typeof __propDef.events;
|
|
@@ -5,6 +5,8 @@ declare const __propDef: {
|
|
|
5
5
|
[evt: string]: CustomEvent<any>;
|
|
6
6
|
};
|
|
7
7
|
slots: {};
|
|
8
|
+
exports?: {} | undefined;
|
|
9
|
+
bindings?: string | undefined;
|
|
8
10
|
};
|
|
9
11
|
export type AdvancedSwitchProps = typeof __propDef.props;
|
|
10
12
|
export type AdvancedSwitchEvents = typeof __propDef.events;
|
|
@@ -9,22 +9,20 @@ let containerRef;
|
|
|
9
9
|
let isActive = false;
|
|
10
10
|
let isFocused = false;
|
|
11
11
|
let hasValue = false;
|
|
12
|
-
$:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
})(value);
|
|
12
|
+
$: isActive = ((isFocused2, hasValue2) => {
|
|
13
|
+
if (isFocused2 || hasValue2) {
|
|
14
|
+
return true;
|
|
15
|
+
} else {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
})(isFocused, hasValue);
|
|
19
|
+
$: hasValue = ((value2) => {
|
|
20
|
+
if (value2) {
|
|
21
|
+
return true;
|
|
22
|
+
} else {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
})(value);
|
|
28
26
|
function handleClick() {
|
|
29
27
|
inputRef.focus();
|
|
30
28
|
isFocused = true;
|
|
@@ -3,8 +3,8 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
name: string;
|
|
5
5
|
label: string;
|
|
6
|
-
value?: string
|
|
7
|
-
isError?: boolean
|
|
6
|
+
value?: string;
|
|
7
|
+
isError?: boolean;
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
focus: CustomEvent<any>;
|
|
@@ -12,6 +12,8 @@ declare const __propDef: {
|
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
};
|
|
14
14
|
slots: {};
|
|
15
|
+
exports?: {} | undefined;
|
|
16
|
+
bindings?: string | undefined;
|
|
15
17
|
};
|
|
16
18
|
export type PasswordInputProps = typeof __propDef.props;
|
|
17
19
|
export type PasswordInputEvents = typeof __propDef.events;
|
|
@@ -13,6 +13,8 @@ declare const __propDef: {
|
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
|
14
14
|
};
|
|
15
15
|
slots: {};
|
|
16
|
+
exports?: {} | undefined;
|
|
17
|
+
bindings?: string | undefined;
|
|
16
18
|
};
|
|
17
19
|
export type SelectInputProps = typeof __propDef.props;
|
|
18
20
|
export type SelectInputEvents = typeof __propDef.events;
|
|
@@ -9,22 +9,20 @@ let containerRef;
|
|
|
9
9
|
let isActive = false;
|
|
10
10
|
let isFocused = false;
|
|
11
11
|
let hasValue = false;
|
|
12
|
-
$:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
})(value);
|
|
12
|
+
$: isActive = ((isFocused2, hasValue2) => {
|
|
13
|
+
if (isFocused2 || hasValue2) {
|
|
14
|
+
return true;
|
|
15
|
+
} else {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
})(isFocused, hasValue);
|
|
19
|
+
$: hasValue = ((value2) => {
|
|
20
|
+
if (value2) {
|
|
21
|
+
return true;
|
|
22
|
+
} else {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
})(value);
|
|
28
26
|
function handleClick() {
|
|
29
27
|
inputRef.focus();
|
|
30
28
|
isFocused = true;
|
|
@@ -3,8 +3,8 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
name: string;
|
|
5
5
|
label: string;
|
|
6
|
-
value?: string
|
|
7
|
-
isError?: boolean
|
|
6
|
+
value?: string;
|
|
7
|
+
isError?: boolean;
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
focus: CustomEvent<any>;
|
|
@@ -12,6 +12,8 @@ declare const __propDef: {
|
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
};
|
|
14
14
|
slots: {};
|
|
15
|
+
exports?: {} | undefined;
|
|
16
|
+
bindings?: string | undefined;
|
|
15
17
|
};
|
|
16
18
|
export type TextInputProps = typeof __propDef.props;
|
|
17
19
|
export type TextInputEvents = typeof __propDef.events;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import Label from "./label/label.svelte";
|
|
2
|
+
export let value = "";
|
|
2
3
|
export let isPassed = false;
|
|
3
4
|
</script>
|
|
4
5
|
|
|
5
|
-
<span
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<span class="flex flex-row items-center space-x-2">
|
|
7
|
+
<i
|
|
8
|
+
class=" {isPassed
|
|
9
|
+
? 'fa-regular fa-circle-check text-[#008A30] '
|
|
10
|
+
: 'fa-regular fa-circle-xmark text-danger-500'}"
|
|
11
|
+
/>
|
|
12
|
+
<Label>{value}</Label>
|
|
10
13
|
</span>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
value?: string
|
|
5
|
-
isPassed?: boolean
|
|
4
|
+
value?: string;
|
|
5
|
+
isPassed?: boolean;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
9
9
|
};
|
|
10
10
|
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
11
13
|
};
|
|
12
14
|
export type PasswordStrengthItemProps = typeof __propDef.props;
|
|
13
15
|
export type PasswordStrengthItemEvents = typeof __propDef.events;
|
|
@@ -1,57 +1,44 @@
|
|
|
1
1
|
<script>import PasswordStrengthItem from "./PasswordStrengthItem.svelte";
|
|
2
2
|
export let value = "";
|
|
3
|
-
$:
|
|
4
|
-
validatePassword(value);
|
|
5
3
|
export let isStrong = true;
|
|
6
4
|
let isEightCharacters = false;
|
|
7
5
|
let hasNumber = false;
|
|
8
6
|
let hasSymbol = false;
|
|
9
7
|
let hasUpper = false;
|
|
10
8
|
let hasLower = false;
|
|
9
|
+
$: validatePassword(value);
|
|
11
10
|
function validatePassword(password) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
hasLower = true;
|
|
19
|
-
} else {
|
|
20
|
-
hasLower = false;
|
|
21
|
-
}
|
|
22
|
-
if (/[A-Z]/.test(password)) {
|
|
23
|
-
hasUpper = true;
|
|
24
|
-
} else {
|
|
25
|
-
hasUpper = false;
|
|
26
|
-
}
|
|
27
|
-
if (/\d/.test(password)) {
|
|
28
|
-
hasNumber = true;
|
|
29
|
-
} else {
|
|
30
|
-
hasNumber = false;
|
|
31
|
-
}
|
|
32
|
-
if (/[!@#$%^&*]/.test(password)) {
|
|
33
|
-
hasSymbol = true;
|
|
34
|
-
} else {
|
|
35
|
-
hasSymbol = false;
|
|
36
|
-
}
|
|
37
|
-
if (isEightCharacters && hasLower && hasUpper && hasNumber && hasSymbol) {
|
|
38
|
-
isStrong = true;
|
|
39
|
-
} else {
|
|
40
|
-
isStrong = false;
|
|
41
|
-
}
|
|
11
|
+
isEightCharacters = password.length >= 8;
|
|
12
|
+
hasLower = /[a-z]/.test(password);
|
|
13
|
+
hasUpper = /[A-Z]/.test(password);
|
|
14
|
+
hasNumber = /\d/.test(password);
|
|
15
|
+
hasSymbol = /[!@#$%^&*]/.test(password);
|
|
16
|
+
isStrong = isEightCharacters && hasLower && hasUpper && hasNumber && hasSymbol;
|
|
42
17
|
}
|
|
18
|
+
$: firstColumn = [
|
|
19
|
+
{ isPassed: hasLower, value: "At least one lower case character" },
|
|
20
|
+
{ isPassed: hasUpper, value: "At least one upper case character" },
|
|
21
|
+
{ isPassed: hasNumber, value: "Contains a number" }
|
|
22
|
+
];
|
|
23
|
+
$: secondColumn = [
|
|
24
|
+
{ isPassed: hasSymbol, value: "Contains a symbol" },
|
|
25
|
+
{ isPassed: isEightCharacters, value: "At least 8 characters" }
|
|
26
|
+
];
|
|
43
27
|
</script>
|
|
44
28
|
|
|
45
29
|
<div class="space-y-0.5 text-fluid-sm">
|
|
46
|
-
<PasswordStrengthItem
|
|
47
|
-
isPassed={isStrong}
|
|
48
|
-
value="Password strength: {isStrong ? 'strong' : 'weak'}"
|
|
49
|
-
/>
|
|
50
30
|
{#if !isStrong}
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
<div class="grid grid-cols-2 gap-x-4 gap-y-0.5">
|
|
32
|
+
<div class="space-y-0.5">
|
|
33
|
+
{#each firstColumn as requirement}
|
|
34
|
+
<PasswordStrengthItem isPassed={requirement.isPassed} value={requirement.value} />
|
|
35
|
+
{/each}
|
|
36
|
+
</div>
|
|
37
|
+
<div class="space-y-0.5">
|
|
38
|
+
{#each secondColumn as requirement}
|
|
39
|
+
<PasswordStrengthItem isPassed={requirement.isPassed} value={requirement.value} />
|
|
40
|
+
{/each}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
56
43
|
{/if}
|
|
57
44
|
</div>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
value?: string
|
|
5
|
-
isStrong?: boolean
|
|
4
|
+
value?: string;
|
|
5
|
+
isStrong?: boolean;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
9
9
|
};
|
|
10
10
|
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
11
13
|
};
|
|
12
14
|
export type PasswordStrengthValidatorProps = typeof __propDef.props;
|
|
13
15
|
export type PasswordStrengthValidatorEvents = typeof __propDef.events;
|