negodesign 0.0.7 → 0.0.8

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 (206) hide show
  1. package/dist/components/NegoDesign.svelte +24 -0
  2. package/dist/components/NegoDesign.svelte.d.ts +9 -0
  3. package/dist/components/core/button/ButtonSend.svelte +15 -0
  4. package/dist/components/core/button/ButtonSend.svelte.d.ts +4 -0
  5. package/dist/components/core/datatable/ui/DataTableActions.svelte +1 -1
  6. package/dist/components/core/datatable/ui/DataTableListFilter.svelte +1 -1
  7. package/dist/components/core/datatable/ui/DataTableListPagination.svelte +1 -1
  8. package/dist/components/core/form/ui/input-code-otp.svelte +58 -0
  9. package/dist/components/core/form/ui/input-code-otp.svelte.d.ts +10 -0
  10. package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -0
  11. package/dist/components/core/form/ui/input-email-or-phone.svelte.d.ts +4 -0
  12. package/dist/components/core/form/ui/input-phone.svelte +21 -11
  13. package/dist/components/{pages/login/01/ui → core/panel}/LeftHero.svelte +10 -6
  14. package/dist/components/{pages/login/01/ui → core/panel}/LeftHero.svelte.d.ts +1 -1
  15. package/dist/components/core/tabs/data/TabModel.d.ts +1 -1
  16. package/dist/components/core/tabs/ui/tab-underline.svelte +3 -1
  17. package/dist/components/pages/forget-password/01/ui/ForgetPasswordCard.svelte +59 -0
  18. package/dist/components/pages/forget-password/01/ui/ForgetPasswordCard.svelte.d.ts +15 -0
  19. package/dist/components/pages/forget-password/01/ui/FormForgetPassword.svelte +37 -0
  20. package/dist/components/pages/forget-password/01/ui/FormForgetPassword.svelte.d.ts +8 -0
  21. package/dist/components/pages/forget-password/01/ui/PageForgetPassword01.svelte +74 -0
  22. package/dist/components/pages/forget-password/01/ui/PageForgetPassword01.svelte.d.ts +4 -0
  23. package/dist/components/pages/forget-password/PageForgetPassword.svelte +19 -0
  24. package/dist/components/pages/forget-password/PageForgetPassword.svelte.d.ts +15 -0
  25. package/dist/components/pages/forget-password/types.d.ts +15 -0
  26. package/dist/components/pages/login/01/ui/FormLogin.svelte +6 -4
  27. package/dist/components/pages/login/01/ui/FormLogin.svelte.d.ts +4 -2
  28. package/dist/components/pages/login/01/ui/FormLoginEmailPassword.svelte +5 -4
  29. package/dist/components/pages/login/01/ui/FormLoginEmailPassword.svelte.d.ts +3 -2
  30. package/dist/components/pages/login/01/ui/FormLoginPhonePassword.svelte +5 -4
  31. package/dist/components/pages/login/01/ui/FormLoginPhonePassword.svelte.d.ts +3 -2
  32. package/dist/components/pages/login/01/ui/FormLoginUsernamePassword.svelte +5 -4
  33. package/dist/components/pages/login/01/ui/FormLoginUsernamePassword.svelte.d.ts +3 -2
  34. package/dist/components/pages/login/01/ui/{AuthCard.svelte → LoginCard.svelte} +16 -8
  35. package/dist/components/pages/login/01/ui/{AuthCard.svelte.d.ts → LoginCard.svelte.d.ts} +6 -5
  36. package/dist/components/pages/login/01/ui/PageLogin01.svelte +86 -57
  37. package/dist/components/pages/login/01/ui/PageLogin01.svelte.d.ts +1 -1
  38. package/dist/components/pages/login/PageLogin.svelte +1 -1
  39. package/dist/components/pages/login/PageLogin.svelte.d.ts +1 -1
  40. package/dist/components/pages/login/{01/data/page-props.d.ts → types.d.ts} +4 -2
  41. package/dist/components/pages/login/types.js +1 -0
  42. package/dist/components/pages/otp-verification/01/ui/FormOtpVerification.svelte +29 -0
  43. package/dist/components/pages/otp-verification/01/ui/FormOtpVerification.svelte.d.ts +8 -0
  44. package/dist/components/pages/otp-verification/01/ui/OtpVerificationCard.svelte +56 -0
  45. package/dist/components/pages/otp-verification/01/ui/OtpVerificationCard.svelte.d.ts +15 -0
  46. package/dist/components/pages/otp-verification/01/ui/PageOtpVerification01.svelte +72 -0
  47. package/dist/components/pages/otp-verification/01/ui/PageOtpVerification01.svelte.d.ts +4 -0
  48. package/dist/components/pages/otp-verification/PageOtpVerification.svelte +16 -0
  49. package/dist/components/pages/otp-verification/PageOtpVerification.svelte.d.ts +12 -0
  50. package/dist/components/pages/otp-verification/types.d.ts +13 -0
  51. package/dist/components/pages/otp-verification/types.js +1 -0
  52. package/dist/components/pages/reset-password/01/ui/FormResetPassword.svelte +41 -0
  53. package/dist/components/pages/reset-password/01/ui/FormResetPassword.svelte.d.ts +8 -0
  54. package/dist/components/pages/reset-password/01/ui/PageResetPassword01.svelte +72 -0
  55. package/dist/components/pages/reset-password/01/ui/PageResetPassword01.svelte.d.ts +4 -0
  56. package/dist/components/pages/reset-password/01/ui/ResetPasswordCard.svelte +56 -0
  57. package/dist/components/pages/reset-password/01/ui/ResetPasswordCard.svelte.d.ts +15 -0
  58. package/dist/components/pages/reset-password/PageResetPassword.svelte +16 -0
  59. package/dist/components/pages/reset-password/PageResetPassword.svelte.d.ts +12 -0
  60. package/dist/components/pages/reset-password/types.d.ts +15 -0
  61. package/dist/components/pages/reset-password/types.js +1 -0
  62. package/dist/components/ui/badge/badge.svelte.d.ts +20 -20
  63. package/dist/components/ui/button/button.svelte +47 -28
  64. package/dist/components/ui/button/button.svelte.d.ts +77 -50
  65. package/dist/components/ui/button/index.d.ts +2 -2
  66. package/dist/components/ui/button/index.js +2 -2
  67. package/dist/components/ui/command/command-dialog.svelte +42 -0
  68. package/dist/components/ui/command/command-dialog.svelte.d.ts +14 -0
  69. package/dist/components/ui/command/command-empty.svelte +17 -0
  70. package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
  71. package/dist/components/ui/command/command-group.svelte +33 -0
  72. package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
  73. package/dist/components/ui/command/command-input.svelte +33 -0
  74. package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
  75. package/dist/components/ui/command/command-item.svelte +27 -0
  76. package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
  77. package/dist/components/ui/command/command-link-item.svelte +20 -0
  78. package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
  79. package/dist/components/ui/command/command-list.svelte +20 -0
  80. package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
  81. package/dist/components/ui/command/command-loading.svelte +7 -0
  82. package/dist/components/ui/command/command-loading.svelte.d.ts +4 -0
  83. package/dist/components/ui/command/command-separator.svelte +17 -0
  84. package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
  85. package/dist/components/ui/command/command-shortcut.svelte +23 -0
  86. package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
  87. package/dist/components/ui/command/command.svelte +28 -0
  88. package/dist/components/ui/command/command.svelte.d.ts +8 -0
  89. package/dist/components/ui/command/index.d.ts +12 -0
  90. package/dist/components/ui/command/index.js +14 -0
  91. package/dist/components/ui/dialog/dialog-close.svelte +11 -0
  92. package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
  93. package/dist/components/ui/dialog/dialog-content.svelte +48 -0
  94. package/dist/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
  95. package/dist/components/ui/dialog/dialog-description.svelte +20 -0
  96. package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
  97. package/dist/components/ui/dialog/dialog-footer.svelte +32 -0
  98. package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +8 -0
  99. package/dist/components/ui/dialog/dialog-header.svelte +20 -0
  100. package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
  101. package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
  102. package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
  103. package/dist/components/ui/dialog/dialog-portal.svelte +7 -0
  104. package/dist/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
  105. package/dist/components/ui/dialog/dialog-title.svelte +17 -0
  106. package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
  107. package/dist/components/ui/dialog/dialog-trigger.svelte +11 -0
  108. package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
  109. package/dist/components/ui/dialog/dialog.svelte +7 -0
  110. package/dist/components/ui/dialog/dialog.svelte.d.ts +3 -0
  111. package/dist/components/ui/dialog/index.d.ts +11 -0
  112. package/dist/components/ui/dialog/index.js +13 -0
  113. package/dist/components/ui/input/index.d.ts +2 -2
  114. package/dist/components/ui/input/index.js +2 -2
  115. package/dist/components/ui/input/input.svelte +9 -9
  116. package/dist/components/ui/input/input.svelte.d.ts +5 -5
  117. package/dist/components/ui/input-group/index.d.ts +7 -0
  118. package/dist/components/ui/input-group/index.js +9 -0
  119. package/dist/components/ui/input-group/input-group-addon.svelte +53 -0
  120. package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +32 -0
  121. package/dist/components/ui/input-group/input-group-button.svelte +49 -0
  122. package/dist/components/ui/input-group/input-group-button.svelte.d.ts +32 -0
  123. package/dist/components/ui/input-group/input-group-input.svelte +23 -0
  124. package/dist/components/ui/input-group/input-group-input.svelte.d.ts +11 -0
  125. package/dist/components/ui/input-group/input-group-text.svelte +22 -0
  126. package/dist/components/ui/input-group/input-group-text.svelte.d.ts +5 -0
  127. package/dist/components/ui/input-group/input-group-textarea.svelte +23 -0
  128. package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +3 -0
  129. package/dist/components/ui/input-group/input-group.svelte +24 -0
  130. package/dist/components/ui/input-group/input-group.svelte.d.ts +5 -0
  131. package/dist/components/ui/input-otp/index.d.ts +5 -0
  132. package/dist/components/ui/input-otp/index.js +5 -0
  133. package/dist/components/ui/input-otp/input-otp-group.svelte +20 -0
  134. package/dist/components/ui/input-otp/input-otp-group.svelte.d.ts +5 -0
  135. package/dist/components/ui/input-otp/input-otp-separator.svelte +28 -0
  136. package/dist/components/ui/input-otp/input-otp-separator.svelte.d.ts +5 -0
  137. package/dist/components/ui/input-otp/input-otp-slot.svelte +31 -0
  138. package/dist/components/ui/input-otp/input-otp-slot.svelte.d.ts +4 -0
  139. package/dist/components/ui/input-otp/input-otp.svelte +23 -0
  140. package/dist/components/ui/input-otp/input-otp.svelte.d.ts +4 -0
  141. package/dist/components/ui/language-switcher/index.d.ts +1 -1
  142. package/dist/components/ui/light-switch/light-switch.svelte +2 -2
  143. package/dist/components/ui/light-switch/light-switch.svelte.d.ts +1 -1
  144. package/dist/components/ui/phone-input/country-selector.svelte +101 -0
  145. package/dist/components/ui/phone-input/country-selector.svelte.d.ts +13 -0
  146. package/dist/components/ui/phone-input/flag.svelte +21 -0
  147. package/dist/components/ui/phone-input/flag.svelte.d.ts +7 -0
  148. package/dist/components/ui/phone-input/flags.d.ts +2 -0
  149. package/dist/components/ui/phone-input/flags.js +10 -0
  150. package/dist/components/ui/phone-input/index.d.ts +3 -0
  151. package/dist/components/ui/phone-input/index.js +2 -0
  152. package/dist/components/ui/phone-input/phone-input.svelte +63 -0
  153. package/dist/components/ui/phone-input/phone-input.svelte.d.ts +7 -0
  154. package/dist/components/ui/phone-input/types.d.ts +16 -0
  155. package/dist/components/ui/phone-input/types.js +1 -0
  156. package/dist/components/ui/popover/index.d.ts +9 -0
  157. package/dist/components/ui/popover/index.js +11 -0
  158. package/dist/components/ui/popover/popover-close.svelte +7 -0
  159. package/dist/components/ui/popover/popover-close.svelte.d.ts +4 -0
  160. package/dist/components/ui/popover/popover-content.svelte +31 -0
  161. package/dist/components/ui/popover/popover-content.svelte.d.ts +10 -0
  162. package/dist/components/ui/popover/popover-description.svelte +20 -0
  163. package/dist/components/ui/popover/popover-description.svelte.d.ts +5 -0
  164. package/dist/components/ui/popover/popover-header.svelte +20 -0
  165. package/dist/components/ui/popover/popover-header.svelte.d.ts +5 -0
  166. package/dist/components/ui/popover/popover-portal.svelte +7 -0
  167. package/dist/components/ui/popover/popover-portal.svelte.d.ts +3 -0
  168. package/dist/components/ui/popover/popover-title.svelte +15 -0
  169. package/dist/components/ui/popover/popover-title.svelte.d.ts +5 -0
  170. package/dist/components/ui/popover/popover-trigger.svelte +17 -0
  171. package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
  172. package/dist/components/ui/popover/popover.svelte +7 -0
  173. package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
  174. package/dist/components/ui/scroll-area/index.d.ts +3 -0
  175. package/dist/components/ui/scroll-area/index.js +5 -0
  176. package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +30 -0
  177. package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
  178. package/dist/components/ui/scroll-area/scroll-area.svelte +43 -0
  179. package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +11 -0
  180. package/dist/components/ui/sidebar/sidebar-menu-button.svelte.d.ts +17 -17
  181. package/dist/components/ui/tabs/tabs-list.svelte.d.ts +8 -8
  182. package/dist/components/ui/textarea/index.d.ts +2 -0
  183. package/dist/components/ui/textarea/index.js +4 -0
  184. package/dist/components/ui/textarea/textarea.svelte +23 -0
  185. package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
  186. package/dist/globals.css +550 -20
  187. package/dist/i18n/config.d.ts +11 -0
  188. package/dist/i18n/config.js +16 -4
  189. package/dist/i18n/index.d.ts +13 -0
  190. package/dist/i18n/index.js +13 -0
  191. package/dist/i18n/langs/en.d.ts +76 -0
  192. package/dist/i18n/langs/en.js +75 -0
  193. package/dist/i18n/langs/pt.d.ts +76 -0
  194. package/dist/i18n/langs/pt.js +75 -0
  195. package/dist/i18n/translations.d.ts +74 -0
  196. package/dist/i18n/translations.js +4 -76
  197. package/dist/index.d.ts +28 -6
  198. package/dist/index.js +28 -6
  199. package/dist/types/index.d.ts +27 -0
  200. package/dist/types/index.js +1 -0
  201. package/package.json +9 -3
  202. package/dist/components/NegoDesignLayout.svelte +0 -23
  203. package/dist/components/NegoDesignLayout.svelte.d.ts +0 -8
  204. package/dist/config.d.ts +0 -7
  205. package/dist/config.js +0 -8
  206. /package/dist/components/pages/{login/01/data/page-props.js → forget-password/types.js} +0 -0
