@kayord/ui 1.1.16 → 1.1.18

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 (101) hide show
  1. package/dist/components/ui/button/button.svelte +2 -0
  2. package/dist/components/ui/button/button.svelte.d.ts +6 -0
  3. package/dist/components/ui/button-group/button-group-separator.svelte +14 -0
  4. package/dist/components/ui/button-group/button-group-separator.svelte.d.ts +13 -0
  5. package/dist/components/ui/button-group/button-group-text.svelte +33 -0
  6. package/dist/components/ui/button-group/button-group-text.svelte.d.ts +10 -0
  7. package/dist/components/ui/button-group/button-group.svelte +44 -0
  8. package/dist/components/ui/button-group/button-group.svelte.d.ts +25 -0
  9. package/dist/components/ui/button-group/index.d.ts +4 -0
  10. package/dist/components/ui/button-group/index.js +6 -0
  11. package/dist/components/ui/empty/empty-content.svelte +14 -0
  12. package/dist/components/ui/empty/empty-content.svelte.d.ts +4 -0
  13. package/dist/components/ui/empty/empty-description.svelte +17 -0
  14. package/dist/components/ui/empty/empty-description.svelte.d.ts +4 -0
  15. package/dist/components/ui/empty/empty-header.svelte +14 -0
  16. package/dist/components/ui/empty/empty-header.svelte.d.ts +4 -0
  17. package/dist/components/ui/empty/empty-media.svelte +39 -0
  18. package/dist/components/ui/empty/empty-media.svelte.d.ts +25 -0
  19. package/dist/components/ui/empty/empty-title.svelte +10 -0
  20. package/dist/components/ui/empty/empty-title.svelte.d.ts +4 -0
  21. package/dist/components/ui/empty/empty.svelte +17 -0
  22. package/dist/components/ui/empty/empty.svelte.d.ts +4 -0
  23. package/dist/components/ui/empty/index.d.ts +7 -0
  24. package/dist/components/ui/empty/index.js +9 -0
  25. package/dist/components/ui/field/field-content.svelte +14 -0
  26. package/dist/components/ui/field/field-content.svelte.d.ts +4 -0
  27. package/dist/components/ui/field/field-description.svelte +19 -0
  28. package/dist/components/ui/field/field-description.svelte.d.ts +4 -0
  29. package/dist/components/ui/field/field-error.svelte +56 -0
  30. package/dist/components/ui/field/field-error.svelte.d.ts +11 -0
  31. package/dist/components/ui/field/field-group.svelte +17 -0
  32. package/dist/components/ui/field/field-group.svelte.d.ts +4 -0
  33. package/dist/components/ui/field/field-label.svelte +21 -0
  34. package/dist/components/ui/field/field-label.svelte.d.ts +10 -0
  35. package/dist/components/ui/field/field-legend.svelte +22 -0
  36. package/dist/components/ui/field/field-legend.svelte.d.ts +7 -0
  37. package/dist/components/ui/field/field-separator.svelte +33 -0
  38. package/dist/components/ui/field/field-separator.svelte.d.ts +8 -0
  39. package/dist/components/ui/field/field-set.svelte +18 -0
  40. package/dist/components/ui/field/field-set.svelte.d.ts +4 -0
  41. package/dist/components/ui/field/field-title.svelte +17 -0
  42. package/dist/components/ui/field/field-title.svelte.d.ts +4 -0
  43. package/dist/components/ui/field/field.svelte +51 -0
  44. package/dist/components/ui/field/field.svelte.d.ts +28 -0
  45. package/dist/components/ui/field/index.d.ts +11 -0
  46. package/dist/components/ui/field/index.js +13 -0
  47. package/dist/components/ui/form/form-button.svelte +3 -3
  48. package/dist/components/ui/form/form-button.svelte.d.ts +2 -2
  49. package/dist/components/ui/index.d.ts +7 -0
  50. package/dist/components/ui/index.js +7 -0
  51. package/dist/components/ui/input/input.svelte +3 -2
  52. package/dist/components/ui/input-group/index.d.ts +7 -0
  53. package/dist/components/ui/input-group/index.js +9 -0
  54. package/dist/components/ui/input-group/input-group-addon.svelte +50 -0
  55. package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +31 -0
  56. package/dist/components/ui/input-group/input-group-button.svelte +41 -0
  57. package/dist/components/ui/input-group/input-group-button.svelte.d.ts +32 -0
  58. package/dist/components/ui/input-group/input-group-input.svelte +16 -0
  59. package/dist/components/ui/input-group/input-group-input.svelte.d.ts +11 -0
  60. package/dist/components/ui/input-group/input-group-text.svelte +16 -0
  61. package/dist/components/ui/input-group/input-group-text.svelte.d.ts +4 -0
  62. package/dist/components/ui/input-group/input-group-textarea.svelte +16 -0
  63. package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +3 -0
  64. package/dist/components/ui/input-group/input-group.svelte +32 -0
  65. package/dist/components/ui/input-group/input-group.svelte.d.ts +4 -0
  66. package/dist/components/ui/input-otp/input-otp-slot.svelte +1 -1
  67. package/dist/components/ui/item/index.d.ts +11 -0
  68. package/dist/components/ui/item/index.js +13 -0
  69. package/dist/components/ui/item/item-actions.svelte +10 -0
  70. package/dist/components/ui/item/item-actions.svelte.d.ts +4 -0
  71. package/dist/components/ui/item/item-content.svelte +14 -0
  72. package/dist/components/ui/item/item-content.svelte.d.ts +4 -0
  73. package/dist/components/ui/item/item-description.svelte +18 -0
  74. package/dist/components/ui/item/item-description.svelte.d.ts +4 -0
  75. package/dist/components/ui/item/item-footer.svelte +10 -0
  76. package/dist/components/ui/item/item-footer.svelte.d.ts +4 -0
  77. package/dist/components/ui/item/item-group.svelte +10 -0
  78. package/dist/components/ui/item/item-group.svelte.d.ts +4 -0
  79. package/dist/components/ui/item/item-header.svelte +10 -0
  80. package/dist/components/ui/item/item-header.svelte.d.ts +4 -0
  81. package/dist/components/ui/item/item-media.svelte +35 -0
  82. package/dist/components/ui/item/item-media.svelte.d.ts +28 -0
  83. package/dist/components/ui/item/item-separator.svelte +9 -0
  84. package/dist/components/ui/item/item-separator.svelte.d.ts +13 -0
  85. package/dist/components/ui/item/item-title.svelte +14 -0
  86. package/dist/components/ui/item/item-title.svelte.d.ts +4 -0
  87. package/dist/components/ui/item/item.svelte +61 -0
  88. package/dist/components/ui/item/item.svelte.d.ts +46 -0
  89. package/dist/components/ui/kbd/index.d.ts +3 -0
  90. package/dist/components/ui/kbd/index.js +5 -0
  91. package/dist/components/ui/kbd/kbd-group.svelte +10 -0
  92. package/dist/components/ui/kbd/kbd-group.svelte.d.ts +4 -0
  93. package/dist/components/ui/kbd/kbd.svelte +19 -0
  94. package/dist/components/ui/kbd/kbd.svelte.d.ts +4 -0
  95. package/dist/components/ui/separator/separator.svelte +7 -2
  96. package/dist/components/ui/spinner/index.d.ts +1 -0
  97. package/dist/components/ui/spinner/index.js +1 -0
  98. package/dist/components/ui/spinner/spinner.svelte +11 -0
  99. package/dist/components/ui/spinner/spinner.svelte.d.ts +3 -0
  100. package/dist/components/ui/textarea/textarea.svelte +2 -1
  101. package/package.json +16 -16
