@jcdecor/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 (86) hide show
  1. package/README.md +83 -0
  2. package/dist/brand/Brand.d.ts +93 -0
  3. package/dist/brand/index.d.ts +2 -0
  4. package/dist/brand/paths.d.ts +43 -0
  5. package/dist/brand-CXtAwb1A.js +248 -0
  6. package/dist/brand-CXtAwb1A.js.map +1 -0
  7. package/dist/brand.d.ts +1 -0
  8. package/dist/brand.js +3 -0
  9. package/dist/charts/ChartCard.d.ts +20 -0
  10. package/dist/charts/charts.d.ts +36 -0
  11. package/dist/charts/index.d.ts +5 -0
  12. package/dist/charts/palette.d.ts +12 -0
  13. package/dist/charts.d.ts +1 -0
  14. package/dist/charts.js +151 -0
  15. package/dist/charts.js.map +1 -0
  16. package/dist/chat/ChatComposer.d.ts +27 -0
  17. package/dist/chat/ChatLayout.d.ts +36 -0
  18. package/dist/chat/ChatMessage.d.ts +25 -0
  19. package/dist/chat/ChatThread.d.ts +25 -0
  20. package/dist/chat/ConversationList.d.ts +16 -0
  21. package/dist/chat/TypingIndicator.d.ts +10 -0
  22. package/dist/chat/index.d.ts +9 -0
  23. package/dist/chat/types.d.ts +38 -0
  24. package/dist/chat/utils.d.ts +25 -0
  25. package/dist/chat.d.ts +1 -0
  26. package/dist/chat.js +541 -0
  27. package/dist/chat.js.map +1 -0
  28. package/dist/colors-C_5SHERN.js +33 -0
  29. package/dist/colors-C_5SHERN.js.map +1 -0
  30. package/dist/components/ContentCard/ContentCard.d.ts +25 -0
  31. package/dist/components/ContentCard/index.d.ts +1 -0
  32. package/dist/components/CouponCode/CouponCode.d.ts +14 -0
  33. package/dist/components/CouponCode/index.d.ts +1 -0
  34. package/dist/components/DataTable/DataTable.d.ts +52 -0
  35. package/dist/components/DataTable/index.d.ts +1 -0
  36. package/dist/components/KpiCard/KpiCard.d.ts +48 -0
  37. package/dist/components/KpiCard/index.d.ts +1 -0
  38. package/dist/components/PageHeader/PageHeader.d.ts +22 -0
  39. package/dist/components/PageHeader/index.d.ts +1 -0
  40. package/dist/components/PriceTag/PriceTag.d.ts +22 -0
  41. package/dist/components/PriceTag/index.d.ts +1 -0
  42. package/dist/components/ProductCard/ProductCard.d.ts +39 -0
  43. package/dist/components/ProductCard/index.d.ts +1 -0
  44. package/dist/components/PromoBanner/PromoBanner.d.ts +35 -0
  45. package/dist/components/PromoBanner/index.d.ts +1 -0
  46. package/dist/components/Tag/Tag.d.ts +16 -0
  47. package/dist/components/Tag/index.d.ts +1 -0
  48. package/dist/components/ThemeToggle/ThemeToggle.d.ts +11 -0
  49. package/dist/components/ThemeToggle/index.d.ts +1 -0
  50. package/dist/components/TokenSwatch/TokenSwatch.d.ts +26 -0
  51. package/dist/components/TokenSwatch/index.d.ts +1 -0
  52. package/dist/components/TopNav/TopNav.d.ts +32 -0
  53. package/dist/components/TopNav/index.d.ts +1 -0
  54. package/dist/components/Typography/Typography.d.ts +74 -0
  55. package/dist/components/Typography/index.d.ts +1 -0
  56. package/dist/components/index.d.ts +13 -0
  57. package/dist/format-Cxmo46_A.js +97 -0
  58. package/dist/format-Cxmo46_A.js.map +1 -0
  59. package/dist/index.d.ts +13 -0
  60. package/dist/index.js +1868 -0
  61. package/dist/index.js.map +1 -0
  62. package/dist/provider/JcProvider.d.ts +18 -0
  63. package/dist/styles.css +2 -0
  64. package/dist/theme/colors.d.ts +26 -0
  65. package/dist/theme/components/buttons.d.ts +2 -0
  66. package/dist/theme/components/combobox.d.ts +2 -0
  67. package/dist/theme/components/dataDisplay.d.ts +2 -0
  68. package/dist/theme/components/feedback.d.ts +2 -0
  69. package/dist/theme/components/index.d.ts +3 -0
  70. package/dist/theme/components/inputs.d.ts +2 -0
  71. package/dist/theme/components/layout.d.ts +2 -0
  72. package/dist/theme/components/misc.d.ts +2 -0
  73. package/dist/theme/components/navigation.d.ts +2 -0
  74. package/dist/theme/components/overlays.d.ts +2 -0
  75. package/dist/theme/components/typography.d.ts +2 -0
  76. package/dist/theme/controls.d.ts +44 -0
  77. package/dist/theme/cssVariablesResolver.d.ts +2 -0
  78. package/dist/theme/theme.d.ts +147 -0
  79. package/dist/theme/tokens.d.ts +457 -0
  80. package/dist/theme/variantColorResolver.d.ts +9 -0
  81. package/dist/tokens-BBTJY6nq.js +316 -0
  82. package/dist/tokens-BBTJY6nq.js.map +1 -0
  83. package/dist/tokens.d.ts +2 -0
  84. package/dist/tokens.js +4 -0
  85. package/dist/utils/format.d.ts +14 -0
  86. package/package.json +105 -0
