rockin 0.0.13 → 0.0.15
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/README.md +21 -3
- package/dist/chunk-7ZCRGTLA.js +209 -0
- package/dist/chunk-FYFBWCMJ.js +65 -0
- package/dist/chunk-RT2YVQ2Y.js +33 -0
- package/dist/hooks/index.d.ts +5 -1
- package/dist/hooks/index.js +6 -13
- package/dist/icon/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -1
- package/dist/provider.d.ts +17 -0
- package/dist/provider.js +13 -0
- package/dist/ui/index.d.ts +7 -2
- package/dist/ui/index.js +627 -587
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -18,6 +18,24 @@ import { cn } from "rockin/lib"
|
|
|
18
18
|
import "rockin/styles.css"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
The root entry also exports the client-side theme provider:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import type { ReactNode } from "react"
|
|
25
|
+
import { Provider } from "rockin"
|
|
26
|
+
|
|
27
|
+
export function AppProviders({ children }: { children: ReactNode }) {
|
|
28
|
+
return (
|
|
29
|
+
<Provider light="#ffffff" dark="#000000" fullscreen={false}>
|
|
30
|
+
{children}
|
|
31
|
+
</Provider>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`light` and `dark` override the browser theme colors. `fullscreen` controls the
|
|
37
|
+
`F`-key fullscreen shortcut and defaults to `true`.
|
|
38
|
+
|
|
21
39
|
Focused entry points are also available:
|
|
22
40
|
|
|
23
41
|
```tsx
|
|
@@ -33,7 +51,7 @@ import * as Gravity from "rockin/gravity"
|
|
|
33
51
|
## Development
|
|
34
52
|
|
|
35
53
|
```bash
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
bun install
|
|
55
|
+
bun run typecheck
|
|
56
|
+
bun run build
|
|
39
57
|
```
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFullscreen,
|
|
3
|
+
useNative
|
|
4
|
+
} from "./chunk-RT2YVQ2Y.js";
|
|
5
|
+
import {
|
|
6
|
+
TopLoader
|
|
7
|
+
} from "./chunk-3ZGQJTWY.js";
|
|
8
|
+
import {
|
|
9
|
+
TooltipProvider
|
|
10
|
+
} from "./chunk-FYFBWCMJ.js";
|
|
11
|
+
|
|
12
|
+
// src/provider.tsx
|
|
13
|
+
import { usePathname } from "next/navigation";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { useHotkeys } from "react-hotkeys-hook";
|
|
16
|
+
import { GooeyToaster } from "goey-toast";
|
|
17
|
+
import { ThemeProvider, useTheme } from "next-themes";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var browserThemeColors = {
|
|
20
|
+
light: "#ffffff",
|
|
21
|
+
dark: "#000000"
|
|
22
|
+
};
|
|
23
|
+
function syncBrowserChrome(theme, colors) {
|
|
24
|
+
const themeColor = colors[theme];
|
|
25
|
+
const statusBarStyle = theme === "dark" ? "black-translucent" : "default";
|
|
26
|
+
const themeColorMetas = document.querySelectorAll(
|
|
27
|
+
'meta[name="theme-color"]'
|
|
28
|
+
);
|
|
29
|
+
if (themeColorMetas.length) {
|
|
30
|
+
themeColorMetas.forEach((meta) => {
|
|
31
|
+
if (meta.content !== themeColor) {
|
|
32
|
+
meta.content = themeColor;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
const meta = document.createElement("meta");
|
|
37
|
+
meta.name = "theme-color";
|
|
38
|
+
meta.content = themeColor;
|
|
39
|
+
document.head.appendChild(meta);
|
|
40
|
+
}
|
|
41
|
+
const statusBarMetas = document.querySelectorAll(
|
|
42
|
+
'meta[name="apple-mobile-web-app-status-bar-style"]'
|
|
43
|
+
);
|
|
44
|
+
if (statusBarMetas.length) {
|
|
45
|
+
statusBarMetas.forEach((meta) => {
|
|
46
|
+
if (meta.content !== statusBarStyle) {
|
|
47
|
+
meta.content = statusBarStyle;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
const meta = document.createElement("meta");
|
|
52
|
+
meta.name = "apple-mobile-web-app-status-bar-style";
|
|
53
|
+
meta.content = statusBarStyle;
|
|
54
|
+
document.head.appendChild(meta);
|
|
55
|
+
}
|
|
56
|
+
if (document.documentElement.style.colorScheme !== theme) {
|
|
57
|
+
document.documentElement.style.colorScheme = theme;
|
|
58
|
+
}
|
|
59
|
+
if (document.documentElement.style.backgroundColor !== themeColor) {
|
|
60
|
+
document.documentElement.style.backgroundColor = themeColor;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function observeBrowserChrome(theme, colors) {
|
|
64
|
+
const observer = new MutationObserver(() => {
|
|
65
|
+
syncBrowserChrome(theme, colors);
|
|
66
|
+
});
|
|
67
|
+
observer.observe(document.head, {
|
|
68
|
+
childList: true,
|
|
69
|
+
subtree: true,
|
|
70
|
+
attributes: true,
|
|
71
|
+
attributeFilter: ["content"]
|
|
72
|
+
});
|
|
73
|
+
return observer;
|
|
74
|
+
}
|
|
75
|
+
function useBrowserTheme() {
|
|
76
|
+
const { resolvedTheme } = useTheme();
|
|
77
|
+
return resolvedTheme === "dark" ? "dark" : "light";
|
|
78
|
+
}
|
|
79
|
+
function BrowserThemeSync({ light, dark }) {
|
|
80
|
+
const pathname = usePathname();
|
|
81
|
+
const theme = useBrowserTheme();
|
|
82
|
+
const colors = React.useMemo(() => ({ light, dark }), [dark, light]);
|
|
83
|
+
React.useLayoutEffect(() => {
|
|
84
|
+
syncBrowserChrome(theme, colors);
|
|
85
|
+
}, [colors, pathname, theme]);
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
const observer = observeBrowserChrome(theme, colors);
|
|
88
|
+
return () => {
|
|
89
|
+
observer.disconnect();
|
|
90
|
+
};
|
|
91
|
+
}, [colors, theme]);
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function Provider({
|
|
95
|
+
children,
|
|
96
|
+
light = browserThemeColors.light,
|
|
97
|
+
dark = browserThemeColors.dark,
|
|
98
|
+
fullscreen = true,
|
|
99
|
+
...props
|
|
100
|
+
}) {
|
|
101
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(
|
|
102
|
+
ThemeProvider,
|
|
103
|
+
{
|
|
104
|
+
attribute: "class",
|
|
105
|
+
defaultTheme: "system",
|
|
106
|
+
enableSystem: true,
|
|
107
|
+
disableTransitionOnChange: true,
|
|
108
|
+
...props,
|
|
109
|
+
children: /* @__PURE__ */ jsxs(TopLoader, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(AppToaster, {}),
|
|
111
|
+
/* @__PURE__ */ jsx(AppStatusBarBackground, {}),
|
|
112
|
+
/* @__PURE__ */ jsx(NativeThemeEventSync, {}),
|
|
113
|
+
/* @__PURE__ */ jsx(BrowserThemeSync, { light, dark }),
|
|
114
|
+
/* @__PURE__ */ jsx(ThemeHotkey, {}),
|
|
115
|
+
fullscreen ? /* @__PURE__ */ jsx(FullscreenHotkey, {}) : null,
|
|
116
|
+
children
|
|
117
|
+
] })
|
|
118
|
+
}
|
|
119
|
+
) });
|
|
120
|
+
}
|
|
121
|
+
function AppToaster() {
|
|
122
|
+
const { resolvedTheme } = useTheme();
|
|
123
|
+
const toasterTheme = resolvedTheme === "dark" ? "dark" : "light";
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
GooeyToaster,
|
|
126
|
+
{
|
|
127
|
+
theme: toasterTheme,
|
|
128
|
+
position: "bottom-right",
|
|
129
|
+
closeButton: "top-left"
|
|
130
|
+
},
|
|
131
|
+
toasterTheme
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function AppStatusBarBackground() {
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
"aria-hidden": true,
|
|
139
|
+
className: "fixed inset-x-0 top-0 z-50 hidden h-(--app-safe-top) bg-background/80 backdrop-blur-xl standalone:block native:block"
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function NativeThemeEventSync() {
|
|
144
|
+
const { resolvedTheme } = useTheme();
|
|
145
|
+
React.useEffect(() => {
|
|
146
|
+
if (!resolvedTheme) return;
|
|
147
|
+
window.dispatchEvent(
|
|
148
|
+
new CustomEvent("kdpower:theme-change", {
|
|
149
|
+
detail: {
|
|
150
|
+
theme: resolvedTheme
|
|
151
|
+
}
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
}, [resolvedTheme]);
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
function isTypingTarget(target) {
|
|
158
|
+
if (!(target instanceof HTMLElement)) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
return target.isContentEditable || target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT";
|
|
162
|
+
}
|
|
163
|
+
function ThemeHotkey() {
|
|
164
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
165
|
+
React.useEffect(() => {
|
|
166
|
+
function onKeyDown(event) {
|
|
167
|
+
if (event.defaultPrevented || event.repeat) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (event.metaKey || event.ctrlKey || event.altKey) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (typeof event.key !== "string" || event.key.toLowerCase() !== "d") {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (isTypingTarget(event.target)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
|
180
|
+
}
|
|
181
|
+
window.addEventListener("keydown", onKeyDown);
|
|
182
|
+
return () => {
|
|
183
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
184
|
+
};
|
|
185
|
+
}, [resolvedTheme, setTheme]);
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
function FullscreenHotkey() {
|
|
189
|
+
const isNative = useNative();
|
|
190
|
+
const { toggleFullscreen } = useFullscreen();
|
|
191
|
+
useHotkeys(
|
|
192
|
+
"f",
|
|
193
|
+
() => {
|
|
194
|
+
void toggleFullscreen();
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
enabled: !isNative,
|
|
198
|
+
enableOnContentEditable: false,
|
|
199
|
+
enableOnFormTags: false,
|
|
200
|
+
preventDefault: true
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
browserThemeColors,
|
|
208
|
+
Provider
|
|
209
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// src/ui/tooltip.tsx
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function TooltipProvider({
|
|
6
|
+
delay = 0,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
TooltipPrimitive.Provider,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "tooltip-provider",
|
|
13
|
+
delay,
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function Tooltip({ ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
20
|
+
}
|
|
21
|
+
function TooltipTrigger({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
23
|
+
}
|
|
24
|
+
function TooltipContent({
|
|
25
|
+
className,
|
|
26
|
+
side = "top",
|
|
27
|
+
sideOffset = 4,
|
|
28
|
+
align = "center",
|
|
29
|
+
alignOffset = 0,
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
34
|
+
TooltipPrimitive.Positioner,
|
|
35
|
+
{
|
|
36
|
+
align,
|
|
37
|
+
alignOffset,
|
|
38
|
+
side,
|
|
39
|
+
sideOffset,
|
|
40
|
+
className: "isolate z-50",
|
|
41
|
+
children: /* @__PURE__ */ jsxs(
|
|
42
|
+
TooltipPrimitive.Popup,
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "tooltip-content",
|
|
45
|
+
className: cn(
|
|
46
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
children,
|
|
52
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
TooltipProvider,
|
|
62
|
+
Tooltip,
|
|
63
|
+
TooltipTrigger,
|
|
64
|
+
TooltipContent
|
|
65
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isNativeApp
|
|
3
|
+
} from "./chunk-ATPUW3SQ.js";
|
|
4
|
+
|
|
5
|
+
// src/hooks/useFullscreen.ts
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
function useFullscreen() {
|
|
8
|
+
const toggleFullscreen = React.useCallback(async () => {
|
|
9
|
+
if (document.fullscreenElement) {
|
|
10
|
+
await document.exitFullscreen();
|
|
11
|
+
} else {
|
|
12
|
+
await document.documentElement.requestFullscreen();
|
|
13
|
+
}
|
|
14
|
+
}, []);
|
|
15
|
+
return {
|
|
16
|
+
toggleFullscreen
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// src/hooks/useNative.ts
|
|
21
|
+
import { useEffect, useState } from "react";
|
|
22
|
+
function useNative() {
|
|
23
|
+
const [native, setNative] = useState(void 0);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setNative(isNativeApp());
|
|
26
|
+
}, []);
|
|
27
|
+
return native;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
useFullscreen,
|
|
32
|
+
useNative
|
|
33
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { NuqsAdapter } from 'nuqs/adapters/next/app';
|
|
2
2
|
|
|
3
|
+
declare function useFullscreen(): {
|
|
4
|
+
toggleFullscreen: () => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
|
|
3
7
|
declare function useMediaQuery(query: string): boolean;
|
|
4
8
|
|
|
5
9
|
declare function useMounted(): {
|
|
@@ -50,4 +54,4 @@ declare function useSearchParams(): {
|
|
|
50
54
|
transactionPage: number;
|
|
51
55
|
};
|
|
52
56
|
|
|
53
|
-
export { searchFocus, useMediaQuery, useMounted, useNative, useSearchParams };
|
|
57
|
+
export { searchFocus, useFullscreen, useMediaQuery, useMounted, useNative, useSearchParams };
|
package/dist/hooks/index.js
CHANGED
|
@@ -5,23 +5,15 @@ import {
|
|
|
5
5
|
searchParamKeys,
|
|
6
6
|
searchParams
|
|
7
7
|
} from "../chunk-BDQJCK4S.js";
|
|
8
|
+
import {
|
|
9
|
+
useFullscreen,
|
|
10
|
+
useNative
|
|
11
|
+
} from "../chunk-RT2YVQ2Y.js";
|
|
8
12
|
import {
|
|
9
13
|
useMediaQuery,
|
|
10
14
|
useMounted
|
|
11
15
|
} from "../chunk-C3RGHTDI.js";
|
|
12
|
-
import
|
|
13
|
-
isNativeApp
|
|
14
|
-
} from "../chunk-ATPUW3SQ.js";
|
|
15
|
-
|
|
16
|
-
// src/hooks/useNative.ts
|
|
17
|
-
import { useEffect, useState } from "react";
|
|
18
|
-
function useNative() {
|
|
19
|
-
const [native, setNative] = useState(void 0);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
setNative(isNativeApp());
|
|
22
|
-
}, []);
|
|
23
|
-
return native;
|
|
24
|
-
}
|
|
16
|
+
import "../chunk-ATPUW3SQ.js";
|
|
25
17
|
|
|
26
18
|
// src/hooks/useSearchParams.ts
|
|
27
19
|
import {
|
|
@@ -265,6 +257,7 @@ function useSearchParams() {
|
|
|
265
257
|
export {
|
|
266
258
|
NuqsAdapter,
|
|
267
259
|
searchFocus,
|
|
260
|
+
useFullscreen,
|
|
268
261
|
useMediaQuery,
|
|
269
262
|
useMounted,
|
|
270
263
|
useNative,
|
package/dist/icon/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from 'goey-toast';
|
|
|
4
4
|
export * from 'motion/react';
|
|
5
5
|
export * from 'next-themes';
|
|
6
6
|
export { TopLoader, TopLoaderProps } from './loader.js';
|
|
7
|
+
export { BrowserTheme, BrowserThemeColors, Provider, ProviderProps, browserThemeColors } from './provider.js';
|
|
7
8
|
import 'react';
|
|
8
9
|
import '@bprogress/next/app';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Provider,
|
|
4
|
+
browserThemeColors
|
|
5
|
+
} from "./chunk-7ZCRGTLA.js";
|
|
6
|
+
import "./chunk-RT2YVQ2Y.js";
|
|
1
7
|
import {
|
|
2
8
|
TopLoader
|
|
3
9
|
} from "./chunk-3ZGQJTWY.js";
|
|
10
|
+
import "./chunk-FYFBWCMJ.js";
|
|
11
|
+
import "./chunk-ATPUW3SQ.js";
|
|
4
12
|
import {
|
|
5
13
|
BellIcon,
|
|
6
14
|
IconSwap,
|
|
@@ -17,5 +25,7 @@ export {
|
|
|
17
25
|
IconSwap,
|
|
18
26
|
Loader,
|
|
19
27
|
default2 as NumberFlow,
|
|
20
|
-
|
|
28
|
+
Provider,
|
|
29
|
+
TopLoader,
|
|
30
|
+
browserThemeColors
|
|
21
31
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeProvider } from 'next-themes';
|
|
3
|
+
|
|
4
|
+
declare const browserThemeColors: {
|
|
5
|
+
readonly light: "#ffffff";
|
|
6
|
+
readonly dark: "#000000";
|
|
7
|
+
};
|
|
8
|
+
type BrowserTheme = keyof typeof browserThemeColors;
|
|
9
|
+
type BrowserThemeColors = Record<BrowserTheme, string>;
|
|
10
|
+
type ProviderProps = React.ComponentProps<typeof ThemeProvider> & {
|
|
11
|
+
light?: string;
|
|
12
|
+
dark?: string;
|
|
13
|
+
fullscreen?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function Provider({ children, light, dark, fullscreen, ...props }: ProviderProps): React.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { type BrowserTheme, type BrowserThemeColors, Provider, type ProviderProps, browserThemeColors };
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Provider,
|
|
4
|
+
browserThemeColors
|
|
5
|
+
} from "./chunk-7ZCRGTLA.js";
|
|
6
|
+
import "./chunk-RT2YVQ2Y.js";
|
|
7
|
+
import "./chunk-3ZGQJTWY.js";
|
|
8
|
+
import "./chunk-FYFBWCMJ.js";
|
|
9
|
+
import "./chunk-ATPUW3SQ.js";
|
|
10
|
+
export {
|
|
11
|
+
Provider,
|
|
12
|
+
browserThemeColors
|
|
13
|
+
};
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -788,7 +788,7 @@ declare function RollingNumber({ value, format, className, }: {
|
|
|
788
788
|
format?: (value: number) => string;
|
|
789
789
|
className?: string;
|
|
790
790
|
}): React$1.JSX.Element;
|
|
791
|
-
|
|
791
|
+
type NumberStepperProps = {
|
|
792
792
|
label: string;
|
|
793
793
|
value: number;
|
|
794
794
|
onChange: (value: number) => void;
|
|
@@ -797,7 +797,12 @@ declare function NumberStepper({ label, value, onChange, min, max, step, classNa
|
|
|
797
797
|
step?: number;
|
|
798
798
|
className?: string;
|
|
799
799
|
size?: keyof typeof sizeStyles;
|
|
800
|
-
|
|
800
|
+
disabled?: boolean;
|
|
801
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
802
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
803
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
804
|
+
};
|
|
805
|
+
declare const NumberStepper: React$1.ForwardRefExoticComponent<NumberStepperProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
801
806
|
|
|
802
807
|
declare const EASE_OUT: readonly [0.16, 1, 0.3, 1];
|
|
803
808
|
declare const EASE_IN_OUT: readonly [0.77, 0, 0.175, 1];
|