@rbxts/uiblox 0.2.0-alpha.37 → 0.2.0-alpha.38
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 +1 -18
- package/out/theme/constants/NumberConstants.d.ts +10 -0
- package/out/theme/constants/NumberConstants.luau +12 -0
- package/out/theme/interfaces/density/controlMetrics.luau +2 -2
- package/out/theme/interfaces/palette/Palette.d.ts +7 -0
- package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
- package/out/theme/interfaces/theme/Theme.d.ts +6 -0
- package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +3 -1
- package/out/theme/interfaces/typography/Variants.luau +25 -1
- package/out/theme/styles/utilities/focusRing.d.ts +2 -0
- package/out/theme/styles/utilities/focusRing.luau +3 -0
- package/out/theme/styles/utilities/index.d.ts +1 -1
- package/out/theme/styles/utilities/init.luau +3 -1
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/theme/themes/createPalette.luau +15 -0
- package/out/ui/packages/accordion/components/Accordion.luau +84 -40
- package/out/ui/packages/accordion/components/Accordion.styles.luau +35 -17
- package/out/ui/packages/alert/components/Alert.luau +15 -11
- package/out/ui/packages/alert/components/Alert.styles.luau +37 -26
- package/out/ui/packages/appBar/components/AppBar.luau +35 -13
- package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -35
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +9 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +9 -4
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +6 -1
- package/out/ui/packages/badge/components/Badge.luau +14 -11
- package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +4 -3
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +6 -2
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +4 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
- package/out/ui/packages/button/components/Button.luau +61 -34
- package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
- package/out/ui/packages/button/components/buttonPaint.luau +70 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +1 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +17 -2
- package/out/ui/packages/card/components/Card.styles.luau +4 -2
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +9 -1
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -41
- package/out/ui/packages/checkbox/components/Checkbox.luau +5 -4
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
- package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
- package/out/ui/packages/chip/components/Chip.luau +16 -14
- package/out/ui/packages/chip/components/Chip.styles.luau +7 -4
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
- package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
- package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
- package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
- package/out/ui/packages/codeEditor/index.d.ts +2 -0
- package/out/ui/packages/codeEditor/init.luau +5 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +12 -4
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +12 -4
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +31 -19
- package/out/ui/packages/dialog/components/Dialog.styles.luau +4 -2
- package/out/ui/packages/divider/components/Divider.luau +3 -1
- package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +1 -0
- package/out/ui/packages/drawer/components/Drawer.luau +43 -14
- package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +2 -0
- package/out/ui/packages/drawer/components/drawerPlacement.luau +18 -0
- package/out/ui/packages/editorFace.d.ts +22 -0
- package/out/ui/packages/editorFace.luau +49 -0
- package/out/ui/packages/fab/components/Fab.luau +19 -6
- package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
- package/out/ui/packages/fab/components/fabSize.d.ts +1 -1
- package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
- package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
- package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
- package/out/ui/packages/icon/components/Icon.d.ts +6 -2
- package/out/ui/packages/icon/components/Icon.luau +23 -3
- package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
- package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
- package/out/ui/packages/icon/components/glyphs.luau +64 -0
- package/out/ui/packages/icon/index.d.ts +1 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +5 -2
- package/out/ui/packages/iconButton/components/IconButton.luau +83 -16
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
- package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
- package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
- package/out/ui/packages/iconButton/components/transportGlyph.d.ts +1 -0
- package/out/ui/packages/iconButton/components/transportGlyph.luau +4 -0
- package/out/ui/packages/imageList/components/ImageList.luau +11 -36
- package/out/ui/packages/imageList/components/ImageList.styles.luau +1 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -2
- package/out/ui/packages/imageList/components/imageListLayout.luau +0 -8
- package/out/ui/packages/index.d.ts +1 -0
- package/out/ui/packages/init.luau +3 -0
- package/out/ui/packages/input/components/Input.luau +46 -29
- package/out/ui/packages/input/components/Input.styles.luau +8 -11
- package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
- package/out/ui/packages/input/components/fieldChrome.luau +11 -0
- package/out/ui/packages/layout/components/Box.luau +92 -13
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
- package/out/ui/packages/layout/components/Box.styles.luau +0 -9
- package/out/ui/packages/layout/components/Grid.luau +81 -16
- package/out/ui/packages/layout/components/Pad.d.ts +24 -0
- package/out/ui/packages/layout/components/Pad.luau +88 -0
- package/out/ui/packages/layout/components/Stack.luau +79 -13
- package/out/ui/packages/link/components/Link.luau +19 -13
- package/out/ui/packages/link/components/Link.styles.luau +10 -1
- package/out/ui/packages/listItem/components/ListItem.luau +61 -4
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +28 -11
- package/out/ui/packages/listItem/components/listItemInk.d.ts +1 -1
- package/out/ui/packages/listItem/components/listItemLayout.d.ts +12 -2
- package/out/ui/packages/listItem/components/listItemLayout.luau +29 -2
- package/out/ui/packages/markdown/components/Markdown.luau +163 -50
- package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -76
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
- package/out/ui/packages/markdown/index.d.ts +1 -1
- package/out/ui/packages/markdown/parseMarkdown.d.ts +9 -1
- package/out/ui/packages/markdown/parseMarkdown.luau +350 -29
- package/out/ui/packages/menu/components/Menu.d.ts +1 -1
- package/out/ui/packages/menu/components/Menu.luau +12 -11
- package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
- package/out/ui/packages/menu/components/menuIcon.d.ts +1 -1
- package/out/ui/packages/numberInput/components/NumberInput.luau +19 -4
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
- package/out/ui/packages/pager/components/Pager.luau +15 -13
- package/out/ui/packages/pager/components/Pager.styles.luau +5 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
- package/out/ui/packages/paper/components/Paper.luau +17 -11
- package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +9 -1
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
- package/out/ui/packages/popover/components/Popover.d.ts +1 -1
- package/out/ui/packages/popover/components/Popover.luau +6 -4
- package/out/ui/packages/popover/components/Popover.styles.luau +6 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -0
- package/out/ui/packages/popup/components/Popup.luau +64 -2
- package/out/ui/packages/popup/components/placement.luau +6 -4
- package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +2 -1
- package/out/ui/packages/rating/components/Rating.luau +45 -3
- package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
- package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
- package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
- package/out/ui/packages/select/components/Select.d.ts +2 -0
- package/out/ui/packages/select/components/Select.luau +148 -106
- package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
- package/out/ui/packages/select/components/Select.styles.luau +29 -5
- package/out/ui/packages/shadow/components/Shadow.luau +188 -19
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
- package/out/ui/packages/slider/components/RangeSlider.luau +6 -5
- package/out/ui/packages/slider/components/Slider.luau +11 -16
- package/out/ui/packages/sparkline/components/Sparkline.luau +7 -5
- package/out/ui/packages/speedDial/components/SpeedDial.luau +4 -1
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +5 -0
- package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +1 -1
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stepper/components/Stepper.styles.luau +9 -6
- package/out/ui/packages/switch/components/Switch.luau +2 -2
- package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
- package/out/ui/packages/switch/components/switchLook.luau +4 -10
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +92 -53
- package/out/ui/packages/table/components/Table.styles.luau +23 -6
- package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
- package/out/ui/packages/table/components/tableColumns.luau +2 -0
- package/out/ui/packages/tabs/components/Tabs.luau +7 -4
- package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
- package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
- package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
- package/out/ui/packages/text/components/Text.d.ts +2 -0
- package/out/ui/packages/text/components/Text.luau +12 -2
- package/out/ui/packages/timeField/components/TimeField.luau +11 -7
- package/out/ui/packages/timeline/components/Timeline.luau +35 -32
- package/out/ui/packages/timeline/components/Timeline.styles.luau +19 -10
- package/out/ui/packages/toast/components/Toast.luau +168 -72
- package/out/ui/packages/toast/components/Toast.styles.luau +36 -19
- package/out/ui/packages/toast/components/toastPlace.d.ts +4 -0
- package/out/ui/packages/toast/components/toastPlace.luau +13 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
- package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +2 -2
- package/out/ui/packages/treeView/components/TreeView.luau +12 -13
- package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
- package/out/ui/packages/typography/components/Typography.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +8 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +17 -3
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
- package/package.json +69 -67
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useState = _react.useState
|
|
4
6
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
8
|
local rowSelected = TS.import(script, script.Parent, "rowSelected").rowSelected
|
|
@@ -12,6 +14,41 @@ local headerText = _tableColumns.headerText
|
|
|
12
14
|
local isTextCell = _tableColumns.isTextCell
|
|
13
15
|
local resolveColumn = _tableColumns.resolveColumn
|
|
14
16
|
local useTableStyles = TS.import(script, script.Parent, "Table.styles").default
|
|
17
|
+
local function TableRow(props)
|
|
18
|
+
local hovering, setHovering = useState(false)
|
|
19
|
+
local face = if props.selected then props.styles.selected elseif hovering then props.styles.hover else nil
|
|
20
|
+
local _attributes = {
|
|
21
|
+
key = `r-{props.rowIndex}`,
|
|
22
|
+
}
|
|
23
|
+
for _k, _v in cx(props.styles.row, face) do
|
|
24
|
+
_attributes[_k] = _v
|
|
25
|
+
end
|
|
26
|
+
_attributes.LayoutOrder = props.place + 1
|
|
27
|
+
_attributes.Event = {
|
|
28
|
+
Activated = props.onActivated,
|
|
29
|
+
MouseEnter = function()
|
|
30
|
+
return setHovering(true)
|
|
31
|
+
end,
|
|
32
|
+
MouseLeave = function()
|
|
33
|
+
return setHovering(false)
|
|
34
|
+
end,
|
|
35
|
+
}
|
|
36
|
+
local _attributes_1 = table.clone(props.styles.rowStroke)
|
|
37
|
+
setmetatable(_attributes_1, nil)
|
|
38
|
+
local _exp = React.createElement("uistroke", _attributes_1)
|
|
39
|
+
local _attributes_2 = table.clone(props.styles.tail)
|
|
40
|
+
setmetatable(_attributes_2, nil)
|
|
41
|
+
local _exp_1 = React.createElement("uipadding", _attributes_2)
|
|
42
|
+
local _attributes_3 = {
|
|
43
|
+
key = "Band",
|
|
44
|
+
}
|
|
45
|
+
for _k, _v in props.styles.band do
|
|
46
|
+
_attributes_3[_k] = _v
|
|
47
|
+
end
|
|
48
|
+
local _attributes_4 = table.clone(props.styles.cells)
|
|
49
|
+
setmetatable(_attributes_4, nil)
|
|
50
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), props.children))
|
|
51
|
+
end
|
|
15
52
|
local function textAlign(align)
|
|
16
53
|
if align == "center" then
|
|
17
54
|
return Enum.TextXAlignment.Center
|
|
@@ -75,12 +112,21 @@ local function Table(props)
|
|
|
75
112
|
_attributes_3[_k] = _v
|
|
76
113
|
end
|
|
77
114
|
_attributes_3.LayoutOrder = 0
|
|
78
|
-
local _attributes_4 = table.clone(styles.
|
|
115
|
+
local _attributes_4 = table.clone(styles.rowStroke)
|
|
79
116
|
setmetatable(_attributes_4, nil)
|
|
80
|
-
local _exp_2 = React.createElement("
|
|
81
|
-
local _attributes_5 = table.clone(styles.
|
|
117
|
+
local _exp_2 = React.createElement("uistroke", _attributes_4)
|
|
118
|
+
local _attributes_5 = table.clone(styles.tail)
|
|
82
119
|
setmetatable(_attributes_5, nil)
|
|
83
|
-
local _exp_3 = React.createElement("
|
|
120
|
+
local _exp_3 = React.createElement("uipadding", _attributes_5)
|
|
121
|
+
local _attributes_6 = {
|
|
122
|
+
key = "Band",
|
|
123
|
+
}
|
|
124
|
+
for _k, _v in styles.band do
|
|
125
|
+
_attributes_6[_k] = _v
|
|
126
|
+
end
|
|
127
|
+
local _attributes_7 = table.clone(styles.cells)
|
|
128
|
+
setmetatable(_attributes_7, nil)
|
|
129
|
+
local _exp_4 = React.createElement("uilistlayout", _attributes_7)
|
|
84
130
|
-- ▼ ReadonlyArray.map ▼
|
|
85
131
|
local _newValue_1 = table.create(#resolved)
|
|
86
132
|
local _callback_1 = function(column, index)
|
|
@@ -92,22 +138,22 @@ local function Table(props)
|
|
|
92
138
|
local label = if type(_header) == "string" then headerText(column.header, active, sortDirection) else nil
|
|
93
139
|
local clickable = canSort(column.sortable, onSort ~= nil)
|
|
94
140
|
if clickable then
|
|
95
|
-
local
|
|
141
|
+
local _attributes_8 = {
|
|
96
142
|
key = `h-{index}`,
|
|
97
143
|
}
|
|
98
144
|
for _k, _v in (cx(styles.cell, styles.headerCell)) do
|
|
99
|
-
|
|
145
|
+
_attributes_8[_k] = _v
|
|
100
146
|
end
|
|
101
147
|
local _condition_1 = label
|
|
102
148
|
if _condition_1 == nil then
|
|
103
149
|
_condition_1 = ""
|
|
104
150
|
end
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
151
|
+
_attributes_8.Text = _condition_1
|
|
152
|
+
_attributes_8.Size = box
|
|
153
|
+
_attributes_8.TextXAlignment = align
|
|
154
|
+
_attributes_8.AutoButtonColor = false
|
|
155
|
+
_attributes_8.LayoutOrder = index
|
|
156
|
+
_attributes_8.Event = {
|
|
111
157
|
Activated = function()
|
|
112
158
|
local _result = onSort
|
|
113
159
|
if _result ~= nil then
|
|
@@ -116,20 +162,20 @@ local function Table(props)
|
|
|
116
162
|
return _result
|
|
117
163
|
end,
|
|
118
164
|
}
|
|
119
|
-
return React.createElement("textbutton",
|
|
165
|
+
return React.createElement("textbutton", _attributes_8, label == nil and (column.header))
|
|
120
166
|
end
|
|
121
167
|
if label ~= nil then
|
|
122
|
-
local
|
|
168
|
+
local _attributes_8 = {
|
|
123
169
|
key = `h-{index}`,
|
|
124
170
|
}
|
|
125
171
|
for _k, _v in cx(styles.cell, styles.headerCell) do
|
|
126
|
-
|
|
172
|
+
_attributes_8[_k] = _v
|
|
127
173
|
end
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return React.createElement("textlabel",
|
|
174
|
+
_attributes_8.Text = label
|
|
175
|
+
_attributes_8.Size = box
|
|
176
|
+
_attributes_8.TextXAlignment = align
|
|
177
|
+
_attributes_8.LayoutOrder = index
|
|
178
|
+
return React.createElement("textlabel", _attributes_8)
|
|
133
179
|
end
|
|
134
180
|
return React.createElement("frame", {
|
|
135
181
|
key = `h-{index}`,
|
|
@@ -144,33 +190,11 @@ local function Table(props)
|
|
|
144
190
|
_newValue_1[_k] = _callback_1(_v, _k - 1, resolved)
|
|
145
191
|
end
|
|
146
192
|
-- ▲ ReadonlyArray.map ▲
|
|
147
|
-
local
|
|
193
|
+
local _exp_5 = React.createElement("frame", _attributes_3, _exp_2, _exp_3, React.createElement("frame", _attributes_6, _exp_4, React.createElement(React.Fragment, nil, _newValue_1)))
|
|
148
194
|
-- ▼ ReadonlyArray.map ▼
|
|
149
195
|
local _newValue_2 = table.create(#order)
|
|
150
196
|
local _callback_2 = function(rowIndex, place)
|
|
151
197
|
local cells = rows[rowIndex + 1]
|
|
152
|
-
local _attributes_6 = {
|
|
153
|
-
key = `r-{rowIndex}`,
|
|
154
|
-
}
|
|
155
|
-
for _k, _v in cx(styles.row, rowSelected(rowIndex, selected) and styles.selected) do
|
|
156
|
-
_attributes_6[_k] = _v
|
|
157
|
-
end
|
|
158
|
-
_attributes_6.LayoutOrder = place + 1
|
|
159
|
-
_attributes_6.Event = {
|
|
160
|
-
Activated = function()
|
|
161
|
-
local _result = onRowActivated
|
|
162
|
-
if _result ~= nil then
|
|
163
|
-
_result = _result(rowIndex)
|
|
164
|
-
end
|
|
165
|
-
return _result
|
|
166
|
-
end,
|
|
167
|
-
}
|
|
168
|
-
local _attributes_7 = table.clone(styles.padding)
|
|
169
|
-
setmetatable(_attributes_7, nil)
|
|
170
|
-
local _exp_5 = React.createElement("uipadding", _attributes_7)
|
|
171
|
-
local _attributes_8 = table.clone(styles.cells)
|
|
172
|
-
setmetatable(_attributes_8, nil)
|
|
173
|
-
local _exp_6 = React.createElement("uilistlayout", _attributes_8)
|
|
174
198
|
-- ▼ ReadonlyArray.map ▼
|
|
175
199
|
local _newValue_3 = table.create(#resolved)
|
|
176
200
|
local _callback_3 = function(column, colIndex)
|
|
@@ -178,21 +202,23 @@ local function Table(props)
|
|
|
178
202
|
local box = UDim2.new(size.scale, size.offset, 0, 0)
|
|
179
203
|
local value = cells[colIndex + 1]
|
|
180
204
|
if isTextCell(value) then
|
|
181
|
-
local
|
|
205
|
+
local _attributes_8 = {
|
|
182
206
|
key = `c-{rowIndex}-{colIndex}`,
|
|
183
207
|
}
|
|
184
208
|
for _k, _v in styles.cell do
|
|
185
|
-
|
|
209
|
+
_attributes_8[_k] = _v
|
|
186
210
|
end
|
|
187
211
|
local _condition_1 = value
|
|
188
212
|
if _condition_1 == nil then
|
|
189
213
|
_condition_1 = ""
|
|
190
214
|
end
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
215
|
+
_attributes_8.Text = _condition_1
|
|
216
|
+
_attributes_8.Size = box
|
|
217
|
+
_attributes_8.TextXAlignment = textAlign(column.align)
|
|
218
|
+
_attributes_8.TextWrapped = column.wrap
|
|
219
|
+
_attributes_8.TextTruncate = if column.wrap then Enum.TextTruncate.None else Enum.TextTruncate.AtEnd
|
|
220
|
+
_attributes_8.LayoutOrder = colIndex
|
|
221
|
+
return React.createElement("textlabel", _attributes_8)
|
|
196
222
|
end
|
|
197
223
|
return React.createElement("frame", {
|
|
198
224
|
key = `c-{rowIndex}-{colIndex}`,
|
|
@@ -207,13 +233,26 @@ local function Table(props)
|
|
|
207
233
|
_newValue_3[_k] = _callback_3(_v, _k - 1, resolved)
|
|
208
234
|
end
|
|
209
235
|
-- ▲ ReadonlyArray.map ▲
|
|
210
|
-
return React.createElement(
|
|
236
|
+
return React.createElement(TableRow, {
|
|
237
|
+
key = `r-{rowIndex}`,
|
|
238
|
+
rowIndex = rowIndex,
|
|
239
|
+
place = place,
|
|
240
|
+
selected = rowSelected(rowIndex, selected),
|
|
241
|
+
styles = styles,
|
|
242
|
+
onActivated = function()
|
|
243
|
+
local _result = onRowActivated
|
|
244
|
+
if _result ~= nil then
|
|
245
|
+
_result = _result(rowIndex)
|
|
246
|
+
end
|
|
247
|
+
return _result
|
|
248
|
+
end,
|
|
249
|
+
}, React.createElement(React.Fragment, nil, _newValue_3))
|
|
211
250
|
end
|
|
212
251
|
for _k, _v in order do
|
|
213
252
|
_newValue_2[_k] = _callback_2(_v, _k - 1, order)
|
|
214
253
|
end
|
|
215
254
|
-- ▲ ReadonlyArray.map ▲
|
|
216
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1,
|
|
255
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_5, React.createElement(React.Fragment, nil, _newValue_2))
|
|
217
256
|
end
|
|
218
257
|
local default = Table
|
|
219
258
|
return {
|
|
@@ -7,6 +7,7 @@ local useTableStyles = componentStyles("Table", function(theme, _param)
|
|
|
7
7
|
local dense = _param.dense
|
|
8
8
|
local padY = theme.padding.calc(if dense == true then 0.5 else 1)
|
|
9
9
|
local padX = theme.padding.calc(if dense == true then 1 else 1.5)
|
|
10
|
+
local heading = theme.typography.variants.h6
|
|
10
11
|
local textSize = if dense == true then theme.typography.fontSizes.caption else theme.typography.fontSizes.body
|
|
11
12
|
return createStyles({
|
|
12
13
|
root = {
|
|
@@ -33,12 +34,22 @@ local useTableStyles = componentStyles("Table", function(theme, _param)
|
|
|
33
34
|
BackgroundColor3 = theme.palette.action.selected,
|
|
34
35
|
BackgroundTransparency = 0,
|
|
35
36
|
},
|
|
37
|
+
hover = {
|
|
38
|
+
BackgroundColor3 = theme.palette.action.hover,
|
|
39
|
+
BackgroundTransparency = 0,
|
|
40
|
+
},
|
|
36
41
|
header = {
|
|
37
42
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
38
43
|
Size = UDim2.new(1, 0, 0, 0),
|
|
39
|
-
BackgroundColor3 = theme.palette.surface.
|
|
44
|
+
BackgroundColor3 = theme.palette.surface.elevated,
|
|
40
45
|
BorderSizePixel = 0,
|
|
41
46
|
},
|
|
47
|
+
rowStroke = {
|
|
48
|
+
Color = theme.palette.divider,
|
|
49
|
+
Thickness = 1,
|
|
50
|
+
Transparency = 0,
|
|
51
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
52
|
+
},
|
|
42
53
|
cells = {
|
|
43
54
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
44
55
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
@@ -54,14 +65,20 @@ local useTableStyles = componentStyles("Table", function(theme, _param)
|
|
|
54
65
|
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
55
66
|
},
|
|
56
67
|
headerCell = {
|
|
57
|
-
Font = theme.typography.fontFamilies.
|
|
68
|
+
Font = theme.typography.fontFamilies[heading.family],
|
|
69
|
+
TextSize = heading.size,
|
|
70
|
+
LineHeight = heading.leading,
|
|
58
71
|
TextColor3 = theme.palette.text.secondary,
|
|
59
72
|
},
|
|
60
|
-
|
|
61
|
-
|
|
73
|
+
band = {
|
|
74
|
+
Position = UDim2.new(0, padX, 0, padY),
|
|
75
|
+
Size = UDim2.new(1, -(padX * 2), 0, 0),
|
|
76
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
77
|
+
BackgroundTransparency = 1,
|
|
78
|
+
BorderSizePixel = 0,
|
|
79
|
+
},
|
|
80
|
+
tail = {
|
|
62
81
|
PaddingBottom = UDim.new(0, padY),
|
|
63
|
-
PaddingLeft = UDim.new(0, padX),
|
|
64
|
-
PaddingRight = UDim.new(0, padX),
|
|
65
82
|
},
|
|
66
83
|
corner = {
|
|
67
84
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -6,6 +6,7 @@ export interface TableColumnSpec {
|
|
|
6
6
|
flex?: number;
|
|
7
7
|
align?: TableAlign;
|
|
8
8
|
sortable?: boolean;
|
|
9
|
+
wrap?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface ResolvedColumn {
|
|
11
12
|
header: unknown;
|
|
@@ -13,6 +14,7 @@ export interface ResolvedColumn {
|
|
|
13
14
|
flex?: number;
|
|
14
15
|
align: TableAlign;
|
|
15
16
|
sortable: boolean;
|
|
17
|
+
wrap: boolean;
|
|
16
18
|
}
|
|
17
19
|
export interface ColumnSize {
|
|
18
20
|
scale: number;
|
|
@@ -6,6 +6,7 @@ local function resolveColumn(column)
|
|
|
6
6
|
header = column,
|
|
7
7
|
align = "left",
|
|
8
8
|
sortable = false,
|
|
9
|
+
wrap = false,
|
|
9
10
|
}
|
|
10
11
|
end
|
|
11
12
|
return {
|
|
@@ -14,6 +15,7 @@ local function resolveColumn(column)
|
|
|
14
15
|
flex = column.flex,
|
|
15
16
|
align = column.align or "left",
|
|
16
17
|
sortable = column.sortable == true,
|
|
18
|
+
wrap = column.wrap == true,
|
|
17
19
|
}
|
|
18
20
|
end
|
|
19
21
|
--* Scale/offset for each column. Number widths are scales. Flex shares whatever scale is left.
|
|
@@ -162,17 +162,20 @@ local function Tabs(props)
|
|
|
162
162
|
local _attributes_3 = table.clone(styles.padding)
|
|
163
163
|
setmetatable(_attributes_3, nil)
|
|
164
164
|
local _exp_1 = React.createElement("uipadding", _attributes_3)
|
|
165
|
+
local _attributes_4 = table.clone(styles.cap)
|
|
166
|
+
setmetatable(_attributes_4, nil)
|
|
167
|
+
local _exp_2 = React.createElement("uisizeconstraint", _attributes_4)
|
|
165
168
|
local _condition_1 = selected
|
|
166
169
|
if _condition_1 then
|
|
167
|
-
local
|
|
170
|
+
local _attributes_5 = {
|
|
168
171
|
key = "Indicator",
|
|
169
172
|
}
|
|
170
173
|
for _k, _v in styles.indicator do
|
|
171
|
-
|
|
174
|
+
_attributes_5[_k] = _v
|
|
172
175
|
end
|
|
173
|
-
_condition_1 = React.createElement("frame",
|
|
176
|
+
_condition_1 = React.createElement("frame", _attributes_5)
|
|
174
177
|
end
|
|
175
|
-
return React.createElement("textbutton", _attributes_2, _exp_1, _condition_1)
|
|
178
|
+
return React.createElement("textbutton", _attributes_2, _exp_1, _exp_2, _condition_1)
|
|
176
179
|
end
|
|
177
180
|
for _k, _v in options do
|
|
178
181
|
_newValue[_k] = _callback(_v, _k - 1, options)
|
|
@@ -3,12 +3,15 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
|
+
local tabIndicatorBox = TS.import(script, script.Parent, "tabIndicator").tabIndicatorBox
|
|
6
7
|
local tabsIsVertical = TS.import(script, script.Parent, "tabsOrientation").tabsIsVertical
|
|
7
8
|
local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
8
9
|
local orientation = _param.orientation
|
|
9
10
|
local centered = _param.centered
|
|
10
11
|
local vertical = tabsIsVertical(orientation)
|
|
11
12
|
local bar = theme.padding.calc(0.5)
|
|
13
|
+
local gutter = theme.padding.calc(2)
|
|
14
|
+
local mark = tabIndicatorBox(vertical, bar, gutter)
|
|
12
15
|
return createStyles({
|
|
13
16
|
root = {
|
|
14
17
|
Size = if vertical then UDim2.new(0, theme.spacing.calc(16), 1, 0) else UDim2.new(1, 0, 0, theme.spacing.calc(4)),
|
|
@@ -37,6 +40,10 @@ local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
|
37
40
|
Font = theme.typography.fontFamilies.default,
|
|
38
41
|
TextSize = theme.typography.fontSizes.body,
|
|
39
42
|
TextXAlignment = if vertical then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
|
|
43
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
44
|
+
},
|
|
45
|
+
cap = {
|
|
46
|
+
MaxSize = Vector2.new(if vertical then math.huge else theme.spacing.calc(16), math.huge),
|
|
40
47
|
},
|
|
41
48
|
selected = {
|
|
42
49
|
TextColor3 = theme.palette.text.primary,
|
|
@@ -50,19 +57,13 @@ local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
|
50
57
|
PaddingTop = UDim.new(0, if vertical then theme.padding.calc(1) else 0),
|
|
51
58
|
PaddingBottom = UDim.new(0, if vertical then theme.padding.calc(1) else 0),
|
|
52
59
|
},
|
|
53
|
-
indicator =
|
|
54
|
-
Size = UDim2.new(
|
|
55
|
-
Position = UDim2.new(0, 0, 0.5, 0),
|
|
56
|
-
AnchorPoint = Vector2.new(0, 0.5),
|
|
57
|
-
BackgroundColor3 = theme.palette.primary.main,
|
|
58
|
-
BorderSizePixel = 0,
|
|
59
|
-
}) else ({
|
|
60
|
-
Size = UDim2.new(1, theme.padding.calc(4), 0, bar),
|
|
61
|
-
Position = UDim2.fromScale(0.5, 1),
|
|
62
|
-
AnchorPoint = Vector2.new(0.5, 1),
|
|
60
|
+
indicator = {
|
|
61
|
+
Size = UDim2.new(mark.widthScale, mark.widthOffset, mark.heightScale, mark.heightOffset),
|
|
62
|
+
Position = if vertical then UDim2.new(0, 0, 0.5, 0) else UDim2.fromScale(0.5, 1),
|
|
63
|
+
AnchorPoint = if vertical then Vector2.new(0, 0.5) else Vector2.new(0.5, 1),
|
|
63
64
|
BackgroundColor3 = theme.palette.primary.main,
|
|
64
65
|
BorderSizePixel = 0,
|
|
65
|
-
}
|
|
66
|
+
},
|
|
66
67
|
})
|
|
67
68
|
end)
|
|
68
69
|
local default = useTabsStyles
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Indicator box inside a tab. Horizontal width stays on the tab; a positive width offset spills into the next one. */
|
|
2
|
+
export declare function tabIndicatorBox(vertical: boolean, bar: number, gutter: number): {
|
|
3
|
+
widthScale: number;
|
|
4
|
+
widthOffset: number;
|
|
5
|
+
heightScale: number;
|
|
6
|
+
heightOffset: number;
|
|
7
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Indicator box inside a tab. Horizontal width stays on the tab; a positive width offset spills into the next one.
|
|
3
|
+
local function tabIndicatorBox(vertical, bar, gutter)
|
|
4
|
+
if vertical then
|
|
5
|
+
return {
|
|
6
|
+
widthScale = 0,
|
|
7
|
+
widthOffset = bar,
|
|
8
|
+
heightScale = 1,
|
|
9
|
+
heightOffset = -gutter,
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
widthScale = 1,
|
|
14
|
+
widthOffset = 0,
|
|
15
|
+
heightScale = 0,
|
|
16
|
+
heightOffset = bar,
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
return {
|
|
20
|
+
tabIndicatorBox = tabIndicatorBox,
|
|
21
|
+
}
|
|
@@ -2,6 +2,8 @@ import { CustomizedProps } from "../../../../theme/index";
|
|
|
2
2
|
export interface TextProps {
|
|
3
3
|
text?: string;
|
|
4
4
|
wrap?: boolean;
|
|
5
|
+
richText?: boolean;
|
|
6
|
+
fontFace?: Font;
|
|
5
7
|
}
|
|
6
8
|
declare function Text(props: CustomizedProps<TextLabel, TextProps>): JSX.Element;
|
|
7
9
|
export default Text;
|
|
@@ -11,6 +11,8 @@ local function Text(props)
|
|
|
11
11
|
text = ""
|
|
12
12
|
end
|
|
13
13
|
local wrap = _binding.wrap
|
|
14
|
+
local richText = _binding.richText
|
|
15
|
+
local fontFace = _binding.fontFace
|
|
14
16
|
local className = _binding.className
|
|
15
17
|
local sx = _binding.sx
|
|
16
18
|
local id = _binding.id
|
|
@@ -35,10 +37,18 @@ local function Text(props)
|
|
|
35
37
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
36
38
|
BackgroundTransparency = 1,
|
|
37
39
|
BorderSizePixel = 0,
|
|
38
|
-
Font = theme.typography.fontFamilies.
|
|
39
|
-
TextSize = theme.typography.
|
|
40
|
+
Font = theme.typography.fontFamilies[theme.typography.variants.body.family],
|
|
41
|
+
TextSize = theme.typography.variants.body.size,
|
|
42
|
+
LineHeight = theme.typography.variants.body.leading,
|
|
43
|
+
TextYAlignment = Enum.TextYAlignment.Top,
|
|
40
44
|
TextColor3 = theme.palette.text.primary,
|
|
45
|
+
RichText = richText == true,
|
|
41
46
|
}
|
|
47
|
+
for _k, _v in (if fontFace ~= nil then {
|
|
48
|
+
FontFace = fontFace,
|
|
49
|
+
} else {}) do
|
|
50
|
+
_object[_k] = _v
|
|
51
|
+
end
|
|
42
52
|
if className then
|
|
43
53
|
for _k, _v in className do
|
|
44
54
|
_object[_k] = _v
|
|
@@ -1,7 +1,10 @@
|
|
|
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
|
|
4
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
+
local controlMetrics = _theme.controlMetrics
|
|
6
|
+
local useTheme = _theme.useTheme
|
|
7
|
+
local fieldChrome = TS.import(script, script.Parent.Parent.Parent, "input", "components", "fieldChrome").fieldChrome
|
|
5
8
|
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
6
9
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
10
|
local resolveTime = TS.import(script, script.Parent.Parent, "timeValue").resolveTime
|
|
@@ -26,6 +29,7 @@ local function TimeField(props)
|
|
|
26
29
|
local ref = _binding.ref
|
|
27
30
|
local _binding_1 = useTheme()
|
|
28
31
|
local theme = _binding_1.theme
|
|
32
|
+
local chrome = fieldChrome(controlMetrics(theme.density).height, theme.padding.calc(1))
|
|
29
33
|
local commit = function(hour, minute)
|
|
30
34
|
local resolved = resolveTime({
|
|
31
35
|
hour = hour,
|
|
@@ -58,15 +62,14 @@ local function TimeField(props)
|
|
|
58
62
|
_attributes.sx = sx
|
|
59
63
|
return React.createElement(SxHost, _attributes, React.createElement("uilistlayout", {
|
|
60
64
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
61
|
-
Padding = UDim.new(0,
|
|
65
|
+
Padding = UDim.new(0, chrome.padX),
|
|
62
66
|
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
63
67
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
64
68
|
}), React.createElement(NumberInput, {
|
|
65
69
|
value = value.hour,
|
|
66
70
|
step = 1,
|
|
67
71
|
disabled = disabled,
|
|
68
|
-
|
|
69
|
-
width = UDim.new(0, 56),
|
|
72
|
+
width = UDim.new(0, theme.spacing.calc(12)),
|
|
70
73
|
sx = {
|
|
71
74
|
LayoutOrder = 0,
|
|
72
75
|
},
|
|
@@ -78,7 +81,9 @@ local function TimeField(props)
|
|
|
78
81
|
LayoutOrder = 1,
|
|
79
82
|
BackgroundTransparency = 1,
|
|
80
83
|
BorderSizePixel = 0,
|
|
81
|
-
Size = UDim2.fromOffset(8,
|
|
84
|
+
Size = UDim2.fromOffset(8, chrome.height),
|
|
85
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
86
|
+
TextWrapped = false,
|
|
82
87
|
Font = theme.typography.fontFamilies.default,
|
|
83
88
|
TextSize = theme.typography.fontSizes.body,
|
|
84
89
|
TextColor3 = theme.palette.text.secondary,
|
|
@@ -86,8 +91,7 @@ local function TimeField(props)
|
|
|
86
91
|
value = value.minute,
|
|
87
92
|
step = step,
|
|
88
93
|
disabled = disabled,
|
|
89
|
-
|
|
90
|
-
width = UDim.new(0, 56),
|
|
94
|
+
width = UDim.new(0, theme.spacing.calc(12)),
|
|
91
95
|
sx = {
|
|
92
96
|
LayoutOrder = 2,
|
|
93
97
|
},
|
|
@@ -28,70 +28,73 @@ local function Timeline(props)
|
|
|
28
28
|
_attributes.base = styles.root
|
|
29
29
|
_attributes.className = className
|
|
30
30
|
_attributes.sx = sx
|
|
31
|
-
local _attributes_1 = table.clone(styles.
|
|
31
|
+
local _attributes_1 = table.clone(styles.inset)
|
|
32
32
|
setmetatable(_attributes_1, nil)
|
|
33
|
-
local _exp = React.createElement("
|
|
33
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
34
|
+
local _attributes_2 = table.clone(styles.list)
|
|
35
|
+
setmetatable(_attributes_2, nil)
|
|
36
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
34
37
|
-- ▼ ReadonlyArray.map ▼
|
|
35
38
|
local _newValue = table.create(#items)
|
|
36
39
|
local _callback = function(item, index)
|
|
37
40
|
local tone = timelineTone(item.tone)
|
|
38
41
|
local mark = if tone == "done" then styles.done elseif tone == "active" then styles.active elseif tone == "error" then styles.error else styles.pending
|
|
39
42
|
local caption = item.caption
|
|
40
|
-
local
|
|
43
|
+
local _attributes_3 = {
|
|
41
44
|
key = `{item.title}-{index}`,
|
|
42
45
|
}
|
|
43
46
|
for _k, _v in styles.item do
|
|
44
|
-
|
|
47
|
+
_attributes_3[_k] = _v
|
|
45
48
|
end
|
|
46
|
-
|
|
47
|
-
local
|
|
48
|
-
setmetatable(_attributes_3, nil)
|
|
49
|
-
local _exp_1 = React.createElement("uilistlayout", _attributes_3)
|
|
50
|
-
local _attributes_4 = table.clone(styles.rail)
|
|
49
|
+
_attributes_3.LayoutOrder = index
|
|
50
|
+
local _attributes_4 = table.clone(styles.row)
|
|
51
51
|
setmetatable(_attributes_4, nil)
|
|
52
|
+
local _exp_2 = React.createElement("uilistlayout", _attributes_4)
|
|
53
|
+
local _attributes_5 = table.clone(styles.rail)
|
|
54
|
+
setmetatable(_attributes_5, nil)
|
|
52
55
|
local _result
|
|
53
56
|
if timelineRail(index, count) then
|
|
54
|
-
local
|
|
55
|
-
setmetatable(
|
|
56
|
-
_result = React.createElement("frame",
|
|
57
|
+
local _attributes_6 = table.clone(styles.line)
|
|
58
|
+
setmetatable(_attributes_6, nil)
|
|
59
|
+
_result = React.createElement("frame", _attributes_6)
|
|
57
60
|
else
|
|
58
61
|
_result = nil
|
|
59
62
|
end
|
|
60
|
-
local
|
|
61
|
-
setmetatable(
|
|
62
|
-
local
|
|
63
|
+
local _attributes_6 = table.clone(cx(styles.dot, mark))
|
|
64
|
+
setmetatable(_attributes_6, nil)
|
|
65
|
+
local _exp_3 = React.createElement("frame", _attributes_5, _result, React.createElement("frame", _attributes_6, React.createElement("uicorner", {
|
|
63
66
|
CornerRadius = UDim.new(1, 0),
|
|
64
67
|
})))
|
|
65
|
-
local
|
|
66
|
-
setmetatable(_attributes_6, nil)
|
|
67
|
-
local _attributes_7 = table.clone(styles.bodyPad)
|
|
68
|
+
local _attributes_7 = table.clone(styles.body)
|
|
68
69
|
setmetatable(_attributes_7, nil)
|
|
69
|
-
local
|
|
70
|
-
local _attributes_8 = table.clone(styles.bodyList)
|
|
70
|
+
local _attributes_8 = table.clone(styles.bodyPad)
|
|
71
71
|
setmetatable(_attributes_8, nil)
|
|
72
|
-
local _exp_4 = React.createElement("
|
|
73
|
-
local _attributes_9 = table.clone(styles.
|
|
72
|
+
local _exp_4 = React.createElement("uipadding", _attributes_8)
|
|
73
|
+
local _attributes_9 = table.clone(styles.bodyList)
|
|
74
74
|
setmetatable(_attributes_9, nil)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
local _exp_5 = React.createElement("uilistlayout", _attributes_9)
|
|
76
|
+
local _attributes_10 = table.clone(styles.title)
|
|
77
|
+
setmetatable(_attributes_10, nil)
|
|
78
|
+
_attributes_10.Text = item.title
|
|
79
|
+
_attributes_10.LayoutOrder = 0
|
|
80
|
+
local _exp_6 = React.createElement("textlabel", _attributes_10)
|
|
78
81
|
local _result_1
|
|
79
82
|
if caption ~= nil and #caption > 0 then
|
|
80
|
-
local
|
|
81
|
-
setmetatable(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
_result_1 = (React.createElement("textlabel",
|
|
83
|
+
local _attributes_11 = table.clone(styles.caption)
|
|
84
|
+
setmetatable(_attributes_11, nil)
|
|
85
|
+
_attributes_11.Text = caption
|
|
86
|
+
_attributes_11.LayoutOrder = 1
|
|
87
|
+
_result_1 = (React.createElement("textlabel", _attributes_11))
|
|
85
88
|
else
|
|
86
89
|
_result_1 = nil
|
|
87
90
|
end
|
|
88
|
-
return React.createElement("frame",
|
|
91
|
+
return React.createElement("frame", _attributes_3, _exp_2, _exp_3, React.createElement("frame", _attributes_7, _exp_4, _exp_5, _exp_6, _result_1))
|
|
89
92
|
end
|
|
90
93
|
for _k, _v in items do
|
|
91
94
|
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
92
95
|
end
|
|
93
96
|
-- ▲ ReadonlyArray.map ▲
|
|
94
|
-
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
97
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, React.createElement(React.Fragment, nil, _newValue))
|
|
95
98
|
end
|
|
96
99
|
local default = Timeline
|
|
97
100
|
return {
|