@rbxts/uiblox 0.1.42 → 0.1.44
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/theme/constants/{ThemeConstants.d.ts → ColorConstants.d.ts} +0 -3
- package/out/theme/constants/{ThemeConstants.luau → ColorConstants.luau} +0 -7
- package/out/theme/constants/StateConstants.d.ts +3 -0
- package/out/theme/constants/StateConstants.luau +11 -0
- package/out/theme/constants/index.d.ts +2 -1
- package/out/theme/constants/init.luau +4 -1
- package/out/theme/context/provider.d.ts +1 -1
- package/out/theme/context/provider.luau +2 -3
- package/out/theme/themes/DarkTheme.luau +9 -8
- package/out/theme/themes/LightTheme.luau +9 -8
- package/package.json +1 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Colors } from "../interfaces/palette/colors/index";
|
|
2
2
|
import { Borders } from "../interfaces/spacing/index";
|
|
3
|
-
import { ThemeState } from "../types/index";
|
|
4
3
|
export declare const DARK_THEME_COLORS: Colors;
|
|
5
4
|
export declare const LIGHT_THEME_COLORS: Colors;
|
|
6
5
|
export declare const DEFAULT_BORDERS: Borders;
|
|
7
|
-
export declare const DEFAULT_THEME: import("../index").Theme;
|
|
8
|
-
export declare const INITIAL_THEME_STATE: ThemeState;
|
|
@@ -8,7 +8,6 @@ local Green = _colors.Green
|
|
|
8
8
|
local Purple = _colors.Purple
|
|
9
9
|
local Red = _colors.Red
|
|
10
10
|
local Yellow = _colors.Yellow
|
|
11
|
-
local DarkTheme = TS.import(script, script.Parent.Parent, "themes").DarkTheme
|
|
12
11
|
-- dark theme
|
|
13
12
|
local DARK_THEME_COLORS = {
|
|
14
13
|
backgroundDefault = Common.Black,
|
|
@@ -98,14 +97,8 @@ local DEFAULT_BORDERS = {
|
|
|
98
97
|
default = 1,
|
|
99
98
|
divider = 2,
|
|
100
99
|
}
|
|
101
|
-
local DEFAULT_THEME = DarkTheme
|
|
102
|
-
local INITIAL_THEME_STATE = {
|
|
103
|
-
theme = DEFAULT_THEME,
|
|
104
|
-
}
|
|
105
100
|
return {
|
|
106
101
|
DARK_THEME_COLORS = DARK_THEME_COLORS,
|
|
107
102
|
LIGHT_THEME_COLORS = LIGHT_THEME_COLORS,
|
|
108
103
|
DEFAULT_BORDERS = DEFAULT_BORDERS,
|
|
109
|
-
DEFAULT_THEME = DEFAULT_THEME,
|
|
110
|
-
INITIAL_THEME_STATE = INITIAL_THEME_STATE,
|
|
111
104
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local DarkTheme = TS.import(script, script.Parent.Parent, "themes").DarkTheme
|
|
4
|
+
local DEFAULT_THEME = DarkTheme
|
|
5
|
+
local INITIAL_THEME_STATE = {
|
|
6
|
+
theme = DEFAULT_THEME,
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
DEFAULT_THEME = DEFAULT_THEME,
|
|
10
|
+
INITIAL_THEME_STATE = INITIAL_THEME_STATE,
|
|
11
|
+
}
|
|
@@ -4,7 +4,10 @@ local exports = {}
|
|
|
4
4
|
for _k, _v in TS.import(script, script, "NumberConstants") 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, "StateConstants") or {} do
|
|
8
|
+
exports[_k] = _v
|
|
9
|
+
end
|
|
10
|
+
for _k, _v in TS.import(script, script, "ColorConstants") or {} do
|
|
8
11
|
exports[_k] = _v
|
|
9
12
|
end
|
|
10
13
|
return exports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "@rbxts/react";
|
|
2
2
|
import { ThemeDispatch, ThemeState } from "../types/index";
|
|
3
|
-
import { Theme } from "../index";
|
|
3
|
+
import { Theme } from "../interfaces/index";
|
|
4
4
|
export declare const ThemeContext: React.Context<{
|
|
5
5
|
state: ThemeState;
|
|
6
6
|
dispatch: ThemeDispatch | undefined;
|
|
@@ -5,9 +5,8 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useReducer = _react.useReducer
|
|
7
7
|
local themeReducer = TS.import(script, script.Parent, "reducer").default
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local ThemeActionTypes = _theme.ThemeActionTypes
|
|
8
|
+
local INITIAL_THEME_STATE = TS.import(script, script.Parent.Parent, "constants").INITIAL_THEME_STATE
|
|
9
|
+
local ThemeActionTypes = TS.import(script, script.Parent.Parent, "enums").ThemeActionTypes
|
|
11
10
|
local ThemeContext = React.createContext({
|
|
12
11
|
state = INITIAL_THEME_STATE,
|
|
13
12
|
dispatch = nil,
|
|
@@ -14,14 +14,15 @@ local Purple = _colors.Purple
|
|
|
14
14
|
local Magenta = _colors.Magenta
|
|
15
15
|
local Orange = _colors.Orange
|
|
16
16
|
local Turquoise = _colors.Turquoise
|
|
17
|
-
local
|
|
18
|
-
local BORDER_RADIUS =
|
|
19
|
-
local
|
|
20
|
-
local
|
|
21
|
-
local
|
|
22
|
-
local
|
|
23
|
-
local
|
|
24
|
-
local
|
|
17
|
+
local _NumberConstants = TS.import(script, script.Parent.Parent, "constants", "NumberConstants")
|
|
18
|
+
local BORDER_RADIUS = _NumberConstants.BORDER_RADIUS
|
|
19
|
+
local CONTENT_WIDTH = _NumberConstants.CONTENT_WIDTH
|
|
20
|
+
local ICON_SIZES = _NumberConstants.ICON_SIZES
|
|
21
|
+
local PADDING_BASE = _NumberConstants.PADDING_BASE
|
|
22
|
+
local SPACING_BASE = _NumberConstants.SPACING_BASE
|
|
23
|
+
local _ColorConstants = TS.import(script, script.Parent.Parent, "constants", "ColorConstants")
|
|
24
|
+
local DARK_THEME_COLORS = _ColorConstants.DARK_THEME_COLORS
|
|
25
|
+
local DEFAULT_BORDERS = _ColorConstants.DEFAULT_BORDERS
|
|
25
26
|
local allFontFamilies = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontFamilies").allFontFamilies
|
|
26
27
|
local DarkTheme = {
|
|
27
28
|
type = "Dark",
|
|
@@ -14,14 +14,15 @@ local Purple = _colors.Purple
|
|
|
14
14
|
local Magenta = _colors.Magenta
|
|
15
15
|
local Orange = _colors.Orange
|
|
16
16
|
local Turquoise = _colors.Turquoise
|
|
17
|
-
local
|
|
18
|
-
local BORDER_RADIUS =
|
|
19
|
-
local
|
|
20
|
-
local
|
|
21
|
-
local
|
|
22
|
-
local
|
|
23
|
-
local
|
|
24
|
-
local LIGHT_THEME_COLORS =
|
|
17
|
+
local _NumberConstants = TS.import(script, script.Parent.Parent, "constants", "NumberConstants")
|
|
18
|
+
local BORDER_RADIUS = _NumberConstants.BORDER_RADIUS
|
|
19
|
+
local CONTENT_WIDTH = _NumberConstants.CONTENT_WIDTH
|
|
20
|
+
local ICON_SIZES = _NumberConstants.ICON_SIZES
|
|
21
|
+
local PADDING_BASE = _NumberConstants.PADDING_BASE
|
|
22
|
+
local SPACING_BASE = _NumberConstants.SPACING_BASE
|
|
23
|
+
local _ColorConstants = TS.import(script, script.Parent.Parent, "constants", "ColorConstants")
|
|
24
|
+
local LIGHT_THEME_COLORS = _ColorConstants.LIGHT_THEME_COLORS
|
|
25
|
+
local DEFAULT_BORDERS = _ColorConstants.DEFAULT_BORDERS
|
|
25
26
|
local allFontFamilies = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontFamilies").allFontFamilies
|
|
26
27
|
local LightTheme = {
|
|
27
28
|
type = "Light",
|