@@ -0,0 +1,18 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import type { HTMLFieldsetAttributes } from "svelte/elements";
4
+
5
+ let { class: className, children, ...restProps }: HTMLFieldsetAttributes = $props();
6
+ </script>
7
+
8
+ <fieldset
9
+ data-slot="field-set"
10
+ class={cn(
11
+ "flex flex-col gap-6",
12
+ "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
13
+ className
14
+ )}
15
+ {...restProps}
16
+ >
17
+ {@render children?.()}
18
+ </fieldset>
@@ -0,0 +1,4 @@
1
+ import type { HTMLFieldsetAttributes } from "svelte/elements";
2
+ declare const FieldSet: import("svelte").Component<HTMLFieldsetAttributes, {}, "">;
3
+ type FieldSet = ReturnType<typeof FieldSet>;
4
+ export default FieldSet;
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+
5
+ let { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
6
+ </script>
7
+
8
+ <div
9
+ data-slot="field-title"
10
+ class={cn(
11
+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
12
+ className
13
+ )}
14
+ {...restProps}
15
+ >
16
+ {@render children?.()}
17
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const FieldTitle: import("svelte").Component<HTMLAttributes<HTMLDivElement>, {}, "">;
3
+ type FieldTitle = ReturnType<typeof FieldTitle>;
4
+ export default FieldTitle;
@@ -0,0 +1,51 @@
1
+ <script lang="ts" module>
2
+ import { tv, type VariantProps } from "tailwind-variants";
3
+
4
+ const fieldVariants = tv({
5
+ base: "group/field data-[invalid=true]:text-destructive flex w-full gap-3",
6
+ variants: {
7
+ orientation: {
8
+ vertical: "flex-col [&>*]:w-full [&>.sr-only]:w-auto",
9
+ horizontal: [
10
+ "flex-row items-center",
11
+ "[&>[data-slot=field-label]]:flex-auto",
12
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start",
13
+ ],
14
+ responsive: [
15
+ "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
16
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
17
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
18
+ ],
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ orientation: "vertical",
23
+ },
24
+ });
25
+
26
+ export type FieldOrientation = VariantProps<typeof fieldVariants>["orientation"];
27
+ </script>
28
+
29
+ <script lang="ts">
30
+ import { cn } from "../../../utils.js";
31
+ import type { HTMLAttributes } from "svelte/elements";
32
+
33
+ let {
34
+ class: className,
35
+ orientation = "vertical",
36
+ children,
37
+ ...restProps
38
+ }: HTMLAttributes<HTMLDivElement> & {
39
+ orientation?: FieldOrientation;
40
+ } = $props();
41
+ </script>
42
+
43
+ <div
44
+ role="group"
45
+ data-slot="field"
46
+ data-orientation={orientation}
47
+ class={cn(fieldVariants({ orientation }), className)}
48
+ {...restProps}
49
+ >
50
+ {@render children?.()}
51
+ </div>
@@ -0,0 +1,28 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ declare const fieldVariants: import("tailwind-variants").TVReturnType<{
3
+ orientation: {
4
+ vertical: string;
5
+ horizontal: string[];
6
+ responsive: string[];
7
+ };
8
+ }, undefined, "group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
9
+ orientation: {
10
+ vertical: string;
11
+ horizontal: string[];
12
+ responsive: string[];
13
+ };
14
+ }, undefined, import("tailwind-variants").TVReturnType<{
15
+ orientation: {
16
+ vertical: string;
17
+ horizontal: string[];
18
+ responsive: string[];
19
+ };
20
+ }, undefined, "group/field data-[invalid=true]:text-destructive flex w-full gap-3", unknown, unknown, undefined>>;
21
+ export type FieldOrientation = VariantProps<typeof fieldVariants>["orientation"];
22
+ import type { HTMLAttributes } from "svelte/elements";
23
+ type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
24
+ orientation?: FieldOrientation;
25
+ };
26
+ declare const Field: import("svelte").Component<$$ComponentProps, {}, "">;
27
+ type Field = ReturnType<typeof Field>;
28
+ export default Field;
@@ -0,0 +1,11 @@
1
+ import Field from "./field.svelte";
2
+ import Set from "./field-set.svelte";
3
+ import Legend from "./field-legend.svelte";
4
+ import Group from "./field-group.svelte";
5
+ import Content from "./field-content.svelte";
6
+ import Label from "./field-label.svelte";
7
+ import Title from "./field-title.svelte";
8
+ import Description from "./field-description.svelte";
9
+ import Separator from "./field-separator.svelte";
10
+ import Error from "./field-error.svelte";
11
+ export { Field, Set, Legend, Group, Content, Label, Title, Description, Separator, Error, Set as FieldSet, Legend as FieldLegend, Group as FieldGroup, Content as FieldContent, Label as FieldLabel, Title as FieldTitle, Description as FieldDescription, Separator as FieldSeparator, Error as FieldError, };
@@ -0,0 +1,13 @@
1
+ import Field from "./field.svelte";
2
+ import Set from "./field-set.svelte";
3
+ import Legend from "./field-legend.svelte";
4
+ import Group from "./field-group.svelte";
5
+ import Content from "./field-content.svelte";
6
+ import Label from "./field-label.svelte";
7
+ import Title from "./field-title.svelte";
8
+ import Description from "./field-description.svelte";
9
+ import Separator from "./field-separator.svelte";
10
+ import Error from "./field-error.svelte";
11
+ export { Field, Set, Legend, Group, Content, Label, Title, Description, Separator, Error,
12
+ //
13
+ Set as FieldSet, Legend as FieldLegend, Group as FieldGroup, Content as FieldContent, Label as FieldLabel, Title as FieldTitle, Description as FieldDescription, Separator as FieldSeparator, Error as FieldError, };
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
- import * as Button from "../button/index.js";
2
+ import { Button, type ButtonProps } from "../button/index.js";
3
3
 
