@shefing/quickfilter 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/README.md +0 -0
- package/dist/FilterField.d.ts +8 -0
- package/dist/FilterField.d.ts.map +1 -0
- package/dist/FilterField.js +87 -0
- package/dist/FilterField.js.map +1 -0
- package/dist/QuickFilter.d.ts +9 -0
- package/dist/QuickFilter.d.ts.map +1 -0
- package/dist/QuickFilter.js +331 -0
- package/dist/QuickFilter.js.map +1 -0
- package/dist/filters/components/checkbox-filter.d.ts +12 -0
- package/dist/filters/components/checkbox-filter.d.ts.map +1 -0
- package/dist/filters/components/checkbox-filter.js +104 -0
- package/dist/filters/components/checkbox-filter.js.map +1 -0
- package/dist/filters/components/date-filter.d.ts +11 -0
- package/dist/filters/components/date-filter.d.ts.map +1 -0
- package/dist/filters/components/date-filter.js +379 -0
- package/dist/filters/components/date-filter.js.map +1 -0
- package/dist/filters/components/select-filter.d.ts +14 -0
- package/dist/filters/components/select-filter.d.ts.map +1 -0
- package/dist/filters/components/select-filter.js +223 -0
- package/dist/filters/components/select-filter.js.map +1 -0
- package/dist/filters/components/small-select-filter.d.ts +18 -0
- package/dist/filters/components/small-select-filter.d.ts.map +1 -0
- package/dist/filters/components/small-select-filter.js +120 -0
- package/dist/filters/components/small-select-filter.js.map +1 -0
- package/dist/filters/constants/date-filter-options.d.ts +6 -0
- package/dist/filters/constants/date-filter-options.d.ts.map +1 -0
- package/dist/filters/constants/date-filter-options.js +74 -0
- package/dist/filters/constants/date-filter-options.js.map +1 -0
- package/dist/filters/types/filters-type.d.ts +99 -0
- package/dist/filters/types/filters-type.d.ts.map +1 -0
- package/dist/filters/types/filters-type.js +3 -0
- package/dist/filters/types/filters-type.js.map +1 -0
- package/dist/filters/utils/date-helpers.d.ts +23 -0
- package/dist/filters/utils/date-helpers.d.ts.map +1 -0
- package/dist/filters/utils/date-helpers.js +159 -0
- package/dist/filters/utils/date-helpers.js.map +1 -0
- package/dist/filters/utils/layout-helpers.d.ts +6 -0
- package/dist/filters/utils/layout-helpers.d.ts.map +1 -0
- package/dist/filters/utils/layout-helpers.js +73 -0
- package/dist/filters/utils/layout-helpers.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +18 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +28 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +12 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +45 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.d.ts +9 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.js +126 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/checkbox.d.ts +5 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +21 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/command.d.ts +81 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +80 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/dialog.d.ts +20 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +61 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/label.d.ts +6 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +16 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/popover.d.ts +7 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +20 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +16 -0
- package/dist/ui/separator.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
5
|
+
import { DayPicker, getDefaultClassNames } from 'react-day-picker';
|
|
6
|
+
import { he } from 'date-fns/locale';
|
|
7
|
+
import { format } from 'date-fns';
|
|
8
|
+
import { cn } from '../lib/utils';
|
|
9
|
+
import { Button, buttonVariants } from './button';
|
|
10
|
+
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = 'label', buttonVariant = 'ghost', formatters, components, ...props }) {
|
|
11
|
+
const defaultClassNames = getDefaultClassNames();
|
|
12
|
+
return /*#__PURE__*/ _jsx(DayPicker, {
|
|
13
|
+
showOutsideDays: showOutsideDays,
|
|
14
|
+
locale: he,
|
|
15
|
+
className: cn('bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
16
|
+
captionLayout: captionLayout,
|
|
17
|
+
formatters: {
|
|
18
|
+
formatCaption: (date)=>format(date, 'LLLL yyyy', {
|
|
19
|
+
locale: he
|
|
20
|
+
}),
|
|
21
|
+
formatWeekdayName: (date)=>format(date, 'EEEEEE', {
|
|
22
|
+
locale: he
|
|
23
|
+
}),
|
|
24
|
+
formatMonthDropdown: (date)=>date.toLocaleString('default', {
|
|
25
|
+
month: 'short'
|
|
26
|
+
}),
|
|
27
|
+
...formatters
|
|
28
|
+
},
|
|
29
|
+
classNames: {
|
|
30
|
+
root: cn('w-fit', defaultClassNames.root),
|
|
31
|
+
months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),
|
|
32
|
+
month: cn('flex w-full flex-col gap-4', defaultClassNames.month),
|
|
33
|
+
nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),
|
|
34
|
+
button_previous: cn(buttonVariants({
|
|
35
|
+
variant: buttonVariant
|
|
36
|
+
}), 'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50', defaultClassNames.button_previous),
|
|
37
|
+
button_next: cn(buttonVariants({
|
|
38
|
+
variant: buttonVariant
|
|
39
|
+
}), 'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50', defaultClassNames.button_next),
|
|
40
|
+
month_caption: cn('flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]', defaultClassNames.month_caption),
|
|
41
|
+
dropdowns: cn('flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium', defaultClassNames.dropdowns),
|
|
42
|
+
dropdown_root: cn('has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border', defaultClassNames.dropdown_root),
|
|
43
|
+
dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),
|
|
44
|
+
caption_label: cn('select-none font-medium', captionLayout === 'label' ? 'text-sm' : '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5', defaultClassNames.caption_label),
|
|
45
|
+
table: 'w-full border-collapse',
|
|
46
|
+
weekdays: cn('flex', defaultClassNames.weekdays),
|
|
47
|
+
weekday: cn('text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal', defaultClassNames.weekday),
|
|
48
|
+
week: cn('mt-2 flex w-full', defaultClassNames.week),
|
|
49
|
+
week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),
|
|
50
|
+
week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),
|
|
51
|
+
day: cn('group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md', defaultClassNames.day),
|
|
52
|
+
range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),
|
|
53
|
+
range_middle: cn('rounded-none', defaultClassNames.range_middle),
|
|
54
|
+
range_end: cn('bg-accent rounded-r-md', defaultClassNames.range_end),
|
|
55
|
+
today: cn('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
|
|
56
|
+
outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
|
|
57
|
+
disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
|
|
58
|
+
hidden: cn('invisible', defaultClassNames.hidden),
|
|
59
|
+
...classNames
|
|
60
|
+
},
|
|
61
|
+
components: {
|
|
62
|
+
Root: ({ className, rootRef, ...props })=>{
|
|
63
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
64
|
+
"data-slot": "calendar",
|
|
65
|
+
ref: rootRef,
|
|
66
|
+
className: cn(className),
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
Chevron: ({ className, orientation, ...props })=>{
|
|
71
|
+
if (orientation === 'left') {
|
|
72
|
+
return /*#__PURE__*/ _jsx(ChevronRightIcon, {
|
|
73
|
+
className: cn('size-4', className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (orientation === 'right') {
|
|
78
|
+
return /*#__PURE__*/ _jsx(ChevronLeftIcon, {
|
|
79
|
+
className: cn('size-4', className),
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return /*#__PURE__*/ _jsx(ChevronDownIcon, {
|
|
84
|
+
className: cn('size-4', className),
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
DayButton: CalendarDayButton,
|
|
89
|
+
WeekNumber: ({ children, ...props })=>{
|
|
90
|
+
return /*#__PURE__*/ _jsx("td", {
|
|
91
|
+
...props,
|
|
92
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
93
|
+
className: "flex size-[--cell-size] items-center justify-center text-center",
|
|
94
|
+
children: children
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
...components
|
|
99
|
+
},
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
104
|
+
const defaultClassNames = getDefaultClassNames();
|
|
105
|
+
const ref = React.useRef(null);
|
|
106
|
+
React.useEffect(()=>{
|
|
107
|
+
if (modifiers.focused) ref.current?.focus();
|
|
108
|
+
}, [
|
|
109
|
+
modifiers.focused
|
|
110
|
+
]);
|
|
111
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
112
|
+
ref: ref,
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
size: "icon",
|
|
115
|
+
"data-day": day.date.toLocaleDateString(),
|
|
116
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
117
|
+
"data-range-start": modifiers.range_start,
|
|
118
|
+
"data-range-end": modifiers.range_end,
|
|
119
|
+
"data-range-middle": modifiers.range_middle,
|
|
120
|
+
className: cn('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 flex aspect-square h-auto w-full min-w-[--cell-size] 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 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', defaultClassNames.day, className),
|
|
121
|
+
...props
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export { Calendar, CalendarDayButton };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/calendar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { he } from 'date-fns/locale';\nimport { format } from 'date-fns';\n\nimport { cn } from '../lib/utils';\nimport { Button, buttonVariants } from './button';\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 locale={he}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:2rem] [[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 formatCaption: (date) => format(date, 'LLLL yyyy', { locale: he }),\n formatWeekdayName: (date) => format(date, 'EEEEEE', { locale: he }),\n\n formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\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 'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'h-[--cell-size] w-[--cell-size] select-none p-0 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 shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border',\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 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 select-none rounded-md text-[0.8rem] font-normal',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),\n week_number: cn(\n 'text-muted-foreground select-none text-[0.8rem]',\n defaultClassNames.week_number,\n ),\n day: cn(\n 'group/day relative aspect-square h-full w-full select-none p-0 text-center [&: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('bg-accent rounded-l-md', defaultClassNames.range_start),\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('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot='calendar' ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <ChevronRightIcon className={cn('size-4', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronLeftIcon className={cn('size-4', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\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\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 flex aspect-square h-auto w-full min-w-[--cell-size] 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 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"],"names":["React","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","DayPicker","getDefaultClassNames","he","format","cn","Button","buttonVariants","Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","locale","String","raw","formatCaption","date","formatWeekdayName","formatMonthDropdown","toLocaleString","month","root","months","nav","button_previous","variant","button_next","month_caption","dropdowns","dropdown_root","dropdown","caption_label","table","weekdays","weekday","week","week_number_header","week_number","day","range_start","range_middle","range_end","today","outside","disabled","hidden","Root","rootRef","div","data-slot","ref","Chevron","orientation","DayButton","CalendarDayButton","WeekNumber","children","td","modifiers","useRef","useEffect","focused","current","focus","size","data-day","toLocaleDateString","data-selected-single","selected","data-range-start","data-range-end","data-range-middle"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AAClF,SAAoBC,SAAS,EAAEC,oBAAoB,QAAQ,mBAAmB;AAE9E,SAASC,EAAE,QAAQ,kBAAkB;AACrC,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,MAAM,EAAEC,cAAc,QAAQ,WAAW;AAElD,SAASC,SAAS,EAChBC,SAAS,EACTC,UAAU,EACVC,kBAAkB,IAAI,EACtBC,gBAAgB,OAAO,EACvBC,gBAAgB,OAAO,EACvBC,UAAU,EACVC,UAAU,EACV,GAAGC,OAGJ;IACC,MAAMC,oBAAoBf;IAE1B,qBACE,KAACD;QACCU,iBAAiBA;QACjBO,QAAQf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SAAS,EACTmC,GAAG,EACHoB,SAAS,EACT,GAAGhD,OACoC;IACvC,MAAMC,oBAAoBf;IAE1B,MAAMsD,MAAM3D,MAAMoE,MAAM,CAAoB;IAC5CpE,MAAMqE,SAAS,CAAC;QACd,IAAIF,UAAUG,OAAO,EAAEX,IAAIY,OAAO,EAAEC;IACtC,GAAG;QAACL,UAAUG,OAAO;KAAC;IAEtB,qBACE,KAAC7D;QACCkD,KAAKA;QACLzB,SAAQ;QACRuC,MAAK;QACLC,YAAU3B,IAAItB,IAAI,CAACkD,kBAAkB;QACrCC,wBACET,UAAUU,QAAQ,IAClB,CAACV,UAAUnB,WAAW,IACtB,CAACmB,UAAUjB,SAAS,IACpB,CAACiB,UAAUlB,YAAY;QAEzB6B,oBAAkBX,UAAUnB,WAAW;QACvC+B,kBAAgBZ,UAAUjB,SAAS;QACnC8B,qBAAmBb,UAAUlB,YAAY;QACzCrC,WAAWJ,GACT,uwBACAY,kBAAkB2B,GAAG,EACrBnC;QAED,GAAGO,KAAK;;AAGf;AAEA,SAASR,QAAQ,EAAEoD,iBAAiB,GAAG"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
5
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/ui/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAM7D,QAAA,MAAM,QAAQ,iKAgBZ,CAAA;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
5
|
+
import { Check } from 'lucide-react';
|
|
6
|
+
import { cn } from '../lib/utils';
|
|
7
|
+
const Checkbox = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CheckboxPrimitive.Root, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
className: cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', className),
|
|
10
|
+
...props,
|
|
11
|
+
children: /*#__PURE__*/ _jsx(CheckboxPrimitive.Indicator, {
|
|
12
|
+
className: cn('flex items-center justify-center text-current'),
|
|
13
|
+
children: /*#__PURE__*/ _jsx(Check, {
|
|
14
|
+
className: "h-4 w-4"
|
|
15
|
+
})
|
|
16
|
+
})
|
|
17
|
+
}));
|
|
18
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
19
|
+
export { Checkbox };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/checkbox.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check } from 'lucide-react'\nimport { cn } from '../lib/utils'\n\n\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"],"names":["React","CheckboxPrimitive","Check","cn","Checkbox","forwardRef","className","props","ref","Root","Indicator","displayName"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAO;AAC9B,YAAYC,uBAAuB,2BAA0B;AAC7D,SAASC,KAAK,QAAQ,eAAc;AACpC,SAASC,EAAE,QAAQ,eAAc;AAIjC,MAAMC,yBAAWJ,MAAMK,UAAU,CAG/B,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAC1B,KAACP,kBAAkBQ,IAAI;QACrBD,KAAKA;QACLF,WAAWH,GACT,kTACAG;QAED,GAAGC,KAAK;kBAET,cAAA,KAACN,kBAAkBS,SAAS;YAACJ,WAAWH,GAAG;sBACzC,cAAA,KAACD;gBAAMI,WAAU;;;;AAIvBF,SAASO,WAAW,GAAGV,kBAAkBQ,IAAI,CAACE,WAAW;AAEzD,SAASP,QAAQ,GAAE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type DialogProps } from '@radix-ui/react-dialog';
|
|
3
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
} & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
|
+
label?: string;
|
|
11
|
+
shouldFilter?: boolean;
|
|
12
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
disablePointerSelection?: boolean;
|
|
18
|
+
vimBindings?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CommandDialog: ({ children, ...props }: DialogProps) => React.JSX.Element;
|
|
21
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
22
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
23
|
+
} & {
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
26
|
+
value?: string;
|
|
27
|
+
onValueChange?: (search: string) => void;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
32
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
} & {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
36
|
+
label?: string;
|
|
37
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
41
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
+
} & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
48
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
49
|
+
} & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
52
|
+
heading?: React.ReactNode;
|
|
53
|
+
value?: string;
|
|
54
|
+
forceMount?: boolean;
|
|
55
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
} & {
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
61
|
+
alwaysRender?: boolean;
|
|
62
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
66
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
67
|
+
} & {
|
|
68
|
+
asChild?: boolean;
|
|
69
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
onSelect?: (value: string) => void;
|
|
72
|
+
value?: string;
|
|
73
|
+
keywords?: string[];
|
|
74
|
+
forceMount?: boolean;
|
|
75
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const CommandShortcut: {
|
|
77
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
78
|
+
displayName: string;
|
|
79
|
+
};
|
|
80
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
81
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/ui/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAO1D,QAAA,MAAM,OAAO;eANS,MAAO,SAAS;;UA2Ig7J,MAAO,GAAG;;;;;;;;;;;;;sFAzH99J,CAAC;AAGH,QAAA,MAAM,aAAa,2BAA4B,WAAW,sBAUzD,CAAC;AAEF,QAAA,MAAM,YAAY;UA0GgyQ,MAAO,GAAG;;;;;;0FA3F1zQ,CAAC;AAIH,QAAA,MAAM,WAAW;eApDK,MAAO,SAAS;;UA2IonN,MAAO,GAAG;;;;;sFA9ElqN,CAAC;AAIH,QAAA,MAAM,YAAY;eAjEI,MAAO,SAAS;;UA2I43Y,MAAO,GAAG;;;uJArE16Y,CAAC;AAIH,QAAA,MAAM,YAAY;eA1EI,MAAO,SAAS;;UA2I28R,MAAO,GAAG;;;;cAAmO,MAAO,SAAS;;;sFArD5uS,CAAC;AAIH,QAAA,MAAM,gBAAgB;UAiD6rT,MAAO,GAAG;;;;;sFAxC3tT,CAAC;AAGH,QAAA,MAAM,WAAW;eAtGK,MAAO,SAAS;;UA2ImoO,MAAO,GAAG;;;;;;;;;sFAzBjrO,CAAC;AAIH,QAAA,MAAM,eAAe;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOtF,CAAC;AAGF,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
5
|
+
import { Search } from 'lucide-react';
|
|
6
|
+
import { Dialog, DialogContent } from './dialog';
|
|
7
|
+
import { cn } from '../lib/utils';
|
|
8
|
+
const Command = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CommandPrimitive, {
|
|
9
|
+
ref: ref,
|
|
10
|
+
className: cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', className),
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
14
|
+
const CommandDialog = ({ children, ...props })=>{
|
|
15
|
+
return /*#__PURE__*/ _jsx(Dialog, {
|
|
16
|
+
...props,
|
|
17
|
+
children: /*#__PURE__*/ _jsx(DialogContent, {
|
|
18
|
+
className: "overflow-hidden p-0 shadow-lg",
|
|
19
|
+
children: /*#__PURE__*/ _jsx(Command, {
|
|
20
|
+
className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[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",
|
|
21
|
+
children: children
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const CommandInput = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsxs("div", {
|
|
27
|
+
className: "flex items-center border-b px-3",
|
|
28
|
+
"cmdk-input-wrapper": "",
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ _jsx(Search, {
|
|
31
|
+
className: "mr-2 h-4 w-4 shrink-0 opacity-50"
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ _jsx(CommandPrimitive.Input, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
className: cn('flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', className),
|
|
36
|
+
...props
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}));
|
|
40
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
41
|
+
const CommandList = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CommandPrimitive.List, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
className: cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className),
|
|
44
|
+
...props
|
|
45
|
+
}));
|
|
46
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
47
|
+
const CommandEmpty = /*#__PURE__*/ React.forwardRef((props, ref)=>/*#__PURE__*/ _jsx(CommandPrimitive.Empty, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: "py-6 text-center text-sm",
|
|
50
|
+
...props
|
|
51
|
+
}));
|
|
52
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
53
|
+
const CommandGroup = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CommandPrimitive.Group, {
|
|
54
|
+
ref: ref,
|
|
55
|
+
className: cn('overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground', className),
|
|
56
|
+
...props
|
|
57
|
+
}));
|
|
58
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
59
|
+
const CommandSeparator = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CommandPrimitive.Separator, {
|
|
60
|
+
ref: ref,
|
|
61
|
+
className: cn('-mx-1 h-px bg-border', className),
|
|
62
|
+
...props
|
|
63
|
+
}));
|
|
64
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
65
|
+
const CommandItem = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CommandPrimitive.Item, {
|
|
66
|
+
ref: ref,
|
|
67
|
+
className: cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className),
|
|
68
|
+
...props
|
|
69
|
+
}));
|
|
70
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
71
|
+
const CommandShortcut = ({ className, ...props })=>{
|
|
72
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
73
|
+
className: cn('ml-auto text-xs tracking-widest text-muted-foreground', className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
CommandShortcut.displayName = 'CommandShortcut';
|
|
78
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\n\nimport { Dialog, DialogContent } from './dialog';\nimport { cn } from '../lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className='overflow-hidden p-0 shadow-lg'>\n <Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[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\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className='flex items-center border-b px-3' cmdk-input-wrapper=''>\n <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className='py-6 text-center text-sm' {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-border', className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"names":["React","Command","CommandPrimitive","Search","Dialog","DialogContent","cn","forwardRef","className","props","ref","displayName","CommandDialog","children","CommandInput","div","cmdk-input-wrapper","Input","CommandList","List","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","Separator","CommandItem","Item","CommandShortcut","span"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAQ;A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,aAAaT,WAAW,GAAGT,iBAAiBmB,KAAK,CAACV,WAAW;AAE7D,MAAMW,6BAAetB,MAAMO,UAAU,CAGnC,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAC1B,KAACR,iBAAiBqB,KAAK;QACrBb,KAAKA;QACLF,WAAWF,GACT,0NACAE;QAED,GAAGC,KAAK;;AAIba,aAAaX,WAAW,GAAGT,iBAAiBqB,KAAK,CAACZ,WAAW;AAE7D,MAAMa,iCAAmBxB,MAAMO,UAAU,CAGvC,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAC1B,KAACR,iBAAiBuB,SAAS;QACzBf,KAAKA;QACLF,WAAWF,GAAG,wBAAwBE;QACrC,GAAGC,KAAK;;AAGbe,iBAAiBb,WAAW,GAAGT,iBAAiBuB,SAAS,CAACd,WAAW;AAErE,MAAMe,4BAAc1B,MAAMO,UAAU,CAGlC,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAC1B,KAACR,iBAAiByB,IAAI;QACpBjB,KAAKA;QACLF,WAAWF,GACT,6TACAE;QAED,GAAGC,KAAK;;AAIbiB,YAAYf,WAAW,GAAGT,iBAAiByB,IAAI,CAAChB,WAAW;AAE3D,MAAMiB,kBAAkB,CAAC,EAAEpB,SAAS,EAAE,GAAGC,OAA8C;IACrF,qBACE,KAACoB;QACCrB,WAAWF,GAAG,yDAAyDE;QACtE,GAAGC,KAAK;;AAGf;AACAmB,gBAAgBjB,WAAW,GAAG;AAE9B,SACEV,OAAO,EACPW,aAAa,EACbE,YAAY,EACZI,WAAW,EACXE,YAAY,EACZE,YAAY,EACZI,WAAW,EACXE,eAAe,EACfJ,gBAAgB,GAChB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DialogFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
20
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAoBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAElF,CAAC;AAGF,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKlF,CAAC;AAGF,QAAA,MAAM,WAAW,oKASf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
|
+
const Dialog = DialogPrimitive.Root;
|
|
7
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
8
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
9
|
+
const DialogClose = DialogPrimitive.Close;
|
|
10
|
+
const DialogOverlay = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(DialogPrimitive.Overlay, {
|
|
11
|
+
ref: ref,
|
|
12
|
+
className: cn('fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className),
|
|
13
|
+
...props
|
|
14
|
+
}));
|
|
15
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
16
|
+
const DialogContent = /*#__PURE__*/ React.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ _jsxs(DialogPortal, {
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsx(DialogOverlay, {}),
|
|
19
|
+
/*#__PURE__*/ _jsxs(DialogPrimitive.Content, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [
|
|
24
|
+
children,
|
|
25
|
+
/*#__PURE__*/ _jsx(DialogPrimitive.Close, {
|
|
26
|
+
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
27
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
28
|
+
className: "sr-only",
|
|
29
|
+
children: "Close"
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
}));
|
|
36
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
37
|
+
const DialogHeader = ({ className, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
38
|
+
className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
DialogHeader.displayName = 'DialogHeader';
|
|
42
|
+
const DialogFooter = ({ className, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
43
|
+
className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
DialogFooter.displayName = 'DialogFooter';
|
|
47
|
+
const DialogTitle = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(DialogPrimitive.Title, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: cn('text-lg font-semibold leading-none tracking-tight', className),
|
|
50
|
+
...props
|
|
51
|
+
}));
|
|
52
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
53
|
+
const DialogDescription = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(DialogPrimitive.Description, {
|
|
54
|
+
ref: ref,
|
|
55
|
+
className: cn('text-sm text-muted-foreground', className),
|
|
56
|
+
...props
|
|
57
|
+
}));
|
|
58
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
59
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\n\nimport { cn } from '../lib/utils';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className='absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground'>\n <span className='sr-only'>Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"names":["React","DialogPrimitive","cn","Dialog","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","forwardRef","className","props","ref","Overlay","displayName","DialogContent","children","Content","span","DialogHeader","div","DialogFooter","DialogTitle","Title","DialogDescription","Description"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAQ;AAC/B,YAAYC,qBAAqB,yBAAyB;AAE1D,SAASC,EAAE,QAAQ,eAAe;AAElC,MAAMC,SAASF,gBAAgBG,IAAI;AAEnC,MAAMC,gBAAgBJ,gBAAgBK,OAAO;AAE7C,MAAMC,eAAeN,gBAAgBO,MAAM;AAE3C,MAAMC,cAAcR,gBAAgBS,KAAK;AAEzC,MAAMC,8BAAgBX,MAAMY,UAAU,CAGpC,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAC1B,KAACd,gBAAgBe,OAAO;Q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Gba,kBAAkBV,WAAW,GAAGhB,gBAAgB2B,WAAW,CAACX,WAAW;AAEvE,SACEd,MAAM,EACNI,YAAY,EACZI,aAAa,EACbF,WAAW,EACXJ,aAAa,EACba,aAAa,EACbI,YAAY,EACZE,YAAY,EACZC,WAAW,EACXE,iBAAiB,GACjB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
6
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/ui/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AASjE,QAAA,MAAM,KAAK,gPAKT,CAAA;AAGF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/ui/label.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from '../lib/utils';
|
|
7
|
+
const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
|
|
8
|
+
const Label = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(LabelPrimitive.Root, {
|
|
9
|
+
ref: ref,
|
|
10
|
+
className: cn(labelVariants(), className),
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
14
|
+
export { Label };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/label.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as LabelPrimitive from '@radix-ui/react-label'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../lib/utils'\n\n\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n)\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n))\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n"],"names":["React","LabelPrimitive","cva","cn","labelVariants","Label","forwardRef","className","props","ref","Root","displayName"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAO;AAC9B,YAAYC,oBAAoB,wBAAuB;AACvD,SAASC,GAAG,QAA2B,2BAA0B;AACjE,SAASC,EAAE,QAAQ,eAAc;AAIjC,MAAMC,gBAAgBF,IACpB;AAGF,MAAMG,sBAAQL,MAAMM,UAAU,CAG5B,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAC1B,KAACR,eAAeS,IAAI;QAACD,KAAKA;QAAKF,WAAWJ,GAAGC,iBAAiBG;QAAa,GAAGC,KAAK;;AAErFH,MAAMM,WAAW,GAAGV,eAAeS,IAAI,CAACC,WAAW;AAEnD,SAASN,KAAK,GAAE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
7
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAK3D,QAAA,MAAM,OAAO,yCAAwB,CAAA;AAErC,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAE/C,QAAA,MAAM,cAAc,gKAgBlB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
|
+
const Popover = PopoverPrimitive.Root;
|
|
7
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
|
+
const PopoverContent = /*#__PURE__*/ React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref)=>/*#__PURE__*/ _jsx(PopoverPrimitive.Portal, {
|
|
9
|
+
children: /*#__PURE__*/ _jsx(PopoverPrimitive.Content, {
|
|
10
|
+
ref: ref,
|
|
11
|
+
align: align,
|
|
12
|
+
sideOffset: sideOffset,
|
|
13
|
+
className: cn('z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className),
|
|
14
|
+
...props
|
|
15
|
+
})
|
|
16
|
+
}));
|
|
17
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
18
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/popover.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport { cn } from '../lib/utils'\n\n\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n"],"names":["React","PopoverPrimitive","cn","Popover","Root","PopoverTrigger","Trigger","PopoverContent","forwardRef","className","align","sideOffset","props","ref","Portal","Content","displayName"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAO;AAC9B,YAAYC,sBAAsB,0BAAyB;AAC3D,SAASC,EAAE,QAAQ,eAAc;AAIjC,MAAMC,UAAUF,iBAAiBG,IAAI;AAErC,MAAMC,iBAAiBJ,iBAAiBK,OAAO;AAE/C,MAAMC,+BAAiBP,MAAMQ,UAAU,CAGrC,CAAC,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,EAAEC,aAAa,CAAC,EAAE,GAAGC,OAAO,EAAEC,oBAC5D,KAACZ,iBAAiBa,MAAM;kBACtB,cAAA,KAACb,iBAAiBc,OAAO;YACvBF,KAAKA;YACLH,OAAOA;YACPC,YAAYA;YACZF,WAAWP,GACT,8aACAO;YAED,GAAGG,KAAK;;;AAIfL,eAAeS,WAAW,GAAGf,iBAAiBc,OAAO,CAACC,WAAW;AAEjE,SAASb,OAAO,EAAEE,cAAc,EAAEE,cAAc,GAAE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
5
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/ui/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAK/D,QAAA,MAAM,SAAS,6JAeb,CAAA;AAGF,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
|
+
const Separator = /*#__PURE__*/ React.forwardRef(({ className, orientation = 'horizontal', decorative = true, ...props }, ref)=>/*#__PURE__*/ _jsx(SeparatorPrimitive.Root, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
decorative: decorative,
|
|
9
|
+
orientation: orientation,
|
|
10
|
+
className: cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', className),
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
14
|
+
export { Separator };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/separator.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport { cn } from '../lib/utils'\n\n\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className,\n )}\n {...props}\n />\n))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n"],"names":["React","SeparatorPrimitive","cn","Separator","forwardRef","className","orientation","decorative","props","ref","Root","displayName"],"mappings":"AAAA;;AAEA,YAAYA,WAAW,QAAO;AAC9B,YAAYC,wBAAwB,4BAA2B;AAC/D,SAASC,EAAE,QAAQ,eAAc;AAIjC,MAAMC,0BAAYH,MAAMI,UAAU,CAGhC,CAAC,EAAEC,SAAS,EAAEC,cAAc,YAAY,EAAEC,aAAa,IAAI,EAAE,GAAGC,OAAO,EAAEC,oBACzE,KAACR,mBAAmBS,IAAI;QACtBD,KAAKA;QACLF,YAAYA;QACZD,aAAaA;QACbD,WAAWH,GACT,sBACAI,gBAAgB,eAAe,mBAAmB,kBAClDD;QAED,GAAGG,KAAK;;AAGbL,UAAUQ,WAAW,GAAGV,mBAAmBS,IAAI,CAACC,WAAW;AAE3D,SAASR,SAAS,GAAE"}
|