@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.
Files changed (228) hide show
  1. package/README.md +33 -37
  2. package/out/index.d.ts +2 -2
  3. package/out/{init.lua → init.luau} +1 -1
  4. package/out/theme/components/ThemeProvider.d.ts +3 -3
  5. package/out/theme/components/{ThemeProvider.lua → ThemeProvider.luau} +6 -22
  6. package/out/theme/components/ThemeStore.d.ts +1 -2
  7. package/out/theme/components/{ThemeStore.lua → ThemeStore.luau} +1 -1
  8. package/out/theme/components/ThemeWrapper.d.ts +3 -3
  9. package/out/theme/components/{ThemeWrapper.lua → ThemeWrapper.luau} +6 -21
  10. package/out/theme/components/{init.lua → init.luau} +1 -1
  11. package/out/theme/constants/NumberConstants.d.ts +1 -1
  12. package/out/theme/constants/{NumberConstants.lua → NumberConstants.luau} +1 -1
  13. package/out/theme/constants/ThemeConstants.d.ts +2 -2
  14. package/out/theme/constants/{ThemeConstants.lua → ThemeConstants.luau} +1 -1
  15. package/out/theme/constants/{init.lua → init.luau} +1 -1
  16. package/out/theme/index.d.ts +17 -17
  17. package/out/theme/{init.lua → init.luau} +1 -1
  18. package/out/theme/interfaces/iconSizes/IconSizes.luau +2 -0
  19. package/out/theme/interfaces/iconSizes/init.luau +2 -0
  20. package/out/theme/interfaces/index.d.ts +13 -13
  21. package/out/theme/interfaces/{init.lua → init.luau} +1 -1
  22. package/out/theme/interfaces/palette/Palette.d.ts +0 -1
  23. package/out/theme/interfaces/palette/Palette.luau +2 -0
  24. package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +1 -2
  25. package/out/theme/interfaces/palette/colorTokens/ColorTokens.luau +2 -0
  26. package/out/theme/interfaces/palette/colorTokens/init.luau +2 -0
  27. package/out/theme/interfaces/palette/colors/{Blue.lua → Blue.luau} +1 -1
  28. package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -1
  29. package/out/theme/interfaces/palette/colors/Colors.luau +2 -0
  30. package/out/theme/interfaces/palette/colors/Common.d.ts +0 -1
  31. package/out/theme/interfaces/palette/colors/{Common.lua → Common.luau} +1 -1
  32. package/out/theme/interfaces/palette/colors/{Dark.lua → Dark.luau} +1 -1
  33. package/out/theme/interfaces/palette/colors/{Gray.lua → Gray.luau} +1 -1
  34. package/out/theme/interfaces/palette/colors/{Green.lua → Green.luau} +1 -1
  35. package/out/theme/interfaces/palette/colors/{Light.lua → Light.luau} +1 -1
  36. package/out/theme/interfaces/palette/colors/{Magenta.lua → Magenta.luau} +1 -1
  37. package/out/theme/interfaces/palette/colors/{Orange.lua → Orange.luau} +1 -1
  38. package/out/theme/interfaces/palette/colors/{Purple.lua → Purple.luau} +1 -1
  39. package/out/theme/interfaces/palette/colors/{Red.lua → Red.luau} +1 -1
  40. package/out/theme/interfaces/palette/colors/{Turquoise.lua → Turquoise.luau} +1 -1
  41. package/out/theme/interfaces/palette/colors/{Yellow.lua → Yellow.luau} +1 -1
  42. package/out/theme/interfaces/palette/colors/{init.lua → init.luau} +1 -1
  43. package/out/theme/interfaces/palette/index.d.ts +2 -2
  44. package/out/theme/interfaces/palette/{init.lua → init.luau} +1 -1
  45. package/out/theme/interfaces/spacing/Borders.luau +2 -0
  46. package/out/theme/interfaces/spacing/Padding.luau +2 -0
  47. package/out/theme/interfaces/spacing/Shape.luau +2 -0
  48. package/out/theme/interfaces/spacing/Spacing.luau +2 -0
  49. package/out/theme/interfaces/spacing/init.luau +2 -0
  50. package/out/theme/interfaces/theme/Theme.d.ts +3 -3
  51. package/out/theme/interfaces/theme/Theme.luau +2 -0
  52. package/out/theme/interfaces/theme/ThemeConstants.d.ts +4 -4
  53. package/out/theme/interfaces/theme/ThemeConstants.luau +2 -0
  54. package/out/theme/interfaces/theme/ThemeOptions.luau +2 -0
  55. package/out/theme/interfaces/theme/init.luau +2 -0
  56. package/out/theme/interfaces/tokens/Tokens.luau +2 -0
  57. package/out/theme/interfaces/tokens/init.luau +2 -0
  58. package/out/theme/interfaces/typography/{FontFamilies.lua → FontFamilies.luau} +1 -1
  59. package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +0 -2
  60. package/out/theme/interfaces/typography/FontFamilyOptions.luau +2 -0
  61. package/out/theme/interfaces/typography/FontSizeOptions.d.ts +0 -1
  62. package/out/theme/interfaces/typography/FontSizeOptions.luau +2 -0
  63. package/out/theme/interfaces/typography/{FontSizes.lua → FontSizes.luau} +1 -1
  64. package/out/theme/interfaces/typography/ThemeTypography.luau +2 -0
  65. package/out/theme/interfaces/typography/{Variants.lua → Variants.luau} +1 -1
  66. package/out/theme/interfaces/typography/{init.lua → init.luau} +1 -1
  67. package/out/theme/styles/index.d.ts +5 -5
  68. package/out/theme/styles/{init.lua → init.luau} +1 -1
  69. package/out/theme/styles/types/WriteableStyle.d.ts +0 -2
  70. package/out/theme/styles/types/WriteableStyle.luau +2 -0
  71. package/out/theme/styles/types/init.luau +2 -0
  72. package/out/theme/styles/types/styles.d.ts +0 -2
  73. package/out/theme/styles/types/styles.luau +2 -0
  74. package/out/theme/styles/utilities/classNames.d.ts +2 -3
  75. package/out/theme/styles/utilities/classNames.luau +33 -0
  76. package/out/theme/styles/utilities/{createStyles.lua → createStyles.luau} +1 -1
  77. package/out/theme/styles/utilities/{init.lua → init.luau} +1 -1
  78. package/out/theme/styles/utilities/makeStyles.d.ts +1 -1
  79. package/out/theme/styles/utilities/{makeStyles.lua → makeStyles.luau} +1 -1
  80. package/out/theme/themes/DarkTheme.d.ts +1 -1
  81. package/out/theme/themes/{DarkTheme.lua → DarkTheme.luau} +1 -1
  82. package/out/theme/themes/LightTheme.d.ts +1 -1
  83. package/out/theme/themes/{LightTheme.lua → LightTheme.luau} +1 -1
  84. package/out/theme/themes/{init.lua → init.luau} +1 -1
  85. package/out/theme/types/init.luau +2 -0
  86. package/out/theme/types/types.d.ts +5 -8
  87. package/out/theme/types/{types.lua → types.luau} +1 -1
  88. package/out/theme/utilites/{Color3FromHex.lua → Color3FromHex.luau} +2 -2
  89. package/out/theme/utilites/{init.lua → init.luau} +1 -1
  90. package/out/ui/constants/{ImageConstants.lua → ImageConstants.luau} +1 -1
  91. package/out/ui/constants/{LayoutConstants.lua → LayoutConstants.luau} +1 -1
  92. package/out/ui/constants/{init.lua → init.luau} +1 -1
  93. package/out/ui/enums/Directions.luau +12 -0
  94. package/out/ui/enums/Icons.luau +44 -0
  95. package/out/ui/enums/Orientations.luau +8 -0
  96. package/out/ui/enums/{init.lua → init.luau} +1 -1
  97. package/out/ui/index.d.ts +34 -34
  98. package/out/ui/{init.lua → init.luau} +1 -1
  99. package/out/ui/packages/button/components/Button.d.ts +3 -5
  100. package/out/ui/packages/button/components/{Button.lua → Button.luau} +63 -88
  101. package/out/ui/packages/button/components/Button.styles.d.ts +1 -1
  102. package/out/ui/packages/button/components/{Button.styles.lua → Button.styles.luau} +1 -1
  103. package/out/ui/packages/button/index.d.ts +3 -3
  104. package/out/ui/packages/button/{init.lua → init.luau} +1 -1
  105. package/out/ui/packages/button/types/ButtonColor.luau +2 -0
  106. package/out/ui/packages/button/types/ButtonSize.luau +2 -0
  107. package/out/ui/packages/button/types/ButtonVariant.luau +2 -0
  108. package/out/ui/packages/button/types/init.luau +2 -0
  109. package/out/ui/packages/divider/components/Divider.d.ts +2 -6
  110. package/out/ui/packages/divider/components/{Divider.lua → Divider.luau} +6 -10
  111. package/out/ui/packages/divider/components/Divider.styles.d.ts +1 -1
  112. package/out/ui/packages/divider/components/{Divider.styles.lua → Divider.styles.luau} +1 -1
  113. package/out/ui/packages/divider/{init.lua → init.luau} +1 -1
  114. package/out/ui/packages/icon/components/Icon.d.ts +2 -5
  115. package/out/ui/packages/icon/components/{Icon.lua → Icon.luau} +5 -9
  116. package/out/ui/packages/icon/components/Icon.styles.d.ts +1 -1
  117. package/out/ui/packages/icon/components/{Icon.styles.lua → Icon.styles.luau} +1 -1
  118. package/out/ui/packages/icon/{init.lua → init.luau} +1 -1
  119. package/out/ui/packages/iconButton/components/IconButton.d.ts +2 -5
  120. package/out/ui/packages/iconButton/components/{IconButton.lua → IconButton.luau} +18 -20
  121. package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +1 -1
  122. package/out/ui/packages/iconButton/components/{IconButton.styles.lua → IconButton.styles.luau} +1 -1
  123. package/out/ui/packages/iconButton/{init.lua → init.luau} +1 -1
  124. package/out/ui/packages/index.d.ts +11 -11
  125. package/out/ui/packages/{init.lua → init.luau} +1 -1
  126. package/out/ui/packages/input/components/Input.d.ts +2 -6
  127. package/out/ui/packages/input/components/{Input.lua → Input.luau} +38 -69
  128. package/out/ui/packages/input/components/Input.styles.d.ts +1 -1
  129. package/out/ui/packages/input/components/{Input.styles.lua → Input.styles.luau} +1 -1
  130. package/out/ui/packages/input/index.d.ts +3 -3
  131. package/out/ui/packages/input/{init.lua → init.luau} +1 -1
  132. package/out/ui/packages/input/types/InputColor.luau +2 -0
  133. package/out/ui/packages/input/types/InputMargin.luau +2 -0
  134. package/out/ui/packages/input/types/InputVariant.luau +2 -0
  135. package/out/ui/packages/input/types/init.luau +2 -0
  136. package/out/ui/packages/progressBar/components/ProgressBar.d.ts +1 -3
  137. package/out/ui/packages/progressBar/components/ProgressBar.luau +46 -0
  138. package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +1 -1
  139. package/out/ui/packages/progressBar/components/{ProgressBar.styles.lua → ProgressBar.styles.luau} +1 -1
  140. package/out/ui/packages/progressBar/{init.lua → init.luau} +1 -1
  141. package/out/ui/packages/shadow/components/Shadow.d.ts +0 -1
  142. package/out/ui/packages/shadow/components/{Shadow.lua → Shadow.luau} +14 -24
  143. package/out/ui/packages/shadow/components/Shadow.styles.d.ts +1 -1
  144. package/out/ui/packages/shadow/components/{Shadow.styles.lua → Shadow.styles.luau} +1 -1
  145. package/out/ui/packages/shadow/{init.lua → init.luau} +1 -1
  146. package/out/ui/packages/sidebar/components/Sidebar.d.ts +1 -3
  147. package/out/ui/packages/sidebar/components/Sidebar.luau +26 -0
  148. package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +1 -1
  149. package/out/ui/packages/sidebar/components/{Sidebar.styles.lua → Sidebar.styles.luau} +1 -1
  150. package/out/ui/packages/sidebar/index.d.ts +1 -1
  151. package/out/ui/packages/sidebar/{init.lua → init.luau} +1 -1
  152. package/out/ui/packages/sidebar/types/SidebarType.luau +2 -0
  153. package/out/ui/packages/sidebar/types/init.luau +2 -0
  154. package/out/ui/packages/toast/components/Toast.d.ts +0 -1
  155. package/out/ui/packages/toast/components/{Toast.lua → Toast.luau} +21 -29
  156. package/out/ui/packages/toast/components/Toast.styles.d.ts +1 -1
  157. package/out/ui/packages/toast/components/{Toast.styles.lua → Toast.styles.luau} +1 -1
  158. package/out/ui/packages/toast/enums/ToastVariants.luau +11 -0
  159. package/out/ui/packages/toast/{init.lua → init.luau} +1 -1
  160. package/out/ui/packages/toast/interfaces/ToastEvent.luau +2 -0
  161. package/out/ui/packages/treeView/components/TreeView.d.ts +2 -4
  162. package/out/ui/packages/treeView/components/{TreeView.lua → TreeView.luau} +116 -149
  163. package/out/ui/packages/treeView/components/TreeView.styles.d.ts +1 -1
  164. package/out/ui/packages/treeView/components/{TreeView.styles.lua → TreeView.styles.luau} +1 -1
  165. package/out/ui/packages/treeView/{init.lua → init.luau} +1 -1
  166. package/out/ui/packages/treeView/interfaces/Branch.luau +2 -0
  167. package/out/ui/packages/treeView/interfaces/Leaf.luau +2 -0
  168. package/out/ui/packages/treeView/interfaces/Tree.luau +2 -0
  169. package/out/ui/packages/typography/components/Typography.d.ts +2 -4
  170. package/out/ui/packages/typography/components/{Typography.lua → Typography.luau} +7 -22
  171. package/out/ui/packages/typography/components/Typography.styles.d.ts +1 -1
  172. package/out/ui/packages/typography/components/{Typography.styles.lua → Typography.styles.luau} +1 -1
  173. package/out/ui/packages/typography/index.d.ts +3 -3
  174. package/out/ui/packages/typography/{init.lua → init.luau} +1 -1
  175. package/out/ui/packages/typography/types/TypographyAlignment.luau +2 -0
  176. package/out/ui/packages/typography/types/TypographyColor.luau +2 -0
  177. package/out/ui/packages/typography/types/TypographyDisplay.luau +2 -0
  178. package/out/ui/packages/typography/types/init.luau +2 -0
  179. package/package.json +16 -19
  180. package/out/theme/interfaces/iconSizes/IconSizes.lua +0 -2
  181. package/out/theme/interfaces/iconSizes/init.lua +0 -2
  182. package/out/theme/interfaces/palette/Palette.lua +0 -2
  183. package/out/theme/interfaces/palette/colorTokens/ColorTokens.lua +0 -2
  184. package/out/theme/interfaces/palette/colorTokens/init.lua +0 -2
  185. package/out/theme/interfaces/palette/colors/Colors.lua +0 -2
  186. package/out/theme/interfaces/spacing/Borders.lua +0 -2
  187. package/out/theme/interfaces/spacing/Padding.lua +0 -2
  188. package/out/theme/interfaces/spacing/Shape.lua +0 -2
  189. package/out/theme/interfaces/spacing/Spacing.lua +0 -2
  190. package/out/theme/interfaces/spacing/init.lua +0 -2
  191. package/out/theme/interfaces/theme/Theme.lua +0 -2
  192. package/out/theme/interfaces/theme/ThemeConstants.lua +0 -2
  193. package/out/theme/interfaces/theme/ThemeOptions.lua +0 -2
  194. package/out/theme/interfaces/theme/init.lua +0 -2
  195. package/out/theme/interfaces/tokens/Tokens.lua +0 -2
  196. package/out/theme/interfaces/tokens/init.lua +0 -2
  197. package/out/theme/interfaces/typography/FontFamilyOptions.lua +0 -2
  198. package/out/theme/interfaces/typography/FontSizeOptions.lua +0 -2
  199. package/out/theme/interfaces/typography/ThemeTypography.lua +0 -2
  200. package/out/theme/styles/types/WriteableStyle.lua +0 -2
  201. package/out/theme/styles/types/init.lua +0 -2
  202. package/out/theme/styles/types/styles.lua +0 -2
  203. package/out/theme/styles/utilities/classNames.lua +0 -31
  204. package/out/theme/types/init.lua +0 -2
  205. package/out/ui/enums/Directions.lua +0 -23
  206. package/out/ui/enums/Icons.lua +0 -87
  207. package/out/ui/enums/Orientations.lua +0 -15
  208. package/out/ui/packages/button/types/ButtonColor.lua +0 -2
  209. package/out/ui/packages/button/types/ButtonSize.lua +0 -2
  210. package/out/ui/packages/button/types/ButtonVariant.lua +0 -2
  211. package/out/ui/packages/button/types/init.lua +0 -2
  212. package/out/ui/packages/input/types/InputColor.lua +0 -2
  213. package/out/ui/packages/input/types/InputMargin.lua +0 -2
  214. package/out/ui/packages/input/types/InputVariant.lua +0 -2
  215. package/out/ui/packages/input/types/init.lua +0 -2
  216. package/out/ui/packages/progressBar/components/ProgressBar.lua +0 -76
  217. package/out/ui/packages/sidebar/components/Sidebar.lua +0 -46
  218. package/out/ui/packages/sidebar/types/SidebarType.lua +0 -2
  219. package/out/ui/packages/sidebar/types/init.lua +0 -2
  220. package/out/ui/packages/toast/enums/ToastVariants.lua +0 -20
  221. package/out/ui/packages/toast/interfaces/ToastEvent.lua +0 -2
  222. package/out/ui/packages/treeView/interfaces/Branch.lua +0 -2
  223. package/out/ui/packages/treeView/interfaces/Leaf.lua +0 -2
  224. package/out/ui/packages/treeView/interfaces/Tree.lua +0 -2
  225. package/out/ui/packages/typography/types/TypographyAlignment.lua +0 -2
  226. package/out/ui/packages/typography/types/TypographyColor.lua +0 -2
  227. package/out/ui/packages/typography/types/TypographyDisplay.lua +0 -2
  228. package/out/ui/packages/typography/types/init.lua +0 -2
