@krizaka/ui 1.3.0 → 2.0.0-beta.1

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.
Files changed (77) hide show
  1. package/README.md +137 -4
  2. package/dist/alert.d.ts +95 -0
  3. package/dist/alert.js +38 -0
  4. package/dist/alert.js.map +1 -0
  5. package/dist/avatar.d.ts +98 -0
  6. package/dist/avatar.js +48 -0
  7. package/dist/avatar.js.map +1 -0
  8. package/dist/badge.d.ts +64 -0
  9. package/dist/badge.js +31 -0
  10. package/dist/badge.js.map +1 -0
  11. package/dist/button.d.ts +76 -0
  12. package/dist/button.js +46 -0
  13. package/dist/button.js.map +1 -0
  14. package/dist/card.d.ts +227 -0
  15. package/dist/card.js +108 -0
  16. package/dist/card.js.map +1 -0
  17. package/dist/chunk-CPMZS4XA.js +11 -0
  18. package/dist/chunk-CPMZS4XA.js.map +1 -0
  19. package/dist/chunk-J3NC6ER4.js +9 -0
  20. package/dist/chunk-J3NC6ER4.js.map +1 -0
  21. package/dist/chunk-QRG5RYEI.js +49 -0
  22. package/dist/chunk-QRG5RYEI.js.map +1 -0
  23. package/dist/chunk-RLOXWF2G.js +13 -0
  24. package/dist/chunk-RLOXWF2G.js.map +1 -0
  25. package/dist/cn.d.ts +10 -0
  26. package/dist/cn.js +7 -0
  27. package/dist/cn.js.map +1 -0
  28. package/dist/countdown.d.ts +46 -0
  29. package/dist/countdown.js +74 -0
  30. package/dist/countdown.js.map +1 -0
  31. package/dist/dialog.d.ts +155 -0
  32. package/dist/dialog.js +157 -0
  33. package/dist/dialog.js.map +1 -0
  34. package/dist/dropdown-menu.d.ts +71 -0
  35. package/dist/dropdown-menu.js +66 -0
  36. package/dist/dropdown-menu.js.map +1 -0
  37. package/dist/empty-state.d.ts +63 -0
  38. package/dist/empty-state.js +26 -0
  39. package/dist/empty-state.js.map +1 -0
  40. package/dist/field.d.ts +80 -0
  41. package/dist/field.js +47 -0
  42. package/dist/field.js.map +1 -0
  43. package/dist/index.d.ts +6 -6
  44. package/dist/kbd.d.ts +24 -0
  45. package/dist/kbd.js +16 -0
  46. package/dist/kbd.js.map +1 -0
  47. package/dist/page-header.d.ts +77 -0
  48. package/dist/page-header.js +32 -0
  49. package/dist/page-header.js.map +1 -0
  50. package/dist/popover.d.ts +18 -0
  51. package/dist/popover.js +34 -0
  52. package/dist/popover.js.map +1 -0
  53. package/dist/separator.d.ts +24 -0
  54. package/dist/separator.js +17 -0
  55. package/dist/separator.js.map +1 -0
  56. package/dist/skeleton.d.ts +28 -0
  57. package/dist/skeleton.js +18 -0
  58. package/dist/skeleton.js.map +1 -0
  59. package/dist/slot.d.ts +11 -0
  60. package/dist/slot.js +9 -0
  61. package/dist/slot.js.map +1 -0
  62. package/dist/spinner.d.ts +31 -0
  63. package/dist/spinner.js +31 -0
  64. package/dist/spinner.js.map +1 -0
  65. package/dist/stat.d.ts +75 -0
  66. package/dist/stat.js +42 -0
  67. package/dist/stat.js.map +1 -0
  68. package/dist/theme.d.ts +95 -0
  69. package/dist/theme.js +119 -0
  70. package/dist/theme.js.map +1 -0
  71. package/dist/toast.d.ts +32 -0
  72. package/dist/toast.js +49 -0
  73. package/dist/toast.js.map +1 -0
  74. package/dist/tooltip.d.ts +21 -0
  75. package/dist/tooltip.js +44 -0
  76. package/dist/tooltip.js.map +1 -0
  77. package/package.json +333 -7