4
- let { ref = $bindable(null), ...restProps }: Button.Props = $props();
4
+ let { ref = $bindable(null), ...restProps }: ButtonProps = $props();
5
5
  </script>
6
6
 
7
- <Button.Root bind:ref type="submit" {...restProps} />
7
+ <Button bind:ref type="submit" {...restProps} />
@@ -1,4 +1,4 @@
1
- import * as Button from "../button/index.js";
2
- declare const FormButton: import("svelte").Component<Button.Props, {}, "ref">;
1
+ import { type ButtonProps } from "../button/index.js";
2
+ declare const FormButton: import("svelte").Component<ButtonProps, {}, "ref">;
3
3
  type FormButton = ReturnType<typeof FormButton>;
4
4
  export default FormButton;
@@ -5,6 +5,7 @@ export { AspectRatio } from "./aspect-ratio/index.js";
5
5
  export * as Avatar from "./avatar/index.js";
6
6
  export { Badge, badgeVariants, type BadgeVariant } from "./badge/index.js";
7
7
  export * as Breadcrumb from "./breadcrumb/index.js";
8
+ export * as ButtonGroup from "./button-group/index.js";
8
9
  export { Button, type ButtonProps, buttonVariants } from "./button/index.js";
9
10
  export { Calendar } from "./calendar/index.js";
