@cbrl/design 0.0.0-stage → 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 (114) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -2
  3. package/dist/components/alert-dialog.d.ts +14 -0
  4. package/dist/components/alert-dialog.js +82 -0
  5. package/dist/components/app-shell.d.ts +38 -0
  6. package/dist/components/app-shell.js +72 -0
  7. package/dist/components/auth-split-screen.d.ts +30 -0
  8. package/dist/components/auth-split-screen.js +45 -0
  9. package/dist/components/avatar.d.ts +11 -0
  10. package/dist/components/avatar.js +50 -0
  11. package/dist/components/badge.d.ts +9 -0
  12. package/dist/components/badge.js +27 -0
  13. package/dist/components/breadcrumb.d.ts +11 -0
  14. package/dist/components/breadcrumb.js +69 -0
  15. package/dist/components/button.d.ts +10 -0
  16. package/dist/components/button.js +47 -0
  17. package/dist/components/calendar.d.ts +7 -0
  18. package/dist/components/calendar.js +142 -0
  19. package/dist/components/card.d.ts +13 -0
  20. package/dist/components/card.js +57 -0
  21. package/dist/components/checkbox.d.ts +4 -0
  22. package/dist/components/checkbox.js +20 -0
  23. package/dist/components/collapsible.d.ts +5 -0
  24. package/dist/components/collapsible.js +23 -0
  25. package/dist/components/date-field.d.ts +31 -0
  26. package/dist/components/date-field.js +129 -0
  27. package/dist/components/dialog.d.ts +17 -0
  28. package/dist/components/dialog.js +95 -0
  29. package/dist/components/dropdown-menu.d.ts +29 -0
  30. package/dist/components/dropdown-menu.js +127 -0
  31. package/dist/components/empty-state.d.ts +32 -0
  32. package/dist/components/empty-state.js +61 -0
  33. package/dist/components/field.d.ts +25 -0
  34. package/dist/components/field.js +121 -0
  35. package/dist/components/highlighted-textarea.d.ts +6 -0
  36. package/dist/components/highlighted-textarea.js +68 -0
  37. package/dist/components/icons/brand-icon.d.ts +6 -0
  38. package/dist/components/icons/brand-icon.js +13 -0
  39. package/dist/components/icons/google-icon.d.ts +7 -0
  40. package/dist/components/icons/google-icon.js +33 -0
  41. package/dist/components/icons/whatsapp-icon.d.ts +7 -0
  42. package/dist/components/icons/whatsapp-icon.js +18 -0
  43. package/dist/components/input-group.d.ts +8 -0
  44. package/dist/components/input-group.js +28 -0
  45. package/dist/components/input.d.ts +3 -0
  46. package/dist/components/input.js +13 -0
  47. package/dist/components/label.d.ts +4 -0
  48. package/dist/components/label.js +14 -0
  49. package/dist/components/list.d.ts +174 -0
  50. package/dist/components/list.js +281 -0
  51. package/dist/components/main.d.ts +10 -0
  52. package/dist/components/main.js +36 -0
  53. package/dist/components/pagination.d.ts +25 -0
  54. package/dist/components/pagination.js +104 -0
  55. package/dist/components/popover.d.ts +6 -0
  56. package/dist/components/popover.js +28 -0
  57. package/dist/components/radio-group.d.ts +5 -0
  58. package/dist/components/radio-group.js +27 -0
  59. package/dist/components/scroll-area.d.ts +5 -0
  60. package/dist/components/scroll-area.js +35 -0
  61. package/dist/components/select.d.ts +15 -0
  62. package/dist/components/select.js +95 -0
  63. package/dist/components/separator.d.ts +4 -0
  64. package/dist/components/separator.js +16 -0
  65. package/dist/components/setting-row.d.ts +8 -0
  66. package/dist/components/setting-row.js +36 -0
  67. package/dist/components/settings-section.d.ts +7 -0
  68. package/dist/components/settings-section.js +36 -0
  69. package/dist/components/sheet.d.ts +14 -0
  70. package/dist/components/sheet.js +89 -0
  71. package/dist/components/sidebar-core.d.ts +33 -0
  72. package/dist/components/sidebar-core.js +220 -0
  73. package/dist/components/sidebar-menu.d.ts +38 -0
  74. package/dist/components/sidebar-menu.js +168 -0
  75. package/dist/components/sidebar.d.ts +3 -0
  76. package/dist/components/skeleton.d.ts +2 -0
  77. package/dist/components/skeleton.js +11 -0
  78. package/dist/components/sonner.d.ts +3 -0
  79. package/dist/components/sonner.js +31 -0
  80. package/dist/components/stepper.d.ts +8 -0
  81. package/dist/components/stepper.js +58 -0
  82. package/dist/components/switch.d.ts +6 -0
  83. package/dist/components/switch.js +19 -0
  84. package/dist/components/table.d.ts +10 -0
  85. package/dist/components/table.js +65 -0
  86. package/dist/components/tabs.d.ts +7 -0
  87. package/dist/components/tabs.js +35 -0
  88. package/dist/components/textarea.d.ts +3 -0
  89. package/dist/components/textarea.js +12 -0
  90. package/dist/components/theme-provider.d.ts +15 -0
  91. package/dist/components/theme-provider.js +22 -0
  92. package/dist/components/tooltip.d.ts +7 -0
  93. package/dist/components/tooltip.js +35 -0
  94. package/dist/components/typography.d.ts +9 -0
  95. package/dist/components/typography.js +45 -0
  96. package/dist/components/user-menu.d.ts +27 -0
  97. package/dist/components/user-menu.js +49 -0
  98. package/dist/globals.css +60 -0
  99. package/dist/hooks/use-mobile.d.ts +1 -0
  100. package/dist/hooks/use-mobile.js +17 -0
  101. package/dist/index.d.ts +53 -0
  102. package/dist/index.js +51 -0
  103. package/dist/lib/cn.d.ts +2 -0
  104. package/dist/lib/cn.js +7 -0
  105. package/dist/lib/css-vars.js +5 -0
  106. package/dist/lib/date.js +38 -0
  107. package/dist/lib/initials.d.ts +8 -0
  108. package/dist/lib/initials.js +15 -0
  109. package/dist/lib/nav.d.ts +15 -0
  110. package/dist/lib/nav.js +11 -0
  111. package/dist/lib/toaster-theme.js +5 -0
  112. package/dist/shadcn.css +635 -0
  113. package/dist/tokens.css +160 -0
  114. package/package.json +85 -3
