@kinetixui/ui 0.1.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 (81) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +1176 -0
  3. package/dist/index.js +3939 -0
  4. package/package.json +106 -0
  5. package/src/components/accordion.tsx +52 -0
  6. package/src/components/alert-dialog.tsx +115 -0
  7. package/src/components/alert.tsx +47 -0
  8. package/src/components/aspect-ratio.tsx +7 -0
  9. package/src/components/audio-player.tsx +150 -0
  10. package/src/components/avatar.tsx +76 -0
  11. package/src/components/badge.tsx +40 -0
  12. package/src/components/breadcrumb.tsx +77 -0
  13. package/src/components/button.tsx +119 -0
  14. package/src/components/calendar.tsx +60 -0
  15. package/src/components/card.tsx +50 -0
  16. package/src/components/carousel.tsx +181 -0
  17. package/src/components/chart.tsx +177 -0
  18. package/src/components/checkbox.tsx +38 -0
  19. package/src/components/circular-progress.tsx +67 -0
  20. package/src/components/code-block.tsx +96 -0
  21. package/src/components/collapsible.tsx +9 -0
  22. package/src/components/command.tsx +123 -0
  23. package/src/components/context-menu.tsx +132 -0
  24. package/src/components/data-table.tsx +92 -0
  25. package/src/components/date-picker.tsx +68 -0
  26. package/src/components/dialog.tsx +101 -0
  27. package/src/components/drawer.tsx +82 -0
  28. package/src/components/dropdown-menu.tsx +132 -0
  29. package/src/components/fab.tsx +58 -0
  30. package/src/components/field.tsx +128 -0
  31. package/src/components/file-upload.tsx +183 -0
  32. package/src/components/footer.tsx +62 -0
  33. package/src/components/form.tsx +130 -0
  34. package/src/components/hover-card.tsx +28 -0
  35. package/src/components/image.tsx +87 -0
  36. package/src/components/inform.tsx +82 -0
  37. package/src/components/input-group.tsx +96 -0
  38. package/src/components/input-otp.tsx +63 -0
  39. package/src/components/input.tsx +72 -0
  40. package/src/components/label.tsx +20 -0
  41. package/src/components/list.tsx +69 -0
  42. package/src/components/menubar.tsx +168 -0
  43. package/src/components/metric.tsx +51 -0
  44. package/src/components/modal.tsx +126 -0
  45. package/src/components/navigation-bar.tsx +49 -0
  46. package/src/components/navigation-menu.tsx +117 -0
  47. package/src/components/number-input.tsx +86 -0
  48. package/src/components/pagination.tsx +77 -0
  49. package/src/components/password-input.tsx +36 -0
  50. package/src/components/popover.tsx +32 -0
  51. package/src/components/progress.tsx +24 -0
  52. package/src/components/quote.tsx +34 -0
  53. package/src/components/radio-group.tsx +44 -0
  54. package/src/components/rating.tsx +88 -0
  55. package/src/components/resizable.tsx +40 -0
  56. package/src/components/scroll-area.tsx +39 -0
  57. package/src/components/select.tsx +124 -0
  58. package/src/components/separator.tsx +25 -0
  59. package/src/components/sheet.tsx +104 -0
  60. package/src/components/sidebar.tsx +390 -0
  61. package/src/components/skeleton.tsx +9 -0
  62. package/src/components/slider.tsx +24 -0
  63. package/src/components/sonner.tsx +30 -0
  64. package/src/components/spinner.tsx +43 -0
  65. package/src/components/stepper.tsx +75 -0
  66. package/src/components/switch.tsx +37 -0
  67. package/src/components/tab-bar.tsx +58 -0
  68. package/src/components/table-of-contents.tsx +46 -0
  69. package/src/components/table.tsx +70 -0
  70. package/src/components/tabs.tsx +54 -0
  71. package/src/components/tag.tsx +56 -0
  72. package/src/components/textarea.tsx +56 -0
  73. package/src/components/toggle-group.tsx +41 -0
  74. package/src/components/toggle.tsx +34 -0
  75. package/src/components/tooltip.tsx +31 -0
  76. package/src/index.ts +305 -0
  77. package/src/lib/utils.ts +7 -0
  78. package/src/stories/Button.stories.tsx +155 -0
  79. package/src/stories/Input.stories.tsx +80 -0
  80. package/src/stories/Textarea.stories.tsx +69 -0
  81. package/tailwind.config.ts +107 -0
