@foundrykit/components 2.2.0 → 2.2.3

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 (105) hide show
  1. package/dist/chunk-4WYKNDYY.js +91 -0
  2. package/dist/chunk-4WYKNDYY.js.map +1 -0
  3. package/dist/chunk-5CXNMTIN.js +84 -0
  4. package/dist/chunk-5CXNMTIN.js.map +1 -0
  5. package/dist/chunk-B5ZTF5MZ.js +203 -0
  6. package/dist/chunk-B5ZTF5MZ.js.map +1 -0
  7. package/dist/chunk-EDNWBEKV.js +51 -0
  8. package/dist/chunk-EDNWBEKV.js.map +1 -0
  9. package/dist/chunk-ID7BFTID.js +248 -0
  10. package/dist/chunk-ID7BFTID.js.map +1 -0
  11. package/dist/chunk-IYBHXVCH.js +181 -0
  12. package/dist/chunk-IYBHXVCH.js.map +1 -0
  13. package/dist/chunk-KQZEF7PS.js +71 -0
  14. package/dist/chunk-KQZEF7PS.js.map +1 -0
  15. package/dist/chunk-P3GSYR7O.js +889 -0
  16. package/dist/chunk-P3GSYR7O.js.map +1 -0
  17. package/dist/chunk-PKSRYDN4.js +168 -0
  18. package/dist/chunk-PKSRYDN4.js.map +1 -0
  19. package/dist/chunk-SFM7ZMG2.js +104 -0
  20. package/dist/chunk-SFM7ZMG2.js.map +1 -0
  21. package/dist/chunk-TLQQZJUR.js +126 -0
  22. package/dist/chunk-TLQQZJUR.js.map +1 -0
  23. package/dist/chunk-UE7CDYEN.js +59 -0
  24. package/dist/chunk-UE7CDYEN.js.map +1 -0
  25. package/dist/chunk-UG7YS3D5.js +198 -0
  26. package/dist/chunk-UG7YS3D5.js.map +1 -0
  27. package/dist/components/advanced-search-bar/index.d.ts +308 -0
  28. package/dist/components/advanced-search-bar/index.js +34 -0
  29. package/dist/components/advanced-search-bar/index.js.map +1 -0
  30. package/dist/components/calendar/index.d.ts +20 -0
  31. package/dist/components/calendar/index.js +11 -0
  32. package/dist/components/calendar/index.js.map +1 -0
  33. package/dist/components/carousel/index.d.ts +40 -0
  34. package/dist/components/carousel/index.js +17 -0
  35. package/dist/components/carousel/index.js.map +1 -0
  36. package/dist/components/chart/index.d.ts +59 -0
  37. package/dist/components/chart/index.js +21 -0
  38. package/dist/components/chart/index.js.map +1 -0
  39. package/dist/components/combobox/index.d.ts +33 -0
  40. package/dist/components/combobox/index.js +10 -0
  41. package/dist/components/combobox/index.js.map +1 -0
  42. package/dist/components/command/index.d.ts +33 -0
  43. package/dist/components/command/index.js +25 -0
  44. package/dist/components/command/index.js.map +1 -0
  45. package/dist/components/data-table/index.d.ts +17 -0
  46. package/dist/components/data-table/index.js +9 -0
  47. package/dist/components/data-table/index.js.map +1 -0
  48. package/dist/components/date-picker/index.d.ts +17 -0
  49. package/dist/components/date-picker/index.js +9 -0
  50. package/dist/components/date-picker/index.js.map +1 -0
  51. package/dist/components/form/index.d.ts +37 -0
  52. package/dist/components/form/index.js +23 -0
  53. package/dist/components/form/index.js.map +1 -0
  54. package/dist/components/input-otp/index.d.ts +30 -0
  55. package/dist/components/input-otp/index.js +15 -0
  56. package/dist/components/input-otp/index.js.map +1 -0
  57. package/dist/components/pagination/index.d.ts +26 -0
  58. package/dist/components/pagination/index.js +20 -0
  59. package/dist/components/pagination/index.js.map +1 -0
  60. package/dist/components/search-bar/index.d.ts +17 -0
  61. package/dist/components/search-bar/index.js +9 -0
  62. package/dist/components/search-bar/index.js.map +1 -0
  63. package/dist/components/sidebar/index.d.ts +70 -0
  64. package/dist/components/sidebar/index.js +652 -0
  65. package/dist/components/sidebar/index.js.map +1 -0
  66. package/dist/components/theme-toggle/index.d.ts +20 -0
  67. package/dist/components/theme-toggle/index.js +9 -0
  68. package/dist/components/theme-toggle/index.js.map +1 -0
  69. package/dist/index.d.ts +27 -605
  70. package/dist/index.js +73 -2337
  71. package/dist/index.js.map +1 -1
  72. package/package.json +17 -10
  73. package/CHANGELOG.md +0 -362
  74. package/src/components/advanced-search-bar/config.ts +0 -223
  75. package/src/components/advanced-search-bar/index.tsx +0 -1415
  76. package/src/components/calendar/config.ts +0 -51
  77. package/src/components/calendar/index.tsx +0 -225
  78. package/src/components/carousel/config.ts +0 -28
  79. package/src/components/carousel/index.tsx +0 -258
  80. package/src/components/chart/config.ts +0 -28
  81. package/src/components/chart/index.tsx +0 -365
  82. package/src/components/combobox/config.ts +0 -28
  83. package/src/components/combobox/index.tsx +0 -111
  84. package/src/components/command/config.ts +0 -804
  85. package/src/components/command/index.tsx +0 -195
  86. package/src/components/data-table/config.ts +0 -28
  87. package/src/components/data-table/index.tsx +0 -124
  88. package/src/components/date-picker/config.ts +0 -55
  89. package/src/components/date-picker/index.tsx +0 -207
  90. package/src/components/form/config.ts +0 -21
  91. package/src/components/form/index.tsx +0 -150
  92. package/src/components/input-otp/config.ts +0 -28
  93. package/src/components/input-otp/index.tsx +0 -92
  94. package/src/components/pagination/config.ts +0 -367
  95. package/src/components/pagination/index.tsx +0 -135
  96. package/src/components/search-bar/config.ts +0 -58
  97. package/src/components/search-bar/index.tsx +0 -70
  98. package/src/components/sidebar/config.ts +0 -29
  99. package/src/components/sidebar/index.tsx +0 -723
  100. package/src/components/theme-toggle/config.ts +0 -27
  101. package/src/components/theme-toggle/index.tsx +0 -63
  102. package/src/index.ts +0 -83
  103. package/tsconfig.json +0 -12
  104. package/tsconfig.lint.json +0 -8
  105. package/tsup.config.ts +0 -11
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/theme-toggle/index.tsx"],"sourcesContent":["'use client';\n\nimport { Toggle } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\nimport { MoonIcon, SunIcon } from 'lucide-react';\nimport { useEffect, useState } from 'react';\n\n/**\n * Dark mode toggle. Flips the `.dark` class on `<html>`, which drives the\n * `@foundrykit/tailwind` dark tokens. Exposes one state to assistive tech:\n * a fixed \"Dark mode\" label with `aria-pressed`.\n *\n * While the class flips, `.theme-switching` is set on `<html>` so transitions\n * are suppressed (the rule ships in `@foundrykit/tailwind/globals.css`).\n *\n * @example\n * ```tsx\n * <ThemeToggle />\n * ```\n */\nexport function ThemeToggle({ className }: { className?: string }) {\n const [dark, setDark] = useState(false);\n\n // Read the class after mount so the server and first client render match.\n useEffect(() => {\n setDark(document.documentElement.classList.contains('dark'));\n }, []);\n\n const toggle = (next: boolean) => {\n const root = document.documentElement;\n root.classList.add('theme-switching');\n root.classList.toggle('dark', next);\n setDark(next);\n // Re-enable transitions once the new theme has painted.\n requestAnimationFrame(() =>\n requestAnimationFrame(() => root.classList.remove('theme-switching'))\n );\n };\n\n return (\n <Toggle\n variant='outline'\n aria-label='Dark mode'\n pressed={dark}\n onPressedChange={toggle}\n className={cn(\n 'data-[state=on]:hover:bg-muted group size-9 transition-[color,box-shadow,scale] duration-150 ease-out data-[state=on]:bg-transparent motion-safe:active:scale-[0.97]',\n className\n )}\n >\n <MoonIcon\n size={16}\n className='hidden shrink-0 group-data-[state=on]:block'\n aria-hidden='true'\n />\n <SunIcon\n size={16}\n className='shrink-0 group-data-[state=on]:hidden'\n aria-hidden='true'\n />\n </Toggle>\n );\n}\n"],"mappings":";;;AAEA,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,UAAU,eAAe;AAClC,SAAS,WAAW,gBAAgB;AAmChC,SAUE,KAVF;AApBG,SAAS,YAAY,EAAE,UAAU,GAA2B;AACjE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AAGtC,YAAU,MAAM;AACd,YAAQ,SAAS,gBAAgB,UAAU,SAAS,MAAM,CAAC;AAAA,EAC7D,GAAG,CAAC,CAAC;AAEL,QAAM,SAAS,CAAC,SAAkB;AAChC,UAAM,OAAO,SAAS;AACtB,SAAK,UAAU,IAAI,iBAAiB;AACpC,SAAK,UAAU,OAAO,QAAQ,IAAI;AAClC,YAAQ,IAAI;AAEZ;AAAA,MAAsB,MACpB,sBAAsB,MAAM,KAAK,UAAU,OAAO,iBAAiB,CAAC;AAAA,IACtE;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,cAAW;AAAA,MACX,SAAS;AAAA,MACT,iBAAiB;AAAA,MACjB,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,WAAU;AAAA,YACV,eAAY;AAAA;AAAA,QACd;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,WAAU;AAAA,YACV,eAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,198 @@
1
+ 'use client';
2
+
3
+ // src/components/calendar/index.tsx
4
+ import { Button, buttonVariants } from "@foundrykit/primitives";
5
+ import { cn } from "@foundrykit/utils";
6
+ import {
7
+ ChevronDownIcon,
8
+ ChevronLeftIcon,
9
+ ChevronRightIcon
10
+ } from "lucide-react";
11
+ import * as React from "react";
12
+ import {
13
+ DayPicker,
14
+ getDefaultClassNames
15
+ } from "react-day-picker";
16
+ import { jsx } from "react/jsx-runtime";
17
+ function Calendar({
18
+ className,
19
+ classNames,
20
+ showOutsideDays = true,
21
+ captionLayout = "label",
22
+ buttonVariant = "ghost",
23
+ formatters,
24
+ components,
25
+ ...props
26
+ }) {
27
+ const defaultClassNames = getDefaultClassNames();
28
+ return /* @__PURE__ */ jsx(
29
+ DayPicker,
30
+ {
31
+ showOutsideDays,
32
+ className: cn(
33
+ "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
34
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
35
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
36
+ className
37
+ ),
38
+ captionLayout,
39
+ formatters: {
40
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
41
+ ...formatters
42
+ },
43
+ classNames: {
44
+ root: cn("w-fit", defaultClassNames.root),
45
+ months: cn(
46
+ "relative flex flex-col gap-4 md:flex-row",
47
+ defaultClassNames.months
48
+ ),
49
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
50
+ nav: cn(
51
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
52
+ defaultClassNames.nav
53
+ ),
54
+ button_previous: cn(
55
+ buttonVariants({ variant: buttonVariant }),
56
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
57
+ defaultClassNames.button_previous
58
+ ),
59
+ button_next: cn(
60
+ buttonVariants({ variant: buttonVariant }),
61
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
62
+ defaultClassNames.button_next
63
+ ),
64
+ month_caption: cn(
65
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
66
+ defaultClassNames.month_caption
67
+ ),
68
+ dropdowns: cn(
69
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
70
+ defaultClassNames.dropdowns
71
+ ),
72
+ dropdown_root: cn(
73
+ "has-focus:border-ring border-input has-focus:ring-ring/50 relative rounded-md border shadow-xs has-focus:ring-[3px]",
74
+ defaultClassNames.dropdown_root
75
+ ),
76
+ dropdown: cn(
77
+ "bg-popover absolute inset-0 opacity-0",
78
+ defaultClassNames.dropdown
79
+ ),
80
+ caption_label: cn(
81
+ "font-medium select-none",
82
+ captionLayout === "label" ? "text-sm" : "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5",
83
+ defaultClassNames.caption_label
84
+ ),
85
+ table: "w-full border-collapse",
86
+ weekdays: cn("flex", defaultClassNames.weekdays),
87
+ weekday: cn(
88
+ "text-muted-foreground flex-1 rounded-md text-[0.8rem] font-normal select-none",
89
+ defaultClassNames.weekday
90
+ ),
91
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
92
+ week_number_header: cn(
93
+ "w-(--cell-size) select-none",
94
+ defaultClassNames.week_number_header
95
+ ),
96
+ week_number: cn(
97
+ "text-muted-foreground text-[0.8rem] select-none",
98
+ defaultClassNames.week_number
99
+ ),
100
+ day: cn(
101
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",
102
+ defaultClassNames.day
103
+ ),
104
+ range_start: cn(
105
+ "bg-accent rounded-l-md",
106
+ defaultClassNames.range_start
107
+ ),
108
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
109
+ range_end: cn("bg-accent rounded-r-md", defaultClassNames.range_end),
110
+ today: cn(
111
+ "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
112
+ defaultClassNames.today
113
+ ),
114
+ outside: cn(
115
+ "text-muted-foreground aria-selected:text-muted-foreground",
116
+ defaultClassNames.outside
117
+ ),
118
+ disabled: cn(
119
+ "text-muted-foreground opacity-50",
120
+ defaultClassNames.disabled
121
+ ),
122
+ hidden: cn("invisible", defaultClassNames.hidden),
123
+ ...classNames
124
+ },
125
+ components: {
126
+ Root: ({ className: className2, rootRef, ...props2 }) => {
127
+ return /* @__PURE__ */ jsx(
128
+ "div",
129
+ {
130
+ "data-slot": "calendar",
131
+ ref: rootRef,
132
+ className: cn(className2),
133
+ ...props2
134
+ }
135
+ );
136
+ },
137
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
138
+ if (orientation === "left") {
139
+ return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
140
+ }
141
+ if (orientation === "right") {
142
+ return /* @__PURE__ */ jsx(
143
+ ChevronRightIcon,
144
+ {
145
+ className: cn("size-4", className2),
146
+ ...props2
147
+ }
148
+ );
149
+ }
150
+ return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
151
+ },
152
+ DayButton: CalendarDayButton,
153
+ WeekNumber: ({ children, ...props2 }) => {
154
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
155
+ },
156
+ ...components
157
+ },
158
+ ...props
159
+ }
160
+ );
161
+ }
162
+ function CalendarDayButton({
163
+ className,
164
+ day,
165
+ modifiers,
166
+ ...props
167
+ }) {
168
+ const defaultClassNames = getDefaultClassNames();
169
+ const ref = React.useRef(null);
170
+ React.useEffect(() => {
171
+ if (modifiers.focused) ref.current?.focus();
172
+ }, [modifiers.focused]);
173
+ return /* @__PURE__ */ jsx(
174
+ Button,
175
+ {
176
+ ref,
177
+ variant: "ghost",
178
+ size: "icon",
179
+ "data-day": day.date.toLocaleDateString(),
180
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
181
+ "data-range-start": modifiers.range_start,
182
+ "data-range-end": modifiers.range_end,
183
+ "data-range-middle": modifiers.range_middle,
184
+ className: cn(
185
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
186
+ defaultClassNames.day,
187
+ className
188
+ ),
189
+ ...props
190
+ }
191
+ );
192
+ }
193
+
194
+ export {
195
+ Calendar,
196
+ CalendarDayButton
197
+ };
198
+ //# sourceMappingURL=chunk-UG7YS3D5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/calendar/index.tsx"],"sourcesContent":["'use client';\n\nimport { Button, buttonVariants } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from 'lucide-react';\nimport * as React from 'react';\nimport {\n type DayButton,\n DayPicker,\n getDefaultClassNames,\n} from 'react-day-picker';\n\n/**\n * Themed wrapper around `react-day-picker`'s `DayPicker`, styled with FoundryKit\n * design tokens. Accepts all `DayPicker` props (`mode`, `selected`, `onSelect`,\n * etc.) plus `buttonVariant` to control the nav button style.\n */\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: date =>\n date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn(\n 'relative flex flex-col gap-4 md:flex-row',\n defaultClassNames.months\n ),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn(\n 'absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1',\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n 'has-focus:border-ring border-input has-focus:ring-ring/50 relative rounded-md border shadow-xs has-focus:ring-[3px]',\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n 'bg-popover absolute inset-0 opacity-0',\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5',\n defaultClassNames.caption_label\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground flex-1 rounded-md text-[0.8rem] font-normal select-none',\n defaultClassNames.weekday\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn(\n 'w-(--cell-size) select-none',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-muted-foreground text-[0.8rem] select-none',\n defaultClassNames.week_number\n ),\n day: cn(\n 'group/day relative aspect-square h-full w-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',\n defaultClassNames.day\n ),\n range_start: cn(\n 'bg-accent rounded-l-md',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('bg-accent rounded-r-md', defaultClassNames.range_end),\n today: cn(\n 'bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none',\n defaultClassNames.today\n ),\n outside: cn(\n 'text-muted-foreground aria-selected:text-muted-foreground',\n defaultClassNames.outside\n ),\n disabled: cn(\n 'text-muted-foreground opacity-50',\n defaultClassNames.disabled\n ),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot='calendar'\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n );\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return (\n <ChevronLeftIcon className={cn('size-4', className)} {...props} />\n );\n }\n\n if (orientation === 'right') {\n return (\n <ChevronRightIcon\n className={cn('size-4', className)}\n {...props}\n />\n );\n }\n\n return (\n <ChevronDownIcon className={cn('size-4', className)} {...props} />\n );\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className='flex size-(--cell-size) items-center justify-center text-center'>\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\n/**\n * Individual day cell button used by {@link Calendar}. Applies selected/range\n * data attributes for styling and auto-focuses when the day is focused.\n */\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant='ghost'\n size='icon'\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n"],"mappings":"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","names":["className","props"]}
@@ -0,0 +1,308 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { EmptyStateBehavior } from '@foundrykit/hooks';
4
+ import { SearchResult, SearchSection as SearchSection$1 } from '@foundrykit/types';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import * as React from 'react';
7
+
8
+ /**
9
+ * Props for the AdvancedSearchProvider component.
10
+ * This provider manages the search state and behaviour for all child components.
11
+ */
12
+ interface AdvancedSearchProviderProps {
13
+ /** Child components that will have access to the search context */
14
+ children: React.ReactNode;
15
+ /**
16
+ * Function called when user types in the search input.
17
+ * Should return a Promise or array of SearchResult objects.
18
+ * @param query - The search query string
19
+ * @returns Promise<SearchResult[]> | SearchResult[] - Array of search results
20
+ */
21
+ onSearch?: (query: string) => Promise<SearchResult[]> | SearchResult[];
22
+ /**
23
+ * Function called when user selects a result from the dropdown.
24
+ * @param result - The selected SearchResult object
25
+ */
26
+ onResultSelect?: (result: SearchResult) => void;
27
+ /**
28
+ * Debounce delay in milliseconds for search requests.
29
+ * @default 300
30
+ */
31
+ debounceMs?: number;
32
+ /**
33
+ * Minimum number of characters required before triggering search.
34
+ * @default 1
35
+ */
36
+ minQueryLength?: number;
37
+ /**
38
+ * Behavior when search results are empty or query is too short.
39
+ * - 'show-empty-message': Show "No results found" message
40
+ * - 'hide-until-min-chars': Hide results until minimum characters typed
41
+ * - 'show-all-results': Show initial results when empty
42
+ * @default 'show-empty-message'
43
+ */
44
+ emptyStateBehaviour?: EmptyStateBehavior;
45
+ /**
46
+ * Initial results to show when component first loads.
47
+ * Useful for showing popular/recent searches.
48
+ */
49
+ initialResults?: SearchResult[];
50
+ /**
51
+ * Custom styles for different parts of the search component.
52
+ */
53
+ styles?: {
54
+ /** CSS properties for the results dropdown */
55
+ results?: React.CSSProperties;
56
+ width?: string | number;
57
+ };
58
+ }
59
+ /**
60
+ * AdvancedSearchProvider component that manages search state and provides context to child components.
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * <AdvancedSearchProvider
65
+ * onSearch={async (query) => {
66
+ * const results = await searchAPI(query);
67
+ * return results;
68
+ * }}
69
+ * onResultSelect={(result) => {
70
+ * console.log('Selected:', result);
71
+ * }}
72
+ * emptyStateBehaviour="show-all-results"
73
+ * initialResults={popularDestinations}
74
+ * >
75
+ * <AdvancedSearchBar>
76
+ * <SearchInput placeholder="Search destinations..." />
77
+ * <SearchResults />
78
+ * </AdvancedSearchBar>
79
+ * </AdvancedSearchProvider>
80
+ * ```
81
+ */
82
+ declare function AdvancedSearchProvider({ children, onSearch, onResultSelect, debounceMs, minQueryLength, emptyStateBehaviour, initialResults, styles, }: AdvancedSearchProviderProps): react_jsx_runtime.JSX.Element;
83
+ /**
84
+ * Variant styles for the search input wrapper.
85
+ * Controls the size and visual appearance of the search input container.
86
+ */
87
+ declare const searchInputWrapperVariants: (props?: ({
88
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
89
+ variant?: "default" | "ghost" | "filled" | null | undefined;
90
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
91
+ /**
92
+ * Variant styles for the search results container.
93
+ * Controls the maximum width of the search results dropdown.
94
+ */
95
+ declare const searchResultsVariants: (props?: ({
96
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | null | undefined;
97
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
98
+ /**
99
+ * Props for the SearchInput component.
100
+ * Extends standard input props with search-specific functionality.
101
+ */
102
+ interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof searchInputWrapperVariants> {
103
+ /** Placeholder text shown when input is empty */
104
+ placeholder?: string;
105
+ /** Whether to show the search icon on the left side */
106
+ showSearchIcon?: boolean;
107
+ /** Whether to show the clear button when there's text */
108
+ showClearButton?: boolean;
109
+ /** Callback function called when clear button is clicked */
110
+ onClear?: () => void;
111
+ /** Whether to render as a child component using Slot */
112
+ asChild?: boolean;
113
+ }
114
+ /**
115
+ * SearchInput component that provides a search input field with optional search icon and clear button.
116
+ * Automatically integrates with the search context to handle query state and search triggering.
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * <SearchInput
121
+ * placeholder="Search destinations..."
122
+ * size="lg"
123
+ * variant="default"
124
+ * showSearchIcon={true}
125
+ * showClearButton={true}
126
+ * />
127
+ * ```
128
+ */
129
+ declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
130
+ /**
131
+ * Props for the SearchTrigger component.
132
+ * Used to create custom trigger buttons that open the search dropdown.
133
+ */
134
+ interface SearchTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
135
+ /** Whether to render as a child component using Slot */
136
+ asChild?: boolean;
137
+ }
138
+ /**
139
+ * SearchTrigger component that creates a button to open/close the search dropdown.
140
+ * Can be used with asChild to wrap custom button components.
141
+ *
142
+ * @example
143
+ * ```tsx
144
+ * <SearchTrigger asChild>
145
+ * <Button variant="outline" className="w-full justify-start">
146
+ * <Search className="mr-2 h-4 w-4" />
147
+ * Click to search...
148
+ * </Button>
149
+ * </SearchTrigger>
150
+ * ```
151
+ */
152
+ declare const SearchTrigger: React.ForwardRefExoticComponent<SearchTriggerProps & React.RefAttributes<HTMLButtonElement>>;
153
+ /**
154
+ * Props for the SearchResults component.
155
+ * Displays the search results in a scrollable dropdown with customizable sections.
156
+ */
157
+ interface SearchResultsProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof searchResultsVariants> {
158
+ /** Custom sections to display instead of default results */
159
+ sections?: SearchSection$1[];
160
+ /** Whether to show empty state message when no results */
161
+ showEmptyState?: boolean;
162
+ /** Custom message to show when no results are found */
163
+ emptyStateMessage?: string;
164
+ /** Whether to show loading state while searching */
165
+ showLoadingState?: boolean;
166
+ /** Whether loading replaces results or keeps previous results visible */
167
+ loadingBehaviour?: 'replace-results' | 'preserve-results';
168
+ /** Custom loading state rendered instead of loadingMessage */
169
+ loadingState?: React.ReactNode;
170
+ /** Custom message to show while loading */
171
+ loadingMessage?: string;
172
+ }
173
+ /**
174
+ * SearchResults component that displays search results in a scrollable dropdown.
175
+ * Automatically handles loading states, empty states, and result selection.
176
+ *
177
+ * @example
178
+ * ```tsx
179
+ * <SearchResults
180
+ * size="lg"
181
+ * showEmptyState={true}
182
+ * emptyStateMessage="No destinations found."
183
+ * showLoadingState={true}
184
+ * loadingMessage="Searching destinations..."
185
+ * />
186
+ * ```
187
+ */
188
+ declare const SearchResults: React.ForwardRefExoticComponent<SearchResultsProps & React.RefAttributes<HTMLDivElement>>;
189
+ /**
190
+ * Props for the AdvancedSearchBar component.
191
+ * Main container component that orchestrates the search input and results dropdown.
192
+ */
193
+ interface AdvancedSearchBarProps extends React.HTMLAttributes<HTMLDivElement> {
194
+ /** Controlled open state of the results dropdown */
195
+ open?: boolean;
196
+ /** Callback function called when open state changes */
197
+ onOpenChange?: (open: boolean) => void;
198
+ /**
199
+ * Layout mode for the results panel.
200
+ * - `"popover"` (default): absolutely positioned dropdown below the input.
201
+ * - `"inline"`: normal document flow, rendered inside the same root element.
202
+ */
203
+ resultsMode?: 'popover' | 'inline';
204
+ /** Extra classes applied to the trigger/input wrapper div. */
205
+ triggerClassName?: string;
206
+ /** Extra classes applied to the results panel wrapper div. */
207
+ resultsClassName?: string;
208
+ }
209
+ /**
210
+ * AdvancedSearchBar component that provides the main search interface.
211
+ * Combines search input with results dropdown in a compound pattern.
212
+ *
213
+ * @example
214
+ * ```tsx
215
+ * <AdvancedSearchBar>
216
+ * <SearchInput placeholder="Search destinations..." />
217
+ * <SearchResults />
218
+ * </AdvancedSearchBar>
219
+ * ```
220
+ */
221
+ declare const AdvancedSearchBar: React.ForwardRefExoticComponent<AdvancedSearchBarProps & React.RefAttributes<HTMLDivElement>>;
222
+ /**
223
+ * Props for the SearchSection component.
224
+ * Used in compound pattern to create organized sections of search results.
225
+ */
226
+ interface SearchSectionProps extends React.HTMLAttributes<HTMLDivElement> {
227
+ /** Title displayed above the section results */
228
+ title?: string;
229
+ /** Maximum number of results to show in this section */
230
+ maxResults?: number;
231
+ /** Whether to show a "Show more" button */
232
+ showMore?: boolean;
233
+ /** Callback function called when "Show more" is clicked */
234
+ onShowMore?: () => void;
235
+ }
236
+ /**
237
+ * SearchSection component for organizing search results into sections.
238
+ * Used in compound pattern to create structured result displays.
239
+ *
240
+ * @example
241
+ * ```tsx
242
+ * <SearchSection title="Popular Searches" showMore={true} onShowMore={handleShowMore}>
243
+ * <SearchItem result={popularResult1} />
244
+ * <SearchItem result={popularResult2} />
245
+ * </SearchSection>
246
+ * ```
247
+ */
248
+ declare const SearchSection: React.ForwardRefExoticComponent<SearchSectionProps & React.RefAttributes<HTMLDivElement>>;
249
+ /**
250
+ * Props for the SearchItem component.
251
+ * Used in compound pattern to render individual search result items.
252
+ */
253
+ interface SearchItemProps extends React.HTMLAttributes<HTMLDivElement> {
254
+ /** The search result data to display */
255
+ result?: SearchResult;
256
+ /** Callback function called when the item is clicked */
257
+ onClick?: () => void;
258
+ }
259
+ /**
260
+ * SearchItem component for rendering individual search result items.
261
+ * Can be used with result data or custom children in compound pattern.
262
+ *
263
+ * @example
264
+ * ```tsx
265
+ * <SearchItem result={searchResult} />
266
+ *
267
+ * // Or with custom children
268
+ * <SearchItem onClick={handleClick}>
269
+ * <div>Custom result display</div>
270
+ * </SearchItem>
271
+ * ```
272
+ */
273
+ declare const SearchItem: React.ForwardRefExoticComponent<SearchItemProps & React.RefAttributes<HTMLDivElement>>;
274
+
275
+ /**
276
+ * Wrapper component for documentation and preview purposes.
277
+ * Provides a complete search implementation with mock data for testing and demos.
278
+ *
279
+ * @deprecated Demo-only helper. Prefer composing AdvancedSearchProvider,
280
+ * AdvancedSearchBar, SearchInput, and SearchResults in application code.
281
+ *
282
+ * @param props - Configuration props for the search wrapper
283
+ * @returns Complete search component with mock functionality
284
+ *
285
+ * @example
286
+ * ```tsx
287
+ * <AdvancedSearchBarWrapper
288
+ * emptyStateBehaviour="show-all-results"
289
+ * size="lg"
290
+ * variant="default"
291
+ * useCustomTrigger={false}
292
+ * />
293
+ * ```
294
+ */
295
+ declare function AdvancedSearchBarWrapper(props?: {
296
+ /** Minimum number of characters required before triggering search */
297
+ minQueryLength?: number;
298
+ /** Behaviour when search results are empty or query is too short */
299
+ emptyStateBehaviour?: 'show-empty-message' | 'hide-until-min-chars' | 'show-all-results';
300
+ /** Size variant for the search input */
301
+ size?: 'sm' | 'md' | 'lg' | 'xl';
302
+ /** Visual variant for the search input */
303
+ variant?: 'default' | 'ghost' | 'filled';
304
+ /** Whether to use a custom trigger button instead of input */
305
+ useCustomTrigger?: boolean;
306
+ }): react_jsx_runtime.JSX.Element;
307
+
308
+ export { AdvancedSearchBar, type AdvancedSearchBarProps, AdvancedSearchBarWrapper, AdvancedSearchProvider, type AdvancedSearchProviderProps, SearchInput as Input, SearchItem as Item, AdvancedSearchProvider as Provider, SearchResults as Results, AdvancedSearchBar as Root, SearchInput, type SearchInputProps, SearchItem, type SearchItemProps, SearchResults, type SearchResultsProps, SearchSection, type SearchSectionProps, SearchTrigger, type SearchTriggerProps, SearchSection as Section, SearchTrigger as Trigger, searchInputWrapperVariants, searchResultsVariants };
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ AdvancedSearchBar,
5
+ AdvancedSearchBarWrapper,
6
+ AdvancedSearchProvider,
7
+ SearchInput,
8
+ SearchItem,
9
+ SearchResults,
10
+ SearchSection,
11
+ SearchTrigger,
12
+ searchInputWrapperVariants,
13
+ searchResultsVariants
14
+ } from "../../chunk-P3GSYR7O.js";
15
+ export {
16
+ AdvancedSearchBar,
17
+ AdvancedSearchBarWrapper,
18
+ AdvancedSearchProvider,
19
+ SearchInput as Input,
20
+ SearchItem as Item,
21
+ AdvancedSearchProvider as Provider,
22
+ SearchResults as Results,
23
+ AdvancedSearchBar as Root,
24
+ SearchInput,
25
+ SearchItem,
26
+ SearchResults,
27
+ SearchSection,
28
+ SearchTrigger,
29
+ SearchSection as Section,
30
+ SearchTrigger as Trigger,
31
+ searchInputWrapperVariants,
32
+ searchResultsVariants
33
+ };
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Button } from '@foundrykit/primitives';
3
+ import * as React from 'react';
4
+ import { DayPicker, DayButton } from 'react-day-picker';
5
+
6
+ /**
7
+ * Themed wrapper around `react-day-picker`'s `DayPicker`, styled with FoundryKit
8
+ * design tokens. Accepts all `DayPicker` props (`mode`, `selected`, `onSelect`,
9
+ * etc.) plus `buttonVariant` to control the nav button style.
10
+ */
11
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
12
+ buttonVariant?: React.ComponentProps<typeof Button>['variant'];
13
+ }): react_jsx_runtime.JSX.Element;
14
+ /**
15
+ * Individual day cell button used by {@link Calendar}. Applies selected/range
16
+ * data attributes for styling and auto-focuses when the day is focused.
17
+ */
18
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
19
+
20
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ Calendar,
5
+ CalendarDayButton
6
+ } from "../../chunk-UG7YS3D5.js";
7
+ export {
8
+ Calendar,
9
+ CalendarDayButton
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,40 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Button } from '@foundrykit/primitives';
3
+ import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
+ import * as React from 'react';
5
+
6
+ type CarouselApi = UseEmblaCarouselType[1];
7
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
8
+ type CarouselOptions = UseCarouselParameters[0];
9
+ type CarouselPlugin = UseCarouselParameters[1];
10
+ type CarouselProps = {
11
+ opts?: CarouselOptions;
12
+ plugins?: CarouselPlugin;
13
+ orientation?: 'horizontal' | 'vertical';
14
+ setApi?: (api: CarouselApi) => void;
15
+ };
16
+ /**
17
+ * Carousel root that provides Embla state to its parts.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Carousel>
22
+ * <CarouselContent>
23
+ * <CarouselItem>Slide 1</CarouselItem>
24
+ * </CarouselContent>
25
+ * <CarouselPrevious />
26
+ * <CarouselNext />
27
+ * </Carousel>
28
+ * ```
29
+ */
30
+ declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<'div'> & CarouselProps): react_jsx_runtime.JSX.Element;
31
+ /** Scrollable track that holds the carousel items. */
32
+ declare function CarouselContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
33
+ /** A single slide within a {@link CarouselContent}. */
34
+ declare function CarouselItem({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
35
+ /** Button that scrolls the carousel to the previous slide. */
36
+ declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
37
+ /** Button that scrolls the carousel to the next slide. */
38
+ declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
39
+
40
+ export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ Carousel,
5
+ CarouselContent,
6
+ CarouselItem,
7
+ CarouselNext,
8
+ CarouselPrevious
9
+ } from "../../chunk-B5ZTF5MZ.js";
10
+ export {
11
+ Carousel,
12
+ CarouselContent,
13
+ CarouselItem,
14
+ CarouselNext,
15
+ CarouselPrevious
16
+ };
17
+ //# sourceMappingURL=index.js.map