@@ -0,0 +1,160 @@
1
+ /*
2
+ * @cbrl/design — Design tokens canônicos.
3
+ *
4
+ * Gerado a partir do shadcn preset `b0` (style: radix-nova, baseColor: neutral).
5
+ * Decoded: https://ui.shadcn.com/create?preset=b0
6
+ *
7
+ * Apps que adotam o design system importam `@cbrl/design/globals.css`. Pra
8
+ * customizar accent/primary, redefinir nas suas próprias custom properties:
9
+ *
10
+ * @import '@cbrl/design/globals.css';
11
+ *
12
+ * :root {
13
+ * --primary: oklch(0.48 0.092 208); // brand teal
14
+ * --primary-foreground: oklch(0.99 0.003 210);
15
+ * }
16
+ */
17
+
18
+ :root {
19
+ --background: oklch(1 0 0);
20
+ --foreground: oklch(0.145 0 0);
21
+ --card: oklch(1 0 0);
22
+ --card-foreground: oklch(0.145 0 0);
23
+ --popover: oklch(1 0 0);
24
+ --popover-foreground: oklch(0.145 0 0);
25
+ --primary: oklch(0.205 0 0);
26
+ --primary-foreground: oklch(0.985 0 0);
27
+ --secondary: oklch(0.97 0 0);
28
+ --secondary-foreground: oklch(0.205 0 0);
29
+ --muted: oklch(0.97 0 0);
30
+ --muted-foreground: oklch(0.556 0 0);
31
+ --accent: oklch(0.97 0 0);
32
+ --accent-foreground: oklch(0.205 0 0);
33
+ --destructive: oklch(0.577 0.245 27.325);
34
+ --border: oklch(0.922 0 0);
35
+ --input: oklch(0.922 0 0);
36
+ --ring: oklch(0.708 0 0);
37
+ --chart-1: oklch(0.87 0 0);
38
+ --chart-2: oklch(0.556 0 0);
39
+ --chart-3: oklch(0.439 0 0);
40
+ --chart-4: oklch(0.371 0 0);
41
+ --chart-5: oklch(0.269 0 0);
42
+ --radius: 0.625rem;
43
+ --sidebar: oklch(0.985 0 0);
44
+ --sidebar-foreground: oklch(0.145 0 0);
45
+ --sidebar-primary: oklch(0.205 0 0);
46
+ --sidebar-primary-foreground: oklch(0.985 0 0);
47
+ --sidebar-accent: oklch(0.97 0 0);
48
+ --sidebar-accent-foreground: oklch(0.205 0 0);
49
+ --sidebar-border: oklch(0.922 0 0);
50
+ --sidebar-ring: oklch(0.708 0 0);
51
+
52
+ /* Verde WhatsApp — token funcional (não-de-marca) usado em CTAs de contato. */
53
+ --wa: oklch(0.64 0.155 152);
54
+ --wa-foreground: oklch(0.99 0 0);
55
+ }
56
+
57
+ .dark {
58
+ --background: oklch(0.145 0 0);
59
+ --foreground: oklch(0.985 0 0);
60
+ --card: oklch(0.205 0 0);
61
+ --card-foreground: oklch(0.985 0 0);
62
+ --popover: oklch(0.205 0 0);
63
+ --popover-foreground: oklch(0.985 0 0);
64
+ --primary: oklch(0.922 0 0);
65
+ --primary-foreground: oklch(0.205 0 0);
66
+ --secondary: oklch(0.269 0 0);
67
+ --secondary-foreground: oklch(0.985 0 0);
68
+ --muted: oklch(0.269 0 0);
69
+ --muted-foreground: oklch(0.708 0 0);
70
+ --accent: oklch(0.269 0 0);
71
+ --accent-foreground: oklch(0.985 0 0);
72
+ --destructive: oklch(0.704 0.191 22.216);
73
+ --border: oklch(1 0 0 / 10%);
74
+ --input: oklch(1 0 0 / 15%);
75
+ --ring: oklch(0.556 0 0);
76
+ --chart-1: oklch(0.87 0 0);
77
+ --chart-2: oklch(0.556 0 0);
78
+ --chart-3: oklch(0.439 0 0);
79
+ --chart-4: oklch(0.371 0 0);
80
+ --chart-5: oklch(0.269 0 0);
81
+ --sidebar: oklch(0.205 0 0);
82
+ --sidebar-foreground: oklch(0.985 0 0);
83
+ --sidebar-primary: oklch(0.488 0.243 264.376);
84
+ --sidebar-primary-foreground: oklch(0.985 0 0);
85
+ --sidebar-accent: oklch(0.269 0 0);
86
+ --sidebar-accent-foreground: oklch(0.985 0 0);
87
+ --sidebar-border: oklch(1 0 0 / 10%);
88
+ --sidebar-ring: oklch(0.556 0 0);
89
+
90
+ --wa: oklch(0.68 0.16 152);
91
+ --wa-foreground: oklch(0.99 0 0);
92
+ }
93
+
94
+ @theme inline {
95
+ /*
96
+ * Token contract: adopters provide `--font-sans` via `next/font` (typically
97
+ * on <body> via the className it generates) and the utility `font-sans`
98
+ * resolves to it. Fallbacks keep apps without `next/font` rendering with a
99
+ * sane system stack instead of the browser default.
100
+ */
101
+ --font-heading: var(
102
+ --font-sans,
103
+ ui-sans-serif,
104
+ system-ui,
105
+ -apple-system,
106
+ BlinkMacSystemFont,
107
+ 'Segoe UI',
108
+ sans-serif
109
+ );
110
+ --font-sans: var(
111
+ --font-sans,
112
+ ui-sans-serif,
113
+ system-ui,
114
+ -apple-system,
115
+ BlinkMacSystemFont,
116
+ 'Segoe UI',
117
+ sans-serif
118
+ );
119
+ --font-mono: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
120
+ --color-sidebar-ring: var(--sidebar-ring);
121
+ --color-sidebar-border: var(--sidebar-border);
122
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
123
+ --color-sidebar-accent: var(--sidebar-accent);
124
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
125
+ --color-sidebar-primary: var(--sidebar-primary);
126
+ --color-sidebar-foreground: var(--sidebar-foreground);
127
+ --color-sidebar: var(--sidebar);
128
+ --color-chart-5: var(--chart-5);
129
+ --color-chart-4: var(--chart-4);
130
+ --color-chart-3: var(--chart-3);
131
+ --color-chart-2: var(--chart-2);
132
+ --color-chart-1: var(--chart-1);
133
+ --color-ring: var(--ring);
134
+ --color-input: var(--input);
135
+ --color-border: var(--border);
136
+ --color-destructive: var(--destructive);
137
+ --color-accent-foreground: var(--accent-foreground);
138
+ --color-accent: var(--accent);
139
+ --color-muted-foreground: var(--muted-foreground);
140
+ --color-muted: var(--muted);
141
+ --color-secondary-foreground: var(--secondary-foreground);
142
+ --color-secondary: var(--secondary);
143
+ --color-primary-foreground: var(--primary-foreground);
144
+ --color-primary: var(--primary);
145
+ --color-popover-foreground: var(--popover-foreground);
146
+ --color-popover: var(--popover);
147
+ --color-card-foreground: var(--card-foreground);
148
+ --color-card: var(--card);
149
+ --color-foreground: var(--foreground);
150
+ --color-background: var(--background);
151
+ --color-wa: var(--wa);
152
+ --color-wa-foreground: var(--wa-foreground);
153
+ --radius-sm: calc(var(--radius) * 0.6);
154
+ --radius-md: calc(var(--radius) * 0.8);
155
+ --radius-lg: var(--radius);
156
+ --radius-xl: calc(var(--radius) * 1.4);
157
+ --radius-2xl: calc(var(--radius) * 1.8);
158
+ --radius-3xl: calc(var(--radius) * 2.2);
159
+ --radius-4xl: calc(var(--radius) * 2.6);
160
+ }
package/package.json CHANGED
@@ -1,6 +1,88 @@
1
1
  {
2
2
  "name": "@cbrl/design",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "Design system on Radix + Tailwind v4: shadcn-style components, layout shells and design tokens with an overridable brand accent.",
5
+ "license": "MIT",
6
+ "author": "Kayron Cabral",
7
+ "homepage": "https://github.com/kaycabral/toolkit/tree/main/packages/design#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/kaycabral/toolkit/issues"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/kaycabral/toolkit.git",
14
+ "directory": "packages/design"
15
+ },
16
+ "keywords": [
17
+ "design-system",
18
+ "react",
19
+ "radix",
20
+ "tailwindcss",
21
+ "shadcn"
22
+ ],
23
+ "type": "module",
24
+ "sideEffects": [
25
+ "*.css"
26
+ ],
27
+ "exports": {
28
+ ".": "./dist/index.js",
29
+ "./package.json": "./package.json",
30
+ "./globals.css": "./dist/globals.css",
31
+ "./tokens.css": "./dist/tokens.css",
32
+ "./shadcn.css": "./dist/shadcn.css"
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "dependencies": {
38
+ "class-variance-authority": "^0.7.1",
39
+ "clsx": "^2.1.1",
40
+ "lucide-react": "^1.14.0",
41
+ "radix-ui": "^1.4.3",
42
+ "react-day-picker": "^9.14.0",
43
+ "sonner": "^2.0.7",
44
+ "tailwind-merge": "^3.6.0",
45
+ "tw-animate-css": "^1.4.0"
46
+ },
47
+ "peerDependencies": {
48
+ "next-themes": "^0.4.0",
49
+ "react": "^19.0.0",
50
+ "react-dom": "^19.0.0",
51
+ "tailwindcss": "^4.0.0"
52
+ },
53
+ "devDependencies": {
54
+ "@arethetypeswrong/cli": "^0.18.5",
55
+ "@testing-library/jest-dom": "^6.9.1",
56
+ "@testing-library/react": "^16.3.2",
57
+ "@testing-library/user-event": "^14.6.1",
58
+ "@types/node": "^25.6.2",
59
+ "@types/react": "^19.2.14",
60
+ "@types/react-dom": "^19.2.3",
61
+ "@vitejs/plugin-react": "^6.0.2",
62
+ "@vitest/coverage-v8": "^4.1.6",
63
+ "eslint": "^9.39.4",
64
+ "jsdom": "^29.1.1",
65
+ "next-themes": "^0.4.6",
66
+ "publint": "^0.3.25",
67
+ "react": "^19.2.6",
68
+ "react-dom": "^19.2.6",
69
+ "shadcn": "^4.7.0",
70
+ "tailwindcss": "^4.3.0",
71
+ "tsdown": "^0.23.7",
72
+ "typescript": "^5.9.3",
73
+ "vitest": "^4.1.6",
74
+ "@cbrl/testing": "0.2.0",
75
+ "@cbrl/tsconfig": "0.1.0",
76
+ "@cbrl/eslint-config": "0.2.0"
77
+ },
78
+ "publishConfig": {
79
+ "access": "public"
80
+ },
81
+ "scripts": {
82
+ "build": "tsdown",
83
+ "typecheck": "tsc --noEmit",
84
+ "test": "vitest run --coverage",
85
+ "lint": "eslint .",
86
+ "check:package": "node scripts/check-client-directives.mjs && node ../../scripts/check-package.mjs --types --exclude-entrypoints ./globals.css ./tokens.css ./shadcn.css"
87
+ }
6
88
  }