@krizaka/ui 2.5.0 → 2.6.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 +44 -1
- package/dist/action-bar.d.ts +38 -0
- package/dist/action-bar.js +52 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/argument-card.d.ts +67 -0
- package/dist/argument-card.js +69 -0
- package/dist/argument-card.js.map +1 -0
- package/dist/audio-player.js +1 -1
- package/dist/block-link-BAg4eoZk.d.ts +12 -0
- package/dist/blocks.css +529 -0
- package/dist/button.js +5 -94
- package/dist/button.js.map +1 -1
- package/dist/card-grid.d.ts +42 -0
- package/dist/card-grid.js +47 -0
- package/dist/card-grid.js.map +1 -0
- package/dist/chunk-2AGSO3WH.js +20 -0
- package/dist/chunk-2AGSO3WH.js.map +1 -0
- package/dist/chunk-AB5D3KBG.js +37 -0
- package/dist/chunk-AB5D3KBG.js.map +1 -0
- package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
- package/dist/chunk-CPA5CF35.js.map +1 -0
- package/dist/chunk-K3SWZXYT.js +92 -0
- package/dist/chunk-K3SWZXYT.js.map +1 -0
- package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
- package/dist/chunk-XCBVFMNV.js +41 -0
- package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
- package/dist/chunk-XVLWVTQA.js +28 -0
- package/dist/chunk-XVLWVTQA.js.map +1 -0
- package/dist/chunk-Z6FUPB3Q.js +102 -0
- package/dist/chunk-Z6FUPB3Q.js.map +1 -0
- package/dist/code-block.d.ts +42 -0
- package/dist/code-block.js +202 -0
- package/dist/code-block.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/cta-panel.d.ts +23 -0
- package/dist/cta-panel.js +20 -0
- package/dist/cta-panel.js.map +1 -0
- package/dist/data-table.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/decision-list.d.ts +34 -0
- package/dist/decision-list.js +67 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/file-upload.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/link-card.d.ts +35 -0
- package/dist/link-card.js +46 -0
- package/dist/link-card.js.map +1 -0
- package/dist/mascot-quote.d.ts +42 -0
- package/dist/mascot-quote.js +267 -0
- package/dist/mascot-quote.js.map +1 -0
- package/dist/media-capture.js +1 -1
- package/dist/motion.css +25 -1
- package/dist/page-hero.d.ts +44 -0
- package/dist/page-hero.js +41 -0
- package/dist/page-hero.js.map +1 -0
- package/dist/page.d.ts +116 -0
- package/dist/page.js +17 -0
- package/dist/page.js.map +1 -0
- package/dist/pagination.js +25 -44
- package/dist/pagination.js.map +1 -1
- package/dist/pointer-light.d.ts +20 -0
- package/dist/pointer-light.js +12 -0
- package/dist/pointer-light.js.map +1 -0
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.js +4 -22
- package/dist/section-backdrop.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/terminal-replay.d.ts +68 -0
- package/dist/terminal-replay.js +231 -0
- package/dist/terminal-replay.js.map +1 -0
- package/dist/toc.d.ts +23 -0
- package/dist/toc.js +39 -0
- package/dist/toc.js.map +1 -0
- package/dist/video-player.js +1 -1
- package/package.json +192 -7
- package/registry/action-bar.json +205 -0
- package/registry/alert.json +1 -1
- package/registry/argument-card.json +327 -0
- package/registry/audio-player.json +2 -2
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +221 -0
- package/registry/card.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/code-block.json +262 -0
- package/registry/combobox.json +2 -2
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +3 -3
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +154 -0
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +144 -0
- package/registry/dialog.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/action-bar/buttons.d.ts +4 -0
- package/registry/examples/action-bar/buttons.js +22 -0
- package/registry/examples/action-bar/buttons.tsx +17 -0
- package/registry/examples/action-bar/icons.d.ts +4 -0
- package/registry/examples/action-bar/icons.js +24 -0
- package/registry/examples/action-bar/icons.tsx +23 -0
- package/registry/examples/argument-card/building-block.d.ts +4 -0
- package/registry/examples/argument-card/building-block.js +29 -0
- package/registry/examples/argument-card/building-block.tsx +29 -0
- package/registry/examples/argument-card/grid.d.ts +4 -0
- package/registry/examples/argument-card/grid.js +17 -0
- package/registry/examples/argument-card/grid.tsx +19 -0
- package/registry/examples/argument-card/unfold.d.ts +4 -0
- package/registry/examples/argument-card/unfold.js +26 -0
- package/registry/examples/argument-card/unfold.tsx +21 -0
- package/registry/examples/card-grid/products.d.ts +4 -0
- package/registry/examples/card-grid/products.js +16 -0
- package/registry/examples/card-grid/products.tsx +13 -0
- package/registry/examples/card-grid/reveal.d.ts +4 -0
- package/registry/examples/card-grid/reveal.js +13 -0
- package/registry/examples/card-grid/reveal.tsx +16 -0
- package/registry/examples/code-block/build-tools.d.ts +4 -0
- package/registry/examples/code-block/build-tools.js +30 -0
- package/registry/examples/code-block/build-tools.tsx +25 -0
- package/registry/examples/code-block/file.d.ts +4 -0
- package/registry/examples/code-block/file.js +17 -0
- package/registry/examples/code-block/file.tsx +13 -0
- package/registry/examples/cta-panel/discuss.d.ts +4 -0
- package/registry/examples/cta-panel/discuss.js +31 -0
- package/registry/examples/cta-panel/discuss.tsx +23 -0
- package/registry/examples/decision-list/product.d.ts +4 -0
- package/registry/examples/decision-list/product.js +35 -0
- package/registry/examples/decision-list/product.tsx +30 -0
- package/registry/examples/link-card/docs-hub.d.ts +4 -0
- package/registry/examples/link-card/docs-hub.js +18 -0
- package/registry/examples/link-card/docs-hub.tsx +20 -0
- package/registry/examples/link-card/external.d.ts +4 -0
- package/registry/examples/link-card/external.js +22 -0
- package/registry/examples/link-card/external.tsx +16 -0
- package/registry/examples/link-card/stack.d.ts +4 -0
- package/registry/examples/link-card/stack.js +26 -0
- package/registry/examples/link-card/stack.tsx +21 -0
- package/registry/examples/mascot-quote/callout.d.ts +4 -0
- package/registry/examples/mascot-quote/callout.js +11 -0
- package/registry/examples/mascot-quote/callout.tsx +10 -0
- package/registry/examples/mascot-quote/inline.d.ts +4 -0
- package/registry/examples/mascot-quote/inline.js +11 -0
- package/registry/examples/mascot-quote/inline.tsx +10 -0
- package/registry/examples/page/backdrop.d.ts +4 -0
- package/registry/examples/page/backdrop.js +23 -0
- package/registry/examples/page/backdrop.tsx +18 -0
- package/registry/examples/page/facts.d.ts +4 -0
- package/registry/examples/page/facts.js +24 -0
- package/registry/examples/page/facts.tsx +21 -0
- package/registry/examples/page/frame.d.ts +4 -0
- package/registry/examples/page/frame.js +15 -0
- package/registry/examples/page/frame.tsx +17 -0
- package/registry/examples/page/sections.d.ts +4 -0
- package/registry/examples/page/sections.js +14 -0
- package/registry/examples/page/sections.tsx +15 -0
- package/registry/examples/page-hero/building-block.d.ts +4 -0
- package/registry/examples/page-hero/building-block.js +24 -0
- package/registry/examples/page-hero/building-block.tsx +20 -0
- package/registry/examples/page-hero/hub.d.ts +4 -0
- package/registry/examples/page-hero/hub.js +21 -0
- package/registry/examples/page-hero/hub.tsx +15 -0
- package/registry/examples/pointer-light/list.d.ts +4 -0
- package/registry/examples/pointer-light/list.js +16 -0
- package/registry/examples/pointer-light/list.tsx +14 -0
- package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
- package/registry/examples/terminal-replay/at-rest.js +32 -0
- package/registry/examples/terminal-replay/at-rest.tsx +26 -0
- package/registry/examples/terminal-replay/session.d.ts +4 -0
- package/registry/examples/terminal-replay/session.js +34 -0
- package/registry/examples/terminal-replay/session.tsx +28 -0
- package/registry/examples/toc/reading-page.d.ts +4 -0
- package/registry/examples/toc/reading-page.js +21 -0
- package/registry/examples/toc/reading-page.tsx +21 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +2 -2
- package/registry/glow-card.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +241 -1
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/link-card.json +279 -0
- package/registry/loader.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +191 -0
- package/registry/mascots.json +1 -1
- package/registry/media-capture.json +4 -4
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +254 -0
- package/registry/page.json +497 -0
- package/registry/pagination.json +2 -2
- package/registry/pointer-light.json +119 -0
- package/registry/popover.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/search-field.json +2 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +3 -3
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +317 -0
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +157 -0
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +4 -4
- package/registry/video-trimmer.json +3 -3
- /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
4
|
+
/** The code, as it is copied. */
|
|
5
|
+
code: string;
|
|
6
|
+
/** Its language, shown as a tag and used by the highlighter: `xml`, `kotlin`, `ts`, `bash`, `yaml`… */
|
|
7
|
+
language?: string;
|
|
8
|
+
/** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */
|
|
9
|
+
file?: React.ReactNode;
|
|
10
|
+
/** The copy button's words. */
|
|
11
|
+
copyLabel: string;
|
|
12
|
+
/** What the button says once the code is copied (announced politely). */
|
|
13
|
+
copiedLabel: string;
|
|
14
|
+
/**
|
|
15
|
+
* Colours comments, strings, annotations, tags and keywords (the tokens' roles).
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
highlight?: boolean;
|
|
19
|
+
/** Called after the code is copied. */
|
|
20
|
+
onCopy?: () => void;
|
|
21
|
+
};
|
|
22
|
+
/** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */
|
|
23
|
+
declare function CodeBlock({ code, language, file, copyLabel, copiedLabel, highlight: colour, onCopy, className, ...props }: CodeBlockProps): React.JSX.Element;
|
|
24
|
+
type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, "dir" | "defaultValue"> & {
|
|
25
|
+
/** What the tabs choose between (`Build tool`): the tab list's accessible name. */
|
|
26
|
+
label: string;
|
|
27
|
+
/** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */
|
|
28
|
+
tabs: readonly {
|
|
29
|
+
id: string;
|
|
30
|
+
label: React.ReactNode;
|
|
31
|
+
content: React.ReactNode;
|
|
32
|
+
}[];
|
|
33
|
+
/** The tab open at first. Defaults to the first one. */
|
|
34
|
+
defaultValue?: string;
|
|
35
|
+
};
|
|
36
|
+
/** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */
|
|
37
|
+
declare function CodeTabs({ label, tabs, defaultValue, className, ...props }: CodeTabsProps): React.JSX.Element;
|
|
38
|
+
|
|
39
|
+
/** Splits `code` into text and coloured spans. A `#` after a space starts a comment (shell, YAML, properties), not in CSS or code. */
|
|
40
|
+
declare function highlight(code: string, language: string): React.ReactNode[];
|
|
41
|
+
|
|
42
|
+
export { CodeBlock, type CodeBlockProps, CodeTabs, type CodeTabsProps, highlight };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-5AXLA4LK.js";
|
|
5
|
+
|
|
6
|
+
// src/code-block/code-block.tsx
|
|
7
|
+
import * as React3 from "react";
|
|
8
|
+
|
|
9
|
+
// src/glyphs.tsx
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
function Glyph({ className = "h-4 w-4", fill, children }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"svg",
|
|
14
|
+
{
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
className,
|
|
17
|
+
fill: fill ? "currentColor" : "none",
|
|
18
|
+
stroke: fill ? "none" : "currentColor",
|
|
19
|
+
strokeWidth: "2",
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
"aria-hidden": true,
|
|
23
|
+
focusable: "false",
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
var CheckGlyph = (p) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
29
|
+
var CopyGlyph = (p) => /* @__PURE__ */ jsxs(Glyph, { ...p, children: [
|
|
30
|
+
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
31
|
+
/* @__PURE__ */ jsx("path", { d: "M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3" })
|
|
32
|
+
] });
|
|
33
|
+
|
|
34
|
+
// src/tabs/tabs.tsx
|
|
35
|
+
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
36
|
+
import * as React2 from "react";
|
|
37
|
+
import { tv } from "tailwind-variants";
|
|
38
|
+
|
|
39
|
+
// src/sliding-indicator.ts
|
|
40
|
+
import * as React from "react";
|
|
41
|
+
var useIsoLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
42
|
+
function useSlidingIndicator({ item, active, follow = false }) {
|
|
43
|
+
const ref = React.useRef(null);
|
|
44
|
+
const place = React.useCallback((target) => {
|
|
45
|
+
const list = ref.current;
|
|
46
|
+
if (!list) return;
|
|
47
|
+
if (!(target instanceof HTMLElement) || !list.contains(target)) {
|
|
48
|
+
list.removeAttribute("data-indicator");
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const a = target.getBoundingClientRect();
|
|
52
|
+
const b = list.getBoundingClientRect();
|
|
53
|
+
list.style.setProperty("--kz-ind-x", `${a.left - b.left + list.scrollLeft}px`);
|
|
54
|
+
list.style.setProperty("--kz-ind-y", `${a.top - b.top + list.scrollTop}px`);
|
|
55
|
+
list.style.setProperty("--kz-ind-w", `${a.width}px`);
|
|
56
|
+
list.style.setProperty("--kz-ind-h", `${a.height}px`);
|
|
57
|
+
list.setAttribute("data-indicator", "on");
|
|
58
|
+
}, []);
|
|
59
|
+
const rest = React.useCallback(() => place(ref.current?.querySelector(active) ?? null), [place, active]);
|
|
60
|
+
useIsoLayoutEffect(() => {
|
|
61
|
+
const list = ref.current;
|
|
62
|
+
if (!list) return;
|
|
63
|
+
rest();
|
|
64
|
+
const resize = new ResizeObserver(rest);
|
|
65
|
+
resize.observe(list);
|
|
66
|
+
const changes = new MutationObserver(rest);
|
|
67
|
+
changes.observe(list, { subtree: true, attributes: true, attributeFilter: ["data-state", "aria-current", "data-active"] });
|
|
68
|
+
return () => {
|
|
69
|
+
resize.disconnect();
|
|
70
|
+
changes.disconnect();
|
|
71
|
+
};
|
|
72
|
+
}, [rest]);
|
|
73
|
+
const handlers = follow ? {
|
|
74
|
+
onPointerOver: (e) => place(e.target.closest(item)),
|
|
75
|
+
onPointerLeave: rest,
|
|
76
|
+
onFocus: (e) => place(e.target.closest(item)),
|
|
77
|
+
onBlur: rest
|
|
78
|
+
} : {};
|
|
79
|
+
return { ref, handlers };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/tabs/tabs.tsx
|
|
83
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
84
|
+
var tabs = tv({
|
|
85
|
+
slots: {
|
|
86
|
+
root: "flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row",
|
|
87
|
+
// One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed
|
|
88
|
+
// (server render), each trigger carries its own active style.
|
|
89
|
+
list: "group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100",
|
|
90
|
+
trigger: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40",
|
|
91
|
+
content: "kz-fade min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
|
|
92
|
+
},
|
|
93
|
+
variants: {
|
|
94
|
+
variant: {
|
|
95
|
+
/* The section of a page: a line under the list, the active tab underlined in the accent. */
|
|
96
|
+
underline: {
|
|
97
|
+
list: "gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-full before:bg-accent data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)",
|
|
98
|
+
trigger: "relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg after:absolute after:rounded-full after:bg-transparent data-[state=active]:after:bg-accent data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent"
|
|
99
|
+
},
|
|
100
|
+
/* A view switch: equal segments in a track, the active one filled. */
|
|
101
|
+
segmented: {
|
|
102
|
+
list: "inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm",
|
|
103
|
+
trigger: "min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none"
|
|
104
|
+
},
|
|
105
|
+
/* Pills that scroll sideways on a phone: a feed's sections. */
|
|
106
|
+
pills: {
|
|
107
|
+
list: "gap-1.5 overflow-x-auto overscroll-x-contain [scrollbar-width:none] data-[orientation=horizontal]:pb-1 before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-full before:border before:border-accent before:bg-accent-soft",
|
|
108
|
+
trigger: "h-9 rounded-full border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
defaultVariants: { variant: "underline" }
|
|
113
|
+
});
|
|
114
|
+
var VariantContext = React2.createContext("underline");
|
|
115
|
+
function TabsRoot({ variant = "underline", className, ...props }) {
|
|
116
|
+
return /* @__PURE__ */ jsx2(VariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx2(TabsPrimitive.Root, { "data-variant": variant, className: tabs({ variant }).root({ className }), ...props }) });
|
|
117
|
+
}
|
|
118
|
+
function TabsList({ className, ...props }) {
|
|
119
|
+
const variant = React2.useContext(VariantContext);
|
|
120
|
+
const { ref } = useSlidingIndicator({ item: "[role=tab]", active: "[role=tab][data-state=active]" });
|
|
121
|
+
return /* @__PURE__ */ jsx2(TabsPrimitive.List, { ref, "data-variant": variant, className: tabs({ variant }).list({ className }), ...props });
|
|
122
|
+
}
|
|
123
|
+
function TabsTrigger({ className, ...props }) {
|
|
124
|
+
const variant = React2.useContext(VariantContext);
|
|
125
|
+
return /* @__PURE__ */ jsx2(TabsPrimitive.Trigger, { className: tabs({ variant }).trigger({ className }), ...props });
|
|
126
|
+
}
|
|
127
|
+
function TabsContent({ className, ...props }) {
|
|
128
|
+
return /* @__PURE__ */ jsx2(TabsPrimitive.Content, { className: tabs().content({ className }), ...props });
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// src/code-block/highlight.tsx
|
|
132
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
133
|
+
var CLASS = { comment: "kz-tk-comment", string: "kz-tk-string", annotation: "kz-tk-annotation", tag: "kz-tk-tag", keyword: "kz-tk-keyword" };
|
|
134
|
+
var KEYWORDS = "public|private|protected|final|static|class|interface|record|extends|implements|return|new|try|catch|throw|throws|if|else|void|import|from|export|function|const|let|var|val|fun|true|false|null|this|default|async|await|type";
|
|
135
|
+
var TOKEN = new RegExp(
|
|
136
|
+
[
|
|
137
|
+
String.raw`(?<comment>\/\/[^\n]*|\/\*[\s\S]*?\*\/|<!--[\s\S]*?-->|(?:^|(?<=[\s]))#[^\n]*)`,
|
|
138
|
+
String.raw`(?<string>"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|\x60(?:[^\x60\\]|\\.)*\x60)`,
|
|
139
|
+
String.raw`(?<annotation>@[A-Za-z][\w.]*)`,
|
|
140
|
+
String.raw`(?<tag><\/?[A-Za-z][\w.:-]*|\/?>)`,
|
|
141
|
+
String.raw`(?<keyword>\b(?:${KEYWORDS})\b)`
|
|
142
|
+
].join("|"),
|
|
143
|
+
"g"
|
|
144
|
+
);
|
|
145
|
+
function highlight(code, language) {
|
|
146
|
+
const out = [];
|
|
147
|
+
let last = 0;
|
|
148
|
+
for (const m of code.matchAll(TOKEN)) {
|
|
149
|
+
const kind = Object.entries(m.groups ?? {}).find(([, v]) => v !== void 0)?.[0];
|
|
150
|
+
if (!kind) continue;
|
|
151
|
+
if (kind === "tag" && !/^(xml|html|svg|jsx|tsx)$/.test(language)) continue;
|
|
152
|
+
if (kind === "comment" && m[0].startsWith("#") && /^(css|scss|tsx?|jsx?|java|kotlin|kt)$/.test(language)) continue;
|
|
153
|
+
if (kind === "string" && m[0].startsWith("'") && /^(xml|html|kotlin|kt|java)$/.test(language)) continue;
|
|
154
|
+
if (m.index > last) out.push(code.slice(last, m.index));
|
|
155
|
+
out.push(
|
|
156
|
+
/* @__PURE__ */ jsx3("span", { className: CLASS[kind], children: m[0] }, m.index)
|
|
157
|
+
);
|
|
158
|
+
last = m.index + m[0].length;
|
|
159
|
+
}
|
|
160
|
+
if (last < code.length) out.push(code.slice(last));
|
|
161
|
+
return out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// src/code-block/code-block.tsx
|
|
165
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
166
|
+
function CodeBlock({ code, language = "text", file, copyLabel, copiedLabel, highlight: colour = true, onCopy, className, ...props }) {
|
|
167
|
+
const [copied, setCopied] = React3.useState(false);
|
|
168
|
+
React3.useEffect(() => {
|
|
169
|
+
if (!copied) return;
|
|
170
|
+
const t = setTimeout(() => setCopied(false), 1800);
|
|
171
|
+
return () => clearTimeout(t);
|
|
172
|
+
}, [copied]);
|
|
173
|
+
const copy = () => navigator.clipboard?.writeText(code).then(() => {
|
|
174
|
+
setCopied(true);
|
|
175
|
+
onCopy?.();
|
|
176
|
+
});
|
|
177
|
+
return /* @__PURE__ */ jsxs2("figure", { className: cn("kz-code", className), ...props, children: [
|
|
178
|
+
/* @__PURE__ */ jsxs2("figcaption", { className: "kz-code-bar", children: [
|
|
179
|
+
/* @__PURE__ */ jsxs2("span", { className: "kz-code-file", children: [
|
|
180
|
+
language !== "text" && /* @__PURE__ */ jsx4("span", { className: "kz-code-lang", children: language }),
|
|
181
|
+
file
|
|
182
|
+
] }),
|
|
183
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", className: "kz-code-copy", onClick: copy, "data-copied": copied ? "" : void 0, children: [
|
|
184
|
+
copied ? /* @__PURE__ */ jsx4(CheckGlyph, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx4(CopyGlyph, { className: "h-3.5 w-3.5" }),
|
|
185
|
+
/* @__PURE__ */ jsx4("span", { "aria-live": "polite", children: copied ? copiedLabel : copyLabel })
|
|
186
|
+
] })
|
|
187
|
+
] }),
|
|
188
|
+
/* @__PURE__ */ jsx4("pre", { tabIndex: 0, children: /* @__PURE__ */ jsx4("code", { "data-language": language, children: colour ? highlight(code, language) : code }) })
|
|
189
|
+
] });
|
|
190
|
+
}
|
|
191
|
+
function CodeTabs({ label, tabs: tabs2, defaultValue, className, ...props }) {
|
|
192
|
+
return /* @__PURE__ */ jsxs2(TabsRoot, { defaultValue: defaultValue ?? tabs2[0]?.id, variant: "segmented", className: cn("kz-code-tabs", className), ...props, children: [
|
|
193
|
+
/* @__PURE__ */ jsx4(TabsList, { "aria-label": label, children: tabs2.map((t) => /* @__PURE__ */ jsx4(TabsTrigger, { value: t.id, children: t.label }, t.id)) }),
|
|
194
|
+
tabs2.map((t) => /* @__PURE__ */ jsx4(TabsContent, { value: t.id, children: t.content }, t.id))
|
|
195
|
+
] });
|
|
196
|
+
}
|
|
197
|
+
export {
|
|
198
|
+
CodeBlock,
|
|
199
|
+
CodeTabs,
|
|
200
|
+
highlight
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/code-block/code-block.tsx","../src/glyphs.tsx","../src/tabs/tabs.tsx","../src/sliding-indicator.ts","../src/code-block/highlight.tsx"],"sourcesContent":["// Client (the copy button, the tabs). A sample of code (blocks.css): its language and its file name, the code\n// highlighted (it scrolls sideways, never shrinks, and takes the keyboard's focus to scroll), a copy button that says\n// it copied in a polite live region. CodeTabs puts several ways to write the same thing (Maven · Gradle · npm) under\n// the tabs of @krizaka/ui.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph, CopyGlyph } from \"../glyphs\";\nimport { TabsContent, TabsList, TabsRoot, TabsTrigger } from \"../tabs/tabs\";\nimport { highlight } from \"./highlight\";\n\nexport type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The code, as it is copied. */\n code: string;\n /** Its language, shown as a tag and used by the highlighter: `xml`, `kotlin`, `ts`, `bash`, `yaml`… */\n language?: string;\n /** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */\n file?: React.ReactNode;\n /** The copy button's words. */\n copyLabel: string;\n /** What the button says once the code is copied (announced politely). */\n copiedLabel: string;\n /**\n * Colours comments, strings, annotations, tags and keywords (the tokens' roles).\n * @default true\n */\n highlight?: boolean;\n /** Called after the code is copied. */\n onCopy?: () => void;\n};\n\n/** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */\nexport function CodeBlock({ code, language = \"text\", file, copyLabel, copiedLabel, highlight: colour = true, onCopy, className, ...props }: CodeBlockProps) {\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1800);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = () =>\n navigator.clipboard?.writeText(code).then(() => {\n setCopied(true);\n onCopy?.();\n });\n return (\n <figure className={cn(\"kz-code\", className)} {...props}>\n <figcaption className=\"kz-code-bar\">\n <span className=\"kz-code-file\">\n {language !== \"text\" && <span className=\"kz-code-lang\">{language}</span>}\n {file}\n </span>\n <button type=\"button\" className=\"kz-code-copy\" onClick={copy} data-copied={copied ? \"\" : undefined}>\n {copied ? <CheckGlyph className=\"h-3.5 w-3.5\" /> : <CopyGlyph className=\"h-3.5 w-3.5\" />}\n <span aria-live=\"polite\">{copied ? copiedLabel : copyLabel}</span>\n </button>\n </figcaption>\n <pre tabIndex={0}>\n <code data-language={language}>{colour ? highlight(code, language) : code}</code>\n </pre>\n </figure>\n );\n}\n\nexport type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"dir\" | \"defaultValue\"> & {\n /** What the tabs choose between (`Build tool`): the tab list's accessible name. */\n label: string;\n /** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */\n tabs: readonly { id: string; label: React.ReactNode; content: React.ReactNode }[];\n /** The tab open at first. Defaults to the first one. */\n defaultValue?: string;\n};\n\n/** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */\nexport function CodeTabs({ label, tabs, defaultValue, className, ...props }: CodeTabsProps) {\n return (\n <TabsRoot defaultValue={defaultValue ?? tabs[0]?.id} variant=\"segmented\" className={cn(\"kz-code-tabs\", className)} {...props}>\n <TabsList aria-label={label}>\n {tabs.map((t) => (\n <TabsTrigger key={t.id} value={t.id}>\n {t.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.id} value={t.id}>\n {t.content}\n </TabsContent>\n ))}\n </TabsRoot>\n );\n}\n","// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\n","// Client (a context). Radix Tabs does the roles (tablist, tab, tabpanel), the aria-selected / aria-controls wiring,\n// the roving focus (arrows, Home, End) and automatic activation: this file only holds the three looks.\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { useSlidingIndicator } from \"../sliding-indicator\";\n\nexport const tabs = tv({\n slots: {\n root: \"flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row\",\n // One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed\n // (server render), each trigger carries its own active style.\n list:\n \"group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col \" +\n \"before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 \" +\n \"motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100\",\n trigger:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40\",\n content: \"kz-fade min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n },\n variants: {\n variant: {\n /* The section of a page: a line under the list, the active tab underlined in the accent. */\n underline: {\n list:\n \"gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-full before:bg-accent \" +\n \"data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 \" +\n \"data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) \" +\n \"data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 \" +\n \"data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)\",\n trigger:\n \"relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg \" +\n \"after:absolute after:rounded-full after:bg-transparent data-[state=active]:after:bg-accent \" +\n \"data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 \" +\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent\",\n },\n /* A view switch: equal segments in a track, the active one filled. */\n segmented: {\n list:\n \"inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm\",\n trigger:\n \"min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg \" +\n \"data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent \" +\n \"transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none\",\n },\n /* Pills that scroll sideways on a phone: a feed's sections. */\n pills: {\n list:\n \"gap-1.5 overflow-x-auto overscroll-x-contain [scrollbar-width:none] data-[orientation=horizontal]:pb-1 \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) \" +\n \"before:rounded-full before:border before:border-accent before:bg-accent-soft\",\n trigger:\n \"h-9 rounded-full border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent\",\n },\n },\n },\n defaultVariants: { variant: \"underline\" },\n});\n\nexport type TabsVariants = VariantProps<typeof tabs>;\ntype Variant = NonNullable<TabsVariants[\"variant\"]>;\n\nconst VariantContext = React.createContext<Variant>(\"underline\");\n\nexport type TabsRootProps = React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections). */\n variant?: TabsVariants[\"variant\"];\n};\n\n/** `value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list. */\nexport function TabsRoot({ variant = \"underline\", className, ...props }: TabsRootProps) {\n return (\n <VariantContext.Provider value={variant}>\n <TabsPrimitive.Root data-variant={variant} className={tabs({ variant }).root({ className })} {...props} />\n </VariantContext.Provider>\n );\n}\n\n/** The tabs. Name it (`aria-label`) when no heading says what it switches. One light glides to the active tab. */\nexport function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n const variant = React.useContext(VariantContext);\n const { ref } = useSlidingIndicator<HTMLDivElement>({ item: \"[role=tab]\", active: \"[role=tab][data-state=active]\" });\n return <TabsPrimitive.List ref={ref} data-variant={variant} className={tabs({ variant }).list({ className })} {...props} />;\n}\n\nexport function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const variant = React.useContext(VariantContext);\n return <TabsPrimitive.Trigger className={tabs({ variant }).trigger({ className })} {...props} />;\n}\n\nexport function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content className={tabs().content({ className })} {...props} />;\n}\n\n/** `Tabs.Root/List/Trigger/Content` — `variant` underline · segmented · pills on the root. */\nexport const Tabs = { Root: TabsRoot, List: TabsList, Trigger: TabsTrigger, Content: TabsContent };\n","// The shared sliding indicator (NavBar, Tabs): one element that glides from item to item instead of each item lighting\n// up on its own. It writes the target's box as CSS variables on the list (`--kz-ind-x/y/w/h`) and `data-indicator=\"on\"`\n// — no re-render, no animation frame: the glide is a CSS transition (none under reduced motion). Before hydration the\n// items keep their own active style, so nothing flashes.\nimport * as React from \"react\";\n\nconst useIsoLayoutEffect = typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\nexport function useSlidingIndicator<T extends HTMLElement>({ item, active, follow = false }: { item: string; active: string; follow?: boolean }) {\n const ref = React.useRef<T>(null);\n const place = React.useCallback((target: Element | null) => {\n const list = ref.current;\n if (!list) return;\n if (!(target instanceof HTMLElement) || !list.contains(target)) {\n list.removeAttribute(\"data-indicator\");\n return;\n }\n const a = target.getBoundingClientRect();\n const b = list.getBoundingClientRect();\n list.style.setProperty(\"--kz-ind-x\", `${a.left - b.left + list.scrollLeft}px`);\n list.style.setProperty(\"--kz-ind-y\", `${a.top - b.top + list.scrollTop}px`);\n list.style.setProperty(\"--kz-ind-w\", `${a.width}px`);\n list.style.setProperty(\"--kz-ind-h\", `${a.height}px`);\n list.setAttribute(\"data-indicator\", \"on\");\n }, []);\n const rest = React.useCallback(() => place(ref.current?.querySelector(active) ?? null), [place, active]);\n\n useIsoLayoutEffect(() => {\n const list = ref.current;\n if (!list) return;\n rest();\n const resize = new ResizeObserver(rest);\n resize.observe(list);\n const changes = new MutationObserver(rest);\n changes.observe(list, { subtree: true, attributes: true, attributeFilter: [\"data-state\", \"aria-current\", \"data-active\"] });\n return () => {\n resize.disconnect();\n changes.disconnect();\n };\n }, [rest]);\n\n const handlers = follow\n ? {\n onPointerOver: (e: React.PointerEvent) => place((e.target as Element).closest(item)),\n onPointerLeave: rest,\n onFocus: (e: React.FocusEvent) => place((e.target as Element).closest(item)),\n onBlur: rest,\n }\n : {};\n return { ref, handlers };\n}\n","// A small highlighter for the samples of a page (blocks.css `.kz-tk-*`): comments, strings, annotations, XML tags and\n// keywords — no highlighter in the bundle, no colour outside the tokens (each ≥ 4.5:1 on the code surface in both\n// themes). It colours what helps reading a sample; it is not a parser.\nimport type * as React from \"react\";\n\nconst CLASS = { comment: \"kz-tk-comment\", string: \"kz-tk-string\", annotation: \"kz-tk-annotation\", tag: \"kz-tk-tag\", keyword: \"kz-tk-keyword\" } as const;\ntype Kind = keyof typeof CLASS;\n\nconst KEYWORDS =\n \"public|private|protected|final|static|class|interface|record|extends|implements|return|new|try|catch|throw|throws|if|else|void|import|from|export|function|const|let|var|val|fun|true|false|null|this|default|async|await|type\";\n\nconst TOKEN = new RegExp(\n [\n String.raw`(?<comment>\\/\\/[^\\n]*|\\/\\*[\\s\\S]*?\\*\\/|<!--[\\s\\S]*?-->|(?:^|(?<=[\\s]))#[^\\n]*)`,\n String.raw`(?<string>\"(?:[^\"\\\\\\n]|\\\\.)*\"|'(?:[^'\\\\\\n]|\\\\.)*'|\\x60(?:[^\\x60\\\\]|\\\\.)*\\x60)`,\n String.raw`(?<annotation>@[A-Za-z][\\w.]*)`,\n String.raw`(?<tag><\\/?[A-Za-z][\\w.:-]*|\\/?>)`,\n String.raw`(?<keyword>\\b(?:${KEYWORDS})\\b)`,\n ].join(\"|\"),\n \"g\",\n);\n\n/** Splits `code` into text and coloured spans. A `#` after a space starts a comment (shell, YAML, properties), not in CSS or code. */\nexport function highlight(code: string, language: string): React.ReactNode[] {\n const out: React.ReactNode[] = [];\n let last = 0;\n for (const m of code.matchAll(TOKEN)) {\n const kind = Object.entries(m.groups ?? {}).find(([, v]) => v !== undefined)?.[0] as Kind | undefined;\n if (!kind) continue;\n if (kind === \"tag\" && !/^(xml|html|svg|jsx|tsx)$/.test(language)) continue;\n if (kind === \"comment\" && m[0].startsWith(\"#\") && /^(css|scss|tsx?|jsx?|java|kotlin|kt)$/.test(language)) continue;\n if (kind === \"string\" && m[0].startsWith(\"'\") && /^(xml|html|kotlin|kt|java)$/.test(language)) continue;\n if (m.index > last) out.push(code.slice(last, m.index));\n out.push(\n <span key={m.index} className={CLASS[kind]}>\n {m[0]}\n </span>,\n );\n last = m.index + m[0].length;\n }\n if (last < code.length) out.push(code.slice(last));\n return out;\n}\n"],"mappings":";;;;;;AAIA,YAAYA,YAAW;;;ACKnB,cAsBF,YAtBE;AAFJ,SAAS,MAAM,EAAE,YAAY,WAAW,MAAM,SAAS,GAA+D;AACpH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR;AAAA,MACA,MAAM,OAAO,iBAAiB;AAAA,MAC9B,QAAQ,OAAO,SAAS;AAAA,MACxB,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;AAoDO,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,mBAAkB,GAC5B;AAiEK,IAAM,YAAY,CAAC,MACxB,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,KAAI,GAAE,KAAI,OAAM,MAAK,QAAO,MAAK,IAAG,KAAI;AAAA,EAChD,oBAAC,UAAK,GAAE,2DAA0D;AAAA,GACpE;;;ACjJF,SAAS,QAAQ,qBAAqB;AACtC,YAAYC,YAAW;AACvB,SAAS,UAA6B;;;ACAtC,YAAY,WAAW;AAEvB,IAAM,qBAAqB,OAAO,WAAW,cAAoB,kBAAkB;AAE5E,SAAS,oBAA2C,EAAE,MAAM,QAAQ,SAAS,MAAM,GAAuD;AAC/I,QAAM,MAAY,aAAU,IAAI;AAChC,QAAM,QAAc,kBAAY,CAAC,WAA2B;AAC1D,UAAM,OAAO,IAAI;AACjB,QAAI,CAAC,KAAM;AACX,Q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MAAM,QAAQ,IAAI,MAAK,GAC5E;AAAA,KACF;AAEJ;AAYO,SAAS,SAAS,EAAE,OAAO,MAAAE,OAAM,cAAc,WAAW,GAAG,MAAM,GAAkB;AAC1F,SACE,gBAAAD,MAAC,YAAS,cAAc,gBAAgBC,MAAK,CAAC,GAAG,IAAI,SAAQ,aAAY,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OACrH;AAAA,oBAAAF,KAAC,YAAS,cAAY,OACnB,UAAAE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,SADa,EAAE,EAEpB,CACD,GACH;AAAA,IACCE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,WADa,EAAE,EAEpB,CACD;AAAA,KACH;AAEJ;","names":["React","React","jsx","jsx","jsx","jsxs","tabs"]}
|
package/dist/combobox.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
Combobox,
|
|
4
4
|
combobox,
|
|
5
5
|
comboboxLabels
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X6TW3X6Y.js";
|
|
7
7
|
import "./chunk-YH4LMWRU.js";
|
|
8
8
|
import "./chunk-ZIXB33X7.js";
|
|
9
9
|
import "./chunk-EUPTXKH7.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CPA5CF35.js";
|
|
11
11
|
export {
|
|
12
12
|
Combobox,
|
|
13
13
|
combobox,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type CtaPanelProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
4
|
+
/** The id of the title (an anchor others link to: `#discuss`). */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** The invitation: `Something to say about it?`. */
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
/** Why it matters, in one or two sentences. */
|
|
9
|
+
body?: React.ReactNode;
|
|
10
|
+
/** The ways to answer: an `ActionBar`, buttons. */
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* The title's level.
|
|
14
|
+
* @default 2
|
|
15
|
+
*/
|
|
16
|
+
level?: 2 | 3;
|
|
17
|
+
/** Rises once into place (`[data-reveal]`). Never on the first screen. */
|
|
18
|
+
reveal?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** A call to act: title, why, the actions — the closing panel of a section or a page. */
|
|
21
|
+
declare function CtaPanel({ id, title, body, children, level, reveal, className, ...props }: CtaPanelProps): React.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { CtaPanel, type CtaPanelProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-FJDSLNXK.js";
|
|
4
|
+
|
|
5
|
+
// src/cta-panel/cta-panel.tsx
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function CtaPanel({ id, title, body, children, level = 2, reveal, className, ...props }) {
|
|
8
|
+
const H = level === 2 ? "h2" : "h3";
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("kz-cta", className), "data-reveal": reveal ? "" : void 0, ...props, children: [
|
|
10
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-cta-text", children: [
|
|
11
|
+
/* @__PURE__ */ jsx(H, { id, className: "kz-cta-title", children: title }),
|
|
12
|
+
body && /* @__PURE__ */ jsx("p", { className: "kz-cta-body", children: body })
|
|
13
|
+
] }),
|
|
14
|
+
children && /* @__PURE__ */ jsx("div", { className: "kz-cta-actions", children })
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
CtaPanel
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=cta-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cta-panel/cta-panel.tsx"],"sourcesContent":["// Server-safe. The invitation at the end of a section or a page (blocks.css): a title, why it matters, the ways to\n// answer — in the hue of the page.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type CtaPanelProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The id of the title (an anchor others link to: `#discuss`). */\n id?: string;\n /** The invitation: `Something to say about it?`. */\n title: React.ReactNode;\n /** Why it matters, in one or two sentences. */\n body?: React.ReactNode;\n /** The ways to answer: an `ActionBar`, buttons. */\n children?: React.ReactNode;\n /**\n * The title's level.\n * @default 2\n */\n level?: 2 | 3;\n /** Rises once into place (`[data-reveal]`). Never on the first screen. */\n reveal?: boolean;\n};\n\n/** A call to act: title, why, the actions — the closing panel of a section or a page. */\nexport function CtaPanel({ id, title, body, children, level = 2, reveal, className, ...props }: CtaPanelProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n return (\n <div className={cn(\"kz-cta\", className)} data-reveal={reveal ? \"\" : undefined} {...props}>\n <div className=\"kz-cta-text\">\n <H id={id} className=\"kz-cta-title\">\n {title}\n </H>\n {body && <p className=\"kz-cta-body\">{body}</p>}\n </div>\n {children && <div className=\"kz-cta-actions\">{children}</div>}\n </div>\n );\n}\n"],"mappings":";;;;;AA6BM,SACE,KADF;AAJC,SAAS,SAAS,EAAE,IAAI,OAAO,MAAM,UAAU,QAAQ,GAAG,QAAQ,WAAW,GAAG,MAAM,GAAkB;AAC7G,QAAM,IAAI,UAAU,IAAI,OAAO;AAC/B,SACE,qBAAC,SAAI,WAAW,GAAG,UAAU,SAAS,GAAG,eAAa,SAAS,KAAK,QAAY,GAAG,OACjF;AAAA,yBAAC,SAAI,WAAU,eACb;AAAA,0BAAC,KAAE,IAAQ,WAAU,gBAClB,iBACH;AAAA,MACC,QAAQ,oBAAC,OAAE,WAAU,eAAe,gBAAK;AAAA,OAC5C;AAAA,IACC,YAAY,oBAAC,SAAI,WAAU,kBAAkB,UAAS;AAAA,KACzD;AAEJ;","names":[]}
|
package/dist/data-table.js
CHANGED
package/dist/date-picker.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Decision {
|
|
4
|
+
/** A stable key (the decision's id); the `chose` text otherwise. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** What was chosen. */
|
|
7
|
+
chose: React.ReactNode;
|
|
8
|
+
/** What was refused. */
|
|
9
|
+
refused: React.ReactNode;
|
|
10
|
+
/** Why. */
|
|
11
|
+
because: React.ReactNode;
|
|
12
|
+
/** What it costs the reader — said honestly. */
|
|
13
|
+
cost: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
type DecisionListProps = React.HTMLAttributes<HTMLOListElement> & {
|
|
16
|
+
/** The decisions, in order. */
|
|
17
|
+
decisions: readonly Decision[];
|
|
18
|
+
/** The four labels: `{ chose: "We chose", refused: "We refused", because: "Because", cost: "What it costs you" }`. */
|
|
19
|
+
labels: {
|
|
20
|
+
chose: React.ReactNode;
|
|
21
|
+
refused: React.ReactNode;
|
|
22
|
+
because: React.ReactNode;
|
|
23
|
+
cost: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Each decision rises once into place, staggered (`[data-reveal]`).
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
reveal?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/** Numbered decisions: chose, then refused · because · what it costs, side by side. */
|
|
32
|
+
declare function DecisionList({ decisions, labels, reveal, className, ...props }: DecisionListProps): React.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { type Decision, DecisionList, type DecisionListProps };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArrowGlyph,
|
|
3
|
+
CheckGlyph,
|
|
4
|
+
CloseGlyph,
|
|
5
|
+
WarningGlyph
|
|
6
|
+
} from "./chunk-XCBVFMNV.js";
|
|
7
|
+
import {
|
|
8
|
+
cn
|
|
9
|
+
} from "./chunk-FJDSLNXK.js";
|
|
10
|
+
|
|
11
|
+
// src/decision-list/decision-list.tsx
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var ICON = "h-3.5 w-3.5";
|
|
14
|
+
function DecisionList({ decisions, labels, reveal = true, className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("ol", { className: cn("kz-decisions", className), ...props, children: decisions.map((d, i) => /* @__PURE__ */ jsxs(
|
|
16
|
+
"li",
|
|
17
|
+
{
|
|
18
|
+
className: "kz-decision",
|
|
19
|
+
"data-reveal": reveal ? "soft" : void 0,
|
|
20
|
+
style: reveal && i ? { "--kz-delay": `${Math.min(i, 5) * 70}ms` } : void 0,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "kz-decision-n", "aria-hidden": true, children: String(i + 1).padStart(2, "0") }),
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-decision-body", children: [
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-decision-part", "data-part": "chose", children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("p", { className: "kz-label", children: [
|
|
26
|
+
/* @__PURE__ */ jsx(CheckGlyph, { className: ICON }),
|
|
27
|
+
" ",
|
|
28
|
+
labels.chose
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsx("p", { children: d.chose })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-decision-grid", children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-decision-part", "data-part": "refused", children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("p", { className: "kz-label", children: [
|
|
35
|
+
/* @__PURE__ */ jsx(CloseGlyph, { className: ICON }),
|
|
36
|
+
" ",
|
|
37
|
+
labels.refused
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { children: d.refused })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-decision-part", "data-part": "because", children: [
|
|
42
|
+
/* @__PURE__ */ jsxs("p", { className: "kz-label", children: [
|
|
43
|
+
/* @__PURE__ */ jsx(ArrowGlyph, { className: ICON }),
|
|
44
|
+
" ",
|
|
45
|
+
labels.because
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ jsx("p", { children: d.because })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-decision-part", "data-part": "cost", children: [
|
|
50
|
+
/* @__PURE__ */ jsxs("p", { className: "kz-label", children: [
|
|
51
|
+
/* @__PURE__ */ jsx(WarningGlyph, { className: ICON }),
|
|
52
|
+
" ",
|
|
53
|
+
labels.cost
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx("p", { children: d.cost })
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] })
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
d.id ?? (typeof d.chose === "string" ? d.chose : i)
|
|
62
|
+
)) });
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
DecisionList
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=decision-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/decision-list/decision-list.tsx"],"sourcesContent":["// Server-safe. The decisions behind a product, numbered (blocks.css): what was chosen, large, first; then side by side\n// what was refused, why, and what it costs the reader — each with its mark (✓ ✕ → !) and its colour, so the eye\n// compares decisions at a glance. Every word arrives as a prop.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { ArrowGlyph, CheckGlyph, CloseGlyph, WarningGlyph } from \"../glyphs\";\n\nexport interface Decision {\n /** A stable key (the decision's id); the `chose` text otherwise. */\n id?: string;\n /** What was chosen. */\n chose: React.ReactNode;\n /** What was refused. */\n refused: React.ReactNode;\n /** Why. */\n because: React.ReactNode;\n /** What it costs the reader — said honestly. */\n cost: React.ReactNode;\n}\n\nexport type DecisionListProps = React.HTMLAttributes<HTMLOListElement> & {\n /** The decisions, in order. */\n decisions: readonly Decision[];\n /** The four labels: `{ chose: \"We chose\", refused: \"We refused\", because: \"Because\", cost: \"What it costs you\" }`. */\n labels: { chose: React.ReactNode; refused: React.ReactNode; because: React.ReactNode; cost: React.ReactNode };\n /**\n * Each decision rises once into place, staggered (`[data-reveal]`).\n * @default true\n */\n reveal?: boolean;\n};\n\nconst ICON = \"h-3.5 w-3.5\";\n\n/** Numbered decisions: chose, then refused · because · what it costs, side by side. */\nexport function DecisionList({ decisions, labels, reveal = true, className, ...props }: DecisionListProps) {\n return (\n <ol className={cn(\"kz-decisions\", className)} {...props}>\n {decisions.map((d, i) => (\n <li\n key={d.id ?? (typeof d.chose === \"string\" ? d.chose : i)}\n className=\"kz-decision\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={reveal && i ? ({ \"--kz-delay\": `${Math.min(i, 5) * 70}ms` } as React.CSSProperties) : undefined}\n >\n <span className=\"kz-decision-n\" aria-hidden>\n {String(i + 1).padStart(2, \"0\")}\n </span>\n <div className=\"kz-decision-body\">\n <div className=\"kz-decision-part\" data-part=\"chose\">\n <p className=\"kz-label\">\n <CheckGlyph className={ICON} /> {labels.chose}\n </p>\n <p>{d.chose}</p>\n </div>\n <div className=\"kz-decision-grid\">\n <div className=\"kz-decision-part\" data-part=\"refused\">\n <p className=\"kz-label\">\n <CloseGlyph className={ICON} /> {labels.refused}\n </p>\n <p>{d.refused}</p>\n </div>\n <div className=\"kz-decision-part\" data-part=\"because\">\n <p className=\"kz-label\">\n <ArrowGlyph className={ICON} /> {labels.because}\n </p>\n <p>{d.because}</p>\n </div>\n <div className=\"kz-decision-part\" data-part=\"cost\">\n <p className=\"kz-label\">\n <WarningGlyph className={ICON} /> {labels.cost}\n </p>\n <p>{d.cost}</p>\n </div>\n </div>\n </div>\n </li>\n ))}\n </ol>\n );\n}\n"],"mappings":";;;;;;;;;;;AA8CU,cAKI,YALJ;AAbV,IAAM,OAAO;AAGN,SA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MAAM;AAAA,gBAAE;AAAA,gBAAE,OAAO;AAAA,iBAC5C;AAAA,cACA,oBAAC,OAAG,YAAE,MAAK;AAAA,eACb;AAAA,aACF;AAAA,WACF;AAAA;AAAA;AAAA,IAnCK,EAAE,OAAO,OAAO,EAAE,UAAU,WAAW,EAAE,QAAQ;AAAA,EAoCxD,CACD,GACH;AAEJ;","names":[]}
|
package/dist/file-upload.js
CHANGED
package/dist/filter-bar.js
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { L as LinkComponent } from './block-link-BAg4eoZk.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type LinkCardProps = Omit<React.ComponentProps<"a">, "title" | "href"> & {
|
|
5
|
+
/** Where the card leads. An absolute URL opens in a new tab, with the external mark. */
|
|
6
|
+
href: string;
|
|
7
|
+
/** The title: the name of the destination. */
|
|
8
|
+
title: React.ReactNode;
|
|
9
|
+
/** One sentence: what the reader finds there. */
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
/** The icon tile on the left (a product mark, a signature icon): decorative, the title names the link. */
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
/** A short mono line above the title (a category, a version). */
|
|
14
|
+
meta?: React.ReactNode;
|
|
15
|
+
/** The way in, under the text, with an arrow: `Open`, `Read the guide`. */
|
|
16
|
+
cta?: React.ReactNode;
|
|
17
|
+
/** Under the text, before the way in: facts (`Facts`), badges. Never another link — the card is one. */
|
|
18
|
+
extra?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* The title's element: a heading when the cards are the content of a section (a hub), `span` inside a list of links.
|
|
21
|
+
* @default "h3"
|
|
22
|
+
*/
|
|
23
|
+
titleAs?: "h2" | "h3" | "h4" | "span";
|
|
24
|
+
/**
|
|
25
|
+
* `row`: the icon beside the text (compact, the default); `stack`: the icon above it.
|
|
26
|
+
* @default "row"
|
|
27
|
+
*/
|
|
28
|
+
layout?: "row" | "stack";
|
|
29
|
+
/** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */
|
|
30
|
+
linkAs?: LinkComponent;
|
|
31
|
+
};
|
|
32
|
+
/** An entry point: the whole card is one link — icon, title, sentence, the way in. Lifts and lights under the pointer. */
|
|
33
|
+
declare function LinkCard({ href, title, description, icon, meta, cta, extra, titleAs: Title, layout, linkAs, className, ...props }: LinkCardProps): React.JSX.Element;
|
|
34
|
+
|
|
35
|
+
export { LinkCard, type LinkCardProps, LinkComponent };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlockLink,
|
|
3
|
+
isExternal
|
|
4
|
+
} from "./chunk-2AGSO3WH.js";
|
|
5
|
+
import {
|
|
6
|
+
ArrowGlyph,
|
|
7
|
+
ExternalGlyph
|
|
8
|
+
} from "./chunk-XCBVFMNV.js";
|
|
9
|
+
import {
|
|
10
|
+
cn
|
|
11
|
+
} from "./chunk-FJDSLNXK.js";
|
|
12
|
+
|
|
13
|
+
// src/link-card/link-card.tsx
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
function LinkCard({ href, title, description, icon, meta, cta, extra, titleAs: Title = "h3", layout = "row", linkAs, className, ...props }) {
|
|
16
|
+
const external = isExternal(href);
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
BlockLink,
|
|
19
|
+
{
|
|
20
|
+
href,
|
|
21
|
+
linkAs,
|
|
22
|
+
external,
|
|
23
|
+
className: cn("kz-block-card kz-link-card", className),
|
|
24
|
+
"data-kz-light": "",
|
|
25
|
+
"data-layout": layout === "row" ? void 0 : layout,
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
icon && /* @__PURE__ */ jsx("span", { className: "kz-block-icon", "aria-hidden": true, children: icon }),
|
|
29
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-link-card-body", children: [
|
|
30
|
+
meta && /* @__PURE__ */ jsx("p", { className: "kz-link-card-meta", children: meta }),
|
|
31
|
+
/* @__PURE__ */ jsx(Title, { className: "kz-link-card-title", children: title }),
|
|
32
|
+
description && /* @__PURE__ */ jsx("p", { className: "kz-link-card-text", children: description }),
|
|
33
|
+
extra && /* @__PURE__ */ jsx("div", { className: "kz-link-card-extra", children: extra }),
|
|
34
|
+
(cta || external) && /* @__PURE__ */ jsxs("span", { className: "kz-link-card-cta", children: [
|
|
35
|
+
cta,
|
|
36
|
+
external ? /* @__PURE__ */ jsx(ExternalGlyph, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(ArrowGlyph, { className: "h-3.5 w-3.5" })
|
|
37
|
+
] })
|
|
38
|
+
] })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
LinkCard
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=link-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/link-card/link-card.tsx"],"sourcesContent":["// Server-safe. A card that leads somewhere (blocks.css): the whole card is the link — an icon, a title, one sentence,\n// the way in. Compact, one look for every entry point of a page (a documentation hub, the products, the next step).\nimport type * as React from \"react\";\n\nimport { BlockLink, isExternal, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\nimport { ArrowGlyph, ExternalGlyph } from \"../glyphs\";\n\nexport type LinkCardProps = Omit<React.ComponentProps<\"a\">, \"title\" | \"href\"> & {\n /** Where the card leads. An absolute URL opens in a new tab, with the external mark. */\n href: string;\n /** The title: the name of the destination. */\n title: React.ReactNode;\n /** One sentence: what the reader finds there. */\n description?: React.ReactNode;\n /** The icon tile on the left (a product mark, a signature icon): decorative, the title names the link. */\n icon?: React.ReactNode;\n /** A short mono line above the title (a category, a version). */\n meta?: React.ReactNode;\n /** The way in, under the text, with an arrow: `Open`, `Read the guide`. */\n cta?: React.ReactNode;\n /** Under the text, before the way in: facts (`Facts`), badges. Never another link — the card is one. */\n extra?: React.ReactNode;\n /**\n * The title's element: a heading when the cards are the content of a section (a hub), `span` inside a list of links.\n * @default \"h3\"\n */\n titleAs?: \"h2\" | \"h3\" | \"h4\" | \"span\";\n /**\n * `row`: the icon beside the text (compact, the default); `stack`: the icon above it.\n * @default \"row\"\n */\n layout?: \"row\" | \"stack\";\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n};\n\n/** An entry point: the whole card is one link — icon, title, sentence, the way in. Lifts and lights under the pointer. */\nexport function LinkCard({ href, title, description, icon, meta, cta, extra, titleAs: Title = \"h3\", layout = \"row\", linkAs, className, ...props }: LinkCardProps) {\n const external = isExternal(href);\n return (\n <BlockLink\n href={href}\n linkAs={linkAs}\n external={external}\n className={cn(\"kz-block-card kz-link-card\", className)}\n data-kz-light=\"\"\n data-layout={layout === \"row\" ? undefined : layout}\n {...props}\n >\n {icon && (\n <span className=\"kz-block-icon\" aria-hidden>\n {icon}\n </span>\n )}\n <div className=\"kz-link-card-body\">\n {meta && <p className=\"kz-link-card-meta\">{meta}</p>}\n <Title className=\"kz-link-card-title\">{title}</Title>\n {description && <p className=\"kz-link-card-text\">{description}</p>}\n {extra && <div className=\"kz-link-card-extra\">{extra}</div>}\n {(cta || external) && (\n <span className=\"kz-link-card-cta\">\n {cta}\n {external ? <ExternalGlyph className=\"h-3.5 w-3.5\" /> : <ArrowGlyph className=\"h-3.5 w-3.5\" />}\n </span>\n )}\n </div>\n </BlockLink>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAmDQ,cAUE,YAVF;AAbD,SAAS,SAAS,EAAE,MAAM,OAAO,aAAa,MAAM,MAAM,KAAK,OAAO,SAAS,QAAQ,MAAM,SAAS,OAAO,QAAQ,WAAW,GAAG,MAAM,GAAkB;AAChK,QAAM,WAAW,WAAW,IAAI;AAChC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACrD,iBAAc;AAAA,MACd,eAAa,WAAW,QAAQ,SAAY;AAAA,MAC3C,GAAG;AAAA,MAEH;AAAA,gBACC,oBAAC,UAAK,WAAU,iBAAgB,eAAW,MACxC,gBACH;AAAA,QAEF,qBAAC,SAAI,WAAU,qBACZ;AAAA,kBAAQ,oBAAC,OAAE,WAAU,qBAAqB,gBAAK;AAAA,UAChD,oBAAC,SAAM,WAAU,sBAAsB,iBAAM;AAAA,UAC5C,eAAe,oBAAC,OAAE,WAAU,qBAAqB,uBAAY;AAAA,UAC7D,SAAS,oBAAC,SAAI,WAAU,sBAAsB,iBAAM;AAAA,WACnD,OAAO,aACP,qBAAC,UAAK,WAAU,oBACb;AAAA;AAAA,YACA,WAAW,oBAAC,iBAAc,WAAU,eAAc,IAAK,oBAAC,cAAW,WAAU,eAAc;AAAA,aAC9F;AAAA,WAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|