@once-ui-system/core 1.4.32 → 1.5.0

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 (189) hide show
  1. package/.eslintrc.json +3 -3
  2. package/{LICENSE → LICENSE.md} +1 -1
  3. package/dist/components/Animation.d.ts +34 -0
  4. package/dist/components/Animation.d.ts.map +1 -0
  5. package/dist/components/Animation.js +230 -0
  6. package/dist/components/Animation.js.map +1 -0
  7. package/dist/components/ArrowNavigationContext.d.ts.map +1 -1
  8. package/dist/components/ArrowNavigationContext.js +2 -1
  9. package/dist/components/ArrowNavigationContext.js.map +1 -1
  10. package/dist/components/AutoScroll.module.scss +8 -8
  11. package/dist/components/Background.d.ts.map +1 -1
  12. package/dist/components/Background.js +23 -15
  13. package/dist/components/Background.js.map +1 -1
  14. package/dist/components/Button.d.ts +1 -0
  15. package/dist/components/Button.d.ts.map +1 -1
  16. package/dist/components/Button.js +2 -2
  17. package/dist/components/Button.js.map +1 -1
  18. package/dist/components/Card.d.ts.map +1 -1
  19. package/dist/components/Card.js +2 -4
  20. package/dist/components/Card.js.map +1 -1
  21. package/dist/components/Card.module.scss +4 -2
  22. package/dist/components/Carousel.module.scss +31 -31
  23. package/dist/components/ClientFlex.d.ts.map +1 -1
  24. package/dist/components/ClientFlex.js +8 -58
  25. package/dist/components/ClientFlex.js.map +1 -1
  26. package/dist/components/ClientGrid.d.ts.map +1 -1
  27. package/dist/components/ClientGrid.js +8 -58
  28. package/dist/components/ClientGrid.js.map +1 -1
  29. package/dist/components/ColorInput.d.ts.map +1 -1
  30. package/dist/components/ColorInput.js +5 -19
  31. package/dist/components/ColorInput.js.map +1 -1
  32. package/dist/components/CompareImage.d.ts.map +1 -1
  33. package/dist/components/CompareImage.js +1 -1
  34. package/dist/components/CompareImage.js.map +1 -1
  35. package/dist/components/Dialog.module.scss +32 -32
  36. package/dist/components/DropdownWrapper.d.ts.map +1 -1
  37. package/dist/components/DropdownWrapper.js +144 -30
  38. package/dist/components/DropdownWrapper.js.map +1 -1
  39. package/dist/components/EmojiPicker.d.ts.map +1 -1
  40. package/dist/components/EmojiPicker.js +14 -12
  41. package/dist/components/EmojiPicker.js.map +1 -1
  42. package/dist/components/EmojiPicker.module.scss +14 -0
  43. package/dist/components/EmojiPickerDropdown.d.ts.map +1 -1
  44. package/dist/components/EmojiPickerDropdown.js +1 -1
  45. package/dist/components/EmojiPickerDropdown.js.map +1 -1
  46. package/dist/components/Flex.d.ts.map +1 -1
  47. package/dist/components/Flex.js +1 -80
  48. package/dist/components/Flex.js.map +1 -1
  49. package/dist/components/Grid.d.ts.map +1 -1
  50. package/dist/components/Grid.js +1 -80
  51. package/dist/components/Grid.js.map +1 -1
  52. package/dist/components/Hover.d.ts +14 -0
  53. package/dist/components/Hover.d.ts.map +1 -0
  54. package/dist/components/Hover.js +99 -0
  55. package/dist/components/Hover.js.map +1 -0
  56. package/dist/components/Hover.module.scss +12 -0
  57. package/dist/components/HoverCard.d.ts +5 -0
  58. package/dist/components/HoverCard.d.ts.map +1 -0
  59. package/dist/components/HoverCard.js +10 -0
  60. package/dist/components/HoverCard.js.map +1 -0
  61. package/dist/components/HoverCard.module.scss +12 -0
  62. package/dist/components/Icon.d.ts.map +1 -1
  63. package/dist/components/Icon.js +8 -19
  64. package/dist/components/Icon.js.map +1 -1
  65. package/dist/components/IconButton.d.ts.map +1 -1
  66. package/dist/components/IconButton.js +9 -20
  67. package/dist/components/IconButton.js.map +1 -1
  68. package/dist/components/IconButton.module.scss +0 -24
  69. package/dist/components/Input.d.ts +1 -0
  70. package/dist/components/Input.d.ts.map +1 -1
  71. package/dist/components/Input.js +6 -2
  72. package/dist/components/Input.js.map +1 -1
  73. package/dist/components/MatrixFx.d.ts +15 -0
  74. package/dist/components/MatrixFx.d.ts.map +1 -0
  75. package/dist/components/MatrixFx.js +307 -0
  76. package/dist/components/MatrixFx.js.map +1 -0
  77. package/dist/components/Option.d.ts.map +1 -1
  78. package/dist/components/Option.js +38 -7
  79. package/dist/components/Option.js.map +1 -1
  80. package/dist/components/Option.module.scss +13 -10
  81. package/dist/components/Particle.d.ts +2 -1
  82. package/dist/components/Particle.d.ts.map +1 -1
  83. package/dist/components/Particle.js +27 -6
  84. package/dist/components/Particle.js.map +1 -1
  85. package/dist/components/Select.d.ts.map +1 -1
  86. package/dist/components/Select.js +41 -31
  87. package/dist/components/Select.js.map +1 -1
  88. package/dist/components/ServerFlex.d.ts +1 -0
  89. package/dist/components/ServerFlex.d.ts.map +1 -1
  90. package/dist/components/ServerFlex.js +37 -22
  91. package/dist/components/ServerFlex.js.map +1 -1
  92. package/dist/components/ServerGrid.d.ts +1 -0
  93. package/dist/components/ServerGrid.d.ts.map +1 -1
  94. package/dist/components/ServerGrid.js +7 -2
  95. package/dist/components/ServerGrid.js.map +1 -1
  96. package/dist/components/SharedInteractiveStyles.module.scss +1 -1
  97. package/dist/components/ShineFx.d.ts +11 -0
  98. package/dist/components/ShineFx.d.ts.map +1 -0
  99. package/dist/components/ShineFx.js +15 -0
  100. package/dist/components/ShineFx.js.map +1 -0
  101. package/dist/components/ShineFx.module.scss +33 -0
  102. package/dist/components/Swiper.d.ts +17 -0
  103. package/dist/components/Swiper.d.ts.map +1 -0
  104. package/dist/components/Swiper.js +170 -0
  105. package/dist/components/Swiper.js.map +1 -0
  106. package/dist/components/Swiper.module.scss +31 -0
  107. package/dist/components/Switch.module.scss +1 -1
  108. package/dist/components/Textarea.d.ts +1 -0
  109. package/dist/components/Textarea.d.ts.map +1 -1
  110. package/dist/components/Textarea.js +6 -2
  111. package/dist/components/Textarea.js.map +1 -1
  112. package/dist/components/TiltFx.d.ts +1 -0
  113. package/dist/components/TiltFx.d.ts.map +1 -1
  114. package/dist/components/TiltFx.js +5 -4
  115. package/dist/components/TiltFx.js.map +1 -1
  116. package/dist/components/Timeline.d.ts +18 -0
  117. package/dist/components/Timeline.d.ts.map +1 -0
  118. package/dist/components/Timeline.js +28 -0
  119. package/dist/components/Timeline.js.map +1 -0
  120. package/dist/components/Tooltip.d.ts +2 -2
  121. package/dist/components/Tooltip.d.ts.map +1 -1
  122. package/dist/components/Tooltip.js +4 -3
  123. package/dist/components/Tooltip.js.map +1 -1
  124. package/dist/components/Tooltip.module.scss +14 -0
  125. package/dist/components/TypeFx.d.ts +15 -0
  126. package/dist/components/TypeFx.d.ts.map +1 -0
  127. package/dist/components/TypeFx.js +105 -0
  128. package/dist/components/TypeFx.js.map +1 -0
  129. package/dist/components/UserMenu.d.ts.map +1 -1
  130. package/dist/components/UserMenu.js +3 -3
  131. package/dist/components/UserMenu.js.map +1 -1
  132. package/dist/components/index.d.ts +8 -0
  133. package/dist/components/index.d.ts.map +1 -1
  134. package/dist/components/index.js +8 -0
  135. package/dist/components/index.js.map +1 -1
  136. package/dist/contexts/LayoutProvider.d.ts +1 -0
  137. package/dist/contexts/LayoutProvider.d.ts.map +1 -1
  138. package/dist/contexts/LayoutProvider.js +30 -4
  139. package/dist/contexts/LayoutProvider.js.map +1 -1
  140. package/dist/css/styles.css +1 -1
  141. package/dist/css/styles.css.map +1 -1
  142. package/dist/css/tokens.css +1 -1
  143. package/dist/css/tokens.css.map +1 -1
  144. package/dist/data/emoji-data.json +0 -8
  145. package/dist/hooks/useResponsiveClasses.d.ts +9 -0
  146. package/dist/hooks/useResponsiveClasses.d.ts.map +1 -0
  147. package/dist/hooks/useResponsiveClasses.js +250 -0
  148. package/dist/hooks/useResponsiveClasses.js.map +1 -0
  149. package/dist/icons.d.ts.map +1 -1
  150. package/dist/icons.js +3 -1
  151. package/dist/icons.js.map +1 -1
  152. package/dist/interfaces.d.ts +1 -0
  153. package/dist/interfaces.d.ts.map +1 -1
  154. package/dist/modules/code/CodeBlock.d.ts.map +1 -1
  155. package/dist/modules/code/CodeBlock.js +17 -7
  156. package/dist/modules/code/CodeBlock.js.map +1 -1
  157. package/dist/modules/code/LineNumber.css +34 -34
  158. package/dist/modules/navigation/HeadingLink.d.ts +2 -2
  159. package/dist/modules/navigation/HeadingLink.d.ts.map +1 -1
  160. package/dist/modules/navigation/HeadingLink.js +3 -3
  161. package/dist/modules/navigation/HeadingLink.js.map +1 -1
  162. package/dist/modules/navigation/HeadingLink.module.scss +5 -14
  163. package/dist/modules/navigation/HeadingNav.d.ts +1 -0
  164. package/dist/modules/navigation/HeadingNav.d.ts.map +1 -1
  165. package/dist/modules/navigation/HeadingNav.js +32 -30
  166. package/dist/modules/navigation/HeadingNav.js.map +1 -1
  167. package/dist/modules/navigation/Kbar.d.ts.map +1 -1
  168. package/dist/modules/navigation/Kbar.js +40 -99
  169. package/dist/modules/navigation/Kbar.js.map +1 -1
  170. package/dist/modules/navigation/MegaMenu.d.ts +1 -0
  171. package/dist/modules/navigation/MegaMenu.d.ts.map +1 -1
  172. package/dist/modules/navigation/MegaMenu.js +121 -44
  173. package/dist/modules/navigation/MegaMenu.js.map +1 -1
  174. package/dist/package.json +10 -1
  175. package/dist/styles/border.scss +36 -0
  176. package/dist/styles/breakpoints.scss +7 -0
  177. package/dist/styles/display.scss +64 -0
  178. package/dist/styles/flex.scss +87 -0
  179. package/dist/styles/global.scss +3 -24
  180. package/dist/styles/grid.scss +58 -0
  181. package/dist/styles/position.scss +310 -0
  182. package/dist/styles/typography.scss +36 -10
  183. package/dist/tokens/border.scss +28 -4
  184. package/dist/tokens/theme.scss +2 -0
  185. package/dist/tokens/typography.scss +5 -1
  186. package/package.json +10 -1
  187. package/README.md +0 -159
  188. package/USAGE.md +0 -55
  189. package/dist/README.md +0 -159
