@keboola/design 3.2.0 → 3.2.3
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/AGENTS.md +427 -0
- package/COMPONENT-API.md +377 -0
- package/README.md +12 -3
- package/dist/index.cjs +25 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -2
- package/dist/index.d.ts +26 -2
- package/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -1
- package/dist/testing.cjs +23 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +23 -0
- package/dist/testing.js.map +1 -1
- package/package.json +10 -6
- package/src/styles.css +22 -1
package/dist/index.d.cts
CHANGED
|
@@ -2687,8 +2687,8 @@ type AddonVariant = ComponentProps<typeof BadgeAddon>['variant'];
|
|
|
2687
2687
|
type BadgeRootProps = ComponentProps<typeof BadgeRoot>;
|
|
2688
2688
|
type BadgeLabelProps = ComponentProps<typeof BadgeLabel>;
|
|
2689
2689
|
/**
|
|
2690
|
-
* Props for `Badge`. `color` is a categorical contract (`green` = success, `red` = error, `
|
|
2691
|
-
* `purple/cyan/teal/
|
|
2690
|
+
* Props for `Badge`. `color` is a categorical contract (`green` = success, `red` = error, `orange` = warning,
|
|
2691
|
+
* `purple/cyan/teal/blue/gray` for decorative tags) — colours stay fixed across brand themes.
|
|
2692
2692
|
* Pass `prefix` / `suffix` for icon-style addons.
|
|
2693
2693
|
*/
|
|
2694
2694
|
type Props$Q = Pick<BadgeRootProps, 'variant' | 'color'> & Omit<BadgeLabelProps, 'prefix'> & {
|
|
@@ -10455,6 +10455,8 @@ declare const themeToolbarBrands: {
|
|
|
10455
10455
|
primaryForeground: string;
|
|
10456
10456
|
destructive: string;
|
|
10457
10457
|
destructiveForeground: string;
|
|
10458
|
+
accent?: string | undefined;
|
|
10459
|
+
accentForeground?: string | undefined;
|
|
10458
10460
|
};
|
|
10459
10461
|
shell: "sidebar" | "topnav";
|
|
10460
10462
|
colorsDark?: {
|
|
@@ -10467,6 +10469,28 @@ declare const themeToolbarBrands: {
|
|
|
10467
10469
|
primaryForeground: string;
|
|
10468
10470
|
destructive: string;
|
|
10469
10471
|
destructiveForeground: string;
|
|
10472
|
+
accent?: string | undefined;
|
|
10473
|
+
accentForeground?: string | undefined;
|
|
10474
|
+
} | undefined;
|
|
10475
|
+
sidebarColors?: {
|
|
10476
|
+
sidebar?: string | undefined;
|
|
10477
|
+
sidebarForeground?: string | undefined;
|
|
10478
|
+
sidebarPrimary?: string | undefined;
|
|
10479
|
+
sidebarPrimaryForeground?: string | undefined;
|
|
10480
|
+
sidebarAccent?: string | undefined;
|
|
10481
|
+
sidebarAccentForeground?: string | undefined;
|
|
10482
|
+
sidebarBorder?: string | undefined;
|
|
10483
|
+
sidebarRing?: string | undefined;
|
|
10484
|
+
} | undefined;
|
|
10485
|
+
sidebarColorsDark?: {
|
|
10486
|
+
sidebar?: string | undefined;
|
|
10487
|
+
sidebarForeground?: string | undefined;
|
|
10488
|
+
sidebarPrimary?: string | undefined;
|
|
10489
|
+
sidebarPrimaryForeground?: string | undefined;
|
|
10490
|
+
sidebarAccent?: string | undefined;
|
|
10491
|
+
sidebarAccentForeground?: string | undefined;
|
|
10492
|
+
sidebarBorder?: string | undefined;
|
|
10493
|
+
sidebarRing?: string | undefined;
|
|
10470
10494
|
} | undefined;
|
|
10471
10495
|
typography?: {
|
|
10472
10496
|
fontFamily: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2687,8 +2687,8 @@ type AddonVariant = ComponentProps<typeof BadgeAddon>['variant'];
|
|
|
2687
2687
|
type BadgeRootProps = ComponentProps<typeof BadgeRoot>;
|
|
2688
2688
|
type BadgeLabelProps = ComponentProps<typeof BadgeLabel>;
|
|
2689
2689
|
/**
|
|
2690
|
-
* Props for `Badge`. `color` is a categorical contract (`green` = success, `red` = error, `
|
|
2691
|
-
* `purple/cyan/teal/
|
|
2690
|
+
* Props for `Badge`. `color` is a categorical contract (`green` = success, `red` = error, `orange` = warning,
|
|
2691
|
+
* `purple/cyan/teal/blue/gray` for decorative tags) — colours stay fixed across brand themes.
|
|
2692
2692
|
* Pass `prefix` / `suffix` for icon-style addons.
|
|
2693
2693
|
*/
|
|
2694
2694
|
type Props$Q = Pick<BadgeRootProps, 'variant' | 'color'> & Omit<BadgeLabelProps, 'prefix'> & {
|
|
@@ -10455,6 +10455,8 @@ declare const themeToolbarBrands: {
|
|
|
10455
10455
|
primaryForeground: string;
|
|
10456
10456
|
destructive: string;
|
|
10457
10457
|
destructiveForeground: string;
|
|
10458
|
+
accent?: string | undefined;
|
|
10459
|
+
accentForeground?: string | undefined;
|
|
10458
10460
|
};
|
|
10459
10461
|
shell: "sidebar" | "topnav";
|
|
10460
10462
|
colorsDark?: {
|
|
@@ -10467,6 +10469,28 @@ declare const themeToolbarBrands: {
|
|
|
10467
10469
|
primaryForeground: string;
|
|
10468
10470
|
destructive: string;
|
|
10469
10471
|
destructiveForeground: string;
|
|
10472
|
+
accent?: string | undefined;
|
|
10473
|
+
accentForeground?: string | undefined;
|
|
10474
|
+
} | undefined;
|
|
10475
|
+
sidebarColors?: {
|
|
10476
|
+
sidebar?: string | undefined;
|
|
10477
|
+
sidebarForeground?: string | undefined;
|
|
10478
|
+
sidebarPrimary?: string | undefined;
|
|
10479
|
+
sidebarPrimaryForeground?: string | undefined;
|
|
10480
|
+
sidebarAccent?: string | undefined;
|
|
10481
|
+
sidebarAccentForeground?: string | undefined;
|
|
10482
|
+
sidebarBorder?: string | undefined;
|
|
10483
|
+
sidebarRing?: string | undefined;
|
|
10484
|
+
} | undefined;
|
|
10485
|
+
sidebarColorsDark?: {
|
|
10486
|
+
sidebar?: string | undefined;
|
|
10487
|
+
sidebarForeground?: string | undefined;
|
|
10488
|
+
sidebarPrimary?: string | undefined;
|
|
10489
|
+
sidebarPrimaryForeground?: string | undefined;
|
|
10490
|
+
sidebarAccent?: string | undefined;
|
|
10491
|
+
sidebarAccentForeground?: string | undefined;
|
|
10492
|
+
sidebarBorder?: string | undefined;
|
|
10493
|
+
sidebarRing?: string | undefined;
|
|
10470
10494
|
} | undefined;
|
|
10471
10495
|
typography?: {
|
|
10472
10496
|
fontFamily: string;
|
package/dist/index.js
CHANGED
|
@@ -10299,6 +10299,29 @@ var brandToCssVars = (brand, resolvedMode) => {
|
|
|
10299
10299
|
vars["--color-primary-foreground"] = colors8.primaryForeground;
|
|
10300
10300
|
vars["--color-destructive"] = colors8.destructive;
|
|
10301
10301
|
vars["--color-destructive-foreground"] = colors8.destructiveForeground;
|
|
10302
|
+
if (colors8.accent !== void 0) vars["--color-accent"] = colors8.accent;
|
|
10303
|
+
if (colors8.accentForeground !== void 0)
|
|
10304
|
+
vars["--color-accent-foreground"] = colors8.accentForeground;
|
|
10305
|
+
}
|
|
10306
|
+
const sidebar = resolvedMode === "dark" ? brand.sidebarColorsDark : brand.sidebarColors;
|
|
10307
|
+
if (sidebar) {
|
|
10308
|
+
const sidebarVars = {
|
|
10309
|
+
"--color-sidebar": sidebar.sidebar,
|
|
10310
|
+
"--color-sidebar-foreground": sidebar.sidebarForeground,
|
|
10311
|
+
"--color-sidebar-primary": sidebar.sidebarPrimary,
|
|
10312
|
+
"--color-sidebar-primary-foreground": sidebar.sidebarPrimaryForeground,
|
|
10313
|
+
"--color-sidebar-accent": sidebar.sidebarAccent,
|
|
10314
|
+
"--color-sidebar-accent-foreground": sidebar.sidebarAccentForeground,
|
|
10315
|
+
"--color-sidebar-border": sidebar.sidebarBorder,
|
|
10316
|
+
"--color-sidebar-ring": sidebar.sidebarRing
|
|
10317
|
+
};
|
|
10318
|
+
for (const [name, value] of Object.entries(sidebarVars)) {
|
|
10319
|
+
if (value !== void 0) vars[name] = value;
|
|
10320
|
+
}
|
|
10321
|
+
}
|
|
10322
|
+
const fontFamily = brand.typography?.fontFamily?.trim();
|
|
10323
|
+
if (fontFamily) {
|
|
10324
|
+
vars["--font-sans"] = fontFamily;
|
|
10302
10325
|
}
|
|
10303
10326
|
if (brand.radii) {
|
|
10304
10327
|
vars["--radius-sm"] = brand.radii.sm;
|
|
@@ -10386,7 +10409,7 @@ var useTheme = () => {
|
|
|
10386
10409
|
const context = use(ThemeContext);
|
|
10387
10410
|
if (context === null) {
|
|
10388
10411
|
throw new Error(
|
|
10389
|
-
"useTheme must be used within a <ThemeProvider>. Wrap your app root with <ThemeProvider
|
|
10412
|
+
"useTheme must be used within a <ThemeProvider>. Wrap your app root with <ThemeProvider> from @keboola/design."
|
|
10390
10413
|
);
|
|
10391
10414
|
}
|
|
10392
10415
|
return context;
|
|
@@ -10395,7 +10418,7 @@ var useColorScheme = () => {
|
|
|
10395
10418
|
const context = use(ThemeContext);
|
|
10396
10419
|
if (context === null) {
|
|
10397
10420
|
throw new Error(
|
|
10398
|
-
"useColorScheme must be used within a <ThemeProvider>. Wrap your app root with <ThemeProvider
|
|
10421
|
+
"useColorScheme must be used within a <ThemeProvider>. Wrap your app root with <ThemeProvider> from @keboola/design."
|
|
10399
10422
|
);
|
|
10400
10423
|
}
|
|
10401
10424
|
return { colorScheme: context.colorScheme, resolvedMode: context.resolvedMode };
|