@keboola/design 3.1.1 → 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 +102 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -19
- package/dist/index.d.ts +79 -19
- package/dist/index.js +102 -21
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor.cjs.map +1 -1
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.cjs.map +1 -1
- package/dist/mermaid.js.map +1 -1
- package/dist/styles.css +3 -1
- package/dist/testing.cjs +79 -16
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +80 -17
- package/dist/testing.js.map +1 -1
- package/package.json +10 -6
- package/src/styles.css +22 -1
package/dist/index.d.cts
CHANGED
|
@@ -103,7 +103,7 @@ declare const Button: ({ ref, children, disabled, className, type, isLoading, as
|
|
|
103
103
|
}) => react_jsx_runtime.JSX.Element;
|
|
104
104
|
|
|
105
105
|
declare const buttonInlineVariants: (props?: ({
|
|
106
|
-
color?: "
|
|
106
|
+
color?: "dark" | "muted" | "link" | "danger" | "custom" | null | undefined;
|
|
107
107
|
variant?: "link" | "custom" | "link-reverse" | null | undefined;
|
|
108
108
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
109
109
|
type Props$1O = ComponentProps<'button'> & VariantProps<typeof buttonInlineVariants> & {
|
|
@@ -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'> & {
|
|
@@ -10338,6 +10338,17 @@ type Props$2 = {
|
|
|
10338
10338
|
};
|
|
10339
10339
|
declare const SqlEditor: ({ value, onChange, onSelectionChange, onCreateEditor, onDestroyEditor, onBlurEditor, onFocusEditor, placeholder, searchQuery, searchMatchIndex, readOnly, extraKeys, queryParser, autoFocus, lineNumbers, className, schema, variables, defaultDatabase, defaultSchema, highlightLines, dialect, }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
10340
10340
|
|
|
10341
|
+
type ColorScheme = 'light' | 'dark' | 'system';
|
|
10342
|
+
type ResolvedMode = 'light' | 'dark';
|
|
10343
|
+
type ThemeContextValue = {
|
|
10344
|
+
brand: Brand;
|
|
10345
|
+
setBrand?: (brand: Brand) => void;
|
|
10346
|
+
/** The configured color scheme (may be `'system'`). */
|
|
10347
|
+
colorScheme: ColorScheme;
|
|
10348
|
+
/** The effective light/dark mode after resolving `'system'`. */
|
|
10349
|
+
resolvedMode: ResolvedMode;
|
|
10350
|
+
};
|
|
10351
|
+
|
|
10341
10352
|
type Props$1 = {
|
|
10342
10353
|
/**
|
|
10343
10354
|
* Brand whose tokens drive the chrome (`@keboola/design`'s semantic CSS
|
|
@@ -10351,29 +10362,36 @@ type Props$1 = {
|
|
|
10351
10362
|
* brands at runtime (Storybook toolbar, a customer-impersonation switch).
|
|
10352
10363
|
*/
|
|
10353
10364
|
setBrand?: (brand: Brand) => void;
|
|
10365
|
+
/**
|
|
10366
|
+
* Light/dark mode. `'system'` follows `prefers-color-scheme` and updates
|
|
10367
|
+
* reactively. Defaults to `'light'` so existing mounts don't drift. Only
|
|
10368
|
+
* the ROOT provider applies this (sets `data-theme`, owns the media
|
|
10369
|
+
* listener); a nested provider inherits the root's resolved mode.
|
|
10370
|
+
*/
|
|
10371
|
+
colorScheme?: ColorScheme;
|
|
10354
10372
|
children: ReactNode;
|
|
10355
10373
|
};
|
|
10356
10374
|
/**
|
|
10357
10375
|
* Responsibilities:
|
|
10358
10376
|
* - Render hidden SVG gradient definitions (`aigradient-600`, `aigradient-700`).
|
|
10359
10377
|
* - Set `data-brand="<brand.id>"` on `<html>` and inject the matching `--color-*` /
|
|
10360
|
-
* `--radius-*` CSS variables
|
|
10361
|
-
*
|
|
10378
|
+
* `--radius-*` CSS variables (for the resolved light/dark mode) so chrome
|
|
10379
|
+
* re-skins for the supplied brand.
|
|
10380
|
+
* - ROOT only: set `data-theme` (`light` | `dark`) on `<html>` and own the
|
|
10381
|
+
* `prefers-color-scheme` media listener when `colorScheme === 'system'`.
|
|
10382
|
+
* A nested provider inherits the resolved mode from the parent context and
|
|
10383
|
+
* touches neither `data-theme` nor a media listener.
|
|
10384
|
+
* - Expose `{ brand, setBrand?, colorScheme, resolvedMode }` via `useTheme()`.
|
|
10362
10385
|
*
|
|
10363
|
-
*
|
|
10364
|
-
*
|
|
10365
|
-
*
|
|
10386
|
+
* Brand × mode: the active mode's palette is injected inline on `<html>`. When
|
|
10387
|
+
* the resolved mode is `dark` and the brand has no `colorsDark`, the colour
|
|
10388
|
+
* vars are NOT emitted — the stylesheet `[data-theme='dark']` block supplies
|
|
10389
|
+
* them, so no `!important` override is ever needed.
|
|
10366
10390
|
*
|
|
10367
|
-
* `data-brand` (brand id)
|
|
10368
|
-
*
|
|
10369
|
-
* `styles.css`) so the two axes compose without clobbering each other.
|
|
10391
|
+
* `data-brand` (brand id) and `data-theme` (light/dark) are separate axes so
|
|
10392
|
+
* they compose without clobbering each other.
|
|
10370
10393
|
*/
|
|
10371
|
-
declare const ThemeProvider: ({ brand, setBrand, children }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
10372
|
-
|
|
10373
|
-
type ThemeContextValue = {
|
|
10374
|
-
brand: Brand;
|
|
10375
|
-
setBrand?: (brand: Brand) => void;
|
|
10376
|
-
};
|
|
10394
|
+
declare const ThemeProvider: ({ brand, setBrand, colorScheme, children, }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
10377
10395
|
|
|
10378
10396
|
/**
|
|
10379
10397
|
* Read the active brand (and optional setter) from the nearest `<ThemeProvider>`.
|
|
@@ -10384,10 +10402,22 @@ type ThemeContextValue = {
|
|
|
10384
10402
|
*/
|
|
10385
10403
|
declare const useTheme: () => ThemeContextValue;
|
|
10386
10404
|
|
|
10405
|
+
/**
|
|
10406
|
+
* Read the configured color scheme and the effective light/dark mode from the
|
|
10407
|
+
* nearest `<ThemeProvider>`. Read-only — there is no setter (yet).
|
|
10408
|
+
*
|
|
10409
|
+
* Throws if no provider is mounted (mirrors `useTheme()`).
|
|
10410
|
+
*/
|
|
10411
|
+
declare const useColorScheme: () => {
|
|
10412
|
+
colorScheme: ColorScheme;
|
|
10413
|
+
resolvedMode: ResolvedMode;
|
|
10414
|
+
};
|
|
10415
|
+
|
|
10387
10416
|
declare const useIsLegacyBrand: () => boolean;
|
|
10388
10417
|
|
|
10389
10418
|
type Props = {
|
|
10390
10419
|
brand: Brand;
|
|
10420
|
+
colorScheme?: ColorScheme;
|
|
10391
10421
|
children: ReactNode;
|
|
10392
10422
|
};
|
|
10393
10423
|
/**
|
|
@@ -10397,8 +10427,14 @@ type Props = {
|
|
|
10397
10427
|
* `resolveStorybookBrand` + `themeToolbarBrands` from `./storybookBrands` to
|
|
10398
10428
|
* build the toolbar. This is the empirical brand-swap harness UT-4047
|
|
10399
10429
|
* promised for the layer-0 contract.
|
|
10430
|
+
*
|
|
10431
|
+
* `colorScheme` (driven by the **Mode** toolbar) is forwarded to the provider
|
|
10432
|
+
* so flipping it sets `data-theme` and emits the active mode's palette — the
|
|
10433
|
+
* empirical light/dark switch. The story is rendered on a `bg-background`
|
|
10434
|
+
* surface so the mode is actually visible (otherwise dark-mode text sits on
|
|
10435
|
+
* the unrelated canvas backdrop).
|
|
10400
10436
|
*/
|
|
10401
|
-
declare const ThemeDecorator: ({ brand, children }: Props) => react_jsx_runtime.JSX.Element;
|
|
10437
|
+
declare const ThemeDecorator: ({ brand, colorScheme, children }: Props) => react_jsx_runtime.JSX.Element;
|
|
10402
10438
|
|
|
10403
10439
|
/**
|
|
10404
10440
|
* Default toolbar items shipped with `ThemeDecorator` — the same brand IDs
|
|
@@ -10419,6 +10455,8 @@ declare const themeToolbarBrands: {
|
|
|
10419
10455
|
primaryForeground: string;
|
|
10420
10456
|
destructive: string;
|
|
10421
10457
|
destructiveForeground: string;
|
|
10458
|
+
accent?: string | undefined;
|
|
10459
|
+
accentForeground?: string | undefined;
|
|
10422
10460
|
};
|
|
10423
10461
|
shell: "sidebar" | "topnav";
|
|
10424
10462
|
colorsDark?: {
|
|
@@ -10431,6 +10469,28 @@ declare const themeToolbarBrands: {
|
|
|
10431
10469
|
primaryForeground: string;
|
|
10432
10470
|
destructive: string;
|
|
10433
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;
|
|
10434
10494
|
} | undefined;
|
|
10435
10495
|
typography?: {
|
|
10436
10496
|
fontFamily: string;
|
|
@@ -10449,4 +10509,4 @@ declare const themeToolbarBrands: {
|
|
|
10449
10509
|
*/
|
|
10450
10510
|
declare const resolveStorybookBrand: (id: unknown) => Brand;
|
|
10451
10511
|
|
|
10452
|
-
export { Alert, AnswerSummary, type AnswerItem as AnswerSummaryItem, type Props$I as AnswerSummaryProps, type Variant$5 as AnswerSummaryVariant, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, type CalendarProps, Card, type ChangeClassification, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, type DateRange, DateRangeInput, DateRangePicker, type DateRangePreset, type DiffChunk, type DiffInformation, type DiffRow, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, type RootProps$3 as EmptyStateProps, type Variant$1 as EmptyStateVariant, ErrorState, type RootProps$2 as ErrorStateProps, type Variant as ErrorStateVariant, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, type Props$G as InlineStepDetailProps, InlineStepLabel, type Props$F as InlineStepLabelProps, type Variant$3 as InlineStepLabelVariant, InputGroup, InputOtp, type RootProps$4 as InputOtpProps, Kbd, Label, type LineInformation, Link, MarkedText, type MergeConflict, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, type PlanApprovalProps, type PlanApprovalStatus, PlanRewritingIndicator, type PlanRewritingIndicatorProps, Popconfirm, Popover, Progress, type PromptCommand, PromptInput, type Props$1k as Props, Question, type QuestionAnswers, QuestionBlock, type Props$z as QuestionBlockProps, type QuestionOption, type Props$A as QuestionProps, type QuestionStep, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, type SelectItem, type SelectItemGroup, Separator, type ServerFieldError, Sheet, type SideInformation, Sidebar, type SidebarMode, SidebarProvider, type SidebarSide, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, type StepStatus, Stepper, type StepperOrientation, SuggestedPrompt, Switch, Table, Tabs, TabsContent, Tagger, TextInput, Textarea, type ThemeContextValue, ThemeDecorator, ThemeProvider, ThinkingIndicator, type ThumbTooltipFn, TimeInput, TimePicker, Timeline, type ToastOptions, Toaster, Toggle, ToggleGroup, Tooltip, type Props$1I as TooltipProps, TooltipProvider, type Trigger, Truncated, type UseAutosizeInputOptions, type UseAutosizeInputReturn, type ValidityState, type WordInformation, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
|
10512
|
+
export { Alert, AnswerSummary, type AnswerItem as AnswerSummaryItem, type Props$I as AnswerSummaryProps, type Variant$5 as AnswerSummaryVariant, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, type CalendarProps, Card, type ChangeClassification, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, type ColorScheme, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, type DateRange, DateRangeInput, DateRangePicker, type DateRangePreset, type DiffChunk, type DiffInformation, type DiffRow, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, type RootProps$3 as EmptyStateProps, type Variant$1 as EmptyStateVariant, ErrorState, type RootProps$2 as ErrorStateProps, type Variant as ErrorStateVariant, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, type Props$G as InlineStepDetailProps, InlineStepLabel, type Props$F as InlineStepLabelProps, type Variant$3 as InlineStepLabelVariant, InputGroup, InputOtp, type RootProps$4 as InputOtpProps, Kbd, Label, type LineInformation, Link, MarkedText, type MergeConflict, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, type PlanApprovalProps, type PlanApprovalStatus, PlanRewritingIndicator, type PlanRewritingIndicatorProps, Popconfirm, Popover, Progress, type PromptCommand, PromptInput, type Props$1k as Props, Question, type QuestionAnswers, QuestionBlock, type Props$z as QuestionBlockProps, type QuestionOption, type Props$A as QuestionProps, type QuestionStep, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedMode, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, type SelectItem, type SelectItemGroup, Separator, type ServerFieldError, Sheet, type SideInformation, Sidebar, type SidebarMode, SidebarProvider, type SidebarSide, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, type StepStatus, Stepper, type StepperOrientation, SuggestedPrompt, Switch, Table, Tabs, TabsContent, Tagger, TextInput, Textarea, type ThemeContextValue, ThemeDecorator, ThemeProvider, ThinkingIndicator, type ThumbTooltipFn, TimeInput, TimePicker, Timeline, type ToastOptions, Toaster, Toggle, ToggleGroup, Tooltip, type Props$1I as TooltipProps, TooltipProvider, type Trigger, Truncated, type UseAutosizeInputOptions, type UseAutosizeInputReturn, type ValidityState, type WordInformation, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ declare const Button: ({ ref, children, disabled, className, type, isLoading, as
|
|
|
103
103
|
}) => react_jsx_runtime.JSX.Element;
|
|
104
104
|
|
|
105
105
|
declare const buttonInlineVariants: (props?: ({
|
|
106
|
-
color?: "
|
|
106
|
+
color?: "dark" | "muted" | "link" | "danger" | "custom" | null | undefined;
|
|
107
107
|
variant?: "link" | "custom" | "link-reverse" | null | undefined;
|
|
108
108
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
109
109
|
type Props$1O = ComponentProps<'button'> & VariantProps<typeof buttonInlineVariants> & {
|
|
@@ -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'> & {
|
|
@@ -10338,6 +10338,17 @@ type Props$2 = {
|
|
|
10338
10338
|
};
|
|
10339
10339
|
declare const SqlEditor: ({ value, onChange, onSelectionChange, onCreateEditor, onDestroyEditor, onBlurEditor, onFocusEditor, placeholder, searchQuery, searchMatchIndex, readOnly, extraKeys, queryParser, autoFocus, lineNumbers, className, schema, variables, defaultDatabase, defaultSchema, highlightLines, dialect, }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
10340
10340
|
|
|
10341
|
+
type ColorScheme = 'light' | 'dark' | 'system';
|
|
10342
|
+
type ResolvedMode = 'light' | 'dark';
|
|
10343
|
+
type ThemeContextValue = {
|
|
10344
|
+
brand: Brand;
|
|
10345
|
+
setBrand?: (brand: Brand) => void;
|
|
10346
|
+
/** The configured color scheme (may be `'system'`). */
|
|
10347
|
+
colorScheme: ColorScheme;
|
|
10348
|
+
/** The effective light/dark mode after resolving `'system'`. */
|
|
10349
|
+
resolvedMode: ResolvedMode;
|
|
10350
|
+
};
|
|
10351
|
+
|
|
10341
10352
|
type Props$1 = {
|
|
10342
10353
|
/**
|
|
10343
10354
|
* Brand whose tokens drive the chrome (`@keboola/design`'s semantic CSS
|
|
@@ -10351,29 +10362,36 @@ type Props$1 = {
|
|
|
10351
10362
|
* brands at runtime (Storybook toolbar, a customer-impersonation switch).
|
|
10352
10363
|
*/
|
|
10353
10364
|
setBrand?: (brand: Brand) => void;
|
|
10365
|
+
/**
|
|
10366
|
+
* Light/dark mode. `'system'` follows `prefers-color-scheme` and updates
|
|
10367
|
+
* reactively. Defaults to `'light'` so existing mounts don't drift. Only
|
|
10368
|
+
* the ROOT provider applies this (sets `data-theme`, owns the media
|
|
10369
|
+
* listener); a nested provider inherits the root's resolved mode.
|
|
10370
|
+
*/
|
|
10371
|
+
colorScheme?: ColorScheme;
|
|
10354
10372
|
children: ReactNode;
|
|
10355
10373
|
};
|
|
10356
10374
|
/**
|
|
10357
10375
|
* Responsibilities:
|
|
10358
10376
|
* - Render hidden SVG gradient definitions (`aigradient-600`, `aigradient-700`).
|
|
10359
10377
|
* - Set `data-brand="<brand.id>"` on `<html>` and inject the matching `--color-*` /
|
|
10360
|
-
* `--radius-*` CSS variables
|
|
10361
|
-
*
|
|
10378
|
+
* `--radius-*` CSS variables (for the resolved light/dark mode) so chrome
|
|
10379
|
+
* re-skins for the supplied brand.
|
|
10380
|
+
* - ROOT only: set `data-theme` (`light` | `dark`) on `<html>` and own the
|
|
10381
|
+
* `prefers-color-scheme` media listener when `colorScheme === 'system'`.
|
|
10382
|
+
* A nested provider inherits the resolved mode from the parent context and
|
|
10383
|
+
* touches neither `data-theme` nor a media listener.
|
|
10384
|
+
* - Expose `{ brand, setBrand?, colorScheme, resolvedMode }` via `useTheme()`.
|
|
10362
10385
|
*
|
|
10363
|
-
*
|
|
10364
|
-
*
|
|
10365
|
-
*
|
|
10386
|
+
* Brand × mode: the active mode's palette is injected inline on `<html>`. When
|
|
10387
|
+
* the resolved mode is `dark` and the brand has no `colorsDark`, the colour
|
|
10388
|
+
* vars are NOT emitted — the stylesheet `[data-theme='dark']` block supplies
|
|
10389
|
+
* them, so no `!important` override is ever needed.
|
|
10366
10390
|
*
|
|
10367
|
-
* `data-brand` (brand id)
|
|
10368
|
-
*
|
|
10369
|
-
* `styles.css`) so the two axes compose without clobbering each other.
|
|
10391
|
+
* `data-brand` (brand id) and `data-theme` (light/dark) are separate axes so
|
|
10392
|
+
* they compose without clobbering each other.
|
|
10370
10393
|
*/
|
|
10371
|
-
declare const ThemeProvider: ({ brand, setBrand, children }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
10372
|
-
|
|
10373
|
-
type ThemeContextValue = {
|
|
10374
|
-
brand: Brand;
|
|
10375
|
-
setBrand?: (brand: Brand) => void;
|
|
10376
|
-
};
|
|
10394
|
+
declare const ThemeProvider: ({ brand, setBrand, colorScheme, children, }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
10377
10395
|
|
|
10378
10396
|
/**
|
|
10379
10397
|
* Read the active brand (and optional setter) from the nearest `<ThemeProvider>`.
|
|
@@ -10384,10 +10402,22 @@ type ThemeContextValue = {
|
|
|
10384
10402
|
*/
|
|
10385
10403
|
declare const useTheme: () => ThemeContextValue;
|
|
10386
10404
|
|
|
10405
|
+
/**
|
|
10406
|
+
* Read the configured color scheme and the effective light/dark mode from the
|
|
10407
|
+
* nearest `<ThemeProvider>`. Read-only — there is no setter (yet).
|
|
10408
|
+
*
|
|
10409
|
+
* Throws if no provider is mounted (mirrors `useTheme()`).
|
|
10410
|
+
*/
|
|
10411
|
+
declare const useColorScheme: () => {
|
|
10412
|
+
colorScheme: ColorScheme;
|
|
10413
|
+
resolvedMode: ResolvedMode;
|
|
10414
|
+
};
|
|
10415
|
+
|
|
10387
10416
|
declare const useIsLegacyBrand: () => boolean;
|
|
10388
10417
|
|
|
10389
10418
|
type Props = {
|
|
10390
10419
|
brand: Brand;
|
|
10420
|
+
colorScheme?: ColorScheme;
|
|
10391
10421
|
children: ReactNode;
|
|
10392
10422
|
};
|
|
10393
10423
|
/**
|
|
@@ -10397,8 +10427,14 @@ type Props = {
|
|
|
10397
10427
|
* `resolveStorybookBrand` + `themeToolbarBrands` from `./storybookBrands` to
|
|
10398
10428
|
* build the toolbar. This is the empirical brand-swap harness UT-4047
|
|
10399
10429
|
* promised for the layer-0 contract.
|
|
10430
|
+
*
|
|
10431
|
+
* `colorScheme` (driven by the **Mode** toolbar) is forwarded to the provider
|
|
10432
|
+
* so flipping it sets `data-theme` and emits the active mode's palette — the
|
|
10433
|
+
* empirical light/dark switch. The story is rendered on a `bg-background`
|
|
10434
|
+
* surface so the mode is actually visible (otherwise dark-mode text sits on
|
|
10435
|
+
* the unrelated canvas backdrop).
|
|
10400
10436
|
*/
|
|
10401
|
-
declare const ThemeDecorator: ({ brand, children }: Props) => react_jsx_runtime.JSX.Element;
|
|
10437
|
+
declare const ThemeDecorator: ({ brand, colorScheme, children }: Props) => react_jsx_runtime.JSX.Element;
|
|
10402
10438
|
|
|
10403
10439
|
/**
|
|
10404
10440
|
* Default toolbar items shipped with `ThemeDecorator` — the same brand IDs
|
|
@@ -10419,6 +10455,8 @@ declare const themeToolbarBrands: {
|
|
|
10419
10455
|
primaryForeground: string;
|
|
10420
10456
|
destructive: string;
|
|
10421
10457
|
destructiveForeground: string;
|
|
10458
|
+
accent?: string | undefined;
|
|
10459
|
+
accentForeground?: string | undefined;
|
|
10422
10460
|
};
|
|
10423
10461
|
shell: "sidebar" | "topnav";
|
|
10424
10462
|
colorsDark?: {
|
|
@@ -10431,6 +10469,28 @@ declare const themeToolbarBrands: {
|
|
|
10431
10469
|
primaryForeground: string;
|
|
10432
10470
|
destructive: string;
|
|
10433
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;
|
|
10434
10494
|
} | undefined;
|
|
10435
10495
|
typography?: {
|
|
10436
10496
|
fontFamily: string;
|
|
@@ -10449,4 +10509,4 @@ declare const themeToolbarBrands: {
|
|
|
10449
10509
|
*/
|
|
10450
10510
|
declare const resolveStorybookBrand: (id: unknown) => Brand;
|
|
10451
10511
|
|
|
10452
|
-
export { Alert, AnswerSummary, type AnswerItem as AnswerSummaryItem, type Props$I as AnswerSummaryProps, type Variant$5 as AnswerSummaryVariant, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, type CalendarProps, Card, type ChangeClassification, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, type DateRange, DateRangeInput, DateRangePicker, type DateRangePreset, type DiffChunk, type DiffInformation, type DiffRow, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, type RootProps$3 as EmptyStateProps, type Variant$1 as EmptyStateVariant, ErrorState, type RootProps$2 as ErrorStateProps, type Variant as ErrorStateVariant, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, type Props$G as InlineStepDetailProps, InlineStepLabel, type Props$F as InlineStepLabelProps, type Variant$3 as InlineStepLabelVariant, InputGroup, InputOtp, type RootProps$4 as InputOtpProps, Kbd, Label, type LineInformation, Link, MarkedText, type MergeConflict, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, type PlanApprovalProps, type PlanApprovalStatus, PlanRewritingIndicator, type PlanRewritingIndicatorProps, Popconfirm, Popover, Progress, type PromptCommand, PromptInput, type Props$1k as Props, Question, type QuestionAnswers, QuestionBlock, type Props$z as QuestionBlockProps, type QuestionOption, type Props$A as QuestionProps, type QuestionStep, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, type SelectItem, type SelectItemGroup, Separator, type ServerFieldError, Sheet, type SideInformation, Sidebar, type SidebarMode, SidebarProvider, type SidebarSide, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, type StepStatus, Stepper, type StepperOrientation, SuggestedPrompt, Switch, Table, Tabs, TabsContent, Tagger, TextInput, Textarea, type ThemeContextValue, ThemeDecorator, ThemeProvider, ThinkingIndicator, type ThumbTooltipFn, TimeInput, TimePicker, Timeline, type ToastOptions, Toaster, Toggle, ToggleGroup, Tooltip, type Props$1I as TooltipProps, TooltipProvider, type Trigger, Truncated, type UseAutosizeInputOptions, type UseAutosizeInputReturn, type ValidityState, type WordInformation, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
|
10512
|
+
export { Alert, AnswerSummary, type AnswerItem as AnswerSummaryItem, type Props$I as AnswerSummaryProps, type Variant$5 as AnswerSummaryVariant, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, type CalendarProps, Card, type ChangeClassification, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, type ColorScheme, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, type DateRange, DateRangeInput, DateRangePicker, type DateRangePreset, type DiffChunk, type DiffInformation, type DiffRow, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, type RootProps$3 as EmptyStateProps, type Variant$1 as EmptyStateVariant, ErrorState, type RootProps$2 as ErrorStateProps, type Variant as ErrorStateVariant, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, type Props$G as InlineStepDetailProps, InlineStepLabel, type Props$F as InlineStepLabelProps, type Variant$3 as InlineStepLabelVariant, InputGroup, InputOtp, type RootProps$4 as InputOtpProps, Kbd, Label, type LineInformation, Link, MarkedText, type MergeConflict, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, type PlanApprovalProps, type PlanApprovalStatus, PlanRewritingIndicator, type PlanRewritingIndicatorProps, Popconfirm, Popover, Progress, type PromptCommand, PromptInput, type Props$1k as Props, Question, type QuestionAnswers, QuestionBlock, type Props$z as QuestionBlockProps, type QuestionOption, type Props$A as QuestionProps, type QuestionStep, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedMode, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, type SelectItem, type SelectItemGroup, Separator, type ServerFieldError, Sheet, type SideInformation, Sidebar, type SidebarMode, SidebarProvider, type SidebarSide, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, type StepStatus, Stepper, type StepperOrientation, SuggestedPrompt, Switch, Table, Tabs, TabsContent, Tagger, TextInput, Textarea, type ThemeContextValue, ThemeDecorator, ThemeProvider, ThinkingIndicator, type ThumbTooltipFn, TimeInput, TimePicker, Timeline, type ToastOptions, Toaster, Toggle, ToggleGroup, Tooltip, type Props$1I as TooltipProps, TooltipProvider, type Trigger, Truncated, type UseAutosizeInputOptions, type UseAutosizeInputReturn, type ValidityState, type WordInformation, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
package/dist/index.js
CHANGED
|
@@ -5941,7 +5941,16 @@ var BadgeRoot = ({
|
|
|
5941
5941
|
className,
|
|
5942
5942
|
children,
|
|
5943
5943
|
...rest
|
|
5944
|
-
}) => /* @__PURE__ */ jsx(
|
|
5944
|
+
}) => /* @__PURE__ */ jsx(
|
|
5945
|
+
"div",
|
|
5946
|
+
{
|
|
5947
|
+
...rest,
|
|
5948
|
+
ref,
|
|
5949
|
+
"data-slot": "badge",
|
|
5950
|
+
className: cn(badgeRootVariants({ variant, color, className })),
|
|
5951
|
+
children
|
|
5952
|
+
}
|
|
5953
|
+
);
|
|
5945
5954
|
var BadgeInner = ({
|
|
5946
5955
|
ref,
|
|
5947
5956
|
// root props
|
|
@@ -10277,18 +10286,43 @@ var AIGradientsSvg = () => /* @__PURE__ */ jsx("svg", { width: "0", height: "0",
|
|
|
10277
10286
|
] }) });
|
|
10278
10287
|
|
|
10279
10288
|
// src/components/ThemeProvider/brandToCssVars.ts
|
|
10280
|
-
var brandToCssVars = (brand) => {
|
|
10281
|
-
const vars = {
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
"--color-
|
|
10285
|
-
"--color-
|
|
10286
|
-
"--color-
|
|
10287
|
-
"--color-
|
|
10288
|
-
"--color-
|
|
10289
|
-
"--color-
|
|
10290
|
-
"--color-
|
|
10291
|
-
|
|
10289
|
+
var brandToCssVars = (brand, resolvedMode) => {
|
|
10290
|
+
const vars = {};
|
|
10291
|
+
const colors8 = resolvedMode === "dark" ? brand.colorsDark : brand.colors;
|
|
10292
|
+
if (colors8) {
|
|
10293
|
+
vars["--color-background"] = colors8.background;
|
|
10294
|
+
vars["--color-foreground"] = colors8.foreground;
|
|
10295
|
+
vars["--color-muted"] = colors8.muted;
|
|
10296
|
+
vars["--color-muted-foreground"] = colors8.mutedForeground;
|
|
10297
|
+
vars["--color-border"] = colors8.border;
|
|
10298
|
+
vars["--color-primary"] = colors8.primary;
|
|
10299
|
+
vars["--color-primary-foreground"] = colors8.primaryForeground;
|
|
10300
|
+
vars["--color-destructive"] = colors8.destructive;
|
|
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;
|
|
10325
|
+
}
|
|
10292
10326
|
if (brand.radii) {
|
|
10293
10327
|
vars["--radius-sm"] = brand.radii.sm;
|
|
10294
10328
|
vars["--radius-md"] = brand.radii.md;
|
|
@@ -10296,12 +10330,50 @@ var brandToCssVars = (brand) => {
|
|
|
10296
10330
|
}
|
|
10297
10331
|
return vars;
|
|
10298
10332
|
};
|
|
10299
|
-
var
|
|
10333
|
+
var DARK_QUERY = "(prefers-color-scheme: dark)";
|
|
10334
|
+
var systemMode = () => {
|
|
10335
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return "light";
|
|
10336
|
+
return window.matchMedia(DARK_QUERY).matches ? "dark" : "light";
|
|
10337
|
+
};
|
|
10338
|
+
var ThemeProvider = ({
|
|
10339
|
+
brand = keboola,
|
|
10340
|
+
setBrand,
|
|
10341
|
+
colorScheme = "light",
|
|
10342
|
+
children
|
|
10343
|
+
}) => {
|
|
10344
|
+
const parent = use(ThemeContext);
|
|
10345
|
+
const isRoot = parent === null;
|
|
10346
|
+
const [systemResolved, setSystemResolved] = useState(systemMode);
|
|
10347
|
+
useEffect(() => {
|
|
10348
|
+
if (!isRoot || colorScheme !== "system") return;
|
|
10349
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
10350
|
+
const mql = window.matchMedia(DARK_QUERY);
|
|
10351
|
+
const onChange = (event) => setSystemResolved(event.matches ? "dark" : "light");
|
|
10352
|
+
setSystemResolved(mql.matches ? "dark" : "light");
|
|
10353
|
+
mql.addEventListener("change", onChange);
|
|
10354
|
+
return () => mql.removeEventListener("change", onChange);
|
|
10355
|
+
}, [isRoot, colorScheme]);
|
|
10356
|
+
const ownMode = colorScheme === "system" ? systemResolved : colorScheme;
|
|
10357
|
+
const resolvedMode = isRoot ? ownMode : parent.resolvedMode;
|
|
10358
|
+
useEffect(() => {
|
|
10359
|
+
if (!isRoot || typeof document === "undefined") return;
|
|
10360
|
+
const root = document.documentElement;
|
|
10361
|
+
const previous = root.getAttribute("data-theme");
|
|
10362
|
+
root.setAttribute("data-theme", resolvedMode);
|
|
10363
|
+
return () => {
|
|
10364
|
+
if (root.getAttribute("data-theme") !== resolvedMode) return;
|
|
10365
|
+
if (previous === null) {
|
|
10366
|
+
root.removeAttribute("data-theme");
|
|
10367
|
+
} else {
|
|
10368
|
+
root.setAttribute("data-theme", previous);
|
|
10369
|
+
}
|
|
10370
|
+
};
|
|
10371
|
+
}, [isRoot, resolvedMode]);
|
|
10300
10372
|
useEffect(() => {
|
|
10301
10373
|
if (typeof document === "undefined") return;
|
|
10302
10374
|
const root = document.documentElement;
|
|
10303
10375
|
const previousBrand = root.getAttribute("data-brand");
|
|
10304
|
-
const vars = brandToCssVars(brand);
|
|
10376
|
+
const vars = brandToCssVars(brand, resolvedMode);
|
|
10305
10377
|
const previousValues = {};
|
|
10306
10378
|
for (const name of Object.keys(vars)) {
|
|
10307
10379
|
previousValues[name] = root.style.getPropertyValue(name);
|
|
@@ -10327,8 +10399,8 @@ var ThemeProvider = ({ brand = keboola, setBrand, children }) => {
|
|
|
10327
10399
|
}
|
|
10328
10400
|
}
|
|
10329
10401
|
};
|
|
10330
|
-
}, [brand]);
|
|
10331
|
-
return /* @__PURE__ */ jsxs(ThemeContext, { value: { brand, setBrand }, children: [
|
|
10402
|
+
}, [brand, resolvedMode]);
|
|
10403
|
+
return /* @__PURE__ */ jsxs(ThemeContext, { value: { brand, setBrand, colorScheme, resolvedMode }, children: [
|
|
10332
10404
|
/* @__PURE__ */ jsx(AIGradientsSvg, {}),
|
|
10333
10405
|
children
|
|
10334
10406
|
] });
|
|
@@ -10337,12 +10409,21 @@ var useTheme = () => {
|
|
|
10337
10409
|
const context = use(ThemeContext);
|
|
10338
10410
|
if (context === null) {
|
|
10339
10411
|
throw new Error(
|
|
10340
|
-
"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."
|
|
10341
10413
|
);
|
|
10342
10414
|
}
|
|
10343
10415
|
return context;
|
|
10344
10416
|
};
|
|
10345
|
-
var
|
|
10417
|
+
var useColorScheme = () => {
|
|
10418
|
+
const context = use(ThemeContext);
|
|
10419
|
+
if (context === null) {
|
|
10420
|
+
throw new Error(
|
|
10421
|
+
"useColorScheme must be used within a <ThemeProvider>. Wrap your app root with <ThemeProvider> from @keboola/design."
|
|
10422
|
+
);
|
|
10423
|
+
}
|
|
10424
|
+
return { colorScheme: context.colorScheme, resolvedMode: context.resolvedMode };
|
|
10425
|
+
};
|
|
10426
|
+
var ThemeDecorator = ({ brand, colorScheme = "light", children }) => /* @__PURE__ */ jsx(ThemeProvider, { brand, colorScheme, children: /* @__PURE__ */ jsx("div", { className: "tw-bg-background tw-text-foreground", children }) });
|
|
10346
10427
|
var themeToolbarBrands = [keboola, keboolaLegacy, exampleCustomer];
|
|
10347
10428
|
var resolveStorybookBrand = (id) => {
|
|
10348
10429
|
if (typeof id !== "string") return keboola;
|
|
@@ -10598,7 +10679,7 @@ var PageLayout = Object.assign(Root25, {
|
|
|
10598
10679
|
// src/blocks/PageHeader/styles.ts
|
|
10599
10680
|
var titleRowClass = "tw-flex tw-flex-wrap tw-items-center tw-gap-x-3 tw-gap-y-2";
|
|
10600
10681
|
var titleClass = "tw-m-0 tw-text-3xl tw-font-semibold tw-leading-9 tw-text-foreground tw-break-words";
|
|
10601
|
-
var badgesClass = "tw-flex tw-flex-wrap tw-items-center tw-gap-2";
|
|
10682
|
+
var badgesClass = "tw-flex tw-flex-wrap tw-items-center tw-gap-2 [&_[data-slot=badge]]:tw-rounded-full [&_[data-slot=badge]]:tw-normal-case [&_[data-slot=badge]]:tw-tracking-normal [&_[data-slot=badge]]:tw-py-0";
|
|
10602
10683
|
var descriptionClass = "tw-m-0 tw-max-w-[800px] tw-break-words tw-text-sm tw-leading-5 tw-text-muted-foreground";
|
|
10603
10684
|
var PageHeaderDetail = ({
|
|
10604
10685
|
ref,
|
|
@@ -16069,6 +16150,6 @@ var SqlEditor = ({
|
|
|
16069
16150
|
);
|
|
16070
16151
|
};
|
|
16071
16152
|
|
|
16072
|
-
export { Alert, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
|
16153
|
+
export { Alert, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
|
16073
16154
|
//# sourceMappingURL=index.js.map
|
|
16074
16155
|
//# sourceMappingURL=index.js.map
|