@gv-tech/design-system 2.21.0 → 2.22.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/dist/accordion.cjs +1 -1
- package/dist/accordion.cjs.map +1 -1
- package/dist/accordion.mjs +2 -2
- package/dist/accordion.mjs.map +1 -1
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.cjs.map +1 -1
- package/dist/alert-dialog.mjs +2 -2
- package/dist/alert-dialog.mjs.map +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.cjs.map +1 -1
- package/dist/alert.mjs +2 -2
- package/dist/alert.mjs.map +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.cjs.map +1 -1
- package/dist/aspect-ratio.mjs +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.mjs +2 -2
- package/dist/avatar.mjs.map +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.cjs.map +1 -1
- package/dist/badge.mjs +2 -2
- package/dist/badge.mjs.map +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.mjs +2 -2
- package/dist/breadcrumb.mjs.map +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.cjs.map +1 -1
- package/dist/button.mjs +2 -2
- package/dist/button.mjs.map +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.cjs.map +1 -1
- package/dist/calendar.mjs +2 -2
- package/dist/calendar.mjs.map +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.cjs.map +1 -1
- package/dist/card.mjs +2 -2
- package/dist/card.mjs.map +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.cjs.map +1 -1
- package/dist/carousel.mjs +2 -2
- package/dist/carousel.mjs.map +1 -1
- package/dist/chart.cjs +3 -3
- package/dist/chart.cjs.map +1 -1
- package/dist/chart.mjs +55 -45
- package/dist/chart.mjs.map +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.mjs +2 -2
- package/dist/checkbox.mjs.map +1 -1
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +1 -1
- package/dist/command.cjs +1 -1
- package/dist/command.cjs.map +1 -1
- package/dist/command.mjs +2 -2
- package/dist/command.mjs.map +1 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.cjs.map +1 -1
- package/dist/context-menu.mjs +2 -2
- package/dist/context-menu.mjs.map +1 -1
- package/dist/design-system.css +2 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.mjs +2 -2
- package/dist/dialog.mjs.map +1 -1
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.cjs.map +1 -1
- package/dist/drawer.mjs +2 -2
- package/dist/drawer.mjs.map +1 -1
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.cjs.map +1 -1
- package/dist/dropdown-menu.mjs +2 -2
- package/dist/dropdown-menu.mjs.map +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.cjs.map +1 -1
- package/dist/form.mjs +2 -2
- package/dist/form.mjs.map +1 -1
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.cjs.map +1 -1
- package/dist/hover-card.mjs +2 -2
- package/dist/hover-card.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/input.cjs +1 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.mjs +2 -2
- package/dist/input.mjs.map +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.cjs.map +1 -1
- package/dist/label.mjs +2 -2
- package/dist/label.mjs.map +1 -1
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.cjs.map +1 -1
- package/dist/menubar.mjs +2 -2
- package/dist/menubar.mjs.map +1 -1
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.cjs.map +1 -1
- package/dist/navigation-menu.mjs +2 -2
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.cjs.map +1 -1
- package/dist/pagination.mjs +2 -2
- package/dist/pagination.mjs.map +1 -1
- package/dist/popover.cjs +1 -1
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.mjs +2 -2
- package/dist/popover.mjs.map +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.cjs.map +1 -1
- package/dist/progress.mjs +2 -2
- package/dist/progress.mjs.map +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.cjs.map +1 -1
- package/dist/radio-group.mjs +2 -2
- package/dist/radio-group.mjs.map +1 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.cjs.map +1 -1
- package/dist/resizable.mjs +2 -2
- package/dist/resizable.mjs.map +1 -1
- package/dist/{rolldown-runtime-C0IHAABJ.mjs → rolldown-runtime-CWhphoD1.mjs} +1 -1
- package/dist/rolldown-runtime-mLOUI7ql.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.cjs.map +1 -1
- package/dist/scroll-area.mjs +2 -2
- package/dist/scroll-area.mjs.map +1 -1
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.cjs.map +1 -1
- package/dist/scroll-to-top.mjs +2 -2
- package/dist/scroll-to-top.mjs.map +1 -1
- package/dist/search.cjs +1 -1
- package/dist/search.cjs.map +1 -1
- package/dist/search.mjs +2 -2
- package/dist/search.mjs.map +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.cjs.map +1 -1
- package/dist/select.mjs +2 -2
- package/dist/select.mjs.map +1 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.cjs.map +1 -1
- package/dist/separator.mjs +2 -2
- package/dist/separator.mjs.map +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.cjs.map +1 -1
- package/dist/sheet.mjs +2 -2
- package/dist/sheet.mjs.map +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.mjs +2 -2
- package/dist/skeleton.mjs.map +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.mjs +2 -2
- package/dist/slider.mjs.map +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.cjs.map +1 -1
- package/dist/sonner.mjs +1 -1
- package/dist/sonner.mjs.map +1 -1
- package/dist/{src-B8AA-nU4.js → src-D3IDWqE2.js} +2 -2
- package/dist/{src-B8AA-nU4.js.map → src-D3IDWqE2.js.map} +1 -1
- package/dist/{src-C65A5RuY.mjs → src-N08I3kfW.mjs} +2 -2
- package/dist/{src-C65A5RuY.mjs.map → src-N08I3kfW.mjs.map} +1 -1
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.cjs.map +1 -1
- package/dist/support-fab.mjs +2 -2
- package/dist/support-fab.mjs.map +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.mjs +2 -2
- package/dist/switch.mjs.map +1 -1
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.cjs.map +1 -1
- package/dist/table-of-contents.mjs +2 -2
- package/dist/table-of-contents.mjs.map +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.cjs.map +1 -1
- package/dist/table.mjs +2 -2
- package/dist/table.mjs.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.mjs +2 -2
- package/dist/tabs.mjs.map +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.cjs.map +1 -1
- package/dist/text.mjs +2 -2
- package/dist/text.mjs.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.mjs +2 -2
- package/dist/textarea.mjs.map +1 -1
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.cjs.map +1 -1
- package/dist/theme-provider.mjs +1 -1
- package/dist/theme-provider.mjs.map +1 -1
- package/dist/{theme-toggle-DoAVRoyO.mjs → theme-toggle-B6QS2aTS.mjs} +3 -3
- package/dist/{theme-toggle-DoAVRoyO.mjs.map → theme-toggle-B6QS2aTS.mjs.map} +1 -1
- package/dist/theme-toggle-CbtfA8aG.js +2 -0
- package/dist/{theme-toggle-B8UiizQB.js.map → theme-toggle-CbtfA8aG.js.map} +1 -1
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +1 -1
- package/dist/toast.cjs +1 -1
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.mjs +2 -2
- package/dist/toast.mjs.map +1 -1
- package/dist/{toaster-DnZKPR-G.js → toaster-C-1djNvf.js} +2 -2
- package/dist/{toaster-DnZKPR-G.js.map → toaster-C-1djNvf.js.map} +1 -1
- package/dist/{toaster-BgZxvlTL.mjs → toaster-CEa33QUH.mjs} +2 -2
- package/dist/{toaster-BgZxvlTL.mjs.map → toaster-CEa33QUH.mjs.map} +1 -1
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +1 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.cjs.map +1 -1
- package/dist/toggle-group.mjs +3 -3
- package/dist/toggle-group.mjs.map +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.cjs.map +1 -1
- package/dist/toggle.mjs +3 -3
- package/dist/toggle.mjs.map +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.mjs +2 -2
- package/dist/tooltip.mjs.map +1 -1
- package/dist/{utils-BtI8Nf6i.mjs → utils-BsD1_fYL.mjs} +2 -2
- package/dist/{utils-BtI8Nf6i.mjs.map → utils-BsD1_fYL.mjs.map} +1 -1
- package/dist/utils-DU-Y_pvO.js +2 -0
- package/dist/{utils-CbSX47LV.js.map → utils-DU-Y_pvO.js.map} +1 -1
- package/dist/{vendor-D3ZzLf8D.js → vendor-3cr8xz0x.js} +8 -8
- package/dist/{vendor-D3ZzLf8D.js.map → vendor-3cr8xz0x.js.map} +1 -1
- package/dist/{vendor-Cr0eKZrm.mjs → vendor-ChPUVHXi.mjs} +7 -6
- package/dist/{vendor-Cr0eKZrm.mjs.map → vendor-ChPUVHXi.mjs.map} +1 -1
- package/package.json +22 -22
- package/dist/rolldown-runtime-CacfPODE.js +0 -1
- package/dist/theme-toggle-B8UiizQB.js +0 -2
- package/dist/utils-CbSX47LV.js +0 -2
package/dist/chart.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.mjs","names":[],"sources":["../packages/ui-web/src/chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport {\n ChartConfig,\n ChartContainerBaseProps,\n ChartLegendContentBaseProps,\n ChartTooltipContentBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n ChartContainerBaseProps & {\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(({ id, className, children, config, ...props }, ref) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n});\nChartContainer.displayName = 'Chart';\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof THEMES] || itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n'),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n HTMLDivElement,\n Partial<RechartsPrimitive.TooltipContentProps> & React.ComponentProps<'div'> & ChartTooltipContentBaseProps\n>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item: RechartsPrimitive.TooltipPayloadEntry) => item.type !== 'none')\n .map((item: RechartsPrimitive.TooltipPayloadEntry, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || ((item.payload as Record<string, unknown>).fill as string) || item.color;\n\n return (\n <div\n key={typeof item.dataKey === 'function' ? index : (item.dataKey ?? index)}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nChartTooltipContent.displayName = 'ChartTooltip';\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> &\n ChartLegendContentBaseProps\n>(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}\n >\n {payload\n .filter((item: RechartsPrimitive.LegendPayload) => item.type !== 'none')\n .map((item: RechartsPrimitive.LegendPayload) => {\n const key = `${nameKey || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n});\nChartLegendContent.displayName = 'ChartLegend';\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload &&\n typeof (payload as { payload: unknown }).payload === 'object' &&\n (payload as { payload: unknown }).payload !== null\n ? ((payload as { payload: unknown }).payload as Record<string, unknown>)\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof (payload as Record<string, unknown>)[key] === 'string') {\n configLabelKey = (payload as Record<string, unknown>)[key] as string;\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === 'string') {\n configLabelKey = payloadPayload[key] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\n}\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };\nexport type { ChartConfig };\n"],"mappings":";;;;;;aAaM,IAAS;CAAE,OAAO;CAAI,MAAM;CAAS,EAMrC,IAAe,EAAM,cAAwC,KAAK;AAExE,SAAS,IAAW;CAClB,IAAM,IAAU,EAAM,WAAW,EAAa;AAE9C,KAAI,CAAC,EACH,OAAU,MAAM,oDAAoD;AAGtE,QAAO;;AAGT,IAAM,IAAiB,EAAM,YAM1B,EAAE,OAAI,cAAW,aAAU,WAAQ,GAAG,KAAS,MAAQ;CACxD,IAAM,IAAW,EAAM,OAAO,EACxB,IAAU,SAAS,KAAM,EAAS,QAAQ,MAAM,GAAG;AAEzD,QACE,iBAAA,GAAA,EAAA,KAAC,EAAa,UAAd;EAAuB,OAAO,EAAE,WAAQ;YACtC,iBAAA,GAAA,EAAA,MAAC,OAAD;GACE,cAAY;GACP;GACL,WAAW,EACT,ypBACA,EACD;GACD,GAAI;aAPN,CASE,iBAAA,GAAA,EAAA,KAAC,GAAD;IAAY,IAAI;IAAiB;IAAU,CAAA,EAC3C,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAwC,aAAiD,CAAA,CACrF;;EACgB,CAAA;EAE1B;AACF,EAAe,cAAc;AAE7B,IAAM,KAAc,EAAE,OAAI,gBAAkD;CAC1E,IAAM,IAAc,OAAO,QAAQ,EAAO,CAAC,QAAQ,GAAG,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"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport {\n ChartConfig,\n ChartContainerBaseProps,\n ChartLegendContentBaseProps,\n ChartTooltipContentBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\n/** Safe own-property check — prevents prototype-chain traversal via dynamic keys. */\nconst hasOwnProp = (obj: object, key: string): boolean => Object.prototype.hasOwnProperty.call(obj, key);\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n ChartContainerBaseProps & {\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(\n (\n {\n id,\n className,\n children,\n config,\n style,\n role,\n tabIndex,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n onClick,\n onKeyDown,\n onKeyUp,\n onFocus,\n onBlur,\n },\n ref,\n ) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\n className,\n )}\n style={style}\n role={role}\n tabIndex={tabIndex}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onFocus={onFocus}\n onBlur={onBlur}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n },\n);\nChartContainer.displayName = 'Chart';\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style>\n {Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n (theme in THEMES && hasOwnProp(THEMES, theme) ? itemConfig.theme?.[theme as keyof typeof THEMES] : undefined) ||\n itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n')}\n </style>\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n HTMLDivElement,\n Partial<RechartsPrimitive.TooltipContentProps> & React.ComponentProps<'div'> & ChartTooltipContentBaseProps\n>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? ((hasOwnProp(config, label) ? config[label as keyof typeof config]?.label : undefined) ?? label)\n : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item: RechartsPrimitive.TooltipPayloadEntry) => item.type !== 'none')\n .map((item: RechartsPrimitive.TooltipPayloadEntry, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || ((item.payload as Record<string, unknown>).fill as string) || item.color;\n\n return (\n <div\n key={typeof item.dataKey === 'function' ? index : (item.dataKey ?? index)}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nChartTooltipContent.displayName = 'ChartTooltip';\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> &\n ChartLegendContentBaseProps\n>(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}\n >\n {payload\n .filter((item: RechartsPrimitive.LegendPayload) => item.type !== 'none')\n .map((item: RechartsPrimitive.LegendPayload) => {\n const key = `${nameKey || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n});\nChartLegendContent.displayName = 'ChartLegend';\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload &&\n typeof (payload as { payload: unknown }).payload === 'object' &&\n (payload as { payload: unknown }).payload !== null\n ? ((payload as { payload: unknown }).payload as Record<string, unknown>)\n : undefined;\n\n let configLabelKey: string = key;\n\n if (hasOwnProp(payload as object, key) && typeof (payload as Record<string, unknown>)[key] === 'string') {\n configLabelKey = (payload as Record<string, unknown>)[key] as string;\n } else if (payloadPayload && hasOwnProp(payloadPayload, key) && typeof payloadPayload[key] === 'string') {\n configLabelKey = payloadPayload[key] as string;\n }\n\n return hasOwnProp(config, configLabelKey)\n ? config[configLabelKey as keyof typeof config]\n : hasOwnProp(config, key)\n ? config[key as keyof typeof config]\n : undefined;\n}\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };\nexport type { ChartConfig };\n"],"mappings":";;;;;;aAaM,IAAS;CAAE,OAAO;CAAI,MAAM;AAAQ,GAGpC,KAAc,GAAa,MAAyB,OAAO,UAAU,eAAe,KAAK,GAAK,CAAG,GAMjG,IAAe,EAAM,cAAwC,IAAI;AAEvE,SAAS,IAAW;CAClB,IAAM,IAAU,EAAM,WAAW,CAAY;CAE7C,IAAI,CAAC,GACH,MAAU,MAAM,mDAAmD;CAGrE,OAAO;AACT;AAEA,IAAM,IAAiB,EAAM,YAQzB,EACE,OACA,cACA,aACA,WACA,UACA,SACA,aACA,cAAc,GACd,mBAAmB,GACnB,oBAAoB,GACpB,YACA,cACA,YACA,YACA,aAEF,MACG;CACH,IAAM,IAAW,EAAM,MAAM,GACvB,IAAU,SAAS,KAAM,EAAS,QAAQ,MAAM,EAAE;CAExD,OACE,iBAAA,GAAA,EAAA,KAAC,EAAa,UAAd;EAAuB,OAAO,EAAE,UAAO;YACrC,iBAAA,GAAA,EAAA,MAAC,OAAD;GACE,cAAY;GACP;GACL,WAAW,EACT,ypBACA,CACF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E;AAmCX,CAAC;AACD,EAAmB,cAAc;AAGjC,SAAS,EAA4B,GAAqB,GAAkB,GAAa;CACvF,IAAI,OAAO,KAAY,aAAY,GACjC;CAGF,IAAM,IACJ,aAAa,KACb,OAAQ,EAAiC,WAAY,YACpD,EAAiC,YAAY,OACxC,EAAiC,UACnC,KAAA,GAEF,IAAyB;CAQ7B,OANI,EAAW,GAAmB,CAAG,KAAK,OAAQ,EAAoC,MAAS,WAC7F,IAAkB,EAAoC,KAC7C,KAAkB,EAAW,GAAgB,CAAG,KAAK,OAAO,EAAe,MAAS,aAC7F,IAAiB,EAAe,KAG3B,EAAW,GAAQ,CAAc,IACpC,EAAO,KACP,EAAW,GAAQ,CAAG,IACpB,EAAO,KACP,KAAA;AACR"}
|
package/dist/checkbox.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js");let r=require("react");r=e.r(r);var i=t.vr(),a=r.forwardRef(({className:e,...r},a)=>(0,i.jsx)(t.hn,{ref:a,className:n.t(`peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...r,children:(0,i.jsx)(t.gn,{className:n.t(`grid place-content-center text-current`),children:(0,i.jsx)(t.or,{className:`h-4 w-4`})})}));a.displayName=t.hn?.displayName||`Checkbox`,exports.Checkbox=a;
|
|
2
2
|
//# sourceMappingURL=checkbox.cjs.map
|
package/dist/checkbox.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":"+PAaM,EAAW,EAAM,YACpB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,+RACA,
|
|
1
|
+
{"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":"+PAaM,EAAW,EAAM,YACpB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,+RACA,CACF,EACA,GAAI,YAEJ,EAAA,EAAA,KAAA,EAAA,GAAA,CAA6B,UAAW,EAAA,EAAG,wCAAwC,YACjF,EAAA,EAAA,KAAC,EAAA,GAAD,CAAO,UAAU,SAAW,CAAA,CACD,CAAA,CACP,CAAA,CAE5B,EACA,EAAS,YAAA,EAAA,IAAsC,aAAe"}
|
package/dist/checkbox.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { gn as e, hn as t, or as n, vr as r } from "./vendor-
|
|
4
|
-
import { t as i } from "./utils-
|
|
3
|
+
import { gn as e, hn as t, or as n, vr as r } from "./vendor-ChPUVHXi.mjs";
|
|
4
|
+
import { t as i } from "./utils-BsD1_fYL.mjs";
|
|
5
5
|
import * as a from "react";
|
|
6
6
|
//#region packages/ui-web/src/checkbox.tsx
|
|
7
7
|
var o = r(), s = a.forwardRef(({ className: r, ...a }, s) => /* @__PURE__ */ (0, o.jsx)(t, {
|
package/dist/checkbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":";;;;;;aAaM,IAAW,EAAM,YACpB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,gSACA,
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":";;;;;;aAaM,IAAW,EAAM,YACpB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,gSACA,CACF;CACA,GAAI;WAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA6B,WAAW,EAAG,wCAAwC;YACjF,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAO,WAAU,UAAW,CAAA;CACD,CAAA;AACP,CAAA,CAE5B;AACA,EAAS,cAAA,GAAsC,eAAe"}
|
package/dist/collapsible.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./vendor-3cr8xz0x.js");var t=e._r,n=e.gr,r=e.hr;exports.Collapsible=t,exports.CollapsibleContent=r,exports.CollapsibleTrigger=n;
|
|
2
2
|
//# sourceMappingURL=collapsible.cjs.map
|
package/dist/collapsible.mjs
CHANGED
package/dist/command.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js"),r=require("./dialog.cjs");let i=require("react");i=e.r(i);var a=t.vr(),o=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn,{ref:i,className:n.t(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...r}));o.displayName=t.mn?.displayName||`Command`;var s=({children:e,...t})=>(0,a.jsx)(r.Dialog,{...t,children:(0,a.jsxs)(r.DialogContent,{className:`overflow-hidden p-0`,children:[(0,a.jsx)(r.DialogTitle,{className:`sr-only`,children:`Search`}),(0,a.jsx)(r.DialogDescription,{className:`sr-only`,children:`Search for documentation and components.`}),(0,a.jsx)(o,{className:`[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:e})]})}),c=i.forwardRef(({className:e,...r},i)=>(0,a.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,a.jsx)(t.Yn,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,a.jsx)(t.mn.Input,{ref:i,className:n.t(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...r})]}));c.displayName=t.mn.Input?.displayName||`CommandInput`;var l=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.List,{ref:i,className:n.t(`max-h-[300px] overflow-x-hidden overflow-y-auto`,e),...r}));l.displayName=t.mn.List?.displayName||`CommandList`;var u=i.forwardRef((e,n)=>(0,a.jsx)(t.mn.Empty,{ref:n,className:`py-6 text-center text-sm`,...e}));u.displayName=t.mn.Empty?.displayName||`CommandEmpty`;var d=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Group,{ref:i,className:n.t(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...r}));d.displayName=t.mn.Group?.displayName||`CommandGroup`;var f=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Separator,{ref:i,className:n.t(`bg-border -mx-1 h-px`,e),...r}));f.displayName=t.mn.Separator?.displayName||`CommandSeparator`;var p=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Item,{ref:i,className:n.t(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,e),...r}));p.displayName=t.mn.Item?.displayName||`CommandItem`;var m=({className:e,...t})=>(0,a.jsx)(`span`,{className:n.t(`text-muted-foreground ml-auto text-xs tracking-widest`,e),...t});m.displayName=`CommandShortcut`,exports.Command=o,exports.CommandDialog=s,exports.CommandEmpty=u,exports.CommandGroup=d,exports.CommandInput=c,exports.CommandItem=p,exports.CommandList=l,exports.CommandSeparator=f,exports.CommandShortcut=m;
|
|
2
2
|
//# sourceMappingURL=command.cjs.map
|
package/dist/command.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["'use client';\n\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CommandBaseProps,\n CommandEmptyBaseProps,\n CommandGroupBaseProps,\n CommandInputBaseProps,\n CommandItemBaseProps,\n CommandListBaseProps,\n CommandSeparatorBaseProps,\n CommandShortcutBaseProps,\n} from '@gv-tech/ui-core';\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';\nimport { cn } from './lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive> & CommandBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive?.displayName || 'Command';\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <DialogTitle className=\"sr-only\">Search</DialogTitle>\n <DialogDescription className=\"sr-only\">Search for documentation and components.</DialogDescription>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & CommandInputBaseProps\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 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & CommandListBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & CommandGroupBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & CommandItemBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none 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 || 'CommandItem';\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\nexport type {\n CommandEmptyBaseProps as CommandEmptyProps,\n CommandGroupBaseProps as CommandGroupProps,\n CommandInputBaseProps as CommandInputProps,\n CommandItemBaseProps as CommandItemProps,\n CommandListBaseProps as CommandListProps,\n CommandBaseProps as CommandProps,\n CommandSeparatorBaseProps as CommandSeparatorProps,\n CommandShortcutBaseProps as CommandShortcutProps,\n};\n"],"mappings":"yRAoBM,EAAU,EAAM,YAGnB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAC,EAAA,GAAD,CACO,MACL,UAAW,EAAA,EACT,4FACA,
|
|
1
|
+
{"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["'use client';\n\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CommandBaseProps,\n CommandEmptyBaseProps,\n CommandGroupBaseProps,\n CommandInputBaseProps,\n CommandItemBaseProps,\n CommandListBaseProps,\n CommandSeparatorBaseProps,\n CommandShortcutBaseProps,\n} from '@gv-tech/ui-core';\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';\nimport { cn } from './lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive> & CommandBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive?.displayName || 'Command';\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <DialogTitle className=\"sr-only\">Search</DialogTitle>\n <DialogDescription className=\"sr-only\">Search for documentation and components.</DialogDescription>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & CommandInputBaseProps\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 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & CommandListBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & CommandGroupBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & CommandItemBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none 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 || 'CommandItem';\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\nexport type {\n CommandEmptyBaseProps as CommandEmptyProps,\n CommandGroupBaseProps as CommandGroupProps,\n CommandInputBaseProps as CommandInputProps,\n CommandItemBaseProps as CommandItemProps,\n CommandListBaseProps as CommandListProps,\n CommandBaseProps as CommandProps,\n CommandSeparatorBaseProps as CommandSeparatorProps,\n CommandShortcutBaseProps as CommandShortcutProps,\n};\n"],"mappings":"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,EAEtG,EAAa,YAAc,EAAA,GAAiB,OAAO,aAAe,eAElE,IAAM,EAAe,EAAM,YAGxB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAC,EAAA,GAAiB,MAAlB,CACO,MACL,UAAW,EAAA,EACT,yNACA,CACF,EACA,GAAI,CACL,CAAA,CACF,EAED,EAAa,YAAc,EAAA,GAAiB,OAAO,aAAe,eAElE,IAAM,EAAmB,EAAM,YAG5B,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAC,EAAA,GAAiB,UAAlB,CAAiC,MAAK,UAAW,EAAA,EAAG,uBAAwB,CAAS,EAAG,GAAI,CAAQ,CAAA,CACrG,EACD,EAAiB,YAAc,EAAA,GAAiB,WAAW,aAAe,mBAE1E,IAAM,EAAc,EAAM,YAGvB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAC,EAAA,GAAiB,KAAlB,CACO,MACL,UAAW,EAAA,EACT,0TACA,CACF,EACA,GAAI,CACL,CAAA,CACF,EAED,EAAY,YAAc,EAAA,GAAiB,MAAM,aAAe,cAEhE,IAAM,GAAmB,CAAE,YAAW,GAAG,MAChC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,EAAG,wDAAyD,CAAS,EAAG,GAAI,CAAQ,CAAA,EAE9G,EAAgB,YAAc"}
|
package/dist/command.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { Yn as e, mn as t, vr as n } from "./vendor-
|
|
4
|
-
import { t as r } from "./utils-
|
|
3
|
+
import { Yn as e, mn as t, vr as n } from "./vendor-ChPUVHXi.mjs";
|
|
4
|
+
import { t as r } from "./utils-BsD1_fYL.mjs";
|
|
5
5
|
import { Dialog as i, DialogContent as a, DialogDescription as o, DialogTitle as s } from "./dialog.mjs";
|
|
6
6
|
import * as c from "react";
|
|
7
7
|
//#region packages/ui-web/src/command.tsx
|
package/dist/command.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.mjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["'use client';\n\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CommandBaseProps,\n CommandEmptyBaseProps,\n CommandGroupBaseProps,\n CommandInputBaseProps,\n CommandItemBaseProps,\n CommandListBaseProps,\n CommandSeparatorBaseProps,\n CommandShortcutBaseProps,\n} from '@gv-tech/ui-core';\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';\nimport { cn } from './lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive> & CommandBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive?.displayName || 'Command';\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <DialogTitle className=\"sr-only\">Search</DialogTitle>\n <DialogDescription className=\"sr-only\">Search for documentation and components.</DialogDescription>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & CommandInputBaseProps\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 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & CommandListBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & CommandGroupBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & CommandItemBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none 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 || 'CommandItem';\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\nexport type {\n CommandEmptyBaseProps as CommandEmptyProps,\n CommandGroupBaseProps as CommandGroupProps,\n CommandInputBaseProps as CommandInputProps,\n CommandItemBaseProps as CommandItemProps,\n CommandListBaseProps as CommandListProps,\n CommandBaseProps as CommandProps,\n CommandSeparatorBaseProps as CommandSeparatorProps,\n CommandShortcutBaseProps as CommandShortcutProps,\n};\n"],"mappings":";;;;;;;aAoBM,IAAU,EAAM,YAGnB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,6FACA,
|
|
1
|
+
{"version":3,"file":"command.mjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["'use client';\n\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CommandBaseProps,\n CommandEmptyBaseProps,\n CommandGroupBaseProps,\n CommandInputBaseProps,\n CommandItemBaseProps,\n CommandListBaseProps,\n CommandSeparatorBaseProps,\n CommandShortcutBaseProps,\n} from '@gv-tech/ui-core';\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';\nimport { cn } from './lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive> & CommandBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive?.displayName || 'Command';\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <DialogTitle className=\"sr-only\">Search</DialogTitle>\n <DialogDescription className=\"sr-only\">Search for documentation and components.</DialogDescription>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & CommandInputBaseProps\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 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & CommandListBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & CommandGroupBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & CommandItemBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none 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 || 'CommandItem';\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\nexport type {\n CommandEmptyBaseProps as CommandEmptyProps,\n CommandGroupBaseProps as CommandGroupProps,\n CommandInputBaseProps as CommandInputProps,\n CommandItemBaseProps as CommandItemProps,\n CommandListBaseProps as CommandListProps,\n CommandBaseProps as CommandProps,\n CommandSeparatorBaseProps as CommandSeparat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WAAU;CAA2B,GAAI;AAAQ,CAAA,CAAC;AAEtG,EAAa,cAAc,EAAiB,OAAO,eAAe;AAElE,IAAM,IAAe,EAAM,YAGxB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,EAAiB,OAAlB;CACO;CACL,WAAW,EACT,0NACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AAED,EAAa,cAAc,EAAiB,OAAO,eAAe;AAElE,IAAM,IAAmB,EAAM,YAG5B,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,EAAiB,WAAlB;CAAiC;CAAK,WAAW,EAAG,wBAAwB,CAAS;CAAG,GAAI;AAAQ,CAAA,CACrG;AACD,EAAiB,cAAc,EAAiB,WAAW,eAAe;AAE1E,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,EAAiB,MAAlB;CACO;CACL,WAAW,EACT,2TACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AAED,EAAY,cAAc,EAAiB,MAAM,eAAe;AAEhE,IAAM,KAAmB,EAAE,cAAW,GAAG,QAChC,iBAAA,GAAA,EAAA,KAAC,QAAD;CAAM,WAAW,EAAG,yDAAyD,CAAS;CAAG,GAAI;AAAQ,CAAA;AAE9G,EAAgB,cAAc"}
|
package/dist/context-menu.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js");let r=require("react");r=e.r(r);var i=t.vr(),a=t.cn,o=t.pn,s=t.tn,c=t.an,l=t.un,u=t.on,d=r.forwardRef(({className:e,inset:r,children:a,...o},s)=>(0,i.jsxs)(t.fn,{ref:s,className:n.t(`focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none`,r&&`pl-8`,e),...o,children:[a,(0,i.jsx)(t.rr,{className:`ml-auto h-4 w-4`})]}));d.displayName=t.fn?.displayName||`ContextMenuSubTrigger`;var f=r.forwardRef(({className:e,...r},a)=>(0,i.jsx)(t.dn,{ref:a,className:n.t(`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 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg`,e),...r}));f.displayName=t.dn?.displayName||`ContextMenuSubContent`;var p=r.forwardRef(({className:e,...r},a)=>(0,i.jsx)(t.an,{children:(0,i.jsx)(t.en,{ref:a,className:n.t(`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 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...r})}));p.displayName=t.en?.displayName||`ContextMenuContent`;var m=r.forwardRef(({className:e,inset:r,...a},o)=>(0,i.jsx)(t.nn,{ref:o,className:n.t(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,r&&`pl-8`,e),...a}));m.displayName=t.nn?.displayName||`ContextMenuItem`;var h=r.forwardRef(({className:e,children:r,checked:a,...o},s)=>(0,i.jsxs)(t.$t,{ref:s,className:n.t(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:a,...o,children:[(0,i.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,i.jsx)(t.rn,{children:(0,i.jsx)(t.or,{className:`h-4 w-4`})})}),r]}));h.displayName=t.$t?.displayName||`ContextMenuCheckboxItem`;var g=r.forwardRef(({className:e,children:r,...a},o)=>(0,i.jsxs)(t.sn,{ref:o,className:n.t(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...a,children:[(0,i.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,i.jsx)(t.rn,{children:(0,i.jsx)(t.tr,{className:`h-4 w-4 fill-current`})})}),r]}));g.displayName=t.sn?.displayName||`ContextMenuRadioItem`;var _=r.forwardRef(({className:e,inset:r,...a},o)=>(0,i.jsx)(t.in,{ref:o,className:n.t(`text-foreground px-2 py-1.5 text-sm font-semibold`,r&&`pl-8`,e),...a}));_.displayName=t.in?.displayName||`ContextMenuLabel`;var v=r.forwardRef(({className:e,...r},a)=>(0,i.jsx)(t.ln,{ref:a,className:n.t(`bg-border -mx-1 my-1 h-px`,e),...r}));v.displayName=t.ln?.displayName||`ContextMenuSeparator`;var y=({className:e,...t})=>(0,i.jsx)(`span`,{className:n.t(`text-muted-foreground ml-auto text-xs tracking-widest`,e),...t});y.displayName=`ContextMenuShortcut`,exports.ContextMenu=a,exports.ContextMenuCheckboxItem=h,exports.ContextMenuContent=p,exports.ContextMenuGroup=s,exports.ContextMenuItem=m,exports.ContextMenuLabel=_,exports.ContextMenuPortal=c,exports.ContextMenuRadioGroup=u,exports.ContextMenuRadioItem=g,exports.ContextMenuSeparator=v,exports.ContextMenuShortcut=y,exports.ContextMenuSub=l,exports.ContextMenuSubContent=f,exports.ContextMenuSubTrigger=d,exports.ContextMenuTrigger=o;
|
|
2
2
|
//# sourceMappingURL=context-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.cjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["'use client';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n ContextMenuBaseProps,\n ContextMenuCheckboxItemBaseProps,\n ContextMenuContentBaseProps,\n ContextMenuGroupBaseProps,\n ContextMenuItemBaseProps,\n ContextMenuLabelBaseProps,\n ContextMenuRadioGroupBaseProps,\n ContextMenuRadioItemBaseProps,\n ContextMenuSeparatorBaseProps,\n ContextMenuShortcutBaseProps,\n ContextMenuSubBaseProps,\n ContextMenuSubContentBaseProps,\n ContextMenuSubTriggerBaseProps,\n ContextMenuTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & ContextMenuSubTriggerBaseProps\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger?.displayName || 'ContextMenuSubTrigger';\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & ContextMenuSubContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\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 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent?.displayName || 'ContextMenuSubContent';\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & ContextMenuContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\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 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content?.displayName || 'ContextMenuContent';\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & ContextMenuItemBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item?.displayName || 'ContextMenuItem';\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> & ContextMenuCheckboxItemBaseProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem?.displayName || 'ContextMenuCheckboxItem';\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> & ContextMenuRadioItemBaseProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-4 w-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem?.displayName || 'ContextMenuRadioItem';\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & ContextMenuLabelBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label?.displayName || 'ContextMenuLabel';\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & ContextMenuSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator?.displayName || 'ContextMenuSeparator';\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement> & ContextMenuShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\nexport type {\n ContextMenuCheckboxItemBaseProps as ContextMenuCheckboxItemProps,\n ContextMenuContentBaseProps as ContextMenuContentProps,\n ContextMenuGroupBaseProps as ContextMenuGroupProps,\n ContextMenuItemBaseProps as ContextMenuItemProps,\n ContextMenuLabelBaseProps as ContextMenuLabelProps,\n ContextMenuBaseProps as ContextMenuProps,\n ContextMenuRadioGroupBaseProps as ContextMenuRadioGroupProps,\n ContextMenuRadioItemBaseProps as ContextMenuRadioItemProps,\n ContextMenuSeparatorBaseProps as ContextMenuSeparatorProps,\n ContextMenuShortcutBaseProps as ContextMenuShortcutProps,\n ContextMenuSubContentBaseProps as ContextMenuSubContentProps,\n ContextMenuSubBaseProps as ContextMenuSubProps,\n ContextMenuSubTriggerBaseProps as ContextMenuSubTriggerProps,\n ContextMenuTriggerBaseProps as ContextMenuTriggerProps,\n};\n"],"mappings":"+PAuBM,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAwB,EAAM,YAGjC,CAAE,YAAW,QAAO,WAAU,GAAG,GAAS,KAC3C,EAAA,EAAA,MAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,6MACA,GAAS,OACT,EACD,CACD,GAAI,WAPN,CASG,GACD,EAAA,EAAA,KAAC,EAAA,GAAD,CAAc,U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,UAAW,EAAA,EACT,qNACA,EACD,CACD,GAAI,WANN,EAQE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,yEACd,EAAA,EAAA,KAAA,EAAA,GAAA,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAQ,UAAU,uBAAyB,CAAA,CACR,CAAA,CAChC,CAAA,CACN,EAC8B,GACjC,CACF,EAAqB,YAAA,EAAA,IAA8C,aAAe,uBAElF,IAAM,EAAmB,EAAM,YAG5B,CAAE,YAAW,QAAO,GAAG,GAAS,KACjC,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EAAG,oDAAqD,GAAS,OAAQ,EAAU,CAC9F,GAAI,EACJ,CAAA,CACF,CACF,EAAiB,YAAA,EAAA,IAA0C,aAAe,mBAE1E,IAAM,EAAuB,EAAM,YAGhC,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CAAqC,MAAK,UAAW,EAAA,EAAG,4BAA6B,EAAU,CAAE,GAAI,EAAS,CAAA,CAC9G,CACF,EAAqB,YAAA,EAAA,IAA8C,aAAe,uBAElF,IAAM,GAAuB,CAC3B,YACA,GAAG,MAEI,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,EAAG,wDAAyD,EAAU,CAAE,GAAI,EAAS,CAAA,CAE/G,EAAoB,YAAc"}
|
|
1
|
+
{"version":3,"file":"context-menu.cjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["'use client';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n ContextMenuBaseProps,\n ContextMenuCheckboxItemBaseProps,\n ContextMenuContentBaseProps,\n ContextMenuGroupBaseProps,\n ContextMenuItemBaseProps,\n ContextMenuLabelBaseProps,\n ContextMenuRadioGroupBaseProps,\n ContextMenuRadioItemBaseProps,\n ContextMenuSeparatorBaseProps,\n ContextMenuShortcutBaseProps,\n ContextMenuSubBaseProps,\n ContextMenuSubContentBaseProps,\n ContextMenuSubTriggerBaseProps,\n ContextMenuTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & ContextMenuSubTriggerBaseProps\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger?.displayName || 'ContextMenuSubTrigger';\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & ContextMenuSubContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\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 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent?.displayName || 'ContextMenuSubContent';\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & ContextMenuContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\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 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content?.displayName || 'ContextMenuContent';\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & ContextMenuItemBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item?.displayName || 'ContextMenuItem';\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> & ContextMenuCheckboxItemBaseProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem?.displayName || 'ContextMenuCheckboxItem';\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> & ContextMenuRadioItemBaseProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-4 w-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem?.displayName || 'ContextMenuRadioItem';\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & ContextMenuLabelBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label?.displayName || 'ContextMenuLabel';\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & ContextMenuSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator?.displayName || 'ContextMenuSeparator';\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement> & ContextMenuShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\nexport type {\n ContextMenuCheckboxItemBaseProps as ContextMenuCheckboxItemProps,\n ContextMenuContentBaseProps as ContextMenuContentProps,\n ContextMenuGroupBaseProps as ContextMenuGroupProps,\n ContextMenuItemBaseProps as ContextMenuItemProps,\n ContextMenuLabelBaseProps as ContextMenuLabelProps,\n ContextMenuBaseProps as ContextMenuProps,\n ContextMenuRadioGroupBaseProps as ContextMenuRadioGroupProps,\n ContextMenuRadioItemBaseProps as ContextMenuRadioItemProps,\n ContextMenuSeparatorBaseProps as ContextMenuSeparatorProps,\n ContextMenuShortcutBaseProps as ContextMenuShortcutProps,\n ContextMenuSubContentBaseProps as ContextMenuSubContentProps,\n ContextMenuSubBaseProps as ContextMenuSubProps,\n ContextMenuSubTriggerBaseProps as ContextMenuSubTriggerProps,\n ContextMenuTriggerBaseProps as ContextMenuTriggerProps,\n};\n"],"mappings":"+PAuBM,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAA,EAAA,GAEA,EAAwB,EAAM,YAGjC,CAAE,YAAW,QAAO,WAAU,GAAG,GAAS,KAC3C,EAAA,EAAA,MAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,6MACA,GAAS,OACT,CACF,EACA,GAAI,WAPN,CASG,GACD,EAAA,EAAA,KAAC,EAAA,GAAD,CAAc,UAAU,iBAAmB,CAAA,CACZ,GAClC,EACD,EAAsB,YAAA,EAAA,IAA+C,aAAe,wBAEpF,IAAM,EAAwB,EAAM,YAGjC,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,+eACA,CACF,EACA,GAAI,CACL,CAAA,CACF,EACD,EAAsB,YAAA,EAAA,IAA+C,aAAe,wBAEpF,IAAM,EAAqB,EAAM,YAG9B,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CAAA,UACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,ujBACA,CACF,EACA,GAAI,CACL,CAAA,CAC0B,CAAA,CAC9B,EACD,EAAmB,YAAA,EAAA,IAA4C,aAAe,qBAE9E,IAAM,EAAkB,EAAM,YAG3B,CAAE,YAAW,QAAO,GAAG,GAAS,KACjC,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW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AI,CAAQ,CAAA,CAC9G,EACD,EAAqB,YAAA,EAAA,IAA8C,aAAe,uBAElF,IAAM,GAAuB,CAC3B,YACA,GAAG,MAEI,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,EAAG,wDAAyD,CAAS,EAAG,GAAI,CAAQ,CAAA,EAE9G,EAAoB,YAAc"}
|
package/dist/context-menu.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { $t as e, an as t, cn as n, dn as r, en as i, fn as a, in as o, ln as s, nn as c, on as l, or as u, pn as d, rn as f, rr as p, sn as m, tn as h, tr as g, un as _, vr as v } from "./vendor-
|
|
4
|
-
import { t as y } from "./utils-
|
|
3
|
+
import { $t as e, an as t, cn as n, dn as r, en as i, fn as a, in as o, ln as s, nn as c, on as l, or as u, pn as d, rn as f, rr as p, sn as m, tn as h, tr as g, un as _, vr as v } from "./vendor-ChPUVHXi.mjs";
|
|
4
|
+
import { t as y } from "./utils-BsD1_fYL.mjs";
|
|
5
5
|
import * as b from "react";
|
|
6
6
|
//#region packages/ui-web/src/context-menu.tsx
|
|
7
7
|
var x = v(), S = n, C = d, w = h, T = t, E = _, D = l, O = b.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ (0, x.jsxs)(a, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.mjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["'use client';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n ContextMenuBaseProps,\n ContextMenuCheckboxItemBaseProps,\n ContextMenuContentBaseProps,\n ContextMenuGroupBaseProps,\n ContextMenuItemBaseProps,\n ContextMenuLabelBaseProps,\n ContextMenuRadioGroupBaseProps,\n ContextMenuRadioItemBaseProps,\n ContextMenuSeparatorBaseProps,\n ContextMenuShortcutBaseProps,\n ContextMenuSubBaseProps,\n ContextMenuSubContentBaseProps,\n ContextMenuSubTriggerBaseProps,\n ContextMenuTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & ContextMenuSubTriggerBaseProps\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger?.displayName || 'ContextMenuSubTrigger';\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & ContextMenuSubContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\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 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent?.displayName || 'ContextMenuSubContent';\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & ContextMenuContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\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 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content?.displayName || 'ContextMenuContent';\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & ContextMenuItemBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item?.displayName || 'ContextMenuItem';\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> & ContextMenuCheckboxItemBaseProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem?.displayName || 'ContextMenuCheckboxItem';\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> & ContextMenuRadioItemBaseProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-4 w-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem?.displayName || 'ContextMenuRadioItem';\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & ContextMenuLabelBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label?.displayName || 'ContextMenuLabel';\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & ContextMenuSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator?.displayName || 'ContextMenuSeparator';\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement> & ContextMenuShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\nexport type {\n ContextMenuCheckboxItemBaseProps as ContextMenuCheckboxItemProps,\n ContextMenuContentBaseProps as ContextMenuContentProps,\n ContextMenuGroupBaseProps as ContextMenuGroupProps,\n ContextMenuItemBaseProps as ContextMenuItemProps,\n ContextMenuLabelBaseProps as ContextMenuLabelProps,\n ContextMenuBaseProps as ContextMenuProps,\n ContextMenuRadioGroupBaseProps as ContextMenuRadioGroupProps,\n ContextMenuRadioItemBaseProps as ContextMenuRadioItemProps,\n ContextMenuSeparatorBaseProps as ContextMenuSeparatorProps,\n ContextMenuShortcutBaseProps as ContextMenuShortcutProps,\n ContextMenuSubContentBaseProps as ContextMenuSubContentProps,\n ContextMenuSubBaseProps as ContextMenuSubProps,\n ContextMenuSubTriggerBaseProps as ContextMenuSubTriggerProps,\n ContextMenuTriggerBaseProps as ContextMenuTriggerProps,\n};\n"],"mappings":";;;;;;aAuBM,IAAc,GAEd,IAAqB,GAErB,IAAmB,GAEnB,IAAoB,GAEpB,IAAiB,GAEjB,IAAwB,GAExB,IAAwB,EAAM,YAGjC,EAAE,cAAW,UAAO,aAAU,GAAG,KAAS,MAC3C,iBAAA,GAAA,EAAA,MAAC,GAAD;CACO;CACL,WAAW,EACT,8MACA,KAAS,QACT,EACD;CACD,GAAI;WAPN,CASG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAc,WAAU,mBAAoB,CAAA,CACZ;GAClC;AACF,EAAsB,cAAA,GAA+C,eAAe;AAEpF,IAAM,IAAwB,EAAM,YAGjC,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,gfACA,EACD;CACD,GAAI;CACJ,CAAA,CACF;AACF,EAAsB,cAAA,GAA+C,eAAe;AAEpF,IAAM,IAAqB,EAAM,YAG9B,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UACE,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,wjBACA,EACD;CACD,GAAI;CACJ,CAAA,EAC0B,CAAA,CAC9B;AACF,EAAmB,cAAA,GAA4C,eAAe;AAE9E,IAAM,IAAkB,EAAM,YAG3B,EAAE,cAAW,UAAO,GAAG,KAAS,MACjC,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,iNACA,KAAS,QACT,EACD;CACD,GAAI;CACJ,CAAA,CACF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AG,QAEI,iBAAA,GAAA,EAAA,KAAC,QAAD;CAAM,WAAW,EAAG,yDAAyD,EAAU;CAAE,GAAI;CAAS,CAAA;AAE/G,EAAoB,cAAc"}
|
|
1
|
+
{"version":3,"file":"context-menu.mjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["'use client';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n ContextMenuBaseProps,\n ContextMenuCheckboxItemBaseProps,\n ContextMenuContentBaseProps,\n ContextMenuGroupBaseProps,\n ContextMenuItemBaseProps,\n ContextMenuLabelBaseProps,\n ContextMenuRadioGroupBaseProps,\n ContextMenuRadioItemBaseProps,\n ContextMenuSeparatorBaseProps,\n ContextMenuShortcutBaseProps,\n ContextMenuSubBaseProps,\n ContextMenuSubContentBaseProps,\n ContextMenuSubTriggerBaseProps,\n ContextMenuTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & ContextMenuSubTriggerBaseProps\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger?.displayName || 'ContextMenuSubTrigger';\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & ContextMenuSubContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\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 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent?.displayName || 'ContextMenuSubContent';\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & ContextMenuContentBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\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 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content?.displayName || 'ContextMenuContent';\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & ContextMenuItemBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item?.displayName || 'ContextMenuItem';\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> & ContextMenuCheckboxItemBaseProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem?.displayName || 'ContextMenuCheckboxItem';\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> & ContextMenuRadioItemBaseProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-4 w-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem?.displayName || 'ContextMenuRadioItem';\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & ContextMenuLabelBaseProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label?.displayName || 'ContextMenuLabel';\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & ContextMenuSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator?.displayName || 'ContextMenuSeparator';\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement> & ContextMenuShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\nexport type {\n ContextMenuCheckboxItemBaseProps as ContextMenuCheckboxItemProps,\n ContextMenuContentBaseProps as ContextMenuContentProps,\n ContextMenuGroupBaseProps as ContextMenuGroupProps,\n ContextMenuItemBaseProps as ContextMenuItemProps,\n ContextMenuLabelBaseProps as ContextMenuLabelProps,\n ContextMenuBaseProps as ContextMenuProps,\n ContextMenuRadioGroupBaseProps as ContextMenuRadioGroupProps,\n ContextMenuRadioItemBaseProps as ContextMenuRadioItemProps,\n ContextMenuSeparatorBaseProps as ContextMenuSeparatorProps,\n ContextMenuShortcutBaseProps as ContextMenuShortcutProps,\n ContextMenuSubContentBaseProps as ContextMenuSubContentProps,\n ContextMenuSubBaseProps as ContextMenuSubProps,\n ContextMenuSubTriggerBaseProps as ContextMenuSubTriggerProps,\n ContextMenuTriggerBaseProps as ContextMenuTriggerProps,\n};\n"],"mappings":";;;;;;aAuBM,IAAc,GAEd,IAAqB,GAErB,IAAmB,GAEnB,IAAoB,GAEpB,IAAiB,GAEjB,IAAwB,GAExB,IAAwB,EAAM,YAGjC,EAAE,cAAW,UAAO,aAAU,GAAG,KAAS,MAC3C,iBAAA,GAAA,EAAA,MAAC,GAAD;CACO;CACL,WAAW,EACT,8MACA,KAAS,QACT,CACF;CACA,GAAI;WAPN,CASG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAc,WAAU,kBAAmB,CAAA,CACZ;EAClC;AACD,EAAsB,cAAA,GAA+C,eAAe;AAEpF,IAAM,IAAwB,EAAM,YAGjC,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CAC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