lecom-ui 5.4.48 → 5.4.49

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.
@@ -45,37 +45,21 @@ function useDynamicMaxHeight(options = {}) {
45
45
  if (!triggerElement) return;
46
46
  let dialogElement = null;
47
47
  if (detectDialogContainer) {
48
- if (!cachedDialogRef.current) {
49
- cachedDialogRef.current = findDialogContainer(triggerElement);
50
- }
48
+ cachedDialogRef.current ?? (cachedDialogRef.current = findDialogContainer(triggerElement));
51
49
  dialogElement = cachedDialogRef.current;
52
50
  }
53
51
  const triggerRect = triggerElement.getBoundingClientRect();
54
- let boundaryTop;
55
- let boundaryBottom;
56
- let boundaryHeight;
57
- if (dialogElement) {
58
- const containerRect = dialogElement.getBoundingClientRect();
59
- const dialogPadding = 24;
60
- boundaryTop = containerRect.top + dialogPadding;
61
- boundaryBottom = containerRect.bottom - dialogPadding;
62
- boundaryHeight = boundaryBottom - boundaryTop;
63
- } else {
64
- boundaryTop = 0;
65
- boundaryBottom = window.innerHeight;
66
- boundaryHeight = window.innerHeight;
67
- }
68
- const triggerBottom = triggerRect.bottom;
69
- const triggerTop = triggerRect.top;
52
+ const boundaryBottom = window.innerHeight;
53
+ const boundaryHeight = window.innerHeight;
70
54
  const insideDialog = !!dialogElement;
71
55
  setIsInsideDialog(insideDialog);
72
- const effectiveBottomPadding = insideDialog ? 0 : bottomPadding;
73
- const adjustedBottomPadding = boundaryHeight < 500 ? 10 : effectiveBottomPadding;
74
- const adjustedMinBeforeFlip = insideDialog ? 0 : minHeightToFlip;
56
+ const triggerBottom = triggerRect.bottom;
57
+ const triggerTop = triggerRect.top;
58
+ const adjustedBottomPadding = boundaryHeight < 500 ? 10 : bottomPadding;
75
59
  const spaceBelow = boundaryBottom - triggerBottom;
76
- const spaceAbove = triggerTop - boundaryTop;
60
+ const spaceAbove = triggerTop;
77
61
  let finalHeight;
78
- if (spaceBelow >= adjustedMinBeforeFlip + adjustedBottomPadding) {
62
+ if (spaceBelow >= minHeightToFlip + adjustedBottomPadding) {
79
63
  setPreferredSide("bottom");
80
64
  const availableHeight = spaceBelow - adjustedBottomPadding;
81
65
  finalHeight = Math.max(availableHeight, minHeight);
@@ -94,7 +78,6 @@ function useDynamicMaxHeight(options = {}) {
94
78
  if (!enabled) {
95
79
  cachedDialogRef.current = null;
96
80
  initialHeightRef.current = void 0;
97
- setMaxHeight(void 0);
98
81
  return;
99
82
  }
100
83
  cachedDialogRef.current = null;
package/dist/index.d.ts CHANGED
@@ -791,9 +791,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
791
791
  }
792
792
 
793
793
  declare const inputVariants: (props?: ({
794
- variant?: "filled" | "default" | "borderless" | null | undefined;
795
- size?: "small" | "large" | "default" | null | undefined;
796
- radius?: "small" | "large" | "default" | "full" | null | undefined;
794
+ variant?: "default" | "filled" | "borderless" | null | undefined;
795
+ size?: "default" | "small" | "large" | null | undefined;
796
+ radius?: "default" | "small" | "large" | "full" | null | undefined;
797
797
  status?: "default" | "error" | null | undefined;
798
798
  } & class_variance_authority_types.ClassProp) | undefined) => string;
799
799
  interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
@@ -1010,7 +1010,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
1010
1010
  declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1011
1011
 
1012
1012
  declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
1013
- declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLDivElement | HTMLSpanElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLInputElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLUListElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
1013
+ declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLInputElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
1014
1014
  className?: string;
1015
1015
  collapsedSize?: number | undefined;
1016
1016
  collapsible?: boolean | undefined;
@@ -1176,9 +1176,9 @@ declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
1176
1176
  declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1177
1177
 
1178
1178
  declare const textareaVariants: (props?: ({
1179
- variant?: "filled" | "default" | "borderless" | null | undefined;
1180
- size?: "small" | "large" | "default" | null | undefined;
1181
- radius?: "small" | "large" | "default" | "full" | null | undefined;
1179
+ variant?: "default" | "filled" | "borderless" | null | undefined;
1180
+ size?: "default" | "small" | "large" | null | undefined;
1181
+ radius?: "default" | "small" | "large" | "full" | null | undefined;
1182
1182
  resize?: "default" | "both" | "horizontal" | "vertical" | "vertical-limited" | null | undefined;
1183
1183
  status?: "default" | "error" | null | undefined;
1184
1184
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -1378,7 +1378,7 @@ interface DateInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
1378
1378
  declare const DateInput: React$1.ForwardRefExoticComponent<DateInputProps & React$1.RefAttributes<HTMLInputElement>>;
1379
1379
 
1380
1380
  declare const badgeVariants: (props?: ({
1381
- variant?: "destructive" | "default" | "outline" | "secondary" | null | undefined;
1381
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
1382
1382
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1383
1383
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
1384
1384
  }
package/package.json CHANGED
@@ -1,134 +1,134 @@
1
- {
2
- "name": "lecom-ui",
3
- "version": "5.4.48",
4
- "license": "MIT",
5
- "type": "module",
6
- "module": "dist/index.js",
7
- "style": "dist/style.min.css",
8
- "typings": "dist/index.d.ts",
9
- "files": [
10
- "dist"
11
- ],
12
- "scripts": {
13
- "dev": "next dev",
14
- "build:next": "next build",
15
- "start": "next start",
16
- "lint": "next lint",
17
- "storybook": "storybook dev -p 6006",
18
- "build-storybook": "storybook build",
19
- "build:tailwind": "npx tailwindcss -i ./src/globals.css -o ./dist/style.min.css --minify",
20
- "build": "rollup -c && yarn build:tailwind",
21
- "test": "jest",
22
- "test:watch": "jest --watch",
23
- "test:coverage": "jest --coverage"
24
- },
25
- "dependencies": {
26
- "@hookform/resolvers": "^5.0.1",
27
- "@radix-ui/react-accordion": "^1.2.3",
28
- "@radix-ui/react-checkbox": "^1.1.3",
29
- "@radix-ui/react-dialog": "^1.1.11",
30
- "@radix-ui/react-dropdown-menu": "^2.1.4",
31
- "@radix-ui/react-label": "^2.1.4",
32
- "@radix-ui/react-popover": "^1.1.11",
33
- "@radix-ui/react-progress": "^1.1.7",
34
- "@radix-ui/react-radio-group": "^1.2.2",
35
- "@radix-ui/react-scroll-area": "^1.2.2",
36
- "@radix-ui/react-select": "^2.2.2",
37
- "@radix-ui/react-separator": "^1.1.1",
38
- "@radix-ui/react-slot": "^1.2.3",
39
- "@radix-ui/react-switch": "^1.1.2",
40
- "@radix-ui/react-tabs": "^1.1.12",
41
- "@radix-ui/react-toggle-group": "^1.1.10",
42
- "@radix-ui/react-tooltip": "^1.1.6",
43
- "@react-input/mask": "^2.0.4",
44
- "@tanstack/react-table": "^8.21.2",
45
- "@tanstack/react-virtual": "^3.13.10",
46
- "class-variance-authority": "^0.7.1",
47
- "clsx": "^2.1.1",
48
- "cmdk": "^1.1.1",
49
- "date-fns": "^4.1.0",
50
- "hex-color-opacity": "^0.4.2",
51
- "i18next": "^24.2.2",
52
- "lucide-react": "^0.488.0",
53
- "next": "15.5.9",
54
- "react": ">=18.0.0",
55
- "react-colorful": "^5.6.1",
56
- "react-day-picker": "^9.8.0",
57
- "react-dom": ">=18.0.0",
58
- "react-hook-form": "^7.56.1",
59
- "react-i18next": "^15.4.0",
60
- "react-resizable-panels": "^3.0.2",
61
- "react-svg": "^16.1.34",
62
- "react-syntax-highlighter": "^15.6.6",
63
- "recharts": "^2.15.2",
64
- "tailwind-merge": "^2.5.5",
65
- "tailwindcss-animate": "^1.0.7",
66
- "tinycolor2": "^1.6.0",
67
- "use-color-luminance": "^1.3.0",
68
- "use-luminance": "^0.1.3",
69
- "vaul": "^1.1.2",
70
- "zod": "^3.24.3"
71
- },
72
- "devDependencies": {
73
- "@chromatic-com/storybook": "3.2.2",
74
- "@eslint/eslintrc": "^3",
75
- "@rollup/plugin-alias": "^5.1.1",
76
- "@rollup/plugin-image": "^3.0.3",
77
- "@storybook/addon-essentials": "8.4.7",
78
- "@storybook/addon-interactions": "8.4.7",
79
- "@storybook/addon-onboarding": "8.4.7",
80
- "@storybook/blocks": "8.4.7",
81
- "@storybook/nextjs": "8.4.7",
82
- "@storybook/react": "8.4.7",
83
- "@storybook/test": "8.4.7",
84
- "@testing-library/dom": "^10.4.0",
85
- "@testing-library/jest-dom": "^6.6.3",
86
- "@testing-library/react": "^16.1.0",
87
- "@types/node": "^20",
88
- "@types/rc-steps": "^4.0.0",
89
- "@types/react": "^19.0.0",
90
- "@types/react-dom": "^19.0.0",
91
- "@types/react-syntax-highlighter": "^15.5.13",
92
- "@types/tinycolor2": "^1.4.6",
93
- "eslint": "^9",
94
- "eslint-config-next": "15.1.0",
95
- "eslint-plugin-import-helpers": "^2.0.1",
96
- "eslint-plugin-storybook": "^0.11.1",
97
- "jest": "^29.7.0",
98
- "jest-environment-jsdom": "^29.7.0",
99
- "postcss": "^8",
100
- "rollup": "^4.28.1",
101
- "rollup-plugin-copy": "^3.5.0",
102
- "rollup-plugin-dts": "^6.1.1",
103
- "rollup-plugin-esbuild": "^6.1.1",
104
- "rollup-plugin-peer-deps-external": "^2.2.4",
105
- "storybook": "8.4.7",
106
- "tailwindcss": "^3.4.1",
107
- "ts-node": "^10.9.2",
108
- "typescript": "^5"
109
- },
110
- "peerDependencies": {
111
- "react": ">=18.0.0",
112
- "react-dom": ">=18.0.0"
113
- },
114
- "peerDependenciesMeta": {
115
- "react": {
116
- "optional": true
117
- },
118
- "react-dom": {
119
- "optional": true
120
- }
121
- },
122
- "resolutions": {
123
- "react": "^19.0.0",
124
- "react-dom": "^19.0.0"
125
- },
126
- "eslintConfig": {
127
- "extends": [
128
- "plugin:storybook/recommended"
129
- ]
130
- },
131
- "overrides": {
132
- "react-is": "^19.0.0-rc-69d4b800-20241021"
133
- }
134
- }
1
+ {
2
+ "name": "lecom-ui",
3
+ "version": "5.4.49",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "module": "dist/index.js",
7
+ "style": "dist/style.min.css",
8
+ "typings": "dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "dev": "next dev",
14
+ "build:next": "next build",
15
+ "start": "next start",
16
+ "lint": "next lint",
17
+ "storybook": "storybook dev -p 6006",
18
+ "build-storybook": "storybook build",
19
+ "build:tailwind": "npx tailwindcss -i ./src/globals.css -o ./dist/style.min.css --minify",
20
+ "build": "rollup -c && yarn build:tailwind",
21
+ "test": "jest",
22
+ "test:watch": "jest --watch",
23
+ "test:coverage": "jest --coverage"
24
+ },
25
+ "dependencies": {
26
+ "@hookform/resolvers": "^5.0.1",
27
+ "@radix-ui/react-accordion": "^1.2.3",
28
+ "@radix-ui/react-checkbox": "^1.1.3",
29
+ "@radix-ui/react-dialog": "^1.1.11",
30
+ "@radix-ui/react-dropdown-menu": "^2.1.4",
31
+ "@radix-ui/react-label": "^2.1.4",
32
+ "@radix-ui/react-popover": "^1.1.11",
33
+ "@radix-ui/react-progress": "^1.1.7",
34
+ "@radix-ui/react-radio-group": "^1.2.2",
35
+ "@radix-ui/react-scroll-area": "^1.2.2",
36
+ "@radix-ui/react-select": "^2.2.2",
37
+ "@radix-ui/react-separator": "^1.1.1",
38
+ "@radix-ui/react-slot": "^1.2.3",
39
+ "@radix-ui/react-switch": "^1.1.2",
40
+ "@radix-ui/react-tabs": "^1.1.12",
41
+ "@radix-ui/react-toggle-group": "^1.1.10",
42
+ "@radix-ui/react-tooltip": "^1.1.6",
43
+ "@react-input/mask": "^2.0.4",
44
+ "@tanstack/react-table": "^8.21.2",
45
+ "@tanstack/react-virtual": "^3.13.10",
46
+ "class-variance-authority": "^0.7.1",
47
+ "clsx": "^2.1.1",
48
+ "cmdk": "^1.1.1",
49
+ "date-fns": "^4.1.0",
50
+ "hex-color-opacity": "^0.4.2",
51
+ "i18next": "^24.2.2",
52
+ "lucide-react": "^0.488.0",
53
+ "next": "15.5.9",
54
+ "react": ">=18.0.0",
55
+ "react-colorful": "^5.6.1",
56
+ "react-day-picker": "^9.8.0",
57
+ "react-dom": ">=18.0.0",
58
+ "react-hook-form": "^7.56.1",
59
+ "react-i18next": "^15.4.0",
60
+ "react-resizable-panels": "^3.0.2",
61
+ "react-svg": "^16.1.34",
62
+ "react-syntax-highlighter": "^15.6.6",
63
+ "recharts": "^2.15.2",
64
+ "tailwind-merge": "^2.5.5",
65
+ "tailwindcss-animate": "^1.0.7",
66
+ "tinycolor2": "^1.6.0",
67
+ "use-color-luminance": "^1.3.0",
68
+ "use-luminance": "^0.1.3",
69
+ "vaul": "^1.1.2",
70
+ "zod": "^3.24.3"
71
+ },
72
+ "devDependencies": {
73
+ "@chromatic-com/storybook": "3.2.2",
74
+ "@eslint/eslintrc": "^3",
75
+ "@rollup/plugin-alias": "^5.1.1",
76
+ "@rollup/plugin-image": "^3.0.3",
77
+ "@storybook/addon-essentials": "8.4.7",
78
+ "@storybook/addon-interactions": "8.4.7",
79
+ "@storybook/addon-onboarding": "8.4.7",
80
+ "@storybook/blocks": "8.4.7",
81
+ "@storybook/nextjs": "8.4.7",
82
+ "@storybook/react": "8.4.7",
83
+ "@storybook/test": "8.4.7",
84
+ "@testing-library/dom": "^10.4.0",
85
+ "@testing-library/jest-dom": "^6.6.3",
86
+ "@testing-library/react": "^16.1.0",
87
+ "@types/node": "^20",
88
+ "@types/rc-steps": "^4.0.0",
89
+ "@types/react": "^19.0.0",
90
+ "@types/react-dom": "^19.0.0",
91
+ "@types/react-syntax-highlighter": "^15.5.13",
92
+ "@types/tinycolor2": "^1.4.6",
93
+ "eslint": "^9",
94
+ "eslint-config-next": "15.1.0",
95
+ "eslint-plugin-import-helpers": "^2.0.1",
96
+ "eslint-plugin-storybook": "^0.11.1",
97
+ "jest": "^29.7.0",
98
+ "jest-environment-jsdom": "^29.7.0",
99
+ "postcss": "^8",
100
+ "rollup": "^4.28.1",
101
+ "rollup-plugin-copy": "^3.5.0",
102
+ "rollup-plugin-dts": "^6.1.1",
103
+ "rollup-plugin-esbuild": "^6.1.1",
104
+ "rollup-plugin-peer-deps-external": "^2.2.4",
105
+ "storybook": "8.4.7",
106
+ "tailwindcss": "^3.4.1",
107
+ "ts-node": "^10.9.2",
108
+ "typescript": "^5"
109
+ },
110
+ "peerDependencies": {
111
+ "react": ">=18.0.0",
112
+ "react-dom": ">=18.0.0"
113
+ },
114
+ "peerDependenciesMeta": {
115
+ "react": {
116
+ "optional": true
117
+ },
118
+ "react-dom": {
119
+ "optional": true
120
+ }
121
+ },
122
+ "resolutions": {
123
+ "react": "^19.0.0",
124
+ "react-dom": "^19.0.0"
125
+ },
126
+ "eslintConfig": {
127
+ "extends": [
128
+ "plugin:storybook/recommended"
129
+ ]
130
+ },
131
+ "overrides": {
132
+ "react-is": "^19.0.0-rc-69d4b800-20241021"
133
+ }
134
+ }