@nayhoo/ui 0.16.1 → 0.17.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/chunk-IKDQWTMS.mjs +28 -0
- package/dist/chunk-IKDQWTMS.mjs.map +1 -0
- package/dist/components/container.mjs +5 -22
- package/dist/components/container.mjs.map +1 -1
- package/dist/components/dialog.mjs +1 -1
- package/dist/patterns/index.css +14064 -0
- package/dist/patterns/index.css.map +1 -0
- package/dist/patterns/index.d.mts +11 -0
- package/dist/patterns/index.d.ts +11 -0
- package/dist/patterns/index.js +227 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/index.mjs +91 -0
- package/dist/patterns/index.mjs.map +1 -0
- package/dist/theme/index.d.mts +7 -7
- package/dist/theme/index.d.ts +7 -7
- package/dist/theme/index.mjs +10 -10
- package/package.json +7 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sprinkles
|
|
3
|
+
} from "../chunk-Z6RQ453R.mjs";
|
|
4
|
+
import "../chunk-O62XWWJU.mjs";
|
|
5
|
+
import "../chunk-KH7OG63I.mjs";
|
|
6
|
+
import "../chunk-C4NLMHMQ.mjs";
|
|
7
|
+
import "../chunk-DXKT5AFF.mjs";
|
|
8
|
+
import "../chunk-Y6BNWBLR.mjs";
|
|
9
|
+
import "../chunk-NOIOHUNH.mjs";
|
|
10
|
+
import "../chunk-JGZLOTH3.mjs";
|
|
11
|
+
import "../chunk-P3OUEGR4.mjs";
|
|
12
|
+
import "../chunk-5WJ4KGIE.mjs";
|
|
13
|
+
import "../chunk-WUVNL3DI.mjs";
|
|
14
|
+
import "../chunk-S6KKPOPH.mjs";
|
|
15
|
+
import "../chunk-AXOHCT5Q.mjs";
|
|
16
|
+
import "../chunk-KE7EIF6L.mjs";
|
|
17
|
+
import "../chunk-JZBPCPSP.mjs";
|
|
18
|
+
import "../chunk-HNVVD3WS.mjs";
|
|
19
|
+
import "../chunk-DOHVBMXO.mjs";
|
|
20
|
+
import "../chunk-P2VEMZGS.mjs";
|
|
21
|
+
import "../chunk-EXKRRQYL.mjs";
|
|
22
|
+
import {
|
|
23
|
+
theme
|
|
24
|
+
} from "../chunk-N535ABFC.mjs";
|
|
25
|
+
import "../chunk-GHCXVMQR.mjs";
|
|
26
|
+
import {
|
|
27
|
+
Box
|
|
28
|
+
} from "../chunk-LSB5JVS2.mjs";
|
|
29
|
+
import "../chunk-OI24WXH6.mjs";
|
|
30
|
+
import "../chunk-4A7WL3BM.mjs";
|
|
31
|
+
import "../chunk-47YGQSLM.mjs";
|
|
32
|
+
import "../chunk-6RSPMV3B.mjs";
|
|
33
|
+
import "../chunk-IFN22XIN.mjs";
|
|
34
|
+
import "../chunk-5ZOT2LOO.mjs";
|
|
35
|
+
import {
|
|
36
|
+
Container
|
|
37
|
+
} from "../chunk-IKDQWTMS.mjs";
|
|
38
|
+
import "../chunk-PUW3KNR3.mjs";
|
|
39
|
+
import "../chunk-UPZYS6TE.mjs";
|
|
40
|
+
import "../chunk-7EGQM3ZL.mjs";
|
|
41
|
+
|
|
42
|
+
// src/patterns/nav.tsx
|
|
43
|
+
import { useScrollPosition } from "@nayhoo/hooks";
|
|
44
|
+
import { jsx } from "react/jsx-runtime";
|
|
45
|
+
var Nav = ({
|
|
46
|
+
children,
|
|
47
|
+
variant = "fixed",
|
|
48
|
+
fullWidth = false,
|
|
49
|
+
compact = false
|
|
50
|
+
}) => {
|
|
51
|
+
const scrollPosition = useScrollPosition();
|
|
52
|
+
const isScrolled = scrollPosition > 24;
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
Box,
|
|
55
|
+
{
|
|
56
|
+
asChild: true,
|
|
57
|
+
className: sprinkles({
|
|
58
|
+
paddingY: {
|
|
59
|
+
initial: void 0,
|
|
60
|
+
xs: isScrolled || compact ? void 0 : 2
|
|
61
|
+
}
|
|
62
|
+
}),
|
|
63
|
+
style: {
|
|
64
|
+
borderBottom: "1px solid",
|
|
65
|
+
borderColor: isScrolled || compact ? theme.semanticColors.line : "transparent",
|
|
66
|
+
position: variant,
|
|
67
|
+
top: 0,
|
|
68
|
+
transition: "border-color 0.4s, padding 0.4s",
|
|
69
|
+
width: "100%",
|
|
70
|
+
zIndex: theme.zIndices[1],
|
|
71
|
+
backgroundColor: `color-mix(in srgb, ${theme.semanticColors.background}, transparent 40%)`,
|
|
72
|
+
backdropFilter: "blur(10px)"
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ jsx("nav", { children: /* @__PURE__ */ jsx(
|
|
75
|
+
Container,
|
|
76
|
+
{
|
|
77
|
+
size: fullWidth ? "4" : "3",
|
|
78
|
+
style: {
|
|
79
|
+
padding: theme.space[2],
|
|
80
|
+
width: "100%"
|
|
81
|
+
},
|
|
82
|
+
children
|
|
83
|
+
}
|
|
84
|
+
) })
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
Nav
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/patterns/nav.tsx"],"sourcesContent":["import { Box } from \"@/components/box\";\nimport { Container } from \"@/components/container\";\nimport { sprinkles, theme } from \"@/theme\";\nimport { useScrollPosition } from \"@nayhoo/hooks\";\n\n/** Common Nav component for Nayhoo apps */\nexport const Nav = ({\n children,\n variant = \"fixed\",\n fullWidth = false,\n compact = false,\n}: {\n children: React.ReactNode;\n variant?: \"fixed\" | \"sticky\";\n fullWidth?: boolean;\n compact?: boolean;\n}) => {\n const scrollPosition = useScrollPosition();\n\n const isScrolled = scrollPosition > 24;\n\n return (\n <Box\n asChild\n className={sprinkles({\n paddingY: {\n initial: undefined,\n xs: isScrolled || compact ? undefined : 2,\n },\n })}\n style={{\n borderBottom: \"1px solid\",\n borderColor:\n isScrolled || compact ? theme.semanticColors.line : \"transparent\",\n position: variant,\n top: 0,\n transition: \"border-color 0.4s, padding 0.4s\",\n width: \"100%\",\n zIndex: theme.zIndices[1],\n backgroundColor: `color-mix(in srgb, ${theme.semanticColors.background}, transparent 40%)`,\n backdropFilter: \"blur(10px)\",\n }}\n >\n <nav>\n <Container\n size={fullWidth ? \"4\" : \"3\"}\n style={{\n padding: theme.space[2],\n width: \"100%\",\n }}\n >\n {children}\n </Container>\n </nav>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,yBAAyB;AAyC1B;AAtCD,IAAM,MAAM,CAAC;AAAA,EAClB;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AACZ,MAKM;AACJ,QAAM,iBAAiB,kBAAkB;AAEzC,QAAM,aAAa,iBAAiB;AAEpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAO;AAAA,MACP,WAAW,UAAU;AAAA,QACnB,UAAU;AAAA,UACR,SAAS;AAAA,UACT,IAAI,cAAc,UAAU,SAAY;AAAA,QAC1C;AAAA,MACF,CAAC;AAAA,MACD,OAAO;AAAA,QACL,cAAc;AAAA,QACd,aACE,cAAc,UAAU,MAAM,eAAe,OAAO;AAAA,QACtD,UAAU;AAAA,QACV,KAAK;AAAA,QACL,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,QAAQ,MAAM,SAAS,CAAC;AAAA,QACxB,iBAAiB,sBAAsB,MAAM,eAAe,UAAU;AAAA,QACtE,gBAAgB;AAAA,MAClB;AAAA,MAEA,8BAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,YAAY,MAAM;AAAA,UACxB,OAAO;AAAA,YACL,SAAS,MAAM,MAAM,CAAC;AAAA,YACtB,OAAO;AAAA,UACT;AAAA,UAEC;AAAA;AAAA,MACH,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
package/dist/theme/index.d.mts
CHANGED
|
@@ -26,13 +26,13 @@ declare const pulse: string;
|
|
|
26
26
|
declare const spin: string;
|
|
27
27
|
|
|
28
28
|
declare const sprinkles: ((props: {
|
|
29
|
-
display?: "
|
|
30
|
-
initial?: "
|
|
31
|
-
xs?: "
|
|
32
|
-
sm?: "
|
|
33
|
-
md?: "
|
|
34
|
-
lg?: "
|
|
35
|
-
xl?: "
|
|
29
|
+
display?: "none" | "initial" | "flex" | "block" | {
|
|
30
|
+
initial?: "none" | "initial" | "flex" | "block" | undefined;
|
|
31
|
+
xs?: "none" | "initial" | "flex" | "block" | undefined;
|
|
32
|
+
sm?: "none" | "initial" | "flex" | "block" | undefined;
|
|
33
|
+
md?: "none" | "initial" | "flex" | "block" | undefined;
|
|
34
|
+
lg?: "none" | "initial" | "flex" | "block" | undefined;
|
|
35
|
+
xl?: "none" | "initial" | "flex" | "block" | undefined;
|
|
36
36
|
} | undefined;
|
|
37
37
|
marginTop?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {
|
|
38
38
|
initial?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -26,13 +26,13 @@ declare const pulse: string;
|
|
|
26
26
|
declare const spin: string;
|
|
27
27
|
|
|
28
28
|
declare const sprinkles: ((props: {
|
|
29
|
-
display?: "
|
|
30
|
-
initial?: "
|
|
31
|
-
xs?: "
|
|
32
|
-
sm?: "
|
|
33
|
-
md?: "
|
|
34
|
-
lg?: "
|
|
35
|
-
xl?: "
|
|
29
|
+
display?: "none" | "initial" | "flex" | "block" | {
|
|
30
|
+
initial?: "none" | "initial" | "flex" | "block" | undefined;
|
|
31
|
+
xs?: "none" | "initial" | "flex" | "block" | undefined;
|
|
32
|
+
sm?: "none" | "initial" | "flex" | "block" | undefined;
|
|
33
|
+
md?: "none" | "initial" | "flex" | "block" | undefined;
|
|
34
|
+
lg?: "none" | "initial" | "flex" | "block" | undefined;
|
|
35
|
+
xl?: "none" | "initial" | "flex" | "block" | undefined;
|
|
36
36
|
} | undefined;
|
|
37
37
|
marginTop?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {
|
|
38
38
|
initial?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
|
package/dist/theme/index.mjs
CHANGED
|
@@ -10,6 +10,16 @@ import {
|
|
|
10
10
|
spin,
|
|
11
11
|
sprinkles
|
|
12
12
|
} from "../chunk-Z6RQ453R.mjs";
|
|
13
|
+
import {
|
|
14
|
+
checkmark,
|
|
15
|
+
darkTheme,
|
|
16
|
+
error,
|
|
17
|
+
lightTheme,
|
|
18
|
+
toastClose,
|
|
19
|
+
toastInner,
|
|
20
|
+
toastRoot,
|
|
21
|
+
toastViewport
|
|
22
|
+
} from "../chunk-O62XWWJU.mjs";
|
|
13
23
|
import {
|
|
14
24
|
skeletonRecipe
|
|
15
25
|
} from "../chunk-KH7OG63I.mjs";
|
|
@@ -23,16 +33,6 @@ import {
|
|
|
23
33
|
import {
|
|
24
34
|
tooltipContentRecipe
|
|
25
35
|
} from "../chunk-Y6BNWBLR.mjs";
|
|
26
|
-
import {
|
|
27
|
-
checkmark,
|
|
28
|
-
darkTheme,
|
|
29
|
-
error,
|
|
30
|
-
lightTheme,
|
|
31
|
-
toastClose,
|
|
32
|
-
toastInner,
|
|
33
|
-
toastRoot,
|
|
34
|
-
toastViewport
|
|
35
|
-
} from "../chunk-O62XWWJU.mjs";
|
|
36
36
|
import {
|
|
37
37
|
label
|
|
38
38
|
} from "../chunk-NOIOHUNH.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nayhoo/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"react": "^19.0.0"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@nayhoo/hooks": "^0.2.2",
|
|
14
15
|
"@radix-ui/colors": "^3.0.0",
|
|
15
16
|
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
16
17
|
"@radix-ui/react-avatar": "^1.1.2",
|
|
@@ -200,6 +201,11 @@
|
|
|
200
201
|
"module": "./dist/components/tooltip.mjs",
|
|
201
202
|
"default": "./dist/components/tooltip.js"
|
|
202
203
|
},
|
|
204
|
+
"./patterns": {
|
|
205
|
+
"types": "./dist/patterns/index.d.ts",
|
|
206
|
+
"module": "./dist/patterns/index.mjs",
|
|
207
|
+
"default": "./dist/patterns/index.js"
|
|
208
|
+
},
|
|
203
209
|
"./providers": {
|
|
204
210
|
"types": "./dist/providers/index.d.ts",
|
|
205
211
|
"module": "./dist/providers/index.mjs",
|