@fluityy/designsystem 0.2.13 → 0.2.15
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/dist/components/Button/Button.d.ts +5 -1
- package/dist/index.js +4757 -4689
- package/dist/index.js.map +1 -1
- package/dist/styles.css +40 -11
- package/dist/theme/ThemeProvider.d.ts +10 -2
- package/package.json +8 -1
package/dist/styles.css
CHANGED
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
--flui-color-accent-scale-700: #8ab000;
|
|
17
17
|
--flui-color-accent-scale-800: #638000;
|
|
18
18
|
--flui-color-accent-scale-900: #1a2200;
|
|
19
|
-
--flui-color-brand-50: #
|
|
20
|
-
--flui-color-brand-100: #
|
|
21
|
-
--flui-color-brand-200: #
|
|
22
|
-
--flui-color-brand-300: #
|
|
23
|
-
--flui-color-brand-400: #
|
|
24
|
-
--flui-color-brand-500: #
|
|
25
|
-
--flui-color-brand-600: #
|
|
26
|
-
--flui-color-brand-700: #
|
|
27
|
-
--flui-color-brand-800: #
|
|
28
|
-
--flui-color-brand-900: #
|
|
19
|
+
--flui-color-brand-50: #eff2ff;
|
|
20
|
+
--flui-color-brand-100: #dde3ff;
|
|
21
|
+
--flui-color-brand-200: #b8c5ff;
|
|
22
|
+
--flui-color-brand-300: #8aa1ff;
|
|
23
|
+
--flui-color-brand-400: #5478f8;
|
|
24
|
+
--flui-color-brand-500: #2554ef;
|
|
25
|
+
--flui-color-brand-600: #1a40c7;
|
|
26
|
+
--flui-color-brand-700: #142fa0;
|
|
27
|
+
--flui-color-brand-800: #0e2073;
|
|
28
|
+
--flui-color-brand-900: #08144a;
|
|
29
29
|
--flui-color-neutral-0: #ffffff;
|
|
30
30
|
--flui-color-neutral-50: #f7f8fa;
|
|
31
31
|
--flui-color-neutral-100: #f3f4f7;
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
--flui-radius-xl: 24px;
|
|
73
73
|
--flui-radius-full: 9999px;
|
|
74
74
|
--flui-shadow-sm: 0 1px 2px rgba(19, 21, 27, 0.06);
|
|
75
|
+
--flui-shadow-xs: 0 1px 2px rgba(19, 21, 27, 0.10);
|
|
75
76
|
--flui-shadow-md: 0 4px 12px rgba(19, 21, 27, 0.10);
|
|
76
77
|
--flui-shadow-lg: 0 12px 32px rgba(19, 21, 27, 0.14);
|
|
77
78
|
--flui-font-family-sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
|
@@ -181,6 +182,30 @@
|
|
|
181
182
|
--color-toast-danger-bg: #2d0808;
|
|
182
183
|
}
|
|
183
184
|
|
|
185
|
+
/* button-vars.css */
|
|
186
|
+
/* Tokens locais do botão raised (variantes neutras) — alternam por modo */
|
|
187
|
+
:root {
|
|
188
|
+
--flui-btn-raised-highlight: rgba(255, 255, 255, 0.6);
|
|
189
|
+
--flui-btn-raised-highlight-hover: rgba(255, 255, 255, 0.7);
|
|
190
|
+
--flui-btn-raised-lip: rgba(0, 0, 0, 0.06);
|
|
191
|
+
--flui-btn-raised-lip-hover: rgba(0, 0, 0, 0.07);
|
|
192
|
+
--flui-btn-raised-lip-active: rgba(0, 0, 0, 0.08);
|
|
193
|
+
--flui-btn-raised-stroke: rgba(0, 0, 0, 0.06);
|
|
194
|
+
--flui-btn-raised-stroke-hover: rgba(0, 0, 0, 0.07);
|
|
195
|
+
--flui-btn-raised-stroke-active: rgba(0, 0, 0, 0.08);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
[data-theme="dark"] {
|
|
199
|
+
--flui-btn-raised-highlight: rgba(255, 255, 255, 0.08);
|
|
200
|
+
--flui-btn-raised-highlight-hover: rgba(255, 255, 255, 0.12);
|
|
201
|
+
--flui-btn-raised-lip: rgba(0, 0, 0, 0.32);
|
|
202
|
+
--flui-btn-raised-lip-hover: rgba(0, 0, 0, 0.36);
|
|
203
|
+
--flui-btn-raised-lip-active: rgba(0, 0, 0, 0.4);
|
|
204
|
+
--flui-btn-raised-stroke: rgba(255, 255, 255, 0.06);
|
|
205
|
+
--flui-btn-raised-stroke-hover: rgba(255, 255, 255, 0.08);
|
|
206
|
+
--flui-btn-raised-stroke-active: rgba(255, 255, 255, 0.1);
|
|
207
|
+
}
|
|
208
|
+
|
|
184
209
|
/* tokens.dark.css */
|
|
185
210
|
/**
|
|
186
211
|
* Do not edit directly, this file was auto-generated.
|
|
@@ -306,9 +331,12 @@
|
|
|
306
331
|
/* paleta primitiva (para swatches/utilitários quando necessário) */
|
|
307
332
|
--color-brand-50: var(--flui-color-brand-50);
|
|
308
333
|
--color-brand-100: var(--flui-color-brand-100);
|
|
309
|
-
--color-brand-
|
|
334
|
+
--color-brand-300: var(--flui-color-brand-300);
|
|
335
|
+
--color-brand-400: var(--flui-color-brand-400);
|
|
310
336
|
--color-brand-500: var(--flui-color-brand-500);
|
|
311
337
|
--color-brand-600: var(--flui-color-brand-600);
|
|
338
|
+
--color-brand-700: var(--flui-color-brand-700);
|
|
339
|
+
--color-brand-800: var(--flui-color-brand-800);
|
|
312
340
|
--color-neutral-100: var(--flui-color-neutral-100);
|
|
313
341
|
--color-neutral-500: var(--flui-color-neutral-500);
|
|
314
342
|
--color-neutral-800: var(--flui-color-neutral-800);
|
|
@@ -357,6 +385,7 @@
|
|
|
357
385
|
|
|
358
386
|
/* sombras */
|
|
359
387
|
--shadow-sm: var(--flui-shadow-sm);
|
|
388
|
+
--shadow-xs: var(--flui-shadow-xs);
|
|
360
389
|
--shadow-md: var(--flui-shadow-md);
|
|
361
390
|
--shadow-lg: var(--flui-shadow-lg);
|
|
362
391
|
}
|
|
@@ -7,6 +7,8 @@ export type ColorMode = "light" | "dark" | "system";
|
|
|
7
7
|
*/
|
|
8
8
|
export type Brand = "default" | (string & {});
|
|
9
9
|
export type RadiusScale = "sharp" | "default" | "soft" | "round";
|
|
10
|
+
/** Estilo global dos botões. "raised" remapeia variantes pra versão com shadow 3D. */
|
|
11
|
+
export type ButtonStyle = "normal" | "raised";
|
|
10
12
|
interface ThemeContextValue {
|
|
11
13
|
/** Preferência escolhida (pode ser "system"). */
|
|
12
14
|
mode: ColorMode;
|
|
@@ -14,9 +16,11 @@ interface ThemeContextValue {
|
|
|
14
16
|
resolvedMode: "light" | "dark";
|
|
15
17
|
brand: Brand;
|
|
16
18
|
radius: RadiusScale;
|
|
19
|
+
buttonStyle: ButtonStyle;
|
|
17
20
|
setMode: (mode: ColorMode) => void;
|
|
18
21
|
setBrand: (brand: Brand) => void;
|
|
19
22
|
setRadius: (radius: RadiusScale) => void;
|
|
23
|
+
setButtonStyle: (style: ButtonStyle) => void;
|
|
20
24
|
/** Alterna entre claro e escuro (resolve "system" antes). */
|
|
21
25
|
toggleMode: () => void;
|
|
22
26
|
}
|
|
@@ -28,12 +32,16 @@ export interface ThemeProviderProps {
|
|
|
28
32
|
defaultBrand?: Brand;
|
|
29
33
|
/** Escala de radius inicial caso não haja preferência salva. Padrão: "default". */
|
|
30
34
|
defaultRadius?: RadiusScale;
|
|
35
|
+
/** Estilo padrão dos botões. Padrão: "normal". */
|
|
36
|
+
defaultButtonStyle?: ButtonStyle;
|
|
31
37
|
/**
|
|
32
|
-
* Onde aplicar os atributos data-theme / data-brand / data-radius.
|
|
38
|
+
* Onde aplicar os atributos data-theme / data-brand / data-radius / data-button-style.
|
|
33
39
|
* Padrão: document.documentElement (escopo global do app).
|
|
34
40
|
*/
|
|
35
41
|
target?: () => HTMLElement | null;
|
|
36
42
|
}
|
|
37
|
-
export declare function ThemeProvider({ children, defaultMode, defaultBrand, defaultRadius, target, }: ThemeProviderProps): import("react").JSX.Element;
|
|
43
|
+
export declare function ThemeProvider({ children, defaultMode, defaultBrand, defaultRadius, defaultButtonStyle, target, }: ThemeProviderProps): import("react").JSX.Element;
|
|
38
44
|
export declare function useTheme(): ThemeContextValue;
|
|
45
|
+
/** Versão opcional do hook — retorna null se não houver ThemeProvider. */
|
|
46
|
+
export declare function useThemeOptional(): ThemeContextValue | null;
|
|
39
47
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluityy/designsystem",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Flui Design System — componentes React com Tailwind v4 e tokens semânticos",
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"ui"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/Fluity-AI/designsystem.git"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
15
22
|
"main": "./dist/index.js",
|
|
16
23
|
"module": "./dist/index.js",
|
|
17
24
|
"types": "./dist/index.d.ts",
|