@rbxts/uiblox 0.2.0-alpha.25 → 0.2.0-alpha.27

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 (109) hide show
  1. package/README.md +27 -109
  2. package/out/ui/packages/accordion/components/Accordion.luau +12 -16
  3. package/out/ui/packages/alert/components/Alert.luau +9 -16
  4. package/out/ui/packages/appBar/components/AppBar.luau +9 -16
  5. package/out/ui/packages/assetField/components/AssetField.luau +12 -16
  6. package/out/ui/packages/avatar/components/Avatar.luau +9 -16
  7. package/out/ui/packages/backdrop/components/Backdrop.luau +9 -16
  8. package/out/ui/packages/badge/components/Badge.luau +9 -16
  9. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +12 -16
  10. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +9 -16
  11. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
  12. package/out/ui/packages/button/components/Button.luau +20 -18
  13. package/out/ui/packages/card/components/Card.d.ts +2 -1
  14. package/out/ui/packages/card/components/Card.luau +8 -0
  15. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +12 -16
  16. package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
  17. package/out/ui/packages/chip/components/Chip.luau +13 -16
  18. package/out/ui/packages/circularProgress/components/CircularProgress.luau +16 -16
  19. package/out/ui/packages/colorPicker/components/ColorPicker.luau +12 -16
  20. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +12 -16
  21. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +12 -16
  22. package/out/ui/packages/dialog/components/Dialog.d.ts +2 -1
  23. package/out/ui/packages/dialog/components/Dialog.luau +21 -10
  24. package/out/ui/packages/divider/components/Divider.luau +20 -33
  25. package/out/ui/packages/drawer/components/Drawer.d.ts +2 -1
  26. package/out/ui/packages/drawer/components/Drawer.luau +18 -5
  27. package/out/ui/packages/fab/components/Fab.luau +31 -26
  28. package/out/ui/packages/fab/components/Fab.styles.luau +6 -0
  29. package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
  30. package/out/ui/packages/formText/components/FormHelperText.luau +12 -16
  31. package/out/ui/packages/formText/components/FormLabel.luau +12 -16
  32. package/out/ui/packages/gradientEditor/components/GradientEditor.luau +12 -16
  33. package/out/ui/packages/host/components/SxHost.d.ts +18 -0
  34. package/out/ui/packages/host/components/SxHost.luau +197 -0
  35. package/out/ui/packages/host/hostPaint.d.ts +11 -0
  36. package/out/ui/packages/host/hostPaint.luau +33 -0
  37. package/out/ui/packages/host/hostRules.d.ts +15 -0
  38. package/out/ui/packages/host/hostRules.luau +92 -0
  39. package/out/ui/packages/host/index.d.ts +3 -0
  40. package/out/ui/packages/host/init.luau +13 -0
  41. package/out/ui/packages/icon/components/Icon.luau +9 -16
  42. package/out/ui/packages/iconButton/components/IconButton.luau +16 -16
  43. package/out/ui/packages/imageList/components/ImageList.luau +9 -16
  44. package/out/ui/packages/imageList/components/ImageList.styles.luau +4 -3
  45. package/out/ui/packages/input/components/Input.luau +14 -16
  46. package/out/ui/packages/layout/components/Box.luau +6 -15
  47. package/out/ui/packages/layout/components/Container.luau +6 -15
  48. package/out/ui/packages/layout/components/FlexItem.luau +6 -15
  49. package/out/ui/packages/layout/components/Grid.luau +6 -15
  50. package/out/ui/packages/layout/components/List.luau +9 -16
  51. package/out/ui/packages/layout/components/Stack.luau +6 -15
  52. package/out/ui/packages/link/components/Link.luau +13 -16
  53. package/out/ui/packages/listItem/components/ListItem.d.ts +2 -1
  54. package/out/ui/packages/listItem/components/ListItem.luau +23 -4
  55. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +5 -1
  56. package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
  57. package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
  58. package/out/ui/packages/markdown/components/Markdown.luau +9 -16
  59. package/out/ui/packages/markdown/components/MarkdownEditor.luau +9 -16
  60. package/out/ui/packages/menu/components/Menu.d.ts +2 -1
  61. package/out/ui/packages/menu/components/Menu.luau +23 -12
  62. package/out/ui/packages/modal/components/Modal.d.ts +2 -1
  63. package/out/ui/packages/modal/components/Modal.luau +29 -5
  64. package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
  65. package/out/ui/packages/numberInput/components/NumberInput.luau +14 -3
  66. package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
  67. package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
  68. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
  69. package/out/ui/packages/pagination/components/Pagination.luau +12 -16
  70. package/out/ui/packages/paper/components/Paper.d.ts +2 -1
  71. package/out/ui/packages/paper/components/Paper.luau +21 -12
  72. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
  73. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
  74. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
  75. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
  76. package/out/ui/packages/popup/components/Popup.d.ts +2 -1
  77. package/out/ui/packages/popup/components/Popup.luau +35 -18
  78. package/out/ui/packages/preloader/components/Preloader.luau +9 -16
  79. package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
  80. package/out/ui/packages/radioGroup/components/RadioGroup.luau +12 -16
  81. package/out/ui/packages/rating/components/Rating.luau +12 -16
  82. package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
  83. package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
  84. package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
  85. package/out/ui/packages/select/components/Select.luau +13 -16
  86. package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
  87. package/out/ui/packages/shadow/components/Shadow.luau +39 -17
  88. package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
  89. package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
  90. package/out/ui/packages/skeleton/components/Skeleton.luau +19 -28
  91. package/out/ui/packages/slider/components/Slider.luau +16 -17
  92. package/out/ui/packages/speedDial/components/SpeedDial.luau +12 -16
  93. package/out/ui/packages/splitPane/components/SplitPane.luau +12 -16
  94. package/out/ui/packages/stateMatrix.luau +1209 -725
  95. package/out/ui/packages/stepper/components/Stepper.luau +9 -16
  96. package/out/ui/packages/switch/components/Switch.luau +16 -16
  97. package/out/ui/packages/table/components/Table.luau +9 -16
  98. package/out/ui/packages/tabs/components/Tabs.luau +12 -16
  99. package/out/ui/packages/toast/components/Toast.luau +16 -13
  100. package/out/ui/packages/toggleButton/components/ToggleButton.luau +24 -32
  101. package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
  102. package/out/ui/packages/treeView/components/TreeView.luau +9 -16
  103. package/out/ui/packages/typography/components/Typography.luau +13 -14
  104. package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
  105. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
  106. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +2 -1
  107. package/out/ui/packages/virtualList/components/EmptyListHint.luau +15 -4
  108. package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
  109. package/package.json +2 -2