10
11
  export * as Card from "./card/index.js";
@@ -18,10 +19,15 @@ export { FlexRender, renderComponent, renderSnippet, createSvelteTable, createSv
18
19
  export * as Dialog from "./dialog/index.js";
19
20
  export * as Drawer from "./drawer/index.js";
20
21
  export * as DropdownMenu from "./dropdown-menu/index.js";
22
+ export * as Empty from "./empty/index.js";
23
+ export * as Field from "./field/index.js";
21
24
  export * as Form from "./form/index.js";
22
25
  export * as HoverCard from "./hover-card/index.js";
26
+ export * as InputGroup from "./input-group/index.js";
23
27
  export { Input } from "./input/index.js";
24
28
  export * as InputOTP from "./input-otp/index.js";
29
+ export * as Item from "./item/index.js";
30
+ export * as Kbd from "./kbd/index.js";
25
31
  export { Label } from "./label/index.js";
26
32
  export * as Menubar from "./menubar/index.js";
27
33
  export * as Pagination from "./pagination/index.js";
@@ -40,6 +46,7 @@ export { Slider } from "./slider/index.js";
40
46
  export { Toaster } from "./sonner/index.js";
41
47
  export { toast } from "svelte-sonner";
42
48
  export { Switch } from "./switch/index.js";
49
+ export { Spinner } from "./spinner/index.js";
43
50
  export * as Table from "./table/index.js";
44
51
  export * as Tabs from "./tabs/index.js";
45
52
  export { Textarea } from "./textarea/index.js";
@@ -5,6 +5,7 @@ export { AspectRatio } from "./aspect-ratio/index.js";
5
5
  export * as Avatar from "./avatar/index.js";
6
6
  export { Badge, badgeVariants } from "./badge/index.js";
7
7
  export * as Breadcrumb from "./breadcrumb/index.js";
8
+ export * as ButtonGroup from "./button-group/index.js";
8
9
  export { Button, buttonVariants } from "./button/index.js";
9
10
  export { Calendar } from "./calendar/index.js";
10
11
  export * as Card from "./card/index.js";
@@ -18,10 +19,15 @@ export { FlexRender, renderComponent, renderSnippet, createSvelteTable, createSv
18
19
  export * as Dialog from "./dialog/index.js";
19
20
  export * as Drawer from "./drawer/index.js";
20
21
  export * as DropdownMenu from "./dropdown-menu/index.js";
22
+ export * as Empty from "./empty/index.js";
23
+ export * as Field from "./field/index.js";
21
24
  export * as Form from "./form/index.js";
22
25
  export * as HoverCard from "./hover-card/index.js";
26
+ export * as InputGroup from "./input-group/index.js";
23
27
  export { Input } from "./input/index.js";
24
28
  export * as InputOTP from "./input-otp/index.js";
29
+ export * as Item from "./item/index.js";
30
+ export * as Kbd from "./kbd/index.js";
25
31
  export { Label } from "./label/index.js";
26
32
  export * as Menubar from "./menubar/index.js";
27
33
  export * as Pagination from "./pagination/index.js";
@@ -40,6 +46,7 @@ export { Slider } from "./slider/index.js";
40
46
  export { Toaster } from "./sonner/index.js";
41
47
  export { toast } from "svelte-sonner";
42
48
  export { Switch } from "./switch/index.js";
49
+ export { Spinner } from "./spinner/index.js";
43
50
  export * as Table from "./table/index.js";
44
51
  export * as Tabs from "./tabs/index.js";
45
52
  export { Textarea } from "./textarea/index.js";
@@ -14,6 +14,7 @@
14
14
  type,
15
15
  files = $bindable(),
16
16
  class: className,
17
+ "data-slot": dataSlot = "input",
17
18
  ...restProps
18
19
  }: Props = $props();
19
20
  </script>
@@ -21,7 +22,7 @@
21
22
  {#if type === "file"}
22
23
  <input
23
24
  bind:this={ref}
24
- data-slot="input"
25
+ data-slot={dataSlot}
25
26
  class={cn(
26
27
  "selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
27
28
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
@@ -36,7 +37,7 @@
36
37
  {:else}
37
38
  <input
38
39
  bind:this={ref}
39
- data-slot="input"
40
+ data-slot={dataSlot}
40
41
  class={cn(
41
42
  "border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
42
43
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
@@ -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,50 @@
1
+ <script lang="ts" module>
2
+ import { tv, type VariantProps } from "tailwind-variants";
3
+ const inputGroupAddonVariants = tv({
4
+ base: "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium 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-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
8
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
9
+ "block-start":
10
+ "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
11
+ "block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5",
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ align: "inline-start",
16
+ },
17
+ });
18
+
19
+ export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>["align"];
20
+ </script>
21
+
22
+ <script lang="ts">
23
+ import { cn } from "../../../utils.js";
24
+ import type { HTMLAttributes } from "svelte/elements";
25
+
26
+ let {
27
+ class: className,
28
+ children,
29
+ align = "inline-start",
30
+ ...restProps
31
+ }: HTMLAttributes<HTMLDivElement> & {
32
+ align?: InputGroupAddonAlign;
33
+ } = $props();
34
+ </script>
35
+
36
+ <div
37
+ role="group"
38
+ data-slot="input-group-addon"
39
+ data-align={align}
40
+ class={cn(inputGroupAddonVariants({ align }), className)}
41
+ onclick={(e) => {
42
+ if ((e.target as HTMLElement).closest("button")) {
43
+ return;
44
+ }
45
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
46
+ }}
47
+ {...restProps}
48
+ >
49
+ {@render children?.()}
50
+ </div>
@@ -0,0 +1,31 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ declare const inputGroupAddonVariants: import("tailwind-variants").TVReturnType<{
3
+ align: {
4
+ "inline-start": string;
5
+ "inline-end": string;
6
+ "block-start": string;
7
+ "block-end": string;
8
+ };
9
+ }, undefined, "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium 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": string;
12
+ "inline-end": string;
13
+ "block-start": string;
14
+ "block-end": string;
15
+ };
16
+ }, undefined, import("tailwind-variants").TVReturnType<{
17
+ align: {
18
+ "inline-start": string;
19
+ "inline-end": string;
20
+ "block-start": string;
21
+ "block-end": string;
22
+ };
23
+ }, undefined, "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", unknown, unknown, undefined>>;
24
+ export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>["align"];
25
+ import type { HTMLAttributes } from "svelte/elements";
26
+ type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
27
+ align?: InputGroupAddonAlign;
28
+ };
29
+ declare const InputGroupAddon: import("svelte").Component<$$ComponentProps, {}, "">;
30
+ type InputGroupAddon = ReturnType<typeof InputGroupAddon>;
31
+ export default InputGroupAddon;
@@ -0,0 +1,41 @@
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-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
9
+ sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
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
+ class: className,
29
+ children,
30
+ type = "button",
31
+ variant = "ghost",
32
+ size = "xs",
33
+ ...restProps
34
+ }: Omit<ComponentProps<typeof Button>, "href" | "size"> & {
35
+ size?: InputGroupButtonSize;
36
+ } = $props();
37
+ </script>
38
+
39
+ <Button {type} data-size={size} {variant} class={cn(inputGroupButtonVariants({ size }), className)} {...restProps}>
40
+ {@render children?.()}
41
+ </Button>
@@ -0,0 +1,32 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ declare const inputGroupButtonVariants: import("tailwind-variants").TVReturnType<{
3
+ size: {
4
+ xs: string;
5
+ sm: string;
6
+ "icon-xs": string;
7
+ "icon-sm": string;
8
+ };
9
+ }, undefined, "flex items-center gap-2 text-sm shadow-none", {
10
+ size: {
11
+ xs: string;
12
+ sm: string;
13
+ "icon-xs": string;
14
+ "icon-sm": string;
15
+ };
16
+ }, undefined, import("tailwind-variants").TVReturnType<{
17
+ size: {
18
+ xs: string;
19
+ sm: string;
20
+ "icon-xs": string;
21
+ "icon-sm": string;
22
+ };
23
+ }, undefined, "flex items-center gap-2 text-sm shadow-none", unknown, unknown, 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, {}, "">;
31
+ type InputGroupButton = ReturnType<typeof InputGroupButton>;
32
+ export default InputGroupButton;
@@ -0,0 +1,16 @@
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 { class: className, ...props }: ComponentProps<typeof Input> = $props();
7
+ </script>
8
+
9
+ <Input
10
+ data-slot="input-group-control"
11
+ class={cn(
12
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
13
+ className
14
+ )}
15
+ {...props}
16
+ />
@@ -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" | "hidden" | "color" | "search" | "button" | "checkbox" | "radio" | (string & {}) | "text" | "tel" | "url" | "email" | "date" | "time" | "submit" | "reset" | "month" | "week" | "datetime-local" | "image" | "password" | "range";
6
+ files?: undefined;
7
+ })) & {
8
+ ref?: HTMLElement | null | undefined;
9
+ }, {}, "">;
10
+ type InputGroupInput = ReturnType<typeof InputGroupInput>;
11
+ export default InputGroupInput;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+
5
+ let { class: className, children, ...restProps }: HTMLAttributes<HTMLSpanElement> = $props();
6
+ </script>
7
+
8
+ <span
9
+ class={cn(
10
+ "text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
11
+ className
12
+ )}
13
+ {...restProps}
14
+ >
15
+ {@render children?.()}
16
+ </span>
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const InputGroupText: import("svelte").Component<HTMLAttributes<HTMLSpanElement>, {}, "">;
3
+ type InputGroupText = ReturnType<typeof InputGroupText>;
4
+ export default InputGroupText;
@@ -0,0 +1,16 @@
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 { class: className, ...props }: ComponentProps<typeof Textarea> = $props();
7
+ </script>
8
+
9
+ <Textarea
10
+ data-slot="input-group-control"
11
+ class={cn(
12
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
13
+ className
14
+ )}
15
+ {...props}
16
+ />
@@ -0,0 +1,3 @@
1
+ declare const InputGroupTextarea: import("svelte").Component<Omit<import("../../../utils.js").WithElementRef<import("svelte/elements").HTMLTextareaAttributes>, "children">, {}, "">;
2
+ type InputGroupTextarea = ReturnType<typeof InputGroupTextarea>;
3
+ export default InputGroupTextarea;
@@ -0,0 +1,32 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+
5
+ let { class: className, children, ...props }: HTMLAttributes<HTMLDivElement> = $props();
6
+ </script>
7
+
8
+ <div
9
+ data-slot="input-group"
10
+ role="group"
11
+ class={cn(
12
+ "group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
13
+ "h-9 has-[>textarea]:h-auto",
14
+
15
+ // Variants based on alignment.
16
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
17
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
18
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
19
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
20
+
21
+ // Focus state.
22
+ "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
23
+
24
+ // Error state.
25
+ "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",
26
+
27
+ className
28
+ )}
29
+ {...props}
30
+ >
31
+ {@render children?.()}
32
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const InputGroup: import("svelte").Component<HTMLAttributes<HTMLDivElement>, {}, "">;
3
+ type InputGroup = ReturnType<typeof InputGroup>;
4
+ export default InputGroup;
@@ -10,7 +10,7 @@
10
10
  bind:ref