@@ -0,0 +1,107 @@
1
+ import type { Config } from "tailwindcss";
2
+
3
+ /**
4
+ * Maps Tailwind utilities onto the KinetixUI semantic token contract
5
+ * (packages/tokens/dist/web/globals.css). Colours are emitted as HSL channels
6
+ * (`H S% L%`) so Tailwind's opacity modifiers work — `bg-primary/90`,
7
+ * `ring-ring/40`, etc. Consumers import the token CSS once, then use
8
+ * `bg-primary`, `text-muted-foreground`, `rounded-md`, ...
9
+ */
10
+ const c = (v: string) => `hsl(var(${v}) / <alpha-value>)`;
11
+
12
+ export default {
13
+ darkMode: ["class"],
14
+ content: ["./src/**/*.{ts,tsx}", "../../apps/**/*.{ts,tsx,mdx}"],
15
+ theme: {
16
+ extend: {
17
+ fontFamily: { sans: "var(--font-sans)" },
18
+ // Material-3 type scale — `text-body-md`, `text-headline-lg`, … each carries
19
+ // its line-height, tracking and weight. Mirrors tokens/semantic/typography.json.
20
+ fontSize: {
21
+ "display-lg": ["57px", { lineHeight: "64px", letterSpacing: "-0.25px", fontWeight: "500" }],
22
+ "display-md": ["45px", { lineHeight: "52px", letterSpacing: "0", fontWeight: "500" }],
23
+ "display-sm": ["36px", { lineHeight: "44px", letterSpacing: "0", fontWeight: "400" }],
24
+ "headline-lg": ["32px", { lineHeight: "40px", letterSpacing: "0", fontWeight: "600" }],
25
+ "headline-md": ["28px", { lineHeight: "36px", letterSpacing: "0", fontWeight: "400" }],
26
+ "headline-sm": ["24px", { lineHeight: "32px", letterSpacing: "0", fontWeight: "400" }],
27
+ "title-lg": ["22px", { lineHeight: "28px", letterSpacing: "0", fontWeight: "400" }],
28
+ "title-md": ["16px", { lineHeight: "24px", letterSpacing: "0.15px", fontWeight: "500" }],
29
+ "title-sm": ["14px", { lineHeight: "20px", letterSpacing: "0.1px", fontWeight: "500" }],
30
+ "title-dialog": ["18px", { lineHeight: "24px", letterSpacing: "0", fontWeight: "600" }],
31
+ "label-lg": ["14px", { lineHeight: "20px", letterSpacing: "0.1px", fontWeight: "500" }],
32
+ "label-md": ["12px", { lineHeight: "16px", letterSpacing: "0.5px", fontWeight: "500" }],
33
+ "label-sm": ["11px", { lineHeight: "16px", letterSpacing: "0.5px", fontWeight: "500" }],
34
+ "body-lg": ["16px", { lineHeight: "24px", letterSpacing: "0.5px", fontWeight: "400" }],
35
+ "body-md": ["14px", { lineHeight: "20px", letterSpacing: "0.25px", fontWeight: "400" }],
36
+ "body-sm": ["12px", { lineHeight: "16px", letterSpacing: "0", fontWeight: "400" }],
37
+ },
38
+ boxShadow: {
39
+ sm: "var(--shadow-sm)",
40
+ DEFAULT: "var(--shadow-md)",
41
+ md: "var(--shadow-md)",
42
+ lg: "var(--shadow-lg)",
43
+ xl: "var(--shadow-xl)",
44
+ focus: "var(--shadow-focus)",
45
+ "focus-destructive": "var(--shadow-focus-destructive)",
46
+ "focus-success": "var(--shadow-focus-success)",
47
+ "focus-warning": "var(--shadow-focus-warning)",
48
+ none: "none",
49
+ },
50
+ colors: {
51
+ background: c("--background"),
52
+ foreground: c("--foreground"),
53
+ card: { DEFAULT: c("--card"), foreground: c("--card-foreground") },
54
+ popover: { DEFAULT: c("--popover"), foreground: c("--popover-foreground") },
55
+ primary: { DEFAULT: c("--primary"), foreground: c("--primary-foreground") },
56
+ secondary: { DEFAULT: c("--secondary"), foreground: c("--secondary-foreground") },
57
+ muted: { DEFAULT: c("--muted"), foreground: c("--muted-foreground") },
58
+ accent: { DEFAULT: c("--accent"), foreground: c("--accent-foreground") },
59
+ destructive: { DEFAULT: c("--destructive"), foreground: c("--destructive-foreground") },
60
+ success: { DEFAULT: c("--success"), foreground: c("--success-foreground") },
61
+ warning: { DEFAULT: c("--warning"), foreground: c("--warning-foreground") },
62
+ info: { DEFAULT: c("--info"), foreground: c("--info-foreground") },
63
+ tertiary: { DEFAULT: c("--tertiary"), foreground: c("--tertiary-foreground") },
64
+ border: c("--border"),
65
+ input: c("--input"),
66
+ ring: c("--ring"),
67
+ chart: {
68
+ 1: c("--chart-1"),
69
+ 2: c("--chart-2"),
70
+ 3: c("--chart-3"),
71
+ 4: c("--chart-4"),
72
+ 5: c("--chart-5"),
73
+ },
74
+ sidebar: {
75
+ DEFAULT: c("--sidebar"),
76
+ foreground: c("--sidebar-foreground"),
77
+ primary: c("--sidebar-primary"),
78
+ "primary-foreground": c("--sidebar-primary-foreground"),
79
+ accent: c("--sidebar-accent"),
80
+ "accent-foreground": c("--sidebar-accent-foreground"),
81
+ border: c("--sidebar-border"),
82
+ ring: c("--sidebar-ring"),
83
+ },
84
+ },
85
+ borderColor: { DEFAULT: c("--border") },
86
+ borderRadius: {
87
+ sm: "var(--radius-sm)",
88
+ md: "var(--radius-md)",
89
+ lg: "var(--radius-lg)",
90
+ xl: "var(--radius-xl)",
91
+ "2xl": "calc(var(--radius-lg) + 8px)",
92
+ full: "var(--radius-full)",
93
+ },
94
+ keyframes: {
95
+ "accordion-down": { from: { height: "0" }, to: { height: "var(--radix-accordion-content-height)" } },
96
+ "accordion-up": { from: { height: "var(--radix-accordion-content-height)" }, to: { height: "0" } },
97
+ "caret-blink": { "0%,70%,100%": { opacity: "1" }, "20%,50%": { opacity: "0" } },
98
+ },
99
+ animation: {
100
+ "accordion-down": "accordion-down 0.2s ease-out",
101
+ "accordion-up": "accordion-up 0.2s ease-out",
102
+ "caret-blink": "caret-blink 1.25s ease-out infinite",
103
+ },
104
+ },
105
+ },
106
+ plugins: [require("tailwindcss-animate")],
107
+ } satisfies Config;