@@ -0,0 +1,197 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local React = _react
5
+ local useEffect = _react.useEffect
6
+ local useRef = _react.useRef
7
+ local useState = _react.useState
8
+ local observeViewport = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks", "viewportObserver").observeViewport
9
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
10
+ local _hostRules = TS.import(script, script.Parent.Parent, "hostRules")
11
+ local elementProps = _hostRules.elementProps
12
+ local elementType = _hostRules.elementType
13
+ local hostKind = _hostRules.hostKind
14
+ local hostRest = _hostRules.hostRest
15
+ local layoutGapPatch = _hostRules.layoutGapPatch
16
+ local sxUsesBreakpoints = _hostRules.sxUsesBreakpoints
17
+ local paintHostStyle = TS.import(script, script.Parent.Parent, "hostPaint").paintHostStyle
18
+ local function setRef(hostRef, instance)
19
+ if hostRef == nil then
20
+ return nil
21
+ end
22
+ local _hostRef = hostRef
23
+ if type(_hostRef) == "function" then
24
+ hostRef(instance)
25
+ return nil
26
+ end
27
+ hostRef.current = instance
28
+ end
29
+ local function SxHost(props)
30
+ local _condition = props.tag
31
+ if _condition == nil then
32
+ _condition = "frame"
33
+ end
34
+ local tag = _condition
35
+ local sx = props.sx
36
+ local _binding = useTheme()
37
+ local theme = _binding.theme
38
+ local bound = useRef()
39
+ local width, setWidth = useState(nil)
40
+ local hover, setHover = useState(false)
41
+ local pressed, setPressed = useState(false)
42
+ local focused, setFocused = useState(false)
43
+ useEffect(function()
44
+ local host = bound.current
45
+ if host == nil or not sxUsesBreakpoints(sx) then
46
+ return nil
47
+ end
48
+ return observeViewport(host, function(size)
49
+ setWidth(function(prev)
50
+ return if prev == size.width then prev else size.width
51
+ end)
52
+ end)
53
+ end, { sx })
54
+ local passed = props.state
55
+ local _result = passed
56
+ if _result ~= nil then
57
+ _result = _result.disabled
58
+ end
59
+ local locked = _result == true
60
+ local _exp = props.base
61
+ local _exp_1 = props.className
62
+ local _object = {
63
+ hover = hover,
64
+ pressed = pressed,
65
+ focused = focused,
66
+ }
67
+ if passed then
68
+ for _k, _v in passed do
69
+ _object[_k] = _v
70
+ end
71
+ end
72
+ local paint = paintHostStyle(theme, _exp, _exp_1, sx, width, _object)
73
+ local rest = hostRest(props)
74
+ local caller = rest.Event
75
+ local _object_1 = {}
76
+ if caller then
77
+ for _k, _v in caller do
78
+ _object_1[_k] = _v
79
+ end
80
+ end
81
+ _object_1.MouseEnter = function(...)
82
+ local args = { ... }
83
+ if not locked then
84
+ setHover(true)
85
+ end
86
+ local _result_1 = caller
87
+ if _result_1 ~= nil then
88
+ _result_1 = _result_1.MouseEnter
89
+ if _result_1 ~= nil then
90
+ _result_1(unpack(args))
91
+ end
92
+ end
93
+ end
94
+ _object_1.MouseLeave = function(...)
95
+ local args = { ... }
96
+ setHover(false)
97
+ setPressed(false)
98
+ local _result_1 = caller
99
+ if _result_1 ~= nil then
100
+ _result_1 = _result_1.MouseLeave
101
+ if _result_1 ~= nil then
102
+ _result_1(unpack(args))
103
+ end
104
+ end
105
+ end
106
+ _object_1.MouseButton1Down = function(...)
107
+ local args = { ... }
108
+ if not locked then
109
+ setPressed(true)
110
+ end
111
+ local _result_1 = caller
112
+ if _result_1 ~= nil then
113
+ _result_1 = _result_1.MouseButton1Down
114
+ if _result_1 ~= nil then
115
+ _result_1(unpack(args))
116
+ end
117
+ end
118
+ end
119
+ _object_1.MouseButton1Up = function(...)
120
+ local args = { ... }
121
+ setPressed(false)
122
+ local _result_1 = caller
123
+ if _result_1 ~= nil then
124
+ _result_1 = _result_1.MouseButton1Up
125
+ if _result_1 ~= nil then
126
+ _result_1(unpack(args))
127
+ end
128
+ end
129
+ end
130
+ _object_1.SelectionGained = function(...)
131
+ local args = { ... }
132
+ if not locked then
133
+ setFocused(true)
134
+ end
135
+ local _result_1 = caller
136
+ if _result_1 ~= nil then
137
+ _result_1 = _result_1.SelectionGained
138
+ if _result_1 ~= nil then
139
+ _result_1(unpack(args))
140
+ end
141
+ end
142
+ end
143
+ _object_1.SelectionLost = function(...)
144
+ local args = { ... }
145
+ setFocused(false)
146
+ local _result_1 = caller
147
+ if _result_1 ~= nil then
148
+ _result_1 = _result_1.SelectionLost
149
+ if _result_1 ~= nil then
150
+ _result_1(unpack(args))
151
+ end
152
+ end
153
+ end
154
+ rest.Event = _object_1
155
+ local nodes = React.Children.toArray(props.children)
156
+ local painted = {}
157
+ local hasPad = false
158
+ local hasCorner = false
159
+ for _, node in nodes do
160
+ if not React.isValidElement(node) then
161
+ continue
162
+ end
163
+ local kind = hostKind(elementType(node))
164
+ if kind == "uipadding" then
165
+ hasPad = true
166
+ end
167
+ if kind == "uicorner" then
168
+ hasCorner = true
169
+ end
170
+ local patch = if kind ~= nil then layoutGapPatch(kind, elementProps(node), paint.gap) else nil
171
+ local _arg0 = if patch ~= nil then React.cloneElement(node, patch) else node
172
+ table.insert(painted, _arg0)
173
+ end
174
+ if not hasPad and paint.padding ~= nil then
175
+ local _arg0 = React.createElement("uipadding", paint.padding)
176
+ table.insert(painted, _arg0)
177
+ end
178
+ if not hasCorner and paint.corner ~= nil then
179
+ local _arg0 = React.createElement("uicorner", paint.corner)
180
+ table.insert(painted, _arg0)
181
+ end
182
+ local _object_2 = table.clone(paint.props)
183
+ setmetatable(_object_2, nil)
184
+ for _k, _v in rest do
185
+ _object_2[_k] = _v
186
+ end
187
+ _object_2.ref = function(instance)
188
+ bound.current = instance
189
+ setRef(props.hostRef, instance)
190
+ end
191
+ _object_2.children = painted
192
+ return React.createElement(tag, _object_2)
193
+ end
194
+ local default = SxHost
195
+ return {
196
+ default = default,
197
+ }
@@ -0,0 +1,11 @@
1
+ import { resolveSx, ResolvedSx, SxInput } from "../../../theme/styles/utilities/resolveSx";
2
+ import { StyleState } from "../../../theme/styles/utilities/resolveStyle";
3
+ export interface HostPaint {
4
+ props: {
5
+ [key: string]: unknown;
6
+ };
7
+ padding?: ResolvedSx["padding"];
8
+ corner?: ResolvedSx["corner"];
9
+ gap?: number;
10
+ }
11
+ export declare function paintHostStyle(theme: Parameters<typeof resolveSx>[0], base: object | undefined, className: object | undefined, sx: SxInput | undefined, width: number | undefined, state: StyleState | undefined): HostPaint;
@@ -0,0 +1,33 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local resolveSx = TS.import(script, script.Parent.Parent.Parent.Parent, "theme", "styles", "utilities", "resolveSx").resolveSx
4
+ local resolveStyle = TS.import(script, script.Parent.Parent.Parent.Parent, "theme", "styles", "utilities", "resolveStyle").resolveStyle
5
+ local function paintHostStyle(theme, base, className, sx, width, state)
6
+ local resolved = resolveSx(theme, sx, width)
7
+ local _object = {}
8
+ local _spread = (base or {})
9
+ if _spread then
10
+ for _k, _v in _spread do
11
+ _object[_k] = _v
12
+ end
13
+ end
14
+ local _spread_1 = (className or {})
15
+ if _spread_1 then
16
+ for _k, _v in _spread_1 do
17
+ _object[_k] = _v
18
+ end
19
+ end
20
+ for _k, _v in resolved.root do
21
+ _object[_k] = _v
22
+ end
23
+ local merged = _object
24
+ return {
25
+ props = resolveStyle(merged, state or {}),
26
+ padding = resolved.padding,
27
+ corner = resolved.corner,
28
+ gap = resolved.gap,
29
+ }
30
+ end
31
+ return {
32
+ paintHostStyle = paintHostStyle,
33
+ }
@@ -0,0 +1,15 @@
1
+ export declare function sxUsesBreakpoints(sx: object | undefined): boolean;
2
+ export declare function elementProps(element: unknown): {
3
+ [key: string]: unknown;
4
+ };
5
+ export declare function elementType(element: unknown): unknown;
6
+ export declare function hostKind(typeName: unknown): string | undefined;
7
+ /** Explicit layout padding wins. Otherwise sx `gap` fills the empty field. */
8
+ export declare function layoutGapPatch(kind: string, props: {
9
+ [key: string]: unknown;
10
+ }, gap: number | undefined): {
11
+ [key: string]: unknown;
12
+ } | undefined;
13
+ export declare function hostRest(props: object): {
14
+ [key: string]: unknown;
15
+ };
@@ -0,0 +1,92 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local SKIP = {
3
+ tag = true,
4
+ base = true,
5
+ className = true,
6
+ sx = true,
7
+ state = true,
8
+ hostRef = true,
9
+ children = true,
10
+ }
11
+ local function sxUsesBreakpoints(sx)
12
+ if sx == nil then
13
+ return false
14
+ end
15
+ for _, value in pairs(sx) do
16
+ if typeof(value) ~= "table" then
17
+ continue
18
+ end
19
+ local record = value
20
+ if record.phone ~= nil or record.tablet ~= nil or record.desktop ~= nil then
21
+ return true
22
+ end
23
+ end
24
+ return false
25
+ end
26
+ local function elementProps(element)
27
+ local _element = element
28
+ if typeof(_element) ~= "table" then
29
+ return {}
30
+ end
31
+ local props = element.props
32
+ if typeof(props) ~= "table" then
33
+ return {}
34
+ end
35
+ return props
36
+ end
37
+ local function elementType(element)
38
+ local _element = element
39
+ if typeof(_element) ~= "table" then
40
+ return nil
41
+ end
42
+ return element.type
43
+ end
44
+ local function hostKind(typeName)
45
+ local _typeName = typeName
46
+ if not (type(_typeName) == "string") then
47
+ return nil
48
+ end
49
+ return string.lower(typeName)
50
+ end
51
+ --* Explicit layout padding wins. Otherwise sx `gap` fills the empty field.
52
+ local function layoutGapPatch(kind, props, gap)
53
+ if gap == nil then
54
+ return nil
55
+ end
56
+ if kind == "uilistlayout" then
57
+ if props.Padding ~= nil then
58
+ return nil
59
+ end
60
+ return {
61
+ Padding = UDim.new(0, gap),
62
+ }
63
+ end
64
+ if kind == "uigridlayout" then
65
+ if props.CellPadding ~= nil then
66
+ return nil
67
+ end
68
+ return {
69
+ CellPadding = UDim2.new(0, gap, 0, gap),
70
+ }
71
+ end
72
+ return nil
73
+ end
74
+ local function hostRest(props)
75
+ local rest = {}
76
+ for key, value in pairs(props) do
77
+ local name = key
78
+ if SKIP[name] == true then
79
+ continue
80
+ end
81
+ rest[name] = value
82
+ end
83
+ return rest
84
+ end
85
+ return {
86
+ sxUsesBreakpoints = sxUsesBreakpoints,
87
+ elementProps = elementProps,
88
+ elementType = elementType,
89
+ hostKind = hostKind,
90
+ layoutGapPatch = layoutGapPatch,
91
+ hostRest = hostRest,
92
+ }
@@ -0,0 +1,3 @@
1
+ export { default as SxHost, SxHostProps } from "./components/SxHost";
2
+ export { paintHostStyle } from "./hostPaint";
3
+ export { elementProps, elementType, hostKind, hostRest, layoutGapPatch, sxUsesBreakpoints } from "./hostRules";
@@ -0,0 +1,13 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.SxHost = TS.import(script, script, "components", "SxHost").default
5
+ exports.paintHostStyle = TS.import(script, script, "hostPaint").paintHostStyle
6
+ local _hostRules = TS.import(script, script, "hostRules")
7
+ exports.elementProps = _hostRules.elementProps
8
+ exports.elementType = _hostRules.elementType
9
+ exports.hostKind = _hostRules.hostKind
10
+ exports.hostRest = _hostRules.hostRest
11
+ exports.layoutGapPatch = _hostRules.layoutGapPatch
12
+ exports.sxUsesBreakpoints = _hostRules.sxUsesBreakpoints
13
+ return exports
@@ -1,6 +1,7 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
4
5
  local useIconStyles = TS.import(script, script.Parent, "Icon.styles").default