@@ -0,0 +1,72 @@
1
+ <script lang="ts">
2
+ import ResetPasswordCard from "./ResetPasswordCard.svelte";
3
+ import LeftHero from "../../../../core/panel/LeftHero.svelte";
4
+ import type { PageResetPasswordProps } from "../../types";
5
+ import { t } from "../../../../../i18n";
6
+
7
+ /**
8
+ * Variante 01 da página de redefinição de senha.
9
+ * Layout split: hero à esquerda (reutiliza do login), card de redefinição à direita.
10
+ */
11
+ let {
12
+ carousel,
13
+ varient,
14
+ title,
15
+ children,
16
+ otpLength,
17
+ onSubmit,
18
+ }: PageResetPasswordProps = $props();
19
+
20
+ const defaultCarousel = $derived([
21
+ {
22
+ buttonText: $t("label.next"),
23
+ title: $t("carousel.reset-password.slide1.title"),
24
+ description: $t("carousel.reset-password.slide1.description"),
25
+ },
26
+ {
27
+ buttonText: $t("label.next"),
28
+ title: $t("carousel.reset-password.slide2.title"),
29
+ description: $t("carousel.reset-password.slide2.description"),
30
+ },
31
+ {
32
+ buttonText: $t("label.next"),
33
+ title: $t("carousel.reset-password.slide3.title"),
34
+ description: $t("carousel.reset-password.slide3.description"),
35
+ },
36
+ ]);
37
+
38
+ const carouselItems = $derived(carousel ?? defaultCarousel);
39
+ </script>
40
+
41
+ <main class="h-screen w-screen flex items-center">
42
+ <svg width="0" height="0" class="absolute">
43
+ <defs>
44
+ <clipPath id="grid-curve-clip" clipPathUnits="objectBoundingBox">
45
+ <path d="M0.35,0 L1,0 C0.85,0.3 1,0.6 0.4,1 L1,1 Z" />
46
+ </clipPath>
47
+ </defs>
48
+ </svg>
49
+ <div class="hidden md:block md:w-8/12">
50
+ <LeftHero {title} varient={varient ?? "POINTER"} items={carouselItems} />
51
+ </div>
52
+ <div class="w-full md:px-0 md:w-4/12 border-gray-900">
53
+ {#if children}
54
+ {@render children()}
55
+ {:else}
56
+ <ResetPasswordCard {otpLength} {onSubmit} />
57
+ {/if}
58
+ </div>
59
+ </main>
60
+
61
+ <style>
62
+ :global(.grid-pattern) {
63
+ background-size: 40px 40px;
64
+ background-image: linear-gradient(
65
+ to right,
66
+ rgba(0, 0, 0, 0.1) 1px,
67
+ transparent 1px
68
+ ),
69
+ linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
70
+ clip-path: url(#grid-curve-clip);
71
+ }
72
+ </style>
@@ -0,0 +1,4 @@
1
+ import type { PageResetPasswordProps } from "../../types";
2
+ declare const PageResetPassword01: import("svelte").Component<PageResetPasswordProps, {}, "">;
3
+ type PageResetPassword01 = ReturnType<typeof PageResetPassword01>;
4
+ export default PageResetPassword01;
@@ -0,0 +1,56 @@
1
+ <script lang="ts">
2
+ import LanguageSwitcher from "../../../../ui/language-switcher/language-switcher.svelte";
3
+ import ButtonBack from "../../../../core/button/ButtonBack.svelte";
4
+ import type { Snippet } from "svelte";
5
+ import { LightSwitch } from "../../../../ui/light-switch";
6
+ import { t } from "../../../../../i18n";
7
+ import type { ResetPasswordRequestDto } from "../../types";
8
+ import FormResetPassword from "./FormResetPassword.svelte";
9
+ import TabUnderline from "../../../../core/tabs/ui/tab-underline.svelte";
10
+
11
+ /**
12
+ * Card de redefinição de senha.
13
+ * @property {number} otpLength - Quantidade de caixas do código OTP
14
+ * @property {(req: ResetPasswordRequestDto) => void} onSubmit - Callback ao submeter
15
+ */
16
+ type Props = {
17
+ otpLength?: number;
18
+ onSubmit?: (request: ResetPasswordRequestDto) => void;
19
+ children?: Snippet;
20
+ };
21
+
22
+ let { otpLength, onSubmit, children }: Props = $props();
23
+ </script>
24
+
25
+ <div class="flex-1 flex flex-col justify-between h-screen bg-gradient-right">
26
+ <nav class="flex justify-between p-5 md:bg-transparent">
27
+ <div>
28
+ <ButtonBack />
29
+ </div>
30
+ <div class="flex gap-2">
31
+ <LightSwitch />
32
+ <LanguageSwitcher />
33
+ </div>
34
+ </nav>
35
+
36
+ <div
37
+ class="p-5 h-full border-t-2 bg-background md:border-none rounded-tl-[35px] rounded-tr-[35px]"
38
+ >
39
+ <TabUnderline
40
+ items={[
41
+ {
42
+ item: {
43
+ label: $t("label.reset-password"),
44
+ value: "reset-password",
45
+ },
46
+ },
47
+ ]}
48
+ />
49
+
50
+ {#if children}
51
+ {@render children()}
52
+ {:else}
53
+ <FormResetPassword {otpLength} {onSubmit} />
54
+ {/if}
55
+ </div>
56
+ </div>
@@ -0,0 +1,15 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { ResetPasswordRequestDto } from "../../types";
3
+ /**
4
+ * Card de redefinição de senha.
5
+ * @property {number} otpLength - Quantidade de caixas do código OTP
6
+ * @property {(req: ResetPasswordRequestDto) => void} onSubmit - Callback ao submeter
7
+ */
8
+ type Props = {
9
+ otpLength?: number;
10
+ onSubmit?: (request: ResetPasswordRequestDto) => void;
11
+ children?: Snippet;
12
+ };
13
+ declare const ResetPasswordCard: import("svelte").Component<Props, {}, "">;
14
+ type ResetPasswordCard = ReturnType<typeof ResetPasswordCard>;
15
+ export default ResetPasswordCard;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import type { PageResetPasswordProps } from "./types";
3
+ import PageResetPassword01 from "./01/ui/PageResetPassword01.svelte";
4
+
5
+ /**
6
+ * Página de redefinição de senha.
7
+ * @property {"01"} varient - Variante do layout
8
+ */
9
+ type Props = {
10
+ varient?: "01";
11
+ };
12
+
13
+ let { ...props }: PageResetPasswordProps & Props = $props();
14
+ </script>
15
+
16
+ <PageResetPassword01 {...props} />
@@ -0,0 +1,12 @@
1
+ import type { PageResetPasswordProps } from "./types";
2
+ /**
3
+ * Página de redefinição de senha.
4
+ * @property {"01"} varient - Variante do layout
5
+ */
6
+ type Props = {
7
+ varient?: "01";
8
+ };
9
+ type $$ComponentProps = PageResetPasswordProps & Props;
10
+ declare const PageResetPassword: import("svelte").Component<$$ComponentProps, {}, "">;
11
+ type PageResetPassword = ReturnType<typeof PageResetPassword>;
12
+ export default PageResetPassword;
@@ -0,0 +1,15 @@
1
+ import type { CarouselItem, CarouselItemType } from "../../core/carousel/data/CarouselModel";
2
+ import type { Snippet } from "svelte";
3
+ export type ResetPasswordRequestDto = {
4
+ code: string;
5
+ password: string;
6
+ confirmPassword: string;
7
+ };
8
+ export type PageResetPasswordProps = {
9
+ carousel?: CarouselItem[];
10
+ varient?: CarouselItemType;
11
+ title?: string;
12
+ children?: Snippet;
13
+ otpLength?: number;
14
+ onSubmit?: (request: ResetPasswordRequestDto) => void;
15
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,32 +1,32 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
2
  export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
3
3
  variant: {
4
- default: string;
5
- secondary: string;
6
- destructive: string;
7
- outline: string;
8
- ghost: string;
9
- link: string;
4
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
5
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
6
+ destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
7
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/30";
8
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
9
+ link: "text-primary underline-offset-4 hover:underline";
10
10
  };
11
11
  }, undefined, "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", {
12
12
  variant: {
13
- default: string;
14
- secondary: string;
15
- destructive: string;
16
- outline: string;
17
- ghost: string;
18
- link: string;
13
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
14
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
15
+ destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
16
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/30";
17
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
18
+ link: "text-primary underline-offset-4 hover:underline";
19
19
  };
20
- }, undefined, import("tailwind-variants").TVReturnType<{
20
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
21
21
  variant: {
22
- default: string;
23
- secondary: string;
24
- destructive: string;
25
- outline: string;
26
- ghost: string;
27
- link: string;
22
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
23
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
24
+ destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
25
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/30";
26
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
27
+ link: "text-primary underline-offset-4 hover:underline";
28
28
  };
29
- }, undefined, "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", unknown, unknown, undefined>>;
29
+ }, undefined>>;
30
30
  export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
31
31
  import type { HTMLAnchorAttributes } from "svelte/elements";
32
32
  import { type WithElementRef } from "../../../utils.js";
@@ -1,38 +1,57 @@
1
1
  <script lang="ts" module>
2
- import { cn, type WithElementRef } from "../../../utils.js";
3
- import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
4
- import { type VariantProps, tv } from "tailwind-variants";
2
+ import { cn, type WithElementRef } from '../../../utils.js';
3
+ import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
4
+ import { type VariantProps, tv } from 'tailwind-variants';
5
5
 
6
6
  export const buttonVariants = tv({
7
- base: "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 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
7
+ base: "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 group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:ring-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
8
  variants: {
9
9
  variant: {
10
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
11
- outline: "border-border bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
12
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
13
- ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
14
- destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
15
- link: "text-primary underline-offset-4 hover:underline",
10
+ default: 'bg-primary text-primary-foreground hover:bg-primary/80',
11
+ outline:
12
+ 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs',
13
+ secondary:
14
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
15
+ ghost:
16
+ 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',
17
+ destructive:
18
+ 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',
19
+ link: 'text-primary underline-offset-4 hover:underline'
16
20
  },
17
21
  size: {
18
- default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
19
- xs: "h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
20
- sm: "h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
21
- lg: "h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
22
- icon: "size-9",
23
- "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
24
- "icon-sm": "size-8",
25
- "icon-lg": "size-10",
26
- },
22
+ default:
23
+ 'h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
24
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
25
+ sm: 'h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5',
26
+ lg: 'h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
27
+ icon: 'size-9',
28
+ 'icon-xs':
29
+ "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
30
+ 'icon-sm':
31
+ 'size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md',
32
+ 'icon-lg': 'size-10'
33
+ }
27
34
  },
28
35
  defaultVariants: {
29
- variant: "default",
30
- size: "default",
31
- },
36
+ variant: 'default',
37
+ size: 'default'
38
+ }
32
39
  });
