@jbpark/ui-kit 2.4.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/Menu.d.mts +2 -2
  2. package/dist/Menu.d.mts.map +1 -1
  3. package/dist/Menu.mjs +4 -4
  4. package/dist/Menu.mjs.map +1 -1
  5. package/dist/components/atoms/Button/index.mjs +3 -3
  6. package/dist/components/atoms/Button/index.mjs.map +1 -1
  7. package/dist/components/atoms/Checkbox/index.mjs +3 -3
  8. package/dist/components/atoms/Checkbox/index.mjs.map +1 -1
  9. package/dist/components/atoms/Radio/index.mjs +2 -2
  10. package/dist/components/atoms/Switch/index.d.mts.map +1 -1
  11. package/dist/components/atoms/Switch/index.mjs +16 -15
  12. package/dist/components/atoms/Switch/index.mjs.map +1 -1
  13. package/dist/components/molecules/Marquees/Item/index.mjs +2 -2
  14. package/dist/components/molecules/Marquees/Item/index.mjs.map +1 -1
  15. package/dist/components/molecules/Space/index.mjs +2 -2
  16. package/dist/components/molecules/Space/index.mjs.map +1 -1
  17. package/dist/components/molecules/Splitter/index.d.mts +31 -0
  18. package/dist/components/molecules/Splitter/index.d.mts.map +1 -0
  19. package/dist/components/molecules/Splitter/index.mjs +37 -0
  20. package/dist/components/molecules/Splitter/index.mjs.map +1 -0
  21. package/dist/components/molecules/index.d.mts +1 -0
  22. package/dist/components/molecules/index.mjs +1 -0
  23. package/dist/components/organisms/Drawer/index.d.mts +7 -2
  24. package/dist/components/organisms/Drawer/index.d.mts.map +1 -1
  25. package/dist/components/organisms/Drawer/index.mjs +46 -22
  26. package/dist/components/organisms/Drawer/index.mjs.map +1 -1
  27. package/dist/components/organisms/Modal/index.mjs +3 -3
  28. package/dist/components/organisms/Modal/index.mjs.map +1 -1
  29. package/dist/components/organisms/index.d.mts +1 -1
  30. package/dist/components/templates/Layout/Content/index.d.mts +7 -1
  31. package/dist/components/templates/Layout/Content/index.d.mts.map +1 -0
  32. package/dist/components/templates/Layout/Content/index.mjs +2 -2
  33. package/dist/components/templates/Layout/Content/index.mjs.map +1 -1
  34. package/dist/components/templates/Layout/Footer/index.d.mts +7 -1
  35. package/dist/components/templates/Layout/Footer/index.d.mts.map +1 -0
  36. package/dist/components/templates/Layout/Footer/index.mjs +2 -2
  37. package/dist/components/templates/Layout/Footer/index.mjs.map +1 -1
  38. package/dist/components/templates/Layout/Header/index.d.mts +1 -1
  39. package/dist/components/templates/Layout/Header/index.mjs +2 -2
  40. package/dist/components/templates/Layout/Header/index.mjs.map +1 -1
  41. package/dist/components/templates/Layout/Sider/index.d.mts +19 -1
  42. package/dist/components/templates/Layout/Sider/index.d.mts.map +1 -0
  43. package/dist/components/templates/Layout/Sider/index.mjs +32 -5
  44. package/dist/components/templates/Layout/Sider/index.mjs.map +1 -1
  45. package/dist/components/templates/Layout/index.d.mts +18 -8
  46. package/dist/components/templates/Layout/index.d.mts.map +1 -1
  47. package/dist/components/templates/Layout/index.mjs +3 -1
  48. package/dist/components/templates/Layout/index.mjs.map +1 -1
  49. package/dist/core/resizable.d.mts +24 -0
  50. package/dist/core/resizable.d.mts.map +1 -0
  51. package/dist/core/resizable.mjs +52 -0
  52. package/dist/core/resizable.mjs.map +1 -0
  53. package/dist/core.d.mts +2 -1
  54. package/dist/core.mjs +2 -1
  55. package/dist/index.d.mts +7 -2
  56. package/dist/index.mjs +5 -1
  57. package/dist/providers/Config/context.d.mts +8 -0
  58. package/dist/providers/Config/context.d.mts.map +1 -0
  59. package/dist/providers/Config/context.mjs +11 -0
  60. package/dist/providers/Config/context.mjs.map +1 -0
  61. package/dist/providers/Config/index.d.mts +18 -0
  62. package/dist/providers/Config/index.d.mts.map +1 -0
  63. package/dist/providers/Config/index.mjs +67 -0
  64. package/dist/providers/Config/index.mjs.map +1 -0
  65. package/dist/providers/Config/types.d.mts +32 -0
  66. package/dist/providers/Config/types.d.mts.map +1 -0
  67. package/dist/providers/index.d.mts +3 -0
  68. package/dist/providers/index.mjs +4 -0
  69. package/dist/style.css +218 -56
  70. package/dist/utils.d.mts +2 -2
  71. package/dist/utils.d.mts.map +1 -1
  72. package/dist/utils.mjs +4 -4
  73. package/dist/utils.mjs.map +1 -1
  74. package/package.json +15 -11
  75. package/dist/node_modules/gsap/CSSPlugin.mjs +0 -920
  76. package/dist/node_modules/gsap/CSSPlugin.mjs.map +0 -1
  77. package/dist/node_modules/gsap/gsap-core.mjs +0 -2723
  78. package/dist/node_modules/gsap/gsap-core.mjs.map +0 -1
  79. package/dist/node_modules/gsap/index.mjs +0 -9
  80. package/dist/node_modules/gsap/index.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -18,13 +18,18 @@ import { Card } from "./components/molecules/Card/index.mjs";