5
6
  local function Icon(props)
6
7
  local _binding = props
@@ -12,29 +13,21 @@ local function Icon(props)
12
13
  local ref = _binding.ref
13
14
  local _binding_1 = useIconStyles(props)
14
15
  local container = _binding_1.container
15
- local _attributes = {}
16
+ local _attributes = {
17
+ tag = "imagelabel",
18
+ }
16
19
  local _condition = id
17
20
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
18
21
  _condition = "Icon"
19
22
  end
20
23
  _attributes.key = _condition
21
- _attributes.ref = ref
22
- for _k, _v in container do
23
- _attributes[_k] = _v
24
- end
25
- if className then
26
- for _k, _v in className do
27
- _attributes[_k] = _v
28
- end
29
- end
30
- if sx then
31
- for _k, _v in sx do
32
- _attributes[_k] = _v
33
- end
34
- end
24
+ _attributes.hostRef = ref
25
+ _attributes.base = container
26
+ _attributes.className = className
27
+ _attributes.sx = sx
35
28
  _attributes.Image = tostring(icon)
36
29
  _attributes.ImageColor3 = tint or container.ImageColor3
37
- return React.createElement("imagelabel", _attributes)
30
+ return React.createElement(SxHost, _attributes)
38
31
  end
39
32
  local default = Icon
