lecom-ui 5.2.70 → 5.2.72

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.
Files changed (82) hide show
  1. package/dist/components/Combobox/Combobox.js +5 -19
  2. package/dist/components/CustomDivider/CustomDivider.js +18 -36
  3. package/dist/components/DataTable/DataTable.utils.js +1 -5
  4. package/dist/components/DataTable/Table.js +40 -60
  5. package/dist/components/Sheet/Sheet.js +1 -31
  6. package/dist/components/Steps/{StepsTimeline.js → Steps.js} +1 -0
  7. package/dist/components/Switch/Switch.js +20 -5
  8. package/dist/components/TagInput/TagInput.js +55 -58
  9. package/dist/index.d.ts +47 -93
  10. package/dist/index.js +2 -4
  11. package/dist/style.min.css +1 -1
  12. package/package.json +4 -3
  13. package/dist/badge.js +0 -26
  14. package/dist/button-dropdown.js +0 -117
  15. package/dist/button.js +0 -104
  16. package/dist/calendar.js +0 -62
  17. package/dist/card.js +0 -56
  18. package/dist/checkbox.js +0 -55
  19. package/dist/collapse.js +0 -60
  20. package/dist/collapsible.js +0 -7
  21. package/dist/command.js +0 -107
  22. package/dist/components/Collapse/Collapse.js +0 -94
  23. package/dist/components/DataTable/useOptimizedTable.js +0 -75
  24. package/dist/data-table/data-table.js +0 -490
  25. package/dist/date-picker.js +0 -92
  26. package/dist/dialog.js +0 -95
  27. package/dist/dropdown-menu.js +0 -138
  28. package/dist/fonts/Montserrat-Bold.otf +0 -0
  29. package/dist/fonts/Montserrat-Medium.otf +0 -0
  30. package/dist/fonts/Montserrat-Regular.otf +0 -0
  31. package/dist/fonts/Roboto-Bold.otf +0 -0
  32. package/dist/fonts/Roboto-Light.otf +0 -0
  33. package/dist/fonts/Roboto-Medium.otf +0 -0
  34. package/dist/fonts/Roboto-Regular.otf +0 -0
  35. package/dist/form.js +0 -102
  36. package/dist/header.js +0 -90
  37. package/dist/hook/useDebounce.js +0 -16
  38. package/dist/icon-handler.js +0 -72
  39. package/dist/icons/brandModules.js +0 -27
  40. package/dist/icons/companyLogo.js +0 -61
  41. package/dist/icons/createUseAuxiliary.js +0 -107
  42. package/dist/icons/footerInfo.js +0 -25
  43. package/dist/icons/logo_lecom.svg.js +0 -3
  44. package/dist/icons/newUpdate.js +0 -23
  45. package/dist/icons/robertyRPA.js +0 -30
  46. package/dist/ilustrations/access_denied.js +0 -252
  47. package/dist/ilustrations/page_not_found.js +0 -188
  48. package/dist/input.js +0 -42
  49. package/dist/label.js +0 -20
  50. package/dist/modal.js +0 -27
  51. package/dist/pagination.js +0 -474
  52. package/dist/plugin/extend.ts +0 -78
  53. package/dist/plugin/fontFaces.ts +0 -172
  54. package/dist/plugin/general.ts +0 -12
  55. package/dist/plugin/pluginDev.js +0 -5
  56. package/dist/plugin/pluginNext.js +0 -5
  57. package/dist/plugin/pluginVite.js +0 -5
  58. package/dist/plugin/template.ts +0 -31
  59. package/dist/plugin/typographies.ts +0 -152
  60. package/dist/plugin/varsTheme.ts +0 -79
  61. package/dist/plugin.cjs +0 -298
  62. package/dist/popover.js +0 -24
  63. package/dist/radio-group.js +0 -74
  64. package/dist/range-picker.js +0 -99
  65. package/dist/scroll-area.js +0 -37
  66. package/dist/search-bar.js +0 -151
  67. package/dist/select.js +0 -156
  68. package/dist/separator.js +0 -24
  69. package/dist/sheet.js +0 -106
  70. package/dist/sidebar.js +0 -188
  71. package/dist/skeleton.js +0 -17
  72. package/dist/slider.js +0 -23
  73. package/dist/status-screen.js +0 -71
  74. package/dist/switch.js +0 -27
  75. package/dist/table.js +0 -83
  76. package/dist/tabs.js +0 -44
  77. package/dist/tag.js +0 -33
  78. package/dist/textarea.js +0 -22
  79. package/dist/toast.js +0 -105
  80. package/dist/toaster.js +0 -23
  81. package/dist/tooltip.js +0 -133
  82. package/dist/use-toast.js +0 -121