@@ -1,38 +1,82 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useRef, useEffect } from "react";
3
+ import { useState, useRef, useEffect, useMemo, useCallback } from "react";
4
4
  import { usePathname } from "next/navigation";
5
5
  import { Flex, Row, Column, Text, Icon, ToggleButton } from "../../";
6
6
  import styles from "./MegaMenu.module.scss";
7
7
  export const MegaMenu = ({ menuGroups, className, ...rest }) => {
8
8
  const pathname = usePathname();
9
9
  const [activeDropdown, setActiveDropdown] = useState(null);
10
- const [dropdownPosition, setDropdownPosition] = useState({ left: 0, width: 0 });
10
+ const [dropdownPosition, setDropdownPosition] = useState({ left: 0, width: 0, height: 0 });
11
11
  const [isFirstAppearance, setIsFirstAppearance] = useState(true);
12
+ const previousDropdownRef = useRef(null);
12
13
  const dropdownRef = useRef(null);
13
14
  const buttonRefs = useRef({});
14
15
  const contentRefs = useRef({});
16
+ const measureTimeoutRef = useRef(undefined);
17
+ const closeTimeoutRef = useRef(undefined);
15
18
  useEffect(() => {
16
19
  if (activeDropdown && buttonRefs.current[activeDropdown]) {
17
20
  const buttonElement = buttonRefs.current[activeDropdown];
18
21
  if (buttonElement) {
19
22
  const rect = buttonElement.getBoundingClientRect();
20
23
  const parentRect = buttonElement.parentElement?.getBoundingClientRect() || { left: 0 };
21
- // Set initial position
24
+ // Set initial position immediately
22
25
  setDropdownPosition({
23
26
  left: rect.left - parentRect.left,
24
- width: 300, // Default width that will be updated
27
+ width: 300,
28
+ height: 200, // Default height
25
29
  });
26
- // Measure content after render
30
+ // Measure content dimensions after render - use double RAF for layout completion
27
31
  requestAnimationFrame(() => {
28
- const contentElement = contentRefs.current[activeDropdown];
29
- if (contentElement) {
30
- const contentWidth = contentElement.scrollWidth;
31
- setDropdownPosition((prev) => ({
32
- ...prev,
33
- width: contentWidth + 40, // Add padding
34
- }));
35
- }
32
+ requestAnimationFrame(() => {
33
+ if (dropdownRef.current) {
34
+ const dropdown = dropdownRef.current;
35
+ // Find the active content row
36
+ const activeContent = contentRefs.current[activeDropdown];
37
+ if (activeContent) {
38
+ // Find all fillWidth buttons and temporarily override their width
39
+ const fillWidthButtons = activeContent.querySelectorAll('[class*="fill-width"]');
40
+ const originalWidths = [];
41
+ fillWidthButtons.forEach((button, index) => {
42
+ originalWidths[index] = button.style.width;
43
+ button.style.width = 'max-content';
44
+ });
45
+ // Temporarily remove constraints to measure natural size
46
+ const originalHeight = dropdown.style.height;
47
+ const originalWidth = dropdown.style.width;
48
+ const originalOverflow = dropdown.style.overflow;
49
+ dropdown.style.height = 'auto';
50
+ dropdown.style.width = 'max-content';
51
+ dropdown.style.overflow = 'visible';
52
+ // Force reflow
53
+ dropdown.offsetHeight;
54
+ // Measure the active content
55
+ const contentWidth = activeContent.scrollWidth; // Use scrollWidth for full content
56
+ const contentHeight = activeContent.offsetHeight;
57
+ console.log('Content measurements:', {
58
+ activeDropdown,
59
+ contentWidth,
60
+ contentHeight,
61
+ offsetWidth: activeContent.offsetWidth,
62
+ });
63
+ // Restore button widths
64
+ fillWidthButtons.forEach((button, index) => {
65
+ button.style.width = originalWidths[index];
66
+ });
67
+ // Restore original dimensions
68
+ dropdown.style.height = originalHeight;
69
+ dropdown.style.width = originalWidth;
70
+ dropdown.style.overflow = originalOverflow;
71
+ // Add padding for the wrapper (12px on each side) + paddingTop (8px) + border (1px each side)
72
+ setDropdownPosition({
73
+ left: rect.left - parentRect.left,
74
+ width: contentWidth + 26, // Add wrapper padding (24) + border (2)
75
+ height: contentHeight + 34, // Add wrapper padding (24) + paddingTop (8) + border (2)
76
+ });
77
+ }
78
+ }
79
+ });
36
80
  });
37
81
  }
38
82
  }
@@ -40,6 +84,11 @@ export const MegaMenu = ({ menuGroups, className, ...rest }) => {
40
84
  // Reset first appearance flag when dropdown is closed
41
85
  setIsFirstAppearance(true);
42
86
  }
87
+ return () => {
88
+ if (measureTimeoutRef.current) {
89
+ clearTimeout(measureTimeoutRef.current);
90
+ }
91
+ };
43
92
  }, [activeDropdown]);
44
93
  // Reset animation flag after animation completes
45
94
  useEffect(() => {
@@ -55,51 +104,79 @@ export const MegaMenu = ({ menuGroups, className, ...rest }) => {
55
104
  setActiveDropdown(null);
56
105
  }, [pathname]);
57
106
  // Check if a menu item should be selected based on the current path
58
- const isSelected = (href) => {
107
+ const isSelected = useCallback((href) => {
59
108
  if (!href || !pathname)
60
109
  return false;
61
110
  return pathname.startsWith(href);
62
- };
63
- // Filter groups to only show those with sections in the dropdown
64
- const dropdownGroups = menuGroups.filter((group) => group.sections);
111
+ }, [pathname]);
112
+ // Filter groups to only show those with sections or custom content in the dropdown
113
+ const dropdownGroups = useMemo(() => menuGroups.filter((group) => group.sections || group.content), [menuGroups]);
65
114
  // Add click handler to close dropdown when clicking on links
66
- const handleLinkClick = (href) => {
115
+ const handleLinkClick = useCallback(() => {
67
116
  setActiveDropdown(null);
68
- // Let the default navigation happen
69
- };
70
- return (_jsxs(Flex, { gap: "8", flex: 1, className: className, ...rest, children: [menuGroups.map((group, index) => (_jsx(Row, { ref: (el) => {
117
+ }, []);
118
+ return (_jsxs(Flex, { fitHeight: true, className: className, ...rest, children: [menuGroups.map((group, index) => (_jsx(Row, { ref: (el) => {
71
119
  buttonRefs.current[group.id] = el;
72
- }, onMouseEnter: () => group.sections && setActiveDropdown(group.id), onMouseLeave: (e) => {
73
- // Check if we're not hovering over the dropdown
74
- const dropdownElement = dropdownRef.current;
75
- if (dropdownElement) {
76
- const rect = dropdownElement.getBoundingClientRect();
77
- if (e.clientX >= rect.left &&
78
- e.clientX <= rect.right &&
79
- e.clientY >= rect.top &&
80
- e.clientY <= rect.bottom) {
81
- // We're hovering over the dropdown, don't hide it
82
- return;
83
- }
120
+ }, paddingRight: "8", onMouseEnter: () => {
121
+ // Cancel any pending close
122
+ if (closeTimeoutRef.current) {
123
+ clearTimeout(closeTimeoutRef.current);
124
+ }
125
+ if (group.sections || group.content) {
126
+ // Use requestAnimationFrame to ensure this runs after any pending close
127
+ requestAnimationFrame(() => {
128
+ setActiveDropdown(group.id);
129
+ });
84
130
  }
85
- // Only hide if activeDropdown is this group
86
- if (activeDropdown === group.id) {
131
+ else {
132
+ // Close dropdown if hovering over item without dropdown content
87
133
  setActiveDropdown(null);
88
134
  }
89
- }, children: _jsxs(ToggleButton, { selected: group.selected !== undefined ? group.selected : isSelected(group.href), href: group.href, children: [group.label, group.sections && group.suffixIcon && (_jsx(Icon, { marginLeft: "8", name: group.suffixIcon, size: "xs" }))] }) }, `menu-group-${index}`))), activeDropdown && (_jsx(Row, { paddingTop: "8", ref: dropdownRef, position: "absolute", pointerEvents: "auto", opacity: 100, top: "32", className: isFirstAppearance ? styles.dropdown : "", style: {
135
+ }, onMouseLeave: () => {
136
+ // Start a timer to close the dropdown
137
+ closeTimeoutRef.current = setTimeout(() => {
138
+ setActiveDropdown(null);
139
+ }, 100);
140
+ }, children: _jsxs(ToggleButton, { selected: group.selected !== undefined ? group.selected : isSelected(group.href), href: group.href, children: [group.label, (group.sections || group.content) && group.suffixIcon && (_jsx(Icon, { marginLeft: "8", name: group.suffixIcon, size: "xs" }))] }) }, `menu-group-${index}`))), activeDropdown && (_jsx(Row, { paddingTop: "8", ref: dropdownRef, position: "absolute", pointerEvents: "auto", opacity: 100, overflow: "hidden", top: "32", className: isFirstAppearance ? styles.dropdown : "", style: {
90
141
  left: `${dropdownPosition.left}px`,
91
142
  width: `${dropdownPosition.width}px`,
92
- transition: "left 0.3s ease, width 0.3s ease",
143
+ height: `${dropdownPosition.height}px`,
144
+ transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
93
145
  visibility: "visible",
94
146
  }, onMouseEnter: () => {
95
- // Keep the current active dropdown when hovering over it
147
+ // Cancel the close timer if we re-enter
148
+ if (closeTimeoutRef.current) {
149
+ clearTimeout(closeTimeoutRef.current);
150
+ }
96
151
  }, onMouseLeave: () => {
97
- // Hide dropdown when mouse leaves it
98
- setActiveDropdown(null);
99
- }, children: _jsx(Row, { background: "surface", radius: "l", border: "neutral-alpha-weak", shadow: "xl", padding: "12", gap: "32", children: dropdownGroups.map((group, groupIndex) => activeDropdown === group.id &&
100
- group.sections && (_jsx(Row, { gap: "16", ref: (el) => {
101
- contentRefs.current[group.id] = el;
102
- }, children: group.sections.map((section, sectionIndex) => (_jsxs(Column, { minWidth: 10, gap: "4", children: [section.title && (_jsx(Text, { marginLeft: "16", marginBottom: "12", marginTop: "12", onBackground: "neutral-weak", variant: "label-default-s", children: section.title })), section.links.map((link, linkIndex) => (_jsx(ToggleButton, { className: "fit-height p-4 pr-12", style: { height: "auto" }, fillWidth: true, horizontal: "start", href: link.href, onClick: () => handleLinkClick(link.href), children: link.description ? (_jsxs(Row, { gap: "12", children: [link.icon && (_jsx(Icon, { name: link.icon, size: "s", padding: "8", radius: "s", border: "neutral-alpha-weak" })), _jsxs(Column, { gap: "4", children: [_jsx(Text, { onBackground: "neutral-strong", variant: "label-strong-s", children: link.label }), _jsx(Text, { onBackground: "neutral-weak", children: link.description })] })] })) : (link.label) }, `link-${linkIndex}`)))] }, `section-${sectionIndex}`))) }, `dropdown-content-${groupIndex}`))) }) }))] }));
152
+ // Start a timer to close the dropdown
153
+ closeTimeoutRef.current = setTimeout(() => {
154
+ setActiveDropdown(null);
155
+ }, 100);
156
+ }, children: _jsx(Row, { background: "surface", radius: "l", border: "neutral-alpha-weak", shadow: "xl", padding: "12", gap: "32", "data-dropdown-wrapper": true, style: {
157
+ transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
158
+ }, children: dropdownGroups.map((group, groupIndex) => {
159
+ const isActive = activeDropdown === group.id;
160
+ const wasActive = previousDropdownRef.current === group.id;
161
+ // Animate when switching between dropdowns (not when first opening or returning to same)
162
+ const shouldAnimate = isActive && !wasActive && previousDropdownRef.current !== null;
163
+ // Update previous ref when active changes
164
+ if (isActive && !wasActive) {
165
+ previousDropdownRef.current = group.id;
166
+ }
167
+ else if (!activeDropdown) {
168
+ previousDropdownRef.current = null;
169
+ }
170
+ return (_jsx(Row, { gap: "16", position: isActive ? "relative" : "absolute", "data-dropdown-content": true, ref: (el) => {
171
+ contentRefs.current[group.id] = el;
172
+ }, style: {
173
+ transform: isActive ? "scale(1)" : "scale(0.9)",
174
+ opacity: isActive ? 1 : 0,
175
+ pointerEvents: isActive ? "auto" : "none",
176
+ transition: shouldAnimate ? "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)" : "opacity 0.2s ease-in",
177
+ visibility: isActive ? "visible" : "hidden",
178
+ }, children: group.content ? (group.content) : (group.sections?.map((section, sectionIndex) => (_jsxs(Column, { minWidth: 12, gap: "4", children: [section.title && (_jsx(Text, { marginLeft: "8", marginBottom: "12", marginTop: "12", onBackground: "neutral-weak", variant: "label-default-s", children: section.title })), section.links.map((link, linkIndex) => (_jsx(ToggleButton, { style: { height: "auto", minHeight: "fit-content", paddingLeft: "var(--static-space-0)", paddingTop: "var(--static-space-4)", paddingBottom: "var(--static-space-4)", paddingRight: "var(--static-space-12)" }, fillWidth: true, horizontal: "start", href: link.href, onClick: handleLinkClick, children: _jsxs(Row, { gap: "12", children: [link.icon && (_jsx(Icon, { name: link.icon, size: "s", padding: "8", radius: "s", border: "neutral-alpha-weak" })), _jsxs(Column, { gap: "4", children: [link.label && (_jsx(Text, { onBackground: "neutral-strong", variant: "label-strong-s", children: link.label })), link.description && (_jsx(Text, { onBackground: "neutral-weak", truncate: true, children: link.description }))] })] }) }, `link-${linkIndex}`)))] }, `section-${sectionIndex}`)))) }, `dropdown-content-${groupIndex}`));
179
+ }) }) }))] }));
103
180
  };
104
181
  MegaMenu.displayName = "MegaMenu";
105
182
  //# sourceMappingURL=MegaMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MegaMenu.js","sourceRoot":"","sources":["../../../src/modules/navigation/MegaMenu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,MAAM,MAAM,wBAAwB,CAAC;AA6B5C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACtF,MAAM,QAAQ,GAAG,WAAW,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AAE,uBAAuB,EAAE,aAAa,EAAE,uBAAuB,EAAE,YAAY,EAAE,wBAAwB,EAAE,EAC9M,SAAS,QACT,UAAU,EAAC,OAAO,EAClB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,eAAe,YAExB,MAAC,GAAG,IAAC,GAAG,EAAC,IAAI,aACV,IAAI,CAAC,IAAI,IAAI,CACZ,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAC,GAAG,EACR,OAAO,EAAC,GAAG,EACX,MAAM,EAAC,GAAG,EACV,MAAM,EAAC,oBAAoB,GAC3B,CACH,EACD,MAAC,MAAM,IAAC,GAAG,EAAC,GAAG,aACZ,IAAI,CAAC,KAAK,IAAI,CACb,KAAC,IAAI,IAAC,YAAY,EAAC,gBAAgB,EAAC,OAAO,EAAC,gBAAgB,YACzD,IAAI,CAAC,KAAK,GACN,CACR,EACA,IAAI,CAAC,WAAW,IAAI,CACnB,KAAC,IAAI,IAAC,YAAY,EAAC,cAAc,EAAC,QAAQ,kBAAE,IAAI,CAAC,WAAW,GAAQ,CACrE,IACM,IACL,IA3BD,QAAQ,SAAS,EAAE,CA4BX,CAChB,CAAC,KA3CW,WAAW,YAAY,EAAE,CA4C/B,CACV,CAAC,CACH,IAlEM,oBAAoB,UAAU,EAAE,CAmEjC,CACP,CAAC;oBACJ,CAAC,CAAC,GACE,GACF,CACP,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@once-ui-system/core",
3
- "version": "1.4.32",
3
+ "version": "1.5.0",
4
4
  "description": "Once UI for Next.js NPM package",
5
5
  "keywords": [
6
6
  "once-ui",
@@ -13,6 +13,15 @@
13
13
  ],
14
14
  "author": "Once UI",
15
15
  "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/once-ui-system/core.git",
19
+ "directory": "packages/core"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/once-ui-system/core/issues"
23
+ },
24
+ "homepage": "https://docs.once-ui.com",
16
25
  "main": "dist/index.js",
17
26
  "exports": {
18
27
  ".": {
@@ -95,6 +95,11 @@
95
95
  border-top-left-radius: var(--radius-xl);
96
96
  }
97
97
 
98
+ .radius-full-top {
99
+ border-top-left-radius: var(--radius-full);
100
+ border-top-right-radius: var(--radius-full);
101
+ }
102
+
98
103
  .radius-xs-right {
99
104
  border-bottom-right-radius: var(--radius-xs);
100
105
  border-top-right-radius: var(--radius-xs);
@@ -120,6 +125,11 @@
120
125
  border-top-right-radius: var(--radius-xl);
121
126
  }
122
127
 
128
+ .radius-full-right {
129
+ border-bottom-right-radius: var(--radius-full);
130
+ border-top-right-radius: var(--radius-full);
131
+ }
132
+
123
133
  .radius-xs-bottom {
124
134
  border-bottom-right-radius: var(--radius-xs);
125
135
  border-bottom-left-radius: var(--radius-xs);
@@ -145,6 +155,11 @@
145
155
  border-bottom-left-radius: var(--radius-xl);
146
156
  }
147
157
 
158
+ .radius-full-bottom {
159
+ border-bottom-left-radius: var(--radius-full);
160
+ border-bottom-right-radius: var(--radius-full);
161
+ }
162
+
148
163
  .radius-xs-left {
149
164
  border-bottom-left-radius: var(--radius-xs);
150
165
  border-top-left-radius: var(--radius-xs);
@@ -170,6 +185,11 @@
170
185
  border-top-left-radius: var(--radius-xl);
171
186
  }
172
187
 
188
+ .radius-full-left {
189
+ border-bottom-left-radius: var(--radius-full);
190
+ border-top-left-radius: var(--radius-full);
191
+ }
192
+
173
193
  .radius-xs-top-left {
174
194
  border-top-left-radius: var(--radius-xs);
175
195
  }
@@ -190,6 +210,10 @@
190
210
  border-top-left-radius: var(--radius-xl);
191
211
  }
192
212
 
213
+ .radius-full-top-left {
214
+ border-top-left-radius: var(--radius-full);
215
+ }
216
+
193
217
  .radius-xs-top-right {
194
218
  border-top-right-radius: var(--radius-xs);
195
219
  }
@@ -210,6 +234,10 @@
210
234
  border-top-right-radius: var(--radius-xl);
211
235
  }
212
236
 
237
+ .radius-full-top-right {
238
+ border-top-right-radius: var(--radius-full);
239
+ }
240
+
213
241
  .radius-xs-bottom-right {
214
242
  border-bottom-right-radius: var(--radius-xs);
215
243
  }
@@ -230,6 +258,10 @@
230
258
  border-bottom-right-radius: var(--radius-xl);
231
259
  }
