@kimdw-rtk/ui 0.0.7 → 0.0.9
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/_virtual/cjs.js +5 -0
- package/dist/_virtual/cssesc.js +5 -0
- package/dist/_virtual/jsx-runtime.js +5 -0
- package/dist/_virtual/jsx-runtime2.js +3 -0
- package/dist/_virtual/picocolors.js +5 -0
- package/dist/_virtual/picocolors2.js +3 -0
- package/dist/_virtual/react-jsx-runtime.development.js +3 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +3 -0
- package/dist/components/Accordion/Accordion.css.js +8 -5
- package/dist/components/Accordion/Accordion.js +13 -8
- package/dist/components/Accordion/AccordionContent.css.js +7 -4
- package/dist/components/Accordion/AccordionContent.js +18 -16
- package/dist/components/Accordion/AccordionContext.js +5 -2
- package/dist/components/Accordion/AccordionTrigger.css.js +7 -4
- package/dist/components/Accordion/AccordionTrigger.js +9 -7
- package/dist/components/Alert/index.js +49 -5
- package/dist/components/Box/Box.css.js +6 -3
- package/dist/components/Box/index.js +13 -7
- package/dist/components/Button/Button.css.js +11 -8
- package/dist/components/Button/index.js +57 -11
- package/dist/components/Card/Card.css.js +9 -6
- package/dist/components/Card/Card.js +14 -7
- package/dist/components/Card/CardContent.css.js +6 -3
- package/dist/components/Card/CardContent.js +12 -6
- package/dist/components/Card/CardInteraction.css.js +5 -2
- package/dist/components/Card/CardInteraction.js +53 -8
- package/dist/components/Card/CardThumbnail.css.js +5 -2
- package/dist/components/Card/CardThumbnail.js +12 -6
- package/dist/components/Chip/Chip.css.js +9 -6
- package/dist/components/Chip/Chip.js +14 -7
- package/dist/components/Confirm/index.js +48 -5
- package/dist/components/Dialog/Dialog.css.js +7 -4
- package/dist/components/Dialog/Dialog.js +51 -7
- package/dist/components/Dialog/DialogContent.css.js +8 -5
- package/dist/components/Dialog/DialogContent.js +51 -7
- package/dist/components/Dialog/DialogFooter.js +50 -6
- package/dist/components/Dialog/DialogHeader.css.js +7 -4
- package/dist/components/Dialog/DialogHeader.js +52 -8
- package/dist/components/Navigation/NavigationAside.css.js +5 -2
- package/dist/components/Navigation/NavigationAside.js +12 -7
- package/dist/components/Navigation/NavigationBar.css.js +8 -5
- package/dist/components/Navigation/NavigationBar.js +14 -7
- package/dist/components/Navigation/NavigationContainer.css.js +5 -2
- package/dist/components/Navigation/NavigationContainer.js +12 -6
- package/dist/components/Navigation/NavigationDrawer.css.js +9 -6
- package/dist/components/Navigation/NavigationDrawer.js +52 -8
- package/dist/components/Navigation/NavigationItem.css.js +9 -5
- package/dist/components/Navigation/NavigationItem.js +12 -6
- package/dist/components/Navigation/NavigationLogo.css.js +5 -2
- package/dist/components/Navigation/NavigationLogo.js +12 -6
- package/dist/components/Navigation/NavigationMenu.css.js +8 -5
- package/dist/components/Navigation/NavigationMenu.js +14 -7
- package/dist/components/Range/Range.css.js +12 -9
- package/dist/components/Range/Range.js +17 -11
- package/dist/components/ScrollArea/ScrollArea.css.js +10 -7
- package/dist/components/ScrollArea/ScrollArea.js +16 -10
- package/dist/components/Select/Select.css.js +6 -3
- package/dist/components/Select/Select.js +18 -12
- package/dist/components/Select/SelectContext.js +5 -2
- package/dist/components/Select/SelectOption.css.js +6 -3
- package/dist/components/Select/SelectOption.js +8 -6
- package/dist/components/Select/SelectOptionList.css.js +7 -4
- package/dist/components/Select/SelectOptionList.js +12 -8
- package/dist/components/Select/SelectTrigger.css.js +9 -6
- package/dist/components/Select/SelectTrigger.js +14 -9
- package/dist/components/Skeleton/Skeleton.css.js +7 -4
- package/dist/components/Skeleton/index.js +12 -6
- package/dist/components/Table/Table.css.js +6 -3
- package/dist/components/Table/Table.js +14 -7
- package/dist/components/Table/TableBody.js +11 -5
- package/dist/components/Table/TableCell.css.js +8 -5
- package/dist/components/Table/TableCell.js +13 -7
- package/dist/components/Table/TableHead.css.js +6 -3
- package/dist/components/Table/TableHead.js +13 -7
- package/dist/components/Table/TableHeader.js +11 -5
- package/dist/components/Table/TableRow.css.js +5 -2
- package/dist/components/Table/TableRow.js +12 -6
- package/dist/components/Tabs/Tabs.js +12 -7
- package/dist/components/Tabs/TabsContent.js +12 -7
- package/dist/components/Tabs/TabsList.css.js +6 -3
- package/dist/components/Tabs/TabsList.js +12 -6
- package/dist/components/Tabs/TabsProvider.js +5 -3
- package/dist/components/Tabs/TabsTrigger.css.js +6 -3
- package/dist/components/Tabs/TabsTrigger.js +13 -8
- package/dist/components/TextField/TextField.css.js +9 -6
- package/dist/components/TextField/index.js +14 -7
- package/dist/components/Toast/Toast.css.js +9 -6
- package/dist/components/Toast/index.js +54 -9
- package/dist/components/Typography/Typography.css.js +5 -2
- package/dist/components/Typography/index.js +13 -8
- package/dist/contexts/UIProvider.js +52 -6
- package/dist/hooks/useDialog/index.js +52 -7
- package/dist/hooks/useMouseScroll/index.js +4 -2
- package/dist/hooks/usePointerSlider/index.js +5 -3
- package/dist/hooks/useRipple/index.js +24 -22
- package/dist/hooks/useRipple/ripple.css.js +8 -5
- package/dist/hooks/useToast/ToastContainer.css.js +5 -2
- package/dist/hooks/useToast/ToastContainer.js +7 -4
- package/dist/hooks/useToast/ToastProvider.js +53 -10
- package/dist/hooks/useToast/index.js +5 -2
- package/dist/index.js +79 -8
- package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +55 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.esm.js +51 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-10998315.esm.js +12 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/transformCss-0dba36bf.esm.js +955 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js +390 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.esm.js +20 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/functionSerializer/dist/vanilla-extract-css-functionSerializer.esm.js +11 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.esm.js +22 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +37 -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.js +111 -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/vanilla-extract-recipes.esm.js +43 -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.js +190 -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/vanilla-extract-sprinkles.esm.js +146 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +3 -0
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/parse.js +423 -0
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/types.js +28 -0
- package/dist/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js +119 -0
- package/dist/node_modules/.pnpm/dedent@1.6.0_babel-plugin-macros@3.1.0/node_modules/dedent/dist/dedent.js +68 -0
- package/dist/node_modules/.pnpm/deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/diff.js +39 -0
- package/dist/node_modules/.pnpm/deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/utils.js +8 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +142 -0
- package/dist/node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js +1542 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js +45 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js +30 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/align-justify.js +18 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js +17 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js +28 -0
- package/dist/node_modules/.pnpm/media-query-parser@2.0.2/node_modules/media-query-parser/dist/media-query-parser.esm.js +1385 -0
- package/dist/node_modules/.pnpm/modern-ahocorasick@1.1.0/node_modules/modern-ahocorasick/dist/index.js +101 -0
- package/dist/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +86 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +1325 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +24 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js +19 -0
- package/dist/styles/globalStyle.css.js +5 -2
- package/dist/styles/layers.css.js +6 -3
- package/dist/styles/overlay.css.js +7 -4
- package/dist/styles/sprinkles.css.js +16 -9
- package/dist/styles/sx.js +7 -2
- package/dist/themes/darkTheme.css.js +5 -2
- package/dist/themes/lightTheme.css.js +5 -2
- package/dist/themes/theme.css.js +7 -4
- package/dist/tokens/scale/color.js +5 -3
- package/dist/tokens/semantic/breakpoint.js +4 -6
- package/dist/tokens/semantic/color.js +3 -1
- package/dist/tokens/semantic/spacing.js +3 -1
- package/dist/tokens/semantic/typography.js +3 -1
- package/dist/utils/sprinklesUtils.js +8 -3
- package/dist/utils/styleUtils.css.js +10 -5
- package/package.json +10 -5
- package/dist/components/Accordion/Accordion.spec.js +0 -5
- package/dist/components/Accordion/index.js +0 -3
- package/dist/components/Box/Box.spec.js +0 -5
- package/dist/components/Button/Button.spec.js +0 -19
- package/dist/components/Card/Card.spec.js +0 -16
- package/dist/components/Card/index.js +0 -4
- package/dist/components/Chip/Chip.spec.js +0 -5
- package/dist/components/Chip/index.js +0 -1
- package/dist/components/Dialog/Dialog.spec.js +0 -16
- package/dist/components/Dialog/DialogFooter.css.js +0 -15
- package/dist/components/Dialog/index.js +0 -4
- package/dist/components/Navigation/Navigation.spec.js +0 -11
- package/dist/components/Navigation/index.js +0 -7
- package/dist/components/Range/Range.spec.js +0 -5
- package/dist/components/Range/index.js +0 -1
- package/dist/components/ScrollArea/ScrollArea.spec.js +0 -5
- package/dist/components/ScrollArea/index.js +0 -1
- package/dist/components/Select/Select.spec.js +0 -35
- package/dist/components/Select/index.js +0 -2
- package/dist/components/Skeleton/Skeleton.spec.js +0 -5
- package/dist/components/Table/Table.spec.js +0 -10
- package/dist/components/Table/index.js +0 -6
- package/dist/components/Tabs/Tabs.spec.js +0 -22
- package/dist/components/Tabs/index.js +0 -4
- package/dist/components/TextField/TextField.spec.js +0 -5
- package/dist/components/Toast/Toast.spec.js +0 -5
- package/dist/components/Typography/Typography.spec.js +0 -28
- package/dist/components/index.js +0 -18
- package/dist/contexts/index.js +0 -1
- package/dist/hooks/index.js +0 -5
- package/dist/hooks/useDialog/useDialog.spec.js +0 -53
- package/dist/styles/index.js +0 -4
- package/dist/tests/uiTest.js +0 -36
- package/dist/themes/index.js +0 -3
- package/dist/tokens/index.js +0 -5
- package/dist/types/index.js +0 -1
- package/dist/types/ui.types.js +0 -1
- package/dist/utils/index.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { style } from '@vanilla-extract/css';
|
|
2
|
-
|
|
1
|
+
import { style } from '../../node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js';
|
|
2
|
+
|
|
3
|
+
const container = style({
|
|
3
4
|
display: 'flex',
|
|
4
5
|
alignItems: 'center',
|
|
5
6
|
justifyContent: 'space-between',
|
|
@@ -7,3 +8,5 @@ export const container = style({
|
|
|
7
8
|
height: '100%',
|
|
8
9
|
margin: '0 auto',
|
|
9
10
|
});
|
|
11
|
+
|
|
12
|
+
export { container };
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import '../../styles/layers.css.js';
|
|
5
|
+
import '../../styles/sprinkles.css.js';
|
|
6
|
+
import '../../styles/globalStyle.css.js';
|
|
7
|
+
import { sx } from '../../styles/sx.js';
|
|
8
|
+
import { container } from './NavigationContainer.css.js';
|
|
9
|
+
|
|
10
|
+
const NavigationContainer = forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
11
|
+
return (jsxRuntimeExports.jsx("div", { ref: ref, className: clsx(className, container, sx(propSx)), ...props, children: children }));
|
|
8
12
|
});
|
|
9
13
|
NavigationContainer.displayName = 'NavigationContainer';
|
|
14
|
+
|
|
15
|
+
export { NavigationContainer };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { theme } from '
|
|
3
|
-
import { navigationBarContainer } from './NavigationBar.css';
|
|
4
|
-
|
|
1
|
+
import { styleWithLayer, recipeWithLayer } from '../../utils/styleUtils.css.js';
|
|
2
|
+
import { theme } from '../../themes/theme.css.js';
|
|
3
|
+
import { navigationBarContainer } from './NavigationBar.css.js';
|
|
4
|
+
|
|
5
|
+
const narrow = styleWithLayer({
|
|
5
6
|
display: 'none',
|
|
6
7
|
'@container': {
|
|
7
8
|
[`${navigationBarContainer} (max-width: 800px)`]: {
|
|
@@ -9,7 +10,7 @@ export const narrow = styleWithLayer({
|
|
|
9
10
|
},
|
|
10
11
|
},
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
+
const wide = styleWithLayer({
|
|
13
14
|
display: 'flex',
|
|
14
15
|
alignItems: 'center',
|
|
15
16
|
justifyContent: 'space-between',
|
|
@@ -21,7 +22,7 @@ export const wide = styleWithLayer({
|
|
|
21
22
|
},
|
|
22
23
|
},
|
|
23
24
|
});
|
|
24
|
-
|
|
25
|
+
const popup = recipeWithLayer({
|
|
25
26
|
base: {
|
|
26
27
|
position: 'absolute',
|
|
27
28
|
top: '100%',
|
|
@@ -47,3 +48,5 @@ export const popup = recipeWithLayer({
|
|
|
47
48
|
},
|
|
48
49
|
},
|
|
49
50
|
});
|
|
51
|
+
|
|
52
|
+
export { narrow, popup, wide };
|
|
@@ -1,10 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import '../Accordion/Accordion.js';
|
|
4
|
+
import '../Accordion/AccordionContent.css.js';
|
|
5
|
+
import '../Accordion/AccordionContext.js';
|
|
6
|
+
import '../Accordion/AccordionTrigger.css.js';
|
|
7
|
+
import '@kimdw-rtk/utils';
|
|
8
|
+
import { Box } from '../Box/index.js';
|
|
9
|
+
import { Button } from '../Button/index.js';
|
|
10
|
+
import '../Card/Card.js';
|
|
11
|
+
import '../Card/CardContent.js';
|
|
12
|
+
import '../Card/CardInteraction.js';
|
|
13
|
+
import '../Card/CardThumbnail.js';
|
|
14
|
+
import '../Chip/Chip.js';
|
|
15
|
+
import '../Dialog/Dialog.js';
|
|
16
|
+
import '../Dialog/DialogContent.js';
|
|
17
|
+
import '../Dialog/DialogFooter.js';
|
|
18
|
+
import '../Dialog/DialogHeader.js';
|
|
19
|
+
import './NavigationAside.js';
|
|
20
|
+
import './NavigationBar.js';
|
|
21
|
+
import './NavigationContainer.js';
|
|
22
|
+
import { wide, narrow, popup } from './NavigationDrawer.css.js';
|
|
23
|
+
import './NavigationItem.js';
|
|
24
|
+
import './NavigationLogo.js';
|
|
25
|
+
import './NavigationMenu.js';
|
|
26
|
+
import '../Range/Range.js';
|
|
27
|
+
import '../ScrollArea/ScrollArea.js';
|
|
28
|
+
import '../Select/Select.js';
|
|
29
|
+
import '../Select/SelectContext.js';
|
|
30
|
+
import '../Select/SelectOption.css.js';
|
|
31
|
+
import '../Skeleton/index.js';
|
|
32
|
+
import '../Table/Table.js';
|
|
33
|
+
import '../../styles/layers.css.js';
|
|
34
|
+
import '../../styles/sprinkles.css.js';
|
|
35
|
+
import '../../styles/globalStyle.css.js';
|
|
36
|
+
import '../Table/TableCell.css.js';
|
|
37
|
+
import '../Table/TableHead.css.js';
|
|
38
|
+
import '../Table/TableRow.css.js';
|
|
39
|
+
import '../Tabs/Tabs.js';
|
|
40
|
+
import '../Tabs/TabsContent.js';
|
|
41
|
+
import '../Tabs/TabsList.js';
|
|
42
|
+
import '../Tabs/TabsTrigger.js';
|
|
43
|
+
import '../TextField/index.js';
|
|
44
|
+
import '../Toast/index.js';
|
|
45
|
+
import '../Typography/index.js';
|
|
46
|
+
import X from '../../node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js';
|
|
47
|
+
import AlignJustify from '../../node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/align-justify.js';
|
|
48
|
+
|
|
49
|
+
const NavigationDrawer = ({ menu, aside }) => {
|
|
8
50
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
9
51
|
const handleClick = () => {
|
|
10
52
|
setIsExpanded((prev) => !prev);
|
|
@@ -19,5 +61,7 @@ export const NavigationDrawer = ({ menu, aside }) => {
|
|
|
19
61
|
}
|
|
20
62
|
};
|
|
21
63
|
}, [isExpanded]);
|
|
22
|
-
return (
|
|
64
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: wide, children: [menu, aside] }), jsxRuntimeExports.jsxs("div", { className: narrow, children: [jsxRuntimeExports.jsx(Button, { size: "icon-md", color: "secondary", variant: "ghost", onClick: handleClick, children: isExpanded ? jsxRuntimeExports.jsx(X, {}) : jsxRuntimeExports.jsx(AlignJustify, {}) }), jsxRuntimeExports.jsx("div", { className: popup({ isVisible: isExpanded }), children: jsxRuntimeExports.jsxs(Box, { flex: true, gap: "xl", flexDirection: "column-reverse", alignItems: "flex-end", paddingY: "lg", children: [jsxRuntimeExports.jsx(Box, { width: "100%", onClick: () => setIsExpanded(false), children: menu }), aside] }) })] })] }));
|
|
23
65
|
};
|
|
66
|
+
|
|
67
|
+
export { NavigationDrawer };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { recipeWithLayer } from '
|
|
2
|
-
import { theme } from '
|
|
3
|
-
import { spacing
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { recipeWithLayer } from '../../utils/styleUtils.css.js';
|
|
2
|
+
import { theme } from '../../themes/theme.css.js';
|
|
3
|
+
import { spacing } from '../../tokens/semantic/spacing.js';
|
|
4
|
+
import { typography } from '../../tokens/semantic/typography.js';
|
|
5
|
+
import { narrow } from './NavigationDrawer.css.js';
|
|
6
|
+
|
|
7
|
+
const container = recipeWithLayer({
|
|
6
8
|
base: {
|
|
7
9
|
position: 'relative',
|
|
8
10
|
lineHeight: '0',
|
|
@@ -32,3 +34,5 @@ export const container = recipeWithLayer({
|
|
|
32
34
|
},
|
|
33
35
|
},
|
|
34
36
|
});
|
|
37
|
+
|
|
38
|
+
export { container };
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import '../../styles/layers.css.js';
|
|
5
|
+
import '../../styles/sprinkles.css.js';
|
|
6
|
+
import '../../styles/globalStyle.css.js';
|
|
7
|
+
import { sx } from '../../styles/sx.js';
|
|
8
|
+
import { container } from './NavigationItem.css.js';
|
|
9
|
+
|
|
10
|
+
const NavigationItem = forwardRef(({ style, className, sx: propSx, isSelected = false, ...props }, ref) => {
|
|
11
|
+
return (jsxRuntimeExports.jsx("div", { ref: ref, style: { ...style }, className: clsx(container({ isSelected }), className, sx(propSx)), ...props }));
|
|
8
12
|
});
|
|
9
13
|
NavigationItem.displayName = 'NavigationItem';
|
|
14
|
+
|
|
15
|
+
export { NavigationItem };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { styleWithLayer } from '
|
|
2
|
-
|
|
1
|
+
import { styleWithLayer } from '../../utils/styleUtils.css.js';
|
|
2
|
+
|
|
3
|
+
const navigationLogo = styleWithLayer({
|
|
3
4
|
marginRight: '0.5em',
|
|
4
5
|
});
|
|
6
|
+
|
|
7
|
+
export { navigationLogo };
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import '../../styles/layers.css.js';
|
|
5
|
+
import '../../styles/sprinkles.css.js';
|
|
6
|
+
import '../../styles/globalStyle.css.js';
|
|
7
|
+
import { sx } from '../../styles/sx.js';
|
|
8
|
+
import { navigationLogo } from './NavigationLogo.css.js';
|
|
9
|
+
|
|
10
|
+
const NavigationLogo = forwardRef(({ className, sx: propSx, ...props }, ref) => {
|
|
11
|
+
return (jsxRuntimeExports.jsx("div", { ref: ref, className: clsx(navigationLogo, className, sx({ marginRight: { mobile: 'lg', desktop: '3xl' } }), sx(propSx)), ...props }));
|
|
8
12
|
});
|
|
9
13
|
NavigationLogo.displayName = 'NavigationLogo';
|
|
14
|
+
|
|
15
|
+
export { NavigationLogo };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { styleWithLayer } from '
|
|
2
|
-
import { theme } from '
|
|
3
|
-
import { spacing } from '
|
|
4
|
-
import { narrow } from './NavigationDrawer.css';
|
|
5
|
-
|
|
1
|
+
import { styleWithLayer } from '../../utils/styleUtils.css.js';
|
|
2
|
+
import { theme } from '../../themes/theme.css.js';
|
|
3
|
+
import { spacing } from '../../tokens/semantic/spacing.js';
|
|
4
|
+
import { narrow } from './NavigationDrawer.css.js';
|
|
5
|
+
|
|
6
|
+
const navigationMenu = styleWithLayer({
|
|
6
7
|
display: 'flex',
|
|
7
8
|
alignItems: 'center',
|
|
8
9
|
gap: '0.5em',
|
|
@@ -17,3 +18,5 @@ export const navigationMenu = styleWithLayer({
|
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
20
|
});
|
|
21
|
+
|
|
22
|
+
export { navigationMenu };
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import '../../styles/layers.css.js';
|
|
5
|
+
import '../../styles/sprinkles.css.js';
|
|
6
|
+
import '../../styles/globalStyle.css.js';
|
|
7
|
+
import { sx } from '../../styles/sx.js';
|
|
8
|
+
import { navigationMenu } from './NavigationMenu.css.js';
|
|
9
|
+
import * as NavigationMenu_css from './NavigationMenu.css.js';
|
|
10
|
+
export { NavigationMenu_css as navigationMenuCss };
|
|
11
|
+
|
|
12
|
+
const NavigationMenu = forwardRef(({ className, sx: propSx, ...props }, ref) => {
|
|
13
|
+
return (jsxRuntimeExports.jsx("div", { ref: ref, className: clsx(navigationMenu, className, sx(propSx)), ...props }));
|
|
8
14
|
});
|
|
9
15
|
NavigationMenu.displayName = 'NavigationMenu';
|
|
10
|
-
|
|
16
|
+
|
|
17
|
+
export { NavigationMenu };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createVar } from '@vanilla-extract/css';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { createVar } from '../../node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js';
|
|
2
|
+
import { styleWithLayer, recipeWithLayer } from '../../utils/styleUtils.css.js';
|
|
3
|
+
import { SCALE_COLOR } from '../../tokens/scale/color.js';
|
|
4
|
+
import { theme } from '../../themes/theme.css.js';
|
|
5
|
+
import { semanticColor } from '../../tokens/semantic/color.js';
|
|
6
|
+
|
|
6
7
|
const backgroundVar = createVar();
|
|
7
8
|
const semanticColors = semanticColor.reduce((prev, color) => ({
|
|
8
9
|
...prev,
|
|
@@ -20,7 +21,7 @@ const scaleColors = SCALE_COLOR.reduce((prev, value) => ({
|
|
|
20
21
|
},
|
|
21
22
|
}),
|
|
22
23
|
}), {});
|
|
23
|
-
|
|
24
|
+
const range = recipeWithLayer({
|
|
24
25
|
base: {
|
|
25
26
|
position: 'relative',
|
|
26
27
|
width: '100%',
|
|
@@ -45,7 +46,7 @@ export const range = recipeWithLayer({
|
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
+
const thumb = styleWithLayer({
|
|
49
50
|
display: 'inline-block',
|
|
50
51
|
position: 'absolute',
|
|
51
52
|
top: '50%',
|
|
@@ -76,13 +77,13 @@ export const thumb = styleWithLayer({
|
|
|
76
77
|
},
|
|
77
78
|
},
|
|
78
79
|
});
|
|
79
|
-
|
|
80
|
+
const fill = styleWithLayer({
|
|
80
81
|
position: 'absolute',
|
|
81
82
|
top: '0',
|
|
82
83
|
height: '100%',
|
|
83
84
|
backgroundColor: `rgb(${backgroundVar})`,
|
|
84
85
|
});
|
|
85
|
-
|
|
86
|
+
const bar = styleWithLayer({
|
|
86
87
|
position: 'absolute',
|
|
87
88
|
top: '50%',
|
|
88
89
|
width: '100%',
|
|
@@ -91,3 +92,5 @@ export const bar = styleWithLayer({
|
|
|
91
92
|
backgroundColor: `rgb(${theme.color.muted})`,
|
|
92
93
|
transform: 'translateY(-50%)',
|
|
93
94
|
});
|
|
95
|
+
|
|
96
|
+
export { bar, fill, range, thumb };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import { forwardRef, useRef, useEffect } from 'react';
|
|
3
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import '../../styles/layers.css.js';
|
|
5
|
+
import '../../styles/sprinkles.css.js';
|
|
6
|
+
import '../../styles/globalStyle.css.js';
|
|
7
|
+
import { sx } from '../../styles/sx.js';
|
|
8
|
+
import { usePointerSlider } from '../../hooks/usePointerSlider/index.js';
|
|
9
|
+
import { bar, fill, thumb, range } from './Range.css.js';
|
|
10
|
+
import * as Range_css from './Range.css.js';
|
|
11
|
+
export { Range_css as rangeCss };
|
|
12
|
+
|
|
13
|
+
const Range = forwardRef(({ min, max, defaultMinValue, defaultMaxValue, onChange, className, color = 'primary', size = 'md', sx: propSx, ...props }, ref) => {
|
|
9
14
|
const barRef = useRef(null);
|
|
10
15
|
const leftThumbRef = useRef(null);
|
|
11
16
|
const rightThumbRef = useRef(null);
|
|
@@ -28,10 +33,11 @@ export const Range = forwardRef(({ min, max, defaultMinValue, defaultMaxValue, o
|
|
|
28
33
|
onChange(minValue, maxValue);
|
|
29
34
|
// eslint-disable-next-line
|
|
30
35
|
}, [minValue, maxValue]);
|
|
31
|
-
return (
|
|
36
|
+
return (jsxRuntimeExports.jsxs("div", { ref: ref, className: clsx(range({ color, size }), className, sx(propSx)), ...props, children: [jsxRuntimeExports.jsx("div", { className: bar, children: jsxRuntimeExports.jsx("div", { ref: barRef, className: fill, style: {
|
|
32
37
|
left: `${((minValue - min) / (max - min)) * 100}%`,
|
|
33
38
|
right: `${(1 - (maxValue - min) / (max - min)) * 100}%`,
|
|
34
|
-
} }) }),
|
|
39
|
+
} }) }), jsxRuntimeExports.jsx("span", { ref: leftThumbRef, className: thumb }), jsxRuntimeExports.jsx("span", { ref: rightThumbRef, className: thumb })] }));
|
|
35
40
|
});
|
|
36
41
|
Range.displayName = 'Range';
|
|
37
|
-
|
|
42
|
+
|
|
43
|
+
export { Range };
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { styleWithLayer } from '
|
|
1
|
+
import { style } from '../../node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js';
|
|
2
|
+
import { styleWithLayer } from '../../utils/styleUtils.css.js';
|
|
3
|
+
|
|
3
4
|
const MASK_SIZE = '3rem';
|
|
4
|
-
|
|
5
|
+
const scrollArea = styleWithLayer({
|
|
5
6
|
width: '100%',
|
|
6
7
|
overflowX: 'scroll',
|
|
7
8
|
'::-webkit-scrollbar': {
|
|
8
9
|
display: 'none',
|
|
9
10
|
},
|
|
10
11
|
});
|
|
11
|
-
|
|
12
|
+
const maskLeft = style({
|
|
12
13
|
maskImage: `linear-gradient(to left,
|
|
13
14
|
black 0%,
|
|
14
15
|
black calc(100% - ${MASK_SIZE}),
|
|
15
16
|
transparent 100%)`,
|
|
16
17
|
});
|
|
17
|
-
|
|
18
|
+
const maskRight = style({
|
|
18
19
|
maskImage: `linear-gradient(to right,
|
|
19
20
|
black 0%,
|
|
20
21
|
black calc(100% - ${MASK_SIZE}),
|
|
21
22
|
transparent 100%)`,
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
const maskBoth = style({
|
|
24
25
|
maskImage: `linear-gradient(to right,
|
|
25
26
|
transparent 0%,
|
|
26
27
|
black ${MASK_SIZE},
|
|
27
28
|
black calc(100% - ${MASK_SIZE}),
|
|
28
29
|
transparent 100%)`,
|
|
29
30
|
});
|
|
30
|
-
|
|
31
|
+
const wrapper = style({
|
|
31
32
|
width: 'max-content',
|
|
32
33
|
});
|
|
34
|
+
|
|
35
|
+
export { maskBoth, maskLeft, maskRight, scrollArea, wrapper };
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import { forwardRef, useRef, useState, useEffect } from 'react';
|
|
4
3
|
import { useCombinedRefs } from '@kimdw-rtk/utils';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { useMouseScroll } from '
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
4
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
5
|
+
import { useMouseScroll } from '../../hooks/useMouseScroll/index.js';
|
|
6
|
+
import '../../styles/layers.css.js';
|
|
7
|
+
import '../../styles/sprinkles.css.js';
|
|
8
|
+
import '../../styles/globalStyle.css.js';
|
|
9
|
+
import { sx } from '../../styles/sx.js';
|
|
10
|
+
import { wrapper, scrollArea, maskBoth, maskLeft, maskRight } from './ScrollArea.css.js';
|
|
11
|
+
import * as ScrollArea_css from './ScrollArea.css.js';
|
|
12
|
+
export { ScrollArea_css as scrollAreaCss };
|
|
13
|
+
|
|
14
|
+
const ScrollArea = forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
10
15
|
const scrollAreaRef = useRef(null);
|
|
11
16
|
const targetRef = useCombinedRefs(ref, scrollAreaRef);
|
|
12
17
|
const [hasLeftSpace, setHasLeftSpace] = useState(false);
|
|
@@ -28,7 +33,8 @@ export const ScrollArea = forwardRef(({ children, className, sx: propSx, ...prop
|
|
|
28
33
|
element.removeEventListener('scroll', handleScroll);
|
|
29
34
|
};
|
|
30
35
|
}, []);
|
|
31
|
-
return (
|
|
36
|
+
return (jsxRuntimeExports.jsx("div", { ref: targetRef, className: clsx(scrollArea, className, sx(propSx), hasLeftSpace && hasRightSpace && maskBoth, hasLeftSpace && maskLeft, hasRightSpace && maskRight), ...props, children: jsxRuntimeExports.jsx("div", { className: wrapper, children: children }) }));
|
|
32
37
|
});
|
|
33
38
|
ScrollArea.displayName = 'ScrollArea';
|
|
34
|
-
|
|
39
|
+
|
|
40
|
+
export { ScrollArea };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { recipeWithLayer } from '
|
|
2
|
-
import { typography } from '
|
|
3
|
-
|
|
1
|
+
import { recipeWithLayer } from '../../utils/styleUtils.css.js';
|
|
2
|
+
import { typography } from '../../tokens/semantic/typography.js';
|
|
3
|
+
|
|
4
|
+
const select = recipeWithLayer({
|
|
4
5
|
base: {
|
|
5
6
|
position: 'relative',
|
|
6
7
|
},
|
|
@@ -18,3 +19,5 @@ export const select = recipeWithLayer({
|
|
|
18
19
|
},
|
|
19
20
|
},
|
|
20
21
|
});
|
|
22
|
+
|
|
23
|
+
export { select };
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef, useEffect, useReducer, useRef, } from 'react';
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import { forwardRef, useRef, useReducer, useEffect } from 'react';
|
|
4
3
|
import { useCombinedRefs } from '@kimdw-rtk/utils';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
4
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
5
|
+
import '../../styles/layers.css.js';
|
|
6
|
+
import '../../styles/sprinkles.css.js';
|
|
7
|
+
import '../../styles/globalStyle.css.js';
|
|
8
|
+
import { sx } from '../../styles/sx.js';
|
|
9
|
+
import { select } from './Select.css.js';
|
|
10
|
+
import * as Select_css from './Select.css.js';
|
|
11
|
+
export { Select_css as selectCss };
|
|
12
|
+
import { selectReducer, SelectContext } from './SelectContext.js';
|
|
13
|
+
import SelectOptionList from './SelectOptionList.js';
|
|
14
|
+
import SelectTrigger from './SelectTrigger.js';
|
|
15
|
+
|
|
16
|
+
const Select = forwardRef(({ children, className, style, name, defaultValue, width = '100%', size = 'md', sx: propSx, variant = 'outlined', onChange, ...props }, ref) => {
|
|
12
17
|
const containerRef = useRef(null);
|
|
13
18
|
const targetRef = useCombinedRefs(ref, containerRef);
|
|
14
19
|
const [state, dispatch] = useReducer(selectReducer, {
|
|
@@ -40,7 +45,8 @@ export const Select = forwardRef(({ children, className, style, name, defaultVal
|
|
|
40
45
|
onChange(state.selected);
|
|
41
46
|
//eslint-disable-next-line
|
|
42
47
|
}, [state.selected]);
|
|
43
|
-
return (
|
|
48
|
+
return (jsxRuntimeExports.jsx(SelectContext.Provider, { value: { state, dispatch }, children: jsxRuntimeExports.jsxs("div", { ref: targetRef, style: { ...style, width }, className: clsx(select({ size }), className, sx(propSx)), ...props, children: [jsxRuntimeExports.jsx(SelectTrigger, { variant: variant, children: state.selected !== null && state.items.get(state.selected || '') }), jsxRuntimeExports.jsx(SelectOptionList, { children: children }), jsxRuntimeExports.jsx("input", { type: "hidden", name: name, value: state.selected || '' })] }) }));
|
|
44
49
|
});
|
|
45
50
|
Select.displayName = 'Select';
|
|
46
|
-
|
|
51
|
+
|
|
52
|
+
export { Select };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
const SelectContext = createContext(undefined);
|
|
4
|
+
const selectReducer = (state, action) => {
|
|
4
5
|
switch (action.type) {
|
|
5
6
|
case 'ADD': {
|
|
6
7
|
// 현재 selected가 없고, defaultValue === payload.value일 경우 select함.
|
|
@@ -28,3 +29,5 @@ export const selectReducer = (state, action) => {
|
|
|
28
29
|
return { ...state, isActive: !state.isActive };
|
|
29
30
|
}
|
|
30
31
|
};
|
|
32
|
+
|
|
33
|
+
export { SelectContext, selectReducer };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { styleWithLayer } from '
|
|
2
|
-
import { theme } from '
|
|
3
|
-
|
|
1
|
+
import { styleWithLayer } from '../../utils/styleUtils.css.js';
|
|
2
|
+
import { theme } from '../../themes/theme.css.js';
|
|
3
|
+
|
|
4
|
+
const selectOption = styleWithLayer({
|
|
4
5
|
padding: '0.75em 0.5em',
|
|
5
6
|
transition: 'background-color 0.2s ease',
|
|
6
7
|
cursor: 'default',
|
|
@@ -8,3 +9,5 @@ export const selectOption = styleWithLayer({
|
|
|
8
9
|
backgroundColor: `rgb(${theme.color.accent})`,
|
|
9
10
|
},
|
|
10
11
|
});
|
|
12
|
+
|
|
13
|
+
export { selectOption };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
3
2
|
import { useContext, useEffect } from 'react';
|
|
4
|
-
import { SelectContext } from './SelectContext';
|
|
5
|
-
import
|
|
6
|
-
|
|
3
|
+
import { SelectContext } from './SelectContext.js';
|
|
4
|
+
import { selectOption } from './SelectOption.css.js';
|
|
5
|
+
|
|
6
|
+
const SelectOption = ({ children, value }) => {
|
|
7
7
|
const selectContext = useContext(SelectContext);
|
|
8
8
|
if (!selectContext) {
|
|
9
9
|
throw new Error('SelectOption must be rendered within a Select.');
|
|
@@ -19,5 +19,7 @@ export const SelectOption = ({ children, value }) => {
|
|
|
19
19
|
const handleClick = () => {
|
|
20
20
|
dispatch({ type: 'SELECT', payload: { value } });
|
|
21
21
|
};
|
|
22
|
-
return (
|
|
22
|
+
return (jsxRuntimeExports.jsx("div", { className: selectOption, onClick: handleClick, children: children }));
|
|
23
23
|
};
|
|
24
|
+
|
|
25
|
+
export { SelectOption };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { keyframes } from '@vanilla-extract/css';
|
|
2
|
-
import { recipeWithLayer } from '
|
|
3
|
-
import { theme } from '
|
|
1
|
+
import { keyframes } from '../../node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js';
|
|
2
|
+
import { recipeWithLayer } from '../../utils/styleUtils.css.js';
|
|
3
|
+
import { theme } from '../../themes/theme.css.js';
|
|
4
|
+
|
|
4
5
|
const fadeIn = keyframes({
|
|
5
6
|
'0%': {
|
|
6
7
|
transform: 'scale(0.95)',
|
|
@@ -11,7 +12,7 @@ const fadeIn = keyframes({
|
|
|
11
12
|
opacity: 1,
|
|
12
13
|
},
|
|
13
14
|
});
|
|
14
|
-
|
|
15
|
+
const container = recipeWithLayer({
|
|
15
16
|
base: {
|
|
16
17
|
overflowY: 'auto',
|
|
17
18
|
position: 'absolute',
|
|
@@ -53,3 +54,5 @@ export const container = recipeWithLayer({
|
|
|
53
54
|
},
|
|
54
55
|
},
|
|
55
56
|
});
|
|
57
|
+
|
|
58
|
+
export { container };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useContext,
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import jsxRuntimeExports from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import { useContext, useRef, useMemo } from 'react';
|
|
3
|
+
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import '../../styles/layers.css.js';
|
|
5
|
+
import { sprinkles } from '../../styles/sprinkles.css.js';
|
|
6
|
+
import '../../styles/globalStyle.css.js';
|
|
7
|
+
import { SelectContext } from './SelectContext.js';
|
|
8
|
+
import { container } from './SelectOptionList.css.js';
|
|
9
|
+
|
|
7
10
|
const SelectOptionList = ({ children }) => {
|
|
8
11
|
const selectContext = useContext(SelectContext);
|
|
9
12
|
const containerRef = useRef(null);
|
|
@@ -28,6 +31,7 @@ const SelectOptionList = ({ children }) => {
|
|
|
28
31
|
// 그렇지 않으면 parent의 상단/하단 중 공간이 더 넓은 쪽으로 리스트를 보여줌
|
|
29
32
|
return parentRect.top + parentRect.height / 2 < window.innerHeight / 2;
|
|
30
33
|
}, [state.isActive, state.containerRef]);
|
|
31
|
-
return (
|
|
34
|
+
return (jsxRuntimeExports.jsx("div", { ref: containerRef, className: clsx(container({ isVisible: state.isActive, isAbove }), sprinkles({ boxShadow: 'accent-sm' })), children: children }));
|
|
32
35
|
};
|
|
33
|
-
|
|
36
|
+
|
|
37
|
+
export { SelectOptionList as default };
|