@rbxts/uiblox 0.2.0-alpha.3 → 0.2.0-alpha.31
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/hooks/index.d.ts +1 -0
- package/out/hooks/init.luau +3 -0
- package/out/hooks/useBreakpoints.luau +2 -11
- package/out/hooks/viewportObserver.d.ts +10 -0
- package/out/hooks/viewportObserver.luau +75 -0
- package/out/theme/interfaces/theme/Theme.d.ts +15 -0
- package/out/theme/styles/utilities/componentStyles.luau +45 -3
- package/out/theme/styles/utilities/componentTheme.d.ts +15 -0
- package/out/theme/styles/utilities/index.d.ts +2 -0
- package/out/theme/styles/utilities/init.luau +7 -0
- package/out/theme/styles/utilities/resolveStyle.d.ts +10 -2
- package/out/theme/styles/utilities/resolveStyle.luau +7 -3
- package/out/theme/styles/utilities/resolveSx.d.ts +120 -0
- package/out/theme/styles/utilities/resolveSx.luau +524 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +9 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
- package/out/ui/packages/accordion/components/Accordion.luau +46 -30
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +16 -4
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
- package/out/ui/packages/accordion/components/accordionOpen.luau +4 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +48 -42
- package/out/ui/packages/alert/components/Alert.styles.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.styles.luau +17 -8
- package/out/ui/packages/appBar/components/AppBar.d.ts +2 -1
- package/out/ui/packages/appBar/components/AppBar.luau +47 -36
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +16 -5
- package/out/ui/packages/assetField/components/AssetField.luau +12 -16
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +27 -26
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.styles.luau +5 -1
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
- package/out/ui/packages/backdrop/components/Backdrop.luau +51 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
- package/out/ui/packages/backdrop/index.d.ts +2 -0
- package/out/ui/packages/backdrop/init.luau +5 -0
- package/out/ui/packages/badge/components/Badge.d.ts +3 -0
- package/out/ui/packages/badge/components/Badge.luau +32 -24
- package/out/ui/packages/badge/components/Badge.styles.d.ts +5 -1
- package/out/ui/packages/badge/components/Badge.styles.luau +20 -8
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +1 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +20 -18
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +3 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +6 -2
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +67 -40
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
- package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/init.luau +3 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
- package/out/ui/packages/button/components/Button.luau +28 -22
- package/out/ui/packages/card/components/Card.d.ts +3 -1
- package/out/ui/packages/card/components/Card.luau +10 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +75 -53
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +26 -9
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +6 -1
- package/out/ui/packages/chip/components/Chip.luau +61 -17
- package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +54 -9
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +29 -18
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +16 -20
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +34 -20
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +34 -35
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +65 -62
- package/out/ui/packages/dialog/components/Dialog.d.ts +3 -2
- package/out/ui/packages/dialog/components/Dialog.luau +41 -21
- package/out/ui/packages/divider/components/Divider.d.ts +1 -0
- package/out/ui/packages/divider/components/Divider.luau +52 -17
- package/out/ui/packages/divider/components/Divider.styles.luau +32 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +1 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +10 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.luau +71 -37
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.styles.luau +3 -2
- package/out/ui/packages/fab/components/Fab.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.luau +79 -37
- package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +39 -3
- package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
- package/out/ui/packages/fab/components/fabSize.luau +4 -0
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +1 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
- package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
- package/out/ui/packages/formText/components/FormHelperText.luau +40 -0
- package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
- package/out/ui/packages/formText/components/FormLabel.luau +42 -0
- package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
- package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
- package/out/ui/packages/formText/index.d.ts +4 -0
- package/out/ui/packages/formText/init.luau +6 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +56 -42
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -4
- package/out/ui/packages/host/components/SxHost.d.ts +18 -0
- package/out/ui/packages/host/components/SxHost.luau +210 -0
- package/out/ui/packages/host/hostPaint.d.ts +12 -0
- package/out/ui/packages/host/hostPaint.luau +34 -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 +22 -17
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
- package/out/ui/packages/imageList/components/ImageList.luau +93 -0
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +73 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +4 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +31 -0
- package/out/ui/packages/imageList/index.d.ts +2 -0
- package/out/ui/packages/imageList/init.luau +5 -0
- package/out/ui/packages/index.d.ts +8 -0
- package/out/ui/packages/init.luau +24 -0
- package/out/ui/packages/input/components/Input.d.ts +1 -0
- package/out/ui/packages/input/components/Input.luau +22 -19
- package/out/ui/packages/layout/components/Box.d.ts +11 -0
- package/out/ui/packages/layout/components/Box.luau +40 -0
- package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
- package/out/ui/packages/layout/components/Box.styles.luau +34 -0
- package/out/ui/packages/layout/components/Container.d.ts +10 -0
- package/out/ui/packages/layout/components/Container.luau +45 -0
- package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
- package/out/ui/packages/layout/components/Container.styles.luau +41 -0
- package/out/ui/packages/layout/components/FlexItem.d.ts +12 -0
- package/out/ui/packages/layout/components/FlexItem.luau +40 -0
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +8 -0
- package/out/ui/packages/layout/components/FlexItem.styles.luau +66 -0
- package/out/ui/packages/layout/components/Grid.d.ts +5 -1
- package/out/ui/packages/layout/components/Grid.luau +41 -19
- package/out/ui/packages/layout/components/List.luau +9 -16
- package/out/ui/packages/layout/components/Stack.d.ts +14 -0
- package/out/ui/packages/layout/components/Stack.luau +44 -0
- package/out/ui/packages/layout/components/Stack.styles.d.ts +10 -0
- package/out/ui/packages/layout/components/Stack.styles.luau +101 -0
- package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
- package/out/ui/packages/layout/components/boxPad.luau +59 -0
- package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
- package/out/ui/packages/layout/components/containerWidth.luau +17 -0
- package/out/ui/packages/layout/components/flexItemMode.d.ts +6 -0
- package/out/ui/packages/layout/components/flexItemMode.luau +36 -0
- package/out/ui/packages/layout/components/gridProps.d.ts +3 -0
- package/out/ui/packages/layout/components/gridProps.luau +20 -0
- package/out/ui/packages/layout/components/stackAlign.d.ts +10 -0
- package/out/ui/packages/layout/components/stackAlign.luau +43 -0
- package/out/ui/packages/layout/index.d.ts +14 -0
- package/out/ui/packages/layout/init.luau +5 -0
- package/out/ui/packages/link/components/Link.d.ts +11 -0
- package/out/ui/packages/link/components/Link.luau +80 -0
- package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
- package/out/ui/packages/link/components/Link.styles.luau +59 -0
- package/out/ui/packages/link/index.d.ts +3 -0
- package/out/ui/packages/link/init.luau +5 -0
- package/out/ui/packages/listItem/components/ListItem.d.ts +4 -1
- package/out/ui/packages/listItem/components/ListItem.luau +44 -4
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +16 -5
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +7 -1
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
- 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.d.ts +6 -0
- package/out/ui/packages/markdown/components/Markdown.luau +221 -0
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.styles.luau +101 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +16 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +315 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +6 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +132 -0
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +2 -0
- package/out/ui/packages/markdown/htmlToMarkdown.luau +350 -0
- package/out/ui/packages/markdown/index.d.ts +8 -0
- package/out/ui/packages/markdown/init.luau +11 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +42 -0
- package/out/ui/packages/markdown/parseMarkdown.luau +459 -0
- package/out/ui/packages/menu/components/Menu.d.ts +7 -1
- package/out/ui/packages/menu/components/Menu.luau +68 -26
- package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
- package/out/ui/packages/modal/components/Modal.d.ts +2 -1
- package/out/ui/packages/modal/components/Modal.luau +79 -37
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +1 -0
- package/out/ui/packages/motion/unit.d.ts +5 -0
- package/out/ui/packages/motion/unit.luau +23 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +2 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +16 -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.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.luau +62 -38
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.styles.luau +36 -4
- package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
- package/out/ui/packages/pagination/components/pageRange.luau +91 -8
- package/out/ui/packages/pagination/index.d.ts +1 -0
- package/out/ui/packages/pagination/init.luau +1 -0
- package/out/ui/packages/paper/components/Paper.d.ts +4 -2
- package/out/ui/packages/paper/components/Paper.luau +31 -9
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +6 -0
- 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/popup/index.d.ts +1 -0
- package/out/ui/packages/popup/init.luau +1 -0
- 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.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +16 -18
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
- package/out/ui/packages/rating/components/Rating.d.ts +11 -0
- package/out/ui/packages/rating/components/Rating.luau +97 -0
- package/out/ui/packages/rating/components/Rating.styles.d.ts +6 -0
- package/out/ui/packages/rating/components/Rating.styles.luau +44 -0
- package/out/ui/packages/rating/index.d.ts +2 -0
- package/out/ui/packages/rating/init.luau +5 -0
- 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.d.ts +5 -0
- package/out/ui/packages/select/components/Select.luau +61 -77
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- 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 +22 -30
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
- package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
- package/out/ui/packages/slider/components/Slider.d.ts +3 -0
- package/out/ui/packages/slider/components/Slider.luau +47 -19
- package/out/ui/packages/slider/components/Slider.styles.d.ts +2 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +14 -1
- package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
- package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +2 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +5 -0
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +1 -0
- package/out/ui/packages/snackbar/components/snackbarAction.luau +10 -0
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +19 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +97 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +5 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +31 -0
- package/out/ui/packages/speedDial/index.d.ts +3 -0
- package/out/ui/packages/speedDial/init.luau +5 -0
- package/out/ui/packages/splitPane/components/SplitPane.luau +13 -17
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +2 -0
- package/out/ui/packages/stateMatrix.luau +872 -881
- package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
- package/out/ui/packages/stepper/components/Stepper.luau +16 -17
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +3 -1
- package/out/ui/packages/stepper/components/Stepper.styles.luau +6 -2
- package/out/ui/packages/switch/components/Switch.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.luau +21 -16
- package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +6 -1
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +15 -19
- package/out/ui/packages/table/components/Table.styles.d.ts +3 -1
- package/out/ui/packages/table/components/Table.styles.luau +10 -6
- package/out/ui/packages/tabs/components/Tabs.d.ts +3 -0
- package/out/ui/packages/tabs/components/Tabs.luau +24 -19
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +5 -1
- package/out/ui/packages/tabs/components/Tabs.styles.luau +26 -10
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
- package/out/ui/packages/tabs/index.d.ts +1 -0
- package/out/ui/packages/tabs/init.luau +1 -0
- package/out/ui/packages/toast/components/Toast.d.ts +2 -0
- package/out/ui/packages/toast/components/Toast.luau +41 -13
- package/out/ui/packages/toast/components/Toast.styles.luau +23 -5
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +21 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +129 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +9 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +69 -0
- package/out/ui/packages/toggleButton/index.d.ts +2 -0
- package/out/ui/packages/toggleButton/init.luau +7 -0
- 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 +7 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +43 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
- package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
- package/out/ui/packages/virtualList/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +1 -0
- package/package.json +2 -2
- package/out/ui/packages/select/components/selectMotion.d.ts +0 -2
- package/out/ui/packages/select/components/selectMotion.luau +0 -12
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function gridMaxCells(columns, maxColumns, fillDirectionMaxCells)
|
|
3
|
+
if columns ~= nil then
|
|
4
|
+
return columns
|
|
5
|
+
end
|
|
6
|
+
if maxColumns ~= nil then
|
|
7
|
+
return maxColumns
|
|
8
|
+
end
|
|
9
|
+
return if fillDirectionMaxCells == nil then 0 else fillDirectionMaxCells
|
|
10
|
+
end
|
|
11
|
+
local function gridCornerKey(corner)
|
|
12
|
+
if corner == "top-right" or corner == "bottom-left" or corner == "bottom-right" then
|
|
13
|
+
return corner
|
|
14
|
+
end
|
|
15
|
+
return "top-left"
|
|
16
|
+
end
|
|
17
|
+
return {
|
|
18
|
+
gridMaxCells = gridMaxCells,
|
|
19
|
+
gridCornerKey = gridCornerKey,
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type StackDirection = "row" | "column";
|
|
2
|
+
export type StackAlign = "start" | "center" | "end" | "stretch";
|
|
3
|
+
export type StackJustify = "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
|
|
4
|
+
export declare function stackIsRow(direction?: StackDirection): direction is "row";
|
|
5
|
+
export declare function stackGap(spacing?: number, gap?: number): number;
|
|
6
|
+
export declare function stackUsesFlex(justify?: StackJustify): justify is "space-between" | "space-around" | "space-evenly";
|
|
7
|
+
export declare function stackNeedsMainFill(wrap?: boolean, justify?: StackJustify): boolean;
|
|
8
|
+
export declare function stackRootAutomaticSize(row: boolean, fillMain: boolean): "XY" | "X" | "Y";
|
|
9
|
+
export declare function stackAlignKey(align?: StackAlign): StackAlign;
|
|
10
|
+
export declare function stackJustifyKey(justify?: StackJustify): StackJustify;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function stackIsRow(direction)
|
|
3
|
+
return direction == "row"
|
|
4
|
+
end
|
|
5
|
+
local function stackGap(spacing, gap)
|
|
6
|
+
if gap ~= nil then
|
|
7
|
+
return gap
|
|
8
|
+
end
|
|
9
|
+
return if spacing == nil then 1 else spacing
|
|
10
|
+
end
|
|
11
|
+
local function stackUsesFlex(justify)
|
|
12
|
+
return justify == "space-between" or justify == "space-around" or justify == "space-evenly"
|
|
13
|
+
end
|
|
14
|
+
local function stackNeedsMainFill(wrap, justify)
|
|
15
|
+
return wrap == true or stackUsesFlex(justify)
|
|
16
|
+
end
|
|
17
|
+
local function stackRootAutomaticSize(row, fillMain)
|
|
18
|
+
if not fillMain then
|
|
19
|
+
return "XY"
|
|
20
|
+
end
|
|
21
|
+
return if row then "Y" else "X"
|
|
22
|
+
end
|
|
23
|
+
local function stackAlignKey(align)
|
|
24
|
+
if align == "center" or align == "end" or align == "stretch" then
|
|
25
|
+
return align
|
|
26
|
+
end
|
|
27
|
+
return "start"
|
|
28
|
+
end
|
|
29
|
+
local function stackJustifyKey(justify)
|
|
30
|
+
if justify == "center" or justify == "end" or justify == "space-between" or justify == "space-around" or justify == "space-evenly" then
|
|
31
|
+
return justify
|
|
32
|
+
end
|
|
33
|
+
return "start"
|
|
34
|
+
end
|
|
35
|
+
return {
|
|
36
|
+
stackIsRow = stackIsRow,
|
|
37
|
+
stackGap = stackGap,
|
|
38
|
+
stackUsesFlex = stackUsesFlex,
|
|
39
|
+
stackNeedsMainFill = stackNeedsMainFill,
|
|
40
|
+
stackRootAutomaticSize = stackRootAutomaticSize,
|
|
41
|
+
stackAlignKey = stackAlignKey,
|
|
42
|
+
stackJustifyKey = stackJustifyKey,
|
|
43
|
+
}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
export { default as Grid } from "./components/Grid";
|
|
2
2
|
export { GridProps } from "./components/Grid";
|
|
3
|
+
export { GridCorner } from "./components/gridProps";
|
|
3
4
|
export * from "./components/Grid";
|
|
4
5
|
export { default as List } from "./components/List";
|
|
5
6
|
export { ListProps } from "./components/List";
|
|
6
7
|
export * from "./components/List";
|
|
8
|
+
export { default as Stack } from "./components/Stack";
|
|
9
|
+
export { StackProps } from "./components/Stack";
|
|
10
|
+
export { StackAlign, StackDirection, StackJustify } from "./components/stackAlign";
|
|
11
|
+
export { default as FlexItem } from "./components/FlexItem";
|
|
12
|
+
export { FlexItemProps } from "./components/FlexItem";
|
|
13
|
+
export { FlexItemAlign, FlexItemModeName } from "./components/flexItemMode";
|
|
14
|
+
export { default as Box } from "./components/Box";
|
|
15
|
+
export { BoxProps } from "./components/Box";
|
|
16
|
+
export { BoxPad } from "./components/boxPad";
|
|
17
|
+
export { BoxBg } from "./components/Box.styles";
|
|
18
|
+
export { default as Container } from "./components/Container";
|
|
19
|
+
export { ContainerProps } from "./components/Container";
|
|
20
|
+
export { ContainerMaxWidth, containerMaxPx } from "./components/containerWidth";
|
|
@@ -9,4 +9,9 @@ exports.List = TS.import(script, script, "components", "List").default
|
|
|
9
9
|
for _k, _v in TS.import(script, script, "components", "List") or {} do
|
|
10
10
|
exports[_k] = _v
|
|
11
11
|
end
|
|
12
|
+
exports.Stack = TS.import(script, script, "components", "Stack").default
|
|
13
|
+
exports.FlexItem = TS.import(script, script, "components", "FlexItem").default
|
|
14
|
+
exports.Box = TS.import(script, script, "components", "Box").default
|
|
15
|
+
exports.Container = TS.import(script, script, "components", "Container").default
|
|
16
|
+
exports.containerMaxPx = TS.import(script, script, "components", "containerWidth").containerMaxPx
|
|
12
17
|
return exports
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { LinkColor, LinkUnderline } from "./Link.styles";
|
|
3
|
+
export interface LinkProps {
|
|
4
|
+
text: string;
|
|
5
|
+
color?: LinkColor;
|
|
6
|
+
underline?: LinkUnderline;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onActivated?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare function Link(props: CustomizedProps<TextButton, LinkProps>): JSX.Element;
|
|
11
|
+
export default Link;
|
|
@@ -0,0 +1,80 @@
|
|
|
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 useState = _react.useState
|
|
6
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
7
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
|
+
local useLinkStyles = TS.import(script, script.Parent, "Link.styles").default
|
|
9
|
+
local function Link(props)
|
|
10
|
+
local _binding = props
|
|
11
|
+
local text = _binding.text
|
|
12
|
+
local color = _binding.color
|
|
13
|
+
if color == nil then
|
|
14
|
+
color = "primary"
|
|
15
|
+
end
|
|
16
|
+
local underline = _binding.underline
|
|
17
|
+
if underline == nil then
|
|
18
|
+
underline = "always"
|
|
19
|
+
end
|
|
20
|
+
local disabled = _binding.disabled
|
|
21
|
+
local onActivated = _binding.onActivated
|
|
22
|
+
local className = _binding.className
|
|
23
|
+
local sx = _binding.sx
|
|
24
|
+
local id = _binding.id
|
|
25
|
+
local ref = _binding.ref
|
|
26
|
+
local hover, setHover = useState(false)
|
|
27
|
+
local showUnderline = underline == "always" or (underline == "hover" and hover)
|
|
28
|
+
local styles = useLinkStyles({
|
|
29
|
+
color = color,
|
|
30
|
+
disabled = disabled,
|
|
31
|
+
showUnderline = showUnderline,
|
|
32
|
+
})
|
|
33
|
+
local active = canActivate(disabled)
|
|
34
|
+
local _attributes = {
|
|
35
|
+
tag = "textbutton",
|
|
36
|
+
}
|
|
37
|
+
local _condition = id
|
|
38
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
39
|
+
_condition = "Link"
|
|
40
|
+
end
|
|
41
|
+
_attributes.key = _condition
|
|
42
|
+
_attributes.hostRef = ref
|
|
43
|
+
_attributes.base = styles.root
|
|
44
|
+
_attributes.className = className
|
|
45
|
+
_attributes.sx = sx
|
|
46
|
+
_attributes.state = {
|
|
47
|
+
disabled = disabled,
|
|
48
|
+
hover = hover,
|
|
49
|
+
}
|
|
50
|
+
_attributes.Text = text
|
|
51
|
+
_attributes.Active = active
|
|
52
|
+
_attributes.Selectable = active
|
|
53
|
+
_attributes.Event = {
|
|
54
|
+
Activated = function()
|
|
55
|
+
if active then
|
|
56
|
+
local _result = onActivated
|
|
57
|
+
if _result ~= nil then
|
|
58
|
+
_result()
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end,
|
|
62
|
+
MouseEnter = function()
|
|
63
|
+
return setHover(true)
|
|
64
|
+
end,
|
|
65
|
+
MouseLeave = function()
|
|
66
|
+
return setHover(false)
|
|
67
|
+
end,
|
|
68
|
+
}
|
|
69
|
+
local _attributes_1 = {
|
|
70
|
+
key = "Underline",
|
|
71
|
+
}
|
|
72
|
+
for _k, _v in styles.underline do
|
|
73
|
+
_attributes_1[_k] = _v
|
|
74
|
+
end
|
|
75
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1))
|
|
76
|
+
end
|
|
77
|
+
local default = Link
|
|
78
|
+
return {
|
|
79
|
+
default = default,
|
|
80
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type LinkColor = "primary" | "inherit" | "error";
|
|
2
|
+
export type LinkUnderline = "always" | "hover" | "none";
|
|
3
|
+
declare const useLinkStyles: (props: {
|
|
4
|
+
color?: LinkColor;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
showUnderline?: boolean;
|
|
7
|
+
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
8
|
+
export default useLinkStyles;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local function linkColor(theme, color, disabled)
|
|
7
|
+
if disabled then
|
|
8
|
+
return theme.palette.text.disabled
|
|
9
|
+
end
|
|
10
|
+
if color == "error" then
|
|
11
|
+
return theme.palette.status.error.main
|
|
12
|
+
end
|
|
13
|
+
if color == "inherit" then
|
|
14
|
+
return theme.palette.text.primary
|
|
15
|
+
end
|
|
16
|
+
return theme.palette.primary.main
|
|
17
|
+
end
|
|
18
|
+
local useLinkStyles = componentStyles("Link", function(theme, _param)
|
|
19
|
+
local color = _param.color
|
|
20
|
+
if color == nil then
|
|
21
|
+
color = "primary"
|
|
22
|
+
end
|
|
23
|
+
local disabled = _param.disabled
|
|
24
|
+
if disabled == nil then
|
|
25
|
+
disabled = false
|
|
26
|
+
end
|
|
27
|
+
local showUnderline = _param.showUnderline
|
|
28
|
+
if showUnderline == nil then
|
|
29
|
+
showUnderline = true
|
|
30
|
+
end
|
|
31
|
+
local ink = linkColor(theme, color, disabled)
|
|
32
|
+
return createStyles({
|
|
33
|
+
root = {
|
|
34
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
35
|
+
Size = UDim2.fromScale(0, 0),
|
|
36
|
+
BackgroundTransparency = 1,
|
|
37
|
+
BorderSizePixel = 0,
|
|
38
|
+
AutoButtonColor = false,
|
|
39
|
+
Active = not disabled,
|
|
40
|
+
Selectable = not disabled,
|
|
41
|
+
TextColor3 = ink,
|
|
42
|
+
Font = theme.typography.fontFamilies.default,
|
|
43
|
+
TextSize = theme.typography.fontSizes.body,
|
|
44
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
45
|
+
},
|
|
46
|
+
underline = {
|
|
47
|
+
Size = UDim2.new(1, 0, 0, 1),
|
|
48
|
+
Position = UDim2.new(0, 0, 1, 0),
|
|
49
|
+
AnchorPoint = Vector2.new(0, 1),
|
|
50
|
+
BackgroundColor3 = ink,
|
|
51
|
+
BackgroundTransparency = if showUnderline then 0 else 1,
|
|
52
|
+
BorderSizePixel = 0,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
end)
|
|
56
|
+
local default = useLinkStyles
|
|
57
|
+
return {
|
|
58
|
+
default = default,
|
|
59
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
1
2
|
export interface ListItemProps {
|
|
2
3
|
text: string;
|
|
3
4
|
secondary?: string;
|
|
4
5
|
selected?: boolean;
|
|
5
6
|
disabled?: boolean;
|
|
7
|
+
dense?: boolean;
|
|
8
|
+
divider?: boolean;
|
|
6
9
|
onActivated?: () => void;
|
|
7
10
|
}
|
|
8
|
-
declare function ListItem(props: ListItemProps): JSX.Element;
|
|
11
|
+
declare function ListItem(props: CustomizedProps<TextButton, ListItemProps>): JSX.Element;
|
|
9
12
|
export default ListItem;
|
|
@@ -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 useListItemStyles = TS.import(script, script.Parent, "ListItem.styles").default
|
|
5
6
|
local function ListItem(props)
|
|
6
7
|
local _binding = props
|
|
@@ -14,17 +15,44 @@ local function ListItem(props)
|
|
|
14
15
|
if disabled == nil then
|
|
15
16
|
disabled = false
|
|
16
17
|
end
|
|
18
|
+
local dense = _binding.dense
|
|
19
|
+
if dense == nil then
|
|
20
|
+
dense = false
|
|
21
|
+
end
|
|
22
|
+
local divider = _binding.divider
|
|
23
|
+
if divider == nil then
|
|
24
|
+
divider = false
|
|
25
|
+
end
|
|
17
26
|
local onActivated = _binding.onActivated
|
|
27
|
+
local className = _binding.className
|
|
28
|
+
local sx = _binding.sx
|
|
29
|
+
local id = _binding.id
|
|
30
|
+
local ref = _binding.ref
|
|
18
31
|
local styles = useListItemStyles({
|
|
19
32
|
selected = selected,
|
|
20
33
|
disabled = disabled,
|
|
34
|
+
dense = dense,
|
|
21
35
|
})
|
|
22
36
|
local _attributes = {
|
|
23
|
-
|
|
37
|
+
tag = "textbutton",
|
|
24
38
|
}
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
local _condition = id
|
|
40
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
41
|
+
_condition = "ListItem"
|
|
27
42
|
end
|
|
43
|
+
_attributes.key = _condition
|
|
44
|
+
_attributes.hostRef = ref
|
|
45
|
+
_attributes.base = styles.root
|
|
46
|
+
_attributes.className = className
|
|
47
|
+
_attributes.sx = sx
|
|
48
|
+
_attributes.state = {
|
|
49
|
+
disabled = disabled,
|
|
50
|
+
selected = selected,
|
|
51
|
+
}
|
|
52
|
+
_attributes.Text = ""
|
|
53
|
+
_attributes.Active = not disabled
|
|
54
|
+
_attributes.Selectable = not disabled
|
|
55
|
+
_attributes.AutoButtonColor = false
|
|
28
56
|
_attributes.Event = {
|
|
29
57
|
Activated = function()
|
|
30
58
|
if not disabled and onActivated ~= nil then
|
|
@@ -59,7 +87,19 @@ local function ListItem(props)
|
|
|
59
87
|
else
|
|
60
88
|
_result = nil
|
|
61
89
|
end
|
|
62
|
-
|
|
90
|
+
local _result_1
|
|
91
|
+
if divider == true then
|
|
92
|
+
local _attributes_4 = {
|
|
93
|
+
key = "Divider",
|
|
94
|
+
}
|
|
95
|
+
for _k, _v in styles.divider do
|
|
96
|
+
_attributes_4[_k] = _v
|
|
97
|
+
end
|
|
98
|
+
_result_1 = React.createElement("frame", _attributes_4)
|
|
99
|
+
else
|
|
100
|
+
_result_1 = nil
|
|
101
|
+
end
|
|
102
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _result, _result_1)
|
|
63
103
|
end
|
|
64
104
|
local default = ListItem
|
|
65
105
|
return {
|
|
@@ -12,6 +12,11 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
12
12
|
if disabled == nil then
|
|
13
13
|
disabled = false
|
|
14
14
|
end
|
|
15
|
+
local dense = _param.dense
|
|
16
|
+
if dense == nil then
|
|
17
|
+
dense = false
|
|
18
|
+
end
|
|
19
|
+
local pad = theme.padding.calc(if dense == true then 0.5 else 1)
|
|
15
20
|
return createStyles({
|
|
16
21
|
root = {
|
|
17
22
|
Size = UDim2.new(1, 0, 0, 0),
|
|
@@ -25,10 +30,10 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
25
30
|
Selectable = not disabled,
|
|
26
31
|
},
|
|
27
32
|
padding = {
|
|
28
|
-
PaddingTop = UDim.new(0,
|
|
29
|
-
PaddingBottom = UDim.new(0,
|
|
30
|
-
PaddingLeft = UDim.new(0,
|
|
31
|
-
PaddingRight = UDim.new(0,
|
|
33
|
+
PaddingTop = UDim.new(0, pad),
|
|
34
|
+
PaddingBottom = UDim.new(0, pad),
|
|
35
|
+
PaddingLeft = UDim.new(0, pad),
|
|
36
|
+
PaddingRight = UDim.new(0, pad),
|
|
32
37
|
},
|
|
33
38
|
list = {
|
|
34
39
|
FillDirection = Enum.FillDirection.Vertical,
|
|
@@ -41,7 +46,7 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
41
46
|
BackgroundTransparency = 1,
|
|
42
47
|
BorderSizePixel = 0,
|
|
43
48
|
Font = theme.typography.fontFamilies.default,
|
|
44
|
-
TextSize = theme.typography.fontSizes.body,
|
|
49
|
+
TextSize = if dense == true then theme.typography.fontSizes.caption else theme.typography.fontSizes.body,
|
|
45
50
|
TextColor3 = if disabled then theme.palette.text.disabled else theme.palette.text.primary,
|
|
46
51
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
47
52
|
},
|
|
@@ -56,6 +61,12 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
56
61
|
TextColor3 = theme.palette.text.secondary,
|
|
57
62
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
58
63
|
},
|
|
64
|
+
divider = {
|
|
65
|
+
LayoutOrder = 3,
|
|
66
|
+
Size = UDim2.new(1, 0, 0, 1),
|
|
67
|
+
BackgroundColor3 = theme.palette.divider,
|
|
68
|
+
BorderSizePixel = 0,
|
|
69
|
+
},
|
|
59
70
|
})
|
|
60
71
|
end)
|
|
61
72
|
local default = useListItemStyles
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { LoadingStrokeStyle } from "./loadingStrokeSx";
|
|
2
3
|
export interface LoadingStrokeProps {
|
|
3
4
|
animating?: boolean;
|
|
5
|
+
color?: Color3;
|
|
6
|
+
thickness?: number;
|
|
4
7
|
}
|
|
5
|
-
declare function LoadingStroke(props: CustomizedProps<UIStroke, LoadingStrokeProps>
|
|
8
|
+
declare function LoadingStroke(props: Omit<CustomizedProps<UIStroke, LoadingStrokeProps>, "sx" | "className"> & {
|
|
9
|
+
className?: LoadingStrokeStyle;
|
|
10
|
+
sx?: LoadingStrokeStyle;
|
|
11
|
+
}): JSX.Element;
|
|
6
12
|
export default LoadingStroke;
|
|
@@ -4,37 +4,41 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
|
-
local
|
|
7
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
8
|
+
local loopProperty = TS.import(script, script.Parent.Parent.Parent, "motion").loopProperty
|
|
8
9
|
local function LoadingStroke(props)
|
|
9
10
|
local _binding = props
|
|
10
11
|
local animating = _binding.animating
|
|
11
12
|
if animating == nil then
|
|
12
13
|
animating = false
|
|
13
14
|
end
|
|
15
|
+
local color = _binding.color
|
|
16
|
+
local thickness = _binding.thickness
|
|
17
|
+
if thickness == nil then
|
|
18
|
+
thickness = 2
|
|
19
|
+
end
|
|
14
20
|
local className = _binding.className
|
|
15
21
|
local sx = _binding.sx
|
|
16
22
|
local children = _binding.children
|
|
17
23
|
local id = _binding.id
|
|
18
24
|
local ref = _binding.ref
|
|
25
|
+
local _binding_1 = useTheme()
|
|
26
|
+
local theme = _binding_1.theme
|
|
19
27
|
local gradientRef = useRef()
|
|
28
|
+
local stroke = color or theme.palette.primary.on
|
|
20
29
|
useEffect(function()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
else
|
|
31
|
-
gradientRef.current.Rotation = 0
|
|
32
|
-
end
|
|
30
|
+
local gradient = gradientRef.current
|
|
31
|
+
if not gradient then
|
|
32
|
+
return nil
|
|
33
|
+
end
|
|
34
|
+
if animating then
|
|
35
|
+
gradient.Rotation = 0
|
|
36
|
+
return loopProperty(gradient, {
|
|
37
|
+
Rotation = 360,
|
|
38
|
+
}, 1.2)
|
|
33
39
|
end
|
|
40
|
+
gradient.Rotation = 0
|
|
34
41
|
end, { animating })
|
|
35
|
-
-- Decorative shimmer; not a semantic text/surface token.
|
|
36
|
-
local stroke = Color3.fromRGB(255, 255, 255)
|
|
37
|
-
local mid = Color3.fromRGB(235, 235, 235)
|
|
38
42
|
local _attributes = {}
|
|
39
43
|
local _condition = id
|
|
40
44
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
@@ -43,7 +47,7 @@ local function LoadingStroke(props)
|
|
|
43
47
|
_attributes.key = _condition
|
|
44
48
|
_attributes.ref = ref
|
|
45
49
|
_attributes.Color = stroke
|
|
46
|
-
_attributes.Thickness =
|
|
50
|
+
_attributes.Thickness = thickness
|
|
47
51
|
_attributes.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
|
|
48
52
|
if className then
|
|
49
53
|
for _k, _v in className do
|
|
@@ -57,9 +61,9 @@ local function LoadingStroke(props)
|
|
|
57
61
|
end
|
|
58
62
|
return React.createElement("uistroke", _attributes, React.createElement("uigradient", {
|
|
59
63
|
ref = gradientRef,
|
|
60
|
-
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.
|
|
64
|
+
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.45, 0), NumberSequenceKeypoint.new(0.55, 0), NumberSequenceKeypoint.new(1, 1) }),
|
|
61
65
|
Rotation = 0,
|
|
62
|
-
Color = ColorSequence.new(
|
|
66
|
+
Color = ColorSequence.new(stroke),
|
|
63
67
|
}), children)
|
|
64
68
|
end
|
|
65
69
|
local default = LoadingStroke
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WriteableStyle } from "../../../../theme/index";
|
|
2
|
+
export type LoadingStrokeStyle = WriteableStyle<UIStroke> & {
|
|
3
|
+
BackgroundColor3?: never;
|
|
4
|
+
BackgroundTransparency?: never;
|
|
5
|
+
Size?: never;
|
|
6
|
+
Position?: never;
|
|
7
|
+
AnchorPoint?: never;
|
|
8
|
+
BorderSizePixel?: never;
|
|
9
|
+
Text?: never;
|
|
10
|
+
TextColor3?: never;
|
|
11
|
+
};
|