232
260
 
261
+ .radius-full-bottom-right {
262
+ border-bottom-right-radius: var(--radius-full);
263
+ }
264
+
233
265
  .radius-xs-bottom-left {
234
266
  border-bottom-left-radius: var(--radius-xs);
235
267
  }
@@ -250,6 +282,10 @@
250
282
  border-bottom-left-radius: var(--radius-xl);
251
283
  }
252
284
 
285
+ .radius-full-bottom-left {
286
+ border-bottom-left-radius: var(--radius-full);
287
+ }
288
+
253
289
 
254
290
 
255
291
  /****************************/
@@ -1,7 +1,14 @@
1
+ $breakpoint-xs: 480px;
1
2
  $breakpoint-s: 768px;
2
3
  $breakpoint-m: 1024px;
3
4
  $breakpoint-l: 1440px;
4
5
 
6
+ @mixin xs {
7
+ @media (max-width: #{$breakpoint-xs}) {
8
+ @content;
9
+ }
10
+ }
11
+
5
12
  @mixin s {
6
13
  @media (max-width: #{$breakpoint-s}) {
7
14
  @content;
@@ -36,6 +36,32 @@
36
36
  overflow-y: hidden;
37
37
  }
38
38
 
39
+ .scrollbar-minimal {
40
+ &::-webkit-scrollbar {
41
+ background: var(--static-transparent);
42
+ width: var(--static-space-4);
43
+ height: var(--static-space-4);
44
+ }
45
+
46
+ &::-webkit-scrollbar-track {
47
+ background: var(--static-transparent);
48
+ }
49
+
50
+ &::-webkit-scrollbar-thumb {
51
+ background: var(--neutral-alpha-medium);
52
+ transition: var(--transition-micro-medium);
53
+ border-radius: var(--radius-full);
54
+
55
+ &:hover {
56
+ background: var(--neutral-alpha-strong);
57
+ }
58
+ }
59
+
60
+ &::-webkit-scrollbar-corner {
61
+ background-color: var(--static-transparent);
62
+ }
63
+ }
64
+
39
65
  @include breakpoints.l {
40
66
  .l-overflow-auto {
41
67
  overflow: auto;
@@ -150,6 +176,44 @@
150
176
  }
151
177
  }
152
178
 
179
+ @include breakpoints.xs {
180
+ .xs-overflow-auto {
181
+ overflow: auto;
182
+ }
183
+
184
+ .xs-overflow-x-scroll{
185
+ overflow-x: scroll;
186
+ }
187
+
188
+ .xs-overflow-x-auto {
189
+ overflow-x: auto;
190
+ }
191
+
192
+ .xs-overflow-y-auto{
193
+ overflow-y: auto;
194
+ }
195
+
196
+ .xs-overflow-y-scroll{
197
+ overflow-y: scroll;
198
+ }
199
+
200
+ .xs-overflow-hidden {
201
+ overflow: hidden;
202
+ }
203
+
204
+ .xs-overflow-scroll{
205
+ overflow: scroll;
206
+ }
207
+
208
+ .xs-overflow-x-hidden {
209
+ overflow-x: hidden;
210
+ }
211
+
212
+ .xs-overflow-y-hidden{
213
+ overflow-y: hidden;
214
+ }
215
+ }
216
+
153
217
  .opacity-0 {
154
218
  opacity: 0;
155
219
  }
@@ -428,4 +428,91 @@
428
428
  align-items: center;
429
429
  justify-content: center;
430
430
  }
