@foundrykit/components 0.1.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +24 -28
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/command/config.ts +63 -24
- package/src/components/command/index.tsx +45 -45
- package/src/components/pagination/config.ts +220 -46
- package/src/index.ts +9 -1
- package/.turbo/turbo-build.log +0 -18
- package/.turbo/turbo-type-check.log +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @foundrykit/components
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Version alignment push
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @foundrykit/primitives@1.0.0
|
|
13
|
+
- @foundrykit/types@1.0.0
|
|
14
|
+
- @foundrykit/utils@1.0.0
|
|
15
|
+
|
|
16
|
+
## 0.1.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updating versions to ensure they are inline
|
|
21
|
+
- Updated dependencies [015ff5f]
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @foundrykit/types@0.1.2
|
|
24
|
+
- @foundrykit/primitives@0.1.2
|
|
25
|
+
- @foundrykit/utils@0.1.2
|
|
26
|
+
|
|
3
27
|
## 0.1.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @foundrykit/components
|
|
2
2
|
|
|
3
|
-
A collection of pre-built, styled React components built on top of
|
|
3
|
+
A collection of pre-built, styled React components built on top of
|
|
4
|
+
`@foundrykit/primitives`. These components provide ready-to-use UI elements with
|
|
5
|
+
consistent styling and behavior.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
@@ -19,11 +21,13 @@ pnpm add @foundrykit/components
|
|
|
19
21
|
## Available Components
|
|
20
22
|
|
|
21
23
|
### Data Entry
|
|
24
|
+
|
|
22
25
|
- **Calendar** - Date picker calendar component
|
|
23
26
|
- **Date Picker** - Complete date selection interface
|
|
24
27
|
- **Search Bar** - Search input with suggestions and filters
|
|
25
28
|
|
|
26
29
|
### Navigation
|
|
30
|
+
|
|
27
31
|
- **Command** - Command palette interface for keyboard navigation
|
|
28
32
|
- **Pagination** - Page navigation with configurable page sizes
|
|
29
33
|
|
|
@@ -32,28 +36,23 @@ pnpm add @foundrykit/components
|
|
|
32
36
|
### Basic Example
|
|
33
37
|
|
|
34
38
|
```tsx
|
|
35
|
-
import { Calendar } from '@foundrykit/components/calendar'
|
|
36
|
-
import { DatePicker } from '@foundrykit/components/date-picker'
|
|
37
|
-
import { SearchBar } from '@foundrykit/components/search-bar'
|
|
39
|
+
import { Calendar } from '@foundrykit/components/calendar';
|
|
40
|
+
import { DatePicker } from '@foundrykit/components/date-picker';
|
|
41
|
+
import { SearchBar } from '@foundrykit/components/search-bar';
|
|
38
42
|
|
|
39
43
|
function MyApp() {
|
|
40
44
|
return (
|
|
41
45
|
<div>
|
|
42
|
-
<SearchBar
|
|
43
|
-
placeholder=
|
|
44
|
-
onSearch={
|
|
45
|
-
/>
|
|
46
|
-
|
|
47
|
-
<DatePicker
|
|
48
|
-
onDateSelect={(date) => console.log(date)}
|
|
49
|
-
/>
|
|
50
|
-
|
|
51
|
-
<Calendar
|
|
52
|
-
mode="single"
|
|
53
|
-
onSelect={(date) => console.log(date)}
|
|
46
|
+
<SearchBar
|
|
47
|
+
placeholder='Search...'
|
|
48
|
+
onSearch={query => console.log(query)}
|
|
54
49
|
/>
|
|
50
|
+
|
|
51
|
+
<DatePicker onDateSelect={date => console.log(date)} />
|
|
52
|
+
|
|
53
|
+
<Calendar mode='single' onSelect={date => console.log(date)} />
|
|
55
54
|
</div>
|
|
56
|
-
)
|
|
55
|
+
);
|
|
57
56
|
}
|
|
58
57
|
```
|
|
59
58
|
|
|
@@ -68,7 +67,7 @@ import { Calendar } from '@foundrykit/components/calendar'
|
|
|
68
67
|
<Calendar />
|
|
69
68
|
|
|
70
69
|
// Override with custom configuration
|
|
71
|
-
<Calendar
|
|
70
|
+
<Calendar
|
|
72
71
|
className="custom-calendar"
|
|
73
72
|
disabled={false}
|
|
74
73
|
mode="range"
|
|
@@ -80,19 +79,16 @@ import { Calendar } from '@foundrykit/components/calendar'
|
|
|
80
79
|
Components come with default styling but can be customized:
|
|
81
80
|
|
|
82
81
|
```tsx
|
|
83
|
-
import { SearchBar } from '@foundrykit/components/search-bar'
|
|
84
|
-
import { cn } from '@foundrykit/utils'
|
|
82
|
+
import { SearchBar } from '@foundrykit/components/search-bar';
|
|
83
|
+
import { cn } from '@foundrykit/utils';
|
|
85
84
|
|
|
86
85
|
function CustomSearchBar({ className, ...props }) {
|
|
87
86
|
return (
|
|
88
|
-
<SearchBar
|
|
89
|
-
className={cn(
|
|
90
|
-
"border-2 border-blue-500 rounded-lg",
|
|
91
|
-
className
|
|
92
|
-
)}
|
|
87
|
+
<SearchBar
|
|
88
|
+
className={cn('rounded-lg border-2 border-blue-500', className)}
|
|
93
89
|
{...props}
|
|
94
90
|
/>
|
|
95
|
-
)
|
|
91
|
+
);
|
|
96
92
|
}
|
|
97
93
|
```
|
|
98
94
|
|
|
@@ -139,10 +135,10 @@ import { Calendar as CalendarPrimitive } from '@foundrykit/primitives/calendar'
|
|
|
139
135
|
Components work with your existing theme system:
|
|
140
136
|
|
|
141
137
|
```tsx
|
|
142
|
-
import { SearchBar } from '@foundrykit/components/search-bar'
|
|
138
|
+
import { SearchBar } from '@foundrykit/components/search-bar';
|
|
143
139
|
|
|
144
140
|
// Components automatically use your theme tokens
|
|
145
|
-
<SearchBar className=
|
|
141
|
+
<SearchBar className='bg-background text-foreground' />;
|
|
146
142
|
```
|
|
147
143
|
|
|
148
144
|
### Variant System
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,6 @@ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$
|
|
|
51
51
|
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
52
52
|
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
53
53
|
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
54
|
-
declare function CommandShortcut({ className, ...props }: React.ComponentProps<
|
|
54
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
55
55
|
|
|
56
56
|
export { Calendar, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchBar };
|
package/dist/index.js
CHANGED
|
@@ -488,7 +488,7 @@ function CommandDialog({
|
|
|
488
488
|
{
|
|
489
489
|
className: cn5("overflow-hidden p-0", className),
|
|
490
490
|
showCloseButton,
|
|
491
|
-
children: /* @__PURE__ */ jsx5(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]
|
|
491
|
+
children: /* @__PURE__ */ jsx5(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
492
492
|
}
|
|
493
493
|
)
|
|
494
494
|
] });
|
|
@@ -509,7 +509,7 @@ function CommandInput({
|
|
|
509
509
|
{
|
|
510
510
|
"data-slot": "command-input",
|
|
511
511
|
className: cn5(
|
|
512
|
-
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm
|
|
512
|
+
"placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",
|
|
513
513
|
className
|
|
514
514
|
),
|
|
515
515
|
...props
|
|
@@ -528,7 +528,7 @@ function CommandList({
|
|
|
528
528
|
{
|
|
529
529
|
"data-slot": "command-list",
|
|
530
530
|
className: cn5(
|
|
531
|
-
"max-h-[300px] scroll-py-1 overflow-
|
|
531
|
+
"max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",
|
|
532
532
|
className
|
|
533
533
|
),
|
|
534
534
|
...props
|
|
@@ -585,7 +585,7 @@ function CommandItem({
|
|
|
585
585
|
{
|
|
586
586
|
"data-slot": "command-item",
|
|
587
587
|
className: cn5(
|
|
588
|
-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm
|
|
588
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
589
589
|
className
|
|
590
590
|
),
|
|
591
591
|
...props
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/search-bar/index.tsx","../src/components/date-picker/index.tsx","../src/components/calendar/index.tsx","../src/components/pagination/index.tsx","../src/components/command/index.tsx","../src/index.ts"],"sourcesContent":["import * as React from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\n\nexport interface SearchBarProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n onSearch?: (query: string) => void;\n placeholder?: string;\n className?: string;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nconst SearchBar = React.forwardRef<HTMLInputElement, SearchBarProps>(\n (\n {\n className,\n onSearch,\n placeholder = 'Search...',\n value: externalValue,\n onChange: externalOnChange,\n ...props\n },\n ref\n ) => {\n const [internalQuery, setInternalQuery] = React.useState('');\n\n // Use external value if provided, otherwise use internal state\n const query = externalValue !== undefined ? externalValue : internalQuery;\n const isControlled = externalValue !== undefined;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n\n if (!isControlled) {\n setInternalQuery(value);\n }\n\n onSearch?.(value);\n externalOnChange?.(e);\n };\n\n return (\n <div className={cn('relative', className)}>\n <Search className='text-muted-foreground absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2' />\n <Input\n ref={ref}\n type='search'\n placeholder={placeholder}\n value={query}\n onChange={handleChange}\n className='pl-10'\n {...props}\n />\n </div>\n );\n }\n);\n\nSearchBar.displayName = 'SearchBar';\n\nexport { SearchBar };\n","import * as React from 'react';\nimport { Calendar as CalendarIcon } from 'lucide-react';\nimport { format } from 'date-fns';\n\nimport { Button } from '@foundrykit/primitives';\nimport { Input } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\n\nexport interface DatePickerProps {\n value?: Date;\n onValueChange?: (date: Date | undefined) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n}\n\nconst DatePicker = React.forwardRef<HTMLDivElement, DatePickerProps>(\n (\n { value, onValueChange, placeholder = 'Pick a date', className, disabled },\n ref\n ) => {\n const [open, setOpen] = React.useState(false);\n const [selectedDate, setSelectedDate] = React.useState<Date | undefined>(\n value\n );\n\n const handleDateSelect = (date: Date) => {\n setSelectedDate(date);\n onValueChange?.(date);\n setOpen(false);\n };\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n if (inputValue) {\n const date = new Date(inputValue);\n if (!isNaN(date.getTime())) {\n setSelectedDate(date);\n onValueChange?.(date);\n }\n } else {\n setSelectedDate(undefined);\n onValueChange?.(undefined);\n }\n };\n\n const generateCalendarDays = () => {\n const today = new Date();\n const currentMonth = selectedDate\n ? selectedDate.getMonth()\n : today.getMonth();\n const currentYear = selectedDate\n ? selectedDate.getFullYear()\n : today.getFullYear();\n\n const firstDay = new Date(currentYear, currentMonth, 1);\n const lastDay = new Date(currentYear, currentMonth + 1, 0);\n const daysInMonth = lastDay.getDate();\n const startingDayOfWeek = firstDay.getDay();\n\n const days = [];\n\n // Add empty cells for days before the first day of the month\n for (let i = 0; i < startingDayOfWeek; i++) {\n days.push(null);\n }\n\n // Add days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n days.push(new Date(currentYear, currentMonth, day));\n }\n\n return days;\n };\n\n const calendarDays = generateCalendarDays();\n const weekDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\n return (\n <div className={cn('relative', className)} ref={ref}>\n <div className='flex gap-2'>\n <Input\n type='date'\n value={selectedDate ? format(selectedDate, 'yyyy-MM-dd') : ''}\n onChange={handleInputChange}\n placeholder={placeholder}\n disabled={disabled}\n className='flex-1'\n />\n <Button\n variant='outline'\n onClick={() => setOpen(!open)}\n disabled={disabled}\n className='px-3'\n >\n <CalendarIcon className='h-4 w-4' />\n </Button>\n </div>\n\n {open && (\n <div className='bg-popover absolute top-full z-50 mt-1 w-80 rounded-md border p-3 shadow-md'>\n <div className='mb-2 grid grid-cols-7 gap-1 text-center text-sm font-medium'>\n {weekDays.map(day => (\n <div key={day} className='p-1'>\n {day}\n </div>\n ))}\n </div>\n <div className='grid grid-cols-7 gap-1'>\n {calendarDays.map((day, index) => (\n <button\n key={index}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground rounded p-2 text-sm',\n day &&\n selectedDate &&\n day.toDateString() === selectedDate.toDateString()\n ? 'bg-primary text-primary-foreground'\n : day && day.toDateString() === new Date().toDateString()\n ? 'bg-muted'\n : 'text-muted-foreground'\n )}\n onClick={() => day && handleDateSelect(day)}\n disabled={!day}\n >\n {day ? day.getDate() : ''}\n </button>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\nexport { DatePicker };\n","'use client';\n\nimport * as React from 'react';\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from 'lucide-react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { Button, buttonVariants } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\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 'flex gap-4 flex-col md:flex-row relative',\n defaultClassNames.months\n ),\n month: cn('flex flex-col w-full gap-4', defaultClassNames.month),\n nav: cn(\n 'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n 'absolute bg-popover inset-0 opacity-0',\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>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 rounded-md flex-1 font-normal text-[0.8rem] select-none',\n defaultClassNames.weekday\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn(\n 'select-none w-(--cell-size)',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-[0.8rem] select-none text-muted-foreground',\n defaultClassNames.week_number\n ),\n day: cn(\n 'relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',\n defaultClassNames.day\n ),\n range_start: cn(\n 'rounded-l-md bg-accent',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', 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='size-(--cell-size) flex items-center justify-center text-center'>\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\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 min-w-(--cell-size) flex aspect-square size-auto w-full flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n","import * as React from 'react';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from 'lucide-react';\n\nimport { cn } from '@foundrykit/utils';\nimport { Button, buttonVariants } from '@foundrykit/primitives';\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({\n className,\n ...props\n}: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='pagination-content'\n className={cn('flex flex-row items-center gap-1', 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({\n className,\n isActive,\n size = 'icon',\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot='pagination-link'\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className\n )}\n {...props}\n />\n );\n}\n\nfunction PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label='Go to previous page'\n size='default'\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className='hidden sm:block'>Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label='Go to next page'\n size='default'\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className='hidden sm:block'>Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot='pagination-ellipsis'\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className='size-4' />\n <span className='sr-only'>More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { SearchIcon } from \"lucide-react\"\n\nimport { cn } from \"@foundrykit/utils\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@foundrykit/primitives\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"bg-border -mx-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","// Export all components\nexport { SearchBar } from './components/search-bar/index.js';\nexport { DatePicker } from './components/date-picker/index.js';\nexport { Calendar } from './components/calendar/index.js';\nexport { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis } from './components/pagination/index.js';\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n} from './components/command/index.js';\n\n// Export utilities from utils package\nexport { cn } from '@foundrykit/utils';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,cAAc;AAEvB,SAAS,aAAa;AACtB,SAAS,UAAU;AAyCb,SACE,KADF;AA9BN,IAAM,YAAkB;AAAA,EACtB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,OAAO;AAAA,IACP,UAAU;AAAA,IACV,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,CAAC,eAAe,gBAAgB,IAAU,eAAS,EAAE;AAG3D,UAAM,QAAQ,kBAAkB,SAAY,gBAAgB;AAC5D,UAAM,eAAe,kBAAkB;AAEvC,UAAM,eAAe,CAAC,MAA2C;AAC/D,YAAM,QAAQ,EAAE,OAAO;AAEvB,UAAI,CAAC,cAAc;AACjB,yBAAiB,KAAK;AAAA,MACxB;AAEA,iBAAW,KAAK;AAChB,yBAAmB,CAAC;AAAA,IACtB;AAEA,WACE,qBAAC,SAAI,WAAW,GAAG,YAAY,SAAS,GACtC;AAAA,0BAAC,UAAO,WAAU,0EAAyE;AAAA,MAC3F;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,MAAK;AAAA,UACL;AAAA,UACA,OAAO;AAAA,UACP,UAAU;AAAA,UACV,WAAU;AAAA,UACT,GAAG;AAAA;AAAA,MACN;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,UAAU,cAAc;;;AC7DxB,YAAYA,YAAW;AACvB,SAAS,YAAY,oBAAoB;AACzC,SAAS,cAAc;AAEvB,SAAS,cAAc;AACvB,SAAS,SAAAC,cAAa;AACtB,SAAS,MAAAC,WAAU;AA0EX,SACE,OAAAC,MADF,QAAAC,aAAA;AAhER,IAAM,aAAmB;AAAA,EACvB,CACE,EAAE,OAAO,eAAe,cAA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AAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA,GAAG;AACL,GAA4D;AAC1D,SACE,gBAAAC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,WAAWD,IAAG,wBAAwB,SAAS;AAAA,MAC9C,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,GAAG;AACL,GAAuD;AACrD,SACE,gBAAAC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,WAAWD;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA,GAAG;AACL,GAAiC;AAC/B,SACE,gBAAAC;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWD;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;ACzJA,SAAS,MAAAG,WAAU;","names":["React","Input","cn","jsx","jsxs","React","Button","cn","jsx","className","props","ChevronLeftIcon","ChevronRightIcon","cn","buttonVariants","jsx","jsxs","cn","jsx","jsxs","cn"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/search-bar/index.tsx","../src/components/date-picker/index.tsx","../src/components/calendar/index.tsx","../src/components/pagination/index.tsx","../src/components/command/index.tsx","../src/index.ts"],"sourcesContent":["import * as React from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\n\nexport interface SearchBarProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n onSearch?: (query: string) => void;\n placeholder?: string;\n className?: string;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nconst SearchBar = React.forwardRef<HTMLInputElement, SearchBarProps>(\n (\n {\n className,\n onSearch,\n placeholder = 'Search...',\n value: externalValue,\n onChange: externalOnChange,\n ...props\n },\n ref\n ) => {\n const [internalQuery, setInternalQuery] = React.useState('');\n\n // Use external value if provided, otherwise use internal state\n const query = externalValue !== undefined ? externalValue : internalQuery;\n const isControlled = externalValue !== undefined;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n\n if (!isControlled) {\n setInternalQuery(value);\n }\n\n onSearch?.(value);\n externalOnChange?.(e);\n };\n\n return (\n <div className={cn('relative', className)}>\n <Search className='text-muted-foreground absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2' />\n <Input\n ref={ref}\n type='search'\n placeholder={placeholder}\n value={query}\n onChange={handleChange}\n className='pl-10'\n {...props}\n />\n </div>\n );\n }\n);\n\nSearchBar.displayName = 'SearchBar';\n\nexport { SearchBar };\n","import * as React from 'react';\nimport { Calendar as CalendarIcon } from 'lucide-react';\nimport { format } from 'date-fns';\n\nimport { Button } from '@foundrykit/primitives';\nimport { Input } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\n\nexport interface DatePickerProps {\n value?: Date;\n onValueChange?: (date: Date | undefined) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n}\n\nconst DatePicker = React.forwardRef<HTMLDivElement, DatePickerProps>(\n (\n { value, onValueChange, placeholder = 'Pick a date', className, disabled },\n ref\n ) => {\n const [open, setOpen] = React.useState(false);\n const [selectedDate, setSelectedDate] = React.useState<Date | undefined>(\n value\n );\n\n const handleDateSelect = (date: Date) => {\n setSelectedDate(date);\n onValueChange?.(date);\n setOpen(false);\n };\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n if (inputValue) {\n const date = new Date(inputValue);\n if (!isNaN(date.getTime())) {\n setSelectedDate(date);\n onValueChange?.(date);\n }\n } else {\n setSelectedDate(undefined);\n onValueChange?.(undefined);\n }\n };\n\n const generateCalendarDays = () => {\n const today = new Date();\n const currentMonth = selectedDate\n ? selectedDate.getMonth()\n : today.getMonth();\n const currentYear = selectedDate\n ? selectedDate.getFullYear()\n : today.getFullYear();\n\n const firstDay = new Date(currentYear, currentMonth, 1);\n const lastDay = new Date(currentYear, currentMonth + 1, 0);\n const daysInMonth = lastDay.getDate();\n const startingDayOfWeek = firstDay.getDay();\n\n const days = [];\n\n // Add empty cells for days before the first day of the month\n for (let i = 0; i < startingDayOfWeek; i++) {\n days.push(null);\n }\n\n // Add days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n days.push(new Date(currentYear, currentMonth, day));\n }\n\n return days;\n };\n\n const calendarDays = generateCalendarDays();\n const weekDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\n return (\n <div className={cn('relative', className)} ref={ref}>\n <div className='flex gap-2'>\n <Input\n type='date'\n value={selectedDate ? format(selectedDate, 'yyyy-MM-dd') : ''}\n onChange={handleInputChange}\n placeholder={placeholder}\n disabled={disabled}\n className='flex-1'\n />\n <Button\n variant='outline'\n onClick={() => setOpen(!open)}\n disabled={disabled}\n className='px-3'\n >\n <CalendarIcon className='h-4 w-4' />\n </Button>\n </div>\n\n {open && (\n <div className='bg-popover absolute top-full z-50 mt-1 w-80 rounded-md border p-3 shadow-md'>\n <div className='mb-2 grid grid-cols-7 gap-1 text-center text-sm font-medium'>\n {weekDays.map(day => (\n <div key={day} className='p-1'>\n {day}\n </div>\n ))}\n </div>\n <div className='grid grid-cols-7 gap-1'>\n {calendarDays.map((day, index) => (\n <button\n key={index}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground rounded p-2 text-sm',\n day &&\n selectedDate &&\n day.toDateString() === selectedDate.toDateString()\n ? 'bg-primary text-primary-foreground'\n : day && day.toDateString() === new Date().toDateString()\n ? 'bg-muted'\n : 'text-muted-foreground'\n )}\n onClick={() => day && handleDateSelect(day)}\n disabled={!day}\n >\n {day ? day.getDate() : ''}\n </button>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\nexport { DatePicker };\n","'use client';\n\nimport * as React from 'react';\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from 'lucide-react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { Button, buttonVariants } from '@foundrykit/primitives';\nimport { cn } from '@foundrykit/utils';\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 'flex gap-4 flex-col md:flex-row relative',\n defaultClassNames.months\n ),\n month: cn('flex flex-col w-full gap-4', defaultClassNames.month),\n nav: cn(\n 'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n 'absolute bg-popover inset-0 opacity-0',\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>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 rounded-md flex-1 font-normal text-[0.8rem] select-none',\n defaultClassNames.weekday\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn(\n 'select-none w-(--cell-size)',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-[0.8rem] select-none text-muted-foreground',\n defaultClassNames.week_number\n ),\n day: cn(\n 'relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',\n defaultClassNames.day\n ),\n range_start: cn(\n 'rounded-l-md bg-accent',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', 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='size-(--cell-size) flex items-center justify-center text-center'>\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\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 min-w-(--cell-size) flex aspect-square size-auto w-full flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n","import * as React from 'react';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from 'lucide-react';\n\nimport { cn } from '@foundrykit/utils';\nimport { Button, buttonVariants } from '@foundrykit/primitives';\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({\n className,\n ...props\n}: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='pagination-content'\n className={cn('flex flex-row items-center gap-1', 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({\n className,\n isActive,\n size = 'icon',\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot='pagination-link'\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className\n )}\n {...props}\n />\n );\n}\n\nfunction PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label='Go to previous page'\n size='default'\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className='hidden sm:block'>Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label='Go to next page'\n size='default'\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className='hidden sm:block'>Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot='pagination-ellipsis'\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className='size-4' />\n <span className='sr-only'>More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\n\nimport { cn } from '@foundrykit/utils';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '@foundrykit/primitives';\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot='command'\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className='sr-only'>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className='[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot='command-input-wrapper'\n className='flex h-9 items-center gap-2 border-b px-3'\n >\n <SearchIcon className='size-4 shrink-0 opacity-50' />\n <CommandPrimitive.Input\n data-slot='command-input'\n className={cn(\n 'placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot='command-list'\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot='command-empty'\n className='py-6 text-center text-sm'\n {...props}\n />\n );\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot='command-group'\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot='command-separator'\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot='command-item'\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot='command-shortcut'\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","// Export all components\nexport { SearchBar } from './components/search-bar/index.js';\nexport { DatePicker } from './components/date-picker/index.js';\nexport { Calendar } from './components/calendar/index.js';\nexport {\n Pagination,\n PaginationContent,\n PaginationItem,\n PaginationLink,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n} from './components/pagination/index.js';\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n} from './components/command/index.js';\n\n// Export utilities from utils package\nexport { cn } from '@foundrykit/utils';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,cAAc;AAEvB,SAAS,aAAa;AACtB,SAAS,UAAU;AAyCb,SACE,KADF;AA9BN,IAAM,YAAkB;AAAA,EACtB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,OAAO;AAAA,IACP,UAAU;AAAA,IACV,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,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WAAWD;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA,GAAG;AACL,GAAiC;AAC/B,SACE,gBAAAC;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWD;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;ACjJA,SAAS,MAAAG,WAAU;","names":["React","Input","cn","jsx","jsxs","React","Button","cn","jsx","className","props","ChevronLeftIcon","ChevronRightIcon","cn","buttonVariants","jsx","jsxs","cn","jsx","jsxs","cn"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foundrykit/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"react-day-picker": "^9.9.0",
|
|
27
27
|
"react-dom": "^19.1.1",
|
|
28
28
|
"tailwind-merge": "^3.3.1",
|
|
29
|
-
"@foundrykit/primitives": "0.
|
|
30
|
-
"@foundrykit/types": "0.
|
|
31
|
-
"@foundrykit/utils": "0.
|
|
29
|
+
"@foundrykit/primitives": "1.0.0",
|
|
30
|
+
"@foundrykit/types": "1.0.0",
|
|
31
|
+
"@foundrykit/utils": "1.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.19.9",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"eslint": "^9.0.0",
|
|
38
38
|
"tsup": "^8.0.0",
|
|
39
39
|
"typescript": "^5.9.2",
|
|
40
|
-
"@foundrykit/eslint-config": "0.
|
|
41
|
-
"@foundrykit/typescript-config": "0.
|
|
40
|
+
"@foundrykit/eslint-config": "1.0.0",
|
|
41
|
+
"@foundrykit/typescript-config": "1.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^19.1.1",
|
|
@@ -2,7 +2,8 @@ import { ComponentConfig } from '@foundrykit/types';
|
|
|
2
2
|
|
|
3
3
|
export const commandConfig: ComponentConfig = {
|
|
4
4
|
name: 'Command',
|
|
5
|
-
description:
|
|
5
|
+
description:
|
|
6
|
+
'A command palette component for searching and executing commands',
|
|
6
7
|
category: 'components',
|
|
7
8
|
tags: ['search', 'palette', 'commands', 'interactive', 'accessible'],
|
|
8
9
|
preview: {
|
|
@@ -14,7 +15,7 @@ export const commandConfig: ComponentConfig = {
|
|
|
14
15
|
library: 'lucide-react',
|
|
15
16
|
imports: [
|
|
16
17
|
'SearchIcon',
|
|
17
|
-
'CalendarIcon',
|
|
18
|
+
'CalendarIcon',
|
|
18
19
|
'SmileIcon',
|
|
19
20
|
'CalculatorIcon',
|
|
20
21
|
'FileIcon',
|
|
@@ -25,9 +26,9 @@ export const commandConfig: ComponentConfig = {
|
|
|
25
26
|
'FolderOpenIcon',
|
|
26
27
|
'FileSpreadsheetIcon',
|
|
27
28
|
'ZapIcon',
|
|
28
|
-
'RocketIcon'
|
|
29
|
-
]
|
|
30
|
-
}
|
|
29
|
+
'RocketIcon',
|
|
30
|
+
],
|
|
31
|
+
},
|
|
31
32
|
},
|
|
32
33
|
variants: [
|
|
33
34
|
{
|
|
@@ -88,7 +89,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
88
89
|
type: 'CalendarIcon',
|
|
89
90
|
props: { className: 'mr-2 h-4 w-4' },
|
|
90
91
|
},
|
|
91
|
-
{
|
|
92
|
+
{
|
|
93
|
+
type: 'span',
|
|
94
|
+
props: { children: 'Calendar' },
|
|
95
|
+
},
|
|
92
96
|
],
|
|
93
97
|
},
|
|
94
98
|
},
|
|
@@ -100,7 +104,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
100
104
|
type: 'SmileIcon',
|
|
101
105
|
props: { className: 'mr-2 h-4 w-4' },
|
|
102
106
|
},
|
|
103
|
-
{
|
|
107
|
+
{
|
|
108
|
+
type: 'span',
|
|
109
|
+
props: { children: 'Search Emoji' },
|
|
110
|
+
},
|
|
104
111
|
],
|
|
105
112
|
},
|
|
106
113
|
},
|
|
@@ -112,7 +119,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
112
119
|
type: 'CalculatorIcon',
|
|
113
120
|
props: { className: 'mr-2 h-4 w-4' },
|
|
114
121
|
},
|
|
115
|
-
{
|
|
122
|
+
{
|
|
123
|
+
type: 'span',
|
|
124
|
+
props: { children: 'Calculator' },
|
|
125
|
+
},
|
|
116
126
|
],
|
|
117
127
|
},
|
|
118
128
|
},
|
|
@@ -202,7 +212,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
202
212
|
type: 'FileIcon',
|
|
203
213
|
props: { className: 'mr-2 h-4 w-4' },
|
|
204
214
|
},
|
|
205
|
-
{
|
|
215
|
+
{
|
|
216
|
+
type: 'span',
|
|
217
|
+
props: { children: 'New File' },
|
|
218
|
+
},
|
|
206
219
|
{
|
|
207
220
|
type: 'CommandShortcut',
|
|
208
221
|
props: { children: '⌘N' },
|
|
@@ -218,7 +231,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
218
231
|
type: 'FolderIcon',
|
|
219
232
|
props: { className: 'mr-2 h-4 w-4' },
|
|
220
233
|
},
|
|
221
|
-
{
|
|
234
|
+
{
|
|
235
|
+
type: 'span',
|
|
236
|
+
props: { children: 'Open Folder' },
|
|
237
|
+
},
|
|
222
238
|
{
|
|
223
239
|
type: 'CommandShortcut',
|
|
224
240
|
props: { children: '⌘O' },
|
|
@@ -259,7 +275,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
259
275
|
type: 'SearchIcon',
|
|
260
276
|
props: { className: 'mr-2 h-4 w-4' },
|
|
261
277
|
},
|
|
262
|
-
{
|
|
278
|
+
{
|
|
279
|
+
type: 'span',
|
|
280
|
+
props: { children: 'Search' },
|
|
281
|
+
},
|
|
263
282
|
{
|
|
264
283
|
type: 'CommandShortcut',
|
|
265
284
|
props: { children: '⌘F' },
|
|
@@ -275,7 +294,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
275
294
|
type: 'SettingsIcon',
|
|
276
295
|
props: { className: 'mr-2 h-4 w-4' },
|
|
277
296
|
},
|
|
278
|
-
{
|
|
297
|
+
{
|
|
298
|
+
type: 'span',
|
|
299
|
+
props: { children: 'Settings' },
|
|
300
|
+
},
|
|
279
301
|
{
|
|
280
302
|
type: 'CommandShortcut',
|
|
281
303
|
props: { children: '⌘,' },
|
|
@@ -500,13 +522,17 @@ export const commandConfig: ComponentConfig = {
|
|
|
500
522
|
children: [
|
|
501
523
|
{
|
|
502
524
|
type: 'span',
|
|
503
|
-
props: {
|
|
525
|
+
props: {
|
|
526
|
+
children: 'Create new document',
|
|
527
|
+
},
|
|
504
528
|
},
|
|
505
529
|
{
|
|
506
530
|
type: 'span',
|
|
507
531
|
props: {
|
|
508
|
-
className:
|
|
509
|
-
|
|
532
|
+
className:
|
|
533
|
+
'text-xs text-muted-foreground',
|
|
534
|
+
children:
|
|
535
|
+
'Start with a blank document',
|
|
510
536
|
},
|
|
511
537
|
},
|
|
512
538
|
],
|
|
@@ -535,8 +561,10 @@ export const commandConfig: ComponentConfig = {
|
|
|
535
561
|
{
|
|
536
562
|
type: 'span',
|
|
537
563
|
props: {
|
|
538
|
-
className:
|
|
539
|
-
|
|
564
|
+
className:
|
|
565
|
+
'text-xs text-muted-foreground',
|
|
566
|
+
children:
|
|
567
|
+
'Open a recently used file',
|
|
540
568
|
},
|
|
541
569
|
},
|
|
542
570
|
],
|
|
@@ -574,7 +602,8 @@ export const commandConfig: ComponentConfig = {
|
|
|
574
602
|
{
|
|
575
603
|
type: 'span',
|
|
576
604
|
props: {
|
|
577
|
-
className:
|
|
605
|
+
className:
|
|
606
|
+
'text-xs text-muted-foreground',
|
|
578
607
|
children: 'Create a new blog post',
|
|
579
608
|
},
|
|
580
609
|
},
|
|
@@ -604,7 +633,8 @@ export const commandConfig: ComponentConfig = {
|
|
|
604
633
|
{
|
|
605
634
|
type: 'span',
|
|
606
635
|
props: {
|
|
607
|
-
className:
|
|
636
|
+
className:
|
|
637
|
+
'text-xs text-muted-foreground',
|
|
608
638
|
children: 'Create a new invoice',
|
|
609
639
|
},
|
|
610
640
|
},
|
|
@@ -686,7 +716,8 @@ export const commandConfig: ComponentConfig = {
|
|
|
686
716
|
{
|
|
687
717
|
type: 'SearchIcon',
|
|
688
718
|
props: {
|
|
689
|
-
className:
|
|
719
|
+
className:
|
|
720
|
+
'mx-auto h-8 w-8 text-muted-foreground',
|
|
690
721
|
},
|
|
691
722
|
},
|
|
692
723
|
{
|
|
@@ -715,13 +746,17 @@ export const commandConfig: ComponentConfig = {
|
|
|
715
746
|
{
|
|
716
747
|
type: 'CommandItem',
|
|
717
748
|
props: {
|
|
718
|
-
className:
|
|
749
|
+
className:
|
|
750
|
+
'aria-selected:bg-primary aria-selected:text-primary-foreground',
|
|
719
751
|
children: [
|
|
720
752
|
{
|
|
721
753
|
type: 'ZapIcon',
|
|
722
754
|
props: { className: 'mr-2 h-4 w-4' },
|
|
723
755
|
},
|
|
724
|
-
{
|
|
756
|
+
{
|
|
757
|
+
type: 'span',
|
|
758
|
+
props: { children: 'Quick Start' },
|
|
759
|
+
},
|
|
725
760
|
{
|
|
726
761
|
type: 'CommandShortcut',
|
|
727
762
|
props: { children: '⌘K' },
|
|
@@ -732,13 +767,17 @@ export const commandConfig: ComponentConfig = {
|
|
|
732
767
|
{
|
|
733
768
|
type: 'CommandItem',
|
|
734
769
|
props: {
|
|
735
|
-
className:
|
|
770
|
+
className:
|
|
771
|
+
'aria-selected:bg-primary aria-selected:text-primary-foreground',
|
|
736
772
|
children: [
|
|
737
773
|
{
|
|
738
774
|
type: 'RocketIcon',
|
|
739
775
|
props: { className: 'mr-2 h-4 w-4' },
|
|
740
776
|
},
|
|
741
|
-
{
|
|
777
|
+
{
|
|
778
|
+
type: 'span',
|
|
779
|
+
props: { children: 'Deploy' },
|
|
780
|
+
},
|
|
742
781
|
{
|
|
743
782
|
type: 'CommandShortcut',
|
|
744
783
|
props: { children: '⌘D' },
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import { Command as CommandPrimitive } from
|
|
5
|
-
import { SearchIcon } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
5
|
+
import { SearchIcon } from 'lucide-react';
|
|
6
6
|
|
|
7
|
-
import { cn } from
|
|
7
|
+
import { cn } from '@foundrykit/utils';
|
|
8
8
|
import {
|
|
9
9
|
Dialog,
|
|
10
10
|
DialogContent,
|
|
11
11
|
DialogDescription,
|
|
12
12
|
DialogHeader,
|
|
13
13
|
DialogTitle,
|
|
14
|
-
} from
|
|
14
|
+
} from '@foundrykit/primitives';
|
|
15
15
|
|
|
16
16
|
function Command({
|
|
17
17
|
className,
|
|
@@ -19,45 +19,45 @@ function Command({
|
|
|
19
19
|
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
20
20
|
return (
|
|
21
21
|
<CommandPrimitive
|
|
22
|
-
data-slot=
|
|
22
|
+
data-slot='command'
|
|
23
23
|
className={cn(
|
|
24
|
-
|
|
24
|
+
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
|
|
25
25
|
className
|
|
26
26
|
)}
|
|
27
27
|
{...props}
|
|
28
28
|
/>
|
|
29
|
-
)
|
|
29
|
+
);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function CommandDialog({
|
|
33
|
-
title =
|
|
34
|
-
description =
|
|
33
|
+
title = 'Command Palette',
|
|
34
|
+
description = 'Search for a command to run...',
|
|
35
35
|
children,
|
|
36
36
|
className,
|
|
37
37
|
showCloseButton = true,
|
|
38
38
|
...props
|
|
39
39
|
}: React.ComponentProps<typeof Dialog> & {
|
|
40
|
-
title?: string
|
|
41
|
-
description?: string
|
|
42
|
-
className?: string
|
|
43
|
-
showCloseButton?: boolean
|
|
40
|
+
title?: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
className?: string;
|
|
43
|
+
showCloseButton?: boolean;
|
|
44
44
|
}) {
|
|
45
45
|
return (
|
|
46
46
|
<Dialog {...props}>
|
|
47
|
-
<DialogHeader className=
|
|
47
|
+
<DialogHeader className='sr-only'>
|
|
48
48
|
<DialogTitle>{title}</DialogTitle>
|
|
49
49
|
<DialogDescription>{description}</DialogDescription>
|
|
50
50
|
</DialogHeader>
|
|
51
51
|
<DialogContent
|
|
52
|
-
className={cn(
|
|
52
|
+
className={cn('overflow-hidden p-0', className)}
|
|
53
53
|
showCloseButton={showCloseButton}
|
|
54
54
|
>
|
|
55
|
-
<Command className=
|
|
55
|
+
<Command className='[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>
|
|
56
56
|
{children}
|
|
57
57
|
</Command>
|
|
58
58
|
</DialogContent>
|
|
59
59
|
</Dialog>
|
|
60
|
-
)
|
|
60
|
+
);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function CommandInput({
|
|
@@ -66,20 +66,20 @@ function CommandInput({
|
|
|
66
66
|
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
67
67
|
return (
|
|
68
68
|
<div
|
|
69
|
-
data-slot=
|
|
70
|
-
className=
|
|
69
|
+
data-slot='command-input-wrapper'
|
|
70
|
+
className='flex h-9 items-center gap-2 border-b px-3'
|
|
71
71
|
>
|
|
72
|
-
<SearchIcon className=
|
|
72
|
+
<SearchIcon className='size-4 shrink-0 opacity-50' />
|
|
73
73
|
<CommandPrimitive.Input
|
|
74
|
-
data-slot=
|
|
74
|
+
data-slot='command-input'
|
|
75
75
|
className={cn(
|
|
76
|
-
|
|
76
|
+
'placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50',
|
|
77
77
|
className
|
|
78
78
|
)}
|
|
79
79
|
{...props}
|
|
80
80
|
/>
|
|
81
81
|
</div>
|
|
82
|
-
)
|
|
82
|
+
);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
function CommandList({
|
|
@@ -88,14 +88,14 @@ function CommandList({
|
|
|
88
88
|
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
89
89
|
return (
|
|
90
90
|
<CommandPrimitive.List
|
|
91
|
-
data-slot=
|
|
91
|
+
data-slot='command-list'
|
|
92
92
|
className={cn(
|
|
93
|
-
|
|
93
|
+
'max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden',
|
|
94
94
|
className
|
|
95
95
|
)}
|
|
96
96
|
{...props}
|
|
97
97
|
/>
|
|
98
|
-
)
|
|
98
|
+
);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
function CommandEmpty({
|
|
@@ -103,11 +103,11 @@ function CommandEmpty({
|
|
|
103
103
|
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
104
104
|
return (
|
|
105
105
|
<CommandPrimitive.Empty
|
|
106
|
-
data-slot=
|
|
107
|
-
className=
|
|
106
|
+
data-slot='command-empty'
|
|
107
|
+
className='py-6 text-center text-sm'
|
|
108
108
|
{...props}
|
|
109
109
|
/>
|
|
110
|
-
)
|
|
110
|
+
);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
function CommandGroup({
|
|
@@ -116,14 +116,14 @@ function CommandGroup({
|
|
|
116
116
|
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
117
117
|
return (
|
|
118
118
|
<CommandPrimitive.Group
|
|
119
|
-
data-slot=
|
|
119
|
+
data-slot='command-group'
|
|
120
120
|
className={cn(
|
|
121
|
-
|
|
121
|
+
'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',
|
|
122
122
|
className
|
|
123
123
|
)}
|
|
124
124
|
{...props}
|
|
125
125
|
/>
|
|
126
|
-
)
|
|
126
|
+
);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
function CommandSeparator({
|
|
@@ -132,11 +132,11 @@ function CommandSeparator({
|
|
|
132
132
|
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
133
133
|
return (
|
|
134
134
|
<CommandPrimitive.Separator
|
|
135
|
-
data-slot=
|
|
136
|
-
className={cn(
|
|
135
|
+
data-slot='command-separator'
|
|
136
|
+
className={cn('bg-border -mx-1 h-px', className)}
|
|
137
137
|
{...props}
|
|
138
138
|
/>
|
|
139
|
-
)
|
|
139
|
+
);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
function CommandItem({
|
|
@@ -145,30 +145,30 @@ function CommandItem({
|
|
|
145
145
|
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
146
146
|
return (
|
|
147
147
|
<CommandPrimitive.Item
|
|
148
|
-
data-slot=
|
|
148
|
+
data-slot='command-item'
|
|
149
149
|
className={cn(
|
|
150
|
-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm
|
|
150
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
151
151
|
className
|
|
152
152
|
)}
|
|
153
153
|
{...props}
|
|
154
154
|
/>
|
|
155
|
-
)
|
|
155
|
+
);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
function CommandShortcut({
|
|
159
159
|
className,
|
|
160
160
|
...props
|
|
161
|
-
}: React.ComponentProps<
|
|
161
|
+
}: React.ComponentProps<'span'>) {
|
|
162
162
|
return (
|
|
163
163
|
<span
|
|
164
|
-
data-slot=
|
|
164
|
+
data-slot='command-shortcut'
|
|
165
165
|
className={cn(
|
|
166
|
-
|
|
166
|
+
'text-muted-foreground ml-auto text-xs tracking-widest',
|
|
167
167
|
className
|
|
168
168
|
)}
|
|
169
169
|
{...props}
|
|
170
170
|
/>
|
|
171
|
-
)
|
|
171
|
+
);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
export {
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
CommandItem,
|
|
182
182
|
CommandShortcut,
|
|
183
183
|
CommandSeparator,
|
|
184
|
-
}
|
|
184
|
+
};
|
|
@@ -7,7 +7,7 @@ export const paginationConfig: ComponentConfig = {
|
|
|
7
7
|
tags: ['navigation', 'interactive', 'ui'],
|
|
8
8
|
preview: {
|
|
9
9
|
type: 'static',
|
|
10
|
-
html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><div class="flex items-center space-x-2"><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 px-3 py-2 border border-gray-300 bg-white hover:bg-gray-50">Previous</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 w-9 border border-gray-300 bg-white hover:bg-gray-50">1</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 w-9 border border-blue-500 bg-blue-500 text-white">2</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 w-9 border border-gray-300 bg-white hover:bg-gray-50">3</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 px-3 py-2 border border-gray-300 bg-white hover:bg-gray-50">Next</button></div></div>'
|
|
10
|
+
html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><div class="flex items-center space-x-2"><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 px-3 py-2 border border-gray-300 bg-white hover:bg-gray-50">Previous</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 w-9 border border-gray-300 bg-white hover:bg-gray-50">1</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 w-9 border border-blue-500 bg-blue-500 text-white">2</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 w-9 border border-gray-300 bg-white hover:bg-gray-50">3</button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 px-3 py-2 border border-gray-300 bg-white hover:bg-gray-50">Next</button></div></div>',
|
|
11
11
|
},
|
|
12
12
|
variants: [
|
|
13
13
|
{
|
|
@@ -40,16 +40,53 @@ export const paginationConfig: ComponentConfig = {
|
|
|
40
40
|
type: 'PaginationContent',
|
|
41
41
|
props: {
|
|
42
42
|
children: [
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
{
|
|
44
|
+
type: 'PaginationItem',
|
|
45
|
+
props: {
|
|
46
|
+
children: {
|
|
47
|
+
type: 'PaginationPrevious',
|
|
48
|
+
props: { href: '#' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'PaginationItem',
|
|
54
|
+
props: {
|
|
55
|
+
children: {
|
|
56
|
+
type: 'PaginationLink',
|
|
57
|
+
props: { href: '#', isActive: true, children: '1' },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'PaginationItem',
|
|
63
|
+
props: {
|
|
64
|
+
children: {
|
|
65
|
+
type: 'PaginationLink',
|
|
66
|
+
props: { href: '#', children: '2' },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'PaginationItem',
|
|
72
|
+
props: {
|
|
73
|
+
children: {
|
|
74
|
+
type: 'PaginationLink',
|
|
75
|
+
props: { href: '#', children: '3' },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'PaginationItem',
|
|
81
|
+
props: {
|
|
82
|
+
children: { type: 'PaginationNext', props: { href: '#' } },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
53
90
|
},
|
|
54
91
|
{
|
|
55
92
|
name: 'With Ellipsis',
|
|
@@ -90,19 +127,74 @@ export const paginationConfig: ComponentConfig = {
|
|
|
90
127
|
type: 'PaginationContent',
|
|
91
128
|
props: {
|
|
92
129
|
children: [
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
130
|
+
{
|
|
131
|
+
type: 'PaginationItem',
|
|
132
|
+
props: {
|
|
133
|
+
children: {
|
|
134
|
+
type: 'PaginationPrevious',
|
|
135
|
+
props: { href: '#' },
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'PaginationItem',
|
|
141
|
+
props: {
|
|
142
|
+
children: {
|
|
143
|
+
type: 'PaginationLink',
|
|
144
|
+
props: { href: '#', children: '1' },
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'PaginationItem',
|
|
150
|
+
props: {
|
|
151
|
+
children: { type: 'PaginationEllipsis', props: {} },
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'PaginationItem',
|
|
156
|
+
props: {
|
|
157
|
+
children: {
|
|
158
|
+
type: 'PaginationLink',
|
|
159
|
+
props: { href: '#', isActive: true, children: '4' },
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'PaginationItem',
|
|
165
|
+
props: {
|
|
166
|
+
children: {
|
|
167
|
+
type: 'PaginationLink',
|
|
168
|
+
props: { href: '#', children: '5' },
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
type: 'PaginationItem',
|
|
174
|
+
props: {
|
|
175
|
+
children: { type: 'PaginationEllipsis', props: {} },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
type: 'PaginationItem',
|
|
180
|
+
props: {
|
|
181
|
+
children: {
|
|
182
|
+
type: 'PaginationLink',
|
|
183
|
+
props: { href: '#', children: '10' },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: 'PaginationItem',
|
|
189
|
+
props: {
|
|
190
|
+
children: { type: 'PaginationNext', props: { href: '#' } },
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
106
198
|
},
|
|
107
199
|
{
|
|
108
200
|
name: 'Compact',
|
|
@@ -134,16 +226,58 @@ export const paginationConfig: ComponentConfig = {
|
|
|
134
226
|
type: 'PaginationContent',
|
|
135
227
|
props: {
|
|
136
228
|
children: [
|
|
137
|
-
{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
229
|
+
{
|
|
230
|
+
type: 'PaginationItem',
|
|
231
|
+
props: {
|
|
232
|
+
children: {
|
|
233
|
+
type: 'PaginationPrevious',
|
|
234
|
+
props: { href: '#' },
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
type: 'PaginationItem',
|
|
240
|
+
props: {
|
|
241
|
+
children: {
|
|
242
|
+
type: 'PaginationLink',
|
|
243
|
+
props: {
|
|
244
|
+
href: '#',
|
|
245
|
+
size: 'sm',
|
|
246
|
+
isActive: true,
|
|
247
|
+
children: '1',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
type: 'PaginationItem',
|
|
254
|
+
props: {
|
|
255
|
+
children: {
|
|
256
|
+
type: 'PaginationLink',
|
|
257
|
+
props: { href: '#', size: 'sm', children: '2' },
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
type: 'PaginationItem',
|
|
263
|
+
props: {
|
|
264
|
+
children: {
|
|
265
|
+
type: 'PaginationLink',
|
|
266
|
+
props: { href: '#', size: 'sm', children: '3' },
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
type: 'PaginationItem',
|
|
272
|
+
props: {
|
|
273
|
+
children: { type: 'PaginationNext', props: { href: '#' } },
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
147
281
|
},
|
|
148
282
|
{
|
|
149
283
|
name: 'Disabled States',
|
|
@@ -175,18 +309,58 @@ export const paginationConfig: ComponentConfig = {
|
|
|
175
309
|
type: 'PaginationContent',
|
|
176
310
|
props: {
|
|
177
311
|
children: [
|
|
178
|
-
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
312
|
+
{
|
|
313
|
+
type: 'PaginationItem',
|
|
314
|
+
props: {
|
|
315
|
+
children: {
|
|
316
|
+
type: 'PaginationPrevious',
|
|
317
|
+
props: {
|
|
318
|
+
href: '#',
|
|
319
|
+
className: 'pointer-events-none opacity-50',
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
type: 'PaginationItem',
|
|
326
|
+
props: {
|
|
327
|
+
children: {
|
|
328
|
+
type: 'PaginationLink',
|
|
329
|
+
props: { href: '#', isActive: true, children: '1' },
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
type: 'PaginationItem',
|
|
335
|
+
props: {
|
|
336
|
+
children: {
|
|
337
|
+
type: 'PaginationLink',
|
|
338
|
+
props: { href: '#', children: '2' },
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
type: 'PaginationItem',
|
|
344
|
+
props: {
|
|
345
|
+
children: {
|
|
346
|
+
type: 'PaginationLink',
|
|
347
|
+
props: { href: '#', children: '3' },
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
type: 'PaginationItem',
|
|
353
|
+
props: {
|
|
354
|
+
children: { type: 'PaginationNext', props: { href: '#' } },
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
},
|
|
189
363
|
],
|
|
190
364
|
dependencies: ['utils', 'primitives'],
|
|
191
|
-
files: ['components/pagination/index.tsx']
|
|
365
|
+
files: ['components/pagination/index.tsx'],
|
|
192
366
|
};
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
export { SearchBar } from './components/search-bar/index.js';
|
|
3
3
|
export { DatePicker } from './components/date-picker/index.js';
|
|
4
4
|
export { Calendar } from './components/calendar/index.js';
|
|
5
|
-
export {
|
|
5
|
+
export {
|
|
6
|
+
Pagination,
|
|
7
|
+
PaginationContent,
|
|
8
|
+
PaginationItem,
|
|
9
|
+
PaginationLink,
|
|
10
|
+
PaginationPrevious,
|
|
11
|
+
PaginationNext,
|
|
12
|
+
PaginationEllipsis,
|
|
13
|
+
} from './components/pagination/index.js';
|
|
6
14
|
export {
|
|
7
15
|
Command,
|
|
8
16
|
CommandDialog,
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> @foundrykit/components@0.1.0 build /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/components
|
|
4
|
-
> tsup
|
|
5
|
-
|
|
6
|
-
[34mCLI[39m Building entry: src/index.ts
|
|
7
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
-
[34mCLI[39m tsup v8.5.0
|
|
9
|
-
[34mCLI[39m Using tsup config: /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/components/tsup.config.ts
|
|
10
|
-
[34mCLI[39m Target: es2022
|
|
11
|
-
[34mCLI[39m Cleaning output folder
|
|
12
|
-
[34mESM[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[32m18.65 KB[39m
|
|
14
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m29.95 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in 12ms
|
|
16
|
-
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in 1329ms
|
|
18
|
-
DTS dist/index.d.ts 2.65 KB
|