@@ -1,138 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
- import { ChevronRightIcon, CheckIcon, DotFilledIcon } from '@radix-ui/react-icons';
5
- import { cn } from './lib/utils.js';
6
-
7
- const DropdownMenu = DropdownMenuPrimitive.Root;
8
- const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
9
- const DropdownMenuGroup = DropdownMenuPrimitive.Group;
10
- const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
11
- const DropdownMenuSub = DropdownMenuPrimitive.Sub;
12
- const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
13
- const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
14
- DropdownMenuPrimitive.SubTrigger,
15
- {
16
- ref,
17
- className: cn(
18
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
19
- inset && "pl-8",
20
- className
21
- ),
22
- ...props,
23
- children: [
24
- children,
25
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
26
- ]
27
- }
28
- ));
29
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
30
- const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
31
- DropdownMenuPrimitive.SubContent,
32
- {
33
- ref,
34
- className: cn(
35
- "z-50 min-w-[8rem] overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
36
- className
37
- ),
38
- ...props
39
- }
40
- ));
41
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
42
- const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
43
- DropdownMenuPrimitive.Content,
44
- {
45
- ref,
46
- sideOffset,
47
- className: cn(
48
- "z-50 min-w-[8rem] overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
49
- "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",
50
- className
51
- ),
52
- ...props
53
- }
54
- ) }));
55
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
56
- const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
57
- DropdownMenuPrimitive.Item,
58
- {
59
- ref,
60
- className: cn(
61
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
62
- inset && "pl-8",
63
- className
64
- ),
65
- ...props
66
- }
67
- ));
68
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
69
- const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
70
- DropdownMenuPrimitive.CheckboxItem,
71
- {
72
- ref,
73
- className: cn(
74
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
75
- className
76
- ),
77
- checked,
78
- ...props,
79
- children: [
80
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
81
- children
82
- ]
83
- }
84
- ));
85
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
86
- const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
87
- DropdownMenuPrimitive.RadioItem,
88
- {
89
- ref,
90
- className: cn(
91
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
92
- className
93
- ),
94
- ...props,
95
- children: [
96
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
97
- children
98
- ]
99
- }
100
- ));
101
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
102
- const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
103
- DropdownMenuPrimitive.Label,
104
- {
105
- ref,
106
- className: cn(
107
- "px-2 py-1.5 text-sm font-semibold",
108
- inset && "pl-8",
109
- className
110
- ),
111
- ...props
112
- }
113
- ));
114
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
115
- const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
116
- DropdownMenuPrimitive.Separator,
117
- {
118
- ref,
119
- className: cn("-mx-1 my-1 h-px bg-muted", className),
120
- ...props
121
- }
122
- ));
123
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
124
- const DropdownMenuShortcut = ({
125
- className,
126
- ...props
127
- }) => {
128
- return /* @__PURE__ */ jsx(
129
- "span",
130
- {
131
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
132
- ...props
133
- }
134
- );
135
- };
136
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
137
-
138
- export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/form.js DELETED
@@ -1,102 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { FormProvider, Controller, useFormContext } from 'react-hook-form';
4
- import { Slot } from '@radix-ui/react-slot';
5
- import { cn } from './lib/utils.js';
6
- import { Label } from './label.js';
7
-
8
- const Form = FormProvider;
9
- const FormFieldContext = React.createContext(
10
- {}
11
- );
12
- const FormField = ({
13
- ...props
14
- }) => {
15
- return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
16
- };
17
- const useFormField = () => {
18
- const fieldContext = React.useContext(FormFieldContext);
19
- const itemContext = React.useContext(FormItemContext);
20
- const { getFieldState, formState } = useFormContext();
21
- const fieldState = getFieldState(fieldContext.name, formState);
22
- if (!fieldContext) {
23
- throw new Error("useFormField should be used within <FormField>");
24
- }
25
- const { id } = itemContext;
26
- return {
27
- id,
28
- name: fieldContext.name,
29
- formItemId: `${id}-form-item`,
30
- formDescriptionId: `${id}-form-item-description`,
31
- formMessageId: `${id}-form-item-message`,
32
- ...fieldState
33
- };
34
- };
35
- const FormItemContext = React.createContext(
36
- {}
37
- );
38
- const FormItem = React.forwardRef(({ className, ...props }, ref) => {
39
- const id = React.useId();
40
- return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
41
- });
42
- FormItem.displayName = "FormItem";
43
- const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
44
- const { error, formItemId } = useFormField();
45
- return /* @__PURE__ */ jsx(
46
- Label,
47
- {
48
- ref,
49
- className: cn(error && "text-destructive", className),
50
- htmlFor: formItemId,
51
- ...props
52
- }
53
- );
54
- });
55
- FormLabel.displayName = "FormLabel";
56
- const FormControl = React.forwardRef(({ ...props }, ref) => {
57
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
58
- return /* @__PURE__ */ jsx(
59
- Slot,
60
- {
61
- ref,
62
- id: formItemId,
63
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
64
- "aria-invalid": !!error,
65
- ...props
66
- }
67
- );
68
- });
69
- FormControl.displayName = "FormControl";
70
- const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
71
- const { formDescriptionId } = useFormField();
72
- return /* @__PURE__ */ jsx(
73
- "p",
74
- {
75
- ref,
76
- id: formDescriptionId,
77
- className: cn("text-[0.8rem] text-muted-foreground", className),
78
- ...props
79
- }
80
- );
81
- });
82
- FormDescription.displayName = "FormDescription";
83
- const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
84
- const { error, formMessageId } = useFormField();
85
- const body = children ? children : String(error?.message);
86
- if (!body) {
87
- return null;
88
- }
89
- return /* @__PURE__ */ jsx(
90
- "p",
91
- {
92
- ref,
93
- id: formMessageId,
94
- className: cn("text-[0.8rem] font-medium text-destructive", className),
95
- ...props,
96
- children: body
97
- }
98
- );
99
- });
100
- FormMessage.displayName = "FormMessage";
101
-
102
- export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
package/dist/header.js DELETED
@@ -1,90 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef, useRef } from 'react';
3
- import { MenuIcon } from 'lucide-react';
4
- import img from './icons/logo_lecom.svg.js';
5
- import { cn, PercentOfOpacityAlphaCode } from './lib/utils.js';
6
- import { Button } from './button.js';
7
- import { Tooltip } from './tooltip.js';
8
-
9
- const HeaderPage = ({
10
- children,
11
- className,
12
- classNameLogo,
13
- backgroundColor = "hsl(230 55% 33%)",
14
- textColor = "#FFFFFF",
15
- openSidebar,
16
- imgLogo,
17
- tooltip = void 0,
18
- tooltipSide = "bottom",
19
- tooltipAlign = "start",
20
- tooltipAlignOffset = 0,
21
- tooltipSideOffset = 0,
22
- ariaLabel,
23
- ...rest
24
- }, ref) => {
25
- const refMenuIcon = useRef(null);
26
- const renderLogo = () => {
27
- return /* @__PURE__ */ jsx(
28
- "img",
29
- {
30
- src: imgLogo || img,
31
- className: cn("max-w-28 max-h-10 h-full w-full", classNameLogo)
32
- }
33
- );
34
- };
35
- const renderMenuHamburger = () => {
36
- return /* @__PURE__ */ jsx(
37
- MenuIcon,
38
- {
39
- style: { fill: PercentOfOpacityAlphaCode(textColor, 0.87) },
40
- className: "w-[24px] h-[24px]"
41
- }
42
- );
43
- };
44
- return /* @__PURE__ */ jsxs(
45
- "header",
46
- {
47
- className: cn(
48
- `fixed top-0 left-0 w-full h-16 py-[7px] px-2 flex justify-between items-center shadow-md z-[9999] border-transparent bg-brand-blue text-primary-foreground`,
49
- className
50
- ),
51
- style: { backgroundColor, color: textColor },
52
- ...rest,
53
- ref,
54
- children: [
55
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 w-[200px]", children: [
56
- /* @__PURE__ */ jsx(
57
- Button,
58
- {
59
- ref: refMenuIcon,
60
- className: `cursor-pointer bg-none focus:bg-transparent hover:bg-transparent hover:text-none w-8 h-8`,
61
- "aria-label": ariaLabel,
62
- size: "icon",
63
- variant: "ghost",
64
- onClick: openSidebar,
65
- children: tooltip ? /* @__PURE__ */ jsx(
66
- Tooltip,
67
- {
68
- className: "z-[9999]",
69
- asChild: true,
70
- title: tooltip,
71
- side: tooltipSide,
72
- align: tooltipAlign,
73
- alignOffset: tooltipAlignOffset,
74
- sideOffset: tooltipSideOffset,
75
- children: renderMenuHamburger()
76
- }
77
- ) : renderMenuHamburger()
78
- }
79
- ),
80
- renderLogo()
81
- ] }),
82
- children
83
- ]
84
- }
85
- );
86
- };
87
- HeaderPage.displayName = "HeaderPage";
88
- const Header = forwardRef(HeaderPage);
89
-
90
- export { Header };
@@ -1,16 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
-
3
- const useDebounce = (value, milliSeconds) => {
4
- const [debouncedValue, setDebouncedValue] = useState(value);
5
- useEffect(() => {
6
- const handler = setTimeout(() => {
7
- setDebouncedValue(value);
8
- }, milliSeconds);
9
- return () => {
10
- clearTimeout(handler);
11
- };
12
- }, [value, milliSeconds]);
13
- return debouncedValue;
14
- };
15
-
16
- export { useDebounce };
@@ -1,72 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import { ReactSVG } from 'react-svg';
4
- import { isUrl, cn, isImage } from './lib/utils.js';
5
-
6
- const IconHandler = forwardRef(
7
- ({ icon, colorType = "color", variantsColors, className, setAttribute, style = {}, ...props }, ref) => {
8
- const IconComponent = icon;
9
- if (typeof icon === "string") {
10
- if (isUrl(icon)) {
11
- return /* @__PURE__ */ jsx(
12
- "img",
13
- {
14
- src: icon,
15
- alt: "\xCDcone",
16
- className: cn("w-[24px] h-[24px]", className),
17
- style: {
18
- ...style,
19
- ...variantsColors && {
20
- color: variantsColors
21
- }
22
- }
23
- }
24
- );
25
- } else if (isImage(icon)) {
26
- return /* @__PURE__ */ jsx(
27
- ReactSVG,
28
- {
29
- src: icon,
30
- className: cn("w-[24px] h-[24px]", className),
31
- beforeInjection: (svg) => {
32
- variantsColors && setAttribute ? svg.setAttribute("style", `fill: ${variantsColors} ${setAttribute ? `; ${setAttribute}` : ""}`) : setAttribute ? svg.setAttribute("style", `${setAttribute}`) : svg.setAttribute("style", `fill: ${variantsColors}`);
33
- },
34
- style
35
- }
36
- );
37
- } else {
38
- return /* @__PURE__ */ jsx(
39
- "span",
40
- {
41
- className: cn("flex items-center w-auto h-[24px]", className),
42
- style: {
43
- ...style,
44
- ...variantsColors && {
45
- color: variantsColors
46
- }
47
- },
48
- children: icon
49
- }
50
- );
51
- }
52
- } else {
53
- const setColor = colorType === "color" ? { ["color"]: variantsColors } : {};
54
- return /* @__PURE__ */ jsx(
55
- IconComponent,
56
- {
57
- ref,
58
- fill: colorType === "fill" ? variantsColors : "none",
59
- className: cn(`hover:bg-transparent`, className),
60
- style: {
61
- ...style,
62
- ...variantsColors && setColor
63
- },
64
- ...props
65
- }
66
- );
67
- }
68
- }
69
- );
70
- IconHandler.displayName = "IconHandler";
71
-
72
- export { IconHandler };
@@ -1,27 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
-
3
- const BrandModules = ({
4
- fill = "black",
5
- width = "24px",
6
- height = "24px",
7
- viewBox = "0 0 24 24",
8
- className = ""
9
- }) => /* @__PURE__ */ jsxs(
10
- "svg",
11
- {
12
- width,
13
- height,
14
- viewBox,
15
- fill,
16
- xmlSpace: "preserve",
17
- xmlnsXlink: "http://www.w3.org/1999/xlink",
18
- xmlns: "http://www.w3.org/2000/svg",
19
- className,
20
- children: [
21
- /* @__PURE__ */ jsx("path", { d: "M6.65,16.59c1.18-2.92,3.53-3.63,4.94-3.06a3.26,3.26,0,0,1,2,2.73.74.74,0,0,1-.28.66L6,22C5.85,18.23,6.41,17.25,6.65,16.59Zm5.93-3.81c-.42-.33-1-.66-1.46-1-.71-.42-1.32-.85-1.32-.85C5.9,8.35,5.9,6.09,6.09,2L20.34,12l-5.83,4.09A3.9,3.9,0,0,0,12.58,12.78Z" }),
22
- /* @__PURE__ */ jsx("path", { d: "M0 0h24v24H0z", fill: "none" })
23
- ]
24
- }
25
- );
26
-
27
- export { BrandModules };