@rbxts/uiblox 0.1.7 → 0.1.10
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/README.md +33 -37
- package/out/index.d.ts +2 -2
- package/out/{init.lua → init.luau} +1 -1
- package/out/theme/components/ThemeProvider.d.ts +3 -3
- package/out/theme/components/{ThemeProvider.lua → ThemeProvider.luau} +6 -22
- package/out/theme/components/ThemeStore.d.ts +1 -2
- package/out/theme/components/{ThemeStore.lua → ThemeStore.luau} +1 -1
- package/out/theme/components/ThemeWrapper.d.ts +3 -3
- package/out/theme/components/{ThemeWrapper.lua → ThemeWrapper.luau} +6 -21
- package/out/theme/components/{init.lua → init.luau} +1 -1
- package/out/theme/constants/NumberConstants.d.ts +1 -1
- package/out/theme/constants/{NumberConstants.lua → NumberConstants.luau} +1 -1
- package/out/theme/constants/ThemeConstants.d.ts +2 -2
- package/out/theme/constants/{ThemeConstants.lua → ThemeConstants.luau} +1 -1
- package/out/theme/constants/{init.lua → init.luau} +1 -1
- package/out/theme/index.d.ts +17 -17
- package/out/theme/{init.lua → init.luau} +1 -1
- package/out/theme/interfaces/iconSizes/IconSizes.luau +2 -0
- package/out/theme/interfaces/iconSizes/init.luau +2 -0
- package/out/theme/interfaces/index.d.ts +13 -13
- package/out/theme/interfaces/{init.lua → init.luau} +1 -1
- package/out/theme/interfaces/palette/Palette.d.ts +0 -1
- package/out/theme/interfaces/palette/Palette.luau +2 -0
- package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +1 -2
- package/out/theme/interfaces/palette/colorTokens/ColorTokens.luau +2 -0
- package/out/theme/interfaces/palette/colorTokens/init.luau +2 -0
- package/out/theme/interfaces/palette/colors/{Blue.lua → Blue.luau} +1 -1
- package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -1
- package/out/theme/interfaces/palette/colors/Colors.luau +2 -0
- package/out/theme/interfaces/palette/colors/Common.d.ts +0 -1
- package/out/theme/interfaces/palette/colors/{Common.lua → Common.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Dark.lua → Dark.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Gray.lua → Gray.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Green.lua → Green.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Light.lua → Light.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Magenta.lua → Magenta.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Orange.lua → Orange.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Purple.lua → Purple.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Red.lua → Red.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Turquoise.lua → Turquoise.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{Yellow.lua → Yellow.luau} +1 -1
- package/out/theme/interfaces/palette/colors/{init.lua → init.luau} +1 -1
- package/out/theme/interfaces/palette/index.d.ts +2 -2
- package/out/theme/interfaces/palette/{init.lua → init.luau} +1 -1
- package/out/theme/interfaces/spacing/Borders.luau +2 -0
- package/out/theme/interfaces/spacing/Padding.luau +2 -0
- package/out/theme/interfaces/spacing/Shape.luau +2 -0
- package/out/theme/interfaces/spacing/Spacing.luau +2 -0
- package/out/theme/interfaces/spacing/init.luau +2 -0
- package/out/theme/interfaces/theme/Theme.d.ts +3 -3
- package/out/theme/interfaces/theme/Theme.luau +2 -0
- package/out/theme/interfaces/theme/ThemeConstants.d.ts +4 -4
- package/out/theme/interfaces/theme/ThemeConstants.luau +2 -0
- package/out/theme/interfaces/theme/ThemeOptions.luau +2 -0
- package/out/theme/interfaces/theme/init.luau +2 -0
- package/out/theme/interfaces/tokens/Tokens.luau +2 -0
- package/out/theme/interfaces/tokens/init.luau +2 -0
- package/out/theme/interfaces/typography/{FontFamilies.lua → FontFamilies.luau} +1 -1
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +0 -2
- package/out/theme/interfaces/typography/FontFamilyOptions.luau +2 -0
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +0 -1
- package/out/theme/interfaces/typography/FontSizeOptions.luau +2 -0
- package/out/theme/interfaces/typography/{FontSizes.lua → FontSizes.luau} +1 -1
- package/out/theme/interfaces/typography/ThemeTypography.luau +2 -0
- package/out/theme/interfaces/typography/{Variants.lua → Variants.luau} +1 -1
- package/out/theme/interfaces/typography/{init.lua → init.luau} +1 -1
- package/out/theme/styles/index.d.ts +5 -5
- package/out/theme/styles/{init.lua → init.luau} +1 -1
- package/out/theme/styles/types/WriteableStyle.d.ts +0 -2
- package/out/theme/styles/types/WriteableStyle.luau +2 -0
- package/out/theme/styles/types/init.luau +2 -0
- package/out/theme/styles/types/styles.d.ts +0 -2
- package/out/theme/styles/types/styles.luau +2 -0
- package/out/theme/styles/utilities/classNames.d.ts +2 -3
- package/out/theme/styles/utilities/classNames.luau +33 -0
- package/out/theme/styles/utilities/{createStyles.lua → createStyles.luau} +1 -1
- package/out/theme/styles/utilities/{init.lua → init.luau} +1 -1
- package/out/theme/styles/utilities/makeStyles.d.ts +1 -1
- package/out/theme/styles/utilities/{makeStyles.lua → makeStyles.luau} +1 -1
- package/out/theme/themes/DarkTheme.d.ts +1 -1
- package/out/theme/themes/{DarkTheme.lua → DarkTheme.luau} +1 -1
- package/out/theme/themes/LightTheme.d.ts +1 -1
- package/out/theme/themes/{LightTheme.lua → LightTheme.luau} +1 -1
- package/out/theme/themes/{init.lua → init.luau} +1 -1
- package/out/theme/types/init.luau +2 -0
- package/out/theme/types/types.d.ts +5 -8
- package/out/theme/types/{types.lua → types.luau} +1 -1
- package/out/theme/utilites/{Color3FromHex.lua → Color3FromHex.luau} +2 -2
- package/out/theme/utilites/{init.lua → init.luau} +1 -1
- package/out/ui/constants/{ImageConstants.lua → ImageConstants.luau} +1 -1
- package/out/ui/constants/{LayoutConstants.lua → LayoutConstants.luau} +1 -1
- package/out/ui/constants/{init.lua → init.luau} +1 -1
- package/out/ui/enums/Directions.luau +12 -0
- package/out/ui/enums/Icons.luau +44 -0
- package/out/ui/enums/Orientations.luau +8 -0
- package/out/ui/enums/{init.lua → init.luau} +1 -1
- package/out/ui/index.d.ts +34 -34
- package/out/ui/{init.lua → init.luau} +1 -1
- package/out/ui/packages/button/components/Button.d.ts +3 -5
- package/out/ui/packages/button/components/{Button.lua → Button.luau} +63 -88
- package/out/ui/packages/button/components/Button.styles.d.ts +1 -1
- package/out/ui/packages/button/components/{Button.styles.lua → Button.styles.luau} +1 -1
- package/out/ui/packages/button/index.d.ts +3 -3
- package/out/ui/packages/button/{init.lua → init.luau} +1 -1
- package/out/ui/packages/button/types/ButtonColor.luau +2 -0
- package/out/ui/packages/button/types/ButtonSize.luau +2 -0
- package/out/ui/packages/button/types/ButtonVariant.luau +2 -0
- package/out/ui/packages/button/types/init.luau +2 -0
- package/out/ui/packages/divider/components/Divider.d.ts +2 -6
- package/out/ui/packages/divider/components/{Divider.lua → Divider.luau} +6 -10
- package/out/ui/packages/divider/components/Divider.styles.d.ts +1 -1
- package/out/ui/packages/divider/components/{Divider.styles.lua → Divider.styles.luau} +1 -1
- package/out/ui/packages/divider/{init.lua → init.luau} +1 -1
- package/out/ui/packages/icon/components/Icon.d.ts +2 -5
- package/out/ui/packages/icon/components/{Icon.lua → Icon.luau} +5 -9
- package/out/ui/packages/icon/components/Icon.styles.d.ts +1 -1
- package/out/ui/packages/icon/components/{Icon.styles.lua → Icon.styles.luau} +1 -1
- package/out/ui/packages/icon/{init.lua → init.luau} +1 -1
- package/out/ui/packages/iconButton/components/IconButton.d.ts +2 -5
- package/out/ui/packages/iconButton/components/{IconButton.lua → IconButton.luau} +18 -20
- package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +1 -1
- package/out/ui/packages/iconButton/components/{IconButton.styles.lua → IconButton.styles.luau} +1 -1
- package/out/ui/packages/iconButton/{init.lua → init.luau} +1 -1
- package/out/ui/packages/index.d.ts +11 -11
- package/out/ui/packages/{init.lua → init.luau} +1 -1
- package/out/ui/packages/input/components/Input.d.ts +2 -6
- package/out/ui/packages/input/components/{Input.lua → Input.luau} +38 -69
- package/out/ui/packages/input/components/Input.styles.d.ts +1 -1
- package/out/ui/packages/input/components/{Input.styles.lua → Input.styles.luau} +1 -1
- package/out/ui/packages/input/index.d.ts +3 -3
- package/out/ui/packages/input/{init.lua → init.luau} +1 -1
- package/out/ui/packages/input/types/InputColor.luau +2 -0
- package/out/ui/packages/input/types/InputMargin.luau +2 -0
- package/out/ui/packages/input/types/InputVariant.luau +2 -0
- package/out/ui/packages/input/types/init.luau +2 -0
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +1 -3
- package/out/ui/packages/progressBar/components/ProgressBar.luau +46 -0
- package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +1 -1
- package/out/ui/packages/progressBar/components/{ProgressBar.styles.lua → ProgressBar.styles.luau} +1 -1
- package/out/ui/packages/progressBar/{init.lua → init.luau} +1 -1
- package/out/ui/packages/shadow/components/Shadow.d.ts +0 -1
- package/out/ui/packages/shadow/components/{Shadow.lua → Shadow.luau} +14 -24
- package/out/ui/packages/shadow/components/Shadow.styles.d.ts +1 -1
- package/out/ui/packages/shadow/components/{Shadow.styles.lua → Shadow.styles.luau} +1 -1
- package/out/ui/packages/shadow/{init.lua → init.luau} +1 -1
- package/out/ui/packages/sidebar/components/Sidebar.d.ts +1 -3
- package/out/ui/packages/sidebar/components/Sidebar.luau +26 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +1 -1
- package/out/ui/packages/sidebar/components/{Sidebar.styles.lua → Sidebar.styles.luau} +1 -1
- package/out/ui/packages/sidebar/index.d.ts +1 -1
- package/out/ui/packages/sidebar/{init.lua → init.luau} +1 -1
- package/out/ui/packages/sidebar/types/SidebarType.luau +2 -0
- package/out/ui/packages/sidebar/types/init.luau +2 -0
- package/out/ui/packages/toast/components/Toast.d.ts +0 -1
- package/out/ui/packages/toast/components/{Toast.lua → Toast.luau} +21 -29
- package/out/ui/packages/toast/components/Toast.styles.d.ts +1 -1
- package/out/ui/packages/toast/components/{Toast.styles.lua → Toast.styles.luau} +1 -1
- package/out/ui/packages/toast/enums/ToastVariants.luau +11 -0
- package/out/ui/packages/toast/{init.lua → init.luau} +1 -1
- package/out/ui/packages/toast/interfaces/ToastEvent.luau +2 -0
- package/out/ui/packages/treeView/components/TreeView.d.ts +2 -4
- package/out/ui/packages/treeView/components/{TreeView.lua → TreeView.luau} +116 -149
- package/out/ui/packages/treeView/components/TreeView.styles.d.ts +1 -1
- package/out/ui/packages/treeView/components/{TreeView.styles.lua → TreeView.styles.luau} +1 -1
- package/out/ui/packages/treeView/{init.lua → init.luau} +1 -1
- package/out/ui/packages/treeView/interfaces/Branch.luau +2 -0
- package/out/ui/packages/treeView/interfaces/Leaf.luau +2 -0
- package/out/ui/packages/treeView/interfaces/Tree.luau +2 -0
- package/out/ui/packages/typography/components/Typography.d.ts +2 -4
- package/out/ui/packages/typography/components/{Typography.lua → Typography.luau} +7 -22
- package/out/ui/packages/typography/components/Typography.styles.d.ts +1 -1
- package/out/ui/packages/typography/components/{Typography.styles.lua → Typography.styles.luau} +1 -1
- package/out/ui/packages/typography/index.d.ts +3 -3
- package/out/ui/packages/typography/{init.lua → init.luau} +1 -1
- package/out/ui/packages/typography/types/TypographyAlignment.luau +2 -0
- package/out/ui/packages/typography/types/TypographyColor.luau +2 -0
- package/out/ui/packages/typography/types/TypographyDisplay.luau +2 -0
- package/out/ui/packages/typography/types/init.luau +2 -0
- package/package.json +16 -19
- package/out/theme/interfaces/iconSizes/IconSizes.lua +0 -2
- package/out/theme/interfaces/iconSizes/init.lua +0 -2
- package/out/theme/interfaces/palette/Palette.lua +0 -2
- package/out/theme/interfaces/palette/colorTokens/ColorTokens.lua +0 -2
- package/out/theme/interfaces/palette/colorTokens/init.lua +0 -2
- package/out/theme/interfaces/palette/colors/Colors.lua +0 -2
- package/out/theme/interfaces/spacing/Borders.lua +0 -2
- package/out/theme/interfaces/spacing/Padding.lua +0 -2
- package/out/theme/interfaces/spacing/Shape.lua +0 -2
- package/out/theme/interfaces/spacing/Spacing.lua +0 -2
- package/out/theme/interfaces/spacing/init.lua +0 -2
- package/out/theme/interfaces/theme/Theme.lua +0 -2
- package/out/theme/interfaces/theme/ThemeConstants.lua +0 -2
- package/out/theme/interfaces/theme/ThemeOptions.lua +0 -2
- package/out/theme/interfaces/theme/init.lua +0 -2
- package/out/theme/interfaces/tokens/Tokens.lua +0 -2
- package/out/theme/interfaces/tokens/init.lua +0 -2
- package/out/theme/interfaces/typography/FontFamilyOptions.lua +0 -2
- package/out/theme/interfaces/typography/FontSizeOptions.lua +0 -2
- package/out/theme/interfaces/typography/ThemeTypography.lua +0 -2
- package/out/theme/styles/types/WriteableStyle.lua +0 -2
- package/out/theme/styles/types/init.lua +0 -2
- package/out/theme/styles/types/styles.lua +0 -2
- package/out/theme/styles/utilities/classNames.lua +0 -31
- package/out/theme/types/init.lua +0 -2
- package/out/ui/enums/Directions.lua +0 -23
- package/out/ui/enums/Icons.lua +0 -87
- package/out/ui/enums/Orientations.lua +0 -15
- package/out/ui/packages/button/types/ButtonColor.lua +0 -2
- package/out/ui/packages/button/types/ButtonSize.lua +0 -2
- package/out/ui/packages/button/types/ButtonVariant.lua +0 -2
- package/out/ui/packages/button/types/init.lua +0 -2
- package/out/ui/packages/input/types/InputColor.lua +0 -2
- package/out/ui/packages/input/types/InputMargin.lua +0 -2
- package/out/ui/packages/input/types/InputVariant.lua +0 -2
- package/out/ui/packages/input/types/init.lua +0 -2
- package/out/ui/packages/progressBar/components/ProgressBar.lua +0 -76
- package/out/ui/packages/sidebar/components/Sidebar.lua +0 -46
- package/out/ui/packages/sidebar/types/SidebarType.lua +0 -2
- package/out/ui/packages/sidebar/types/init.lua +0 -2
- package/out/ui/packages/toast/enums/ToastVariants.lua +0 -20
- package/out/ui/packages/toast/interfaces/ToastEvent.lua +0 -2
- package/out/ui/packages/treeView/interfaces/Branch.lua +0 -2
- package/out/ui/packages/treeView/interfaces/Leaf.lua +0 -2
- package/out/ui/packages/treeView/interfaces/Tree.lua +0 -2
- package/out/ui/packages/typography/types/TypographyAlignment.lua +0 -2
- package/out/ui/packages/typography/types/TypographyColor.lua +0 -2
- package/out/ui/packages/typography/types/TypographyDisplay.lua +0 -2
- package/out/ui/packages/typography/types/init.lua +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- Compiled with roblox-ts
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
3
|
+
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
|
|
4
4
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
5
5
|
local markPureComponent = _roact_hooked.markPureComponent
|
|
6
6
|
local useCallback = _roact_hooked.useCallback
|
|
@@ -37,14 +37,16 @@ local function TreeView(props)
|
|
|
37
37
|
end
|
|
38
38
|
local height = 0
|
|
39
39
|
local _exp = rbx:GetChildren()
|
|
40
|
-
|
|
40
|
+
-- ▼ ReadonlyArray.forEach ▼
|
|
41
|
+
local _callback = function(c)
|
|
41
42
|
if c:IsA("GuiObject") then
|
|
42
43
|
height += c.AbsoluteSize.Y
|
|
43
44
|
end
|
|
44
45
|
end
|
|
45
46
|
for _k, _v in _exp do
|
|
46
|
-
|
|
47
|
+
_callback(_v, _k - 1, _exp)
|
|
47
48
|
end
|
|
49
|
+
-- ▲ ReadonlyArray.forEach ▲
|
|
48
50
|
TS.try(function()
|
|
49
51
|
setCanvasSize(UDim2.new(0, 0, 0, height))
|
|
50
52
|
end, function()
|
|
@@ -65,14 +67,16 @@ local function TreeView(props)
|
|
|
65
67
|
return true
|
|
66
68
|
end
|
|
67
69
|
local parts = string.split(title, "/")
|
|
68
|
-
|
|
70
|
+
-- ▼ ReadonlyArray.forEach ▼
|
|
71
|
+
local _callback = function(part)
|
|
69
72
|
if #part >= #filter and string.sub(string.upper(part), 1, #filter) == string.upper(filter) then
|
|
70
73
|
isMatch = true
|
|
71
74
|
end
|
|
72
75
|
end
|
|
73
76
|
for _k, _v in parts do
|
|
74
|
-
|
|
77
|
+
_callback(_v, _k - 1, parts)
|
|
75
78
|
end
|
|
79
|
+
-- ▲ ReadonlyArray.forEach ▲
|
|
76
80
|
return isMatch
|
|
77
81
|
end, { filter })
|
|
78
82
|
-- Automatically expand branches that match filter
|
|
@@ -91,8 +95,9 @@ local function TreeView(props)
|
|
|
91
95
|
end
|
|
92
96
|
local newExpanded = {}
|
|
93
97
|
-- Figure out which branches should be expanded
|
|
94
|
-
local
|
|
95
|
-
|
|
98
|
+
local _exp = tree.branches
|
|
99
|
+
-- ▼ ReadonlyArray.forEach ▼
|
|
100
|
+
local _callback = function(branch)
|
|
96
101
|
local matchesBranchFilter = matchesFilter(branch.title)
|
|
97
102
|
if matchesBranchFilter then
|
|
98
103
|
-- If branch is a match, whole branch should be expanded
|
|
@@ -103,8 +108,9 @@ local function TreeView(props)
|
|
|
103
108
|
end
|
|
104
109
|
else
|
|
105
110
|
-- If any of the leaves are a match, branch should be expanded
|
|
106
|
-
local
|
|
107
|
-
|
|
111
|
+
local _exp_1 = branch.leaves
|
|
112
|
+
-- ▼ ReadonlyArray.forEach ▼
|
|
113
|
+
local _callback_1 = function(leaf)
|
|
108
114
|
local _branch = branch
|
|
109
115
|
if table.find(newExpanded, _branch) ~= nil then
|
|
110
116
|
return nil
|
|
@@ -115,28 +121,26 @@ local function TreeView(props)
|
|
|
115
121
|
table.insert(newExpanded, _branch_1)
|
|
116
122
|
end
|
|
117
123
|
end
|
|
118
|
-
for _k, _v in
|
|
119
|
-
|
|
124
|
+
for _k, _v in _exp_1 do
|
|
125
|
+
_callback_1(_v, _k - 1, _exp_1)
|
|
120
126
|
end
|
|
127
|
+
-- ▲ ReadonlyArray.forEach ▲
|
|
121
128
|
end
|
|
122
129
|
end
|
|
123
|
-
for _k, _v in
|
|
124
|
-
|
|
130
|
+
for _k, _v in _exp do
|
|
131
|
+
_callback(_v, _k - 1, _exp)
|
|
125
132
|
end
|
|
133
|
+
-- ▲ ReadonlyArray.forEach ▲
|
|
126
134
|
-- Set expanded to new array
|
|
127
135
|
setExpanded(newExpanded)
|
|
128
136
|
end, { tree, filter })
|
|
129
|
-
local _attributes =
|
|
130
|
-
|
|
131
|
-
_attributes[_k] = _v
|
|
132
|
-
end
|
|
137
|
+
local _attributes = table.clone(root)
|
|
138
|
+
setmetatable(_attributes, nil)
|
|
133
139
|
if className then
|
|
134
140
|
for _k, _v in className do
|
|
135
141
|
_attributes[_k] = _v
|
|
136
142
|
end
|
|
137
143
|
end
|
|
138
|
-
local _children = {}
|
|
139
|
-
local _length = #_children
|
|
140
144
|
local _attributes_1 = {}
|
|
141
145
|
local _object = {
|
|
142
146
|
Text = tree.title,
|
|
@@ -148,24 +152,22 @@ local function TreeView(props)
|
|
|
148
152
|
_attributes_1.color = "textSecondary"
|
|
149
153
|
_attributes_1.variant = "body"
|
|
150
154
|
_attributes_1.family = "bold"
|
|
151
|
-
|
|
152
|
-
local _attributes_2 =
|
|
153
|
-
|
|
154
|
-
_attributes_2[_k] = _v
|
|
155
|
-
end
|
|
155
|
+
local _exp = Roact.jsx(Typography, _attributes_1)
|
|
156
|
+
local _attributes_2 = table.clone(list)
|
|
157
|
+
setmetatable(_attributes_2, nil)
|
|
156
158
|
_attributes_2.CanvasSize = canvasSize
|
|
157
|
-
_attributes_2
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
local _attributes_3 =
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
local
|
|
168
|
-
local
|
|
159
|
+
_attributes_2.Event = {
|
|
160
|
+
AncestryChanged = resizeScrollingFrame,
|
|
161
|
+
ChildAdded = resizeScrollingFrame,
|
|
162
|
+
ChildRemoved = resizeScrollingFrame,
|
|
163
|
+
}
|
|
164
|
+
local _attributes_3 = table.clone(gridLayout)
|
|
165
|
+
setmetatable(_attributes_3, nil)
|
|
166
|
+
local _exp_1 = Roact.jsx("uigridlayout", _attributes_3)
|
|
167
|
+
local _exp_2 = tree.branches
|
|
168
|
+
-- ▼ ReadonlyArray.map ▼
|
|
169
|
+
local _newValue = table.create(#_exp_2)
|
|
170
|
+
local _callback = function(branch, branchIndex)
|
|
169
171
|
local matchesBranchFilter = matchesFilter(branch.title)
|
|
170
172
|
local hasMatchingLeaf = matchesBranchFilter
|
|
171
173
|
if not hasMatchingLeaf then
|
|
@@ -177,53 +179,50 @@ local function TreeView(props)
|
|
|
177
179
|
end
|
|
178
180
|
end
|
|
179
181
|
if matchesBranchFilter or hasMatchingLeaf then
|
|
180
|
-
local
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
branch.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
local _arg0_1 = function(b)
|
|
198
|
-
return b ~= branch
|
|
199
|
-
end
|
|
200
|
-
-- ▼ ReadonlyArray.filter ▼
|
|
201
|
-
local _newValue = {}
|
|
202
|
-
local _length_3 = 0
|
|
203
|
-
for _k, _v in _oldExpanded do
|
|
204
|
-
if _arg0_1(_v, _k - 1, _oldExpanded) == true then
|
|
205
|
-
_length_3 += 1
|
|
206
|
-
_newValue[_length_3] = _v
|
|
182
|
+
local _attributes_4 = table.clone(row)
|
|
183
|
+
setmetatable(_attributes_4, nil)
|
|
184
|
+
_attributes_4.Event = {
|
|
185
|
+
MouseButton1Click = function()
|
|
186
|
+
if branch.onClick then
|
|
187
|
+
branch.onClick()
|
|
188
|
+
end
|
|
189
|
+
-- If there are leaves... Expand/Collapse
|
|
190
|
+
if #branch.leaves > 0 then
|
|
191
|
+
local _branch = branch
|
|
192
|
+
local isExpanded = table.find(expanded, _branch) ~= nil
|
|
193
|
+
if isExpanded then
|
|
194
|
+
setExpanded(function(oldExpanded)
|
|
195
|
+
-- ▼ ReadonlyArray.filter ▼
|
|
196
|
+
local _newValue_1 = {}
|
|
197
|
+
local _callback_1 = function(b)
|
|
198
|
+
return b ~= branch
|
|
207
199
|
end
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
200
|
+
local _length = 0
|
|
201
|
+
for _k, _v in oldExpanded do
|
|
202
|
+
if _callback_1(_v, _k - 1, oldExpanded) == true then
|
|
203
|
+
_length += 1
|
|
204
|
+
_newValue_1[_length] = _v
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
-- ▲ ReadonlyArray.filter ▲
|
|
208
|
+
return _newValue_1
|
|
209
|
+
end)
|
|
210
|
+
else
|
|
211
|
+
setExpanded(function(oldExpanded)
|
|
212
|
+
local _array = {}
|
|
213
|
+
local _length = #_array
|
|
214
|
+
local _oldExpandedLength = #oldExpanded
|
|
215
|
+
table.move(oldExpanded, 1, _oldExpandedLength, _length + 1, _array)
|
|
216
|
+
_length += _oldExpandedLength
|
|
217
|
+
_array[_length + 1] = branch
|
|
218
|
+
return _array
|
|
219
|
+
end)
|
|
220
|
+
end
|
|
212
221
|
else
|
|
213
|
-
|
|
214
|
-
local _array = {}
|
|
215
|
-
local _length_3 = #_array
|
|
216
|
-
local _oldExpandedLength = #oldExpanded
|
|
217
|
-
table.move(oldExpanded, 1, _oldExpandedLength, _length_3 + 1, _array)
|
|
218
|
-
_length_3 += _oldExpandedLength
|
|
219
|
-
_array[_length_3 + 1] = branch
|
|
220
|
-
return _array
|
|
221
|
-
end)
|
|
222
|
+
setSelectedBranch(branch)
|
|
222
223
|
end
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
end
|
|
226
|
-
end
|
|
224
|
+
end,
|
|
225
|
+
}
|
|
227
226
|
local _condition = #branch.leaves > 0
|
|
228
227
|
if _condition then
|
|
229
228
|
local _attributes_5 = {}
|
|
@@ -232,106 +231,74 @@ local function TreeView(props)
|
|
|
232
231
|
_attributes_5.size = "xxs"
|
|
233
232
|
_attributes_5.className = branchIcon
|
|
234
233
|
_attributes_5.tint = DefaultTheme.options.constants.extendedPalette.Gray[70]
|
|
235
|
-
_condition = (Roact.
|
|
234
|
+
_condition = (Roact.jsx(Icon, _attributes_5))
|
|
236
235
|
end
|
|
237
|
-
local _children_3 = {}
|
|
238
|
-
local _length_3 = #_children_3
|
|
239
|
-
if _condition then
|
|
240
|
-
_children_3[_length_3 + 1] = _condition
|
|
241
|
-
end
|
|
242
|
-
_length_3 = #_children_3
|
|
243
236
|
local _attributes_5 = {
|
|
244
237
|
text = branch.title,
|
|
245
238
|
}
|
|
246
|
-
local _object_1 =
|
|
247
|
-
|
|
248
|
-
_object_1[_k] = _v
|
|
249
|
-
end
|
|
239
|
+
local _object_1 = table.clone(branchTypography)
|
|
240
|
+
setmetatable(_object_1, nil)
|
|
250
241
|
_attributes_5.className = _object_1
|
|
251
242
|
_attributes_5.color = "textPrimary"
|
|
252
243
|
_attributes_5.variant = "body"
|
|
253
244
|
_attributes_5.family = if selectedBranch == branch then "bold" else "default"
|
|
254
|
-
|
|
255
|
-
_children_2[branch.title .. ("-" .. tostring(branchIndex))] = Roact.createFragment({
|
|
256
|
-
[branch.title .. ("-" .. tostring(branchIndex))] = Roact.createElement("TextButton", _attributes_4, _children_3),
|
|
257
|
-
})
|
|
245
|
+
local _exp_3 = Roact.jsx("textbutton", _attributes_4, _condition, Roact.jsx(Typography, _attributes_5))
|
|
258
246
|
local _branch = branch
|
|
259
247
|
local _condition_1 = table.find(expanded, _branch) ~= nil
|
|
260
248
|
if _condition_1 then
|
|
261
|
-
local
|
|
262
|
-
|
|
249
|
+
local _exp_4 = branch.leaves
|
|
250
|
+
-- ▼ ReadonlyArray.map ▼
|
|
251
|
+
local _newValue_1 = table.create(#_exp_4)
|
|
252
|
+
local _callback_1 = function(leaf, leafIndex)
|
|
263
253
|
local matchesLeafFilter = matchesFilter(leaf.title)
|
|
264
254
|
if matchesBranchFilter or matchesLeafFilter then
|
|
265
|
-
local _attributes_6 =
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
end
|
|
275
|
-
end
|
|
276
|
-
local _children_4 = {
|
|
277
|
-
Roact.createElement(Icon, {
|
|
278
|
-
icon = icon or Icons.ListPrimary,
|
|
279
|
-
size = "xs",
|
|
280
|
-
className = leafIcon,
|
|
281
|
-
tint = DefaultTheme.palette.secondary.main,
|
|
282
|
-
}),
|
|
255
|
+
local _attributes_6 = table.clone(row)
|
|
256
|
+
setmetatable(_attributes_6, nil)
|
|
257
|
+
_attributes_6.Event = {
|
|
258
|
+
MouseButton1Click = function()
|
|
259
|
+
setSelectedLeaf(leaf)
|
|
260
|
+
setSelectedBranch(branch)
|
|
261
|
+
if leaf.onClick then
|
|
262
|
+
leaf.onClick()
|
|
263
|
+
end
|
|
264
|
+
end,
|
|
283
265
|
}
|
|
284
|
-
local
|
|
266
|
+
local _exp_5 = Roact.jsx(Icon, {
|
|
267
|
+
icon = icon or Icons.ListPrimary,
|
|
268
|
+
size = "xs",
|
|
269
|
+
className = leafIcon,
|
|
270
|
+
tint = DefaultTheme.palette.secondary.main,
|
|
271
|
+
})
|
|
285
272
|
local _attributes_7 = {
|
|
286
273
|
text = leaf.title,
|
|
287
274
|
}
|
|
288
|
-
local _object_2 =
|
|
289
|
-
|
|
290
|
-
_object_2[_k] = _v
|
|
291
|
-
end
|
|
275
|
+
local _object_2 = table.clone(leafTypography)
|
|
276
|
+
setmetatable(_object_2, nil)
|
|
292
277
|
_attributes_7.className = _object_2
|
|
293
278
|
_attributes_7.color = "textPrimary"
|
|
294
279
|
_attributes_7.variant = "body"
|
|
295
280
|
_attributes_7.family = if selectedLeaf == leaf then "bold" else "default"
|
|
296
|
-
|
|
297
|
-
return Roact.createFragment({
|
|
298
|
-
[branch.title .. ("-" .. (tostring(branchIndex) .. ("-" .. (leaf.title .. ("-" .. tostring(leafIndex))))))] = Roact.createElement("TextButton", _attributes_6, _children_4),
|
|
299
|
-
})
|
|
281
|
+
return Roact.jsx("textbutton", _attributes_6, _exp_5, Roact.jsx(Typography, _attributes_7))
|
|
300
282
|
else
|
|
301
|
-
return Roact.
|
|
283
|
+
return Roact.jsx(Roact.Fragment)
|
|
302
284
|
end
|
|
303
285
|
end
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
for _k, _v in _leaves do
|
|
307
|
-
_newValue[_k] = _arg0_1(_v, _k - 1, _leaves)
|
|
286
|
+
for _k, _v in _exp_4 do
|
|
287
|
+
_newValue_1[_k] = _callback_1(_v, _k - 1, _exp_4)
|
|
308
288
|
end
|
|
309
289
|
-- ▲ ReadonlyArray.map ▲
|
|
310
|
-
_condition_1 =
|
|
290
|
+
_condition_1 = _newValue_1
|
|
311
291
|
end
|
|
312
|
-
|
|
313
|
-
for _k, _v in _condition_1 do
|
|
314
|
-
_children_2[_length_2 + _k] = _v
|
|
315
|
-
end
|
|
316
|
-
end
|
|
317
|
-
return Roact.createFragment(_children_2)
|
|
292
|
+
return Roact.jsx(Roact.Fragment, nil, _exp_3, _condition_1)
|
|
318
293
|
else
|
|
319
|
-
return Roact.
|
|
294
|
+
return Roact.jsx(Roact.Fragment)
|
|
320
295
|
end
|
|
321
296
|
end
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
for _k, _v in _branches do
|
|
325
|
-
_newValue[_k] = _arg0(_v, _k - 1, _branches)
|
|
297
|
+
for _k, _v in _exp_2 do
|
|
298
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp_2)
|
|
326
299
|
end
|
|
327
300
|
-- ▲ ReadonlyArray.map ▲
|
|
328
|
-
|
|
329
|
-
_children_1[_length_1 + 1 + _k] = _v
|
|
330
|
-
end
|
|
331
|
-
_children.List = Roact.createElement("ScrollingFrame", _attributes_2, _children_1)
|
|
332
|
-
return Roact.createFragment({
|
|
333
|
-
TreeView = Roact.createElement("Frame", _attributes, _children),
|
|
334
|
-
})
|
|
301
|
+
return Roact.jsx("frame", _attributes, _exp, Roact.jsx("scrollingframe", _attributes_2, _exp_1, _newValue))
|
|
335
302
|
end
|
|
336
303
|
local default = markPureComponent(TreeView)
|
|
337
304
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useTreeViewStyles: () => import("../../../../theme").ClassNameMap<string>;
|
|
1
|
+
declare const useTreeViewStyles: () => import("../../../../theme/index").ClassNameMap<string>;
|
|
2
2
|
export default useTreeViewStyles;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/// <reference types="@rbxts/types" />
|
|
2
|
-
/// <reference types="roact" />
|
|
3
1
|
import Roact from "@rbxts/roact";
|
|
4
|
-
import { CustomizedProps } from "../../../../theme";
|
|
5
|
-
import { FontFamilyVariant, FontSizeVariant } from "../../../../theme/interfaces/typography";
|
|
2
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
import { FontFamilyVariant, FontSizeVariant } from "../../../../theme/interfaces/typography/index";
|
|
6
4
|
import { TypographyAlignment } from "../types/TypographyAlignment";
|
|
7
5
|
import { TypographyColor } from "../types/TypographyColor";
|
|
8
6
|
import { TypographyDisplay } from "../types/TypographyDisplay";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- Compiled with roblox-ts
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
3
|
+
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
|
|
4
4
|
local useTypographyStyles = TS.import(script, script.Parent, "Typography.styles").default
|
|
5
5
|
local function Typography(props)
|
|
6
6
|
local _binding = props
|
|
@@ -9,16 +9,14 @@ local function Typography(props)
|
|
|
9
9
|
text = ""
|
|
10
10
|
end
|
|
11
11
|
local className = _binding.className
|
|
12
|
-
local children = _binding
|
|
12
|
+
local children = _binding.children
|
|
13
13
|
local _binding_1 = useTypographyStyles(props)
|
|
14
14
|
local root = _binding_1.root
|
|
15
15
|
local variantToken = _binding_1.variantToken
|
|
16
|
-
local _attributes =
|
|
17
|
-
|
|
18
|
-
_attributes[_k] = _v
|
|
19
|
-
end
|
|
16
|
+
local _attributes = table.clone(root)
|
|
17
|
+
setmetatable(_attributes, nil)
|
|
20
18
|
_attributes.Text = text
|
|
21
|
-
if className then
|
|
19
|
+
if className ~= 0 and className == className and className ~= "" and className then
|
|
22
20
|
for _k, _v in className do
|
|
23
21
|
_attributes[_k] = _v
|
|
24
22
|
end
|
|
@@ -26,20 +24,7 @@ local function Typography(props)
|
|
|
26
24
|
for _k, _v in variantToken do
|
|
27
25
|
_attributes[_k] = _v
|
|
28
26
|
end
|
|
29
|
-
|
|
30
|
-
local _length = #_children
|
|
31
|
-
if children then
|
|
32
|
-
for _k, _v in children do
|
|
33
|
-
if type(_k) == "number" then
|
|
34
|
-
_children[_length + _k] = _v
|
|
35
|
-
else
|
|
36
|
-
_children[_k] = _v
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
return Roact.createFragment({
|
|
41
|
-
Typography = Roact.createElement("TextLabel", _attributes, _children),
|
|
42
|
-
})
|
|
27
|
+
return Roact.jsx("textlabel", _attributes, children)
|
|
43
28
|
end
|
|
44
29
|
local default = Typography
|
|
45
30
|
return {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TypographyProps } from "./Typography";
|
|
2
|
-
declare const useTypographyStyles: (props: TypographyProps) => import("../../../../theme").ClassNameMap<string>;
|
|
2
|
+
declare const useTypographyStyles: (props: TypographyProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
3
3
|
export default useTypographyStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as Typography } from "./components/Typography";
|
|
2
2
|
export { TypographyProps } from "./components/Typography";
|
|
3
3
|
export * from "./components/Typography";
|
|
4
|
-
export { TypographyAlignment } from "./types";
|
|
5
|
-
export { TypographyColor } from "./types";
|
|
6
|
-
export { TypographyDisplay } from "./types";
|
|
4
|
+
export { TypographyAlignment } from "./types/index";
|
|
5
|
+
export { TypographyColor } from "./types/index";
|
|
6
|
+
export { TypographyDisplay } from "./types/index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/uiblox",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "UI Library and theming for roblox-ts projects",
|
|
5
5
|
"main": "out/init.lua",
|
|
6
6
|
"scripts": {
|
|
@@ -29,30 +29,27 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
33
|
-
"@typescript-eslint/parser": "^
|
|
34
|
-
"eslint": "^
|
|
35
|
-
"eslint-config-prettier": "^9.
|
|
36
|
-
"eslint-plugin-prettier": "^5.
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^8.14.0",
|
|
33
|
+
"@typescript-eslint/parser": "^8.14.0",
|
|
34
|
+
"eslint": "^9.14.0",
|
|
35
|
+
"eslint-config-prettier": "^9.1.0",
|
|
36
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
37
37
|
"eslint-plugin-roblox-ts": "^0.0.36",
|
|
38
|
-
"prettier": "^3.
|
|
38
|
+
"prettier": "^3.3.3"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"@rbxts/compiler-types": "^
|
|
44
|
-
"@rbxts/roact": "^
|
|
45
|
-
"@rbxts/services": "^1.2.0",
|
|
46
|
-
"@rbxts/types": "^1.0.729",
|
|
41
|
+
"@rbxts/attributes": "^1.0.0",
|
|
42
|
+
"@rbxts/boat-tween": "^1.0.1",
|
|
43
|
+
"@rbxts/compiler-types": "^3.0.0-types.0",
|
|
44
|
+
"@rbxts/roact": "^3.0.1",
|
|
47
45
|
"@rbxts/roact-hooked": "^2.6.2",
|
|
48
46
|
"@rbxts/roact-rodux-hooked": "^1.1.3",
|
|
49
47
|
"@rbxts/rodux": "^3.0.0-ts.3",
|
|
50
|
-
"@rbxts/roselect": "^0.1.
|
|
51
|
-
"@rbxts/
|
|
52
|
-
"@rbxts/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"@rbxts/roact": "^1.4.4-ts.0"
|
|
48
|
+
"@rbxts/roselect": "^0.1.2",
|
|
49
|
+
"@rbxts/services": "^1.5.5",
|
|
50
|
+
"@rbxts/types": "^1.0.813",
|
|
51
|
+
"roblox-ts": "^3.0.0",
|
|
52
|
+
"typescript": "^5.6.3"
|
|
56
53
|
},
|
|
57
54
|
"directories": {
|
|
58
55
|
"doc": "docs"
|