@yakad/ui 2.0.0 → 2.0.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/Input/Input.d.ts +11 -0
- package/dist/Input/Input.js +37 -0
- package/dist/Label/Label.d.ts +8 -0
- package/dist/{Spacer/Spacer.js → Label/Label.js} +9 -6
- package/dist/Separator/Separator.d.ts +9 -0
- package/dist/Separator/Separator.js +24 -0
- package/dist/Theme/color/generator.d.ts +1 -0
- package/dist/Theme/color/generator.js +22 -0
- package/dist/Theme/color/hct.d.ts +5 -0
- package/dist/Theme/color/hct.js +6 -0
- package/dist/Theme/color/index.d.ts +0 -0
- package/dist/Theme/color/index.js +1 -0
- package/dist/Theme/color/palettes.d.ts +0 -0
- package/dist/Theme/color/palettes.js +1 -0
- package/dist/Theme/color/roles.d.ts +53 -0
- package/dist/Theme/color/roles.js +57 -0
- package/dist/Theme/color/scheme.d.ts +3 -0
- package/dist/Theme/color/scheme.js +4 -0
- package/dist/Theme/color/source.d.ts +1 -0
- package/dist/Theme/color/source.js +1 -0
- package/dist/Theme/color/test.d.ts +1 -0
- package/dist/Theme/color/test.js +14 -0
- package/dist/Theme/color/tokens.d.ts +52 -0
- package/dist/Theme/color/tokens.js +53 -0
- package/dist/Theme/color/utils.d.ts +1 -0
- package/dist/Theme/color/utils.js +7 -0
- package/dist/Theme/index.d.ts +0 -0
- package/dist/Theme/index.js +1 -0
- package/dist/Theme/theme.d.ts +0 -0
- package/dist/Theme/theme.js +1 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.js +3 -7
- package/dist/theme/color/colors.css +103 -0
- package/package.json +7 -3
- package/dist/Dropdown/Dropdown.d.ts +0 -8
- package/dist/Dropdown/Dropdown.js +0 -99
- package/dist/Dropdown/Dropdown.module.css +0 -39
- package/dist/InputField/InputField.d.ts +0 -15
- package/dist/InputField/InputField.js +0 -82
- package/dist/InputField/cn.d.ts +0 -2
- package/dist/InputField/cn.js +0 -5
- package/dist/InputField/input.d.ts +0 -7
- package/dist/InputField/input.js +0 -18
- package/dist/Popup/Popup.d.ts +0 -8
- package/dist/Popup/Popup.js +0 -40
- package/dist/Popup/Popup.module.css +0 -15
- package/dist/Select/Select.d.ts +0 -12
- package/dist/Select/Select.js +0 -23
- package/dist/Select/Select.module.css +0 -3
- package/dist/Spacer/Spacer.d.ts +0 -5
- package/dist/Spacer/Spacer.module.css +0 -5
- package/dist/Theme/Theme.d.ts +0 -12
- package/dist/Theme/Theme.js +0 -26
- package/dist/Theme/Theme.module.css +0 -398
- package/dist/Theme/globals.css +0 -12
- package/dist/WithOverlay/WithOverlay.d.ts +0 -15
- package/dist/WithOverlay/WithOverlay.js +0 -40
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const inputVariants: (props?: ({
|
|
4
|
+
variant?: "filled" | "outlined" | null | undefined;
|
|
5
|
+
boxSize?: "small" | "normal" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
8
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
9
|
+
}
|
|
10
|
+
export declare function Input({ variant, boxSize, className, ref, ...restProps }: InputProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { cva } from "class-variance-authority";
|
|
14
|
+
const inputVariants = cva("flex w-full rounded-md border bg-transparent px-3 text-sm shadow-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50", {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
outlined: "border-input focus-visible:border-ring focus-visible:ring-ring",
|
|
18
|
+
filled: "border-transparent bg-muted focus-visible:ring-ring",
|
|
19
|
+
},
|
|
20
|
+
boxSize: {
|
|
21
|
+
small: "h-8",
|
|
22
|
+
normal: "h-10",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "outlined",
|
|
27
|
+
boxSize: "normal",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export function Input(_a) {
|
|
31
|
+
var { variant, boxSize, className, ref } = _a, restProps = __rest(_a, ["variant", "boxSize", "className", "ref"]);
|
|
32
|
+
return (_jsx("input", Object.assign({ ref: ref, className: inputVariants({
|
|
33
|
+
variant,
|
|
34
|
+
boxSize,
|
|
35
|
+
className,
|
|
36
|
+
}) }, restProps)));
|
|
37
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const labelVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
5
|
+
interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof labelVariants> {
|
|
6
|
+
}
|
|
7
|
+
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
8
|
+
export { Label, labelVariants };
|
|
@@ -10,10 +10,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
13
|
+
import React from "react";
|
|
14
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
15
|
+
import { cva } from "class-variance-authority";
|
|
16
|
+
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
17
|
+
const Label = React.forwardRef((_a, ref) => {
|
|
16
18
|
var { className } = _a, restProps = __rest(_a, ["className"]);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
return (_jsx(LabelPrimitive.Root, Object.assign({ ref: ref, className: labelVariants({ className }) }, restProps)));
|
|
20
|
+
});
|
|
21
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
22
|
+
export { Label, labelVariants };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const separatorVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
5
|
+
export interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>, VariantProps<typeof separatorVariants> {
|
|
6
|
+
ref?: React.Ref<React.ElementRef<typeof SeparatorPrimitive.Root>>;
|
|
7
|
+
}
|
|
8
|
+
export declare function Separator({ orientation, decorative, className, ref, ...restProps }: SeparatorProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
14
|
+
import { cva } from "class-variance-authority";
|
|
15
|
+
const separatorVariants = cva("shrink-0 bg-border");
|
|
16
|
+
export function Separator(_a) {
|
|
17
|
+
var { orientation = "horizontal", decorative = true, className, ref } = _a, restProps = __rest(_a, ["orientation", "decorative", "className", "ref"]);
|
|
18
|
+
return (_jsx(SeparatorPrimitive.Root, Object.assign({ ref: ref, orientation: orientation, decorative: decorative, className: separatorVariants({
|
|
19
|
+
className: [
|
|
20
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
21
|
+
className,
|
|
22
|
+
],
|
|
23
|
+
}) }, restProps)));
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { writeFileSync, mkdirSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { createColorTokens } from "./tokens";
|
|
4
|
+
import { darkColorRoles, lightColorRoles } from "./roles";
|
|
5
|
+
function createCssVariables(tokens) {
|
|
6
|
+
return Object.entries(tokens)
|
|
7
|
+
.map(([name, value]) => ` --md-sys-color-${name}: ${value};`)
|
|
8
|
+
.join("\n");
|
|
9
|
+
}
|
|
10
|
+
const lightTokens = createColorTokens(lightColorRoles);
|
|
11
|
+
const darkTokens = createColorTokens(darkColorRoles);
|
|
12
|
+
const css = `:root {
|
|
13
|
+
${createCssVariables(lightTokens)}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dark {
|
|
17
|
+
${createCssVariables(darkTokens)}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const output = resolve(process.cwd(), "dist/theme/color/colors.css");
|
|
21
|
+
mkdirSync(dirname(output), { recursive: true });
|
|
22
|
+
writeFileSync(output, css);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { argbFromHex, Hct } from "@material/material-color-utilities";
|
|
2
|
+
import { sourceColor } from "./source";
|
|
3
|
+
export const sourceHct = Hct.fromInt(argbFromHex(sourceColor));
|
|
4
|
+
export const hue = sourceHct.hue;
|
|
5
|
+
export const chroma = sourceHct.chroma;
|
|
6
|
+
export const tone = sourceHct.tone;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface ColorRoles {
|
|
2
|
+
primary: string;
|
|
3
|
+
onPrimary: string;
|
|
4
|
+
primaryContainer: string;
|
|
5
|
+
onPrimaryContainer: string;
|
|
6
|
+
primaryFixed: string;
|
|
7
|
+
primaryFixedDim: string;
|
|
8
|
+
onPrimaryFixed: string;
|
|
9
|
+
onPrimaryFixedVariant: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
onSecondary: string;
|
|
12
|
+
secondaryContainer: string;
|
|
13
|
+
onSecondaryContainer: string;
|
|
14
|
+
secondaryFixed: string;
|
|
15
|
+
secondaryFixedDim: string;
|
|
16
|
+
onSecondaryFixed: string;
|
|
17
|
+
onSecondaryFixedVariant: string;
|
|
18
|
+
tertiary: string;
|
|
19
|
+
onTertiary: string;
|
|
20
|
+
tertiaryContainer: string;
|
|
21
|
+
onTertiaryContainer: string;
|
|
22
|
+
tertiaryFixed: string;
|
|
23
|
+
tertiaryFixedDim: string;
|
|
24
|
+
onTertiaryFixed: string;
|
|
25
|
+
onTertiaryFixedVariant: string;
|
|
26
|
+
error: string;
|
|
27
|
+
onError: string;
|
|
28
|
+
errorContainer: string;
|
|
29
|
+
onErrorContainer: string;
|
|
30
|
+
background: string;
|
|
31
|
+
onBackground: string;
|
|
32
|
+
surface: string;
|
|
33
|
+
onSurface: string;
|
|
34
|
+
surfaceVariant: string;
|
|
35
|
+
onSurfaceVariant: string;
|
|
36
|
+
surfaceDim: string;
|
|
37
|
+
surfaceBright: string;
|
|
38
|
+
surfaceContainerLowest: string;
|
|
39
|
+
surfaceContainerLow: string;
|
|
40
|
+
surfaceContainer: string;
|
|
41
|
+
surfaceContainerHigh: string;
|
|
42
|
+
surfaceContainerHighest: string;
|
|
43
|
+
outline: string;
|
|
44
|
+
outlineVariant: string;
|
|
45
|
+
inverseSurface: string;
|
|
46
|
+
inverseOnSurface: string;
|
|
47
|
+
inversePrimary: string;
|
|
48
|
+
surfaceTint: string;
|
|
49
|
+
shadow: string;
|
|
50
|
+
scrim: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const lightColorRoles: ColorRoles;
|
|
53
|
+
export declare const darkColorRoles: ColorRoles;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { hexFromArgb } from "@material/material-color-utilities";
|
|
2
|
+
import { darkScheme, lightScheme } from "./scheme";
|
|
3
|
+
function getColorRoles(scheme) {
|
|
4
|
+
return {
|
|
5
|
+
primary: hexFromArgb(scheme.primary),
|
|
6
|
+
onPrimary: hexFromArgb(scheme.onPrimary),
|
|
7
|
+
primaryContainer: hexFromArgb(scheme.primaryContainer),
|
|
8
|
+
onPrimaryContainer: hexFromArgb(scheme.onPrimaryContainer),
|
|
9
|
+
primaryFixed: hexFromArgb(scheme.primaryFixed),
|
|
10
|
+
primaryFixedDim: hexFromArgb(scheme.primaryFixedDim),
|
|
11
|
+
onPrimaryFixed: hexFromArgb(scheme.onPrimaryFixed),
|
|
12
|
+
onPrimaryFixedVariant: hexFromArgb(scheme.onPrimaryFixedVariant),
|
|
13
|
+
secondary: hexFromArgb(scheme.secondary),
|
|
14
|
+
onSecondary: hexFromArgb(scheme.onSecondary),
|
|
15
|
+
secondaryContainer: hexFromArgb(scheme.secondaryContainer),
|
|
16
|
+
onSecondaryContainer: hexFromArgb(scheme.onSecondaryContainer),
|
|
17
|
+
secondaryFixed: hexFromArgb(scheme.secondaryFixed),
|
|
18
|
+
secondaryFixedDim: hexFromArgb(scheme.secondaryFixedDim),
|
|
19
|
+
onSecondaryFixed: hexFromArgb(scheme.onSecondaryFixed),
|
|
20
|
+
onSecondaryFixedVariant: hexFromArgb(scheme.onSecondaryFixedVariant),
|
|
21
|
+
tertiary: hexFromArgb(scheme.tertiary),
|
|
22
|
+
onTertiary: hexFromArgb(scheme.onTertiary),
|
|
23
|
+
tertiaryContainer: hexFromArgb(scheme.tertiaryContainer),
|
|
24
|
+
onTertiaryContainer: hexFromArgb(scheme.onTertiaryContainer),
|
|
25
|
+
tertiaryFixed: hexFromArgb(scheme.tertiaryFixed),
|
|
26
|
+
tertiaryFixedDim: hexFromArgb(scheme.tertiaryFixedDim),
|
|
27
|
+
onTertiaryFixed: hexFromArgb(scheme.onTertiaryFixed),
|
|
28
|
+
onTertiaryFixedVariant: hexFromArgb(scheme.onTertiaryFixedVariant),
|
|
29
|
+
error: hexFromArgb(scheme.error),
|
|
30
|
+
onError: hexFromArgb(scheme.onError),
|
|
31
|
+
errorContainer: hexFromArgb(scheme.errorContainer),
|
|
32
|
+
onErrorContainer: hexFromArgb(scheme.onErrorContainer),
|
|
33
|
+
background: hexFromArgb(scheme.background),
|
|
34
|
+
onBackground: hexFromArgb(scheme.onBackground),
|
|
35
|
+
surface: hexFromArgb(scheme.surface),
|
|
36
|
+
onSurface: hexFromArgb(scheme.onSurface),
|
|
37
|
+
surfaceVariant: hexFromArgb(scheme.surfaceVariant),
|
|
38
|
+
onSurfaceVariant: hexFromArgb(scheme.onSurfaceVariant),
|
|
39
|
+
surfaceDim: hexFromArgb(scheme.surfaceDim),
|
|
40
|
+
surfaceBright: hexFromArgb(scheme.surfaceBright),
|
|
41
|
+
surfaceContainerLowest: hexFromArgb(scheme.surfaceContainerLowest),
|
|
42
|
+
surfaceContainerLow: hexFromArgb(scheme.surfaceContainerLow),
|
|
43
|
+
surfaceContainer: hexFromArgb(scheme.surfaceContainer),
|
|
44
|
+
surfaceContainerHigh: hexFromArgb(scheme.surfaceContainerHigh),
|
|
45
|
+
surfaceContainerHighest: hexFromArgb(scheme.surfaceContainerHighest),
|
|
46
|
+
outline: hexFromArgb(scheme.outline),
|
|
47
|
+
outlineVariant: hexFromArgb(scheme.outlineVariant),
|
|
48
|
+
inverseSurface: hexFromArgb(scheme.inverseSurface),
|
|
49
|
+
inverseOnSurface: hexFromArgb(scheme.inverseOnSurface),
|
|
50
|
+
inversePrimary: hexFromArgb(scheme.inversePrimary),
|
|
51
|
+
surfaceTint: hexFromArgb(scheme.surfaceTint),
|
|
52
|
+
shadow: hexFromArgb(scheme.shadow),
|
|
53
|
+
scrim: hexFromArgb(scheme.scrim),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export const lightColorRoles = getColorRoles(lightScheme);
|
|
57
|
+
export const darkColorRoles = getColorRoles(darkScheme);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sourceColor = "#6750A4";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const sourceColor = "#6750A4";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { hexFromArgb } from "@material/material-color-utilities";
|
|
2
|
+
import { lightScheme, darkScheme } from "./scheme";
|
|
3
|
+
console.log("Light");
|
|
4
|
+
console.log("Primary:", hexFromArgb(lightScheme.primary));
|
|
5
|
+
console.log("Secondary:", hexFromArgb(lightScheme.secondary));
|
|
6
|
+
console.log("Tertiary:", hexFromArgb(lightScheme.tertiary));
|
|
7
|
+
console.log("Background:", hexFromArgb(lightScheme.background));
|
|
8
|
+
console.log("Surface:", hexFromArgb(lightScheme.surface));
|
|
9
|
+
console.log("Dark");
|
|
10
|
+
console.log("Primary:", hexFromArgb(darkScheme.primary));
|
|
11
|
+
console.log("Secondary:", hexFromArgb(darkScheme.secondary));
|
|
12
|
+
console.log("Tertiary:", hexFromArgb(darkScheme.tertiary));
|
|
13
|
+
console.log("Background:", hexFromArgb(darkScheme.background));
|
|
14
|
+
console.log("Surface:", hexFromArgb(darkScheme.surface));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ColorRoles } from "./roles";
|
|
2
|
+
export declare function createColorTokens(roles: ColorRoles): {
|
|
3
|
+
primary: string;
|
|
4
|
+
"on-primary": string;
|
|
5
|
+
"primary-container": string;
|
|
6
|
+
"on-primary-container": string;
|
|
7
|
+
"primary-fixed": string;
|
|
8
|
+
"primary-fixed-dim": string;
|
|
9
|
+
"on-primary-fixed": string;
|
|
10
|
+
"on-primary-fixed-variant": string;
|
|
11
|
+
secondary: string;
|
|
12
|
+
"on-secondary": string;
|
|
13
|
+
"secondary-container": string;
|
|
14
|
+
"on-secondary-container": string;
|
|
15
|
+
"secondary-fixed": string;
|
|
16
|
+
"secondary-fixed-dim": string;
|
|
17
|
+
"on-secondary-fixed": string;
|
|
18
|
+
"on-secondary-fixed-variant": string;
|
|
19
|
+
tertiary: string;
|
|
20
|
+
"on-tertiary": string;
|
|
21
|
+
"tertiary-container": string;
|
|
22
|
+
"on-tertiary-container": string;
|
|
23
|
+
"tertiary-fixed": string;
|
|
24
|
+
"tertiary-fixed-dim": string;
|
|
25
|
+
"on-tertiary-fixed": string;
|
|
26
|
+
"on-tertiary-fixed-variant": string;
|
|
27
|
+
error: string;
|
|
28
|
+
"on-error": string;
|
|
29
|
+
"error-container": string;
|
|
30
|
+
"on-error-container": string;
|
|
31
|
+
background: string;
|
|
32
|
+
"on-background": string;
|
|
33
|
+
surface: string;
|
|
34
|
+
"on-surface": string;
|
|
35
|
+
"surface-variant": string;
|
|
36
|
+
"on-surface-variant": string;
|
|
37
|
+
"surface-dim": string;
|
|
38
|
+
"surface-bright": string;
|
|
39
|
+
"surface-container-lowest": string;
|
|
40
|
+
"surface-container-low": string;
|
|
41
|
+
"surface-container": string;
|
|
42
|
+
"surface-container-high": string;
|
|
43
|
+
"surface-container-highest": string;
|
|
44
|
+
outline: string;
|
|
45
|
+
"outline-variant": string;
|
|
46
|
+
"inverse-surface": string;
|
|
47
|
+
"inverse-on-surface": string;
|
|
48
|
+
"inverse-primary": string;
|
|
49
|
+
"surface-tint": string;
|
|
50
|
+
shadow: string;
|
|
51
|
+
scrim: string;
|
|
52
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export function createColorTokens(roles) {
|
|
2
|
+
return {
|
|
3
|
+
"primary": roles.primary,
|
|
4
|
+
"on-primary": roles.onPrimary,
|
|
5
|
+
"primary-container": roles.primaryContainer,
|
|
6
|
+
"on-primary-container": roles.onPrimaryContainer,
|
|
7
|
+
"primary-fixed": roles.primaryFixed,
|
|
8
|
+
"primary-fixed-dim": roles.primaryFixedDim,
|
|
9
|
+
"on-primary-fixed": roles.onPrimaryFixed,
|
|
10
|
+
"on-primary-fixed-variant": roles.onPrimaryFixedVariant,
|
|
11
|
+
"secondary": roles.secondary,
|
|
12
|
+
"on-secondary": roles.onSecondary,
|
|
13
|
+
"secondary-container": roles.secondaryContainer,
|
|
14
|
+
"on-secondary-container": roles.onSecondaryContainer,
|
|
15
|
+
"secondary-fixed": roles.secondaryFixed,
|
|
16
|
+
"secondary-fixed-dim": roles.secondaryFixedDim,
|
|
17
|
+
"on-secondary-fixed": roles.onSecondaryFixed,
|
|
18
|
+
"on-secondary-fixed-variant": roles.onSecondaryFixedVariant,
|
|
19
|
+
"tertiary": roles.tertiary,
|
|
20
|
+
"on-tertiary": roles.onTertiary,
|
|
21
|
+
"tertiary-container": roles.tertiaryContainer,
|
|
22
|
+
"on-tertiary-container": roles.onTertiaryContainer,
|
|
23
|
+
"tertiary-fixed": roles.tertiaryFixed,
|
|
24
|
+
"tertiary-fixed-dim": roles.tertiaryFixedDim,
|
|
25
|
+
"on-tertiary-fixed": roles.onTertiaryFixed,
|
|
26
|
+
"on-tertiary-fixed-variant": roles.onTertiaryFixedVariant,
|
|
27
|
+
"error": roles.error,
|
|
28
|
+
"on-error": roles.onError,
|
|
29
|
+
"error-container": roles.errorContainer,
|
|
30
|
+
"on-error-container": roles.onErrorContainer,
|
|
31
|
+
"background": roles.background,
|
|
32
|
+
"on-background": roles.onBackground,
|
|
33
|
+
"surface": roles.surface,
|
|
34
|
+
"on-surface": roles.onSurface,
|
|
35
|
+
"surface-variant": roles.surfaceVariant,
|
|
36
|
+
"on-surface-variant": roles.onSurfaceVariant,
|
|
37
|
+
"surface-dim": roles.surfaceDim,
|
|
38
|
+
"surface-bright": roles.surfaceBright,
|
|
39
|
+
"surface-container-lowest": roles.surfaceContainerLowest,
|
|
40
|
+
"surface-container-low": roles.surfaceContainerLow,
|
|
41
|
+
"surface-container": roles.surfaceContainer,
|
|
42
|
+
"surface-container-high": roles.surfaceContainerHigh,
|
|
43
|
+
"surface-container-highest": roles.surfaceContainerHighest,
|
|
44
|
+
"outline": roles.outline,
|
|
45
|
+
"outline-variant": roles.outlineVariant,
|
|
46
|
+
"inverse-surface": roles.inverseSurface,
|
|
47
|
+
"inverse-on-surface": roles.inverseOnSurface,
|
|
48
|
+
"inverse-primary": roles.inversePrimary,
|
|
49
|
+
"surface-tint": roles.surfaceTint,
|
|
50
|
+
"shadow": roles.shadow,
|
|
51
|
+
"scrim": roles.scrim,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hexToArgb(hex: string): number;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ export * from "./Stack/Stack";
|
|
|
9
9
|
export * from "./GridContainer/GridContainer";
|
|
10
10
|
export * from "./GridItem/GridItem";
|
|
11
11
|
export * from "./Card/Card";
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./Spacer/Spacer";
|
|
12
|
+
export * from "./Separator/Separator";
|
|
14
13
|
export * from "./Hr/Hr";
|
|
15
14
|
export * from "./List/List";
|
|
16
15
|
export * from "./ListItem/ListItem";
|
|
@@ -18,18 +17,15 @@ export * from "./Table/Table";
|
|
|
18
17
|
export * from "./Button/Button";
|
|
19
18
|
export * from "./SvgIcon/SvgIcon";
|
|
20
19
|
export * from "./Text/Text";
|
|
20
|
+
export * from "./Label/Label";
|
|
21
21
|
export * from "./Form/Form";
|
|
22
|
-
export * from "./
|
|
23
|
-
export * from "./Select/Select";
|
|
22
|
+
export * from "./Input/Input";
|
|
24
23
|
export * from "./CheckBox/CheckBox";
|
|
25
24
|
export * from "./CodeField/CodeField";
|
|
26
25
|
export * from "./RadioGroup/RadioGroup";
|
|
27
26
|
export * from "./RadioButton/RadioButton";
|
|
28
27
|
export * from "./CodeBox/CodeBox";
|
|
29
28
|
export * from "./Display/Display";
|
|
30
|
-
export * from "./WithOverlay/WithOverlay";
|
|
31
29
|
export * from "./RenderByScroll/RenderByScroll";
|
|
32
30
|
export * from "./ActiveOnVisible/ActiveOnVisible";
|
|
33
|
-
export * from "./Dropdown/Dropdown";
|
|
34
|
-
export * from "./Popup/Popup";
|
|
35
31
|
export * from "./Avatar/Avatar";
|
package/dist/index.js
CHANGED
|
@@ -11,8 +11,7 @@ export * from "./GridContainer/GridContainer";
|
|
|
11
11
|
export * from "./GridItem/GridItem";
|
|
12
12
|
export * from "./Card/Card"; // Stack Based
|
|
13
13
|
// Theme & Styling
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./Spacer/Spacer";
|
|
14
|
+
export * from "./Separator/Separator";
|
|
16
15
|
export * from "./Hr/Hr";
|
|
17
16
|
// UI Components
|
|
18
17
|
export * from "./List/List";
|
|
@@ -21,10 +20,10 @@ export * from "./Table/Table";
|
|
|
21
20
|
export * from "./Button/Button";
|
|
22
21
|
export * from "./SvgIcon/SvgIcon";
|
|
23
22
|
export * from "./Text/Text";
|
|
23
|
+
export * from "./Label/Label";
|
|
24
24
|
// Form Components
|
|
25
25
|
export * from "./Form/Form";
|
|
26
|
-
export * from "./
|
|
27
|
-
export * from "./Select/Select";
|
|
26
|
+
export * from "./Input/Input";
|
|
28
27
|
export * from "./CheckBox/CheckBox";
|
|
29
28
|
export * from "./CodeField/CodeField";
|
|
30
29
|
export * from "./RadioGroup/RadioGroup";
|
|
@@ -32,10 +31,7 @@ export * from "./RadioButton/RadioButton";
|
|
|
32
31
|
export * from "./CodeBox/CodeBox";
|
|
33
32
|
// Utilities
|
|
34
33
|
export * from "./Display/Display"; // Stack Based
|
|
35
|
-
export * from "./WithOverlay/WithOverlay";
|
|
36
34
|
export * from "./RenderByScroll/RenderByScroll"; // Stack Based
|
|
37
35
|
export * from "./ActiveOnVisible/ActiveOnVisible"; // Stack Based
|
|
38
36
|
// Overlays
|
|
39
|
-
export * from "./Dropdown/Dropdown"; // Card Based
|
|
40
|
-
export * from "./Popup/Popup"; // Card Based
|
|
41
37
|
export * from "./Avatar/Avatar";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--md-sys-color-primary: #006b5a;
|
|
3
|
+
--md-sys-color-on-primary: #ffffff;
|
|
4
|
+
--md-sys-color-primary-container: #95f4dc;
|
|
5
|
+
--md-sys-color-on-primary-container: #005143;
|
|
6
|
+
--md-sys-color-primary-fixed: #95f4dc;
|
|
7
|
+
--md-sys-color-primary-fixed-dim: #79d7c0;
|
|
8
|
+
--md-sys-color-on-primary-fixed: #00201a;
|
|
9
|
+
--md-sys-color-on-primary-fixed-variant: #005143;
|
|
10
|
+
--md-sys-color-secondary: #79536a;
|
|
11
|
+
--md-sys-color-on-secondary: #ffffff;
|
|
12
|
+
--md-sys-color-secondary-container: #ffd8ed;
|
|
13
|
+
--md-sys-color-on-secondary-container: #5f3c52;
|
|
14
|
+
--md-sys-color-secondary-fixed: #ffd8ed;
|
|
15
|
+
--md-sys-color-secondary-fixed-dim: #e8b9d4;
|
|
16
|
+
--md-sys-color-on-secondary-fixed: #2e1125;
|
|
17
|
+
--md-sys-color-on-secondary-fixed-variant: #5f3c52;
|
|
18
|
+
--md-sys-color-tertiary: #735280;
|
|
19
|
+
--md-sys-color-on-tertiary: #ffffff;
|
|
20
|
+
--md-sys-color-tertiary-container: #f7d8ff;
|
|
21
|
+
--md-sys-color-on-tertiary-container: #593b67;
|
|
22
|
+
--md-sys-color-tertiary-fixed: #f7d8ff;
|
|
23
|
+
--md-sys-color-tertiary-fixed-dim: #e0b9ee;
|
|
24
|
+
--md-sys-color-on-tertiary-fixed: #2b0e39;
|
|
25
|
+
--md-sys-color-on-tertiary-fixed-variant: #593b67;
|
|
26
|
+
--md-sys-color-error: #ba1a1a;
|
|
27
|
+
--md-sys-color-on-error: #ffffff;
|
|
28
|
+
--md-sys-color-error-container: #ffdad6;
|
|
29
|
+
--md-sys-color-on-error-container: #93000a;
|
|
30
|
+
--md-sys-color-background: #fff7fd;
|
|
31
|
+
--md-sys-color-on-background: #1f1a21;
|
|
32
|
+
--md-sys-color-surface: #fff7fd;
|
|
33
|
+
--md-sys-color-on-surface: #1f1a21;
|
|
34
|
+
--md-sys-color-surface-variant: #ecdef0;
|
|
35
|
+
--md-sys-color-on-surface-variant: #4d4351;
|
|
36
|
+
--md-sys-color-surface-dim: #e1d7e2;
|
|
37
|
+
--md-sys-color-surface-bright: #fff7fd;
|
|
38
|
+
--md-sys-color-surface-container-lowest: #ffffff;
|
|
39
|
+
--md-sys-color-surface-container-low: #fbf0fb;
|
|
40
|
+
--md-sys-color-surface-container: #f5ebf6;
|
|
41
|
+
--md-sys-color-surface-container-high: #efe5f0;
|
|
42
|
+
--md-sys-color-surface-container-highest: #eadfea;
|
|
43
|
+
--md-sys-color-outline: #7e7383;
|
|
44
|
+
--md-sys-color-outline-variant: #cfc2d3;
|
|
45
|
+
--md-sys-color-inverse-surface: #342e37;
|
|
46
|
+
--md-sys-color-inverse-on-surface: #f8edf9;
|
|
47
|
+
--md-sys-color-inverse-primary: #79d7c0;
|
|
48
|
+
--md-sys-color-surface-tint: #006b5a;
|
|
49
|
+
--md-sys-color-shadow: #000000;
|
|
50
|
+
--md-sys-color-scrim: #000000;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dark {
|
|
54
|
+
--md-sys-color-primary: #79d7c0;
|
|
55
|
+
--md-sys-color-on-primary: #00382e;
|
|
56
|
+
--md-sys-color-primary-container: #005143;
|
|
57
|
+
--md-sys-color-on-primary-container: #95f4dc;
|
|
58
|
+
--md-sys-color-primary-fixed: #95f4dc;
|
|
59
|
+
--md-sys-color-primary-fixed-dim: #79d7c0;
|
|
60
|
+
--md-sys-color-on-primary-fixed: #00201a;
|
|
61
|
+
--md-sys-color-on-primary-fixed-variant: #005143;
|
|
62
|
+
--md-sys-color-secondary: #e8b9d4;
|
|
63
|
+
--md-sys-color-on-secondary: #46263b;
|
|
64
|
+
--md-sys-color-secondary-container: #5f3c52;
|
|
65
|
+
--md-sys-color-on-secondary-container: #ffd8ed;
|
|
66
|
+
--md-sys-color-secondary-fixed: #ffd8ed;
|
|
67
|
+
--md-sys-color-secondary-fixed-dim: #e8b9d4;
|
|
68
|
+
--md-sys-color-on-secondary-fixed: #2e1125;
|
|
69
|
+
--md-sys-color-on-secondary-fixed-variant: #5f3c52;
|
|
70
|
+
--md-sys-color-tertiary: #e0b9ee;
|
|
71
|
+
--md-sys-color-on-tertiary: #41244f;
|
|
72
|
+
--md-sys-color-tertiary-container: #593b67;
|
|
73
|
+
--md-sys-color-on-tertiary-container: #f7d8ff;
|
|
74
|
+
--md-sys-color-tertiary-fixed: #f7d8ff;
|
|
75
|
+
--md-sys-color-tertiary-fixed-dim: #e0b9ee;
|
|
76
|
+
--md-sys-color-on-tertiary-fixed: #2b0e39;
|
|
77
|
+
--md-sys-color-on-tertiary-fixed-variant: #593b67;
|
|
78
|
+
--md-sys-color-error: #ffb4ab;
|
|
79
|
+
--md-sys-color-on-error: #690005;
|
|
80
|
+
--md-sys-color-error-container: #93000a;
|
|
81
|
+
--md-sys-color-on-error-container: #ffdad6;
|
|
82
|
+
--md-sys-color-background: #161219;
|
|
83
|
+
--md-sys-color-on-background: #eadfea;
|
|
84
|
+
--md-sys-color-surface: #161219;
|
|
85
|
+
--md-sys-color-on-surface: #eadfea;
|
|
86
|
+
--md-sys-color-surface-variant: #4d4351;
|
|
87
|
+
--md-sys-color-on-surface-variant: #cfc2d3;
|
|
88
|
+
--md-sys-color-surface-dim: #161219;
|
|
89
|
+
--md-sys-color-surface-bright: #3d373f;
|
|
90
|
+
--md-sys-color-surface-container-lowest: #110d14;
|
|
91
|
+
--md-sys-color-surface-container-low: #1f1a21;
|
|
92
|
+
--md-sys-color-surface-container: #231e25;
|
|
93
|
+
--md-sys-color-surface-container-high: #2d2830;
|
|
94
|
+
--md-sys-color-surface-container-highest: #38333b;
|
|
95
|
+
--md-sys-color-outline: #988d9d;
|
|
96
|
+
--md-sys-color-outline-variant: #4d4351;
|
|
97
|
+
--md-sys-color-inverse-surface: #eadfea;
|
|
98
|
+
--md-sys-color-inverse-on-surface: #342e37;
|
|
99
|
+
--md-sys-color-inverse-primary: #006b5a;
|
|
100
|
+
--md-sys-color-surface-tint: #79d7c0;
|
|
101
|
+
--md-sys-color-shadow: #000000;
|
|
102
|
+
--md-sys-color-scrim: #000000;
|
|
103
|
+
}
|