negodesign 0.0.7 → 0.0.9
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/components/NegoDesign.svelte +24 -0
- package/dist/components/NegoDesign.svelte.d.ts +9 -0
- package/dist/components/core/button/ButtonSend.svelte +15 -0
- package/dist/components/core/button/ButtonSend.svelte.d.ts +4 -0
- package/dist/components/core/datatable/ui/DataTableActions.svelte +1 -1
- package/dist/components/core/datatable/ui/DataTableListFilter.svelte +1 -1
- package/dist/components/core/datatable/ui/DataTableListPagination.svelte +1 -1
- package/dist/components/core/form/ui/input-code-otp.svelte +58 -0
- package/dist/components/core/form/ui/input-code-otp.svelte.d.ts +10 -0
- package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -0
- package/dist/components/core/form/ui/input-email-or-phone.svelte.d.ts +4 -0
- package/dist/components/core/form/ui/input-phone.svelte +21 -11
- package/dist/components/{pages/login/01/ui → core/panel}/LeftHero.svelte +10 -6
- package/dist/components/{pages/login/01/ui → core/panel}/LeftHero.svelte.d.ts +1 -1
- package/dist/components/core/tabs/data/TabModel.d.ts +1 -1
- package/dist/components/core/tabs/ui/tab-underline.svelte +3 -1
- package/dist/components/pages/forget-password/01/ui/ForgetPasswordCard.svelte +59 -0
- package/dist/components/pages/forget-password/01/ui/ForgetPasswordCard.svelte.d.ts +15 -0
- package/dist/components/pages/forget-password/01/ui/FormForgetPassword.svelte +37 -0
- package/dist/components/pages/forget-password/01/ui/FormForgetPassword.svelte.d.ts +8 -0
- package/dist/components/pages/forget-password/01/ui/PageForgetPassword01.svelte +74 -0
- package/dist/components/pages/forget-password/01/ui/PageForgetPassword01.svelte.d.ts +4 -0
- package/dist/components/pages/forget-password/PageForgetPassword.svelte +19 -0
- package/dist/components/pages/forget-password/PageForgetPassword.svelte.d.ts +15 -0
- package/dist/components/pages/forget-password/types.d.ts +15 -0
- package/dist/components/pages/login/01/ui/FormLogin.svelte +6 -4
- package/dist/components/pages/login/01/ui/FormLogin.svelte.d.ts +4 -2
- package/dist/components/pages/login/01/ui/FormLoginEmailPassword.svelte +5 -4
- package/dist/components/pages/login/01/ui/FormLoginEmailPassword.svelte.d.ts +3 -2
- package/dist/components/pages/login/01/ui/FormLoginPhonePassword.svelte +5 -4
- package/dist/components/pages/login/01/ui/FormLoginPhonePassword.svelte.d.ts +3 -2
- package/dist/components/pages/login/01/ui/FormLoginUsernamePassword.svelte +5 -4
- package/dist/components/pages/login/01/ui/FormLoginUsernamePassword.svelte.d.ts +3 -2
- package/dist/components/pages/login/01/ui/{AuthCard.svelte → LoginCard.svelte} +16 -8
- package/dist/components/pages/login/01/ui/{AuthCard.svelte.d.ts → LoginCard.svelte.d.ts} +6 -5
- package/dist/components/pages/login/01/ui/PageLogin01.svelte +86 -57
- package/dist/components/pages/login/01/ui/PageLogin01.svelte.d.ts +1 -1
- package/dist/components/pages/login/PageLogin.svelte +1 -1
- package/dist/components/pages/login/PageLogin.svelte.d.ts +1 -1
- package/dist/components/pages/login/{01/data/page-props.d.ts → types.d.ts} +4 -2
- package/dist/components/pages/login/types.js +1 -0
- package/dist/components/pages/otp-verification/01/ui/FormOtpVerification.svelte +29 -0
- package/dist/components/pages/otp-verification/01/ui/FormOtpVerification.svelte.d.ts +8 -0
- package/dist/components/pages/otp-verification/01/ui/OtpVerificationCard.svelte +56 -0
- package/dist/components/pages/otp-verification/01/ui/OtpVerificationCard.svelte.d.ts +15 -0
- package/dist/components/pages/otp-verification/01/ui/PageOtpVerification01.svelte +72 -0
- package/dist/components/pages/otp-verification/01/ui/PageOtpVerification01.svelte.d.ts +4 -0
- package/dist/components/pages/otp-verification/PageOtpVerification.svelte +16 -0
- package/dist/components/pages/otp-verification/PageOtpVerification.svelte.d.ts +12 -0
- package/dist/components/pages/otp-verification/types.d.ts +13 -0
- package/dist/components/pages/otp-verification/types.js +1 -0
- package/dist/components/pages/reset-password/01/ui/FormResetPassword.svelte +41 -0
- package/dist/components/pages/reset-password/01/ui/FormResetPassword.svelte.d.ts +8 -0
- package/dist/components/pages/reset-password/01/ui/PageResetPassword01.svelte +72 -0
- package/dist/components/pages/reset-password/01/ui/PageResetPassword01.svelte.d.ts +4 -0
- package/dist/components/pages/reset-password/01/ui/ResetPasswordCard.svelte +56 -0
- package/dist/components/pages/reset-password/01/ui/ResetPasswordCard.svelte.d.ts +15 -0
- package/dist/components/pages/reset-password/PageResetPassword.svelte +16 -0
- package/dist/components/pages/reset-password/PageResetPassword.svelte.d.ts +12 -0
- package/dist/components/pages/reset-password/types.d.ts +15 -0
- package/dist/components/pages/reset-password/types.js +1 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +20 -20
- package/dist/components/ui/button/button.svelte +47 -28
- package/dist/components/ui/button/button.svelte.d.ts +77 -50
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/button/index.js +2 -2
- package/dist/components/ui/command/command-dialog.svelte +42 -0
- package/dist/components/ui/command/command-dialog.svelte.d.ts +14 -0
- package/dist/components/ui/command/command-empty.svelte +17 -0
- package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-group.svelte +33 -0
- package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
- package/dist/components/ui/command/command-input.svelte +33 -0
- package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-item.svelte +27 -0
- package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-link-item.svelte +20 -0
- package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-list.svelte +20 -0
- package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-loading.svelte +7 -0
- package/dist/components/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-separator.svelte +17 -0
- package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-shortcut.svelte +23 -0
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/command/command.svelte +28 -0
- package/dist/components/ui/command/command.svelte.d.ts +8 -0
- package/dist/components/ui/command/index.d.ts +12 -0
- package/dist/components/ui/command/index.js +14 -0
- package/dist/components/ui/dialog/dialog-close.svelte +11 -0
- package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +48 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
- package/dist/components/ui/dialog/dialog-description.svelte +20 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +32 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +8 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-portal.svelte +7 -0
- package/dist/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/dialog-title.svelte +17 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte +11 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog.svelte +7 -0
- package/dist/components/ui/dialog/dialog.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/index.d.ts +11 -0
- package/dist/components/ui/dialog/index.js +13 -0
- package/dist/components/ui/input/index.d.ts +2 -2
- package/dist/components/ui/input/index.js +2 -2
- package/dist/components/ui/input/input.svelte +9 -9
- package/dist/components/ui/input/input.svelte.d.ts +5 -5
- package/dist/components/ui/input-group/index.d.ts +7 -0
- package/dist/components/ui/input-group/index.js +9 -0
- package/dist/components/ui/input-group/input-group-addon.svelte +53 -0
- package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +32 -0
- package/dist/components/ui/input-group/input-group-button.svelte +49 -0
- package/dist/components/ui/input-group/input-group-button.svelte.d.ts +32 -0
- package/dist/components/ui/input-group/input-group-input.svelte +23 -0
- package/dist/components/ui/input-group/input-group-input.svelte.d.ts +11 -0
- package/dist/components/ui/input-group/input-group-text.svelte +22 -0
- package/dist/components/ui/input-group/input-group-text.svelte.d.ts +5 -0
- package/dist/components/ui/input-group/input-group-textarea.svelte +23 -0
- package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +3 -0
- package/dist/components/ui/input-group/input-group.svelte +24 -0
- package/dist/components/ui/input-group/input-group.svelte.d.ts +5 -0
- package/dist/components/ui/input-otp/index.d.ts +5 -0
- package/dist/components/ui/input-otp/index.js +5 -0
- package/dist/components/ui/input-otp/input-otp-group.svelte +20 -0
- package/dist/components/ui/input-otp/input-otp-group.svelte.d.ts +5 -0
- package/dist/components/ui/input-otp/input-otp-separator.svelte +28 -0
- package/dist/components/ui/input-otp/input-otp-separator.svelte.d.ts +5 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte +31 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte.d.ts +4 -0
- package/dist/components/ui/input-otp/input-otp.svelte +23 -0
- package/dist/components/ui/input-otp/input-otp.svelte.d.ts +4 -0
- package/dist/components/ui/language-switcher/index.d.ts +1 -1
- package/dist/components/ui/light-switch/light-switch.svelte +2 -2
- package/dist/components/ui/light-switch/light-switch.svelte.d.ts +1 -1
- package/dist/components/ui/phone-input/country-selector.svelte +101 -0
- package/dist/components/ui/phone-input/country-selector.svelte.d.ts +13 -0
- package/dist/components/ui/phone-input/flag.svelte +21 -0
- package/dist/components/ui/phone-input/flag.svelte.d.ts +7 -0
- package/dist/components/ui/phone-input/flags.d.ts +2 -0
- package/dist/components/ui/phone-input/flags.js +10 -0
- package/dist/components/ui/phone-input/index.d.ts +3 -0
- package/dist/components/ui/phone-input/index.js +2 -0
- package/dist/components/ui/phone-input/phone-input.svelte +63 -0
- package/dist/components/ui/phone-input/phone-input.svelte.d.ts +7 -0
- package/dist/components/ui/phone-input/types.d.ts +16 -0
- package/dist/components/ui/phone-input/types.js +1 -0
- package/dist/components/ui/popover/index.d.ts +9 -0
- package/dist/components/ui/popover/index.js +11 -0
- package/dist/components/ui/popover/popover-close.svelte +7 -0
- package/dist/components/ui/popover/popover-close.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover-content.svelte +31 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +10 -0
- package/dist/components/ui/popover/popover-description.svelte +20 -0
- package/dist/components/ui/popover/popover-description.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-header.svelte +20 -0
- package/dist/components/ui/popover/popover-header.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-portal.svelte +7 -0
- package/dist/components/ui/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/components/ui/popover/popover-title.svelte +15 -0
- package/dist/components/ui/popover/popover-title.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-trigger.svelte +17 -0
- package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover.svelte +7 -0
- package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/components/ui/scroll-area/index.d.ts +3 -0
- package/dist/components/ui/scroll-area/index.js +5 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +30 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte +43 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +11 -0
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte.d.ts +17 -17
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +8 -8
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +23 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/globals.css +550 -20
- package/dist/i18n/config.d.ts +11 -0
- package/dist/i18n/config.js +16 -4
- package/dist/i18n/index.d.ts +13 -0
- package/dist/i18n/index.js +13 -0
- package/dist/i18n/langs/en.d.ts +76 -0
- package/dist/i18n/langs/en.js +75 -0
- package/dist/i18n/langs/pt.d.ts +76 -0
- package/dist/i18n/langs/pt.js +75 -0
- package/dist/i18n/translations.d.ts +74 -0
- package/dist/i18n/translations.js +4 -76
- package/dist/index.d.ts +28 -6
- package/dist/index.js +28 -6
- package/dist/types/index.d.ts +27 -0
- package/dist/types/index.js +1 -0
- package/package.json +9 -3
- package/dist/components/NegoDesignLayout.svelte +0 -23
- package/dist/components/NegoDesignLayout.svelte.d.ts +0 -8
- package/dist/config.d.ts +0 -7
- package/dist/config.js +0 -8
- /package/dist/components/pages/{login/01/data/page-props.js → forget-password/types.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from
|
|
3
|
-
import { cn, type WithElementRef } from
|
|
2
|
+
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
4
4
|
|
|
5
|
-
type InputType = Exclude<HTMLInputTypeAttribute,
|
|
5
|
+
type InputType = Exclude<HTMLInputTypeAttribute, 'file'>;
|
|
6
6
|
|
|
7
7
|
type Props = WithElementRef<
|
|
8
|
-
Omit<HTMLInputAttributes,
|
|
9
|
-
({ type:
|
|
8
|
+
Omit<HTMLInputAttributes, 'type'> &
|
|
9
|
+
({ type: 'file'; files?: FileList } | { type?: InputType; files?: undefined })
|
|
10
10
|
>;
|
|
11
11
|
|
|
12
12
|
let {
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
type,
|
|
16
16
|
files = $bindable(),
|
|
17
17
|
class: className,
|
|
18
|
-
|
|
18
|
+
'data-slot': dataSlot = 'input',
|
|
19
19
|
...restProps
|
|
20
20
|
}: Props = $props();
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
|
-
{#if type ===
|
|
23
|
+
{#if type === 'file'}
|
|
24
24
|
<input
|
|
25
25
|
bind:this={ref}
|
|
26
26
|
data-slot={dataSlot}
|
|
27
27
|
class={cn(
|
|
28
|
-
|
|
28
|
+
'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 file:text-foreground placeholder:text-muted-foreground h-9 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm',
|
|
29
29
|
className
|
|
30
30
|
)}
|
|
31
31
|
type="file"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
bind:this={ref}
|
|
39
39
|
data-slot={dataSlot}
|
|
40
40
|
class={cn(
|
|
41
|
-
|
|
41
|
+
'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 file:text-foreground placeholder:text-muted-foreground h-9 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm',
|
|
42
42
|
className
|
|
43
43
|
)}
|
|
44
44
|
{type}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from
|
|
2
|
-
import { type WithElementRef } from
|
|
3
|
-
type InputType = Exclude<HTMLInputTypeAttribute,
|
|
4
|
-
type Props = WithElementRef<Omit<HTMLInputAttributes,
|
|
5
|
-
type:
|
|
1
|
+
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
3
|
+
type InputType = Exclude<HTMLInputTypeAttribute, 'file'>;
|
|
4
|
+
type Props = WithElementRef<Omit<HTMLInputAttributes, 'type'> & ({
|
|
5
|
+
type: 'file';
|
|
6
6
|
files?: FileList;
|
|
7
7
|
} | {
|
|
8
8
|
type?: InputType;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Root from './input-group.svelte';
|
|
2
|
+
import Addon from './input-group-addon.svelte';
|
|
3
|
+
import Button from './input-group-button.svelte';
|
|
4
|
+
import Input from './input-group-input.svelte';
|
|
5
|
+
import Text from './input-group-text.svelte';
|
|
6
|
+
import Textarea from './input-group-textarea.svelte';
|
|
7
|
+
export { Root, Addon, Button, Input, Text, Textarea, Root as InputGroup, Addon as InputGroupAddon, Button as InputGroupButton, Input as InputGroupInput, Text as InputGroupText, Textarea as InputGroupTextarea };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Root from './input-group.svelte';
|
|
2
|
+
import Addon from './input-group-addon.svelte';
|
|
3
|
+
import Button from './input-group-button.svelte';
|
|
4
|
+
import Input from './input-group-input.svelte';
|
|
5
|
+
import Text from './input-group-text.svelte';
|
|
6
|
+
import Textarea from './input-group-textarea.svelte';
|
|
7
|
+
export { Root, Addon, Button, Input, Text, Textarea,
|
|
8
|
+
//
|
|
9
|
+
Root as InputGroup, Addon as InputGroupAddon, Button as InputGroupButton, Input as InputGroupInput, Text as InputGroupText, Textarea as InputGroupTextarea };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants';
|
|
3
|
+
export const inputGroupAddonVariants = tv({
|
|
4
|
+
base: "text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
5
|
+
variants: {
|
|
6
|
+
align: {
|
|
7
|
+
'inline-start': 'order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]',
|
|
8
|
+
'inline-end': 'order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]',
|
|
9
|
+
'block-start':
|
|
10
|
+
'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',
|
|
11
|
+
'block-end':
|
|
12
|
+
'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
align: 'inline-start'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>['align'];
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
25
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
ref = $bindable(null),
|
|
29
|
+
class: className,
|
|
30
|
+
children,
|
|
31
|
+
align = 'inline-start',
|
|
32
|
+
...restProps
|
|
33
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
+
align?: InputGroupAddonAlign;
|
|
35
|
+
} = $props();
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
bind:this={ref}
|
|
40
|
+
role="group"
|
|
41
|
+
data-slot="input-group-addon"
|
|
42
|
+
data-align={align}
|
|
43
|
+
class={cn(inputGroupAddonVariants({ align }), className)}
|
|
44
|
+
onclick={(e) => {
|
|
45
|
+
if ((e.target as HTMLElement).closest('button')) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
e.currentTarget.parentElement?.querySelector('input')?.focus();
|
|
49
|
+
}}
|
|
50
|
+
{...restProps}
|
|
51
|
+
>
|
|
52
|
+
{@render children?.()}
|
|
53
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const inputGroupAddonVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
align: {
|
|
4
|
+
'inline-start': "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]";
|
|
5
|
+
'inline-end': "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]";
|
|
6
|
+
'block-start': "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2";
|
|
7
|
+
'block-end': "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2";
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
10
|
+
align: {
|
|
11
|
+
'inline-start': "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]";
|
|
12
|
+
'inline-end': "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]";
|
|
13
|
+
'block-start': "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2";
|
|
14
|
+
'block-end': "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2";
|
|
15
|
+
};
|
|
16
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
17
|
+
align: {
|
|
18
|
+
'inline-start': "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]";
|
|
19
|
+
'inline-end': "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]";
|
|
20
|
+
'block-start': "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2";
|
|
21
|
+
'block-end': "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2";
|
|
22
|
+
};
|
|
23
|
+
}, undefined>>;
|
|
24
|
+
export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>['align'];
|
|
25
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
26
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
27
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
28
|
+
align?: InputGroupAddonAlign;
|
|
29
|
+
};
|
|
30
|
+
declare const InputGroupAddon: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
31
|
+
type InputGroupAddon = ReturnType<typeof InputGroupAddon>;
|
|
32
|
+
export default InputGroupAddon;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
const inputGroupButtonVariants = tv({
|
|
5
|
+
base: 'flex items-center gap-2 text-sm shadow-none',
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
9
|
+
sm: 'cn-input-group-button-size-sm',
|
|
10
|
+
'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',
|
|
11
|
+
'icon-sm': 'size-8 p-0 has-[>svg]:p-0'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: 'xs'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type InputGroupButtonSize = VariantProps<typeof inputGroupButtonVariants>['size'];
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { cn } from '../../../utils.js';
|
|
24
|
+
import type { ComponentProps } from 'svelte';
|
|
25
|
+
import { Button } from '../button/index.js';
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
ref = $bindable(null),
|
|
29
|
+
class: className,
|
|
30
|
+
children,
|
|
31
|
+
type = 'button',
|
|
32
|
+
variant = 'ghost',
|
|
33
|
+
size = 'xs',
|
|
34
|
+
...restProps
|
|
35
|
+
}: Omit<ComponentProps<typeof Button>, 'href' | 'size'> & {
|
|
36
|
+
size?: InputGroupButtonSize;
|
|
37
|
+
} = $props();
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<Button
|
|
41
|
+
bind:ref
|
|
42
|
+
{type}
|
|
43
|
+
data-size={size}
|
|
44
|
+
{variant}
|
|
45
|
+
class={cn(inputGroupButtonVariants({ size }), className)}
|
|
46
|
+
{...restProps}
|
|
47
|
+
>
|
|
48
|
+
{@render children?.()}
|
|
49
|
+
</Button>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
declare const inputGroupButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5";
|
|
5
|
+
sm: "cn-input-group-button-size-sm";
|
|
6
|
+
'icon-xs': "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0";
|
|
7
|
+
'icon-sm': "size-8 p-0 has-[>svg]:p-0";
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "flex items-center gap-2 text-sm shadow-none", {
|
|
10
|
+
size: {
|
|
11
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5";
|
|
12
|
+
sm: "cn-input-group-button-size-sm";
|
|
13
|
+
'icon-xs': "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0";
|
|
14
|
+
'icon-sm': "size-8 p-0 has-[>svg]:p-0";
|
|
15
|
+
};
|
|
16
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
17
|
+
size: {
|
|
18
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5";
|
|
19
|
+
sm: "cn-input-group-button-size-sm";
|
|
20
|
+
'icon-xs': "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0";
|
|
21
|
+
'icon-sm': "size-8 p-0 has-[>svg]:p-0";
|
|
22
|
+
};
|
|
23
|
+
}, undefined>>;
|
|
24
|
+
export type InputGroupButtonSize = VariantProps<typeof inputGroupButtonVariants>['size'];
|
|
25
|
+
import type { ComponentProps } from 'svelte';
|
|
26
|
+
import { Button } from '../button/index.js';
|
|
27
|
+
type $$ComponentProps = Omit<ComponentProps<typeof Button>, 'href' | 'size'> & {
|
|
28
|
+
size?: InputGroupButtonSize;
|
|
29
|
+
};
|
|
30
|
+
declare const InputGroupButton: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
31
|
+
type InputGroupButton = ReturnType<typeof InputGroupButton>;
|
|
32
|
+
export default InputGroupButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { ComponentProps } from 'svelte';
|
|
4
|
+
import { Input } from '../input/index.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<typeof Input> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Input
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="input-group-control"
|
|
17
|
+
class={cn(
|
|
18
|
+
'flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
bind:value
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const InputGroupInput: import("svelte").Component<(Omit<import("svelte/elements").HTMLInputAttributes, "type"> & ({
|
|
2
|
+
type: "file";
|
|
3
|
+
files?: FileList;
|
|
4
|
+
} | {
|
|
5
|
+
type?: "number" | "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "hidden" | "image" | "month" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | (string & {});
|
|
6
|
+
files?: undefined;
|
|
7
|
+
})) & {
|
|
8
|
+
ref?: HTMLElement | null | undefined;
|
|
9
|
+
}, {}, "value" | "ref">;
|
|
10
|
+
type InputGroupInput = ReturnType<typeof InputGroupInput>;
|
|
11
|
+
export default InputGroupInput;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<span
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
class={cn(
|
|
16
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</span>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const InputGroupText: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
4
|
+
type InputGroupText = ReturnType<typeof InputGroupText>;
|
|
5
|
+
export default InputGroupText;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import { Textarea } from '../textarea/index.js';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<typeof Textarea> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Textarea
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="input-group-control"
|
|
17
|
+
class={cn(
|
|
18
|
+
'flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
bind:value
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const InputGroupTextarea: import("svelte").Component<Omit<import("../../../utils.js").WithElementRef<import("svelte/elements").HTMLTextareaAttributes>, "children">, {}, "value" | "ref">;
|
|
2
|
+
type InputGroupTextarea = ReturnType<typeof InputGroupTextarea>;
|
|
3
|
+
export default InputGroupTextarea;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="input-group"
|
|
16
|
+
role="group"
|
|
17
|
+
class={cn(
|
|
18
|
+
'group/input-group border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-9 w-full min-w-0 items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{@render children?.()}
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const InputGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type InputGroup = ReturnType<typeof InputGroup>;
|
|
5
|
+
export default InputGroup;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Root from "./input-otp.svelte";
|
|
2
|
+
import Group from "./input-otp-group.svelte";
|
|
3
|
+
import Slot from "./input-otp-slot.svelte";
|
|
4
|
+
import Separator from "./input-otp-separator.svelte";
|
|
5
|
+
export { Root, Group, Slot, Separator, Root as InputOTP, Group as InputOTPGroup, Slot as InputOTPSlot, Separator as InputOTPSeparator, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Root from "./input-otp.svelte";
|
|
2
|
+
import Group from "./input-otp-group.svelte";
|
|
3
|
+
import Slot from "./input-otp-slot.svelte";
|
|
4
|
+
import Separator from "./input-otp-separator.svelte";
|
|
5
|
+
export { Root, Group, Slot, Separator, Root as InputOTP, Group as InputOTPGroup, Slot as InputOTPSlot, Separator as InputOTPSeparator, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="input-otp-group"
|
|
16
|
+
class={cn("has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-4xl has-aria-invalid:ring-[3px] flex items-center", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
3
|
+
declare const InputOtpGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type InputOtpGroup = ReturnType<typeof InputOtpGroup>;
|
|
5
|
+
export default InputOtpGroup;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
import { HugeiconsIcon } from "@hugeicons/svelte"
|
|
6
|
+
import { MinusSignIcon } from '@hugeicons/core-free-icons';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
class: className,
|
|
11
|
+
children,
|
|
12
|
+
...restProps
|
|
13
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
bind:this={ref}
|
|
18
|
+
data-slot="input-otp-separator"
|
|
19
|
+
role="separator"
|
|
20
|
+
class={cn("[&_svg:not([class*='size-'])]:size-4 flex items-center", className)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
>
|
|
23
|
+
{#if children}
|
|
24
|
+
{@render children?.()}
|
|
25
|
+
{:else}
|
|
26
|
+
<HugeiconsIcon icon={MinusSignIcon} strokeWidth={2} />
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
3
|
+
declare const InputOtpSeparator: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type InputOtpSeparator = ReturnType<typeof InputOtpSeparator>;
|
|
5
|
+
export default InputOtpSeparator;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { PinInput as InputOTPPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
cell,
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: InputOTPPrimitive.CellProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<InputOTPPrimitive.Cell
|
|
14
|
+
{cell}
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="input-otp-slot"
|
|
17
|
+
class={cn(
|
|
18
|
+
"bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-9 border-y border-r text-sm transition-all outline-none first:rounded-l-4xl first:border-l last:rounded-r-4xl data-[active=true]:ring-[3px] relative flex items-center justify-center data-[active=true]:z-10",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
>
|
|
23
|
+
{cell.char}
|
|
24
|
+
{#if cell.hasFakeCaret}
|
|
25
|
+
<div
|
|
26
|
+
class="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center"
|
|
27
|
+
>
|
|
28
|
+
<div class="animate-caret-blink bg-foreground h-4 w-px duration-1000 bg-foreground h-4 w-px"></div>
|
|
29
|
+
</div>
|
|
30
|
+
{/if}
|
|
31
|
+
</InputOTPPrimitive.Cell>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { PinInput as InputOTPPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
value = $bindable(""),
|
|
9
|
+
...restProps
|
|
10
|
+
}: InputOTPPrimitive.RootProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<InputOTPPrimitive.Root
|
|
14
|
+
bind:ref
|
|
15
|
+
bind:value
|
|
16
|
+
data-slot="input-otp"
|
|
17
|
+
spellcheck={false}
|
|
18
|
+
class={cn(
|
|
19
|
+
"cn-input-otp-input gap-2 flex items-center disabled:cursor-not-allowed has-disabled:opacity-50",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
/>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import LanguageSwitcher from './language-switcher.svelte';
|
|
2
|
-
export type {
|
|
2
|
+
export type { LanguageSwitcherProps } from './language-switcher.svelte';
|
|
3
3
|
export { LanguageSwitcher as Root, LanguageSwitcher };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { Size } from "
|
|
2
|
+
import type { Size } from "../button/button.svelte";
|
|
3
3
|
|
|
4
4
|
export type LightSwitchProps = {
|
|
5
5
|
variant?: "outline" | "ghost";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import SunIcon from "@lucide/svelte/icons/sun";
|
|
12
12
|
import MoonIcon from "@lucide/svelte/icons/moon";
|
|
13
13
|
import { toggleMode } from "mode-watcher";
|
|
14
|
-
import Button, { sizeMap } from "
|
|
14
|
+
import Button, { sizeMap } from "../button/button.svelte";
|
|
15
15
|
|
|
16
16
|
let { variant = "outline", size = "default" }: LightSwitchProps = $props();
|
|
17
17
|
</script>
|