@zedtech/zedkit-ui 0.1.1 → 0.2.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.
Files changed (106) hide show
  1. package/README.md +35 -9
  2. package/dist/alert.d.ts.map +1 -1
  3. package/dist/alert.js +1 -0
  4. package/dist/alert.js.map +1 -1
  5. package/dist/badge.d.ts.map +1 -1
  6. package/dist/badge.js.map +1 -1
  7. package/dist/button.d.ts.map +1 -1
  8. package/dist/button.js +1 -0
  9. package/dist/button.js.map +1 -1
  10. package/dist/card.d.ts.map +1 -1
  11. package/dist/card.js +1 -0
  12. package/dist/card.js.map +1 -1
  13. package/dist/checkbox.d.ts.map +1 -1
  14. package/dist/checkbox.js +1 -0
  15. package/dist/checkbox.js.map +1 -1
  16. package/dist/checkmark.d.ts +11 -0
  17. package/dist/checkmark.d.ts.map +1 -0
  18. package/dist/checkmark.js +12 -0
  19. package/dist/checkmark.js.map +1 -0
  20. package/dist/dialog.d.ts.map +1 -1
  21. package/dist/dialog.js +1 -0
  22. package/dist/dialog.js.map +1 -1
  23. package/dist/drawer.d.ts +30 -0
  24. package/dist/drawer.d.ts.map +1 -0
  25. package/dist/drawer.js +35 -0
  26. package/dist/drawer.js.map +1 -0
  27. package/dist/field.d.ts.map +1 -1
  28. package/dist/field.js +1 -0
  29. package/dist/field.js.map +1 -1
  30. package/dist/form.d.ts.map +1 -1
  31. package/dist/form.js +1 -0
  32. package/dist/form.js.map +1 -1
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +4 -0
  36. package/dist/index.js.map +1 -1
  37. package/dist/input.d.ts.map +1 -1
  38. package/dist/input.js +1 -0
  39. package/dist/input.js.map +1 -1
  40. package/dist/label.d.ts.map +1 -1
  41. package/dist/label.js +1 -0
  42. package/dist/label.js.map +1 -1
  43. package/dist/live-pulse.d.ts.map +1 -1
  44. package/dist/live-pulse.js +2 -1
  45. package/dist/live-pulse.js.map +1 -1
  46. package/dist/progress-bar.d.ts +16 -0
  47. package/dist/progress-bar.d.ts.map +1 -0
  48. package/dist/progress-bar.js +16 -0
  49. package/dist/progress-bar.js.map +1 -0
  50. package/dist/select.d.ts.map +1 -1
  51. package/dist/select.js +1 -0
  52. package/dist/select.js.map +1 -1
  53. package/dist/separator.d.ts.map +1 -1
  54. package/dist/separator.js +1 -0
  55. package/dist/separator.js.map +1 -1
  56. package/dist/skeleton.d.ts.map +1 -1
  57. package/dist/skeleton.js +1 -0
  58. package/dist/skeleton.js.map +1 -1
  59. package/dist/sonner.d.ts.map +1 -1
  60. package/dist/sonner.js +1 -0
  61. package/dist/sonner.js.map +1 -1
  62. package/dist/status-dot.d.ts +13 -0
  63. package/dist/status-dot.d.ts.map +1 -0
  64. package/dist/status-dot.js +20 -0
  65. package/dist/status-dot.js.map +1 -0
  66. package/dist/switch.d.ts.map +1 -1
  67. package/dist/switch.js +1 -0
  68. package/dist/switch.js.map +1 -1
  69. package/dist/table.d.ts.map +1 -1
  70. package/dist/table.js.map +1 -1
  71. package/dist/tabs.d.ts.map +1 -1
  72. package/dist/tabs.js +1 -0
  73. package/dist/tabs.js.map +1 -1
  74. package/dist/textarea.d.ts.map +1 -1
  75. package/dist/textarea.js +1 -0
  76. package/dist/textarea.js.map +1 -1
  77. package/dist/utils.d.ts.map +1 -1
  78. package/dist/utils.js +1 -0
  79. package/dist/utils.js.map +1 -1
  80. package/package.json +23 -3
  81. package/src/alert.tsx +1 -0
  82. package/src/badge.tsx +1 -0
  83. package/src/button.tsx +1 -0
  84. package/src/card.tsx +1 -0
  85. package/src/checkbox.tsx +1 -0
  86. package/src/checkmark.tsx +34 -0
  87. package/src/dialog.tsx +1 -0
  88. package/src/drawer.tsx +140 -0
  89. package/src/field.tsx +1 -0
  90. package/src/form.tsx +1 -0
  91. package/src/index.ts +16 -0
  92. package/src/input.tsx +1 -0
  93. package/src/label.tsx +1 -0
  94. package/src/live-pulse.tsx +2 -8
  95. package/src/progress-bar.tsx +45 -0
  96. package/src/select.tsx +1 -0
  97. package/src/separator.tsx +1 -0
  98. package/src/skeleton.tsx +1 -0
  99. package/src/sonner.tsx +1 -0
  100. package/src/status-dot.tsx +42 -0
  101. package/src/styles.css +15 -0
  102. package/src/switch.tsx +1 -0
  103. package/src/table.tsx +1 -0
  104. package/src/tabs.tsx +1 -0
  105. package/src/textarea.tsx +1 -0
  106. package/src/utils.ts +1 -0