@@ -0,0 +1,26 @@
1
+ // src/empty-state/empty-state.tsx
2
+ import { tv } from "tailwind-variants";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var emptyState = tv({
5
+ slots: {
6
+ root: "flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border-default px-6 py-10 text-center",
7
+ icon: "flex h-12 w-12 items-center justify-center rounded-full bg-surface-2 text-fg-secondary [&>svg]:h-6 [&>svg]:w-6",
8
+ title: "text-sm font-semibold text-fg",
9
+ description: "max-w-sm text-sm text-fg-secondary",
10
+ action: "mt-1 flex flex-wrap items-center justify-center gap-2"
11
+ }
12
+ });
13
+ var s = emptyState();
14
+ function EmptyState({ icon, title, description, action, className, ...props }) {
15
+ return /* @__PURE__ */ jsxs("div", { role: "status", className: s.root({ className }), ...props, children: [
16
+ icon && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: s.icon(), children: icon }),
17
+ /* @__PURE__ */ jsx("p", { className: s.title(), children: title }),
18
+ description && /* @__PURE__ */ jsx("p", { className: s.description(), children: description }),
19
+ action && /* @__PURE__ */ jsx("div", { className: s.action(), children: action })
20
+ ] });
21
+ }
22
+ export {
23
+ EmptyState,
24
+ emptyState
25
+ };
26
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/empty-state/empty-state.tsx"],"sourcesContent":["// Server-safe. What a list, a search or a panel says when it has nothing to show — every word is a prop.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const emptyState = tv({\n slots: {\n root: \"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border-default px-6 py-10 text-center\",\n icon: \"flex h-12 w-12 items-center justify-center rounded-full bg-surface-2 text-fg-secondary [&>svg]:h-6 [&>svg]:w-6\",\n title: \"text-sm font-semibold text-fg\",\n description: \"max-w-sm text-sm text-fg-secondary\",\n action: \"mt-1 flex flex-wrap items-center justify-center gap-2\",\n },\n});\nconst s = emptyState();\n\nexport type EmptyStateProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** A decorative icon (hidden from assistive technology). */\n icon?: React.ReactNode;\n title: React.ReactNode;\n description?: React.ReactNode;\n /** What to do next: a Button, a link. */\n action?: React.ReactNode;\n};\n\nexport function EmptyState({ icon, title, description, action, className, ...props }: EmptyStateProps) {\n return (\n <div role=\"status\" className={s.root({ className })} {...props}>\n {icon && (\n <div aria-hidden className={s.icon()}>\n {icon}\n </div>\n )}\n <p className={s.title()}>{title}</p>\n {description && <p className={s.description()}>{description}</p>}\n {action && <div className={s.action()}>{action}</div>}\n </div>\n );\n}\n"],"mappings":";AAEA,SAAS,UAAU;AAwBf,SAEI,KAFJ;AAtBG,IAAM,aAAa,GAAG;AAAA,EAC3B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,QAAQ;AAAA,EACV;AACF,CAAC;AACD,IAAM,IAAI,WAAW;AAWd,SAAS,WAAW,EAAE,MAAM,OAAO,aAAa,QAAQ,WAAW,GAAG,MAAM,GAAoB;AACrG,SACE,qBAAC,SAAI,MAAK,UAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACtD;AAAA,YACC,oBAAC,SAAI,eAAW,MAAC,WAAW,EAAE,KAAK,GAChC,gBACH;AAAA,IAEF,oBAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,IAC/B,eAAe,oBAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,IAC3D,UAAU,oBAAC,SAAI,WAAW,EAAE,OAAO,GAAI,kBAAO;AAAA,KACjD;AAEJ;","names":[]}
@@ -0,0 +1,80 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as React from 'react';
3
+
4
+ declare const field: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_variants.ClassValue | {
7
+ root?: tailwind_variants.ClassValue;
8
+ label?: tailwind_variants.ClassValue;
9
+ hint?: tailwind_variants.ClassValue;
10
+ error?: tailwind_variants.ClassValue;
11
+ selectWrap?: tailwind_variants.ClassValue;
12
+ chevron?: tailwind_variants.ClassValue;
13
+ control?: tailwind_variants.ClassValue;
14
+ };
15
+ };
16
+ } | {
17
+ [x: string]: {
18
+ [x: string]: tailwind_variants.ClassValue | {
19
+ root?: tailwind_variants.ClassValue;
20
+ label?: tailwind_variants.ClassValue;
21
+ hint?: tailwind_variants.ClassValue;
22
+ error?: tailwind_variants.ClassValue;
23
+ selectWrap?: tailwind_variants.ClassValue;
24
+ chevron?: tailwind_variants.ClassValue;
25
+ control?: tailwind_variants.ClassValue;
26
+ };
27
+ };
28
+ } | {}, {
29
+ root: string;
30
+ label: string;
31
+ control: string;
32
+ hint: string;
33
+ error: string;
34
+ selectWrap: string;
35
+ chevron: string;
36
+ }, undefined, {
37
+ [key: string]: {
38
+ [key: string]: tailwind_variants.ClassValue | {
39
+ root?: tailwind_variants.ClassValue;
40
+ label?: tailwind_variants.ClassValue;
41
+ hint?: tailwind_variants.ClassValue;
42
+ error?: tailwind_variants.ClassValue;
43
+ selectWrap?: tailwind_variants.ClassValue;
44
+ chevron?: tailwind_variants.ClassValue;
45
+ control?: tailwind_variants.ClassValue;
46
+ };
47
+ };
48
+ } | {}, {
49
+ root: string;
50
+ label: string;
51
+ control: string;
52
+ hint: string;
53
+ error: string;
54
+ selectWrap: string;
55
+ chevron: string;
56
+ }, tailwind_variants.TVReturnTypeLike<unknown, {
57
+ root: string;
58
+ label: string;
59
+ control: string;
60
+ hint: string;
61
+ error: string;
62
+ selectWrap: string;
63
+ chevron: string;
64
+ }>>;
65
+ declare const Field: {
66
+ Root: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
67
+ Label: ({ className, ...props }: React.ComponentProps<"label">) => React.JSX.Element;
68
+ Hint: ({ className, ...props }: React.ComponentProps<"p">) => React.JSX.Element;
69
+ Error: ({ className, ...props }: React.ComponentProps<"p">) => React.JSX.Element;
70
+ };
71
+ type ControlProps = {
72
+ /** Marks the control invalid: aria-invalid and data-invalid (pair it with a `Field.Error` in aria-describedby). */
73
+ invalid?: boolean;
74
+ };
75
+ declare function Input({ invalid, className, ...props }: React.ComponentProps<"input"> & ControlProps): React.JSX.Element;
76
+ declare function Textarea({ invalid, className, ...props }: React.ComponentProps<"textarea"> & ControlProps): React.JSX.Element;
77
+ /** A native <select>, styled like the other controls (the platform's menu: accessible and right on phones). */
78
+ declare function Select({ invalid, className, ...props }: React.ComponentProps<"select"> & ControlProps): React.JSX.Element;
79
+
80
+ export { Field, Input, Select, Textarea, field };
package/dist/field.js ADDED
@@ -0,0 +1,47 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-CPMZS4XA.js";
4
+
5
+ // src/field/field.tsx
6
+ import { tv } from "tailwind-variants";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ var field = tv({
9
+ slots: {
10
+ root: "flex flex-col gap-1.5",
11
+ label: "text-xs font-semibold text-fg-secondary",
12
+ control: "flex h-11 w-full rounded-lg border border-border-default bg-surface-2 px-3 text-sm text-fg placeholder:text-fg-muted transition-[border-color,box-shadow] focus-visible:border-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/30",
13
+ hint: "text-xs text-fg-secondary",
14
+ // The danger token is too light for small text on a light surface: the message is a text role, the dot says danger.
15
+ error: "flex items-center gap-1.5 text-xs font-medium text-fg before:h-1.5 before:w-1.5 before:shrink-0 before:rounded-full before:bg-danger",
16
+ selectWrap: "relative flex w-full",
17
+ chevron: "pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fg-secondary"
18
+ }
19
+ });
20
+ var s = field();
21
+ var Field = {
22
+ Root: ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: s.root({ className }), ...props }),
23
+ Label: ({ className, ...props }) => /* @__PURE__ */ jsx("label", { className: s.label({ className }), ...props }),
24
+ Hint: ({ className, ...props }) => /* @__PURE__ */ jsx("p", { className: s.hint({ className }), ...props }),
25
+ Error: ({ className, ...props }) => /* @__PURE__ */ jsx("p", { role: "alert", className: s.error({ className }), ...props })
26
+ };
27
+ var invalidProps = (invalid) => invalid ? { "aria-invalid": true, "data-invalid": "" } : {};
28
+ function Input({ invalid, className, ...props }) {
29
+ return /* @__PURE__ */ jsx("input", { ...invalidProps(invalid), className: s.control({ className }), ...props });
30
+ }
31
+ function Textarea({ invalid, className, ...props }) {
32
+ return /* @__PURE__ */ jsx("textarea", { ...invalidProps(invalid), className: s.control({ className: cn("h-auto min-h-24 py-2", className) }), ...props });
33
+ }
34
+ function Select({ invalid, className, ...props }) {
35
+ return /* @__PURE__ */ jsxs("span", { className: s.selectWrap(), children: [
36
+ /* @__PURE__ */ jsx("select", { ...invalidProps(invalid), className: s.control({ className: cn("appearance-none pr-9", className) }), ...props }),
37
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, className: s.chevron(), children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) })
38
+ ] });
39
+ }
40
+ export {
41
+ Field,
42
+ Input,
43
+ Select,
44
+ Textarea,
45
+ field
46
+ };
47
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/field/field.tsx"],"sourcesContent":["// Server-safe. The label ↔ control wiring is HTML (htmlFor / id, aria-describedby): no context.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\n\nexport const field = tv({\n slots: {\n root: \"flex flex-col gap-1.5\",\n label: \"text-xs font-semibold text-fg-secondary\",\n control:\n \"flex h-11 w-full rounded-lg border border-border-default bg-surface-2 px-3 text-sm text-fg placeholder:text-fg-muted \" +\n \"transition-[border-color,box-shadow] focus-visible:border-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring \" +\n \"disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/30\",\n hint: \"text-xs text-fg-secondary\",\n // The danger token is too light for small text on a light surface: the message is a text role, the dot says danger.\n error: \"flex items-center gap-1.5 text-xs font-medium text-fg before:h-1.5 before:w-1.5 before:shrink-0 before:rounded-full before:bg-danger\",\n selectWrap: \"relative flex w-full\",\n chevron: \"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fg-secondary\",\n },\n});\nconst s = field();\n\nexport const Field = {\n Root: ({ className, ...props }: React.ComponentProps<\"div\">) => <div className={s.root({ className })} {...props} />,\n Label: ({ className, ...props }: React.ComponentProps<\"label\">) => <label className={s.label({ className })} {...props} />,\n Hint: ({ className, ...props }: React.ComponentProps<\"p\">) => <p className={s.hint({ className })} {...props} />,\n Error: ({ className, ...props }: React.ComponentProps<\"p\">) => <p role=\"alert\" className={s.error({ className })} {...props} />,\n};\n\ntype ControlProps = {\n /** Marks the control invalid: aria-invalid and data-invalid (pair it with a `Field.Error` in aria-describedby). */\n invalid?: boolean;\n};\n\nconst invalidProps = (invalid?: boolean) => (invalid ? { \"aria-invalid\": true as const, \"data-invalid\": \"\" } : {});\n\nexport function Input({ invalid, className, ...props }: React.ComponentProps<\"input\"> & ControlProps) {\n return <input {...invalidProps(invalid)} className={s.control({ className })} {...props} />;\n}\n\nexport function Textarea({ invalid, className, ...props }: React.ComponentProps<\"textarea\"> & ControlProps) {\n return <textarea {...invalidProps(invalid)} className={s.control({ className: cn(\"h-auto min-h-24 py-2\", className) })} {...props} />;\n}\n\n/** A native <select>, styled like the other controls (the platform's menu: accessible and right on phones). */\nexport function Select({ invalid, className, ...props }: React.ComponentProps<\"select\"> & ControlProps) {\n return (\n <span className={s.selectWrap()}>\n <select {...invalidProps(invalid)} className={s.control({ className: cn(\"appearance-none pr-9\", className) })} {...props} />\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden className={s.chevron()}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </span>\n );\n}\n"],"mappings":";;;;;AAEA,SAAS,UAAU;AAsB+C,cAwB9D,YAxB8D;AAlB3D,IAAM,QAAQ,GAAG;AAAA,EACtB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SACE;AAAA,IAGF,MAAM;AAAA;AAAA,IAEN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,SAAS;AAAA,EACX;AACF,CAAC;AACD,IAAM,IAAI,MAAM;AAET,IAAM,QAAQ;AAAA,EACnB,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,MAAmC,oBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAAA,EAClH,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,MAAqC,oBAAC,WAAM,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAAA,EACxH,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,MAAiC,oBAAC,OAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAAA,EAC9G,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,MAAiC,oBAAC,OAAE,MAAK,SAAQ,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC/H;AAOA,IAAM,eAAe,CAAC,YAAuB,UAAU,EAAE,gBAAgB,MAAe,gBAAgB,GAAG,IAAI,CAAC;AAEzG,SAAS,MAAM,EAAE,SAAS,WAAW,GAAG,MAAM,GAAiD;AACpG,SAAO,oBAAC,WAAO,GAAG,aAAa,OAAO,GAAG,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC3F;AAEO,SAAS,SAAS,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoD;AAC1G,SAAO,oBAAC,cAAU,GAAG,aAAa,OAAO,GAAG,WAAW,EAAE,QAAQ,EAAE,WAAW,GAAG,wBAAwB,SAAS,EAAE,CAAC,GAAI,GAAG,OAAO;AACrI;AAGO,SAAS,OAAO,EAAE,SAAS,WAAW,GAAG,MAAM,GAAkD;AACtG,SACE,qBAAC,UAAK,WAAW,EAAE,WAAW,GAC5B;AAAA,wBAAC,YAAQ,GAAG,aAAa,OAAO,GAAG,WAAW,EAAE,QAAQ,EAAE,WAAW,GAAG,wBAAwB,SAAS,EAAE,CAAC,GAAI,GAAG,OAAO;AAAA,IAC1H,oBAAC,SAAI,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MAAC,WAAW,EAAE,QAAQ,GACvJ,8BAAC,UAAK,GAAE,gBAAe,GACzB;AAAA,KACF;AAEJ;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
 
