@krizaka/ui 3.78.1 → 3.80.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/README.md +1 -0
- package/dist/app-frame.d.ts +4 -1
- package/dist/chunk-BCD2CRFG.js +349 -0
- package/dist/chunk-BCD2CRFG.js.map +1 -0
- package/dist/{chunk-PGPNYYE2.js → chunk-BHAWCN4I.js} +128 -110
- package/dist/chunk-BHAWCN4I.js.map +1 -0
- package/dist/{chunk-SG3QJJXE.js → chunk-ENFXJUDN.js} +3 -16
- package/dist/chunk-ENFXJUDN.js.map +1 -0
- package/dist/identity-card.d.ts +39 -0
- package/dist/identity-card.js +34 -0
- package/dist/identity-card.js.map +1 -0
- package/dist/index.d.ts +47 -15
- package/dist/index.js +87 -23
- package/dist/index.js.map +1 -1
- package/dist/native.d.ts +4 -1
- package/dist/nav-bar.d.ts +1 -1
- package/dist/nav-bar.js +63 -53
- package/dist/nav-bar.js.map +1 -1
- package/dist/qr-code.d.ts +25 -2
- package/dist/qr-code.js +29 -339
- package/dist/qr-code.js.map +1 -1
- package/dist/rail-nav.d.ts +4 -1
- package/dist/{schema-CL7t7xqb.d.ts → schema-DgjBz7-8.d.ts} +1 -1
- package/dist/shop.d.ts +2 -2
- package/dist/site-cahier.d.ts +32 -19
- package/dist/site-cahier.js +164 -138
- package/dist/site-cahier.js.map +1 -1
- package/dist/site-footer.d.ts +59 -39
- package/dist/site-footer.js +94 -68
- package/dist/site-footer.js.map +1 -1
- package/dist/{sites-CVNSirrg.d.ts → sites-BLqbwmng.d.ts} +14 -0
- package/dist/sites.d.ts +28 -2
- package/dist/sites.js +10 -0
- package/dist/sites.js.map +1 -1
- package/package.json +17 -3
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/analysis-report.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-frame.json +8 -4
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chapter.json +1 -1
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/collection-switcher.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/copy-button.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/desktop-window.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/doodle.json +1 -1
- package/registry/drop-overlay.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +1 -1
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/entity-header.json +1 -1
- package/registry/environment-notice.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/identity-card/basic.d.ts +4 -0
- package/registry/examples/identity-card/basic.js +33 -0
- package/registry/examples/identity-card/basic.tsx +29 -0
- package/registry/examples/site-footer/company.js +1 -0
- package/registry/examples/site-footer/company.tsx +3 -2
- package/registry/examples/site-footer/docs.tsx +1 -1
- package/registry/examples/site-footer/open-source-fr.js +1 -1
- package/registry/examples/site-footer/open-source-fr.tsx +1 -1
- package/registry/examples/site-footer/product.js +9 -14
- package/registry/examples/site-footer/product.tsx +14 -12
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/grade-stamp.json +1 -1
- package/registry/identity-card.json +218 -0
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +40 -9
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +1 -1
- package/registry/kpi-explained.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/margin-layout.json +1 -1
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/money-input.json +1 -1
- package/registry/nav-bar.json +8 -4
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/price-catalogue-editor.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/promo-code-field.json +1 -1
- package/registry/proposal.json +1 -1
- package/registry/qr-code.json +6 -2
- package/registry/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +8 -4
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +1 -1
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/schema-form.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/shop-composer.json +1 -1
- package/registry/shop-gallery.json +1 -1
- package/registry/shop.json +2 -2
- package/registry/showcase.json +1 -1
- package/registry/signature.json +1 -1
- package/registry/site-cahier.json +1 -1
- package/registry/site-footer.json +87 -60
- package/registry/sites.json +7 -3
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-chip.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/text-style.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +1 -1
- package/registry/usage.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/versus-card.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/wall.json +1 -1
- package/registry/waveform.json +1 -1
- package/dist/chunk-PGPNYYE2.js.map +0 -1
- package/dist/chunk-SG3QJJXE.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ interface MarkProps {
|
|
|
22
22
|
declare function AkinazaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
26
|
-
* the
|
|
27
|
-
*
|
|
25
|
+
* The Yomizaka mark, "the watch": the owl — two lenses at the family stroke under one calm brow, its pupils glancing
|
|
26
|
+
* down the line it reads — in the Yomizaka gradient (ink → indigo, the same in dark and light). The pupils are the lit
|
|
27
|
+
* cores and breathe; one node, a page, rides the dashed orbit. Below 48 px it crops to the emblem.
|
|
28
28
|
*/
|
|
29
|
-
declare function
|
|
29
|
+
declare function YomizakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* The Orazaka mark: three solid hexagonal shards in the Orazaka orange (the brand's mark
|
|
@@ -35,13 +35,52 @@ declare function KrizakaLogo({ size, animated, title, className }: MarkProps): R
|
|
|
35
35
|
*/
|
|
36
36
|
declare function OrazakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
|
|
37
37
|
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The Kridoc mark (the managed storage, sold as « Kridoc by Krizaka »): an ink page with its corner folded, open at the
|
|
40
|
+
* fold where a blue node — the share link — breaks out, and a blue seal on the page. Krizaka's colours: a service of the
|
|
41
|
+
* company. The orbit turns, the node and the seal breathe. Below 48 px it crops to the emblem.
|
|
42
|
+
*/
|
|
43
|
+
declare function KridocLogo(props: Readonly<MarkProps>): React.JSX.Element;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The Krizaka mark: an ink hexagonal shield, open at one vertex where a blue node breaks out, around a blue core —
|
|
47
|
+
* the parent of the family (Orazaka's shards). The orbit turns, the node and the core
|
|
48
|
+
* breathe. The shield reads the host's text roles, so it is ink in both themes. Below 48 px it crops to the emblem.
|
|
49
|
+
*/
|
|
50
|
+
declare function KrizakaLogo(props: Readonly<MarkProps>): React.JSX.Element;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A Krizaka brand by its code name: the company and its three products — sold as Verikora (`yomizaka`), Folioviv
|
|
54
|
+
* (`akinaza`) and Sovkora (`orazaka`). It also keys the brand palettes (maps, forms, loaders).
|
|
55
|
+
*/
|
|
39
56
|
type BrandId = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
|
|
40
|
-
/**
|
|
57
|
+
/** A mark by its code name (the ids of `@krizaka/org`'s `brands`): a brand, or Kridoc — the managed storage (`kachizaka`), which has a mark and no palette of its own. */
|
|
58
|
+
type MarkId = BrandId | "kachizaka";
|
|
59
|
+
/** The mark of a Krizaka brand by id — for navigation, cards and lists driven by data. Kridoc is drawn by `ProductLockup` or `KridocLogo`: keeping it out of here keeps the bar light (krizaka-ui#837). */
|
|
41
60
|
declare function ProductLogo({ id, ...props }: MarkProps & {
|
|
42
61
|
id: BrandId;
|
|
43
62
|
}): React.JSX.Element;
|
|
44
63
|
|
|
64
|
+
interface ProductLockupProps {
|
|
65
|
+
/** The brand by its code name (`yomizaka`): it picks the mark only, never the words. */
|
|
66
|
+
id: MarkId;
|
|
67
|
+
/** The name shown — `displayName(codeName, setting)` of `@krizaka/org`, so the administrator's choice wins (« Verikora »). */
|
|
68
|
+
name: string;
|
|
69
|
+
/** The endorsement under it — `brandOf(codeName).endorsement[locale]` of `@krizaka/org` (« by Krizaka » / « par Krizaka »). */
|
|
70
|
+
endorsement: string;
|
|
71
|
+
/**
|
|
72
|
+
* The mark's size in px; the words follow it (`sm` under 40 px, `md` from 40, `lg` from 64).
|
|
73
|
+
* @default 32
|
|
74
|
+
*/
|
|
75
|
+
size?: number;
|
|
76
|
+
/** @default true */
|
|
77
|
+
animated?: boolean;
|
|
78
|
+
/** `inline` puts the endorsement beside the name (a footer line); `stacked` under it (a bar, a hero, an email header). @default "stacked" */
|
|
79
|
+
layout?: "stacked" | "inline";
|
|
80
|
+
className?: string;
|
|
81
|
+
}
|
|
82
|
+
declare function ProductLockup({ id, name, endorsement, size, animated, layout, className }: Readonly<ProductLockupProps>): React.JSX.Element;
|
|
83
|
+
|
|
45
84
|
/**
|
|
46
85
|
* The Wu-sama mark — the founder's byline mark, for the person and not the company (the company keeps `KrizakaLogo`).
|
|
47
86
|
* Oussama's nickname is Wu-sama: it shares Krizaka's hexagonal shield contour and color palette (ink shield, open
|
|
@@ -51,12 +90,5 @@ declare function WuSamaMark({ size, title, className }: Omit<MarkProps, "animate
|
|
|
51
90
|
animated?: boolean;
|
|
52
91
|
}): React.JSX.Element;
|
|
53
92
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
* down the line it reads — in the Yomizaka gradient (ink → indigo, the same in dark and light). The pupils are the lit
|
|
57
|
-
* cores and breathe; one node, a page, rides the dashed orbit. Below 48 px it crops to the emblem.
|
|
58
|
-
*/
|
|
59
|
-
declare function YomizakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
|
|
60
|
-
|
|
61
|
-
export { AkinazaLogo, KrizakaLogo, OrazakaLogo, ProductLogo, WuSamaMark, YomizakaLogo, cx };
|
|
62
|
-
export type { BrandId, MarkProps };
|
|
93
|
+
export { AkinazaLogo, AkinazaLogo as FoliovivLogo, KridocLogo, KrizakaLogo, OrazakaLogo, ProductLockup, ProductLogo, OrazakaLogo as SovkoraLogo, YomizakaLogo as VerikoraLogo, WuSamaMark, YomizakaLogo, cx };
|
|
94
|
+
export type { BrandId, MarkId, MarkProps, ProductLockupProps };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
AkinazaLogo,
|
|
4
|
+
InkDefs,
|
|
5
|
+
InkMark,
|
|
6
|
+
KRIZAKA,
|
|
4
7
|
KrizakaLogo,
|
|
5
8
|
OrazakaLogo,
|
|
6
9
|
ProductLogo,
|
|
@@ -8,7 +11,7 @@ import {
|
|
|
8
11
|
a11y,
|
|
9
12
|
neutral,
|
|
10
13
|
useIds
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BHAWCN4I.js";
|
|
12
15
|
import {
|
|
13
16
|
cx
|
|
14
17
|
} from "./chunk-6ISW63JI.js";
|
|
@@ -17,6 +20,72 @@ import {
|
|
|
17
20
|
RotatingWord
|
|
18
21
|
} from "./chunk-VA4NPCUQ.js";
|
|
19
22
|
|
|
23
|
+
// src/marks/kridoc-geometry.ts
|
|
24
|
+
var KRIDOC = {
|
|
25
|
+
viewBox: KRIZAKA.viewBox,
|
|
26
|
+
croppedViewBox: KRIZAKA.croppedViewBox,
|
|
27
|
+
offset: KRIZAKA.offset,
|
|
28
|
+
/** The page: from the fold, down the right edge, along the bottom, up the left edge and across the top, stopping short of the fold. */
|
|
29
|
+
page: "M248,140 L248,268 L112,268 L112,92 L190,92",
|
|
30
|
+
/** The folded corner: the crease from the top edge to the right edge. */
|
|
31
|
+
fold: "M214,92 L214,124 L248,124",
|
|
32
|
+
/** Two lines of text on the page. */
|
|
33
|
+
lines: ["M140,170 L214,170", "M140,206 L196,206"],
|
|
34
|
+
stroke: KRIZAKA.stroke,
|
|
35
|
+
ink: KRIZAKA.ink,
|
|
36
|
+
blue: KRIZAKA.blue,
|
|
37
|
+
node: { cx: 248, cy: 92, r: 19, inner: 6 },
|
|
38
|
+
core: { cx: 196, cy: 240, r: 20, inner: 7 },
|
|
39
|
+
highlight: KRIZAKA.highlight,
|
|
40
|
+
glow: KRIZAKA.glow,
|
|
41
|
+
orbit: KRIZAKA.orbit,
|
|
42
|
+
ring: KRIZAKA.ring
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// src/marks/KridocLogo.tsx
|
|
46
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
47
|
+
var CSS = `
|
|
48
|
+
.kdm-spin { transform-origin: 200px 200px; animation: kdm-spin 30s linear infinite; }
|
|
49
|
+
.kdm-pulse { transform-box: fill-box; transform-origin: center; animation: kdm-pulse 3.2s ease-in-out infinite; }
|
|
50
|
+
@keyframes kdm-spin { to { transform: rotate(360deg); } }
|
|
51
|
+
@keyframes kdm-pulse { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
|
|
52
|
+
@media (prefers-reduced-motion: reduce) { .kdm-spin, .kdm-pulse { animation: none; } }
|
|
53
|
+
`;
|
|
54
|
+
function KridocLogo(props) {
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
InkMark,
|
|
57
|
+
{
|
|
58
|
+
...props,
|
|
59
|
+
prefix: "kdm",
|
|
60
|
+
css: CSS,
|
|
61
|
+
geometry: KRIDOC,
|
|
62
|
+
figure: (ink) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx("path", { d: KRIDOC.page, stroke: ink, strokeWidth: KRIDOC.stroke, strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
64
|
+
/* @__PURE__ */ jsx("path", { d: KRIDOC.fold, stroke: ink, strokeWidth: KRIDOC.stroke, strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
65
|
+
KRIDOC.lines.map((d) => /* @__PURE__ */ jsx("path", { d, stroke: ink, strokeWidth: KRIDOC.stroke * 0.6, strokeLinecap: "round" }, d))
|
|
66
|
+
] })
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// src/marks/ProductLockup.tsx
|
|
72
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
73
|
+
function textSize(size) {
|
|
74
|
+
if (size >= 64) return "text-2xl";
|
|
75
|
+
if (size >= 40) return "text-lg";
|
|
76
|
+
return "text-base";
|
|
77
|
+
}
|
|
78
|
+
function ProductLockup({ id, name, endorsement, size = 32, animated = true, layout = "stacked", className }) {
|
|
79
|
+
const text = textSize(size);
|
|
80
|
+
return /* @__PURE__ */ jsxs2("span", { className: cx("inline-flex items-center gap-2.5", className), "data-brand": id, children: [
|
|
81
|
+
id === "kachizaka" ? /* @__PURE__ */ jsx2(KridocLogo, { size, animated }) : /* @__PURE__ */ jsx2(ProductLogo, { id, size, animated }),
|
|
82
|
+
/* @__PURE__ */ jsxs2("span", { className: cx("flex leading-tight", layout === "stacked" ? "flex-col" : "items-baseline gap-1.5"), children: [
|
|
83
|
+
/* @__PURE__ */ jsx2("span", { className: cx("font-semibold tracking-tight text-fg", text), children: name }),
|
|
84
|
+
/* @__PURE__ */ jsx2("span", { className: "text-xs text-fg-secondary", children: endorsement })
|
|
85
|
+
] })
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
|
|
20
89
|
// src/marks/wu-sama-geometry.ts
|
|
21
90
|
import { marks } from "@krizaka/tokens/native";
|
|
22
91
|
var WU_SAMA = {
|
|
@@ -40,41 +109,36 @@ var WU_SAMA = {
|
|
|
40
109
|
};
|
|
41
110
|
|
|
42
111
|
// src/marks/WuSamaMark.tsx
|
|
43
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
112
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
44
113
|
function WuSamaMark({ size = 32, title, className }) {
|
|
45
114
|
const id = useIds("wsm", ["ink", "blue", "glow"]);
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */ jsx("linearGradient", { id: id.blue, gradientUnits: "userSpaceOnUse", x1: WU_SAMA.blue.x1, y1: WU_SAMA.blue.y1, x2: WU_SAMA.blue.x2, y2: WU_SAMA.blue.y2, children: WU_SAMA.blue.stops.map(([offset, color]) => /* @__PURE__ */ jsx("stop", { offset, stopColor: color }, offset)) }),
|
|
53
|
-
/* @__PURE__ */ jsxs("radialGradient", { id: id.glow, cx: "50%", cy: "50%", r: "50%", children: [
|
|
54
|
-
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: WU_SAMA.glow.color, stopOpacity: WU_SAMA.glow.opacity }),
|
|
55
|
-
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: WU_SAMA.glow.color, stopOpacity: "0" })
|
|
56
|
-
] })
|
|
57
|
-
] }),
|
|
58
|
-
size >= 48 ? /* @__PURE__ */ jsx("circle", { cx: "200", cy: "200", r: "190", fill: `url(#${id.glow})` }) : null,
|
|
59
|
-
size >= 48 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
/* @__PURE__ */ jsx("circle", { cx: "200", cy: "200", r: WU_SAMA.orbit.r, stroke: neutral("--kz-border-strong", 40), strokeWidth: WU_SAMA.orbit.width, strokeDasharray: WU_SAMA.orbit.dash, opacity: ".6" }),
|
|
61
|
-
/* @__PURE__ */ jsx("circle", { cx: "200", cy: "200", r: WU_SAMA.ring.r, stroke: neutral("--kz-border-default", 30), strokeWidth: WU_SAMA.ring.width, opacity: ".35" })
|
|
115
|
+
return /* @__PURE__ */ jsxs3("svg", { width: size, height: size, viewBox: size < 48 ? WU_SAMA.croppedViewBox : WU_SAMA.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", className, ...a11y(title), children: [
|
|
116
|
+
/* @__PURE__ */ jsx3(InkDefs, { ids: id, geometry: WU_SAMA }),
|
|
117
|
+
size >= 48 ? /* @__PURE__ */ jsx3("circle", { cx: "200", cy: "200", r: "190", fill: `url(#${id.glow})` }) : null,
|
|
118
|
+
size >= 48 ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
119
|
+
/* @__PURE__ */ jsx3("circle", { cx: "200", cy: "200", r: WU_SAMA.orbit.r, stroke: neutral("--kz-border-strong", 40), strokeWidth: WU_SAMA.orbit.width, strokeDasharray: WU_SAMA.orbit.dash, opacity: ".6" }),
|
|
120
|
+
/* @__PURE__ */ jsx3("circle", { cx: "200", cy: "200", r: WU_SAMA.ring.r, stroke: neutral("--kz-border-default", 30), strokeWidth: WU_SAMA.ring.width, opacity: ".35" })
|
|
62
121
|
] }) : null,
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ jsxs3("g", { transform: `translate(${WU_SAMA.offset} ${WU_SAMA.offset})`, children: [
|
|
123
|
+
/* @__PURE__ */ jsx3("path", { d: WU_SAMA.shield, stroke: `url(#${id.ink})`, strokeWidth: WU_SAMA.stroke, strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
124
|
+
/* @__PURE__ */ jsx3("circle", { cx: WU_SAMA.node.cx, cy: WU_SAMA.node.cy, r: WU_SAMA.node.r, fill: `url(#${id.blue})` }),
|
|
125
|
+
/* @__PURE__ */ jsx3("circle", { cx: WU_SAMA.node.cx, cy: WU_SAMA.node.cy, r: WU_SAMA.node.inner, fill: WU_SAMA.highlight }),
|
|
126
|
+
/* @__PURE__ */ jsx3("path", { d: WU_SAMA.w, stroke: `url(#${id.blue})`, strokeWidth: WU_SAMA.wStroke, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
68
127
|
] })
|
|
69
128
|
] });
|
|
70
129
|
}
|
|
71
130
|
export {
|
|
72
131
|
AkinazaLogo,
|
|
132
|
+
AkinazaLogo as FoliovivLogo,
|
|
133
|
+
KridocLogo,
|
|
73
134
|
KrizakaLogo,
|
|
74
135
|
MotionObserver,
|
|
75
136
|
OrazakaLogo,
|
|
137
|
+
ProductLockup,
|
|
76
138
|
ProductLogo,
|
|
77
139
|
RotatingWord,
|
|
140
|
+
OrazakaLogo as SovkoraLogo,
|
|
141
|
+
YomizakaLogo as VerikoraLogo,
|
|
78
142
|
WuSamaMark,
|
|
79
143
|
YomizakaLogo,
|
|
80
144
|
cx
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/marks/wu-sama-geometry.ts","../src/marks/WuSamaMark.tsx"],"sourcesContent":["import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The Wu-sama mark's geometry — the founder's byline mark.\n * It shares the Krizaka shield contour (pointy-top hexagonal shield with open vertex and lit node)\n * and brand colors, holding a W of five straight legs in Krizaka blue at its center.\n */\nexport const WU_SAMA = {\n viewBox: \"0 0 400 400\",\n croppedViewBox: \"86 82 228 228\",\n offset: 20,\n /** The shield: the Krizaka pointy-top hexagon (r 92 around 180,180), open at its upper-right edge. */\n shield: \"M259.7,134 L259.7,226 L180,272 L100.3,226 L100.3,134 L180,88 L212,106.5\",\n stroke: 22,\n ink: { x1: 70, y1: 290, x2: 290, y2: 70 },\n blue: { x1: 180, y1: 180, x2: 300, y2: 60, stops: marks.krizaka },\n /** The vertex where the shield opens: a lit node in Krizaka blue. */\n node: { cx: 259.7, cy: 134, r: 19, inner: 6 },\n /** The W: five straight legs in Krizaka blue. */\n w: \"M132,142 L154,216 L180,166 L206,216 L228,142\",\n wStroke: 18,\n highlight: \"#ddeaf4\",\n glow: { color: marks.krizaka[0]![1], opacity: 0.16 },\n orbit: { r: 160, dash: \"8 8\", width: 1.5 },\n ring: { r: 134, width: 1 },\n} as const;\n","import { a11y, type MarkProps, neutral, useIds } from \"./shared\";\nimport { WU_SAMA as G } from \"./wu-sama-geometry\";\n\n/**\n * The Wu-sama mark — the founder's byline mark, for the person and not the company (the company keeps `KrizakaLogo`).\n * Oussama's nickname is Wu-sama: it shares Krizaka's hexagonal shield contour and color palette (ink shield, open\n * vertex with lit blue node), with the W rendered in Krizaka blue at the center. Below 48 px it crops to the emblem.\n */\nexport function WuSamaMark({ size = 32, title, className }: Omit<MarkProps, \"animated\"> & { animated?: boolean }) {\n const id = useIds(\"wsm\", [\"ink\", \"blue\", \"glow\"] as const);\n return (\n <svg width={size} height={size} viewBox={size < 48 ? G.croppedViewBox : G.viewBox} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <defs>\n <linearGradient id={id.ink} gradientUnits=\"userSpaceOnUse\" x1={G.ink.x1} y1={G.ink.y1} x2={G.ink.x2} y2={G.ink.y2}>\n <stop offset=\"0%\" stopColor={neutral(\"--kz-text-secondary\", 60)} />\n <stop offset=\"100%\" stopColor={neutral(\"--kz-text-primary\", 92)} />\n </linearGradient>\n <linearGradient id={id.blue} gradientUnits=\"userSpaceOnUse\" x1={G.blue.x1} y1={G.blue.y1} x2={G.blue.x2} y2={G.blue.y2}>\n {G.blue.stops.map(([offset, color]) => (\n <stop key={offset} offset={offset} stopColor={color} />\n ))}\n </linearGradient>\n <radialGradient id={id.glow} cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" stopColor={G.glow.color} stopOpacity={G.glow.opacity} />\n <stop offset=\"100%\" stopColor={G.glow.color} stopOpacity=\"0\" />\n </radialGradient>\n </defs>\n {size >= 48 ? <circle cx=\"200\" cy=\"200\" r=\"190\" fill={`url(#${id.glow})`} /> : null}\n {size >= 48 ? (\n <>\n <circle cx=\"200\" cy=\"200\" r={G.orbit.r} stroke={neutral(\"--kz-border-strong\", 40)} strokeWidth={G.orbit.width} strokeDasharray={G.orbit.dash} opacity=\".6\" />\n <circle cx=\"200\" cy=\"200\" r={G.ring.r} stroke={neutral(\"--kz-border-default\", 30)} strokeWidth={G.ring.width} opacity=\".35\" />\n </>\n ) : null}\n <g transform={`translate(${G.offset} ${G.offset})`}>\n <path d={G.shield} stroke={`url(#${id.ink})`} strokeWidth={G.stroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <circle cx={G.node.cx} cy={G.node.cy} r={G.node.r} fill={`url(#${id.blue})`} />\n <circle cx={G.node.cx} cy={G.node.cy} r={G.node.inner} fill={G.highlight} />\n <path d={G.w} stroke={`url(#${id.blue})`} strokeWidth={G.wStroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </g>\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;AAOf,IAAM,UAAU;AAAA,EACrB,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK,EAAE,IAAI,IAAI,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG;AAAA,EACxC,MAAM,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,OAAO,MAAM,QAAQ;AAAA;AAAA,EAEhE,MAAM,EAAE,IAAI,OAAO,IAAI,KAAK,GAAG,IAAI,OAAO,EAAE;AAAA;AAAA,EAE5C,GAAG;AAAA,EACH,SAAS;AAAA,EACT,WAAW;AAAA,EACX,MAAM,EAAE,OAAO,MAAM,QAAQ,CAAC,EAAG,CAAC,GAAG,SAAS,KAAK;AAAA,EACnD,OAAO,EAAE,GAAG,KAAK,MAAM,OAAO,OAAO,IAAI;AAAA,EACzC,MAAM,EAAE,GAAG,KAAK,OAAO,EAAE;AAC3B;;;AC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,IAAK;AAAA,IAC9E,QAAQ,KACP,iCACE;AAAA,0BAAC,YAAO,IAAG,OAAM,IAAG,OAAM,GAAG,QAAE,MAAM,GAAG,QAAQ,QAAQ,sBAAsB,EAAE,GAAG,aAAa,QAAE,MAAM,OAAO,iBAAiB,QAAE,MAAM,MAAM,SAAQ,MAAK;AAAA,MAC3J,oBAAC,YAAO,IAAG,OAAM,IAAG,OAAM,GAAG,QAAE,KAAK,GAAG,QAAQ,QAAQ,uBAAuB,EAAE,GAAG,aAAa,QAAE,KAAK,OAAO,SAAQ,OAAM;AAAA,OAC9H,IACE;AAAA,IACJ,qBAAC,OAAE,WAAW,aAAa,QAAE,MAAM,IAAI,QAAE,MAAM,KAC7C;AAAA,0BAAC,UAAK,GAAG,QAAE,QAAQ,QAAQ,QAAQ,GAAG,GAAG,KAAK,aAAa,QAAE,QAAQ,eAAc,SAAQ,gBAAe,SAAQ;AAAA,MAClH,oBAAC,YAAO,IAAI,QAAE,KAAK,IAAI,IAAI,QAAE,KAAK,IAAI,GAAG,QAAE,KAAK,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK;AAAA,MAC7E,oBAAC,YAAO,IAAI,QAAE,KAAK,IAAI,IAAI,QAAE,KAAK,IAAI,GAAG,QAAE,KAAK,OAAO,MAAM,QAAE,WAAW;AAAA,MAC1E,oBAAC,UAAK,GAAG,QAAE,GAAG,QAAQ,QAAQ,GAAG,IAAI,KAAK,aAAa,QAAE,SAAS,eAAc,SAAQ,gBAAe,SAAQ;AAAA,OACjH;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/marks/kridoc-geometry.ts","../src/marks/KridocLogo.tsx","../src/marks/ProductLockup.tsx","../src/marks/wu-sama-geometry.ts","../src/marks/WuSamaMark.tsx"],"sourcesContent":["import { KRIZAKA } from \"./krizaka-geometry\";\n\n/**\n * The Kridoc mark's geometry (the managed storage, code name kachizaka; krizaka-internal#2035). Same grammar as the family\n * (a 360×360 artwork at (20, 20), one stroke of 22, an open figure whose end breaks out as a node, a core, a dashed orbit\n * and a ring). Kridoc is a service of the company, so it wears the **Krizaka** colours — ink figure, blue node and core.\n * The figure is a page with its corner folded: the stroke stays open at the fold, where the node — the share link — sits;\n * the core is the seal on the page (kept, audited).\n */\nexport const KRIDOC = {\n viewBox: KRIZAKA.viewBox,\n croppedViewBox: KRIZAKA.croppedViewBox,\n offset: KRIZAKA.offset,\n /** The page: from the fold, down the right edge, along the bottom, up the left edge and across the top, stopping short of the fold. */\n page: \"M248,140 L248,268 L112,268 L112,92 L190,92\",\n /** The folded corner: the crease from the top edge to the right edge. */\n fold: \"M214,92 L214,124 L248,124\",\n /** Two lines of text on the page. */\n lines: [\"M140,170 L214,170\", \"M140,206 L196,206\"],\n stroke: KRIZAKA.stroke,\n ink: KRIZAKA.ink,\n blue: KRIZAKA.blue,\n node: { cx: 248, cy: 92, r: 19, inner: 6 },\n core: { cx: 196, cy: 240, r: 20, inner: 7 },\n highlight: KRIZAKA.highlight,\n glow: KRIZAKA.glow,\n orbit: KRIZAKA.orbit,\n ring: KRIZAKA.ring,\n} as const;\n","import { InkMark } from \"./InkMark\";\nimport { KRIDOC as G } from \"./kridoc-geometry\";\nimport type { MarkProps } from \"./shared\";\n\nconst CSS = `\n.kdm-spin { transform-origin: 200px 200px; animation: kdm-spin 30s linear infinite; }\n.kdm-pulse { transform-box: fill-box; transform-origin: center; animation: kdm-pulse 3.2s ease-in-out infinite; }\n@keyframes kdm-spin { to { transform: rotate(360deg); } }\n@keyframes kdm-pulse { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }\n@media (prefers-reduced-motion: reduce) { .kdm-spin, .kdm-pulse { animation: none; } }\n`;\n\n/**\n * The Kridoc mark (the managed storage, sold as « Kridoc by Krizaka »): an ink page with its corner folded, open at the\n * fold where a blue node — the share link — breaks out, and a blue seal on the page. Krizaka's colours: a service of the\n * company. The orbit turns, the node and the seal breathe. Below 48 px it crops to the emblem.\n */\nexport function KridocLogo(props: Readonly<MarkProps>) {\n return (\n <InkMark\n {...props}\n prefix=\"kdm\"\n css={CSS}\n geometry={G}\n figure={(ink) => (\n <>\n <path d={G.page} stroke={ink} strokeWidth={G.stroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d={G.fold} stroke={ink} strokeWidth={G.stroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n {G.lines.map((d) => (\n <path key={d} d={d} stroke={ink} strokeWidth={G.stroke * 0.6} strokeLinecap=\"round\" />\n ))}\n </>\n )}\n />\n );\n}\n","import { cx } from \"../cx\";\nimport { KridocLogo } from \"./KridocLogo\";\nimport { type MarkId, ProductLogo } from \"./ProductLogo\";\n\nexport interface ProductLockupProps {\n /** The brand by its code name (`yomizaka`): it picks the mark only, never the words. */\n id: MarkId;\n /** The name shown — `displayName(codeName, setting)` of `@krizaka/org`, so the administrator's choice wins (« Verikora »). */\n name: string;\n /** The endorsement under it — `brandOf(codeName).endorsement[locale]` of `@krizaka/org` (« by Krizaka » / « par Krizaka »). */\n endorsement: string;\n /**\n * The mark's size in px; the words follow it (`sm` under 40 px, `md` from 40, `lg` from 64).\n * @default 32\n */\n size?: number;\n /** @default true */\n animated?: boolean;\n /** `inline` puts the endorsement beside the name (a footer line); `stacked` under it (a bar, a hero, an email header). @default \"stacked\" */\n layout?: \"stacked\" | \"inline\";\n className?: string;\n}\n\n/**\n * The « Verikora by Krizaka » lockup (krizaka-internal#2035): the product's mark, its name, and the company that endorses\n * it — for heroes, bars, footers, emails and store art. The words are data passed in (from `@krizaka/org` and the app's\n * `brand.displayName` setting), never typed here; the mark is decorative, the name is the text a screen reader reads.\n */\nfunction textSize(size: number): string {\n if (size >= 64) return \"text-2xl\";\n if (size >= 40) return \"text-lg\";\n return \"text-base\";\n}\n\nexport function ProductLockup({ id, name, endorsement, size = 32, animated = true, layout = \"stacked\", className }: Readonly<ProductLockupProps>) {\n const text = textSize(size);\n return (\n <span className={cx(\"inline-flex items-center gap-2.5\", className)} data-brand={id}>\n {id === \"kachizaka\" ? <KridocLogo size={size} animated={animated} /> : <ProductLogo id={id} size={size} animated={animated} />}\n <span className={cx(\"flex leading-tight\", layout === \"stacked\" ? \"flex-col\" : \"items-baseline gap-1.5\")}>\n <span className={cx(\"font-semibold tracking-tight text-fg\", text)}>{name}</span>\n <span className=\"text-xs text-fg-secondary\">{endorsement}</span>\n </span>\n </span>\n );\n}\n","import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The Wu-sama mark's geometry — the founder's byline mark.\n * It shares the Krizaka shield contour (pointy-top hexagonal shield with open vertex and lit node)\n * and brand colors, holding a W of five straight legs in Krizaka blue at its center.\n */\nexport const WU_SAMA = {\n viewBox: \"0 0 400 400\",\n croppedViewBox: \"86 82 228 228\",\n offset: 20,\n /** The shield: the Krizaka pointy-top hexagon (r 92 around 180,180), open at its upper-right edge. */\n shield: \"M259.7,134 L259.7,226 L180,272 L100.3,226 L100.3,134 L180,88 L212,106.5\",\n stroke: 22,\n ink: { x1: 70, y1: 290, x2: 290, y2: 70 },\n blue: { x1: 180, y1: 180, x2: 300, y2: 60, stops: marks.krizaka },\n /** The vertex where the shield opens: a lit node in Krizaka blue. */\n node: { cx: 259.7, cy: 134, r: 19, inner: 6 },\n /** The W: five straight legs in Krizaka blue. */\n w: \"M132,142 L154,216 L180,166 L206,216 L228,142\",\n wStroke: 18,\n highlight: \"#ddeaf4\",\n glow: { color: marks.krizaka[0]![1], opacity: 0.16 },\n orbit: { r: 160, dash: \"8 8\", width: 1.5 },\n ring: { r: 134, width: 1 },\n} as const;\n","import { InkDefs } from \"./InkMark\";\nimport { a11y, type MarkProps, neutral, useIds } from \"./shared\";\nimport { WU_SAMA as G } from \"./wu-sama-geometry\";\n\n/**\n * The Wu-sama mark — the founder's byline mark, for the person and not the company (the company keeps `KrizakaLogo`).\n * Oussama's nickname is Wu-sama: it shares Krizaka's hexagonal shield contour and color palette (ink shield, open\n * vertex with lit blue node), with the W rendered in Krizaka blue at the center. Below 48 px it crops to the emblem.\n */\nexport function WuSamaMark({ size = 32, title, className }: Omit<MarkProps, \"animated\"> & { animated?: boolean }) {\n const id = useIds(\"wsm\", [\"ink\", \"blue\", \"glow\"] as const);\n return (\n <svg width={size} height={size} viewBox={size < 48 ? G.croppedViewBox : G.viewBox} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <InkDefs ids={id} geometry={G} />\n {size >= 48 ? <circle cx=\"200\" cy=\"200\" r=\"190\" fill={`url(#${id.glow})`} /> : null}\n {size >= 48 ? (\n <>\n <circle cx=\"200\" cy=\"200\" r={G.orbit.r} stroke={neutral(\"--kz-border-strong\", 40)} strokeWidth={G.orbit.width} strokeDasharray={G.orbit.dash} opacity=\".6\" />\n <circle cx=\"200\" cy=\"200\" r={G.ring.r} stroke={neutral(\"--kz-border-default\", 30)} strokeWidth={G.ring.width} opacity=\".35\" />\n </>\n ) : null}\n <g transform={`translate(${G.offset} ${G.offset})`}>\n <path d={G.shield} stroke={`url(#${id.ink})`} strokeWidth={G.stroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <circle cx={G.node.cx} cy={G.node.cy} r={G.node.r} fill={`url(#${id.blue})`} />\n <circle cx={G.node.cx} cy={G.node.cy} r={G.node.inner} fill={G.highlight} />\n <path d={G.w} stroke={`url(#${id.blue})`} strokeWidth={G.wStroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </g>\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AASO,IAAM,SAAS;AAAA,EACpB,SAAS,QAAQ;AAAA,EACjB,gBAAgB,QAAQ;AAAA,EACxB,QAAQ,QAAQ;AAAA;AAAA,EAEhB,MAAM;AAAA;AAAA,EAEN,MAAM;AAAA;AAAA,EAEN,OAAO,CAAC,qBAAqB,mBAAmB;AAAA,EAChD,QAAQ,QAAQ;AAAA,EAChB,KAAK,QAAQ;AAAA,EACb,MAAM,QAAQ;AAAA,EACd,MAAM,EAAE,IAAI,KAAK,IAAI,IA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ANGED
|
@@ -102,7 +102,10 @@ declare const addDays: (iso: string, days: number) => string;
|
|
|
102
102
|
/** The ISO date `months` later (or earlier), the day kept inside the shorter months (`01-31` + 1 → `02-28`). */
|
|
103
103
|
declare const addMonths: (iso: string, months: number) => string;
|
|
104
104
|
|
|
105
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* A Krizaka brand by its code name: the company and its three products — sold as Verikora (`yomizaka`), Folioviv
|
|
107
|
+
* (`akinaza`) and Sovkora (`orazaka`). It also keys the brand palettes (maps, forms, loaders).
|
|
108
|
+
*/
|
|
106
109
|
type BrandId = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
|
|
107
110
|
|
|
108
111
|
type Controlled = {
|
package/dist/nav-bar.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as tailwind_variants from 'tailwind-variants';
|
|
|
2
2
|
import { NavigationMenu } from 'radix-ui';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { LanguageSwitchProps } from './language-switch.js';
|
|
5
|
-
import { O as OrgFacts, S as SiteId, F as FamilyLabels } from './sites-
|
|
5
|
+
import { O as OrgFacts, S as SiteId, F as FamilyLabels } from './sites-BLqbwmng.js';
|
|
6
6
|
|
|
7
7
|
/** The body of `GET /api/me`. `account` is the product's own shape, present only when `signedIn`. */
|
|
8
8
|
interface MeResponse<TAccount = unknown> {
|
package/dist/nav-bar.js
CHANGED
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
LanguageSwitch
|
|
4
4
|
} from "./chunk-VPO27AFS.js";
|
|
5
5
|
import {
|
|
6
|
-
FamilyMark,
|
|
7
|
-
GitHubGlyph,
|
|
8
6
|
familyLabels,
|
|
9
7
|
siteById,
|
|
10
8
|
sitesByGroup
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ENFXJUDN.js";
|
|
12
10
|
import {
|
|
13
11
|
useSlidingIndicator
|
|
14
12
|
} from "./chunk-4QN5YJ3D.js";
|
|
15
|
-
import
|
|
13
|
+
import {
|
|
14
|
+
ProductLogo
|
|
15
|
+
} from "./chunk-BHAWCN4I.js";
|
|
16
16
|
import {
|
|
17
17
|
Button
|
|
18
18
|
} from "./chunk-V7W4RLRW.js";
|
|
@@ -45,6 +45,16 @@ import { NavigationMenu as Nav, Slot } from "radix-ui";
|
|
|
45
45
|
import * as React2 from "react";
|
|
46
46
|
import { tv } from "tailwind-variants";
|
|
47
47
|
|
|
48
|
+
// src/family-mark.tsx
|
|
49
|
+
import { jsx } from "react/jsx-runtime";
|
|
50
|
+
function GitHubGlyph({ size = 16, className }) {
|
|
51
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: size, height: size, fill: "currentColor", "aria-hidden": true, className, children: /* @__PURE__ */ jsx("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z" }) });
|
|
52
|
+
}
|
|
53
|
+
function FamilyMark({ mark, size }) {
|
|
54
|
+
if (mark === "github") return /* @__PURE__ */ jsx(GitHubGlyph, { size: Math.round(size * 0.8) });
|
|
55
|
+
return /* @__PURE__ */ jsx(ProductLogo, { id: mark, size, animated: false });
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
// src/nav-bar/placement.ts
|
|
49
59
|
function placePanel({ trigger, root, panel, window: window2, gutter = 16 }) {
|
|
50
60
|
const wanted = trigger - root;
|
|
@@ -56,7 +66,7 @@ function placePanel({ trigger, root, panel, window: window2, gutter = 16 }) {
|
|
|
56
66
|
// src/nav-bar/session.tsx
|
|
57
67
|
import { krizakaFetch, useQuery } from "@krizaka/query";
|
|
58
68
|
import * as React from "react";
|
|
59
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
69
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
60
70
|
var SESSION_HINT_COOKIE = "kz-session";
|
|
61
71
|
var noop = () => () => {
|
|
62
72
|
};
|
|
@@ -87,18 +97,18 @@ function NavBarSession({ endpoint = "/api/me", initial, sessionHint, signedOut,
|
|
|
87
97
|
if (session.status === "pending") {
|
|
88
98
|
if (sessionHint ?? flagged) {
|
|
89
99
|
return /* @__PURE__ */ jsxs("span", { role: "status", "aria-live": "polite", "data-state": "signed-in-pending", className, children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: "inline-block size-9 rounded-full bg-surface-2" }),
|
|
101
|
+
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: hint })
|
|
92
102
|
] });
|
|
93
103
|
}
|
|
94
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ jsx2("span", { role: "status", "aria-live": "polite", "data-state": "loading", className, children: /* @__PURE__ */ jsx2("span", { className: "sr-only", children: hint }) });
|
|
95
105
|
}
|
|
96
106
|
const state = { signupOpen: session.signupOpen };
|
|
97
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ jsx2(Fragment, { children: session.status === "in" ? signedIn(session.account, state) : signedOut(state) });
|
|
98
108
|
}
|
|
99
109
|
|
|
100
110
|
// src/nav-bar/nav-bar.tsx
|
|
101
|
-
import { Fragment as Fragment2, jsx as
|
|
111
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
102
112
|
var navBar = tv({
|
|
103
113
|
slots: {
|
|
104
114
|
root: "group/nav relative z-40 mx-auto flex h-14 w-full items-center gap-2 border-border-subtle bg-surface-1 transition-[height,background-color,border-color,box-shadow] duration-300 motion-reduce:transition-none data-compact:h-12 data-compact:border-border-default data-compact:bg-surface-1 data-compact:shadow-lg",
|
|
@@ -172,13 +182,13 @@ function NavBarRoot({ label, compactAfter = 24, floating = true, className, chil
|
|
|
172
182
|
return () => window.removeEventListener("scroll", onScroll);
|
|
173
183
|
}, [compactAfter]);
|
|
174
184
|
const ctx = React2.useMemo(() => ({ label, open, setOpen, panelId }), [label, open, panelId]);
|
|
175
|
-
return /* @__PURE__ */
|
|
185
|
+
return /* @__PURE__ */ jsx3(Context.Provider, { value: ctx, children: /* @__PURE__ */ jsx3("header", { "data-compact": compact ? "" : void 0, "data-floating": floating, className: navBar({ floating }).root({ className }), ...props, children }) });
|
|
176
186
|
}
|
|
177
187
|
function NavBarBrand({ asChild, className, org, children, ...props }) {
|
|
178
188
|
const Comp = asChild ? Slot.Root : "a";
|
|
179
189
|
const fromOrg = org && !asChild && children === void 0;
|
|
180
|
-
return /* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
190
|
+
return /* @__PURE__ */ jsx3(Comp, { className: s.brand({ className }), ...props, children: fromOrg ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
191
|
+
/* @__PURE__ */ jsx3(FamilyMark, { mark: siteById("krizaka").mark, size: 22 }),
|
|
182
192
|
org.brand.name
|
|
183
193
|
] }) : children });
|
|
184
194
|
}
|
|
@@ -222,14 +232,14 @@ function NavBarItems({ className, children, value: valueProp, defaultValue, onVa
|
|
|
222
232
|
window.removeEventListener("resize", place);
|
|
223
233
|
};
|
|
224
234
|
}, [value]);
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ jsx3(ItemsContext.Provider, { value: items, children: /* @__PURE__ */ jsxs2(Nav.Root, { ref: root, "aria-label": label, className: s.items({ className }), value, onValueChange: setValue, delayDuration, ...props, children: [
|
|
236
|
+
/* @__PURE__ */ jsx3(Nav.List, { ref, className: s.list(), ...handlers, children }),
|
|
237
|
+
/* @__PURE__ */ jsx3(Nav.Viewport, { ref: viewport, className: s.viewport() })
|
|
228
238
|
] }) });
|
|
229
239
|
}
|
|
230
240
|
function NavBarLink({ active, className, itemClassName, onPointerEnter, ...props }) {
|
|
231
241
|
const { close } = React2.useContext(ItemsContext);
|
|
232
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ jsx3(Nav.Item, { className: itemClassName, children: /* @__PURE__ */ jsx3(
|
|
233
243
|
Nav.Link,
|
|
234
244
|
{
|
|
235
245
|
"data-nav-item": "",
|
|
@@ -252,9 +262,9 @@ function NavBarMenu({ label, active, columns = 1, inlineUpTo = 3, inlineFrom = "
|
|
|
252
262
|
const dropdown = (hide) => /* @__PURE__ */ jsxs2(Nav.Item, { className: cn(hide, className), ...props, children: [
|
|
253
263
|
/* @__PURE__ */ jsxs2(Nav.Trigger, { "data-nav-item": "", "data-active": active ? "" : void 0, className: cn(s.item(), "group/trigger"), children: [
|
|
254
264
|
label,
|
|
255
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", className: s.chevron(), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx3("path", { d: "m6 9 6 6 6-6" }) })
|
|
256
266
|
] }),
|
|
257
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ jsx3(Nav.Content, { className: cn(s.panel(), columns === 2 && s.panelWide()), children })
|
|
258
268
|
] });
|
|
259
269
|
const inline = links.length > 0 && links.length <= inlineUpTo && links.every((c) => React2.isValidElement(c) && c.type === NavBarMenuLink);
|
|
260
270
|
if (inline) {
|
|
@@ -262,7 +272,7 @@ function NavBarMenu({ label, active, columns = 1, inlineUpTo = 3, inlineFrom = "
|
|
|
262
272
|
inlineFrom !== "md" && dropdown(DROPDOWN_HIDE[inlineFrom]),
|
|
263
273
|
links.map((link) => {
|
|
264
274
|
const { title, href, active: here, asChild, children: child, icon: _icon, description: _description, className: linkClass, ...rest } = link.props;
|
|
265
|
-
return /* @__PURE__ */
|
|
275
|
+
return /* @__PURE__ */ jsx3(NavBarLink, { asChild, href: asChild ? void 0 : href, active: here, className: linkClass, itemClassName: INLINE_HIDE[inlineFrom], ...rest, children: asChild && React2.isValidElement(child) ? React2.cloneElement(child, void 0, title) : title }, link.key);
|
|
266
276
|
})
|
|
267
277
|
] });
|
|
268
278
|
}
|
|
@@ -270,16 +280,16 @@ function NavBarMenu({ label, active, columns = 1, inlineUpTo = 3, inlineFrom = "
|
|
|
270
280
|
}
|
|
271
281
|
function NavBarMenuLink({ title, description, icon, active, href, className, asChild, children, ...props }) {
|
|
272
282
|
const body = /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
273
|
-
icon && /* @__PURE__ */
|
|
283
|
+
icon && /* @__PURE__ */ jsx3("span", { className: s.menuIcon(), children: icon }),
|
|
274
284
|
/* @__PURE__ */ jsxs2("span", { className: "min-w-0 flex-1", children: [
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
description && /* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ jsx3("span", { className: s.menuTitle(), children: title }),
|
|
286
|
+
description && /* @__PURE__ */ jsx3("span", { className: s.menuText(), children: description })
|
|
277
287
|
] })
|
|
278
288
|
] });
|
|
279
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ jsx3(Nav.Link, { asChild, href: asChild ? void 0 : href, active, "aria-current": active ? "page" : void 0, "data-active": active ? "" : void 0, className: s.menuLink({ className }), ...props, children: asChild && React2.isValidElement(children) ? React2.cloneElement(children, void 0, body) : body });
|
|
280
290
|
}
|
|
281
291
|
function NavBarActions({ className, ...props }) {
|
|
282
|
-
return /* @__PURE__ */
|
|
292
|
+
return /* @__PURE__ */ jsx3("div", { className: s.actions({ className }), ...props });
|
|
283
293
|
}
|
|
284
294
|
function NavBarMobile({ openLabel, closeLabel, className, children, ...props }) {
|
|
285
295
|
const { label, open, setOpen, panelId } = useNavBar();
|
|
@@ -304,15 +314,15 @@ function NavBarMobile({ openLabel, closeLabel, className, children, ...props })
|
|
|
304
314
|
};
|
|
305
315
|
}, [open, setOpen, panelId]);
|
|
306
316
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
open && /* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ jsx3("button", { ref: toggle, type: "button", "aria-expanded": open, "aria-controls": panelId, "aria-label": open ? closeLabel : openLabel, onClick: () => setOpen(!open), className: s.toggle(), children: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: open ? /* @__PURE__ */ jsx3("path", { d: "M18 6 6 18M6 6l12 12" }) : /* @__PURE__ */ jsx3("path", { d: "M4 7h16M4 12h16M4 17h10" }) }) }),
|
|
318
|
+
open && /* @__PURE__ */ jsx3(
|
|
309
319
|
"nav",
|
|
310
320
|
{
|
|
311
321
|
id: panelId,
|
|
312
322
|
"aria-label": label,
|
|
313
323
|
className: s.mobile({ className }),
|
|
314
324
|
...props,
|
|
315
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ jsx3(
|
|
316
326
|
"div",
|
|
317
327
|
{
|
|
318
328
|
role: "presentation",
|
|
@@ -320,7 +330,7 @@ function NavBarMobile({ openLabel, closeLabel, className, children, ...props })
|
|
|
320
330
|
onClick: (e) => {
|
|
321
331
|
if (e.target.closest("a")) setOpen(false);
|
|
322
332
|
},
|
|
323
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ jsx3(MobileContext.Provider, { value: true, children })
|
|
324
334
|
}
|
|
325
335
|
)
|
|
326
336
|
}
|
|
@@ -330,13 +340,13 @@ function NavBarMobile({ openLabel, closeLabel, className, children, ...props })
|
|
|
330
340
|
function NavBarMobileGroup({ label, className, children, ...props }) {
|
|
331
341
|
const id = React2.useId();
|
|
332
342
|
return /* @__PURE__ */ jsxs2("div", { role: "group", "aria-labelledby": id, className: s.mobileGroup({ className }), ...props, children: [
|
|
333
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ jsx3("p", { id, className: s.mobileGroupTitle(), children: label }),
|
|
334
344
|
children
|
|
335
345
|
] });
|
|
336
346
|
}
|
|
337
347
|
function NavBarMobileLink({ active, asChild, className, ...props }) {
|
|
338
348
|
const Comp = asChild ? Slot.Root : "a";
|
|
339
|
-
return /* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ jsx3(Comp, { "aria-current": active ? "page" : void 0, className: s.mobileLink({ className }), ...props });
|
|
340
350
|
}
|
|
341
351
|
var tagTone = {
|
|
342
352
|
upcoming: "bg-accent-soft text-fg ring-1 ring-inset ring-accent/40",
|
|
@@ -347,8 +357,8 @@ var tagTone = {
|
|
|
347
357
|
function FamilyName({ site, current, labels }) {
|
|
348
358
|
return /* @__PURE__ */ jsxs2("span", { className: s.familyName(), children: [
|
|
349
359
|
site.name,
|
|
350
|
-
site.status !== "released" && /* @__PURE__ */
|
|
351
|
-
current && /* @__PURE__ */
|
|
360
|
+
site.status !== "released" && /* @__PURE__ */ jsx3("span", { className: cn(s.familyTag(), tagTone[site.status]), children: labels.status[site.status] }),
|
|
361
|
+
current && /* @__PURE__ */ jsx3("span", { className: cn(s.familyTag(), tagTone.current), children: labels.current })
|
|
352
362
|
] });
|
|
353
363
|
}
|
|
354
364
|
function NavBarFamily({ current, labels = familyLabels.en, defaultOpen, className }) {
|
|
@@ -357,12 +367,12 @@ function NavBarFamily({ current, labels = familyLabels.en, defaultOpen, classNam
|
|
|
357
367
|
const groups = sitesByGroup();
|
|
358
368
|
if (inMobile) {
|
|
359
369
|
return /* @__PURE__ */ jsxs2("div", { role: "group", "aria-labelledby": `${id}-family`, className: s.mobileFamily({ className }), children: [
|
|
360
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ jsx3("p", { id: `${id}-family`, className: s.familyGroupTitle(), children: labels.family }),
|
|
361
371
|
groups.map(({ group, sites }) => /* @__PURE__ */ jsxs2("div", { children: [
|
|
362
|
-
group !== "krizaka" && /* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
372
|
+
group !== "krizaka" && /* @__PURE__ */ jsx3("p", { id: `${id}-${group}`, className: s.familyGroupTitle(), children: labels.groups[group] }),
|
|
373
|
+
/* @__PURE__ */ jsx3("ul", { "aria-labelledby": group !== "krizaka" ? `${id}-${group}` : `${id}-family`, className: "grid gap-0.5", children: sites.map((site) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsxs2("a", { href: site.url, "data-current": site.id === current ? "" : void 0, "aria-current": site.id === current ? "true" : void 0, className: s.mobileFamilyLink(), children: [
|
|
374
|
+
/* @__PURE__ */ jsx3("span", { className: s.familyMark(), children: /* @__PURE__ */ jsx3(FamilyMark, { mark: site.mark, size: 24 }) }),
|
|
375
|
+
/* @__PURE__ */ jsx3(FamilyName, { site, current: site.id === current, labels })
|
|
366
376
|
] }) }, site.id)) })
|
|
367
377
|
] }, group))
|
|
368
378
|
] });
|
|
@@ -370,20 +380,20 @@ function NavBarFamily({ current, labels = familyLabels.en, defaultOpen, classNam
|
|
|
370
380
|
const noHover = (e) => e.preventDefault();
|
|
371
381
|
const columns = [groups.filter((g) => g.group === "krizaka" || g.group === "products"), groups.filter((g) => g.group === "open-source" || g.group === "github")];
|
|
372
382
|
return /* @__PURE__ */ jsxs2(Nav.Root, { "aria-label": labels.family, defaultValue: defaultOpen ? "family" : void 0, className: s.family({ className }), children: [
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ jsx3(Nav.List, { className: "flex", children: /* @__PURE__ */ jsxs2(Nav.Item, { value: "family", children: [
|
|
384
|
+
/* @__PURE__ */ jsx3(Nav.Trigger, { "aria-label": labels.family, onPointerMove: noHover, onPointerLeave: noHover, className: s.familyTrigger(), children: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", className: s.chevron(), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx3("path", { d: "m6 9 6 6 6-6" }) }) }),
|
|
385
|
+
/* @__PURE__ */ jsx3(Nav.Content, { onPointerLeave: noHover, className: s.familyPanel(), children: columns.map((column, i) => /* @__PURE__ */ jsx3("div", { className: "grid content-start gap-3", children: column.map(({ group, sites }) => /* @__PURE__ */ jsxs2("div", { children: [
|
|
386
|
+
/* @__PURE__ */ jsx3("p", { id: `${id}-${group}`, className: s.familyGroupTitle(), children: labels.groups[group] }),
|
|
387
|
+
/* @__PURE__ */ jsx3("ul", { "aria-labelledby": `${id}-${group}`, className: "grid gap-0.5", children: sites.map((site) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsxs2(Nav.Link, { href: site.url, "data-current": site.id === current ? "" : void 0, "aria-current": site.id === current ? "true" : void 0, className: s.familyLink(), children: [
|
|
388
|
+
/* @__PURE__ */ jsx3("span", { className: s.familyMark(), children: /* @__PURE__ */ jsx3(FamilyMark, { mark: site.mark, size: 28 }) }),
|
|
379
389
|
/* @__PURE__ */ jsxs2("span", { className: "min-w-0", children: [
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ jsx3(FamilyName, { site, current: site.id === current, labels }),
|
|
391
|
+
/* @__PURE__ */ jsx3("span", { className: s.familyText(), children: labels.descriptions[site.id] })
|
|
382
392
|
] })
|
|
383
393
|
] }) }, site.id)) })
|
|
384
394
|
] }, group)) }, i)) })
|
|
385
395
|
] }) }),
|
|
386
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ jsx3(Nav.Viewport, { onPointerLeave: noHover, className: s.familyViewport() })
|
|
387
397
|
] });
|
|
388
398
|
}
|
|
389
399
|
function NavBarBadge({ env, version, className, children, ...props }) {
|
|
@@ -395,17 +405,17 @@ function NavBarBadge({ env, version, className, children, ...props }) {
|
|
|
395
405
|
}
|
|
396
406
|
function NavBarLanguage(props) {
|
|
397
407
|
const inMobile = React2.useContext(MobileContext);
|
|
398
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ jsx3(LanguageSwitch, { variant: inMobile ? "inline" : "menu", ...props });
|
|
399
409
|
}
|
|
400
410
|
function NavBarMobilePreferences({ label, className, children, ...props }) {
|
|
401
411
|
const id = React2.useId();
|
|
402
412
|
return /* @__PURE__ */ jsxs2("div", { role: "group", "aria-labelledby": id, className: s.mobileGroup({ className }), ...props, children: [
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ jsx3("p", { id, className: s.mobileGroupTitle(), children: label }),
|
|
414
|
+
/* @__PURE__ */ jsx3("div", { className: "flex flex-wrap items-center gap-2 px-3 py-1", children })
|
|
405
415
|
] });
|
|
406
416
|
}
|
|
407
417
|
function NavBarRepo({ label, className, ...props }) {
|
|
408
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ jsx3("a", { "aria-label": label, className: s.repo({ className }), ...props, children: /* @__PURE__ */ jsx3(GitHubGlyph, { size: 18 }) });
|
|
409
419
|
}
|
|
410
420
|
var NavBar = {
|
|
411
421
|
Root: NavBarRoot,
|
|
@@ -427,7 +437,7 @@ var NavBar = {
|
|
|
427
437
|
};
|
|
428
438
|
|
|
429
439
|
// src/nav-bar/product-actions.tsx
|
|
430
|
-
import { Fragment as Fragment3, jsx as
|
|
440
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
431
441
|
var ProductBarAction = { SignIn: "sign-in", Try: "try" };
|
|
432
442
|
function productBarActions({ signupOpen, hasTry }) {
|
|
433
443
|
return signupOpen && hasTry ? { primary: ProductBarAction.Try, secondary: ProductBarAction.SignIn } : { primary: ProductBarAction.SignIn, secondary: null };
|
|
@@ -436,7 +446,7 @@ function ProductBarActions({ signIn, tryIt, signupOpen, linkAs: Link = "a", plac
|
|
|
436
446
|
const { primary, secondary } = productBarActions({ signupOpen, hasTry: Boolean(tryIt) });
|
|
437
447
|
const link = (kind) => kind === ProductBarAction.Try && tryIt ? tryIt : signIn;
|
|
438
448
|
const panel = placement === "panel";
|
|
439
|
-
const button = (kind, variant) => /* @__PURE__ */
|
|
449
|
+
const button = (kind, variant) => /* @__PURE__ */ jsx4(Button, { asChild: true, "data-signed-out-only": "", variant, size: panel ? "md" : "sm", className: panel ? variant === "primary" ? "mt-2 w-full font-bold" : "w-full" : variant === "primary" ? "ml-1 hidden font-bold md:inline-flex" : "hidden md:inline-flex", children: /* @__PURE__ */ jsx4(Link, { href: link(kind).href, children: link(kind).label }) }, kind);
|
|
440
450
|
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
441
451
|
secondary ? button(secondary, "ghost") : null,
|
|
442
452
|
button(primary, "primary")
|