@@ -0,0 +1,42 @@
1
+ import { cn } from "./utils.js";
2
+
3
+ export type StatusDotTone = "active" | "idle" | "success" | "warning" | "danger";
4
+
5
+ export interface StatusDotProps {
6
+ tone?: StatusDotTone;
7
+ /** Override the default ping (ongoing tones ping, others stay static). */
8
+ pulse?: boolean;
9
+ className?: string;
10
+ }
11
+
12
+ const TONE_COLOR: Record<StatusDotTone, string> = {
13
+ active: "bg-primary",
14
+ idle: "bg-muted-foreground/40",
15
+ success: "bg-success",
16
+ warning: "bg-warning",
17
+ danger: "bg-destructive",
18
+ };
19
+
20
+ const PING_TONES: ReadonlySet<StatusDotTone> = new Set(["active", "warning", "danger"]);
21
+
22
+ /**
23
+ * Decorative status dot: pings for ongoing tones (motion-safe), static
24
+ * otherwise. Pair with visible text (e.g. StatusLabel) — never alone.
25
+ */
26
+ export function StatusDot({ tone = "active", pulse, className }: StatusDotProps) {
27
+ const color = TONE_COLOR[tone];
28
+ const ping = pulse ?? PING_TONES.has(tone);
29
+ return (
30
+ <span aria-hidden className={cn("relative flex size-2", className)}>
31
+ {ping ? (
32
+ <span
33
+ className={cn(
34
+ "absolute inline-flex h-full w-full rounded-full opacity-60 motion-safe:animate-ping",
35
+ color,
36
+ )}
37
+ />
38
+ ) : null}
39
+ <span className={cn("relative inline-flex size-2 rounded-full", color)} />
40
+ </span>
41
+ );
42
+ }
package/src/styles.css CHANGED
@@ -1,3 +1,4 @@
1
+ /* Derived from shadcn/ui (theme) — see Provenance in packages/ui/README.md. Tolerated exception: migrated to custom code only when customization needs it. */
1
2
  @import "tailwindcss";
2
3
 
3
4
  /*
@@ -115,3 +116,17 @@
115
116
  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
116
117
  }
117
118
  }
119
+
120
+ /*
121
+ * Kit-authored motion (not shadcn): one draw-on keyframe for the
122
+ * Checkmark state icon. The path carries the animation only under
123
+ * `motion-safe:`, so reduced motion shows the static full check.
124
+ */
125
+ @keyframes zk-check-draw {
126
+ from {
127
+ stroke-dashoffset: 8;
128
+ }
129
+ to {
130
+ stroke-dashoffset: 0;
131
+ }
132
+ }
package/src/switch.tsx CHANGED
@@ -1,3 +1,4 @@
1
+ // Derived from shadcn/ui (switch) — see Provenance in packages/ui/README.md. Tolerated exception: migrated to custom code only when customization needs it.
1
2
  "use client";
2
3
 
3
4
  import * as React from "react";
package/src/table.tsx CHANGED
@@ -1,3 +1,4 @@
1
+ // Derived from shadcn/ui (table) — see Provenance in packages/ui/README.md. Tolerated exception: migrated to custom code only when customization needs it.
1
2
  import * as React from "react";
2
3
 
3
4
  import { cn } from "./utils.js";
package/src/tabs.tsx CHANGED
@@ -1,3 +1,4 @@
1
+ // Derived from shadcn/ui (tabs) — see Provenance in packages/ui/README.md. Tolerated exception: migrated to custom code only when customization needs it.
1
2
  "use client";
2
3
 
3
4
  import * as React from "react";
package/src/textarea.tsx CHANGED
@@ -1,3 +1,4 @@
1
+ // Derived from shadcn/ui (textarea) — see Provenance in packages/ui/README.md. Tolerated exception: migrated to custom code only when customization needs it.
1
2
  import * as React from "react";
2
3
 
3
4
  import { cn } from "./utils.js";
package/src/utils.ts CHANGED
@@ -1,3 +1,4 @@
1
+ // Derived from shadcn/ui (utils (cn)) — see Provenance in packages/ui/README.md. Tolerated exception: migrated to custom code only when customization needs it.
1
2
  import { clsx, type ClassValue } from "clsx";
2
3
  import { twMerge } from "tailwind-merge";
3
4