40
33
  return {
@@ -5,6 +5,7 @@ local React = _react
5
5
  local useEffect = _react.useEffect
6
6
  local useState = _react.useState
7
7
  local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
8
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
8
9
  local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
9
10
  local iconSpinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").iconSpinnerPixels
10
11
  local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
@@ -39,26 +40,25 @@ local function IconButton(props)
39
40
  setHovering(false)
40
41
  setFocused(false)
41
42
  end, { active })
42
- local _attributes = {}
43
+ local _attributes = {
44
+ tag = "imagebutton",
45
+ }
43
46
  local _condition = id
44
47
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
45
48
  _condition = "IconButton"
46
49
  end
47
50
  _attributes.key = _condition
48
- _attributes.ref = ref
49
- for _k, _v in container do
50
- _attributes[_k] = _v
51
- end
52
- if className then
53
- for _k, _v in className do
54
- _attributes[_k] = _v
55
- end
56
- end
57
- if sx then
58
- for _k, _v in sx do
59
- _attributes[_k] = _v
60
- end
61
- end
51
+ _attributes.hostRef = ref
52
+ _attributes.base = container
53
+ _attributes.className = className
54
+ _attributes.sx = sx
55
+ _attributes.state = {
56
+ disabled = disabled,
57
+ loading = loading,
58
+ selected = selected,
59
+ hover = hovering,
60
+ focused = focused,
61
+ }
62
62
  _attributes.Active = active
