@orangecheck/design 0.29.0 → 0.30.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/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +155 -67
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +155 -68
- package/dist/components.mjs.map +1 -1
- package/dist/composites.d.mts +14 -1
- package/dist/composites.d.ts +14 -1
- package/dist/composites.js +138 -50
- package/dist/composites.js.map +1 -1
- package/dist/composites.mjs +139 -52
- package/dist/composites.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +106 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -18
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.js +1 -1
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +1 -1
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var SelectPrimitive = require('@radix-ui/react-select');
|
|
|
20
20
|
var sonner = require('sonner');
|
|
21
21
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
22
22
|
var QRCode = require('qrcode');
|
|
23
|
-
var
|
|
23
|
+
var Link7 = require('next/link');
|
|
24
24
|
var router = require('next/router');
|
|
25
25
|
var authClient = require('@orangecheck/auth-client');
|
|
26
26
|
|
|
@@ -56,7 +56,7 @@ var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrim
|
|
|
56
56
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
57
57
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
58
58
|
var QRCode__default = /*#__PURE__*/_interopDefault(QRCode);
|
|
59
|
-
var
|
|
59
|
+
var Link7__default = /*#__PURE__*/_interopDefault(Link7);
|
|
60
60
|
|
|
61
61
|
var __defProp = Object.defineProperty;
|
|
62
62
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1507,7 +1507,7 @@ function Textarea({ className, ...props }) {
|
|
|
1507
1507
|
{
|
|
1508
1508
|
"data-slot": "textarea",
|
|
1509
1509
|
className: cn(
|
|
1510
|
-
"placeholder:text-muted-foreground border-input bg-input/30 hover:bg-input/50 dark:bg-input/30 dark:hover:bg-input/50 w-full min-w-0 rounded-md border px-3 py-2 font-mono text-
|
|
1510
|
+
"placeholder:text-muted-foreground border-input bg-input/30 hover:bg-input/50 dark:bg-input/30 dark:hover:bg-input/50 w-full min-w-0 rounded-md border px-3 py-2 font-mono text-base leading-relaxed shadow-xs md:text-xs transition-[color,box-shadow,background-color] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1511
1511
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
1512
1512
|
// aria-invalid parity with Input — error styling when a consumer
|
|
1513
1513
|
// marks the field invalid.
|
|
@@ -3208,6 +3208,93 @@ function SectionHeader({
|
|
|
3208
3208
|
meta && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/70 font-mono text-[10px] tracking-widest uppercase", children: meta })
|
|
3209
3209
|
] });
|
|
3210
3210
|
}
|
|
3211
|
+
var VARIANTS = {
|
|
3212
|
+
"not-found": {
|
|
3213
|
+
code: 404,
|
|
3214
|
+
title: "no such route",
|
|
3215
|
+
detail: "the page you're looking for doesn't exist, or has been moved.",
|
|
3216
|
+
tone: "text-primary",
|
|
3217
|
+
label: "not found",
|
|
3218
|
+
actions: []
|
|
3219
|
+
},
|
|
3220
|
+
"server-error": {
|
|
3221
|
+
code: 500,
|
|
3222
|
+
title: "internal error",
|
|
3223
|
+
detail: "something went wrong on our end.",
|
|
3224
|
+
tone: "text-destructive",
|
|
3225
|
+
label: "server error",
|
|
3226
|
+
actions: [
|
|
3227
|
+
"try refreshing the page",
|
|
3228
|
+
"wait a few minutes, try again",
|
|
3229
|
+
"return home and start over"
|
|
3230
|
+
]
|
|
3231
|
+
}
|
|
3232
|
+
};
|
|
3233
|
+
function OcErrorPage({
|
|
3234
|
+
variant = "not-found",
|
|
3235
|
+
code,
|
|
3236
|
+
title,
|
|
3237
|
+
detail,
|
|
3238
|
+
actions,
|
|
3239
|
+
homeHref = "/",
|
|
3240
|
+
children,
|
|
3241
|
+
className = ""
|
|
3242
|
+
}) {
|
|
3243
|
+
const v = VARIANTS[variant];
|
|
3244
|
+
const shownCode = code ?? v.code;
|
|
3245
|
+
const shownActions = actions ?? [...v.actions];
|
|
3246
|
+
const isServerError = variant === "server-error";
|
|
3247
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3248
|
+
"div",
|
|
3249
|
+
{
|
|
3250
|
+
className: `container flex min-h-[60vh] flex-col items-center justify-center ${className}`,
|
|
3251
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full max-w-xl", children: [
|
|
3252
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `label-mono mb-4 ${v.tone}`, children: [
|
|
3253
|
+
"\xA7 ",
|
|
3254
|
+
shownCode,
|
|
3255
|
+
" // ",
|
|
3256
|
+
v.label
|
|
3257
|
+
] }),
|
|
3258
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3259
|
+
"h1",
|
|
3260
|
+
{
|
|
3261
|
+
className: `font-display text-7xl font-bold tracking-tight tabular-nums sm:text-8xl ${v.tone}`,
|
|
3262
|
+
children: shownCode
|
|
3263
|
+
}
|
|
3264
|
+
),
|
|
3265
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display mt-2 text-2xl font-bold tracking-tight sm:text-3xl", children: title ?? v.title }),
|
|
3266
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mt-3 font-mono text-xs", children: [
|
|
3267
|
+
"// ",
|
|
3268
|
+
detail ?? v.detail
|
|
3269
|
+
] }),
|
|
3270
|
+
shownActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 border", children: [
|
|
3271
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b px-4 py-2 font-mono text-[11px] tracking-widest uppercase", children: "what can you do" }),
|
|
3272
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-y font-mono text-xs", children: shownActions.map((a) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "px-4 py-2", children: [
|
|
3273
|
+
">> ",
|
|
3274
|
+
a
|
|
3275
|
+
] }, a)) })
|
|
3276
|
+
] }),
|
|
3277
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 flex flex-wrap gap-3", children: [
|
|
3278
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, className: "font-mono", children: /* @__PURE__ */ jsxRuntime.jsx(Link7__default.default, { href: homeHref, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] tracking-widest uppercase", children: "go home" }) }) }),
|
|
3279
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3280
|
+
Button,
|
|
3281
|
+
{
|
|
3282
|
+
variant: "outline",
|
|
3283
|
+
onClick: () => {
|
|
3284
|
+
if (typeof window === "undefined") return;
|
|
3285
|
+
if (isServerError) window.location.reload();
|
|
3286
|
+
else window.history.back();
|
|
3287
|
+
},
|
|
3288
|
+
className: "font-mono",
|
|
3289
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] tracking-widest uppercase", children: isServerError ? "retry" : "go back" })
|
|
3290
|
+
}
|
|
3291
|
+
)
|
|
3292
|
+
] }),
|
|
3293
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6", children })
|
|
3294
|
+
] })
|
|
3295
|
+
}
|
|
3296
|
+
);
|
|
3297
|
+
}
|
|
3211
3298
|
var TONE_CLASS2 = {
|
|
3212
3299
|
info: "border-primary/30 bg-primary/5",
|
|
3213
3300
|
warning: "border-warning/40 bg-warning/5",
|
|
@@ -3249,7 +3336,7 @@ function CtaLink({
|
|
|
3249
3336
|
if (external) {
|
|
3250
3337
|
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, target: "_blank", rel: "noreferrer", className: cls, children: text });
|
|
3251
3338
|
}
|
|
3252
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3339
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Link7__default.default, { href, className: cls, children: text });
|
|
3253
3340
|
}
|
|
3254
3341
|
var TONE_CLASS3 = {
|
|
3255
3342
|
default: "",
|
|
@@ -3933,7 +4020,7 @@ function EcosystemSwitcher({
|
|
|
3933
4020
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "py-1", children: [...ENTRIES, ...showOwnerEntries ? OWNER_ENTRIES : []].map((e) => {
|
|
3934
4021
|
const isActive2 = e.slug === current;
|
|
3935
4022
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3936
|
-
|
|
4023
|
+
Link7__default.default,
|
|
3937
4024
|
{
|
|
3938
4025
|
href: e.href,
|
|
3939
4026
|
onClick: () => setOpen(false),
|
|
@@ -3954,7 +4041,7 @@ function EcosystemSwitcher({
|
|
|
3954
4041
|
) }, e.slug);
|
|
3955
4042
|
}) }),
|
|
3956
4043
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3957
|
-
|
|
4044
|
+
Link7__default.default,
|
|
3958
4045
|
{
|
|
3959
4046
|
href: "https://docs.ochk.io",
|
|
3960
4047
|
onClick: () => setOpen(false),
|
|
@@ -4301,7 +4388,7 @@ function OcLogoDropdown({
|
|
|
4301
4388
|
}
|
|
4302
4389
|
),
|
|
4303
4390
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4304
|
-
|
|
4391
|
+
Link7__default.default,
|
|
4305
4392
|
{
|
|
4306
4393
|
href: homeHref,
|
|
4307
4394
|
"aria-label": "go to " + homeHref + " (this site's home)",
|
|
@@ -4351,7 +4438,7 @@ function OcLogoDropdown({
|
|
|
4351
4438
|
const isActive2 = e.slug === current;
|
|
4352
4439
|
const href = isActive2 ? homeHref : e.origin;
|
|
4353
4440
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "none", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4354
|
-
|
|
4441
|
+
Link7__default.default,
|
|
4355
4442
|
{
|
|
4356
4443
|
href,
|
|
4357
4444
|
role: "menuitem",
|
|
@@ -4383,7 +4470,7 @@ function OcLogoDropdown({
|
|
|
4383
4470
|
] }, category);
|
|
4384
4471
|
}) }),
|
|
4385
4472
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4386
|
-
|
|
4473
|
+
Link7__default.default,
|
|
4387
4474
|
{
|
|
4388
4475
|
href: "https://docs.ochk.io",
|
|
4389
4476
|
onClick: () => setOpen(false),
|
|
@@ -4713,7 +4800,7 @@ function MobileMenu({
|
|
|
4713
4800
|
},
|
|
4714
4801
|
l.href
|
|
4715
4802
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4716
|
-
|
|
4803
|
+
Link7__default.default,
|
|
4717
4804
|
{
|
|
4718
4805
|
href: l.href,
|
|
4719
4806
|
role: "menuitem",
|
|
@@ -4948,7 +5035,7 @@ function OcAccountMenuView({
|
|
|
4948
5035
|
},
|
|
4949
5036
|
item.href
|
|
4950
5037
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4951
|
-
|
|
5038
|
+
Link7__default.default,
|
|
4952
5039
|
{
|
|
4953
5040
|
href: item.href,
|
|
4954
5041
|
onClick,
|
|
@@ -5169,7 +5256,7 @@ function PopoverSection({
|
|
|
5169
5256
|
},
|
|
5170
5257
|
item.href
|
|
5171
5258
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5172
|
-
|
|
5259
|
+
Link7__default.default,
|
|
5173
5260
|
{
|
|
5174
5261
|
href: item.href,
|
|
5175
5262
|
onClick: onItemClick,
|
|
@@ -5272,7 +5359,7 @@ function OcPrimaryNav({
|
|
|
5272
5359
|
},
|
|
5273
5360
|
link.href
|
|
5274
5361
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5275
|
-
|
|
5362
|
+
Link7__default.default,
|
|
5276
5363
|
{
|
|
5277
5364
|
href: link.href,
|
|
5278
5365
|
"aria-current": active ? "page" : void 0,
|
|
@@ -5347,7 +5434,7 @@ function OcDashboardShell({
|
|
|
5347
5434
|
}
|
|
5348
5435
|
),
|
|
5349
5436
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5350
|
-
|
|
5437
|
+
Link7__default.default,
|
|
5351
5438
|
{
|
|
5352
5439
|
href: rootHref,
|
|
5353
5440
|
className: "text-primary font-mono text-[11px] tracking-widest uppercase",
|
|
@@ -5419,7 +5506,7 @@ function Sidebar({
|
|
|
5419
5506
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b px-4 py-3", children: [
|
|
5420
5507
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5421
5508
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5422
|
-
|
|
5509
|
+
Link7__default.default,
|
|
5423
5510
|
{
|
|
5424
5511
|
href: rootHref,
|
|
5425
5512
|
onClick: onClose,
|
|
@@ -5479,7 +5566,7 @@ function Sidebar({
|
|
|
5479
5566
|
children: content
|
|
5480
5567
|
}
|
|
5481
5568
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5482
|
-
|
|
5569
|
+
Link7__default.default,
|
|
5483
5570
|
{
|
|
5484
5571
|
href: tool.href,
|
|
5485
5572
|
onClick: onClose,
|
|
@@ -5541,7 +5628,7 @@ function OcDashboardHub({ tools, className }) {
|
|
|
5541
5628
|
className: cls,
|
|
5542
5629
|
children: content
|
|
5543
5630
|
}
|
|
5544
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5631
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(Link7__default.default, { href: tool.href, className: cls, children: content }) }, tool.id);
|
|
5545
5632
|
})
|
|
5546
5633
|
}
|
|
5547
5634
|
);
|
|
@@ -5643,7 +5730,7 @@ function FooterLinkItem({ link }) {
|
|
|
5643
5730
|
" \u2197"
|
|
5644
5731
|
] });
|
|
5645
5732
|
}
|
|
5646
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5733
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Link7__default.default, { href: link.href, className: LINK_CLS, children: [
|
|
5647
5734
|
"> ",
|
|
5648
5735
|
link.label
|
|
5649
5736
|
] });
|
|
@@ -5796,6 +5883,7 @@ exports.OcAppearanceMenu = OcAppearanceMenu;
|
|
|
5796
5883
|
exports.OcAurora = OcAurora;
|
|
5797
5884
|
exports.OcDashboardHub = OcDashboardHub;
|
|
5798
5885
|
exports.OcDashboardShell = OcDashboardShell;
|
|
5886
|
+
exports.OcErrorPage = OcErrorPage;
|
|
5799
5887
|
exports.OcFamilyFooter = OcFamilyFooter;
|
|
5800
5888
|
exports.OcLogoDropdown = OcLogoDropdown;
|
|
5801
5889
|
exports.OcPrimaryNav = OcPrimaryNav;
|