431
+ }
432
+
433
+ @include breakpoints.xs {
434
+ .xs-flex-hide {
435
+ display: none;
436
+ }
437
+
438
+ .xs-flex-show {
439
+ display: flex;
440
+ }
441
+
442
+ .xs-flex-column {
443
+ flex-direction: column;
444
+ }
445
+
446
+ .xs-flex-row {
447
+ flex-direction: row;
448
+ }
449
+
450
+ .xs-flex-column-reverse {
451
+ flex-direction: column-reverse;
452
+ }
453
+
454
+ .xs-flex-row-reverse {
455
+ flex-direction: row-reverse;
456
+ }
457
+
458
+ .xs-justify-start {
459
+ justify-content: flex-start;
460
+ }
461
+
462
+ .xs-justify-center {
463
+ justify-content: center;
464
+ }
465
+
466
+ .xs-justify-end {
467
+ justify-content: flex-end;
468
+ }
469
+
470
+ .xs-justify-between {
471
+ justify-content: space-between;
472
+ }
473
+
474
+ .xs-justify-around {
475
+ justify-content: space-around;
476
+ }
477
+
478
+ .xs-justify-even {
479
+ justify-content: space-evenly;
480
+ }
481
+
482
+ .xs-justify-stretch {
483
+ justify-content: stretch;
484
+ }
485
+
486
+ .xs-align-start {
487
+ align-items: flex-start;
488
+ }
489
+
490
+ .xs-align-center {
491
+ align-items: center;
492
+ }
493
+
494
+ .xs-align-end {
495
+ align-items: flex-end;
496
+ }
497
+
498
+ .xs-align-between {
499
+ align-items: space-between;
500
+ }
501
+
502
+ .xs-align-around {
503
+ align-items: space-around;
504
+ }
505
+
506
+ .xs-align-even {
507
+ align-items: space-evenly;
508
+ }
509
+
510
+ .xs-align-stretch {
511
+ align-items: stretch;
512
+ }
513
+
514
+ .xs-center {
515
+ align-items: center;
516
+ justify-content: center;
517
+ }
431
518
  }
