negodesign 0.0.26 → 0.0.27

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.
Files changed (112) hide show
  1. package/dist/components/core/breadcrumb/breadcrumb-list.svelte +31 -31
  2. package/dist/components/core/button/ButtonBack.svelte +18 -18
  3. package/dist/components/core/button/ButtonLogin.svelte +15 -15
  4. package/dist/components/core/button/ButtonLoginWith.svelte +57 -57
  5. package/dist/components/core/button/ButtonSend.svelte +15 -15
  6. package/dist/components/core/card/highlight/01/CardHighlight01.svelte +91 -91
  7. package/dist/components/core/card/highlight/02/CardHighlight02.svelte +93 -93
  8. package/dist/components/core/card/highlight/CardHighlight.svelte +22 -22
  9. package/dist/components/core/card/media/01/CardMedia01.svelte +111 -111
  10. package/dist/components/core/card/media/02/CardMedia02.svelte +110 -110
  11. package/dist/components/core/card/media/CardMedia.svelte +17 -17
  12. package/dist/components/core/card/profile/01/CardProfile01.svelte +98 -98
  13. package/dist/components/core/card/profile/02/CardProfile02.svelte +98 -98
  14. package/dist/components/core/card/profile/CardProfile.svelte +17 -17
  15. package/dist/components/core/card/promotion/CardPromotion.svelte +112 -112
  16. package/dist/components/core/card/shared/CardButton.svelte +30 -30
  17. package/dist/components/core/card/shared/CardCart.svelte +36 -36
  18. package/dist/components/core/card/shared/CardDescription.svelte +38 -38
  19. package/dist/components/core/card/shared/CardFavorite.svelte +33 -33
  20. package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
  21. package/dist/components/core/card/shared/CardStartPrice.svelte +34 -34
  22. package/dist/components/core/card/shared/CardTags.svelte +73 -73
  23. package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
  24. package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
  25. package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte +82 -83
  26. package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
  27. package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +63 -63
  28. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +64 -64
  29. package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +55 -55
  30. package/dist/components/core/datatable/ui/DataTableActions.svelte +28 -28
  31. package/dist/components/core/datatable/ui/DataTableCheckbox.svelte +22 -22
  32. package/dist/components/core/datatable/ui/DataTableContent.svelte +59 -59
  33. package/dist/components/core/datatable/ui/DataTableCore.svelte +151 -151
  34. package/dist/components/core/datatable/ui/DataTableDragHandle.svelte +8 -8
  35. package/dist/components/core/datatable/ui/DataTableListFilter.svelte +59 -59
  36. package/dist/components/core/datatable/ui/DataTableListPagination.svelte +35 -35
  37. package/dist/components/core/form/ui/input-base.svelte +81 -81
  38. package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -23
  39. package/dist/components/core/form/ui/input-email.svelte +23 -23
  40. package/dist/components/core/form/ui/input-password-confirm.svelte +23 -23
  41. package/dist/components/core/form/ui/input-password.svelte +23 -23
  42. package/dist/components/core/form/ui/input-phone.svelte +33 -33
  43. package/dist/components/core/form/ui/input-username.svelte +22 -22
  44. package/dist/components/core/hero/SimpleHero.svelte +65 -65
  45. package/dist/components/core/label/LabelOr.svelte +25 -25
  46. package/dist/components/core/link/link-forget-password.svelte +12 -12
  47. package/dist/components/core/link/link-privacy-polity.svelte +12 -12
  48. package/dist/components/core/link/link-terms-of-service.svelte +12 -12
  49. package/dist/components/core/nav/ui/menu-links.svelte +27 -27
  50. package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte +85 -85
  51. package/dist/components/core/nav/ui/nav-menu-bottom-sidebar.svelte +33 -33
  52. package/dist/components/core/nav/ui/nav-menu-sidebar.svelte +97 -97
  53. package/dist/components/core/nav/ui/nav-menu-top-bar-sidebar.svelte +103 -103
  54. package/dist/components/core/nav/ui/nav-menu.svelte +106 -106
  55. package/dist/components/core/panel/CarouselSlot.svelte +63 -63
  56. package/dist/components/core/panel/LeftHero.svelte +116 -116
  57. package/dist/components/core/search/SearchInput.svelte +32 -32
  58. package/dist/components/core/search/shared/SearchInputCore.svelte +66 -66
  59. package/dist/components/core/sidebar/MenuBarSidebar.svelte +70 -70
  60. package/dist/components/core/tabs/ui/tab-underline.svelte +43 -43
  61. package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
  62. package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
  63. package/dist/components/pages/security/login/01/ui/FormRegister.svelte +28 -28
  64. package/dist/components/pages/security/login/01/ui/LoginCard.svelte +107 -107
  65. package/dist/components/pages/security/login/PageLogin.svelte +22 -22
  66. package/dist/components/ui/badge/badge.svelte +49 -49
  67. package/dist/components/ui/button/button.svelte +82 -82
  68. package/dist/components/ui/chart/chart-container.svelte +80 -80
  69. package/dist/components/ui/chart/chart-style.svelte +37 -37
  70. package/dist/components/ui/chart/chart-tooltip.svelte +184 -184
  71. package/dist/components/ui/checkbox/checkbox.svelte +40 -40
  72. package/dist/components/ui/data-table/flex-render.svelte +40 -40
  73. package/dist/components/ui/drawer/drawer-close.svelte +7 -7
  74. package/dist/components/ui/drawer/drawer-content.svelte +33 -33
  75. package/dist/components/ui/drawer/drawer-description.svelte +17 -17
  76. package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
  77. package/dist/components/ui/drawer/drawer-header.svelte +20 -20
  78. package/dist/components/ui/drawer/drawer-nested.svelte +12 -12
  79. package/dist/components/ui/drawer/drawer-overlay.svelte +17 -17
  80. package/dist/components/ui/drawer/drawer-portal.svelte +7 -7
  81. package/dist/components/ui/drawer/drawer-title.svelte +17 -17
  82. package/dist/components/ui/drawer/drawer-trigger.svelte +7 -7
  83. package/dist/components/ui/drawer/drawer.svelte +12 -12
  84. package/dist/components/ui/select/select-content.svelte +45 -45
  85. package/dist/components/ui/select/select-group-heading.svelte +21 -21
  86. package/dist/components/ui/select/select-group.svelte +17 -17
  87. package/dist/components/ui/select/select-item.svelte +41 -41
  88. package/dist/components/ui/select/select-label.svelte +20 -20
  89. package/dist/components/ui/select/select-portal.svelte +7 -7
  90. package/dist/components/ui/select/select-scroll-down-button.svelte +21 -21
  91. package/dist/components/ui/select/select-scroll-up-button.svelte +21 -21
  92. package/dist/components/ui/select/select-separator.svelte +18 -18
  93. package/dist/components/ui/select/select-trigger.svelte +30 -30
  94. package/dist/components/ui/select/select.svelte +11 -11
  95. package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
  96. package/dist/components/ui/star-rating/star-rating-star.svelte +41 -41
  97. package/dist/components/ui/star-rating/star-rating.svelte +20 -20
  98. package/dist/components/ui/table/table-body.svelte +15 -15
  99. package/dist/components/ui/table/table-caption.svelte +20 -20
  100. package/dist/components/ui/table/table-cell.svelte +15 -15
  101. package/dist/components/ui/table/table-footer.svelte +20 -20
  102. package/dist/components/ui/table/table-head.svelte +15 -15
  103. package/dist/components/ui/table/table-header.svelte +20 -20
  104. package/dist/components/ui/table/table-row.svelte +15 -15
  105. package/dist/components/ui/table/table.svelte +17 -17
  106. package/dist/components/ui/tabs/tabs-content.svelte +17 -17
  107. package/dist/components/ui/tabs/tabs-list.svelte +40 -40
  108. package/dist/components/ui/tabs/tabs-trigger.svelte +23 -23
  109. package/dist/components/ui/tabs/tabs.svelte +19 -19
  110. package/dist/globals.css +3 -0
  111. package/dist/styles/globals.css +149 -149
  112. package/package.json +113 -113