33
40
 
34
- export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
35
- export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
41
+ export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
42
+ export type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;
43
+ export type Size = ButtonSize;
44
+
45
+ export const sizeMap = {
46
+ default: { icon: "icon" as ButtonSize },
47
+ xs: { icon: "icon-xs" as ButtonSize },
48
+ sm: { icon: "icon-sm" as ButtonSize },
49
+ lg: { icon: "icon-lg" as ButtonSize },
50
+ icon: { icon: "icon" as ButtonSize },
51
+ "icon-xs": { icon: "icon-xs" as ButtonSize },
52
+ "icon-sm": { icon: "icon-sm" as ButtonSize },
53
+ "icon-lg": { icon: "icon-lg" as ButtonSize },
54
+ } satisfies Record<ButtonSize, { icon: ButtonSize }>;
36
55
 
37
56
  export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
38
57
  WithElementRef<HTMLAnchorAttributes> & {
@@ -44,11 +63,11 @@
44
63
  <script lang="ts">
45
64
  let {
46
65
  class: className,
47
- variant = "default",
48
- size = "default",
66
+ variant = 'default',
67
+ size = 'default',
49
68
  ref = $bindable(null),
50
69
  href = undefined,
51
- type = "button",
70
+ type = 'button',
52
71
  disabled,
53
72
  children,
54
73
  ...restProps
@@ -62,7 +81,7 @@
62
81
  class={cn(buttonVariants({ variant, size }), className)}
63
82
  href={disabled ? undefined : href}
64
83
  aria-disabled={disabled}
65
- role={disabled ? "link" : undefined}
84
+ role={disabled ? 'link' : undefined}
66
85
  tabindex={disabled ? -1 : undefined}
67
86
  {...restProps}
68
87
  >
@@ -1,66 +1,93 @@
1
- import { type WithElementRef } from "../../../utils.js";
2
- import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
3
- import { type VariantProps } from "tailwind-variants";
1
+ import { type WithElementRef } from '../../../utils.js';
2
+ import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
3
+ import { type VariantProps } from 'tailwind-variants';
4
4
  export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
5
5
  variant: {
6
- default: string;
7
- outline: string;
8
- secondary: string;
9
- ghost: string;
10
- destructive: string;
11
- link: string;
6
+ default: "bg-primary text-primary-foreground hover:bg-primary/80";
7
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs";
8
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground";
9
+ ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground";
10
+ destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30";
11
+ link: "text-primary underline-offset-4 hover:underline";
12
12
  };
13
13
  size: {
14
- default: string;
15
- xs: string;
16
- sm: string;
17
- lg: string;
18
- icon: string;
19
- "icon-xs": string;
20
- "icon-sm": string;
21
- "icon-lg": string;
14
+ default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2";
15
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3";
16
+ sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5";
17
+ lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2";
18
+ icon: "size-9";
19
+ 'icon-xs': "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3";
20
+ 'icon-sm': "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md";
21
+ 'icon-lg': "size-10";
22
22
  };
23
- }, undefined, "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 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
23
+ }, undefined, "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 group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:ring-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
24
24
  variant: {
25
- default: string;
26
- outline: string;
27
- secondary: string;
28
- ghost: string;
29
- destructive: string;
30
- link: string;
25
+ default: "bg-primary text-primary-foreground hover:bg-primary/80";
26
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs";
27
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground";
28
+ ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground";
29
+ destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30";
30
+ link: "text-primary underline-offset-4 hover:underline";
31
31
  };
