@krizaka/ui 4.7.1 → 4.8.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/button/text-link.d.ts +8 -0
- package/dist/button/text-link.js +6 -0
- package/dist/button/text-link.js.map +1 -0
- package/dist/platform-bar.d.ts +102 -0
- package/dist/platform-bar.js +42 -0
- package/dist/platform-bar.js.map +1 -0
- package/dist/site-cahier.d.ts +5 -2
- package/dist/site-cahier.js +14 -0
- package/dist/site-cahier.js.map +1 -1
- package/dist/site-footer.d.ts +18 -3
- package/dist/site-footer.js +14 -0
- package/dist/site-footer.js.map +1 -1
- package/package.json +27 -7
- 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 +2 -2
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/architecture-diagram.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 +5 -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/columns.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/platform-bar/demo.d.ts +4 -0
- package/registry/examples/platform-bar/demo.js +24 -0
- package/registry/examples/platform-bar/demo.tsx +20 -0
- package/registry/examples/platform-bar/live.d.ts +4 -0
- package/registry/examples/platform-bar/live.js +22 -0
- package/registry/examples/platform-bar/live.tsx +22 -0
- package/registry/examples/site-footer/hosted.d.ts +4 -0
- package/registry/examples/site-footer/hosted.js +25 -0
- package/registry/examples/site-footer/hosted.tsx +23 -0
- 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 +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +39 -8
- 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 +2 -2
- 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/platform-bar.json +179 -0
- 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 +1 -1
- package/registry/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- 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 +49 -12
- package/registry/sites.json +1 -1
- 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/README.md
CHANGED
|
@@ -169,6 +169,7 @@ light or a product's — is a set of tokens.
|
|
|
169
169
|
| `@krizaka/ui/scroll-stage` | `ScrollStage` (`variant`, `threshold`, `as`) and `Scene` (`brand`, `as`): chapters played once as they scroll in, one loop each while on screen — the storytelling kit, styles in `@krizaka/ui/story.css` | client |
|
|
170
170
|
| `@krizaka/ui/choice-grid` | `ChoiceGrid` (`items` with `badge`/`eyebrow`/`extra`/`meta`/`href`, `label`, `tag`, `caption`, `prompt`, `value`/`defaultValue`/`onValueChange`, `linkAs`, `columns`, `variant`, `brand`): choices as tiles — a radio group when selectable, links with `href` | client |
|
|
171
171
|
| `@krizaka/ui/profile-card` | `ProfileCard` (`visual`, `name`, `statLabel`/`value`/`figure`, `stats`, `caption`, `variant`, `brand`): a profile at a glance; `StatGauge` (`label`, `value`, `max`, `valueText`, `figure`): one measured strength; native too | server |
|
|
172
|
+
| `@krizaka/ui/platform-bar` | `PlatformBar` (`label`, `brand`, `notice`, `end`: the platform's strip above a hosted page — static, no client code; pair with `SiteFooter variant="hosted"`) | server |
|
|
172
173
|
| `@krizaka/ui/stage-banner` | `StageBanner` (`stage`, `name`, `size="lg"` with `title`/`subtitle`, `variant`) | server |
|
|
173
174
|
| `@krizaka/ui/goal-gauge` | `GoalGauge` (`label`, `segments`, `value`, `mode` fill · drain, `variant`): a goal in steps, a meter; native too | server |
|
|
174
175
|
| `@krizaka/ui/promise-card` | `PromiseCard` (`label`, `promise`, `keys`, `bearer`, `bearerLabel`, `bearerName`, `variant`): a promise, the keys that call it, who carries it | server |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The look of a link in a sentence or an end line (“Read more”, “Back to the blog”), not of a button: the accent colour,
|
|
3
|
+
* underlined on hover and focus, no box. Put it in the `className` of an `<a>` or a router link; use `buttonVariants`
|
|
4
|
+
* when the action must read as a button.
|
|
5
|
+
*/
|
|
6
|
+
declare const textLinkClass = "text-fg-accent underline-offset-4 hover:underline focus-visible:underline focus-visible:outline-2 focus-visible:outline-ring";
|
|
7
|
+
|
|
8
|
+
export { textLinkClass };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/button/text-link.ts"],"sourcesContent":["// @krizaka/ui/button/text-link — the discreet link, SERVER-SAFE, no React. A string, in its own entry so the button's does not grow.\n/**\n * The look of a link in a sentence or an end line (“Read more”, “Back to the blog”), not of a button: the accent colour,\n * underlined on hover and focus, no box. Put it in the `className` of an `<a>` or a router link; use `buttonVariants`\n * when the action must read as a button.\n */\nexport const textLinkClass = \"text-fg-accent underline-offset-4 hover:underline focus-visible:underline focus-visible:outline-2 focus-visible:outline-ring\";\n"],"mappings":";AAMO,IAAM,gBAAgB;","names":[]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const platformBar: tailwind_variants.TVReturnType<{
|
|
5
|
+
[key: string]: {
|
|
6
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
7
|
+
root?: tailwind_variants.ClassValue;
|
|
8
|
+
inner?: tailwind_variants.ClassValue;
|
|
9
|
+
brand?: tailwind_variants.ClassValue;
|
|
10
|
+
notice?: tailwind_variants.ClassValue;
|
|
11
|
+
dot?: tailwind_variants.ClassValue;
|
|
12
|
+
text?: tailwind_variants.ClassValue;
|
|
13
|
+
title?: tailwind_variants.ClassValue;
|
|
14
|
+
link?: tailwind_variants.ClassValue;
|
|
15
|
+
end?: tailwind_variants.ClassValue;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
[x: string]: {
|
|
20
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
21
|
+
root?: tailwind_variants.ClassValue;
|
|
22
|
+
inner?: tailwind_variants.ClassValue;
|
|
23
|
+
brand?: tailwind_variants.ClassValue;
|
|
24
|
+
notice?: tailwind_variants.ClassValue;
|
|
25
|
+
dot?: tailwind_variants.ClassValue;
|
|
26
|
+
text?: tailwind_variants.ClassValue;
|
|
27
|
+
title?: tailwind_variants.ClassValue;
|
|
28
|
+
link?: tailwind_variants.ClassValue;
|
|
29
|
+
end?: tailwind_variants.ClassValue;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
} | {}, {
|
|
33
|
+
root: string;
|
|
34
|
+
inner: string;
|
|
35
|
+
brand: string;
|
|
36
|
+
notice: string;
|
|
37
|
+
dot: string;
|
|
38
|
+
text: string;
|
|
39
|
+
title: string;
|
|
40
|
+
link: string;
|
|
41
|
+
end: string;
|
|
42
|
+
}, undefined, {
|
|
43
|
+
[key: string]: {
|
|
44
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
45
|
+
root?: tailwind_variants.ClassValue;
|
|
46
|
+
inner?: tailwind_variants.ClassValue;
|
|
47
|
+
brand?: tailwind_variants.ClassValue;
|
|
48
|
+
notice?: tailwind_variants.ClassValue;
|
|
49
|
+
dot?: tailwind_variants.ClassValue;
|
|
50
|
+
text?: tailwind_variants.ClassValue;
|
|
51
|
+
title?: tailwind_variants.ClassValue;
|
|
52
|
+
link?: tailwind_variants.ClassValue;
|
|
53
|
+
end?: tailwind_variants.ClassValue;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
} | {}, {
|
|
57
|
+
root: string;
|
|
58
|
+
inner: string;
|
|
59
|
+
brand: string;
|
|
60
|
+
notice: string;
|
|
61
|
+
dot: string;
|
|
62
|
+
text: string;
|
|
63
|
+
title: string;
|
|
64
|
+
link: string;
|
|
65
|
+
end: string;
|
|
66
|
+
}, tailwind_variants.TVReturnTypeLike<unknown, {
|
|
67
|
+
root: string;
|
|
68
|
+
inner: string;
|
|
69
|
+
brand: string;
|
|
70
|
+
notice: string;
|
|
71
|
+
dot: string;
|
|
72
|
+
text: string;
|
|
73
|
+
title: string;
|
|
74
|
+
link: string;
|
|
75
|
+
end: string;
|
|
76
|
+
}>>;
|
|
77
|
+
type PlatformBarNotice = {
|
|
78
|
+
/** The short headline (« Boutique de démonstration »). Passed translated. */
|
|
79
|
+
title?: string;
|
|
80
|
+
/** The line (« Les données sont fictives. Aucune réservation n'est réelle. »). Passed translated. */
|
|
81
|
+
message: string;
|
|
82
|
+
/** A way to learn more; it is the only link the notice can carry. */
|
|
83
|
+
link?: {
|
|
84
|
+
label: string;
|
|
85
|
+
href: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
type PlatformBarProps = Omit<React.ComponentProps<"section">, "children" | "title"> & {
|
|
89
|
+
/** The platform's name, the region's accessible name (« Folioviv »). Passed translated. */
|
|
90
|
+
label: string;
|
|
91
|
+
/** The platform's mark and name, usually one link home. */
|
|
92
|
+
brand: React.ReactNode;
|
|
93
|
+
/** The one line for what this page is (a development version, a demonstration). Omit it on a real, live page. */
|
|
94
|
+
notice?: PlatformBarNotice;
|
|
95
|
+
/** The host's control at the end: `LanguageSwitch` of `@krizaka/ui/language-switch`. */
|
|
96
|
+
end?: React.ReactNode;
|
|
97
|
+
};
|
|
98
|
+
/** The platform's bar above a hosted page: its mark, one line about the page, the language switch. Not sticky, no client JS. */
|
|
99
|
+
declare function PlatformBar({ label, brand, notice, end, className, ...props }: Readonly<PlatformBarProps>): React.JSX.Element;
|
|
100
|
+
|
|
101
|
+
export { PlatformBar, platformBar };
|
|
102
|
+
export type { PlatformBarNotice, PlatformBarProps };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/platform-bar/platform-bar.tsx
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var platformBar = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "w-full border-b border-border-subtle bg-surface-1 text-fg",
|
|
7
|
+
inner: "mx-auto flex min-h-12 w-full max-w-[calc(var(--kz-page-max,72rem)_+_2*var(--kz-page-gutter,clamp(16px,3.2vw,32px)))] flex-wrap items-center gap-x-4 gap-y-1 px-[var(--kz-page-gutter,clamp(16px,3.2vw,32px))] py-1.5",
|
|
8
|
+
brand: "order-1 flex min-h-6 min-w-0 items-center gap-2 text-sm font-semibold text-fg",
|
|
9
|
+
notice: "order-3 flex min-w-0 basis-full items-start gap-2 pb-1 text-xs leading-snug sm:order-2 sm:basis-0 sm:flex-1 sm:items-center sm:pb-0",
|
|
10
|
+
dot: "mt-1 size-2 shrink-0 rounded-full bg-warning sm:mt-0",
|
|
11
|
+
text: "min-w-0 text-fg-secondary",
|
|
12
|
+
title: "font-semibold text-fg",
|
|
13
|
+
link: "font-semibold text-fg-accent underline-offset-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring rounded-sm",
|
|
14
|
+
end: "order-2 ml-auto flex items-center gap-2 sm:order-3"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
function PlatformBar({ label, brand, notice, end, className, ...props }) {
|
|
18
|
+
const s = platformBar();
|
|
19
|
+
return /* @__PURE__ */ jsx("section", { "aria-label": label, className: s.root({ className }), ...props, children: /* @__PURE__ */ jsxs("div", { className: s.inner(), children: [
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: s.brand(), children: brand }),
|
|
21
|
+
notice && /* @__PURE__ */ jsxs("p", { className: s.notice(), children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: s.dot() }),
|
|
23
|
+
/* @__PURE__ */ jsxs("span", { className: s.text(), children: [
|
|
24
|
+
notice.title && /* @__PURE__ */ jsxs("span", { className: s.title(), children: [
|
|
25
|
+
notice.title,
|
|
26
|
+
" "
|
|
27
|
+
] }),
|
|
28
|
+
notice.message,
|
|
29
|
+
notice.link && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
+
" ",
|
|
31
|
+
/* @__PURE__ */ jsx("a", { href: notice.link.href, className: s.link(), children: notice.link.label })
|
|
32
|
+
] })
|
|
33
|
+
] })
|
|
34
|
+
] }),
|
|
35
|
+
end && /* @__PURE__ */ jsx("div", { className: s.end(), children: end })
|
|
36
|
+
] }) });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
PlatformBar,
|
|
40
|
+
platformBar
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=platform-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/platform-bar/platform-bar.tsx"],"sourcesContent":["// Server-safe, no hook and no client code. The strip above a page that a platform hosts for its customer (a shop on\n// Folioviv, a shared Verikora report): the platform's mark on the left, the host's controls (the language switch) on the\n// right, and — when given — one line that says what this page is (a development version, a demonstration). It is the\n// dev band and the demo line merged into one bar. Static: it scrolls away with the page and never covers its header.\n// It draws only what it is given: no navigation, no « sign in ».\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const platformBar = tv({\n slots: {\n root: \"w-full border-b border-border-subtle bg-surface-1 text-fg\",\n inner:\n \"mx-auto flex min-h-12 w-full max-w-[calc(var(--kz-page-max,72rem)_+_2*var(--kz-page-gutter,clamp(16px,3.2vw,32px)))] flex-wrap items-center gap-x-4 gap-y-1 px-[var(--kz-page-gutter,clamp(16px,3.2vw,32px))] py-1.5\",\n brand: \"order-1 flex min-h-6 min-w-0 items-center gap-2 text-sm font-semibold text-fg\",\n notice: \"order-3 flex min-w-0 basis-full items-start gap-2 pb-1 text-xs leading-snug sm:order-2 sm:basis-0 sm:flex-1 sm:items-center sm:pb-0\",\n dot: \"mt-1 size-2 shrink-0 rounded-full bg-warning sm:mt-0\",\n text: \"min-w-0 text-fg-secondary\",\n title: \"font-semibold text-fg\",\n link: \"font-semibold text-fg-accent underline-offset-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring rounded-sm\",\n end: \"order-2 ml-auto flex items-center gap-2 sm:order-3\",\n },\n});\n\nexport type PlatformBarNotice = {\n /** The short headline (« Boutique de démonstration »). Passed translated. */\n title?: string;\n /** The line (« Les données sont fictives. Aucune réservation n'est réelle. »). Passed translated. */\n message: string;\n /** A way to learn more; it is the only link the notice can carry. */\n link?: { label: string; href: string };\n};\n\nexport type PlatformBarProps = Omit<React.ComponentProps<\"section\">, \"children\" | \"title\"> & {\n /** The platform's name, the region's accessible name (« Folioviv »). Passed translated. */\n label: string;\n /** The platform's mark and name, usually one link home. */\n brand: React.ReactNode;\n /** The one line for what this page is (a development version, a demonstration). Omit it on a real, live page. */\n notice?: PlatformBarNotice;\n /** The host's control at the end: `LanguageSwitch` of `@krizaka/ui/language-switch`. */\n end?: React.ReactNode;\n};\n\n/** The platform's bar above a hosted page: its mark, one line about the page, the language switch. Not sticky, no client JS. */\nexport function PlatformBar({ label, brand, notice, end, className, ...props }: Readonly<PlatformBarProps>) {\n const s = platformBar();\n return (\n <section aria-label={label} className={s.root({ className })} {...props}>\n <div className={s.inner()}>\n <div className={s.brand()}>{brand}</div>\n {notice && (\n <p className={s.notice()}>\n <span aria-hidden className={s.dot()} />\n <span className={s.text()}>\n {notice.title && <span className={s.title()}>{notice.title} </span>}\n {notice.message}\n {notice.link && (\n <>\n {\" \"}\n <a href={notice.link.href} className={s.link()}>\n {notice.link.label}\n </a>\n </>\n )}\n </span>\n </p>\n )}\n {end && <div className={s.end()}>{end}</div>}\n </div>\n </section>\n );\n}\n"],"mappings":";AAMA,SAAS,UAAU;AA2CX,SAQQ,UARR,KAKuB,YALvB;AAzCD,IAAM,cAAc,GAAG;AAAA,EAC5B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OACE;AAAA,IACF,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,EACP;AACF,CAAC;AAuBM,SAAS,YAAY,EAAE,OAAO,OAAO,QAAQ,KAAK,WAAW,GAAG,MAAM,GAA+B;AAC1G,QAAM,IAAI,YAAY;AACtB,SACE,oBAAC,aAAQ,cAAY,OAAO,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAChE,+BAAC,SAAI,WAAW,EAAE,MAAM,GACtB;AAAA,wBAAC,SAAI,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,IACjC,UACC,qBAAC,OAAE,WAAW,EAAE,OAAO,GACrB;AAAA,0BAAC,UAAK,eAAW,MAAC,WAAW,EAAE,IAAI,GAAG;AAAA,MACtC,qBAAC,UAAK,WAAW,EAAE,KAAK,GACrB;AAAA,eAAO,SAAS,qBAAC,UAAK,WAAW,EAAE,MAAM,GAAI;AAAA,iBAAO;AAAA,UAAM;AAAA,WAAC;AAAA,QAC3D,OAAO;AAAA,QACP,OAAO,QACN,iCACG;AAAA;AAAA,UACD,oBAAC,OAAE,MAAM,OAAO,KAAK,MAAM,WAAW,EAAE,KAAK,GAC1C,iBAAO,KAAK,OACf;AAAA,WACF;AAAA,SAEJ;AAAA,OACF;AAAA,IAED,OAAO,oBAAC,SAAI,WAAW,EAAE,IAAI,GAAI,eAAI;AAAA,KACxC,GACF;AAEJ;","names":[]}
|
package/dist/site-cahier.d.ts
CHANGED
|
@@ -201,14 +201,17 @@ type SiteFooterProps = Omit<React.ComponentProps<"footer">, "children"> & {
|
|
|
201
201
|
org?: OrgFacts;
|
|
202
202
|
/** The legal links, when not the org's (`SiteFooter.Link`s). */
|
|
203
203
|
legal?: React.ReactNode;
|
|
204
|
+
/** `variant="hosted"`: the platform's signature at the end of the line (« Page faite avec Folioviv · Comment cette page est faite »), as `SiteFooter.Link`s. Passed translated. */
|
|
205
|
+
madeWith?: React.ReactNode;
|
|
204
206
|
/** The host's controls at the end of the last line: the language switch, the theme toggle. */
|
|
205
207
|
controls?: React.ReactNode;
|
|
206
208
|
/**
|
|
207
209
|
* `site` — every public site. `docs` — the same under documentation, on its width. `app` — inside a signed-in product:
|
|
208
|
-
* the last line only; render it once, in the layout.
|
|
210
|
+
* the last line only; render it once, in the layout. `hosted` — the footer of a page a platform hosts for its customer
|
|
211
|
+
* (a shop on Folioviv): one line, the customer's `legal` links then `madeWith`; no family, no signature, no version.
|
|
209
212
|
* @default "site"
|
|
210
213
|
*/
|
|
211
|
-
variant?: "site" | "docs" | "app";
|
|
214
|
+
variant?: "site" | "docs" | "app" | "hosted";
|
|
212
215
|
/** `cahier` on the Cahier sites (www, blog, ui., java., ts., lab.), `product` in the products. @default "product" */
|
|
213
216
|
tone?: Tone;
|
|
214
217
|
/**
|
package/dist/site-cahier.js
CHANGED
|
@@ -454,6 +454,8 @@ var siteFooter = tv({
|
|
|
454
454
|
version: "rounded-sm border border-border-subtle bg-surface-2 px-2 py-0.5 font-mono text-[11px] text-fg-secondary",
|
|
455
455
|
legal: "flex flex-wrap items-center gap-x-4 gap-y-2",
|
|
456
456
|
controls: "flex flex-wrap items-center gap-2 sm:ml-auto",
|
|
457
|
+
// `hosted`: « made with … » at the end of the one line (after the shop's legal links, before the controls).
|
|
458
|
+
made: "flex flex-wrap items-center gap-x-3 gap-y-1 sm:ml-auto",
|
|
457
459
|
// `config`: real columns — two on a phone, side by side from `sm`, each a heading over a stacked list.
|
|
458
460
|
columns: "grid min-w-0 grid-cols-2 gap-x-6 gap-y-6 pb-2 sm:grid-flow-col sm:grid-cols-none sm:auto-cols-[minmax(0,13rem)] sm:gap-x-10",
|
|
459
461
|
stack: "flex min-w-0 flex-col gap-2",
|
|
@@ -473,6 +475,10 @@ var siteFooter = tv({
|
|
|
473
475
|
app: {
|
|
474
476
|
root: "bg-transparent",
|
|
475
477
|
inner: "py-3"
|
|
478
|
+
},
|
|
479
|
+
// `hosted`: one line for a page a platform hosts for its customer — the customer's legal links, the platform's signature.
|
|
480
|
+
hosted: {
|
|
481
|
+
inner: "py-4"
|
|
476
482
|
}
|
|
477
483
|
},
|
|
478
484
|
// `product`: the products' plain Krizaka UI. `cahier`: the Cahier sites (www, blog, ui., java., ts., lab.) — the
|
|
@@ -516,6 +522,7 @@ function SiteFooter({
|
|
|
516
522
|
path,
|
|
517
523
|
legal: legalProp,
|
|
518
524
|
controls,
|
|
525
|
+
madeWith,
|
|
519
526
|
org,
|
|
520
527
|
family: familyProp,
|
|
521
528
|
products,
|
|
@@ -529,6 +536,13 @@ function SiteFooter({
|
|
|
529
536
|
}) {
|
|
530
537
|
const id = React.useId();
|
|
531
538
|
const s = siteFooter({ variant, tone });
|
|
539
|
+
if (variant === "hosted") {
|
|
540
|
+
return /* @__PURE__ */ jsx9(ToneContext.Provider, { value: tone, children: /* @__PURE__ */ jsx9("footer", { className: s.root({ className }), ...props, children: /* @__PURE__ */ jsx9("div", { className: s.inner(), children: /* @__PURE__ */ jsxs7("div", { className: s.bottom(), children: [
|
|
541
|
+
legalProp && /* @__PURE__ */ jsx9("div", { className: s.legal(), children: legalProp }),
|
|
542
|
+
madeWith && /* @__PURE__ */ jsx9("p", { className: s.made(), children: madeWith }),
|
|
543
|
+
controls && /* @__PURE__ */ jsx9("div", { className: s.controls(), children: controls })
|
|
544
|
+
] }) }) }) });
|
|
545
|
+
}
|
|
532
546
|
const slim = variant === "app";
|
|
533
547
|
const family = !slim && (familyProp ?? (current === "krizaka" && !config));
|
|
534
548
|
const site2 = siteById(current);
|