@kimdw-rtk/ui 0.1.7 → 0.1.8
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/Accordion.cjs +17 -0
- package/dist/components/Accordion/Accordion.css.vanilla.cjs +11 -0
- package/dist/components/Accordion/AccordionContent.cjs +61 -0
- package/dist/components/Accordion/AccordionContent.css.vanilla.cjs +14 -0
- package/dist/components/Accordion/AccordionContext.cjs +11 -0
- package/dist/components/Accordion/AccordionTrigger.cjs +19 -0
- package/dist/components/Accordion/AccordionTrigger.css.vanilla.cjs +14 -0
- package/dist/components/Alert/index.cjs +17 -0
- package/dist/components/Box/Box.css.vanilla.cjs +11 -0
- package/dist/components/Box/index.cjs +16 -0
- package/dist/components/Button/Button.css.vanilla.cjs +15 -0
- package/dist/components/Button/index.cjs +26 -0
- package/dist/components/Card/Card.cjs +15 -0
- package/dist/components/Card/Card.css.vanilla.cjs +14 -0
- package/dist/components/Card/CardContent.cjs +14 -0
- package/dist/components/Card/CardContent.css.vanilla.cjs +12 -0
- package/dist/components/Card/CardHeader.cjs +14 -0
- package/dist/components/Card/CardHeader.css.vanilla.cjs +12 -0
- package/dist/components/Card/CardInteraction.cjs +18 -0
- package/dist/components/Card/CardInteraction.css.vanilla.cjs +10 -0
- package/dist/components/Card/CardThumbnail.cjs +14 -0
- package/dist/components/Card/CardThumbnail.css.vanilla.cjs +10 -0
- package/dist/components/Chip/Chip.cjs +15 -0
- package/dist/components/Chip/Chip.css.vanilla.cjs +11 -0
- package/dist/components/Confirm/index.cjs +22 -0
- package/dist/components/Container/Container.css.vanilla.cjs +11 -0
- package/dist/components/Container/index.cjs +16 -0
- package/dist/components/Dialog/Dialog.cjs +15 -0
- package/dist/components/Dialog/Dialog.css.vanilla.cjs +7 -0
- package/dist/components/Dialog/DialogContent.cjs +15 -0
- package/dist/components/Dialog/DialogContent.css.vanilla.cjs +11 -0
- package/dist/components/Dialog/DialogFooter.cjs +14 -0
- package/dist/components/Dialog/DialogHeader.cjs +16 -0
- package/dist/components/Dialog/DialogHeader.css.vanilla.cjs +12 -0
- package/dist/components/Flex/Flex.css.vanilla.cjs +10 -0
- package/dist/components/Flex/index.cjs +16 -0
- package/dist/components/Navigation/NavigationAside.cjs +15 -0
- package/dist/components/Navigation/NavigationAside.css.vanilla.cjs +10 -0
- package/dist/components/Navigation/NavigationBar.cjs +18 -0
- package/dist/components/Navigation/NavigationBar.css.vanilla.cjs +13 -0
- package/dist/components/Navigation/NavigationContainer.cjs +15 -0
- package/dist/components/Navigation/NavigationContainer.css.vanilla.cjs +7 -0
- package/dist/components/Navigation/NavigationDrawer.cjs +30 -0
- package/dist/components/Navigation/NavigationDrawer.css.vanilla.cjs +16 -0
- package/dist/components/Navigation/NavigationItem.cjs +14 -0
- package/dist/components/Navigation/NavigationItem.css.vanilla.cjs +13 -0
- package/dist/components/Navigation/NavigationLogo.cjs +14 -0
- package/dist/components/Navigation/NavigationLogo.css.vanilla.cjs +10 -0
- package/dist/components/Navigation/NavigationMenu.cjs +15 -0
- package/dist/components/Navigation/NavigationMenu.css.vanilla.cjs +12 -0
- package/dist/components/Portal/index.cjs +12 -0
- package/dist/components/Range/Range.cjs +42 -0
- package/dist/components/Range/Range.css.vanilla.cjs +17 -0
- package/dist/components/ScrollArea/ScrollArea.cjs +39 -0
- package/dist/components/ScrollArea/ScrollArea.css.vanilla.cjs +18 -0
- package/dist/components/Select/Select.cjs +51 -0
- package/dist/components/Select/Select.css.vanilla.cjs +11 -0
- package/dist/components/Select/SelectContext.cjs +36 -0
- package/dist/components/Select/SelectOption.cjs +28 -0
- package/dist/components/Select/SelectOption.css.vanilla.cjs +10 -0
- package/dist/components/Select/SelectOptionList.cjs +39 -0
- package/dist/components/Select/SelectOptionList.css.vanilla.cjs +11 -0
- package/dist/components/Select/SelectTrigger.cjs +25 -0
- package/dist/components/Select/SelectTrigger.css.vanilla.cjs +12 -0
- package/dist/components/Separator/index.cjs +11 -0
- package/dist/components/Skeleton/Skeleton.css.vanilla.cjs +10 -0
- package/dist/components/Skeleton/index.cjs +14 -0
- package/dist/components/Table/Table.cjs +15 -0
- package/dist/components/Table/Table.css.vanilla.cjs +15 -0
- package/dist/components/Table/TableBody.cjs +11 -0
- package/dist/components/Table/TableCell.cjs +12 -0
- package/dist/components/Table/TableCell.css.vanilla.cjs +12 -0
- package/dist/components/Table/TableHead.cjs +12 -0
- package/dist/components/Table/TableHead.css.vanilla.cjs +10 -0
- package/dist/components/Table/TableHeader.cjs +11 -0
- package/dist/components/Table/TableRow.cjs +12 -0
- package/dist/components/Table/TableRow.css.vanilla.cjs +10 -0
- package/dist/components/Tabs/Tabs.cjs +16 -0
- package/dist/components/Tabs/TabsContent.cjs +22 -0
- package/dist/components/Tabs/TabsList.cjs +14 -0
- package/dist/components/Tabs/TabsList.css.vanilla.cjs +10 -0
- package/dist/components/Tabs/TabsProvider.cjs +12 -0
- package/dist/components/Tabs/TabsTrigger.cjs +24 -0
- package/dist/components/Tabs/TabsTrigger.css.vanilla.cjs +11 -0
- package/dist/components/TextField/TextField.css.vanilla.cjs +11 -0
- package/dist/components/TextField/index.cjs +15 -0
- package/dist/components/Toast/Toast.css.vanilla.cjs +13 -0
- package/dist/components/Toast/index.cjs +18 -0
- package/dist/components/Tooltip/Tooltip.css.vanilla.cjs +11 -0
- package/dist/components/Tooltip/index.cjs +31 -0
- package/dist/components/Typography/Typography.css.vanilla.cjs +11 -0
- package/dist/components/Typography/index.cjs +25 -0
- package/dist/contexts/UIProvider.cjs +15 -0
- package/dist/hooks/useContainer/ContainerProvider.cjs +13 -0
- package/dist/hooks/useContainer/index.cjs +12 -0
- package/dist/hooks/useDialog/index.cjs +34 -0
- package/dist/hooks/useMouseScroll/index.cjs +52 -0
- package/dist/hooks/usePointerSlider/index.cjs +49 -0
- package/dist/hooks/useRipple/index.cjs +116 -0
- package/dist/hooks/useRipple/ripple.css.vanilla.cjs +10 -0
- package/dist/hooks/useToast/ToastContainer.cjs +10 -0
- package/dist/hooks/useToast/ToastContainer.css.vanilla.cjs +7 -0
- package/dist/hooks/useToast/ToastProvider.cjs +54 -0
- package/dist/hooks/useToast/index.cjs +16 -0
- package/dist/index.cjs +176 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs +114 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_sprinkles@1.6.5_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/sprinkles/createRuntimeSprinkles/dist/vanilla-extract-sprinkles-createRuntimeSprinkles.esm.cjs +11 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_sprinkles@1.6.5_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/sprinkles/dist/createSprinkles-74286718.esm.cjs +192 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +8 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.cjs +49 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +34 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +24 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/align-justify.cjs +23 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs +19 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.cjs +22 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +34 -0
- package/dist/styles/layers.css.vanilla.cjs +9 -0
- package/dist/styles/overlay.css.vanilla.cjs +11 -0
- package/dist/styles/sprinkles.css.vanilla.cjs +22 -0
- package/dist/styles/sx.cjs +15 -0
- package/dist/themes/darkTheme.css.vanilla.cjs +5 -0
- package/dist/themes/lightTheme.css.vanilla.cjs +5 -0
- package/dist/themes/theme.css.vanilla.cjs +5 -0
- package/dist/tokens/index.cjs +18 -0
- package/dist/tokens/scale/color.cjs +581 -0
- package/dist/tokens/semantic/breakpoint.cjs +10 -0
- package/dist/tokens/semantic/color.cjs +14 -0
- package/dist/tokens/semantic/spacing.cjs +15 -0
- package/dist/tokens/semantic/typography.cjs +36 -0
- package/dist/tokens/semantic/width.cjs +9 -0
- package/dist/utils/sprinklesUtils.cjs +25 -0
- package/package.json +9 -6
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
6
|
+
var Flex_css = require('./Flex.css.vanilla.cjs');
|
|
7
|
+
var sprinklesUtils = require('../../utils/sprinklesUtils.cjs');
|
|
8
|
+
var sprinkles_css = require('../../styles/sprinkles.css.vanilla.cjs');
|
|
9
|
+
var sx = require('../../styles/sx.cjs');
|
|
10
|
+
|
|
11
|
+
const Flex = react.forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
12
|
+
return (jsxRuntime.jsx("div", { ref: ref, className: clsx.clsx(className, Flex_css.flex, sx.sx(propSx), sprinkles_css.sprinkles(sprinklesUtils.filterSprinkles(props))), ...sprinklesUtils.omitSprinkles(props), children: children }));
|
|
13
|
+
});
|
|
14
|
+
Flex.displayName = 'Flex';
|
|
15
|
+
|
|
16
|
+
exports.Flex = Flex;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
7
|
+
var NavigationAside_css = require('./NavigationAside.css.vanilla.cjs');
|
|
8
|
+
var sx = require('../../styles/sx.cjs');
|
|
9
|
+
|
|
10
|
+
const NavigationAside = react.forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
11
|
+
return (jsxRuntime.jsx("aside", { ref: ref, className: clsx.clsx(className, sx.sx(propSx)), ...props, children: jsxRuntime.jsx("div", { className: NavigationAside_css.wide, children: children }) }));
|
|
12
|
+
});
|
|
13
|
+
NavigationAside.displayName = 'NavigationAside';
|
|
14
|
+
|
|
15
|
+
exports.NavigationAside = NavigationAside;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./NavigationAside.css.ts.vanilla.css');
|
|
7
|
+
|
|
8
|
+
var wide = 'NavigationAside_styleWithLayer__alxqst0';
|
|
9
|
+
|
|
10
|
+
exports.wide = wide;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var utils = require('@kimdw-rtk/utils');
|
|
7
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
8
|
+
var NavigationBar_css = require('./NavigationBar.css.vanilla.cjs');
|
|
9
|
+
var sx = require('../../styles/sx.cjs');
|
|
10
|
+
|
|
11
|
+
const NavigationBar = react.forwardRef(({ className, size = 'md', sx: propSx, ...props }, ref) => {
|
|
12
|
+
const isScrolled = utils.useIsScrolled(typeof window === 'undefined' ? undefined : window);
|
|
13
|
+
return (jsxRuntime.jsx("nav", { ref: ref, className: clsx.clsx(NavigationBar_css.navigationBar({ size, isStuck: isScrolled }), className, sx.sx(propSx)), ...props }));
|
|
14
|
+
});
|
|
15
|
+
NavigationBar.displayName = 'NavigationBar';
|
|
16
|
+
|
|
17
|
+
exports.navigationBarCss = NavigationBar_css;
|
|
18
|
+
exports.NavigationBar = NavigationBar;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./NavigationBar.css.ts.vanilla.css');
|
|
7
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
8
|
+
|
|
9
|
+
var navigationBar = createRuntimeFn62c9670f_esm.c({defaultClassName:'NavigationBar__x4q5x97 NavigationBar_layeredBase__x4q5x91',variantClassNames:{size:{sm:'NavigationBar_styleWithLayer__x4q5x92',md:'NavigationBar_styleWithLayer__x4q5x93',lg:'NavigationBar_styleWithLayer__x4q5x94'},isStuck:{true:'NavigationBar_styleWithLayer__x4q5x95',false:'NavigationBar_styleWithLayer__x4q5x96'}},defaultVariants:{},compoundVariants:[]});
|
|
10
|
+
var navigationBarContainer = 'NavigationBar_navigationBarContainer__x4q5x90';
|
|
11
|
+
|
|
12
|
+
exports.navigationBar = navigationBar;
|
|
13
|
+
exports.navigationBarContainer = navigationBarContainer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
6
|
+
var NavigationContainer_css = require('./NavigationContainer.css.vanilla.cjs');
|
|
7
|
+
var index = require('../Container/index.cjs');
|
|
8
|
+
var sx = require('../../styles/sx.cjs');
|
|
9
|
+
|
|
10
|
+
const NavigationContainer = react.forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
11
|
+
return (jsxRuntime.jsx(index.Container, { ref: ref, className: clsx.clsx(className, NavigationContainer_css.container, sx.sx(propSx)), ...props, children: children }));
|
|
12
|
+
});
|
|
13
|
+
NavigationContainer.displayName = 'NavigationContainer';
|
|
14
|
+
|
|
15
|
+
exports.NavigationContainer = NavigationContainer;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var NavigationDrawer_css = require('./NavigationDrawer.css.vanilla.cjs');
|
|
7
|
+
var x = require('../../node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.cjs');
|
|
8
|
+
var alignJustify = require('../../node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/align-justify.cjs');
|
|
9
|
+
var index = require('../Button/index.cjs');
|
|
10
|
+
var index$1 = require('../Box/index.cjs');
|
|
11
|
+
|
|
12
|
+
const NavigationDrawer = ({ menu, aside }) => {
|
|
13
|
+
const [isExpanded, setIsExpanded] = react.useState(false);
|
|
14
|
+
const handleClick = () => {
|
|
15
|
+
setIsExpanded((prev) => !prev);
|
|
16
|
+
};
|
|
17
|
+
react.useEffect(() => {
|
|
18
|
+
if (isExpanded) {
|
|
19
|
+
document.body.style.overflow = 'hidden';
|
|
20
|
+
}
|
|
21
|
+
return () => {
|
|
22
|
+
if (isExpanded) {
|
|
23
|
+
document.body.style.overflow = 'auto';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}, [isExpanded]);
|
|
27
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: NavigationDrawer_css.wide, children: [menu, aside] }), jsxRuntime.jsxs("div", { className: NavigationDrawer_css.narrow, children: [jsxRuntime.jsx(index.Button, { color: "secondary", size: "icon-md", variant: "ghost", onClick: handleClick, children: isExpanded ? jsxRuntime.jsx(x.default, {}) : jsxRuntime.jsx(alignJustify.default, {}) }), jsxRuntime.jsx("div", { className: NavigationDrawer_css.popup({ isVisible: isExpanded }), children: jsxRuntime.jsxs(index$1.Box, { alignItems: "flex-end", flexDirection: "column-reverse", gap: "xl", paddingY: "lg", flex: true, children: [jsxRuntime.jsx(index$1.Box, { width: "100%", onClick: () => setIsExpanded(false), children: menu }), aside] }) })] })] }));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.NavigationDrawer = NavigationDrawer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./NavigationBar.css.ts.vanilla.css');
|
|
7
|
+
require('./NavigationDrawer.css.ts.vanilla.css');
|
|
8
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
9
|
+
|
|
10
|
+
var narrow = 'NavigationDrawer_styleWithLayer__1190lva0';
|
|
11
|
+
var popup = createRuntimeFn62c9670f_esm.c({defaultClassName:'NavigationDrawer__1190lva5 NavigationDrawer_layeredBase__1190lva2',variantClassNames:{isVisible:{true:'NavigationDrawer_styleWithLayer__1190lva3',false:'NavigationDrawer_styleWithLayer__1190lva4'}},defaultVariants:{},compoundVariants:[]});
|
|
12
|
+
var wide = 'NavigationDrawer_styleWithLayer__1190lva1';
|
|
13
|
+
|
|
14
|
+
exports.narrow = narrow;
|
|
15
|
+
exports.popup = popup;
|
|
16
|
+
exports.wide = wide;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
6
|
+
var NavigationItem_css = require('./NavigationItem.css.vanilla.cjs');
|
|
7
|
+
var sx = require('../../styles/sx.cjs');
|
|
8
|
+
|
|
9
|
+
const NavigationItem = react.forwardRef(({ style, className, sx: propSx, isSelected = false, ...props }, ref) => {
|
|
10
|
+
return (jsxRuntime.jsx("div", { ref: ref, className: clsx.clsx(NavigationItem_css.container({ isSelected }), className, sx.sx(propSx)), style: { ...style }, ...props }));
|
|
11
|
+
});
|
|
12
|
+
NavigationItem.displayName = 'NavigationItem';
|
|
13
|
+
|
|
14
|
+
exports.NavigationItem = NavigationItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./NavigationBar.css.ts.vanilla.css');
|
|
7
|
+
require('./NavigationDrawer.css.ts.vanilla.css');
|
|
8
|
+
require('./NavigationItem.css.ts.vanilla.css');
|
|
9
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
10
|
+
|
|
11
|
+
var container = createRuntimeFn62c9670f_esm.c({defaultClassName:'NavigationItem__1epy0hz3 NavigationItem_layeredBase__1epy0hz0',variantClassNames:{isSelected:{true:'NavigationItem_styleWithLayer__1epy0hz1',false:'NavigationItem_styleWithLayer__1epy0hz2'}},defaultVariants:{},compoundVariants:[]});
|
|
12
|
+
|
|
13
|
+
exports.container = container;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
6
|
+
var NavigationLogo_css = require('./NavigationLogo.css.vanilla.cjs');
|
|
7
|
+
var sx = require('../../styles/sx.cjs');
|
|
8
|
+
|
|
9
|
+
const NavigationLogo = react.forwardRef(({ className, sx: propSx, ...props }, ref) => {
|
|
10
|
+
return (jsxRuntime.jsx("div", { ref: ref, className: clsx.clsx(NavigationLogo_css.navigationLogo, className, sx.sx({ marginRight: { mobile: 'lg', desktop: '3xl' } }), sx.sx(propSx)), ...props }));
|
|
11
|
+
});
|
|
12
|
+
NavigationLogo.displayName = 'NavigationLogo';
|
|
13
|
+
|
|
14
|
+
exports.NavigationLogo = NavigationLogo;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./NavigationLogo.css.ts.vanilla.css');
|
|
7
|
+
|
|
8
|
+
var navigationLogo = 'NavigationLogo_styleWithLayer__1u9v1830';
|
|
9
|
+
|
|
10
|
+
exports.navigationLogo = navigationLogo;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
6
|
+
var NavigationMenu_css = require('./NavigationMenu.css.vanilla.cjs');
|
|
7
|
+
var sx = require('../../styles/sx.cjs');
|
|
8
|
+
|
|
9
|
+
const NavigationMenu = react.forwardRef(({ className, sx: propSx, ...props }, ref) => {
|
|
10
|
+
return (jsxRuntime.jsx("div", { ref: ref, className: clsx.clsx(NavigationMenu_css.navigationMenu, className, sx.sx(propSx)), ...props }));
|
|
11
|
+
});
|
|
12
|
+
NavigationMenu.displayName = 'NavigationMenu';
|
|
13
|
+
|
|
14
|
+
exports.navigationMenuCss = NavigationMenu_css;
|
|
15
|
+
exports.NavigationMenu = NavigationMenu;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./NavigationBar.css.ts.vanilla.css');
|
|
7
|
+
require('./NavigationDrawer.css.ts.vanilla.css');
|
|
8
|
+
require('./NavigationMenu.css.ts.vanilla.css');
|
|
9
|
+
|
|
10
|
+
var navigationMenu = 'NavigationMenu_styleWithLayer__rsojes0';
|
|
11
|
+
|
|
12
|
+
exports.navigationMenu = navigationMenu;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var reactDom = require('react-dom');
|
|
5
|
+
var index = require('../../hooks/useContainer/index.cjs');
|
|
6
|
+
|
|
7
|
+
const Portal = ({ children }) => {
|
|
8
|
+
const container = index.useContainer();
|
|
9
|
+
return container !== undefined && reactDom.createPortal(children, container);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.Portal = Portal;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
7
|
+
var index = require('../../hooks/usePointerSlider/index.cjs');
|
|
8
|
+
var Range_css = require('./Range.css.vanilla.cjs');
|
|
9
|
+
var sx = require('../../styles/sx.cjs');
|
|
10
|
+
|
|
11
|
+
const Range = react.forwardRef(({ min, max, defaultMinValue, defaultMaxValue, onChange, className, color = 'primary', size = 'md', sx: propSx, ...props }, ref) => {
|
|
12
|
+
const barRef = react.useRef(null);
|
|
13
|
+
const leftThumbRef = react.useRef(null);
|
|
14
|
+
const rightThumbRef = react.useRef(null);
|
|
15
|
+
const leftValue = index.usePointerSlider(leftThumbRef, {
|
|
16
|
+
min,
|
|
17
|
+
max,
|
|
18
|
+
defaultValue: defaultMinValue,
|
|
19
|
+
}), rightValue = index.usePointerSlider(rightThumbRef, {
|
|
20
|
+
min,
|
|
21
|
+
max,
|
|
22
|
+
defaultValue: defaultMaxValue,
|
|
23
|
+
});
|
|
24
|
+
const initRef = react.useRef(false);
|
|
25
|
+
const minValue = Math.min(leftValue, rightValue), maxValue = Math.max(leftValue, rightValue);
|
|
26
|
+
react.useEffect(() => {
|
|
27
|
+
if (!initRef.current) {
|
|
28
|
+
initRef.current = true;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
onChange(minValue, maxValue);
|
|
32
|
+
// eslint-disable-next-line
|
|
33
|
+
}, [minValue, maxValue]);
|
|
34
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: clsx.clsx(Range_css.range({ color, size }), className, sx.sx(propSx)), ...props, children: [jsxRuntime.jsx("div", { className: Range_css.bar, children: jsxRuntime.jsx("div", { ref: barRef, className: Range_css.fill, style: {
|
|
35
|
+
left: `${((minValue - min) / (max - min)) * 100}%`,
|
|
36
|
+
right: `${(1 - (maxValue - min) / (max - min)) * 100}%`,
|
|
37
|
+
} }) }), jsxRuntime.jsx("span", { ref: leftThumbRef, className: Range_css.thumb }), jsxRuntime.jsx("span", { ref: rightThumbRef, className: Range_css.thumb })] }));
|
|
38
|
+
});
|
|
39
|
+
Range.displayName = 'Range';
|
|
40
|
+
|
|
41
|
+
exports.rangeCss = Range_css;
|
|
42
|
+
exports.Range = Range;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./Range.css.ts.vanilla.css');
|
|
7
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
8
|
+
|
|
9
|
+
var bar = 'Range_styleWithLayer__biyxwo1z';
|
|
10
|
+
var fill = 'Range_styleWithLayer__biyxwo1y';
|
|
11
|
+
var range = createRuntimeFn62c9670f_esm.c({defaultClassName:'Range__biyxwoz Range_layeredBase__biyxwov',variantClassNames:{color:{primary:'Range_styleWithLayer__biyxwo1',secondary:'Range_styleWithLayer__biyxwo2',muted:'Range_styleWithLayer__biyxwo3',accent:'Range_styleWithLayer__biyxwo4',card:'Range_styleWithLayer__biyxwo5',danger:'Range_styleWithLayer__biyxwo6',warning:'Range_styleWithLayer__biyxwo7',success:'Range_styleWithLayer__biyxwo8',red:'Range_styleWithLayer__biyxwo9',orange:'Range_styleWithLayer__biyxwoa',amber:'Range_styleWithLayer__biyxwob',yellow:'Range_styleWithLayer__biyxwoc',lime:'Range_styleWithLayer__biyxwod',green:'Range_styleWithLayer__biyxwoe',emerald:'Range_styleWithLayer__biyxwof',teal:'Range_styleWithLayer__biyxwog',cyan:'Range_styleWithLayer__biyxwoh',sky:'Range_styleWithLayer__biyxwoi',blue:'Range_styleWithLayer__biyxwoj',indigo:'Range_styleWithLayer__biyxwok',violet:'Range_styleWithLayer__biyxwol',purple:'Range_styleWithLayer__biyxwom',fuchsia:'Range_styleWithLayer__biyxwon',pink:'Range_styleWithLayer__biyxwoo',rose:'Range_styleWithLayer__biyxwop',slate:'Range_styleWithLayer__biyxwoq',gray:'Range_styleWithLayer__biyxwor',zinc:'Range_styleWithLayer__biyxwos',neutral:'Range_styleWithLayer__biyxwot',stone:'Range_styleWithLayer__biyxwou'},size:{sm:'Range_styleWithLayer__biyxwow',md:'Range_styleWithLayer__biyxwox',lg:'Range_styleWithLayer__biyxwoy'}},defaultVariants:{},compoundVariants:[]});
|
|
12
|
+
var thumb = 'Range_styleWithLayer__biyxwo1x';
|
|
13
|
+
|
|
14
|
+
exports.bar = bar;
|
|
15
|
+
exports.fill = fill;
|
|
16
|
+
exports.range = range;
|
|
17
|
+
exports.thumb = thumb;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var utils = require('@kimdw-rtk/utils');
|
|
7
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
8
|
+
var index = require('../../hooks/useMouseScroll/index.cjs');
|
|
9
|
+
var ScrollArea_css = require('./ScrollArea.css.vanilla.cjs');
|
|
10
|
+
var sx = require('../../styles/sx.cjs');
|
|
11
|
+
|
|
12
|
+
const ScrollArea = react.forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
13
|
+
const scrollAreaRef = react.useRef(null);
|
|
14
|
+
const targetRef = utils.useCombinedRefs(ref, scrollAreaRef);
|
|
15
|
+
const [hasLeftSpace, setHasLeftSpace] = react.useState(false);
|
|
16
|
+
const [hasRightSpace, setHasRightSpace] = react.useState(true);
|
|
17
|
+
index.useMouseScroll(scrollAreaRef);
|
|
18
|
+
react.useEffect(() => {
|
|
19
|
+
const element = scrollAreaRef.current;
|
|
20
|
+
if (element === null) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const handleScroll = () => {
|
|
24
|
+
setHasLeftSpace(element.scrollLeft !== 0);
|
|
25
|
+
setHasRightSpace(Math.round(element.scrollLeft + element.clientWidth) <
|
|
26
|
+
element.scrollWidth);
|
|
27
|
+
};
|
|
28
|
+
handleScroll();
|
|
29
|
+
element.addEventListener('scroll', handleScroll);
|
|
30
|
+
return () => {
|
|
31
|
+
element.removeEventListener('scroll', handleScroll);
|
|
32
|
+
};
|
|
33
|
+
}, []);
|
|
34
|
+
return (jsxRuntime.jsx("div", { ref: targetRef, className: clsx.clsx(ScrollArea_css.scrollArea, className, sx.sx(propSx), hasLeftSpace && hasRightSpace && ScrollArea_css.maskBoth, hasLeftSpace && ScrollArea_css.maskLeft, hasRightSpace && ScrollArea_css.maskRight), ...props, children: jsxRuntime.jsx("div", { className: ScrollArea_css.wrapper, children: children }) }));
|
|
35
|
+
});
|
|
36
|
+
ScrollArea.displayName = 'ScrollArea';
|
|
37
|
+
|
|
38
|
+
exports.scrollAreaCss = ScrollArea_css;
|
|
39
|
+
exports.ScrollArea = ScrollArea;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./ScrollArea.css.ts.vanilla.css');
|
|
7
|
+
|
|
8
|
+
var maskBoth = 'ScrollArea_maskBoth__m6lfro3';
|
|
9
|
+
var maskLeft = 'ScrollArea_maskLeft__m6lfro1';
|
|
10
|
+
var maskRight = 'ScrollArea_maskRight__m6lfro2';
|
|
11
|
+
var scrollArea = 'ScrollArea_styleWithLayer__m6lfro0';
|
|
12
|
+
var wrapper = 'ScrollArea_wrapper__m6lfro4';
|
|
13
|
+
|
|
14
|
+
exports.maskBoth = maskBoth;
|
|
15
|
+
exports.maskLeft = maskLeft;
|
|
16
|
+
exports.maskRight = maskRight;
|
|
17
|
+
exports.scrollArea = scrollArea;
|
|
18
|
+
exports.wrapper = wrapper;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var utils = require('@kimdw-rtk/utils');
|
|
7
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
8
|
+
var Select_css = require('./Select.css.vanilla.cjs');
|
|
9
|
+
var SelectContext = require('./SelectContext.cjs');
|
|
10
|
+
var SelectOptionList = require('./SelectOptionList.cjs');
|
|
11
|
+
var SelectTrigger = require('./SelectTrigger.cjs');
|
|
12
|
+
var sx = require('../../styles/sx.cjs');
|
|
13
|
+
|
|
14
|
+
const Select = react.forwardRef(({ children, className, style, name, defaultValue, width = '100%', size = 'md', sx: propSx, variant = 'outlined', onChange, ...props }, ref) => {
|
|
15
|
+
const containerRef = react.useRef(null);
|
|
16
|
+
const targetRef = utils.useCombinedRefs(ref, containerRef);
|
|
17
|
+
const [state, dispatch] = react.useReducer(SelectContext.selectReducer, {
|
|
18
|
+
isActive: false,
|
|
19
|
+
containerRef,
|
|
20
|
+
defaultValue,
|
|
21
|
+
items: new Map(),
|
|
22
|
+
});
|
|
23
|
+
react.useEffect(() => {
|
|
24
|
+
const container = containerRef.current;
|
|
25
|
+
if (!container) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const handleOutsideClick = (e) => {
|
|
29
|
+
if (container.contains(e.target) || !state.isActive) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
dispatch({ type: 'TOGGLE' });
|
|
33
|
+
};
|
|
34
|
+
window.addEventListener('mousedown', handleOutsideClick);
|
|
35
|
+
return () => {
|
|
36
|
+
window.removeEventListener('mousedown', handleOutsideClick);
|
|
37
|
+
};
|
|
38
|
+
}, [state.isActive, dispatch]);
|
|
39
|
+
react.useEffect(() => {
|
|
40
|
+
if (!onChange || !state.items.size) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
onChange(state.selected);
|
|
44
|
+
//eslint-disable-next-line
|
|
45
|
+
}, [state.selected]);
|
|
46
|
+
return (jsxRuntime.jsx(SelectContext.SelectContext.Provider, { value: { state, dispatch }, children: jsxRuntime.jsxs("div", { ref: targetRef, className: clsx.clsx(Select_css.select({ size }), className, sx.sx(propSx)), style: { ...style, width }, ...props, children: [jsxRuntime.jsx(SelectTrigger.default, { variant: variant, children: state.selected !== null && state.items.get(state.selected || '') }), jsxRuntime.jsx(SelectOptionList.default, { children: children }), jsxRuntime.jsx("input", { name: name, type: "hidden", value: state.selected || '' })] }) }));
|
|
47
|
+
});
|
|
48
|
+
Select.displayName = 'Select';
|
|
49
|
+
|
|
50
|
+
exports.selectCss = Select_css;
|
|
51
|
+
exports.Select = Select;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./Select.css.ts.vanilla.css');
|
|
7
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
8
|
+
|
|
9
|
+
var select = createRuntimeFn62c9670f_esm.c({defaultClassName:'Select__7k9d9e4 Select_layeredBase__7k9d9e0',variantClassNames:{size:{sm:'Select_styleWithLayer__7k9d9e1',md:'Select_styleWithLayer__7k9d9e2',lg:'Select_styleWithLayer__7k9d9e3'}},defaultVariants:{},compoundVariants:[]});
|
|
10
|
+
|
|
11
|
+
exports.select = select;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
|
|
5
|
+
const SelectContext = react.createContext(undefined);
|
|
6
|
+
const selectReducer = (state, action) => {
|
|
7
|
+
switch (action.type) {
|
|
8
|
+
case 'ADD': {
|
|
9
|
+
// 현재 selected가 없고, defaultValue === payload.value일 경우 select함.
|
|
10
|
+
if (state.selected === undefined &&
|
|
11
|
+
state.defaultValue === action.payload.value) {
|
|
12
|
+
return {
|
|
13
|
+
...state,
|
|
14
|
+
selected: action.payload.value,
|
|
15
|
+
items: new Map(state.items).set(action.payload.value, action.payload.children),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
...state,
|
|
20
|
+
items: new Map(state.items).set(action.payload.value, action.payload.children),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
case 'REMOVE': {
|
|
24
|
+
const newMap = new Map(state.items);
|
|
25
|
+
newMap.delete(action.payload.value);
|
|
26
|
+
return { ...state, items: newMap };
|
|
27
|
+
}
|
|
28
|
+
case 'SELECT':
|
|
29
|
+
return { ...state, isActive: false, selected: action.payload.value };
|
|
30
|
+
case 'TOGGLE':
|
|
31
|
+
return { ...state, isActive: !state.isActive };
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.SelectContext = SelectContext;
|
|
36
|
+
exports.selectReducer = selectReducer;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var SelectContext = require('./SelectContext.cjs');
|
|
7
|
+
var SelectOption_css = require('./SelectOption.css.vanilla.cjs');
|
|
8
|
+
|
|
9
|
+
const SelectOption = ({ children, value }) => {
|
|
10
|
+
const selectContext = react.useContext(SelectContext.SelectContext);
|
|
11
|
+
if (!selectContext) {
|
|
12
|
+
throw new Error('SelectOption must be rendered within a Select.');
|
|
13
|
+
}
|
|
14
|
+
const { dispatch } = selectContext;
|
|
15
|
+
react.useEffect(() => {
|
|
16
|
+
dispatch({ type: 'ADD', payload: { value, children } });
|
|
17
|
+
return () => {
|
|
18
|
+
dispatch({ type: 'REMOVE', payload: { value } });
|
|
19
|
+
};
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
}, [dispatch, value]);
|
|
22
|
+
const handleClick = () => {
|
|
23
|
+
dispatch({ type: 'SELECT', payload: { value } });
|
|
24
|
+
};
|
|
25
|
+
return (jsxRuntime.jsx("div", { className: SelectOption_css.selectOption, onClick: handleClick, children: children }));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.SelectOption = SelectOption;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./SelectOption.css.ts.vanilla.css');
|
|
7
|
+
|
|
8
|
+
var selectOption = 'SelectOption_styleWithLayer__16jsez30';
|
|
9
|
+
|
|
10
|
+
exports.selectOption = selectOption;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
8
|
+
var SelectContext = require('./SelectContext.cjs');
|
|
9
|
+
var SelectOptionList_css = require('./SelectOptionList.css.vanilla.cjs');
|
|
10
|
+
var sprinkles_css = require('../../styles/sprinkles.css.vanilla.cjs');
|
|
11
|
+
|
|
12
|
+
const SelectOptionList = ({ children }) => {
|
|
13
|
+
const selectContext = react.useContext(SelectContext.SelectContext);
|
|
14
|
+
const containerRef = react.useRef(null);
|
|
15
|
+
if (!selectContext) {
|
|
16
|
+
throw new Error('SelectOption must be rendered within a Select.');
|
|
17
|
+
}
|
|
18
|
+
const { state } = selectContext;
|
|
19
|
+
const isAbove = react.useMemo(() => {
|
|
20
|
+
const container = containerRef.current;
|
|
21
|
+
const parent = state.containerRef.current;
|
|
22
|
+
if (!state.isActive || !container || !parent) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const parentRect = parent.getBoundingClientRect();
|
|
26
|
+
container.style.display = 'block';
|
|
27
|
+
const containerRect = container.getBoundingClientRect();
|
|
28
|
+
container.style.display = '';
|
|
29
|
+
// 하단에 리스트를 모두 보여줄 공간이 충분한 경우
|
|
30
|
+
if (containerRect.top + containerRect.height < window.innerHeight) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
// 그렇지 않으면 parent의 상단/하단 중 공간이 더 넓은 쪽으로 리스트를 보여줌
|
|
34
|
+
return parentRect.top + parentRect.height / 2 < window.innerHeight / 2;
|
|
35
|
+
}, [state.isActive, state.containerRef]);
|
|
36
|
+
return (jsxRuntime.jsx("div", { ref: containerRef, className: clsx.clsx(SelectOptionList_css.container({ isVisible: state.isActive, isAbove }), sprinkles_css.sprinkles({ boxShadow: 'accent-sm' })), children: children }));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.default = SelectOptionList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./../../styles/layers.css.ts.vanilla.css');
|
|
4
|
+
require('./../../styles/sprinkles.css.ts.vanilla.css');
|
|
5
|
+
require('./../../styles/globalStyle.css.ts.vanilla.css');
|
|
6
|
+
require('./SelectOptionList.css.ts.vanilla.css');
|
|
7
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
8
|
+
|
|
9
|
+
var container = createRuntimeFn62c9670f_esm.c({defaultClassName:'SelectOptionList__yft69m6 SelectOptionList_layeredBase__yft69m1',variantClassNames:{isVisible:{true:'SelectOptionList_styleWithLayer__yft69m2',false:'SelectOptionList_styleWithLayer__yft69m3'},isAbove:{true:'SelectOptionList_styleWithLayer__yft69m4',false:'SelectOptionList_styleWithLayer__yft69m5'}},defaultVariants:{},compoundVariants:[]});
|
|
10
|
+
|
|
11
|
+
exports.container = container;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
8
|
+
var SelectContext = require('./SelectContext.cjs');
|
|
9
|
+
var SelectTrigger_css = require('./SelectTrigger.css.vanilla.cjs');
|
|
10
|
+
var chevronDown = require('../../node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs');
|
|
11
|
+
var sx = require('../../styles/sx.cjs');
|
|
12
|
+
|
|
13
|
+
const SelectTrigger = ({ children, className, variant, sx: propSx, }) => {
|
|
14
|
+
const selectContext = react.useContext(SelectContext.SelectContext);
|
|
15
|
+
if (!selectContext) {
|
|
16
|
+
throw new Error('SelectTrigger must be rendered within a Select.');
|
|
17
|
+
}
|
|
18
|
+
const { state, dispatch } = selectContext;
|
|
19
|
+
const handleClick = () => {
|
|
20
|
+
dispatch({ type: 'TOGGLE' });
|
|
21
|
+
};
|
|
22
|
+
return (jsxRuntime.jsxs("div", { className: clsx.clsx(SelectTrigger_css.selectTrigger({ isActive: state.isActive, variant }), className, sx.sx(propSx)), onClick: handleClick, children: [jsxRuntime.jsx("span", { className: SelectTrigger_css.children, children: children }), jsxRuntime.jsx("span", { className: SelectTrigger_css.icon({ isActive: state.isActive }), children: jsxRuntime.jsx(chevronDown.default, { size: "1em", strokeWidth: "2px" }) })] }));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.default = SelectTrigger;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./SelectTrigger.css.ts.vanilla.css');
|
|
4
|
+
var createRuntimeFn62c9670f_esm = require('../../node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.cjs');
|
|
5
|
+
|
|
6
|
+
var children = 'SelectTrigger_children__1uw63tl0';
|
|
7
|
+
var icon = createRuntimeFn62c9670f_esm.c({defaultClassName:'SelectTrigger_icon__1uw63tl1',variantClassNames:{isActive:{false:'SelectTrigger_icon_isActive_false__1uw63tl2',true:'SelectTrigger_icon_isActive_true__1uw63tl3'}},defaultVariants:{},compoundVariants:[]});
|
|
8
|
+
var selectTrigger = createRuntimeFn62c9670f_esm.c({defaultClassName:'SelectTrigger_selectTrigger__1uw63tl4',variantClassNames:{isActive:{true:'SelectTrigger_selectTrigger_isActive_true__1uw63tl5'},variant:{contained:'SelectTrigger_selectTrigger_variant_contained__1uw63tl6',outlined:'SelectTrigger_selectTrigger_variant_outlined__1uw63tl7'}},defaultVariants:{},compoundVariants:[]});
|
|
9
|
+
|
|
10
|
+
exports.children = children;
|
|
11
|
+
exports.icon = icon;
|
|
12
|
+
exports.selectTrigger = selectTrigger;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
|
|
6
|
+
const Separator = ({ children, separator }) => {
|
|
7
|
+
const items = react.Children.toArray(children);
|
|
8
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: items.map((child, index) => (jsxRuntime.jsxs(react.Fragment, { children: [index > 0 && separator, child] }, child.key || index))) }));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
exports.Separator = Separator;
|