3
3
  /** Joins class names, skipping the falsy ones. */
4
4
  declare function cx(...parts: Array<string | false | null | undefined>): string;
@@ -14,22 +14,22 @@ interface MarkProps {
14
14
  }
15
15
 
16
16
  /** The Krizaka mark: a hexagonal shield with a neural core, inside slow orbits. Blue accent: `--kz-accent`. */
17
- declare function KrizakaLogo({ size, animated, title, className }: MarkProps): react.JSX.Element;
17
+ declare function KrizakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
18
18
 
19
19
  /** The Orazaka mark: three shards orbiting slowly around an amber core that breathes. */
20
- declare function OrazakaLogo({ size, animated, title, className }: MarkProps): react.JSX.Element;
20
+ declare function OrazakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
21
21
 
22
22
  /**
23
23
  * The Orochia mark: the serpent (Orochi) coiled into an "O" around the flame it guards. The orbit turns, scales slide
24
24
  * along the body, the eye and the flame breathe. Below 48 px it crops to the serpent: the orbits would be hairlines.
25
25
  */
26
- declare function OrochiaLogo({ size, animated, title, className }: MarkProps): react.JSX.Element;
26
+ declare function OrochiaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
27
27
 
28
28
  type BrandId = "krizaka" | "orazaka" | "orochia";
