@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.
- package/README.md +27 -109
- package/out/ui/packages/accordion/components/Accordion.luau +12 -16
- package/out/ui/packages/alert/components/Alert.luau +9 -16
- package/out/ui/packages/appBar/components/AppBar.luau +9 -16
- package/out/ui/packages/assetField/components/AssetField.luau +12 -16
- package/out/ui/packages/avatar/components/Avatar.luau +9 -16
- package/out/ui/packages/backdrop/components/Backdrop.luau +9 -16
- package/out/ui/packages/badge/components/Badge.luau +9 -16
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +12 -16
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +9 -16
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
- package/out/ui/packages/button/components/Button.luau +20 -18
- package/out/ui/packages/card/components/Card.d.ts +2 -1
- package/out/ui/packages/card/components/Card.luau +8 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +12 -16
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/chip/components/Chip.luau +13 -16
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +16 -16
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +12 -16
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +12 -16
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +12 -16
- package/out/ui/packages/dialog/components/Dialog.d.ts +2 -1
- package/out/ui/packages/dialog/components/Dialog.luau +21 -10
- package/out/ui/packages/divider/components/Divider.luau +20 -33
- package/out/ui/packages/drawer/components/Drawer.d.ts +2 -1
- package/out/ui/packages/drawer/components/Drawer.luau +18 -5
- package/out/ui/packages/fab/components/Fab.luau +31 -26
- package/out/ui/packages/fab/components/Fab.styles.luau +6 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
- package/out/ui/packages/formText/components/FormHelperText.luau +12 -16
- package/out/ui/packages/formText/components/FormLabel.luau +12 -16
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +12 -16
- package/out/ui/packages/host/components/SxHost.d.ts +18 -0
- package/out/ui/packages/host/components/SxHost.luau +197 -0
- package/out/ui/packages/host/hostPaint.d.ts +11 -0
- package/out/ui/packages/host/hostPaint.luau +33 -0
- package/out/ui/packages/host/hostRules.d.ts +15 -0
- package/out/ui/packages/host/hostRules.luau +92 -0
- package/out/ui/packages/host/index.d.ts +3 -0
- package/out/ui/packages/host/init.luau +13 -0
- package/out/ui/packages/icon/components/Icon.luau +9 -16
- package/out/ui/packages/iconButton/components/IconButton.luau +16 -16
- package/out/ui/packages/imageList/components/ImageList.luau +9 -16
- package/out/ui/packages/imageList/components/ImageList.styles.luau +4 -3
- package/out/ui/packages/input/components/Input.luau +14 -16
- package/out/ui/packages/layout/components/Box.luau +6 -15
- package/out/ui/packages/layout/components/Container.luau +6 -15
- package/out/ui/packages/layout/components/FlexItem.luau +6 -15
- package/out/ui/packages/layout/components/Grid.luau +6 -15
- package/out/ui/packages/layout/components/List.luau +9 -16
- package/out/ui/packages/layout/components/Stack.luau +6 -15
- package/out/ui/packages/link/components/Link.luau +13 -16
- package/out/ui/packages/listItem/components/ListItem.d.ts +2 -1
- package/out/ui/packages/listItem/components/ListItem.luau +23 -4
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +5 -1
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +9 -16
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +9 -16
- package/out/ui/packages/menu/components/Menu.d.ts +2 -1
- package/out/ui/packages/menu/components/Menu.luau +23 -12
- package/out/ui/packages/modal/components/Modal.d.ts +2 -1
- package/out/ui/packages/modal/components/Modal.luau +29 -5
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +14 -3
- package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
- package/out/ui/packages/pagination/components/Pagination.luau +12 -16
- package/out/ui/packages/paper/components/Paper.d.ts +2 -1
- package/out/ui/packages/paper/components/Paper.luau +21 -12
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -1
- package/out/ui/packages/popup/components/Popup.luau +35 -18
- package/out/ui/packages/preloader/components/Preloader.luau +9 -16
- package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +12 -16
- package/out/ui/packages/rating/components/Rating.luau +12 -16
- package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
- package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
- package/out/ui/packages/select/components/Select.luau +13 -16
- package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
- package/out/ui/packages/shadow/components/Shadow.luau +39 -17
- package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
- package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
- package/out/ui/packages/skeleton/components/Skeleton.luau +19 -28
- package/out/ui/packages/slider/components/Slider.luau +16 -17
- package/out/ui/packages/speedDial/components/SpeedDial.luau +12 -16
- package/out/ui/packages/splitPane/components/SplitPane.luau +12 -16
- package/out/ui/packages/stateMatrix.luau +1209 -725
- package/out/ui/packages/stepper/components/Stepper.luau +9 -16
- package/out/ui/packages/switch/components/Switch.luau +16 -16
- package/out/ui/packages/table/components/Table.luau +9 -16
- package/out/ui/packages/tabs/components/Tabs.luau +12 -16
- package/out/ui/packages/toast/components/Toast.luau +16 -13
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +24 -32
- package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
- package/out/ui/packages/treeView/components/TreeView.luau +9 -16
- package/out/ui/packages/typography/components/Typography.luau +13 -14
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +2 -1
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +15 -4
- package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,13 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
# uiblox-rbxts
|
|
4
4
|
|
|
5
|
+
> This package is a work in progress.
|
|
6
|
+
|
|
5
7
|
UI library and theming for roblox-ts projects.
|
|
6
8
|
|
|
9
|
+
## Background
|
|
10
|
+
|
|
11
|
+
Roblox has their own internal design system, coined "uiblox-web", that it uses for its new
|
|
12
|
+
web-facing products. This system offers reusable components, implemented in
|
|
13
|
+
React Typescript, that are derived from material UI (MUI). As well, it offers a
|
|
14
|
+
common theme/pallete for consistent UI/UX.
|
|
15
|
+
|
|
16
|
+
Anyone is able to view their design system as
|
|
17
|
+
[UIBlox-Web](https://uiblox.roblox.com). You can see that they leverage
|
|
18
|
+
[Storybook](https://storybook.js.org), a UI component explorer for frontend
|
|
19
|
+
developers, to render component previews.
|
|
20
|
+
|
|
21
|
+
Design systems all help engineers cut down on implementation time and ensure
|
|
22
|
+
consitent UX across products.
|
|
23
|
+
|
|
7
24
|
## Overview
|
|
8
25
|
|
|
9
|
-
|
|
26
|
+
So what is uiblox-rbxts? Simply put, its my stab at a design system that mimics
|
|
27
|
+
uiblox-web for games written using roblox-ts.
|
|
10
28
|
|
|
11
|
-
|
|
29
|
+
UIBlox-rbxts aims to provide extensible components that can be reusable by
|
|
30
|
+
anyone who installs this npm package. It also offers a theme and styling system
|
|
31
|
+
that aids UI/UX consistentency.
|
|
32
|
+
|
|
33
|
+
How does it do this? Well, there are two main exports from this package:
|
|
12
34
|
|
|
13
35
|
- @rbxts/uiblox -> theme
|
|
14
36
|
- An extensible Theme type + default Dark (default) and Light themes
|
|
@@ -24,47 +46,11 @@ Main exports from `@rbxts/uiblox`:
|
|
|
24
46
|
|
|
25
47
|
### Installation
|
|
26
48
|
|
|
27
|
-
|
|
28
|
-
npm install @rbxts/uiblox
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Quickstart
|
|
49
|
+
Install the package to get started.
|
|
32
50
|
|
|
33
|
-
|
|
34
|
-
2. Build styles with `makeStyles` / `createStyles` (or `componentStyles`) and spread them onto Instances.
|
|
35
|
-
3. For hover/press/focus/disabled (and list `_first` / `_last`), put `_hover`-style keys on the style table and call `resolveStyle(style, state)` before spreading.
|
|
36
|
-
4. Use packaged components from `@rbxts/uiblox` (`Button`, `Input`, `Select`, …).
|
|
37
|
-
5. Preview components in [Storyblox](https://github.com/bjlarouche/storyblox) with `*.stories` modules.
|
|
51
|
+
`npm install @rbxts/uiblox`
|
|
38
52
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
import React from "@rbxts/react";
|
|
43
|
-
import { Button, DarkTheme, ThemeProvider } from "@rbxts/uiblox";
|
|
44
|
-
|
|
45
|
-
export function App() {
|
|
46
|
-
return (
|
|
47
|
-
<ThemeProvider theme={DarkTheme}>
|
|
48
|
-
<Button text="Continue" onLeftClick={() => {}} />
|
|
49
|
-
</ThemeProvider>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Parity checklist
|
|
55
|
-
|
|
56
|
-
Capability parity, not pixel parity. For each public component, expect:
|
|
57
|
-
|
|
58
|
-
- [ ] Typed controlled props where interaction needs state
|
|
59
|
-
- [ ] Theme tokens (light/dark) via `ThemeProvider`
|
|
60
|
-
- [ ] Style slots / variants through the styling helpers
|
|
61
|
-
- [ ] Disabled / loading / error when the control type warrants it
|
|
62
|
-
- [ ] Mouse, touch, and gamepad-friendly activation where interactive
|
|
63
|
-
- [ ] Cleanup and focused unit checks in-repo
|
|
64
|
-
- [ ] `stateMatrix` rows for visual capture planning
|
|
65
|
-
- [ ] A Storyblox story (dev fixtures OK)
|
|
66
|
-
|
|
67
|
-
Skipped on purpose: browser-only addons (MDX, iframes, hosted visual-review clouds).
|
|
53
|
+
Spacing, density, and sx notes are in [docs/STYLING.md](docs/STYLING.md).
|
|
68
54
|
|
|
69
55
|
## Example
|
|
70
56
|
|
|
@@ -211,74 +197,6 @@ const useMyComponentStyles = makeStyles<MyComponentProps>((theme: Theme, props:
|
|
|
211
197
|
export default useMyComponentStyles;
|
|
212
198
|
```
|
|
213
199
|
|
|
214
|
-
### Style precedence
|
|
215
|
-
|
|
216
|
-
Components spread their own styles first, then `className`, then the props that
|
|
217
|
-
carry state. Later always wins:
|
|
218
|
-
|
|
219
|
-
1. Component styles from the theme
|
|
220
|
-
2. `className` (merge several with `cx(a, condition && b)`; later args win, falsy
|
|
221
|
-
args are skipped)
|
|
222
|
-
3. State props the component owns: `Active`, `Selectable`, `Text`, and the
|
|
223
|
-
value-driven sizes/positions of Slider, SplitPane, and so on
|
|
224
|
-
|
|
225
|
-
So `className` can restyle anything except a control's state. Pass `disabled`
|
|
226
|
-
instead of overriding `Active`.
|
|
227
|
-
|
|
228
|
-
### Controls
|
|
229
|
-
|
|
230
|
-
Inputs are controlled: `{ value, onChange, disabled? }`. They call `onChange`
|
|
231
|
-
only when the value actually changes, and never while disabled.
|
|
232
|
-
|
|
233
|
-
| Component | Value | Notes |
|
|
234
|
-
| --- | --- | --- |
|
|
235
|
-
| Checkbox | `boolean` | `mixed` shows indeterminate; activating commits `true` |
|
|
236
|
-
| Switch | `boolean` | |
|
|
237
|
-
| RadioGroup / Select / Tabs | `T` from `options: { label, value: T, disabled? }[]` | compared by identity; disabled options are skipped |
|
|
238
|
-
| NumberInput | `number` | commits on focus lost or Enter; clamps to `min`/`max`, snaps to `step` |
|
|
239
|
-
| Slider | `number` | `onChange` while dragging, `onCommit` on release |
|
|
240
|
-
| SplitPane | first pane size (px) | display clamps to `min`/`max`; Escape cancels a drag |
|
|
241
|
-
| Input | `text` | `onInput` while typing, `onTextChanged` on commit |
|
|
242
|
-
|
|
243
|
-
Select and Tooltip render through `Popup`, which portals into the nearest
|
|
244
|
-
`LayerCollector` so clipping parents do not cut them off. The popup follows its
|
|
245
|
-
anchor when that anchor moves or resizes, and Select closes if the anchor leaves
|
|
246
|
-
the layer. Select handles Up, Down, Enter, and Escape while it is open or
|
|
247
|
-
selected, including when the pointer is not over it.
|
|
248
|
-
|
|
249
|
-
### Loading
|
|
250
|
-
|
|
251
|
-
`Skeleton` covers a block that is still loading. `variant` is `text`,
|
|
252
|
-
`rectangular`, `rounded`, or `circular`. `width` and `height` are pixels.
|
|
253
|
-
`lines` and `gap` stack text rows. `SkeletonText` is the text variant.
|
|
254
|
-
`animation` is `pulse`, `shimmer`, or `false`. `reducedMotion` holds the block
|
|
255
|
-
still. A later theme preference can set that prop for you.
|
|
256
|
-
|
|
257
|
-
`CircularProgress` spins while `value` is omitted. A `value` from 0 to 1 draws
|
|
258
|
-
an arc and stops the spin. `size`, `thickness`, and `color` restyle the ring.
|
|
259
|
-
`LinearProgress` is the existing `ProgressBar`: pass `value` from 0 to 1 or
|
|
260
|
-
`progress` from 0 to 100. `indeterminate` slides the bar. `disabled` and
|
|
261
|
-
`reducedMotion` stop the motion and fade the fill.
|
|
262
|
-
|
|
263
|
-
`Button` and `IconButton` take `loading`. The control ignores clicks, hover,
|
|
264
|
-
and focus while loading, and its size stays put. `loadingLabel` replaces the
|
|
265
|
-
caption. `loadingPosition` is `start`, `center`, or `end`. `reducedMotion`
|
|
266
|
-
keeps the spinner still.
|
|
267
|
-
|
|
268
|
-
### State captures
|
|
269
|
-
|
|
270
|
-
`stateMatrix` is the gallery list for Storyblox. Each row is one shot: `theme`
|
|
271
|
-
(`Dark` or `Light`), `width`, and `pointer` (`rest`, `hover`, `press`, or
|
|
272
|
-
`focus`). Rows are built in small helper functions and concatenated so the
|
|
273
|
-
compiled Luau chunk stays under the 200-local register limit. `open` means the
|
|
274
|
-
Select list is showing. `options` and `disabledOption` build RadioGroup, Select,
|
|
275
|
-
and Tabs. `selected` and `filter` are TreeView. `value`, `text`, `disabled`,
|
|
276
|
-
`loading`, `mixed`, `hasError`, and `placeholder` are that control's props.
|
|
277
|
-
`variant`, `animation` (`pulse`, `shimmer`, or `false`), `reducedMotion`, and
|
|
278
|
-
`indeterminate` cover skeleton and progress shots. Those shots stay still when
|
|
279
|
-
`animation` is `false` or `reducedMotion` is set. Hover, press, and focus rows
|
|
280
|
-
are only there when the control actually changes.
|
|
281
|
-
|
|
282
200
|
### Client
|
|
283
201
|
|
|
284
202
|
Some sample logic for mounting app when player spawns (on client).
|
|
@@ -4,6 +4,7 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useState = _react.useState
|
|
6
6
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
7
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
8
|
local _accordionOpen = TS.import(script, script.Parent, "accordionOpen")
|
|
8
9
|
local accordionGlyph = _accordionOpen.accordionGlyph
|
|
9
10
|
local accordionOpen = _accordionOpen.accordionOpen
|
|
@@ -40,26 +41,21 @@ local function Accordion(props)
|
|
|
40
41
|
_result(nextOpen)
|
|
41
42
|
end
|
|
42
43
|
end
|
|
43
|
-
local _attributes = {
|
|
44
|
+
local _attributes = {
|
|
45
|
+
tag = "frame",
|
|
46
|
+
}
|
|
44
47
|
local _condition = id
|
|
45
48
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
46
49
|
_condition = "Accordion"
|
|
47
50
|
end
|
|
48
51
|
_attributes.key = _condition
|
|
49
|
-
_attributes.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
if sx then
|
|
59
|
-
for _k, _v in sx do
|
|
60
|
-
_attributes[_k] = _v
|
|
61
|
-
end
|
|
62
|
-
end
|
|
52
|
+
_attributes.hostRef = ref
|
|
53
|
+
_attributes.base = styles.root
|
|
54
|
+
_attributes.className = className
|
|
55
|
+
_attributes.sx = sx
|
|
56
|
+
_attributes.state = {
|
|
57
|
+
disabled = disabled,
|
|
58
|
+
}
|
|
63
59
|
local _condition_1 = square ~= true
|
|
64
60
|
if _condition_1 then
|
|
65
61
|
local _attributes_1 = table.clone(styles.corner)
|
|
@@ -105,7 +101,7 @@ local function Accordion(props)
|
|
|
105
101
|
end
|
|
106
102
|
local _attributes_7 = table.clone(styles.padding)
|
|
107
103
|
setmetatable(_attributes_7, nil)
|
|
108
|
-
return React.createElement(
|
|
104
|
+
return React.createElement(SxHost, _attributes, _condition_1, _exp, _exp_3, React.createElement("frame", _attributes_6, React.createElement("uipadding", _attributes_7), children))
|
|
109
105
|
end
|
|
110
106
|
local default = Accordion
|
|
111
107
|
return {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local useAlertStyles = TS.import(script, script.Parent, "Alert.styles").default
|
|
6
7
|
local function Alert(props)
|
|
7
8
|
local _binding = props
|
|
@@ -21,26 +22,18 @@ local function Alert(props)
|
|
|
21
22
|
dismissible = dismissible,
|
|
22
23
|
filled = filled,
|
|
23
24
|
})
|
|
24
|
-
local _attributes = {
|
|
25
|
+
local _attributes = {
|
|
26
|
+
tag = "frame",
|
|
27
|
+
}
|
|
25
28
|
local _condition = id
|
|
26
29
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
27
30
|
_condition = "Alert"
|
|
28
31
|
end
|
|
29
32
|
_attributes.key = _condition
|
|
30
|
-
_attributes.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if className then
|
|
35
|
-
for _k, _v in className do
|
|
36
|
-
_attributes[_k] = _v
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
if sx then
|
|
40
|
-
for _k, _v in sx do
|
|
41
|
-
_attributes[_k] = _v
|
|
42
|
-
end
|
|
43
|
-
end
|
|
33
|
+
_attributes.hostRef = ref
|
|
34
|
+
_attributes.base = styles.root
|
|
35
|
+
_attributes.className = className
|
|
36
|
+
_attributes.sx = sx
|
|
44
37
|
local _attributes_1 = table.clone(styles.padding)
|
|
45
38
|
setmetatable(_attributes_1, nil)
|
|
46
39
|
local _exp = React.createElement("uipadding", _attributes_1)
|
|
@@ -96,7 +89,7 @@ local function Alert(props)
|
|
|
96
89
|
_attributes_5[_k] = _v
|
|
97
90
|
end
|
|
98
91
|
_attributes_5.Text = message
|
|
99
|
-
return React.createElement(
|
|
92
|
+
return React.createElement(SxHost, _attributes, _exp, _condition_1, _exp_1, _condition_2, React.createElement("frame", _attributes_3, _exp_2, _condition_3, React.createElement("textlabel", _attributes_5)))
|
|
100
93
|
end
|
|
101
94
|
local default = Alert
|
|
102
95
|
return {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local useAppBarStyles = TS.import(script, script.Parent, "AppBar.styles").default
|
|
6
7
|
local function AppBar(props)
|
|
7
8
|
local _binding = props
|
|
@@ -27,26 +28,18 @@ local function AppBar(props)
|
|
|
27
28
|
color = color,
|
|
28
29
|
hasActions = children ~= nil,
|
|
29
30
|
})
|
|
30
|
-
local _attributes = {
|
|
31
|
+
local _attributes = {
|
|
32
|
+
tag = "frame",
|
|
33
|
+
}
|
|
31
34
|
local _condition = id
|
|
32
35
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
33
36
|
_condition = "AppBar"
|
|
34
37
|
end
|
|
35
38
|
_attributes.key = _condition
|
|
36
|
-
_attributes.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if className then
|
|
41
|
-
for _k, _v in className do
|
|
42
|
-
_attributes[_k] = _v
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
if sx then
|
|
46
|
-
for _k, _v in sx do
|
|
47
|
-
_attributes[_k] = _v
|
|
48
|
-
end
|
|
49
|
-
end
|
|
39
|
+
_attributes.hostRef = ref
|
|
40
|
+
_attributes.base = styles.root
|
|
41
|
+
_attributes.className = className
|
|
42
|
+
_attributes.sx = sx
|
|
50
43
|
local _attributes_1 = table.clone(styles.padding)
|
|
51
44
|
setmetatable(_attributes_1, nil)
|
|
52
45
|
local _exp = React.createElement("uipadding", _attributes_1)
|
|
@@ -74,7 +67,7 @@ local function AppBar(props)
|
|
|
74
67
|
setmetatable(_attributes_3, nil)
|
|
75
68
|
_condition_2 = (React.createElement("frame", _attributes_2, React.createElement("uilistlayout", _attributes_3), children))
|
|
76
69
|
end
|
|
77
|
-
return React.createElement(
|
|
70
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _condition_1, _condition_2)
|
|
78
71
|
end
|
|
79
72
|
local default = AppBar
|
|
80
73
|
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 Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
5
6
|
local useAssetFieldStyles = TS.import(script, script.Parent, "AssetField.styles").default
|
|
6
7
|
local assetPreviewUri = TS.import(script, script.Parent, "assetPreviewUri").assetPreviewUri
|
|
@@ -23,26 +24,21 @@ local function AssetField(props)
|
|
|
23
24
|
local ref = _binding.ref
|
|
24
25
|
local styles = useAssetFieldStyles()
|
|
25
26
|
local uri = if preview == true then assetPreviewUri(value) else nil
|
|
26
|
-
local _attributes = {
|
|
27
|
+
local _attributes = {
|
|
28
|
+
tag = "frame",
|
|
29
|
+
}
|
|
27
30
|
local _condition = id
|
|
28
31
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
29
32
|
_condition = "AssetField"
|
|
30
33
|
end
|
|
31
34
|
_attributes.key = _condition
|
|
32
|
-
_attributes.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
if sx then
|
|
42
|
-
for _k, _v in sx do
|
|
43
|
-
_attributes[_k] = _v
|
|
44
|
-
end
|
|
45
|
-
end
|
|
35
|
+
_attributes.hostRef = ref
|
|
36
|
+
_attributes.base = styles.root
|
|
37
|
+
_attributes.className = className
|
|
38
|
+
_attributes.sx = sx
|
|
39
|
+
_attributes.state = {
|
|
40
|
+
disabled = disabled,
|
|
41
|
+
}
|
|
46
42
|
local _attributes_1 = table.clone(styles.list)
|
|
47
43
|
setmetatable(_attributes_1, nil)
|
|
48
44
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -67,7 +63,7 @@ local function AssetField(props)
|
|
|
67
63
|
setmetatable(_attributes_3, nil)
|
|
68
64
|
_condition_1 = (React.createElement("imagelabel", _attributes_2, React.createElement("uicorner", _attributes_3)))
|
|
69
65
|
end
|
|
70
|
-
return React.createElement(
|
|
66
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _condition_1)
|
|
71
67
|
end
|
|
72
68
|
local default = AssetField
|
|
73
69
|
return {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local avatarInitials = TS.import(script, script.Parent, "avatarText").avatarInitials
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local useAvatarStyles = TS.import(script, script.Parent, "Avatar.styles").default
|
|
6
7
|
local function Avatar(props)
|
|
7
8
|
local _binding = props
|
|
@@ -23,26 +24,18 @@ local function Avatar(props)
|
|
|
23
24
|
size = size,
|
|
24
25
|
variant = variant,
|
|
25
26
|
})
|
|
26
|
-
local _attributes = {
|
|
27
|
+
local _attributes = {
|
|
28
|
+
tag = "frame",
|
|
29
|
+
}
|
|
27
30
|
local _condition = id
|
|
28
31
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
29
32
|
_condition = "Avatar"
|
|
30
33
|
end
|
|
31
34
|
_attributes.key = _condition
|
|
32
|
-
_attributes.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if className then
|
|
37
|
-
for _k, _v in className do
|
|
38
|
-
_attributes[_k] = _v
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
if sx then
|
|
42
|
-
for _k, _v in sx do
|
|
43
|
-
_attributes[_k] = _v
|
|
44
|
-
end
|
|
45
|
-
end
|
|
35
|
+
_attributes.hostRef = ref
|
|
36
|
+
_attributes.base = styles.root
|
|
37
|
+
_attributes.className = className
|
|
38
|
+
_attributes.sx = sx
|
|
46
39
|
local _condition_1 = variant ~= "square"
|
|
47
40
|
if _condition_1 then
|
|
48
41
|
local _attributes_1 = table.clone(styles.corner)
|
|
@@ -69,7 +62,7 @@ local function Avatar(props)
|
|
|
69
62
|
_attributes_1.Text = avatarInitials(name)
|
|
70
63
|
_result = (React.createElement("textlabel", _attributes_1))
|
|
71
64
|
end
|
|
72
|
-
return React.createElement(
|
|
65
|
+
return React.createElement(SxHost, _attributes, _condition_1, _result)
|
|
73
66
|
end
|
|
74
67
|
local default = Avatar
|
|
75
68
|
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 useBackdropStyles = TS.import(script, script.Parent, "Backdrop.styles").default
|
|
5
6
|
local function Backdrop(props)
|
|
6
7
|
local _binding = props
|
|
@@ -21,26 +22,18 @@ local function Backdrop(props)
|
|
|
21
22
|
if open ~= true then
|
|
22
23
|
return nil
|
|
23
24
|
end
|
|
24
|
-
local _attributes = {
|
|
25
|
+
local _attributes = {
|
|
26
|
+
tag = "textbutton",
|
|
27
|
+
}
|
|
25
28
|
local _condition = id
|
|
26
29
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
27
30
|
_condition = "Backdrop"
|
|
28
31
|
end
|
|
29
32
|
_attributes.key = _condition
|
|
30
|
-
_attributes.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if className then
|
|
35
|
-
for _k, _v in className do
|
|
36
|
-
_attributes[_k] = _v
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
if sx then
|
|
40
|
-
for _k, _v in sx do
|
|
41
|
-
_attributes[_k] = _v
|
|
42
|
-
end
|
|
43
|
-
end
|
|
33
|
+
_attributes.hostRef = ref
|
|
34
|
+
_attributes.base = styles.root
|
|
35
|
+
_attributes.className = className
|
|
36
|
+
_attributes.sx = sx
|
|
44
37
|
_attributes.Event = {
|
|
45
38
|
Activated = function()
|
|
46
39
|
local _result = onClick
|
|
@@ -50,7 +43,7 @@ local function Backdrop(props)
|
|
|
50
43
|
return _result
|
|
51
44
|
end,
|
|
52
45
|
}
|
|
53
|
-
return React.createElement(
|
|
46
|
+
return React.createElement(SxHost, _attributes, children)
|
|
54
47
|
end
|
|
55
48
|
local default = Backdrop
|
|
56
49
|
return {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local badgeText = TS.import(script, script.Parent, "badgeValue").badgeText
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local useBadgeStyles = TS.import(script, script.Parent, "Badge.styles").default
|
|
6
7
|
local function Badge(props)
|
|
7
8
|
local _binding = props
|
|
@@ -36,26 +37,18 @@ local function Badge(props)
|
|
|
36
37
|
})
|
|
37
38
|
local isDot = variant == "dot"
|
|
38
39
|
local shown = not invisible and (isDot or count > 0)
|
|
39
|
-
local _attributes = {
|
|
40
|
+
local _attributes = {
|
|
41
|
+
tag = "frame",
|
|
42
|
+
}
|
|
40
43
|
local _condition = id
|
|
41
44
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
42
45
|
_condition = "Badge"
|
|
43
46
|
end
|
|
44
47
|
_attributes.key = _condition
|
|
45
|
-
_attributes.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if className then
|
|
50
|
-
for _k, _v in className do
|
|
51
|
-
_attributes[_k] = _v
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
if sx then
|
|
55
|
-
for _k, _v in sx do
|
|
56
|
-
_attributes[_k] = _v
|
|
57
|
-
end
|
|
58
|
-
end
|
|
48
|
+
_attributes.hostRef = ref
|
|
49
|
+
_attributes.base = styles.root
|
|
50
|
+
_attributes.className = className
|
|
51
|
+
_attributes.sx = sx
|
|
59
52
|
local _exp = children
|
|
60
53
|
local _condition_1 = shown
|
|
61
54
|
if _condition_1 then
|
|
@@ -76,7 +69,7 @@ local function Badge(props)
|
|
|
76
69
|
setmetatable(_attributes_2, nil)
|
|
77
70
|
_condition_1 = (React.createElement("textlabel", _attributes_1, _condition_2, React.createElement("uicorner", _attributes_2)))
|
|
78
71
|
end
|
|
79
|
-
return React.createElement(
|
|
72
|
+
return React.createElement(SxHost, _attributes, _exp, _condition_1)
|
|
80
73
|
end
|
|
81
74
|
local default = Badge
|
|
82
75
|
return {
|
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
5
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
6
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
7
|
local useBottomNavigationStyles = TS.import(script, script.Parent, "BottomNavigation.styles").default
|
|
7
8
|
local function BottomNavigation(props)
|
|
8
9
|
local _binding = props
|
|
@@ -22,26 +23,21 @@ local function BottomNavigation(props)
|
|
|
22
23
|
showLabels = showLabels,
|
|
23
24
|
})
|
|
24
25
|
local count = math.max(#options, 1)
|
|
25
|
-
local _attributes = {
|
|
26
|
+
local _attributes = {
|
|
27
|
+
tag = "frame",
|
|
28
|
+
}
|
|
26
29
|
local _condition = id
|
|
27
30
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
28
31
|
_condition = "BottomNavigation"
|
|
29
32
|
end
|
|
30
33
|
_attributes.key = _condition
|
|
31
|
-
_attributes.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
if sx then
|
|
41
|
-
for _k, _v in sx do
|
|
42
|
-
_attributes[_k] = _v
|
|
43
|
-
end
|
|
44
|
-
end
|
|
34
|
+
_attributes.hostRef = ref
|
|
35
|
+
_attributes.base = styles.root
|
|
36
|
+
_attributes.className = className
|
|
37
|
+
_attributes.sx = sx
|
|
38
|
+
_attributes.state = {
|
|
39
|
+
disabled = disabled,
|
|
40
|
+
}
|
|
45
41
|
local _attributes_1 = table.clone(styles.list)
|
|
46
42
|
setmetatable(_attributes_1, nil)
|
|
47
43
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -84,7 +80,7 @@ local function BottomNavigation(props)
|
|
|
84
80
|
_newValue[_k] = _callback(_v, _k - 1, options)
|
|
85
81
|
end
|
|
86
82
|
-- ▲ ReadonlyArray.map ▲
|
|
87
|
-
return React.createElement(
|
|
83
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
88
84
|
end
|
|
89
85
|
local default = BottomNavigation
|
|
90
86
|
return {
|
|
@@ -5,6 +5,7 @@ local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
|
5
5
|
local _breadcrumbItems = TS.import(script, script.Parent, "breadcrumbItems")
|
|
6
6
|
local breadcrumbCurrent = _breadcrumbItems.breadcrumbCurrent
|
|
7
7
|
local breadcrumbVisible = _breadcrumbItems.breadcrumbVisible
|
|
8
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
9
|
local useBreadcrumbStyles = TS.import(script, script.Parent, "Breadcrumbs.styles").default
|
|
9
10
|
local function Breadcrumbs(props)
|
|
10
11
|
local _binding = props
|
|
@@ -20,26 +21,18 @@ local function Breadcrumbs(props)
|
|
|
20
21
|
local ref = _binding.ref
|
|
21
22
|
local styles = useBreadcrumbStyles()
|
|
22
23
|
local visible = breadcrumbVisible(items, maxItems)
|
|
23
|
-
local _attributes = {
|
|
24
|
+
local _attributes = {
|
|
25
|
+
tag = "frame",
|
|
26
|
+
}
|
|
24
27
|
local _condition = id
|
|
25
28
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
26
29
|
_condition = "Breadcrumbs"
|
|
27
30
|
end
|
|
28
31
|
_attributes.key = _condition
|
|
29
|
-
_attributes.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if className then
|
|
34
|
-
for _k, _v in className do
|
|
35
|
-
_attributes[_k] = _v
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
if sx then
|
|
39
|
-
for _k, _v in sx do
|
|
40
|
-
_attributes[_k] = _v
|
|
41
|
-
end
|
|
42
|
-
end
|
|
32
|
+
_attributes.hostRef = ref
|
|
33
|
+
_attributes.base = styles.root
|
|
34
|
+
_attributes.className = className
|
|
35
|
+
_attributes.sx = sx
|
|
43
36
|
local _attributes_1 = table.clone(styles.list)
|
|
44
37
|
setmetatable(_attributes_1, nil)
|
|
45
38
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -108,7 +101,7 @@ local function Breadcrumbs(props)
|
|
|
108
101
|
_newValue[_k] = _callback(_v, _k - 1, visible)
|
|
109
102
|
end
|
|
110
103
|
-- ▲ ReadonlyArray.map ▲
|
|
111
|
-
return React.createElement(
|
|
104
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
112
105
|
end
|
|
113
106
|
local default = Breadcrumbs
|
|
114
107
|
return {
|