@nswds/ui 5.4.0 → 5.5.1

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 (79) hide show
  1. package/dist/components/accordion.d.ts +9 -0
  2. package/dist/components/accordion.js +80 -0
  3. package/dist/components/accordion.js.map +1 -0
  4. package/dist/components/avatar.d.ts +13 -0
  5. package/dist/components/avatar.js +92 -0
  6. package/dist/components/avatar.js.map +1 -0
  7. package/dist/components/badge.d.ts +1 -1
  8. package/dist/components/breadcrumb.d.ts +12 -0
  9. package/dist/components/breadcrumb.js +91 -0
  10. package/dist/components/breadcrumb.js.map +1 -0
  11. package/dist/components/button-group.d.ts +15 -0
  12. package/dist/components/button-group.js +77 -0
  13. package/dist/components/button-group.js.map +1 -0
  14. package/dist/components/button.d.ts +2 -2
  15. package/dist/components/carousel.d.ts +34 -0
  16. package/dist/components/carousel.js +186 -0
  17. package/dist/components/carousel.js.map +1 -0
  18. package/dist/components/checkbox.d.ts +6 -0
  19. package/dist/components/checkbox.js +31 -0
  20. package/dist/components/checkbox.js.map +1 -0
  21. package/dist/components/combobox.d.ts +26 -0
  22. package/dist/components/combobox.js +242 -0
  23. package/dist/components/combobox.js.map +1 -0
  24. package/dist/components/direction.d.ts +1 -0
  25. package/dist/components/direction.js +4 -0
  26. package/dist/components/direction.js.map +1 -0
  27. package/dist/components/header.d.ts +1 -1
  28. package/dist/components/input-group.d.ts +23 -0
  29. package/dist/components/input-group.js +136 -0
  30. package/dist/components/input-group.js.map +1 -0
  31. package/dist/components/input-otp.d.ts +13 -0
  32. package/dist/components/input-otp.js +79 -0
  33. package/dist/components/input-otp.js.map +1 -0
  34. package/dist/components/kbd.d.ts +6 -0
  35. package/dist/components/kbd.js +30 -0
  36. package/dist/components/kbd.js.map +1 -0
  37. package/dist/components/link.d.ts +1 -1
  38. package/dist/components/masthead.d.ts +1 -1
  39. package/dist/components/native-select.d.ts +10 -0
  40. package/dist/components/native-select.js +60 -0
  41. package/dist/components/native-select.js.map +1 -0
  42. package/dist/components/pagination.d.ts +23 -0
  43. package/dist/components/pagination.js +109 -0
  44. package/dist/components/pagination.js.map +1 -0
  45. package/dist/components/progress.d.ts +10 -0
  46. package/dist/components/progress.js +67 -0
  47. package/dist/components/progress.js.map +1 -0
  48. package/dist/components/radio-group.d.ts +8 -0
  49. package/dist/components/radio-group.js +41 -0
  50. package/dist/components/radio-group.js.map +1 -0
  51. package/dist/components/select.d.ts +17 -0
  52. package/dist/components/select.js +177 -0
  53. package/dist/components/select.js.map +1 -0
  54. package/dist/components/skip-link.d.ts +1 -1
  55. package/dist/components/slider.d.ts +2 -82
  56. package/dist/components/slider.js +39 -106
  57. package/dist/components/slider.js.map +1 -1
  58. package/dist/components/switch.d.ts +8 -0
  59. package/dist/components/switch.js +34 -0
  60. package/dist/components/switch.js.map +1 -0
  61. package/dist/components/table.d.ts +12 -0
  62. package/dist/components/table.js +87 -0
  63. package/dist/components/table.js.map +1 -0
  64. package/dist/components/tabs.d.ts +14 -0
  65. package/dist/components/tabs.js +76 -0
  66. package/dist/components/tabs.js.map +1 -0
  67. package/dist/components/textarea.d.ts +5 -0
  68. package/dist/components/textarea.js +20 -0
  69. package/dist/components/textarea.js.map +1 -0
  70. package/dist/components/toggle-group.d.ts +14 -0
  71. package/dist/components/toggle-group.js +73 -0
  72. package/dist/components/toggle-group.js.map +1 -0
  73. package/dist/components/toggle.d.ts +12 -0
  74. package/dist/components/toggle.js +45 -0
  75. package/dist/components/toggle.js.map +1 -0
  76. package/dist/index.d.ts +38 -1
  77. package/dist/index.js +22 -0
  78. package/dist/styles.css +1 -1
  79. package/package.json +3 -1
