@brainfish-ai/components 0.26.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-search.d.ts +14 -1
- package/dist/esm/chunks/ChatSearch.Cqo4WF3n.js +95 -0
- package/dist/esm/chunks/ChatSearch.Cqo4WF3n.js.map +1 -0
- package/dist/esm/chunks/Conversation.UZ5rx7_0.js +22 -0
- package/dist/esm/chunks/{Conversation.BriXFYqU.js.map → Conversation.UZ5rx7_0.js.map} +1 -1
- package/dist/esm/chunks/FormattedMessage.D9xA6QsH.js +23 -0
- package/dist/esm/chunks/FormattedMessage.D9xA6QsH.js.map +1 -0
- package/dist/esm/chunks/MermaidDiagram.PRgXQ5Yh.js +2 -0
- package/dist/esm/chunks/{MermaidDiagram.xQ0CVFOI.js.map → MermaidDiagram.PRgXQ5Yh.js.map} +1 -1
- package/dist/esm/chunks/_commonjsHelpers.lGe4XDVY.js +2 -0
- package/dist/esm/chunks/_commonjsHelpers.lGe4XDVY.js.map +1 -0
- package/dist/esm/chunks/button.BYc5d6AZ.js +3 -0
- package/dist/esm/chunks/{button.DQL6gCAt.js.map → button.BYc5d6AZ.js.map} +1 -1
- package/dist/esm/chunks/chart.BDL2tf-S.js +10 -0
- package/dist/esm/chunks/{chart.4ZbtBMmR.js.map → chart.BDL2tf-S.js.map} +1 -1
- package/dist/esm/chunks/chat-logo.CqPppEb9.js +3 -0
- package/dist/esm/chunks/chat-logo.CqPppEb9.js.map +1 -0
- package/dist/esm/chunks/combobox.CxaWbDm9.js +6 -0
- package/dist/esm/chunks/{combobox.CJKym3Z1.js.map → combobox.CxaWbDm9.js.map} +1 -1
- package/dist/esm/chunks/dark.DuW7JuAk.js +2 -0
- package/dist/esm/chunks/{dark.Cq2RCgy4.js.map → dark.DuW7JuAk.js.map} +1 -1
- package/dist/esm/chunks/data-table.CJOR-1Kf.js +5 -0
- package/dist/esm/chunks/{data-table.DbcAYxMY.js.map → data-table.CJOR-1Kf.js.map} +1 -1
- package/dist/esm/chunks/date-picker.Bhplnvxn.js +4 -0
- package/dist/esm/chunks/{date-picker._cBTpdEK.js.map → date-picker.Bhplnvxn.js.map} +1 -1
- package/dist/esm/chunks/extends.DPdBf6DS.js +2 -0
- package/dist/esm/chunks/extends.DPdBf6DS.js.map +1 -0
- package/dist/esm/chunks/feature-flags.DOcVlPHk.js +3 -0
- package/dist/esm/chunks/{feature-flags.DeDEcnd1.js.map → feature-flags.DOcVlPHk.js.map} +1 -1
- package/dist/esm/chunks/feedback.BXKvlNz1.js +13 -0
- package/dist/esm/chunks/{feedback.W2OzN-5r.js.map → feedback.BXKvlNz1.js.map} +1 -1
- package/dist/esm/chunks/file-upload-status.4ukNFyi2.js +8 -0
- package/dist/esm/chunks/{file-upload-status.DP2iuttI.js.map → file-upload-status.4ukNFyi2.js.map} +1 -1
- package/dist/esm/chunks/filters.ita3UAnO.js +22 -0
- package/dist/esm/chunks/{filters.-7vSLEQ2.js.map → filters.ita3UAnO.js.map} +1 -1
- package/dist/esm/chunks/font-picker.BwEWBowG.js +6 -0
- package/dist/esm/chunks/{font-picker.DisEoE8a.js.map → font-picker.BwEWBowG.js.map} +1 -1
- package/dist/esm/chunks/formatDate.D2xEZm8f.js +2 -0
- package/dist/esm/chunks/{formatDate.CWN6IFKq.js.map → formatDate.D2xEZm8f.js.map} +1 -1
- package/dist/esm/chunks/formatNumber.DhVn228t.js +2 -0
- package/dist/esm/chunks/{formatNumber.Bm2k8QrT.js.map → formatNumber.DhVn228t.js.map} +1 -1
- package/dist/esm/chunks/generating-star.BN9p_FDu.js +7 -0
- package/dist/esm/chunks/generating-star.BN9p_FDu.js.map +1 -0
- package/dist/esm/chunks/header-nav.B4IJjted.js +10 -0
- package/dist/esm/chunks/{header-nav.b4hvOsKc.js.map → header-nav.B4IJjted.js.map} +1 -1
- package/dist/esm/chunks/header-pane.C1RWesOW.js +20 -0
- package/dist/esm/chunks/{header-pane.BFXHXxVn.js.map → header-pane.C1RWesOW.js.map} +1 -1
- package/dist/esm/chunks/hooks.BQTKhHSv.js +2 -0
- package/dist/esm/chunks/hooks.BQTKhHSv.js.map +1 -0
- package/dist/esm/chunks/index.uF4ME3WQ.js +4 -0
- package/dist/esm/chunks/{index.BqibIWDw.js.map → index.uF4ME3WQ.js.map} +1 -1
- package/dist/esm/chunks/input-with-tags.DrDDPxse.js +5 -0
- package/dist/esm/chunks/{input-with-tags.tg2nhPFv.js.map → input-with-tags.DrDDPxse.js.map} +1 -1
- package/dist/esm/chunks/logo.CketsPBx.js +5 -0
- package/dist/esm/chunks/{logo.D5BMN6Db.js.map → logo.CketsPBx.js.map} +1 -1
- package/dist/esm/chunks/primary.CMQbo1GJ.js +2 -0
- package/dist/esm/chunks/{primary.CtiRZbqq.js.map → primary.CMQbo1GJ.js.map} +1 -1
- package/dist/esm/chunks/review-list.qvxeqG9l.js +6 -0
- package/dist/esm/chunks/{review-list.BtSnfpSc.js.map → review-list.qvxeqG9l.js.map} +1 -1
- package/dist/esm/chunks/sidebar.IcJADYLR.js +25 -0
- package/dist/esm/chunks/sidebar.IcJADYLR.js.map +1 -0
- package/dist/esm/chunks/simpleSelect.DK1qZSXM.js +3 -0
- package/dist/esm/chunks/{simpleSelect.B1rktKkt.js.map → simpleSelect.DK1qZSXM.js.map} +1 -1
- package/dist/esm/chunks/status-badge.C-jt7Zs2.js +3 -0
- package/dist/esm/chunks/{status-badge.eFJ1PYeb.js.map → status-badge.C-jt7Zs2.js.map} +1 -1
- package/dist/esm/chunks/trend-value.BPBDBsk2.js +3 -0
- package/dist/esm/chunks/{trend-value.COSukPwk.js.map → trend-value.BPBDBsk2.js.map} +1 -1
- package/dist/esm/chunks/two-level-combobox.Bv2OQgjh.js +8 -0
- package/dist/esm/chunks/{two-level-combobox.BXs2z9u5.js.map → two-level-combobox.Bv2OQgjh.js.map} +1 -1
- package/dist/esm/chunks/useChartDateFormatters.Dx2h5AAm.js +2 -0
- package/dist/esm/chunks/{useChartDateFormatters.DS9ASgFO.js.map → useChartDateFormatters.Dx2h5AAm.js.map} +1 -1
- package/dist/esm/chunks/utils.C6Qu-kwd.js +2 -0
- package/dist/esm/chunks/{utils.Cwtlq8dh.js.map → utils.C6Qu-kwd.js.map} +1 -1
- package/dist/esm/colors.js +1 -169
- package/dist/esm/colors.js.map +1 -1
- package/dist/esm/components/article-suggestions-banner.js +4 -53
- package/dist/esm/components/article-suggestions-banner.js.map +1 -1
- package/dist/esm/components/articles-coverage.js +4 -116
- package/dist/esm/components/articles-coverage.js.map +1 -1
- package/dist/esm/components/articles-updated.js +4 -74
- package/dist/esm/components/articles-updated.js.map +1 -1
- package/dist/esm/components/breadcrumbs.js +3 -13
- package/dist/esm/components/breadcrumbs.js.map +1 -1
- package/dist/esm/components/chart-area-linear.js +6 -66
- package/dist/esm/components/chart-area-linear.js.map +1 -1
- package/dist/esm/components/chart-radial-stacked.js +2 -48
- package/dist/esm/components/chart-radial-stacked.js.map +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/confirm-dialog.js +2 -47
- package/dist/esm/components/confirm-dialog.js.map +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/components/convos.js +27 -607
- package/dist/esm/components/convos.js.map +1 -1
- package/dist/esm/components/data-table.js +1 -1
- package/dist/esm/components/date-picker.js +1 -1
- package/dist/esm/components/discoveries-created.js +4 -64
- package/dist/esm/components/discoveries-created.js.map +1 -1
- package/dist/esm/components/feedback.js +1 -1
- package/dist/esm/components/file-upload.js +1 -1
- package/dist/esm/components/filter.js +1 -1
- package/dist/esm/components/font-picker.js +1 -1
- package/dist/esm/components/generating-star.js +1 -1
- package/dist/esm/components/input-with-tags.js +1 -1
- package/dist/esm/components/logo.js +1 -1
- package/dist/esm/components/markdown.js +1 -2
- package/dist/esm/components/markdown.js.map +1 -1
- package/dist/esm/components/metric-card.js +3 -29
- package/dist/esm/components/metric-card.js.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/trend-value.js +1 -1
- package/dist/esm/components/two-level-combobox.js +1 -1
- package/dist/esm/components/ui/accordion.js +7 -46
- package/dist/esm/components/ui/accordion.js.map +1 -1
- package/dist/esm/components/ui/alert-dialog.js +3 -114
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert.js +4 -103
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/avatar.js +7 -89
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/badge.js +2 -26
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js +4 -60
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/button-group.js +4 -88
- package/dist/esm/components/ui/button-group.js.map +1 -1
- package/dist/esm/components/ui/button.js +1 -5
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/calendar.js +2 -20
- package/dist/esm/components/ui/calendar.js.map +1 -1
- package/dist/esm/components/ui/card.js +1 -55
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/collapsible.js +1 -33
- package/dist/esm/components/ui/collapsible.js.map +1 -1
- package/dist/esm/components/ui/combobox.js +1 -1
- package/dist/esm/components/ui/command.js +2 -79
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/dialog.js +4 -60
- package/dist/esm/components/ui/dialog.js.map +1 -1
- package/dist/esm/components/ui/div-button.js +2 -61
- package/dist/esm/components/ui/div-button.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js +3 -114
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/icon.js +2 -25
- package/dist/esm/components/ui/icon.js.map +1 -1
- package/dist/esm/components/ui/input.js +4 -47
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/item.js +11 -140
- package/dist/esm/components/ui/item.js.map +1 -1
- package/dist/esm/components/ui/label.js +1 -19
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/popover.js +1 -31
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js +2 -22
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/scroll-area.js +2 -32
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js +5 -66
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js +1 -23
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js +3 -62
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/spinner.js +2 -17
- package/dist/esm/components/ui/spinner.js.map +1 -1
- package/dist/esm/components/ui/switch.js +2 -26
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js +1 -82
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/textarea.js +1 -33
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js +3 -31
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/global.css +1 -1
- package/dist/esm/index.js +1 -53
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/full-layout.js +1 -1
- package/dist/esm/layouts/header-nav.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/esm/logos/microsoft-logo.js +6 -66
- package/dist/esm/logos/microsoft-logo.js.map +1 -1
- package/dist/esm/logos/microsoft-teams-logo.js +12 -112
- package/dist/esm/logos/microsoft-teams-logo.js.map +1 -1
- package/dist/esm/logos/slack-logo.js +3 -39
- package/dist/esm/logos/slack-logo.js.map +1 -1
- package/dist/esm/scenes/knowledge-review.js +17 -380
- package/dist/esm/scenes/knowledge-review.js.map +1 -1
- package/dist/esm/tailwind.preset.js +1 -1526
- package/dist/esm/tailwind.preset.js.map +1 -1
- package/dist/index.d.ts +22 -1
- package/dist/logo.d.ts +9 -0
- package/dist/stats.html +47 -46
- package/package.json +17 -18
- package/tailwind.preset.ts +1 -0
- package/dist/esm/chunks/ChatSearch.CeQrTOVx.js +0 -6825
- package/dist/esm/chunks/ChatSearch.CeQrTOVx.js.map +0 -1
- package/dist/esm/chunks/Conversation.BriXFYqU.js +0 -831
- package/dist/esm/chunks/FormattedMessage.CRbM-hF6.js +0 -39715
- package/dist/esm/chunks/FormattedMessage.CRbM-hF6.js.map +0 -1
- package/dist/esm/chunks/MermaidDiagram.xQ0CVFOI.js +0 -50
- package/dist/esm/chunks/_commonjsHelpers.BFTU3MAI.js +0 -8
- package/dist/esm/chunks/_commonjsHelpers.BFTU3MAI.js.map +0 -1
- package/dist/esm/chunks/button.DQL6gCAt.js +0 -48
- package/dist/esm/chunks/chart.4ZbtBMmR.js +0 -199
- package/dist/esm/chunks/combobox.CJKym3Z1.js +0 -95
- package/dist/esm/chunks/dark.Cq2RCgy4.js +0 -18
- package/dist/esm/chunks/data-table.DbcAYxMY.js +0 -102
- package/dist/esm/chunks/date-picker._cBTpdEK.js +0 -26
- package/dist/esm/chunks/extends.mO86zOh3.js +0 -12
- package/dist/esm/chunks/extends.mO86zOh3.js.map +0 -1
- package/dist/esm/chunks/feature-flags.DeDEcnd1.js +0 -22
- package/dist/esm/chunks/feedback.W2OzN-5r.js +0 -214
- package/dist/esm/chunks/file-upload-status.DP2iuttI.js +0 -141
- package/dist/esm/chunks/filters.-7vSLEQ2.js +0 -565
- package/dist/esm/chunks/font-picker.DisEoE8a.js +0 -181
- package/dist/esm/chunks/formatDate.CWN6IFKq.js +0 -952
- package/dist/esm/chunks/formatNumber.Bm2k8QrT.js +0 -10
- package/dist/esm/chunks/generating-star.DMDPNTaM.js +0 -1501
- package/dist/esm/chunks/generating-star.DMDPNTaM.js.map +0 -1
- package/dist/esm/chunks/header-nav.b4hvOsKc.js +0 -197
- package/dist/esm/chunks/header-pane.BFXHXxVn.js +0 -559
- package/dist/esm/chunks/hooks.BWVaVAT-.js +0 -343
- package/dist/esm/chunks/hooks.BWVaVAT-.js.map +0 -1
- package/dist/esm/chunks/index.BqibIWDw.js +0 -137
- package/dist/esm/chunks/input-with-tags.tg2nhPFv.js +0 -110
- package/dist/esm/chunks/logo.D5BMN6Db.js +0 -191
- package/dist/esm/chunks/primary.CtiRZbqq.js +0 -18
- package/dist/esm/chunks/review-list.BtSnfpSc.js +0 -117
- package/dist/esm/chunks/sidebar.BamKohb5.js +0 -803
- package/dist/esm/chunks/sidebar.BamKohb5.js.map +0 -1
- package/dist/esm/chunks/simpleSelect.B1rktKkt.js +0 -23
- package/dist/esm/chunks/status-badge.eFJ1PYeb.js +0 -18
- package/dist/esm/chunks/trend-value.COSukPwk.js +0 -51
- package/dist/esm/chunks/two-level-combobox.BXs2z9u5.js +0 -132
- package/dist/esm/chunks/useChartDateFormatters.DS9ASgFO.js +0 -11
- package/dist/esm/chunks/utils.Cwtlq8dh.js +0 -45
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sources":["../../../../src/components/ui/command.tsx"],"sourcesContent":["import * as React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\n\nimport { cn } from '@/lib/utils';\nimport { Dialog, DialogContent } from '@/components/ui/dialog';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <MagnifyingGlassIcon className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('-mx-1 h-px bg-border', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"command.js","sources":["../../../../src/components/ui/command.tsx"],"sourcesContent":["import * as React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\n\nimport { cn } from '@/lib/utils';\nimport { Dialog, DialogContent } from '@/components/ui/dialog';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <MagnifyingGlassIcon className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('-mx-1 h-px bg-border', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"names":["Command","React","forwardRef","className","props","ref","createElement","CommandPrimitive","cn","displayName","CommandDialog","children","Dialog","DialogContent","CommandInput","MagnifyingGlassIcon","Input","CommandList","List","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","Separator","CommandItem","Item","CommandShortcut"],"mappings":"8NAQA,MAAMA,EAAUC,EAAMC,WAGpB,EAAGC,eAAcC,GAASC,mBAC1BJ,EAAAK,cAACC,EAAA,CACCF,MACAF,UAAWK,EACT,4FACAL,MAEEC,KAGRJ,EAAQS,YAAcF,EAAiBE,YAEvC,MAAMC,EAAgB,EAAGC,cAAaP,oBAElCH,EAAAK,cAACM,EAAA,IAAWR,kCACTS,EAAA,CAAcV,UAAU,sCACvBF,EAAAK,cAACN,EAAA,CAAQG,UAAU,+WAChBQ,KAOLG,EAAeb,EAAMC,WAGzB,EAAGC,eAAcC,GAASC;eAE1BJ,EAAAK,cAAC,MAAA,CAAIH,UAAU,kCAAkC,qBAAmB,mBAClEF,EAAAK,cAACS,EAAA,CAAoBZ,UAAU,oDAC/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itive.Root;
|
|
7
|
-
const DialogTrigger = DialogPrimitive.Trigger;
|
|
8
|
-
const DialogPortal = DialogPrimitive.Portal;
|
|
9
|
-
const DialogClose = DialogPrimitive.Close;
|
|
10
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
11
|
-
DialogPrimitive.Overlay,
|
|
12
|
-
{
|
|
13
|
-
ref,
|
|
14
|
-
className: cn(
|
|
15
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
16
|
-
className
|
|
17
|
-
),
|
|
18
|
-
...props
|
|
19
|
-
}
|
|
20
|
-
));
|
|
21
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
22
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React.createElement(DialogPortal, null, /* @__PURE__ */ React.createElement(DialogOverlay, null), /* @__PURE__ */ React.createElement(
|
|
23
|
-
DialogPrimitive.Content,
|
|
24
|
-
{
|
|
25
|
-
ref,
|
|
26
|
-
className: cn(
|
|
27
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-surface p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
28
|
-
"border-border shadow-[2px_2px_0_0_#0A0A0D] !transition-shadow duration-300 ease-in-out dark:shadow-[2px_2px_0_0_#FFF] dark:active:shadow-[inset_2px_2px_0_0_#FFF]",
|
|
29
|
-
className
|
|
30
|
-
),
|
|
31
|
-
...props
|
|
32
|
-
},
|
|
33
|
-
children,
|
|
34
|
-
/* @__PURE__ */ React.createElement(
|
|
35
|
-
DialogPrimitive.Close,
|
|
36
|
-
{
|
|
37
|
-
className: "absolute right-4 top-4 opacity-70 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF] p-[6px]\n "
|
|
38
|
-
},
|
|
39
|
-
/* @__PURE__ */ React.createElement(X, { size: 20, weight: "bold" }),
|
|
40
|
-
/* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "Close")
|
|
41
|
-
)
|
|
42
|
-
)));
|
|
43
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
44
|
-
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ React.createElement("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
45
|
-
DialogHeader.displayName = "DialogHeader";
|
|
46
|
-
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ React.createElement("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
47
|
-
DialogFooter.displayName = "DialogFooter";
|
|
48
|
-
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
49
|
-
DialogPrimitive.Title,
|
|
50
|
-
{
|
|
51
|
-
ref,
|
|
52
|
-
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
53
|
-
...props
|
|
54
|
-
}
|
|
55
|
-
));
|
|
56
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
57
|
-
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
58
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
59
|
-
|
|
60
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
1
|
+
import*as e from"react";import*as a from"@radix-ui/react-dialog";import{X as t}from"@phosphor-icons/react";import{c as s}from"../../chunks/utils.C6Qu-kwd.js";const o=a.Root,r=a.Trigger,d=a.Portal,n=a.Close,l=e.forwardRef(({className:t,...o},r)=>/* @__PURE__ */e.createElement(a.Overlay,{ref:r,className:s("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o}));l.displayName=a.Overlay.displayName;const i=e.forwardRef(({className:o,children:r,...n},i)=>/* @__PURE__ */e.createElement(d,null,/* @__PURE__ */e.createElement(l,null),/* @__PURE__ */e.createElement(a.Content,{ref:i,className:s("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-surface p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg","border-border shadow-[2px_2px_0_0_#0A0A0D] !transition-shadow duration-300 ease-in-out dark:shadow-[2px_2px_0_0_#FFF] dark:active:shadow-[inset_2px_2px_0_0_#FFF]",o),...n},r,
|
|
2
|
+
/* @__PURE__ */e.createElement(a.Close,{className:"absolute right-4 top-4 opacity-70 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF] p-[6px]\n "},
|
|
3
|
+
/* @__PURE__ */e.createElement(t,{size:20,weight:"bold"}),
|
|
4
|
+
/* @__PURE__ */e.createElement("span",{className:"sr-only"},"Close")))));i.displayName=a.Content.displayName;const c=({className:a,...t})=>/* @__PURE__ */e.createElement("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",a),...t});c.displayName="DialogHeader";const m=({className:a,...t})=>/* @__PURE__ */e.createElement("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...t});m.displayName="DialogFooter";const p=e.forwardRef(({className:t,...o},r)=>/* @__PURE__ */e.createElement(a.Title,{ref:r,className:s("text-lg font-semibold leading-none tracking-tight",t),...o}));p.displayName=a.Title.displayName;const f=e.forwardRef(({className:t,...o},r)=>/* @__PURE__ */e.createElement(a.Description,{ref:r,className:s("text-sm text-muted-foreground",t),...o}));f.displayName=a.Description.displayName;export{o as Dialog,n as DialogClose,i as DialogContent,f as DialogDescription,m as DialogFooter,c as DialogHeader,l as DialogOverlay,d as DialogPortal,p as DialogTitle,r as DialogTrigger};
|
|
61
5
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sources":["../../../../src/components/ui/dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X as Cross2Icon } from '@phosphor-icons/react';\n\nimport { cn } from '@/lib/utils';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-surface p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',\n 'border-border shadow-[2px_2px_0_0_#0A0A0D] !transition-shadow duration-300 ease-in-out dark:shadow-[2px_2px_0_0_#FFF] dark:active:shadow-[inset_2px_2px_0_0_#FFF]',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 opacity-70 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF] p-[6px]\n \"\n >\n <Cross2Icon size={20} weight=\"bold\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"dialog.js","sources":["../../../../src/components/ui/dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X as Cross2Icon } from '@phosphor-icons/react';\n\nimport { cn } from '@/lib/utils';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-surface p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',\n 'border-border shadow-[2px_2px_0_0_#0A0A0D] !transition-shadow duration-300 ease-in-out dark:shadow-[2px_2px_0_0_#FFF] dark:active:shadow-[inset_2px_2px_0_0_#FFF]',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 opacity-70 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF] p-[6px]\n \"\n >\n <Cross2Icon size={20} weight=\"bold\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"names":["Dialog","DialogPrimitive","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","React","forwardRef","className","props","ref","createElement","Overlay","cn","displayName","DialogContent","children","Content","Cross2Icon","size","weight","DialogHeader","DialogFooter","DialogTitle","Title","DialogDescription","Description"],"mappings":"8JAMA,MAAMA,EAASC,EAAgBC,KAEzBC,EAAgBF,EAAgBG,QAEhCC,EAAeJ,EAAgBK,OAE/BC,EAAcN,EAAgBO,MAE9BC,EAAgBC,EAAMC,WAG1B,EAAGC,eAAcC,GAASC,mBAC1BJ,EAAAK,cAACd,EAAgBe,QAAhB,CACCF,MACAF,UAAWK,EACT,0JACAL,MAEEC,KAGRJ,EAAcS,YAAcjB,EAAgBe,QAAQE,YAEpD,MAAMC,EAAgBT,EAAMC,WAG1B,EAAGC,YAAWQ,cAAaP,GAASC,mBACpCJ,EAAAK,cAACV,EAAA,oBACCK,EAAAK,cAACN,uBACDC,EAAAK,cAACd,EAAgBoB,QAAhB,CACCP,MACAF,UAAWK,EACT,2fACA,oKACAL,MAEEC,GAEHO;eACDV,EAAAK,cAACd,EAAgBO,MAAhB,CACCI,UAAU;eAIVF,EAAAK,cAACO,EAAA,CAAWC,KAAM,GAAIC,OAAO;eAC7Bd,EAAAK,cAAC,OAAA,CAAKH,UAAU,WAAU,aAKlCO,EAAcD,YAAcjB,EAAgBoB,QAAQH,YAEpD,MAAMO,EAAe,EAAGb,eAAcC,oBACpCH,EAAAK,cAAC,MAAA,CAAIH,UAAWK,EAAG,qDAAsDL,MAAgBC,IAE3FY,EAAaP,YAAc,eAE3B,MAAMQ,EAAe,EAAGd,eAAcC,oBACpCH,EAAAK,cAAC,MAAA,CAAIH,UAAWK,EAAG,gEAAiEL,MAAgBC,IAEtGa,EAAaR,YAAc,eAE3B,MAAMS,EAAcjB,EAAMC,WAGxB,EAAGC,eAAcC,GAASC,mBAC1BJ,EAAAK,cAACd,EAAgB2B,MAAhB,CACCd,MACAF,UAAWK,EAAG,oDAAqDL,MAC/DC,KAGRc,EAAYT,YAAcjB,EAAgB2B,MAAMV,YAEhD,MAAMW,EAAoBnB,EAAMC,WAG9B,EAAGC,eAAcC,GAASC,mBAC1BJ,EAAAK,cAACd,EAAgB6B,YAAhB,CAA4BhB,MAAUF,UAAWK,EAAG,gCAAiCL,MAAgBC,KAExGgB,EAAkBX,YAAcjB,EAAgB6B,YAAYZ"}
|
|
@@ -1,62 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { c as cn } from '../../chunks/utils.Cwtlq8dh.js';
|
|
5
|
-
|
|
6
|
-
const divButtonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
13
|
-
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
14
|
-
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
15
|
-
suggestion: "bg-blue-600 text-white rounded-full",
|
|
16
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
18
|
-
dark: "bg-dark-700 text-white shadow hover:bg-dark-800 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 focus-visible:bg-dark-800 dark:focus-visible:bg-primary/80",
|
|
19
|
-
shadow: "bg-primary text-primary rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]",
|
|
20
|
-
shadowSurface: "bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]"
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
default: "h-9 px-4 py-2",
|
|
24
|
-
sm: "h-8 rounded-md px-3 text-sm",
|
|
25
|
-
lg: "h-10 rounded-md px-8",
|
|
26
|
-
icon: "h-9 w-9 [&_svg]:size-5"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "default",
|
|
31
|
-
size: "default"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
const DivButton = React.forwardRef(
|
|
36
|
-
({ className, variant, size, asChild = false, onClick, onKeyDown, ...props }, ref) => {
|
|
37
|
-
const handleKeyDown = (event) => {
|
|
38
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
39
|
-
event.preventDefault();
|
|
40
|
-
event.currentTarget.click();
|
|
41
|
-
}
|
|
42
|
-
onKeyDown?.(event);
|
|
43
|
-
};
|
|
44
|
-
const Comp = asChild ? Slot : "div";
|
|
45
|
-
return /* @__PURE__ */ React.createElement(
|
|
46
|
-
Comp,
|
|
47
|
-
{
|
|
48
|
-
className: cn(divButtonVariants({ variant, size, className })),
|
|
49
|
-
ref,
|
|
50
|
-
role: "button",
|
|
51
|
-
tabIndex: 0,
|
|
52
|
-
onClick,
|
|
53
|
-
onKeyDown: handleKeyDown,
|
|
54
|
-
...props
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
DivButton.displayName = "DivButton";
|
|
60
|
-
|
|
61
|
-
export { DivButton, divButtonVariants };
|
|
1
|
+
import*as e from"react";import{S as r}from"../../chunks/index.uF4ME3WQ.js";import{cva as o}from"class-variance-authority";import{c as a}from"../../chunks/utils.C6Qu-kwd.js";const t=o("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",suggestion:"bg-blue-600 text-white rounded-full",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",dark:"bg-dark-700 text-white shadow hover:bg-dark-800 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 focus-visible:bg-dark-800 dark:focus-visible:bg-primary/80",shadow:"bg-primary text-primary rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]",shadowSurface:"bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9 [&_svg]:size-5"}},defaultVariants:{variant:"default",size:"default"}}),s=e.forwardRef(({className:o,variant:s,size:n,asChild:i=!1,onClick:d,onKeyDown:u,...c},h)=>{const p=i?r:"div";/* @__PURE__ */
|
|
2
|
+
return e.createElement(p,{className:a(t({variant:s,size:n,className:o})),ref:h,role:"button",tabIndex:0,onClick:d,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click()),u?.(e)},...c})});s.displayName="DivButton";export{s as DivButton,t as divButtonVariants};
|
|
62
3
|
//# sourceMappingURL=div-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"div-button.js","sources":["../../../../src/components/ui/div-button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst divButtonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n suggestion: 'bg-blue-600 text-white rounded-full',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n dark: 'bg-dark-700 text-white shadow hover:bg-dark-800 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 focus-visible:bg-dark-800 dark:focus-visible:bg-primary/80',\n shadow:\n 'bg-primary text-primary rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]',\n shadowSurface:\n 'bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]',\n },\n size: {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-sm',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9 [&_svg]:size-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface DivButtonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof divButtonVariants> {\n asChild?: boolean;\n}\n\nconst DivButton = React.forwardRef<HTMLDivElement, DivButtonProps>(\n ({ className, variant, size, asChild = false, onClick, onKeyDown, ...props }, ref) => {\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // Handle Enter and Space key activation\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // Dispatch a real click event so Radix components work properly\n event.currentTarget.click();\n }\n // Call any existing onKeyDown handler\n onKeyDown?.(event);\n };\n\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n className={cn(divButtonVariants({ variant, size, className }))}\n ref={ref}\n role=\"button\"\n tabIndex={0}\n onClick={onClick}\n onKeyDown={handleKeyDown}\n {...props}\n />\n );\n },\n);\nDivButton.displayName = 'DivButton';\n\nexport { DivButton, divButtonVariants };\n"],"names":[
|
|
1
|
+
{"version":3,"file":"div-button.js","sources":["../../../../src/components/ui/div-button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst divButtonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n suggestion: 'bg-blue-600 text-white rounded-full',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n dark: 'bg-dark-700 text-white shadow hover:bg-dark-800 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 focus-visible:bg-dark-800 dark:focus-visible:bg-primary/80',\n shadow:\n 'bg-primary text-primary rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]',\n shadowSurface:\n 'bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]',\n },\n size: {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-sm',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9 [&_svg]:size-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface DivButtonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof divButtonVariants> {\n asChild?: boolean;\n}\n\nconst DivButton = React.forwardRef<HTMLDivElement, DivButtonProps>(\n ({ className, variant, size, asChild = false, onClick, onKeyDown, ...props }, ref) => {\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // Handle Enter and Space key activation\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // Dispatch a real click event so Radix components work properly\n event.currentTarget.click();\n }\n // Call any existing onKeyDown handler\n onKeyDown?.(event);\n };\n\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n className={cn(divButtonVariants({ variant, size, className }))}\n ref={ref}\n role=\"button\"\n tabIndex={0}\n onClick={onClick}\n onKeyDown={handleKeyDown}\n {...props}\n />\n );\n },\n);\nDivButton.displayName = 'DivButton';\n\nexport { DivButton, divButtonVariants };\n"],"names":["divButtonVariants","cva","variants","variant","default","destructive","outline","secondary","suggestion","ghost","link","dark","shadow","shadowSurface","size","sm","lg","icon","defaultVariants","DivButton","React","forwardRef","className","asChild","onClick","onKeyDown","props","ref","Comp","Slot","createElement","cn","role","tabIndex","event","key","preventDefault","currentTarget","click","displayName"],"mappings":"6KAMA,MAAMA,EAAoBC,EACxB,yUACA,CACEC,SAAU,CACRC,QAAS,CACPC,QAAS,gEACTC,YAAa,+EACbC,QAAS,2FACTC,UAAW,yEACXC,WAAY,sCACZC,MAAO,+CACPC,KAAM,kDACNC,KAAM,mLACNC,OACE,8RACFC,cACE,gSAEJC,KAAM,CACJV,QAAS,gBACTW,GAAI,8BACJC,GAAI,uBACJC,KAAM,2BAGVC,gBAAiB,CACff,QAAS,UACTW,KAAM,aASNK,EAAYC,EAAMC,WACtB,EAAGC,YAAWnB,UAASW,OAAMS,WAAU,EAAOC,UAASC,eAAcC,GAASC,KAC5E,MAWMC,EAAOL,EAAUM,EAAO;AAE9B,OACET,EAAAU,cAACF,EAAA,CACCN,UAAWS,EAAG/B,EAAkB,CAAEG,UAASW,OAAMQ,eACjDK,MACAK,KAAK,SACLC,SAAU,EACVT,UACAC,UApBmBS,IAEH,UAAdA,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAME,iBAENF,EAAMG,cAAcC,SAGtBb,IAAYS,OAaNR,MAKZP,EAAUoB,YAAc"}
|
|
@@ -1,115 +1,4 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { c as cn } from '../../chunks/utils.Cwtlq8dh.js';
|
|
5
|
-
|
|
6
|
-
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
7
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
8
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
9
|
-
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
10
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
11
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
12
|
-
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, secondaryRow, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
13
|
-
DropdownMenuPrimitive.SubTrigger,
|
|
14
|
-
{
|
|
15
|
-
ref,
|
|
16
|
-
className: cn(
|
|
17
|
-
"flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm !outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
18
|
-
inset && "pl-8",
|
|
19
|
-
secondaryRow && "h-auto group/dropdown-item",
|
|
20
|
-
className
|
|
21
|
-
),
|
|
22
|
-
...props
|
|
23
|
-
},
|
|
24
|
-
secondaryRow ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex min-w-0 flex-1 flex-col items-start" }, /* @__PURE__ */ React.createElement("div", { className: "flex w-full items-center gap-2 pb-0.5 [&_svg]:size-4 [&_svg]:shrink-0" }, children), secondaryRow), /* @__PURE__ */ React.createElement(ChevronRightIcon, { className: "ml-auto" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, children, /* @__PURE__ */ React.createElement(ChevronRightIcon, { className: "ml-auto" }))
|
|
25
|
-
));
|
|
26
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
27
|
-
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
28
|
-
DropdownMenuPrimitive.SubContent,
|
|
29
|
-
{
|
|
30
|
-
ref,
|
|
31
|
-
className: cn(
|
|
32
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]",
|
|
33
|
-
"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",
|
|
34
|
-
className
|
|
35
|
-
),
|
|
36
|
-
...props
|
|
37
|
-
}
|
|
38
|
-
));
|
|
39
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
40
|
-
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
|
|
41
|
-
DropdownMenuPrimitive.Content,
|
|
42
|
-
{
|
|
43
|
-
ref,
|
|
44
|
-
sideOffset,
|
|
45
|
-
className: cn(
|
|
46
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]",
|
|
47
|
-
"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",
|
|
48
|
-
className
|
|
49
|
-
),
|
|
50
|
-
...props
|
|
51
|
-
}
|
|
52
|
-
)));
|
|
53
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
54
|
-
const DropdownMenuItem = React.forwardRef(({ className, inset, children, secondaryRow, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
55
|
-
DropdownMenuPrimitive.Item,
|
|
56
|
-
{
|
|
57
|
-
ref,
|
|
58
|
-
className: cn(
|
|
59
|
-
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0",
|
|
60
|
-
inset && "pl-8",
|
|
61
|
-
secondaryRow && "flex-col items-start h-auto group/dropdown-item",
|
|
62
|
-
className
|
|
63
|
-
),
|
|
64
|
-
...props
|
|
65
|
-
},
|
|
66
|
-
secondaryRow ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex w-full items-center gap-2 pb-0.5 [&_svg]:size-5 [&_svg]:shrink-0" }, children), secondaryRow) : children
|
|
67
|
-
));
|
|
68
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
69
|
-
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
70
|
-
DropdownMenuPrimitive.CheckboxItem,
|
|
71
|
-
{
|
|
72
|
-
ref,
|
|
73
|
-
className: cn(
|
|
74
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
75
|
-
className
|
|
76
|
-
),
|
|
77
|
-
checked,
|
|
78
|
-
...props
|
|
79
|
-
},
|
|
80
|
-
/* @__PURE__ */ React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(CheckIcon, { className: "h-4 w-4" }))),
|
|
81
|
-
children
|
|
82
|
-
));
|
|
83
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
84
|
-
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
85
|
-
DropdownMenuPrimitive.RadioItem,
|
|
86
|
-
{
|
|
87
|
-
ref,
|
|
88
|
-
className: cn(
|
|
89
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
90
|
-
className
|
|
91
|
-
),
|
|
92
|
-
...props
|
|
93
|
-
},
|
|
94
|
-
/* @__PURE__ */ React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(CheckIcon, { className: "h-4 w-4" }))),
|
|
95
|
-
children
|
|
96
|
-
));
|
|
97
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
98
|
-
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
99
|
-
DropdownMenuPrimitive.Label,
|
|
100
|
-
{
|
|
101
|
-
ref,
|
|
102
|
-
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
103
|
-
...props
|
|
104
|
-
}
|
|
105
|
-
));
|
|
106
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
107
|
-
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
108
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
109
|
-
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
110
|
-
return /* @__PURE__ */ React.createElement("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
111
|
-
};
|
|
112
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
113
|
-
|
|
114
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
1
|
+
import*as e from"react";import*as t from"@radix-ui/react-dropdown-menu";import{ChevronRightIcon as a,CheckIcon as s}from"@radix-ui/react-icons";import{c as o}from"../../chunks/utils.C6Qu-kwd.js";const r=t.Root,n=t.Trigger,l=t.Group,d=t.Portal,m=t.Sub,i=t.RadioGroup,c=e.forwardRef(({className:s,inset:r,children:n,secondaryRow:l,...d},m)=>/* @__PURE__ */e.createElement(t.SubTrigger,{ref:m,className:o("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm !outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",l&&"h-auto group/dropdown-item",s),...d},l?/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start"},/* @__PURE__ */e.createElement("div",{className:"flex w-full items-center gap-2 pb-0.5 [&_svg]:size-4 [&_svg]:shrink-0"},n),l),/* @__PURE__ */e.createElement(a,{className:"ml-auto"})):/* @__PURE__ */e.createElement(e.Fragment,null,n,/* @__PURE__ */e.createElement(a,{className:"ml-auto"}))));c.displayName=t.SubTrigger.displayName;const p=e.forwardRef(({className:a,...s},r)=>/* @__PURE__ */e.createElement(t.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]","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",a),...s}));p.displayName=t.SubContent.displayName;const f=e.forwardRef(({className:a,sideOffset:s=4,...r},n)=>/* @__PURE__ */e.createElement(t.Portal,null,/* @__PURE__ */e.createElement(t.Content,{ref:n,sideOffset:s,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]","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",a),...r})));f.displayName=t.Content.displayName;const u=e.forwardRef(({className:a,inset:s,children:r,secondaryRow:n,...l},d)=>/* @__PURE__ */e.createElement(t.Item,{ref:d,className:o("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0",s&&"pl-8",n&&"flex-col items-start h-auto group/dropdown-item",a),...l},n?/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("div",{className:"flex w-full items-center gap-2 pb-0.5 [&_svg]:size-5 [&_svg]:shrink-0"},r),n):r));u.displayName=t.Item.displayName;const g=e.forwardRef(({className:a,children:r,checked:n,...l},d)=>/* @__PURE__ */e.createElement(t.CheckboxItem,{ref:d,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:n,...l},
|
|
2
|
+
/* @__PURE__ */e.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},/* @__PURE__ */e.createElement(t.ItemIndicator,null,/* @__PURE__ */e.createElement(s,{className:"h-4 w-4"}))),r));g.displayName=t.CheckboxItem.displayName;const N=e.forwardRef(({className:a,children:r,...n},l)=>/* @__PURE__ */e.createElement(t.RadioItem,{ref:l,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...n},
|
|
3
|
+
/* @__PURE__ */e.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},/* @__PURE__ */e.createElement(t.ItemIndicator,null,/* @__PURE__ */e.createElement(s,{className:"h-4 w-4"}))),r));N.displayName=t.RadioItem.displayName;const x=e.forwardRef(({className:a,inset:s,...r},n)=>/* @__PURE__ */e.createElement(t.Label,{ref:n,className:o("px-2 py-1.5 text-sm font-semibold",s&&"pl-8",a),...r}));x.displayName=t.Label.displayName;const b=e.forwardRef(({className:a,...s},r)=>/* @__PURE__ */e.createElement(t.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",a),...s}));b.displayName=t.Separator.displayName;const h=({className:t,...a})=>/* @__PURE__ */e.createElement("span",{className:o("ml-auto text-xs tracking-widest opacity-60",t),...a});h.displayName="DropdownMenuShortcut";export{r as DropdownMenu,g as DropdownMenuCheckboxItem,f as DropdownMenuContent,l as DropdownMenuGroup,u as DropdownMenuItem,x as DropdownMenuLabel,d as DropdownMenuPortal,i as DropdownMenuRadioGroup,N as DropdownMenuRadioItem,b as DropdownMenuSeparator,h as DropdownMenuShortcut,m as DropdownMenuSub,p as DropdownMenuSubContent,c as DropdownMenuSubTrigger,n as DropdownMenuTrigger};
|
|
115
4
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sources":["../../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon } from '@radix-ui/react-icons';\n\nimport { cn } from '@/lib/utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n /** Optional second row (e.g. ID + copy); consumer supplies full content as ReactNode. */\n secondaryRow?: React.ReactNode;\n }\n>(({ className, inset, children, secondaryRow, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm !outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n secondaryRow && 'h-auto group/dropdown-item',\n className,\n )}\n {...props}\n >\n {secondaryRow ? (\n <>\n <div className=\"flex min-w-0 flex-1 flex-col items-start\">\n <div className=\"flex w-full items-center gap-2 pb-0.5 [&_svg]:size-4 [&_svg]:shrink-0\">{children}</div>\n {secondaryRow}\n </div>\n <ChevronRightIcon className=\"ml-auto\" />\n </>\n ) : (\n <>\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </>\n )}\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n /** Optional second row (e.g. ID + copy); consumer supplies full content as ReactNode. */\n secondaryRow?: React.ReactNode;\n }\n>(({ className, inset, children, secondaryRow, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0',\n inset && 'pl-8',\n secondaryRow && 'flex-col items-start h-auto group/dropdown-item',\n className,\n )}\n {...props}\n >\n {secondaryRow ? (\n <>\n <div className=\"flex w-full items-center gap-2 pb-0.5 [&_svg]:size-5 [&_svg]:shrink-0\">{children}</div>\n {secondaryRow}\n </>\n ) : (\n children\n )}\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground 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 <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground 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 <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-muted', className)} {...props} />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":[],"mappings":";;;;;AAMA,MAAM,eAAe,qBAAA,CAAsB;AAE3C,MAAM,sBAAsB,qBAAA,CAAsB;AAElD,MAAM,oBAAoB,qBAAA,CAAsB;AAEhD,MAAM,qBAAqB,qBAAA,CAAsB;AAEjD,MAAM,kBAAkB,qBAAA,CAAsB;AAE9C,MAAM,yBAAyB,qBAAA,CAAsB;AAErD,MAAM,sBAAA,GAAyB,KAAA,CAAM,UAAA,CAOnC,CAAC,EAAE,SAAA,EAAW,KAAA,EAAO,QAAA,EAAU,YAAA,EAAc,GAAG,KAAA,EAAM,EAAG,GAAA,qBACzD,KAAA,CAAA,aAAA;AAAA,EAAC,qBAAA,CAAsB,UAAA;AAAA,EAAtB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,yMAAA;AAAA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A,GAAc,sBAAsB,KAAA,CAAM,WAAA;AAE5D,MAAM,qBAAA,GAAwB,MAAM,UAAA,CAGlC,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1B,KAAA,CAAA,aAAA,CAAC,sBAAsB,SAAA,EAAtB,EAAgC,KAAU,SAAA,EAAW,EAAA,CAAG,4BAA4B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAC7G;AACD,qBAAA,CAAsB,WAAA,GAAc,sBAAsB,SAAA,CAAU,WAAA;AAEpE,MAAM,uBAAuB,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAA6C;AAC/F,EAAA,uBAAO,KAAA,CAAA,aAAA,CAAC,UAAK,SAAA,EAAW,EAAA,CAAG,8CAA8C,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAClG;AACA,oBAAA,CAAqB,WAAA,GAAc,sBAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sources":["../../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon } from '@radix-ui/react-icons';\n\nimport { cn } from '@/lib/utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n /** Optional second row (e.g. ID + copy); consumer supplies full content as ReactNode. */\n secondaryRow?: React.ReactNode;\n }\n>(({ className, inset, children, secondaryRow, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm !outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n secondaryRow && 'h-auto group/dropdown-item',\n className,\n )}\n {...props}\n >\n {secondaryRow ? (\n <>\n <div className=\"flex min-w-0 flex-1 flex-col items-start\">\n <div className=\"flex w-full items-center gap-2 pb-0.5 [&_svg]:size-4 [&_svg]:shrink-0\">{children}</div>\n {secondaryRow}\n </div>\n <ChevronRightIcon className=\"ml-auto\" />\n </>\n ) : (\n <>\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </>\n )}\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0_0_#171717] dark:shadow-[4px_4px_0_0_#fff]',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n /** Optional second row (e.g. ID + copy); consumer supplies full content as ReactNode. */\n secondaryRow?: React.ReactNode;\n }\n>(({ className, inset, children, secondaryRow, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0',\n inset && 'pl-8',\n secondaryRow && 'flex-col items-start h-auto group/dropdown-item',\n className,\n )}\n {...props}\n >\n {secondaryRow ? (\n <>\n <div className=\"flex w-full items-center gap-2 pb-0.5 [&_svg]:size-5 [&_svg]:shrink-0\">{children}</div>\n {secondaryRow}\n </>\n ) : (\n children\n )}\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground 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 <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm !outline-none transition-colors focus:bg-accent focus:text-accent-foreground 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 <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-muted', className)} {...props} />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":["DropdownMenu","DropdownMenuPrimitive","Root","DropdownMenuTrigger","Trigger","DropdownMenuGroup","Group","DropdownMenuPortal","Portal","DropdownMenuSub","Sub","DropdownMenuRadioGroup","RadioGroup","DropdownMenuSubTrigger","React","forwardRef","className","inset","children","secondaryRow","props","ref","createElement","SubTrigger","cn","Fragment","ChevronRightIcon","displayName","DropdownMenuSubContent","SubContent","DropdownMenuContent","sideOffset","Content","DropdownMenuItem","Item","DropdownMenuCheckboxItem","checked","CheckboxItem","ItemIndicator","CheckIcon","Dropdown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AAWQ,EAAG,2BAA4BR,MAAgBI,KAEvGwB,EAAsBjB,YAAc1B,EAAsB4C,UAAUlB,YAEpE,MAAMmB,EAAuB,EAAG9B,eAAcI,oBACrCN,EAAAQ,cAAC,QAAKN,UAAWQ,EAAG,6CAA8CR,MAAgBI,IAE3F0B,EAAqBnB,YAAc"}
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const lazyIconCache = /* @__PURE__ */ new Map();
|
|
4
|
-
function getLazyIcon(iconName) {
|
|
5
|
-
if (!lazyIconCache.has(iconName)) {
|
|
6
|
-
lazyIconCache.set(
|
|
7
|
-
iconName,
|
|
8
|
-
lazy(
|
|
9
|
-
() => import('@phosphor-icons/react').then((module) => {
|
|
10
|
-
const icons = module;
|
|
11
|
-
return { default: icons[iconName] };
|
|
12
|
-
})
|
|
13
|
-
)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
return lazyIconCache.get(iconName);
|
|
17
|
-
}
|
|
18
|
-
const PhosphorIcon = forwardRef(({ iconName, ...props }, ref) => {
|
|
19
|
-
const IconComponent = getLazyIcon(iconName);
|
|
20
|
-
return /* @__PURE__ */ React__default.createElement(Suspense, { fallback: /* @__PURE__ */ React__default.createElement(React__default.Fragment, null) }, /* @__PURE__ */ React__default.createElement(IconComponent, { ...props, ref }));
|
|
21
|
-
});
|
|
22
|
-
PhosphorIcon.displayName = "PhosphorIcon";
|
|
23
|
-
const MemoizedIcon = memo(PhosphorIcon);
|
|
24
|
-
|
|
25
|
-
export { PhosphorIcon as Icon, MemoizedIcon };
|
|
1
|
+
import e,{forwardRef as t,Suspense as n,memo as o,lazy as r}from"react";const a=/* @__PURE__ */new Map;const c=t(({iconName:t,...o},c)=>{const s=function(e){return a.has(e)||a.set(e,r(()=>import("@phosphor-icons/react").then(t=>({default:t[e]})))),a.get(e)}(t);/* @__PURE__ */
|
|
2
|
+
return e.createElement(n,{fallback:/* @__PURE__ */e.createElement(e.Fragment,null)},/* @__PURE__ */e.createElement(s,{...o,ref:c}))});c.displayName="PhosphorIcon";const s=o(c);export{c as Icon,s as MemoizedIcon};
|
|
26
3
|
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../../src/components/ui/icon.tsx"],"sourcesContent":["import React, { Suspense, lazy, memo, forwardRef } from 'react';\nimport { type Icon, type IconProps } from '@phosphor-icons/react';\n\ninterface PhosphorIconProps extends IconProps {\n iconName: string;\n}\n\n/**\n * A flexible icon component that supports both Phosphor icons and image-based icons.\n *\n * The component uses dynamic imports to lazy load Phosphor icons, reducing the initial\n * bundle size by only loading icons when they're needed.\n *\n * @component\n * @example\n * // Using a Phosphor icon\n * <Icon iconName=\"House\" size={24} />\n *\n * // Using an image icon\n * <Icon iconPath=\"/path/to/icon.svg\" />\n */\n\n// Cache lazy components by icon name so React sees a stable component reference\n// across renders. Calling lazy() inside a render function creates a new component\n// identity every render, causing remounts and repeated Suspense fallback flashes.\nconst lazyIconCache = new Map<string, ReturnType<typeof lazy>>();\n\nfunction getLazyIcon(iconName: string) {\n if (!lazyIconCache.has(iconName)) {\n lazyIconCache.set(\n iconName,\n lazy(() =>\n import('@phosphor-icons/react').then((module) => {\n const icons = module as unknown as Record<string, Icon>;\n return { default: icons[iconName] };\n }),\n ),\n );\n }\n return lazyIconCache.get(iconName)!;\n}\n\nconst PhosphorIcon = forwardRef<SVGSVGElement, PhosphorIconProps>(({ iconName, ...props }, ref) => {\n const IconComponent = getLazyIcon(iconName);\n\n return (\n <Suspense fallback={<></>}>\n <IconComponent {...props} ref={ref} />\n </Suspense>\n );\n});\n\nPhosphorIcon.displayName = 'PhosphorIcon';\n\nconst Icon = ({ iconPath }: { iconPath: string }) => {\n return <img src={iconPath} alt=\"icon\" />;\n};\n\n// Export a memoized version of the PhosphorIcon component\nexport const MemoizedIcon = memo(PhosphorIcon);\nexport { PhosphorIcon as Icon };\n"],"names":["
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../../src/components/ui/icon.tsx"],"sourcesContent":["import React, { Suspense, lazy, memo, forwardRef } from 'react';\nimport { type Icon, type IconProps } from '@phosphor-icons/react';\n\ninterface PhosphorIconProps extends IconProps {\n iconName: string;\n}\n\n/**\n * A flexible icon component that supports both Phosphor icons and image-based icons.\n *\n * The component uses dynamic imports to lazy load Phosphor icons, reducing the initial\n * bundle size by only loading icons when they're needed.\n *\n * @component\n * @example\n * // Using a Phosphor icon\n * <Icon iconName=\"House\" size={24} />\n *\n * // Using an image icon\n * <Icon iconPath=\"/path/to/icon.svg\" />\n */\n\n// Cache lazy components by icon name so React sees a stable component reference\n// across renders. Calling lazy() inside a render function creates a new component\n// identity every render, causing remounts and repeated Suspense fallback flashes.\nconst lazyIconCache = new Map<string, ReturnType<typeof lazy>>();\n\nfunction getLazyIcon(iconName: string) {\n if (!lazyIconCache.has(iconName)) {\n lazyIconCache.set(\n iconName,\n lazy(() =>\n import('@phosphor-icons/react').then((module) => {\n const icons = module as unknown as Record<string, Icon>;\n return { default: icons[iconName] };\n }),\n ),\n );\n }\n return lazyIconCache.get(iconName)!;\n}\n\nconst PhosphorIcon = forwardRef<SVGSVGElement, PhosphorIconProps>(({ iconName, ...props }, ref) => {\n const IconComponent = getLazyIcon(iconName);\n\n return (\n <Suspense fallback={<></>}>\n <IconComponent {...props} ref={ref} />\n </Suspense>\n );\n});\n\nPhosphorIcon.displayName = 'PhosphorIcon';\n\nconst Icon = ({ iconPath }: { iconPath: string }) => {\n return <img src={iconPath} alt=\"icon\" />;\n};\n\n// Export a memoized version of the PhosphorIcon component\nexport const MemoizedIcon = memo(PhosphorIcon);\nexport { PhosphorIcon as Icon };\n"],"names":["lazyIconCache","Map","PhosphorIcon","forwardRef","iconName","props","ref","IconComponent","has","set","lazy","import","then","module","default","get","getLazyIcon","React","createElement","Suspense","fallback","Fragment","displayName","MemoizedIcon","memo"],"mappings":"wEAyBA,MAAMA,qBAAoBC,IAiB1B,MAAMC,EAAeC,EAA6C,EAAGC,cAAaC,GAASC,KACzF,MAAMC,EAhBR,SAAqBH,GAYnB,OAXKJ,EAAcQ,IAAIJ,IACrBJ,EAAcS,IACZL,EACAM,EAAK,IACHC,OAAO,yBAAyBC,KAAMC,IAE7B,CAAEC,QADKD,EACUT,QAKzBJ,EAAce,IAAIX,EAC3B,CAGwBY,CAAYZ;AAElC,OACEa,EAAAC,cAACC,EAAA,CAASC,wBAAUH,EAAAC,cAAAD,EAAAI,SAAA,sCACjBd,EAAA,IAAkBF,EAAOC,WAKhCJ,EAAaoB,YAAc,eAOpB,MAAMC,EAAeC,EAAKtB"}
|
|
@@ -1,48 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
({ className, type, startIcon, endIcon, onStartIconClick, onEndIconClick, ...props }, ref) => {
|
|
6
|
-
const StartIcon = startIcon;
|
|
7
|
-
const EndIcon = endIcon;
|
|
8
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full relative" }, StartIcon && /* @__PURE__ */ React__default.createElement("div", { className: "absolute left-2 top-1/2 transform -translate-y-1/2" }, onStartIconClick ? /* @__PURE__ */ React__default.createElement(
|
|
9
|
-
"button",
|
|
10
|
-
{
|
|
11
|
-
type: "button",
|
|
12
|
-
onClick: onStartIconClick,
|
|
13
|
-
className: "flex items-center justify-center cursor-pointer hover:opacity-70 transition-opacity",
|
|
14
|
-
"aria-label": "Clear start icon"
|
|
15
|
-
},
|
|
16
|
-
/* @__PURE__ */ React__default.createElement(StartIcon, { size: 18, className: "text-muted-foreground" })
|
|
17
|
-
) : /* @__PURE__ */ React__default.createElement(StartIcon, { size: 18, className: "text-muted-foreground" })), /* @__PURE__ */ React__default.createElement(
|
|
18
|
-
"input",
|
|
19
|
-
{
|
|
20
|
-
type,
|
|
21
|
-
className: cn(
|
|
22
|
-
"flex h-12 w-full rounded-md border border-border bg-transparent py-3 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
23
|
-
type === "search" && !!endIcon && "appearance-none [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden [&::-webkit-search-results-button]:hidden [&::-webkit-search-results-decoration]:hidden",
|
|
24
|
-
startIcon && "pl-8 pr-4",
|
|
25
|
-
endIcon && "pl-4 pr-8",
|
|
26
|
-
startIcon && endIcon && "px-8",
|
|
27
|
-
!startIcon && !endIcon && "px-4",
|
|
28
|
-
className
|
|
29
|
-
),
|
|
30
|
-
ref,
|
|
31
|
-
...props
|
|
32
|
-
}
|
|
33
|
-
), EndIcon && /* @__PURE__ */ React__default.createElement("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2" }, onEndIconClick ? /* @__PURE__ */ React__default.createElement(
|
|
34
|
-
"button",
|
|
35
|
-
{
|
|
36
|
-
type: "button",
|
|
37
|
-
onClick: onEndIconClick,
|
|
38
|
-
className: "flex items-center justify-center cursor-pointer hover:opacity-70 transition-opacity",
|
|
39
|
-
"aria-label": "Clear input"
|
|
40
|
-
},
|
|
41
|
-
/* @__PURE__ */ React__default.createElement(EndIcon, { className: "text-muted-foreground", size: 18 })
|
|
42
|
-
) : /* @__PURE__ */ React__default.createElement(EndIcon, { className: "text-muted-foreground", size: 18 })));
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
Input.displayName = "Input";
|
|
46
|
-
|
|
47
|
-
export { Input };
|
|
1
|
+
import e from"react";import{c as t}from"../../chunks/utils.C6Qu-kwd.js";const r=e.forwardRef(({className:r,type:a,startIcon:n,endIcon:o,onStartIconClick:s,onEndIconClick:i,...l},c)=>{const d=n,m=o;/* @__PURE__ */
|
|
2
|
+
return e.createElement("div",{className:"w-full relative"},d&&/* @__PURE__ */e.createElement("div",{className:"absolute left-2 top-1/2 transform -translate-y-1/2"},s?/* @__PURE__ */e.createElement("button",{type:"button",onClick:s,className:"flex items-center justify-center cursor-pointer hover:opacity-70 transition-opacity","aria-label":"Clear start icon"},
|
|
3
|
+
/* @__PURE__ */e.createElement(d,{size:18,className:"text-muted-foreground"})):/* @__PURE__ */e.createElement(d,{size:18,className:"text-muted-foreground"})),/* @__PURE__ */e.createElement("input",{type:a,className:t("flex h-12 w-full rounded-md border border-border bg-transparent py-3 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","search"===a&&!!o&&"appearance-none [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden [&::-webkit-search-results-button]:hidden [&::-webkit-search-results-decoration]:hidden",n&&"pl-8 pr-4",o&&"pl-4 pr-8",n&&o&&"px-8",!n&&!o&&"px-4",r),ref:c,...l}),m&&/* @__PURE__ */e.createElement("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2"},i?/* @__PURE__ */e.createElement("button",{type:"button",onClick:i,className:"flex items-center justify-center cursor-pointer hover:opacity-70 transition-opacity","aria-label":"Clear input"},
|
|
4
|
+
/* @__PURE__ */e.createElement(m,{className:"text-muted-foreground",size:18})):/* @__PURE__ */e.createElement(m,{className:"text-muted-foreground",size:18})))});r.displayName="Input";export{r as Input};
|
|
48
5
|
//# sourceMappingURL=input.js.map
|