63
63
  _attributes.AutoButtonColor = active
64
64
  _attributes.Selectable = active
@@ -91,7 +91,7 @@ local function IconButton(props)
91
91
  }
92
92
  local _attributes_1 = table.clone(corner)
93
93
  setmetatable(_attributes_1, nil)
94
- return React.createElement("imagebutton", _attributes, React.createElement("uicorner", _attributes_1), loading and (React.createElement(CircularProgress, {
94
+ return React.createElement(SxHost, _attributes, React.createElement("uicorner", _attributes_1), loading and (React.createElement(CircularProgress, {
95
95
  size = iconSpinnerPixels(props.size),
96
96
  thickness = 2,
97
97
  color = tint,
@@ -1,6 +1,7 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
4
5
  local imageListTitle = TS.import(script, script.Parent, "imageListLayout").imageListTitle
5
6
  local useImageListStyles = TS.import(script, script.Parent, "ImageList.styles").default
6
7
  local function ImageList(props)
@@ -19,26 +20,18 @@ local function ImageList(props)
19
20
  gap = gap,
20
21
  itemSize = itemSize,
21
22
  })
22
- local _attributes = {}
23
+ local _attributes = {
24
+ tag = "frame",
25
+ }
23
26
  local _condition = id
24
27
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
25
28
  _condition = "ImageList"
26
29
  end
27
30
  _attributes.key = _condition
28
- _attributes.ref = ref
29
- for _k, _v in styles.root do
30
- _attributes[_k] = _v
31
- end
32
- if className then
33
- for _k, _v in className do
34
- _attributes[_k] = _v
35
- end
36
- end
37
- if sx then
38
- for _k, _v in sx do
39
- _attributes[_k] = _v
40
- end
41
- end
31
+ _attributes.hostRef = ref
32
+ _attributes.base = styles.root
33
+ _attributes.className = className
34
+ _attributes.sx = sx
42
35
  local _attributes_1 = table.clone(styles.grid)
43
36
  setmetatable(_attributes_1, nil)
44
37
  local _exp = React.createElement("uigridlayout", _attributes_1)
@@ -92,7 +85,7 @@ local function ImageList(props)
92
85
  _newValue[_k] = _callback(_v, _k - 1, items)
93
86
  end
94
87
  -- ▲ ReadonlyArray.map ▲
95
- return React.createElement("frame", _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
88
+ return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
96
89
  end
97
90
  local default = ImageList
98
91
  return {
@@ -1,6 +1,7 @@
1
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
+ local Common = _theme.Common
4
5
  local componentStyles = _theme.componentStyles
5
6
  local createStyles = _theme.createStyles
6
7
  local _imageListLayout = TS.import(script, script.Parent, "imageListLayout")
@@ -50,12 +51,12 @@ local useImageListStyles = componentStyles("ImageList", function(theme, _param)
50
51
  title = {
51
52
  Size = UDim2.new(1, 0, 0, bar),
52
53
  Position = UDim2.new(0, 0, 1, -bar),
53
- BackgroundColor3 = theme.palette.surface.overlay,
54
- BackgroundTransparency = 0.25,
54
+ BackgroundColor3 = theme.palette.backdrop,
55
+ BackgroundTransparency = 0.35,
55
56
  BorderSizePixel = 0,
56
57
  Font = theme.typography.fontFamilies.default,
57
58
  TextSize = theme.typography.fontSizes.caption,
58
- TextColor3 = theme.palette.text.inverse,
59
+ TextColor3 = Common.White,
59
60
  TextXAlignment = Enum.TextXAlignment.Left,
60
61
  TextTruncate = Enum.TextTruncate.AtEnd,
61
62
  ZIndex = 2,
@@ -12,6 +12,7 @@ local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "co
12
12
  local spinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").spinnerPixels
13
13
  local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
14
14
  local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
15
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
15
16
  local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
16
17
  local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
17
18
  local syncInputDraft = TS.import(script, script.Parent, "inputDraft").syncInputDraft
@@ -102,26 +103,23 @@ local function Input(props)
102
103
  end, { text })
103
104
  local showStroke = variant == "outlined" or variant == "filled"
104
105
  local showCorner = rounded
105
- local _attributes = {}
106
+ local _attributes = {
107
+ tag = "frame",
108
+ }
106
109
  local _condition_1 = id
107
110
  if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
108
111
  _condition_1 = "Input"
109
112
  end
110
113
  _attributes.key = _condition_1
111
- _attributes.ref = ref
112
- for _k, _v in root do
113
- _attributes[_k] = _v
114
- end
115
- if className then
116
- for _k, _v in className do
117
- _attributes[_k] = _v
118
- end
119
- end
120
- if sx then
121
- for _k, _v in sx do
122
- _attributes[_k] = _v
123
- end
124
- end
114
+ _attributes.hostRef = ref
115
+ _attributes.base = root
116
+ _attributes.className = className
117
+ _attributes.sx = sx
118
+ _attributes.state = {
119
+ disabled = disabled,
120
+ loading = loading,
121
+ focused = focused,
122
+ }
125
123
  local _attributes_1 = {
126
124
  key = "Margin",
127
125
  }
@@ -272,7 +270,7 @@ local function Input(props)
272
270
  _attributes_4.Text = helperText
273
271
  _condition_7 = (React.createElement("textlabel", _attributes_4))
274
272
  end
275
- return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp_1, _exp_2, _condition_7))
273
+ return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp_1, _exp_2, _condition_7))
276
274
  end
277
275
  local default = Input
278
276
  return {
@@ -1,6 +1,7 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
4
5
  local useBoxStyles = TS.import(script, script.Parent, "Box.styles").default
5
6
  local function Box(props)
6
7
  local _binding = props
@@ -21,27 +22,17 @@ local function Box(props)
21
22
  _condition = "Box"
22
23
  end
23
24
  _attributes.key = _condition
24
- _attributes.ref = ref
25
- for _k, _v in styles.root do
26
- _attributes[_k] = _v
27
- end
28
- if className then
29
- for _k, _v in className do
30
- _attributes[_k] = _v
31
- end
32
- end
33
- if sx then
34
- for _k, _v in sx do
35
- _attributes[_k] = _v
36
- end
37
- end
25
+ _attributes.hostRef = ref
26
+ _attributes.base = styles.root
27
+ _attributes.className = className
28
+ _attributes.sx = sx
38
29
  local _condition_1 = padding ~= nil
39
30
  if _condition_1 then
40
31
  local _attributes_1 = table.clone(styles.padding)
41
32
  setmetatable(_attributes_1, nil)
42
33
  _condition_1 = React.createElement("uipadding", _attributes_1)
43
34
  end
44
- return React.createElement("frame", _attributes, _condition_1, children)
35
+ return React.createElement(SxHost, _attributes, _condition_1, children)
45
36
  end
46
37
  local default = Box
47
38
  return {
@@ -1,6 +1,7 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
4
5
  local useContainerStyles = TS.import(script, script.Parent, "Container.styles").default
5
6
  local function Container(props)
6
7
  local _binding = props
@@ -21,20 +22,10 @@ local function Container(props)
21
22
  _condition = "Container"
22
23
  end
23
24
  _attributes.key = _condition
24
- _attributes.ref = ref
25
- for _k, _v in styles.root do
26
- _attributes[_k] = _v
27
- end
28
- if className then
29
- for _k, _v in className do
30
- _attributes[_k] = _v
31
- end
32
- end
33
- if sx then
34
- for _k, _v in sx do
35
- _attributes[_k] = _v
36
- end
37
- end
25
+ _attributes.hostRef = ref
26
+ _attributes.base = styles.root
27
+ _attributes.className = className
28
+ _attributes.sx = sx
38
29
  local _attributes_1 = {
39
30
  key = "Inner",
40
31
  }
@@ -46,7 +37,7 @@ local function Container(props)
46
37
  local _exp = React.createElement("uisizeconstraint", _attributes_2)
47
38
  local _attributes_3 = table.clone(styles.gutter)
48
39
  setmetatable(_attributes_3, nil)
49
- return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, React.createElement("uipadding", _attributes_3), children))
40
+ return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp, React.createElement("uipadding", _attributes_3), children))
50
41
  end
51
42
  local default = Container
52
43
  return {