@rbxts/uiblox 0.1.10 → 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.
Files changed (144) hide show
  1. package/README.md +3 -4
  2. package/out/theme/components/ThemeProducer.luau +12 -0
  3. package/out/theme/components/ThemeProvider.luau +10 -9
  4. package/out/theme/components/ThemeWrapper.luau +15 -20
  5. package/out/theme/components/init.luau +0 -2
  6. package/out/theme/init.luau +0 -1
  7. package/out/theme/styles/utilities/makeStyles.luau +2 -2
  8. package/out/ui/packages/button/components/Button.luau +13 -10
  9. package/out/ui/packages/divider/components/Divider.luau +8 -4
  10. package/out/ui/packages/icon/components/Icon.luau +9 -6
  11. package/out/ui/packages/iconButton/components/IconButton.luau +11 -8
  12. package/out/ui/packages/input/components/Input.luau +34 -19
  13. package/out/ui/packages/progressBar/components/ProgressBar.luau +36 -17
  14. package/out/ui/packages/shadow/components/Shadow.luau +13 -9
  15. package/out/ui/packages/sidebar/components/Sidebar.luau +14 -6
  16. package/out/ui/packages/toast/components/Toast.luau +25 -16
  17. package/out/ui/packages/treeView/components/TreeView.luau +40 -25
  18. package/out/ui/packages/typography/components/Typography.luau +8 -4
  19. package/package.json +15 -12
  20. package/out/index.d.ts +0 -2
  21. package/out/theme/components/ThemeProvider.d.ts +0 -9
  22. package/out/theme/components/ThemeStore.d.ts +0 -13
  23. package/out/theme/components/ThemeStore.luau +0 -29
  24. package/out/theme/components/ThemeWrapper.d.ts +0 -9
  25. package/out/theme/components/index.d.ts +0 -8
  26. package/out/theme/constants/NumberConstants.d.ts +0 -6
  27. package/out/theme/constants/ThemeConstants.d.ts +0 -5
  28. package/out/theme/constants/index.d.ts +0 -2
  29. package/out/theme/index.d.ts +0 -20
  30. package/out/theme/interfaces/iconSizes/IconSizes.d.ts +0 -5
  31. package/out/theme/interfaces/iconSizes/index.d.ts +0 -1
  32. package/out/theme/interfaces/index.d.ts +0 -13
  33. package/out/theme/interfaces/palette/Palette.d.ts +0 -26
  34. package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +0 -4
  35. package/out/theme/interfaces/palette/colorTokens/index.d.ts +0 -1
  36. package/out/theme/interfaces/palette/colors/Blue.d.ts +0 -3
  37. package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -42
  38. package/out/theme/interfaces/palette/colors/Common.d.ts +0 -6
  39. package/out/theme/interfaces/palette/colors/Dark.d.ts +0 -3
  40. package/out/theme/interfaces/palette/colors/Gray.d.ts +0 -3
  41. package/out/theme/interfaces/palette/colors/Green.d.ts +0 -3
  42. package/out/theme/interfaces/palette/colors/Light.d.ts +0 -3
  43. package/out/theme/interfaces/palette/colors/Magenta.d.ts +0 -3
  44. package/out/theme/interfaces/palette/colors/Orange.d.ts +0 -3
  45. package/out/theme/interfaces/palette/colors/Purple.d.ts +0 -3
  46. package/out/theme/interfaces/palette/colors/Red.d.ts +0 -3
  47. package/out/theme/interfaces/palette/colors/Turquoise.d.ts +0 -3
  48. package/out/theme/interfaces/palette/colors/Yellow.d.ts +0 -3
  49. package/out/theme/interfaces/palette/colors/index.d.ts +0 -13
  50. package/out/theme/interfaces/palette/index.d.ts +0 -3
  51. package/out/theme/interfaces/spacing/Borders.d.ts +0 -4
  52. package/out/theme/interfaces/spacing/Padding.d.ts +0 -4
  53. package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
  54. package/out/theme/interfaces/spacing/Spacing.d.ts +0 -4
  55. package/out/theme/interfaces/spacing/index.d.ts +0 -4
  56. package/out/theme/interfaces/theme/Theme.d.ts +0 -14
  57. package/out/theme/interfaces/theme/ThemeConstants.d.ts +0 -25
  58. package/out/theme/interfaces/theme/ThemeOptions.d.ts +0 -4
  59. package/out/theme/interfaces/theme/index.d.ts +0 -3
  60. package/out/theme/interfaces/tokens/Tokens.d.ts +0 -1
  61. package/out/theme/interfaces/tokens/index.d.ts +0 -1
  62. package/out/theme/interfaces/typography/FontFamilies.d.ts +0 -2
  63. package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +0 -3
  64. package/out/theme/interfaces/typography/FontSizeOptions.d.ts +0 -3
  65. package/out/theme/interfaces/typography/FontSizes.d.ts +0 -3
  66. package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -7
  67. package/out/theme/interfaces/typography/Variants.d.ts +0 -18
  68. package/out/theme/interfaces/typography/index.d.ts +0 -8
  69. package/out/theme/styles/index.d.ts +0 -5
  70. package/out/theme/styles/types/WriteableStyle.d.ts +0 -1
  71. package/out/theme/styles/types/index.d.ts +0 -2
  72. package/out/theme/styles/types/styles.d.ts +0 -2
  73. package/out/theme/styles/utilities/classNames.d.ts +0 -7
  74. package/out/theme/styles/utilities/createStyles.d.ts +0 -3
  75. package/out/theme/styles/utilities/index.d.ts +0 -3
  76. package/out/theme/styles/utilities/makeStyles.d.ts +0 -7
  77. package/out/theme/themes/DarkTheme.d.ts +0 -3
  78. package/out/theme/themes/LightTheme.d.ts +0 -3
  79. package/out/theme/themes/index.d.ts +0 -3
  80. package/out/theme/types/index.d.ts +0 -7
  81. package/out/theme/types/types.d.ts +0 -13
  82. package/out/theme/utilites/Color3FromHex.d.ts +0 -2
  83. package/out/theme/utilites/index.d.ts +0 -1
  84. package/out/ui/constants/ImageConstants.d.ts +0 -2
  85. package/out/ui/constants/LayoutConstants.d.ts +0 -1
  86. package/out/ui/constants/index.d.ts +0 -2
  87. package/out/ui/enums/Directions.d.ts +0 -8
  88. package/out/ui/enums/Icons.d.ts +0 -40
  89. package/out/ui/enums/Orientations.d.ts +0 -4
  90. package/out/ui/enums/index.d.ts +0 -3
  91. package/out/ui/index.d.ts +0 -34
  92. package/out/ui/packages/button/components/Button.d.ts +0 -26
  93. package/out/ui/packages/button/components/Button.styles.d.ts +0 -3
  94. package/out/ui/packages/button/index.d.ts +0 -6
  95. package/out/ui/packages/button/types/ButtonColor.d.ts +0 -1
  96. package/out/ui/packages/button/types/ButtonSize.d.ts +0 -1
  97. package/out/ui/packages/button/types/ButtonVariant.d.ts +0 -1
  98. package/out/ui/packages/button/types/index.d.ts +0 -3
  99. package/out/ui/packages/divider/components/Divider.d.ts +0 -14
  100. package/out/ui/packages/divider/components/Divider.styles.d.ts +0 -3
  101. package/out/ui/packages/divider/index.d.ts +0 -3
  102. package/out/ui/packages/icon/components/Icon.d.ts +0 -12
  103. package/out/ui/packages/icon/components/Icon.styles.d.ts +0 -3
  104. package/out/ui/packages/icon/index.d.ts +0 -3
  105. package/out/ui/packages/iconButton/components/IconButton.d.ts +0 -14
  106. package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +0 -3
  107. package/out/ui/packages/iconButton/index.d.ts +0 -3
  108. package/out/ui/packages/index.d.ts +0 -11
  109. package/out/ui/packages/input/components/Input.d.ts +0 -24
  110. package/out/ui/packages/input/components/Input.styles.d.ts +0 -3
  111. package/out/ui/packages/input/index.d.ts +0 -6
  112. package/out/ui/packages/input/types/InputColor.d.ts +0 -1
  113. package/out/ui/packages/input/types/InputMargin.d.ts +0 -1
  114. package/out/ui/packages/input/types/InputVariant.d.ts +0 -1
  115. package/out/ui/packages/input/types/index.d.ts +0 -3
  116. package/out/ui/packages/progressBar/components/ProgressBar.d.ts +0 -9
  117. package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +0 -2
  118. package/out/ui/packages/progressBar/index.d.ts +0 -3
  119. package/out/ui/packages/shadow/components/Shadow.d.ts +0 -4
  120. package/out/ui/packages/shadow/components/Shadow.styles.d.ts +0 -2
  121. package/out/ui/packages/shadow/index.d.ts +0 -2
  122. package/out/ui/packages/sidebar/components/Sidebar.d.ts +0 -9
  123. package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +0 -3
  124. package/out/ui/packages/sidebar/index.d.ts +0 -4
  125. package/out/ui/packages/sidebar/types/SidebarType.d.ts +0 -1
  126. package/out/ui/packages/sidebar/types/index.d.ts +0 -1
  127. package/out/ui/packages/toast/components/Toast.d.ts +0 -12
  128. package/out/ui/packages/toast/components/Toast.styles.d.ts +0 -3
  129. package/out/ui/packages/toast/enums/ToastVariants.d.ts +0 -7
  130. package/out/ui/packages/toast/index.d.ts +0 -5
  131. package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +0 -5
  132. package/out/ui/packages/treeView/components/TreeView.d.ts +0 -13
  133. package/out/ui/packages/treeView/components/TreeView.styles.d.ts +0 -2
  134. package/out/ui/packages/treeView/index.d.ts +0 -6
  135. package/out/ui/packages/treeView/interfaces/Branch.d.ts +0 -6
  136. package/out/ui/packages/treeView/interfaces/Leaf.d.ts +0 -4
  137. package/out/ui/packages/treeView/interfaces/Tree.d.ts +0 -5
  138. package/out/ui/packages/typography/components/Typography.d.ts +0 -19
  139. package/out/ui/packages/typography/components/Typography.styles.d.ts +0 -3
  140. package/out/ui/packages/typography/index.d.ts +0 -6
  141. package/out/ui/packages/typography/types/TypographyAlignment.d.ts +0 -1
  142. package/out/ui/packages/typography/types/TypographyColor.d.ts +0 -1
  143. package/out/ui/packages/typography/types/TypographyDisplay.d.ts +0 -1
  144. 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 Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
