@vadimcomanescu/nadicode-design-system 4.0.4 → 4.0.6
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/.agents/skills/seed/SKILL.md +24 -3
- package/dist/catalog/catalog.d.ts +168 -0
- package/dist/catalog/catalog.js +172 -0
- package/dist/catalog/components.d.ts +24 -0
- package/dist/catalog/components.js +61 -35
- package/dist/chunk-2LUDPRRG.js +24 -0
- package/dist/{chunk-RMGDDOCD.js → chunk-3ZPNIY2Z.js} +2 -2
- package/dist/chunk-4KZLCCIR.js +88 -0
- package/dist/{chunk-AWZFQQGN.js → chunk-6NCLYJAI.js} +2 -2
- package/dist/{chunk-K4U67BVG.js → chunk-7ALMTY6W.js} +1 -1
- package/dist/chunk-CZ7NGW7N.js +60 -0
- package/dist/chunk-FRGZSR2P.js +86 -0
- package/dist/{chunk-LGW7FVG5.js → chunk-HMFIUUYC.js} +1 -1
- package/dist/chunk-IC3BMFHV.js +86 -0
- package/dist/chunk-JVIRZNQ6.js +37 -0
- package/dist/chunk-K5AFXZDL.js +30 -0
- package/dist/{chunk-LK2L3C7D.js → chunk-LCMAB2BX.js} +3 -3
- package/dist/chunk-LIJYUSSE.js +152 -0
- package/dist/chunk-MB6TIORE.js +103 -0
- package/dist/chunk-PV62D7H6.js +75 -0
- package/dist/chunk-QVAV4MA2.js +60 -0
- package/dist/{chunk-QW5II6YK.js → chunk-TEWCCMRH.js} +2 -2
- package/dist/chunk-WVKJNHQM.js +120 -0
- package/dist/chunk-YQCDWJBT.js +184 -0
- package/dist/chunk-YZWC4EY4.js +101 -0
- package/dist/components/blocks/ApiKeysBlock.d.ts +18 -0
- package/dist/components/blocks/ApiKeysBlock.js +128 -0
- package/dist/components/blocks/BenchmarksBlock.d.ts +20 -0
- package/dist/components/blocks/BenchmarksBlock.js +11 -0
- package/dist/components/blocks/CheckEmailBlock.d.ts +9 -0
- package/dist/components/blocks/CheckEmailBlock.js +13 -0
- package/dist/components/blocks/CommandPaletteBlock.d.ts +9 -0
- package/dist/components/blocks/CommandPaletteBlock.js +125 -0
- package/dist/components/blocks/EmailVerifiedBlock.d.ts +10 -0
- package/dist/components/blocks/EmailVerifiedBlock.js +10 -0
- package/dist/components/blocks/ForgotPasswordBlock.d.ts +14 -0
- package/dist/components/blocks/ForgotPasswordBlock.js +15 -0
- package/dist/components/blocks/IntegrationsBlock.js +3 -3
- package/dist/components/blocks/MagicLinkBlock.d.ts +12 -0
- package/dist/components/blocks/MagicLinkBlock.js +18 -0
- package/dist/components/blocks/OTPBlock.d.ts +10 -0
- package/dist/components/blocks/OTPBlock.js +121 -0
- package/dist/components/blocks/PasswordChangedBlock.d.ts +10 -0
- package/dist/components/blocks/PasswordChangedBlock.js +10 -0
- package/dist/components/blocks/PricingTableBlock.d.ts +19 -0
- package/dist/components/blocks/PricingTableBlock.js +13 -0
- package/dist/components/blocks/SavingsCalculatorBlock.d.ts +30 -0
- package/dist/components/blocks/SavingsCalculatorBlock.js +22 -0
- package/dist/components/blocks/WorkspaceSwitcherBlock.d.ts +11 -0
- package/dist/components/blocks/WorkspaceSwitcherBlock.js +129 -0
- package/dist/components/logos/index.js +2 -2
- package/dist/components/page-kits/BlogContentPageKit.js +4 -4
- package/dist/components/page-kits/CheckoutPageKit.js +3 -3
- package/dist/components/page-kits/CompanySuitePageKit.js +4 -4
- package/dist/components/page-kits/LandingPageKit.js +5 -5
- package/dist/components/page-kits/MarketingShellPageKit.js +2 -2
- package/dist/components/page-kits/PricingPageKit.js +4 -4
- package/dist/components/page-kits/ServiceSuitePageKit.js +3 -3
- package/dist/components/ui/SearchCommand.js +4 -152
- package/dist/hooks/useHotkey.js +1 -37
- package/package.json +1 -1
- package/dist/{chunk-BSCC7OQK.js → chunk-4TUJJ3UI.js} +2 -2
- package/dist/{chunk-Z233ZQZE.js → chunk-E4L6LR6P.js} +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
export { SearchCommand, searchCommandVariants } from '../../chunk-LIJYUSSE.js';
|
|
2
3
|
import '../../chunk-GO35FTNJ.js';
|
|
3
4
|
import '../../chunk-WUO7OONN.js';
|
|
4
5
|
import '../../chunk-FLF5AMNO.js';
|
|
@@ -12,7 +13,7 @@ import '../../chunk-CGUCH322.js';
|
|
|
12
13
|
import '../../chunk-ELKIUARM.js';
|
|
13
14
|
import '../../chunk-KSHJQ2VT.js';
|
|
14
15
|
import '../../chunk-GAKU7DFY.js';
|
|
15
|
-
import
|
|
16
|
+
import '../../chunk-T6BRD7TS.js';
|
|
16
17
|
import '../../chunk-TXGANOAX.js';
|
|
17
18
|
import '../../chunk-OITJWGFV.js';
|
|
18
19
|
import '../../chunk-Z74D6D2W.js';
|
|
@@ -51,7 +52,7 @@ import '../../chunk-PKVTEDKO.js';
|
|
|
51
52
|
import '../../chunk-I3TH7PIB.js';
|
|
52
53
|
import '../../chunk-WGPK3FQ7.js';
|
|
53
54
|
import '../../chunk-JL4MVVFH.js';
|
|
54
|
-
import
|
|
55
|
+
import '../../chunk-4FEAWXJD.js';
|
|
55
56
|
import '../../chunk-JHQTKMKG.js';
|
|
56
57
|
import '../../chunk-WA45EC4Y.js';
|
|
57
58
|
import '../../chunk-2MOEOEOI.js';
|
|
@@ -111,153 +112,4 @@ import '../../chunk-NURPUVUV.js';
|
|
|
111
112
|
import '../../chunk-TV4RSQH4.js';
|
|
112
113
|
import '../../chunk-HJBXUXTD.js';
|
|
113
114
|
import '../../chunk-ASKFAYYR.js';
|
|
114
|
-
import
|
|
115
|
-
import * as React from 'react';
|
|
116
|
-
import { useTranslations } from 'next-intl';
|
|
117
|
-
import { cva } from 'class-variance-authority';
|
|
118
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
119
|
-
|
|
120
|
-
var searchCommandVariants = cva(
|
|
121
|
-
"flex flex-col rounded-xl glass-panel overflow-hidden",
|
|
122
|
-
{
|
|
123
|
-
variants: {
|
|
124
|
-
variant: {
|
|
125
|
-
default: "",
|
|
126
|
-
floating: "shadow-lg shadow-black/20"
|
|
127
|
-
},
|
|
128
|
-
size: {
|
|
129
|
-
sm: "max-w-sm",
|
|
130
|
-
default: "max-w-lg",
|
|
131
|
-
lg: "max-w-2xl"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
defaultVariants: {
|
|
135
|
-
variant: "default",
|
|
136
|
-
size: "default"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
var EMPTY_RESULTS = [];
|
|
141
|
-
function SearchCommand({
|
|
142
|
-
className,
|
|
143
|
-
variant,
|
|
144
|
-
size,
|
|
145
|
-
value = "",
|
|
146
|
-
onChange,
|
|
147
|
-
results = EMPTY_RESULTS,
|
|
148
|
-
onSelect,
|
|
149
|
-
placeholder,
|
|
150
|
-
loading = false,
|
|
151
|
-
showShortcut = true,
|
|
152
|
-
ref,
|
|
153
|
-
...props
|
|
154
|
-
}) {
|
|
155
|
-
const t = useTranslations("components.searchCommand");
|
|
156
|
-
const resolvedPlaceholder = placeholder ?? t("placeholder");
|
|
157
|
-
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
158
|
-
const inputRef = React.useRef(null);
|
|
159
|
-
const prevResultsRef = React.useRef(results);
|
|
160
|
-
if (prevResultsRef.current !== results) {
|
|
161
|
-
prevResultsRef.current = results;
|
|
162
|
-
if (selectedIndex !== 0) setSelectedIndex(0);
|
|
163
|
-
}
|
|
164
|
-
const handleKeyDown = (e) => {
|
|
165
|
-
if (e.key === "ArrowDown") {
|
|
166
|
-
e.preventDefault();
|
|
167
|
-
setSelectedIndex((prev) => (prev + 1) % Math.max(results.length, 1));
|
|
168
|
-
} else if (e.key === "ArrowUp") {
|
|
169
|
-
e.preventDefault();
|
|
170
|
-
setSelectedIndex(
|
|
171
|
-
(prev) => prev <= 0 ? Math.max(results.length - 1, 0) : prev - 1
|
|
172
|
-
);
|
|
173
|
-
} else if (e.key === "Enter" && results[selectedIndex]) {
|
|
174
|
-
e.preventDefault();
|
|
175
|
-
onSelect?.(results[selectedIndex]);
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
const groupedResults = React.useMemo(() => results.reduce(
|
|
179
|
-
(acc, result) => {
|
|
180
|
-
const category = result.category ?? "Results";
|
|
181
|
-
if (!acc[category]) acc[category] = [];
|
|
182
|
-
acc[category].push(result);
|
|
183
|
-
return acc;
|
|
184
|
-
},
|
|
185
|
-
{}
|
|
186
|
-
), [results]);
|
|
187
|
-
let flatIndex = -1;
|
|
188
|
-
return /* @__PURE__ */ jsxs(
|
|
189
|
-
"div",
|
|
190
|
-
{
|
|
191
|
-
ref,
|
|
192
|
-
className: cn(searchCommandVariants({ variant, size }), "w-full", className),
|
|
193
|
-
role: "combobox",
|
|
194
|
-
"aria-expanded": results.length > 0,
|
|
195
|
-
"aria-controls": "search-command-listbox",
|
|
196
|
-
"aria-haspopup": "listbox",
|
|
197
|
-
...props,
|
|
198
|
-
children: [
|
|
199
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-border pl-4 pr-12 transition-[border-color]", children: [
|
|
200
|
-
/* @__PURE__ */ jsx(SearchIcon, { size: 16, className: "shrink-0 text-text-tertiary" }),
|
|
201
|
-
/* @__PURE__ */ jsx(
|
|
202
|
-
"input",
|
|
203
|
-
{
|
|
204
|
-
ref: inputRef,
|
|
205
|
-
className: "flex-1 bg-transparent py-4 text-sm text-text-primary placeholder:text-text-tertiary outline-none focus-visible:outline-1 focus-visible:outline-border",
|
|
206
|
-
placeholder: resolvedPlaceholder,
|
|
207
|
-
value,
|
|
208
|
-
onChange: (e) => onChange?.(e.target.value),
|
|
209
|
-
onKeyDown: handleKeyDown,
|
|
210
|
-
role: "searchbox",
|
|
211
|
-
"aria-label": "Search",
|
|
212
|
-
"aria-autocomplete": "list",
|
|
213
|
-
"aria-activedescendant": results[selectedIndex] ? `search-option-${results[selectedIndex].id}` : void 0
|
|
214
|
-
}
|
|
215
|
-
),
|
|
216
|
-
!!showShortcut && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 text-text-tertiary", children: /* @__PURE__ */ jsx(CornerDownLeftIcon, { size: 12 }) })
|
|
217
|
-
] }),
|
|
218
|
-
!!loading && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-text-tertiary animate-pulse", children: t("searching") }) }),
|
|
219
|
-
!loading && results.length > 0 && /* @__PURE__ */ jsx(
|
|
220
|
-
"ul",
|
|
221
|
-
{
|
|
222
|
-
id: "search-command-listbox",
|
|
223
|
-
className: "max-h-[300px] overflow-y-auto py-1.5",
|
|
224
|
-
role: "listbox",
|
|
225
|
-
"aria-label": "Search results",
|
|
226
|
-
children: Object.entries(groupedResults).map(([category, items]) => /* @__PURE__ */ jsxs("li", { role: "presentation", children: [
|
|
227
|
-
/* @__PURE__ */ jsx("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-text-tertiary", children: category }),
|
|
228
|
-
/* @__PURE__ */ jsx("ul", { role: "group", "aria-label": category, children: items.map((result) => {
|
|
229
|
-
flatIndex++;
|
|
230
|
-
const idx = flatIndex;
|
|
231
|
-
return /* @__PURE__ */ jsxs(
|
|
232
|
-
"li",
|
|
233
|
-
{
|
|
234
|
-
id: `search-option-${result.id}`,
|
|
235
|
-
role: "option",
|
|
236
|
-
"aria-selected": idx === selectedIndex,
|
|
237
|
-
className: cn(
|
|
238
|
-
"flex items-center gap-4 cursor-pointer px-4 py-2 text-sm transition-colors",
|
|
239
|
-
idx === selectedIndex ? "bg-accent/10 text-accent" : "text-text-primary hover:bg-surface-hover"
|
|
240
|
-
),
|
|
241
|
-
onClick: () => onSelect?.(result),
|
|
242
|
-
onMouseEnter: () => setSelectedIndex(idx),
|
|
243
|
-
children: [
|
|
244
|
-
result.icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-text-tertiary", children: result.icon }),
|
|
245
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
246
|
-
/* @__PURE__ */ jsx("p", { className: "truncate", children: result.title }),
|
|
247
|
-
result.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-text-tertiary truncate", children: result.description })
|
|
248
|
-
] })
|
|
249
|
-
]
|
|
250
|
-
},
|
|
251
|
-
result.id
|
|
252
|
-
);
|
|
253
|
-
}) })
|
|
254
|
-
] }, category))
|
|
255
|
-
}
|
|
256
|
-
),
|
|
257
|
-
!loading && value && results.length === 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-text-tertiary", children: t("noResults") }) })
|
|
258
|
-
]
|
|
259
|
-
}
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export { SearchCommand, searchCommandVariants };
|
|
115
|
+
import '../../chunk-QYZT24TS.js';
|
package/dist/hooks/useHotkey.js
CHANGED
|
@@ -1,37 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// src/hooks/useHotkey.ts
|
|
4
|
-
function parseCombo(combo) {
|
|
5
|
-
const parts = combo.toLowerCase().split("+");
|
|
6
|
-
return {
|
|
7
|
-
key: parts[parts.length - 1],
|
|
8
|
-
mod: parts.includes("mod"),
|
|
9
|
-
shift: parts.includes("shift"),
|
|
10
|
-
alt: parts.includes("alt")
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function useHotkey(combo, callback, options) {
|
|
14
|
-
const callbackRef = useRef(callback);
|
|
15
|
-
const enabled = options?.enabled ?? true;
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
callbackRef.current = callback;
|
|
18
|
-
});
|
|
19
|
-
const parsed = useMemo(() => parseCombo(combo), [combo]);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (!enabled) return;
|
|
22
|
-
function handler(event) {
|
|
23
|
-
const mac = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.userAgent);
|
|
24
|
-
const modPressed = mac ? event.metaKey : event.ctrlKey;
|
|
25
|
-
if (parsed.mod && !modPressed) return;
|
|
26
|
-
if (parsed.shift && !event.shiftKey) return;
|
|
27
|
-
if (parsed.alt && !event.altKey) return;
|
|
28
|
-
if (event.key.toLowerCase() !== parsed.key) return;
|
|
29
|
-
event.preventDefault();
|
|
30
|
-
callbackRef.current(event);
|
|
31
|
-
}
|
|
32
|
-
document.addEventListener("keydown", handler);
|
|
33
|
-
return () => document.removeEventListener("keydown", handler);
|
|
34
|
-
}, [parsed, enabled]);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { useHotkey };
|
|
1
|
+
export { useHotkey } from '../chunk-JVIRZNQ6.js';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Gemini } from './chunk-TSVN5A2F.js';
|
|
2
|
+
import { GooglePaLM } from './chunk-PX2WVDDB.js';
|
|
1
3
|
import { MagicUI } from './chunk-BZYMCJHW.js';
|
|
2
4
|
import { MediaWiki } from './chunk-H466RJCI.js';
|
|
3
5
|
import { Replit } from './chunk-DT6DGTVW.js';
|
|
4
6
|
import { VSCodium } from './chunk-J5DRK4RF.js';
|
|
5
|
-
import { Gemini } from './chunk-TSVN5A2F.js';
|
|
6
|
-
import { GooglePaLM } from './chunk-PX2WVDDB.js';
|
|
7
7
|
import { StaggerChildren } from './chunk-DQPK2XRL.js';
|
|
8
8
|
import { Heading } from './chunk-WI547C47.js';
|
|
9
9
|
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|