29
29
  /** The mark of a Krizaka brand by id — for navigation, cards and lists driven by data. */
30
30
  declare function ProductLogo({ id, ...props }: MarkProps & {
31
31
  id: BrandId;
32
- }): react.JSX.Element;
32
+ }): React.JSX.Element;
33
33
 
34
34
  /**
35
35
  * Mount once at the root of the app. It reveals every `[data-reveal]` element as it enters the viewport — including
@@ -48,6 +48,6 @@ declare function RotatingWord({ words, interval, className }: {
48
48
  words: readonly string[];
49
49
  interval?: number;
50
50
  className?: string;
51
- }): react.JSX.Element;
51
+ }): React.JSX.Element;
52
52
 
53
53
  export { type BrandId, KrizakaLogo, type MarkProps, MotionObserver, OrazakaLogo, OrochiaLogo, ProductLogo, RotatingWord, cx };
package/dist/kbd.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as React from 'react';
4
+
5
+ declare const kbdVariants: tailwind_variants.TVReturnType<{
6
+ size: {
7
+ sm: "h-5 min-w-5 px-1 text-[10px]";
8
+ md: "h-6 min-w-6 px-1.5 text-xs";
9
+ };
10
+ }, undefined, string, {
11
+ size: {
12
+ sm: "h-5 min-w-5 px-1 text-[10px]";
13
+ md: "h-6 min-w-6 px-1.5 text-xs";
14
+ };
15
+ }, undefined, tailwind_variants.TVReturnTypeLike<{
16
+ size: {
17
+ sm: "h-5 min-w-5 px-1 text-[10px]";
18
+ md: "h-6 min-w-6 px-1.5 text-xs";
19
+ };
20
+ }, undefined>>;
21
+ type KbdProps = React.ComponentProps<"kbd"> & VariantProps<typeof kbdVariants>;
22
+ declare function Kbd({ size, className, ...props }: KbdProps): React.JSX.Element;
23
+
24
+ export { Kbd, type KbdProps, kbdVariants };
package/dist/kbd.js ADDED
@@ -0,0 +1,16 @@
1
+ // src/kbd/kbd.tsx
2
+ import { tv } from "tailwind-variants";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var kbdVariants = tv({
5
+ base: "inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 font-mono font-semibold text-fg-secondary",
6
+ variants: { size: { sm: "h-5 min-w-5 px-1 text-[10px]", md: "h-6 min-w-6 px-1.5 text-xs" } },
7
+ defaultVariants: { size: "md" }
8
+ });
9
+ function Kbd({ size, className, ...props }) {
10
+ return /* @__PURE__ */ jsx("kbd", { className: kbdVariants({ size, className }), ...props });
11
+ }
12
+ export {
13
+ Kbd,
14
+ kbdVariants
15
+ };
16
+ //# sourceMappingURL=kbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/kbd/kbd.tsx"],"sourcesContent":["// Server-safe. A key, or a shortcut of several (`<Kbd>⌘</Kbd><Kbd>K</Kbd>`).\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const kbdVariants = tv({\n base:\n \"inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 \" +\n \"font-mono font-semibold text-fg-secondary\",\n variants: { size: { sm: \"h-5 min-w-5 px-1 text-[10px]\", md: \"h-6 min-w-6 px-1.5 text-xs\" } },\n defaultVariants: { size: \"md\" },\n});\n\nexport type KbdProps = React.ComponentProps<\"kbd\"> & VariantProps<typeof kbdVariants>;\n\nexport function Kbd({ size, className, ...props }: KbdProps) {\n return <kbd className={kbdVariants({ size, className })} {...props} />;\n}\n"],"mappings":";AAEA,SAAS,UAA6B;AAa7B;AAXF,IAAM,cAAc,GAAG;AAAA,EAC5B,MACE;AAAA,EAEF,UAAU,EAAE,MAAM,EAAE,IAAI,gCAAgC,IAAI,6BAA6B,EAAE;AAAA,EAC3F,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;AAIM,SAAS,IAAI,EAAE,MAAM,WAAW,GAAG,MAAM,GAAa;AAC3D,SAAO,oBAAC,SAAI,WAAW,YAAY,EAAE,MAAM,UAAU,CAAC,GAAI,GAAG,OAAO;AACtE;","names":[]}
@@ -0,0 +1,77 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as React from 'react';
3
+
4
+ declare const pageHeader: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_variants.ClassValue | {
7
+ root?: tailwind_variants.ClassValue;
8
+ breadcrumb?: tailwind_variants.ClassValue;
9
+ row?: tailwind_variants.ClassValue;
10
+ text?: tailwind_variants.ClassValue;
11
+ title?: tailwind_variants.ClassValue;
12
+ description?: tailwind_variants.ClassValue;
13
+ actions?: tailwind_variants.ClassValue;
14
+ };
15
+ };
16
+ } | {
17
+ [x: string]: {
18
+ [x: string]: tailwind_variants.ClassValue | {
19
+ root?: tailwind_variants.ClassValue;
20
+ breadcrumb?: tailwind_variants.ClassValue;
21
+ row?: tailwind_variants.ClassValue;
22
+ text?: tailwind_variants.ClassValue;
23
+ title?: tailwind_variants.ClassValue;
24
+ description?: tailwind_variants.ClassValue;
25
+ actions?: tailwind_variants.ClassValue;
26
+ };
27
+ };
28
+ } | {}, {
29
+ root: string;
30
+ breadcrumb: string;
31
+ row: string;
32
+ text: string;
33
+ title: string;
34
+ description: string;
35
+ actions: string;
36
+ }, undefined, {
37
+ [key: string]: {
38
+ [key: string]: tailwind_variants.ClassValue | {
39
+ root?: tailwind_variants.ClassValue;
40
+ breadcrumb?: tailwind_variants.ClassValue;
41
+ row?: tailwind_variants.ClassValue;
42
+ text?: tailwind_variants.ClassValue;
43
+ title?: tailwind_variants.ClassValue;
44
+ description?: tailwind_variants.ClassValue;
45
+ actions?: tailwind_variants.ClassValue;
46
+ };
47
+ };
48
+ } | {}, {
49
+ root: string;
50
+ breadcrumb: string;
51
+ row: string;
52
+ text: string;
53
+ title: string;
54
+ description: string;
55
+ actions: string;
56
+ }, tailwind_variants.TVReturnTypeLike<unknown, {
57
+ root: string;
58
+ breadcrumb: string;
59
+ row: string;
60
+ text: string;
61
+ title: string;
62
+ description: string;
63
+ actions: string;
64
+ }>>;
65
+ type PageHeaderProps = Omit<React.ComponentProps<"div">, "title"> & {
66
+ title: React.ReactNode;
67
+ description?: React.ReactNode;
68
+ /** The page's actions: Buttons, a DropdownMenu. */
69
+ actions?: React.ReactNode;
70
+ /** A breadcrumb (the product's own <nav aria-label>), shown above the title. */
71
+ breadcrumb?: React.ReactNode;
72
+ /** The heading level of the title: `h1` for a page, `h2` for a section that looks like one. */
73
+ as?: "h1" | "h2";
74
+ };
75
+ declare function PageHeader({ title, description, actions, breadcrumb, as: Heading, className, ...props }: PageHeaderProps): React.JSX.Element;
76
+
77
+ export { PageHeader, type PageHeaderProps, pageHeader };
@@ -0,0 +1,32 @@
1
+ // src/page-header/page-header.tsx
2
+ import { tv } from "tailwind-variants";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var pageHeader = tv({
5
+ slots: {
6
+ root: "flex flex-col gap-3 border-b border-border-subtle pb-6",
7
+ breadcrumb: "text-xs text-fg-secondary",
8
+ row: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",
9
+ text: "flex min-w-0 flex-col gap-1.5",
10
+ title: "font-display text-2xl font-black tracking-tight text-fg sm:text-3xl",
11
+ description: "max-w-2xl text-sm text-fg-secondary",
12
+ actions: "flex shrink-0 flex-wrap items-center gap-2"
13
+ }
14
+ });
15
+ var s = pageHeader();
16
+ function PageHeader({ title, description, actions, breadcrumb, as: Heading = "h1", className, ...props }) {
17
+ return /* @__PURE__ */ jsxs("div", { className: s.root({ className }), ...props, children: [
18
+ breadcrumb && /* @__PURE__ */ jsx("div", { className: s.breadcrumb(), children: breadcrumb }),
19
+ /* @__PURE__ */ jsxs("div", { className: s.row(), children: [
20
+ /* @__PURE__ */ jsxs("div", { className: s.text(), children: [
21
+ /* @__PURE__ */ jsx(Heading, { className: s.title(), children: title }),
22
+ description && /* @__PURE__ */ jsx("p", { className: s.description(), children: description })
23
+ ] }),
24
+ actions && /* @__PURE__ */ jsx("div", { className: s.actions(), children: actions })
25
+ ] })
26
+ ] });
27
+ }
28
+ export {
29
+ PageHeader,
30
+ pageHeader
31
+ };
32
+ //# sourceMappingURL=page-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/page-header/page-header.tsx"],"sourcesContent":["// Server-safe. The top of a page: an optional breadcrumb, the title (h1), a description and the page's actions.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const pageHeader = tv({\n slots: {\n root: \"flex flex-col gap-3 border-b border-border-subtle pb-6\",\n breadcrumb: \"text-xs text-fg-secondary\",\n row: \"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\",\n text: \"flex min-w-0 flex-col gap-1.5\",\n title: \"font-display text-2xl font-black tracking-tight text-fg sm:text-3xl\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n },\n});\nconst s = pageHeader();\n\nexport type PageHeaderProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n title: React.ReactNode;\n description?: React.ReactNode;\n /** The page's actions: Buttons, a DropdownMenu. */\n actions?: React.ReactNode;\n /** A breadcrumb (the product's own <nav aria-label>), shown above the title. */\n breadcrumb?: React.ReactNode;\n /** The heading level of the title: `h1` for a page, `h2` for a section that looks like one. */\n as?: \"h1\" | \"h2\";\n};\n\nexport function PageHeader({ title, description, actions, breadcrumb, as: Heading = \"h1\", className, ...props }: PageHeaderProps) {\n return (\n <div className={s.root({ className })} {...props}>\n {breadcrumb && <div className={s.breadcrumb()}>{breadcrumb}</div>}\n <div className={s.row()}>\n <div className={s.text()}>\n <Heading className={s.title()}>{title}</Heading>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n </div>\n );\n}\n"],"mappings":";AAEA,SAAS,UAAU;AA6BE,cAEb,YAFa;AA3Bd,IAAM,aAAa,GAAG;AAAA,EAC3B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AACF,CAAC;AACD,IAAM,IAAI,WAAW;AAad,SAAS,WAAW,EAAE,OAAO,aAAa,SAAS,YAAY,IAAI,UAAU,MAAM,WAAW,GAAG,MAAM,GAAoB;AAChI,SACE,qBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACxC;AAAA,kBAAc,oBAAC,SAAI,WAAW,EAAE,WAAW,GAAI,sBAAW;AAAA,IAC3D,qBAAC,SAAI,WAAW,EAAE,IAAI,GACpB;AAAA,2BAAC,SAAI,WAAW,EAAE,KAAK,GACrB;AAAA,4BAAC,WAAQ,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,QACrC,eAAe,oBAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,SAC9D;AAAA,MACC,WAAW,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,OACpD;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,18 @@
1
+ import { Popover as Popover$1 } from 'radix-ui';
2
+ import * as React from 'react';
3
+
4
+ type PopoverContentProps = React.ComponentProps<typeof Popover$1.Content> & {
5
+ /** The element the portal renders into (default: document.body). */
6
+ container?: HTMLElement | null;
7
+ };
8
+ declare function PopoverContent({ sideOffset, collisionPadding, container, className, ...props }: PopoverContentProps): React.JSX.Element;
9
+ /** `Popover.Root/Trigger/Anchor/Content/Close`. `open`/`defaultOpen` + `onOpenChange`. */
10
+ declare const Popover: {
11
+ Root: React.FC<Popover$1.PopoverProps>;
12
+ Trigger: React.ForwardRefExoticComponent<Popover$1.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
13
+ Anchor: React.ForwardRefExoticComponent<Popover$1.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
14
+ Close: React.ForwardRefExoticComponent<Popover$1.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
15
+ Content: typeof PopoverContent;
16
+ };
17
+
18
+ export { Popover, PopoverContent, type PopoverContentProps };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import {
3
+ floating
4
+ } from "./chunk-J3NC6ER4.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-RLOXWF2G.js";
8
+
9
+ // src/popover/popover.tsx
10
+ import { Popover as PopoverPrimitive } from "radix-ui";
11
+ import { jsx } from "react/jsx-runtime";
12
+ function PopoverContent({ sideOffset = 8, collisionPadding = 8, container, className, ...props }) {
13
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container, children: /* @__PURE__ */ jsx(
14
+ PopoverPrimitive.Content,
15
+ {
16
+ sideOffset,
17
+ collisionPadding,
18
+ className: cn(floating, "w-72 max-w-(--radix-popover-content-available-width) p-4 origin-(--radix-popover-content-transform-origin)", className),
19
+ ...props
20
+ }
21
+ ) });
22
+ }
23
+ var Popover = {
24
+ Root: PopoverPrimitive.Root,
25
+ Trigger: PopoverPrimitive.Trigger,
26
+ Anchor: PopoverPrimitive.Anchor,
27
+ Close: PopoverPrimitive.Close,
28
+ Content: PopoverContent
29
+ };
30
+ export {
31
+ Popover,
32
+ PopoverContent
33
+ };
34
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover/popover.tsx"],"sourcesContent":["// Client (a portal). Radix places the content, traps nothing, closes on Escape and on an outside click, and returns\n// the focus to the trigger.\nimport { Popover as PopoverPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { floating } from \"../floating\";\n\nexport type PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Content> & {\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n};\n\nexport function PopoverContent({ sideOffset = 8, collisionPadding = 8, container, className, ...props }: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(floating, \"w-72 max-w-(--radix-popover-content-available-width) p-4 origin-(--radix-popover-content-transform-origin)\", className)}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n/** `Popover.Root/Trigger/Anchor/Content/Close`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const Popover = {\n Root: PopoverPrimitive.Root,\n Trigger: PopoverPrimitive.Trigger,\n Anchor: PopoverPrimitive.Anchor,\n Close: PopoverPrimitive.Close,\n Content: PopoverContent,\n};\n"],"mappings":";;;;;;;;;AAEA,SAAS,WAAW,wBAAwB;AActC;AAHC,SAAS,eAAe,EAAE,aAAa,GAAG,mBAAmB,GAAG,WAAW,WAAW,GAAG,MAAM,GAAwB;AAC5H,SACE,oBAAC,iBAAiB,QAAjB,EAAwB,WACvB;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,GAAG,UAAU,8GAA8G,SAAS;AAAA,MAC9I,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAGO,IAAM,UAAU;AAAA,EACrB,MAAM,iBAAiB;AAAA,EACvB,SAAS,iBAAiB;AAAA,EAC1B,QAAQ,iBAAiB;AAAA,EACzB,OAAO,iBAAiB;AAAA,EACxB,SAAS;AACX;","names":[]}
@@ -0,0 +1,24 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { Separator as Separator$1 } from 'radix-ui';
3
+ import * as React from 'react';
4
+
5
+ declare const separatorVariants: tailwind_variants.TVReturnType<{
6
+ orientation: {
7
+ horizontal: "h-px w-full";
8
+ vertical: "h-full w-px self-stretch";
9
+ };
10
+ }, undefined, "shrink-0 bg-border-default", {
11
+ orientation: {
12
+ horizontal: "h-px w-full";
13
+ vertical: "h-full w-px self-stretch";
14
+ };
15
+ }, undefined, tailwind_variants.TVReturnTypeLike<{
16
+ orientation: {
17
+ horizontal: "h-px w-full";
18
+ vertical: "h-full w-px self-stretch";
19
+ };
20
+ }, undefined>>;
21
+ type SeparatorProps = React.ComponentProps<typeof Separator$1.Root>;
22
+ declare function Separator({ orientation, decorative, className, ...props }: SeparatorProps): React.JSX.Element;
23
+
24
+ export { Separator, type SeparatorProps, separatorVariants };
@@ -0,0 +1,17 @@
1
+ // src/separator/separator.tsx
2
+ import { Separator as SeparatorPrimitive } from "radix-ui";
3
+ import { tv } from "tailwind-variants";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var separatorVariants = tv({
6
+ base: "shrink-0 bg-border-default",
7
+ variants: { orientation: { horizontal: "h-px w-full", vertical: "h-full w-px self-stretch" } },
8
+ defaultVariants: { orientation: "horizontal" }
9
+ });
10
+ function Separator({ orientation = "horizontal", decorative = true, className, ...props }) {
11
+ return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, { orientation, decorative, className: separatorVariants({ orientation, className }), ...props });
12
+ }
13
+ export {
14
+ Separator,
15
+ separatorVariants
16
+ };
17
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/separator/separator.tsx"],"sourcesContent":["// Server-safe. A line between groups: decorative by default (hidden from assistive technology), or a real\n// `role=\"separator\"` with `decorative={false}`.\nimport { Separator as SeparatorPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const separatorVariants = tv({\n base: \"shrink-0 bg-border-default\",\n variants: { orientation: { horizontal: \"h-px w-full\", vertical: \"h-full w-px self-stretch\" } },\n defaultVariants: { orientation: \"horizontal\" },\n});\n\nexport type SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive.Root>;\n\nexport function Separator({ orientation = \"horizontal\", decorative = true, className, ...props }: SeparatorProps) {\n return <SeparatorPrimitive.Root orientation={orientation} decorative={decorative} className={separatorVariants({ orientation, className })} {...props} />;\n}\n"],"mappings":";AAEA,SAAS,aAAa,0BAA0B;AAEhD,SAAS,UAAU;AAWV;AATF,IAAM,oBAAoB,GAAG;AAAA,EAClC,MAAM;AAAA,EACN,UAAU,EAAE,aAAa,EAAE,YAAY,eAAe,UAAU,2BAA2B,EAAE;AAAA,EAC7F,iBAAiB,EAAE,aAAa,aAAa;AAC/C,CAAC;AAIM,SAAS,UAAU,EAAE,cAAc,cAAc,aAAa,MAAM,WAAW,GAAG,MAAM,GAAmB;AAChH,SAAO,oBAAC,mBAAmB,MAAnB,EAAwB,aAA0B,YAAwB,WAAW,kBAAkB,EAAE,aAAa,UAAU,CAAC,GAAI,GAAG,OAAO;AACzJ;","names":[]}
@@ -0,0 +1,28 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as React from 'react';
4
+
5
+ declare const skeletonVariants: tailwind_variants.TVReturnType<{
6
+ shape: {
7
+ text: "h-3 w-full rounded-sm";
8
+ circle: "aspect-square h-10 rounded-full";
9
+ rect: "h-24 w-full rounded-lg";
10
+ };
11
+ }, undefined, "block bg-surface-3 motion-safe:animate-pulse", {
12
+ shape: {
13
+ text: "h-3 w-full rounded-sm";
14
+ circle: "aspect-square h-10 rounded-full";
15
+ rect: "h-24 w-full rounded-lg";
16
+ };
17
+ }, undefined, tailwind_variants.TVReturnTypeLike<{
18
+ shape: {
19
+ text: "h-3 w-full rounded-sm";
20
+ circle: "aspect-square h-10 rounded-full";
21
+ rect: "h-24 w-full rounded-lg";
22
+ };
23
+ }, undefined>>;
24
+ type SkeletonProps = React.ComponentProps<"span"> & VariantProps<typeof skeletonVariants>;
25
+ /** A pulsing shape the size of what is loading. Announce the wait elsewhere (aria-busy on the region, a Spinner). */
26
+ declare function Skeleton({ shape, className, ...props }: SkeletonProps): React.JSX.Element;
27
+
28
+ export { Skeleton, type SkeletonProps, skeletonVariants };
@@ -0,0 +1,18 @@
1
+ // src/skeleton/skeleton.tsx
2
+ import { tv } from "tailwind-variants";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var skeletonVariants = tv({
5
+ base: "block bg-surface-3 motion-safe:animate-pulse",
6
+ variants: {
7
+ shape: { text: "h-3 w-full rounded-sm", circle: "aspect-square h-10 rounded-full", rect: "h-24 w-full rounded-lg" }
8
+ },
9
+ defaultVariants: { shape: "text" }
10
+ });
11
+ function Skeleton({ shape, className, ...props }) {
12
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, "data-shape": shape ?? "text", className: skeletonVariants({ shape, className }), ...props });
13
+ }
14
+ export {
15
+ Skeleton,
16
+ skeletonVariants
17
+ };
18
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/skeleton/skeleton.tsx"],"sourcesContent":["// Server-safe. A placeholder for content on its way: decorative, so hidden from assistive technology.\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const skeletonVariants = tv({\n base: \"block bg-surface-3 motion-safe:animate-pulse\",\n variants: {\n shape: { text: \"h-3 w-full rounded-sm\", circle: \"aspect-square h-10 rounded-full\", rect: \"h-24 w-full rounded-lg\" },\n },\n defaultVariants: { shape: \"text\" },\n});\n\nexport type SkeletonProps = React.ComponentProps<\"span\"> & VariantProps<typeof skeletonVariants>;\n\n/** A pulsing shape the size of what is loading. Announce the wait elsewhere (aria-busy on the region, a Spinner). */\nexport function Skeleton({ shape, className, ...props }: SkeletonProps) {\n return <span aria-hidden data-shape={shape ?? \"text\"} className={skeletonVariants({ shape, className })} {...props} />;\n}\n"],"mappings":";AAEA,SAAS,UAA6B;AAc7B;AAZF,IAAM,mBAAmB,GAAG;AAAA,EACjC,MAAM;AAAA,EACN,UAAU;AAAA,IACR,OAAO,EAAE,MAAM,yBAAyB,QAAQ,mCAAmC,MAAM,yBAAyB;AAAA,EACpH;AAAA,EACA,iBAAiB,EAAE,OAAO,OAAO;AACnC,CAAC;AAKM,SAAS,SAAS,EAAE,OAAO,WAAW,GAAG,MAAM,GAAkB;AACtE,SAAO,oBAAC,UAAK,eAAW,MAAC,cAAY,SAAS,QAAQ,WAAW,iBAAiB,EAAE,OAAO,UAAU,CAAC,GAAI,GAAG,OAAO;AACtH;","names":[]}
package/dist/slot.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import * as React$1 from 'react';
2
+ import { VisuallyHidden as VisuallyHidden$1 } from 'radix-ui';
3
+
4
+ /** Merges its props, `className` and `ref` into its only child: the engine of every `asChild`. */
5
+ declare const Slot: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & {
6
+ children?: React.ReactNode;
7
+ } & React$1.RefAttributes<HTMLElement>>;
8
+ /** Hidden on screen, read by assistive technology. */
9
+ declare const VisuallyHidden: React$1.ForwardRefExoticComponent<VisuallyHidden$1.VisuallyHiddenProps & React$1.RefAttributes<HTMLSpanElement>>;
10
+
11
+ export { Slot, VisuallyHidden };
package/dist/slot.js ADDED
@@ -0,0 +1,9 @@
1
+ // src/slot/index.ts
2
+ import { Slot as SlotPrimitive, VisuallyHidden as VisuallyHiddenPrimitive } from "radix-ui";
3
+ var Slot = SlotPrimitive.Root;
4
+ var VisuallyHidden = VisuallyHiddenPrimitive.Root;
5
+ export {
6
+ Slot,
7
+ VisuallyHidden
8
+ };
9
+ //# sourceMappingURL=slot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/slot/index.ts"],"sourcesContent":["/** @krizaka/ui/slot — `Slot` (what `asChild` renders) and `VisuallyHidden` (a name for assistive technology only), from Radix. */\nimport { Slot as SlotPrimitive, VisuallyHidden as VisuallyHiddenPrimitive } from \"radix-ui\";\n\n/** Merges its props, `className` and `ref` into its only child: the engine of every `asChild`. */\nexport const Slot = SlotPrimitive.Root;\n/** Hidden on screen, read by assistive technology. */\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\n"],"mappings":";AACA,SAAS,QAAQ,eAAe,kBAAkB,+BAA+B;AAG1E,IAAM,OAAO,cAAc;AAE3B,IAAM,iBAAiB,wBAAwB;","names":[]}
@@ -0,0 +1,31 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as React from 'react';
4
+
5
+ declare const spinnerVariants: tailwind_variants.TVReturnType<{
6
+ size: {
7
+ sm: "h-4 w-4";
8
+ md: "h-6 w-6";
9
+ lg: "h-10 w-10";
10
+ };
11
+ }, undefined, "shrink-0 text-accent motion-safe:animate-spin", {
12
+ size: {
13
+ sm: "h-4 w-4";
14
+ md: "h-6 w-6";
15
+ lg: "h-10 w-10";
16
+ };
17
+ }, undefined, tailwind_variants.TVReturnTypeLike<{
18
+ size: {
19
+ sm: "h-4 w-4";
20
+ md: "h-6 w-6";
21
+ lg: "h-10 w-10";
22
+ };
23
+ }, undefined>>;
24
+ type SpinnerProps = Omit<React.ComponentProps<"svg">, "children"> & VariantProps<typeof spinnerVariants> & {
25
+ /** The accessible name of the wait, e.g. "Loading" — passed translated. */
26
+ label: string;
27
+ };
28
+ /** A turning ring with `role="status"` (it stops turning under prefers-reduced-motion). */
29
+ declare function Spinner({ label, size, className, ...props }: SpinnerProps): React.JSX.Element;
30
+
31
+ export { Spinner, type SpinnerProps, spinnerVariants };
@@ -0,0 +1,31 @@
1
+ // src/spinner/spinner.tsx
2
+ import { tv } from "tailwind-variants";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var spinnerVariants = tv({
5
+ base: "shrink-0 text-accent motion-safe:animate-spin",
6
+ variants: { size: { sm: "h-4 w-4", md: "h-6 w-6", lg: "h-10 w-10" } },
7
+ defaultVariants: { size: "md" }
8
+ });
9
+ function Spinner({ label, size, className, ...props }) {
10
+ return /* @__PURE__ */ jsxs(
11
+ "svg",
12
+ {
13
+ role: "status",
14
+ "aria-label": label,
15
+ viewBox: "0 0 24 24",
16
+ fill: "none",
17
+ "data-size": size ?? "md",
18
+ className: spinnerVariants({ size, className }),
19
+ ...props,
20
+ children: [
21
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "3" }),
22
+ /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
23
+ ]
24
+ }
25
+ );
26
+ }
27
+ export {
28
+ Spinner,
29
+ spinnerVariants
30
+ };
31
+ //# sourceMappingURL=spinner.js.map