@sonamu-kit/react-components 0.4.10 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/~icons/lucide/arrow-left.js +13 -10
- package/dist/_virtual/~icons/lucide/arrow-left.js.map +1 -1
- package/dist/_virtual/~icons/lucide/arrow-right.js +13 -10
- package/dist/_virtual/~icons/lucide/arrow-right.js.map +1 -1
- package/dist/_virtual/~icons/lucide/calendar.js +17 -14
- package/dist/_virtual/~icons/lucide/calendar.js.map +1 -1
- package/dist/_virtual/~icons/lucide/check.js +13 -10
- package/dist/_virtual/~icons/lucide/check.js.map +1 -1
- package/dist/_virtual/~icons/lucide/chevron-down.js +13 -10
- package/dist/_virtual/~icons/lucide/chevron-down.js.map +1 -1
- package/dist/_virtual/~icons/lucide/chevron-left.js +13 -10
- package/dist/_virtual/~icons/lucide/chevron-left.js.map +1 -1
- package/dist/_virtual/~icons/lucide/chevron-right.js +13 -10
- package/dist/_virtual/~icons/lucide/chevron-right.js.map +1 -1
- package/dist/_virtual/~icons/lucide/chevrons-up-down.js +13 -10
- package/dist/_virtual/~icons/lucide/chevrons-up-down.js.map +1 -1
- package/dist/_virtual/~icons/lucide/circle.js +13 -10
- package/dist/_virtual/~icons/lucide/circle.js.map +1 -1
- package/dist/_virtual/~icons/lucide/dot.js +15 -12
- package/dist/_virtual/~icons/lucide/dot.js.map +1 -1
- package/dist/_virtual/~icons/lucide/grip-vertical.js +19 -16
- package/dist/_virtual/~icons/lucide/grip-vertical.js.map +1 -1
- package/dist/_virtual/~icons/lucide/image.js +16 -13
- package/dist/_virtual/~icons/lucide/image.js.map +1 -1
- package/dist/_virtual/~icons/lucide/loader-2.js +13 -10
- package/dist/_virtual/~icons/lucide/loader-2.js.map +1 -1
- package/dist/_virtual/~icons/lucide/loader2.js +13 -10
- package/dist/_virtual/~icons/lucide/loader2.js.map +1 -1
- package/dist/_virtual/~icons/lucide/more-horizontal.js +16 -13
- package/dist/_virtual/~icons/lucide/more-horizontal.js.map +1 -1
- package/dist/_virtual/~icons/lucide/panel-left.js +15 -12
- package/dist/_virtual/~icons/lucide/panel-left.js.map +1 -1
- package/dist/_virtual/~icons/lucide/plus.js +13 -10
- package/dist/_virtual/~icons/lucide/plus.js.map +1 -1
- package/dist/_virtual/~icons/lucide/search.js +14 -11
- package/dist/_virtual/~icons/lucide/search.js.map +1 -1
- package/dist/_virtual/~icons/lucide/trash-2.js +13 -10
- package/dist/_virtual/~icons/lucide/trash-2.js.map +1 -1
- package/dist/_virtual/~icons/lucide/upload.js +13 -10
- package/dist/_virtual/~icons/lucide/upload.js.map +1 -1
- package/dist/_virtual/~icons/lucide/x-circle.js +15 -12
- package/dist/_virtual/~icons/lucide/x-circle.js.map +1 -1
- package/dist/_virtual/~icons/lucide/x.js +13 -10
- package/dist/_virtual/~icons/lucide/x.js.map +1 -1
- package/dist/components/ui/accordion.js +1 -2
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/alert-dialog.js +1 -2
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.js +15 -15
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -2
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.js +1 -2
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +11 -11
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +2 -2
- package/dist/components/ui/breadcrumb.js +1 -2
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button.js +33 -33
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.js +41 -43
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +7 -7
- package/dist/components/ui/card.js +1 -2
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.js +2 -3
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/checkbox.js +2 -3
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.js +1 -2
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/combobox.js +1 -2
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.d.ts +2 -2
- package/dist/components/ui/command.js +1 -2
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/common-modal.d.ts +1 -1
- package/dist/components/ui/common-modal.js +1 -2
- package/dist/components/ui/common-modal.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +1 -1
- package/dist/components/ui/context-menu.js +1 -2
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/date-input.d.ts +1 -1
- package/dist/components/ui/date-input.js +3 -3
- package/dist/components/ui/date-input.js.map +1 -1
- package/dist/components/ui/date-picker.d.ts +3 -3
- package/dist/components/ui/date-picker.js +3 -4
- package/dist/components/ui/date-picker.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/dialog.js +1 -2
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +3 -3
- package/dist/components/ui/drawer.js +1 -2
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -2
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/file-input.d.ts +1 -1
- package/dist/components/ui/file-input.js +20 -12
- package/dist/components/ui/file-input.js.map +1 -1
- package/dist/components/ui/form.d.ts +6 -4
- package/dist/components/ui/form.js +1 -2
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.js +1 -2
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +4 -2
- package/dist/components/ui/input-otp.js +1 -2
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.js +1 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.js +1 -2
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +6 -6
- package/dist/components/ui/menubar.js +1 -2
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/month-picker-multiple.d.ts +1 -1
- package/dist/components/ui/month-picker-multiple.js +80 -79
- package/dist/components/ui/month-picker-multiple.js.map +1 -1
- package/dist/components/ui/navigation-menu.js +1 -2
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.js +3 -4
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/popover.js +1 -2
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.js +1 -2
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.js +1 -2
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/range-number-input.d.ts +1 -1
- package/dist/components/ui/range-number-input.js +1 -2
- package/dist/components/ui/range-number-input.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +4 -20
- package/dist/components/ui/resizable.js +5 -6
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.js +1 -2
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select/enum-select.d.ts +2 -1
- package/dist/components/ui/select/enum-select.js +1 -2
- package/dist/components/ui/select/enum-select.js.map +1 -1
- package/dist/components/ui/select/id-async-select.js +60 -60
- package/dist/components/ui/select/id-async-select.js.map +1 -1
- package/dist/components/ui/select/select.js +11 -9
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator.js +1 -2
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +2 -2
- package/dist/components/ui/sheet.js +20 -21
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +23 -23
- package/dist/components/ui/sidebar.js +1 -2
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.js +1 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.js +1 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonamu-filter/constants.js +1 -2
- package/dist/components/ui/sonamu-filter/constants.js.map +1 -1
- package/dist/components/ui/sonamu-filter/rule-row-input.d.ts +1 -1
- package/dist/components/ui/sonamu-filter/rule-row-input.js +1 -2
- package/dist/components/ui/sonamu-filter/rule-row-input.js.map +1 -1
- package/dist/components/ui/sonamu-filter/sonamu-filter-modal.d.ts +1 -1
- package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js +2 -3
- package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js.map +1 -1
- package/dist/components/ui/sonamu-filter/sonamu-filter-popover.d.ts +1 -1
- package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js +1 -2
- package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js.map +1 -1
- package/dist/components/ui/sonamu-filter/utils.js +2 -3
- package/dist/components/ui/sonamu-filter/utils.js.map +1 -1
- package/dist/components/ui/sonamu-filter/value-input.d.ts +1 -1
- package/dist/components/ui/sonamu-filter/value-input.js +1 -2
- package/dist/components/ui/sonamu-filter/value-input.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/switch.js +1 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +8 -8
- package/dist/components/ui/table.js +1 -2
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.js +1 -2
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tag-input.d.ts +1 -1
- package/dist/components/ui/tag-input.js +3 -12
- package/dist/components/ui/tag-input.js.map +1 -1
- package/dist/components/ui/textarea.js +1 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.js +18 -19
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toaster.d.ts +1 -1
- package/dist/components/ui/toaster.js +1 -2
- package/dist/components/ui/toaster.js.map +1 -1
- package/dist/components/ui/toggle-group.js +1 -2
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.js +17 -17
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.js +1 -2
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/contexts/index.js +1 -2
- package/dist/contexts/sonamu-context.d.ts +1 -1
- package/dist/contexts/sonamu-context.js +1 -2
- package/dist/contexts/sonamu-context.js.map +1 -1
- package/dist/demo/App.d.ts +1 -1
- package/dist/demo/Layout.d.ts +1 -1
- package/dist/demo/components/FormDebugPanel.d.ts +1 -1
- package/dist/demo/routeTree.gen.d.ts +37 -37
- package/dist/demo/schemas/form-demo.schema.d.ts +8 -8
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/use-toast.js +2 -3
- package/dist/hooks/use-toast.js.map +1 -1
- package/dist/i18n/rc-keys.js +1 -2
- package/dist/i18n/rc-keys.js.map +1 -1
- package/dist/lib/base-helpers.js +3 -3
- package/dist/lib/base-helpers.js.map +1 -1
- package/dist/lib/caster.d.ts +1 -1
- package/dist/lib/caster.js +1 -2
- package/dist/lib/caster.js.map +1 -1
- package/dist/lib/form-helpers.js +1 -2
- package/dist/lib/form-helpers.js.map +1 -1
- package/dist/lib/list-helpers.js +1 -2
- package/dist/lib/list-helpers.js.map +1 -1
- package/dist/lib/modal-helpers.js +1 -2
- package/dist/lib/modal-helpers.js.map +1 -1
- package/dist/lib/types.js +1 -2
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/use-mobile.js +7 -9
- package/dist/lib/use-mobile.js.map +1 -1
- package/dist/lib/utils.js +1 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/styles/globals.css +1 -7
- package/package.json +69 -67
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","names":[],"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":";;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"popover.js","names":["PopoverPrimitive","Popover","props","PopoverTrigger","PopoverContent","cn","className","PopoverAnchor"],"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":";;;;;AAOA,SAASC,EAAQ,EAAE,GAAGC,KAA6D;CACjF,OAAO,kBAACF,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIE;CAAQ,CAAA;AAChE;AAEA,SAASC,EAAe,EAAE,GAAGD,KAAgE;CAC3F,OAAO,kBAACF,EAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAIE;CAAQ,CAAA;AAC3E;AAEA,SAASE,EAAe,EACtB,cACA,WAAQ,UACR,gBAAa,GACb,GAAGF,KACqD;CACxD,OACE,kBAACF,EAAiB,QAAlB,EAAA,UACE,kBAACA,EAAiB,SAAlB;EACE,aAAU;EACH;EACK;EACZ,WAAWK,EACT,keACAC,CACF;EACA,GAAIJ;CACL,CAAA,EACsB,CAAA;AAE7B;AAEA,SAASK,EAAc,EAAE,GAAGL,KAA+D;CACzF,OAAO,kBAACF,EAAiB,QAAlB;EAAyB,aAAU;EAAiB,GAAIE;CAAQ,CAAA;AACzE"}
|
|
@@ -3,7 +3,7 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import * as r from "@radix-ui/react-progress";
|
|
6
|
-
|
|
6
|
+
// src/components/ui/progress.tsx
|
|
7
7
|
var i = t.forwardRef(({ className: t, value: i, ...a }, o) => /* @__PURE__ */ n(r.Root, {
|
|
8
8
|
ref: o,
|
|
9
9
|
className: e("relative h-4 w-full overflow-hidden rounded-full bg-secondary", t),
|
|
@@ -14,7 +14,6 @@ var i = t.forwardRef(({ className: t, value: i, ...a }, o) => /* @__PURE__ */ n(
|
|
|
14
14
|
})
|
|
15
15
|
}));
|
|
16
16
|
i.displayName = r.Root.displayName;
|
|
17
|
-
//#endregion
|
|
18
17
|
export { i as Progress };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":[],"sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Progress = React.forwardRef<\n React.ComponentRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"relative h-4 w-full overflow-hidden rounded-full bg-secondary\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"],"mappings":";;;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"progress.js","names":["React","React$1","ProgressPrimitive","Progress","props","cn","className","value"],"sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Progress = React.forwardRef<\n React.ComponentRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"relative h-4 w-full overflow-hidden rounded-full bg-secondary\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"],"mappings":";;;;;;AAOA,IAAMG,IAAWH,EAAM,YAGpB,EAAE,cAAW,UAAO,GAAGI,KAAS,MACjC,kBAACF,EAAkB,MAAnB;CACO;CACL,WAAWG,EAAG,iEAAiEC,CAAS;CACxF,GAAIF;CAEJ,UAAA,kBAACF,EAAkB,WAAnB;EACE,WAAU;EACV,OAAO,EAAE,WAAW,eAAe,OAAOK,KAAS,GAAG,IAAI;CAC3D,CAAA;AACqB,CAAA,CACzB;AACD,EAAS,cAAcL,EAAkB,KAAK"}
|
|
@@ -3,7 +3,7 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import * as r from "@radix-ui/react-radio-group";
|
|
6
|
-
|
|
6
|
+
// src/components/ui/radio-group.tsx
|
|
7
7
|
var i = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Root, {
|
|
8
8
|
className: e("grid gap-2", t),
|
|
9
9
|
...i,
|
|
@@ -20,7 +20,6 @@ var a = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Item, {
|
|
|
20
20
|
})
|
|
21
21
|
}));
|
|
22
22
|
a.displayName = r.Item.displayName;
|
|
23
|
-
//#endregion
|
|
24
23
|
export { i as RadioGroup, a as RadioGroupItem };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":[],"sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} ref={ref} />;\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <div className=\"h-2 w-2 rounded-full bg-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":";;;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":["React","React$1","RadioGroupPrimitive","RadioGroup","props","cn","className","RadioGroupItem"],"sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} ref={ref} />;\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <div className=\"h-2 w-2 rounded-full bg-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":";;;;;;AAOA,IAAMG,IAAaH,EAAM,YAGtB,EAAE,cAAW,GAAGI,KAAS,MACnB,kBAACF,EAAoB,MAArB;CAA0B,WAAWG,EAAG,cAAcC,CAAS;CAAG,GAAIF;CAAY;AAAM,CAAA,CAChG;AACD,EAAW,cAAcF,EAAoB,KAAK;AAElD,IAAMK,IAAiBP,EAAM,YAG1B,EAAE,cAAW,GAAGI,KAAS,MAExB,kBAACF,EAAoB,MAArB;CACO;CACL,WAAWG,EACT,4OACAC,CACF;CACA,GAAIF;CAEJ,UAAA,kBAACF,EAAoB,WAArB;EAA+B,WAAU;EACvC,UAAA,kBAAC,OAAD,EAAK,WAAU,kCAAmC,CAAA;CACrB,CAAA;AACP,CAAA,CAE7B;AACD,EAAe,cAAcA,EAAoB,KAAK"}
|
|
@@ -11,4 +11,4 @@ export type RangeNumberInputProps = {
|
|
|
11
11
|
* between 연산자에서 사용
|
|
12
12
|
* [min, max] 두 개의 숫자 입력
|
|
13
13
|
*/
|
|
14
|
-
export declare function RangeNumberInput({ value, onChange, placeholder, disabled, className, }: RangeNumberInputProps): import(
|
|
14
|
+
export declare function RangeNumberInput({ value, onChange, placeholder, disabled, className, }: RangeNumberInputProps): import('react').JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input as e } from "./input.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/ui/range-number-input.tsx
|
|
4
4
|
function r({ value: r = [void 0, void 0], onChange: i, placeholder: a = ["최소값", "최대값"], disabled: o, className: s }) {
|
|
5
5
|
let [c, l] = r;
|
|
6
6
|
return /* @__PURE__ */ n("div", {
|
|
@@ -35,7 +35,6 @@ function r({ value: r = [void 0, void 0], onChange: i, placeholder: a = ["최소
|
|
|
35
35
|
]
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { r as RangeNumberInput };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=range-number-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-number-input.js","names":[],"sources":["../../../src/components/ui/range-number-input.tsx"],"sourcesContent":["import { Input } from \"./input\";\n\nexport type RangeNumberInputProps = {\n value?: [number | undefined, number | undefined];\n onChange?: (value: [number | undefined, number | undefined]) => void;\n placeholder?: [string, string];\n disabled?: boolean;\n className?: string;\n};\n\n/**\n * Range Number Input 컴포넌트\n *\n * between 연산자에서 사용\n * [min, max] 두 개의 숫자 입력\n */\nexport function RangeNumberInput({\n value = [undefined, undefined],\n onChange,\n placeholder = [\"최소값\", \"최대값\"],\n disabled,\n className,\n}: RangeNumberInputProps) {\n const [min, max] = value;\n\n const handleMinChange = (v: string) => {\n const newMin = v === \"\" ? undefined : Number(v);\n onChange?.([newMin, max]);\n };\n\n const handleMaxChange = (v: string) => {\n const newMax = v === \"\" ? undefined : Number(v);\n onChange?.([min, newMax]);\n };\n\n return (\n <div className={`flex items-center gap-2 ${className}`}>\n <Input\n type=\"number\"\n value={min === undefined ? \"\" : String(min)}\n onValueChange={handleMinChange}\n placeholder={placeholder[0]}\n disabled={disabled}\n className=\"flex-1\"\n />\n <span className=\"text-muted-foreground\">~</span>\n <Input\n type=\"number\"\n value={max === undefined ? \"\" : String(max)}\n onValueChange={handleMaxChange}\n placeholder={placeholder[1]}\n disabled={disabled}\n className=\"flex-1\"\n />\n </div>\n );\n}\n"],"mappings":";;;AAgBA,
|
|
1
|
+
{"version":3,"file":"range-number-input.js","names":["RangeNumberInput","min","max","value","className","Input","newMin","v","placeholder","newMax"],"sources":["../../../src/components/ui/range-number-input.tsx"],"sourcesContent":["import { Input } from \"./input\";\n\nexport type RangeNumberInputProps = {\n value?: [number | undefined, number | undefined];\n onChange?: (value: [number | undefined, number | undefined]) => void;\n placeholder?: [string, string];\n disabled?: boolean;\n className?: string;\n};\n\n/**\n * Range Number Input 컴포넌트\n *\n * between 연산자에서 사용\n * [min, max] 두 개의 숫자 입력\n */\nexport function RangeNumberInput({\n value = [undefined, undefined],\n onChange,\n placeholder = [\"최소값\", \"최대값\"],\n disabled,\n className,\n}: RangeNumberInputProps) {\n const [min, max] = value;\n\n const handleMinChange = (v: string) => {\n const newMin = v === \"\" ? undefined : Number(v);\n onChange?.([newMin, max]);\n };\n\n const handleMaxChange = (v: string) => {\n const newMax = v === \"\" ? undefined : Number(v);\n onChange?.([min, newMax]);\n };\n\n return (\n <div className={`flex items-center gap-2 ${className}`}>\n <Input\n type=\"number\"\n value={min === undefined ? \"\" : String(min)}\n onValueChange={handleMinChange}\n placeholder={placeholder[0]}\n disabled={disabled}\n className=\"flex-1\"\n />\n <span className=\"text-muted-foreground\">~</span>\n <Input\n type=\"number\"\n value={max === undefined ? \"\" : String(max)}\n onValueChange={handleMaxChange}\n placeholder={placeholder[1]}\n disabled={disabled}\n className=\"flex-1\"\n />\n </div>\n );\n}\n"],"mappings":";;;AAgBA,SAAgBA,EAAiB,EAC/B,WAAQ,CAAC,KAAA,GAAW,KAAA,CAAS,GAC7B,aACA,iBAAc,CAAC,OAAO,KAAK,GAC3B,aACA,gBACwB;CACxB,IAAM,CAACC,GAAKC,KAAOC;CAYnB,OACE,kBAAC,OAAD;EAAK,WAAW,2BAA2BC;EAA3C,UAAA;GACE,kBAACC,GAAD;IACE,MAAK;IACL,OAAOJ,MAAQ,KAAA,IAAY,KAAK,OAAOA,CAAG;IAC1C,gBAfmB,MAAc;KACrC,IAAMK,IAASC,MAAM,KAAK,KAAA,IAAY,OAAOA,CAAC;KAC9C,IAAW,CAACD,GAAQJ,CAAG,CAAC;IAC1B;IAaM,aAAaM,EAAY;IACf;IACV,WAAU;GACX,CAAA;GACD,kBAAC,QAAD;IAAM,WAAU;IAAwB,UAAA;GAAO,CAAA;GAC/C,kBAACH,GAAD;IACE,MAAK;IACL,OAAOH,MAAQ,KAAA,IAAY,KAAK,OAAOA,CAAG;IAC1C,gBAnBmB,MAAc;KACrC,IAAMO,IAASF,MAAM,KAAK,KAAA,IAAY,OAAOA,CAAC;KAC9C,IAAW,CAACN,GAAKQ,CAAM,CAAC;IAC1B;IAiBM,aAAaD,EAAY;IACf;IACV,WAAU;GACX,CAAA;EACE;;AAET"}
|
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
-
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.
|
|
3
|
-
declare const ResizablePanel:
|
|
4
|
-
|
|
5
|
-
collapsedSize?: number | undefined;
|
|
6
|
-
collapsible?: boolean | undefined;
|
|
7
|
-
defaultSize?: number | undefined;
|
|
8
|
-
id?: string;
|
|
9
|
-
maxSize?: number | undefined;
|
|
10
|
-
minSize?: number | undefined;
|
|
11
|
-
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
12
|
-
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
13
|
-
onResize?: ResizablePrimitive.PanelOnResize;
|
|
14
|
-
order?: number;
|
|
15
|
-
style?: object;
|
|
16
|
-
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
children?: import('react').ReactNode | undefined;
|
|
19
|
-
} & import('react').RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
20
|
-
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
2
|
+
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.Group>) => import('react').JSX.Element;
|
|
3
|
+
declare const ResizablePanel: typeof ResizablePrimitive.Panel;
|
|
4
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.Separator> & {
|
|
21
5
|
withHandle?: boolean;
|
|
22
|
-
}) => import(
|
|
6
|
+
}) => import('react').JSX.Element;
|
|
23
7
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -3,19 +3,18 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import t from "../../_virtual/~icons/lucide/grip-vertical.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import * as r from "react-resizable-panels";
|
|
6
|
-
|
|
7
|
-
var i = ({ className: t, ...i }) => /* @__PURE__ */ n(r.
|
|
8
|
-
className: e("flex h-full w-full
|
|
6
|
+
// src/components/ui/resizable.tsx
|
|
7
|
+
var i = ({ className: t, ...i }) => /* @__PURE__ */ n(r.Group, {
|
|
8
|
+
className: e("flex h-full w-full aria-[orientation=vertical]:flex-col", t),
|
|
9
9
|
...i
|
|
10
|
-
}), a = r.Panel, o = ({ withHandle: i, className: a, ...o }) => /* @__PURE__ */ n(r.
|
|
11
|
-
className: e("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1
|
|
10
|
+
}), a = r.Panel, o = ({ withHandle: i, className: a, ...o }) => /* @__PURE__ */ n(r.Separator, {
|
|
11
|
+
className: e("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90", a),
|
|
12
12
|
...o,
|
|
13
13
|
children: i && /* @__PURE__ */ n("div", {
|
|
14
14
|
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
|
|
15
15
|
children: /* @__PURE__ */ n(t, { className: "h-2.5 w-2.5" })
|
|
16
16
|
})
|
|
17
17
|
});
|
|
18
|
-
//#endregion
|
|
19
18
|
export { o as ResizableHandle, a as ResizablePanel, i as ResizablePanelGroup };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.js","names":[],"sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as ResizablePrimitive from \"react-resizable-panels\";\nimport GripVerticalIcon from \"~icons/lucide/grip-vertical\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ResizablePanelGroup = ({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.
|
|
1
|
+
{"version":3,"file":"resizable.js","names":["GripVerticalIcon","ForwardRef","ResizablePrimitive","ResizablePanelGroup","props","cn","className","ResizablePanel","ResizableHandle","withHandle"],"sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as ResizablePrimitive from \"react-resizable-panels\";\nimport GripVerticalIcon from \"~icons/lucide/grip-vertical\";\n\nimport { cn } from \"../../lib/utils\";\n\n// react-resizable-panels 4부터 PanelGroup/PanelResizeHandle이 Group/Separator로 바뀌고\n// direction 대신 orientation을 받는다. 외부 컴포넌트 이름은 유지한다\nconst ResizablePanelGroup = ({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.Group>) => (\n <ResizablePrimitive.Group\n className={cn(\"flex h-full w-full aria-[orientation=vertical]:flex-col\", className)}\n {...props}\n />\n);\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\nconst ResizableHandle = ({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.Separator> & {\n withHandle?: boolean;\n}) => (\n <ResizablePrimitive.Separator\n className={cn(\n \"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border\">\n <GripVerticalIcon className=\"h-2.5 w-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n);\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;AASA,IAAMG,KAAuB,EAC3B,cACA,GAAGC,QAEH,kBAACF,EAAmB,OAApB;CACE,WAAWG,EAAG,2DAA2DC,CAAS;CAClF,GAAIF;AACL,CAAA,GAGGG,IAAiBL,EAAmB,OAEpCM,KAAmB,EACvB,eACA,cACA,GAAGJ,QAIH,kBAACF,EAAmB,WAApB;CACE,WAAWG,EACT,2kBACAC,CACF;CACA,GAAIF;CAEH,UAAAK,KACC,kBAAC,OAAD;EAAK,WAAU;EACb,UAAA,kBAACT,GAAD,EAAkB,WAAU,cAAe,CAAA;CACxC,CAAA;AAEqB,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
import * as i from "@radix-ui/react-scroll-area";
|
|
6
|
-
|
|
6
|
+
// src/components/ui/scroll-area.tsx
|
|
7
7
|
var a = t.forwardRef(({ className: t, children: a, ...s }, c) => /* @__PURE__ */ r(i.Root, {
|
|
8
8
|
ref: c,
|
|
9
9
|
className: e("relative overflow-hidden", t),
|
|
@@ -26,7 +26,6 @@ var o = t.forwardRef(({ className: t, orientation: r = "vertical", ...a }, o) =>
|
|
|
26
26
|
children: /* @__PURE__ */ n(i.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
27
27
|
}));
|
|
28
28
|
o.displayName = i.ScrollAreaScrollbar.displayName;
|
|
29
|
-
//#endregion
|
|
30
29
|
export { a as ScrollArea, o as ScrollBar };
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\n\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent p-px\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent p-px\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":["React","React$1","ScrollAreaPrimitive","ScrollArea","props","cn","className","ScrollBar","orientation"],"sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\n\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent p-px\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent p-px\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;AAOA,IAAMG,IAAaH,EAAM,YAGtB,EAAE,cAAW,aAAU,GAAGI,KAAS,MACpC,kBAACF,EAAoB,MAArB;CACO;CACL,WAAWG,EAAG,4BAA4BC,CAAS;CACnD,GAAIF;CAHN,UAAA;EAKE,kBAACF,EAAoB,UAArB;GAA8B,WAAU;GACrC;EAC2B,CAAA;EAC9B,kBAACK,GAAD,CAAY,CAAA;EACZ,kBAACL,EAAoB,QAArB,CAA6B,CAAA;CACL;AAC3B,CAAA,CAAA;AACD,EAAW,cAAcA,EAAoB,KAAK;AAElD,IAAMK,IAAYP,EAAM,YAGrB,EAAE,cAAW,iBAAc,YAAY,GAAGI,KAAS,MACpD,kBAACF,EAAoB,qBAArB;CACO;CACQ;CACb,WAAWG,EACT,iDACAG,MAAgB,cAAc,mDAC9BA,MAAgB,gBAAgB,qDAChCF,CACF;CACA,GAAIF;CAEJ,UAAA,kBAACF,EAAoB,iBAArB,EAAqC,WAAU,yCAA0C,CAAA;AAClD,CAAA,CAC1C;AACD,EAAU,cAAcA,EAAoB,oBAAoB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
export type EnumSelectProps<TValue extends string = string> = {
|
|
2
3
|
enum: {
|
|
3
4
|
options: readonly TValue[];
|
|
@@ -12,4 +13,4 @@ export type EnumSelectProps<TValue extends string = string> = {
|
|
|
12
13
|
className?: string;
|
|
13
14
|
multiple?: boolean;
|
|
14
15
|
};
|
|
15
|
-
export declare function EnumSelect<TValue extends string = string>({ enum: zodEnum, labels, value, onValueChange, placeholder, textPrefix, clearable, disabled, className, multiple, }: EnumSelectProps<TValue>):
|
|
16
|
+
export declare function EnumSelect<TValue extends string = string>({ enum: zodEnum, labels, value, onValueChange, placeholder, textPrefix, clearable, disabled, className, multiple, }: EnumSelectProps<TValue>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Select as e } from "./select.js";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/ui/select/enum-select.tsx
|
|
5
5
|
function r({ enum: r, labels: i, value: a, onValueChange: o, placeholder: s, textPrefix: c = "", clearable: l = !1, disabled: u = !1, className: d, multiple: f = !1 }) {
|
|
6
6
|
let p = t.useMemo(() => r.options.filter((e) => e !== ""), [r]), m = t.useMemo(() => p.map((e) => ({
|
|
7
7
|
value: e,
|
|
@@ -39,7 +39,6 @@ function r({ enum: r, labels: i, value: a, onValueChange: o, placeholder: s, tex
|
|
|
39
39
|
async: !1
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { r as EnumSelect };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=enum-select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-select.js","names":[],"sources":["../../../../src/components/ui/select/enum-select.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { Select } from \"./select\";\n\n// ============================================================================\n// Type Definition\n// ============================================================================\n\n// EnumSelect Props\nexport type EnumSelectProps<TValue extends string = string> = {\n enum: { options: readonly TValue[] };\n labels: Record<TValue, string>;\n value?: TValue | TValue[] | \"\";\n onValueChange?: (value: TValue | TValue[] | \"\" | null | undefined) => void;\n placeholder?: string;\n textPrefix?: string;\n clearable?: boolean;\n disabled?: boolean;\n className?: string;\n multiple?: boolean;\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function EnumSelect<TValue extends string = string>({\n enum: zodEnum,\n labels,\n value,\n onValueChange,\n placeholder,\n textPrefix = \"\",\n clearable = false,\n disabled = false,\n className,\n multiple = false,\n}: EnumSelectProps<TValue>) {\n // Zod enum에서 options 추출 (빈 문자열 필터링 - Radix UI 제약)\n const validOptions = React.useMemo(() => {\n return zodEnum.options.filter((key) => key !== \"\");\n }, [zodEnum]);\n\n // items 구성\n const items = React.useMemo(() => {\n return validOptions.map((key) => ({\n value: key,\n label: textPrefix + labels[key],\n }));\n }, [validOptions, labels, textPrefix]);\n\n // Single 모드\n if (!multiple) {\n return (\n <Select\n items={items}\n valueKey={(optionValue) => optionValue}\n value={Array.isArray(value) || value === \"\" ? undefined : value}\n onValueChange={(newValue: TValue | undefined) => {\n onValueChange?.(newValue);\n }}\n placeholder={placeholder}\n clearable={clearable}\n disabled={disabled}\n className={className}\n multiple={false}\n async={false}\n />\n );\n }\n\n // Multiple 모드\n return (\n <Select\n items={items}\n valueKey={(optionValue) => optionValue}\n value={Array.isArray(value) ? value : []}\n onValueChange={(newValue: TValue[]) => {\n onValueChange?.(newValue);\n }}\n placeholder={placeholder}\n clearable={clearable}\n disabled={disabled}\n className={className}\n multiple={true}\n async={false}\n />\n );\n}\n"],"mappings":";;;;AA0BA,
|
|
1
|
+
{"version":3,"file":"enum-select.js","names":["React","React$1","EnumSelect","zodEnum","validOptions","key","items","textPrefix","labels","multiple","Select","optionValue","value","newValue"],"sources":["../../../../src/components/ui/select/enum-select.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { Select } from \"./select\";\n\n// ============================================================================\n// Type Definition\n// ============================================================================\n\n// EnumSelect Props\nexport type EnumSelectProps<TValue extends string = string> = {\n enum: { options: readonly TValue[] };\n labels: Record<TValue, string>;\n value?: TValue | TValue[] | \"\";\n onValueChange?: (value: TValue | TValue[] | \"\" | null | undefined) => void;\n placeholder?: string;\n textPrefix?: string;\n clearable?: boolean;\n disabled?: boolean;\n className?: string;\n multiple?: boolean;\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function EnumSelect<TValue extends string = string>({\n enum: zodEnum,\n labels,\n value,\n onValueChange,\n placeholder,\n textPrefix = \"\",\n clearable = false,\n disabled = false,\n className,\n multiple = false,\n}: EnumSelectProps<TValue>) {\n // Zod enum에서 options 추출 (빈 문자열 필터링 - Radix UI 제약)\n const validOptions = React.useMemo(() => {\n return zodEnum.options.filter((key) => key !== \"\");\n }, [zodEnum]);\n\n // items 구성\n const items = React.useMemo(() => {\n return validOptions.map((key) => ({\n value: key,\n label: textPrefix + labels[key],\n }));\n }, [validOptions, labels, textPrefix]);\n\n // Single 모드\n if (!multiple) {\n return (\n <Select\n items={items}\n valueKey={(optionValue) => optionValue}\n value={Array.isArray(value) || value === \"\" ? undefined : value}\n onValueChange={(newValue: TValue | undefined) => {\n onValueChange?.(newValue);\n }}\n placeholder={placeholder}\n clearable={clearable}\n disabled={disabled}\n className={className}\n multiple={false}\n async={false}\n />\n );\n }\n\n // Multiple 모드\n return (\n <Select\n items={items}\n valueKey={(optionValue) => optionValue}\n value={Array.isArray(value) ? value : []}\n onValueChange={(newValue: TValue[]) => {\n onValueChange?.(newValue);\n }}\n placeholder={placeholder}\n clearable={clearable}\n disabled={disabled}\n className={className}\n multiple={true}\n async={false}\n />\n );\n}\n"],"mappings":";;;;AA0BA,SAAgBE,EAA2C,EACzD,MAAMC,GACN,WACA,UACA,kBACA,gBACA,gBAAa,IACb,eAAY,IACZ,cAAW,IACX,cACA,cAAW,MACe;CAE1B,IAAMC,IAAeJ,EAAM,cAClBG,EAAQ,QAAQ,QAAQ,MAAQE,MAAQ,EAAE,GAChD,CAACF,CAAO,CAAC,GAGNG,IAAQN,EAAM,cACXI,EAAa,KAAK,OAAS;EAChC,OAAOC;EACP,OAAOE,IAAaC,EAAOH;CAC7B,EAAE,GACD;EAACD;EAAcI;EAAQD;CAAU,CAAC;CAuBrC,OApBKE,IAqBH,kBAACC,GAAD;EACS;EACP,WAAW,MAAgBC;EAC3B,OAAO,MAAM,QAAQC,CAAK,IAAIA,IAAQ,CAAC;EACvC,gBAAgB,MAAuB;GACrC,IAAgBC,CAAQ;EAC1B;EACa;EACF;EACD;EACC;EACX,UAAU;EACV,OAAO;CACR,CAAA,IAhCC,kBAACH,GAAD;EACS;EACP,WAAW,MAAgBC;EAC3B,OAAO,MAAM,QAAQC,CAAK,KAAKA,MAAU,KAAK,KAAA,IAAYA;EAC1D,gBAAgB,MAAiC;GAC/C,IAAgBC,CAAQ;EAC1B;EACa;EACF;EACD;EACC;EACX,UAAU;EACV,OAAO;CACR,CAAA;AAqBP"}
|
|
@@ -4,7 +4,7 @@ import { createElement as n, useCallback as r, useEffect as ee, useMemo as i, us
|
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
import { isFunction as re, isNumber as o, isObject as ie, isString as s } from "radashi";
|
|
6
6
|
import { useQueryClient as ae } from "@tanstack/react-query";
|
|
7
|
-
|
|
7
|
+
// src/components/ui/select/id-async-select.tsx
|
|
8
8
|
var c = [
|
|
9
9
|
"name",
|
|
10
10
|
"title",
|
|
@@ -29,7 +29,7 @@ function se(e) {
|
|
|
29
29
|
return !Array.isArray(e) && d(e);
|
|
30
30
|
}
|
|
31
31
|
function d(e) {
|
|
32
|
-
return e == null || e === "" ? !1 : o(e)
|
|
32
|
+
return e == null || e === "" ? !1 : !o(e) || e !== 0;
|
|
33
33
|
}
|
|
34
34
|
function f(e) {
|
|
35
35
|
return String(e);
|
|
@@ -44,72 +44,72 @@ function m(n) {
|
|
|
44
44
|
return String(l(e, t) ?? "");
|
|
45
45
|
}, [h, D]), [k, ue] = ne(), A = r((e) => {
|
|
46
46
|
ue(e || void 0);
|
|
47
|
-
}, []), de = new Set([
|
|
47
|
+
}, []), de = /* @__PURE__ */ new Set([
|
|
48
48
|
"search",
|
|
49
49
|
"orderBy",
|
|
50
50
|
"queryMode",
|
|
51
51
|
"num",
|
|
52
52
|
"page",
|
|
53
53
|
"keyword"
|
|
54
|
-
]), fe = m && Object.entries(m).some(([e, t]) => !de.has(e) && d(t)), j = ce || fe,
|
|
54
|
+
]), fe = m && Object.entries(m).some(([e, t]) => !de.has(e) && d(t)), j = ce || fe, pe = k ? {
|
|
55
55
|
...m,
|
|
56
56
|
keyword: k
|
|
57
|
-
} : { ...m },
|
|
57
|
+
} : { ...m }, me = j || k !== void 0 && k.length > 0 || x && Array.isArray(S) && S.length > 0, M = c(p, pe, { enabled: me }), N = M.data?.rows ?? [], he = M.isLoading, P = M.error ?? void 0, F = !x && se(S) ? S : null, I = i(() => N.find((e) => u(e, g) === F), [
|
|
58
58
|
N,
|
|
59
|
-
|
|
59
|
+
F,
|
|
60
60
|
g
|
|
61
|
-
]),
|
|
62
|
-
id:
|
|
61
|
+
]), L = F !== null && !I, R = o(p, {
|
|
62
|
+
id: F,
|
|
63
63
|
num: 1,
|
|
64
64
|
page: 1
|
|
65
|
-
}, { enabled:
|
|
65
|
+
}, { enabled: L }), z = R.data?.rows[0] || I, B = x && Array.isArray(S) ? S : [], V = i(() => B.flatMap((e) => {
|
|
66
66
|
let t = N.find((t) => u(t, g) === e);
|
|
67
67
|
return t ? [t] : [];
|
|
68
68
|
}), [
|
|
69
69
|
N,
|
|
70
|
-
|
|
70
|
+
B,
|
|
71
71
|
g
|
|
72
|
-
]),
|
|
73
|
-
let e = new Set(
|
|
74
|
-
return
|
|
72
|
+
]), H = i(() => {
|
|
73
|
+
let e = new Set(V.map((e) => e ? u(e, g) : void 0));
|
|
74
|
+
return B.filter((t) => !e.has(t));
|
|
75
75
|
}, [
|
|
76
|
-
z,
|
|
77
76
|
B,
|
|
77
|
+
V,
|
|
78
78
|
g
|
|
79
|
-
]),
|
|
80
|
-
id:
|
|
81
|
-
num:
|
|
79
|
+
]), U = H.length > 0, W = o(p, {
|
|
80
|
+
id: H,
|
|
81
|
+
num: H.length,
|
|
82
82
|
page: 1
|
|
83
|
-
}, { enabled:
|
|
84
|
-
let e =
|
|
85
|
-
return [...
|
|
86
|
-
}, [
|
|
83
|
+
}, { enabled: U }), G = i(() => {
|
|
84
|
+
let e = W.data?.rows ?? [];
|
|
85
|
+
return [...V, ...e];
|
|
86
|
+
}, [V, W.data]), K = he || L && R.isLoading || U && W.isLoading, q = r(() => {
|
|
87
87
|
E.resetQueries({ predicate: (e) => {
|
|
88
88
|
let t = e.queryKey;
|
|
89
89
|
return Array.isArray(t) && t[2] === "infinite" && t[3] === p;
|
|
90
90
|
} });
|
|
91
|
-
}, [E, p]),
|
|
91
|
+
}, [E, p]), J = r((e) => {
|
|
92
92
|
E.removeQueries({ predicate: (t) => {
|
|
93
93
|
let n = t.queryKey;
|
|
94
94
|
if (!Array.isArray(n) || n[2] !== "infinite" || n[3] !== p) return !1;
|
|
95
95
|
let r = n[4];
|
|
96
96
|
return ie(r) ? l(r, "keyword") === e : !1;
|
|
97
97
|
} });
|
|
98
|
-
}, [E, p]),
|
|
98
|
+
}, [E, p]), Y = te(void 0);
|
|
99
99
|
ee(() => {
|
|
100
|
-
let e =
|
|
101
|
-
e !== k &&
|
|
102
|
-
}, [k,
|
|
103
|
-
let
|
|
104
|
-
e ||
|
|
105
|
-
}, [
|
|
100
|
+
let e = Y.current;
|
|
101
|
+
e !== k && J(e), Y.current = k;
|
|
102
|
+
}, [k, J]);
|
|
103
|
+
let X = r((e) => {
|
|
104
|
+
e || q();
|
|
105
|
+
}, [q]), Z = r(() => {
|
|
106
106
|
M.hasNextPage && !M.isFetchingNextPage && M.fetchNextPage();
|
|
107
|
-
}, [M]), { items:
|
|
107
|
+
}, [M]), { items: Q, rowMap: $ } = i(() => {
|
|
108
108
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
109
|
-
if (!x &&
|
|
110
|
-
value:
|
|
111
|
-
label: O(
|
|
112
|
-
})), x &&
|
|
109
|
+
if (!x && z && F !== null && (e.set(F, z), t.set(F, {
|
|
110
|
+
value: F,
|
|
111
|
+
label: O(z)
|
|
112
|
+
})), x && G.length > 0) for (let n of G) {
|
|
113
113
|
let r = u(n, g);
|
|
114
114
|
e.set(r, n), t.set(r, {
|
|
115
115
|
value: r,
|
|
@@ -129,21 +129,21 @@ function m(n) {
|
|
|
129
129
|
};
|
|
130
130
|
}, [
|
|
131
131
|
N,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
z,
|
|
133
|
+
F,
|
|
134
|
+
G,
|
|
135
135
|
x,
|
|
136
136
|
O,
|
|
137
137
|
g
|
|
138
|
-
]),
|
|
138
|
+
]), ge = !!M.hasNextPage, _e = !!M.isFetchingNextPage, ve = le ?? !j;
|
|
139
139
|
return x ? /* @__PURE__ */ a(t, {
|
|
140
|
-
items:
|
|
140
|
+
items: Q,
|
|
141
141
|
valueKey: f,
|
|
142
|
-
value:
|
|
142
|
+
value: B,
|
|
143
143
|
onValueChange: (e) => {
|
|
144
144
|
C?.(e);
|
|
145
145
|
let t = e.flatMap((e) => {
|
|
146
|
-
let t =
|
|
146
|
+
let t = $.get(e);
|
|
147
147
|
return t ? [t] : [];
|
|
148
148
|
});
|
|
149
149
|
w?.(t);
|
|
@@ -154,20 +154,20 @@ function m(n) {
|
|
|
154
154
|
className: b,
|
|
155
155
|
multiple: !0,
|
|
156
156
|
async: !0,
|
|
157
|
-
searchable:
|
|
158
|
-
loading:
|
|
159
|
-
error:
|
|
157
|
+
searchable: ve,
|
|
158
|
+
loading: K,
|
|
159
|
+
error: P,
|
|
160
160
|
onSearch: A,
|
|
161
|
-
onOpenChange:
|
|
162
|
-
onLoadMore:
|
|
163
|
-
hasMore:
|
|
164
|
-
isLoadingMore:
|
|
161
|
+
onOpenChange: X,
|
|
162
|
+
onLoadMore: Z,
|
|
163
|
+
hasMore: ge,
|
|
164
|
+
isLoadingMore: _e
|
|
165
165
|
}) : /* @__PURE__ */ a(t, {
|
|
166
|
-
items:
|
|
166
|
+
items: Q,
|
|
167
167
|
valueKey: f,
|
|
168
|
-
value:
|
|
168
|
+
value: F ?? void 0,
|
|
169
169
|
onValueChange: (e) => {
|
|
170
|
-
C?.(e), w?.(e ?
|
|
170
|
+
C?.(e), w?.(e ? $.get(e) : void 0);
|
|
171
171
|
},
|
|
172
172
|
placeholder: _ ?? T(n.placeholderKey),
|
|
173
173
|
clearable: v,
|
|
@@ -175,14 +175,14 @@ function m(n) {
|
|
|
175
175
|
className: b,
|
|
176
176
|
multiple: !1,
|
|
177
177
|
async: !0,
|
|
178
|
-
searchable:
|
|
179
|
-
loading:
|
|
180
|
-
error:
|
|
178
|
+
searchable: ve,
|
|
179
|
+
loading: K,
|
|
180
|
+
error: P,
|
|
181
181
|
onSearch: A,
|
|
182
|
-
onOpenChange:
|
|
183
|
-
onLoadMore:
|
|
184
|
-
hasMore:
|
|
185
|
-
isLoadingMore:
|
|
182
|
+
onOpenChange: X,
|
|
183
|
+
onLoadMore: Z,
|
|
184
|
+
hasMore: ge,
|
|
185
|
+
isLoadingMore: _e
|
|
186
186
|
});
|
|
187
187
|
};
|
|
188
188
|
}
|
|
@@ -193,9 +193,9 @@ function h(e) {
|
|
|
193
193
|
return p.set(e, n), n;
|
|
194
194
|
}
|
|
195
195
|
function g({ config: e, ...t }) {
|
|
196
|
-
|
|
196
|
+
let r = h(e);
|
|
197
|
+
return n(r, t);
|
|
197
198
|
}
|
|
198
|
-
//#endregion
|
|
199
199
|
export { g as IdAsyncSelect };
|
|
200
200
|
|
|
201
201
|
//# sourceMappingURL=id-async-select.js.map
|