@trsys-tech/matrix-library 0.3.0 → 0.3.2
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/breadcrumb.es.js +18 -19
- package/dist/breadcrumb.es.js.map +1 -1
- package/dist/button.es.js +16 -16
- package/dist/button.es.js.map +1 -1
- package/dist/calendar.es.js +21 -23
- package/dist/calendar.es.js.map +1 -1
- package/dist/checkbox.es.js +9 -10
- package/dist/checkbox.es.js.map +1 -1
- package/dist/chip.es.js +4 -4
- package/dist/chip.es.js.map +1 -1
- package/dist/command.es.js +1 -1
- package/dist/command.es.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/command/Command.d.ts.map +1 -1
- package/dist/components/context-menu/ContextMenu.d.ts.map +1 -1
- package/dist/components/data-grid/DataGrid.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DesktopDatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DesktopDateRangePicker.d.ts +2 -0
- package/dist/components/date-picker/DesktopDateRangePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DesktopTimePicker.d.ts +1 -0
- package/dist/components/date-picker/DesktopTimePicker.d.ts.map +1 -1
- package/dist/components/date-picker/MobileDatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/MobileDateRangePicker.d.ts +2 -0
- package/dist/components/date-picker/MobileDateRangePicker.d.ts.map +1 -1
- package/dist/components/date-picker/MobileTimePicker.d.ts +1 -0
- package/dist/components/date-picker/MobileTimePicker.d.ts.map +1 -1
- package/dist/components/date-picker/TimePicker.d.ts.map +1 -1
- package/dist/components/date-picker/calendar.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +0 -1
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/form-combobox/FormCombobox.d.ts.map +1 -1
- package/dist/components/form-date-picker/FormDatePicker.d.ts +18 -0
- package/dist/components/form-date-picker/FormDatePicker.d.ts.map +1 -0
- package/dist/components/form-date-range-picker/FormDateRangePicker.d.ts +18 -0
- package/dist/components/form-date-range-picker/FormDateRangePicker.d.ts.map +1 -0
- package/dist/components/form-rating/FormRating.d.ts.map +1 -1
- package/dist/components/form-select/FormSelect.d.ts.map +1 -1
- package/dist/components/form-time-picker/FormTimePicker.d.ts +18 -0
- package/dist/components/form-time-picker/FormTimePicker.d.ts.map +1 -0
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/datagrid.es.js +66 -72
- package/dist/datagrid.es.js.map +1 -1
- package/dist/datepicker.es.js +8 -21
- package/dist/datepicker.es.js.map +1 -1
- package/dist/daterangepicker.es.js +7 -18
- package/dist/daterangepicker.es.js.map +1 -1
- package/dist/desktopdatepicker.es.js +35 -34
- package/dist/desktopdatepicker.es.js.map +1 -1
- package/dist/desktopdaterangepicker.es.js +40 -35
- package/dist/desktopdaterangepicker.es.js.map +1 -1
- package/dist/desktoptimepicker.es.js +23 -15
- package/dist/desktoptimepicker.es.js.map +1 -1
- package/dist/dialog.es.js +1 -1
- package/dist/dialog.es.js.map +1 -1
- package/dist/drawer.es.js +34 -43
- package/dist/drawer.es.js.map +1 -1
- package/dist/formcombobox.es.js +31 -33
- package/dist/formcombobox.es.js.map +1 -1
- package/dist/formdatepicker.es.js +29 -0
- package/dist/formdatepicker.es.js.map +1 -0
- package/dist/formdaterangepicker.es.js +29 -0
- package/dist/formdaterangepicker.es.js.map +1 -0
- package/dist/formrating.es.js +12 -12
- package/dist/formrating.es.js.map +1 -1
- package/dist/formselect.es.js +17 -17
- package/dist/formselect.es.js.map +1 -1
- package/dist/formtextarea.es.js +29 -0
- package/dist/formtextarea.es.js.map +1 -0
- package/dist/formtimepicker.es.js +29 -0
- package/dist/formtimepicker.es.js.map +1 -0
- package/dist/iconbutton.es.js +9 -9
- package/dist/iconbutton.es.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +144 -136
- package/dist/index.es.js.map +1 -1
- package/dist/lib/hooks/use-mobile.d.ts.map +1 -1
- package/dist/mobiledatepicker.es.js +35 -34
- package/dist/mobiledatepicker.es.js.map +1 -1
- package/dist/mobiledaterangepicker.es.js +54 -49
- package/dist/mobiledaterangepicker.es.js.map +1 -1
- package/dist/mobiletimepicker.es.js +26 -18
- package/dist/mobiletimepicker.es.js.map +1 -1
- package/dist/modal.es.js +10 -10
- package/dist/modal.es.js.map +1 -1
- package/dist/multiselect.es.js +66 -69
- package/dist/multiselect.es.js.map +1 -1
- package/dist/radiogroup.es.js +1 -1
- package/dist/radiogroup.es.js.map +1 -1
- package/dist/rating.es.js +1 -1
- package/dist/rating.es.js.map +1 -1
- package/dist/select.es.js +24 -27
- package/dist/select.es.js.map +1 -1
- package/dist/sheet.es.js +1 -1
- package/dist/sheet.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/textarea.es.js +19 -0
- package/dist/textarea.es.js.map +1 -0
- package/dist/timepicker.es.js +8 -19
- package/dist/timepicker.es.js.map +1 -1
- package/dist/toast-components.es.js +2 -2
- package/dist/toast-components.es.js.map +1 -1
- package/dist/use-mobile.es.js +4 -5
- package/dist/use-mobile.es.js.map +1 -1
- package/package.json +4 -2
- package/dist/_commonjshelpers.es.js +0 -7
- package/dist/_commonjshelpers.es.js.map +0 -1
- package/dist/calendaricon.es.js +0 -8
- package/dist/calendaricon.es.js.map +0 -1
- package/dist/checkicon.es.js +0 -8
- package/dist/checkicon.es.js.map +0 -1
- package/dist/chevrondownicon.es.js +0 -8
- package/dist/chevrondownicon.es.js.map +0 -1
- package/dist/chevronlefticon.es.js +0 -8
- package/dist/chevronlefticon.es.js.map +0 -1
- package/dist/chevronrighticon.es.js +0 -8
- package/dist/chevronrighticon.es.js.map +0 -1
- package/dist/chevronsrighticon.es.js +0 -8
- package/dist/chevronsrighticon.es.js.map +0 -1
- package/dist/chevronupicon.es.js +0 -8
- package/dist/chevronupicon.es.js.map +0 -1
- package/dist/circleicon.es.js +0 -8
- package/dist/circleicon.es.js.map +0 -1
- package/dist/clonedeep.es.js +0 -18
- package/dist/clonedeep.es.js.map +0 -1
- package/dist/clonedeep.es2.js +0 -5
- package/dist/clonedeep.es2.js.map +0 -1
- package/dist/closecircleicon.es.js +0 -8
- package/dist/closecircleicon.es.js.map +0 -1
- package/dist/closeicon.es.js +0 -8
- package/dist/closeicon.es.js.map +0 -1
- package/dist/components/Icons/CalendarIcon.d.ts +0 -3
- package/dist/components/Icons/CalendarIcon.d.ts.map +0 -1
- package/dist/components/Icons/CheckIcon.d.ts +0 -3
- package/dist/components/Icons/CheckIcon.d.ts.map +0 -1
- package/dist/components/Icons/ChevronDownIcon.d.ts +0 -3
- package/dist/components/Icons/ChevronDownIcon.d.ts.map +0 -1
- package/dist/components/Icons/ChevronLeftIcon.d.ts +0 -3
- package/dist/components/Icons/ChevronLeftIcon.d.ts.map +0 -1
- package/dist/components/Icons/ChevronRightIcon.d.ts +0 -3
- package/dist/components/Icons/ChevronRightIcon.d.ts.map +0 -1
- package/dist/components/Icons/ChevronUpIcon.d.ts +0 -3
- package/dist/components/Icons/ChevronUpIcon.d.ts.map +0 -1
- package/dist/components/Icons/ChevronsRightIcon.d.ts +0 -3
- package/dist/components/Icons/ChevronsRightIcon.d.ts.map +0 -1
- package/dist/components/Icons/CircleIcon.d.ts +0 -3
- package/dist/components/Icons/CircleIcon.d.ts.map +0 -1
- package/dist/components/Icons/CloseCircleIcon.d.ts +0 -3
- package/dist/components/Icons/CloseCircleIcon.d.ts.map +0 -1
- package/dist/components/Icons/CloseIcon.d.ts +0 -3
- package/dist/components/Icons/CloseIcon.d.ts.map +0 -1
- package/dist/components/Icons/ElipsisHorizontal.d.ts +0 -3
- package/dist/components/Icons/ElipsisHorizontal.d.ts.map +0 -1
- package/dist/components/Icons/ElipsisVerticalIcon.d.ts +0 -3
- package/dist/components/Icons/ElipsisVerticalIcon.d.ts.map +0 -1
- package/dist/components/Icons/HomeIcon.d.ts +0 -3
- package/dist/components/Icons/HomeIcon.d.ts.map +0 -1
- package/dist/components/Icons/MinusIcon.d.ts +0 -3
- package/dist/components/Icons/MinusIcon.d.ts.map +0 -1
- package/dist/components/Icons/PlusIcon.d.ts +0 -3
- package/dist/components/Icons/PlusIcon.d.ts.map +0 -1
- package/dist/components/Icons/PrintIcon.d.ts +0 -3
- package/dist/components/Icons/PrintIcon.d.ts.map +0 -1
- package/dist/components/Icons/RefreshIcon.d.ts +0 -3
- package/dist/components/Icons/RefreshIcon.d.ts.map +0 -1
- package/dist/components/Icons/SearchIcon.d.ts +0 -3
- package/dist/components/Icons/SearchIcon.d.ts.map +0 -1
- package/dist/components/Icons/SnowflakeIcon.d.ts +0 -3
- package/dist/components/Icons/SnowflakeIcon.d.ts.map +0 -1
- package/dist/components/Icons/SpinnerIcon.d.ts +0 -3
- package/dist/components/Icons/SpinnerIcon.d.ts.map +0 -1
- package/dist/components/Icons/StartIcon.d.ts +0 -3
- package/dist/components/Icons/StartIcon.d.ts.map +0 -1
- package/dist/components/Icons/TrashcanIcon.d.ts +0 -3
- package/dist/components/Icons/TrashcanIcon.d.ts.map +0 -1
- package/dist/config.es.js +0 -1066
- package/dist/config.es.js.map +0 -1
- package/dist/default-theme.es.js +0 -22
- package/dist/default-theme.es.js.map +0 -1
- package/dist/default-theme.es2.js +0 -5
- package/dist/default-theme.es2.js.map +0 -1
- package/dist/defaulttheme.es.js +0 -10
- package/dist/defaulttheme.es.js.map +0 -1
- package/dist/elipsishorizontal.es.js +0 -8
- package/dist/elipsishorizontal.es.js.map +0 -1
- package/dist/elipsisverticalicon.es.js +0 -8
- package/dist/elipsisverticalicon.es.js.map +0 -1
- package/dist/minusicon.es.js +0 -8
- package/dist/minusicon.es.js.map +0 -1
- package/dist/printicon.es.js +0 -8
- package/dist/printicon.es.js.map +0 -1
- package/dist/refreshicon.es.js +0 -8
- package/dist/refreshicon.es.js.map +0 -1
- package/dist/searchicon.es.js +0 -8
- package/dist/searchicon.es.js.map +0 -1
- package/dist/snowflakeicon.es.js +0 -8
- package/dist/snowflakeicon.es.js.map +0 -1
- package/dist/spinnericon.es.js +0 -18
- package/dist/spinnericon.es.js.map +0 -1
- package/dist/starticon.es.js +0 -23
- package/dist/starticon.es.js.map +0 -1
- package/dist/trashcanicon.es.js +0 -6
- package/dist/trashcanicon.es.js.map +0 -1
package/dist/select.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.es.js","sources":["../src/components/select/Select.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport type { SelectValueProps, SelectGroupProps } from \"@radix-ui/react-select\";\n\nimport { cn } from \"../../lib/utils\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\nimport { ChevronUpIcon } from \"../Icons/ChevronUpIcon\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { CloseIcon } from \"../Icons/CloseIcon\";\n\ntype ClearSelectContextValue = {\n onClear: () => void;\n value: string | undefined;\n};\n\nconst SelectContext = React.createContext<ClearSelectContextValue>({ onClear: () => {}, value: undefined });\n\nconst Select = ({ onValueChange, value, ...props }: SelectPrimitive.SelectProps) => {\n const onClear = () => {\n onValueChange?.(\"\");\n };\n\n return (\n <SelectContext.Provider value={{ onClear, value }}>\n <SelectPrimitive.Root {...props} value={value} onValueChange={onValueChange} />\n </SelectContext.Provider>\n );\n};\nSelect.displayName = SelectPrimitive.Root.displayName;\ntype SelectProps = React.ComponentProps<typeof Select>;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\ntype SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n clearable?: boolean;\n};\n\nconst SelectTrigger = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n ({ className, children, clearable, ...props }: SelectTriggerProps, ref) => {\n const { onClear, value } = React.useContext(SelectContext);\n\n const handlePointerDown = (e: React.PointerEvent) => {\n e.stopPropagation();\n };\n\n return (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"group flex h-9 w-full items-center justify-between whitespace-nowrap rounded-sm border border-input bg-transparent px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground hover:border hover:border-primary focus:border focus:border-primary focus:outline-none focus:ring focus:ring-primary-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-text-300 disabled:border-none [&>span]:line-clamp-1 [&_svg]:disabled:text-text-300\",\n className,\n )}\n data-value={value}\n {...props}\n >\n {children}\n <div className=\"flex items-center gap-2\">\n {clearable && value ? (\n <SelectPrimitive.Icon asChild onPointerDown={handlePointerDown} onClickCapture={onClear}>\n <CloseIcon className=\"h-4.5 w-4.5\" />\n </SelectPrimitive.Icon>\n ) : null}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"h-5 w-5 text-primary group-data-[state=open]:rotate-180 transition-transform\" />\n </SelectPrimitive.Icon>\n </div>\n </SelectPrimitive.Trigger>\n );\n },\n);\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n// type SelectTriggerProps = React.ComponentProps<typeof SelectTrigger>;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton ref={ref} className={cn(\"flex cursor-default items-center justify-center py-1\", className)} {...props}>\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\ntype SelectScrollUpButtonProps = React.ComponentProps<typeof SelectScrollUpButton>;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton ref={ref} className={cn(\"flex cursor-default items-center justify-center py-1\", className)} {...props}>\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\ntype SelectScrollDownButtonProps = React.ComponentProps<typeof SelectScrollDownButton>;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 max-h-[--radix-select-content-available-height]\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\"p-1\", position === \"popper\" && \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\")}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\ntype SelectContentProps = React.ComponentProps<typeof SelectContent>;\n\nconst SelectLabel = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Label>, React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>>(\n ({ className, ...props }, ref) => <SelectPrimitive.Label ref={ref} className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)} {...props} />,\n);\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\ntype SelectLabelProps = React.ComponentProps<typeof SelectLabel>;\n\nconst SelectItem = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Item>, React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>>(\n ({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-200 data-[active=true]:bg-gray-300 data-[active=true]:font-bold data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n ),\n);\nSelectItem.displayName = SelectPrimitive.Item.displayName;\ntype SelectItemProps = React.ComponentProps<typeof SelectItem>;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => <SelectPrimitive.Separator ref={ref} className={cn(\"-mx-1 my-1 h-px bg-muted\", className)} {...props} />);\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\ntype SelectSeparatorProps = React.ComponentProps<typeof SelectSeparator>;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"],"names":["SelectContext","React","Select","onValueChange","value","props","onClear","jsx","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","children","clearable","ref","handlePointerDown","e","jsxs","cn","CloseIcon","ChevronDownIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","CheckIcon","SelectSeparator"],"mappings":";;;;;;;;AAeA,MAAMA,IAAgBC,EAAM,cAAuC,EAAE,SAAS,MAAM;AAAC,GAAG,OAAO,QAAW,GAEpGC,IAAS,CAAC,EAAE,eAAAC,GAAe,OAAAC,GAAO,GAAGC,QAAyC;AAClF,QAAMC,IAAU,MAAM;AACpB,IAAAH,IAAgB,EAAE;AAAA,EACpB;AAEA,2BACGH,EAAc,UAAd,EAAuB,OAAO,EAAE,SAAAM,GAAS,OAAAF,KACxC,UAAA,gBAAAG,EAACC,EAAgB,MAAhB,EAAsB,GAAGH,GAAO,OAAAD,GAAc,eAAAD,EAA8B,CAAA,GAC/E;AAEJ;AACAD,EAAO,cAAcM,EAAgB,KAAK;AAG1C,MAAMC,IAAcD,EAAgB,OAE9BE,IAAcF,EAAgB,OAM9BG,IAAgBV,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAW,GAAW,UAAAC,GAAU,WAAAC,GAAW,GAAGT,KAA6BU,MAAQ;AACzE,UAAM,EAAE,SAAAT,GAAS,OAAAF,EAAA,IAAUH,EAAM,WAAWD,CAAa,GAEnDgB,IAAoB,CAACC,MAA0B;AACnD,MAAAA,EAAE,gBAAgB;AAAA,IACpB;AAGE,WAAA,gBAAAC;AAAA,MAACV,EAAgB;AAAA,MAAhB;AAAA,QACC,KAAAO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B,EAAAC,EAAgB,UAAhB,EAA0B,UAAAK,EAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;AACAe,EAAW,cAAcpB,EAAgB,KAAK;AAGxC,MAAAsB,IAAkB7B,EAAM,WAG5B,CAAC,EAAE,WAAAW,GAAW,GAAGP,EAAM,GAAGU,MAAQ,gBAAAR,EAACC,EAAgB,WAAhB,EAA0B,KAAAO,GAAU,WAAWI,EAAG,4BAA4BP,CAAS,GAAI,GAAGP,GAAO,CAAE;AAC5IyB,EAAgB,cAActB,EAAgB,UAAU;"}
|
|
1
|
+
{"version":3,"file":"select.es.js","sources":["../src/components/select/Select.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Check, ChevronDown, ChevronUp, XMark } from \"@trsys-tech/matrix-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport type { SelectValueProps, SelectGroupProps } from \"@radix-ui/react-select\";\n\nimport { cn } from \"../../lib/utils\";\n\ntype ClearSelectContextValue = {\n onClear: () => void;\n value: string | undefined;\n};\n\nconst SelectContext = React.createContext<ClearSelectContextValue>({ onClear: () => {}, value: undefined });\n\nconst Select = ({ onValueChange, value, ...props }: SelectPrimitive.SelectProps) => {\n const onClear = () => {\n onValueChange?.(\"\");\n };\n\n return (\n <SelectContext.Provider value={{ onClear, value }}>\n <SelectPrimitive.Root {...props} value={value} onValueChange={onValueChange} />\n </SelectContext.Provider>\n );\n};\nSelect.displayName = SelectPrimitive.Root.displayName;\ntype SelectProps = React.ComponentProps<typeof Select>;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\ntype SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n clearable?: boolean;\n};\n\nconst SelectTrigger = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n ({ className, children, clearable, ...props }: SelectTriggerProps, ref) => {\n const { onClear, value } = React.useContext(SelectContext);\n\n const handlePointerDown = (e: React.PointerEvent) => {\n e.stopPropagation();\n };\n\n return (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"group flex h-9 w-full items-center justify-between whitespace-nowrap rounded-sm border border-input bg-transparent px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground hover:border hover:border-primary focus:border focus:border-primary focus:outline-none focus:ring focus:ring-primary-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-text-300 disabled:border-none [&>span]:line-clamp-1 [&_svg]:disabled:text-text-300\",\n className,\n )}\n data-value={value}\n {...props}\n >\n {children}\n <div className=\"flex items-center gap-2\">\n {clearable && value ? (\n <SelectPrimitive.Icon asChild onPointerDown={handlePointerDown} onClickCapture={onClear}>\n <XMark className=\"h-4.5 w-4.5\" />\n </SelectPrimitive.Icon>\n ) : null}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4.5 w-4.5 text-primary group-data-[state=open]:rotate-180 transition-transform\" />\n </SelectPrimitive.Icon>\n </div>\n </SelectPrimitive.Trigger>\n );\n },\n);\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n// type SelectTriggerProps = React.ComponentProps<typeof SelectTrigger>;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton ref={ref} className={cn(\"flex cursor-default items-center justify-center py-1\", className)} {...props}>\n <ChevronUp />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\ntype SelectScrollUpButtonProps = React.ComponentProps<typeof SelectScrollUpButton>;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton ref={ref} className={cn(\"flex cursor-default items-center justify-center py-1\", className)} {...props}>\n <ChevronDown />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\ntype SelectScrollDownButtonProps = React.ComponentProps<typeof SelectScrollDownButton>;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 max-h-[--radix-select-content-available-height]\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\"p-1\", position === \"popper\" && \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\")}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\ntype SelectContentProps = React.ComponentProps<typeof SelectContent>;\n\nconst SelectLabel = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Label>, React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>>(\n ({ className, ...props }, ref) => <SelectPrimitive.Label ref={ref} className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)} {...props} />,\n);\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\ntype SelectLabelProps = React.ComponentProps<typeof SelectLabel>;\n\nconst SelectItem = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Item>, React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>>(\n ({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-200 data-[active=true]:bg-gray-300 data-[active=true]:font-bold data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n ),\n);\nSelectItem.displayName = SelectPrimitive.Item.displayName;\ntype SelectItemProps = React.ComponentProps<typeof SelectItem>;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => <SelectPrimitive.Separator ref={ref} className={cn(\"-mx-1 my-1 h-px bg-muted\", className)} {...props} />);\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\ntype SelectSeparatorProps = React.ComponentProps<typeof SelectSeparator>;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"],"names":["SelectContext","React","Select","onValueChange","value","props","onClear","jsx","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","children","clearable","ref","handlePointerDown","e","jsxs","cn","XMark","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":";;;;;AAYA,MAAMA,IAAgBC,EAAM,cAAuC,EAAE,SAAS,MAAM;AAAC,GAAG,OAAO,QAAW,GAEpGC,IAAS,CAAC,EAAE,eAAAC,GAAe,OAAAC,GAAO,GAAGC,QAAyC;AAClF,QAAMC,IAAU,MAAM;AACpB,IAAAH,IAAgB,EAAE;AAAA,EACpB;AAEA,2BACGH,EAAc,UAAd,EAAuB,OAAO,EAAE,SAAAM,GAAS,OAAAF,KACxC,UAAA,gBAAAG,EAACC,EAAgB,MAAhB,EAAsB,GAAGH,GAAO,OAAAD,GAAc,eAAAD,EAA8B,CAAA,GAC/E;AAEJ;AACAD,EAAO,cAAcM,EAAgB,KAAK;AAG1C,MAAMC,IAAcD,EAAgB,OAE9BE,IAAcF,EAAgB,OAM9BG,IAAgBV,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAW,GAAW,UAAAC,GAAU,WAAAC,GAAW,GAAGT,KAA6BU,MAAQ;AACzE,UAAM,EAAE,SAAAT,GAAS,OAAAF,EAAA,IAAUH,EAAM,WAAWD,CAAa,GAEnDgB,IAAoB,CAACC,MAA0B;AACnD,MAAAA,EAAE,gBAAgB;AAAA,IACpB;AAGE,WAAA,gBAAAC;AAAA,MAACV,EAAgB;AAAA,MAAhB;AAAA,QACC,KAAAO;AAAA,QACA,WAAWI;AAAA,UACT;AAAA,UACAP;AAAA,QACF;AAAA,QACA,cAAYR;AAAA,QACX,GAAGC;AAAA,QAEH,UAAA;AAAA,UAAAQ;AAAA,UACD,gBAAAK,EAAC,OAAI,EAAA,WAAU,2BACZ,UAAA;AAAA,YAAAJ,KAAaV,IACX,gBAAAG,EAAAC,EAAgB,MAAhB,EAAqB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hB,EAA0B,KAAAO,GAAU,WAAWI,EAAG,4BAA4BP,CAAS,GAAI,GAAGP,GAAO,CAAE;AAC5IyB,EAAgB,cAActB,EAAgB,UAAU;"}
|
package/dist/sheet.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as r from "react";
|
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
4
|
import { tv as c } from "tailwind-variants";
|
|
5
5
|
import { cn as i } from "./utils.es.js";
|
|
6
|
-
import {
|
|
6
|
+
import { XMark as f } from "@trsys-tech/matrix-icons";
|
|
7
7
|
const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(
|
|
8
8
|
({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
9
9
|
e.Overlay,
|
package/dist/sheet.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.es.js","sources":["../src/components/sheet/Sheet.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\r\nimport type {\r\n DialogProps as SheetProps,\r\n DialogTriggerProps as SheetTriggerProps,\r\n DialogCloseProps as SheetCloseProps,\r\n DialogPortalProps as SheetPortalProps,\r\n DialogOverlayProps as SheetOverlayProps,\r\n DialogDescriptionProps as SheetDescriptionProps,\r\n DialogTitleProps as SheetTitleProps,\r\n} from \"@radix-ui/react-dialog\";\r\nimport { tv, type VariantProps } from \"tailwind-variants\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport {
|
|
1
|
+
{"version":3,"file":"sheet.es.js","sources":["../src/components/sheet/Sheet.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\r\nimport type {\r\n DialogProps as SheetProps,\r\n DialogTriggerProps as SheetTriggerProps,\r\n DialogCloseProps as SheetCloseProps,\r\n DialogPortalProps as SheetPortalProps,\r\n DialogOverlayProps as SheetOverlayProps,\r\n DialogDescriptionProps as SheetDescriptionProps,\r\n DialogTitleProps as SheetTitleProps,\r\n} from \"@radix-ui/react-dialog\";\r\nimport { tv, type VariantProps } from \"tailwind-variants\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { XMark } from \"@trsys-tech/matrix-icons\";\r\n\r\nconst Sheet = SheetPrimitive.Root;\r\n\r\nconst SheetTrigger = SheetPrimitive.Trigger;\r\n\r\nconst SheetClose = SheetPrimitive.Close;\r\n\r\nconst SheetPortal = SheetPrimitive.Portal;\r\n\r\nconst SheetOverlay = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Overlay>, React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>>(\r\n ({ className, ...props }, ref) => (\r\n <SheetPrimitive.Overlay\r\n className={cn(\r\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\",\r\n className,\r\n )}\r\n {...props}\r\n ref={ref}\r\n />\r\n ),\r\n);\r\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\r\n\r\nconst sheetVariants = tv({\r\n base: \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\r\n variants: {\r\n side: {\r\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\r\n bottom: \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\r\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\r\n right: \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\r\n },\r\n },\r\n defaultVariants: {\r\n side: \"right\",\r\n },\r\n});\r\n\r\ninterface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {}\r\n\r\nconst SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Content>, SheetContentProps>(\r\n ({ side = \"right\", className, children, ...props }, ref) => (\r\n <SheetPortal>\r\n <SheetOverlay />\r\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\r\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\r\n <XMark className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">Close</span>\r\n </SheetPrimitive.Close>\r\n {children}\r\n </SheetPrimitive.Content>\r\n </SheetPortal>\r\n ),\r\n);\r\nSheetContent.displayName = SheetPrimitive.Content.displayName;\r\n\r\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\r\n);\r\nSheetHeader.displayName = \"SheetHeader\";\r\ntype SheetHeaderProps = React.ComponentProps<typeof SheetHeader>;\r\n\r\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />\r\n);\r\nSheetFooter.displayName = \"SheetFooter\";\r\ntype SheetFooterProps = React.ComponentProps<typeof SheetFooter>;\r\n\r\nconst SheetTitle = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Title>, React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>>(\r\n ({ className, ...props }, ref) => <SheetPrimitive.Title ref={ref} className={cn(\"text-lg font-semibold text-foreground\", className)} {...props} />,\r\n);\r\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\r\n\r\nconst SheetDescription = React.forwardRef<\r\n React.ElementRef<typeof SheetPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\r\n>(({ className, ...props }, ref) => <SheetPrimitive.Description ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />);\r\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\r\n\r\nexport {\r\n Sheet,\r\n SheetPortal,\r\n SheetOverlay,\r\n SheetTrigger,\r\n SheetClose,\r\n SheetContent,\r\n SheetHeader,\r\n SheetFooter,\r\n SheetTitle,\r\n SheetDescription,\r\n type SheetProps,\r\n type SheetPortalProps,\r\n type SheetOverlayProps,\r\n type SheetTriggerProps,\r\n type SheetCloseProps,\r\n type SheetContentProps,\r\n type SheetHeaderProps,\r\n type SheetFooterProps,\r\n type SheetTitleProps,\r\n type SheetDescriptionProps,\r\n};\r\n"],"names":["Sheet","SheetPrimitive","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","React","className","props","ref","jsx","cn","sheetVariants","tv","SheetContent","side","children","jsxs","XMark","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"mappings":";;;;;;AAkBA,MAAMA,IAAQC,EAAe,MAEvBC,IAAeD,EAAe,SAE9BE,IAAaF,EAAe,OAE5BG,IAAcH,EAAe,QAE7BI,IAAeC,EAAM;AAAA,EACzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,MACxB,gBAAAC;AAAA,IAACT,EAAe;AAAA,IAAf;AAAA,MACC,WAAWU;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,MACJ,KAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AACAJ,EAAa,cAAcJ,EAAe,QAAQ;AAElD,MAAMW,IAAgBC,EAAG;AAAA,EACvB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,i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