@@ -1,5 +1,8 @@
1
1
  * {
2
2
  box-sizing: border-box;
3
+ }
4
+
5
+ html {
3
6
  scroll-behavior: smooth;
4
7
  }
5
8
 
@@ -30,28 +33,4 @@ a:not(.button) {
30
33
  text-decoration: none;
31
34
  color: var(--brand-on-background-strong);
32
35
  }
33
- }
34
-
35
- /* SCROLLBAR */
36
- ::-webkit-scrollbar {
37
- background: var(--static-transparent);
38
- width: var(--static-space-8);
39
- height: var(--static-space-8);
40
- }
41
-
42
- ::-webkit-scrollbar-track {
43
- background: var(--static-transparent);
44
- }
45
-
46
- ::-webkit-scrollbar-thumb {
47
- background: var(--neutral-alpha-medium);
48
- transition: var(--transition-micro-medium);
49
-
50
- &:hover {
51
- background: var(--neutral-alpha-strong);
52
- }
53
- }
54
-
55
- ::-webkit-scrollbar-corner {
56
- background-color: var(--static-transparent);
57
36
  }
@@ -232,4 +232,62 @@
232
232
  .s-grid-show {
233
233
  display: grid;
234
234
  }
235
+ }
236
+
237
+ @include breakpoints.xs {
238
+ .xs-columns-1 {
239
+ grid-template-columns: 1fr;
240
+ }
241
+
242
+ .xs-columns-2 {
243
+ grid-template-columns: repeat(2, 1fr);
244
+ }
245
+
246
+ .xs-columns-3 {
247
+ grid-template-columns: repeat(3, 1fr);
248
+ }
249
+
250
+ .xs-columns-4 {
251
+ grid-template-columns: repeat(4, 1fr);
252
+ }
253
+
254
+ .xs-columns-5 {
255
+ grid-template-columns: repeat(5, 1fr);
256
+ }
257
+
258
+ .xs-columns-6 {
259
+ grid-template-columns: repeat(6, 1fr);
260
+ }
261
+
262
+ .xs-columns-7 {
263
+ grid-template-columns: repeat(7, 1fr);
264
+ }
265
+
266
+ .xs-columns-8 {
267
+ grid-template-columns: repeat(8, 1fr);
268
+ }
269
+
270
+ .xs-columns-9 {
271
+ grid-template-columns: repeat(9, 1fr);
272
+ }
273
+
274
+ .xs-columns-10 {
275
+ grid-template-columns: repeat(10, 1fr);
276
+ }
277
+
278
+ .xs-columns-11 {
279
+ grid-template-columns: repeat(11, 1fr);
280
+ }
281
+
282
+ .xs-columns-12 {
283
+ grid-template-columns: repeat(12, 1fr);
284
+ }
285
+
286
+ .xs-grid-hide {
287
+ display: none;
288
+ }
289
+
290
+ .xs-grid-show {
291
+ display: grid;
292
+ }
235
293
  }