@once-ui-system/core 1.3.14 → 1.4.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.
- package/dist/components/Accordion.d.ts +1 -0
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js +18 -10
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/AccordionGroup.d.ts +1 -0
- package/dist/components/AccordionGroup.d.ts.map +1 -1
- package/dist/components/AccordionGroup.js +18 -3
- package/dist/components/AccordionGroup.js.map +1 -1
- package/dist/components/ArrowNavigationContext.d.ts +33 -0
- package/dist/components/ArrowNavigationContext.d.ts.map +1 -0
- package/dist/components/ArrowNavigationContext.js +60 -0
- package/dist/components/ArrowNavigationContext.js.map +1 -0
- package/dist/components/AutoScroll.js +1 -1
- package/dist/components/AutoScroll.js.map +1 -1
- package/dist/components/Button.d.ts +2 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +3 -3
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Button.module.scss +31 -8
- package/dist/components/Carousel.js +5 -5
- package/dist/components/Carousel.js.map +1 -1
- package/dist/components/ClientFlex.d.ts +7 -0
- package/dist/components/ClientFlex.d.ts.map +1 -0
- package/dist/components/ClientFlex.js +95 -0
- package/dist/components/ClientFlex.js.map +1 -0
- package/dist/components/ClientGrid.d.ts +7 -0
- package/dist/components/ClientGrid.d.ts.map +1 -0
- package/dist/components/ClientGrid.js +95 -0
- package/dist/components/ClientGrid.js.map +1 -0
- package/dist/components/Column.d.ts.map +1 -1
- package/dist/components/Column.js +1 -0
- package/dist/components/Column.js.map +1 -1
- package/dist/components/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu.js +13 -1
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/CountFx.d.ts +14 -0
- package/dist/components/CountFx.d.ts.map +1 -0
- package/dist/components/CountFx.js +195 -0
- package/dist/components/CountFx.js.map +1 -0
- package/dist/components/Cursor.d.ts +8 -0
- package/dist/components/Cursor.d.ts.map +1 -0
- package/dist/components/Cursor.js +79 -0
- package/dist/components/Cursor.js.map +1 -0
- package/dist/components/CursorCard.js +1 -1
- package/dist/components/CursorCard.js.map +1 -1
- package/dist/components/DateInput.d.ts +2 -0
- package/dist/components/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput.js +8 -7
- package/dist/components/DateInput.js.map +1 -1
- package/dist/components/DatePicker.d.ts +3 -0
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker.js +297 -23
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/DateRangeInput.d.ts.map +1 -1
- package/dist/components/DateRangeInput.js +6 -3
- package/dist/components/DateRangeInput.js.map +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown.js +3 -1
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/DropdownWrapper.d.ts +8 -0
- package/dist/components/DropdownWrapper.d.ts.map +1 -1
- package/dist/components/DropdownWrapper.js +237 -79
- package/dist/components/DropdownWrapper.js.map +1 -1
- package/dist/components/ElementType.js +1 -1
- package/dist/components/ElementType.js.map +1 -1
- package/dist/components/EmojiPicker.d.ts +2 -3
- package/dist/components/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker.js.map +1 -1
- package/dist/components/EmojiPickerDropdown.d.ts +2 -2
- package/dist/components/EmojiPickerDropdown.d.ts.map +1 -1
- package/dist/components/Feedback.d.ts.map +1 -1
- package/dist/components/Feedback.js +1 -1
- package/dist/components/Feedback.js.map +1 -1
- package/dist/components/Flex.d.ts +4 -3
- package/dist/components/Flex.d.ts.map +1 -1
- package/dist/components/Flex.js +135 -94
- package/dist/components/Flex.js.map +1 -1
- package/dist/components/FocusTrap.d.ts +16 -0
- package/dist/components/FocusTrap.d.ts.map +1 -0
- package/dist/components/FocusTrap.js +82 -0
- package/dist/components/FocusTrap.js.map +1 -0
- package/dist/components/Grid.d.ts +3 -5
- package/dist/components/Grid.d.ts.map +1 -1
- package/dist/components/Grid.js +135 -62
- package/dist/components/Grid.js.map +1 -1
- package/dist/components/HoloFx.js +3 -3
- package/dist/components/HoloFx.js.map +1 -1
- package/dist/components/List.d.ts +11 -0
- package/dist/components/List.d.ts.map +1 -0
- package/dist/components/List.js +15 -0
- package/dist/components/List.js.map +1 -0
- package/dist/components/List.module.scss +30 -0
- package/dist/components/ListItem.d.ts +10 -0
- package/dist/components/ListItem.d.ts.map +1 -0
- package/dist/components/ListItem.js +12 -0
- package/dist/components/ListItem.js.map +1 -0
- package/dist/components/Media.d.ts +3 -1
- package/dist/components/Media.d.ts.map +1 -1
- package/dist/components/Media.js +18 -18
- package/dist/components/Media.js.map +1 -1
- package/dist/components/OgCard.d.ts +9 -10
- package/dist/components/OgCard.d.ts.map +1 -1
- package/dist/components/OgCard.js +43 -29
- package/dist/components/OgCard.js.map +1 -1
- package/dist/components/Option.d.ts +1 -0
- package/dist/components/Option.d.ts.map +1 -1
- package/dist/components/Option.js +52 -13
- package/dist/components/Option.js.map +1 -1
- package/dist/components/Option.module.scss +14 -3
- package/dist/components/ProgressBar.d.ts +15 -0
- package/dist/components/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar.js +12 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/RevealFx.d.ts +1 -1
- package/dist/components/RevealFx.d.ts.map +1 -1
- package/dist/components/RevealFx.js +3 -0
- package/dist/components/RevealFx.js.map +1 -1
- package/dist/components/RevealFx.module.scss +1 -1
- package/dist/components/Row.d.ts.map +1 -1
- package/dist/components/Row.js +1 -0
- package/dist/components/Row.js.map +1 -1
- package/dist/components/Select.d.ts +3 -2
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +82 -178
- package/dist/components/Select.js.map +1 -1
- package/dist/components/ServerFlex.d.ts +6 -0
- package/dist/components/ServerFlex.d.ts.map +1 -0
- package/dist/components/ServerFlex.js +123 -0
- package/dist/components/ServerFlex.js.map +1 -0
- package/dist/components/ServerGrid.d.ts +7 -0
- package/dist/components/ServerGrid.d.ts.map +1 -0
- package/dist/components/ServerGrid.js +74 -0
- package/dist/components/ServerGrid.js.map +1 -0
- package/dist/components/StylePanel.js +10 -10
- package/dist/components/StylePanel.js.map +1 -1
- package/dist/components/Switch.js +1 -1
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/ToggleButton.d.ts +1 -1
- package/dist/components/ToggleButton.d.ts.map +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +11 -0
- package/dist/components/index.js.map +1 -1
- package/dist/contexts/LayoutContext.d.ts +24 -0
- package/dist/contexts/LayoutContext.d.ts.map +1 -0
- package/dist/contexts/LayoutContext.js +72 -0
- package/dist/contexts/LayoutContext.js.map +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/contexts/index.js +1 -0
- package/dist/contexts/index.js.map +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/css/styles.css.map +1 -1
- package/dist/data/emoji-data.json +0 -10
- package/dist/hooks/useArrowNavigation.d.ts +23 -0
- package/dist/hooks/useArrowNavigation.d.ts.map +1 -0
- package/dist/hooks/useArrowNavigation.js +208 -0
- package/dist/hooks/useArrowNavigation.js.map +1 -0
- package/dist/hooks/useFetchOg.d.ts.map +1 -1
- package/dist/hooks/useFetchOg.js +8 -0
- package/dist/hooks/useFetchOg.js.map +1 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +3 -2
- package/dist/icons.js.map +1 -1
- package/dist/interfaces.d.ts +56 -16
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.js +4 -4
- package/dist/modules/code/CodeBlock.js.map +1 -1
- package/dist/modules/data/BarChart.d.ts.map +1 -1
- package/dist/modules/data/BarChart.js +2 -2
- package/dist/modules/data/BarChart.js.map +1 -1
- package/dist/modules/data/ChartHeader.js +1 -1
- package/dist/modules/data/ChartHeader.js.map +1 -1
- package/dist/modules/data/ChartStatus.d.ts +3 -1
- package/dist/modules/data/ChartStatus.d.ts.map +1 -1
- package/dist/modules/data/ChartStatus.js +3 -3
- package/dist/modules/data/ChartStatus.js.map +1 -1
- package/dist/modules/data/DataTooltip.d.ts.map +1 -1
- package/dist/modules/data/DataTooltip.js +2 -22
- package/dist/modules/data/DataTooltip.js.map +1 -1
- package/dist/modules/data/LineBarChart.d.ts.map +1 -1
- package/dist/modules/data/LineBarChart.js +2 -2
- package/dist/modules/data/LineBarChart.js.map +1 -1
- package/dist/modules/data/LineChart.d.ts.map +1 -1
- package/dist/modules/data/LineChart.js +2 -2
- package/dist/modules/data/LineChart.js.map +1 -1
- package/dist/modules/data/PieChart.d.ts.map +1 -1
- package/dist/modules/data/PieChart.js +2 -2
- package/dist/modules/data/PieChart.js.map +1 -1
- package/dist/modules/data/interfaces.d.ts +2 -0
- package/dist/modules/data/interfaces.d.ts.map +1 -1
- package/dist/modules/navigation/HeadingLink.js +1 -1
- package/dist/modules/navigation/HeadingLink.js.map +1 -1
- package/dist/modules/navigation/Kbar.d.ts +2 -0
- package/dist/modules/navigation/Kbar.d.ts.map +1 -1
- package/dist/modules/navigation/Kbar.js +8 -12
- package/dist/modules/navigation/Kbar.js.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/styles/border.scss +10 -0
- package/dist/styles/display.scss +116 -0
- package/dist/styles/flex.scss +305 -6
- package/dist/styles/global.scss +0 -33
- package/dist/styles/grid.scss +110 -24
- package/dist/styles/index.scss +13 -14
- package/dist/styles/position.scss +932 -0
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +102 -100
- package/dist/styles/layout.scss +0 -119
- package/next-env.d.ts +0 -5
package/dist/components/Flex.js
CHANGED
|
@@ -1,103 +1,144 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from "classnames";
|
|
3
2
|
import { forwardRef } from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
3
|
+
import { ClientFlex, ServerFlex } from ".";
|
|
4
|
+
import { useLayout } from "../contexts/LayoutContext";
|
|
5
|
+
const Flex = forwardRef(({ cursor, l, m, s, style, hide, show, ...props }, ref) => {
|
|
6
|
+
// Check if component should be hidden based on layout context
|
|
7
|
+
const shouldHide = () => {
|
|
8
|
+
if (!hide && !show && !l?.hide && !m?.hide && !s?.hide && !l?.show && !m?.show && !s?.show)
|
|
9
|
+
return false;
|
|
10
|
+
try {
|
|
11
|
+
const { isBreakpoint } = useLayout();
|
|
12
|
+
// Check direct hide conditions
|
|
13
|
+
if (hide) {
|
|
14
|
+
if (typeof hide === 'boolean' && hide)
|
|
15
|
+
return true;
|
|
16
|
+
if (typeof hide === 'object' && hide.s && isBreakpoint('s'))
|
|
17
|
+
return true;
|
|
18
|
+
if (typeof hide === 'object' && hide.m && isBreakpoint('m'))
|
|
19
|
+
return true;
|
|
20
|
+
if (typeof hide === 'object' && hide.l && isBreakpoint('l'))
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
// Check hide conditions in responsive props
|
|
24
|
+
if (s?.hide) {
|
|
25
|
+
if (typeof s.hide === 'boolean' && s.hide && isBreakpoint('s'))
|
|
26
|
+
return true;
|
|
27
|
+
if (typeof s.hide === 'object' && s.hide.s && isBreakpoint('s'))
|
|
28
|
+
return true;
|
|
29
|
+
if (typeof s.hide === 'object' && s.hide.m && isBreakpoint('m'))
|
|
30
|
+
return true;
|
|
31
|
+
if (typeof s.hide === 'object' && s.hide.l && isBreakpoint('l'))
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
if (m?.hide) {
|
|
35
|
+
if (typeof m.hide === 'boolean' && m.hide && isBreakpoint('m'))
|
|
36
|
+
return true;
|
|
37
|
+
if (typeof m.hide === 'object' && m.hide.s && isBreakpoint('s'))
|
|
38
|
+
return true;
|
|
39
|
+
if (typeof m.hide === 'object' && m.hide.m && isBreakpoint('m'))
|
|
40
|
+
return true;
|
|
41
|
+
if (typeof m.hide === 'object' && m.hide.l && isBreakpoint('l'))
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
if (l?.hide) {
|
|
45
|
+
if (typeof l.hide === 'boolean' && l.hide && isBreakpoint('l'))
|
|
46
|
+
return true;
|
|
47
|
+
if (typeof l.hide === 'object' && l.hide.s && isBreakpoint('s'))
|
|
48
|
+
return true;
|
|
49
|
+
if (typeof l.hide === 'object' && l.hide.m && isBreakpoint('m'))
|
|
50
|
+
return true;
|
|
51
|
+
if (typeof l.hide === 'object' && l.hide.l && isBreakpoint('l'))
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
// Check direct show conditions
|
|
55
|
+
if (show) {
|
|
56
|
+
if (typeof show === 'boolean' && show)
|
|
57
|
+
return false;
|
|
58
|
+
if (typeof show === 'object' && show.s && isBreakpoint('s'))
|
|
59
|
+
return false;
|
|
60
|
+
if (typeof show === 'object' && show.m && isBreakpoint('m'))
|
|
61
|
+
return false;
|
|
62
|
+
if (typeof show === 'object' && show.l && isBreakpoint('l'))
|
|
63
|
+
return false;
|
|
64
|
+
// If show is specified but current breakpoint doesn't match, hide
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
// Check show conditions in responsive props
|
|
68
|
+
if (s?.show) {
|
|
69
|
+
if (typeof s.show === 'boolean' && s.show && isBreakpoint('s'))
|
|
70
|
+
return false;
|
|
71
|
+
if (typeof s.show === 'object' && s.show.s && isBreakpoint('s'))
|
|
72
|
+
return false;
|
|
73
|
+
if (typeof s.show === 'object' && s.show.m && isBreakpoint('m'))
|
|
74
|
+
return false;
|
|
75
|
+
if (typeof s.show === 'object' && s.show.l && isBreakpoint('l'))
|
|
76
|
+
return false;
|
|
77
|
+
// If show is specified but current breakpoint doesn't match, hide
|
|
78
|
+
if (isBreakpoint('s'))
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
if (m?.show) {
|
|
82
|
+
if (typeof m.show === 'boolean' && m.show && isBreakpoint('m'))
|
|
83
|
+
return false;
|
|
84
|
+
if (typeof m.show === 'object' && m.show.s && isBreakpoint('s'))
|
|
85
|
+
return false;
|
|
86
|
+
if (typeof m.show === 'object' && m.show.m && isBreakpoint('m'))
|
|
87
|
+
return false;
|
|
88
|
+
if (typeof m.show === 'object' && m.show.l && isBreakpoint('l'))
|
|
89
|
+
return false;
|
|
90
|
+
// If show is specified but current breakpoint doesn't match, hide
|
|
91
|
+
if (isBreakpoint('m'))
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
if (l?.show) {
|
|
95
|
+
if (typeof l.show === 'boolean' && l.show && isBreakpoint('l'))
|
|
96
|
+
return false;
|
|
97
|
+
if (typeof l.show === 'object' && l.show.s && isBreakpoint('s'))
|
|
98
|
+
return false;
|
|
99
|
+
if (typeof l.show === 'object' && l.show.m && isBreakpoint('m'))
|
|
100
|
+
return false;
|
|
101
|
+
if (typeof l.show === 'object' && l.show.l && isBreakpoint('l'))
|
|
102
|
+
return false;
|
|
103
|
+
// If show is specified but current breakpoint doesn't match, hide
|
|
104
|
+
if (isBreakpoint('l'))
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
35
108
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return `${scheme}-${type}-alpha-${weight}`;
|
|
109
|
+
catch {
|
|
110
|
+
// If LayoutProvider is not available, fall back to CSS classes
|
|
111
|
+
return false;
|
|
40
112
|
}
|
|
41
|
-
const [scheme, weight] = value.split("-");
|
|
42
|
-
return `${scheme}-${type}-${weight}`;
|
|
43
113
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
return `${value}rem`;
|
|
62
|
-
if ([
|
|
63
|
-
"0",
|
|
64
|
-
"1",
|
|
65
|
-
"2",
|
|
66
|
-
"4",
|
|
67
|
-
"8",
|
|
68
|
-
"12",
|
|
69
|
-
"16",
|
|
70
|
-
"20",
|
|
71
|
-
"24",
|
|
72
|
-
"32",
|
|
73
|
-
"40",
|
|
74
|
-
"48",
|
|
75
|
-
"56",
|
|
76
|
-
"64",
|
|
77
|
-
"80",
|
|
78
|
-
"104",
|
|
79
|
-
"128",
|
|
80
|
-
"160",
|
|
81
|
-
].includes(value)) {
|
|
82
|
-
return `var(--static-space-${value})`;
|
|
83
|
-
}
|
|
84
|
-
if (["xs", "s", "m", "l", "xl"].includes(value)) {
|
|
85
|
-
return `var(--responsive-${type}-${value})`;
|
|
86
|
-
}
|
|
87
|
-
return undefined;
|
|
88
|
-
};
|
|
89
|
-
const combinedStyle = {
|
|
90
|
-
maxWidth: parseDimension(maxWidth, "width"),
|
|
91
|
-
minWidth: parseDimension(minWidth, "width"),
|
|
92
|
-
minHeight: parseDimension(minHeight, "height"),
|
|
93
|
-
maxHeight: parseDimension(maxHeight, "height"),
|
|
94
|
-
width: parseDimension(width, "width"),
|
|
95
|
-
height: parseDimension(height, "height"),
|
|
96
|
-
aspectRatio: aspectRatio,
|
|
97
|
-
textAlign: align,
|
|
98
|
-
...style,
|
|
114
|
+
// Check if we need client-side functionality
|
|
115
|
+
const needsClientSide = () => {
|
|
116
|
+
// Custom cursor requires client-side
|
|
117
|
+
if (typeof cursor === 'object' && cursor)
|
|
118
|
+
return true;
|
|
119
|
+
// Responsive props require client-side
|
|
120
|
+
if (l || m || s)
|
|
121
|
+
return true;
|
|
122
|
+
// Dynamic styles require client-side
|
|
123
|
+
if (style && typeof style === 'object' && Object.keys(style).length > 0)
|
|
124
|
+
return true;
|
|
125
|
+
// Responsive hide/show requires client-side
|
|
126
|
+
if (hide && (typeof hide === 'object' && (hide.s || hide.m || hide.l)))
|
|
127
|
+
return true;
|
|
128
|
+
if (show && (typeof show === 'object' && (show.s || show.m || show.l)))
|
|
129
|
+
return true;
|
|
130
|
+
return false;
|
|
99
131
|
};
|
|
100
|
-
|
|
132
|
+
// If component should be hidden, don't render it
|
|
133
|
+
if (shouldHide()) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
// Use client component if any client-side functionality is needed
|
|
137
|
+
if (needsClientSide()) {
|
|
138
|
+
return _jsx(ClientFlex, { ref: ref, cursor: cursor, l: l, m: m, s: s, style: style, hide: hide, show: show, ...props });
|
|
139
|
+
}
|
|
140
|
+
// Use server component for static content
|
|
141
|
+
return _jsx(ServerFlex, { ref: ref, cursor: cursor, hide: hide, show: show, ...props });
|
|
101
142
|
});
|
|
102
143
|
Flex.displayName = "Flex";
|
|
103
144
|
export { Flex };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../src/components/Flex.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../src/components/Flex.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,U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,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QACpF,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAEpF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,iDAAiD;IACjD,IAAI,UAAU,EAAE,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kEAAkE;IAClE,IAAI,eAAe,EAAE,EAAE,CAAC;QACtB,OAAO,KAAC,UAAU,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAM,KAAK,GAAI,CAAC;IACrH,CAAC;IAED,0CAA0C;IAC1C,OAAO,KAAC,UAAU,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAM,KAAK,GAAI,CAAC;AACrF,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode, RefObject } from "react";
|
|
2
|
+
interface FocusTrapProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
active: boolean;
|
|
5
|
+
onEscape?: () => void;
|
|
6
|
+
containerRef?: RefObject<HTMLDivElement>;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
initialFocusRef?: RefObject<HTMLElement>;
|
|
10
|
+
returnFocusRef?: RefObject<HTMLElement>;
|
|
11
|
+
restoreFocus?: boolean;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const FocusTrap: React.FC<FocusTrapProps>;
|
|
15
|
+
export { FocusTrap };
|
|
16
|
+
//# sourceMappingURL=FocusTrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusTrap.d.ts","sourceRoot":"","sources":["../../src/components/FocusTrap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtF,UAAU,cAAc;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,eAAe,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyGvC,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useEffect } from "react";
|
|
4
|
+
const FocusTrap = ({ children, active, onEscape, containerRef: externalRef, className, style, initialFocusRef, returnFocusRef, restoreFocus = true, autoFocus = true, }) => {
|
|
5
|
+
const internalRef = useRef(null);
|
|
6
|
+
const containerRef = externalRef || internalRef;
|
|
7
|
+
const previouslyFocusedElement = useRef(null);
|
|
8
|
+
// Store the previously focused element when the trap becomes active
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (active) {
|
|
11
|
+
previouslyFocusedElement.current = document.activeElement;
|
|
12
|
+
if (autoFocus) {
|
|
13
|
+
// Focus the specified initial element or the first focusable element
|
|
14
|
+
if (initialFocusRef && initialFocusRef.current) {
|
|
15
|
+
initialFocusRef.current.focus({ preventScroll: true });
|
|
16
|
+
}
|
|
17
|
+
else if (containerRef.current) {
|
|
18
|
+
const focusableElements = getFocusableElements(containerRef.current);
|
|
19
|
+
if (focusableElements.length > 0) {
|
|
20
|
+
focusableElements[0].focus({ preventScroll: true });
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
// If no focusable elements, focus the container itself
|
|
24
|
+
containerRef.current.focus({ preventScroll: true });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if (!active && restoreFocus && previouslyFocusedElement.current) {
|
|
30
|
+
// When deactivated, return focus to the specified element or the previously focused element
|
|
31
|
+
const elementToFocus = returnFocusRef?.current || previouslyFocusedElement.current;
|
|
32
|
+
if (elementToFocus && typeof elementToFocus.focus === 'function') {
|
|
33
|
+
elementToFocus.focus({ preventScroll: true });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}, [active, autoFocus, initialFocusRef, returnFocusRef, restoreFocus, containerRef]);
|
|
37
|
+
// Handle keyboard events for focus trapping
|
|
38
|
+
const handleKeyDown = (e) => {
|
|
39
|
+
if (!active)
|
|
40
|
+
return;
|
|
41
|
+
// Handle escape key
|
|
42
|
+
if (e.key === "Escape" && onEscape) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
onEscape();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// Don't handle arrow keys - let ArrowNavigation handle them
|
|
48
|
+
if (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
// Handle tab key for focus trapping
|
|
52
|
+
if (e.key === "Tab" && containerRef.current) {
|
|
53
|
+
const focusableElements = getFocusableElements(containerRef.current);
|
|
54
|
+
if (focusableElements.length === 0)
|
|
55
|
+
return;
|
|
56
|
+
// Get the first and last focusable elements
|
|
57
|
+
const firstElement = focusableElements[0];
|
|
58
|
+
const lastElement = focusableElements[focusableElements.length - 1];
|
|
59
|
+
// Handle tab and shift+tab to cycle through focusable elements
|
|
60
|
+
if (e.shiftKey) { // Shift+Tab
|
|
61
|
+
if (document.activeElement === firstElement) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
lastElement.focus({ preventScroll: true });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else { // Tab
|
|
67
|
+
if (document.activeElement === lastElement) {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
firstElement.focus({ preventScroll: true });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
// Helper function to get all focusable elements within a container
|
|
75
|
+
const getFocusableElements = (container) => {
|
|
76
|
+
return Array.from(container.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
|
|
77
|
+
};
|
|
78
|
+
return (_jsx("div", { ref: containerRef, className: className, style: style, onKeyDown: handleKeyDown, tabIndex: -1, children: children }));
|
|
79
|
+
};
|
|
80
|
+
FocusTrap.displayName = "FocusTrap";
|
|
81
|
+
export { FocusTrap };
|
|
82
|
+
//# sourceMappingURL=FocusTrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusTrap.js","sourceRoot":"","sources":["../../src/components/FocusTrap.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,MAAM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AEpE,+DAA+D;YAC/D,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,YAAY;gBAC5B,IAAI,QAAQ,CAAC,aAAa,KAAK,YAAY,EAAE,CAAC;oBAC5C,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,WAAW,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC;iBAAM,CAAC,CAAC,MAAM;gBACb,IAAI,QAAQ,CAAC,aAAa,KAAK,WAAW,EAAE,CAAC;oBAC3C,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,YAAY,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,mEAAmE;IACnE,MAAM,oBAAoB,GAAG,CAAC,SAAsB,EAAiB,EAAE;QACrE,OAAO,KAAK,CAAC,IAAI,CACf,SAAS,CAAC,gBAAgB,CACxB,0EAA0E,CAC3E,CACe,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,CACL,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,CAAC,CAAC,YAEX,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
interface ComponentProps extends GridProps, SpacingProps, SizeProps, StyleProps, CommonProps, DisplayProps, ConditionalProps {
|
|
1
|
+
import { GridProps, StyleProps, SpacingProps, SizeProps, CommonProps, DisplayProps } from "../interfaces";
|
|
2
|
+
interface SmartGridProps extends GridProps, StyleProps, SpacingProps, SizeProps, CommonProps, DisplayProps {
|
|
4
3
|
}
|
|
5
|
-
declare const Grid:
|
|
4
|
+
declare const Grid: import("react").ForwardRefExoticComponent<SmartGridProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
5
|
export { Grid };
|
|
7
|
-
export type { GridProps };
|
|
8
6
|
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/components/Grid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/components/Grid.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG1G,UAAU,cAAe,SAAQ,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY;CAAG;AAE7G,QAAA,MAAM,IAAI,2GAiHR,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC"}
|