brd-ui-kit 0.1.75 → 0.1.76
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/brd-ui-kit.css +1 -1
- package/dist/calendar-B5QCV34E.cjs +2 -0
- package/dist/{calendar-DReGV_22.cjs.map → calendar-B5QCV34E.cjs.map} +1 -1
- package/dist/{calendar-C0DXP3T-.js → calendar-Ba3kHG6w.js} +264 -270
- package/dist/{calendar-C0DXP3T-.js.map → calendar-Ba3kHG6w.js.map} +1 -1
- package/dist/{calendar-locale-CP2pxhFK.cjs → calendar-locale-BHyNJPb2.cjs} +2 -2
- package/dist/{calendar-locale-CP2pxhFK.cjs.map → calendar-locale-BHyNJPb2.cjs.map} +1 -1
- package/dist/{calendar-locale-DJf03PI9.js → calendar-locale-DQ9wj0zF.js} +2 -2
- package/dist/{calendar-locale-DJf03PI9.js.map → calendar-locale-DQ9wj0zF.js.map} +1 -1
- package/dist/chart-9H_9wEfR.cjs +63 -0
- package/dist/{chart-C69jBlXa.cjs.map → chart-9H_9wEfR.cjs.map} +1 -1
- package/dist/{chart-CAPCe8o5.js → chart-DFbmMKiQ.js} +2956 -2951
- package/dist/{chart-CAPCe8o5.js.map → chart-DFbmMKiQ.js.map} +1 -1
- package/dist/components/basic-chart/basic-chart.d.ts +1 -1
- package/dist/components/basic-table/basic-table.d.ts +5 -5
- package/dist/components/data-table/data-table-actions-column.d.ts +3 -3
- package/dist/components/data-table/data-table-bulk-actions.d.ts +3 -3
- package/dist/components/data-table/data-table-column-visibility.d.ts +2 -2
- package/dist/components/data-table/data-table-filter.d.ts +2 -2
- package/dist/components/data-table/data-table-row-actions-column.d.ts +3 -3
- package/dist/components/data-table/use-data-table-editable-rows.d.ts +5 -5
- package/dist/components/input-field/input-field.d.ts +3 -3
- package/dist/components/input-phone/input-phone.d.ts +4 -4
- package/dist/components/popover-modal/popover-modal.d.ts +4 -4
- package/dist/components/select-field/select-field.d.ts +2 -2
- package/dist/components/ui/avatar/avatar.d.ts +7 -7
- package/dist/components/ui/badge/badge.d.ts +2 -2
- package/dist/components/ui/button/button.d.ts +3 -3
- package/dist/components/ui/calendar/calendar.d.ts +6 -6
- package/dist/components/ui/calendar/calendar.styles.d.ts +1 -1
- package/dist/components/ui/card/card.d.ts +13 -13
- package/dist/components/ui/chart/chart.d.ts +23 -21
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -4
- package/dist/components/ui/combobox/combobox.d.ts +6 -6
- package/dist/components/ui/dialog/dialog.d.ts +11 -11
- package/dist/components/ui/drawer/drawer.d.ts +11 -11
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +40 -40
- package/dist/components/ui/icon/icon.d.ts +3 -3
- package/dist/components/ui/input/input.d.ts +2 -2
- package/dist/components/ui/input-group/input-group.d.ts +7 -7
- package/dist/components/ui/label/label.d.ts +4 -4
- package/dist/components/ui/pagination/pagination.d.ts +8 -8
- package/dist/components/ui/popover/popover.d.ts +8 -8
- package/dist/components/ui/progress/progress.d.ts +4 -4
- package/dist/components/ui/radio-group/radio-group.d.ts +7 -7
- package/dist/components/ui/select/select.d.ts +11 -11
- package/dist/components/ui/select-calendar-menu/select-calendar-menu.d.ts +4 -4
- package/dist/components/ui/separator/separator.d.ts +4 -4
- package/dist/components/ui/switch/switch.d.ts +4 -4
- package/dist/components/ui/table/table.d.ts +17 -17
- package/dist/components/ui/tabs/tabs.d.ts +8 -8
- package/dist/components/ui/tooltip/tooltip.d.ts +8 -8
- package/dist/components/ui/typography/typography.d.ts +174 -174
- package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +35 -36
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +3 -3
- package/dist/components-basic-chart-basic-chart.cjs +2 -2
- package/dist/components-basic-chart-basic-chart.cjs.map +1 -1
- package/dist/components-basic-chart-basic-chart.js +106 -108
- package/dist/components-basic-chart-basic-chart.js.map +1 -1
- package/dist/components-basic-table-basic-table.cjs +2 -2
- package/dist/components-basic-table-basic-table.cjs.map +1 -1
- package/dist/components-basic-table-basic-table.js +232 -231
- package/dist/components-basic-table-basic-table.js.map +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-actions-column.js +5 -6
- package/dist/components-data-table-data-table-actions-column.js.map +1 -1
- package/dist/components-data-table-data-table-bulk-actions.cjs +1 -1
- package/dist/components-data-table-data-table-bulk-actions.cjs.map +1 -1
- package/dist/components-data-table-data-table-bulk-actions.js +9 -9
- package/dist/components-data-table-data-table-bulk-actions.js.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.js +1 -1
- package/dist/components-data-table-data-table-column-visibility.js.map +1 -1
- package/dist/components-data-table-data-table-filter.cjs +1 -1
- package/dist/components-data-table-data-table-filter.cjs.map +1 -1
- package/dist/components-data-table-data-table-filter.js +15 -15
- package/dist/components-data-table-data-table-filter.js.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.js +19 -20
- package/dist/components-data-table-data-table-row-actions-column.js.map +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.cjs +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.cjs.map +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.js +88 -90
- package/dist/components-data-table-use-data-table-editable-rows.js.map +1 -1
- package/dist/components-input-contact-input-contact.cjs +1 -1
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +8 -8
- package/dist/components-input-field-input-field.cjs +1 -1
- package/dist/components-input-field-input-field.cjs.map +1 -1
- package/dist/components-input-field-input-field.js +18 -19
- package/dist/components-input-field-input-field.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +4 -4
- package/dist/components-input-phone-input-phone.cjs.map +1 -1
- package/dist/components-input-phone-input-phone.js.map +1 -1
- package/dist/components-popover-modal-popover-modal.cjs +1 -1
- package/dist/components-popover-modal-popover-modal.cjs.map +1 -1
- package/dist/components-popover-modal-popover-modal.js +40 -29
- package/dist/components-popover-modal-popover-modal.js.map +1 -1
- package/dist/components-select-field-select-field.cjs.map +1 -1
- package/dist/components-select-field-select-field.js.map +1 -1
- package/dist/components-ui-avatar-avatar.cjs +1 -1
- package/dist/components-ui-avatar-avatar.cjs.map +1 -1
- package/dist/components-ui-avatar-avatar.js +12 -13
- package/dist/components-ui-avatar-avatar.js.map +1 -1
- package/dist/components-ui-badge-badge.cjs +1 -1
- package/dist/components-ui-badge-badge.cjs.map +1 -1
- package/dist/components-ui-badge-badge.js +10 -11
- package/dist/components-ui-badge-badge.js.map +1 -1
- package/dist/components-ui-button-button.cjs +1 -1
- package/dist/components-ui-button-button.cjs.map +1 -1
- package/dist/components-ui-button-button.js +10 -11
- package/dist/components-ui-button-button.js.map +1 -1
- package/dist/components-ui-button-button.styles.cjs +4 -4
- package/dist/components-ui-button-button.styles.cjs.map +1 -1
- package/dist/components-ui-button-button.styles.js +4 -4
- package/dist/components-ui-button-button.styles.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +1 -1
- package/dist/components-ui-calendar-calendar.js +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.js +1 -1
- package/dist/components-ui-calendar-calendar.styles.js.map +1 -1
- package/dist/components-ui-calendar.cjs +1 -1
- package/dist/components-ui-calendar.js +2 -2
- package/dist/components-ui-card-card.cjs +1 -1
- package/dist/components-ui-card-card.cjs.map +1 -1
- package/dist/components-ui-card-card.js +10 -11
- package/dist/components-ui-card-card.js.map +1 -1
- package/dist/components-ui-chart-chart.cjs +1 -1
- package/dist/components-ui-chart-chart.js +1 -1
- package/dist/components-ui-chart.cjs +1 -1
- package/dist/components-ui-chart.js +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
- package/dist/components-ui-checkbox-checkbox.js +11 -12
- package/dist/components-ui-checkbox-checkbox.js.map +1 -1
- package/dist/components-ui-combobox-combobox.cjs +5 -5
- package/dist/components-ui-combobox-combobox.cjs.map +1 -1
- package/dist/components-ui-combobox-combobox.js +1477 -1479
- package/dist/components-ui-combobox-combobox.js.map +1 -1
- package/dist/components-ui-dialog-dialog.cjs +1 -1
- package/dist/components-ui-dialog-dialog.cjs.map +1 -1
- package/dist/components-ui-dialog-dialog.js +4 -5
- package/dist/components-ui-dialog-dialog.js.map +1 -1
- package/dist/components-ui-drawer-drawer.cjs +2 -2
- package/dist/components-ui-drawer-drawer.cjs.map +1 -1
- package/dist/components-ui-drawer-drawer.js +16 -19
- package/dist/components-ui-drawer-drawer.js.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +2 -2
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.js +45 -46
- package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -1
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +54 -61733
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-input-group-input-group.cjs +1 -1
- package/dist/components-ui-input-group-input-group.cjs.map +1 -1
- package/dist/components-ui-input-group-input-group.js +12 -13
- package/dist/components-ui-input-group-input-group.js.map +1 -1
- package/dist/components-ui-input-input.cjs +1 -1
- package/dist/components-ui-input-input.cjs.map +1 -1
- package/dist/components-ui-input-input.js +2 -3
- package/dist/components-ui-input-input.js.map +1 -1
- package/dist/components-ui-label-label.cjs +1 -1
- package/dist/components-ui-label-label.cjs.map +1 -1
- package/dist/components-ui-label-label.js +1 -1
- package/dist/components-ui-label-label.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +1 -1
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +0 -1
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-popover-popover.cjs +1 -1
- package/dist/components-ui-popover-popover.cjs.map +1 -1
- package/dist/components-ui-popover-popover.js +14 -19
- package/dist/components-ui-popover-popover.js.map +1 -1
- package/dist/components-ui-progress-progress.cjs +1 -1
- package/dist/components-ui-progress-progress.cjs.map +1 -1
- package/dist/components-ui-progress-progress.js +1 -1
- package/dist/components-ui-progress-progress.js.map +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs.map +1 -1
- package/dist/components-ui-radio-group-radio-group.js +0 -1
- package/dist/components-ui-radio-group-radio-group.js.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +53 -47
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -1
- package/dist/components-ui-select-select.cjs +1 -1
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js +21 -22
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-separator-separator.cjs +1 -1
- package/dist/components-ui-separator-separator.cjs.map +1 -1
- package/dist/components-ui-separator-separator.js +11 -12
- package/dist/components-ui-separator-separator.js.map +1 -1
- package/dist/components-ui-switch-switch.cjs +1 -1
- package/dist/components-ui-switch-switch.cjs.map +1 -1
- package/dist/components-ui-switch-switch.js +6 -7
- package/dist/components-ui-switch-switch.js.map +1 -1
- package/dist/components-ui-table-table.cjs +1 -1
- package/dist/components-ui-table-table.cjs.map +1 -1
- package/dist/components-ui-table-table.js +0 -1
- package/dist/components-ui-table-table.js.map +1 -1
- package/dist/components-ui-tabs-tabs.cjs +2 -2
- package/dist/components-ui-tabs-tabs.cjs.map +1 -1
- package/dist/components-ui-tabs-tabs.js +16 -16
- package/dist/components-ui-tabs-tabs.js.map +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs.map +1 -1
- package/dist/components-ui-tooltip-tooltip.js +9 -10
- package/dist/components-ui-tooltip-tooltip.js.map +1 -1
- package/dist/components-ui-typography-typography.cjs +1 -1
- package/dist/components-ui-typography-typography.cjs.map +1 -1
- package/dist/components-ui-typography-typography.js +7 -7
- package/dist/components-ui-typography-typography.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/calendar-DReGV_22.cjs +0 -2
- package/dist/chart-C69jBlXa.cjs +0 -63
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-ui-radio-group-radio-group.js","sources":["../src/components/ui/radio-group/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport
|
|
1
|
+
{"version":3,"file":"components-ui-radio-group-radio-group.js","sources":["../src/components/ui/radio-group/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport type { ComponentPropsWithoutRef, ComponentRef, Ref } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n radioGroupIndicatorClassNames,\n radioGroupIndicatorDotClassNames,\n radioGroupItemClassNames,\n radioGroupRootClassNames,\n} from \"./radio-group.styles\";\n\ntype RadioGroupRef = ComponentRef<typeof RadioGroupPrimitive.Root>;\ntype RadioGroupProps = ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> & {\n ref?: Ref<RadioGroupRef>;\n};\n\ntype RadioGroupItemRef = ComponentRef<typeof RadioGroupPrimitive.Item>;\ntype RadioGroupItemProps = ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> & {\n ref?: Ref<RadioGroupItemRef>;\n};\n\nconst RadioGroup = ({ className, ref, ...props }: RadioGroupProps) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(radioGroupRootClassNames, className)}\n {...props}\n ref={ref}\n />\n );\n};\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = ({ className, ref, ...props }: RadioGroupItemProps) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(radioGroupItemClassNames, className)}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className={cn(radioGroupIndicatorClassNames)}>\n <span className={cn(radioGroupIndicatorDotClassNames)} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n};\n\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","className","ref","props","jsx","RadioGroupPrimitive","cn","radioGroupRootClassNames","RadioGroupItem","radioGroupItemClassNames","radioGroupIndicatorClassNames","radioGroupIndicatorDotClassNames"],"mappings":";;;;AAqBA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,KAAAC,GAAK,GAAGC,QAErC,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,WAAWC,EAAGC,GAA0BN,CAAS;AAAA,IAChD,GAAGE;AAAA,IACJ,KAAAD;AAAA,EAAA;AAAA;AAINF,EAAW,cAAcK,EAAoB,KAAK;AAElD,MAAMG,IAAiB,CAAC,EAAE,WAAAP,GAAW,KAAAC,GAAK,GAAGC,QAEzC,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAH;AAAA,IACA,WAAWI,EAAGG,GAA0BR,CAAS;AAAA,IAChD,GAAGE;AAAA,IAEJ,UAAA,gBAAAC,EAACC,EAAoB,WAApB,EAA8B,WAAWC,EAAGI,CAA6B,GACxE,UAAA,gBAAAN,EAAC,QAAA,EAAK,WAAWE,EAAGK,CAAgC,GAAG,EAAA,CACzD;AAAA,EAAA;AAAA;AAKNH,EAAe,cAAcH,EAAoB,KAAK;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),_=require("./lib-utils.cjs"),I=require("./hooks-usePopupControls.cjs"),O=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");const b=require("./calendar-B5QCV34E.cjs"),i=require("./components-ui-icon-icon.cjs"),u=require("./components-ui-popover-popover.cjs"),l=require("./components-ui-select-select.styles.cjs");function T(e){if(!e?.from)return"";const n=e.from.toLocaleDateString("ru-RU");return e.to?`${n} – ${e.to.toLocaleDateString("ru-RU")}`:n}function w(e){const n=e.mode==="range",d=e.placeholder??(n?"Выберите период":"Выберите дату"),{size:v="default",disabled:x=!1,className:h,iconPosition:m="left",iconType:p="calendar-dots",collisionPadding:P=12,calendarProps:g,popoverContentProps:j}=e,f=e.closeOnSelect??!n,{isOpened:C,openPopup:N,closePopup:s}=I.usePopupControls(),S=n&&!!e.value?.from&&!!e.value.to,c=e,a=e,y=(()=>{if(n){const{value:r,triggerLabelFormatter:R=T}=a;return r?.from?R(r):d}const{value:t,triggerLabelFormatter:L=r=>r.toLocaleDateString("ru-RU")}=c;return t?L(t):d})(),q=n?o.jsx(b.Calendar,{mode:"range",selected:a.value,onSelect:t=>{a.onValueChange?.(t),f&&t?.from&&t.to&&s()},appendFooter:o.jsx(O.Button,{type:"button",className:"mx-auto mt-2 w-full max-w-[12.5rem] shrink-0 basis-full",size:"sm",variant:"outlined",disabled:!S,onClick:s,children:a.rangeApplyLabel??"Готово"}),...g}):o.jsx(b.Calendar,{mode:"single",selected:c.value,onSelect:t=>{c.onValueChange?.(t),f&&t&&s()},...g});return o.jsxs(u.Popover,{open:C,onOpenChange:t=>{if(t){N();return}s()},children:[o.jsx(u.PopoverTrigger,{asChild:!0,children:o.jsxs("button",{type:"button","data-size":v,disabled:x,className:_.cn(l.selectTriggerClassName,h),children:[m==="left"&&o.jsx(i.Icon,{className:l.selectIconClassName,type:p}),o.jsx("span",{"data-slot":"select-value",className:"line-clamp-1 flex-1 text-left",children:y}),m==="right"&&o.jsx(i.Icon,{className:l.selectIconClassName,type:p}),o.jsx(i.Icon,{className:_.cn(l.selectIconClassName,"transition-transform duration-200 ease-out",C&&"rotate-180"),type:"caret-down"})]})}),o.jsx(u.PopoverContent,{className:"w-auto p-0 duration-200 ease-out",align:"start",side:"bottom",sideOffset:10,collisionPadding:P,avoidCollisions:!0,...j,children:q})]})}exports.SelectCalendarMenu=w;
|
|
2
2
|
//# sourceMappingURL=components-ui-select-calendar-menu-select-calendar-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-ui-select-calendar-menu-select-calendar-menu.cjs","sources":["../src/components/ui/select-calendar-menu/select-calendar-menu.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-ui-select-calendar-menu-select-calendar-menu.cjs","sources":["../src/components/ui/select-calendar-menu/select-calendar-menu.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type { DateRange } from \"react-day-picker\";\n\nimport { cn } from \"@/lib/utils\";\nimport { usePopupControls } from \"@/hooks/usePopupControls\";\nimport { Button } from \"../button\";\nimport { Calendar } from \"../calendar\";\nimport { Icon } from \"../icon\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\nimport { selectIconClassName, selectTriggerClassName } from \"../select/select.styles\";\n\ntype SelectCalendarMenuBaseProps = {\n placeholder?: string;\n size?: \"sm\" | \"default\";\n disabled?: boolean;\n className?: string;\n iconPosition?: \"left\" | \"right\";\n iconType?: ComponentProps<typeof Icon>[\"type\"];\n closeOnSelect?: boolean;\n collisionPadding?: number;\n calendarProps?: Omit<\n ComponentProps<typeof Calendar>,\n \"mode\" | \"selected\" | \"onSelect\" | \"appendFooter\"\n >;\n popoverContentProps?: Omit<ComponentProps<typeof PopoverContent>, \"children\">;\n};\n\ntype SelectCalendarMenuSingleProps = SelectCalendarMenuBaseProps & {\n mode?: \"single\";\n value?: Date;\n onValueChange?: (date: Date | undefined) => void;\n triggerLabelFormatter?: (date: Date) => string;\n};\n\ntype SelectCalendarMenuRangeProps = SelectCalendarMenuBaseProps & {\n mode: \"range\";\n value?: DateRange;\n onValueChange?: (range: DateRange | undefined) => void;\n triggerLabelFormatter?: (range: DateRange | undefined) => string;\n rangeApplyLabel?: string;\n};\n\nexport type SelectCalendarMenuProps =\n | SelectCalendarMenuSingleProps\n | SelectCalendarMenuRangeProps;\n\nfunction defaultRangeTriggerLabel(range: DateRange | undefined): string {\n if (!range?.from) return \"\";\n const from = range.from.toLocaleDateString(\"ru-RU\");\n if (!range.to) return from;\n return `${from} – ${range.to.toLocaleDateString(\"ru-RU\")}`;\n}\n\nfunction SelectCalendarMenu(props: SelectCalendarMenuProps) {\n const isRange = props.mode === \"range\";\n const placeholder =\n props.placeholder ?? (isRange ? \"Выберите период\" : \"Выберите дату\");\n const {\n size = \"default\",\n disabled = false,\n className,\n iconPosition = \"left\",\n iconType = \"calendar-dots\",\n collisionPadding = 12,\n calendarProps,\n popoverContentProps,\n } = props;\n\n const closeOnSelect = props.closeOnSelect ?? !isRange;\n\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const isRangeComplete = isRange && !!props.value?.from && !!props.value.to;\n const singleProps = props as SelectCalendarMenuSingleProps;\n const rangeProps = props as SelectCalendarMenuRangeProps;\n\n const triggerText = (() => {\n if (isRange) {\n const { value, triggerLabelFormatter = defaultRangeTriggerLabel } = rangeProps;\n return value?.from ? triggerLabelFormatter(value) : placeholder;\n }\n const {\n value,\n triggerLabelFormatter = (date: Date) => date.toLocaleDateString(\"ru-RU\"),\n } = singleProps;\n return value ? triggerLabelFormatter(value) : placeholder;\n })();\n\n const calendarNode = isRange ? (\n <Calendar\n mode=\"range\"\n selected={rangeProps.value}\n onSelect={(range) => {\n rangeProps.onValueChange?.(range);\n if (closeOnSelect && range?.from && range.to) {\n closePopup();\n }\n }}\n appendFooter={\n <Button\n type=\"button\"\n className=\"mx-auto mt-2 w-full max-w-[12.5rem] shrink-0 basis-full\"\n size=\"sm\"\n variant=\"outlined\"\n disabled={!isRangeComplete}\n onClick={closePopup}\n >\n {rangeProps.rangeApplyLabel ?? \"Готово\"}\n </Button>\n }\n {...calendarProps}\n />\n ) : (\n <Calendar\n mode=\"single\"\n selected={singleProps.value}\n onSelect={(date) => {\n singleProps.onValueChange?.(date);\n if (closeOnSelect && date) {\n closePopup();\n }\n }}\n {...calendarProps}\n />\n );\n\n return (\n <Popover\n open={isOpened}\n onOpenChange={(value) => {\n if (value) {\n openPopup();\n return;\n }\n\n closePopup();\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n data-size={size}\n disabled={disabled}\n className={cn(selectTriggerClassName, className)}\n >\n {iconPosition === \"left\" && (\n <Icon\n className={selectIconClassName}\n type={iconType}\n />\n )}\n <span\n data-slot=\"select-value\"\n className=\"line-clamp-1 flex-1 text-left\"\n >\n {triggerText}\n </span>\n {iconPosition === \"right\" && (\n <Icon\n className={selectIconClassName}\n type={iconType}\n />\n )}\n <Icon\n className={cn(\n selectIconClassName,\n \"transition-transform duration-200 ease-out\",\n isOpened && \"rotate-180\",\n )}\n type=\"caret-down\"\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-auto p-0 duration-200 ease-out\"\n align=\"start\"\n side=\"bottom\"\n sideOffset={10}\n collisionPadding={collisionPadding}\n avoidCollisions\n {...popoverContentProps}\n >\n {calendarNode}\n </PopoverContent>\n </Popover>\n );\n}\n\nexport { SelectCalendarMenu };\n"],"names":["defaultRangeTriggerLabel","range","from","SelectCalendarMenu","props","isRange","placeholder","size","disabled","className","iconPosition","iconType","collisionPadding","calendarProps","popoverContentProps","closeOnSelect","isOpened","openPopup","closePopup","usePopupControls","isRangeComplete","singleProps","rangeProps","triggerText","value","triggerLabelFormatter","date","calendarNode","jsx","Calendar","Button","jsxs","Popover","PopoverTrigger","cn","selectTriggerClassName","Icon","selectIconClassName","PopoverContent"],"mappings":"4dA8CA,SAASA,EAAyBC,EAAsC,CACtE,GAAI,CAACA,GAAO,KAAM,MAAO,GACzB,MAAMC,EAAOD,EAAM,KAAK,mBAAmB,OAAO,EAClD,OAAKA,EAAM,GACJ,GAAGC,CAAI,MAAMD,EAAM,GAAG,mBAAmB,OAAO,CAAC,GADlCC,CAExB,CAEA,SAASC,EAAmBC,EAAgC,CAC1D,MAAMC,EAAUD,EAAM,OAAS,QACzBE,EACJF,EAAM,cAAgBC,EAAU,kBAAoB,iBAChD,CACJ,KAAAE,EAAO,UACP,SAAAC,EAAW,GACX,UAAAC,EACA,aAAAC,EAAe,OACf,SAAAC,EAAW,gBACX,iBAAAC,EAAmB,GACnB,cAAAC,EACA,oBAAAC,CAAA,EACEV,EAEEW,EAAgBX,EAAM,eAAiB,CAACC,EAExC,CAAE,SAAAW,EAAU,UAAAC,EAAW,WAAAC,CAAA,EAAeC,EAAAA,iBAAA,EACtCC,EAAkBf,GAAW,CAAC,CAACD,EAAM,OAAO,MAAQ,CAAC,CAACA,EAAM,MAAM,GAClEiB,EAAcjB,EACdkB,EAAalB,EAEbmB,GAAe,IAAM,CACzB,GAAIlB,EAAS,CACX,KAAM,CAAE,MAAAmB,EAAO,sBAAAC,EAAwBzB,GAA6BsB,EACpE,OAAOE,GAAO,KAAOC,EAAsBD,CAAK,EAAIlB,CACtD,CACA,KAAM,CACJ,MAAAkB,EACA,sBAAAC,EAAyBC,GAAeA,EAAK,mBAAmB,OAAO,CAAA,EACrEL,EACJ,OAAOG,EAAQC,EAAsBD,CAAK,EAAI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,KAAK,YAAA,CAAA,CACP,CAAA,CAAA,EAEJ,EACAY,EAAAA,IAACU,EAAAA,eAAA,CACC,UAAU,mCACV,MAAM,QACN,KAAK,SACL,WAAY,GACZ,iBAAA1B,EACA,gBAAe,GACd,GAAGE,EAEH,SAAAa,CAAA,CAAA,CACH,CAAA,CAAA,CAGN"}
|
|
@@ -1,83 +1,89 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Button as
|
|
1
|
+
import { jsx as o, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { cn as h } from "./lib-utils.js";
|
|
3
|
+
import { usePopupControls as F } from "./hooks-usePopupControls.js";
|
|
4
|
+
import { Button as z } from "./components-ui-button-button.js";
|
|
5
5
|
import "./components-ui-button-button.styles.js";
|
|
6
|
-
import { C } from "./calendar-
|
|
6
|
+
import { C as v } from "./calendar-Ba3kHG6w.js";
|
|
7
7
|
import { Icon as i } from "./components-ui-icon-icon.js";
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { selectIconClassName as c, selectTriggerClassName as
|
|
10
|
-
function
|
|
8
|
+
import { Popover as D, PopoverTrigger as U, PopoverContent as j } from "./components-ui-popover-popover.js";
|
|
9
|
+
import { selectIconClassName as c, selectTriggerClassName as k } from "./components-ui-select-select.styles.js";
|
|
10
|
+
function I(e) {
|
|
11
11
|
if (!e?.from) return "";
|
|
12
|
-
const
|
|
13
|
-
return e.to ? `${
|
|
12
|
+
const r = e.from.toLocaleDateString("ru-RU");
|
|
13
|
+
return e.to ? `${r} – ${e.to.toLocaleDateString("ru-RU")}` : r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
15
|
+
function J(e) {
|
|
16
|
+
const r = e.mode === "range", m = e.placeholder ?? (r ? "Выберите период" : "Выберите дату"), {
|
|
17
17
|
size: b = "default",
|
|
18
|
-
disabled:
|
|
19
|
-
className:
|
|
18
|
+
disabled: P = !1,
|
|
19
|
+
className: N,
|
|
20
20
|
iconPosition: u = "left",
|
|
21
21
|
iconType: d = "calendar-dots",
|
|
22
|
-
collisionPadding:
|
|
22
|
+
collisionPadding: x = 12,
|
|
23
23
|
calendarProps: f,
|
|
24
|
-
popoverContentProps:
|
|
25
|
-
} = e,
|
|
26
|
-
if (
|
|
27
|
-
const { value:
|
|
28
|
-
return
|
|
24
|
+
popoverContentProps: L
|
|
25
|
+
} = e, p = e.closeOnSelect ?? !r, { isOpened: g, openPopup: S, closePopup: a } = F(), y = r && !!e.value?.from && !!e.value.to, s = e, n = e, R = (() => {
|
|
26
|
+
if (r) {
|
|
27
|
+
const { value: l, triggerLabelFormatter: w = I } = n;
|
|
28
|
+
return l?.from ? w(l) : m;
|
|
29
29
|
}
|
|
30
30
|
const {
|
|
31
31
|
value: t,
|
|
32
|
-
triggerLabelFormatter:
|
|
32
|
+
triggerLabelFormatter: T = (l) => l.toLocaleDateString("ru-RU")
|
|
33
33
|
} = s;
|
|
34
|
-
return t ?
|
|
35
|
-
})(),
|
|
36
|
-
|
|
34
|
+
return t ? T(t) : m;
|
|
35
|
+
})(), O = r ? /* @__PURE__ */ o(
|
|
36
|
+
v,
|
|
37
37
|
{
|
|
38
38
|
mode: "range",
|
|
39
|
-
selected:
|
|
39
|
+
selected: n.value,
|
|
40
40
|
onSelect: (t) => {
|
|
41
|
-
|
|
41
|
+
n.onValueChange?.(t), p && t?.from && t.to && a();
|
|
42
42
|
},
|
|
43
43
|
appendFooter: /* @__PURE__ */ o(
|
|
44
|
-
|
|
44
|
+
z,
|
|
45
45
|
{
|
|
46
46
|
type: "button",
|
|
47
47
|
className: "mx-auto mt-2 w-full max-w-[12.5rem] shrink-0 basis-full",
|
|
48
48
|
size: "sm",
|
|
49
49
|
variant: "outlined",
|
|
50
|
-
disabled: !
|
|
51
|
-
onClick:
|
|
52
|
-
children:
|
|
50
|
+
disabled: !y,
|
|
51
|
+
onClick: a,
|
|
52
|
+
children: n.rangeApplyLabel ?? "Готово"
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
55
|
...f
|
|
56
56
|
}
|
|
57
57
|
) : /* @__PURE__ */ o(
|
|
58
|
-
|
|
58
|
+
v,
|
|
59
59
|
{
|
|
60
60
|
mode: "single",
|
|
61
61
|
selected: s.value,
|
|
62
62
|
onSelect: (t) => {
|
|
63
|
-
s.onValueChange?.(t),
|
|
63
|
+
s.onValueChange?.(t), p && t && a();
|
|
64
64
|
},
|
|
65
65
|
...f
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
68
|
+
return /* @__PURE__ */ C(
|
|
69
|
+
D,
|
|
70
70
|
{
|
|
71
|
-
open:
|
|
72
|
-
onOpenChange:
|
|
71
|
+
open: g,
|
|
72
|
+
onOpenChange: (t) => {
|
|
73
|
+
if (t) {
|
|
74
|
+
S();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
a();
|
|
78
|
+
},
|
|
73
79
|
children: [
|
|
74
|
-
/* @__PURE__ */ o(
|
|
80
|
+
/* @__PURE__ */ o(U, { asChild: !0, children: /* @__PURE__ */ C(
|
|
75
81
|
"button",
|
|
76
82
|
{
|
|
77
83
|
type: "button",
|
|
78
84
|
"data-size": b,
|
|
79
|
-
disabled:
|
|
80
|
-
className:
|
|
85
|
+
disabled: P,
|
|
86
|
+
className: h(k, N),
|
|
81
87
|
children: [
|
|
82
88
|
u === "left" && /* @__PURE__ */ o(
|
|
83
89
|
i,
|
|
@@ -91,7 +97,7 @@ function G(e) {
|
|
|
91
97
|
{
|
|
92
98
|
"data-slot": "select-value",
|
|
93
99
|
className: "line-clamp-1 flex-1 text-left",
|
|
94
|
-
children:
|
|
100
|
+
children: R
|
|
95
101
|
}
|
|
96
102
|
),
|
|
97
103
|
u === "right" && /* @__PURE__ */ o(
|
|
@@ -104,10 +110,10 @@ function G(e) {
|
|
|
104
110
|
/* @__PURE__ */ o(
|
|
105
111
|
i,
|
|
106
112
|
{
|
|
107
|
-
className:
|
|
113
|
+
className: h(
|
|
108
114
|
c,
|
|
109
115
|
"transition-transform duration-200 ease-out",
|
|
110
|
-
|
|
116
|
+
g && "rotate-180"
|
|
111
117
|
),
|
|
112
118
|
type: "caret-down"
|
|
113
119
|
}
|
|
@@ -116,16 +122,16 @@ function G(e) {
|
|
|
116
122
|
}
|
|
117
123
|
) }),
|
|
118
124
|
/* @__PURE__ */ o(
|
|
119
|
-
|
|
125
|
+
j,
|
|
120
126
|
{
|
|
121
127
|
className: "w-auto p-0 duration-200 ease-out",
|
|
122
128
|
align: "start",
|
|
123
129
|
side: "bottom",
|
|
124
130
|
sideOffset: 10,
|
|
125
|
-
collisionPadding:
|
|
131
|
+
collisionPadding: x,
|
|
126
132
|
avoidCollisions: !0,
|
|
127
|
-
...
|
|
128
|
-
children:
|
|
133
|
+
...L,
|
|
134
|
+
children: O
|
|
129
135
|
}
|
|
130
136
|
)
|
|
131
137
|
]
|
|
@@ -133,6 +139,6 @@ function G(e) {
|
|
|
133
139
|
);
|
|
134
140
|
}
|
|
135
141
|
export {
|
|
136
|
-
|
|
142
|
+
J as SelectCalendarMenu
|
|
137
143
|
};
|
|
138
144
|
//# sourceMappingURL=components-ui-select-calendar-menu-select-calendar-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-ui-select-calendar-menu-select-calendar-menu.js","sources":["../src/components/ui/select-calendar-menu/select-calendar-menu.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-ui-select-calendar-menu-select-calendar-menu.js","sources":["../src/components/ui/select-calendar-menu/select-calendar-menu.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type { DateRange } from \"react-day-picker\";\n\nimport { cn } from \"@/lib/utils\";\nimport { usePopupControls } from \"@/hooks/usePopupControls\";\nimport { Button } from \"../button\";\nimport { Calendar } from \"../calendar\";\nimport { Icon } from \"../icon\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\nimport { selectIconClassName, selectTriggerClassName } from \"../select/select.styles\";\n\ntype SelectCalendarMenuBaseProps = {\n placeholder?: string;\n size?: \"sm\" | \"default\";\n disabled?: boolean;\n className?: string;\n iconPosition?: \"left\" | \"right\";\n iconType?: ComponentProps<typeof Icon>[\"type\"];\n closeOnSelect?: boolean;\n collisionPadding?: number;\n calendarProps?: Omit<\n ComponentProps<typeof Calendar>,\n \"mode\" | \"selected\" | \"onSelect\" | \"appendFooter\"\n >;\n popoverContentProps?: Omit<ComponentProps<typeof PopoverContent>, \"children\">;\n};\n\ntype SelectCalendarMenuSingleProps = SelectCalendarMenuBaseProps & {\n mode?: \"single\";\n value?: Date;\n onValueChange?: (date: Date | undefined) => void;\n triggerLabelFormatter?: (date: Date) => string;\n};\n\ntype SelectCalendarMenuRangeProps = SelectCalendarMenuBaseProps & {\n mode: \"range\";\n value?: DateRange;\n onValueChange?: (range: DateRange | undefined) => void;\n triggerLabelFormatter?: (range: DateRange | undefined) => string;\n rangeApplyLabel?: string;\n};\n\nexport type SelectCalendarMenuProps =\n | SelectCalendarMenuSingleProps\n | SelectCalendarMenuRangeProps;\n\nfunction defaultRangeTriggerLabel(range: DateRange | undefined): string {\n if (!range?.from) return \"\";\n const from = range.from.toLocaleDateString(\"ru-RU\");\n if (!range.to) return from;\n return `${from} – ${range.to.toLocaleDateString(\"ru-RU\")}`;\n}\n\nfunction SelectCalendarMenu(props: SelectCalendarMenuProps) {\n const isRange = props.mode === \"range\";\n const placeholder =\n props.placeholder ?? (isRange ? \"Выберите период\" : \"Выберите дату\");\n const {\n size = \"default\",\n disabled = false,\n className,\n iconPosition = \"left\",\n iconType = \"calendar-dots\",\n collisionPadding = 12,\n calendarProps,\n popoverContentProps,\n } = props;\n\n const closeOnSelect = props.closeOnSelect ?? !isRange;\n\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const isRangeComplete = isRange && !!props.value?.from && !!props.value.to;\n const singleProps = props as SelectCalendarMenuSingleProps;\n const rangeProps = props as SelectCalendarMenuRangeProps;\n\n const triggerText = (() => {\n if (isRange) {\n const { value, triggerLabelFormatter = defaultRangeTriggerLabel } = rangeProps;\n return value?.from ? triggerLabelFormatter(value) : placeholder;\n }\n const {\n value,\n triggerLabelFormatter = (date: Date) => date.toLocaleDateString(\"ru-RU\"),\n } = singleProps;\n return value ? triggerLabelFormatter(value) : placeholder;\n })();\n\n const calendarNode = isRange ? (\n <Calendar\n mode=\"range\"\n selected={rangeProps.value}\n onSelect={(range) => {\n rangeProps.onValueChange?.(range);\n if (closeOnSelect && range?.from && range.to) {\n closePopup();\n }\n }}\n appendFooter={\n <Button\n type=\"button\"\n className=\"mx-auto mt-2 w-full max-w-[12.5rem] shrink-0 basis-full\"\n size=\"sm\"\n variant=\"outlined\"\n disabled={!isRangeComplete}\n onClick={closePopup}\n >\n {rangeProps.rangeApplyLabel ?? \"Готово\"}\n </Button>\n }\n {...calendarProps}\n />\n ) : (\n <Calendar\n mode=\"single\"\n selected={singleProps.value}\n onSelect={(date) => {\n singleProps.onValueChange?.(date);\n if (closeOnSelect && date) {\n closePopup();\n }\n }}\n {...calendarProps}\n />\n );\n\n return (\n <Popover\n open={isOpened}\n onOpenChange={(value) => {\n if (value) {\n openPopup();\n return;\n }\n\n closePopup();\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n data-size={size}\n disabled={disabled}\n className={cn(selectTriggerClassName, className)}\n >\n {iconPosition === \"left\" && (\n <Icon\n className={selectIconClassName}\n type={iconType}\n />\n )}\n <span\n data-slot=\"select-value\"\n className=\"line-clamp-1 flex-1 text-left\"\n >\n {triggerText}\n </span>\n {iconPosition === \"right\" && (\n <Icon\n className={selectIconClassName}\n type={iconType}\n />\n )}\n <Icon\n className={cn(\n selectIconClassName,\n \"transition-transform duration-200 ease-out\",\n isOpened && \"rotate-180\",\n )}\n type=\"caret-down\"\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-auto p-0 duration-200 ease-out\"\n align=\"start\"\n side=\"bottom\"\n sideOffset={10}\n collisionPadding={collisionPadding}\n avoidCollisions\n {...popoverContentProps}\n >\n {calendarNode}\n </PopoverContent>\n </Popover>\n );\n}\n\nexport { SelectCalendarMenu };\n"],"names":["defaultRangeTriggerLabel","range","from","SelectCalendarMenu","props","isRange","placeholder","size","disabled","className","iconPosition","iconType","collisionPadding","calendarProps","popoverContentProps","closeOnSelect","isOpened","openPopup","closePopup","usePopupControls","isRangeComplete","singleProps","rangeProps","triggerText","value","triggerLabelFormatter","date","calendarNode","jsx","Calendar","Button","jsxs","Popover","PopoverTrigger","cn","selectTriggerClassName","Icon","selectIconClassName","PopoverContent"],"mappings":";;;;;;;;;AA8CA,SAASA,EAAyBC,GAAsC;AACtE,MAAI,CAACA,GAAO,KAAM,QAAO;AACzB,QAAMC,IAAOD,EAAM,KAAK,mBAAmB,OAAO;AAClD,SAAKA,EAAM,KACJ,GAAGC,CAAI,MAAMD,EAAM,GAAG,mBAAmB,OAAO,CAAC,KADlCC;AAExB;AAEA,SAASC,EAAmBC,GAAgC;AAC1D,QAAMC,IAAUD,EAAM,SAAS,SACzBE,IACJF,EAAM,gBAAgBC,IAAU,oBAAoB,kBAChD;AAAA,IACJ,MAAAE,IAAO;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,WAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,kBAAAC,IAAmB;AAAA,IACnB,eAAAC;AAAA,IACA,qBAAAC;AAAA,EAAA,IACEV,GAEEW,IAAgBX,EAAM,iBAAiB,CAACC,GAExC,EAAE,UAAAW,GAAU,WAAAC,GAAW,YAAAC,EAAA,IAAeC,EAAA,GACtCC,IAAkBf,KAAW,CAAC,CAACD,EAAM,OAAO,QAAQ,CAAC,CAACA,EAAM,MAAM,IAClEiB,IAAcjB,GACdkB,IAAalB,GAEbmB,KAAe,MAAM;AACzB,QAAIlB,GAAS;AACX,YAAM,EAAE,OAAAmB,GAAO,uBAAAC,IAAwBzB,MAA6BsB;AACpE,aAAOE,G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AA,YACL,aAAWxB;AAAA,YACX,UAAAC;AAAA,YACA,WAAW0B,EAAGC,GAAwB1B,CAAS;AAAA,YAE9C,UAAA;AAAA,cAAAC,MAAiB,UAChB,gBAAAkB;AAAA,gBAACQ;AAAA,gBAAA;AAAA,kBACC,WAAWC;AAAA,kBACX,MAAM1B;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGV,gBAAAiB;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,aAAU;AAAA,kBACV,WAAU;AAAA,kBAET,UAAAL;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEFb,MAAiB,WAChB,gBAAAkB;AAAA,gBAACQ;AAAA,gBAAA;AAAA,kBACC,WAAWC;AAAA,kBACX,MAAM1B;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGV,gBAAAiB;AAAA,gBAACQ;AAAA,gBAAA;AAAA,kBACC,WAAWF;AAAA,oBACTG;AAAA,oBACA;AAAA,oBACArB,KAAY;AAAA,kBAAA;AAAA,kBAEd,MAAK;AAAA,gBAAA;AAAA,cAAA;AAAA,YACP;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAY;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAM;AAAA,YACN,MAAK;AAAA,YACL,YAAY;AAAA,YACZ,kBAAA1B;AAAA,YACA,iBAAe;AAAA,YACd,GAAGE;AAAA,YAEH,UAAAa;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("@radix-ui/react-accessible-icon");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-aspect-ratio");require("@radix-ui/react-avatar");require("@radix-ui/react-checkbox");require("@radix-ui/react-collapsible");require("@radix-ui/react-context-menu");require("@radix-ui/react-dialog");require("@radix-ui/react-direction");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-form");require("@radix-ui/react-hover-card");require("@radix-ui/react-label");require("@radix-ui/react-menubar");require("@radix-ui/react-navigation-menu");require("@radix-ui/react-one-time-password-field");require("@radix-ui/react-password-toggle-field");require("@radix-ui/react-popover");require("@radix-ui/react-portal");require("@radix-ui/react-progress");require("@radix-ui/react-radio-group");require("@radix-ui/react-scroll-area");const q=require("@radix-ui/react-select");require("@radix-ui/react-separator");require("@radix-ui/react-slider");require("@radix-ui/react-slot");require("@radix-ui/react-switch");require("@radix-ui/react-tabs");require("@radix-ui/react-toast");require("@radix-ui/react-toggle");require("@radix-ui/react-toggle-group");require("@radix-ui/react-toolbar");require("@radix-ui/react-tooltip");require("@radix-ui/react-visually-hidden");const a=require("./lib-utils.cjs"),S=require("./components-ui-icon-icon.cjs"),s=require("./components-ui-select-select.styles.cjs");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const n=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,n.get?n:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const l=d(q);function p({...e}){return r.jsx(l.Root,{"data-slot":"select",...e})}function j({className:e,...t}){return r.jsx(l.Group,{"data-slot":"select-group",className:a.cn(s.selectGroupClassName,e),...t})}function N({...e}){return r.jsx(l.Value,{"data-slot":"select-value",...e})}function g({className:e,size:t="default",children:c,...n}){return r.jsxs(l.Trigger,{"data-slot":"select-trigger","data-size":t,className:a.cn(s.selectTriggerClassName,e),...n,children:[c,r.jsx(l.Icon,{asChild:!0,children:r.jsx(S.Icon,{className:s.selectIconClassName,type:"caret-down"})})]})}function f({className:e,children:t,position:c="popper",align:n="center",sideOffset:i=10,...m}){return r.jsx(l.Portal,{children:r.jsxs(l.Content,{"data-slot":"select-content","data-align-trigger":c==="item-aligned",className:a.cn(s.selectContentClassName,c==="popper"&&"",e),position:c,align:n,sideOffset:i,...m,children:[r.jsx(u,{}),r.jsx(l.Viewport,{"data-position":c,className:a.cn(s.selectViewportClassName,c==="popper"&&""),children:t}),r.jsx(o,{})]})})}function x({className:e,...t}){return r.jsx(l.Label,{"data-slot":"select-label",className:a.cn(s.selectLabelClassName,e),...t})}function b({className:e,children:t,...c}){return r.jsxs(l.Item,{"data-slot":"select-item",className:a.cn(s.selectItemClassName,e),...c,children:[r.jsx("span",{className:s.selectItemIndicatorClassName,children:r.jsx(l.ItemIndicator,{})}),r.jsx(l.ItemText,{children:t})]})}function C({className:e,...t}){return r.jsx(l.Separator,{"data-slot":"select-separator",className:a.cn(s.selectSeparatorClassName,e),...t})}function u({className:e,...t}){return r.jsx(l.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:a.cn(s.selectScrollButtonClassName,e),...t})}function o({className:e,...t}){return r.jsx(l.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:a.cn(s.selectScrollButtonClassName,e),...t})}exports.Select=p;exports.SelectContent=f;exports.SelectGroup=j;exports.SelectItem=b;exports.SelectLabel=x;exports.SelectScrollDownButton=o;exports.SelectScrollUpButton=u;exports.SelectSeparator=C;exports.SelectTrigger=g;exports.SelectValue=N;
|
|
2
2
|
//# sourceMappingURL=components-ui-select-select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-ui-select-select.cjs","sources":["../src/components/ui/select/select.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-ui-select-select.cjs","sources":["../src/components/ui/select/select.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Icon } from \"../icon\";\nimport {\n selectContentClassName,\n selectGroupClassName,\n selectIconClassName,\n selectItemClassName,\n selectItemIndicatorClassName,\n selectLabelClassName,\n selectScrollButtonClassName,\n selectSeparatorClassName,\n selectTriggerClassName,\n selectViewportClassName,\n} from \"./select.styles\";\n\ntype SelectProps = ComponentProps<typeof SelectPrimitive.Root>;\ntype SelectGroupProps = ComponentProps<typeof SelectPrimitive.Group>;\ntype SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;\ntype SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\";\n};\ntype SelectContentProps = ComponentProps<typeof SelectPrimitive.Content>;\ntype SelectLabelProps = ComponentProps<typeof SelectPrimitive.Label>;\ntype SelectItemProps = ComponentProps<typeof SelectPrimitive.Item>;\ntype SelectSeparatorProps = ComponentProps<typeof SelectPrimitive.Separator>;\ntype SelectScrollUpButtonProps = ComponentProps<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollDownButtonProps = ComponentProps<\n typeof SelectPrimitive.ScrollDownButton\n>;\n\nfunction Select({ ...props }: SelectProps) {\n return (\n <SelectPrimitive.Root\n data-slot=\"select\"\n {...props}\n />\n );\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(selectGroupClassName, className)}\n {...props}\n />\n );\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n {...props}\n />\n );\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(selectTriggerClassName, className)}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <Icon\n className={selectIconClassName}\n type=\"caret-down\"\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n align = \"center\",\n sideOffset = 10,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(selectContentClassName, position === \"popper\" && \"\", className)}\n position={position}\n align={align}\n sideOffset={sideOffset}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(selectViewportClassName, position === \"popper\" && \"\")}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(selectLabelClassName, className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(selectItemClassName, className)}\n {...props}\n >\n <span className={selectItemIndicatorClassName}>\n <SelectPrimitive.ItemIndicator>\n {/* <CheckIcon className=\"text-primary-text pointer-events-none size-4\" /> */}\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(selectSeparatorClassName, className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(selectScrollButtonClassName, className)}\n {...props}\n >\n {/* <ChevronUpIcon /> */}\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(selectScrollButtonClassName, className)}\n {...props}\n >\n {/* <ChevronDownIcon /> */}\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n type SelectContentProps,\n type SelectGroupProps,\n type SelectItemProps,\n type SelectLabelProps,\n type SelectProps,\n type SelectScrollDownButtonProps,\n type SelectScrollUpButtonProps,\n type SelectSeparatorProps,\n type SelectTriggerProps,\n type SelectValueProps,\n};\n"],"names":["Select","props","jsx","SelectPrimitive","SelectGroup","className","cn","selectGroupClassName","SelectValue","SelectTrigger","size","children","jsxs","selectTriggerClassName","Icon","selectIconClassName","SelectContent","position","align","sideOffset","selectContentClassName","SelectScrollUpButton","selectViewportClassName","SelectScrollDownButton","SelectLabel","selectLabelClassName","SelectItem","selectItemClassName","selectItemIndicatorClassName","SelectSeparator","selectSeparatorClassName","selectScrollButtonClassName"],"mappings":"uzDAiCA,SAASA,EAAO,CAAE,GAAGC,GAAsB,CACzC,OACEC,EAAAA,IAACC,EAAgB,KAAhB,CACC,YAAU,SACT,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASG,EAAY,CAAE,UAAAC,EAAW,GAAGJ,GAA2B,CAC9D,OACEC,EAAAA,IAACC,EAAgB,MAAhB,CACC,YAAU,eACV,UAAWG,EAAAA,GAAGC,EAAAA,qBAAsBF,CAAS,EAC5C,GAAGJ,CAAA,CAAA,CAGV,CAEA,SAASO,EAAY,CAAE,GAAGP,GAA2B,CACnD,OACEC,EAAAA,IAACC,EAAgB,MAAhB,CACC,YAAU,eACT,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAc,CACrB,UAAAJ,EACA,KAAAK,EAAO,UACP,SAAAC,EACA,GAAGV,CACL,EAAuB,CACrB,OACEW,EAAAA,KAACT,EAAgB,QAAhB,CACC,YAAU,iBACV,YAAWO,EACX,UAAWJ,EAAAA,GAAGO,EAAAA,uBAAwBR,CAAS,EAC9C,GAAGJ,EAEH,SAAA,CAAAU,EACDT,EAAAA,IAACC,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C,EAAgB,SAAhB,CAA0B,SAAAQ,CAAA,CAAS,CAAA,CAAA,CAAA,CAG1C,CAEA,SAASkB,EAAgB,CAAE,UAAAxB,EAAW,GAAGJ,GAA+B,CACtE,OACEC,EAAAA,IAACC,EAAgB,UAAhB,CACC,YAAU,mBACV,UAAWG,EAAAA,GAAGwB,EAAAA,yBAA0BzB,CAAS,EAChD,GAAGJ,CAAA,CAAA,CAGV,CAEA,SAASoB,EAAqB,CAAE,UAAAhB,EAAW,GAAGJ,GAAoC,CAChF,OACEC,EAAAA,IAACC,EAAgB,eAAhB,CACC,YAAU,0BACV,UAAWG,EAAAA,GAAGyB,EAAAA,4BAA6B1B,CAAS,EACnD,GAAGJ,CAAA,CAAA,CAKV,CAEA,SAASsB,EAAuB,CAAE,UAAAlB,EAAW,GAAGJ,GAAsC,CACpF,OACEC,EAAAA,IAACC,EAAgB,iBAAhB,CACC,YAAU,4BACV,UAAWG,EAAAA,GAAGyB,EAAAA,4BAA6B1B,CAAS,EACnD,GAAGJ,CAAA,CAAA,CAKV"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import "react";
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
2
|
import "@radix-ui/react-accessible-icon";
|
|
4
3
|
import "@radix-ui/react-accordion";
|
|
5
4
|
import "@radix-ui/react-alert-dialog";
|
|
@@ -37,7 +36,7 @@ import "@radix-ui/react-tooltip";
|
|
|
37
36
|
import "@radix-ui/react-visually-hidden";
|
|
38
37
|
import { cn as a } from "./lib-utils.js";
|
|
39
38
|
import { Icon as p } from "./components-ui-icon-icon.js";
|
|
40
|
-
import { selectItemIndicatorClassName as u, selectItemClassName as d, selectViewportClassName as N, selectContentClassName as S, selectGroupClassName as f, selectLabelClassName as C, selectScrollButtonClassName as
|
|
39
|
+
import { selectItemIndicatorClassName as u, selectItemClassName as d, selectViewportClassName as N, selectContentClassName as S, selectGroupClassName as f, selectLabelClassName as C, selectScrollButtonClassName as m, selectSeparatorClassName as g, selectIconClassName as I, selectTriggerClassName as h } from "./components-ui-select-select.styles.js";
|
|
41
40
|
function ct({ ...t }) {
|
|
42
41
|
return /* @__PURE__ */ e(
|
|
43
42
|
o.Root,
|
|
@@ -47,7 +46,7 @@ function ct({ ...t }) {
|
|
|
47
46
|
}
|
|
48
47
|
);
|
|
49
48
|
}
|
|
50
|
-
function
|
|
49
|
+
function mt({ className: t, ...r }) {
|
|
51
50
|
return /* @__PURE__ */ e(
|
|
52
51
|
o.Group,
|
|
53
52
|
{
|
|
@@ -57,7 +56,7 @@ function it({ className: t, ...r }) {
|
|
|
57
56
|
}
|
|
58
57
|
);
|
|
59
58
|
}
|
|
60
|
-
function
|
|
59
|
+
function it({ ...t }) {
|
|
61
60
|
return /* @__PURE__ */ e(
|
|
62
61
|
o.Value,
|
|
63
62
|
{
|
|
@@ -66,13 +65,13 @@ function nt({ ...t }) {
|
|
|
66
65
|
}
|
|
67
66
|
);
|
|
68
67
|
}
|
|
69
|
-
function
|
|
68
|
+
function nt({
|
|
70
69
|
className: t,
|
|
71
70
|
size: r = "default",
|
|
72
71
|
children: l,
|
|
73
72
|
...s
|
|
74
73
|
}) {
|
|
75
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ c(
|
|
76
75
|
o.Trigger,
|
|
77
76
|
{
|
|
78
77
|
"data-slot": "select-trigger",
|
|
@@ -92,7 +91,7 @@ function pt({
|
|
|
92
91
|
}
|
|
93
92
|
);
|
|
94
93
|
}
|
|
95
|
-
function
|
|
94
|
+
function pt({
|
|
96
95
|
className: t,
|
|
97
96
|
children: r,
|
|
98
97
|
position: l = "popper",
|
|
@@ -100,7 +99,7 @@ function ut({
|
|
|
100
99
|
sideOffset: i = 10,
|
|
101
100
|
...n
|
|
102
101
|
}) {
|
|
103
|
-
return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ c(
|
|
104
103
|
o.Content,
|
|
105
104
|
{
|
|
106
105
|
"data-slot": "select-content",
|
|
@@ -125,7 +124,7 @@ function ut({
|
|
|
125
124
|
}
|
|
126
125
|
) });
|
|
127
126
|
}
|
|
128
|
-
function
|
|
127
|
+
function ut({ className: t, ...r }) {
|
|
129
128
|
return /* @__PURE__ */ e(
|
|
130
129
|
o.Label,
|
|
131
130
|
{
|
|
@@ -135,8 +134,8 @@ function dt({ className: t, ...r }) {
|
|
|
135
134
|
}
|
|
136
135
|
);
|
|
137
136
|
}
|
|
138
|
-
function
|
|
139
|
-
return /* @__PURE__ */
|
|
137
|
+
function dt({ className: t, children: r, ...l }) {
|
|
138
|
+
return /* @__PURE__ */ c(
|
|
140
139
|
o.Item,
|
|
141
140
|
{
|
|
142
141
|
"data-slot": "select-item",
|
|
@@ -149,7 +148,7 @@ function Nt({ className: t, children: r, ...l }) {
|
|
|
149
148
|
}
|
|
150
149
|
);
|
|
151
150
|
}
|
|
152
|
-
function
|
|
151
|
+
function Nt({ className: t, ...r }) {
|
|
153
152
|
return /* @__PURE__ */ e(
|
|
154
153
|
o.Separator,
|
|
155
154
|
{
|
|
@@ -164,7 +163,7 @@ function b({ className: t, ...r }) {
|
|
|
164
163
|
o.ScrollUpButton,
|
|
165
164
|
{
|
|
166
165
|
"data-slot": "select-scroll-up-button",
|
|
167
|
-
className: a(
|
|
166
|
+
className: a(m, t),
|
|
168
167
|
...r
|
|
169
168
|
}
|
|
170
169
|
);
|
|
@@ -174,21 +173,21 @@ function w({ className: t, ...r }) {
|
|
|
174
173
|
o.ScrollDownButton,
|
|
175
174
|
{
|
|
176
175
|
"data-slot": "select-scroll-down-button",
|
|
177
|
-
className: a(
|
|
176
|
+
className: a(m, t),
|
|
178
177
|
...r
|
|
179
178
|
}
|
|
180
179
|
);
|
|
181
180
|
}
|
|
182
181
|
export {
|
|
183
182
|
ct as Select,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
pt as SelectContent,
|
|
184
|
+
mt as SelectGroup,
|
|
185
|
+
dt as SelectItem,
|
|
186
|
+
ut as SelectLabel,
|
|
188
187
|
w as SelectScrollDownButton,
|
|
189
188
|
b as SelectScrollUpButton,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
Nt as SelectSeparator,
|
|
190
|
+
nt as SelectTrigger,
|
|
191
|
+
it as SelectValue
|
|
193
192
|
};
|
|
194
193
|
//# sourceMappingURL=components-ui-select-select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-ui-select-select.js","sources":["../src/components/ui/select/select.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-ui-select-select.js","sources":["../src/components/ui/select/select.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Icon } from \"../icon\";\nimport {\n selectContentClassName,\n selectGroupClassName,\n selectIconClassName,\n selectItemClassName,\n selectItemIndicatorClassName,\n selectLabelClassName,\n selectScrollButtonClassName,\n selectSeparatorClassName,\n selectTriggerClassName,\n selectViewportClassName,\n} from \"./select.styles\";\n\ntype SelectProps = ComponentProps<typeof SelectPrimitive.Root>;\ntype SelectGroupProps = ComponentProps<typeof SelectPrimitive.Group>;\ntype SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;\ntype SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\";\n};\ntype SelectContentProps = ComponentProps<typeof SelectPrimitive.Content>;\ntype SelectLabelProps = ComponentProps<typeof SelectPrimitive.Label>;\ntype SelectItemProps = ComponentProps<typeof SelectPrimitive.Item>;\ntype SelectSeparatorProps = ComponentProps<typeof SelectPrimitive.Separator>;\ntype SelectScrollUpButtonProps = ComponentProps<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollDownButtonProps = ComponentProps<\n typeof SelectPrimitive.ScrollDownButton\n>;\n\nfunction Select({ ...props }: SelectProps) {\n return (\n <SelectPrimitive.Root\n data-slot=\"select\"\n {...props}\n />\n );\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(selectGroupClassName, className)}\n {...props}\n />\n );\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n {...props}\n />\n );\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(selectTriggerClassName, className)}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <Icon\n className={selectIconClassName}\n type=\"caret-down\"\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n align = \"center\",\n sideOffset = 10,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(selectContentClassName, position === \"popper\" && \"\", className)}\n position={position}\n align={align}\n sideOffset={sideOffset}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(selectViewportClassName, position === \"popper\" && \"\")}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(selectLabelClassName, className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(selectItemClassName, className)}\n {...props}\n >\n <span className={selectItemIndicatorClassName}>\n <SelectPrimitive.ItemIndicator>\n {/* <CheckIcon className=\"text-primary-text pointer-events-none size-4\" /> */}\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(selectSeparatorClassName, className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(selectScrollButtonClassName, className)}\n {...props}\n >\n {/* <ChevronUpIcon /> */}\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(selectScrollButtonClassName, className)}\n {...props}\n >\n {/* <ChevronDownIcon /> */}\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n type SelectContentProps,\n type SelectGroupProps,\n type SelectItemProps,\n type SelectLabelProps,\n type SelectProps,\n type SelectScrollDownButtonProps,\n type SelectScrollUpButtonProps,\n type SelectSeparatorProps,\n type SelectTriggerProps,\n type SelectValueProps,\n};\n"],"names":["Select","props","jsx","SelectPrimitive","SelectGroup","className","cn","selectGroupClassName","SelectValue","SelectTrigger","size","children","jsxs","selectTriggerClassName","Icon","selectIconClassName","SelectContent","position","align","sideOffset","selectContentClassName","SelectScrollUpButton","selectViewportClassName","SelectScrollDownButton","SelectLabel","selectLabelClassName","SelectItem","selectItemClassName","selectItemIndicatorClassName","SelectSeparator","selectSeparatorClassName","selectScrollButtonClass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A,SAASkB,GAAgB,EAAE,WAAAxB,GAAW,GAAGJ,KAA+B;AACtE,SACE,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWG,EAAGwB,GAA0BzB,CAAS;AAAA,MAChD,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASoB,EAAqB,EAAE,WAAAhB,GAAW,GAAGJ,KAAoC;AAChF,SACE,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWG,EAAGyB,GAA6B1B,CAAS;AAAA,MACnD,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAKV;AAEA,SAASsB,EAAuB,EAAE,WAAAlB,GAAW,GAAGJ,KAAsC;AACpF,SACE,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWG,EAAGyB,GAA6B1B,CAAS;AAAA,MACnD,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAKV;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("@radix-ui/react-separator")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("@radix-ui/react-separator"),s=require("./lib-utils.cjs");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const a=u(c),i=({className:e,orientation:t="horizontal",decorative:r=!0,ref:o,...n})=>l.jsx(a.Root,{ref:o,decorative:r,orientation:t,className:s.cn("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...n});i.displayName=a.Root.displayName;exports.Separator=i;
|
|
2
2
|
//# sourceMappingURL=components-ui-separator-separator.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-ui-separator-separator.cjs","sources":["../src/components/ui/separator/separator.tsx"],"sourcesContent":["import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport
|
|
1
|
+
{"version":3,"file":"components-ui-separator-separator.cjs","sources":["../src/components/ui/separator/separator.tsx"],"sourcesContent":["import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport type { ComponentPropsWithoutRef, ComponentRef, Ref } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype SeparatorRef = ComponentRef<typeof SeparatorPrimitive.Root>;\ntype SeparatorProps = ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> & {\n ref?: Ref<SeparatorRef>;\n};\n\nconst Separator = ({\n className,\n orientation = \"horizontal\",\n decorative = true,\n ref,\n ...props\n}: SeparatorProps) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"bg-delicate-border shrink-0\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className,\n )}\n {...props}\n />\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"names":["Separator","className","orientation","decorative","ref","props","jsx","SeparatorPrimitive","cn"],"mappings":"mdAUMA,EAAY,CAAC,CACjB,UAAAC,EACA,YAAAC,EAAc,aACd,WAAAC,EAAa,GACb,IAAAC,EACA,GAAGC,CACL,IACEC,EAAAA,IAACC,EAAmB,KAAnB,CACC,IAAAH,EACA,WAAAD,EACA,YAAAD,EACA,UAAWM,EAAAA,GACT,8BACAN,IAAgB,aAAe,cAAgB,cAC/CD,CAAA,EAED,GAAGI,CAAA,CACN,EAEFL,EAAU,YAAcO,EAAmB,KAAK"}
|