@jameskabz/nextcraft-ui 0.8.2 → 0.8.4
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/components/craft-data-table-header.cjs +1 -1
- package/dist/components/craft-data-table-header.cjs.map +1 -1
- package/dist/components/craft-data-table-header.js +1 -1
- package/dist/components/craft-data-table-header.js.map +1 -1
- package/dist/components/craft-data-table.cjs +2 -2
- package/dist/components/craft-data-table.cjs.map +1 -1
- package/dist/components/craft-data-table.js +2 -2
- package/dist/components/craft-data-table.js.map +1 -1
- package/dist/components/craft-loader.cjs +20 -4
- package/dist/components/craft-loader.cjs.map +1 -1
- package/dist/components/craft-loader.js +20 -4
- package/dist/components/craft-loader.js.map +1 -1
- package/dist/components/craft-toast.d.cts +11 -3
- package/dist/components/craft-toast.d.ts +11 -3
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/lib/toast.cjs +235 -0
- package/dist/lib/toast.cjs.map +1 -0
- package/dist/{craft-toast-BcscwgO3.d.ts → lib/toast.d.cts} +3 -9
- package/dist/{craft-toast-C7rMmROV.d.cts → lib/toast.d.ts} +3 -9
- package/dist/lib/toast.js +197 -0
- package/dist/lib/toast.js.map +1 -0
- package/dist/styles.css +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
const toastState = { toasts: [] };
|
|
4
|
+
const toastListeners = /* @__PURE__ */ new Set();
|
|
5
|
+
const toastTimeouts = /* @__PURE__ */ new Map();
|
|
6
|
+
function emitToastState() {
|
|
7
|
+
toastListeners.forEach((listener) => listener());
|
|
8
|
+
}
|
|
9
|
+
function normalizeVariant(variant) {
|
|
10
|
+
if (variant === "danger") return "error";
|
|
11
|
+
return variant != null ? variant : "info";
|
|
12
|
+
}
|
|
13
|
+
function scheduleToastRemoval(id, duration) {
|
|
14
|
+
const timeoutMs = typeof duration === "number" ? duration : 4e3;
|
|
15
|
+
if (timeoutMs <= 0) return;
|
|
16
|
+
const existing = toastTimeouts.get(id);
|
|
17
|
+
if (existing) clearTimeout(existing);
|
|
18
|
+
toastTimeouts.set(
|
|
19
|
+
id,
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
toastState.toasts = toastState.toasts.filter((toast2) => toast2.id !== id);
|
|
22
|
+
toastTimeouts.delete(id);
|
|
23
|
+
emitToastState();
|
|
24
|
+
}, timeoutMs)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function addToast(toast2) {
|
|
28
|
+
const id = `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
29
|
+
const next = {
|
|
30
|
+
...toast2,
|
|
31
|
+
id,
|
|
32
|
+
variant: normalizeVariant(toast2.variant)
|
|
33
|
+
};
|
|
34
|
+
toastState.toasts = [...toastState.toasts, next];
|
|
35
|
+
emitToastState();
|
|
36
|
+
scheduleToastRemoval(id, toast2.duration);
|
|
37
|
+
return id;
|
|
38
|
+
}
|
|
39
|
+
function removeToast(id) {
|
|
40
|
+
toastState.toasts = toastState.toasts.filter((toast2) => toast2.id !== id);
|
|
41
|
+
const existing = toastTimeouts.get(id);
|
|
42
|
+
if (existing) {
|
|
43
|
+
clearTimeout(existing);
|
|
44
|
+
toastTimeouts.delete(id);
|
|
45
|
+
}
|
|
46
|
+
emitToastState();
|
|
47
|
+
}
|
|
48
|
+
function clearToasts() {
|
|
49
|
+
toastState.toasts = [];
|
|
50
|
+
toastTimeouts.forEach((timeout) => clearTimeout(timeout));
|
|
51
|
+
toastTimeouts.clear();
|
|
52
|
+
emitToastState();
|
|
53
|
+
}
|
|
54
|
+
function useToaster() {
|
|
55
|
+
const subscribe = React.useCallback((listener) => {
|
|
56
|
+
toastListeners.add(listener);
|
|
57
|
+
return () => toastListeners.delete(listener);
|
|
58
|
+
}, []);
|
|
59
|
+
const getSnapshot = React.useCallback(() => toastState.toasts, []);
|
|
60
|
+
return React.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
61
|
+
}
|
|
62
|
+
function useCraftToast() {
|
|
63
|
+
return React.useMemo(
|
|
64
|
+
() => ({
|
|
65
|
+
toast: (message, options) => addToast({
|
|
66
|
+
title: typeof message === "string" ? message : void 0,
|
|
67
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
68
|
+
description: options == null ? void 0 : options.description,
|
|
69
|
+
variant: options == null ? void 0 : options.variant,
|
|
70
|
+
duration: options == null ? void 0 : options.duration
|
|
71
|
+
}),
|
|
72
|
+
success: (message, options) => addToast({
|
|
73
|
+
title: typeof message === "string" ? message : void 0,
|
|
74
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
75
|
+
description: options == null ? void 0 : options.description,
|
|
76
|
+
variant: "success",
|
|
77
|
+
duration: options == null ? void 0 : options.duration
|
|
78
|
+
}),
|
|
79
|
+
warning: (message, options) => addToast({
|
|
80
|
+
title: typeof message === "string" ? message : void 0,
|
|
81
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
82
|
+
description: options == null ? void 0 : options.description,
|
|
83
|
+
variant: "warning",
|
|
84
|
+
duration: options == null ? void 0 : options.duration
|
|
85
|
+
}),
|
|
86
|
+
info: (message, options) => addToast({
|
|
87
|
+
title: typeof message === "string" ? message : void 0,
|
|
88
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
89
|
+
description: options == null ? void 0 : options.description,
|
|
90
|
+
variant: "info",
|
|
91
|
+
duration: options == null ? void 0 : options.duration
|
|
92
|
+
}),
|
|
93
|
+
error: (message, options) => addToast({
|
|
94
|
+
title: typeof message === "string" ? message : void 0,
|
|
95
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
96
|
+
description: options == null ? void 0 : options.description,
|
|
97
|
+
variant: "error",
|
|
98
|
+
duration: options == null ? void 0 : options.duration
|
|
99
|
+
}),
|
|
100
|
+
danger: (message, options) => addToast({
|
|
101
|
+
title: typeof message === "string" ? message : void 0,
|
|
102
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
103
|
+
description: options == null ? void 0 : options.description,
|
|
104
|
+
variant: "danger",
|
|
105
|
+
duration: options == null ? void 0 : options.duration
|
|
106
|
+
}),
|
|
107
|
+
dismiss: (id) => removeToast(id),
|
|
108
|
+
dismissAll: () => clearToasts()
|
|
109
|
+
}),
|
|
110
|
+
[]
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
const toast = Object.assign(
|
|
114
|
+
(message, options) => addToast({
|
|
115
|
+
title: typeof message === "string" ? message : void 0,
|
|
116
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
117
|
+
description: options == null ? void 0 : options.description,
|
|
118
|
+
variant: options == null ? void 0 : options.variant,
|
|
119
|
+
duration: options == null ? void 0 : options.duration
|
|
120
|
+
}),
|
|
121
|
+
{
|
|
122
|
+
success: (message, options) => addToast({
|
|
123
|
+
title: typeof message === "string" ? message : void 0,
|
|
124
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
125
|
+
description: options == null ? void 0 : options.description,
|
|
126
|
+
variant: "success",
|
|
127
|
+
duration: options == null ? void 0 : options.duration
|
|
128
|
+
}),
|
|
129
|
+
error: (message, options) => addToast({
|
|
130
|
+
title: typeof message === "string" ? message : void 0,
|
|
131
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
132
|
+
description: options == null ? void 0 : options.description,
|
|
133
|
+
variant: "error",
|
|
134
|
+
duration: options == null ? void 0 : options.duration
|
|
135
|
+
}),
|
|
136
|
+
warning: (message, options) => addToast({
|
|
137
|
+
title: typeof message === "string" ? message : void 0,
|
|
138
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
139
|
+
description: options == null ? void 0 : options.description,
|
|
140
|
+
variant: "warning",
|
|
141
|
+
duration: options == null ? void 0 : options.duration
|
|
142
|
+
}),
|
|
143
|
+
info: (message, options) => addToast({
|
|
144
|
+
title: typeof message === "string" ? message : void 0,
|
|
145
|
+
custom: typeof message === "string" ? void 0 : message,
|
|
146
|
+
description: options == null ? void 0 : options.description,
|
|
147
|
+
variant: "info",
|
|
148
|
+
duration: options == null ? void 0 : options.duration
|
|
149
|
+
}),
|
|
150
|
+
custom: (component, options) => addToast({
|
|
151
|
+
custom: component,
|
|
152
|
+
duration: options == null ? void 0 : options.duration
|
|
153
|
+
}),
|
|
154
|
+
dismiss: (id) => removeToast(id),
|
|
155
|
+
dismissAll: () => clearToasts(),
|
|
156
|
+
promise: async (promise, options) => {
|
|
157
|
+
var _a, _b, _c;
|
|
158
|
+
const loadingId = addToast({
|
|
159
|
+
title: typeof (options == null ? void 0 : options.loading) === "string" ? options.loading : void 0,
|
|
160
|
+
custom: typeof (options == null ? void 0 : options.loading) === "string" ? void 0 : options == null ? void 0 : options.loading,
|
|
161
|
+
description: options == null ? void 0 : options.description,
|
|
162
|
+
variant: "info",
|
|
163
|
+
duration: (_a = options == null ? void 0 : options.duration) != null ? _a : 0
|
|
164
|
+
});
|
|
165
|
+
try {
|
|
166
|
+
const result = await promise;
|
|
167
|
+
removeToast(loadingId);
|
|
168
|
+
const successContent = typeof (options == null ? void 0 : options.success) === "function" ? options.success(result) : (_b = options == null ? void 0 : options.success) != null ? _b : "Success";
|
|
169
|
+
addToast({
|
|
170
|
+
title: typeof successContent === "string" ? successContent : void 0,
|
|
171
|
+
custom: typeof successContent === "string" ? void 0 : successContent,
|
|
172
|
+
variant: "success",
|
|
173
|
+
duration: options == null ? void 0 : options.duration
|
|
174
|
+
});
|
|
175
|
+
return result;
|
|
176
|
+
} catch (error) {
|
|
177
|
+
removeToast(loadingId);
|
|
178
|
+
const errorContent = typeof (options == null ? void 0 : options.error) === "function" ? options.error(error) : (_c = options == null ? void 0 : options.error) != null ? _c : "Something went wrong";
|
|
179
|
+
addToast({
|
|
180
|
+
title: typeof errorContent === "string" ? errorContent : void 0,
|
|
181
|
+
custom: typeof errorContent === "string" ? void 0 : errorContent,
|
|
182
|
+
variant: "error",
|
|
183
|
+
duration: options == null ? void 0 : options.duration
|
|
184
|
+
});
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
export {
|
|
191
|
+
normalizeVariant,
|
|
192
|
+
removeToast,
|
|
193
|
+
toast,
|
|
194
|
+
useCraftToast,
|
|
195
|
+
useToaster
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/toast.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport type CraftToastVariant = \"info\" | \"success\" | \"warning\" | \"error\" | \"danger\";\n\nexport type CraftToast = {\n id: string;\n title?: string;\n description?: string;\n variant?: CraftToastVariant;\n duration?: number;\n custom?: React.ReactNode;\n};\n\nexport type CraftToastOptions = {\n description?: string;\n variant?: CraftToastVariant;\n duration?: number;\n};\n\nexport type CraftToastCustomOptions = {\n duration?: number;\n};\n\nconst toastState: { toasts: CraftToast[] } = { toasts: [] };\nconst toastListeners = new Set<() => void>();\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nfunction emitToastState() {\n toastListeners.forEach((listener) => listener());\n}\n\nexport function normalizeVariant(\n variant?: CraftToastVariant\n): Exclude<CraftToastVariant, \"danger\"> {\n if (variant === \"danger\") return \"error\";\n return variant ?? \"info\";\n}\n\nfunction scheduleToastRemoval(id: string, duration?: number) {\n const timeoutMs = typeof duration === \"number\" ? duration : 4000;\n if (timeoutMs <= 0) return;\n const existing = toastTimeouts.get(id);\n if (existing) clearTimeout(existing);\n toastTimeouts.set(\n id,\n setTimeout(() => {\n toastState.toasts = toastState.toasts.filter((toast) => toast.id !== id);\n toastTimeouts.delete(id);\n emitToastState();\n }, timeoutMs)\n );\n}\n\nfunction addToast(toast: Omit<CraftToast, \"id\">) {\n const id = `${Date.now()}-${Math.random().toString(16).slice(2)}`;\n const next: CraftToast = {\n ...toast,\n id,\n variant: normalizeVariant(toast.variant),\n };\n toastState.toasts = [...toastState.toasts, next];\n emitToastState();\n scheduleToastRemoval(id, toast.duration);\n return id;\n}\n\nexport function removeToast(id: string) {\n toastState.toasts = toastState.toasts.filter((toast) => toast.id !== id);\n const existing = toastTimeouts.get(id);\n if (existing) {\n clearTimeout(existing);\n toastTimeouts.delete(id);\n }\n emitToastState();\n}\n\nfunction clearToasts() {\n toastState.toasts = [];\n toastTimeouts.forEach((timeout) => clearTimeout(timeout));\n toastTimeouts.clear();\n emitToastState();\n}\n\nexport function useToaster() {\n const subscribe = React.useCallback((listener: () => void) => {\n toastListeners.add(listener);\n return () => toastListeners.delete(listener);\n }, []);\n\n const getSnapshot = React.useCallback(() => toastState.toasts, []);\n\n return React.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\nexport function useCraftToast() {\n return React.useMemo(\n () => ({\n toast: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: options?.variant,\n duration: options?.duration,\n }),\n success: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"success\",\n duration: options?.duration,\n }),\n warning: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"warning\",\n duration: options?.duration,\n }),\n info: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"info\",\n duration: options?.duration,\n }),\n error: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"error\",\n duration: options?.duration,\n }),\n danger: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"danger\",\n duration: options?.duration,\n }),\n dismiss: (id: string) => removeToast(id),\n dismissAll: () => clearToasts(),\n }),\n []\n );\n}\n\nexport const toast = Object.assign(\n (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: options?.variant,\n duration: options?.duration,\n }),\n {\n success: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"success\",\n duration: options?.duration,\n }),\n error: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"error\",\n duration: options?.duration,\n }),\n warning: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"warning\",\n duration: options?.duration,\n }),\n info: (message: React.ReactNode, options?: CraftToastOptions) =>\n addToast({\n title: typeof message === \"string\" ? message : undefined,\n custom: typeof message === \"string\" ? undefined : message,\n description: options?.description,\n variant: \"info\",\n duration: options?.duration,\n }),\n custom: (component: React.ReactNode, options?: CraftToastCustomOptions) =>\n addToast({\n custom: component,\n duration: options?.duration,\n }),\n dismiss: (id: string) => removeToast(id),\n dismissAll: () => clearToasts(),\n promise: async <T,>(\n promise: Promise<T>,\n options?: {\n loading?: React.ReactNode;\n success?: ((value: T) => React.ReactNode) | React.ReactNode;\n error?: ((error: unknown) => React.ReactNode) | React.ReactNode;\n description?: string;\n duration?: number;\n }\n ) => {\n const loadingId = addToast({\n title: typeof options?.loading === \"string\" ? options.loading : undefined,\n custom: typeof options?.loading === \"string\" ? undefined : options?.loading,\n description: options?.description,\n variant: \"info\",\n duration: options?.duration ?? 0,\n });\n\n try {\n const result = await promise;\n removeToast(loadingId);\n const successContent =\n typeof options?.success === \"function\"\n ? options.success(result)\n : options?.success ?? \"Success\";\n addToast({\n title: typeof successContent === \"string\" ? successContent : undefined,\n custom: typeof successContent === \"string\" ? undefined : successContent,\n variant: \"success\",\n duration: options?.duration,\n });\n return result;\n } catch (error) {\n removeToast(loadingId);\n const errorContent =\n typeof options?.error === \"function\"\n ? options.error(error)\n : options?.error ?? \"Something went wrong\";\n addToast({\n title: typeof errorContent === \"string\" ? errorContent : undefined,\n custom: typeof errorContent === \"string\" ? undefined : errorContent,\n variant: \"error\",\n duration: options?.duration,\n });\n throw error;\n }\n },\n }\n);\n"],"mappings":";AAEA,YAAY,WAAW;AAuBvB,MAAM,aAAuC,EAAE,QAAQ,CAAC,EAAE;AAC1D,MAAM,iBAAiB,oBAAI,IAAgB;AAC3C,MAAM,gBAAgB,oBAAI,IAA2C;AAErE,SAAS,iBAAiB;AACxB,iBAAe,QAAQ,CAAC,aAAa,SAAS,CAAC;AACjD;AAEO,SAAS,iBACd,SACsC;AACtC,MAAI,YAAY,SAAU,QAAO;AACjC,SAAO,4BAAW;AACpB;AAEA,SAAS,qBAAqB,IAAY,UAAmB;AAC3D,QAAM,YAAY,OAAO,aAAa,WAAW,WAAW;AAC5D,MAAI,aAAa,EAAG;AACpB,QAAM,WAAW,cAAc,IAAI,EAAE;AACrC,MAAI,SAAU,cAAa,QAAQ;AACnC,gBAAc;AAAA,IACZ;AAAA,IACA,WAAW,MAAM;AACf,iBAAW,SAAS,WAAW,OAAO,OAAO,CAACA,WAAUA,OAAM,OAAO,EAAE;AACvE,oBAAc,OAAO,EAAE;AACvB,qBAAe;AAAA,IACjB,GAAG,SAAS;AAAA,EACd;AACF;AAEA,SAAS,SAASA,QAA+B;AAC/C,QAAM,KAAK,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAC/D,QAAM,OAAmB;AA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AQ,QAAO,mCAAS,aAAY,WAAW,SAAY,mCAAS;AAAA,QACpE,aAAa,mCAAS;AAAA,QACtB,SAAS;AAAA,QACT,WAAU,wCAAS,aAAT,YAAqB;AAAA,MACjC,CAAC;AAED,UAAI;AACF,cAAM,SAAS,MAAM;AACrB,oBAAY,SAAS;AACrB,cAAM,iBACJ,QAAO,mCAAS,aAAY,aACxB,QAAQ,QAAQ,MAAM,KACtB,wCAAS,YAAT,YAAoB;AAC1B,iBAAS;AAAA,UACP,OAAO,OAAO,mBAAmB,WAAW,iBAAiB;AAAA,UAC7D,QAAQ,OAAO,mBAAmB,WAAW,SAAY;AAAA,UACzD,SAAS;AAAA,UACT,UAAU,mCAAS;AAAA,QACrB,CAAC;AACD,eAAO;AAAA,MACT,SAAS,OAAO;AACd,oBAAY,SAAS;AACrB,cAAM,eACJ,QAAO,mCAAS,WAAU,aACtB,QAAQ,MAAM,KAAK,KACnB,wCAAS,UAAT,YAAkB;AACxB,iBAAS;AAAA,UACP,OAAO,OAAO,iBAAiB,WAAW,eAAe;AAAA,UACzD,QAAQ,OAAO,iBAAiB,WAAW,SAAY;AAAA,UACvD,SAAS;AAAA,UACT,UAAU,mCAAS;AAAA,QACrB,CAAC;AACD,cAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;","names":["toast"]}
|
package/dist/styles.css
CHANGED
|
@@ -245,6 +245,9 @@
|
|
|
245
245
|
.inset-0 {
|
|
246
246
|
inset: calc(var(--spacing) * 0);
|
|
247
247
|
}
|
|
248
|
+
.-top-1\/3 {
|
|
249
|
+
top: calc(calc(1/3 * 100%) * -1);
|
|
250
|
+
}
|
|
248
251
|
.top-0 {
|
|
249
252
|
top: calc(var(--spacing) * 0);
|
|
250
253
|
}
|
|
@@ -275,6 +278,9 @@
|
|
|
275
278
|
.bottom-full {
|
|
276
279
|
bottom: 100%;
|
|
277
280
|
}
|
|
281
|
+
.-left-1\/4 {
|
|
282
|
+
left: calc(calc(1/4 * 100%) * -1);
|
|
283
|
+
}
|
|
278
284
|
.left-0 {
|
|
279
285
|
left: calc(var(--spacing) * 0);
|
|
280
286
|
}
|
|
@@ -467,6 +473,9 @@
|
|
|
467
473
|
.w-56 {
|
|
468
474
|
width: calc(var(--spacing) * 56);
|
|
469
475
|
}
|
|
476
|
+
.w-\[120\%\] {
|
|
477
|
+
width: 120%;
|
|
478
|
+
}
|
|
470
479
|
.w-full {
|
|
471
480
|
width: 100%;
|
|
472
481
|
}
|
|
@@ -556,6 +565,9 @@
|
|
|
556
565
|
--tw-translate-y: calc(var(--spacing) * 2);
|
|
557
566
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
558
567
|
}
|
|
568
|
+
.rotate-6 {
|
|
569
|
+
rotate: 6deg;
|
|
570
|
+
}
|
|
559
571
|
.transform {
|
|
560
572
|
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
561
573
|
}
|
|
@@ -994,6 +1006,10 @@
|
|
|
994
1006
|
--tw-gradient-from: rgb(var(--nc-accent-1)/0.08);
|
|
995
1007
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
996
1008
|
}
|
|
1009
|
+
.from-\[rgb\(var\(--nc-accent-1\)\/0\.12\)\] {
|
|
1010
|
+
--tw-gradient-from: rgb(var(--nc-accent-1)/0.12);
|
|
1011
|
+
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
1012
|
+
}
|
|
997
1013
|
.from-\[rgb\(var\(--nc-accent-1\)\/0\.15\)\] {
|
|
998
1014
|
--tw-gradient-from: rgb(var(--nc-accent-1)/0.15);
|
|
999
1015
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
@@ -1013,6 +1029,11 @@
|
|
|
1013
1029
|
--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
|
|
1014
1030
|
--tw-gradient-stops: var(--tw-gradient-via-stops);
|
|
1015
1031
|
}
|
|
1032
|
+
.via-transparent {
|
|
1033
|
+
--tw-gradient-via: transparent;
|
|
1034
|
+
--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
|
|
1035
|
+
--tw-gradient-stops: var(--tw-gradient-via-stops);
|
|
1036
|
+
}
|
|
1016
1037
|
.to-\[rgb\(var\(--nc-accent-3\)\)\] {
|
|
1017
1038
|
--tw-gradient-to: rgb(var(--nc-accent-3));
|
|
1018
1039
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
@@ -1021,6 +1042,10 @@
|
|
|
1021
1042
|
--tw-gradient-to: rgb(var(--nc-accent-3)/0.08);
|
|
1022
1043
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
1023
1044
|
}
|
|
1045
|
+
.to-\[rgb\(var\(--nc-accent-3\)\/0\.12\)\] {
|
|
1046
|
+
--tw-gradient-to: rgb(var(--nc-accent-3)/0.12);
|
|
1047
|
+
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
1048
|
+
}
|
|
1024
1049
|
.to-\[rgb\(var\(--nc-accent-3\)\/0\.15\)\] {
|
|
1025
1050
|
--tw-gradient-to: rgb(var(--nc-accent-3)/0.15);
|
|
1026
1051
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
@@ -1398,6 +1423,10 @@
|
|
|
1398
1423
|
--tw-blur: blur(8px);
|
|
1399
1424
|
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,);
|
|
1400
1425
|
}
|
|
1426
|
+
.blur-2xl {
|
|
1427
|
+
--tw-blur: blur(var(--blur-2xl));
|
|
1428
|
+
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,);
|
|
1429
|
+
}
|
|
1401
1430
|
.filter {
|
|
1402
1431
|
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,);
|
|
1403
1432
|
}
|
|
@@ -2323,6 +2352,12 @@
|
|
|
2323
2352
|
:root {
|
|
2324
2353
|
--background: #0a0a0a;
|
|
2325
2354
|
--foreground: #ededed;
|
|
2355
|
+
--nc-fg: 255 255 255;
|
|
2356
|
+
--nc-fg-muted: 226 232 240;
|
|
2357
|
+
--nc-fg-soft: 148 163 184;
|
|
2358
|
+
--nc-surface: 15 23 42;
|
|
2359
|
+
--nc-surface-muted: 30 41 59;
|
|
2360
|
+
--nc-border: 148 163 184;
|
|
2326
2361
|
}
|
|
2327
2362
|
}
|
|
2328
2363
|
[data-nc-mode="light"] {
|