@@ -0,0 +1,136 @@
1
+ "use client"
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from '../lib/utils.js';
5
+ import { Button } from './button.js';
6
+ import { Input } from './input.js';
7
+ import { Textarea } from './textarea.js';
8
+
9
+ function InputGroup({ className, ...props }) {
10
+ return /* @__PURE__ */ jsx(
11
+ "div",
12
+ {
13
+ "data-slot": "input-group",
14
+ role: "group",
15
+ className: cn(
16
+ "group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md 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 dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5",
17
+ className
18
+ ),
19
+ ...props
20
+ }
21
+ );
22
+ }
23
+ const inputGroupAddonVariants = cva(
24
+ "flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",
25
+ {
26
+ variants: {
27
+ align: {
28
+ "inline-start": "order-first ps-2 has-[>button]:ms-[-0.275rem] has-[>kbd]:ms-[-0.275rem]",
29
+ "inline-end": "order-last pe-2 has-[>button]:me-[-0.275rem] has-[>kbd]:me-[-0.275rem]",
30
+ "block-start": "order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
31
+ "block-end": "order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ align: "inline-start"
36
+ }
37
+ }
38
+ );
39
+ function InputGroupAddon({
40
+ className,
41
+ align = "inline-start",
42
+ ...props
43
+ }) {
44
+ return /* @__PURE__ */ jsx(
45
+ "div",
46
+ {
47
+ role: "group",
48
+ "data-slot": "input-group-addon",
49
+ "data-align": align,
50
+ className: cn(inputGroupAddonVariants({ align }), className),
51
+ onClick: (e) => {
52
+ if (e.target.closest("button")) {
53
+ return;
54
+ }
55
+ e.currentTarget.parentElement?.querySelector("input, textarea")?.focus();
56
+ },
57
+ ...props
58
+ }
59
+ );
60
+ }
61
+ const inputGroupButtonVariants = cva(
62
+ "flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",
63
+ {
64
+ variants: {
65
+ size: {
66
+ xs: "h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",
67
+ sm: "gap-1",
68
+ "icon-xs": "size-6 p-0 has-[>svg]:p-0",
69
+ "icon-sm": "size-7 p-0 has-[>svg]:p-0"
70
+ }
71
+ },
72
+ defaultVariants: {
73
+ size: "xs"
74
+ }
75
+ }
76
+ );
77
+ function InputGroupButton({
78
+ className,
79
+ type = "button",
80
+ variant = "ghost",
81
+ size = "xs",
82
+ ...props
83
+ }) {
84
+ return /* @__PURE__ */ jsx(
85
+ Button,
86
+ {
87
+ type,
88
+ "data-size": size,
89
+ variant,
90
+ className: cn(inputGroupButtonVariants({ size }), className),
91
+ ...props
92
+ }
93
+ );
94
+ }
95
+ function InputGroupText({ className, ...props }) {
96
+ return /* @__PURE__ */ jsx(
97
+ "span",
98
+ {
99
+ className: cn(
100
+ "flex items-center gap-2 text-xs/relaxed text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
101
+ className
102
+ ),
103
+ ...props
104
+ }
105
+ );
106
+ }
107
+ function InputGroupInput({ className, ...props }) {
108
+ return /* @__PURE__ */ jsx(
109
+ Input,
110
+ {
111
+ "data-slot": "input-group-control",
112
+ className: cn(
113
+ "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
114
+ className
115
+ ),
116
+ ...props
117
+ }
118
+ );
119
+ }
120
+ function InputGroupTextarea({ className, ...props }) {
121
+ return /* @__PURE__ */ jsx(
122
+ Textarea,
123
+ {
124
+ "data-slot": "input-group-control",
125
+ className: cn(
126
+ "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",
127
+ className
128
+ ),
129
+ ...props
130
+ }
131
+ );
132
+ }
133
+
134
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
135
+ //# sourceMappingURL=input-group.js.map
136
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/input-group.tsx"],"names":[],"mappings":";;;;;;;AAUA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,IAAA,EAAK,OAAA;AAAA,MACL,SAAA,EAAW,EAAA;AAAA,QACT,4nCAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,MAAM,uBAAA,GAA0B,GAAA;AAAA,EAC9B,oXAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,KAAA,EAAO;AAAA,QACL,cAAA,EAAgB,yEAAA;AAAA,QAChB,YAAA,EAAc,wEAAA;AAAA,QACd,aAAA,EACE,iGA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AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,WAAA,EAAW,IAAA;AAAA,MACX,OAAA;AAAA,MACA,WAAW,EAAA,CAAG,wBAAA,CAAyB,EAAE,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,MAC1D,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAC7E,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,gIAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,eAAA,CAAgB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AAC/E,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,6HAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqC;AACrF,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,8IAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"input-group.js","sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils.js'\nimport { Button } from './button.js'\nimport { Input } from './input.js'\nimport { Textarea } from './textarea.js'\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='input-group'\n role='group'\n className={cn(\n 'group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md 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 dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n align: {\n 'inline-start': 'order-first ps-2 has-[>button]:ms-[-0.275rem] has-[>kbd]:ms-[-0.275rem]',\n 'inline-end': 'order-last pe-2 has-[>button]:me-[-0.275rem] has-[>kbd]:me-[-0.275rem]',\n 'block-start':\n 'order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',\n 'block-end':\n 'order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n },\n)\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role='group'\n data-slot='input-group-addon'\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('button')) {\n return\n }\n e.currentTarget.parentElement?.querySelector<HTMLElement>('input, textarea')?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n 'flex items-center gap-2 rounded-md text-xs/relaxed shadow-none',\n {\n variants: {\n size: {\n xs: \"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3\",\n sm: 'gap-1',\n 'icon-xs': 'size-6 p-0 has-[>svg]:p-0',\n 'icon-sm': 'size-7 p-0 has-[>svg]:p-0',\n },\n },\n defaultVariants: {\n size: 'xs',\n },\n },\n)\n\nfunction InputGroupButton({\n className,\n type = 'button',\n variant = 'ghost',\n size = 'xs',\n ...props\n}: Omit<React.ComponentProps<typeof Button>, 'size' | 'type'> &\n VariantProps<typeof inputGroupButtonVariants> & {\n type?: 'button' | 'submit' | 'reset'\n }) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-xs/relaxed text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<'input'>) {\n return (\n <Input\n data-slot='input-group-control'\n className={cn(\n 'flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <Textarea\n data-slot='input-group-control'\n className={cn(\n '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',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupText,\n InputGroupTextarea,\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { OTPInput } from 'input-otp';
2
+ import * as React from 'react';
3
+
4
+ declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
5
+ containerClassName?: string;
6
+ }): React.JSX.Element;
7
+ declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
8
+ declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & {
9
+ index: number;
10
+ }): React.JSX.Element;
11
+ declare function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>): React.JSX.Element;
12
+
13
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,79 @@
1
+ "use client"
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { OTPInput, OTPInputContext } from 'input-otp';
4
+ import * as React from 'react';
5
+ import { IconRemove } from '../icons/remove.js';
6
+ import { cn } from '../lib/utils.js';
7
+
8
+ function InputOTP({
9
+ className,
10
+ containerClassName,
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsx(
14
+ OTPInput,
15
+ {
16
+ "data-slot": "input-otp",
17
+ containerClassName: cn(
18
+ "cn-input-otp flex items-center has-disabled:opacity-50",
19
+ containerClassName
20
+ ),
21
+ spellCheck: false,
22
+ className: cn("disabled:cursor-not-allowed", className),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function InputOTPGroup({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ "data-slot": "input-otp-group",
32
+ className: cn(
33
+ "flex items-center rounded-md has-aria-invalid:border-destructive has-aria-invalid:ring-2 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
34
+ className
35
+ ),
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ function InputOTPSlot({
41
+ index,
42
+ className,
43
+ ...props
44
+ }) {
45
+ const inputOTPContext = React.useContext(OTPInputContext);
46
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
47
+ return /* @__PURE__ */ jsxs(
48
+ "div",
49
+ {
50
+ "data-slot": "input-otp-slot",
51
+ "data-active": isActive,
52
+ className: cn(
53
+ "relative flex size-7 items-center justify-center border-y border-e border-input bg-input/20 text-xs/relaxed transition-all outline-none first:rounded-s-md first:border-s last:rounded-e-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-2 data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
54
+ className
55
+ ),
56
+ ...props,
57
+ children: [
58
+ char,
59
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ function InputOTPSeparator({ ...props }) {
65
+ return /* @__PURE__ */ jsx(
66
+ "div",
67
+ {
68
+ "data-slot": "input-otp-separator",
69
+ className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
70
+ role: "separator",
71
+ ...props,
72
+ children: /* @__PURE__ */ jsx(IconRemove, {})
73
+ }
74
+ );
75
+ }
76
+
77
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
78
+ //# sourceMappingURL=input-otp.js.map
79
+ //# sourceMappingURL=input-otp.js.map
@@ -0,0 +1 @@
1
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AAA,EAAI,SAAA,EAAU,yEACb,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0DAAA,EAA2D,CAAA,EAC5E;AAAA;AAAA;AAAA,GAEJ;AAEJ;AAEA,SAAS,iBAAA,CAAkB,EAAE,GAAG,KAAA,EAAM,EAAgC;AACpE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAU,wDAAA;AAAA,MACV,IAAA,EAAK,WAAA;AAAA,MACJ,GAAG,KAAA;AAAA,MAEJ,8BAAC,UAAA,EAAA,EAAW;AAAA;AAAA,GACd;AAEJ","file":"input-otp.js","sourcesContent":["'use client'\n\nimport { OTPInput, OTPInputContext } from 'input-otp'\nimport * as React from 'react'\n\nimport { IconRemove } from '../icons/remove.js'\nimport { cn } from '../lib/utils.js'\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}) {\n return (\n <OTPInput\n data-slot='input-otp'\n containerClassName={cn(\n 'cn-input-otp flex items-center has-disabled:opacity-50',\n containerClassName,\n )}\n spellCheck={false}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='input-otp-group'\n className={cn(\n 'flex items-center rounded-md has-aria-invalid:border-destructive has-aria-invalid:ring-2 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot='input-otp-slot'\n data-active={isActive}\n className={cn(\n 'relative flex size-7 items-center justify-center border-y border-e border-input bg-input/20 text-xs/relaxed transition-all outline-none first:rounded-s-md first:border-s last:rounded-e-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-2 data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40',\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className='pointer-events-none absolute inset-0 flex items-center justify-center'>\n <div className='h-4 w-px animate-caret-blink bg-foreground duration-1000' />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='input-otp-separator'\n className=\"flex items-center [&_svg:not([class*='size-'])]:size-4\"\n role='separator'\n {...props}\n >\n <IconRemove />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot }\n"]}
@@ -0,0 +1,6 @@
1
+ import * as React$1 from 'react';
2
+
3
+ declare function Kbd({ className, ...props }: React.ComponentProps<'kbd'>): React$1.JSX.Element;
4
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
5
+
6
+ export { Kbd, KbdGroup };
@@ -0,0 +1,30 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { cn } from '../lib/utils.js';
3
+
4
+ function Kbd({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "kbd",
7
+ {
8
+ "data-slot": "kbd",
9
+ className: cn(
10
+ "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-xs bg-muted px-1 font-sans text-[0.625rem] font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
11
+ className
12
+ ),
13
+ ...props
14
+ }
15
+ );
16
+ }
17
+ function KbdGroup({ className, ...props }) {
18
+ return /* @__PURE__ */ jsx(
19
+ "kbd",
20
+ {
21
+ "data-slot": "kbd-group",
22
+ className: cn("inline-flex items-center gap-1", className),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+
28
+ export { Kbd, KbdGroup };
29
+ //# sourceMappingURL=kbd.js.map
30
+ //# sourceMappingURL=kbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/kbd.tsx"],"names":[],"mappings":";;;AAEA,SAAS,GAAA,CAAI,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACjE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,KAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,+WAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACtE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,gCAAA,EAAkC,SAAS,CAAA;AAAA,MACxD,GAAG;AAAA;AAAA,GACN;AAEJ","file":"kbd.js","sourcesContent":["import { cn } from '../lib/utils.js'\n\nfunction Kbd({ className, ...props }: React.ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot='kbd'\n className={cn(\n \"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-xs bg-muted px-1 font-sans text-[0.625rem] font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <kbd\n data-slot='kbd-group'\n className={cn('inline-flex items-center gap-1', className)}\n {...props}\n />\n )\n}\n\nexport { Kbd, KbdGroup }\n"]}
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import React__default from 'react';
4
4
 
5
5
  declare const linkVariants: (props?: ({
6
- variant?: "white" | "primary" | "secondary" | "unstyled" | null | undefined;
6
+ variant?: "primary" | "secondary" | "white" | "unstyled" | null | undefined;
7
7
  } & class_variance_authority_types.ClassProp) | undefined) => string;
8
8
  type LinkComponent = React__default.ElementType;
9
9
  /**
@@ -10,7 +10,7 @@ declare const mastheadColors: {
10
10
  };
11
11
  type MastheadColor = keyof typeof mastheadColors;
12
12
  declare const mastheadVariants: (props?: ({
13
- color?: "light" | "white" | "grey" | "dark" | null | undefined;
13
+ color?: "white" | "grey" | "light" | "dark" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  declare const mastheadContainerVariants: (props?: ({
16
16
  container?: "fluid" | "contained" | null | undefined;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
4
+ size?: 'sm' | 'default';
5
+ };
6
+ declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React.JSX.Element;
7
+ declare function NativeSelectOption({ className, ...props }: React.ComponentProps<'option'>): React.JSX.Element;
8
+ declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<'optgroup'>): React.JSX.Element;
9
+
10
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
@@ -0,0 +1,60 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { IconExpandMore } from '../icons/expand-more.js';
3
+ import { cn } from '../lib/utils.js';
4
+
5
+ function NativeSelect({ className, size = "default", ...props }) {
6
+ return /* @__PURE__ */ jsxs(
7
+ "div",
8
+ {
9
+ className: cn(
10
+ "group/native-select relative w-fit has-[select:disabled]:opacity-50",
11
+ className
12
+ ),
13
+ "data-slot": "native-select-wrapper",
14
+ "data-size": size,
15
+ children: [
16
+ /* @__PURE__ */ jsx(
17
+ "select",
18
+ {
19
+ "data-slot": "native-select",
20
+ "data-size": size,
21
+ className: "h-7 w-full min-w-0 appearance-none rounded-md border border-input bg-input/20 py-0.5 ps-2 pe-6 text-xs/relaxed transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=sm]:h-6 data-[size=sm]:text-[0.625rem] dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
22
+ ...props
23
+ }
24
+ ),
25
+ /* @__PURE__ */ jsx(
26
+ IconExpandMore,
27
+ {
28
+ className: "pointer-events-none absolute end-1.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground select-none group-data-[size=sm]/native-select:size-3 group-data-[size=sm]/native-select:-translate-y-[calc(--spacing(1.25))]",
29
+ "aria-hidden": "true",
30
+ "data-slot": "native-select-icon"
31
+ }
32
+ )
33
+ ]
34
+ }
35
+ );
36
+ }
37
+ function NativeSelectOption({ className, ...props }) {
38
+ return /* @__PURE__ */ jsx(
39
+ "option",
40
+ {
41
+ "data-slot": "native-select-option",
42
+ className: cn("bg-[Canvas] text-[CanvasText]", className),
43
+ ...props
44
+ }
45
+ );
46
+ }
47
+ function NativeSelectOptGroup({ className, ...props }) {
48
+ return /* @__PURE__ */ jsx(
49
+ "optgroup",
50
+ {
51
+ "data-slot": "native-select-optgroup",
52
+ className: cn("bg-[Canvas] text-[CanvasText]", className),
53
+ ...props
54
+ }
55
+ );
56
+ }
57
+
58
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
59
+ //# sourceMappingURL=native-select.js.map
60
+ //# sourceMappingURL=native-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/native-select.tsx"],"names":[],"mappings":";;;;AASA,SAAS,aAAa,EAAE,SAAA,EAAW,OAAO,SAAA,EAAW,GAAG,OAAM,EAAsB;AAClF,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,qEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,WAAA,EAAU,uBAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAU,eAAA;AAAA,YACV,WAAA,EAAW,IAAA;AAAA,YACX,SAAA,EAAU,onBAAA;AAAA,YACT,GAAG;AAAA;AAAA,SACN;AAAA,wBACA,GAAA;AAAA,UAAC,cAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,4NAAA;AAAA,YACV,aAAA,EAAY,MAAA;AAAA,YACZ,WAAA,EAAU;AAAA;AAAA;AACZ;AAAA;AAAA,GACF;AAEJ;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAmC;AACnF,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,sBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,oBAAA,CAAqB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqC;AACvF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,wBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ","file":"native-select.js","sourcesContent":["import * as React from 'react'\n\nimport { IconExpandMore } from '../icons/expand-more.js'\nimport { cn } from '../lib/utils.js'\n\ntype NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'default'\n}\n\nfunction NativeSelect({ className, size = 'default', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn(\n 'group/native-select relative w-fit has-[select:disabled]:opacity-50',\n className,\n )}\n data-slot='native-select-wrapper'\n data-size={size}\n >\n <select\n data-slot='native-select'\n data-size={size}\n className='h-7 w-full min-w-0 appearance-none rounded-md border border-input bg-input/20 py-0.5 ps-2 pe-6 text-xs/relaxed transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=sm]:h-6 data-[size=sm]:text-[0.625rem] dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40'\n {...props}\n />\n <IconExpandMore\n className='pointer-events-none absolute end-1.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground select-none group-data-[size=sm]/native-select:size-3 group-data-[size=sm]/native-select:-translate-y-[calc(--spacing(1.25))]'\n aria-hidden='true'\n data-slot='native-select-icon'\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ className, ...props }: React.ComponentProps<'option'>) {\n return (\n <option\n data-slot='native-select-option'\n className={cn('bg-[Canvas] text-[CanvasText]', className)}\n {...props}\n />\n )\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: React.ComponentProps<'optgroup'>) {\n return (\n <optgroup\n data-slot='native-select-optgroup'\n className={cn('bg-[Canvas] text-[CanvasText]', className)}\n {...props}\n />\n )\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"]}
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { Button } from './button.js';
3
+ import 'class-variance-authority/types';
4
+ import '@base-ui/react/button';
5
+ import 'class-variance-authority';
6
+ import './link.js';
7
+
8
+ declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
9
+ declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
10
+ declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): React.JSX.Element;
11
+ type PaginationLinkProps = {
12
+ isActive?: boolean;
13
+ } & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
14
+ declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
15
+ declare function PaginationPrevious({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
16
+ text?: string;
17
+ }): React.JSX.Element;
18
+ declare function PaginationNext({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
19
+ text?: string;
20
+ }): React.JSX.Element;
21
+ declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
22
+
23
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -0,0 +1,109 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { IconChevronLeft } from '../icons/chevron-left.js';
3
+ import { IconChevronRight } from '../icons/chevron-right.js';
4
+ import { IconMoreHoriz } from '../icons/more-horiz.js';
5
+ import { cn } from '../lib/utils.js';
6
+ import { Button } from './button.js';
7
+
8
+ function Pagination({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx(
10
+ "nav",
11
+ {
12
+ role: "navigation",
13
+ "aria-label": "pagination",
14
+ "data-slot": "pagination",
15
+ className: cn("mx-auto flex w-full justify-center", className),
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ function PaginationContent({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx(
22
+ "ul",
23
+ {
24
+ "data-slot": "pagination-content",
25
+ className: cn("flex items-center gap-0.5", className),
26
+ ...props
27
+ }
28
+ );
29
+ }
30
+ function PaginationItem({ ...props }) {
31
+ return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
32
+ }
33
+ function PaginationLink({ className, isActive, size = "icon", ...props }) {
34
+ return /* @__PURE__ */ jsx(
35
+ Button,
36
+ {
37
+ variant: isActive ? "outline" : "ghost",
38
+ size,
39
+ className: cn(className),
40
+ nativeButton: false,
41
+ render: /* @__PURE__ */ jsx(
42
+ "a",
43
+ {
44
+ "aria-current": isActive ? "page" : void 0,
45
+ "data-slot": "pagination-link",
46
+ "data-active": isActive,
47
+ ...props
48
+ }
49
+ )
50
+ }
51
+ );
52
+ }
53
+ function PaginationPrevious({
54
+ className,
55
+ text = "Previous",
56
+ ...props
57
+ }) {
58
+ return /* @__PURE__ */ jsxs(
59
+ PaginationLink,
60
+ {
61
+ "aria-label": "Go to previous page",
62
+ size: "default",
63
+ className: cn("ps-2!", className),
64
+ ...props,
65
+ children: [
66
+ /* @__PURE__ */ jsx(IconChevronLeft, { "data-icon": "inline-start", className: "rtl:rotate-180" }),
67
+ /* @__PURE__ */ jsx("span", { className: "max-sm:hidden sm:block", children: text })
68
+ ]
69
+ }
70
+ );
71
+ }
72
+ function PaginationNext({
73
+ className,
74
+ text = "Next",
75
+ ...props
76
+ }) {
77
+ return /* @__PURE__ */ jsxs(
78
+ PaginationLink,
79
+ {
80
+ "aria-label": "Go to next page",
81
+ size: "default",
82
+ className: cn("pe-2!", className),
83
+ ...props,
84
+ children: [
85
+ /* @__PURE__ */ jsx("span", { className: "max-sm:hidden sm:block", children: text }),
86
+ /* @__PURE__ */ jsx(IconChevronRight, { "data-icon": "inline-end", className: "rtl:rotate-180" })
87
+ ]
88
+ }
89
+ );
90
+ }
91
+ function PaginationEllipsis({ className, ...props }) {
92
+ return /* @__PURE__ */ jsx(
93
+ "span",
94
+ {
95
+ "aria-hidden": true,
96
+ "data-slot": "pagination-ellipsis",
97
+ className: cn(
98
+ "flex size-7 items-center justify-center [&_svg:not([class*='size-'])]:size-3.5",
99
+ className
100
+ ),
101
+ ...props,
102
+ children: /* @__PURE__ */ jsx(IconMoreHoriz, {})
103
+ }
104
+ );
105
+ }
106
+
107
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
108
+ //# sourceMappingURL=pagination.js.map
109
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/pagination.tsx"],"names":[],"mappings":";;;;;;;AAQA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,YAAA;AAAA,MACL,YAAA,EAAW,YAAA;AAAA,MACX,WAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,oCAAA,EAAsC,SAAS,CAAA;AAAA,MAC5D,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,iBAAA,CAAkB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA+B;AAC9E,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,2BAAA,EAA6B,SAAS,CAAA;AAAA,MACnD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAA+B;AAChE,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAG,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AACpD;AAOA,SAAS,cAAA,CAAe,EAAE,SAAA,EAAW,QAAA,EAAU,OAAO,MAAA,EAAQ,GAAG,OAAM,EAAwB;AAC7F,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAS,WAAW,SAAA,GAAY,OAAA;AAAA,MAChC,IAAA;AAAA,MACA,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,MACvB,Y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BAC/C,GAAA,CAAC,gBAAA,EAAA,EAAiB,WAAA,EAAU,YAAA,EAAa,WAAU,gBAAA,EAAiB;AAAA;AAAA;AAAA,GACtE;AAEJ;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AACjF,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAW,IAAA;AAAA,MACX,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,gFAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,8BAAC,aAAA,EAAA,EAAc;AAAA;AAAA,GACjB;AAEJ","file":"pagination.js","sourcesContent":["import * as React from 'react'\n\nimport { IconChevronLeft } from '../icons/chevron-left.js'\nimport { IconChevronRight } from '../icons/chevron-right.js'\nimport { IconMoreHoriz } from '../icons/more-horiz.js'\nimport { cn } from '../lib/utils.js'\nimport { Button } from './button.js'\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role='navigation'\n aria-label='pagination'\n data-slot='pagination'\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='pagination-content'\n className={cn('flex items-center gap-0.5', className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot='pagination-item' {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>\n\nfunction PaginationLink({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) {\n return (\n <Button\n variant={isActive ? 'outline' : 'ghost'}\n size={size}\n className={cn(className)}\n nativeButton={false}\n render={\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot='pagination-link'\n data-active={isActive}\n {...props}\n />\n }\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n text = 'Previous',\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label='Go to previous page'\n size='default'\n className={cn('ps-2!', className)}\n {...props}\n >\n <IconChevronLeft data-icon='inline-start' className='rtl:rotate-180' />\n <span className='max-sm:hidden sm:block'>{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n text = 'Next',\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label='Go to next page'\n size='default'\n className={cn('pe-2!', className)}\n {...props}\n >\n <span className='max-sm:hidden sm:block'>{text}</span>\n <IconChevronRight data-icon='inline-end' className='rtl:rotate-180' />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot='pagination-ellipsis'\n className={cn(\n \"flex size-7 items-center justify-center [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n <IconMoreHoriz />\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { Progress as Progress$1 } from '@base-ui/react/progress';
3
+
4
+ declare function Progress({ className, children, value, ...props }: Progress$1.Root.Props): React.JSX.Element;
5
+ declare function ProgressTrack({ className, ...props }: Progress$1.Track.Props): React.JSX.Element;
6
+ declare function ProgressIndicator({ className, ...props }: Progress$1.Indicator.Props): React.JSX.Element;
7
+ declare function ProgressLabel({ className, ...props }: Progress$1.Label.Props): React.JSX.Element;
8
+ declare function ProgressValue({ className, ...props }: Progress$1.Value.Props): React.JSX.Element;
9
+
10
+ export { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue };
@@ -0,0 +1,67 @@
1
+ "use client"
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { Progress as Progress$1 } from '@base-ui/react/progress';
4
+ import { cn } from '../lib/utils.js';
5
+
6
+ function Progress({ className, children, value, ...props }) {
7
+ return /* @__PURE__ */ jsxs(
8
+ Progress$1.Root,
9
+ {
10
+ value,
11
+ "data-slot": "progress",
12
+ className: cn("flex flex-wrap gap-3", className),
13
+ ...props,
14
+ children: [
15
+ children,
16
+ /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) })
17
+ ]
18
+ }
19
+ );
20
+ }
21
+ function ProgressTrack({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx(
23
+ Progress$1.Track,
24
+ {
25
+ className: cn(
26
+ "relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted",
27
+ className
28
+ ),
29
+ "data-slot": "progress-track",
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function ProgressIndicator({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(
36
+ Progress$1.Indicator,
37
+ {
38
+ "data-slot": "progress-indicator",
39
+ className: cn("h-full bg-primary transition-all", className),
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ function ProgressLabel({ className, ...props }) {
45
+ return /* @__PURE__ */ jsx(
46
+ Progress$1.Label,
47
+ {
48
+ className: cn("text-xs/relaxed font-medium", className),
49
+ "data-slot": "progress-label",
50
+ ...props
51
+ }
52
+ );
53
+ }
54
+ function ProgressValue({ className, ...props }) {
55
+ return /* @__PURE__ */ jsx(
56
+ Progress$1.Value,
57
+ {
58
+ className: cn("ms-auto text-xs/relaxed text-muted-foreground tabular-nums", className),
59
+ "data-slot": "progress-value",
60
+ ...props
61
+ }
62
+ );
63
+ }
64
+
65
+ export { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue };
66
+ //# sourceMappingURL=progress.js.map
67
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/progress.tsx"],"names":["Pro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A,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AAC7E,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA,CAAkB,KAAA;AAAA,IAAlB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,MACrF,WAAA,EAAU,gBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ","file":"progress.js","sourcesContent":["'use client'\n\nimport { Progress as ProgressPrimitive } from '@base-ui/react/progress'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props) {\n return (\n <ProgressPrimitive.Root\n value={value}\n data-slot='progress'\n className={cn('flex flex-wrap gap-3', className)}\n {...props}\n >\n {children}\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </ProgressPrimitive.Root>\n )\n}\n\nfunction ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {\n return (\n <ProgressPrimitive.Track\n className={cn(\n 'relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted',\n className,\n )}\n data-slot='progress-track'\n {...props}\n />\n )\n}\n\nfunction ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props) {\n return (\n <ProgressPrimitive.Indicator\n data-slot='progress-indicator'\n className={cn('h-full bg-primary transition-all', className)}\n {...props}\n />\n )\n}\n\nfunction ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {\n return (\n <ProgressPrimitive.Label\n className={cn('text-xs/relaxed font-medium', className)}\n data-slot='progress-label'\n {...props}\n />\n )\n}\n\nfunction ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {\n return (\n <ProgressPrimitive.Value\n className={cn('ms-auto text-xs/relaxed text-muted-foreground tabular-nums', className)}\n data-slot='progress-value'\n {...props}\n />\n )\n}\n\nexport { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue }\n"]}