32
32
  size: {
33
- default: string;
34
- xs: string;
35
- sm: string;
36
- lg: string;
37
- icon: string;
38
- "icon-xs": string;
39
- "icon-sm": string;
40
- "icon-lg": string;
33
+ default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2";
34
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3";
35
+ sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5";
36
+ lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2";
37
+ icon: "size-9";
38
+ 'icon-xs': "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3";
39
+ 'icon-sm': "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md";
40
+ 'icon-lg': "size-10";
41
41
  };
42
- }, undefined, import("tailwind-variants").TVReturnType<{
42
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
43
43
  variant: {
44
- default: string;
45
- outline: string;
46
- secondary: string;
47
- ghost: string;
48
- destructive: string;
49
- link: string;
44
+ default: "bg-primary text-primary-foreground hover:bg-primary/80";
45
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs";
46
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground";
47
+ ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground";
48
+ destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30";
49
+ link: "text-primary underline-offset-4 hover:underline";
50
50
  };
51
51
  size: {
52
- default: string;
53
- xs: string;
54
- sm: string;
55
- lg: string;
56
- icon: string;
57
- "icon-xs": string;
58
- "icon-sm": string;
59
- "icon-lg": string;
52
+ default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2";
53
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3";
54
+ sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5";
55
+ lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2";
56
+ icon: "size-9";
57
+ 'icon-xs': "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3";
58
+ 'icon-sm': "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md";
59
+ 'icon-lg': "size-10";
60
60
  };
61
- }, undefined, "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 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
62
- export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
63
- export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
61
+ }, undefined>>;
62
+ export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
63
+ export type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;
64
+ export type Size = ButtonSize;
65
+ export declare const sizeMap: {
66
+ default: {
67
+ icon: ButtonSize;
68
+ };
69
+ xs: {
70
+ icon: ButtonSize;
71
+ };
72
+ sm: {
73
+ icon: ButtonSize;
74
+ };
75
+ lg: {
76
+ icon: ButtonSize;
77
+ };
78
+ icon: {
79
+ icon: ButtonSize;
80
+ };
81
+ "icon-xs": {
82
+ icon: ButtonSize;
83
+ };
84
+ "icon-sm": {
85
+ icon: ButtonSize;
86
+ };
87
+ "icon-lg": {
88
+ icon: ButtonSize;
89
+ };
90
+ };
64
91
  export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
