@traefik-labs/faency 13.6.0 → 13.7.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.
- package/dist/components/AriaTable/AriaTable.js +4 -4
- package/dist/components/AriaTable/AriaTable.js.map +1 -1
- package/dist/components/AriaTable/AriaTable.vanilla.js +3 -3
- package/dist/components/AriaTable/AriaTable.vanilla.js.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.css.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.css.js.map +1 -1
- package/dist/components/Field/Field.js +5 -5
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/Field/Field.vanilla.js +5 -5
- package/dist/components/Field/Field.vanilla.js.map +1 -1
- package/dist/components/List/List.vanilla.cjs +128 -0
- package/dist/components/List/List.vanilla.cjs.map +1 -0
- package/dist/components/List/List.vanilla.css.cjs +30 -0
- package/dist/components/List/List.vanilla.css.cjs.map +1 -0
- package/dist/components/List/List.vanilla.css.js +25 -0
- package/dist/components/List/List.vanilla.css.js.map +1 -0
- package/dist/components/List/List.vanilla.js +124 -0
- package/dist/components/List/List.vanilla.js.map +1 -0
- package/dist/components/SplitLayout/SplitLayout.vanilla.js +2 -2
- package/dist/components/SplitLayout/SplitLayout.vanilla.js.map +1 -1
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.vanilla.js +2 -2
- package/dist/components/Table/Table.vanilla.js.map +1 -1
- package/dist/components/TextField/TextField.vanilla.js +2 -2
- package/dist/components/TextField/TextField.vanilla.js.map +1 -1
- package/dist/faency.css +2051 -1877
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +112 -34
- package/dist/index.js +2 -1
- package/dist/styles/themes.css.cjs.map +1 -1
- package/dist/styles/themes.css.js.map +1 -1
- package/dist/styles/tokens.css.cjs +93 -90
- package/dist/styles/tokens.css.cjs.map +1 -1
- package/dist/styles/tokens.css.js +93 -90
- package/dist/styles/tokens.css.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -53,6 +53,7 @@ const require_Label = require("./components/Label/Label.cjs");
|
|
|
53
53
|
const require_Label_vanilla = require("./components/Label/Label.vanilla.cjs");
|
|
54
54
|
const require_Link = require("./components/Link/Link.cjs");
|
|
55
55
|
const require_List = require("./components/List/List.cjs");
|
|
56
|
+
const require_List_vanilla = require("./components/List/List.vanilla.cjs");
|
|
56
57
|
const require_Meter_vanilla = require("./components/Meter/Meter.vanilla.cjs");
|
|
57
58
|
const require_Navigation = require("./components/Navigation/Navigation.cjs");
|
|
58
59
|
const require_NavigationMenu = require("./components/NavigationMenu/NavigationMenu.cjs");
|
|
@@ -197,6 +198,7 @@ exports.InputVanilla = require_Input_vanilla.InputVanilla;
|
|
|
197
198
|
exports.Label = require_Label.Label;
|
|
198
199
|
exports.LabelVanilla = require_Label_vanilla.LabelVanilla;
|
|
199
200
|
exports.Li = require_List.Li;
|
|
201
|
+
exports.LiVanilla = require_List_vanilla.LiVanilla;
|
|
200
202
|
exports.Link = require_Link.Link;
|
|
201
203
|
exports.MeterVanilla = require_Meter_vanilla.MeterVanilla;
|
|
202
204
|
exports.NavigationContainer = require_Navigation.NavigationContainer;
|
|
@@ -215,6 +217,7 @@ exports.NavigationTreeContainer = require_NavigationTreeContainer.NavigationTree
|
|
|
215
217
|
exports.NavigationTreeDrawer = require_NavigationTreeDrawer.NavigationTreeDrawer;
|
|
216
218
|
exports.NavigationTreeItem = require_NavigationTreeItem.NavigationTreeItem;
|
|
217
219
|
exports.Ol = require_List.Ol;
|
|
220
|
+
exports.OlVanilla = require_List_vanilla.OlVanilla;
|
|
218
221
|
exports.Overlay = require_Overlay.Overlay;
|
|
219
222
|
exports.Panel = require_Panel.Panel;
|
|
220
223
|
exports.PanelVanilla = require_Panel_vanilla.PanelVanilla;
|
|
@@ -284,6 +287,7 @@ exports.TooltipTrigger = require_Tooltip.TooltipTrigger;
|
|
|
284
287
|
exports.Tr = require_Table.Tr;
|
|
285
288
|
exports.TrVanilla = require_Table_vanilla.TrVanilla;
|
|
286
289
|
exports.Ul = require_List.Ul;
|
|
290
|
+
exports.UlVanilla = require_List_vanilla.UlVanilla;
|
|
287
291
|
exports.VanillaExtractThemeProvider = require_themeContext.VanillaExtractThemeProvider;
|
|
288
292
|
exports.VisuallyHidden = require_VisuallyHidden.VisuallyHidden;
|
|
289
293
|
exports.config = require_stitches_config.config;
|
package/dist/index.d.ts
CHANGED
|
@@ -11414,28 +11414,28 @@ declare interface ElevationOwnProps extends CSSProps {
|
|
|
11414
11414
|
|
|
11415
11415
|
declare const elevationRecipe: RuntimeFn< {
|
|
11416
11416
|
variant: {
|
|
11417
|
-
|
|
11418
|
-
|
|
11417
|
+
0: {
|
|
11418
|
+
boxShadow: string;
|
|
11419
11419
|
};
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11420
|
+
1: {
|
|
11421
|
+
backgroundColor: `var(--${string})`;
|
|
11422
|
+
boxShadow: string;
|
|
11423
11423
|
};
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11424
|
+
2: {
|
|
11425
|
+
backgroundColor: `var(--${string})`;
|
|
11426
|
+
boxShadow: string;
|
|
11427
11427
|
};
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11428
|
+
3: {
|
|
11429
|
+
backgroundColor: `var(--${string})`;
|
|
11430
|
+
boxShadow: string;
|
|
11431
11431
|
};
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11432
|
+
4: {
|
|
11433
|
+
backgroundColor: `var(--${string})`;
|
|
11434
|
+
boxShadow: string;
|
|
11435
11435
|
};
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11436
|
+
5: {
|
|
11437
|
+
backgroundColor: `var(--${string})`;
|
|
11438
|
+
boxShadow: string;
|
|
11439
11439
|
};
|
|
11440
11440
|
};
|
|
11441
11441
|
}>;
|
|
@@ -17256,14 +17256,75 @@ backgroundClip: WithPropertyValue<"backgroundClip">;
|
|
|
17256
17256
|
};
|
|
17257
17257
|
}>>;
|
|
17258
17258
|
|
|
17259
|
+
declare const liRecipe: RuntimeFn< {
|
|
17260
|
+
elevation: {
|
|
17261
|
+
0: {
|
|
17262
|
+
boxShadow: string;
|
|
17263
|
+
};
|
|
17264
|
+
1: {
|
|
17265
|
+
backgroundColor: `var(--${string})`;
|
|
17266
|
+
boxShadow: string;
|
|
17267
|
+
};
|
|
17268
|
+
2: {
|
|
17269
|
+
backgroundColor: `var(--${string})`;
|
|
17270
|
+
boxShadow: string;
|
|
17271
|
+
};
|
|
17272
|
+
3: {
|
|
17273
|
+
backgroundColor: `var(--${string})`;
|
|
17274
|
+
boxShadow: string;
|
|
17275
|
+
};
|
|
17276
|
+
4: {
|
|
17277
|
+
backgroundColor: `var(--${string})`;
|
|
17278
|
+
boxShadow: string;
|
|
17279
|
+
};
|
|
17280
|
+
5: {
|
|
17281
|
+
backgroundColor: `var(--${string})`;
|
|
17282
|
+
boxShadow: string;
|
|
17283
|
+
};
|
|
17284
|
+
};
|
|
17285
|
+
}>;
|
|
17286
|
+
|
|
17287
|
+
declare type LiRecipeVariants = NonNullable<RecipeVariants<typeof liRecipe>>;
|
|
17288
|
+
|
|
17259
17289
|
declare interface ListItemProps extends ComponentProps<typeof StyledLi>, VariantProps<typeof StyledLi>, VariantProps<typeof Flex> {
|
|
17260
17290
|
controls?: ReactNode;
|
|
17261
17291
|
}
|
|
17262
17292
|
|
|
17293
|
+
declare type ListOwnProps = CSSProps & {
|
|
17294
|
+
/** Renders the items as buttons. Nested lists inherit it. */
|
|
17295
|
+
interactive?: boolean;
|
|
17296
|
+
};
|
|
17297
|
+
|
|
17263
17298
|
declare interface ListProps extends ComponentProps<typeof StyledUl>, VariantProps<typeof StyledUl> {
|
|
17264
17299
|
interactive?: boolean;
|
|
17265
17300
|
}
|
|
17266
17301
|
|
|
17302
|
+
export declare const LiVanilla: default_2.ForwardRefExoticComponent<default_2.LiHTMLAttributes<HTMLLIElement> & CSSProps & {
|
|
17303
|
+
elevation?: 0 | 2 | 1 | 3 | 4 | 5 | undefined;
|
|
17304
|
+
} & {
|
|
17305
|
+
/** Shown on the right of the item, outside its button. */
|
|
17306
|
+
controls?: ReactNode;
|
|
17307
|
+
/** Disables the item's button. Only applies in an interactive list. */
|
|
17308
|
+
disabled?: boolean;
|
|
17309
|
+
align?: FlexAlignSimplified;
|
|
17310
|
+
justify?: FlexJustifySimplified;
|
|
17311
|
+
direction?: FlexDirection;
|
|
17312
|
+
gap?: Gap;
|
|
17313
|
+
wrap?: "wrap" | "noWrap" | "wrapReverse";
|
|
17314
|
+
} & default_2.RefAttributes<HTMLLIElement>>;
|
|
17315
|
+
|
|
17316
|
+
export declare type LiVanillaProps = default_2.LiHTMLAttributes<HTMLLIElement> & CSSProps & LiRecipeVariants & {
|
|
17317
|
+
/** Shown on the right of the item, outside its button. */
|
|
17318
|
+
controls?: ReactNode;
|
|
17319
|
+
/** Disables the item's button. Only applies in an interactive list. */
|
|
17320
|
+
disabled?: boolean;
|
|
17321
|
+
align?: FlexAlignSimplified;
|
|
17322
|
+
justify?: FlexJustifySimplified;
|
|
17323
|
+
direction?: FlexDirection;
|
|
17324
|
+
gap?: Gap;
|
|
17325
|
+
wrap?: 'wrap' | 'noWrap' | 'wrapReverse';
|
|
17326
|
+
};
|
|
17327
|
+
|
|
17267
17328
|
declare type MessageSize = '0' | '1' | '2' | '3';
|
|
17268
17329
|
|
|
17269
17330
|
declare type MeterSegmentsProps = {
|
|
@@ -18100,6 +18161,13 @@ declare interface NavigationTreeProps {
|
|
|
18100
18161
|
|
|
18101
18162
|
export declare const Ol: default_2.ForwardRefExoticComponent<Omit<OrderedListProps, "ref"> & default_2.RefAttributes<HTMLOListElement>>;
|
|
18102
18163
|
|
|
18164
|
+
export declare const OlVanilla: default_2.ForwardRefExoticComponent<default_2.OlHTMLAttributes<HTMLOListElement> & CSSProps & {
|
|
18165
|
+
/** Renders the items as buttons. Nested lists inherit it. */
|
|
18166
|
+
interactive?: boolean;
|
|
18167
|
+
} & default_2.RefAttributes<HTMLOListElement>>;
|
|
18168
|
+
|
|
18169
|
+
export declare type OlVanillaProps = default_2.OlHTMLAttributes<HTMLOListElement> & ListOwnProps;
|
|
18170
|
+
|
|
18103
18171
|
declare interface OrderedListProps extends ComponentProps<typeof StyledOl>, VariantProps<typeof StyledOl> {
|
|
18104
18172
|
interactive?: boolean;
|
|
18105
18173
|
}
|
|
@@ -31561,28 +31629,28 @@ backgroundClip: WithPropertyValue<"backgroundClip">;
|
|
|
31561
31629
|
|
|
31562
31630
|
declare const tableRecipe: RuntimeFn< {
|
|
31563
31631
|
elevation: {
|
|
31564
|
-
|
|
31565
|
-
|
|
31632
|
+
0: {
|
|
31633
|
+
boxShadow: string;
|
|
31566
31634
|
};
|
|
31567
|
-
|
|
31568
|
-
|
|
31569
|
-
|
|
31635
|
+
1: {
|
|
31636
|
+
backgroundColor: `var(--${string})`;
|
|
31637
|
+
boxShadow: string;
|
|
31570
31638
|
};
|
|
31571
|
-
|
|
31572
|
-
|
|
31573
|
-
|
|
31639
|
+
2: {
|
|
31640
|
+
backgroundColor: `var(--${string})`;
|
|
31641
|
+
boxShadow: string;
|
|
31574
31642
|
};
|
|
31575
|
-
|
|
31576
|
-
|
|
31577
|
-
|
|
31643
|
+
3: {
|
|
31644
|
+
backgroundColor: `var(--${string})`;
|
|
31645
|
+
boxShadow: string;
|
|
31578
31646
|
};
|
|
31579
|
-
|
|
31580
|
-
|
|
31581
|
-
|
|
31647
|
+
4: {
|
|
31648
|
+
backgroundColor: `var(--${string})`;
|
|
31649
|
+
boxShadow: string;
|
|
31582
31650
|
};
|
|
31583
|
-
|
|
31584
|
-
|
|
31585
|
-
|
|
31651
|
+
5: {
|
|
31652
|
+
backgroundColor: `var(--${string})`;
|
|
31653
|
+
boxShadow: string;
|
|
31586
31654
|
};
|
|
31587
31655
|
};
|
|
31588
31656
|
}>;
|
|
@@ -35994,6 +36062,13 @@ export declare type TrVanillaProps = default_2.HTMLAttributes<HTMLTableRowElemen
|
|
|
35994
36062
|
|
|
35995
36063
|
export declare const Ul: default_2.ForwardRefExoticComponent<Omit<ListProps, "ref"> & default_2.RefAttributes<HTMLUListElement>>;
|
|
35996
36064
|
|
|
36065
|
+
export declare const UlVanilla: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLUListElement> & CSSProps & {
|
|
36066
|
+
/** Renders the items as buttons. Nested lists inherit it. */
|
|
36067
|
+
interactive?: boolean;
|
|
36068
|
+
} & default_2.RefAttributes<HTMLUListElement>>;
|
|
36069
|
+
|
|
36070
|
+
export declare type UlVanillaProps = default_2.HTMLAttributes<HTMLUListElement> & ListOwnProps;
|
|
36071
|
+
|
|
35997
36072
|
export declare function useColorScheme(): ColorScheme;
|
|
35998
36073
|
|
|
35999
36074
|
/**
|
|
@@ -36454,6 +36529,9 @@ export declare const vanillaTokens: {
|
|
|
36454
36529
|
comboboxOptionHighlightBg: `var(--${string})`;
|
|
36455
36530
|
toastBorder: `var(--${string})`;
|
|
36456
36531
|
meterTrackBg: `var(--${string})`;
|
|
36532
|
+
listItemHoverBg: `var(--${string})`;
|
|
36533
|
+
listItemActiveBg: `var(--${string})`;
|
|
36534
|
+
listItemFocusBorder: `var(--${string})`;
|
|
36457
36535
|
toneSuccessSolid: `var(--${string})`;
|
|
36458
36536
|
toneSuccessText: `var(--${string})`;
|
|
36459
36537
|
toneSuccessSurface: `var(--${string})`;
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ import { Label } from "./components/Label/Label.js";
|
|
|
52
52
|
import { LabelVanilla } from "./components/Label/Label.vanilla.js";
|
|
53
53
|
import { Link } from "./components/Link/Link.js";
|
|
54
54
|
import { Li, Ol, Ul } from "./components/List/List.js";
|
|
55
|
+
import { LiVanilla, OlVanilla, UlVanilla } from "./components/List/List.vanilla.js";
|
|
55
56
|
import { MeterVanilla } from "./components/Meter/Meter.vanilla.js";
|
|
56
57
|
import { NavigationContainer, NavigationDrawer, NavigationItem, NavigationLink } from "./components/Navigation/Navigation.js";
|
|
57
58
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport } from "./components/NavigationMenu/NavigationMenu.js";
|
|
@@ -94,4 +95,4 @@ import { darkTheme as darkTheme$1, lightTheme as lightTheme$1, themes } from "./
|
|
|
94
95
|
import { tokens } from "./styles/tokens.css.js";
|
|
95
96
|
import { AspectRatio } from "@radix-ui/react-aspect-ratio";
|
|
96
97
|
import { Portal } from "@radix-ui/react-portal";
|
|
97
|
-
export { AccessibleIcon, AccessibleIconVanilla, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, Alert, Caption as AriaCaption, AriaCaptionVanilla, Table as AriaTable, AriaTableVanilla, Tbody as AriaTbody, AriaTbodyVanilla, Td as AriaTd, AriaTdVanilla, Tfoot as AriaTfoot, AriaTfootVanilla, Th as AriaTh, AriaThVanilla, Thead as AriaThead, AriaTheadVanilla, Tr as AriaTr, AriaTrVanilla, AspectRatio, Avatar, AvatarVanilla, COLORS as BADGE_COLORS_VANILLA, Badge, BadgeVanilla, Blockquote, BlockquoteVanilla, Box, BoxVanilla, Bubble, BubbleVanilla, Button, ButtonSwitchContainer, ButtonSwitchContainerVanilla, ButtonSwitchItem, ButtonSwitchItemVanilla, ButtonVanilla, Caption$1 as Caption, CaptionVanilla, Card, CardVanilla, Checkbox, CodeBlock, CodeBlockVanilla, ComboboxVanilla, Container, ContainerVanilla, DateTimePicker, DateTimePickerInput, Dialog, DialogCloseIconButton, DialogClosePrimitive, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, Elevation, ElevationVanilla, FaencyProvider, Field, FieldVanilla, Flex, FlexVanilla, Grid, GridVanilla, H1, H2, H3, H4, H5, H6, IconButton, IconButtonVanilla, Image, ImageVanilla, Input, InputVanilla, Label, LabelVanilla, Li, Link, MeterVanilla, NavigationContainer, NavigationDrawer, NavigationItem, NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NavigationTreeContainer, NavigationTreeDrawer, NavigationTreeItem, Ol, Overlay, Panel, PanelVanilla, Paragraph, ParagraphVanilla, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Portal, Radio, RadioAccordionContent, RadioAccordionItem, RadioAccordionRoot, RadioAccordionTrigger, RadioGroup, RowLink, SegmentedControlItemVanilla, SegmentedControlVanilla, Select, SidePanel, Skeleton, SkeletonVanilla, SpinnerVanilla, SplitLayoutAsideVanilla, SplitLayoutMainVanilla, SplitLayoutVanilla, StyledContent, Switch, Table$1 as Table, TableVanilla, TabsContainer, TabsContent, TabsList, TabsTrigger, Tbody$1 as Tbody, TbodyVanilla, Td$1 as Td, TdVanilla, Text, TextField, TextFieldVanilla, Textarea, TextareaVanilla, Tfoot$1 as Tfoot, TfootVanilla, Th$1 as Th, ThVanilla, Thead$1 as Thead, TheadVanilla, ToastActionVanilla, ToastDescriptionVanilla, ToastProviderVanilla, ToastTitleVanilla, ToastVanilla, Tooltip, TooltipContent, TooltipRoot, TooltipTrigger, Tr$1 as Tr, TrVanilla, Ul, VanillaExtractThemeProvider, VisuallyHidden, config, createTheme, css, darkTheme, elevationVariants, getCssText, globalCss, keyframes, lightTheme, panelStyles, rowLinkRowStyles, rowLinkTableStyles, sortRows, styled, useColorScheme, useFieldControl, useTableSort, useToast, useVanillaExtractTheme, darkTheme$1 as vanillaDarkTheme, lightTheme$1 as vanillaLightTheme, themes as vanillaThemes, tokens as vanillaTokens };
|
|
98
|
+
export { AccessibleIcon, AccessibleIconVanilla, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, Alert, Caption as AriaCaption, AriaCaptionVanilla, Table as AriaTable, AriaTableVanilla, Tbody as AriaTbody, AriaTbodyVanilla, Td as AriaTd, AriaTdVanilla, Tfoot as AriaTfoot, AriaTfootVanilla, Th as AriaTh, AriaThVanilla, Thead as AriaThead, AriaTheadVanilla, Tr as AriaTr, AriaTrVanilla, AspectRatio, Avatar, AvatarVanilla, COLORS as BADGE_COLORS_VANILLA, Badge, BadgeVanilla, Blockquote, BlockquoteVanilla, Box, BoxVanilla, Bubble, BubbleVanilla, Button, ButtonSwitchContainer, ButtonSwitchContainerVanilla, ButtonSwitchItem, ButtonSwitchItemVanilla, ButtonVanilla, Caption$1 as Caption, CaptionVanilla, Card, CardVanilla, Checkbox, CodeBlock, CodeBlockVanilla, ComboboxVanilla, Container, ContainerVanilla, DateTimePicker, DateTimePickerInput, Dialog, DialogCloseIconButton, DialogClosePrimitive, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, Elevation, ElevationVanilla, FaencyProvider, Field, FieldVanilla, Flex, FlexVanilla, Grid, GridVanilla, H1, H2, H3, H4, H5, H6, IconButton, IconButtonVanilla, Image, ImageVanilla, Input, InputVanilla, Label, LabelVanilla, Li, LiVanilla, Link, MeterVanilla, NavigationContainer, NavigationDrawer, NavigationItem, NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NavigationTreeContainer, NavigationTreeDrawer, NavigationTreeItem, Ol, OlVanilla, Overlay, Panel, PanelVanilla, Paragraph, ParagraphVanilla, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Portal, Radio, RadioAccordionContent, RadioAccordionItem, RadioAccordionRoot, RadioAccordionTrigger, RadioGroup, RowLink, SegmentedControlItemVanilla, SegmentedControlVanilla, Select, SidePanel, Skeleton, SkeletonVanilla, SpinnerVanilla, SplitLayoutAsideVanilla, SplitLayoutMainVanilla, SplitLayoutVanilla, StyledContent, Switch, Table$1 as Table, TableVanilla, TabsContainer, TabsContent, TabsList, TabsTrigger, Tbody$1 as Tbody, TbodyVanilla, Td$1 as Td, TdVanilla, Text, TextField, TextFieldVanilla, Textarea, TextareaVanilla, Tfoot$1 as Tfoot, TfootVanilla, Th$1 as Th, ThVanilla, Thead$1 as Thead, TheadVanilla, ToastActionVanilla, ToastDescriptionVanilla, ToastProviderVanilla, ToastTitleVanilla, ToastVanilla, Tooltip, TooltipContent, TooltipRoot, TooltipTrigger, Tr$1 as Tr, TrVanilla, Ul, UlVanilla, VanillaExtractThemeProvider, VisuallyHidden, config, createTheme, css, darkTheme, elevationVariants, getCssText, globalCss, keyframes, lightTheme, panelStyles, rowLinkRowStyles, rowLinkTableStyles, sortRows, styled, useColorScheme, useFieldControl, useTableSort, useToast, useVanillaExtractTheme, darkTheme$1 as vanillaDarkTheme, lightTheme$1 as vanillaLightTheme, themes as vanillaThemes, tokens as vanillaTokens };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.css.cjs","names":[],"sources":["../../styles/themes.css.ts"],"sourcesContent":["import { createTheme } from '@vanilla-extract/css';\nimport tinycolor from 'tinycolor2';\n\nimport { darkColors, lightColors } from '../colors';\nimport { badgeDarkTheme, badgeLightTheme } from '../components/Badge/Badge.theme.css';\nimport { buttonDarkTheme, buttonLightTheme } from '../components/Button/Button.theme.css';\nimport {\n buttonSwitchDarkTheme,\n buttonSwitchLightTheme,\n} from '../components/ButtonSwitch/ButtonSwitch.theme.css';\nimport { cardDarkTheme, cardLightTheme } from '../components/Card/Card.theme.css';\nimport {\n codeBlockDarkTheme,\n codeBlockLightTheme,\n} from '../components/CodeBlock/CodeBlock.theme.css';\nimport { comboboxDarkTheme, comboboxLightTheme } from '../components/Combobox/Combobox.theme.css';\nimport { headingDarkTheme, headingLightTheme } from '../components/Heading/Heading.theme.css';\nimport {\n iconButtonDarkTheme,\n iconButtonLightTheme,\n} from '../components/IconButton/IconButton.theme.css';\nimport { inputDarkTheme, inputLightTheme } from '../components/Input/Input.theme.css';\nimport { panelDarkTheme, panelLightTheme } from '../components/Panel/Panel.theme.css';\nimport {\n segmentedControlDarkTheme,\n segmentedControlLightTheme,\n} from '../components/SegmentedControl/SegmentedControl.theme.css';\nimport { skeletonDarkTheme, skeletonLightTheme } from '../components/Skeleton/Skeleton.theme.css';\nimport {\n getTableDarkColors,\n getTableLightColors,\n tableDarkTheme,\n tableLightTheme,\n} from '../components/Table/Table.theme.css';\nimport { textDarkTheme, textLightTheme } from '../components/Text/Text.theme.css';\nimport { textareaDarkTheme, textareaLightTheme } from '../components/Textarea/Textarea.theme.css';\nimport { toastDarkTheme, toastLightTheme } from '../components/Toast/Toast.theme.css';\nimport { tokens } from './tokens.css';\n\n// Type for primary colors\nexport type PrimaryColor = 'neon' | 'blue' | 'orange' | 'red' | 'green' | 'deepBlue' | 'grayBlue';\n\n// Base theme values shared across all variants\nconst baseThemeValues = {\n fonts: {\n rubik:\n 'Rubik, -apple-system, system-ui, \"Segoe UI\", \"Helvetica Neue\", helvetica, arial, sans-serif',\n },\n space: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n },\n sizes: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n },\n fontSizes: {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n },\n fontWeights: {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n },\n radii: {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n },\n zIndices: {\n '1': '100',\n '2': '200',\n '3': '300',\n '4': '400',\n max: '999',\n },\n};\n\n// Helper to extract color scale from color map\nfunction extractColorScale(colorName: string, colors: typeof lightColors | typeof darkColors) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n A1: colors[`${colorName}A1`],\n A2: colors[`${colorName}A2`],\n A3: colors[`${colorName}A3`],\n A4: colors[`${colorName}A4`],\n A5: colors[`${colorName}A5`],\n A6: colors[`${colorName}A6`],\n A7: colors[`${colorName}A7`],\n A8: colors[`${colorName}A8`],\n A9: colors[`${colorName}A9`],\n A10: colors[`${colorName}A10`],\n A11: colors[`${colorName}A11`],\n A12: colors[`${colorName}A12`],\n };\n}\n\n// Helper to extract just the scale without alpha\nfunction extractSimpleColorScale(\n colorName: string,\n colors: typeof lightColors | typeof darkColors,\n) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n };\n}\n\n// Helper to create base colors object\nfunction createBaseColors(colors: typeof lightColors | typeof darkColors) {\n return {\n neon: extractColorScale('neon', colors),\n blue: extractColorScale('blue', colors),\n orange: extractColorScale('orange', colors),\n red: extractColorScale('red', colors),\n green: extractColorScale('green', colors),\n deepBlue: extractColorScale('deepBlue', colors),\n grayBlue: extractColorScale('grayBlue', colors),\n gray: extractColorScale('gray', colors),\n slate: extractColorScale('slate', colors),\n purple: extractColorScale('purple', colors),\n whiteA: extractSimpleColorScale('whiteA', colors),\n blackA: extractSimpleColorScale('blackA', colors),\n\n // Elevation\n '00dp': colors['00dp'],\n '01dp': colors['01dp'],\n '02dp': colors['02dp'],\n '03dp': colors['03dp'],\n '04dp': colors['04dp'],\n '05dp': colors['05dp'],\n '06dp': colors['06dp'],\n '08dp': colors['08dp'],\n '12dp': colors['12dp'],\n '16dp': colors['16dp'],\n '24dp': colors['24dp'],\n };\n}\n\n// Helper functions to generate button theme colors based on primary color\nfunction getButtonLightColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: lightColors[`${primaryColorName}A6`],\n buttonPrimaryFocusBg: tinycolor(lightColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: lightColors.deepBlue9,\n buttonSecondaryBorder: lightColors.grayBlue9,\n buttonSecondaryFocusBorder: tinycolor(lightColors[`${primaryColorName}9`])\n .setAlpha(0.19)\n .toHslString(),\n buttonRedBg: lightColors.red9,\n buttonRedFocusBg: lightColors.redA8,\n };\n}\n\nfunction getButtonDarkColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: darkColors[`${primaryColorName}A12`],\n buttonPrimaryFocusBg: tinycolor(darkColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: tinycolor(darkColors[`${primaryColorName}9`])\n .lighten(10)\n .toHslString(),\n buttonSecondaryBorder: darkColors.grayBlue9,\n buttonSecondaryFocusBorder: darkColors[`${primaryColorName}9`],\n buttonRedBg: darkColors.red10,\n buttonRedFocusBg: darkColors.redA11,\n };\n}\n\n// Helper functions to generate ButtonSwitch theme colors based on primary color\nfunction getButtonSwitchLightColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: lightColors[`${primaryColorName}9`],\n };\n}\n\nfunction getButtonSwitchDarkColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: darkColors[`${primaryColorName}9`],\n };\n}\n\nfunction createToneColors(colors: typeof lightColors | typeof darkColors) {\n return {\n toneSuccessSolid: colors.green9,\n toneSuccessText: colors.green11,\n toneSuccessSurface: colors.green3,\n toneSuccessBorder: colors.green7,\n toneWarningSolid: colors.orange9,\n toneWarningText: colors.orange11,\n toneWarningSurface: colors.orange3,\n toneWarningBorder: colors.orange7,\n toneDangerSolid: colors.red9,\n toneDangerText: colors.red11,\n toneDangerSurface: colors.red3,\n toneDangerBorder: colors.red7,\n toneInfoSolid: colors.blue9,\n toneInfoText: colors.blue11,\n toneInfoSurface: colors.blue3,\n toneInfoBorder: colors.blue7,\n toneNeutralSolid: colors.gray9,\n toneNeutralText: tokens.colors.textSubtle,\n toneNeutralSurface: colors.gray3,\n toneNeutralBorder: colors.gray7,\n };\n}\n\nconst chartStatusColors = {\n chartStatusGood: '#0ca30c',\n chartStatusWarning: '#fab219',\n chartStatusSerious: '#ec835a',\n chartStatusCritical: '#d03b3b',\n};\n\nconst chartLightColors = {\n chartSeries1: '#2a78d6',\n chartSeries2: '#eb6834',\n chartSeries3: '#1baf7a',\n ...chartStatusColors,\n chartGrid: '#e1e0d9',\n chartAxis: '#898781',\n};\n\nconst chartDarkColors = {\n chartSeries1: '#3987e5',\n chartSeries2: '#d95926',\n chartSeries3: '#199e70',\n ...chartStatusColors,\n chartGrid: '#2c2c2a',\n chartAxis: '#898781',\n};\n\n// ============================================================================\n// LIGHT THEMES\n// ============================================================================\n\nconst lightSemanticColors = {\n contentBg: lightColors['00dp'],\n hiContrast: lightColors.deepBlue11,\n loContrast: 'white',\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(207, 10%, 82%)',\n background: '#fcfcfc',\n foreground: '#1a1a1a',\n muted: '#f4f4f4',\n mutedForeground: '#646464',\n card: '#ffffff',\n cardForeground: '#1a1a1a',\n popover: '#ffffff',\n popoverForeground: '#1a1a1a',\n border: '#e3e3e3',\n input: '#e3e3e3',\n accent: '#60a5fa',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#3b82f6',\n ...badgeLightTheme,\n ...cardLightTheme,\n ...codeBlockLightTheme,\n ...panelLightTheme,\n ...textLightTheme,\n textInvalid: lightColors.red11,\n textRed: lightColors.red10,\n ...headingLightTheme,\n ...iconButtonLightTheme,\n ...inputLightTheme,\n ...textareaLightTheme,\n ...buttonLightTheme,\n buttonPrimaryText: 'white',\n buttonRedText: 'white',\n buttonRedHoverText: lightColors.red10,\n ...buttonSwitchLightTheme,\n buttonSwitchContainerBg: lightColors['02dp'],\n buttonSwitchOffColor: lightColors.deepBlue11,\n iconButtonHoverBorder: lightColors.slate9,\n iconButtonHoverBackground: lightColors.slateA3,\n iconButtonFocusBorder: lightColors.slate10,\n ...skeletonLightTheme,\n ...segmentedControlLightTheme,\n ...comboboxLightTheme,\n ...toastLightTheme,\n meterTrackBg: lightColors.grayA3,\n ...createToneColors(lightColors),\n ...chartLightColors,\n ...tableLightTheme,\n};\n\nexport const lightThemeBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.blue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('blue'),\n ...getButtonSwitchLightColors('blue'),\n ...getTableLightColors(lightColors.blue9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeNeon = createTheme(tokens, {\n colors: {\n primary: lightColors.neon9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('neon'),\n ...getButtonSwitchLightColors('neon'),\n ...getTableLightColors(lightColors.neon9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeOrange = createTheme(tokens, {\n colors: {\n primary: lightColors.orange9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('orange'),\n ...getButtonSwitchLightColors('orange'),\n ...getTableLightColors(lightColors.orange9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeRed = createTheme(tokens, {\n colors: {\n primary: lightColors.red9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('red'),\n ...getButtonSwitchLightColors('red'),\n ...getTableLightColors(lightColors.red9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGreen = createTheme(tokens, {\n colors: {\n primary: lightColors.green9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('green'),\n ...getButtonSwitchLightColors('green'),\n ...getTableLightColors(lightColors.green9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.deepBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('deepBlue'),\n ...getButtonSwitchLightColors('deepBlue'),\n ...getTableLightColors(lightColors.deepBlue9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.grayBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('grayBlue'),\n ...getButtonSwitchLightColors('grayBlue'),\n ...getTableLightColors(lightColors.grayBlue9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// DARK THEMES\n// ============================================================================\n\nconst darkSemanticColors = {\n contentBg: darkColors['00dp'],\n hiContrast: 'white',\n loContrast: darkColors.deepBlue2,\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(209, 29%, 19%)',\n background: '#0a0a0a',\n foreground: '#ffffff',\n muted: '#1a1a1a',\n mutedForeground: '#b4b4b4',\n card: '#1a1a1a',\n cardForeground: '#ffffff',\n popover: '#1a1a1a',\n popoverForeground: '#ffffff',\n border: '#3a3a3a',\n input: '#3a3a3a',\n accent: '#3b82f6',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#60a5fa',\n ...badgeDarkTheme,\n ...cardDarkTheme,\n ...codeBlockDarkTheme,\n ...panelDarkTheme,\n ...textDarkTheme,\n textInvalid: darkColors.red11,\n textRed: darkColors.red10,\n ...headingDarkTheme,\n ...iconButtonDarkTheme,\n ...inputDarkTheme,\n ...textareaDarkTheme,\n ...buttonDarkTheme,\n buttonPrimaryText: darkColors.deepBlue2,\n buttonRedText: 'white',\n buttonRedHoverText: darkColors.red10,\n ...buttonSwitchDarkTheme,\n buttonSwitchContainerBg: darkColors['02dp'],\n buttonSwitchOffColor: 'white',\n buttonSwitchActiveColor: darkColors.deepBlue2,\n iconButtonBackground: darkColors.deepBlue2,\n iconButtonHoverBorder: darkColors.deepBlue6,\n iconButtonHoverBackground: darkColors.slateA4,\n iconButtonFocusBorder: darkColors.deepBlue7,\n ...skeletonDarkTheme,\n ...segmentedControlDarkTheme,\n ...comboboxDarkTheme,\n ...toastDarkTheme,\n meterTrackBg: darkColors.grayA3,\n ...createToneColors(darkColors),\n ...chartDarkColors,\n ...tableDarkTheme,\n};\n\nexport const darkThemeBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.blue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('blue'),\n ...getButtonSwitchDarkColors('blue'),\n ...getTableDarkColors(darkColors.blue9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeNeon = createTheme(tokens, {\n colors: {\n primary: darkColors.neon9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('neon'),\n ...getButtonSwitchDarkColors('neon'),\n ...getTableDarkColors(darkColors.neon9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeOrange = createTheme(tokens, {\n colors: {\n primary: darkColors.orange9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('orange'),\n ...getButtonSwitchDarkColors('orange'),\n ...getTableDarkColors(darkColors.orange9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeRed = createTheme(tokens, {\n colors: {\n primary: darkColors.red9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('red'),\n ...getButtonSwitchDarkColors('red'),\n ...getTableDarkColors(darkColors.red9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGreen = createTheme(tokens, {\n colors: {\n primary: darkColors.green9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('green'),\n ...getButtonSwitchDarkColors('green'),\n ...getTableDarkColors(darkColors.green9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.deepBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('deepBlue'),\n ...getButtonSwitchDarkColors('deepBlue'),\n ...getTableDarkColors(darkColors.deepBlue9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.grayBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('grayBlue'),\n ...getButtonSwitchDarkColors('grayBlue'),\n ...getTableDarkColors(darkColors.grayBlue9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// THEME MAP FOR EASY LOOKUP\n// ============================================================================\n\nexport const themes = {\n light: {\n neon: lightThemeNeon,\n blue: lightThemeBlue,\n orange: lightThemeOrange,\n red: lightThemeRed,\n green: lightThemeGreen,\n deepBlue: lightThemeDeepBlue,\n grayBlue: lightThemeGrayBlue,\n },\n dark: {\n neon: darkThemeNeon,\n blue: darkThemeBlue,\n orange: darkThemeOrange,\n red: darkThemeRed,\n green: darkThemeGreen,\n deepBlue: darkThemeDeepBlue,\n grayBlue: darkThemeGrayBlue,\n },\n};\n\n// Default exports for backward compatibility\nexport const lightTheme = lightThemeBlue;\nexport const darkTheme = darkThemeBlue;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"themes.css.cjs","names":[],"sources":["../../styles/themes.css.ts"],"sourcesContent":["import { createTheme } from '@vanilla-extract/css';\nimport tinycolor from 'tinycolor2';\n\nimport { darkColors, lightColors } from '../colors';\nimport { badgeDarkTheme, badgeLightTheme } from '../components/Badge/Badge.theme.css';\nimport { buttonDarkTheme, buttonLightTheme } from '../components/Button/Button.theme.css';\nimport {\n buttonSwitchDarkTheme,\n buttonSwitchLightTheme,\n} from '../components/ButtonSwitch/ButtonSwitch.theme.css';\nimport { cardDarkTheme, cardLightTheme } from '../components/Card/Card.theme.css';\nimport {\n codeBlockDarkTheme,\n codeBlockLightTheme,\n} from '../components/CodeBlock/CodeBlock.theme.css';\nimport { comboboxDarkTheme, comboboxLightTheme } from '../components/Combobox/Combobox.theme.css';\nimport { headingDarkTheme, headingLightTheme } from '../components/Heading/Heading.theme.css';\nimport {\n iconButtonDarkTheme,\n iconButtonLightTheme,\n} from '../components/IconButton/IconButton.theme.css';\nimport { inputDarkTheme, inputLightTheme } from '../components/Input/Input.theme.css';\nimport { listDarkTheme, listLightTheme } from '../components/List/List.theme.css';\nimport { panelDarkTheme, panelLightTheme } from '../components/Panel/Panel.theme.css';\nimport {\n segmentedControlDarkTheme,\n segmentedControlLightTheme,\n} from '../components/SegmentedControl/SegmentedControl.theme.css';\nimport { skeletonDarkTheme, skeletonLightTheme } from '../components/Skeleton/Skeleton.theme.css';\nimport {\n getTableDarkColors,\n getTableLightColors,\n tableDarkTheme,\n tableLightTheme,\n} from '../components/Table/Table.theme.css';\nimport { textDarkTheme, textLightTheme } from '../components/Text/Text.theme.css';\nimport { textareaDarkTheme, textareaLightTheme } from '../components/Textarea/Textarea.theme.css';\nimport { toastDarkTheme, toastLightTheme } from '../components/Toast/Toast.theme.css';\nimport { tokens } from './tokens.css';\n\n// Type for primary colors\nexport type PrimaryColor = 'neon' | 'blue' | 'orange' | 'red' | 'green' | 'deepBlue' | 'grayBlue';\n\n// Base theme values shared across all variants\nconst baseThemeValues = {\n fonts: {\n rubik:\n 'Rubik, -apple-system, system-ui, \"Segoe UI\", \"Helvetica Neue\", helvetica, arial, sans-serif',\n },\n space: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n },\n sizes: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n },\n fontSizes: {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n },\n fontWeights: {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n },\n radii: {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n },\n zIndices: {\n '1': '100',\n '2': '200',\n '3': '300',\n '4': '400',\n max: '999',\n },\n};\n\n// Helper to extract color scale from color map\nfunction extractColorScale(colorName: string, colors: typeof lightColors | typeof darkColors) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n A1: colors[`${colorName}A1`],\n A2: colors[`${colorName}A2`],\n A3: colors[`${colorName}A3`],\n A4: colors[`${colorName}A4`],\n A5: colors[`${colorName}A5`],\n A6: colors[`${colorName}A6`],\n A7: colors[`${colorName}A7`],\n A8: colors[`${colorName}A8`],\n A9: colors[`${colorName}A9`],\n A10: colors[`${colorName}A10`],\n A11: colors[`${colorName}A11`],\n A12: colors[`${colorName}A12`],\n };\n}\n\n// Helper to extract just the scale without alpha\nfunction extractSimpleColorScale(\n colorName: string,\n colors: typeof lightColors | typeof darkColors,\n) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n };\n}\n\n// Helper to create base colors object\nfunction createBaseColors(colors: typeof lightColors | typeof darkColors) {\n return {\n neon: extractColorScale('neon', colors),\n blue: extractColorScale('blue', colors),\n orange: extractColorScale('orange', colors),\n red: extractColorScale('red', colors),\n green: extractColorScale('green', colors),\n deepBlue: extractColorScale('deepBlue', colors),\n grayBlue: extractColorScale('grayBlue', colors),\n gray: extractColorScale('gray', colors),\n slate: extractColorScale('slate', colors),\n purple: extractColorScale('purple', colors),\n whiteA: extractSimpleColorScale('whiteA', colors),\n blackA: extractSimpleColorScale('blackA', colors),\n\n // Elevation\n '00dp': colors['00dp'],\n '01dp': colors['01dp'],\n '02dp': colors['02dp'],\n '03dp': colors['03dp'],\n '04dp': colors['04dp'],\n '05dp': colors['05dp'],\n '06dp': colors['06dp'],\n '08dp': colors['08dp'],\n '12dp': colors['12dp'],\n '16dp': colors['16dp'],\n '24dp': colors['24dp'],\n };\n}\n\n// Helper functions to generate button theme colors based on primary color\nfunction getButtonLightColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: lightColors[`${primaryColorName}A6`],\n buttonPrimaryFocusBg: tinycolor(lightColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: lightColors.deepBlue9,\n buttonSecondaryBorder: lightColors.grayBlue9,\n buttonSecondaryFocusBorder: tinycolor(lightColors[`${primaryColorName}9`])\n .setAlpha(0.19)\n .toHslString(),\n buttonRedBg: lightColors.red9,\n buttonRedFocusBg: lightColors.redA8,\n };\n}\n\nfunction getButtonDarkColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: darkColors[`${primaryColorName}A12`],\n buttonPrimaryFocusBg: tinycolor(darkColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: tinycolor(darkColors[`${primaryColorName}9`])\n .lighten(10)\n .toHslString(),\n buttonSecondaryBorder: darkColors.grayBlue9,\n buttonSecondaryFocusBorder: darkColors[`${primaryColorName}9`],\n buttonRedBg: darkColors.red10,\n buttonRedFocusBg: darkColors.redA11,\n };\n}\n\n// Helper functions to generate ButtonSwitch theme colors based on primary color\nfunction getButtonSwitchLightColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: lightColors[`${primaryColorName}9`],\n };\n}\n\nfunction getButtonSwitchDarkColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: darkColors[`${primaryColorName}9`],\n };\n}\n\nfunction getListLightFocusColors(primaryColorName: string) {\n return {\n listItemFocusBorder: lightColors[`${primaryColorName}8`],\n };\n}\n\nfunction getListDarkFocusColors(primaryColorName: string) {\n return {\n listItemFocusBorder: darkColors[`${primaryColorName}11`],\n };\n}\n\nfunction createToneColors(colors: typeof lightColors | typeof darkColors) {\n return {\n toneSuccessSolid: colors.green9,\n toneSuccessText: colors.green11,\n toneSuccessSurface: colors.green3,\n toneSuccessBorder: colors.green7,\n toneWarningSolid: colors.orange9,\n toneWarningText: colors.orange11,\n toneWarningSurface: colors.orange3,\n toneWarningBorder: colors.orange7,\n toneDangerSolid: colors.red9,\n toneDangerText: colors.red11,\n toneDangerSurface: colors.red3,\n toneDangerBorder: colors.red7,\n toneInfoSolid: colors.blue9,\n toneInfoText: colors.blue11,\n toneInfoSurface: colors.blue3,\n toneInfoBorder: colors.blue7,\n toneNeutralSolid: colors.gray9,\n toneNeutralText: tokens.colors.textSubtle,\n toneNeutralSurface: colors.gray3,\n toneNeutralBorder: colors.gray7,\n };\n}\n\nconst chartStatusColors = {\n chartStatusGood: '#0ca30c',\n chartStatusWarning: '#fab219',\n chartStatusSerious: '#ec835a',\n chartStatusCritical: '#d03b3b',\n};\n\nconst chartLightColors = {\n chartSeries1: '#2a78d6',\n chartSeries2: '#eb6834',\n chartSeries3: '#1baf7a',\n ...chartStatusColors,\n chartGrid: '#e1e0d9',\n chartAxis: '#898781',\n};\n\nconst chartDarkColors = {\n chartSeries1: '#3987e5',\n chartSeries2: '#d95926',\n chartSeries3: '#199e70',\n ...chartStatusColors,\n chartGrid: '#2c2c2a',\n chartAxis: '#898781',\n};\n\n// ============================================================================\n// LIGHT THEMES\n// ============================================================================\n\nconst lightSemanticColors = {\n contentBg: lightColors['00dp'],\n hiContrast: lightColors.deepBlue11,\n loContrast: 'white',\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(207, 10%, 82%)',\n background: '#fcfcfc',\n foreground: '#1a1a1a',\n muted: '#f4f4f4',\n mutedForeground: '#646464',\n card: '#ffffff',\n cardForeground: '#1a1a1a',\n popover: '#ffffff',\n popoverForeground: '#1a1a1a',\n border: '#e3e3e3',\n input: '#e3e3e3',\n accent: '#60a5fa',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#3b82f6',\n ...badgeLightTheme,\n ...cardLightTheme,\n ...codeBlockLightTheme,\n ...panelLightTheme,\n ...textLightTheme,\n textInvalid: lightColors.red11,\n textRed: lightColors.red10,\n ...headingLightTheme,\n ...iconButtonLightTheme,\n ...inputLightTheme,\n ...textareaLightTheme,\n ...buttonLightTheme,\n buttonPrimaryText: 'white',\n buttonRedText: 'white',\n buttonRedHoverText: lightColors.red10,\n ...buttonSwitchLightTheme,\n buttonSwitchContainerBg: lightColors['02dp'],\n buttonSwitchOffColor: lightColors.deepBlue11,\n iconButtonHoverBorder: lightColors.slate9,\n iconButtonHoverBackground: lightColors.slateA3,\n iconButtonFocusBorder: lightColors.slate10,\n ...skeletonLightTheme,\n ...segmentedControlLightTheme,\n ...comboboxLightTheme,\n ...toastLightTheme,\n ...listLightTheme,\n meterTrackBg: lightColors.grayA3,\n ...createToneColors(lightColors),\n ...chartLightColors,\n ...tableLightTheme,\n};\n\nexport const lightThemeBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.blue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('blue'),\n ...getButtonSwitchLightColors('blue'),\n ...getTableLightColors(lightColors.blue9),\n ...getListLightFocusColors('blue'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeNeon = createTheme(tokens, {\n colors: {\n primary: lightColors.neon9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('neon'),\n ...getButtonSwitchLightColors('neon'),\n ...getTableLightColors(lightColors.neon9),\n ...getListLightFocusColors('neon'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeOrange = createTheme(tokens, {\n colors: {\n primary: lightColors.orange9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('orange'),\n ...getButtonSwitchLightColors('orange'),\n ...getTableLightColors(lightColors.orange9),\n ...getListLightFocusColors('orange'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeRed = createTheme(tokens, {\n colors: {\n primary: lightColors.red9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('red'),\n ...getButtonSwitchLightColors('red'),\n ...getTableLightColors(lightColors.red9),\n ...getListLightFocusColors('red'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGreen = createTheme(tokens, {\n colors: {\n primary: lightColors.green9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('green'),\n ...getButtonSwitchLightColors('green'),\n ...getTableLightColors(lightColors.green9),\n ...getListLightFocusColors('green'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.deepBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('deepBlue'),\n ...getButtonSwitchLightColors('deepBlue'),\n ...getTableLightColors(lightColors.deepBlue9),\n ...getListLightFocusColors('deepBlue'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.grayBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('grayBlue'),\n ...getButtonSwitchLightColors('grayBlue'),\n ...getTableLightColors(lightColors.grayBlue9),\n ...getListLightFocusColors('grayBlue'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// DARK THEMES\n// ============================================================================\n\nconst darkSemanticColors = {\n contentBg: darkColors['00dp'],\n hiContrast: 'white',\n loContrast: darkColors.deepBlue2,\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(209, 29%, 19%)',\n background: '#0a0a0a',\n foreground: '#ffffff',\n muted: '#1a1a1a',\n mutedForeground: '#b4b4b4',\n card: '#1a1a1a',\n cardForeground: '#ffffff',\n popover: '#1a1a1a',\n popoverForeground: '#ffffff',\n border: '#3a3a3a',\n input: '#3a3a3a',\n accent: '#3b82f6',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#60a5fa',\n ...badgeDarkTheme,\n ...cardDarkTheme,\n ...codeBlockDarkTheme,\n ...panelDarkTheme,\n ...textDarkTheme,\n textInvalid: darkColors.red11,\n textRed: darkColors.red10,\n ...headingDarkTheme,\n ...iconButtonDarkTheme,\n ...inputDarkTheme,\n ...textareaDarkTheme,\n ...buttonDarkTheme,\n buttonPrimaryText: darkColors.deepBlue2,\n buttonRedText: 'white',\n buttonRedHoverText: darkColors.red10,\n ...buttonSwitchDarkTheme,\n buttonSwitchContainerBg: darkColors['02dp'],\n buttonSwitchOffColor: 'white',\n buttonSwitchActiveColor: darkColors.deepBlue2,\n iconButtonBackground: darkColors.deepBlue2,\n iconButtonHoverBorder: darkColors.deepBlue6,\n iconButtonHoverBackground: darkColors.slateA4,\n iconButtonFocusBorder: darkColors.deepBlue7,\n ...skeletonDarkTheme,\n ...segmentedControlDarkTheme,\n ...comboboxDarkTheme,\n ...toastDarkTheme,\n ...listDarkTheme,\n meterTrackBg: darkColors.grayA3,\n ...createToneColors(darkColors),\n ...chartDarkColors,\n ...tableDarkTheme,\n};\n\nexport const darkThemeBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.blue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('blue'),\n ...getButtonSwitchDarkColors('blue'),\n ...getTableDarkColors(darkColors.blue9),\n ...getListDarkFocusColors('blue'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeNeon = createTheme(tokens, {\n colors: {\n primary: darkColors.neon9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('neon'),\n ...getButtonSwitchDarkColors('neon'),\n ...getTableDarkColors(darkColors.neon9),\n ...getListDarkFocusColors('neon'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeOrange = createTheme(tokens, {\n colors: {\n primary: darkColors.orange9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('orange'),\n ...getButtonSwitchDarkColors('orange'),\n ...getTableDarkColors(darkColors.orange9),\n ...getListDarkFocusColors('orange'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeRed = createTheme(tokens, {\n colors: {\n primary: darkColors.red9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('red'),\n ...getButtonSwitchDarkColors('red'),\n ...getTableDarkColors(darkColors.red9),\n ...getListDarkFocusColors('red'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGreen = createTheme(tokens, {\n colors: {\n primary: darkColors.green9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('green'),\n ...getButtonSwitchDarkColors('green'),\n ...getTableDarkColors(darkColors.green9),\n ...getListDarkFocusColors('green'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.deepBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('deepBlue'),\n ...getButtonSwitchDarkColors('deepBlue'),\n ...getTableDarkColors(darkColors.deepBlue9),\n ...getListDarkFocusColors('deepBlue'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.grayBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('grayBlue'),\n ...getButtonSwitchDarkColors('grayBlue'),\n ...getTableDarkColors(darkColors.grayBlue9),\n ...getListDarkFocusColors('grayBlue'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// THEME MAP FOR EASY LOOKUP\n// ============================================================================\n\nexport const themes = {\n light: {\n neon: lightThemeNeon,\n blue: lightThemeBlue,\n orange: lightThemeOrange,\n red: lightThemeRed,\n green: lightThemeGreen,\n deepBlue: lightThemeDeepBlue,\n grayBlue: lightThemeGrayBlue,\n },\n dark: {\n neon: darkThemeNeon,\n blue: darkThemeBlue,\n orange: darkThemeOrange,\n red: darkThemeRed,\n green: darkThemeGreen,\n deepBlue: darkThemeDeepBlue,\n grayBlue: darkThemeGrayBlue,\n },\n};\n\n// Default exports for backward compatibility\nexport const lightTheme = lightThemeBlue;\nexport const darkTheme = darkThemeBlue;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.css.js","names":[],"sources":["../../styles/themes.css.ts"],"sourcesContent":["import { createTheme } from '@vanilla-extract/css';\nimport tinycolor from 'tinycolor2';\n\nimport { darkColors, lightColors } from '../colors';\nimport { badgeDarkTheme, badgeLightTheme } from '../components/Badge/Badge.theme.css';\nimport { buttonDarkTheme, buttonLightTheme } from '../components/Button/Button.theme.css';\nimport {\n buttonSwitchDarkTheme,\n buttonSwitchLightTheme,\n} from '../components/ButtonSwitch/ButtonSwitch.theme.css';\nimport { cardDarkTheme, cardLightTheme } from '../components/Card/Card.theme.css';\nimport {\n codeBlockDarkTheme,\n codeBlockLightTheme,\n} from '../components/CodeBlock/CodeBlock.theme.css';\nimport { comboboxDarkTheme, comboboxLightTheme } from '../components/Combobox/Combobox.theme.css';\nimport { headingDarkTheme, headingLightTheme } from '../components/Heading/Heading.theme.css';\nimport {\n iconButtonDarkTheme,\n iconButtonLightTheme,\n} from '../components/IconButton/IconButton.theme.css';\nimport { inputDarkTheme, inputLightTheme } from '../components/Input/Input.theme.css';\nimport { panelDarkTheme, panelLightTheme } from '../components/Panel/Panel.theme.css';\nimport {\n segmentedControlDarkTheme,\n segmentedControlLightTheme,\n} from '../components/SegmentedControl/SegmentedControl.theme.css';\nimport { skeletonDarkTheme, skeletonLightTheme } from '../components/Skeleton/Skeleton.theme.css';\nimport {\n getTableDarkColors,\n getTableLightColors,\n tableDarkTheme,\n tableLightTheme,\n} from '../components/Table/Table.theme.css';\nimport { textDarkTheme, textLightTheme } from '../components/Text/Text.theme.css';\nimport { textareaDarkTheme, textareaLightTheme } from '../components/Textarea/Textarea.theme.css';\nimport { toastDarkTheme, toastLightTheme } from '../components/Toast/Toast.theme.css';\nimport { tokens } from './tokens.css';\n\n// Type for primary colors\nexport type PrimaryColor = 'neon' | 'blue' | 'orange' | 'red' | 'green' | 'deepBlue' | 'grayBlue';\n\n// Base theme values shared across all variants\nconst baseThemeValues = {\n fonts: {\n rubik:\n 'Rubik, -apple-system, system-ui, \"Segoe UI\", \"Helvetica Neue\", helvetica, arial, sans-serif',\n },\n space: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n },\n sizes: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n },\n fontSizes: {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n },\n fontWeights: {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n },\n radii: {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n },\n zIndices: {\n '1': '100',\n '2': '200',\n '3': '300',\n '4': '400',\n max: '999',\n },\n};\n\n// Helper to extract color scale from color map\nfunction extractColorScale(colorName: string, colors: typeof lightColors | typeof darkColors) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n A1: colors[`${colorName}A1`],\n A2: colors[`${colorName}A2`],\n A3: colors[`${colorName}A3`],\n A4: colors[`${colorName}A4`],\n A5: colors[`${colorName}A5`],\n A6: colors[`${colorName}A6`],\n A7: colors[`${colorName}A7`],\n A8: colors[`${colorName}A8`],\n A9: colors[`${colorName}A9`],\n A10: colors[`${colorName}A10`],\n A11: colors[`${colorName}A11`],\n A12: colors[`${colorName}A12`],\n };\n}\n\n// Helper to extract just the scale without alpha\nfunction extractSimpleColorScale(\n colorName: string,\n colors: typeof lightColors | typeof darkColors,\n) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n };\n}\n\n// Helper to create base colors object\nfunction createBaseColors(colors: typeof lightColors | typeof darkColors) {\n return {\n neon: extractColorScale('neon', colors),\n blue: extractColorScale('blue', colors),\n orange: extractColorScale('orange', colors),\n red: extractColorScale('red', colors),\n green: extractColorScale('green', colors),\n deepBlue: extractColorScale('deepBlue', colors),\n grayBlue: extractColorScale('grayBlue', colors),\n gray: extractColorScale('gray', colors),\n slate: extractColorScale('slate', colors),\n purple: extractColorScale('purple', colors),\n whiteA: extractSimpleColorScale('whiteA', colors),\n blackA: extractSimpleColorScale('blackA', colors),\n\n // Elevation\n '00dp': colors['00dp'],\n '01dp': colors['01dp'],\n '02dp': colors['02dp'],\n '03dp': colors['03dp'],\n '04dp': colors['04dp'],\n '05dp': colors['05dp'],\n '06dp': colors['06dp'],\n '08dp': colors['08dp'],\n '12dp': colors['12dp'],\n '16dp': colors['16dp'],\n '24dp': colors['24dp'],\n };\n}\n\n// Helper functions to generate button theme colors based on primary color\nfunction getButtonLightColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: lightColors[`${primaryColorName}A6`],\n buttonPrimaryFocusBg: tinycolor(lightColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: lightColors.deepBlue9,\n buttonSecondaryBorder: lightColors.grayBlue9,\n buttonSecondaryFocusBorder: tinycolor(lightColors[`${primaryColorName}9`])\n .setAlpha(0.19)\n .toHslString(),\n buttonRedBg: lightColors.red9,\n buttonRedFocusBg: lightColors.redA8,\n };\n}\n\nfunction getButtonDarkColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: darkColors[`${primaryColorName}A12`],\n buttonPrimaryFocusBg: tinycolor(darkColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: tinycolor(darkColors[`${primaryColorName}9`])\n .lighten(10)\n .toHslString(),\n buttonSecondaryBorder: darkColors.grayBlue9,\n buttonSecondaryFocusBorder: darkColors[`${primaryColorName}9`],\n buttonRedBg: darkColors.red10,\n buttonRedFocusBg: darkColors.redA11,\n };\n}\n\n// Helper functions to generate ButtonSwitch theme colors based on primary color\nfunction getButtonSwitchLightColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: lightColors[`${primaryColorName}9`],\n };\n}\n\nfunction getButtonSwitchDarkColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: darkColors[`${primaryColorName}9`],\n };\n}\n\nfunction createToneColors(colors: typeof lightColors | typeof darkColors) {\n return {\n toneSuccessSolid: colors.green9,\n toneSuccessText: colors.green11,\n toneSuccessSurface: colors.green3,\n toneSuccessBorder: colors.green7,\n toneWarningSolid: colors.orange9,\n toneWarningText: colors.orange11,\n toneWarningSurface: colors.orange3,\n toneWarningBorder: colors.orange7,\n toneDangerSolid: colors.red9,\n toneDangerText: colors.red11,\n toneDangerSurface: colors.red3,\n toneDangerBorder: colors.red7,\n toneInfoSolid: colors.blue9,\n toneInfoText: colors.blue11,\n toneInfoSurface: colors.blue3,\n toneInfoBorder: colors.blue7,\n toneNeutralSolid: colors.gray9,\n toneNeutralText: tokens.colors.textSubtle,\n toneNeutralSurface: colors.gray3,\n toneNeutralBorder: colors.gray7,\n };\n}\n\nconst chartStatusColors = {\n chartStatusGood: '#0ca30c',\n chartStatusWarning: '#fab219',\n chartStatusSerious: '#ec835a',\n chartStatusCritical: '#d03b3b',\n};\n\nconst chartLightColors = {\n chartSeries1: '#2a78d6',\n chartSeries2: '#eb6834',\n chartSeries3: '#1baf7a',\n ...chartStatusColors,\n chartGrid: '#e1e0d9',\n chartAxis: '#898781',\n};\n\nconst chartDarkColors = {\n chartSeries1: '#3987e5',\n chartSeries2: '#d95926',\n chartSeries3: '#199e70',\n ...chartStatusColors,\n chartGrid: '#2c2c2a',\n chartAxis: '#898781',\n};\n\n// ============================================================================\n// LIGHT THEMES\n// ============================================================================\n\nconst lightSemanticColors = {\n contentBg: lightColors['00dp'],\n hiContrast: lightColors.deepBlue11,\n loContrast: 'white',\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(207, 10%, 82%)',\n background: '#fcfcfc',\n foreground: '#1a1a1a',\n muted: '#f4f4f4',\n mutedForeground: '#646464',\n card: '#ffffff',\n cardForeground: '#1a1a1a',\n popover: '#ffffff',\n popoverForeground: '#1a1a1a',\n border: '#e3e3e3',\n input: '#e3e3e3',\n accent: '#60a5fa',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#3b82f6',\n ...badgeLightTheme,\n ...cardLightTheme,\n ...codeBlockLightTheme,\n ...panelLightTheme,\n ...textLightTheme,\n textInvalid: lightColors.red11,\n textRed: lightColors.red10,\n ...headingLightTheme,\n ...iconButtonLightTheme,\n ...inputLightTheme,\n ...textareaLightTheme,\n ...buttonLightTheme,\n buttonPrimaryText: 'white',\n buttonRedText: 'white',\n buttonRedHoverText: lightColors.red10,\n ...buttonSwitchLightTheme,\n buttonSwitchContainerBg: lightColors['02dp'],\n buttonSwitchOffColor: lightColors.deepBlue11,\n iconButtonHoverBorder: lightColors.slate9,\n iconButtonHoverBackground: lightColors.slateA3,\n iconButtonFocusBorder: lightColors.slate10,\n ...skeletonLightTheme,\n ...segmentedControlLightTheme,\n ...comboboxLightTheme,\n ...toastLightTheme,\n meterTrackBg: lightColors.grayA3,\n ...createToneColors(lightColors),\n ...chartLightColors,\n ...tableLightTheme,\n};\n\nexport const lightThemeBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.blue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('blue'),\n ...getButtonSwitchLightColors('blue'),\n ...getTableLightColors(lightColors.blue9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeNeon = createTheme(tokens, {\n colors: {\n primary: lightColors.neon9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('neon'),\n ...getButtonSwitchLightColors('neon'),\n ...getTableLightColors(lightColors.neon9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeOrange = createTheme(tokens, {\n colors: {\n primary: lightColors.orange9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('orange'),\n ...getButtonSwitchLightColors('orange'),\n ...getTableLightColors(lightColors.orange9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeRed = createTheme(tokens, {\n colors: {\n primary: lightColors.red9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('red'),\n ...getButtonSwitchLightColors('red'),\n ...getTableLightColors(lightColors.red9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGreen = createTheme(tokens, {\n colors: {\n primary: lightColors.green9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('green'),\n ...getButtonSwitchLightColors('green'),\n ...getTableLightColors(lightColors.green9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.deepBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('deepBlue'),\n ...getButtonSwitchLightColors('deepBlue'),\n ...getTableLightColors(lightColors.deepBlue9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.grayBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('grayBlue'),\n ...getButtonSwitchLightColors('grayBlue'),\n ...getTableLightColors(lightColors.grayBlue9),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// DARK THEMES\n// ============================================================================\n\nconst darkSemanticColors = {\n contentBg: darkColors['00dp'],\n hiContrast: 'white',\n loContrast: darkColors.deepBlue2,\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(209, 29%, 19%)',\n background: '#0a0a0a',\n foreground: '#ffffff',\n muted: '#1a1a1a',\n mutedForeground: '#b4b4b4',\n card: '#1a1a1a',\n cardForeground: '#ffffff',\n popover: '#1a1a1a',\n popoverForeground: '#ffffff',\n border: '#3a3a3a',\n input: '#3a3a3a',\n accent: '#3b82f6',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#60a5fa',\n ...badgeDarkTheme,\n ...cardDarkTheme,\n ...codeBlockDarkTheme,\n ...panelDarkTheme,\n ...textDarkTheme,\n textInvalid: darkColors.red11,\n textRed: darkColors.red10,\n ...headingDarkTheme,\n ...iconButtonDarkTheme,\n ...inputDarkTheme,\n ...textareaDarkTheme,\n ...buttonDarkTheme,\n buttonPrimaryText: darkColors.deepBlue2,\n buttonRedText: 'white',\n buttonRedHoverText: darkColors.red10,\n ...buttonSwitchDarkTheme,\n buttonSwitchContainerBg: darkColors['02dp'],\n buttonSwitchOffColor: 'white',\n buttonSwitchActiveColor: darkColors.deepBlue2,\n iconButtonBackground: darkColors.deepBlue2,\n iconButtonHoverBorder: darkColors.deepBlue6,\n iconButtonHoverBackground: darkColors.slateA4,\n iconButtonFocusBorder: darkColors.deepBlue7,\n ...skeletonDarkTheme,\n ...segmentedControlDarkTheme,\n ...comboboxDarkTheme,\n ...toastDarkTheme,\n meterTrackBg: darkColors.grayA3,\n ...createToneColors(darkColors),\n ...chartDarkColors,\n ...tableDarkTheme,\n};\n\nexport const darkThemeBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.blue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('blue'),\n ...getButtonSwitchDarkColors('blue'),\n ...getTableDarkColors(darkColors.blue9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeNeon = createTheme(tokens, {\n colors: {\n primary: darkColors.neon9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('neon'),\n ...getButtonSwitchDarkColors('neon'),\n ...getTableDarkColors(darkColors.neon9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeOrange = createTheme(tokens, {\n colors: {\n primary: darkColors.orange9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('orange'),\n ...getButtonSwitchDarkColors('orange'),\n ...getTableDarkColors(darkColors.orange9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeRed = createTheme(tokens, {\n colors: {\n primary: darkColors.red9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('red'),\n ...getButtonSwitchDarkColors('red'),\n ...getTableDarkColors(darkColors.red9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGreen = createTheme(tokens, {\n colors: {\n primary: darkColors.green9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('green'),\n ...getButtonSwitchDarkColors('green'),\n ...getTableDarkColors(darkColors.green9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.deepBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('deepBlue'),\n ...getButtonSwitchDarkColors('deepBlue'),\n ...getTableDarkColors(darkColors.deepBlue9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.grayBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('grayBlue'),\n ...getButtonSwitchDarkColors('grayBlue'),\n ...getTableDarkColors(darkColors.grayBlue9),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// THEME MAP FOR EASY LOOKUP\n// ============================================================================\n\nexport const themes = {\n light: {\n neon: lightThemeNeon,\n blue: lightThemeBlue,\n orange: lightThemeOrange,\n red: lightThemeRed,\n green: lightThemeGreen,\n deepBlue: lightThemeDeepBlue,\n grayBlue: lightThemeGrayBlue,\n },\n dark: {\n neon: darkThemeNeon,\n blue: darkThemeBlue,\n orange: darkThemeOrange,\n red: darkThemeRed,\n green: darkThemeGreen,\n deepBlue: darkThemeDeepBlue,\n grayBlue: darkThemeGrayBlue,\n },\n};\n\n// Default exports for backward compatibility\nexport const lightTheme = lightThemeBlue;\nexport const darkTheme = darkThemeBlue;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"themes.css.js","names":[],"sources":["../../styles/themes.css.ts"],"sourcesContent":["import { createTheme } from '@vanilla-extract/css';\nimport tinycolor from 'tinycolor2';\n\nimport { darkColors, lightColors } from '../colors';\nimport { badgeDarkTheme, badgeLightTheme } from '../components/Badge/Badge.theme.css';\nimport { buttonDarkTheme, buttonLightTheme } from '../components/Button/Button.theme.css';\nimport {\n buttonSwitchDarkTheme,\n buttonSwitchLightTheme,\n} from '../components/ButtonSwitch/ButtonSwitch.theme.css';\nimport { cardDarkTheme, cardLightTheme } from '../components/Card/Card.theme.css';\nimport {\n codeBlockDarkTheme,\n codeBlockLightTheme,\n} from '../components/CodeBlock/CodeBlock.theme.css';\nimport { comboboxDarkTheme, comboboxLightTheme } from '../components/Combobox/Combobox.theme.css';\nimport { headingDarkTheme, headingLightTheme } from '../components/Heading/Heading.theme.css';\nimport {\n iconButtonDarkTheme,\n iconButtonLightTheme,\n} from '../components/IconButton/IconButton.theme.css';\nimport { inputDarkTheme, inputLightTheme } from '../components/Input/Input.theme.css';\nimport { listDarkTheme, listLightTheme } from '../components/List/List.theme.css';\nimport { panelDarkTheme, panelLightTheme } from '../components/Panel/Panel.theme.css';\nimport {\n segmentedControlDarkTheme,\n segmentedControlLightTheme,\n} from '../components/SegmentedControl/SegmentedControl.theme.css';\nimport { skeletonDarkTheme, skeletonLightTheme } from '../components/Skeleton/Skeleton.theme.css';\nimport {\n getTableDarkColors,\n getTableLightColors,\n tableDarkTheme,\n tableLightTheme,\n} from '../components/Table/Table.theme.css';\nimport { textDarkTheme, textLightTheme } from '../components/Text/Text.theme.css';\nimport { textareaDarkTheme, textareaLightTheme } from '../components/Textarea/Textarea.theme.css';\nimport { toastDarkTheme, toastLightTheme } from '../components/Toast/Toast.theme.css';\nimport { tokens } from './tokens.css';\n\n// Type for primary colors\nexport type PrimaryColor = 'neon' | 'blue' | 'orange' | 'red' | 'green' | 'deepBlue' | 'grayBlue';\n\n// Base theme values shared across all variants\nconst baseThemeValues = {\n fonts: {\n rubik:\n 'Rubik, -apple-system, system-ui, \"Segoe UI\", \"Helvetica Neue\", helvetica, arial, sans-serif',\n },\n space: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n },\n sizes: {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n },\n fontSizes: {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n },\n fontWeights: {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n },\n radii: {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n },\n zIndices: {\n '1': '100',\n '2': '200',\n '3': '300',\n '4': '400',\n max: '999',\n },\n};\n\n// Helper to extract color scale from color map\nfunction extractColorScale(colorName: string, colors: typeof lightColors | typeof darkColors) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n A1: colors[`${colorName}A1`],\n A2: colors[`${colorName}A2`],\n A3: colors[`${colorName}A3`],\n A4: colors[`${colorName}A4`],\n A5: colors[`${colorName}A5`],\n A6: colors[`${colorName}A6`],\n A7: colors[`${colorName}A7`],\n A8: colors[`${colorName}A8`],\n A9: colors[`${colorName}A9`],\n A10: colors[`${colorName}A10`],\n A11: colors[`${colorName}A11`],\n A12: colors[`${colorName}A12`],\n };\n}\n\n// Helper to extract just the scale without alpha\nfunction extractSimpleColorScale(\n colorName: string,\n colors: typeof lightColors | typeof darkColors,\n) {\n return {\n '1': colors[`${colorName}1`],\n '2': colors[`${colorName}2`],\n '3': colors[`${colorName}3`],\n '4': colors[`${colorName}4`],\n '5': colors[`${colorName}5`],\n '6': colors[`${colorName}6`],\n '7': colors[`${colorName}7`],\n '8': colors[`${colorName}8`],\n '9': colors[`${colorName}9`],\n '10': colors[`${colorName}10`],\n '11': colors[`${colorName}11`],\n '12': colors[`${colorName}12`],\n };\n}\n\n// Helper to create base colors object\nfunction createBaseColors(colors: typeof lightColors | typeof darkColors) {\n return {\n neon: extractColorScale('neon', colors),\n blue: extractColorScale('blue', colors),\n orange: extractColorScale('orange', colors),\n red: extractColorScale('red', colors),\n green: extractColorScale('green', colors),\n deepBlue: extractColorScale('deepBlue', colors),\n grayBlue: extractColorScale('grayBlue', colors),\n gray: extractColorScale('gray', colors),\n slate: extractColorScale('slate', colors),\n purple: extractColorScale('purple', colors),\n whiteA: extractSimpleColorScale('whiteA', colors),\n blackA: extractSimpleColorScale('blackA', colors),\n\n // Elevation\n '00dp': colors['00dp'],\n '01dp': colors['01dp'],\n '02dp': colors['02dp'],\n '03dp': colors['03dp'],\n '04dp': colors['04dp'],\n '05dp': colors['05dp'],\n '06dp': colors['06dp'],\n '08dp': colors['08dp'],\n '12dp': colors['12dp'],\n '16dp': colors['16dp'],\n '24dp': colors['24dp'],\n };\n}\n\n// Helper functions to generate button theme colors based on primary color\nfunction getButtonLightColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: lightColors[`${primaryColorName}A6`],\n buttonPrimaryFocusBg: tinycolor(lightColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: lightColors.deepBlue9,\n buttonSecondaryBorder: lightColors.grayBlue9,\n buttonSecondaryFocusBorder: tinycolor(lightColors[`${primaryColorName}9`])\n .setAlpha(0.19)\n .toHslString(),\n buttonRedBg: lightColors.red9,\n buttonRedFocusBg: lightColors.redA8,\n };\n}\n\nfunction getButtonDarkColors(primaryColorName: string) {\n return {\n buttonPrimaryFocusBorder: darkColors[`${primaryColorName}A12`],\n buttonPrimaryFocusBg: tinycolor(darkColors[`${primaryColorName}9`]).lighten(10).toHslString(),\n buttonPrimaryGhostHoverText: tinycolor(darkColors[`${primaryColorName}9`])\n .lighten(10)\n .toHslString(),\n buttonSecondaryBorder: darkColors.grayBlue9,\n buttonSecondaryFocusBorder: darkColors[`${primaryColorName}9`],\n buttonRedBg: darkColors.red10,\n buttonRedFocusBg: darkColors.redA11,\n };\n}\n\n// Helper functions to generate ButtonSwitch theme colors based on primary color\nfunction getButtonSwitchLightColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: lightColors[`${primaryColorName}9`],\n };\n}\n\nfunction getButtonSwitchDarkColors(primaryColorName: string) {\n return {\n buttonSwitchActiveBg: darkColors[`${primaryColorName}9`],\n };\n}\n\nfunction getListLightFocusColors(primaryColorName: string) {\n return {\n listItemFocusBorder: lightColors[`${primaryColorName}8`],\n };\n}\n\nfunction getListDarkFocusColors(primaryColorName: string) {\n return {\n listItemFocusBorder: darkColors[`${primaryColorName}11`],\n };\n}\n\nfunction createToneColors(colors: typeof lightColors | typeof darkColors) {\n return {\n toneSuccessSolid: colors.green9,\n toneSuccessText: colors.green11,\n toneSuccessSurface: colors.green3,\n toneSuccessBorder: colors.green7,\n toneWarningSolid: colors.orange9,\n toneWarningText: colors.orange11,\n toneWarningSurface: colors.orange3,\n toneWarningBorder: colors.orange7,\n toneDangerSolid: colors.red9,\n toneDangerText: colors.red11,\n toneDangerSurface: colors.red3,\n toneDangerBorder: colors.red7,\n toneInfoSolid: colors.blue9,\n toneInfoText: colors.blue11,\n toneInfoSurface: colors.blue3,\n toneInfoBorder: colors.blue7,\n toneNeutralSolid: colors.gray9,\n toneNeutralText: tokens.colors.textSubtle,\n toneNeutralSurface: colors.gray3,\n toneNeutralBorder: colors.gray7,\n };\n}\n\nconst chartStatusColors = {\n chartStatusGood: '#0ca30c',\n chartStatusWarning: '#fab219',\n chartStatusSerious: '#ec835a',\n chartStatusCritical: '#d03b3b',\n};\n\nconst chartLightColors = {\n chartSeries1: '#2a78d6',\n chartSeries2: '#eb6834',\n chartSeries3: '#1baf7a',\n ...chartStatusColors,\n chartGrid: '#e1e0d9',\n chartAxis: '#898781',\n};\n\nconst chartDarkColors = {\n chartSeries1: '#3987e5',\n chartSeries2: '#d95926',\n chartSeries3: '#199e70',\n ...chartStatusColors,\n chartGrid: '#2c2c2a',\n chartAxis: '#898781',\n};\n\n// ============================================================================\n// LIGHT THEMES\n// ============================================================================\n\nconst lightSemanticColors = {\n contentBg: lightColors['00dp'],\n hiContrast: lightColors.deepBlue11,\n loContrast: 'white',\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(207, 10%, 82%)',\n background: '#fcfcfc',\n foreground: '#1a1a1a',\n muted: '#f4f4f4',\n mutedForeground: '#646464',\n card: '#ffffff',\n cardForeground: '#1a1a1a',\n popover: '#ffffff',\n popoverForeground: '#1a1a1a',\n border: '#e3e3e3',\n input: '#e3e3e3',\n accent: '#60a5fa',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#3b82f6',\n ...badgeLightTheme,\n ...cardLightTheme,\n ...codeBlockLightTheme,\n ...panelLightTheme,\n ...textLightTheme,\n textInvalid: lightColors.red11,\n textRed: lightColors.red10,\n ...headingLightTheme,\n ...iconButtonLightTheme,\n ...inputLightTheme,\n ...textareaLightTheme,\n ...buttonLightTheme,\n buttonPrimaryText: 'white',\n buttonRedText: 'white',\n buttonRedHoverText: lightColors.red10,\n ...buttonSwitchLightTheme,\n buttonSwitchContainerBg: lightColors['02dp'],\n buttonSwitchOffColor: lightColors.deepBlue11,\n iconButtonHoverBorder: lightColors.slate9,\n iconButtonHoverBackground: lightColors.slateA3,\n iconButtonFocusBorder: lightColors.slate10,\n ...skeletonLightTheme,\n ...segmentedControlLightTheme,\n ...comboboxLightTheme,\n ...toastLightTheme,\n ...listLightTheme,\n meterTrackBg: lightColors.grayA3,\n ...createToneColors(lightColors),\n ...chartLightColors,\n ...tableLightTheme,\n};\n\nexport const lightThemeBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.blue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('blue'),\n ...getButtonSwitchLightColors('blue'),\n ...getTableLightColors(lightColors.blue9),\n ...getListLightFocusColors('blue'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeNeon = createTheme(tokens, {\n colors: {\n primary: lightColors.neon9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('neon'),\n ...getButtonSwitchLightColors('neon'),\n ...getTableLightColors(lightColors.neon9),\n ...getListLightFocusColors('neon'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeOrange = createTheme(tokens, {\n colors: {\n primary: lightColors.orange9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('orange'),\n ...getButtonSwitchLightColors('orange'),\n ...getTableLightColors(lightColors.orange9),\n ...getListLightFocusColors('orange'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeRed = createTheme(tokens, {\n colors: {\n primary: lightColors.red9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('red'),\n ...getButtonSwitchLightColors('red'),\n ...getTableLightColors(lightColors.red9),\n ...getListLightFocusColors('red'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGreen = createTheme(tokens, {\n colors: {\n primary: lightColors.green9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('green'),\n ...getButtonSwitchLightColors('green'),\n ...getTableLightColors(lightColors.green9),\n ...getListLightFocusColors('green'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.deepBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('deepBlue'),\n ...getButtonSwitchLightColors('deepBlue'),\n ...getTableLightColors(lightColors.deepBlue9),\n ...getListLightFocusColors('deepBlue'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\nexport const lightThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: lightColors.grayBlue9, // Set primary to the actual color value\n ...lightSemanticColors,\n ...getButtonLightColors('grayBlue'),\n ...getButtonSwitchLightColors('grayBlue'),\n ...getTableLightColors(lightColors.grayBlue9),\n ...getListLightFocusColors('grayBlue'),\n ...createBaseColors(lightColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// DARK THEMES\n// ============================================================================\n\nconst darkSemanticColors = {\n contentBg: darkColors['00dp'],\n hiContrast: 'white',\n loContrast: darkColors.deepBlue2,\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(209, 29%, 19%)',\n background: '#0a0a0a',\n foreground: '#ffffff',\n muted: '#1a1a1a',\n mutedForeground: '#b4b4b4',\n card: '#1a1a1a',\n cardForeground: '#ffffff',\n popover: '#1a1a1a',\n popoverForeground: '#ffffff',\n border: '#3a3a3a',\n input: '#3a3a3a',\n accent: '#3b82f6',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#60a5fa',\n ...badgeDarkTheme,\n ...cardDarkTheme,\n ...codeBlockDarkTheme,\n ...panelDarkTheme,\n ...textDarkTheme,\n textInvalid: darkColors.red11,\n textRed: darkColors.red10,\n ...headingDarkTheme,\n ...iconButtonDarkTheme,\n ...inputDarkTheme,\n ...textareaDarkTheme,\n ...buttonDarkTheme,\n buttonPrimaryText: darkColors.deepBlue2,\n buttonRedText: 'white',\n buttonRedHoverText: darkColors.red10,\n ...buttonSwitchDarkTheme,\n buttonSwitchContainerBg: darkColors['02dp'],\n buttonSwitchOffColor: 'white',\n buttonSwitchActiveColor: darkColors.deepBlue2,\n iconButtonBackground: darkColors.deepBlue2,\n iconButtonHoverBorder: darkColors.deepBlue6,\n iconButtonHoverBackground: darkColors.slateA4,\n iconButtonFocusBorder: darkColors.deepBlue7,\n ...skeletonDarkTheme,\n ...segmentedControlDarkTheme,\n ...comboboxDarkTheme,\n ...toastDarkTheme,\n ...listDarkTheme,\n meterTrackBg: darkColors.grayA3,\n ...createToneColors(darkColors),\n ...chartDarkColors,\n ...tableDarkTheme,\n};\n\nexport const darkThemeBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.blue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('blue'),\n ...getButtonSwitchDarkColors('blue'),\n ...getTableDarkColors(darkColors.blue9),\n ...getListDarkFocusColors('blue'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeNeon = createTheme(tokens, {\n colors: {\n primary: darkColors.neon9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('neon'),\n ...getButtonSwitchDarkColors('neon'),\n ...getTableDarkColors(darkColors.neon9),\n ...getListDarkFocusColors('neon'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeOrange = createTheme(tokens, {\n colors: {\n primary: darkColors.orange9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('orange'),\n ...getButtonSwitchDarkColors('orange'),\n ...getTableDarkColors(darkColors.orange9),\n ...getListDarkFocusColors('orange'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeRed = createTheme(tokens, {\n colors: {\n primary: darkColors.red9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('red'),\n ...getButtonSwitchDarkColors('red'),\n ...getTableDarkColors(darkColors.red9),\n ...getListDarkFocusColors('red'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGreen = createTheme(tokens, {\n colors: {\n primary: darkColors.green9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('green'),\n ...getButtonSwitchDarkColors('green'),\n ...getTableDarkColors(darkColors.green9),\n ...getListDarkFocusColors('green'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeDeepBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.deepBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('deepBlue'),\n ...getButtonSwitchDarkColors('deepBlue'),\n ...getTableDarkColors(darkColors.deepBlue9),\n ...getListDarkFocusColors('deepBlue'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\nexport const darkThemeGrayBlue = createTheme(tokens, {\n colors: {\n primary: darkColors.grayBlue9, // Set primary to the actual color value\n ...darkSemanticColors,\n ...getButtonDarkColors('grayBlue'),\n ...getButtonSwitchDarkColors('grayBlue'),\n ...getTableDarkColors(darkColors.grayBlue9),\n ...getListDarkFocusColors('grayBlue'),\n ...createBaseColors(darkColors),\n },\n ...baseThemeValues,\n});\n\n// ============================================================================\n// THEME MAP FOR EASY LOOKUP\n// ============================================================================\n\nexport const themes = {\n light: {\n neon: lightThemeNeon,\n blue: lightThemeBlue,\n orange: lightThemeOrange,\n red: lightThemeRed,\n green: lightThemeGreen,\n deepBlue: lightThemeDeepBlue,\n grayBlue: lightThemeGrayBlue,\n },\n dark: {\n neon: darkThemeNeon,\n blue: darkThemeBlue,\n orange: darkThemeOrange,\n red: darkThemeRed,\n green: darkThemeGreen,\n deepBlue: darkThemeDeepBlue,\n grayBlue: darkThemeGrayBlue,\n },\n};\n\n// Default exports for backward compatibility\nexport const lightTheme = lightThemeBlue;\nexport const darkTheme = darkThemeBlue;\n"],"mappings":""}
|