18
18
  import { Collapse } from "./components/molecules/Collapse/index.mjs";
19
19
  import { Dropdown } from "./components/molecules/Dropdown/index.mjs";
20
20
  import { Marquees } from "./components/molecules/Marquees/index.mjs";
21
+ import { Splitter } from "./components/molecules/Splitter/index.mjs";
21
22
  import { Space } from "./components/molecules/Space/index.mjs";
22
23
  import "./components/molecules/index.mjs";
23
- import { Drawer } from "./components/organisms/Drawer/index.mjs";
24
+ import { Drawer, Props as Props$1 } from "./components/organisms/Drawer/index.mjs";
24
25
  import { List } from "./components/organisms/List/index.mjs";
25
26
  import { Modal } from "./components/organisms/Modal/index.mjs";
26
27
  import { Swiper } from "./components/organisms/Swiper/index.mjs";
27
28
  import "./components/organisms/index.mjs";
28
29
  import { Layout } from "./components/templates/Layout/index.mjs";
29
30
  import "./components/templates/index.mjs";
30
- export { Button, Card, Checkbox, Collapse, ColorPicker, Drawer, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Swiper, Switch, Typography };
31
+ import { ThemeConfig, ThemeToken } from "./providers/Config/types.mjs";
32
+ import { useConfig } from "./providers/Config/context.mjs";
33
+ import { Config, Props } from "./providers/Config/index.mjs";
34
+ import "./providers/index.mjs";
35
+ export { Button, Card, Checkbox, Collapse, ColorPicker, Config, Props as ConfigProps, Drawer, Props$1 as DrawerProps, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, ThemeConfig, ThemeToken, Typography, useConfig };
package/dist/index.mjs CHANGED
@@ -19,6 +19,7 @@ import Menu from "./Menu.mjs";
19
19
  import Dropdown from "./components/molecules/Dropdown/index.mjs";
20
20
  import Marquees from "./components/molecules/Marquees/index.mjs";
21
21
  import Reveals from "./Reveals.mjs";
22
+ import Splitter from "./components/molecules/Splitter/index.mjs";
22
23
  import Space from "./components/molecules/Space/index.mjs";
23
24
  import "./components/molecules/index.mjs";
24
25
  import Drawer from "./components/organisms/Drawer/index.mjs";
@@ -28,5 +29,8 @@ import Swiper from "./components/organisms/Swiper/index.mjs";
28
29
  import "./components/organisms/index.mjs";
29
30
  import Layout from "./components/templates/Layout/index.mjs";
30
31
  import "./components/templates/index.mjs";