@@ -1,6 +1,6 @@
1
- -- Compiled with roblox-ts v2.2.0
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
- local _arg0 = function(c)
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
- _arg0(_v, _k - 1, _exp)
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
- local _arg0 = function(part)
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
- _arg0(_v, _k - 1, parts)
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 _branches = tree.branches
95
- local _arg0 = function(branch)
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 _leaves = branch.leaves
107
- local _arg0_1 = function(leaf)
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 _leaves do
119
- _arg0_1(_v, _k - 1, _leaves)
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 _branches do
124
- _arg0(_v, _k - 1, _branches)
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
- for _k, _v in root do
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
- _children[_length + 1] = Roact.createElement(Typography, _attributes_1)
152
- local _attributes_2 = {}
153
- for _k, _v in list do
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[Roact.Event.AncestryChanged] = resizeScrollingFrame
158
- _attributes_2[Roact.Event.ChildAdded] = resizeScrollingFrame
159
- _attributes_2[Roact.Event.ChildRemoved] = resizeScrollingFrame
160
- local _children_1 = {}
161
- local _length_1 = #_children_1
162
- local _attributes_3 = {}
163
- for _k, _v in gridLayout do
164
- _attributes_3[_k] = _v
165
- end
166
- _children_1[_length_1 + 1] = Roact.createElement("UIGridLayout", _attributes_3)
167
- local _branches = tree.branches
168
- local _arg0 = function(branch, branchIndex)
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 _children_2 = {}
181
- local _length_2 = #_children_2
182
- local _attributes_4 = {}
183
- for _k, _v in row do
184
- _attributes_4[_k] = _v
185
- end
186
- _attributes_4[Roact.Event.MouseButton1Click] = function()
187
- if branch.onClick then
188
- branch.onClick()
189
- end
190
- -- If there are leaves... Expand/Collapse
191
- if #branch.leaves > 0 then
192
- local _branch = branch
193
- local isExpanded = table.find(expanded, _branch) ~= nil
194
- if isExpanded then
195
- setExpanded(function(oldExpanded)
196
- local _oldExpanded = oldExpanded
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
- end
209
- -- ▲ ReadonlyArray.filter ▲
210
- return _newValue
211
- end)
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
- setExpanded(function(oldExpanded)
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
- else
224
- setSelectedBranch(branch)
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.createElement(Icon, _attributes_5))
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
- for _k, _v in branchTypography do
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
- _children_3[_length_3 + 1] = Roact.createElement(Typography, _attributes_5)
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 _leaves = branch.leaves
262
- local _arg0_1 = function(leaf, leafIndex)
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
- for _k, _v in row do
267
- _attributes_6[_k] = _v
268
- end
269
- _attributes_6[Roact.Event.MouseButton1Click] = function()
270
- setSelectedLeaf(leaf)
271
- setSelectedBranch(branch)
272
- if leaf.onClick then
273
- leaf.onClick()
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 _length_4 = #_children_4
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
- for _k, _v in leafTypography do
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
- _children_4[_length_4 + 1] = Roact.createElement(Typography, _attributes_7)
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.createFragment()
283
+ return Roact.jsx(Roact.Fragment)
302
284
  end