11
11
  data-slot="input-otp-slot"
12
12
  class={cn(
13
- "border-input aria-invalid:border-destructive dark:bg-input/30 relative flex size-10 items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md",
13
+ "border-input aria-invalid:border-destructive dark:bg-input/30 relative flex size-9 items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md",
14
14
  cell.isActive &&
15
15
  "border-ring ring-ring/50 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 aria-invalid:ring-destructive/20 ring-offset-background z-10 ring-[3px]",
16
16
  className
@@ -0,0 +1,11 @@
1
+ import Root from "./item.svelte";
2
+ import Group from "./item-group.svelte";
3
+ import Separator from "./item-separator.svelte";
4
+ import Header from "./item-header.svelte";
5
+ import Footer from "./item-footer.svelte";
6
+ import Content from "./item-content.svelte";
7
+ import Title from "./item-title.svelte";
8
+ import Description from "./item-description.svelte";
9
+ import Actions from "./item-actions.svelte";
10
+ import Media from "./item-media.svelte";
11
+ export { Root, Group, Separator, Header, Footer, Content, Title, Description, Actions, Media, Root as Item, Group as ItemGroup, Separator as ItemSeparator, Header as ItemHeader, Footer as ItemFooter, Content as ItemContent, Title as ItemTitle, Description as ItemDescription, Actions as ItemActions, Media as ItemMedia, };
@@ -0,0 +1,13 @@
1
+ import Root from "./item.svelte";
2
+ import Group from "./item-group.svelte";
3
+ import Separator from "./item-separator.svelte";
4
+ import Header from "./item-header.svelte";
5
+ import Footer from "./item-footer.svelte";
6
+ import Content from "./item-content.svelte";
7
+ import Title from "./item-title.svelte";
8
+ import Description from "./item-description.svelte";
9
+ import Actions from "./item-actions.svelte";
10
+ import Media from "./item-media.svelte";
11
+ export { Root, Group, Separator, Header, Footer, Content, Title, Description, Actions, Media,
12
+ //
13
+ Root as Item, Group as ItemGroup, Separator as ItemSeparator, Header as ItemHeader, Footer as ItemFooter, Content as ItemContent, Title as ItemTitle, Description as ItemDescription, Actions as ItemActions, Media as ItemMedia, };
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+
5
+ let { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
6
+ </script>
7
+
8
+ <div data-slot="item-actions" class={cn("flex items-center gap-2", className)} {...restProps}>
9
+ {@render children?.()}
10
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const ItemActions: import("svelte").Component<HTMLAttributes<HTMLDivElement>, {}, "">;
3
+ type ItemActions = ReturnType<typeof ItemActions>;
4
+ export default ItemActions;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+
5
+ let { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
6
+ </script>
7
+
8
+ <div
9
+ data-slot="item-content"
10
+ class={cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className)}
11
+ {...restProps}
12
+ >
13
+ {@render children?.()}
14
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const ItemContent: import("svelte").Component<HTMLAttributes<HTMLDivElement>, {}, "">;
3
+ type ItemContent = ReturnType<typeof ItemContent>;
4
+ export default ItemContent;