65
92
  variant?: ButtonVariant;
66
93
  size?: ButtonSize;
@@ -1,2 +1,2 @@
1
- import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, buttonVariants } from "./button.svelte";
2
- export { Root, type ButtonProps as Props, Root as Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant, };
1
+ import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, buttonVariants } from './button.svelte';
2
+ export { Root, type ButtonProps as Props, Root as Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant };
@@ -1,4 +1,4 @@
1
- import Root, { buttonVariants, } from "./button.svelte";
1
+ import Root, { buttonVariants } from './button.svelte';
2
2
  export { Root,
3
3
  //
4
- Root as Button, buttonVariants, };
4
+ Root as Button, buttonVariants };
@@ -0,0 +1,42 @@
1
+ <script lang="ts">
2
+ import type { Command as CommandPrimitive, Dialog as DialogPrimitive } from 'bits-ui';
3
+ import type { Snippet } from 'svelte';
4
+ import Command from './command.svelte';
5
+ import * as Dialog from '../dialog/index.js';
6
+ import { cn, type WithoutChildrenOrChild } from '../../../utils.js';
7
+
8
+ let {
9
+ open = $bindable(false),
10
+ ref = $bindable(null),
11
+ value = $bindable(''),
12
+ title = 'Command Palette',
13
+ description = 'Search for a command to run...',
14
+ showCloseButton = false,
15
+ portalProps,
16
+ children,
17
+ class: className,
18
+ ...restProps
19
+ }: WithoutChildrenOrChild<DialogPrimitive.RootProps> &
20
+ WithoutChildrenOrChild<CommandPrimitive.RootProps> & {
21
+ portalProps?: DialogPrimitive.PortalProps;
22
+ children: Snippet;
23
+ title?: string;
24
+ description?: string;
25
+ showCloseButton?: boolean;
26
+ class?: string;
27
+ } = $props();
28
+ </script>
29
+
30
+ <Dialog.Root bind:open {...restProps}>
31
+ <Dialog.Header class="sr-only">
32
+ <Dialog.Title>{title}</Dialog.Title>
33
+ <Dialog.Description>{description}</Dialog.Description>
34
+ </Dialog.Header>
35
+ <Dialog.Content
36
+ class={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}
37
+ {showCloseButton}
38
+ {portalProps}
39
+ >
40
+ <Command {...restProps} bind:value bind:ref {children} />
41
+ </Dialog.Content>
42
+ </Dialog.Root>
@@ -0,0 +1,14 @@
1
+ import type { Command as CommandPrimitive, Dialog as DialogPrimitive } from 'bits-ui';
2
+ import type { Snippet } from 'svelte';
3
+ import { type WithoutChildrenOrChild } from '../../../utils.js';
4
+ type $$ComponentProps = WithoutChildrenOrChild<DialogPrimitive.RootProps> & WithoutChildrenOrChild<CommandPrimitive.RootProps> & {
5
+ portalProps?: DialogPrimitive.PortalProps;
6
+ children: Snippet;
7
+ title?: string;
8
+ description?: string;
9
+ showCloseButton?: boolean;
10
+ class?: string;
11
+ };
12
+ declare const CommandDialog: import("svelte").Component<$$ComponentProps, {}, "value" | "ref" | "open">;
13
+ type CommandDialog = ReturnType<typeof CommandDialog>;
14
+ export default CommandDialog;
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ import { Command as CommandPrimitive } from 'bits-ui';
3
+ import { cn } from '../../../utils.js';
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ ...restProps
9
+ }: CommandPrimitive.EmptyProps = $props();
10
+ </script>
11
+
12
+ <CommandPrimitive.Empty
13
+ bind:ref
14
+ data-slot="command-empty"
15
+ class={cn('py-6 text-center text-sm', className)}
16
+ {...restProps}
17
+ />
@@ -0,0 +1,4 @@
1
+ import { Command as CommandPrimitive } from 'bits-ui';
2
+ declare const CommandEmpty: import("svelte").Component<CommandPrimitive.EmptyProps, {}, "ref">;
3
+ type CommandEmpty = ReturnType<typeof CommandEmpty>;
4
+ export default CommandEmpty;