303
285
  end
304
- -- ▼ ReadonlyArray.map ▼
305
- local _newValue = table.create(#_leaves)
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 = _newValue
290
+ _condition_1 = _newValue_1
311
291
  end
312
- if _condition_1 then
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.createFragment()
294
+ return Roact.jsx(Roact.Fragment)
320
295
  end
321
296
  end
322
- -- ▼ ReadonlyArray.map ▼
323
- local _newValue = table.create(#_branches)
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
- for _k, _v in _newValue do
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,4 +1,4 @@
1
- -- Compiled with roblox-ts v2.2.0
1
+ -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
4
  local createStyles = _theme.createStyles
@@ -1,4 +1,4 @@
1
- -- Compiled with roblox-ts v2.2.0
1
+ -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local exports = {}
4
4
  exports.TreeView = TS.import(script, script, "components", "TreeView").default
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
@@ -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 v2.2.0
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[Roact.Children]
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
- for _k, _v in root do
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
- local _children = {}
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,4 +1,4 @@
1
- -- Compiled with roblox-ts v2.2.0
1
+ -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
4
  local createStyles = _theme.createStyles
@@ -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";
@@ -1,4 +1,4 @@
1
- -- Compiled with roblox-ts v2.2.0
1
+ -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local exports = {}
4
4
  exports.Typography = TS.import(script, script, "components", "Typography").default
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
@@ -0,0 +1,2 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ return nil
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/uiblox",
3
- "version": "0.1.7",
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": "^6.9.0",
33
- "@typescript-eslint/parser": "^6.9.0",
34
- "eslint": "^8.52.0",
35
- "eslint-config-prettier": "^9.0.0",
36
- "eslint-plugin-prettier": "^5.0.1",
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.0.3"
38
+ "prettier": "^3.3.3"
39
39
  },
40
40
  "dependencies": {
41
- "roblox-ts": "^2.2.0",
42
- "typescript": "^5.2.2",
43
- "@rbxts/compiler-types": "^2.2.0-types.0",
44
- "@rbxts/roact": "^1.4.4-ts.0",
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.1",
51
- "@rbxts/attributes": "^1.0.0",
52
- "@rbxts/boat-tween": "^1.0.1"
53
- },
54
- "peerDependencies": {
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"
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil
@@ -1,2 +0,0 @@
1
- -- Compiled with roblox-ts v2.2.0
2
- return nil