@mbao01/common 0.7.0 → 0.7.2
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/types/components/Combobox/Combobox.d.ts +1 -1
- package/dist/types/components/Combobox/types.d.ts +3 -1
- package/dist/types/components/Flex/Flex.d.ts +1 -1
- package/dist/types/components/Flex/constants.d.ts +1 -1
- package/dist/types/components/Form/Select/Select.d.ts +2 -0
- package/dist/types/components/Form/Select/constants.d.ts +1 -0
- package/dist/types/components/Grid/Grid.d.ts +5 -5
- package/dist/types/components/Grid/constants.d.ts +5 -5
- package/dist/types/components/Skeleton/constants.d.ts +2 -2
- package/dist/types/components/Spacer/Spacer.d.ts +1 -1
- package/dist/types/components/Spacer/constants.d.ts +1 -1
- package/dist/types/components/Status/constants.d.ts +1 -1
- package/dist/types/utilities/theme.d.ts +1 -1
- package/package.json +6 -6
- package/src/components/Combobox/Combobox.tsx +14 -2
- package/src/components/Combobox/types.ts +5 -1
- package/src/components/Form/Select/Select.tsx +16 -4
- package/src/components/Form/Select/constants.ts +3 -0
- package/src/components/ThemeSwitch/ThemeSwitch.tsx +21 -0
- package/src/utilities/theme.ts +9 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ComboboxProps, Item } from './types';
|
|
2
|
-
export declare const Combobox: <T extends Item>({ label, items, classes, emptyText, placeholder, getItemValue, getItemLabel, onSelectItem, }: ComboboxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Combobox: <T extends Item>({ label, items, classes, emptyText, placeholder, outline, variant, disabled, readOnly, getItemValue, getItemLabel, onSelectItem, }: ComboboxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button/types';
|
|
2
|
+
import { InputProps } from '../Form/Input/types';
|
|
1
3
|
export type Item = Record<string, any>;
|
|
2
4
|
export type ComboboxProps<T extends Item> = {
|
|
3
5
|
label: string;
|
|
@@ -17,4 +19,4 @@ export type ComboboxProps<T extends Item> = {
|
|
|
17
19
|
item: string;
|
|
18
20
|
popoverContent: string;
|
|
19
21
|
}>;
|
|
20
|
-
}
|
|
22
|
+
} & Pick<ButtonProps, "variant" | "disabled" | "outline"> & Pick<InputProps, "readOnly">;
|
|
@@ -4,5 +4,5 @@ export declare const Flex: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
4
4
|
align?: "end" | "center" | "start" | "stretch" | "baseline" | undefined;
|
|
5
5
|
justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | undefined;
|
|
6
6
|
wrap?: "wrap" | "wrap-reverse" | "nowrap" | undefined;
|
|
7
|
-
gap?: 0 | 1 | 4 | 3 | 8 | 2 |
|
|
7
|
+
gap?: 0 | 1 | 4 | 3 | 8 | 2 | 12 | 16 | 5 | 6 | 10 | undefined;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,5 +3,5 @@ export declare const getFlexClasses: (props?: ({
|
|
|
3
3
|
align?: "end" | "center" | "start" | "stretch" | "baseline" | null | undefined;
|
|
4
4
|
justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | null | undefined;
|
|
5
5
|
wrap?: "wrap" | "wrap-reverse" | "nowrap" | null | undefined;
|
|
6
|
-
gap?: 0 | 1 | 4 | 3 | 8 | 2 |
|
|
6
|
+
gap?: 0 | 1 | 4 | 3 | 8 | 2 | 12 | 16 | 5 | 6 | 10 | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -9,6 +9,7 @@ declare const Select: {
|
|
|
9
9
|
outline?: boolean | undefined;
|
|
10
10
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
11
11
|
wide?: boolean | undefined;
|
|
12
|
+
readOnly?: boolean | undefined;
|
|
12
13
|
} & {
|
|
13
14
|
label?: React.ReactNode;
|
|
14
15
|
labelPosition?: "start" | "end" | "floating";
|
|
@@ -22,6 +23,7 @@ declare const Select: {
|
|
|
22
23
|
outline?: boolean | undefined;
|
|
23
24
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
24
25
|
wide?: boolean | undefined;
|
|
26
|
+
readOnly?: boolean | undefined;
|
|
25
27
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
26
28
|
Icon: React.ForwardRefExoticComponent<SelectPrimitive.SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
27
29
|
ItemText: React.ForwardRefExoticComponent<SelectPrimitive.SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -3,6 +3,7 @@ export declare const getSelectTriggerClasses: (props?: ({
|
|
|
3
3
|
wide?: boolean | null | undefined;
|
|
4
4
|
outline?: boolean | null | undefined;
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
readOnly?: boolean | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
8
|
export declare const getSelectItemClasses: (props?: ({
|
|
8
9
|
variant?: "accent" | "default" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export declare const Grid: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
gap?: 0 | 1 | 4 | 3 | 8 | 2 |
|
|
4
|
-
columns?: 1 | 4 | 3 | 8 | 2 | 5 | 6 | 10 |
|
|
5
|
-
rows?: 1 | 4 | 3 | 8 | 2 | 5 | 6 | 10 |
|
|
3
|
+
gap?: 0 | 1 | 4 | 3 | 8 | 2 | 12 | 16 | 5 | 6 | 10 | undefined;
|
|
4
|
+
columns?: 1 | 4 | 3 | 8 | 2 | 12 | 5 | 6 | 10 | 7 | 9 | 11 | undefined;
|
|
5
|
+
rows?: 1 | 4 | 3 | 8 | 2 | 12 | 5 | 6 | 10 | 7 | 9 | 11 | undefined;
|
|
6
6
|
flow?: "row" | "col" | "dense" | "row-dense" | "col-dense" | undefined;
|
|
7
7
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
export declare const GridItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
9
|
-
colSpan?: 1 | 4 | 3 | 8 | 2 | 5 | 6 | 10 |
|
|
10
|
-
rowSpan?: 1 | 4 | 3 | 2 | 5 | 6 |
|
|
9
|
+
colSpan?: 1 | 4 | 3 | 8 | "full" | 2 | 12 | 5 | 6 | 10 | 7 | 9 | 11 | undefined;
|
|
10
|
+
rowSpan?: 1 | 4 | 3 | "full" | 2 | 5 | 6 | undefined;
|
|
11
11
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const getGridClasses: (props?: ({
|
|
2
|
-
columns?: 1 | 4 | 3 | 8 | 2 | 5 | 6 | 10 |
|
|
3
|
-
rows?: 1 | 4 | 3 | 8 | 2 | 5 | 6 | 10 |
|
|
4
|
-
gap?: 0 | 1 | 4 | 3 | 8 | 2 |
|
|
2
|
+
columns?: 1 | 4 | 3 | 8 | 2 | 12 | 5 | 6 | 10 | 7 | 9 | 11 | null | undefined;
|
|
3
|
+
rows?: 1 | 4 | 3 | 8 | 2 | 12 | 5 | 6 | 10 | 7 | 9 | 11 | null | undefined;
|
|
4
|
+
gap?: 0 | 1 | 4 | 3 | 8 | 2 | 12 | 16 | 5 | 6 | 10 | null | undefined;
|
|
5
5
|
flow?: "row" | "col" | "dense" | "row-dense" | "col-dense" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export declare const getGridItemClasses: (props?: ({
|
|
8
|
-
colSpan?: 1 | 4 | 3 | 8 | 2 | 5 | 6 | 10 |
|
|
9
|
-
rowSpan?: 1 | 4 | 3 | 2 | 5 | 6 |
|
|
8
|
+
colSpan?: 1 | 4 | 3 | 8 | "full" | 2 | 12 | 5 | 6 | 10 | 7 | 9 | 11 | null | undefined;
|
|
9
|
+
rowSpan?: 1 | 4 | 3 | "full" | 2 | 5 | 6 | null | undefined;
|
|
10
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const getSkeletonClasses: (props?: ({
|
|
2
2
|
animate?: "pulse" | null | undefined;
|
|
3
|
-
width?: 4 | 8 | 2 | 12 | 16 |
|
|
4
|
-
height?: 4 | 8 | 2 | 12 | 16 |
|
|
3
|
+
width?: 4 | 8 | "full" | 2 | 12 | 16 | 24 | 32 | 48 | 64 | null | undefined;
|
|
4
|
+
height?: 4 | 8 | "full" | 2 | 12 | 16 | 24 | 32 | 48 | 64 | null | undefined;
|
|
5
5
|
round?: boolean | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export declare const Spacer: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
3
3
|
axis?: "horizontal" | "vertical" | undefined;
|
|
4
|
-
gap?: 1 | 4 | 3 | 8 | 2 |
|
|
4
|
+
gap?: 1 | 4 | 3 | 8 | 2 | 12 | 16 | 24 | 5 | 6 | 10 | 20 | undefined;
|
|
5
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getSpacerClasses: (props?: ({
|
|
2
2
|
axis?: "horizontal" | "vertical" | null | undefined;
|
|
3
|
-
gap?: 1 | 4 | 3 | 8 | 2 |
|
|
3
|
+
gap?: 1 | 4 | 3 | 8 | 2 | 12 | 16 | 24 | 5 | 6 | 10 | 20 | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const getStatusClasses: (props?: ({
|
|
2
2
|
variant?: "accent" | "default" | "error" | "ghost" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
3
3
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
4
|
-
animate?: "ping" | "
|
|
4
|
+
animate?: "ping" | "pulse" | "bounce" | "spin" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type Theme = "dark" | "light";
|
|
2
2
|
export declare const THEME_COOKIE_NAME = "data-theme";
|
|
3
3
|
export declare const getTheme: () => Theme | null;
|
|
4
|
-
export declare const saveTheme: (theme: Theme | null) =>
|
|
4
|
+
export declare const saveTheme: (theme: Theme | null) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
"@types/node": "^25.0.3",
|
|
132
132
|
"@types/react": "^19.2.7",
|
|
133
133
|
"@types/react-dom": "^19.2.3",
|
|
134
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
135
|
-
"@typescript-eslint/parser": "^8.
|
|
134
|
+
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
135
|
+
"@typescript-eslint/parser": "^8.52.0",
|
|
136
136
|
"@vitejs/plugin-react": "^5.1.2",
|
|
137
137
|
"@vitest/coverage-v8": "^3.2.4",
|
|
138
138
|
"@vitest/ui": "^3.2.4",
|
|
@@ -151,12 +151,12 @@
|
|
|
151
151
|
"prettier": "^3.7.4",
|
|
152
152
|
"react": "^19.2.3",
|
|
153
153
|
"react-dom": "^19.2.3",
|
|
154
|
-
"react-router-dom": "^7.
|
|
154
|
+
"react-router-dom": "^7.12.0",
|
|
155
155
|
"recharts": "^3.6.0",
|
|
156
156
|
"storybook": "^10.1.11",
|
|
157
157
|
"tailwindcss": "^4.1.18",
|
|
158
158
|
"typescript": "^5.9.3",
|
|
159
|
-
"typescript-eslint": "^8.
|
|
159
|
+
"typescript-eslint": "^8.52.0",
|
|
160
160
|
"vite": "^6.4.1",
|
|
161
161
|
"vite-plugin-dts": "^4.5.4",
|
|
162
162
|
"vitest": "^3.2.4"
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"recharts": "2",
|
|
169
169
|
"typescript": "5"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "605c1bb5b1367d8755951d5c5425ca86bcd5dd96"
|
|
172
172
|
}
|
|
@@ -14,6 +14,10 @@ export const Combobox = <T extends Item>({
|
|
|
14
14
|
classes,
|
|
15
15
|
emptyText,
|
|
16
16
|
placeholder,
|
|
17
|
+
outline,
|
|
18
|
+
variant,
|
|
19
|
+
disabled,
|
|
20
|
+
readOnly,
|
|
17
21
|
getItemValue = (item: T) => item.value as string,
|
|
18
22
|
getItemLabel = (item: T) => item.label as string,
|
|
19
23
|
onSelectItem,
|
|
@@ -27,9 +31,11 @@ export const Combobox = <T extends Item>({
|
|
|
27
31
|
<Popover open={open} onOpenChange={setOpen}>
|
|
28
32
|
<Popover.Trigger asChild>
|
|
29
33
|
<Button
|
|
30
|
-
outline
|
|
34
|
+
outline={outline}
|
|
31
35
|
role="combobox"
|
|
36
|
+
variant={variant}
|
|
32
37
|
aria-expanded={open}
|
|
38
|
+
disabled={disabled}
|
|
33
39
|
className={cn("justify-between", classes?.trigger)}
|
|
34
40
|
>
|
|
35
41
|
{value && currentItem ? getItemLabel(currentItem) : label}
|
|
@@ -38,12 +44,18 @@ export const Combobox = <T extends Item>({
|
|
|
38
44
|
</Popover.Trigger>
|
|
39
45
|
<Popover.Content className={cn("w-[200px] p-0", classes?.popoverContent)}>
|
|
40
46
|
<Command className={cn(classes?.content)}>
|
|
41
|
-
<Command.Input
|
|
47
|
+
<Command.Input
|
|
48
|
+
placeholder={placeholder}
|
|
49
|
+
disabled={disabled}
|
|
50
|
+
readOnly={readOnly}
|
|
51
|
+
className={cn(classes?.input)}
|
|
52
|
+
/>
|
|
42
53
|
<Command.Empty className={cn(classes?.empty)}>{emptyText}</Command.Empty>
|
|
43
54
|
<Command.List>
|
|
44
55
|
<Command.Group className={cn(classes?.group)}>
|
|
45
56
|
{items?.map((item) => (
|
|
46
57
|
<Command.Item
|
|
58
|
+
disabled={disabled}
|
|
47
59
|
key={getItemValue(item)}
|
|
48
60
|
value={getItemValue(item)}
|
|
49
61
|
onSelect={(currentValue) => {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ButtonProps } from "../Button/types";
|
|
2
|
+
import { InputProps } from "../Form/Input/types";
|
|
3
|
+
|
|
1
4
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
5
|
export type Item = Record<string, any>;
|
|
3
6
|
|
|
@@ -19,4 +22,5 @@ export type ComboboxProps<T extends Item> = {
|
|
|
19
22
|
item: string;
|
|
20
23
|
popoverContent: string;
|
|
21
24
|
}>;
|
|
22
|
-
}
|
|
25
|
+
} & Pick<ButtonProps, "variant" | "disabled" | "outline"> &
|
|
26
|
+
Pick<InputProps, "readOnly">;
|
|
@@ -55,6 +55,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
55
55
|
wide,
|
|
56
56
|
variant,
|
|
57
57
|
outline,
|
|
58
|
+
readOnly,
|
|
58
59
|
...props
|
|
59
60
|
},
|
|
60
61
|
ref
|
|
@@ -67,7 +68,11 @@ const SelectTrigger = React.forwardRef<
|
|
|
67
68
|
<SelectPrimitive.Trigger
|
|
68
69
|
id={id}
|
|
69
70
|
ref={ref}
|
|
70
|
-
|
|
71
|
+
aria-readonly={readOnly}
|
|
72
|
+
className={cn(
|
|
73
|
+
getSelectTriggerClasses({ size, wide, variant, outline, readOnly }),
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
71
76
|
{...props}
|
|
72
77
|
>
|
|
73
78
|
{children}
|
|
@@ -79,10 +84,13 @@ const SelectTrigger = React.forwardRef<
|
|
|
79
84
|
return (
|
|
80
85
|
<label
|
|
81
86
|
htmlFor={id}
|
|
82
|
-
className={cn(
|
|
87
|
+
className={cn(
|
|
88
|
+
getSelectTriggerClasses({ size, wide, variant, outline, readOnly }),
|
|
89
|
+
className
|
|
90
|
+
)}
|
|
83
91
|
>
|
|
84
92
|
{labelPosition === "start" && <LabelForSelect>{label}</LabelForSelect>}
|
|
85
|
-
<SelectPrimitive.Trigger id={id} ref={ref} {...props}>
|
|
93
|
+
<SelectPrimitive.Trigger id={id} ref={ref} aria-readonly={readOnly} {...props}>
|
|
86
94
|
{children}
|
|
87
95
|
</SelectPrimitive.Trigger>
|
|
88
96
|
{labelPosition === "end" && <LabelForSelect className="me-0!">{label}</LabelForSelect>}
|
|
@@ -94,7 +102,11 @@ const SelectTrigger = React.forwardRef<
|
|
|
94
102
|
<SelectPrimitive.Trigger
|
|
95
103
|
id={id}
|
|
96
104
|
ref={ref}
|
|
97
|
-
|
|
105
|
+
aria-readonly={readOnly}
|
|
106
|
+
className={cn(
|
|
107
|
+
getSelectTriggerClasses({ size, wide, variant, outline, readOnly }),
|
|
108
|
+
className
|
|
109
|
+
)}
|
|
98
110
|
{...props}
|
|
99
111
|
>
|
|
100
112
|
{children}
|
|
@@ -4,6 +4,7 @@ import { useLayoutEffect, useState } from "react";
|
|
|
4
4
|
import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react";
|
|
5
5
|
import type { SwitchProps, ThemeSwitchProps } from "./types";
|
|
6
6
|
import { cn, getTheme, saveTheme, Theme } from "../../utilities";
|
|
7
|
+
import { Skeleton } from "../Skeleton";
|
|
7
8
|
import { getThemeSwitchClasses, getThemeSwitchIconClasses } from "./constants";
|
|
8
9
|
|
|
9
10
|
const Switcher = ({ id, icon, swap, value, label, theme, changeTheme, className }: SwitchProps) => {
|
|
@@ -38,12 +39,32 @@ export const ThemeSwitch = ({
|
|
|
38
39
|
className,
|
|
39
40
|
theme: defaultTheme,
|
|
40
41
|
}: ThemeSwitchProps) => {
|
|
42
|
+
const [isClient, setIsClient] = useState(false);
|
|
41
43
|
const [theme, setTheme] = useState(() => defaultTheme ?? getTheme());
|
|
42
44
|
|
|
43
45
|
useLayoutEffect(() => {
|
|
44
46
|
saveTheme(theme);
|
|
45
47
|
}, [theme]);
|
|
46
48
|
|
|
49
|
+
useLayoutEffect(() => {
|
|
50
|
+
setIsClient(true);
|
|
51
|
+
const observer = new MutationObserver(() => {
|
|
52
|
+
const attr = document.body.getAttribute("data-theme");
|
|
53
|
+
if (attr === "dark" || attr === "light") {
|
|
54
|
+
setTheme(attr);
|
|
55
|
+
} else {
|
|
56
|
+
setTheme(null);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
observer.observe(document.body, { attributes: true, attributeFilter: ["data-theme"] });
|
|
60
|
+
|
|
61
|
+
return () => observer.disconnect();
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
if (!isClient) {
|
|
65
|
+
return <Skeleton width={swap ? 4 : 16} />;
|
|
66
|
+
}
|
|
67
|
+
|
|
47
68
|
if (render) {
|
|
48
69
|
return render({ theme, setTheme });
|
|
49
70
|
}
|
package/src/utilities/theme.ts
CHANGED
|
@@ -20,10 +20,14 @@ export const getTheme = () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const saveTheme = (theme: Theme | null) => {
|
|
23
|
-
const newTheme = theme ?? getSystemTheme();
|
|
24
|
-
if (!newTheme) return null;
|
|
25
|
-
|
|
26
23
|
const cookies = new Cookies();
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
|
|
25
|
+
if (!theme) {
|
|
26
|
+
cookies.remove(THEME_COOKIE_NAME);
|
|
27
|
+
document.body.removeAttribute(THEME_COOKIE_NAME);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
cookies.set(THEME_COOKIE_NAME, theme, { path: "/", secure: true });
|
|
32
|
+
document.body.setAttribute(THEME_COOKIE_NAME, theme);
|
|
29
33
|
};
|