@@ -0,0 +1,316 @@
1
+ "use client";
2
+ //#region src/theme/tokens.ts
3
+ var e = {
4
+ horizon: "#2663EB",
5
+ obsidian: "#08154B",
6
+ electric: "#F7D759",
7
+ evergreen: "#1E8540",
8
+ danger: "#D92D20",
9
+ white: "#FFFFFF"
10
+ }, t = {
11
+ horizon: {
12
+ 50: "#F3F7FF",
13
+ 100: "#E4EDFF",
14
+ 200: "#C6DAFF",
15
+ 300: "#A1C1FF",
16
+ 400: "#6E9FFF",
17
+ 500: "#407DFF",
18
+ 600: "#2663EB",
19
+ 700: "#0F4ACF",
20
+ 800: "#0033AC",
21
+ 900: "#002178"
22
+ },
23
+ obsidian: {
24
+ 50: "#F1F5FE",
25
+ 100: "#E0E8F9",
26
+ 200: "#C5D1EC",
27
+ 300: "#A1B1D5",
28
+ 400: "#7285B4",
29
+ 500: "#3D528A",
30
+ 600: "#08154B",
31
+ 700: "#040C3B",
32
+ 800: "#02052A",
33
+ 900: "#01021A"
34
+ },
35
+ electric: {
36
+ 50: "#FFF9E1",
37
+ 100: "#FEEFB7",
38
+ 200: "#F9E07F",
39
+ 300: "#F7D759",
40
+ 400: "#D5A700",
41
+ 500: "#BA8900",
42
+ 600: "#A47000",
43
+ 700: "#8D5900",
44
+ 800: "#734300",
45
+ 900: "#562C00"
46
+ },
47
+ evergreen: {
48
+ 50: "#E9FBEC",
49
+ 100: "#C9F3D2",
50
+ 200: "#A8EDB5",
51
+ 300: "#89D698",
52
+ 400: "#61B875",
53
+ 500: "#3E9C57",
54
+ 600: "#1E8540",
55
+ 700: "#006E2E",
56
+ 800: "#005422",
57
+ 900: "#003914"
58
+ },
59
+ danger: {
60
+ 50: "#FFF4F2",
61
+ 100: "#FFE6E2",
62
+ 200: "#FFCBC2",
63
+ 300: "#FFA698",
64
+ 400: "#FF6C5A",
65
+ 500: "#E84031",
66
+ 600: "#D92D20",
67
+ 700: "#AD0300",
68
+ 800: "#860200",
69
+ 900: "#5D0100"
70
+ },
71
+ gray: {
72
+ 50: "#F6F7FA",
73
+ 100: "#EAEFF7",
74
+ 200: "#D7DBE3",
75
+ 300: "#BFC3CB",
76
+ 400: "#9FA3AB",
77
+ 500: "#84888F",
78
+ 600: "#6E7279",
79
+ 700: "#4A4D54",
80
+ 800: "#35383E",
81
+ 900: "#1F2228"
82
+ }
83
+ }, n = [
84
+ "#E4E8EF",
85
+ "#BFC4CE",
86
+ "#9398A4",
87
+ "#636975",
88
+ "#373D49",
89
+ "#262B36",
90
+ "#1A1E27",
91
+ "#10141B",
92
+ "#0A0D13",
93
+ "#04060A"
94
+ ], r = {
95
+ success: t.evergreen[600],
96
+ successBg: t.evergreen[50],
97
+ warn: t.electric[400],
98
+ warnBg: t.electric[50],
99
+ warnText: t.electric[700],
100
+ error: t.danger[600],
101
+ errorBg: t.danger[50]
102
+ }, i = {
103
+ light: {
104
+ bg: t.gray[50],
105
+ surface: "#FFFFFF",
106
+ surface2: t.gray[50],
107
+ text: t.gray[900],
108
+ text2: t.gray[700],
109
+ text3: t.gray[600],
110
+ border: "#8B9099",
111
+ borderSoft: t.gray[200],
112
+ primary: t.horizon[600],
113
+ primaryHover: t.horizon[700],
114
+ primarySoft: t.horizon[50],
115
+ accent: e.electric,
116
+ link: t.horizon[600],
117
+ successBg: t.evergreen[50],
118
+ warnBg: t.electric[50],
119
+ errorBg: t.danger[50],
120
+ shadowSm: "0 1px 2px rgba(31,34,40,.06), 0 1px 3px rgba(31,34,40,.08)",
121
+ shadowMd: "0 4px 12px rgba(31,34,40,.08), 0 2px 4px rgba(31,34,40,.04)",
122
+ shadowLg: "0 16px 40px rgba(31,34,40,.12), 0 4px 12px rgba(31,34,40,.06)"
123
+ },
124
+ dark: {
125
+ bg: n[7],
126
+ surface: n[6],
127
+ surface2: n[5],
128
+ text: n[0],
129
+ text2: n[1],
130
+ text3: n[2],
131
+ border: n[3],
132
+ borderSoft: n[5],
133
+ primary: t.horizon[400],
134
+ primaryHover: t.horizon[300],
135
+ primarySoft: "rgba(110,159,255,.14)",
136
+ accent: e.electric,
137
+ link: t.horizon[300],
138
+ successBg: "rgba(97,184,117,.14)",
139
+ warnBg: "rgba(247,215,89,.12)",
140
+ errorBg: "rgba(255,108,90,.14)",
141
+ shadowSm: "0 1px 3px rgba(0,0,0,.4)",
142
+ shadowMd: "0 4px 14px rgba(0,0,0,.45)",
143
+ shadowLg: "0 16px 40px rgba(0,0,0,.55)"
144
+ }
145
+ }, a = "'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif", o = {
146
+ displayLg: {
147
+ size: "clamp(40px, 2.4vw + 26px, 56px)",
148
+ weight: 700,
149
+ lineHeight: 1.1,
150
+ letterSpacing: "-0.02em",
151
+ px: "56/40",
152
+ label: "display-large"
153
+ },
154
+ displayMd: {
155
+ size: "clamp(36px, 1.8vw + 25px, 48px)",
156
+ weight: 700,
157
+ lineHeight: 1.15,
158
+ letterSpacing: "-0.02em",
159
+ px: "48/36",
160
+ label: "display-medium"
161
+ },
162
+ displaySm: {
163
+ size: "clamp(32px, 1.2vw + 25px, 40px)",
164
+ weight: 700,
165
+ lineHeight: 1.2,
166
+ letterSpacing: "-0.015em",
167
+ px: "40/32",
168
+ label: "display-small"
169
+ },
170
+ headlineLg: {
171
+ size: "clamp(26px, 0.9vw + 21px, 32px)",
172
+ weight: 600,
173
+ lineHeight: 1.25,
174
+ letterSpacing: "-0.01em",
175
+ px: "32/26",
176
+ label: "headline-large"
177
+ },
178
+ headlineMd: {
179
+ size: "24px",
180
+ weight: 600,
181
+ lineHeight: 1.33,
182
+ letterSpacing: "-0.005em",
183
+ px: "24",
184
+ label: "headline-medium"
185
+ },
186
+ headlineSm: {
187
+ size: "20px",
188
+ weight: 600,
189
+ lineHeight: 1.4,
190
+ letterSpacing: "0",
191
+ px: "20",
192
+ label: "headline-small"
193
+ },
194
+ subheadlineLg: {
195
+ size: "18px",
196
+ weight: 400,
197
+ lineHeight: 1.55,
198
+ letterSpacing: "0",
199
+ px: "18",
200
+ label: "body-large"
201
+ },
202
+ subheadlineRg: {
203
+ size: "16px",
204
+ weight: 400,
205
+ lineHeight: 1.5,
206
+ letterSpacing: "0",
207
+ px: "16",
208
+ label: "body"
209
+ },
210
+ subheadlineSm: {
211
+ size: "14px",
212
+ weight: 400,
213
+ lineHeight: 1.43,
214
+ letterSpacing: "0",
215
+ px: "14",
216
+ label: "body-small"
217
+ },
218
+ button: {
219
+ size: "14px",
220
+ weight: 600,
221
+ lineHeight: 1.43,
222
+ letterSpacing: "0.01em",
223
+ px: "14",
224
+ label: "button"
225
+ },
226
+ disclaimer: {
227
+ size: "12px",
228
+ weight: 500,
229
+ lineHeight: 1.33,
230
+ letterSpacing: "0.01em",
231
+ px: "12",
232
+ label: "caption"
233
+ }
234
+ }, s = {
235
+ 0: "0px",
236
+ 4: "4px",
237
+ 8: "8px",
238
+ 12: "12px",
239
+ 16: "16px",
240
+ 20: "20px",
241
+ 24: "24px",
242
+ 28: "28px",
243
+ 32: "32px",
244
+ 36: "36px",
245
+ 40: "40px",
246
+ 44: "44px",
247
+ 48: "48px",
248
+ 52: "52px",
249
+ 56: "56px",
250
+ 60: "60px",
251
+ 64: "64px",
252
+ 68: "68px",
253
+ 72: "72px",
254
+ 80: "80px",
255
+ 100: "100px"
256
+ }, c = {
257
+ sm: "8px",
258
+ md: "12px",
259
+ lg: "16px"
260
+ }, l = {
261
+ max: "1224px",
262
+ gap: "24px",
263
+ margin: {
264
+ mobile: "20px",
265
+ tablet: "32px",
266
+ desktop: "64px"
267
+ },
268
+ columns: {
269
+ mobile: 4,
270
+ tablet: 8,
271
+ desktop: 12
272
+ },
273
+ breakpoints: {
274
+ mobile: 360,
275
+ tablet: 768,
276
+ desktop: 1366
277
+ }
278
+ }, u = {
279
+ light: [
280
+ "#2663EB",
281
+ "#1E8540",
282
+ "#D5A700",
283
+ "#08154B",
284
+ "#6E9FFF",
285
+ "#D92D20",
286
+ "#61B875",
287
+ "#84888F"
288
+ ],
289
+ dark: [
290
+ "#6E9FFF",
291
+ "#61B875",
292
+ "#F7D759",
293
+ "#BFC4CE",
294
+ "#A1C1FF",
295
+ "#FF6C5A",
296
+ "#A8EDB5",
297
+ "#9398A4"
298
+ ]
299
+ }, d = u.light.map((e, t) => `var(--jc-chart-${t + 1})`), f = {
300
+ brand: e,
301
+ ramps: t,
302
+ darkNeutrals: n,
303
+ feedback: r,
304
+ semantic: i,
305
+ fontFamily: a,
306
+ typography: o,
307
+ spacing: s,
308
+ radius: c,
309
+ grid: l,
310
+ chartColors: u,
311
+ chartPalette: d
312
+ };
313
+ //#endregion
314
+ export { r as a, c, s as d, f, n as i, t as l, u as n, a as o, o as p, d as r, l as s, e as t, i as u };
315
+
316
+ //# sourceMappingURL=tokens-BBTJY6nq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens-BBTJY6nq.js","names":["brand","ramps","darkNeutrals","feedback","semantic","fontFamily","typography","spacing","radius","grid","chartColors","chartPalette","i","tokens"],"sources":["../src/theme/tokens.ts"],"sourcesContent":["/**\n * Tokens do Design System JC Decor — fonte da verdade do tema.\n *\n * v0.2 (out/2026): paleta e tipografia recalibradas a partir do site\n * jcdecor.com.br (azul #2663EB, Poppins em tamanhos fixos) com:\n * - rampas perceptuais em OKLCH (50 → 900, 600 = tom \"cheio\" de cada cor)\n * - neutros frios tingidos no matiz do azul (substituem o LightGray bege)\n * - todos os pares texto/fundo validados em WCAG AA (≥ 4,5:1; UI ≥ 3:1)\n * - proporção 60-30-10: neutros · azul/navy · amarelo de destaque\n * Nunca hard-code hex/px que estes tokens já carregam.\n */\n\n/** Cores-âncora da marca. */\nexport const brand = {\n /** Azul de ação (botões, links, preços) — 5,2:1 com branco */\n horizon: '#2663EB',\n /** Navy institucional (barra superior, hero, textos de marca) */\n obsidian: '#08154B',\n /** Amarelo de destaque — usar só como FUNDO com texto navy (12:1), nunca como texto */\n electric: '#F7D759',\n /** Verde de sucesso / Pix — 4,7:1 com branco */\n evergreen: '#1E8540',\n /** Vermelho de erro / desconto — 4,8:1 com branco */\n danger: '#D92D20',\n white: '#FFFFFF',\n} as const;\n\nexport type RampStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\ntype Ramp = Record<RampStep, string>;\n\n/** Rampas OKLCH. O tom 600 é a âncora de cada cor (exceto electric: âncora em 300). */\nexport const ramps: Record<'horizon' | 'obsidian' | 'electric' | 'evergreen' | 'danger' | 'gray', Ramp> = {\n horizon: { 50: '#F3F7FF', 100: '#E4EDFF', 200: '#C6DAFF', 300: '#A1C1FF', 400: '#6E9FFF', 500: '#407DFF', 600: '#2663EB', 700: '#0F4ACF', 800: '#0033AC', 900: '#002178' },\n obsidian: { 50: '#F1F5FE', 100: '#E0E8F9', 200: '#C5D1EC', 300: '#A1B1D5', 400: '#7285B4', 500: '#3D528A', 600: '#08154B', 700: '#040C3B', 800: '#02052A', 900: '#01021A' },\n /** Âncora #F7D759 em 300; tons escuros giram para âmbar (texto amarelo sobre branco: use 700+). */\n electric: { 50: '#FFF9E1', 100: '#FEEFB7', 200: '#F9E07F', 300: '#F7D759', 400: '#D5A700', 500: '#BA8900', 600: '#A47000', 700: '#8D5900', 800: '#734300', 900: '#562C00' },\n evergreen: { 50: '#E9FBEC', 100: '#C9F3D2', 200: '#A8EDB5', 300: '#89D698', 400: '#61B875', 500: '#3E9C57', 600: '#1E8540', 700: '#006E2E', 800: '#005422', 900: '#003914' },\n danger: { 50: '#FFF4F2', 100: '#FFE6E2', 200: '#FFCBC2', 300: '#FFA698', 400: '#FF6C5A', 500: '#E84031', 600: '#D92D20', 700: '#AD0300', 800: '#860200', 900: '#5D0100' },\n /** Neutro frio (OKLCH h 265, croma 0,012) — combina com o azul em vez de brigar com ele. */\n gray: { 50: '#F6F7FA', 100: '#EAEFF7', 200: '#D7DBE3', 300: '#BFC3CB', 400: '#9FA3AB', 500: '#84888F', 600: '#6E7279', 700: '#4A4D54', 800: '#35383E', 900: '#1F2228' },\n};\n\n/** Neutros do tema escuro (mesmo matiz, croma baixo — evita \"azul neon\" no escuro). */\nexport const darkNeutrals = ['#E4E8EF', '#BFC4CE', '#9398A4', '#636975', '#373D49', '#262B36', '#1A1E27', '#10141B', '#0A0D13', '#04060A'] as const;\n\nexport const feedback = {\n success: ramps.evergreen[600],\n successBg: ramps.evergreen[50],\n warn: ramps.electric[400],\n warnBg: ramps.electric[50],\n warnText: ramps.electric[700],\n error: ramps.danger[600],\n errorBg: ramps.danger[50],\n} as const;\n\n/** Tokens semânticos por tema (equivalentes às variáveis `--ds-*`). Contrastes medidos contra `surface`. */\nexport const semantic = {\n light: {\n bg: ramps.gray[50],\n surface: '#FFFFFF',\n surface2: ramps.gray[50],\n text: ramps.gray[900], // 15,9:1\n text2: ramps.gray[700], // 8,5:1\n text3: ramps.gray[600], // 4,8:1\n border: '#8B9099', // 3,2:1 — borda de campos (WCAG 1.4.11)\n borderSoft: ramps.gray[200], // divisores e cards (decorativo)\n primary: ramps.horizon[600],\n primaryHover: ramps.horizon[700],\n primarySoft: ramps.horizon[50],\n accent: brand.electric,\n link: ramps.horizon[600],\n successBg: ramps.evergreen[50],\n warnBg: ramps.electric[50],\n errorBg: ramps.danger[50],\n shadowSm: '0 1px 2px rgba(31,34,40,.06), 0 1px 3px rgba(31,34,40,.08)',\n shadowMd: '0 4px 12px rgba(31,34,40,.08), 0 2px 4px rgba(31,34,40,.04)',\n shadowLg: '0 16px 40px rgba(31,34,40,.12), 0 4px 12px rgba(31,34,40,.06)',\n },\n dark: {\n bg: darkNeutrals[7],\n surface: darkNeutrals[6],\n surface2: darkNeutrals[5],\n text: darkNeutrals[0], // 15:1\n text2: darkNeutrals[1], // 10,5:1\n text3: darkNeutrals[2], // 5,8:1\n border: darkNeutrals[3],\n borderSoft: darkNeutrals[5],\n primary: ramps.horizon[400], // 7:1 sobre o fundo\n primaryHover: ramps.horizon[300],\n primarySoft: 'rgba(110,159,255,.14)',\n accent: brand.electric,\n link: ramps.horizon[300],\n successBg: 'rgba(97,184,117,.14)',\n warnBg: 'rgba(247,215,89,.12)',\n errorBg: 'rgba(255,108,90,.14)',\n shadowSm: '0 1px 3px rgba(0,0,0,.4)',\n shadowMd: '0 4px 14px rgba(0,0,0,.45)',\n shadowLg: '0 16px 40px rgba(0,0,0,.55)',\n },\n} as const;\n\nexport const fontFamily = \"'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif\";\n\n/**\n * Escala tipográfica — razão ~1,25 (terça maior) sobre base 16px.\n * Texto de leitura e de UI tem tamanho FIXO (legibilidade e alinhamento consistentes);\n * só títulos de destaque (display, h1) são fluidos entre mobile e desktop.\n * Poppins tem x-height alto: entrelinha 1,5 no corpo e 1,2–1,3 nos títulos.\n */\nexport const typography = {\n displayLg: { size: 'clamp(40px, 2.4vw + 26px, 56px)', weight: 700, lineHeight: 1.1, letterSpacing: '-0.02em', px: '56/40', label: 'display-large' },\n displayMd: { size: 'clamp(36px, 1.8vw + 25px, 48px)', weight: 700, lineHeight: 1.15, letterSpacing: '-0.02em', px: '48/36', label: 'display-medium' },\n displaySm: { size: 'clamp(32px, 1.2vw + 25px, 40px)', weight: 700, lineHeight: 1.2, letterSpacing: '-0.015em', px: '40/32', label: 'display-small' },\n headlineLg: { size: 'clamp(26px, 0.9vw + 21px, 32px)', weight: 600, lineHeight: 1.25, letterSpacing: '-0.01em', px: '32/26', label: 'headline-large' },\n headlineMd: { size: '24px', weight: 600, lineHeight: 1.33, letterSpacing: '-0.005em', px: '24', label: 'headline-medium' },\n headlineSm: { size: '20px', weight: 600, lineHeight: 1.4, letterSpacing: '0', px: '20', label: 'headline-small' },\n subheadlineLg: { size: '18px', weight: 400, lineHeight: 1.55, letterSpacing: '0', px: '18', label: 'body-large' },\n subheadlineRg: { size: '16px', weight: 400, lineHeight: 1.5, letterSpacing: '0', px: '16', label: 'body' },\n subheadlineSm: { size: '14px', weight: 400, lineHeight: 1.43, letterSpacing: '0', px: '14', label: 'body-small' },\n button: { size: '14px', weight: 600, lineHeight: 1.43, letterSpacing: '0.01em', px: '14', label: 'button' },\n disclaimer: { size: '12px', weight: 500, lineHeight: 1.33, letterSpacing: '0.01em', px: '12', label: 'caption' },\n} as const;\n\nexport type TypographyToken = keyof typeof typography;\n\n/** Spacing — passos de 4px de 0 a 100. */\nexport const spacing = {\n 0: '0px', 4: '4px', 8: '8px', 12: '12px', 16: '16px', 20: '20px', 24: '24px', 28: '28px',\n 32: '32px', 36: '36px', 40: '40px', 44: '44px', 48: '48px', 52: '52px', 56: '56px',\n 60: '60px', 64: '64px', 68: '68px', 72: '72px', 80: '80px', 100: '100px',\n} as const;\n\n/** Raios: controles 8px, cards 12px (como os cards de produto do site), seções 16px. */\nexport const radius = { sm: '8px', md: '12px', lg: '16px' } as const;\n\n/** Grid: mobile 4col/16/20 · tablet 8col/24/32 · desktop 12col/24/64. */\nexport const grid = {\n max: '1224px',\n gap: '24px',\n margin: { mobile: '20px', tablet: '32px', desktop: '64px' },\n columns: { mobile: 4, tablet: 8, desktop: 12 },\n breakpoints: { mobile: 360, tablet: 768, desktop: 1366 },\n} as const;\n\n/** Cores das séries em gráficos por tema — vizinhos contrastantes e ≥ 3:1 contra o fundo. */\nexport const chartColors = {\n light: ['#2663EB', '#1E8540', '#D5A700', '#08154B', '#6E9FFF', '#D92D20', '#61B875', '#84888F'],\n dark: ['#6E9FFF', '#61B875', '#F7D759', '#BFC4CE', '#A1C1FF', '#FF6C5A', '#A8EDB5', '#9398A4'],\n} as const;\n\n/**\n * Ordem das séries em gráficos. São variáveis CSS (`--jc-chart-N`) que trocam\n * de valor entre claro/escuro — use como qualquer cor: `color={chartPalette[0]}`.\n */\nexport const chartPalette = chartColors.light.map((_, i) => `var(--jc-chart-${i + 1})`);\n\nexport const tokens = { brand, ramps, darkNeutrals, feedback, semantic, fontFamily, typography, spacing, radius, grid, chartColors, chartPalette };\nexport default tokens;\n"],"mappings":";;AAaA,IAAaA,IAAQ;CAEnB,SAAS;CAET,UAAU;CAEV,UAAU;CAEV,WAAW;CAEX,QAAQ;CACR,OAAO;AACT,GAMaC,IAA6F;CACxG,SAAS;EAAE,IAAI;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;CAAU;CACzK,UAAU;EAAE,IAAI;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;CAAU;CAE1K,UAAU;EAAE,IAAI;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;CAAU;CAC1K,WAAW;EAAE,IAAI;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;CAAU;CAC3K,QAAQ;EAAE,IAAI;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;CAAU;CAExK,MAAM;EAAE,IAAI;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;EAAW,KAAK;CAAU;AACxK,GAGaC,IAAe;CAAC;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW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AE,QAAQ;EAAQ,QAAQ;EAAQ,SAAS;CAAO;CAC1D,SAAS;EAAE,QAAQ;EAAG,QAAQ;EAAG,SAAS;CAAG;CAC7C,aAAa;EAAE,QAAQ;EAAK,QAAQ;EAAK,SAAS;CAAK;AACzD,GAGaC,IAAc;CACzB,OAAO;EAAC;EAAW;EAAW;EAAW;EAAW;EAAW;EAAW;EAAW;CAAS;CAC9F,MAAM;EAAC;EAAW;EAAW;EAAW;EAAW;EAAW;EAAW;EAAW;CAAS;AAC/F,GAMaC,IAAeD,EAAY,MAAM,KAAK,GAAG,MAAM,kBAAkBE,IAAI,EAAE,EAAE,GAEzEC,IAAS;CAAE;CAAO;CAAO;CAAc;CAAU;CAAU;CAAY;CAAY;CAAS;CAAQ;CAAM;CAAa;AAAa"}
@@ -0,0 +1,2 @@
1
+ export * from './theme/tokens';
2
+ export { jcColors } from './theme/colors';
package/dist/tokens.js ADDED
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./tokens-BBTJY6nq.js";
3
+ import { t as p } from "./colors-C_5SHERN.js";
4
+ export { d as brand, o as chartColors, l as chartPalette, i as darkNeutrals, e as feedback, s as fontFamily, u as grid, p as jcColors, t as radius, a as ramps, f as semantic, n as spacing, r as tokens, c as typography };
@@ -0,0 +1,14 @@
1
+ /** Formatação pt-BR usada pelos componentes (KPIs, tabelas, preços, gráficos). */
2
+ export declare const LOCALE = "pt-BR";
3
+ export declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
4
+ /** 1234.5 → "R$ 1.234,50" */
5
+ export declare function formatCurrency(value: number, options?: Intl.NumberFormatOptions): string;
6
+ /** -5.6 → "-5,6%" (recebe valor em pontos percentuais). `signed` adiciona "+" em positivos. */
7
+ export declare function formatPercent(value: number, { digits, signed }?: {
8
+ digits?: number | undefined;
9
+ signed?: boolean | undefined;
10
+ }): string;
11
+ /** 54959 → "55 mil" */
12
+ export declare function formatCompact(value: number): string;
13
+ export declare function formatDate(value: Date | string | number, options?: Intl.DateTimeFormatOptions): string;
14
+ export declare function formatTime(value: Date | string | number): string;
package/package.json ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "@jcdecor/ui",
3
+ "version": "0.1.0",
4
+ "description": "Design System JC Decor — tema, tokens e componentes React sobre Mantine.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/JC-Decor/design-system.git",
9
+ "directory": "packages/ui"
10
+ },
11
+ "homepage": "https://github.com/JC-Decor/design-system#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/JC-Decor/design-system/issues"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": [
17
+ "*.css"
18
+ ],
19
+ "main": "./dist/index.js",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./chat": {
28
+ "types": "./dist/chat.d.ts",
29
+ "import": "./dist/chat.js"
30
+ },
31
+ "./charts": {
32
+ "types": "./dist/charts.d.ts",
33
+ "import": "./dist/charts.js"
34
+ },
35
+ "./brand": {
36
+ "types": "./dist/brand.d.ts",
37
+ "import": "./dist/brand.js"
38
+ },
39
+ "./tokens": {
40
+ "types": "./dist/tokens.d.ts",
41
+ "import": "./dist/tokens.js"
42
+ },
43
+ "./styles.css": "./dist/styles.css",
44
+ "./package.json": "./package.json"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "README.md"
49
+ ],
50
+ "keywords": [
51
+ "jcdecor",
52
+ "design-system",
53
+ "mantine",
54
+ "react"
55
+ ],
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "scripts": {
60
+ "build": "vite build && tsc -p tsconfig.build.json",
61
+ "dev": "vite build --watch",
62
+ "test": "vitest run",
63
+ "test:watch": "vitest",
64
+ "typecheck": "tsc --noEmit",
65
+ "prepublishOnly": "npm run build && npm run test"
66
+ },
67
+ "peerDependencies": {
68
+ "@mantine/charts": ">=9.0.0",
69
+ "@mantine/core": ">=9.0.0",
70
+ "@mantine/hooks": ">=9.0.0",
71
+ "@mantine/notifications": ">=9.0.0",
72
+ "react": ">=19.2.0",
73
+ "react-dom": ">=19.2.0",
74
+ "recharts": ">=3.2.1"
75
+ },
76
+ "peerDependenciesMeta": {
77
+ "@mantine/charts": {
78
+ "optional": true
79
+ },
80
+ "@mantine/notifications": {
81
+ "optional": true
82
+ },
83
+ "recharts": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "dependencies": {
88
+ "@tabler/icons-react": "^3.48.0",
89
+ "clsx": "^2.1.1"
90
+ },
91
+ "devDependencies": {
92
+ "@mantine/charts": "^9.6.3",
93
+ "@mantine/core": "^9.6.3",
94
+ "@mantine/hooks": "^9.6.3",
95
+ "@mantine/notifications": "^9.6.3",
96
+ "@types/react": "^19.2.0",
97
+ "@types/react-dom": "^19.2.0",
98
+ "postcss": "^8.5.0",
99
+ "postcss-preset-mantine": "^1.18.0",
100
+ "postcss-simple-vars": "^7.0.1",
101
+ "react": "^19.2.0",
102
+ "react-dom": "^19.2.0",
103
+ "recharts": "^3.2.1"
104
+ }
105
+ }