@rbxts/uiblox 0.1.40 → 0.1.42
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 +1 -0
- package/out/theme/constants/ThemeConstants.luau +4 -2
- package/out/theme/index.d.ts +1 -1
- package/out/theme/init.luau +1 -1
- package/out/ui/constants/LayoutConstants.luau +2 -2
- package/out/ui/packages/toast/components/Toast.luau +2 -2
- package/out/ui/packages/toast/components/Toast.styles.luau +7 -7
- package/out/ui/packages/treeView/components/TreeView.luau +3 -3
- package/package.json +1 -1
|
@@ -4,4 +4,5 @@ import { ThemeState } from "../types/index";
|
|
|
4
4
|
export declare const DARK_THEME_COLORS: Colors;
|
|
5
5
|
export declare const LIGHT_THEME_COLORS: Colors;
|
|
6
6
|
export declare const DEFAULT_BORDERS: Borders;
|
|
7
|
+
export declare const DEFAULT_THEME: import("../index").Theme;
|
|
7
8
|
export declare const INITIAL_THEME_STATE: ThemeState;
|
|
@@ -8,7 +8,7 @@ local Green = _colors.Green
|
|
|
8
8
|
local Purple = _colors.Purple
|
|
9
9
|
local Red = _colors.Red
|
|
10
10
|
local Yellow = _colors.Yellow
|
|
11
|
-
local
|
|
11
|
+
local DarkTheme = TS.import(script, script.Parent.Parent, "themes").DarkTheme
|
|
12
12
|
-- dark theme
|
|
13
13
|
local DARK_THEME_COLORS = {
|
|
14
14
|
backgroundDefault = Common.Black,
|
|
@@ -98,12 +98,14 @@ local DEFAULT_BORDERS = {
|
|
|
98
98
|
default = 1,
|
|
99
99
|
divider = 2,
|
|
100
100
|
}
|
|
101
|
+
local DEFAULT_THEME = DarkTheme
|
|
101
102
|
local INITIAL_THEME_STATE = {
|
|
102
|
-
theme =
|
|
103
|
+
theme = DEFAULT_THEME,
|
|
103
104
|
}
|
|
104
105
|
return {
|
|
105
106
|
DARK_THEME_COLORS = DARK_THEME_COLORS,
|
|
106
107
|
LIGHT_THEME_COLORS = LIGHT_THEME_COLORS,
|
|
107
108
|
DEFAULT_BORDERS = DEFAULT_BORDERS,
|
|
109
|
+
DEFAULT_THEME = DEFAULT_THEME,
|
|
108
110
|
INITIAL_THEME_STATE = INITIAL_THEME_STATE,
|
|
109
111
|
}
|
package/out/theme/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as Theme } from "./interfaces/theme/Theme";
|
|
2
2
|
export { useThemeCallbacks } from "./callbacks/index";
|
|
3
3
|
export * from "./constants/index";
|
|
4
|
+
export { DEFAULT_THEME } from "./constants/index";
|
|
4
5
|
export * from "./context/index";
|
|
5
6
|
export { ThemeProvider } from "./context/index";
|
|
6
7
|
export { themeReducer } from "./context/index";
|
|
@@ -9,7 +10,6 @@ export { useTheme } from "./hooks/index";
|
|
|
9
10
|
export * from "./interfaces/index";
|
|
10
11
|
export * from "./styles/index";
|
|
11
12
|
export * from "./themes/index";
|
|
12
|
-
export { default as DefaultTheme } from "./themes/index";
|
|
13
13
|
export { default as DarkTheme } from "./themes/DarkTheme";
|
|
14
14
|
export { default as LightTheme } from "./themes/LightTheme";
|
|
15
15
|
export { ThemeState } from "./types/index";
|
package/out/theme/init.luau
CHANGED
|
@@ -5,6 +5,7 @@ exports.useThemeCallbacks = TS.import(script, script, "callbacks").useThemeCallb
|
|
|
5
5
|
for _k, _v in TS.import(script, script, "constants") or {} do
|
|
6
6
|
exports[_k] = _v
|
|
7
7
|
end
|
|
8
|
+
exports.DEFAULT_THEME = TS.import(script, script, "constants").DEFAULT_THEME
|
|
8
9
|
for _k, _v in TS.import(script, script, "context") or {} do
|
|
9
10
|
exports[_k] = _v
|
|
10
11
|
end
|
|
@@ -23,7 +24,6 @@ end
|
|
|
23
24
|
for _k, _v in TS.import(script, script, "themes") or {} do
|
|
24
25
|
exports[_k] = _v
|
|
25
26
|
end
|
|
26
|
-
exports.DefaultTheme = TS.import(script, script, "themes").default
|
|
27
27
|
exports.DarkTheme = TS.import(script, script, "themes", "DarkTheme").default
|
|
28
28
|
exports.LightTheme = TS.import(script, script, "themes", "LightTheme").default
|
|
29
29
|
for _k, _v in TS.import(script, script, "utilites") or {} do
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local ROBLOX_UI_OFFSET =
|
|
3
|
+
local DEFAULT_THEME = TS.import(script, script.Parent.Parent.Parent, "theme").DEFAULT_THEME
|
|
4
|
+
local ROBLOX_UI_OFFSET = DEFAULT_THEME.spacing.calc(2) + DEFAULT_THEME.padding.calc(4)
|
|
5
5
|
return {
|
|
6
6
|
ROBLOX_UI_OFFSET = ROBLOX_UI_OFFSET,
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
5
5
|
local React = _react
|
|
6
6
|
local useEffect = _react.useEffect
|
|
7
7
|
local useRef = _react.useRef
|
|
8
|
-
local
|
|
8
|
+
local DEFAULT_THEME = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DEFAULT_THEME
|
|
9
9
|
local Directions = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Directions
|
|
10
10
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
11
11
|
local useToastStyles = TS.import(script, script.Parent, "Toast.styles").default
|
|
@@ -73,7 +73,7 @@ local function Toast(props)
|
|
|
73
73
|
end
|
|
74
74
|
local _exp = React.createElement("uicorner", {
|
|
75
75
|
key = "Corner",
|
|
76
|
-
CornerRadius = UDim.new(0,
|
|
76
|
+
CornerRadius = UDim.new(0, DEFAULT_THEME.shape.borderRadius),
|
|
77
77
|
})
|
|
78
78
|
local _exp_1 = React.createElement(Shadow)
|
|
79
79
|
local _attributes_1 = {
|
|
@@ -3,7 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
5
|
local makeStyles = _theme.makeStyles
|
|
6
|
-
local
|
|
6
|
+
local DEFAULT_THEME = _theme.DEFAULT_THEME
|
|
7
7
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
8
8
|
local ToastVariants = TS.import(script, script.Parent.Parent, "enums", "ToastVariants").default
|
|
9
9
|
local useToastStyles = makeStyles(function(theme, _param)
|
|
@@ -14,19 +14,19 @@ local useToastStyles = makeStyles(function(theme, _param)
|
|
|
14
14
|
local getToastColor = function()
|
|
15
15
|
repeat
|
|
16
16
|
if variant == (ToastVariants.success) then
|
|
17
|
-
return
|
|
17
|
+
return DEFAULT_THEME.palette.success.main
|
|
18
18
|
end
|
|
19
19
|
if variant == (ToastVariants.error) then
|
|
20
|
-
return
|
|
20
|
+
return DEFAULT_THEME.palette.error.main
|
|
21
21
|
end
|
|
22
22
|
if variant == (ToastVariants.warning) then
|
|
23
|
-
return
|
|
23
|
+
return DEFAULT_THEME.palette.warning.main
|
|
24
24
|
end
|
|
25
|
-
return
|
|
25
|
+
return DEFAULT_THEME.options.constants.colors.backgroundUIContrast
|
|
26
26
|
until true
|
|
27
27
|
end
|
|
28
|
-
local ACTIVE_POSITION = UDim2.new(0.5, 0, 1, -
|
|
29
|
-
local INACTIVE_POSITION = UDim2.new(0.5, 0, 1,
|
|
28
|
+
local ACTIVE_POSITION = UDim2.new(0.5, 0, 1, -DEFAULT_THEME.padding.calc(2))
|
|
29
|
+
local INACTIVE_POSITION = UDim2.new(0.5, 0, 1, DEFAULT_THEME.spacing.calc(20) + DEFAULT_THEME.padding.calc(2))
|
|
30
30
|
return createStyles({
|
|
31
31
|
container = {
|
|
32
32
|
Size = UDim2.new(0, theme.spacing.calc(20), 0, theme.spacing.calc(4)),
|
|
@@ -5,7 +5,7 @@ local React = _react
|
|
|
5
5
|
local useCallback = _react.useCallback
|
|
6
6
|
local useEffect = _react.useEffect
|
|
7
7
|
local useState = _react.useState
|
|
8
|
-
local
|
|
8
|
+
local DEFAULT_THEME = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DEFAULT_THEME
|
|
9
9
|
local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
10
10
|
local Typography = TS.import(script, script.Parent.Parent.Parent, "typography").Typography
|
|
11
11
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
@@ -247,7 +247,7 @@ local function TreeView(props)
|
|
|
247
247
|
_attributes_5.icon = if table.find(expanded, _branch) ~= nil then Icons.Expanded else Icons.Collapsed
|
|
248
248
|
_attributes_5.size = "xxs"
|
|
249
249
|
_attributes_5.className = branchIcon
|
|
250
|
-
_attributes_5.tint =
|
|
250
|
+
_attributes_5.tint = DEFAULT_THEME.options.constants.extendedPalette.Gray[70]
|
|
251
251
|
_condition_1 = (React.createElement(Icon, _attributes_5))
|
|
252
252
|
end
|
|
253
253
|
local _attributes_5 = {
|
|
@@ -288,7 +288,7 @@ local function TreeView(props)
|
|
|
288
288
|
icon = icon or Icons.ListPrimary,
|
|
289
289
|
size = "xs",
|
|
290
290
|
className = leafIcon,
|
|
291
|
-
tint =
|
|
291
|
+
tint = DEFAULT_THEME.palette.secondary.main,
|
|
292
292
|
})
|
|
293
293
|
local _attributes_7 = {
|
|
294
294
|
text = leaf.title,
|