@fluityy/designsystem 0.2.13 → 0.2.14
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 +16 -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;
|
|
@@ -306,9 +307,12 @@
|
|
|
306
307
|
/* paleta primitiva (para swatches/utilitários quando necessário) */
|
|
307
308
|
--color-brand-50: var(--flui-color-brand-50);
|
|
308
309
|
--color-brand-100: var(--flui-color-brand-100);
|
|
309
|
-
--color-brand-
|
|
310
|
+
--color-brand-300: var(--flui-color-brand-300);
|
|
311
|
+
--color-brand-400: var(--flui-color-brand-400);
|
|
310
312
|
--color-brand-500: var(--flui-color-brand-500);
|
|
311
313
|
--color-brand-600: var(--flui-color-brand-600);
|
|
314
|
+
--color-brand-700: var(--flui-color-brand-700);
|
|
315
|
+
--color-brand-800: var(--flui-color-brand-800);
|
|
312
316
|
--color-neutral-100: var(--flui-color-neutral-100);
|
|
313
317
|
--color-neutral-500: var(--flui-color-neutral-500);
|
|
314
318
|
--color-neutral-800: var(--flui-color-neutral-800);
|
|
@@ -357,6 +361,7 @@
|
|
|
357
361
|
|
|
358
362
|
/* sombras */
|
|
359
363
|
--shadow-sm: var(--flui-shadow-sm);
|
|
364
|
+
--shadow-xs: var(--flui-shadow-xs);
|
|
360
365
|
--shadow-md: var(--flui-shadow-md);
|
|
361
366
|
--shadow-lg: var(--flui-shadow-lg);
|
|
362
367
|
}
|
|
@@ -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.14",
|
|
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",
|