@lotte-innovate/ui-component-test 0.2.62 → 0.2.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/Calendar/index.d.ts +5 -2
- package/dist/lib/components/Calendar/index.js +2 -3
- package/dist/lib/components/Calendar/index.mjs +1 -1
- package/dist/lib/components/Datepicker/index.d.ts +6 -3
- package/dist/lib/components/Datepicker/index.js +2 -3
- package/dist/lib/components/Datepicker/index.mjs +1 -1
- package/dist/lib/components/Popover/index.mjs.map +1 -1
- package/dist/lib/components/SearchBar/index.js +2 -2
- package/dist/lib/components/SearchBar/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1,8 +1,11 @@
|
|
1
|
-
import
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
2
2
|
import { DayPicker } from 'react-day-picker';
|
3
3
|
import { IColor } from '../../../lib/types';
|
4
4
|
export interface CalendarProps {
|
5
5
|
color?: IColor;
|
6
6
|
}
|
7
|
-
export declare const Calendar:
|
7
|
+
export declare const Calendar: {
|
8
|
+
({ className, classNames, showOutsideDays, color, ...props }: ComponentPropsWithoutRef<typeof DayPicker> & CalendarProps): import("react/jsx-runtime").JSX.Element;
|
9
|
+
displayName: string;
|
10
|
+
};
|
8
11
|
export default Calendar;
|
@@ -22,14 +22,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
return t;
|
23
23
|
};
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
25
|
-
import { forwardRef } from 'react';
|
26
25
|
import { ChevronLeftIcon, ChevronRightIcon } from '@radix-ui/react-icons';
|
27
26
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
28
27
|
import { DayPicker } from 'react-day-picker';
|
29
28
|
import { cn } from '../../../lib/utils/utils';
|
30
29
|
import { ko } from 'date-fns/locale';
|
31
30
|
import { useTheme } from '../../../lib/theme';
|
32
|
-
export var Calendar =
|
31
|
+
export var Calendar = function (_a) {
|
33
32
|
var _b;
|
34
33
|
var className = _a.className, classNames = _a.classNames, _c = _a.showOutsideDays, showOutsideDays = _c === void 0 ? true : _c, color = _a.color, props = __rest(_a, ["className", "classNames", "showOutsideDays", "color"]);
|
35
34
|
var theme = useTheme().theme;
|
@@ -44,6 +43,6 @@ export var Calendar = forwardRef(function (_a, ref) {
|
|
44
43
|
return _jsx(ChevronRightIcon, { className: "h-4 w-4" });
|
45
44
|
},
|
46
45
|
} }, props)));
|
47
|
-
}
|
46
|
+
};
|
48
47
|
Calendar.displayName = 'Calendar';
|
49
48
|
export default Calendar;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{ChevronLeftIcon as t,ChevronRightIcon as o}from"@radix-ui/react-icons";import{MAIN_COLOR as n}from"../../color/constants.mjs";import{DayPicker as r}from"react-day-picker";import{cn as s}from"../../utils/utils.mjs";import{useTheme as a}from"../../theme/ThemeProvider.mjs";import i from"../../node_modules/date-fns/esm/locale/ko/index.mjs";var l=function(){return l=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)},c=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o},d=function(d){var m,p=d.className,u=d.classNames,f=d.showOutsideDays,b=void 0===f||f,v=d.color,h=c(d,["className","classNames","showOutsideDays","color"]),y=a().theme;return v=null!==(m=null!=v?v:y.themeColor)&&void 0!==m?m:n,e(r,l({locale:i,showOutsideDays:b,className:s("w-[280px] rounded-md border p-3 text-slate-12",p),classNames:l({months:"flex flex-row space-y-4 sm:space-x-4 sm:space-y-0 place-content-center",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-semibold",nav:"space-x-1 flex items-center",nav_button:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background h-10 px-4 py-2 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 hover:bg-slateA-3",nav_button_next:"absolute right-1 hover:bg-slateA-3",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-slateA-10 rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-".concat(v,"A-3 h-10 px-4 py-2 h-9 w-9 p-0 font-medium aria-selected:opacity-100 aria-selected:bg-").concat(v,"-9 aria-selected:hover:bg-").concat(v,"-9"),day_range_end:"day-range-end",day_selected:"bg-".concat(v,"-9 text-white"),day_today:"bg-".concat(v,"A-3"),day_outside:"cursor-default text-slateA-10 hover:bg-transparent",day_disabled:"text-slateA-10 opacity-50",day_hidden:"invisible"},u),components:{IconLeft:function(o){return c(o,[]),e(t,{className:"h-4 w-4"})},IconRight:function(t){return c(t,[]),e(o,{className:"h-4 w-4"})}}},h))};d.displayName="Calendar";export{d as Calendar,d as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import { DateRange } from 'react-day-picker';
|
1
|
+
import { ComponentPropsWithoutRef, Dispatch, SetStateAction } from 'react';
|
2
|
+
import { DayPicker, DateRange } from 'react-day-picker';
|
3
3
|
import { IColor, IScaling } from '../../../lib/types';
|
4
4
|
export interface DatepickerProps {
|
5
5
|
mode?: 'single' | 'range';
|
@@ -10,5 +10,8 @@ export interface DatepickerProps {
|
|
10
10
|
selected?: Date | DateRange | undefined;
|
11
11
|
onSelect?: any;
|
12
12
|
}
|
13
|
-
export declare const Datepicker:
|
13
|
+
export declare const Datepicker: {
|
14
|
+
({ className, classNames, isOpen, setIsOpen, selected, onSelect, showOutsideDays, scaling, color, mode, ...props }: ComponentPropsWithoutRef<typeof DayPicker> & DatepickerProps): import("react/jsx-runtime").JSX.Element;
|
15
|
+
displayName: string;
|
16
|
+
};
|
14
17
|
export default Datepicker;
|
@@ -22,14 +22,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
return t;
|
23
23
|
};
|
24
24
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
25
|
-
import { forwardRef, } from 'react';
|
26
25
|
import { CalendarIcon } from '@radix-ui/react-icons';
|
27
26
|
import { Button, Popover, Calendar, Text } from '../../../lib';
|
28
27
|
import { cn } from '../../../lib/utils/utils';
|
29
28
|
import { format } from 'date-fns';
|
30
|
-
export var Datepicker =
|
29
|
+
export var Datepicker = function (_a) {
|
31
30
|
var className = _a.className, classNames = _a.classNames, isOpen = _a.isOpen, setIsOpen = _a.setIsOpen, selected = _a.selected, onSelect = _a.onSelect, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, scaling = _a.scaling, color = _a.color, mode = _a.mode, props = __rest(_a, ["className", "classNames", "isOpen", "setIsOpen", "selected", "onSelect", "showOutsideDays", "scaling", "color", "mode"]);
|
32
31
|
return mode === 'range' ? (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, children: [_jsx(Popover.Trigger, { className: cn('w-[280px]', className), children: _jsxs(Button, { color: color, scaling: scaling, appearance: 'outline', className: cn('justify-start gap-2 text-left font-normal', !selected && 'text-muted-foreground'), children: [_jsx(CalendarIcon, {}), (selected === null || selected === void 0 ? void 0 : selected.from) ? (selected.to ? (_jsxs(_Fragment, { children: [format(selected.from, 'yyyy-MM-dd'), " - ", format(selected.to, 'yyyy-MM-dd')] })) : (format(selected.from, 'yyyy-MM-dd'))) : (_jsx(Text, { children: "\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694" }))] }) }), _jsx(Popover.Content, { className: "w-auto max-w-[600px] p-0", align: "start", children: _jsx(Calendar, __assign({ mode: "range", color: color, selected: selected, onSelect: onSelect, numberOfMonths: 2, defaultMonth: selected === null || selected === void 0 ? void 0 : selected.from, showOutsideDays: showOutsideDays, className: 'w-full', classNames: classNames }, props)) })] })) : (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, children: [_jsx(Popover.Trigger, { className: cn('w-[280px]', className), children: _jsxs(Button, { color: color, scaling: scaling, appearance: 'outline', className: cn('justify-start gap-2 text-left font-normal', !selected && 'text-muted-foreground'), children: [_jsx(CalendarIcon, {}), selected ? format(selected, 'yyyy-MM-dd') : _jsx(Text, { children: "\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694" })] }) }), _jsx(Popover.Content, { className: "w-auto p-0", children: _jsx(Calendar, __assign({ mode: mode, color: color, selected: selected, onSelect: onSelect, defaultMonth: selected, showOutsideDays: showOutsideDays, className: 'w-full', classNames: classNames }, props)) })] }));
|
33
|
-
}
|
32
|
+
};
|
34
33
|
Datepicker.displayName = 'Datepicker';
|
35
34
|
export default Datepicker;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as o,jsx as t,Fragment as e}from"react/jsx-runtime";import{
|
2
|
+
import{jsxs as o,jsx as t,Fragment as e}from"react/jsx-runtime";import{CalendarIcon as r}from"@radix-ui/react-icons";import"../Accordion/index.mjs";import"../AlertDialog/AlertDialogRoot.mjs";import"../AlertDialog/AlertDialogTrigger.mjs";import"../AlertDialog/AlertDialogContent.mjs";import"../AlertDialog/AlertDialogTitle.mjs";import"../AlertDialog/AlertDialogDescription.mjs";import"../AlertDialog/AlertDialogCancel.mjs";import"../AlertDialog/AlertDialogAction.mjs";import"../AspectRatio/index.mjs";import"../Avatar/index.mjs";import"../Badge/index.mjs";import"../Box/index.mjs";import"../Breadcrumb/BreadcrumbRoot.mjs";import"../Breadcrumb/BreadcrumbItem.mjs";import"../Breadcrumb/BreadcrumbLink.mjs";import"../Breadcrumb/BreadcrumbList.mjs";import"../Breadcrumb/BreadcrumbPage.mjs";import"../Breadcrumb/BreadcrumbSeparator.mjs";import"../Breadcrumb/BreadcrumbEllipsis.mjs";import{Button as i}from"../Button/index.mjs";import{Calendar as m}from"../Calendar/index.mjs";import"../Callout/CalloutRoot.mjs";import"../Callout/CalloutText.mjs";import"../Callout/CalloutIcon.mjs";import"../Card/index.mjs";import"../Checkbox/index.mjs";import"../CheckboxCard/index.mjs";import"../CheckboxGroup/CheckboxGroupRoot.mjs";import"../CheckboxGroup/CheckboxGroupItem.mjs";import"../ContextMenu/ContextMenuRoot.mjs";import"../ContextMenu/ContextMenuContent.mjs";import"../ContextMenu/ContextMenuCheckboxItem.mjs";import"../ContextMenu/ContextMenuGroup.mjs";import"../ContextMenu/ContextMenuItem.mjs";import"../ContextMenu/ContextMenuItemIndicator.mjs";import"../ContextMenu/ContextMenuLabel.mjs";import"../ContextMenu/ContextMenuTrigger.mjs";import"../ContextMenu/ContextMenuRadioGroup.mjs";import"../ContextMenu/ContextMenuRadioItem.mjs";import"../ContextMenu/ContextMenuSeparator.mjs";import"../ContextMenu/ContextMenuSubTrigger.mjs";import"../ContextMenu/ContextMenuSubContent.mjs";import"../Collapsible/index.mjs";import"../Container/index.mjs";import"../DataList/DataListRoot.mjs";import"../DataList/DataListItem.mjs";import"../DataList/DataListLabel.mjs";import"../DataList/DataListValue.mjs";import"../Dialog/DialogRoot.mjs";import"../Dialog/DialogTrigger.mjs";import"../Dialog/DialogContent.mjs";import"../Dialog/DialogTitle.mjs";import"../Dialog/DialogDescription.mjs";import"../Dialog/DialogSlot.mjs";import"../Dialog/DialogCancel.mjs";import"../Dialog/DialogAction.mjs";import"../DropdownMenu/DropdownMenuRoot.mjs";import"../DropdownMenu/DropdownMenuTrigger.mjs";import"../DropdownMenu/DropdownMenuContent.mjs";import"../DropdownMenu/DropdownMenuLable.mjs";import"../DropdownMenu/DropdownMenuItem.mjs";import"../DropdownMenu/DropdownMenuSeparator.mjs";import"../DropdownMenu/DropdownMenuCheckboxItem.mjs";import"../DropdownMenu/DropdonMenuRadioGroup.mjs";import"../DropdownMenu/DropdownMenuRadioItem.mjs";import"../DropdownMenu/DropdownMenuSub.mjs";import"../DropdownMenu/DropdownMenuSubTrigger.mjs";import"../DropdownMenu/DropdonMenuSubContent.mjs";import"../DropdownMenu/DropdownMenuItemIndicator.mjs";import"../Editor/index.mjs";import"../Flex/index.mjs";import"../Tabs/DynamicTabs.mjs";import"../Footer/index.mjs";import"../Gnb/GnbRoot.mjs";import"../Gnb/GnbLogo.mjs";import"../Gnb/GnbMenu.mjs";import"../Gnb/GnbMenuItem.mjs";import"../Gnb/GnbInfo.mjs";import"../GridLayout/index.mjs";import"../HoverCard/HoverCardRoot.mjs";import"../HoverCard/HoverCardTrigger.mjs";import"../HoverCard/HoverCardContent.mjs";import"../IconButton/index.mjs";import"../Inset/index.mjs";import"../Label/index.mjs";import"../Menubar/MenubarRoot.mjs";import"../Menubar/MenubarMenu.mjs";import"../Menubar/MenubarTrigger.mjs";import"../Menubar/MenubarContent.mjs";import"../Menubar/MenubarItem.mjs";import"../Menubar/MenubarSeparator.mjs";import"../Menubar/MenubarSub.mjs";import"../Menubar/MenubarSubTrigger.mjs";import"../Menubar/MenubarSubContent.mjs";import"../Menubar/MenubarCheckboxItem.mjs";import"../Menubar/MenubarItemIndicator.mjs";import"../Menubar/MenubarRadioGroup.mjs";import"../Menubar/MenubarRadioItem.mjs";import"../Modal/ModalRoot.mjs";import"../Modal/ModalTrigger.mjs";import"../Modal/ModalContent.mjs";import"../Modal/ModalTitle.mjs";import"../Modal/ModalDescription.mjs";import"../Modal/ModalFooter.mjs";import"../Modal/ModalCancel.mjs";import"../Modal/ModalAction.mjs";import"../NavigationMenu/NavigationMenuRoot.mjs";import"../NavigationMenu/NavigationMenuList.mjs";import"../NavigationMenu/NavigationMenuItem.mjs";import"../NavigationMenu/NavigationMenuTrigger.mjs";import"../NavigationMenu/NavigationMenuContent.mjs";import"../NavigationMenu/NavigationMenuViewport.mjs";import"../NavigationMenu/NavigationMenuIndicator.mjs";import"../NavigationMenu/NavigationMenuLink.mjs";import n from"../Popover/index.mjs";import"../Progress/index.mjs";import"../Radio/index.mjs";import"../RadioCards/RadioCardsRoot.mjs";import"../RadioCards/RadioCardsItem.mjs";import"../RadioGroup/RadioGroupRoot.mjs";import"../RadioGroup/RadioGroupItem.mjs";import"../ScrollArea/index.mjs";import"../SearchBar/index.mjs";import"../SegmentedControl/SegmentedControlRoot.mjs";import"../SegmentedControl/SegmentedControlItem.mjs";import"../Select/index.mjs";import"../Separator/index.mjs";import"../SideBar/index.mjs";import"../Skeleton/index.mjs";import"../Slider/index.mjs";import"../Spinner/index.mjs";import"../Table/index.mjs";import"../TabNav/index.mjs";import"../Tabs/index.mjs";import"../TextArea/index.mjs";import"../TextField/index.mjs";import"../Timeline/TimelineRoot.mjs";import"../Timeline/TimelineItem.mjs";import"../Timeline/TimelineConnector.mjs";import"../Timeline/TimelineHeader.mjs";import"../Timeline/TimelineTime.mjs";import"../Timeline/TimelineIcon.mjs";import"../Timeline/TimelineTitle.mjs";import"../Timeline/TimelineContent.mjs";import"../Timeline/TimelineDescription.mjs";import"../Toast/ToastRoot.mjs";import"../Toast/ToastTitle.mjs";import"../Toast/ToastDescription.mjs";import"../Toast/ToastActionButton.mjs";import"../Toggle/index.mjs";import"../Toggle/ToggleWithText.mjs";import"../ToggleGroup/ToggleGroupRoot.mjs";import"../ToggleGroup/ToggleGroupItem.mjs";import"../ToggleSwitch/index.mjs";import"../Tooltip/index.mjs";import"../BarChart/index.mjs";import"../BubbleChart/index.mjs";import"../RadarChart/index.mjs";import"../LineChart/index.mjs";import"../PieChart/index.mjs";import"../DoughnutChart/index.mjs";import"../Grid/index.mjs";import"../Grid/useGrid.mjs";import"../../Typography/Header/index.mjs";import a from"../../Typography/Text/index.mjs";import"../../theme/ThemeProvider.mjs";import{cn as s}from"../../utils/utils.mjs";import{format as p}from"date-fns";var l=function(){return l=Object.assign||function(o){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);return o},l.apply(this,arguments)},d=function(o,t){var e={};for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(o);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(o,r[i])&&(e[r[i]]=o[r[i]])}return e},u=function(u){var j=u.className,M=u.classNames,g=u.isOpen,c=u.setIsOpen,x=u.selected,b=u.onSelect,C=u.showOutsideDays,D=void 0===C||C,T=u.scaling,h=u.color,f=u.mode,w=d(u,["className","classNames","isOpen","setIsOpen","selected","onSelect","showOutsideDays","scaling","color","mode"]);return o(n.Root,"range"===f?{open:g,onOpenChange:c,scaling:T,children:[t(n.Trigger,{className:s("w-[280px]",j),children:o(i,{color:h,scaling:T,appearance:"outline",className:s("justify-start gap-2 text-left font-normal",!x&&"text-muted-foreground"),children:[t(r,{}),(null==x?void 0:x.from)?x.to?o(e,{children:[p(x.from,"yyyy-MM-dd")," - ",p(x.to,"yyyy-MM-dd")]}):p(x.from,"yyyy-MM-dd"):t(a,{children:"날짜를 선택해주세요"})]})}),t(n.Content,{className:"w-auto max-w-[600px] p-0",align:"start",children:t(m,l({mode:"range",color:h,selected:x,onSelect:b,numberOfMonths:2,defaultMonth:null==x?void 0:x.from,showOutsideDays:D,className:"w-full",classNames:M},w))})]}:{open:g,onOpenChange:c,scaling:T,children:[t(n.Trigger,{className:s("w-[280px]",j),children:o(i,{color:h,scaling:T,appearance:"outline",className:s("justify-start gap-2 text-left font-normal",!x&&"text-muted-foreground"),children:[t(r,{}),x?p(x,"yyyy-MM-dd"):t(a,{children:"날짜를 선택해주세요"})]})}),t(n.Content,{className:"w-auto p-0",children:t(m,l({mode:f,color:h,selected:x,onSelect:b,defaultMonth:x,showOutsideDays:D,className:"w-full",classNames:M},w))})]})};u.displayName="Datepicker";export{u as Datepicker,u as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Popover/index.js"],"sourcesContent":["import { PopoverRoot } from './PopoverRoot';\nimport { PopoverTrigger } from './PopoverTrigger';\nimport { PopoverContent } from './PopoverContent';\nimport { PopoverClose } from './PopoverClose';\nvar Popover = {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n Close: PopoverClose,\n};\nexport default Popover;\n"],"names":["Popover
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Popover/index.js"],"sourcesContent":["import { PopoverRoot } from './PopoverRoot';\nimport { PopoverTrigger } from './PopoverTrigger';\nimport { PopoverContent } from './PopoverContent';\nimport { PopoverClose } from './PopoverClose';\nvar Popover = {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n Close: PopoverClose,\n};\nexport default Popover;\n"],"names":["Popover","Root","PopoverRoot","Trigger","PopoverTrigger","Content","PopoverContent","Close","PopoverClose"],"mappings":"8MAIG,IAACA,EAAU,CACVC,KAAMC,EACNC,QAASC,EACTC,QAASC,EACTC,MAAOC"}
|
@@ -38,7 +38,7 @@ export var SearchBarVariants = cva("", {
|
|
38
38
|
scaling: '100%',
|
39
39
|
},
|
40
40
|
});
|
41
|
-
export var SearchBar = forwardRef(function (_a) {
|
41
|
+
export var SearchBar = forwardRef(function (_a, ref) {
|
42
42
|
var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, color = _a.color, onClickSubmit = _a.onClickSubmit, onClickReload = _a.onClickReload, SubmitButton = _a.SubmitButton, ReloadButton = _a.ReloadButton, props = __rest(_a, ["className", "children", "scaling", "size", "color", "onClickSubmit", "onClickReload", "SubmitButton", "ReloadButton"]);
|
43
43
|
var containerRef = useRef(null);
|
44
44
|
var theme = useTheme().theme;
|
@@ -73,7 +73,7 @@ export var SearchBar = forwardRef(function (_a) {
|
|
73
73
|
setInitSetting(true);
|
74
74
|
}
|
75
75
|
}, [children]);
|
76
|
-
return (_jsxs("div", { children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full gap-3', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex", children: children &&
|
76
|
+
return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full gap-3', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex", children: children &&
|
77
77
|
React.Children.map(children, function (child, index) {
|
78
78
|
return firstLineIndices.includes(index) ? child : null;
|
79
79
|
}) }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { onClick: onClickSubmit, size: size, color: contextValue.color, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { onClick: onClickReload, size: size, color: contextValue.color, children: _jsx(ReloadIcon, {}) })), secondLineIndices.length > 0 && (_jsx(Collapsible.Trigger, { open: open, size: size, color: contextValue.color }))] })] }), _jsx(Collapsible.Content, { className: "flex gap-3", children: children &&
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{MagnifyingGlassIcon as f,ReloadIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n){var
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{MagnifyingGlassIcon as f,ReloadIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n,c){var a=n.className,y=n.children,b=n.scaling,x=n.size,C=n.color,j=n.onClickSubmit,O=n.onClickReload,N=n.SubmitButton,w=n.ReloadButton,z=g(n,["className","children","scaling","size","color","onClickSubmit","onClickReload","SubmitButton","ReloadButton"]),B=i(null),S=m().theme,R={scaling:null!=b?b:S.themeScaling,color:null!=C?C:S.themeColor,size:x},k=o([]),P=k[0],A=k[1],E=o([]),I=E[0],T=E[1],V=o(!1),q=V[0],D=V[1],F=o(!1);F[0];var G=F[1];return t((function(){if(y){G(!1);var e=B.current,r=Array.from(e.children),l=r[0].getBoundingClientRect().top,n=[],i=[];r.forEach((function(e,r){e.getBoundingClientRect().top===l?n.push(r):i.push(r)})),A(n),T(i),G(!0)}}),[y]),e("div",{ref:c,children:[y&&e("div",{className:"flex h-0 w-full gap-3 pr-2 opacity-0",children:[r("div",{className:"flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2",ref:B,children:y}),e("div",{className:"flex gap-2",children:[N||r(d,{size:x,children:r(f,{})}),w||r(d,{size:x,children:r(p,{})}),r(d,{size:x,children:r(p,{})})]})]}),e(u.Root,h({className:s("grid w-full gap-3",v({scaling:R.scaling}),a),onOpenChange:D},z,{children:[e("div",{className:"flex w-full justify-between",children:[r("div",{className:"flex",children:y&&l.Children.map(y,(function(e,r){return P.includes(r)?e:null}))}),e("div",{className:"flex gap-2",children:[N||r(d,{onClick:j,size:x,color:R.color,children:r(f,{})}),w||r(d,{onClick:O,size:x,color:R.color,children:r(p,{})}),I.length>0&&r(u.Trigger,{open:q,size:x,color:R.color})]})]}),r(u.Content,{className:"flex gap-3",children:y&&l.Children.map(y,(function(e,r){return I.includes(r)?e:null}))})]}))]})}));y.displayName="SearchBar";export{y as SearchBar,v as SearchBarVariants,y as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|