@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.
- package/LICENSE +21 -0
- package/dist/index.d.ts +1176 -0
- package/dist/index.js +3939 -0
- package/package.json +106 -0
- package/src/components/accordion.tsx +52 -0
- package/src/components/alert-dialog.tsx +115 -0
- package/src/components/alert.tsx +47 -0
- package/src/components/aspect-ratio.tsx +7 -0
- package/src/components/audio-player.tsx +150 -0
- package/src/components/avatar.tsx +76 -0
- package/src/components/badge.tsx +40 -0
- package/src/components/breadcrumb.tsx +77 -0
- package/src/components/button.tsx +119 -0
- package/src/components/calendar.tsx +60 -0
- package/src/components/card.tsx +50 -0
- package/src/components/carousel.tsx +181 -0
- package/src/components/chart.tsx +177 -0
- package/src/components/checkbox.tsx +38 -0
- package/src/components/circular-progress.tsx +67 -0
- package/src/components/code-block.tsx +96 -0
- package/src/components/collapsible.tsx +9 -0
- package/src/components/command.tsx +123 -0
- package/src/components/context-menu.tsx +132 -0
- package/src/components/data-table.tsx +92 -0
- package/src/components/date-picker.tsx +68 -0
- package/src/components/dialog.tsx +101 -0
- package/src/components/drawer.tsx +82 -0
- package/src/components/dropdown-menu.tsx +132 -0
- package/src/components/fab.tsx +58 -0
- package/src/components/field.tsx +128 -0
- package/src/components/file-upload.tsx +183 -0
- package/src/components/footer.tsx +62 -0
- package/src/components/form.tsx +130 -0
- package/src/components/hover-card.tsx +28 -0
- package/src/components/image.tsx +87 -0
- package/src/components/inform.tsx +82 -0
- package/src/components/input-group.tsx +96 -0
- package/src/components/input-otp.tsx +63 -0
- package/src/components/input.tsx +72 -0
- package/src/components/label.tsx +20 -0
- package/src/components/list.tsx +69 -0
- package/src/components/menubar.tsx +168 -0
- package/src/components/metric.tsx +51 -0
- package/src/components/modal.tsx +126 -0
- package/src/components/navigation-bar.tsx +49 -0
- package/src/components/navigation-menu.tsx +117 -0
- package/src/components/number-input.tsx +86 -0
- package/src/components/pagination.tsx +77 -0
- package/src/components/password-input.tsx +36 -0
- package/src/components/popover.tsx +32 -0
- package/src/components/progress.tsx +24 -0
- package/src/components/quote.tsx +34 -0
- package/src/components/radio-group.tsx +44 -0
- package/src/components/rating.tsx +88 -0
- package/src/components/resizable.tsx +40 -0
- package/src/components/scroll-area.tsx +39 -0
- package/src/components/select.tsx +124 -0
- package/src/components/separator.tsx +25 -0
- package/src/components/sheet.tsx +104 -0
- package/src/components/sidebar.tsx +390 -0
- package/src/components/skeleton.tsx +9 -0
- package/src/components/slider.tsx +24 -0
- package/src/components/sonner.tsx +30 -0
- package/src/components/spinner.tsx +43 -0
- package/src/components/stepper.tsx +75 -0
- package/src/components/switch.tsx +37 -0
- package/src/components/tab-bar.tsx +58 -0
- package/src/components/table-of-contents.tsx +46 -0
- package/src/components/table.tsx +70 -0
- package/src/components/tabs.tsx +54 -0
- package/src/components/tag.tsx +56 -0
- package/src/components/textarea.tsx +56 -0
- package/src/components/toggle-group.tsx +41 -0
- package/src/components/toggle.tsx +34 -0
- package/src/components/tooltip.tsx +31 -0
- package/src/index.ts +305 -0
- package/src/lib/utils.ts +7 -0
- package/src/stories/Button.stories.tsx +155 -0
- package/src/stories/Input.stories.tsx +80 -0
- package/src/stories/Textarea.stories.tsx +69 -0
- 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;
|