32
+ import { useConfig } from "./providers/Config/context.mjs";
33
+ import Config from "./providers/Config/index.mjs";
34
+ import "./providers/index.mjs";
31
35
 
32
- export { Button, Card, Checkbox, Collapse, ColorPicker, Drawer, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Swiper, Switch, Typography };
36
+ export { Button, Card, Checkbox, Collapse, ColorPicker, Config, Drawer, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, Typography, useConfig };
@@ -0,0 +1,8 @@
1
+ import { ContextValue } from "./types.mjs";
2
+ import "react";
3
+
4
+ //#region src/providers/Config/context.d.ts
5
+ declare const useConfig: () => ContextValue;
6
+ //#endregion
7
+ export { useConfig };
8
+ //# sourceMappingURL=context.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.mts","names":[],"sources":["../../../src/providers/Config/context.ts"],"mappings":";;;;cAUa,SAAA,QAAS,YAAA"}
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+
3
+ import { createContext, useContext } from "react";
4
+
5
+ //#region src/providers/Config/context.ts
6
+ const Context = createContext({ theme: {} });
7
+ const useConfig = () => useContext(Context);
8
+
9
+ //#endregion
10
+ export { Context, useConfig };
11
+ //# sourceMappingURL=context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.mjs","names":[],"sources":["../../../src/providers/Config/context.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport type { ContextValue } from './types';\n\nexport const Context = createContext<ContextValue>({\n theme: {},\n});\n\nexport const useConfig = () => useContext(Context);\n"],"mappings":";;;;;AAMA,MAAa,UAAU,cAA4B,EACjD,OAAO,EAAE,EACV,CAAC;AAEF,MAAa,kBAAkB,WAAW,QAAQ"}
@@ -0,0 +1,18 @@
1
+ import { ThemeConfig, ThemeToken } from "./types.mjs";
2
+ import { useConfig } from "./context.mjs";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/providers/Config/index.d.ts
6
+ interface Props {
7
+ theme?: ThemeConfig;
8
+ className?: string;
9
+ children: React.ReactNode;
10
+ }
11
+ declare const Config: ({
12
+ theme,
13
+ className,
14
+ children
15
+ }: Props) => react_jsx_runtime0.JSX.Element;
16
+ //#endregion
17
+ export { Config, type Props };
18
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/providers/Config/index.tsx"],"mappings":";;;;;UAmDU,KAAA;EACR,KAAA,GAAQ,WAAA;EACR,SAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGZ,MAAA;EAAU,KAAA;EAAA,SAAA;EAAA;AAAA,GAAqC,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+
3
+ import { cn } from "../../utils.mjs";
4
+ import { Context, useConfig } from "./context.mjs";
5
+ import { useMemo } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/providers/Config/index.tsx
9
+ const tokenToCssVar = {
10
+ colorPrimary: "--primary",
11
+ colorPrimaryForeground: "--primary-foreground",
12
+ colorBackground: "--background",
13
+ colorForeground: "--foreground",
14
+ colorCard: "--card",
15
+ colorCardForeground: "--card-foreground",
16
+ colorPopover: "--popover",
17
+ colorPopoverForeground: "--popover-foreground",
18
+ colorSecondary: "--secondary",
19
+ colorSecondaryForeground: "--secondary-foreground",
20
+ colorMuted: "--muted",
21
+ colorMutedForeground: "--muted-foreground",
22
+ colorAccent: "--accent",
23
+ colorAccentForeground: "--accent-foreground",
24
+ colorDestructive: "--destructive",
25
+ colorBorder: "--border",
26
+ colorInput: "--input",
27
+ colorRing: "--ring",
28
+ borderRadius: "--radius"
29
+ };
30
+ const buildCssVars = (token) => {
31
+ if (!token) return {};
32
+ const vars = {};
33
+ for (const [key, value] of Object.entries(token)) {
34
+ if (value === void 0) continue;
35
+ const cssVar = tokenToCssVar[key];
36
+ if (cssVar) vars[cssVar] = value;
37
+ }
38
+ return vars;
39
+ };
40
+ const Config = ({ theme = {}, className, children }) => {
41
+ const parent = useConfig();
42
+ const mergedTheme = useMemo(() => ({
43
+ ...parent.theme,
44
+ ...theme,
45
+ token: {
46
+ ...parent.theme.token,
47
+ ...theme.token
48
+ }
49
+ }), [parent.theme, theme]);
50
+ const contextValue = useMemo(() => ({ theme: mergedTheme }), [mergedTheme]);
51
+ const cssVars = useMemo(() => buildCssVars(mergedTheme.token), [mergedTheme.token]);
52
+ const hasCssVars = Object.keys(cssVars).length > 0;
53
+ const hasDarkMode = mergedTheme.dark !== void 0;
54
+ const needsWrapper = hasCssVars || hasDarkMode || className;
55
+ return /* @__PURE__ */ jsx(Context.Provider, {
56
+ value: contextValue,
57
+ children: needsWrapper ? /* @__PURE__ */ jsx("div", {
58
+ className: cn(mergedTheme.dark && "dark", className),
59
+ style: hasCssVars ? cssVars : void 0,
60
+ children
61
+ }) : children
62
+ });
63
+ };
64
+
65
+ //#endregion
66
+ export { Config as default };
67
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/providers/Config/index.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { Context, useConfig } from './context';\nimport type { ThemeConfig, ThemeToken } from './types';\n\nconst tokenToCssVar: Record<keyof ThemeToken, string> = {\n colorPrimary: '--primary',\n colorPrimaryForeground: '--primary-foreground',\n colorBackground: '--background',\n colorForeground: '--foreground',\n colorCard: '--card',\n colorCardForeground: '--card-foreground',\n colorPopover: '--popover',\n colorPopoverForeground: '--popover-foreground',\n colorSecondary: '--secondary',\n colorSecondaryForeground: '--secondary-foreground',\n colorMuted: '--muted',\n colorMutedForeground: '--muted-foreground',\n colorAccent: '--accent',\n colorAccentForeground: '--accent-foreground',\n colorDestructive: '--destructive',\n colorBorder: '--border',\n colorInput: '--input',\n colorRing: '--ring',\n borderRadius: '--radius',\n};\n\nconst buildCssVars = (token?: ThemeToken): React.CSSProperties => {\n if (!token) {\n return {};\n }\n\n const vars: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(token)) {\n if (value === undefined) {\n continue;\n }\n const cssVar = tokenToCssVar[key as keyof ThemeToken];\n if (cssVar) {\n vars[cssVar] = value;\n }\n }\n\n return vars as React.CSSProperties;\n};\n\ninterface Props {\n theme?: ThemeConfig;\n className?: string;\n children: React.ReactNode;\n}\n\nconst Config = ({ theme = {}, className, children }: Props) => {\n const parent = useConfig();\n\n const mergedTheme = useMemo<ThemeConfig>(\n () => ({\n ...parent.theme,\n ...theme,\n token: {\n ...parent.theme.token,\n ...theme.token,\n },\n }),\n [parent.theme, theme],\n );\n\n const contextValue = useMemo(() => ({ theme: mergedTheme }), [mergedTheme]);\n\n const cssVars = useMemo(\n () => buildCssVars(mergedTheme.token),\n [mergedTheme.token],\n );\n\n const hasCssVars = Object.keys(cssVars).length > 0;\n const hasDarkMode = mergedTheme.dark !== undefined;\n const needsWrapper = hasCssVars || hasDarkMode || className;\n\n return (\n <Context.Provider value={contextValue}>\n {needsWrapper ? (\n <div\n className={cn(mergedTheme.dark && 'dark', className)}\n style={hasCssVars ? cssVars : undefined}\n >\n {children}\n </div>\n ) : (\n children\n )}\n </Context.Provider>\n );\n};\n\nexport default Config;\nexport { useConfig };\nexport type { Props, ThemeConfig, ThemeToken };\n"],"mappings":";;;;;;;;AASA,MAAM,gBAAkD;CACtD,cAAc;CACd,wBAAwB;CACxB,iBAAiB;CACjB,iBAAiB;CACjB,WAAW;CACX,qBAAqB;CACrB,cAAc;CACd,wBAAwB;CACxB,gBAAgB;CAChB,0BAA0B;CAC1B,YAAY;CACZ,sBAAsB;CACtB,aAAa;CACb,uBAAuB;CACvB,kBAAkB;CAClB,aAAa;CACb,YAAY;CACZ,WAAW;CACX,cAAc;CACf;AAED,MAAM,gBAAgB,UAA4C;AAChE,KAAI,CAAC,MACH,QAAO,EAAE;CAGX,MAAM,OAA+B,EAAE;AAEvC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,EAAE;AAChD,MAAI,UAAU,OACZ;EAEF,MAAM,SAAS,cAAc;AAC7B,MAAI,OACF,MAAK,UAAU;;AAInB,QAAO;;AAST,MAAM,UAAU,EAAE,QAAQ,EAAE,EAAE,WAAW,eAAsB;CAC7D,MAAM,SAAS,WAAW;CAE1B,MAAM,cAAc,eACX;EACL,GAAG,OAAO;EACV,GAAG;EACH,OAAO;GACL,GAAG,OAAO,MAAM;GAChB,GAAG,MAAM;GACV;EACF,GACD,CAAC,OAAO,OAAO,MAAM,CACtB;CAED,MAAM,eAAe,eAAe,EAAE,OAAO,aAAa,GAAG,CAAC,YAAY,CAAC;CAE3E,MAAM,UAAU,cACR,aAAa,YAAY,MAAM,EACrC,CAAC,YAAY,MAAM,CACpB;CAED,MAAM,aAAa,OAAO,KAAK,QAAQ,CAAC,SAAS;CACjD,MAAM,cAAc,YAAY,SAAS;CACzC,MAAM,eAAe,cAAc,eAAe;AAElD,QACE,oBAAC,QAAQ;EAAS,OAAO;YACtB,eACC,oBAAC;GACC,WAAW,GAAG,YAAY,QAAQ,QAAQ,UAAU;GACpD,OAAO,aAAa,UAAU;GAE7B;IACG,GAEN;GAEe"}
@@ -0,0 +1,32 @@
1
+ //#region src/providers/Config/types.d.ts
2
+ interface ThemeToken {
3
+ colorPrimary?: string;
4
+ colorPrimaryForeground?: string;
5
+ colorBackground?: string;
6
+ colorForeground?: string;
7
+ colorCard?: string;
8
+ colorCardForeground?: string;
9
+ colorPopover?: string;
10
+ colorPopoverForeground?: string;
11
+ colorSecondary?: string;
12
+ colorSecondaryForeground?: string;
13
+ colorMuted?: string;
14
+ colorMutedForeground?: string;
15
+ colorAccent?: string;
16
+ colorAccentForeground?: string;
17
+ colorDestructive?: string;
18
+ colorBorder?: string;
19
+ colorInput?: string;
20
+ colorRing?: string;
21
+ borderRadius?: string;
22
+ }
23
+ interface ThemeConfig {
24
+ token?: ThemeToken;
25
+ dark?: boolean;
26
+ }
27
+ interface ContextValue {
28
+ theme: ThemeConfig;
29
+ }
30
+ //#endregion
31
+ export { ContextValue, ThemeConfig, ThemeToken };
32
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/providers/Config/types.ts"],"mappings":";UAAiB,UAAA;EAEf,YAAA;EACA,sBAAA;EACA,eAAA;EACA,eAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,wBAAA;EACA,UAAA;EACA,oBAAA;EACA,WAAA;EACA,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,UAAA;EACA,SAAA;EAGA,YAAA;AAAA;AAAA,UAGe,WAAA;EACf,KAAA,GAAQ,UAAA;EACR,IAAA;AAAA;AAAA,UAGe,YAAA;EACf,KAAA,EAAO,WAAA;AAAA"}
@@ -0,0 +1,3 @@
1
+ import { ThemeConfig, ThemeToken } from "./Config/types.mjs";
2
+ import { useConfig } from "./Config/context.mjs";
3
+ import { Config, Props } from "./Config/index.mjs";
@@ -0,0 +1,4 @@
1
+ import { useConfig } from "./Config/context.mjs";
2
+ import Config from "./Config/index.mjs";
3
+
4
+ export { };