@jbpark/ui-kit 3.5.0 → 3.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.
- package/dist/Space.mjs +3 -1
- package/dist/Space.mjs.map +1 -1
- package/dist/components/atoms/popover.d.mts.map +1 -1
- package/dist/components/atoms/popover.mjs +71 -19
- package/dist/components/atoms/popover.mjs.map +1 -1
- package/dist/components/atoms/skeleton/button.d.mts +1 -1
- package/dist/components/atoms/skeleton/button.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/button.mjs +5 -2
- package/dist/components/atoms/skeleton/button.mjs.map +1 -1
- package/dist/components/atoms/skeleton/node.d.mts +1 -1
- package/dist/components/atoms/skeleton/node.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/node.mjs +5 -2
- package/dist/components/atoms/skeleton/node.mjs.map +1 -1
- package/dist/components/molecules/collapse.mjs +1 -1
- package/dist/components/molecules/collapse.mjs.map +1 -1
- package/dist/components/molecules/marquees/item.d.mts.map +1 -1
- package/dist/components/molecules/marquees/item.mjs +3 -8
- package/dist/components/molecules/marquees/item.mjs.map +1 -1
- package/dist/components/molecules/reveals/reveals.d.mts +5 -0
- package/dist/components/molecules/reveals/reveals.d.mts.map +1 -1
- package/dist/components/molecules/reveals/reveals.mjs +6 -1
- package/dist/components/molecules/reveals/reveals.mjs.map +1 -1
- package/dist/components/molecules/upload.d.mts +10 -1
- package/dist/components/molecules/upload.d.mts.map +1 -1
- package/dist/components/molecules/upload.mjs +23 -6
- package/dist/components/molecules/upload.mjs.map +1 -1
- package/dist/components/organisms/drawer.d.mts.map +1 -1
- package/dist/components/organisms/drawer.mjs +37 -13
- package/dist/components/organisms/drawer.mjs.map +1 -1
- package/dist/components/organisms/list/list.mjs +1 -6
- package/dist/components/organisms/list/list.mjs.map +1 -1
- package/dist/components/organisms/modal.d.mts +1 -0
- package/dist/components/organisms/modal.d.mts.map +1 -1
- package/dist/components/organisms/modal.mjs +14 -9
- package/dist/components/organisms/modal.mjs.map +1 -1
- package/dist/components/organisms/swiper/swiper.d.mts.map +1 -1
- package/dist/components/organisms/swiper/swiper.mjs +5 -1
- package/dist/components/organisms/swiper/swiper.mjs.map +1 -1
- package/dist/components/organisms/toast.d.mts.map +1 -1
- package/dist/components/organisms/toast.mjs +11 -4
- package/dist/components/organisms/toast.mjs.map +1 -1
- package/dist/components/templates/layout/header.mjs +1 -1
- package/dist/components/templates/layout/header.mjs.map +1 -1
- package/dist/components/templates/layout/layout.d.mts.map +1 -1
- package/dist/components/templates/layout/layout.mjs +23 -7
- package/dist/components/templates/layout/layout.mjs.map +1 -1
- package/dist/components/templates/layout/sider-context.mjs +20 -0
- package/dist/components/templates/layout/sider-context.mjs.map +1 -0
- package/dist/components/templates/layout/sider.d.mts.map +1 -1
- package/dist/components/templates/layout/sider.mjs +4 -2
- package/dist/components/templates/layout/sider.mjs.map +1 -1
- package/dist/core/badge.d.mts +1 -1
- package/dist/core/button.d.mts +2 -2
- package/dist/providers/Config/index.mjs +6 -2
- package/dist/providers/Config/index.mjs.map +1 -1
- package/dist/style.css +210 -6
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sider-context.mjs","names":[],"sources":["../../../../src/components/templates/layout/sider-context.ts"],"sourcesContent":["import { createContext, useContext, useLayoutEffect, useRef } from 'react';\n\n// `Layout` needs to know whether a `Sider` exists anywhere in its subtree\n// to decide flex-row vs flex-col — but `Children.toArray(children).some(...)`\n// only ever sees direct children, and doesn't flatten Fragments, so a\n// `Sider` wrapped in a Fragment (or a custom wrapper component) went\n// undetected. Registering presence via context instead survives any\n// amount of wrapping, since it's `Sider` itself reporting in, not `Layout`\n// inspecting its children's shape.\nexport interface SiderRegistry {\n registerSider: (id: object) => void;\n unregisterSider: (id: object) => void;\n}\n\nexport const SiderRegistryContext = createContext<SiderRegistry | null>(null);\n\nexport const useRegisterSider = () => {\n const registry = useContext(SiderRegistryContext);\n const idRef = useRef({});\n\n // `useLayoutEffect` (not `useEffect`) so the registration — and the\n // resulting flex-row switch on `Layout` — commits before the browser\n // paints, avoiding a flash of the flex-col fallback layout on mount.\n useLayoutEffect(() => {\n if (!registry) {\n return;\n }\n\n const id = idRef.current;\n registry.registerSider(id);\n\n return () => {\n registry.unregisterSider(id);\n };\n }, [registry]);\n};\n"],"mappings":";;;AAcA,MAAa,uBAAuB,cAAoC,KAAK;AAE7E,MAAa,yBAAyB;CACpC,MAAM,WAAW,WAAW,qBAAqB;CACjD,MAAM,QAAQ,OAAO,EAAE,CAAC;AAKxB,uBAAsB;AACpB,MAAI,CAAC,SACH;EAGF,MAAM,KAAK,MAAM;AACjB,WAAS,cAAc,GAAG;AAE1B,eAAa;AACX,YAAS,gBAAgB,GAAG;;IAE7B,CAAC,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sider.d.mts","names":[],"sources":["../../../../src/components/templates/layout/sider.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sider.d.mts","names":[],"sources":["../../../../src/components/templates/layout/sider.tsx"],"mappings":";;;UAUiB,KAAA,SAAc,IAAA,CAC7B,KAAA,CAAM,wBAAA;EAGN,KAAA;EACA,cAAA;EACA,WAAA;EACA,gBAAA;EACA,SAAA;EACA,YAAA;EACA,OAAA,GAAU,KAAA,CAAM,SAAA;EAChB,UAAA;IACE,OAAA;EAAA;EAEF,UAAA,IAAc,SAAA;AAAA;AAAA,cAMV,KAAA;EAAS,QAAA;EAAA,SAAA;EAAA,UAAA;EAAA,KAAA;EAAA,KAAA;EAAA,cAAA;EAAA,WAAA;EAAA,gBAAA;EAAA,SAAA,EAAA,UAAA;EAAA,YAAA;EAAA,OAAA;EAAA,UAAA,EAAA,WAAA;EAAA,GAAA;AAAA,GAcZ,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../../utils.mjs";
|
|
4
|
+
import { useRegisterSider } from "./sider-context.mjs";
|
|
4
5
|
import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
|
5
6
|
import { useState } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -8,6 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
9
|
//#region src/components/templates/layout/sider.tsx
|
|
9
10
|
const toCssSize = (value) => typeof value === "number" ? `${value}px` : value;
|
|
10
11
|
const Sider = ({ children, className, classNames, style, width = 200, collapsedWidth = 80, collapsible = false, defaultCollapsed = false, collapsed: _collapsed, reverseArrow = false, trigger, onCollapse: _onCollapse = () => {}, ...props }) => {
|
|
12
|
+
useRegisterSider();
|
|
11
13
|
const [uncontrolledCollapsed, setUncontrolledCollapsed] = useState(defaultCollapsed);
|
|
12
14
|
const controlled = _collapsed !== void 0;
|
|
13
15
|
const collapsed = controlled ? _collapsed : uncontrolledCollapsed;
|
|
@@ -18,7 +20,7 @@ const Sider = ({ children, className, classNames, style, width = 200, collapsedW
|
|
|
18
20
|
};
|
|
19
21
|
const TriggerIcon = collapsed !== reverseArrow ? PanelLeftOpen : PanelLeftClose;
|
|
20
22
|
return /* @__PURE__ */ jsxs("aside", {
|
|
21
|
-
className: cn("z-
|
|
23
|
+
className: cn("z-10 flex h-full shrink-0 flex-col overflow-hidden", "transition-[width] duration-200", className),
|
|
22
24
|
style: {
|
|
23
25
|
width: toCssSize(collapsed ? collapsedWidth : width),
|
|
24
26
|
...style
|
|
@@ -32,7 +34,7 @@ const Sider = ({ children, className, classNames, style, width = 200, collapsedW
|
|
|
32
34
|
"aria-label": collapsed ? "펼치기" : "접기",
|
|
33
35
|
onClick: onCollapse,
|
|
34
36
|
className: cn("flex w-full shrink-0 items-center justify-center py-2", "cursor-pointer transition-colors hover:bg-black/5", classNames?.trigger),
|
|
35
|
-
children: trigger
|
|
37
|
+
children: trigger === void 0 ? /* @__PURE__ */ jsx(TriggerIcon, { className: "size-4" }) : trigger
|
|
36
38
|
})]
|
|
37
39
|
});
|
|
38
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sider.mjs","names":[],"sources":["../../../../src/components/templates/layout/sider.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\n\nimport { PanelLeftClose, PanelLeftOpen } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nexport interface Props extends Omit<\n React.ComponentPropsWithoutRef<'aside'>,\n 'onCollapse'\n> {\n width?: number | string;\n collapsedWidth?: number | string;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n collapsed?: boolean;\n reverseArrow?: boolean;\n trigger?: React.ReactNode;\n classNames?: {\n trigger?: string;\n };\n onCollapse?: (collapsed: boolean) => void;\n}\n\nconst toCssSize = (value: number | string) =>\n typeof value === 'number' ? `${value}px` : value;\n\nconst Sider = ({\n children,\n className,\n classNames,\n style,\n width = 200,\n collapsedWidth = 80,\n collapsible = false,\n defaultCollapsed = false,\n collapsed: _collapsed,\n reverseArrow = false,\n trigger,\n onCollapse: _onCollapse = () => {},\n ...props\n}: Props) => {\n const [uncontrolledCollapsed, setUncontrolledCollapsed] =\n useState(defaultCollapsed);\n\n const controlled = _collapsed !== undefined;\n const collapsed = controlled ? _collapsed : uncontrolledCollapsed;\n\n const onCollapse = () => {\n const next = !collapsed;\n\n if (!controlled) {\n setUncontrolledCollapsed(next);\n }\n _onCollapse(next);\n };\n\n const TriggerIcon =\n collapsed !== reverseArrow ? PanelLeftOpen : PanelLeftClose;\n\n return (\n <aside\n className={cn(\n 'z-100 flex h-full shrink-0 flex-col overflow-hidden',\n 'transition-[width] duration-200',\n className,\n //\n )}\n style={{\n width: toCssSize(collapsed ? collapsedWidth : width),\n ...style,\n }}\n {...props}\n >\n <div className=\"min-h-0 flex-1 overflow-auto\">{children}</div>\n {collapsible && (\n <button\n type=\"button\"\n aria-label={collapsed ? '펼치기' : '접기'}\n onClick={onCollapse}\n className={cn(\n 'flex w-full shrink-0 items-center justify-center py-2',\n 'cursor-pointer transition-colors hover:bg-black/5',\n classNames?.trigger,\n //\n )}\n >\n {trigger
|
|
1
|
+
{"version":3,"file":"sider.mjs","names":[],"sources":["../../../../src/components/templates/layout/sider.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\n\nimport { PanelLeftClose, PanelLeftOpen } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { useRegisterSider } from './sider-context';\n\nexport interface Props extends Omit<\n React.ComponentPropsWithoutRef<'aside'>,\n 'onCollapse'\n> {\n width?: number | string;\n collapsedWidth?: number | string;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n collapsed?: boolean;\n reverseArrow?: boolean;\n trigger?: React.ReactNode;\n classNames?: {\n trigger?: string;\n };\n onCollapse?: (collapsed: boolean) => void;\n}\n\nconst toCssSize = (value: number | string) =>\n typeof value === 'number' ? `${value}px` : value;\n\nconst Sider = ({\n children,\n className,\n classNames,\n style,\n width = 200,\n collapsedWidth = 80,\n collapsible = false,\n defaultCollapsed = false,\n collapsed: _collapsed,\n reverseArrow = false,\n trigger,\n onCollapse: _onCollapse = () => {},\n ...props\n}: Props) => {\n useRegisterSider();\n\n const [uncontrolledCollapsed, setUncontrolledCollapsed] =\n useState(defaultCollapsed);\n\n const controlled = _collapsed !== undefined;\n const collapsed = controlled ? _collapsed : uncontrolledCollapsed;\n\n const onCollapse = () => {\n const next = !collapsed;\n\n if (!controlled) {\n setUncontrolledCollapsed(next);\n }\n _onCollapse(next);\n };\n\n const TriggerIcon =\n collapsed !== reverseArrow ? PanelLeftOpen : PanelLeftClose;\n\n return (\n <aside\n className={cn(\n // Below Header's z-50 (and every other floating/overlay primitive\n // in this library, which all use z-50) — Sider is a static layout\n // column, not floating chrome, and previously outranked Header\n // with an arbitrary z-100, covering it once Header stuck to the\n // viewport top on scroll.\n 'z-10 flex h-full shrink-0 flex-col overflow-hidden',\n 'transition-[width] duration-200',\n className,\n //\n )}\n style={{\n width: toCssSize(collapsed ? collapsedWidth : width),\n ...style,\n }}\n {...props}\n >\n <div className=\"min-h-0 flex-1 overflow-auto\">{children}</div>\n {collapsible && (\n <button\n type=\"button\"\n aria-label={collapsed ? '펼치기' : '접기'}\n onClick={onCollapse}\n className={cn(\n 'flex w-full shrink-0 items-center justify-center py-2',\n 'cursor-pointer transition-colors hover:bg-black/5',\n classNames?.trigger,\n //\n )}\n >\n {trigger === undefined ? <TriggerIcon className=\"size-4\" /> : trigger}\n </button>\n )}\n </aside>\n );\n};\n\nexport default Sider;\n"],"mappings":";;;;;;;;;AA2BA,MAAM,aAAa,UACjB,OAAO,UAAU,WAAW,GAAG,MAAM,MAAM;AAE7C,MAAM,SAAS,EACb,UACA,WACA,YACA,OACA,QAAQ,KACR,iBAAiB,IACjB,cAAc,OACd,mBAAmB,OACnB,WAAW,YACX,eAAe,OACf,SACA,YAAY,oBAAoB,IAChC,GAAG,YACQ;AACX,mBAAkB;CAElB,MAAM,CAAC,uBAAuB,4BAC5B,SAAS,iBAAiB;CAE5B,MAAM,aAAa,eAAe;CAClC,MAAM,YAAY,aAAa,aAAa;CAE5C,MAAM,mBAAmB;EACvB,MAAM,OAAO,CAAC;AAEd,MAAI,CAAC,WACH,0BAAyB,KAAK;AAEhC,cAAY,KAAK;;CAGnB,MAAM,cACJ,cAAc,eAAe,gBAAgB;AAE/C,QACE,qBAAC;EACC,WAAW,GAMT,sDACA,mCACA,UAED;EACD,OAAO;GACL,OAAO,UAAU,YAAY,iBAAiB,MAAM;GACpD,GAAG;GACJ;EACD,GAAI;aAEJ,oBAAC;GAAI,WAAU;GAAgC;IAAe,EAC7D,eACC,oBAAC;GACC,MAAK;GACL,cAAY,YAAY,QAAQ;GAChC,SAAS;GACT,WAAW,GACT,yDACA,qDACA,YAAY,QAEb;aAEA,YAAY,SAAY,oBAAC,eAAY,WAAU,WAAW,GAAG;IACvD;GAEL"}
|
package/dist/core/badge.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ declare namespace badge_d_exports {
|
|
|
8
8
|
export { Badge, Props, badgeVariants };
|
|
9
9
|
}
|
|
10
10
|
declare const badgeVariants: (props?: ({
|
|
11
|
-
variant?: "default" | "
|
|
11
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
13
|
type Props = React$1.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
14
14
|
asChild?: boolean;
|
package/dist/core/button.d.mts
CHANGED
|
@@ -8,8 +8,8 @@ declare namespace button_d_exports {
|
|
|
8
8
|
export { Button, Props, buttonVariants };
|
|
9
9
|
}
|
|
10
10
|
declare const buttonVariants: (props?: ({
|
|
11
|
-
variant?: "link" | "default" | "
|
|
12
|
-
size?: "
|
|
11
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
12
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
13
13
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
14
14
|
type Props = React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
15
15
|
asChild?: boolean;
|
|
@@ -39,6 +39,7 @@ const buildCssVars = (token) => {
|
|
|
39
39
|
};
|
|
40
40
|
const Config = ({ theme = {}, className, children }) => {
|
|
41
41
|
const parent = useConfig();
|
|
42
|
+
const themeKey = JSON.stringify(theme);
|
|
42
43
|
const mergedTheme = useMemo(() => ({
|
|
43
44
|
...parent.theme,
|
|
44
45
|
...theme,
|
|
@@ -46,7 +47,7 @@ const Config = ({ theme = {}, className, children }) => {
|
|
|
46
47
|
...parent.theme.token,
|
|
47
48
|
...theme.token
|
|
48
49
|
}
|
|
49
|
-
}), [parent.theme,
|
|
50
|
+
}), [JSON.stringify(parent.theme), themeKey]);
|
|
50
51
|
const contextValue = useMemo(() => ({ theme: mergedTheme }), [mergedTheme]);
|
|
51
52
|
const cssVars = useMemo(() => buildCssVars(mergedTheme.token), [mergedTheme.token]);
|
|
52
53
|
const hasCssVars = Object.keys(cssVars).length > 0;
|
|
@@ -56,7 +57,10 @@ const Config = ({ theme = {}, className, children }) => {
|
|
|
56
57
|
value: contextValue,
|
|
57
58
|
children: needsWrapper ? /* @__PURE__ */ jsx("div", {
|
|
58
59
|
className: cn(mergedTheme.dark && "dark", className),
|
|
59
|
-
style:
|
|
60
|
+
style: {
|
|
61
|
+
...hasCssVars ? cssVars : void 0,
|
|
62
|
+
display: "contents"
|
|
63
|
+
},
|
|
60
64
|
children
|
|
61
65
|
}) : children
|
|
62
66
|
});
|
|
@@ -1 +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 [
|
|
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 // `theme` is typically a fresh inline object literal at the call site\n // (and `parent.theme` inherits the same problem from its own Config\n // ancestor), so depending on them directly meant mergedTheme/contextValue\n // got a new identity on every render regardless of whether the actual\n // values changed — every useConfig() consumer in the tree re-rendered on\n // every render of whatever's above this Config, which for the common\n // app-root usage is everything. Depend on a serialized key instead so\n // the memo only invalidates when the content actually changes; these\n // are small, string/boolean-only objects, so JSON.stringify is cheap.\n const themeKey = JSON.stringify(theme);\n const parentThemeKey = JSON.stringify(parent.theme);\n\n const mergedTheme = useMemo<ThemeConfig>(\n () => ({\n ...parent.theme,\n ...theme,\n token: {\n ...parent.theme.token,\n ...theme.token,\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [parentThemeKey, themeKey],\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={{\n ...(hasCssVars ? cssVars : undefined),\n // Keeps this element out of the layout box tree — so it\n // doesn't intercept flex/grid child relationships or break\n // height chains like min-h-screen — while custom properties\n // and the `dark` class selector still cascade to children\n // normally (inheritance and box generation are separate\n // mechanisms in CSS). Note this means className shouldn't be\n // used here for anything that needs a real box (padding,\n // background, borders); Config's className is meant for\n // theming hooks (the `dark` class, arbitrary selector hooks),\n // not layout.\n display: 'contents',\n }}\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;CAW1B,MAAM,WAAW,KAAK,UAAU,MAAM;CAGtC,MAAM,cAAc,eACX;EACL,GAAG,OAAO;EACV,GAAG;EACH,OAAO;GACL,GAAG,OAAO,MAAM;GAChB,GAAG,MAAM;GACV;EACF,GAED,CAZqB,KAAK,UAAU,OAAO,MAAM,EAYhC,SAAS,CAC3B;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;IACL,GAAI,aAAa,UAAU;IAW3B,SAAS;IACV;GAEA;IACG,GAEN;GAEe"}
|
package/dist/style.css
CHANGED
|
@@ -275,15 +275,27 @@
|
|
|
275
275
|
.right-5 {
|
|
276
276
|
right: calc(var(--spacing) * 5);
|
|
277
277
|
}
|
|
278
|
+
.right-full {
|
|
279
|
+
right: 100%;
|
|
280
|
+
}
|
|
281
|
+
.bottom-4 {
|
|
282
|
+
bottom: calc(var(--spacing) * 4);
|
|
283
|
+
}
|
|
278
284
|
.bottom-5 {
|
|
279
285
|
bottom: calc(var(--spacing) * 5);
|
|
280
286
|
}
|
|
287
|
+
.bottom-full {
|
|
288
|
+
bottom: 100%;
|
|
289
|
+
}
|
|
281
290
|
.left-0 {
|
|
282
291
|
left: calc(var(--spacing) * 0);
|
|
283
292
|
}
|
|
284
293
|
.left-1\/2 {
|
|
285
294
|
left: calc(1/2 * 100%);
|
|
286
295
|
}
|
|
296
|
+
.left-4 {
|
|
297
|
+
left: calc(var(--spacing) * 4);
|
|
298
|
+
}
|
|
287
299
|
.left-\[50\%\] {
|
|
288
300
|
left: 50%;
|
|
289
301
|
}
|
|
@@ -299,9 +311,6 @@
|
|
|
299
311
|
.z-50 {
|
|
300
312
|
z-index: 50;
|
|
301
313
|
}
|
|
302
|
-
.z-100 {
|
|
303
|
-
z-index: 100;
|
|
304
|
-
}
|
|
305
314
|
.z-10000 {
|
|
306
315
|
z-index: 10000;
|
|
307
316
|
}
|
|
@@ -404,6 +413,9 @@
|
|
|
404
413
|
.block {
|
|
405
414
|
display: block;
|
|
406
415
|
}
|
|
416
|
+
.contents {
|
|
417
|
+
display: contents;
|
|
418
|
+
}
|
|
407
419
|
.flex {
|
|
408
420
|
display: flex;
|
|
409
421
|
}
|
|
@@ -422,6 +434,9 @@
|
|
|
422
434
|
.inline-flex {
|
|
423
435
|
display: inline-flex;
|
|
424
436
|
}
|
|
437
|
+
.table {
|
|
438
|
+
display: table;
|
|
439
|
+
}
|
|
425
440
|
.field-sizing-content {
|
|
426
441
|
field-sizing: content;
|
|
427
442
|
}
|
|
@@ -717,9 +732,6 @@
|
|
|
717
732
|
.cursor-pointer {
|
|
718
733
|
cursor: pointer;
|
|
719
734
|
}
|
|
720
|
-
.resize {
|
|
721
|
-
resize: both;
|
|
722
|
-
}
|
|
723
735
|
.scroll-my-1 {
|
|
724
736
|
scroll-margin-block: calc(var(--spacing) * 1);
|
|
725
737
|
}
|
|
@@ -885,6 +897,10 @@
|
|
|
885
897
|
border-top-left-radius: var(--radius);
|
|
886
898
|
border-top-right-radius: var(--radius);
|
|
887
899
|
}
|
|
900
|
+
.rounded-l-\[30px\]\! {
|
|
901
|
+
border-top-left-radius: 30px !important;
|
|
902
|
+
border-bottom-left-radius: 30px !important;
|
|
903
|
+
}
|
|
888
904
|
.rounded-l-lg {
|
|
889
905
|
border-top-left-radius: var(--radius);
|
|
890
906
|
border-bottom-left-radius: var(--radius);
|
|
@@ -897,6 +913,10 @@
|
|
|
897
913
|
border-top-left-radius: 0;
|
|
898
914
|
border-bottom-left-radius: 0;
|
|
899
915
|
}
|
|
916
|
+
.rounded-r-\[30px\]\! {
|
|
917
|
+
border-top-right-radius: 30px !important;
|
|
918
|
+
border-bottom-right-radius: 30px !important;
|
|
919
|
+
}
|
|
900
920
|
.rounded-r-lg {
|
|
901
921
|
border-top-right-radius: var(--radius);
|
|
902
922
|
border-bottom-right-radius: var(--radius);
|
|
@@ -909,6 +929,10 @@
|
|
|
909
929
|
border-top-right-radius: 0;
|
|
910
930
|
border-bottom-right-radius: 0;
|
|
911
931
|
}
|
|
932
|
+
.rounded-b-\[30px\]\! {
|
|
933
|
+
border-bottom-right-radius: 30px !important;
|
|
934
|
+
border-bottom-left-radius: 30px !important;
|
|
935
|
+
}
|
|
912
936
|
.rounded-b-lg {
|
|
913
937
|
border-bottom-right-radius: var(--radius);
|
|
914
938
|
border-bottom-left-radius: var(--radius);
|
|
@@ -1380,6 +1404,9 @@
|
|
|
1380
1404
|
outline-style: var(--tw-outline-style);
|
|
1381
1405
|
outline-width: 1px;
|
|
1382
1406
|
}
|
|
1407
|
+
.filter {
|
|
1408
|
+
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
1409
|
+
}
|
|
1383
1410
|
.transition {
|
|
1384
1411
|
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
1385
1412
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -1617,6 +1644,42 @@
|
|
|
1617
1644
|
position: absolute;
|
|
1618
1645
|
}
|
|
1619
1646
|
}
|
|
1647
|
+
.before\:top-0 {
|
|
1648
|
+
&::before {
|
|
1649
|
+
content: var(--tw-content);
|
|
1650
|
+
top: calc(var(--spacing) * 0);
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
.before\:top-1\/2 {
|
|
1654
|
+
&::before {
|
|
1655
|
+
content: var(--tw-content);
|
|
1656
|
+
top: calc(1/2 * 100%);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
.before\:right-0 {
|
|
1660
|
+
&::before {
|
|
1661
|
+
content: var(--tw-content);
|
|
1662
|
+
right: calc(var(--spacing) * 0);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
.before\:bottom-0 {
|
|
1666
|
+
&::before {
|
|
1667
|
+
content: var(--tw-content);
|
|
1668
|
+
bottom: calc(var(--spacing) * 0);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
.before\:left-0 {
|
|
1672
|
+
&::before {
|
|
1673
|
+
content: var(--tw-content);
|
|
1674
|
+
left: calc(var(--spacing) * 0);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
.before\:left-1\/2 {
|
|
1678
|
+
&::before {
|
|
1679
|
+
content: var(--tw-content);
|
|
1680
|
+
left: calc(1/2 * 100%);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1620
1683
|
.before\:h-0 {
|
|
1621
1684
|
&::before {
|
|
1622
1685
|
content: var(--tw-content);
|
|
@@ -1629,6 +1692,20 @@
|
|
|
1629
1692
|
width: calc(var(--spacing) * 0);
|
|
1630
1693
|
}
|
|
1631
1694
|
}
|
|
1695
|
+
.before\:-translate-x-1\/2 {
|
|
1696
|
+
&::before {
|
|
1697
|
+
content: var(--tw-content);
|
|
1698
|
+
--tw-translate-x: calc(calc(1/2 * 100%) * -1);
|
|
1699
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
.before\:-translate-y-1\/2 {
|
|
1703
|
+
&::before {
|
|
1704
|
+
content: var(--tw-content);
|
|
1705
|
+
--tw-translate-y: calc(calc(1/2 * 100%) * -1);
|
|
1706
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1632
1709
|
.before\:border-t-\[9px\] {
|
|
1633
1710
|
&::before {
|
|
1634
1711
|
content: var(--tw-content);
|
|
@@ -1723,12 +1800,66 @@
|
|
|
1723
1800
|
inset-block: calc(var(--spacing) * 0);
|
|
1724
1801
|
}
|
|
1725
1802
|
}
|
|
1803
|
+
.after\:-top-px {
|
|
1804
|
+
&::after {
|
|
1805
|
+
content: var(--tw-content);
|
|
1806
|
+
top: -1px;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
.after\:top-1\/2 {
|
|
1810
|
+
&::after {
|
|
1811
|
+
content: var(--tw-content);
|
|
1812
|
+
top: calc(1/2 * 100%);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
.after\:top-px {
|
|
1816
|
+
&::after {
|
|
1817
|
+
content: var(--tw-content);
|
|
1818
|
+
top: 1px;
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
.after\:-right-px {
|
|
1822
|
+
&::after {
|
|
1823
|
+
content: var(--tw-content);
|
|
1824
|
+
right: -1px;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
.after\:right-px {
|
|
1828
|
+
&::after {
|
|
1829
|
+
content: var(--tw-content);
|
|
1830
|
+
right: 1px;
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
.after\:-bottom-px {
|
|
1834
|
+
&::after {
|
|
1835
|
+
content: var(--tw-content);
|
|
1836
|
+
bottom: -1px;
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
.after\:bottom-px {
|
|
1840
|
+
&::after {
|
|
1841
|
+
content: var(--tw-content);
|
|
1842
|
+
bottom: 1px;
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
.after\:-left-px {
|
|
1846
|
+
&::after {
|
|
1847
|
+
content: var(--tw-content);
|
|
1848
|
+
left: -1px;
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1726
1851
|
.after\:left-1\/2 {
|
|
1727
1852
|
&::after {
|
|
1728
1853
|
content: var(--tw-content);
|
|
1729
1854
|
left: calc(1/2 * 100%);
|
|
1730
1855
|
}
|
|
1731
1856
|
}
|
|
1857
|
+
.after\:left-px {
|
|
1858
|
+
&::after {
|
|
1859
|
+
content: var(--tw-content);
|
|
1860
|
+
left: 1px;
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1732
1863
|
.after\:h-0 {
|
|
1733
1864
|
&::after {
|
|
1734
1865
|
content: var(--tw-content);
|
|
@@ -1754,6 +1885,13 @@
|
|
|
1754
1885
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1755
1886
|
}
|
|
1756
1887
|
}
|
|
1888
|
+
.after\:-translate-y-1\/2 {
|
|
1889
|
+
&::after {
|
|
1890
|
+
content: var(--tw-content);
|
|
1891
|
+
--tw-translate-y: calc(calc(1/2 * 100%) * -1);
|
|
1892
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1757
1895
|
.after\:border-t-8 {
|
|
1758
1896
|
&::after {
|
|
1759
1897
|
content: var(--tw-content);
|
|
@@ -3467,6 +3605,59 @@
|
|
|
3467
3605
|
inherits: false;
|
|
3468
3606
|
initial-value: solid;
|
|
3469
3607
|
}
|
|
3608
|
+
@property --tw-blur {
|
|
3609
|
+
syntax: "*";
|
|
3610
|
+
inherits: false;
|
|
3611
|
+
}
|
|
3612
|
+
@property --tw-brightness {
|
|
3613
|
+
syntax: "*";
|
|
3614
|
+
inherits: false;
|
|
3615
|
+
}
|
|
3616
|
+
@property --tw-contrast {
|
|
3617
|
+
syntax: "*";
|
|
3618
|
+
inherits: false;
|
|
3619
|
+
}
|
|
3620
|
+
@property --tw-grayscale {
|
|
3621
|
+
syntax: "*";
|
|
3622
|
+
inherits: false;
|
|
3623
|
+
}
|
|
3624
|
+
@property --tw-hue-rotate {
|
|
3625
|
+
syntax: "*";
|
|
3626
|
+
inherits: false;
|
|
3627
|
+
}
|
|
3628
|
+
@property --tw-invert {
|
|
3629
|
+
syntax: "*";
|
|
3630
|
+
inherits: false;
|
|
3631
|
+
}
|
|
3632
|
+
@property --tw-opacity {
|
|
3633
|
+
syntax: "*";
|
|
3634
|
+
inherits: false;
|
|
3635
|
+
}
|
|
3636
|
+
@property --tw-saturate {
|
|
3637
|
+
syntax: "*";
|
|
3638
|
+
inherits: false;
|
|
3639
|
+
}
|
|
3640
|
+
@property --tw-sepia {
|
|
3641
|
+
syntax: "*";
|
|
3642
|
+
inherits: false;
|
|
3643
|
+
}
|
|
3644
|
+
@property --tw-drop-shadow {
|
|
3645
|
+
syntax: "*";
|
|
3646
|
+
inherits: false;
|
|
3647
|
+
}
|
|
3648
|
+
@property --tw-drop-shadow-color {
|
|
3649
|
+
syntax: "*";
|
|
3650
|
+
inherits: false;
|
|
3651
|
+
}
|
|
3652
|
+
@property --tw-drop-shadow-alpha {
|
|
3653
|
+
syntax: "<percentage>";
|
|
3654
|
+
inherits: false;
|
|
3655
|
+
initial-value: 100%;
|
|
3656
|
+
}
|
|
3657
|
+
@property --tw-drop-shadow-size {
|
|
3658
|
+
syntax: "*";
|
|
3659
|
+
inherits: false;
|
|
3660
|
+
}
|
|
3470
3661
|
@property --tw-duration {
|
|
3471
3662
|
syntax: "*";
|
|
3472
3663
|
inherits: false;
|
|
@@ -3516,6 +3707,19 @@
|
|
|
3516
3707
|
--tw-ring-offset-color: #fff;
|
|
3517
3708
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
3518
3709
|
--tw-outline-style: solid;
|
|
3710
|
+
--tw-blur: initial;
|
|
3711
|
+
--tw-brightness: initial;
|
|
3712
|
+
--tw-contrast: initial;
|
|
3713
|
+
--tw-grayscale: initial;
|
|
3714
|
+
--tw-hue-rotate: initial;
|
|
3715
|
+
--tw-invert: initial;
|
|
3716
|
+
--tw-opacity: initial;
|
|
3717
|
+
--tw-saturate: initial;
|
|
3718
|
+
--tw-sepia: initial;
|
|
3719
|
+
--tw-drop-shadow: initial;
|
|
3720
|
+
--tw-drop-shadow-color: initial;
|
|
3721
|
+
--tw-drop-shadow-alpha: 100%;
|
|
3722
|
+
--tw-drop-shadow-size: initial;
|
|
3519
3723
|
--tw-duration: initial;
|
|
3520
3724
|
--tw-content: "";
|
|
3521
3725
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbpark/ui-kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Modern React UI component library built with TypeScript, Tailwind CSS, and Radix UI. Featuring atoms, molecules, organisms and layout templates for building beautiful interfaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|