@rbxts/uiblox 0.1.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/LICENSE +21 -0
- package/README.md +263 -0
- package/out/index.d.ts +2 -0
- package/out/init.lua +10 -0
- package/out/theme/components/ThemeProvider.d.ts +7 -0
- package/out/theme/components/ThemeProvider.lua +37 -0
- package/out/theme/components/ThemeStore.d.ts +14 -0
- package/out/theme/components/ThemeStore.lua +29 -0
- package/out/theme/components/ThemeWrapper.d.ts +7 -0
- package/out/theme/components/ThemeWrapper.lua +52 -0
- package/out/theme/components/index.d.ts +8 -0
- package/out/theme/components/init.lua +10 -0
- package/out/theme/constants/NumberConstants.d.ts +6 -0
- package/out/theme/constants/NumberConstants.lua +18 -0
- package/out/theme/constants/ThemeConstants.d.ts +5 -0
- package/out/theme/constants/ThemeConstants.lua +104 -0
- package/out/theme/constants/index.d.ts +2 -0
- package/out/theme/constants/init.lua +10 -0
- package/out/theme/index.d.ts +20 -0
- package/out/theme/init.lua +27 -0
- package/out/theme/interfaces/IconSizes/IconSizes.d.ts +5 -0
- package/out/theme/interfaces/IconSizes/IconSizes.lua +2 -0
- package/out/theme/interfaces/IconSizes/index.d.ts +1 -0
- package/out/theme/interfaces/IconSizes/init.lua +2 -0
- package/out/theme/interfaces/Palette/ColorTokens/ColorTokens.d.ts +5 -0
- package/out/theme/interfaces/Palette/ColorTokens/ColorTokens.lua +2 -0
- package/out/theme/interfaces/Palette/ColorTokens/index.d.ts +1 -0
- package/out/theme/interfaces/Palette/ColorTokens/init.lua +2 -0
- package/out/theme/interfaces/Palette/Colors/Blue.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Blue.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Colors.d.ts +43 -0
- package/out/theme/interfaces/Palette/Colors/Colors.lua +2 -0
- package/out/theme/interfaces/Palette/Colors/Common.d.ts +7 -0
- package/out/theme/interfaces/Palette/Colors/Common.lua +9 -0
- package/out/theme/interfaces/Palette/Colors/Dark.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Dark.lua +24 -0
- package/out/theme/interfaces/Palette/Colors/Gray.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Gray.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Green.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Green.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Light.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Light.lua +8 -0
- package/out/theme/interfaces/Palette/Colors/Magenta.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Magenta.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Orange.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Orange.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Purple.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Purple.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Red.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Red.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Turquoise.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Turquoise.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Yellow.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Yellow.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/index.d.ts +13 -0
- package/out/theme/interfaces/Palette/Colors/init.lua +16 -0
- package/out/theme/interfaces/Palette/Palette.d.ts +27 -0
- package/out/theme/interfaces/Palette/Palette.lua +2 -0
- package/out/theme/interfaces/Palette/index.d.ts +3 -0
- package/out/theme/interfaces/Palette/init.lua +7 -0
- package/out/theme/interfaces/Spacing/Borders.d.ts +4 -0
- package/out/theme/interfaces/Spacing/Borders.lua +2 -0
- package/out/theme/interfaces/Spacing/Padding.d.ts +4 -0
- package/out/theme/interfaces/Spacing/Padding.lua +2 -0
- package/out/theme/interfaces/Spacing/Shape.d.ts +3 -0
- package/out/theme/interfaces/Spacing/Shape.lua +2 -0
- package/out/theme/interfaces/Spacing/Spacing.d.ts +4 -0
- package/out/theme/interfaces/Spacing/Spacing.lua +2 -0
- package/out/theme/interfaces/Spacing/index.d.ts +4 -0
- package/out/theme/interfaces/Spacing/init.lua +2 -0
- package/out/theme/interfaces/Theme/Theme.d.ts +14 -0
- package/out/theme/interfaces/Theme/Theme.lua +2 -0
- package/out/theme/interfaces/Theme/ThemeConstants.d.ts +25 -0
- package/out/theme/interfaces/Theme/ThemeConstants.lua +2 -0
- package/out/theme/interfaces/Theme/ThemeOptions.d.ts +4 -0
- package/out/theme/interfaces/Theme/ThemeOptions.lua +2 -0
- package/out/theme/interfaces/Theme/index.d.ts +3 -0
- package/out/theme/interfaces/Theme/init.lua +2 -0
- package/out/theme/interfaces/Tokens/Tokens.d.ts +1 -0
- package/out/theme/interfaces/Tokens/Tokens.lua +2 -0
- package/out/theme/interfaces/Tokens/index.d.ts +1 -0
- package/out/theme/interfaces/Tokens/init.lua +2 -0
- package/out/theme/interfaces/index.d.ts +13 -0
- package/out/theme/interfaces/init.lua +16 -0
- package/out/theme/interfaces/typography/FontFamilies.d.ts +2 -0
- package/out/theme/interfaces/typography/FontFamilies.lua +11 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +5 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.lua +2 -0
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +4 -0
- package/out/theme/interfaces/typography/FontSizeOptions.lua +2 -0
- package/out/theme/interfaces/typography/FontSizes.d.ts +3 -0
- package/out/theme/interfaces/typography/FontSizes.lua +15 -0
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +7 -0
- package/out/theme/interfaces/typography/ThemeTypography.lua +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +18 -0
- package/out/theme/interfaces/typography/Variants.lua +24 -0
- package/out/theme/interfaces/typography/index.d.ts +8 -0
- package/out/theme/interfaces/typography/init.lua +13 -0
- package/out/theme/styles/index.d.ts +5 -0
- package/out/theme/styles/init.lua +7 -0
- package/out/theme/styles/types/WriteableStyle.d.ts +3 -0
- package/out/theme/styles/types/WriteableStyle.lua +2 -0
- package/out/theme/styles/types/index.d.ts +2 -0
- package/out/theme/styles/types/init.lua +2 -0
- package/out/theme/styles/types/styles.d.ts +4 -0
- package/out/theme/styles/types/styles.lua +2 -0
- package/out/theme/styles/utilities/classNames.d.ts +8 -0
- package/out/theme/styles/utilities/classNames.lua +31 -0
- package/out/theme/styles/utilities/createStyles.d.ts +3 -0
- package/out/theme/styles/utilities/createStyles.lua +8 -0
- package/out/theme/styles/utilities/index.d.ts +3 -0
- package/out/theme/styles/utilities/init.lua +7 -0
- package/out/theme/styles/utilities/makeStyles.d.ts +7 -0
- package/out/theme/styles/utilities/makeStyles.lua +32 -0
- package/out/theme/themes/DarkTheme.d.ts +3 -0
- package/out/theme/themes/DarkTheme.lua +99 -0
- package/out/theme/themes/LightTheme.d.ts +3 -0
- package/out/theme/themes/LightTheme.lua +99 -0
- package/out/theme/themes/index.d.ts +3 -0
- package/out/theme/themes/init.lua +7 -0
- package/out/theme/types/index.d.ts +7 -0
- package/out/theme/types/init.lua +2 -0
- package/out/theme/types/types.d.ts +16 -0
- package/out/theme/types/types.lua +3 -0
- package/out/theme/utilites/Color3FromHex.d.ts +2 -0
- package/out/theme/utilites/Color3FromHex.lua +14 -0
- package/out/theme/utilites/index.d.ts +1 -0
- package/out/theme/utilites/init.lua +5 -0
- package/out/ui/constants/ImageConstants.d.ts +2 -0
- package/out/ui/constants/ImageConstants.lua +7 -0
- package/out/ui/constants/LayoutConstants.d.ts +1 -0
- package/out/ui/constants/LayoutConstants.lua +7 -0
- package/out/ui/constants/index.d.ts +2 -0
- package/out/ui/constants/init.lua +10 -0
- package/out/ui/enums/Directions.d.ts +8 -0
- package/out/ui/enums/Directions.lua +23 -0
- package/out/ui/enums/Icons.d.ts +40 -0
- package/out/ui/enums/Icons.lua +87 -0
- package/out/ui/enums/Orientations.d.ts +4 -0
- package/out/ui/enums/Orientations.lua +15 -0
- package/out/ui/enums/index.d.ts +3 -0
- package/out/ui/enums/init.lua +7 -0
- package/out/ui/index.d.ts +34 -0
- package/out/ui/init.lua +24 -0
- package/out/ui/packages/button/components/Button.d.ts +26 -0
- package/out/ui/packages/button/components/Button.lua +175 -0
- package/out/ui/packages/button/components/Button.styles.d.ts +3 -0
- package/out/ui/packages/button/components/Button.styles.lua +149 -0
- package/out/ui/packages/button/index.d.ts +6 -0
- package/out/ui/packages/button/init.lua +8 -0
- package/out/ui/packages/button/types/ButtonColor.d.ts +1 -0
- package/out/ui/packages/button/types/ButtonColor.lua +2 -0
- package/out/ui/packages/button/types/ButtonSize.d.ts +1 -0
- package/out/ui/packages/button/types/ButtonSize.lua +2 -0
- package/out/ui/packages/button/types/ButtonVariant.d.ts +1 -0
- package/out/ui/packages/button/types/ButtonVariant.lua +2 -0
- package/out/ui/packages/button/types/index.d.ts +3 -0
- package/out/ui/packages/button/types/init.lua +2 -0
- package/out/ui/packages/divider/components/Divider.d.ts +18 -0
- package/out/ui/packages/divider/components/Divider.lua +27 -0
- package/out/ui/packages/divider/components/Divider.styles.d.ts +3 -0
- package/out/ui/packages/divider/components/Divider.styles.lua +42 -0
- package/out/ui/packages/divider/index.d.ts +3 -0
- package/out/ui/packages/divider/init.lua +8 -0
- package/out/ui/packages/icon/components/Icon.d.ts +11 -0
- package/out/ui/packages/icon/components/Icon.lua +31 -0
- package/out/ui/packages/icon/components/Icon.styles.d.ts +3 -0
- package/out/ui/packages/icon/components/Icon.styles.lua +47 -0
- package/out/ui/packages/icon/index.d.ts +3 -0
- package/out/ui/packages/icon/init.lua +8 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +13 -0
- package/out/ui/packages/iconButton/components/IconButton.lua +48 -0
- package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +3 -0
- package/out/ui/packages/iconButton/components/IconButton.styles.lua +47 -0
- package/out/ui/packages/iconButton/index.d.ts +3 -0
- package/out/ui/packages/iconButton/init.lua +8 -0
- package/out/ui/packages/index.d.ts +11 -0
- package/out/ui/packages/init.lua +37 -0
- package/out/ui/packages/input/components/Input.d.ts +26 -0
- package/out/ui/packages/input/components/Input.lua +165 -0
- package/out/ui/packages/input/components/Input.styles.d.ts +3 -0
- package/out/ui/packages/input/components/Input.styles.lua +156 -0
- package/out/ui/packages/input/index.d.ts +6 -0
- package/out/ui/packages/input/init.lua +8 -0
- package/out/ui/packages/input/types/InputColor.d.ts +1 -0
- package/out/ui/packages/input/types/InputColor.lua +2 -0
- package/out/ui/packages/input/types/InputMargin.d.ts +1 -0
- package/out/ui/packages/input/types/InputMargin.lua +2 -0
- package/out/ui/packages/input/types/InputVariant.d.ts +1 -0
- package/out/ui/packages/input/types/InputVariant.lua +2 -0
- package/out/ui/packages/input/types/index.d.ts +3 -0
- package/out/ui/packages/input/types/init.lua +2 -0
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +9 -0
- package/out/ui/packages/progressBar/components/ProgressBar.lua +76 -0
- package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +2 -0
- package/out/ui/packages/progressBar/components/ProgressBar.styles.lua +47 -0
- package/out/ui/packages/progressBar/index.d.ts +3 -0
- package/out/ui/packages/progressBar/init.lua +8 -0
- package/out/ui/packages/shadow/components/Shadow.d.ts +3 -0
- package/out/ui/packages/shadow/components/Shadow.lua +72 -0
- package/out/ui/packages/shadow/components/Shadow.styles.d.ts +2 -0
- package/out/ui/packages/shadow/components/Shadow.styles.lua +20 -0
- package/out/ui/packages/shadow/index.d.ts +2 -0
- package/out/ui/packages/shadow/init.lua +8 -0
- package/out/ui/packages/sidebar/components/Sidebar.d.ts +11 -0
- package/out/ui/packages/sidebar/components/Sidebar.lua +46 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +3 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.lua +38 -0
- package/out/ui/packages/sidebar/index.d.ts +4 -0
- package/out/ui/packages/sidebar/init.lua +8 -0
- package/out/ui/packages/sidebar/types/SidebarType.d.ts +1 -0
- package/out/ui/packages/sidebar/types/SidebarType.lua +2 -0
- package/out/ui/packages/sidebar/types/index.d.ts +1 -0
- package/out/ui/packages/sidebar/types/init.lua +2 -0
- package/out/ui/packages/toast/components/Toast.d.ts +11 -0
- package/out/ui/packages/toast/components/Toast.lua +94 -0
- package/out/ui/packages/toast/components/Toast.styles.d.ts +3 -0
- package/out/ui/packages/toast/components/Toast.styles.lua +74 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +7 -0
- package/out/ui/packages/toast/enums/ToastVariants.lua +20 -0
- package/out/ui/packages/toast/index.d.ts +5 -0
- package/out/ui/packages/toast/init.lua +9 -0
- package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +5 -0
- package/out/ui/packages/toast/interfaces/ToastEvent.lua +2 -0
- package/out/ui/packages/treeView/components/TreeView.d.ts +11 -0
- package/out/ui/packages/treeView/components/TreeView.lua +339 -0
- package/out/ui/packages/treeView/components/TreeView.styles.d.ts +2 -0
- package/out/ui/packages/treeView/components/TreeView.styles.lua +91 -0
- package/out/ui/packages/treeView/index.d.ts +6 -0
- package/out/ui/packages/treeView/init.lua +8 -0
- package/out/ui/packages/treeView/interfaces/Branch.d.ts +6 -0
- package/out/ui/packages/treeView/interfaces/Branch.lua +2 -0
- package/out/ui/packages/treeView/interfaces/Leaf.d.ts +4 -0
- package/out/ui/packages/treeView/interfaces/Leaf.lua +2 -0
- package/out/ui/packages/treeView/interfaces/Tree.d.ts +5 -0
- package/out/ui/packages/treeView/interfaces/Tree.lua +2 -0
- package/out/ui/packages/typography/components/Typography.d.ts +21 -0
- package/out/ui/packages/typography/components/Typography.lua +47 -0
- package/out/ui/packages/typography/components/Typography.styles.d.ts +3 -0
- package/out/ui/packages/typography/components/Typography.styles.lua +97 -0
- package/out/ui/packages/typography/index.d.ts +6 -0
- package/out/ui/packages/typography/init.lua +8 -0
- package/out/ui/packages/typography/types/TypographyAlignment.d.ts +1 -0
- package/out/ui/packages/typography/types/TypographyAlignment.lua +2 -0
- package/out/ui/packages/typography/types/TypographyColor.d.ts +1 -0
- package/out/ui/packages/typography/types/TypographyColor.lua +2 -0
- package/out/ui/packages/typography/types/TypographyDisplay.d.ts +1 -0
- package/out/ui/packages/typography/types/TypographyDisplay.lua +2 -0
- package/out/ui/packages/typography/types/index.d.ts +3 -0
- package/out/ui/packages/typography/types/init.lua +2 -0
- package/package.json +68 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local allFontFamilies = {
|
|
3
|
+
default = Enum.Font.SourceSans,
|
|
4
|
+
bold = Enum.Font.SourceSansBold,
|
|
5
|
+
semibold = Enum.Font.SourceSansSemibold,
|
|
6
|
+
light = Enum.Font.SourceSansLight,
|
|
7
|
+
italics = Enum.Font.SourceSansItalic,
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
allFontFamilies = allFontFamilies,
|
|
11
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="@rbxts/compiler-types" />
|
|
2
|
+
/// <reference types="@rbxts/types" />
|
|
3
|
+
export type FontFamilyVariant = "default" | "bold" | "semibold" | "light" | "italics";
|
|
4
|
+
export interface FontFamilyOptions extends Partial<Record<FontFamilyVariant, Required<Enum.Font>>> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="@rbxts/compiler-types" />
|
|
2
|
+
export type FontSizeVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body" | "caption" | "button" | "overline";
|
|
3
|
+
export interface FontSizeOptions extends Partial<Record<FontSizeVariant, Required<number>>> {
|
|
4
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local baseFontSize = 16
|
|
3
|
+
local allFontSizes = {
|
|
4
|
+
h1 = baseFontSize * 2,
|
|
5
|
+
h2 = baseFontSize * 1.5,
|
|
6
|
+
h3 = baseFontSize * 1.25,
|
|
7
|
+
body = baseFontSize,
|
|
8
|
+
caption = baseFontSize * 0.75,
|
|
9
|
+
overline = baseFontSize * 0.625,
|
|
10
|
+
button = baseFontSize * 0.875,
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
baseFontSize = baseFontSize,
|
|
14
|
+
allFontSizes = allFontSizes,
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tokens } from "../tokens/Tokens";
|
|
2
|
+
export type TypographyTokens = {
|
|
3
|
+
[key in Tokens]: string;
|
|
4
|
+
};
|
|
5
|
+
export interface TypographyWeights {
|
|
6
|
+
title: number;
|
|
7
|
+
heading: number;
|
|
8
|
+
body: number;
|
|
9
|
+
xl?: number;
|
|
10
|
+
lg?: number;
|
|
11
|
+
md?: number;
|
|
12
|
+
sm?: number;
|
|
13
|
+
xs?: number;
|
|
14
|
+
default?: number;
|
|
15
|
+
}
|
|
16
|
+
export type TypographyVariants = keyof TypographyWeights;
|
|
17
|
+
export declare const TypographyWeights: TypographyWeights;
|
|
18
|
+
export declare const TypographyTokens: TypographyTokens;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TypographyWeights = {
|
|
3
|
+
title = 800,
|
|
4
|
+
heading = 500,
|
|
5
|
+
body = 300,
|
|
6
|
+
}
|
|
7
|
+
local TypographyTokens = {
|
|
8
|
+
[120] = "64px",
|
|
9
|
+
[110] = "48px",
|
|
10
|
+
[100] = "40px",
|
|
11
|
+
[90] = "32px",
|
|
12
|
+
[80] = "28px",
|
|
13
|
+
[70] = "24px",
|
|
14
|
+
[60] = "20px",
|
|
15
|
+
[50] = "18px",
|
|
16
|
+
[40] = "16px",
|
|
17
|
+
[30] = "14px",
|
|
18
|
+
[20] = "12px",
|
|
19
|
+
[10] = "10px",
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
TypographyTokens = TypographyTokens,
|
|
23
|
+
TypographyWeights = TypographyWeights,
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as ThemeTypography } from "./ThemeTypography";
|
|
2
|
+
export * from "./FontSizes";
|
|
3
|
+
export * from "./FontFamilies";
|
|
4
|
+
export { FontSizeVariant } from "./FontSizeOptions";
|
|
5
|
+
export { FontSizeOptions } from "./FontSizeOptions";
|
|
6
|
+
export { FontFamilyVariant } from "./FontFamilyOptions";
|
|
7
|
+
export { FontFamilyOptions } from "./FontFamilyOptions";
|
|
8
|
+
export * from "./Variants";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
for _k, _v in TS.import(script, script, "FontSizes") or {} do
|
|
5
|
+
exports[_k] = _v
|
|
6
|
+
end
|
|
7
|
+
for _k, _v in TS.import(script, script, "FontFamilies") or {} do
|
|
8
|
+
exports[_k] = _v
|
|
9
|
+
end
|
|
10
|
+
for _k, _v in TS.import(script, script, "Variants") or {} do
|
|
11
|
+
exports[_k] = _v
|
|
12
|
+
end
|
|
13
|
+
return exports
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.createStyles = TS.import(script, script, "utilities").createStyles
|
|
5
|
+
exports.makeStyles = TS.import(script, script, "utilities").makeStyles
|
|
6
|
+
exports.classNames = TS.import(script, script, "utilities").classNames
|
|
7
|
+
return exports
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="@rbxts/compiler-types" />
|
|
3
|
+
import { WriteableStyle } from "./WriteableStyle";
|
|
4
|
+
export type ClassNameMap<ClassKey extends string = string, T extends Instance = Instance> = Record<ClassKey, Partial<WriteableStyle<T>>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="@rbxts/compiler-types" />
|
|
2
|
+
import { WriteableStyle } from "../types/WriteableStyle";
|
|
3
|
+
export type GenericStyle = {
|
|
4
|
+
[property: string]: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type ConditionalStyles = Map<WriteableStyle<any>, boolean>;
|
|
7
|
+
declare const classNames: (styles: ConditionalStyles) => GenericStyle;
|
|
8
|
+
export default classNames;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
-- eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
local classNames = function(styles)
|
|
4
|
+
-- eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
local style = {}
|
|
6
|
+
local _styles = styles
|
|
7
|
+
local _arg0 = function(value, key)
|
|
8
|
+
if value then
|
|
9
|
+
local _object = {}
|
|
10
|
+
for _k, _v in style do
|
|
11
|
+
_object[_k] = _v
|
|
12
|
+
end
|
|
13
|
+
for _k, _v in key do
|
|
14
|
+
_object[_k] = _v
|
|
15
|
+
end
|
|
16
|
+
style = _object
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
for _k, _v in _styles do
|
|
20
|
+
_arg0(_v, _k, _styles)
|
|
21
|
+
end
|
|
22
|
+
local _object = {}
|
|
23
|
+
for _k, _v in style do
|
|
24
|
+
_object[_k] = _v
|
|
25
|
+
end
|
|
26
|
+
return _object
|
|
27
|
+
end
|
|
28
|
+
local default = classNames
|
|
29
|
+
return {
|
|
30
|
+
default = default,
|
|
31
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.createStyles = TS.import(script, script, "createStyles").default
|
|
5
|
+
exports.makeStyles = TS.import(script, script, "makeStyles").default
|
|
6
|
+
exports.classNames = TS.import(script, script, "classNames").default
|
|
7
|
+
return exports
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Theme } from "../../interfaces/theme";
|
|
2
|
+
import { ClassNameMap } from "../types/styles";
|
|
3
|
+
type TMakeStyles<ClassKey extends string = string> = (theme: Theme) => ClassNameMap<ClassKey>;
|
|
4
|
+
type TMakeStylesWithProps<Props, ClassKey extends string = string> = (theme: Theme, props: Props) => ClassNameMap<ClassKey>;
|
|
5
|
+
type TVariantF<Props> = keyof Props extends never ? TMakeStyles : TMakeStylesWithProps<Props>;
|
|
6
|
+
declare const makeStyles: <Props = {}, ClassKey extends string = string>(f: TVariantF<Props>) => keyof Props extends never ? () => ClassNameMap<ClassKey> : (props: Props) => ClassNameMap<ClassKey>;
|
|
7
|
+
export default makeStyles;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local DefaultTheme = TS.import(script, script.Parent.Parent.Parent, "themes").default
|
|
4
|
+
local themeStore = TS.import(script, script.Parent.Parent.Parent, "components", "ThemeStore").themeStore
|
|
5
|
+
local makeStyles = function(f)
|
|
6
|
+
return function(props)
|
|
7
|
+
local _exitType, _returns = TS.try(function()
|
|
8
|
+
local theme = themeStore:getState().theme
|
|
9
|
+
local _fn = f
|
|
10
|
+
local _exp = theme or DefaultTheme
|
|
11
|
+
local _condition = props
|
|
12
|
+
if _condition == nil then
|
|
13
|
+
_condition = {}
|
|
14
|
+
end
|
|
15
|
+
return TS.TRY_RETURN, { _fn(_exp, _condition) }
|
|
16
|
+
end, function(e)
|
|
17
|
+
local _fn = f
|
|
18
|
+
local _condition = props
|
|
19
|
+
if _condition == nil then
|
|
20
|
+
_condition = {}
|
|
21
|
+
end
|
|
22
|
+
return TS.TRY_RETURN, { _fn(DefaultTheme, _condition) }
|
|
23
|
+
end)
|
|
24
|
+
if _exitType then
|
|
25
|
+
return unpack(_returns)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
local default = makeStyles
|
|
30
|
+
return {
|
|
31
|
+
default = default,
|
|
32
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local allFontSizes = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontSizes").allFontSizes
|
|
4
|
+
local _colors = TS.import(script, script.Parent.Parent, "interfaces", "palette", "colors")
|
|
5
|
+
local Blue = _colors.Blue
|
|
6
|
+
local Gray = _colors.Gray
|
|
7
|
+
local Dark = _colors.Dark
|
|
8
|
+
local Light = _colors.Light
|
|
9
|
+
local Common = _colors.Common
|
|
10
|
+
local Red = _colors.Red
|
|
11
|
+
local Green = _colors.Green
|
|
12
|
+
local Yellow = _colors.Yellow
|
|
13
|
+
local Purple = _colors.Purple
|
|
14
|
+
local Magenta = _colors.Magenta
|
|
15
|
+
local Orange = _colors.Orange
|
|
16
|
+
local Turquoise = _colors.Turquoise
|
|
17
|
+
local _constants = TS.import(script, script.Parent.Parent, "constants")
|
|
18
|
+
local BORDER_RADIUS = _constants.BORDER_RADIUS
|
|
19
|
+
local DARK_THEME_COLORS = _constants.DARK_THEME_COLORS
|
|
20
|
+
local PADDING_BASE = _constants.PADDING_BASE
|
|
21
|
+
local SPACING_BASE = _constants.SPACING_BASE
|
|
22
|
+
local CONTENT_WIDTH = _constants.CONTENT_WIDTH
|
|
23
|
+
local ICON_SIZES = _constants.ICON_SIZES
|
|
24
|
+
local DEFAULT_BORDERS = _constants.DEFAULT_BORDERS
|
|
25
|
+
local allFontFamilies = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontFamilies").allFontFamilies
|
|
26
|
+
local DarkTheme = {
|
|
27
|
+
type = "Dark",
|
|
28
|
+
palette = {
|
|
29
|
+
error = {
|
|
30
|
+
main = Red[50],
|
|
31
|
+
},
|
|
32
|
+
primary = {
|
|
33
|
+
main = Green[50],
|
|
34
|
+
},
|
|
35
|
+
secondary = {
|
|
36
|
+
main = Blue[50],
|
|
37
|
+
},
|
|
38
|
+
success = {
|
|
39
|
+
main = Green[50],
|
|
40
|
+
},
|
|
41
|
+
text = {
|
|
42
|
+
primary = Common.White,
|
|
43
|
+
secondary = Dark[70],
|
|
44
|
+
},
|
|
45
|
+
divider = Gray[70],
|
|
46
|
+
background = {
|
|
47
|
+
default = Common.Black,
|
|
48
|
+
paper = Gray[90],
|
|
49
|
+
},
|
|
50
|
+
warning = {
|
|
51
|
+
main = Yellow[50],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
spacing = {
|
|
55
|
+
default = SPACING_BASE,
|
|
56
|
+
calc = function(value)
|
|
57
|
+
return SPACING_BASE * value
|
|
58
|
+
end,
|
|
59
|
+
},
|
|
60
|
+
padding = {
|
|
61
|
+
default = PADDING_BASE,
|
|
62
|
+
calc = function(value)
|
|
63
|
+
return PADDING_BASE * value
|
|
64
|
+
end,
|
|
65
|
+
},
|
|
66
|
+
shape = {
|
|
67
|
+
borderRadius = BORDER_RADIUS,
|
|
68
|
+
},
|
|
69
|
+
typography = {
|
|
70
|
+
fontSizes = allFontSizes,
|
|
71
|
+
fontFamilies = allFontFamilies,
|
|
72
|
+
},
|
|
73
|
+
options = {
|
|
74
|
+
constants = {
|
|
75
|
+
contentWidth = CONTENT_WIDTH,
|
|
76
|
+
iconSizes = ICON_SIZES,
|
|
77
|
+
colors = DARK_THEME_COLORS,
|
|
78
|
+
borders = DEFAULT_BORDERS,
|
|
79
|
+
extendedPalette = {
|
|
80
|
+
Blue = Blue,
|
|
81
|
+
Common = Common,
|
|
82
|
+
Dark = Dark,
|
|
83
|
+
Gray = Gray,
|
|
84
|
+
Green = Green,
|
|
85
|
+
Light = Light,
|
|
86
|
+
Magenta = Magenta,
|
|
87
|
+
Orange = Orange,
|
|
88
|
+
Purple = Purple,
|
|
89
|
+
Red = Red,
|
|
90
|
+
Turquoise = Turquoise,
|
|
91
|
+
Yellow = Yellow,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
local default = DarkTheme
|
|
97
|
+
return {
|
|
98
|
+
default = default,
|
|
99
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local allFontSizes = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontSizes").allFontSizes
|
|
4
|
+
local _colors = TS.import(script, script.Parent.Parent, "interfaces", "palette", "colors")
|
|
5
|
+
local Blue = _colors.Blue
|
|
6
|
+
local Gray = _colors.Gray
|
|
7
|
+
local Dark = _colors.Dark
|
|
8
|
+
local Light = _colors.Light
|
|
9
|
+
local Common = _colors.Common
|
|
10
|
+
local Red = _colors.Red
|
|
11
|
+
local Green = _colors.Green
|
|
12
|
+
local Yellow = _colors.Yellow
|
|
13
|
+
local Purple = _colors.Purple
|
|
14
|
+
local Magenta = _colors.Magenta
|
|
15
|
+
local Orange = _colors.Orange
|
|
16
|
+
local Turquoise = _colors.Turquoise
|
|
17
|
+
local _constants = TS.import(script, script.Parent.Parent, "constants")
|
|
18
|
+
local BORDER_RADIUS = _constants.BORDER_RADIUS
|
|
19
|
+
local PADDING_BASE = _constants.PADDING_BASE
|
|
20
|
+
local SPACING_BASE = _constants.SPACING_BASE
|
|
21
|
+
local CONTENT_WIDTH = _constants.CONTENT_WIDTH
|
|
22
|
+
local ICON_SIZES = _constants.ICON_SIZES
|
|
23
|
+
local DEFAULT_BORDERS = _constants.DEFAULT_BORDERS
|
|
24
|
+
local LIGHT_THEME_COLORS = _constants.LIGHT_THEME_COLORS
|
|
25
|
+
local allFontFamilies = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontFamilies").allFontFamilies
|
|
26
|
+
local LightTheme = {
|
|
27
|
+
type = "Light",
|
|
28
|
+
palette = {
|
|
29
|
+
error = {
|
|
30
|
+
main = Red[50],
|
|
31
|
+
},
|
|
32
|
+
primary = {
|
|
33
|
+
main = Green[50],
|
|
34
|
+
},
|
|
35
|
+
secondary = {
|
|
36
|
+
main = Blue[50],
|
|
37
|
+
},
|
|
38
|
+
success = {
|
|
39
|
+
main = Green[50],
|
|
40
|
+
},
|
|
41
|
+
text = {
|
|
42
|
+
primary = Common.Black,
|
|
43
|
+
secondary = Dark[90],
|
|
44
|
+
},
|
|
45
|
+
divider = Gray[70],
|
|
46
|
+
background = {
|
|
47
|
+
default = Common.White,
|
|
48
|
+
paper = Gray[10],
|
|
49
|
+
},
|
|
50
|
+
warning = {
|
|
51
|
+
main = Yellow[50],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
spacing = {
|
|
55
|
+
default = SPACING_BASE,
|
|
56
|
+
calc = function(value)
|
|
57
|
+
return SPACING_BASE * value
|
|
58
|
+
end,
|
|
59
|
+
},
|
|
60
|
+
padding = {
|
|
61
|
+
default = PADDING_BASE,
|
|
62
|
+
calc = function(value)
|
|
63
|
+
return PADDING_BASE * value
|
|
64
|
+
end,
|
|
65
|
+
},
|
|
66
|
+
shape = {
|
|
67
|
+
borderRadius = BORDER_RADIUS,
|
|
68
|
+
},
|
|
69
|
+
typography = {
|
|
70
|
+
fontSizes = allFontSizes,
|
|
71
|
+
fontFamilies = allFontFamilies,
|
|
72
|
+
},
|
|
73
|
+
options = {
|
|
74
|
+
constants = {
|
|
75
|
+
contentWidth = CONTENT_WIDTH,
|
|
76
|
+
iconSizes = ICON_SIZES,
|
|
77
|
+
colors = LIGHT_THEME_COLORS,
|
|
78
|
+
borders = DEFAULT_BORDERS,
|
|
79
|
+
extendedPalette = {
|
|
80
|
+
Blue = Blue,
|
|
81
|
+
Common = Common,
|
|
82
|
+
Dark = Dark,
|
|
83
|
+
Gray = Gray,
|
|
84
|
+
Green = Green,
|
|
85
|
+
Light = Light,
|
|
86
|
+
Magenta = Magenta,
|
|
87
|
+
Orange = Orange,
|
|
88
|
+
Purple = Purple,
|
|
89
|
+
Red = Red,
|
|
90
|
+
Turquoise = Turquoise,
|
|
91
|
+
Yellow = Yellow,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
local default = LightTheme
|
|
97
|
+
return {
|
|
98
|
+
default = default,
|
|
99
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.default = TS.import(script, script, "DarkTheme").default
|
|
5
|
+
exports.DarkTheme = TS.import(script, script, "DarkTheme").default
|
|
6
|
+
exports.LightTheme = TS.import(script, script, "LightTheme").default
|
|
7
|
+
return exports
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CommonProps } from "./types";
|
|
2
|
+
export { BaseDefaultProps } from "./types";
|
|
3
|
+
export { BaseCustomizedProps } from "./types";
|
|
4
|
+
export { DefaultProps } from "./types";
|
|
5
|
+
export { CustomizedProps } from "./types";
|
|
6
|
+
export { CustomizedRef } from "./types";
|
|
7
|
+
export { CustomizedForwardRefComponent } from "./types";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="roact" />
|
|
3
|
+
/// <reference types="@rbxts/compiler-types" />
|
|
4
|
+
import Roact, { Element, PropsWithChildren } from "@rbxts/roact";
|
|
5
|
+
import { WriteableStyle } from "../interfaces";
|
|
6
|
+
export interface CommonProps<T extends Instance> extends PropsWithChildren {
|
|
7
|
+
className?: WriteableStyle<T>;
|
|
8
|
+
}
|
|
9
|
+
export type BaseDefaultProps<T extends Instance, P> = CommonProps<T> & P;
|
|
10
|
+
export type BaseCustomizedProps<T extends Instance, P> = BaseDefaultProps<T, P> & PropsWithChildren<{
|
|
11
|
+
component?: T;
|
|
12
|
+
}>;
|
|
13
|
+
export type DefaultProps<T extends Instance, P = {}> = BaseDefaultProps<T, P>;
|
|
14
|
+
export type CustomizedProps<T extends Instance, P = {}> = BaseCustomizedProps<T, P>;
|
|
15
|
+
export type CustomizedRef<T extends Instance> = T extends Instance ? any : T extends keyof Roact.JsxInstance<T> ? WritableInstanceProperties<T> : never;
|
|
16
|
+
export type CustomizedForwardRefComponent<D extends Instance, P = {}> = <T extends Instance = D>(props: PropsWithChildren<CustomizedProps<T, P>> & WritableInstanceProperties<CustomizedRef<T>>) => Element | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local Color3FromHex = function(hex)
|
|
3
|
+
local hextStr, _ = string.gsub(hex, "#", "")
|
|
4
|
+
local bigint = tonumber(hextStr, 16)
|
|
5
|
+
assert(bigint ~= 0 and (bigint == bigint and bigint), "Color3FromHex: Invalid hex value")
|
|
6
|
+
local r = bit32.band((bit32.arshift(bigint, 16)), 255)
|
|
7
|
+
local g = bit32.band((bit32.arshift(bigint, 8)), 255)
|
|
8
|
+
local b = bit32.band(bigint, 255)
|
|
9
|
+
return Color3.fromRGB(r, g, b)
|
|
10
|
+
end
|
|
11
|
+
local default = Color3FromHex
|
|
12
|
+
return {
|
|
13
|
+
default = default,
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Color3FromHex } from "./Color3FromHex";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ROBLOX_UI_OFFSET: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local DefaultTheme = TS.import(script, script.Parent.Parent.Parent, "theme").DefaultTheme
|
|
4
|
+
local ROBLOX_UI_OFFSET = DefaultTheme.spacing.calc(2) + DefaultTheme.padding.calc(4)
|
|
5
|
+
return {
|
|
6
|
+
ROBLOX_UI_OFFSET = ROBLOX_UI_OFFSET,
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v2.2.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
for _k, _v in TS.import(script, script, "ImageConstants") or {} do
|
|
5
|
+
exports[_k] = _v
|
|
6
|
+
end
|
|
7
|
+
for _k, _v in TS.import(script, script, "LayoutConstants") or {} do
|
|
8
|
+
exports[_k] = _v
|
|
9
|
+
end
|
|
10
|
+
return exports
|