@rbxts/uiblox 0.1.11 → 0.1.13
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 +3 -4
- package/out/theme/components/ThemeProducer.luau +12 -0
- package/out/theme/components/ThemeProvider.luau +10 -9
- package/out/theme/components/ThemeWrapper.luau +15 -20
- package/out/theme/components/init.luau +0 -2
- package/out/theme/init.luau +0 -1
- package/out/theme/styles/utilities/makeStyles.luau +2 -2
- package/out/ui/packages/button/components/Button.luau +13 -10
- package/out/ui/packages/divider/components/Divider.luau +8 -4
- package/out/ui/packages/icon/components/Icon.luau +9 -6
- package/out/ui/packages/iconButton/components/IconButton.luau +11 -8
- package/out/ui/packages/input/components/Input.luau +34 -19
- package/out/ui/packages/progressBar/components/ProgressBar.luau +36 -17
- package/out/ui/packages/shadow/components/Shadow.luau +13 -9
- package/out/ui/packages/sidebar/components/Sidebar.luau +14 -6
- package/out/ui/packages/toast/components/Toast.luau +25 -16
- package/out/ui/packages/treeView/components/TreeView.luau +40 -25
- package/out/ui/packages/typography/components/Typography.luau +8 -4
- package/package.json +15 -12
- package/out/index.d.ts +0 -2
- package/out/theme/components/ThemeProvider.d.ts +0 -9
- package/out/theme/components/ThemeStore.d.ts +0 -13
- package/out/theme/components/ThemeStore.luau +0 -29
- package/out/theme/components/ThemeWrapper.d.ts +0 -9
- package/out/theme/components/index.d.ts +0 -8
- package/out/theme/constants/NumberConstants.d.ts +0 -6
- package/out/theme/constants/ThemeConstants.d.ts +0 -5
- package/out/theme/constants/index.d.ts +0 -2
- package/out/theme/index.d.ts +0 -20
- package/out/theme/interfaces/iconSizes/IconSizes.d.ts +0 -5
- package/out/theme/interfaces/iconSizes/index.d.ts +0 -1
- package/out/theme/interfaces/index.d.ts +0 -13
- package/out/theme/interfaces/palette/Palette.d.ts +0 -26
- package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +0 -4
- package/out/theme/interfaces/palette/colorTokens/index.d.ts +0 -1
- package/out/theme/interfaces/palette/colors/Blue.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -42
- package/out/theme/interfaces/palette/colors/Common.d.ts +0 -6
- package/out/theme/interfaces/palette/colors/Dark.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Gray.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Green.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Light.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Magenta.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Orange.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Purple.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Red.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Turquoise.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Yellow.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/index.d.ts +0 -13
- package/out/theme/interfaces/palette/index.d.ts +0 -3
- package/out/theme/interfaces/spacing/Borders.d.ts +0 -4
- package/out/theme/interfaces/spacing/Padding.d.ts +0 -4
- package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
- package/out/theme/interfaces/spacing/Spacing.d.ts +0 -4
- package/out/theme/interfaces/spacing/index.d.ts +0 -4
- package/out/theme/interfaces/theme/Theme.d.ts +0 -14
- package/out/theme/interfaces/theme/ThemeConstants.d.ts +0 -25
- package/out/theme/interfaces/theme/ThemeOptions.d.ts +0 -4
- package/out/theme/interfaces/theme/index.d.ts +0 -3
- package/out/theme/interfaces/tokens/Tokens.d.ts +0 -1
- package/out/theme/interfaces/tokens/index.d.ts +0 -1
- package/out/theme/interfaces/typography/FontFamilies.d.ts +0 -2
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +0 -3
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +0 -3
- package/out/theme/interfaces/typography/FontSizes.d.ts +0 -3
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -7
- package/out/theme/interfaces/typography/Variants.d.ts +0 -18
- package/out/theme/interfaces/typography/index.d.ts +0 -8
- package/out/theme/styles/index.d.ts +0 -5
- package/out/theme/styles/types/WriteableStyle.d.ts +0 -1
- package/out/theme/styles/types/index.d.ts +0 -2
- package/out/theme/styles/types/styles.d.ts +0 -2
- package/out/theme/styles/utilities/classNames.d.ts +0 -7
- package/out/theme/styles/utilities/createStyles.d.ts +0 -3
- package/out/theme/styles/utilities/index.d.ts +0 -3
- package/out/theme/styles/utilities/makeStyles.d.ts +0 -7
- package/out/theme/themes/DarkTheme.d.ts +0 -3
- package/out/theme/themes/LightTheme.d.ts +0 -3
- package/out/theme/themes/index.d.ts +0 -3
- package/out/theme/types/index.d.ts +0 -7
- package/out/theme/types/types.d.ts +0 -13
- package/out/theme/utilites/Color3FromHex.d.ts +0 -2
- package/out/theme/utilites/index.d.ts +0 -1
- package/out/ui/constants/ImageConstants.d.ts +0 -2
- package/out/ui/constants/LayoutConstants.d.ts +0 -1
- package/out/ui/constants/index.d.ts +0 -2
- package/out/ui/enums/Directions.d.ts +0 -8
- package/out/ui/enums/Icons.d.ts +0 -40
- package/out/ui/enums/Orientations.d.ts +0 -4
- package/out/ui/enums/index.d.ts +0 -3
- package/out/ui/index.d.ts +0 -34
- package/out/ui/packages/button/components/Button.d.ts +0 -26
- package/out/ui/packages/button/components/Button.styles.d.ts +0 -3
- package/out/ui/packages/button/index.d.ts +0 -6
- package/out/ui/packages/button/types/ButtonColor.d.ts +0 -1
- package/out/ui/packages/button/types/ButtonSize.d.ts +0 -1
- package/out/ui/packages/button/types/ButtonVariant.d.ts +0 -1
- package/out/ui/packages/button/types/index.d.ts +0 -3
- package/out/ui/packages/divider/components/Divider.d.ts +0 -14
- package/out/ui/packages/divider/components/Divider.styles.d.ts +0 -3
- package/out/ui/packages/divider/index.d.ts +0 -3
- package/out/ui/packages/icon/components/Icon.d.ts +0 -12
- package/out/ui/packages/icon/components/Icon.styles.d.ts +0 -3
- package/out/ui/packages/icon/index.d.ts +0 -3
- package/out/ui/packages/iconButton/components/IconButton.d.ts +0 -14
- package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +0 -3
- package/out/ui/packages/iconButton/index.d.ts +0 -3
- package/out/ui/packages/index.d.ts +0 -11
- package/out/ui/packages/input/components/Input.d.ts +0 -24
- package/out/ui/packages/input/components/Input.styles.d.ts +0 -3
- package/out/ui/packages/input/index.d.ts +0 -6
- package/out/ui/packages/input/types/InputColor.d.ts +0 -1
- package/out/ui/packages/input/types/InputMargin.d.ts +0 -1
- package/out/ui/packages/input/types/InputVariant.d.ts +0 -1
- package/out/ui/packages/input/types/index.d.ts +0 -3
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +0 -9
- package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +0 -2
- package/out/ui/packages/progressBar/index.d.ts +0 -3
- package/out/ui/packages/shadow/components/Shadow.d.ts +0 -4
- package/out/ui/packages/shadow/components/Shadow.styles.d.ts +0 -2
- package/out/ui/packages/shadow/index.d.ts +0 -2
- package/out/ui/packages/sidebar/components/Sidebar.d.ts +0 -9
- package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +0 -3
- package/out/ui/packages/sidebar/index.d.ts +0 -4
- package/out/ui/packages/sidebar/types/SidebarType.d.ts +0 -1
- package/out/ui/packages/sidebar/types/index.d.ts +0 -1
- package/out/ui/packages/toast/components/Toast.d.ts +0 -12
- package/out/ui/packages/toast/components/Toast.styles.d.ts +0 -3
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +0 -7
- package/out/ui/packages/toast/index.d.ts +0 -5
- package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +0 -5
- package/out/ui/packages/treeView/components/TreeView.d.ts +0 -13
- package/out/ui/packages/treeView/components/TreeView.styles.d.ts +0 -2
- package/out/ui/packages/treeView/index.d.ts +0 -6
- package/out/ui/packages/treeView/interfaces/Branch.d.ts +0 -6
- package/out/ui/packages/treeView/interfaces/Leaf.d.ts +0 -4
- package/out/ui/packages/treeView/interfaces/Tree.d.ts +0 -5
- package/out/ui/packages/typography/components/Typography.d.ts +0 -19
- package/out/ui/packages/typography/components/Typography.styles.d.ts +0 -3
- package/out/ui/packages/typography/index.d.ts +0 -6
- package/out/ui/packages/typography/types/TypographyAlignment.d.ts +0 -1
- package/out/ui/packages/typography/types/TypographyColor.d.ts +0 -1
- package/out/ui/packages/typography/types/TypographyDisplay.d.ts +0 -1
- package/out/ui/packages/typography/types/index.d.ts +0 -3
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local useState = _roact_hooked.useState
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useCallback = _react.useCallback
|
|
6
|
+
local useEffect = _react.useEffect
|
|
7
|
+
local useState = _react.useState
|
|
9
8
|
local DefaultTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DefaultTheme
|
|
10
9
|
local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
11
10
|
local Typography = TS.import(script, script.Parent.Parent.Parent, "typography").Typography
|
|
@@ -134,8 +133,12 @@ local function TreeView(props)
|
|
|
134
133
|
-- Set expanded to new array
|
|
135
134
|
setExpanded(newExpanded)
|
|
136
135
|
end, { tree, filter })
|
|
137
|
-
local _attributes =
|
|
138
|
-
|
|
136
|
+
local _attributes = {
|
|
137
|
+
key = "TreeView",
|
|
138
|
+
}
|
|
139
|
+
for _k, _v in root do
|
|
140
|
+
_attributes[_k] = _v
|
|
141
|
+
end
|
|
139
142
|
if className then
|
|
140
143
|
for _k, _v in className do
|
|
141
144
|
_attributes[_k] = _v
|
|
@@ -152,9 +155,13 @@ local function TreeView(props)
|
|
|
152
155
|
_attributes_1.color = "textSecondary"
|
|
153
156
|
_attributes_1.variant = "body"
|
|
154
157
|
_attributes_1.family = "bold"
|
|
155
|
-
local _exp =
|
|
156
|
-
local _attributes_2 =
|
|
157
|
-
|
|
158
|
+
local _exp = React.createElement(Typography, _attributes_1)
|
|
159
|
+
local _attributes_2 = {
|
|
160
|
+
key = "List",
|
|
161
|
+
}
|
|
162
|
+
for _k, _v in list do
|
|
163
|
+
_attributes_2[_k] = _v
|
|
164
|
+
end
|
|
158
165
|
_attributes_2.CanvasSize = canvasSize
|
|
159
166
|
_attributes_2.Event = {
|
|
160
167
|
AncestryChanged = resizeScrollingFrame,
|
|
@@ -163,7 +170,7 @@ local function TreeView(props)
|
|
|
163
170
|
}
|
|
164
171
|
local _attributes_3 = table.clone(gridLayout)
|
|
165
172
|
setmetatable(_attributes_3, nil)
|
|
166
|
-
local _exp_1 =
|
|
173
|
+
local _exp_1 = React.createElement("uigridlayout", _attributes_3)
|
|
167
174
|
local _exp_2 = tree.branches
|
|
168
175
|
-- ▼ ReadonlyArray.map ▼
|
|
169
176
|
local _newValue = table.create(#_exp_2)
|
|
@@ -179,8 +186,12 @@ local function TreeView(props)
|
|
|
179
186
|
end
|
|
180
187
|
end
|
|
181
188
|
if matchesBranchFilter or hasMatchingLeaf then
|
|
182
|
-
local _attributes_4 =
|
|
183
|
-
|
|
189
|
+
local _attributes_4 = {
|
|
190
|
+
key = `{branch.title}-{branchIndex}`,
|
|
191
|
+
}
|
|
192
|
+
for _k, _v in row do
|
|
193
|
+
_attributes_4[_k] = _v
|
|
194
|
+
end
|
|
184
195
|
_attributes_4.Event = {
|
|
185
196
|
MouseButton1Click = function()
|
|
186
197
|
if branch.onClick then
|
|
@@ -231,7 +242,7 @@ local function TreeView(props)
|
|
|
231
242
|
_attributes_5.size = "xxs"
|
|
232
243
|
_attributes_5.className = branchIcon
|
|
233
244
|
_attributes_5.tint = DefaultTheme.options.constants.extendedPalette.Gray[70]
|
|
234
|
-
_condition = (
|
|
245
|
+
_condition = (React.createElement(Icon, _attributes_5))
|
|
235
246
|
end
|
|
236
247
|
local _attributes_5 = {
|
|
237
248
|
text = branch.title,
|
|
@@ -242,7 +253,7 @@ local function TreeView(props)
|
|
|
242
253
|
_attributes_5.color = "textPrimary"
|
|
243
254
|
_attributes_5.variant = "body"
|
|
244
255
|
_attributes_5.family = if selectedBranch == branch then "bold" else "default"
|
|
245
|
-
local _exp_3 =
|
|
256
|
+
local _exp_3 = React.createElement("textbutton", _attributes_4, _condition, React.createElement(Typography, _attributes_5))
|
|
246
257
|
local _branch = branch
|
|
247
258
|
local _condition_1 = table.find(expanded, _branch) ~= nil
|
|
248
259
|
if _condition_1 then
|
|
@@ -252,8 +263,12 @@ local function TreeView(props)
|
|
|
252
263
|
local _callback_1 = function(leaf, leafIndex)
|
|
253
264
|
local matchesLeafFilter = matchesFilter(leaf.title)
|
|
254
265
|
if matchesBranchFilter or matchesLeafFilter then
|
|
255
|
-
local _attributes_6 =
|
|
256
|
-
|
|
266
|
+
local _attributes_6 = {
|
|
267
|
+
key = `{branch.title}-{branchIndex}-{leaf.title}-{leafIndex}`,
|
|
268
|
+
}
|
|
269
|
+
for _k, _v in row do
|
|
270
|
+
_attributes_6[_k] = _v
|
|
271
|
+
end
|
|
257
272
|
_attributes_6.Event = {
|
|
258
273
|
MouseButton1Click = function()
|
|
259
274
|
setSelectedLeaf(leaf)
|
|
@@ -263,7 +278,7 @@ local function TreeView(props)
|
|
|
263
278
|
end
|
|
264
279
|
end,
|
|
265
280
|
}
|
|
266
|
-
local _exp_5 =
|
|
281
|
+
local _exp_5 = React.createElement(Icon, {
|
|
267
282
|
icon = icon or Icons.ListPrimary,
|
|
268
283
|
size = "xs",
|
|
269
284
|
className = leafIcon,
|
|
@@ -278,9 +293,9 @@ local function TreeView(props)
|
|
|
278
293
|
_attributes_7.color = "textPrimary"
|
|
279
294
|
_attributes_7.variant = "body"
|
|
280
295
|
_attributes_7.family = if selectedLeaf == leaf then "bold" else "default"
|
|
281
|
-
return
|
|
296
|
+
return React.createElement("textbutton", _attributes_6, _exp_5, React.createElement(Typography, _attributes_7))
|
|
282
297
|
else
|
|
283
|
-
return
|
|
298
|
+
return React.createElement(React.Fragment)
|
|
284
299
|
end
|
|
285
300
|
end
|
|
286
301
|
for _k, _v in _exp_4 do
|
|
@@ -289,18 +304,18 @@ local function TreeView(props)
|
|
|
289
304
|
-- ▲ ReadonlyArray.map ▲
|
|
290
305
|
_condition_1 = _newValue_1
|
|
291
306
|
end
|
|
292
|
-
return
|
|
307
|
+
return React.createElement(React.Fragment, nil, _exp_3, _condition_1)
|
|
293
308
|
else
|
|
294
|
-
return
|
|
309
|
+
return React.createElement(React.Fragment)
|
|
295
310
|
end
|
|
296
311
|
end
|
|
297
312
|
for _k, _v in _exp_2 do
|
|
298
313
|
_newValue[_k] = _callback(_v, _k - 1, _exp_2)
|
|
299
314
|
end
|
|
300
315
|
-- ▲ ReadonlyArray.map ▲
|
|
301
|
-
return
|
|
316
|
+
return React.createElement("frame", _attributes, _exp, React.createElement("scrollingframe", _attributes_2, _exp_1, _newValue))
|
|
302
317
|
end
|
|
303
|
-
local default =
|
|
318
|
+
local default = TreeView
|
|
304
319
|
return {
|
|
305
320
|
default = default,
|
|
306
321
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local useTypographyStyles = TS.import(script, script.Parent, "Typography.styles").default
|
|
5
5
|
local function Typography(props)
|
|
6
6
|
local _binding = props
|
|
@@ -13,8 +13,12 @@ local function Typography(props)
|
|
|
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
|
-
|
|
16
|
+
local _attributes = {
|
|
17
|
+
key = "Typography",
|
|
18
|
+
}
|
|
19
|
+
for _k, _v in root do
|
|
20
|
+
_attributes[_k] = _v
|
|
21
|
+
end
|
|
18
22
|
_attributes.Text = text
|
|
19
23
|
if className ~= 0 and className == className and className ~= "" and className then
|
|
20
24
|
for _k, _v in className do
|
|
@@ -24,7 +28,7 @@ local function Typography(props)
|
|
|
24
28
|
for _k, _v in variantToken do
|
|
25
29
|
_attributes[_k] = _v
|
|
26
30
|
end
|
|
27
|
-
return
|
|
31
|
+
return React.createElement("textlabel", _attributes, children)
|
|
28
32
|
end
|
|
29
33
|
local default = Typography
|
|
30
34
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/uiblox",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "UI Library and theming for roblox-ts projects",
|
|
5
5
|
"main": "out/init.lua",
|
|
6
6
|
"scripts": {
|
|
@@ -29,27 +29,30 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
+
"@rbxts/attributes": "^1.0.0",
|
|
33
|
+
"@rbxts/compiler-types": "^3.0.0-types.0",
|
|
34
|
+
"@rbxts/types": "^1.0.813",
|
|
32
35
|
"@typescript-eslint/eslint-plugin": "^8.14.0",
|
|
33
36
|
"@typescript-eslint/parser": "^8.14.0",
|
|
34
37
|
"eslint": "^9.14.0",
|
|
35
38
|
"eslint-config-prettier": "^9.1.0",
|
|
36
39
|
"eslint-plugin-prettier": "^5.2.1",
|
|
37
40
|
"eslint-plugin-roblox-ts": "^0.0.36",
|
|
38
|
-
"
|
|
41
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
42
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
43
|
+
"prettier": "^3.3.3",
|
|
44
|
+
"roblox-ts": "^3.0.0",
|
|
45
|
+
"typescript": "^5.6.3"
|
|
39
46
|
},
|
|
40
47
|
"dependencies": {
|
|
41
|
-
"@rbxts/attributes": "^1.0.0",
|
|
42
48
|
"@rbxts/boat-tween": "^1.0.1",
|
|
43
|
-
"@rbxts/
|
|
44
|
-
"@rbxts/
|
|
45
|
-
"@rbxts/
|
|
46
|
-
"@rbxts/
|
|
47
|
-
"@rbxts/
|
|
49
|
+
"@rbxts/pretty-react-hooks": "^0.6.0",
|
|
50
|
+
"@rbxts/react": "^17.2.1",
|
|
51
|
+
"@rbxts/react-reflex": "^0.3.4",
|
|
52
|
+
"@rbxts/react-roblox": "^17.2.1",
|
|
53
|
+
"@rbxts/reflex": "^4.3.1",
|
|
48
54
|
"@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"
|
|
55
|
+
"@rbxts/services": "^1.5.5"
|
|
53
56
|
},
|
|
54
57
|
"directories": {
|
|
55
58
|
"doc": "docs"
|
package/out/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Roact from "@rbxts/roact";
|
|
2
|
-
import { Theme } from "../interfaces/theme/index";
|
|
3
|
-
import { CustomizedProps } from "../types/index";
|
|
4
|
-
export interface ThemeProviderProps {
|
|
5
|
-
theme?: Theme;
|
|
6
|
-
}
|
|
7
|
-
declare function ThemeProvider(props: CustomizedProps<Instance, ThemeProviderProps>): Roact.Element;
|
|
8
|
-
declare const _default: typeof ThemeProvider;
|
|
9
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Theme } from "../interfaces/theme/index";
|
|
2
|
-
import { Store } from "@rbxts/rodux";
|
|
3
|
-
export type ThemeState = {
|
|
4
|
-
theme: Theme;
|
|
5
|
-
};
|
|
6
|
-
export type ThemeAction = {
|
|
7
|
-
type: "set";
|
|
8
|
-
newTheme?: Theme;
|
|
9
|
-
};
|
|
10
|
-
export declare const themeReducer: import("@rbxts/rodux").Reducer<ThemeState, ThemeAction>;
|
|
11
|
-
export declare const themeStore: Store<ThemeState, ThemeAction>;
|
|
12
|
-
export type TThemeStore = typeof themeStore;
|
|
13
|
-
export declare const selectTheme: import("@rbxts/roselect").OutputSelector<ThemeState, Theme, (res: Theme) => Theme>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local TS = _G[script]
|
|
3
|
-
local _rodux = TS.import(script, TS.getModule(script, "@rbxts", "rodux").src)
|
|
4
|
-
local createReducer = _rodux.createReducer
|
|
5
|
-
local Store = _rodux.Store
|
|
6
|
-
local createSelector = TS.import(script, TS.getModule(script, "@rbxts", "roselect").src).createSelector
|
|
7
|
-
local DefaultTheme = TS.import(script, script.Parent.Parent, "themes").default
|
|
8
|
-
local themeReducer = createReducer({
|
|
9
|
-
theme = DefaultTheme,
|
|
10
|
-
}, {
|
|
11
|
-
set = function(_param, _param_1)
|
|
12
|
-
local theme = _param.theme
|
|
13
|
-
local newTheme = _param_1.newTheme
|
|
14
|
-
return {
|
|
15
|
-
theme = newTheme or theme,
|
|
16
|
-
}
|
|
17
|
-
end,
|
|
18
|
-
})
|
|
19
|
-
local themeStore = Store.new(themeReducer)
|
|
20
|
-
local selectTheme = createSelector(function(state)
|
|
21
|
-
return state.theme
|
|
22
|
-
end, function(theme)
|
|
23
|
-
return theme
|
|
24
|
-
end)
|
|
25
|
-
return {
|
|
26
|
-
themeReducer = themeReducer,
|
|
27
|
-
themeStore = themeStore,
|
|
28
|
-
selectTheme = selectTheme,
|
|
29
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Roact from "@rbxts/roact";
|
|
2
|
-
import { Theme } from "../interfaces/theme/index";
|
|
3
|
-
import { CustomizedProps } from "../types/index";
|
|
4
|
-
export interface ThemeWrapperProps {
|
|
5
|
-
theme?: Theme;
|
|
6
|
-
}
|
|
7
|
-
declare function ThemeWrapper(props: CustomizedProps<Instance, ThemeWrapperProps>): Roact.Element;
|
|
8
|
-
declare const _default: typeof ThemeWrapper;
|
|
9
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as ThemeProvider } from "./ThemeProvider";
|
|
2
|
-
export { ThemeProviderProps } from "./ThemeProvider";
|
|
3
|
-
export * from "./ThemeProvider";
|
|
4
|
-
export { ThemeState } from "./ThemeStore";
|
|
5
|
-
export { ThemeAction } from "./ThemeStore";
|
|
6
|
-
export { themeReducer } from "./ThemeStore";
|
|
7
|
-
export { themeStore } from "./ThemeStore";
|
|
8
|
-
export { TThemeStore } from "./ThemeStore";
|
package/out/theme/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { default as Theme } from "./interfaces/theme/Theme";
|
|
2
|
-
export { ThemeProvider } from "./components/index";
|
|
3
|
-
export { themeStore } from "./components/index";
|
|
4
|
-
export { ThemeState } from "./components/index";
|
|
5
|
-
export * from "./components/index";
|
|
6
|
-
export * from "./constants/index";
|
|
7
|
-
export * from "./interfaces/index";
|
|
8
|
-
export * from "./styles/index";
|
|
9
|
-
export * from "./themes/index";
|
|
10
|
-
export { default as DefaultTheme } from "./themes/index";
|
|
11
|
-
export { default as DarkTheme } from "./themes/DarkTheme";
|
|
12
|
-
export { default as LightTheme } from "./themes/LightTheme";
|
|
13
|
-
export { CommonProps } from "./types/index";
|
|
14
|
-
export { BaseDefaultProps } from "./types/index";
|
|
15
|
-
export { BaseCustomizedProps } from "./types/index";
|
|
16
|
-
export { DefaultProps } from "./types/index";
|
|
17
|
-
export { CustomizedProps } from "./types/index";
|
|
18
|
-
export { CustomizedRef } from "./types/index";
|
|
19
|
-
export { CustomizedForwardRefComponent } from "./types/index";
|
|
20
|
-
export * from "./utilites/index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IconSizes } from "./IconSizes";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { IconSizes } from "./iconSizes/index";
|
|
2
|
-
export * from "./palette/index";
|
|
3
|
-
export { Borders } from "./spacing/index";
|
|
4
|
-
export { Padding } from "./spacing/index";
|
|
5
|
-
export { Shape } from "./spacing/index";
|
|
6
|
-
export { Spacing } from "./spacing/index";
|
|
7
|
-
export * from "../styles/index";
|
|
8
|
-
export { Theme } from "./theme/index";
|
|
9
|
-
export { ThemeConstants } from "./theme/index";
|
|
10
|
-
export { ThemeOptions } from "./theme/index";
|
|
11
|
-
export * from "../themes/index";
|
|
12
|
-
export { Tokens } from "./tokens/index";
|
|
13
|
-
export * from "./typography/index";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default interface Palette {
|
|
2
|
-
primary: {
|
|
3
|
-
main: Color3;
|
|
4
|
-
};
|
|
5
|
-
secondary: {
|
|
6
|
-
main: Color3;
|
|
7
|
-
};
|
|
8
|
-
error: {
|
|
9
|
-
main: Color3;
|
|
10
|
-
};
|
|
11
|
-
warning: {
|
|
12
|
-
main: Color3;
|
|
13
|
-
};
|
|
14
|
-
success: {
|
|
15
|
-
main: Color3;
|
|
16
|
-
};
|
|
17
|
-
background: {
|
|
18
|
-
default: Color3;
|
|
19
|
-
paper: Color3;
|
|
20
|
-
};
|
|
21
|
-
divider: Color3;
|
|
22
|
-
text: {
|
|
23
|
-
primary: Color3;
|
|
24
|
-
secondary: Color3;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ColorTokens } from "./ColorTokens";
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export default interface Colors {
|
|
2
|
-
backgroundDefault: Color3;
|
|
3
|
-
backgroundContrast: Color3;
|
|
4
|
-
backgroundMuted: Color3;
|
|
5
|
-
backgroundUIDefault: Color3;
|
|
6
|
-
backgroundUIMuted: Color3;
|
|
7
|
-
backgroundUIContrast: Color3;
|
|
8
|
-
UIDefault: Color3;
|
|
9
|
-
UIMuted: Color3;
|
|
10
|
-
UIEmphasis: Color3;
|
|
11
|
-
textDefault: Color3;
|
|
12
|
-
textMuted: Color3;
|
|
13
|
-
textEmphasis: Color3;
|
|
14
|
-
iconDefault: Color3;
|
|
15
|
-
iconEmphasis: Color3;
|
|
16
|
-
iconOnHover: Color3;
|
|
17
|
-
systemPrimaryDefault: Color3;
|
|
18
|
-
systemPrimaryOnHover: Color3;
|
|
19
|
-
systemPrimaryContent: Color3;
|
|
20
|
-
contextualPrimaryDefault: Color3;
|
|
21
|
-
contextualPrimaryOnHover: Color3;
|
|
22
|
-
contextualPrimaryContent: Color3;
|
|
23
|
-
secondaryDefault: Color3;
|
|
24
|
-
secondaryOnHover: Color3;
|
|
25
|
-
secondaryContent: Color3;
|
|
26
|
-
divider: Color3;
|
|
27
|
-
overlay: Color3;
|
|
28
|
-
dropShadow: Color3;
|
|
29
|
-
navigationBar: Color3;
|
|
30
|
-
badge: Color3;
|
|
31
|
-
badgeContent: Color3;
|
|
32
|
-
placeholder: Color3;
|
|
33
|
-
online: Color3;
|
|
34
|
-
offline: Color3;
|
|
35
|
-
alert: Color3;
|
|
36
|
-
success: Color3;
|
|
37
|
-
accent: Color3;
|
|
38
|
-
link: Color3;
|
|
39
|
-
caution: Color3;
|
|
40
|
-
text: Color3;
|
|
41
|
-
background: Color3;
|
|
42
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { default as Blue } from "./Blue";
|
|
2
|
-
export { default as Common } from "./Common";
|
|
3
|
-
export { default as Gray } from "./Gray";
|
|
4
|
-
export { default as Green } from "./Green";
|
|
5
|
-
export { default as Magenta } from "./Magenta";
|
|
6
|
-
export { default as Orange } from "./Orange";
|
|
7
|
-
export { default as Purple } from "./Purple";
|
|
8
|
-
export { default as Red } from "./Red";
|
|
9
|
-
export { default as Turquoise } from "./Turquoise";
|
|
10
|
-
export { default as Yellow } from "./Yellow";
|
|
11
|
-
export { default as Dark } from "./Dark";
|
|
12
|
-
export { default as Light } from "./Light";
|
|
13
|
-
export { default as Colors } from "./Colors";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Palette } from "../palette/index";
|
|
2
|
-
import { Padding, Shape, Spacing } from "../spacing/index";
|
|
3
|
-
import { ThemeTypography } from "../typography/index";
|
|
4
|
-
import ThemeOptions from "./ThemeOptions";
|
|
5
|
-
interface Theme {
|
|
6
|
-
type: string;
|
|
7
|
-
options: ThemeOptions;
|
|
8
|
-
palette: Palette;
|
|
9
|
-
padding: Padding;
|
|
10
|
-
shape: Shape;
|
|
11
|
-
spacing: Spacing;
|
|
12
|
-
typography: ThemeTypography;
|
|
13
|
-
}
|
|
14
|
-
export default Theme;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Borders } from "../spacing/index";
|
|
2
|
-
import { IconSizes } from "../iconSizes/index";
|
|
3
|
-
import { ColorTokens } from "../palette/colorTokens/index";
|
|
4
|
-
import { CommonColors } from "../palette/colors/Common";
|
|
5
|
-
import { Colors } from "../palette/colors/index";
|
|
6
|
-
export default interface ThemeConstants {
|
|
7
|
-
contentWidth: number;
|
|
8
|
-
iconSizes: IconSizes;
|
|
9
|
-
colors: Colors;
|
|
10
|
-
borders: Borders;
|
|
11
|
-
extendedPalette: {
|
|
12
|
-
Blue: ColorTokens;
|
|
13
|
-
Common: CommonColors;
|
|
14
|
-
Dark: ColorTokens;
|
|
15
|
-
Gray: ColorTokens;
|
|
16
|
-
Green: ColorTokens;
|
|
17
|
-
Light: ColorTokens;
|
|
18
|
-
Magenta: ColorTokens;
|
|
19
|
-
Orange: ColorTokens;
|
|
20
|
-
Purple: ColorTokens;
|
|
21
|
-
Red: ColorTokens;
|
|
22
|
-
Turquoise: ColorTokens;
|
|
23
|
-
Yellow: ColorTokens;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Tokens = "120" | "110" | "100" | "90" | "80" | "70" | "60" | "50" | "40" | "30" | "20" | "10";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Tokens } from "./Tokens";
|