@rbxts/react-clean-ui 1.0.19 → 1.0.38
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/out/Components/Chart/BarChart.d.ts +47 -0
- package/out/Components/Chart/BarChart.luau +880 -0
- package/out/Components/Chart/Pie.luau +12 -12
- package/out/Components/Chart/index.d.ts +1 -0
- package/out/Components/Chart/init.luau +3 -0
- package/out/Components/Input/Button.d.ts +9 -0
- package/out/Components/Input/Button.luau +155 -46
- package/out/Components/Input/Checkbox.luau +21 -5
- package/out/Components/Input/Increment.d.ts +11 -0
- package/out/Components/Input/Increment.luau +107 -0
- package/out/Components/Input/Increment.step.d.ts +1 -0
- package/out/Components/Input/Increment.step.luau +25 -0
- package/out/Components/Input/Input.d.ts +4 -3
- package/out/Components/Input/Input.luau +124 -17
- package/out/Components/Input/Input.validation.d.ts +3 -0
- package/out/Components/Input/Input.validation.luau +21 -0
- package/out/Components/Input/Select.d.ts +4 -3
- package/out/Components/Input/Select.luau +23 -18
- package/out/Components/Input/Slider.d.ts +1 -1
- package/out/Components/Input/Slider.luau +68 -34
- package/out/Components/Input/index.d.ts +1 -0
- package/out/Components/Input/init.luau +3 -0
- package/out/Components/Interaction/Toast.d.ts +1 -1
- package/out/Components/Interaction/Toast.luau +4 -4
- package/out/Components/Interaction/Tooltip.d.ts +1 -1
- package/out/Components/Interaction/Tooltip.luau +8 -1
- package/out/Components/Layout/Accordion.d.ts +34 -0
- package/out/Components/Layout/Accordion.luau +431 -0
- package/out/Components/Layout/Container.d.ts +4 -2
- package/out/Components/Layout/Container.luau +32 -7
- package/out/Components/Layout/Draggable.luau +1 -1
- package/out/Components/Layout/Fieldset.d.ts +1 -1
- package/out/Components/Layout/FlexItem.d.ts +2 -1
- package/out/Components/Layout/FlexItem.luau +1 -0
- package/out/Components/Layout/HStack.d.ts +2 -1
- package/out/Components/Layout/HStack.luau +1 -2
- package/out/Components/Layout/Scroller.d.ts +1 -0
- package/out/Components/Layout/Scroller.luau +1 -1
- package/out/Components/Layout/Tabs.d.ts +1 -1
- package/out/Components/Layout/Tabs.luau +37 -7
- package/out/Components/Layout/VStack.d.ts +4 -1
- package/out/Components/Layout/VStack.luau +2 -2
- package/out/Components/Layout/index.d.ts +1 -0
- package/out/Components/Layout/init.luau +3 -0
- package/out/Components/Navigation/Menu.d.ts +1 -1
- package/out/Components/Surface/Box.d.ts +5 -3
- package/out/Components/Surface/Box.luau +12 -3
- package/out/Components/Surface/Card.d.ts +8 -6
- package/out/Components/Surface/Card.luau +430 -26
- package/out/Components/Surface/Icon.d.ts +1 -1
- package/out/Components/Surface/Icon.luau +43 -4
- package/out/Components/Typography/Text.d.ts +1 -0
- package/out/Components/Typography/Text.luau +135 -13
- package/out/Contexts/row.context.d.ts +1 -1
- package/out/Contexts/theme.context.d.ts +2 -2
- package/out/Helpers/color.helper.d.ts +5 -3
- package/out/Helpers/color.helper.luau +62 -34
- package/out/Helpers/create-ui-story.d.ts +8 -6
- package/out/Helpers/create-ui-story.luau +48 -5
- package/out/Helpers/css.helper.d.ts +28 -2
- package/out/Helpers/css.helper.luau +208 -0
- package/out/Helpers/index.d.ts +1 -0
- package/out/Helpers/init.luau +3 -0
- package/out/Helpers/size.helper.d.ts +3 -1
- package/out/Helpers/size.helper.luau +10 -9
- package/out/Helpers/spacing.helper.d.ts +3 -3
- package/out/Helpers/typography.helper.d.ts +2 -2
- package/out/Interfaces/css.types.d.ts +28 -0
- package/out/Interfaces/css.types.luau +17 -0
- package/out/Interfaces/element.props.d.ts +61 -0
- package/out/Interfaces/element.props.luau +1 -0
- package/out/Interfaces/index.d.ts +4 -2
- package/out/Interfaces/init.luau +9 -3
- package/out/Interfaces/responsive.types.d.ts +26 -0
- package/out/Interfaces/semantics.d.ts +3 -0
- package/out/Interfaces/semantics.luau +2 -0
- package/out/Providers/app.provider.d.ts +2 -2
- package/out/Providers/theme.provider.d.ts +2 -2
- package/out/Theme/index.d.ts +1 -0
- package/out/Theme/theme.factory.d.ts +3 -3
- package/out/Theme/theme.style.d.ts +48 -0
- package/out/Theme/theme.style.luau +1 -0
- package/out/Theme/theme.template.d.ts +90 -36
- package/out/Theme/themes/dark.theme.d.ts +1 -1
- package/out/Theme/themes/dark.theme.luau +73 -1
- package/out/Theme/themes/default.theme.d.ts +2 -2
- package/out/Theme/themes/default.theme.luau +122 -12
- package/out/Theme/themes/index.d.ts +1 -0
- package/out/Theme/themes/init.luau +3 -0
- package/out/Theme/themes/sandstone.theme.d.ts +1 -1
- package/out/Theme/themes/sandstone.theme.luau +81 -10
- package/out/Theme/themes/wooden.theme.d.ts +1 -0
- package/out/Theme/themes/wooden.theme.luau +443 -0
- package/out/index.d.ts +8 -8
- package/package.json +20 -6
- package/out/Interfaces/clean.element.props.d.ts +0 -114
- /package/out/{Interfaces/userinput.d.ts → Helpers/input.helper.d.ts} +0 -0
- /package/out/{Interfaces/userinput.luau → Helpers/input.helper.luau} +0 -0
- /package/out/Interfaces/{clean.element.props.luau → responsive.types.luau} +0 -0
package/out/Helpers/init.luau
CHANGED
|
@@ -13,6 +13,9 @@ end
|
|
|
13
13
|
for _k, _v in TS.import(script, script, "gui.helper") or {} do
|
|
14
14
|
exports[_k] = _v
|
|
15
15
|
end
|
|
16
|
+
for _k, _v in TS.import(script, script, "input.helper") or {} do
|
|
17
|
+
exports[_k] = _v
|
|
18
|
+
end
|
|
16
19
|
for _k, _v in TS.import(script, script, "size.helper") or {} do
|
|
17
20
|
exports[_k] = _v
|
|
18
21
|
end
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Binding } from "@rbxts/react";
|
|
2
|
-
import { CssSize
|
|
2
|
+
import { CssSize } from "../Interfaces/css.types";
|
|
3
|
+
import { Breakpoint, ResponsiveValue } from "../Interfaces/responsive.types";
|
|
4
|
+
import { SizeElementProps, PositionElementProps } from "../Interfaces/element.props";
|
|
3
5
|
export declare class SizeHelper {
|
|
4
6
|
static GetSize(props: SizeElementProps, defaultSize?: UDim2): UDim2 | Binding<UDim2>;
|
|
5
7
|
static GetPosition(props: PositionElementProps): UDim2 | Binding<UDim2>;
|
|
@@ -31,7 +31,8 @@ do
|
|
|
31
31
|
width = props.width
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
|
-
|
|
34
|
+
local height = if props.height == "Auto" then 0 else props.height
|
|
35
|
+
return UDim2.new(self:toUDim(width), self:toUDim(height))
|
|
35
36
|
end
|
|
36
37
|
function SizeHelper:GetPosition(props)
|
|
37
38
|
if props.Position ~= nil then
|
|
@@ -62,25 +63,25 @@ do
|
|
|
62
63
|
if props.AutomaticSize ~= nil then
|
|
63
64
|
return props.AutomaticSize
|
|
64
65
|
end
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
-- "Auto" behaves like an unset dimension for the purposes of deciding
|
|
67
|
+
-- which axes get AutomaticSize, but still forces that axis to 0 in GetSize.
|
|
68
|
+
local width = if props.width == "Auto" then nil else props.width
|
|
69
|
+
local height = if props.height == "Auto" then nil else props.height
|
|
68
70
|
local _condition = props.Size ~= nil
|
|
69
71
|
if not _condition then
|
|
70
|
-
local _condition_1 =
|
|
72
|
+
local _condition_1 = width
|
|
71
73
|
if _condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1 then
|
|
72
|
-
_condition_1 =
|
|
74
|
+
_condition_1 = height
|
|
73
75
|
end
|
|
74
76
|
_condition = _condition_1
|
|
75
77
|
end
|
|
76
78
|
if _condition ~= 0 and _condition == _condition and _condition ~= "" and _condition then
|
|
77
79
|
return Enum.AutomaticSize.None
|
|
78
80
|
end
|
|
79
|
-
if
|
|
81
|
+
if width == nil and height == nil and defaultValue == nil then
|
|
80
82
|
return Enum.AutomaticSize.XY
|
|
81
83
|
end
|
|
82
|
-
|
|
83
|
-
if not (_value ~= 0 and _value == _value and _value ~= "" and _value) then
|
|
84
|
+
if not (width ~= 0 and width == width and width ~= "" and width) then
|
|
84
85
|
return Enum.AutomaticSize.X
|
|
85
86
|
end
|
|
86
87
|
return if defaultValue ~= nil then defaultValue else Enum.AutomaticSize.Y
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PaddingProps, ResolvedPadding, ScaleSize, ScaleSizeValue } from "../Interfaces";
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeTemplate } from "../Theme";
|
|
3
3
|
export declare class SpacingHelper {
|
|
4
|
-
static GetResolvedPadding(theme:
|
|
5
|
-
static GetPadding(theme:
|
|
4
|
+
static GetResolvedPadding(theme: ThemeTemplate, props: PaddingProps, component?: ScaleSizeValue<number>): ResolvedPadding;
|
|
5
|
+
static GetPadding(theme: ThemeTemplate, spacing?: ScaleSize | "None", component?: ScaleSizeValue<number>): number;
|
|
6
6
|
static ResolveNumberPadding(value: number): ResolvedPadding;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ScaleSize } from "../Interfaces";
|
|
2
|
-
import { TypographyStyle, ScaledTypographyStyle,
|
|
2
|
+
import { TypographyStyle, ScaledTypographyStyle, ThemeTemplate } from "../Theme";
|
|
3
3
|
export declare class TypographyHelper {
|
|
4
|
-
static getTypography(theme:
|
|
4
|
+
static getTypography(theme: ThemeTemplate, scale?: ScaleSize, component?: Partial<TypographyStyle> | ScaledTypographyStyle): TypographyStyle;
|
|
5
5
|
private static getClosestTypography;
|
|
6
6
|
private static isScaledTypographyStyle;
|
|
7
7
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type CssUnit = "px" | "%";
|
|
2
|
+
export type CssSize = "Auto" | number | `${number}` | `${number}${CssUnit}`;
|
|
3
|
+
export type CssCalcSize = CssSize | `${number}% - ${number}px` | `${number}% + ${number}px`;
|
|
4
|
+
export type CssBreakpoint = {
|
|
5
|
+
xs: number;
|
|
6
|
+
sm: number;
|
|
7
|
+
md: number;
|
|
8
|
+
lg: number;
|
|
9
|
+
xl: number;
|
|
10
|
+
};
|
|
11
|
+
export type CssBreakpointSize = {
|
|
12
|
+
xs?: CssSize;
|
|
13
|
+
sm?: CssSize;
|
|
14
|
+
md?: CssSize;
|
|
15
|
+
lg?: CssSize;
|
|
16
|
+
xl?: CssSize;
|
|
17
|
+
};
|
|
18
|
+
export type CssDual = CssSize | `${CssSize} ${CssSize}`;
|
|
19
|
+
export type CssQuad = CssDual | `${CssSize} ${CssSize} ${CssSize}` | `${CssSize} ${CssSize} ${CssSize} ${CssSize}`;
|
|
20
|
+
export type CssShadow = CssQuad;
|
|
21
|
+
export type CssSliceInset = `${CssSize} ${CssSize}` | `${CssSize} ${CssSize} ${CssSize} ${CssSize}`;
|
|
22
|
+
export type CssBoxShadow = {
|
|
23
|
+
shadow: CssShadow;
|
|
24
|
+
color: Color3;
|
|
25
|
+
transparency: number;
|
|
26
|
+
};
|
|
27
|
+
export type CssPadding = CssQuad;
|
|
28
|
+
export type ResponsiveCssSize = CssSize | CssBreakpointSize;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
-- The one CSS calc() shape supported on top of CssSize: a percent term
|
|
3
|
+
-- plus/minus a pixel term (e.g. "100% - 50px"), which maps directly onto
|
|
4
|
+
-- UDim(scale, offset) — no general calc() parser needed for anything beyond
|
|
5
|
+
-- this two-term form. Deliberately kept as its own type rather than folded
|
|
6
|
+
-- directly into CssSize: CssSize is composed multiple times over in CssQuad/
|
|
7
|
+
-- CssDual (a 4-term CssQuad is `${CssSize} ${CssSize} ${CssSize} ${CssSize}`),
|
|
8
|
+
-- so widening CssSize itself multiplies out through every one of those
|
|
9
|
+
-- combinations — doing so was observed to blow past TypeScript's template-
|
|
10
|
+
-- literal complexity limit ("union type that is too complex to represent")
|
|
11
|
+
-- at unrelated call sites that spread a large props object containing
|
|
12
|
+
-- several CssQuad-shaped fields (e.g. Button.tsx's `<BoxShadow {...props} />`).
|
|
13
|
+
-- Use CssCalcSize only where a calc() term is actually needed (currently
|
|
14
|
+
-- just CssPosition.width) rather than everywhere CssSize appears.
|
|
15
|
+
-- absolute pixel corner coordinates for Rect.new(minX, minY, maxX, maxY)-style slicing,
|
|
16
|
+
-- e.g. Roblox's SliceCenter — not a CSS border-image-slice edge-inset shorthand, since
|
|
17
|
+
-- Roblox has no intrinsic-image-size equivalent to derive corners from an inset alone
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Binding } from "@rbxts/react";
|
|
2
|
+
import { IconName } from "./icon";
|
|
3
|
+
import { CssSize, CssShadow, CssPadding, ResponsiveCssSize } from "./css.types";
|
|
4
|
+
import { ScaleSize, BreakpointValue } from "./responsive.types";
|
|
5
|
+
import { Intent } from "./semantics";
|
|
6
|
+
export interface ZIndexElementProps {
|
|
7
|
+
ZIndex?: number | Binding<number> | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface BackgroundElementProps {
|
|
10
|
+
BackgroundTransparency?: number | Binding<number> | undefined;
|
|
11
|
+
BackgroundColor3?: Color3 | Binding<Color3> | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface SizeElementProps {
|
|
14
|
+
Size?: UDim2 | Binding<UDim2>;
|
|
15
|
+
width?: ResponsiveCssSize;
|
|
16
|
+
height?: CssSize;
|
|
17
|
+
AutomaticSize?: Enum.AutomaticSize | Binding<Enum.AutomaticSize> | "None" | "X" | "Y" | "XY" | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface ScalableElementProps {
|
|
20
|
+
scale?: ScaleSize;
|
|
21
|
+
}
|
|
22
|
+
export interface PositionElementProps {
|
|
23
|
+
Position?: UDim2 | Binding<UDim2>;
|
|
24
|
+
AnchorPoint?: Vector2 | Binding<Vector2> | undefined;
|
|
25
|
+
center?: boolean;
|
|
26
|
+
top?: CssSize;
|
|
27
|
+
left?: CssSize;
|
|
28
|
+
right?: CssSize;
|
|
29
|
+
bottom?: CssSize;
|
|
30
|
+
}
|
|
31
|
+
export interface IntentElementProps {
|
|
32
|
+
intent?: Intent;
|
|
33
|
+
}
|
|
34
|
+
export interface SpacedElementProps {
|
|
35
|
+
spacing?: ScaleSize | "None";
|
|
36
|
+
}
|
|
37
|
+
export interface BreakPointElementProps {
|
|
38
|
+
breakpoints?: BreakpointValue<number>;
|
|
39
|
+
}
|
|
40
|
+
export interface ShadowElementProps {
|
|
41
|
+
"box-shadow"?: CssShadow;
|
|
42
|
+
"box-shadow-color"?: Color3;
|
|
43
|
+
"box-shadow-transparency"?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface IconElementProps {
|
|
46
|
+
icon?: IconName;
|
|
47
|
+
}
|
|
48
|
+
export interface PaddingProps extends SpacedElementProps {
|
|
49
|
+
right?: ScaleSize | "None";
|
|
50
|
+
left?: ScaleSize | "None";
|
|
51
|
+
top?: ScaleSize | "None";
|
|
52
|
+
bottom?: ScaleSize | "None";
|
|
53
|
+
padding?: CssPadding;
|
|
54
|
+
resolvedPadding?: ResolvedPadding;
|
|
55
|
+
}
|
|
56
|
+
export interface ResolvedPadding {
|
|
57
|
+
top: number;
|
|
58
|
+
bottom: number;
|
|
59
|
+
left: number;
|
|
60
|
+
right: number;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
package/out/Interfaces/init.luau
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
|
-
for _k, _v in TS.import(script, script, "
|
|
4
|
+
for _k, _v in TS.import(script, script, "css.types") or {} do
|
|
5
5
|
exports[_k] = _v
|
|
6
6
|
end
|
|
7
|
-
for _k, _v in TS.import(script, script, "
|
|
7
|
+
for _k, _v in TS.import(script, script, "responsive.types") or {} do
|
|
8
|
+
exports[_k] = _v
|
|
9
|
+
end
|
|
10
|
+
for _k, _v in TS.import(script, script, "element.props") or {} do
|
|
8
11
|
exports[_k] = _v
|
|
9
12
|
end
|
|
10
|
-
for _k, _v in TS.import(script, script, "
|
|
13
|
+
for _k, _v in TS.import(script, script, "semantics") or {} do
|
|
14
|
+
exports[_k] = _v
|
|
15
|
+
end
|
|
16
|
+
for _k, _v in TS.import(script, script, "icon") or {} do
|
|
11
17
|
exports[_k] = _v
|
|
12
18
|
end
|
|
13
19
|
return exports
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Breakpoint = "xs" | "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export declare const ScaleSizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
3
|
+
export type ScaleSize = typeof ScaleSizes[number];
|
|
4
|
+
export type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
5
|
+
export interface ResponsiveGridSpan {
|
|
6
|
+
xs?: GridSpan;
|
|
7
|
+
sm?: GridSpan;
|
|
8
|
+
md?: GridSpan;
|
|
9
|
+
lg?: GridSpan;
|
|
10
|
+
xl?: GridSpan;
|
|
11
|
+
}
|
|
12
|
+
export type ResponsiveValue<T> = T | Partial<Record<Breakpoint, T>>;
|
|
13
|
+
export interface BreakpointValue<T> {
|
|
14
|
+
xs?: T;
|
|
15
|
+
sm?: T;
|
|
16
|
+
md?: T;
|
|
17
|
+
lg?: T;
|
|
18
|
+
xl?: T;
|
|
19
|
+
}
|
|
20
|
+
export interface ScaleSizeValue<T> {
|
|
21
|
+
xs?: T;
|
|
22
|
+
sm?: T;
|
|
23
|
+
md?: T;
|
|
24
|
+
lg?: T;
|
|
25
|
+
xl?: T;
|
|
26
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeTemplate } from "../Theme";
|
|
3
3
|
interface CleanUiProviderProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
theme:
|
|
5
|
+
theme: ThemeTemplate;
|
|
6
6
|
toasts?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare function CleanUiProvider({ children, theme, toasts }: CleanUiProviderProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeTemplate } from "../Theme";
|
|
3
3
|
interface ThemeProviderProps {
|
|
4
|
-
theme:
|
|
4
|
+
theme: ThemeTemplate;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element;
|
package/out/Theme/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeTemplate } from "./theme.template";
|
|
2
2
|
export type DeepPartial<T> = {
|
|
3
3
|
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
4
4
|
};
|
|
5
|
-
export declare function createTheme(overrides?: DeepPartial<
|
|
6
|
-
export declare function extendTheme(baseTheme:
|
|
5
|
+
export declare function createTheme(overrides?: DeepPartial<ThemeTemplate>): ThemeTemplate;
|
|
6
|
+
export declare function extendTheme(baseTheme: ThemeTemplate, overrides: DeepPartial<ThemeTemplate>): ThemeTemplate;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Binding } from "@rbxts/react";
|
|
2
|
+
import { ScaleSize, CssShadow, ButtonFlag, CssDual, CssSliceInset, CssSize, CssCalcSize } from "../Interfaces/";
|
|
3
|
+
export interface TypographyStyle {
|
|
4
|
+
font: Enum.Font;
|
|
5
|
+
size: Enum.FontSize;
|
|
6
|
+
weight?: Enum.FontWeight;
|
|
7
|
+
lineHeight?: number;
|
|
8
|
+
letterSpacing?: number;
|
|
9
|
+
color?: Color3;
|
|
10
|
+
transparency?: number;
|
|
11
|
+
}
|
|
12
|
+
export type ScaledTypographyStyle = Partial<Record<ScaleSize, Partial<TypographyStyle>>>;
|
|
13
|
+
export interface IntentScheme {
|
|
14
|
+
textColor: Color3;
|
|
15
|
+
backgroundColor: Color3;
|
|
16
|
+
borderColor: Color3;
|
|
17
|
+
backgroundTransparency?: number;
|
|
18
|
+
boxShadow?: CssShadow;
|
|
19
|
+
typography?: Partial<TypographyStyle>;
|
|
20
|
+
backgroundImage?: Partial<CssBackgroundImage>;
|
|
21
|
+
}
|
|
22
|
+
export interface IntentColors extends Partial<Record<ButtonFlag, IntentScheme>> {
|
|
23
|
+
default: IntentScheme;
|
|
24
|
+
hover?: IntentScheme;
|
|
25
|
+
focus?: IntentScheme;
|
|
26
|
+
}
|
|
27
|
+
export type InlineIntentColors = {
|
|
28
|
+
[State in keyof IntentColors]?: Partial<NonNullable<IntentColors[State]>>;
|
|
29
|
+
};
|
|
30
|
+
export interface CssBackgroundImage {
|
|
31
|
+
image: string | number;
|
|
32
|
+
slice?: CssSliceInset;
|
|
33
|
+
size?: Enum.ScaleType | "Stretch" | "Slice" | "Tile" | "Fit" | "Crop" | Binding<Enum.ScaleType>;
|
|
34
|
+
transparency?: number;
|
|
35
|
+
tintColor?: Color3;
|
|
36
|
+
tileSize?: CssDual;
|
|
37
|
+
sliceScale?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface CssPosition {
|
|
40
|
+
position?: "static" | "absolute";
|
|
41
|
+
top?: CssSize;
|
|
42
|
+
left?: CssSize;
|
|
43
|
+
right?: CssSize;
|
|
44
|
+
bottom?: CssSize;
|
|
45
|
+
center?: boolean | "x" | "y";
|
|
46
|
+
zIndex?: number;
|
|
47
|
+
width?: CssCalcSize;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
import { CssShadow, CssSize, Breakpoint, BreakpointValue, ScaleSizeValue, ScaleSize, Intent, IconSet, TextVariant,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
size: Enum.FontSize;
|
|
5
|
-
weight?: Enum.FontWeight;
|
|
6
|
-
lineHeight?: number;
|
|
7
|
-
}
|
|
8
|
-
export type ScaledTypographyStyle = Partial<Record<ScaleSize, Partial<TypographyStyle>>>;
|
|
9
|
-
export interface IntentScheme {
|
|
10
|
-
textColor: Color3;
|
|
11
|
-
backgroundColor: Color3;
|
|
12
|
-
borderColor: Color3;
|
|
13
|
-
backgroundTransparency?: number;
|
|
14
|
-
boxShadow?: CssShadow;
|
|
15
|
-
typography?: Partial<TypographyStyle>;
|
|
16
|
-
}
|
|
17
|
-
export interface IntentColors extends Partial<Record<ButtonFlag, IntentScheme>> {
|
|
18
|
-
default: IntentScheme;
|
|
19
|
-
hover?: IntentScheme;
|
|
20
|
-
focus?: IntentScheme;
|
|
21
|
-
}
|
|
22
|
-
export type InlineIntentColors = {
|
|
23
|
-
[State in keyof IntentColors]?: Partial<NonNullable<IntentColors[State]>>;
|
|
24
|
-
};
|
|
25
|
-
export interface CleanTheme {
|
|
1
|
+
import { CssShadow, CssSize, CssPadding, Breakpoint, BreakpointValue, ScaleSizeValue, ScaleSize, Intent, IconSet, TextVariant, PositionElementProps, CssBoxShadow } from "../Interfaces/";
|
|
2
|
+
import { TypographyStyle, ScaledTypographyStyle, IntentScheme, IntentColors, InlineIntentColors, CssBackgroundImage, CssPosition } from "./theme.style";
|
|
3
|
+
export interface ThemeTemplate {
|
|
26
4
|
colors: {
|
|
27
5
|
intents: Record<Intent, IntentColors>;
|
|
28
6
|
};
|
|
@@ -70,7 +48,9 @@ export interface CleanTheme {
|
|
|
70
48
|
borderColor: Color3;
|
|
71
49
|
borderThickness: number;
|
|
72
50
|
cornerRadius: CssSize;
|
|
51
|
+
padding?: CssPadding;
|
|
73
52
|
boxShadow?: CssShadow;
|
|
53
|
+
backgroundImage?: CssBackgroundImage;
|
|
74
54
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
75
55
|
};
|
|
76
56
|
button: {
|
|
@@ -81,16 +61,22 @@ export interface CleanTheme {
|
|
|
81
61
|
typography?: Partial<TypographyStyle> | ScaledTypographyStyle;
|
|
82
62
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
83
63
|
};
|
|
64
|
+
increment: {
|
|
65
|
+
button?: Partial<ThemeTemplate["components"]["button"]>;
|
|
66
|
+
};
|
|
84
67
|
input: {
|
|
85
68
|
borderColor: Color3;
|
|
86
69
|
borderThickness: number;
|
|
87
70
|
cornerRadius: CssSize;
|
|
88
71
|
typography?: Partial<TypographyStyle> | ScaledTypographyStyle;
|
|
72
|
+
backgroundImage?: CssBackgroundImage;
|
|
73
|
+
placeholder?: Partial<TypographyStyle> | ScaledTypographyStyle;
|
|
89
74
|
};
|
|
90
75
|
select: {
|
|
91
76
|
borderColor: Color3;
|
|
92
77
|
borderThickness: number;
|
|
93
78
|
cornerRadius: CssSize;
|
|
79
|
+
backgroundImage?: CssBackgroundImage;
|
|
94
80
|
dropDownBackgroundColor: Color3;
|
|
95
81
|
typography?: Partial<TypographyStyle> | ScaledTypographyStyle;
|
|
96
82
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
@@ -99,9 +85,11 @@ export interface CleanTheme {
|
|
|
99
85
|
checkbox: {
|
|
100
86
|
borderColor: Color3;
|
|
101
87
|
borderThickness: number;
|
|
88
|
+
borderTransparency?: number;
|
|
102
89
|
cornerRadius: CssSize;
|
|
103
90
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
104
91
|
spacing?: ScaleSizeValue<number>;
|
|
92
|
+
backgroundImage?: CssBackgroundImage;
|
|
105
93
|
};
|
|
106
94
|
tabs: {
|
|
107
95
|
borderColor: Color3;
|
|
@@ -112,9 +100,11 @@ export interface CleanTheme {
|
|
|
112
100
|
list: {
|
|
113
101
|
borderColor?: Color3;
|
|
114
102
|
backgroundColor?: Color3;
|
|
103
|
+
backgroundTransparency?: number;
|
|
115
104
|
borderThickness: number;
|
|
116
105
|
cornerRadius: CssSize;
|
|
117
106
|
spacing?: ScaleSizeValue<number>;
|
|
107
|
+
backgroundImage?: CssBackgroundImage;
|
|
118
108
|
};
|
|
119
109
|
button: {
|
|
120
110
|
borderThickness: number;
|
|
@@ -125,16 +115,44 @@ export interface CleanTheme {
|
|
|
125
115
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
126
116
|
};
|
|
127
117
|
};
|
|
118
|
+
accordion: {
|
|
119
|
+
borderColor: Color3;
|
|
120
|
+
borderThickness: number;
|
|
121
|
+
cornerRadius: CssSize;
|
|
122
|
+
spacing?: ScaleSizeValue<number>;
|
|
123
|
+
header: {
|
|
124
|
+
spacing?: ScaleSizeValue<number>;
|
|
125
|
+
typography?: Partial<TypographyStyle> | ScaledTypographyStyle;
|
|
126
|
+
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
127
|
+
indicatorSize: number;
|
|
128
|
+
indicatorColor: Color3;
|
|
129
|
+
};
|
|
130
|
+
content: {
|
|
131
|
+
spacing?: ScaleSizeValue<number>;
|
|
132
|
+
backgroundColor: Color3;
|
|
133
|
+
backgroundTransparency: number;
|
|
134
|
+
};
|
|
135
|
+
animation: {
|
|
136
|
+
duration: number;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
128
139
|
card: {
|
|
129
140
|
borderThickness: number;
|
|
130
141
|
cornerRadius: CssSize;
|
|
131
142
|
header: {
|
|
143
|
+
borderThickness?: number;
|
|
132
144
|
spacing?: ScaleSizeValue<number>;
|
|
133
145
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
146
|
+
position?: CssPosition;
|
|
134
147
|
};
|
|
135
148
|
footer: {
|
|
149
|
+
borderThickness?: number;
|
|
136
150
|
spacing?: ScaleSizeValue<number>;
|
|
137
151
|
intents?: Partial<Record<Intent, InlineIntentColors>>;
|
|
152
|
+
position?: CssPosition;
|
|
153
|
+
};
|
|
154
|
+
body?: {
|
|
155
|
+
padding?: CssPadding;
|
|
138
156
|
};
|
|
139
157
|
};
|
|
140
158
|
slider: {
|
|
@@ -160,7 +178,7 @@ export interface CleanTheme {
|
|
|
160
178
|
cornerRadius: CssSize;
|
|
161
179
|
backgroundColor: Color3;
|
|
162
180
|
backgroundTransparency: number;
|
|
163
|
-
|
|
181
|
+
aspectRatio?: number;
|
|
164
182
|
};
|
|
165
183
|
};
|
|
166
184
|
toast: {
|
|
@@ -188,18 +206,54 @@ export interface CleanTheme {
|
|
|
188
206
|
cornerRadius: CssSize;
|
|
189
207
|
intents?: Partial<Record<Intent, Partial<IntentScheme>>>;
|
|
190
208
|
};
|
|
191
|
-
|
|
209
|
+
charts: {
|
|
192
210
|
colors: Color3[];
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
211
|
+
pie: {
|
|
212
|
+
boxShadow?: CssBoxShadow;
|
|
213
|
+
hoverDarken: number;
|
|
214
|
+
labels: {
|
|
215
|
+
spacing?: ScaleSizeValue<number>;
|
|
216
|
+
backgroundColor?: Color3;
|
|
217
|
+
backgroundTransparency?: number;
|
|
218
|
+
typography?: Partial<TypographyStyle>;
|
|
219
|
+
borderColor?: Color3;
|
|
220
|
+
borderThickness?: number;
|
|
221
|
+
cornerRadius?: CssSize;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
bar: {
|
|
196
225
|
spacing?: ScaleSizeValue<number>;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
226
|
+
unstackedTransparency: number;
|
|
227
|
+
borderColor: Color3;
|
|
228
|
+
borderThickness: number;
|
|
229
|
+
cornerRadius: CssSize;
|
|
230
|
+
tweenTime: number;
|
|
231
|
+
axis: {
|
|
232
|
+
color: Color3;
|
|
233
|
+
transparency: number;
|
|
234
|
+
thickness: number;
|
|
235
|
+
};
|
|
236
|
+
xAxis: {
|
|
237
|
+
size: number;
|
|
238
|
+
spacing: number;
|
|
239
|
+
tickColor: Color3;
|
|
240
|
+
tickTransparency: number;
|
|
241
|
+
tickThickness: number;
|
|
242
|
+
tickSize: number;
|
|
243
|
+
};
|
|
244
|
+
yAxis: {
|
|
245
|
+
size: number;
|
|
246
|
+
spacing: number;
|
|
247
|
+
tickColor: Color3;
|
|
248
|
+
tickTransparency: number;
|
|
249
|
+
tickThickness: number;
|
|
250
|
+
tickSize: number;
|
|
251
|
+
};
|
|
252
|
+
gridLines: {
|
|
253
|
+
color: Color3;
|
|
254
|
+
transparency: number;
|
|
255
|
+
thickness: number;
|
|
256
|
+
};
|
|
203
257
|
};
|
|
204
258
|
};
|
|
205
259
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DarkTheme: import("..").
|
|
1
|
+
export declare const DarkTheme: import("..").ThemeTemplate;
|