@@ -1,59 +1,59 @@
1
- <script lang="ts" generics="T">
2
- import Button from "../../../ui/button/button.svelte";
3
- import * as DropdownMenu from "../../../ui/dropdown-menu/index.js";
4
- import { Input } from "../../../ui/input/index.js";
5
- import { ArrowDown01Icon } from "@hugeicons/core-free-icons";
6
- import { HugeiconsIcon } from "@hugeicons/svelte";
7
- import type { Table } from "@tanstack/table-core";
8
-
9
- type Props = {
10
- table: Table<T>;
11
- column?: keyof T & string;
12
- };
13
-
14
- let { table, column }: Props = $props();
15
- </script>
16
-
17
- <div class="flex items-center py-4">
18
- <Input
19
- placeholder="Filter emails..."
20
- value={(column
21
- ? (table.getColumn(column)?.getFilterValue() as string)
22
- : "") ?? ""}
23
- oninput={(e) =>
24
- column &&
25
- table.getColumn(column)?.setFilterValue(e.currentTarget.value)}
26
- onchange={(e) => {
27
- column &&
28
- table.getColumn(column)?.setFilterValue(e.currentTarget.value);
29
- }}
30
- class="max-w-sm"
31
- />
32
- <DropdownMenu.Root>
33
- <DropdownMenu.Trigger>
34
- {#snippet child({ props })}
35
- <Button {...props} variant="outline" class="ms-auto">
36
- Columns <HugeiconsIcon
37
- icon={ArrowDown01Icon}
38
- class="ms-2 size-4"
39
- />
40
- </Button>
41
- {/snippet}
42
- </DropdownMenu.Trigger>
43
- <DropdownMenu.Content align="end">
44
- {#each table
45
- .getAllColumns()
46
- .filter((col) => col.getCanHide()) as col (col.id)}
47
- <DropdownMenu.CheckboxItem
48
- class="capitalize"
49
- bind:checked={
50
- () => col.getIsVisible(),
51
- (v) => col.toggleVisibility(!!v)
52
- }
53
- >
54
- {col.id}
55
- </DropdownMenu.CheckboxItem>
56
- {/each}
57
- </DropdownMenu.Content>
58
- </DropdownMenu.Root>
59
- </div>
1
+ <script lang="ts" generics="T">
2
+ import Button from "../../../ui/button/button.svelte";
3
+ import * as DropdownMenu from "../../../ui/dropdown-menu/index.js";
4
+ import { Input } from "../../../ui/input/index.js";
5
+ import { ArrowDown01Icon } from "@hugeicons/core-free-icons";
6
+ import { HugeiconsIcon } from "@hugeicons/svelte";
7
+ import type { Table } from "@tanstack/table-core";
8
+
9
+ type Props = {
10
+ table: Table<T>;
11
+ column?: keyof T & string;
12
+ };
13
+
14
+ let { table, column }: Props = $props();
15
+ </script>
16
+
17
+ <div class="flex items-center py-4">
18
+ <Input
19
+ placeholder="Filter emails..."
20
+ value={(column
21
+ ? (table.getColumn(column)?.getFilterValue() as string)
22
+ : "") ?? ""}
23
+ oninput={(e) =>
24
+ column &&
25
+ table.getColumn(column)?.setFilterValue(e.currentTarget.value)}
26
+ onchange={(e) => {
27
+ column &&
28
+ table.getColumn(column)?.setFilterValue(e.currentTarget.value);
29
+ }}
30
+ class="max-w-sm"
31
+ />
32
+ <DropdownMenu.Root>
33
+ <DropdownMenu.Trigger>
34
+ {#snippet child({ props })}
35
+ <Button {...props} variant="outline" class="ms-auto">
36
+ Columns <HugeiconsIcon
37
+ icon={ArrowDown01Icon}
38
+ class="ms-2 size-4"
39
+ />
40
+ </Button>
41
+ {/snippet}
42
+ </DropdownMenu.Trigger>
43
+ <DropdownMenu.Content align="end">
44
+ {#each table
45
+ .getAllColumns()
46
+ .filter((col) => col.getCanHide()) as col (col.id)}
47
+ <DropdownMenu.CheckboxItem
48
+ class="capitalize"
49
+ bind:checked={
50
+ () => col.getIsVisible(),
51
+ (v) => col.toggleVisibility(!!v)
52
+ }
53
+ >
54
+ {col.id}
55
+ </DropdownMenu.CheckboxItem>
56
+ {/each}
57
+ </DropdownMenu.Content>
58
+ </DropdownMenu.Root>
59
+ </div>
@@ -1,35 +1,35 @@
1
- <script lang="ts" generics="T">
2
- import Button from "../../../ui/button/button.svelte";
3
- import type { Table } from "@tanstack/table-core";
4
-
5
- type Props = {
6
- table: Table<T>;
7
- };
8
-
9
- let { table }: Props = $props();
10
- </script>
11
-
12
- <div class="flex items-center justify-end space-x-2 pt-4">
13
- <div class="text-muted-foreground flex-1 text-sm">
14
- {table.getFilteredSelectedRowModel().rows.length} of
15
- {table.getFilteredRowModel().rows.length} row(s) selected.
16
- </div>
17
- <div class="space-x-2">
18
- <Button
19
- variant="outline"
20
- size="sm"
21
- onclick={() => table.previousPage()}
22
- disabled={!table.getCanPreviousPage()}
23
- >
24
- Previous
25
- </Button>
26
- <Button
27
- variant="outline"
28
- size="sm"
29
- onclick={() => table.nextPage()}
30
- disabled={!table.getCanNextPage()}
31
- >
32
- Next
33
- </Button>
34
- </div>
35
- </div>
1
+ <script lang="ts" generics="T">
2
+ import Button from "../../../ui/button/button.svelte";
3
+ import type { Table } from "@tanstack/table-core";
4
+
5
+ type Props = {
6
+ table: Table<T>;
7
+ };
8
+
9
+ let { table }: Props = $props();
10
+ </script>
11
+
12
+ <div class="flex items-center justify-end space-x-2 pt-4">
13
+ <div class="text-muted-foreground flex-1 text-sm">
14
+ {table.getFilteredSelectedRowModel().rows.length} of
15
+ {table.getFilteredRowModel().rows.length} row(s) selected.
16
+ </div>
17
+ <div class="space-x-2">
18
+ <Button
19
+ variant="outline"
20
+ size="sm"
21
+ onclick={() => table.previousPage()}
22
+ disabled={!table.getCanPreviousPage()}
23
+ >
24
+ Previous
25
+ </Button>
26
+ <Button
27
+ variant="outline"
28
+ size="sm"
29
+ onclick={() => table.nextPage()}
30
+ disabled={!table.getCanNextPage()}
31
+ >
32
+ Next
33
+ </Button>
34
+ </div>
35
+ </div>
@@ -1,81 +1,81 @@
1
- <script lang="ts">
2
- import Input from "../../../ui/input/input.svelte";
3
- import { Label } from "../../../ui/label";
4
- import { EyeIcon, EyeOffIcon } from "@hugeicons/core-free-icons";
5
- import { inputIconMap } from "../data/InputIconDefault.svelte";
6
- import type { InputLabelProps } from "../data/InputLabel.svelte";
7
- import { HugeiconsIcon } from "@hugeicons/svelte";
8
-
9
- let {
10
- label,
11
- isIcon,
12
- isLabel,
13
- value = $bindable(""),
14
- ...restProps
15
- }: InputLabelProps = $props();
16
-
17
- let showPassword = $state(false);
18
-
19
- const isPassword = $derived(restProps.type == "password");
20
-
21
- const inputType = $derived(
22
- isPassword && showPassword ? "text" : restProps.type,
23
- );
24
-
25
- const currentIcon = $derived(
26
- restProps.type ? inputIconMap[restProps.type] : undefined,
27
- );
28
-
29
- function togglePasswordVisibility() {
30
- showPassword = !showPassword;
31
- }
32
- </script>
33
-
34
- {#snippet renderInput()}
35
- <div class="flex items-center relative w-full">
36
- {#if isIcon && currentIcon}
37
- <span class="absolute left-3 flex items-center pointer-events-none">
38
- <HugeiconsIcon
39
- icon={currentIcon}
40
- size={16}
41
- color="#94a3b8"
42
- strokeWidth={1.5}
43
- />
44
- </span>
45
- {/if}
46
-
47
- <Input
48
- class="{isIcon && currentIcon ? 'pl-9' : ''} {isPassword ? 'pr-9' : ''}"
49
- bind:value
50
- {...restProps}
51
- type={inputType}
52
- />
53
-
54
- {#if isPassword}
55
- <button
56
- type="button"
57
- onclick={togglePasswordVisibility}
58
- class="absolute right-3 flex items-center cursor-pointer z-10 text-slate-400 hover:text-slate-600 focus:outline-none"
59
- aria-label={showPassword ? "Ocultar senha" : "Ver senha"}
60
- >
61
- <HugeiconsIcon
62
- icon={showPassword ? EyeOffIcon : EyeIcon}
63
- size={16}
64
- color="#94a3b8"
65
- strokeWidth={1.5}
66
- />
67
- </button>
68
- {/if}
69
- </div>
70
- {/snippet}
71
-
72
- {#if isLabel}
73
- <div class="flex flex-col gap-3 w-full">
74
- {#if label}
75
- <Label>{label}</Label>
76
- {/if}
77
- {@render renderInput()}
78
- </div>
79
- {:else}
80
- {@render renderInput()}
81
- {/if}
1
+ <script lang="ts">
2
+ import Input from "../../../ui/input/input.svelte";
3
+ import { Label } from "../../../ui/label";
4
+ import { EyeIcon, EyeOffIcon } from "@hugeicons/core-free-icons";
5
+ import { inputIconMap } from "../data/InputIconDefault.svelte";
6
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
7
+ import { HugeiconsIcon } from "@hugeicons/svelte";
8
+
9
+ let {
10
+ label,
11
+ isIcon,
12
+ isLabel,
13
+ value = $bindable(""),
14
+ ...restProps
15
+ }: InputLabelProps = $props();
16
+
17
+ let showPassword = $state(false);
18
+
19
+ const isPassword = $derived(restProps.type == "password");
20
+
21
+ const inputType = $derived(
22
+ isPassword && showPassword ? "text" : restProps.type,
23
+ );
24
+
25
+ const currentIcon = $derived(
26
+ restProps.type ? inputIconMap[restProps.type] : undefined,
27
+ );
28
+
29
+ function togglePasswordVisibility() {
30
+ showPassword = !showPassword;
31
+ }
32
+ </script>
33
+
34
+ {#snippet renderInput()}
35
+ <div class="flex items-center relative w-full">
36
+ {#if isIcon && currentIcon}
37
+ <span class="absolute left-3 flex items-center pointer-events-none">
38
+ <HugeiconsIcon
39
+ icon={currentIcon}
40
+ size={16}
41
+ color="#94a3b8"
42
+ strokeWidth={1.5}
43
+ />
44
+ </span>
45
+ {/if}
46
+
47
+ <Input
48
+ class="{isIcon && currentIcon ? 'pl-9' : ''} {isPassword ? 'pr-9' : ''}"
49
+ bind:value
50
+ {...restProps}
51
+ type={inputType}
52
+ />
53
+
54
+ {#if isPassword}
55
+ <button
56
+ type="button"
57
+ onclick={togglePasswordVisibility}
58
+ class="absolute right-3 flex items-center cursor-pointer z-10 text-slate-400 hover:text-slate-600 focus:outline-none"
59
+ aria-label={showPassword ? "Ocultar senha" : "Ver senha"}
60
+ >
61
+ <HugeiconsIcon
62
+ icon={showPassword ? EyeOffIcon : EyeIcon}
63
+ size={16}
64
+ color="#94a3b8"
65
+ strokeWidth={1.5}
66
+ />
67
+ </button>
68
+ {/if}
69
+ </div>
70
+ {/snippet}
71
+
72
+ {#if isLabel}
73
+ <div class="flex flex-col gap-3 w-full">
74
+ {#if label}
75
+ <Label>{label}</Label>
76
+ {/if}
77
+ {@render renderInput()}
78
+ </div>
79
+ {:else}
80
+ {@render renderInput()}
81
+ {/if}
@@ -1,23 +1,23 @@
1
- <script lang="ts">
2
- import type { InputLabelProps } from "../data/InputLabel.svelte";
3
- import InputBase from "./input-base.svelte";
4
- import { t } from "../../../../i18n";
5
-
6
- /** Email or phone input field with icon and label. */
7
- let {
8
- label,
9
- placeholder,
10
- value = $bindable(""),
11
- ...restProps
12
- }: InputLabelProps = $props();
13
- </script>
14
-
15
- <InputBase
16
- type="text"
17
- label={label || $t("input.email-or-phone.label")}
18
- placeholder={placeholder || $t("input.email-or-phone.placeholder")}
19
- isLabel
20
- isIcon
21
- bind:value
22
- {...restProps}
23
- />
1
+ <script lang="ts">
2
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
3
+ import InputBase from "./input-base.svelte";
4
+ import { t } from "../../../../i18n";
5
+
6
+ /** Email or phone input field with icon and label. */
7
+ let {
8
+ label,
9
+ placeholder,
10
+ value = $bindable(""),
11
+ ...restProps
12
+ }: InputLabelProps = $props();
13
+ </script>
14
+
15
+ <InputBase
16
+ type="text"
17
+ label={label || $t("input.email-or-phone.label")}
18
+ placeholder={placeholder || $t("input.email-or-phone.placeholder")}
19
+ isLabel
20
+ isIcon
21
+ bind:value
22
+ {...restProps}
23
+ />
@@ -1,23 +1,23 @@
1
- <script lang="ts">
2
- import type { InputLabelProps } from "../data/InputLabel.svelte";
3
- import InputBase from "./input-base.svelte";
4
- import { t } from "../../../../i18n";
5
-
6
- /** Email input field with icon and label. */
7
- let {
8
- label,
9
- placeholder,
10
- value = $bindable(""),
11
- ...restProps
12
- }: InputLabelProps = $props();
13
- </script>
14
-
15
- <InputBase
16
- type="email"
17
- label={label || $t("input.email.label")}
18
- placeholder={placeholder || $t("input.email.placeholder")}
19
- isLabel
20
- isIcon
21
- bind:value
22
- {...restProps}
23
- />
1
+ <script lang="ts">
2
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
3
+ import InputBase from "./input-base.svelte";
4
+ import { t } from "../../../../i18n";
5
+
6
+ /** Email input field with icon and label. */
7
+ let {
8
+ label,
9
+ placeholder,
10
+ value = $bindable(""),
11
+ ...restProps
12
+ }: InputLabelProps = $props();
13
+ </script>
14
+
15
+ <InputBase
16
+ type="email"
17
+ label={label || $t("input.email.label")}
18
+ placeholder={placeholder || $t("input.email.placeholder")}
19
+ isLabel
20
+ isIcon
21
+ bind:value
22
+ {...restProps}
23
+ />
@@ -1,23 +1,23 @@
1
- <script lang="ts">
2
- import type { InputLabelProps } from "../data/InputLabel.svelte";
3
- import InputBase from "./input-base.svelte";
4
- import { t } from "../../../../i18n";
5
-
6
- /** Password confirmation input field with icon and label. */
7
- let {
8
- label,
9
- placeholder,
10
- value = $bindable(""),
11
- ...restProps
12
- }: InputLabelProps = $props();
13
- </script>
14
-
15
- <InputBase
16
- type="password"
17
- label={label || $t("input.password-confirm.label")}
18
- placeholder={placeholder || $t("input.password-confirm.placeholder")}
19
- isLabel
20
- isIcon
21
- bind:value
22
- {...restProps}
23
- />
1
+ <script lang="ts">
2
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
3
+ import InputBase from "./input-base.svelte";
4
+ import { t } from "../../../../i18n";
5
+
6
+ /** Password confirmation input field with icon and label. */
7
+ let {
8
+ label,
9
+ placeholder,
10
+ value = $bindable(""),
11
+ ...restProps
12
+ }: InputLabelProps = $props();
13
+ </script>
14
+
15
+ <InputBase
16
+ type="password"
17
+ label={label || $t("input.password-confirm.label")}
18
+ placeholder={placeholder || $t("input.password-confirm.placeholder")}
19
+ isLabel
20
+ isIcon
21
+ bind:value
22
+ {...restProps}
23
+ />
@@ -1,23 +1,23 @@
1
- <script lang="ts">
2
- import type { InputLabelProps } from "../data/InputLabel.svelte";
3
- import InputBase from "./input-base.svelte";
4
- import { t } from "../../../../i18n";
5
-
6
- /** Password input field with icon and label. */
7
- let {
8
- label,
9
- placeholder,
10
- value = $bindable(""),
11
- ...restProps
12
- }: InputLabelProps = $props();
13
- </script>
14
-
15
- <InputBase
16
- type="password"
17
- label={label || $t("input.password.label")}
18
- placeholder={placeholder || $t("input.password.placeholder")}
19
- isLabel
20
- isIcon
21
- bind:value
22
- {...restProps}
23
- />
1
+ <script lang="ts">
2
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
3
+ import InputBase from "./input-base.svelte";
4
+ import { t } from "../../../../i18n";
5
+
6
+ /** Password input field with icon and label. */
7
+ let {
8
+ label,
9
+ placeholder,
10
+ value = $bindable(""),
11
+ ...restProps
12
+ }: InputLabelProps = $props();
13
+ </script>
14
+
15
+ <InputBase
16
+ type="password"
17
+ label={label || $t("input.password.label")}
18
+ placeholder={placeholder || $t("input.password.placeholder")}
19
+ isLabel
20
+ isIcon
21
+ bind:value
22
+ {...restProps}
23
+ />
@@ -1,33 +1,33 @@
1
- <script lang="ts">
2
- import { PhoneInput } from "../../../ui/phone-input";
3
- import type { InputLabelProps } from "../data/InputLabel.svelte";
4
- import { Label } from "../../../ui/label";
5
- import { t } from "../../../../i18n";
6
-
7
- /** Phone input field with icon and label. */
8
- let {
9
- label,
10
- isLabel,
11
- placeholder,
12
- value = $bindable(""),
13
- }: InputLabelProps = $props();
14
- </script>
15
-
16
- {#if isLabel}
17
- <div class="flex flex-col gap-3 w-full">
18
- {#if label}
19
- <Label>{label}</Label>
20
- {:else}
21
- <Label>{$t("input.email-or-phone.label")}</Label>
22
- {/if}
23
- <PhoneInput
24
- placeholder={placeholder || $t("input.email-or-phone.placeholder")}
25
- bind:value
26
- />
27
- </div>
28
- {:else}
29
- <PhoneInput
30
- placeholder={placeholder || $t("input.email-or-phone.placeholder")}
31
- bind:value
32
- />
33
- {/if}
1
+ <script lang="ts">
2
+ import { PhoneInput } from "../../../ui/phone-input";
3
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
4
+ import { Label } from "../../../ui/label";
5
+ import { t } from "../../../../i18n";
6
+
7
+ /** Phone input field with icon and label. */
8
+ let {
9
+ label,
10
+ isLabel,
11
+ placeholder,
12
+ value = $bindable(""),
13
+ }: InputLabelProps = $props();
14
+ </script>
15
+
16
+ {#if isLabel}
17
+ <div class="flex flex-col gap-3 w-full">
18
+ {#if label}
19
+ <Label>{label}</Label>
20
+ {:else}
21
+ <Label>{$t("input.email-or-phone.label")}</Label>
22
+ {/if}
23
+ <PhoneInput
24
+ placeholder={placeholder || $t("input.email-or-phone.placeholder")}
25
+ bind:value
26
+ />
27
+ </div>
28
+ {:else}
29
+ <PhoneInput
30
+ placeholder={placeholder || $t("input.email-or-phone.placeholder")}
31
+ bind:value
32
+ />
33
+ {/if}
@@ -1,22 +1,22 @@
1
- <script lang="ts">
2
- import type { InputLabelProps } from "../data/InputLabel.svelte";
3
- import InputBase from "./input-base.svelte";
4
- import { t } from "../../../../i18n";
5
-
6
- /** Username input field with icon and label. */
7
- let {
8
- label,
9
- placeholder,
10
- value = $bindable(""),
11
- ...restProps
12
- }: InputLabelProps = $props();
13
- </script>
14
-
15
- <InputBase
16
- label={label || $t("input.username.label")}
17
- placeholder={placeholder || $t("input.username.placeholder")}
18
- isLabel
19
- isIcon
20
- bind:value
21
- {...restProps}
22
- />
1
+ <script lang="ts">
2
+ import type { InputLabelProps } from "../data/InputLabel.svelte";
3
+ import InputBase from "./input-base.svelte";
4
+ import { t } from "../../../../i18n";
5
+
6
+ /** Username input field with icon and label. */
7
+ let {
8
+ label,
9
+ placeholder,
10
+ value = $bindable(""),
11
+ ...restProps
12
+ }: InputLabelProps = $props();
13
+ </script>
14
+
15
+ <InputBase
16
+ label={label || $t("input.username.label")}
17
+ placeholder={placeholder || $t("input.username.placeholder")}
18
+ isLabel
19
+ isIcon
20
+ bind:value
21
+ {...restProps}
22
+ />