4
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
- local markPureComponent = _roact_hooked.markPureComponent
6
- local useCallback = _roact_hooked.useCallback
7
- local useEffect = _roact_hooked.useEffect
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 = table.clone(root)
138
- setmetatable(_attributes, nil)
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 = Roact.jsx(Typography, _attributes_1)
156
- local _attributes_2 = table.clone(list)
157
- setmetatable(_attributes_2, nil)
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 = Roact.jsx("uigridlayout", _attributes_3)
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 = table.clone(row)
183
- setmetatable(_attributes_4, nil)
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 = (Roact.jsx(Icon, _attributes_5))
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 = Roact.jsx("textbutton", _attributes_4, _condition, Roact.jsx(Typography, _attributes_5))
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 = table.clone(row)
256
- setmetatable(_attributes_6, nil)
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 = Roact.jsx(Icon, {
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 Roact.jsx("textbutton", _attributes_6, _exp_5, Roact.jsx(Typography, _attributes_7))
296
+ return React.createElement("textbutton", _attributes_6, _exp_5, React.createElement(Typography, _attributes_7))
282
297
  else
283
- return Roact.jsx(Roact.Fragment)
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 Roact.jsx(Roact.Fragment, nil, _exp_3, _condition_1)
307
+ return React.createElement(React.Fragment, nil, _exp_3, _condition_1)
293
308
  else
294
- return Roact.jsx(Roact.Fragment)
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 Roact.jsx("frame", _attributes, _exp, Roact.jsx("scrollingframe", _attributes_2, _exp_1, _newValue))
316
+ return React.createElement("frame", _attributes, _exp, React.createElement("scrollingframe", _attributes_2, _exp_1, _newValue))
302
317
  end
303
- local default = markPureComponent(TreeView)
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 Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
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 = table.clone(root)
17
- setmetatable(_attributes, nil)
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 Roact.jsx("textlabel", _attributes, children)
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.10",
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
- "prettier": "^3.3.3"
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/compiler-types": "^3.0.0-types.0",
44
- "@rbxts/roact": "^3.0.1",
45
- "@rbxts/roact-hooked": "^2.6.2",
46
- "@rbxts/roact-rodux-hooked": "^1.1.3",
47
- "@rbxts/rodux": "^3.0.0-ts.3",
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,2 +0,0 @@
1
- export * from "./theme/index";
2
- export * from "./ui/index";
@@ -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";
@@ -1,6 +0,0 @@
1
- import { IconSizes } from "../interfaces/index";
2
- export declare const SPACING_BASE = 12;
3
- export declare const PADDING_BASE = 4;
4
- export declare const BORDER_RADIUS = 4;
5
- export declare const CONTENT_WIDTH = 1024;
6
- export declare const ICON_SIZES: IconSizes;
@@ -1,5 +0,0 @@
1
- import { Colors } from "../interfaces/palette/colors/index";
2
- import { Borders } from "../interfaces/spacing/index";
3
- export declare const DARK_THEME_COLORS: Colors;
4
- export declare const LIGHT_THEME_COLORS: Colors;
5
- export declare const DEFAULT_BORDERS: Borders;
@@ -1,2 +0,0 @@
1
- export * from "./NumberConstants";
2
- export * from "./ThemeConstants";
@@ -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,5 +0,0 @@
1
- export default interface IconSizes {
2
- small: number;
3
- medium: number;
4
- large: number;
5
- }
@@ -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,4 +0,0 @@
1
- import { Tokens } from "../../../index";
2
- export type ColorTokens = {
3
- [key in Tokens]: Color3;
4
- };
@@ -1 +0,0 @@
1
- export { ColorTokens } from "./ColorTokens";
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Blue: ColorTokens;
3
- export default Blue;
@@ -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,6 +0,0 @@
1
- export interface CommonColors {
2
- Black: Color3;
3
- White: Color3;
4
- }
5
- declare const Common: CommonColors;
6
- export default Common;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Dark: ColorTokens;
3
- export default Dark;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Gray: ColorTokens;
3
- export default Gray;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Green: ColorTokens;
3
- export default Green;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Light: ColorTokens;
3
- export default Light;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Magenta: ColorTokens;
3
- export default Magenta;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Orange: ColorTokens;
3
- export default Orange;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Purple: ColorTokens;
3
- export default Purple;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Red: ColorTokens;
3
- export default Red;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Turquoise: ColorTokens;
3
- export default Turquoise;
@@ -1,3 +0,0 @@
1
- import { ColorTokens } from "../colorTokens/ColorTokens";
2
- declare const Yellow: ColorTokens;
3
- export default Yellow;
@@ -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,3 +0,0 @@
1
- export * from "./colors/index";
2
- export { ColorTokens } from "./colorTokens/index";
3
- export { default as Palette } from "./Palette";
@@ -1,4 +0,0 @@
1
- export default interface Borders {
2
- default: number;
3
- divider: number;
4
- }
@@ -1,4 +0,0 @@
1
- export default interface Padding {
2
- default: number;
3
- calc: (multiple: number) => number;
4
- }
@@ -1,3 +0,0 @@
1
- export default interface Shape {
2
- borderRadius: number;
3
- }
@@ -1,4 +0,0 @@
1
- export default interface Spacing {
2
- default: number;
3
- calc: (multiple: number) => number;
4
- }
@@ -1,4 +0,0 @@
1
- export { default as Borders } from "./Borders";
2
- export { default as Padding } from "./Padding";
3
- export { default as Shape } from "./Shape";
4
- export { default as Spacing } from "./Spacing";
@@ -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,4 +0,0 @@
1
- import ThemeConstants from "./ThemeConstants";
2
- export default interface ThemeOptions {
3
- constants: ThemeConstants;
4
- }
@@ -1,3 +0,0 @@
1
- export { default as Theme } from "./Theme";
2
- export { default as ThemeConstants } from "./ThemeConstants";
3
- export { default as ThemeOptions } from "./ThemeOptions";
@@ -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";
@@ -1,2 +0,0 @@
1
- import { FontFamilyOptions } from "./FontFamilyOptions";
2
- export declare const allFontFamilies: FontFamilyOptions;
@@ -1,3 +0,0 @@
1
- export type FontFamilyVariant = "default" | "bold" | "semibold" | "light" | "italics";
2
- export interface FontFamilyOptions extends Partial<Record<FontFamilyVariant, Required<Enum.Font>>> {
3
- }
@@ -1,3 +0,0 @@
1
- export type FontSizeVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body" | "caption" | "button" | "overline";
2
- export interface FontSizeOptions extends Partial<Record<FontSizeVariant, Required<number>>> {
3
- }