@rbxts/uiblox 0.2.0-alpha.36 → 0.2.0-alpha.5
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 +109 -27
- package/out/hooks/index.d.ts +0 -1
- package/out/hooks/init.luau +0 -3
- package/out/hooks/useBreakpoints.luau +11 -2
- package/out/theme/interfaces/theme/Theme.d.ts +0 -15
- package/out/theme/styles/utilities/componentStyles.luau +3 -45
- package/out/theme/styles/utilities/componentTheme.d.ts +0 -15
- package/out/theme/styles/utilities/index.d.ts +0 -2
- package/out/theme/styles/utilities/init.luau +0 -7
- package/out/theme/styles/utilities/resolveStyle.d.ts +2 -10
- package/out/theme/styles/utilities/resolveStyle.luau +3 -7
- package/out/theme/styles/utilities/styleCache.d.ts +0 -2
- package/out/theme/styles/utilities/styleCache.luau +0 -9
- package/out/theme/types/types.d.ts +1 -2
- package/out/ui/packages/accordion/components/Accordion.d.ts +0 -2
- package/out/ui/packages/accordion/components/Accordion.luau +30 -46
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
- package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
- package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
- package/out/ui/packages/alert/components/Alert.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.luau +42 -48
- package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
- package/out/ui/packages/appBar/components/AppBar.luau +36 -47
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
- package/out/ui/packages/appBar/components/AppBar.styles.luau +5 -16
- package/out/ui/packages/assetField/components/AssetField.luau +16 -12
- package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.luau +26 -27
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
- package/out/ui/packages/badge/components/Badge.d.ts +0 -3
- package/out/ui/packages/badge/components/Badge.luau +24 -32
- package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
- package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +18 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +40 -67
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
- package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/init.luau +0 -3
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +16 -12
- package/out/ui/packages/button/components/Button.luau +18 -20
- package/out/ui/packages/card/components/Card.d.ts +1 -3
- package/out/ui/packages/card/components/Card.luau +0 -10
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +53 -75
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +9 -26
- 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 +1 -5
- package/out/ui/packages/chip/components/Chip.luau +16 -25
- package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -5
- package/out/ui/packages/chip/components/Chip.styles.luau +13 -30
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +18 -29
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +20 -16
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +20 -34
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +35 -34
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +62 -65
- package/out/ui/packages/dialog/components/Dialog.d.ts +2 -3
- package/out/ui/packages/dialog/components/Dialog.luau +21 -41
- package/out/ui/packages/divider/components/Divider.d.ts +0 -1
- package/out/ui/packages/divider/components/Divider.luau +17 -52
- package/out/ui/packages/divider/components/Divider.styles.luau +0 -32
- package/out/ui/packages/drawer/components/Drawer.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.luau +37 -71
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
- package/out/ui/packages/fab/components/Fab.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.luau +37 -79
- package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.styles.luau +3 -39
- package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
- package/out/ui/packages/fab/components/fabSize.luau +0 -4
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +0 -1
- package/out/ui/packages/fontEditor/components/FontEditor.luau +16 -12
- package/out/ui/packages/formText/components/FormHelperText.luau +16 -12
- package/out/ui/packages/formText/components/FormLabel.luau +16 -12
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +42 -56
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +4 -37
- package/out/ui/packages/icon/components/Icon.luau +16 -9
- package/out/ui/packages/iconButton/components/IconButton.luau +16 -16
- package/out/ui/packages/index.d.ts +0 -6
- package/out/ui/packages/init.luau +0 -18
- package/out/ui/packages/input/components/Input.d.ts +0 -1
- package/out/ui/packages/input/components/Input.luau +18 -21
- package/out/ui/packages/layout/components/Grid.d.ts +1 -5
- package/out/ui/packages/layout/components/Grid.luau +19 -41
- package/out/ui/packages/layout/components/List.luau +16 -9
- package/out/ui/packages/layout/components/Stack.d.ts +0 -2
- package/out/ui/packages/layout/components/Stack.luau +15 -10
- package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -2
- package/out/ui/packages/layout/components/Stack.styles.luau +5 -34
- package/out/ui/packages/layout/components/stackAlign.d.ts +2 -4
- package/out/ui/packages/layout/components/stackAlign.luau +2 -16
- package/out/ui/packages/layout/index.d.ts +0 -11
- package/out/ui/packages/layout/init.luau +0 -4
- package/out/ui/packages/link/components/Link.luau +16 -13
- package/out/ui/packages/listItem/components/ListItem.d.ts +1 -4
- package/out/ui/packages/listItem/components/ListItem.luau +4 -44
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -16
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +1 -5
- package/out/ui/packages/menu/components/Menu.d.ts +1 -4
- package/out/ui/packages/menu/components/Menu.luau +15 -32
- package/out/ui/packages/modal/components/Modal.d.ts +1 -2
- package/out/ui/packages/modal/components/Modal.luau +37 -79
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +0 -1
- package/out/ui/packages/motion/unit.d.ts +0 -5
- package/out/ui/packages/motion/unit.luau +0 -23
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +0 -2
- package/out/ui/packages/numberInput/components/NumberInput.luau +3 -16
- package/out/ui/packages/numberInput/components/numberValue.d.ts +0 -1
- package/out/ui/packages/numberInput/components/numberValue.luau +0 -45
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +16 -12
- package/out/ui/packages/pagination/components/Pagination.d.ts +1 -6
- package/out/ui/packages/pagination/components/Pagination.luau +38 -62
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -6
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -36
- package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
- package/out/ui/packages/pagination/components/pageRange.luau +8 -91
- package/out/ui/packages/pagination/index.d.ts +0 -1
- package/out/ui/packages/pagination/init.luau +0 -1
- package/out/ui/packages/paper/components/Paper.d.ts +2 -4
- package/out/ui/packages/paper/components/Paper.luau +9 -31
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +38 -63
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +7 -21
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +0 -2
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +0 -14
- package/out/ui/packages/popup/components/Popup.d.ts +1 -2
- package/out/ui/packages/popup/components/Popup.luau +18 -35
- package/out/ui/packages/popup/index.d.ts +0 -1
- package/out/ui/packages/popup/init.luau +0 -1
- package/out/ui/packages/preloader/components/Preloader.luau +16 -9
- package/out/ui/packages/progressBar/components/ProgressBar.luau +16 -12
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +18 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
- package/out/ui/packages/rating/components/Rating.d.ts +1 -3
- package/out/ui/packages/rating/components/Rating.luau +17 -19
- package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -2
- package/out/ui/packages/rating/components/Rating.styles.luau +2 -7
- package/out/ui/packages/rayEditor/components/RayEditor.luau +16 -12
- package/out/ui/packages/rectEditor/components/RectEditor.luau +43 -86
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +7 -30
- package/out/ui/packages/scroll/index.d.ts +0 -2
- package/out/ui/packages/scroll/init.luau +0 -1
- package/out/ui/packages/select/components/Select.luau +55 -15
- package/out/ui/packages/select/components/selectMotion.d.ts +2 -0
- package/out/ui/packages/select/components/selectMotion.luau +12 -0
- package/out/ui/packages/shadow/components/Shadow.d.ts +1 -2
- package/out/ui/packages/shadow/components/Shadow.luau +17 -39
- package/out/ui/packages/shadow/components/Shadow.styles.luau +2 -7
- package/out/ui/packages/sidebar/components/Sidebar.luau +16 -9
- package/out/ui/packages/skeleton/components/Skeleton.luau +28 -19
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +3 -7
- package/out/ui/packages/slider/components/Slider.d.ts +0 -3
- package/out/ui/packages/slider/components/Slider.luau +19 -47
- package/out/ui/packages/slider/components/Slider.styles.d.ts +0 -2
- package/out/ui/packages/slider/components/Slider.styles.luau +1 -14
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
- package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -2
- package/out/ui/packages/speedDial/components/SpeedDial.luau +20 -25
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -4
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +4 -9
- package/out/ui/packages/speedDial/index.d.ts +0 -1
- package/out/ui/packages/splitPane/components/SplitPane.luau +17 -13
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +0 -2
- package/out/ui/packages/stateMatrix.luau +997 -793
- package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
- package/out/ui/packages/stepper/components/Stepper.luau +17 -16
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
- package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
- package/out/ui/packages/switch/components/Switch.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.luau +16 -21
- package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +1 -6
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +2 -16
- package/out/ui/packages/table/components/Table.luau +53 -136
- package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
- package/out/ui/packages/table/components/Table.styles.luau +6 -10
- package/out/ui/packages/table/index.d.ts +1 -2
- package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
- package/out/ui/packages/tabs/components/Tabs.luau +19 -24
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
- package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
- package/out/ui/packages/tabs/index.d.ts +0 -1
- package/out/ui/packages/tabs/init.luau +0 -1
- package/out/ui/packages/toast/components/Toast.d.ts +0 -2
- package/out/ui/packages/toast/components/Toast.luau +13 -41
- package/out/ui/packages/toast/components/Toast.styles.luau +5 -23
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +1 -5
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +33 -36
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +5 -16
- package/out/ui/packages/tooltip/components/Tooltip.luau +16 -9
- package/out/ui/packages/treeView/components/TreeView.luau +16 -9
- package/out/ui/packages/typography/components/Typography.luau +14 -13
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +16 -12
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +16 -12
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +1 -2
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +4 -15
- package/out/ui/packages/virtualList/components/VirtualList.luau +16 -9
- package/package.json +2 -2
- package/out/hooks/viewportObserver.d.ts +0 -10
- package/out/hooks/viewportObserver.luau +0 -75
- package/out/theme/styles/utilities/resolveSx.d.ts +0 -120
- package/out/theme/styles/utilities/resolveSx.luau +0 -524
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
- package/out/ui/packages/backdrop/components/Backdrop.luau +0 -51
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
- package/out/ui/packages/backdrop/index.d.ts +0 -2
- package/out/ui/packages/backdrop/init.luau +0 -5
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +0 -11
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +0 -253
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +0 -18
- package/out/ui/packages/dateRange/dateRangeValue.luau +0 -121
- package/out/ui/packages/dateRange/index.d.ts +0 -3
- package/out/ui/packages/dateRange/init.luau +0 -16
- package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
- package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
- package/out/ui/packages/host/components/SxHost.d.ts +0 -18
- package/out/ui/packages/host/components/SxHost.luau +0 -210
- package/out/ui/packages/host/hostPaint.d.ts +0 -12
- package/out/ui/packages/host/hostPaint.luau +0 -34
- package/out/ui/packages/host/hostRules.d.ts +0 -15
- package/out/ui/packages/host/hostRules.luau +0 -92
- package/out/ui/packages/host/index.d.ts +0 -3
- package/out/ui/packages/host/init.luau +0 -13
- package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
- package/out/ui/packages/imageList/components/ImageList.luau +0 -93
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
- package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
- package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
- package/out/ui/packages/imageList/index.d.ts +0 -2
- package/out/ui/packages/imageList/init.luau +0 -5
- package/out/ui/packages/layout/components/Box.d.ts +0 -11
- package/out/ui/packages/layout/components/Box.luau +0 -40
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
- package/out/ui/packages/layout/components/Box.styles.luau +0 -34
- package/out/ui/packages/layout/components/Container.d.ts +0 -10
- package/out/ui/packages/layout/components/Container.luau +0 -45
- package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
- package/out/ui/packages/layout/components/Container.styles.luau +0 -41
- package/out/ui/packages/layout/components/FlexItem.d.ts +0 -12
- package/out/ui/packages/layout/components/FlexItem.luau +0 -40
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +0 -8
- package/out/ui/packages/layout/components/FlexItem.styles.luau +0 -66
- package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
- package/out/ui/packages/layout/components/boxPad.luau +0 -59
- package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
- package/out/ui/packages/layout/components/containerWidth.luau +0 -17
- package/out/ui/packages/layout/components/flexItemMode.d.ts +0 -6
- package/out/ui/packages/layout/components/flexItemMode.luau +0 -36
- package/out/ui/packages/layout/components/gridProps.d.ts +0 -3
- package/out/ui/packages/layout/components/gridProps.luau +0 -20
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +0 -11
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +0 -2
- package/out/ui/packages/markdown/components/Markdown.d.ts +0 -6
- package/out/ui/packages/markdown/components/Markdown.luau +0 -221
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +0 -2
- package/out/ui/packages/markdown/components/Markdown.styles.luau +0 -101
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +0 -22
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +0 -433
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +0 -6
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +0 -161
- package/out/ui/packages/markdown/components/markdownEditorHeight.d.ts +0 -1
- package/out/ui/packages/markdown/components/markdownEditorHeight.luau +0 -13
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +0 -2
- package/out/ui/packages/markdown/htmlToMarkdown.luau +0 -350
- package/out/ui/packages/markdown/index.d.ts +0 -8
- package/out/ui/packages/markdown/init.luau +0 -11
- package/out/ui/packages/markdown/parseMarkdown.d.ts +0 -42
- package/out/ui/packages/markdown/parseMarkdown.luau +0 -459
- package/out/ui/packages/reorder/index.d.ts +0 -2
- package/out/ui/packages/reorder/init.luau +0 -14
- package/out/ui/packages/reorder/reorder.d.ts +0 -24
- package/out/ui/packages/reorder/reorder.luau +0 -178
- package/out/ui/packages/reorder/useReorderDrag.d.ts +0 -15
- package/out/ui/packages/reorder/useReorderDrag.luau +0 -129
- package/out/ui/packages/scroll/components/ScrollView.d.ts +0 -7
- package/out/ui/packages/scroll/components/ScrollView.luau +0 -42
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
- package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
- package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
- package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
- package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +0 -9
- package/out/ui/packages/sparkline/components/Sparkline.luau +0 -66
- package/out/ui/packages/sparkline/index.d.ts +0 -3
- package/out/ui/packages/sparkline/init.luau +0 -6
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +0 -8
- package/out/ui/packages/sparkline/sparklineLayout.luau +0 -75
- package/out/ui/packages/table/components/tableColumns.d.ts +0 -26
- package/out/ui/packages/table/components/tableColumns.luau +0 -92
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
- package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
|
@@ -17,7 +17,7 @@ local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "co
|
|
|
17
17
|
local spinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").spinnerPixels
|
|
18
18
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
19
19
|
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
20
|
-
local
|
|
20
|
+
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion").playProperty
|
|
21
21
|
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
22
22
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
23
23
|
local _virtualList = TS.import(script, script.Parent.Parent.Parent, "virtualList")
|
|
@@ -33,6 +33,7 @@ local _selectGroups = TS.import(script, script.Parent, "selectGroups")
|
|
|
33
33
|
local groupRows = _selectGroups.groupRows
|
|
34
34
|
local rowForOption = _selectGroups.rowForOption
|
|
35
35
|
local shouldHandleSelectKey = TS.import(script, script.Parent, "selectKey").shouldHandleSelectKey
|
|
36
|
+
local menuHold = TS.import(script, script.Parent, "selectMotion").menuHold
|
|
36
37
|
local _selectMulti = TS.import(script, script.Parent, "selectMulti")
|
|
37
38
|
local includesChoice = _selectMulti.includesChoice
|
|
38
39
|
local selectionLabel = _selectMulti.selectionLabel
|
|
@@ -74,6 +75,7 @@ local function Select(props)
|
|
|
74
75
|
local active = canActivate(disabled, loading)
|
|
75
76
|
local anchor, setAnchor = useState()
|
|
76
77
|
local open, setOpen = useState(defaultOpen == true and not loading)
|
|
78
|
+
local held, setHeld = useState(false)
|
|
77
79
|
local focused, setFocused = useState(false)
|
|
78
80
|
local highlight, setHighlight = useState(-1)
|
|
79
81
|
local _condition = defaultQuery
|
|
@@ -85,6 +87,7 @@ local function Select(props)
|
|
|
85
87
|
local typed = useRef()
|
|
86
88
|
local onKeyRef = useRef()
|
|
87
89
|
local listRef = useRef()
|
|
90
|
+
local menuRef = useRef()
|
|
88
91
|
-- ▼ ReadonlyArray.find ▼
|
|
89
92
|
local _callback = function(option)
|
|
90
93
|
return option.value == value
|
|
@@ -239,28 +242,60 @@ local function Select(props)
|
|
|
239
242
|
_result_1.ensureVisible(rowForOption(rows, highlight))
|
|
240
243
|
end
|
|
241
244
|
end, { shown, highlight })
|
|
245
|
+
useEffect(function()
|
|
246
|
+
if shown then
|
|
247
|
+
setHeld(true)
|
|
248
|
+
end
|
|
249
|
+
end, { shown })
|
|
242
250
|
useEffect(function()
|
|
243
251
|
if loading and open then
|
|
244
252
|
setOpen(false)
|
|
245
253
|
setQuery("")
|
|
246
254
|
end
|
|
247
255
|
end, { loading, open })
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
256
|
+
useEffect(function()
|
|
257
|
+
local menu = menuRef.current
|
|
258
|
+
if not menu or not held then
|
|
259
|
+
return nil
|
|
260
|
+
end
|
|
261
|
+
local stop = playProperty(menu, {
|
|
262
|
+
GroupTransparency = if shown then 0 else 1,
|
|
263
|
+
}, 0.12, reducedMotion)
|
|
264
|
+
local seconds = menuHold(shown, reducedMotion)
|
|
265
|
+
if seconds == 0 then
|
|
266
|
+
if not shown then
|
|
267
|
+
setHeld(false)
|
|
268
|
+
end
|
|
269
|
+
return stop
|
|
270
|
+
end
|
|
271
|
+
local wait = task.delay(seconds, function()
|
|
272
|
+
return setHeld(false)
|
|
273
|
+
end)
|
|
274
|
+
return function()
|
|
275
|
+
stop()
|
|
276
|
+
task.cancel(wait)
|
|
277
|
+
end
|
|
278
|
+
end, { shown, held, reducedMotion })
|
|
279
|
+
local _attributes = {}
|
|
251
280
|
local _condition_2 = id
|
|
252
281
|
if not (_condition_2 ~= 0 and _condition_2 == _condition_2 and _condition_2 ~= "" and _condition_2) then
|
|
253
282
|
_condition_2 = "Select"
|
|
254
283
|
end
|
|
255
284
|
_attributes.key = _condition_2
|
|
256
|
-
_attributes.
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
285
|
+
_attributes.ref = ref
|
|
286
|
+
for _k, _v in styles.root do
|
|
287
|
+
_attributes[_k] = _v
|
|
288
|
+
end
|
|
289
|
+
if className then
|
|
290
|
+
for _k, _v in className do
|
|
291
|
+
_attributes[_k] = _v
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
if sx then
|
|
295
|
+
for _k, _v in sx do
|
|
296
|
+
_attributes[_k] = _v
|
|
297
|
+
end
|
|
298
|
+
end
|
|
264
299
|
local _attributes_1 = {
|
|
265
300
|
key = "Trigger",
|
|
266
301
|
ref = setAnchor,
|
|
@@ -325,7 +360,7 @@ local function Select(props)
|
|
|
325
360
|
Position = UDim2.new(1, -theme.padding.calc(1), 0.5, 0),
|
|
326
361
|
},
|
|
327
362
|
})))
|
|
328
|
-
local _condition_3 = shown
|
|
363
|
+
local _condition_3 = (shown or held)
|
|
329
364
|
if _condition_3 then
|
|
330
365
|
local _attributes_5 = {
|
|
331
366
|
key = "Menu",
|
|
@@ -370,6 +405,11 @@ local function Select(props)
|
|
|
370
405
|
onInput = function(input)
|
|
371
406
|
return onKey(input, true)
|
|
372
407
|
end,
|
|
408
|
+
}, React.createElement("canvasgroup", {
|
|
409
|
+
ref = menuRef,
|
|
410
|
+
Size = UDim2.fromScale(1, 1),
|
|
411
|
+
BackgroundTransparency = 1,
|
|
412
|
+
GroupTransparency = 1,
|
|
373
413
|
}, React.createElement("frame", _attributes_5, _exp_3, _exp_4, _exp_5, _exp_6, _condition_4, React.createElement("frame", {
|
|
374
414
|
key = "ListHost",
|
|
375
415
|
Size = UDim2.new(1, 0, 1, if search then -row else 0),
|
|
@@ -429,9 +469,9 @@ local function Select(props)
|
|
|
429
469
|
setmetatable(_attributes_9, nil)
|
|
430
470
|
return React.createElement("textbutton", _attributes_8, React.createElement("uipadding", _attributes_9))
|
|
431
471
|
end,
|
|
432
|
-
})))))
|
|
472
|
+
}))))))
|
|
433
473
|
end
|
|
434
|
-
return React.createElement(
|
|
474
|
+
return React.createElement("frame", _attributes, _exp_2, _condition_3)
|
|
435
475
|
end
|
|
436
476
|
local default = Select
|
|
437
477
|
return {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local SELECT_MENU_SECONDS = 0.12
|
|
3
|
+
local function menuHold(open, reducedMotion)
|
|
4
|
+
if open or reducedMotion == true then
|
|
5
|
+
return 0
|
|
6
|
+
end
|
|
7
|
+
return SELECT_MENU_SECONDS
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
menuHold = menuHold,
|
|
11
|
+
SELECT_MENU_SECONDS = SELECT_MENU_SECONDS,
|
|
12
|
+
}
|
|
@@ -4,63 +4,49 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useState = _react.useState
|
|
7
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
7
|
local useShadowStyles = TS.import(script, script.Parent, "Shadow.styles").default
|
|
9
|
-
local function Shadow(
|
|
8
|
+
local function Shadow()
|
|
10
9
|
local _binding = useShadowStyles()
|
|
11
10
|
local container = _binding.container
|
|
12
|
-
local blob = _binding.blob
|
|
13
11
|
local parent, setParent = useState(nil)
|
|
14
12
|
local cornerRadius, setCornerRadius = useState()
|
|
15
|
-
local blobSize, setBlobSize = useState(UDim2.fromOffset(0, 0))
|
|
16
|
-
local _binding_1 = props
|
|
17
|
-
local className = _binding_1.className
|
|
18
|
-
local sx = _binding_1.sx
|
|
19
|
-
local id = _binding_1.id
|
|
20
|
-
local ref = _binding_1.ref
|
|
21
13
|
local _condition = container.ZIndex
|
|
22
14
|
if _condition == nil then
|
|
23
15
|
_condition = 0
|
|
24
16
|
end
|
|
25
17
|
local defaultZIndex = _condition
|
|
26
18
|
local zIndex, setZIndex = useState(defaultZIndex)
|
|
19
|
+
-- Set any inherited properties
|
|
27
20
|
useEffect(function()
|
|
28
21
|
if not parent then
|
|
29
22
|
return nil
|
|
30
23
|
end
|
|
31
|
-
local _cornerRadius = parent
|
|
24
|
+
local _cornerRadius = parent
|
|
32
25
|
if _cornerRadius ~= nil then
|
|
33
|
-
_cornerRadius = _cornerRadius
|
|
26
|
+
_cornerRadius = _cornerRadius:FindFirstChildOfClass("UICorner")
|
|
27
|
+
if _cornerRadius ~= nil then
|
|
28
|
+
_cornerRadius = _cornerRadius.CornerRadius
|
|
29
|
+
end
|
|
34
30
|
end
|
|
35
31
|
local cornerRadius = _cornerRadius
|
|
36
32
|
setCornerRadius(cornerRadius)
|
|
37
|
-
local
|
|
33
|
+
local _result = parent
|
|
34
|
+
if _result ~= nil then
|
|
35
|
+
_result = _result.ZIndex
|
|
36
|
+
end
|
|
37
|
+
local _condition_1 = _result
|
|
38
38
|
if _condition_1 == nil then
|
|
39
39
|
_condition_1 = defaultZIndex
|
|
40
40
|
end
|
|
41
41
|
setZIndex(_condition_1 - 1)
|
|
42
42
|
parent.ClipsDescendants = false
|
|
43
|
-
local sync = function()
|
|
44
|
-
setBlobSize(UDim2.fromOffset(parent.AbsoluteSize.X, parent.AbsoluteSize.Y))
|
|
45
|
-
end
|
|
46
|
-
sync()
|
|
47
|
-
local conn = parent:GetPropertyChangedSignal("AbsoluteSize"):Connect(sync)
|
|
48
|
-
return function()
|
|
49
|
-
return conn:Disconnect()
|
|
50
|
-
end
|
|
51
43
|
end, { parent })
|
|
52
44
|
local _attributes = {
|
|
53
|
-
|
|
45
|
+
key = "Shadow",
|
|
54
46
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_condition_1 = "Shadow"
|
|
47
|
+
for _k, _v in container do
|
|
48
|
+
_attributes[_k] = _v
|
|
58
49
|
end
|
|
59
|
-
_attributes.key = _condition_1
|
|
60
|
-
_attributes.hostRef = ref
|
|
61
|
-
_attributes.base = container
|
|
62
|
-
_attributes.className = className
|
|
63
|
-
_attributes.sx = sx
|
|
64
50
|
_attributes.ZIndex = zIndex
|
|
65
51
|
_attributes.Event = {
|
|
66
52
|
AncestryChanged = function(rbx, parent)
|
|
@@ -69,18 +55,10 @@ local function Shadow(props)
|
|
|
69
55
|
end
|
|
70
56
|
end,
|
|
71
57
|
}
|
|
72
|
-
|
|
73
|
-
key = "Blob",
|
|
74
|
-
}
|
|
75
|
-
for _k, _v in blob do
|
|
76
|
-
_attributes_1[_k] = _v
|
|
77
|
-
end
|
|
78
|
-
_attributes_1.Size = blobSize
|
|
79
|
-
_attributes_1.ZIndex = zIndex
|
|
80
|
-
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, cornerRadius ~= nil and React.createElement("uicorner", {
|
|
58
|
+
return React.createElement("frame", _attributes, cornerRadius ~= nil and React.createElement("uicorner", {
|
|
81
59
|
key = "Corner",
|
|
82
60
|
CornerRadius = cornerRadius,
|
|
83
|
-
}))
|
|
61
|
+
}))
|
|
84
62
|
end
|
|
85
63
|
local default = Shadow
|
|
86
64
|
return {
|
|
@@ -6,16 +6,11 @@ local componentStyles = _theme.componentStyles
|
|
|
6
6
|
local useShadowStyles = componentStyles("Shadow", function(theme)
|
|
7
7
|
return createStyles({
|
|
8
8
|
container = {
|
|
9
|
-
Size = UDim2.
|
|
10
|
-
BackgroundTransparency = 1,
|
|
11
|
-
BorderSizePixel = 0,
|
|
12
|
-
ZIndex = -100,
|
|
13
|
-
},
|
|
14
|
-
blob = {
|
|
9
|
+
Size = UDim2.new(1, theme.spacing.calc(0.25), 1, theme.spacing.calc(0.25)),
|
|
15
10
|
BackgroundColor3 = theme.palette.shadow,
|
|
16
11
|
BackgroundTransparency = 0.8,
|
|
17
12
|
BorderSizePixel = 0,
|
|
18
|
-
|
|
13
|
+
ZIndex = -100,
|
|
19
14
|
},
|
|
20
15
|
})
|
|
21
16
|
end)
|
|
@@ -1,7 +1,6 @@
|
|
|
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
|
|
5
4
|
local useSidebarStyles = TS.import(script, script.Parent, "Sidebar.styles").default
|
|
6
5
|
local function Sidebar(props)
|
|
7
6
|
local _binding = props
|
|
@@ -13,25 +12,33 @@ local function Sidebar(props)
|
|
|
13
12
|
local _binding_1 = useSidebarStyles(props)
|
|
14
13
|
local root = _binding_1.root
|
|
15
14
|
local container = _binding_1.container
|
|
16
|
-
local _attributes = {
|
|
17
|
-
tag = "frame",
|
|
18
|
-
}
|
|
15
|
+
local _attributes = {}
|
|
19
16
|
local _condition = id
|
|
20
17
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
21
18
|
_condition = "Sidebar"
|
|
22
19
|
end
|
|
23
20
|
_attributes.key = _condition
|
|
24
|
-
_attributes.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
_attributes.ref = ref
|
|
22
|
+
for _k, _v in root do
|
|
23
|
+
_attributes[_k] = _v
|
|
24
|
+
end
|
|
25
|
+
if className ~= 0 and className == className and className ~= "" and className then
|
|
26
|
+
for _k, _v in className do
|
|
27
|
+
_attributes[_k] = _v
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
if sx ~= 0 and sx == sx and sx ~= "" and sx then
|
|
31
|
+
for _k, _v in sx do
|
|
32
|
+
_attributes[_k] = _v
|
|
33
|
+
end
|
|
34
|
+
end
|
|
28
35
|
local _attributes_1 = {
|
|
29
36
|
key = "Container",
|
|
30
37
|
}
|
|
31
38
|
for _k, _v in container do
|
|
32
39
|
_attributes_1[_k] = _v
|
|
33
40
|
end
|
|
34
|
-
return React.createElement(
|
|
41
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, children))
|
|
35
42
|
end
|
|
36
43
|
local default = Sidebar
|
|
37
44
|
return {
|
|
@@ -5,7 +5,6 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
8
|
local loopProperty = TS.import(script, script.Parent.Parent.Parent, "motion").loopProperty
|
|
10
9
|
local useSkeletonStyles = TS.import(script, script.Parent, "Skeleton.styles").default
|
|
11
10
|
local _skeletonMotion = TS.import(script, script.Parent, "skeletonMotion")
|
|
@@ -57,21 +56,25 @@ local function SkeletonBlock(props)
|
|
|
57
56
|
end, { motion })
|
|
58
57
|
local corner = if variant == "circular" then circular elseif variant == "rectangular" then nil else rounded
|
|
59
58
|
local side = if variant == "circular" then width else nil
|
|
60
|
-
local _attributes = {
|
|
61
|
-
tag = "frame",
|
|
62
|
-
}
|
|
59
|
+
local _attributes = {}
|
|
63
60
|
local _condition = id
|
|
64
61
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
65
62
|
_condition = "Skeleton"
|
|
66
63
|
end
|
|
67
64
|
_attributes.key = _condition
|
|
68
|
-
_attributes.
|
|
69
|
-
_attributes.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
_attributes.ref = ref
|
|
66
|
+
_attributes.BackgroundTransparency = 1
|
|
67
|
+
_attributes.BorderSizePixel = 0
|
|
68
|
+
if className then
|
|
69
|
+
for _k, _v in className do
|
|
70
|
+
_attributes[_k] = _v
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
if sx then
|
|
74
|
+
for _k, _v in sx do
|
|
75
|
+
_attributes[_k] = _v
|
|
76
|
+
end
|
|
77
|
+
end
|
|
75
78
|
local _condition_1 = side
|
|
76
79
|
if _condition_1 == nil then
|
|
77
80
|
_condition_1 = width
|
|
@@ -104,7 +107,7 @@ local function SkeletonBlock(props)
|
|
|
104
107
|
setmetatable(_attributes_2, nil)
|
|
105
108
|
_condition_4 = React.createElement("uicorner", _attributes_2)
|
|
106
109
|
end
|
|
107
|
-
return React.createElement(
|
|
110
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _condition_3, _condition_4))
|
|
108
111
|
end
|
|
109
112
|
local function Skeleton(props)
|
|
110
113
|
local _binding = props
|
|
@@ -167,17 +170,23 @@ local function Skeleton(props)
|
|
|
167
170
|
end
|
|
168
171
|
end
|
|
169
172
|
local blockHeight = height * count + gap * (count - 1)
|
|
170
|
-
local _attributes = {
|
|
171
|
-
tag = "frame",
|
|
172
|
-
}
|
|
173
|
+
local _attributes = {}
|
|
173
174
|
local _condition = id
|
|
174
175
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
175
176
|
_condition = "Skeleton"
|
|
176
177
|
end
|
|
177
178
|
_attributes.key = _condition
|
|
178
|
-
_attributes.
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
_attributes.ref = ref
|
|
180
|
+
if className then
|
|
181
|
+
for _k, _v in className do
|
|
182
|
+
_attributes[_k] = _v
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
if sx then
|
|
186
|
+
for _k, _v in sx do
|
|
187
|
+
_attributes[_k] = _v
|
|
188
|
+
end
|
|
189
|
+
end
|
|
181
190
|
_attributes.Size = UDim2.new(0, width, 0, blockHeight)
|
|
182
191
|
_attributes.BackgroundTransparency = 1
|
|
183
192
|
_attributes.BorderSizePixel = 0
|
|
@@ -201,7 +210,7 @@ local function Skeleton(props)
|
|
|
201
210
|
_newValue[_k] = _callback(_v, _k - 1, rows)
|
|
202
211
|
end
|
|
203
212
|
-- ▲ ReadonlyArray.map ▲
|
|
204
|
-
return React.createElement(
|
|
213
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
205
214
|
end
|
|
206
215
|
local function SkeletonText(props)
|
|
207
216
|
local _attributes = table.clone(props)
|
|
@@ -3,20 +3,16 @@ 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 skeletonTone = TS.import(script, script.Parent, "skeletonTone").skeletonTone
|
|
7
6
|
local useSkeletonStyles = componentStyles("Skeleton", function(theme)
|
|
8
|
-
local _binding = skeletonTone(theme)
|
|
9
|
-
local bone = _binding.bone
|
|
10
|
-
local shine = _binding.shine
|
|
11
7
|
return createStyles({
|
|
12
8
|
block = {
|
|
13
|
-
BackgroundColor3 =
|
|
9
|
+
BackgroundColor3 = theme.palette.divider,
|
|
14
10
|
BackgroundTransparency = 0,
|
|
15
11
|
BorderSizePixel = 0,
|
|
16
12
|
},
|
|
17
13
|
highlight = {
|
|
18
|
-
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0,
|
|
19
|
-
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.
|
|
14
|
+
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, theme.palette.divider), ColorSequenceKeypoint.new(0.5, theme.palette.text.secondary), ColorSequenceKeypoint.new(1, theme.palette.divider) }),
|
|
15
|
+
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.25), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(1, 0.25) }),
|
|
20
16
|
},
|
|
21
17
|
rounded = {
|
|
22
18
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
|
-
import { SliderColor } from "./Slider.styles";
|
|
3
2
|
export interface SliderProps {
|
|
4
3
|
value: number;
|
|
5
4
|
onChange: (value: number) => void;
|
|
@@ -9,8 +8,6 @@ export interface SliderProps {
|
|
|
9
8
|
step?: number;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
size?: ControlSize;
|
|
12
|
-
marks?: boolean | ReadonlyArray<number>;
|
|
13
|
-
color?: SliderColor;
|
|
14
11
|
}
|
|
15
12
|
declare function Slider(props: CustomizedProps<Frame, SliderProps>): JSX.Element;
|
|
16
13
|
export default Slider;
|
|
@@ -6,10 +6,8 @@ local useRef = _react.useRef
|
|
|
6
6
|
local useState = _react.useState
|
|
7
7
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
8
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
9
|
local commitNumber = TS.import(script, script.Parent.Parent.Parent, "numberInput", "components", "numberValue").commitNumber
|
|
11
10
|
local useSliderStyles = TS.import(script, script.Parent, "Slider.styles").default
|
|
12
|
-
local sliderMarkValues = TS.import(script, script.Parent, "sliderMarks").sliderMarkValues
|
|
13
11
|
local _sliderNudge = TS.import(script, script.Parent, "sliderNudge")
|
|
14
12
|
local isSliderDrag = _sliderNudge.isSliderDrag
|
|
15
13
|
local isSliderMove = _sliderNudge.isSliderMove
|
|
@@ -25,18 +23,12 @@ local function Slider(props)
|
|
|
25
23
|
local step = _binding.step
|
|
26
24
|
local disabled = _binding.disabled
|
|
27
25
|
local size = _binding.size
|
|
28
|
-
local marks = _binding.marks
|
|
29
|
-
local color = _binding.color
|
|
30
|
-
if color == nil then
|
|
31
|
-
color = "primary"
|
|
32
|
-
end
|
|
33
26
|
local className = _binding.className
|
|
34
27
|
local sx = _binding.sx
|
|
35
28
|
local id = _binding.id
|
|
36
29
|
local ref = _binding.ref
|
|
37
30
|
local _binding_1 = useSliderStyles({
|
|
38
31
|
size = size,
|
|
39
|
-
color = color,
|
|
40
32
|
})
|
|
41
33
|
local root = _binding_1.root
|
|
42
34
|
local track = _binding_1.track
|
|
@@ -44,7 +36,6 @@ local function Slider(props)
|
|
|
44
36
|
local knob = _binding_1.knob
|
|
45
37
|
local corner = _binding_1.corner
|
|
46
38
|
local stroke = _binding_1.stroke
|
|
47
|
-
local mark = _binding_1.mark
|
|
48
39
|
local active = canActivate(disabled)
|
|
49
40
|
local focused, setFocused = useState(false)
|
|
50
41
|
local hovering, setHovering = useState(false)
|
|
@@ -54,8 +45,6 @@ local function Slider(props)
|
|
|
54
45
|
local ratio = if max > min then (math.clamp(value, min, max) - min) / (max - min) else 0
|
|
55
46
|
local faded = disabled == true
|
|
56
47
|
local showFocus = focused and active
|
|
57
|
-
local markValues = sliderMarkValues(min, max, step, marks)
|
|
58
|
-
local span = max - min
|
|
59
48
|
local update = function(rbx, x)
|
|
60
49
|
local width = rbx.AbsoluteSize.X
|
|
61
50
|
if width <= 0 then
|
|
@@ -92,24 +81,26 @@ local function Slider(props)
|
|
|
92
81
|
onCommit(nudged)
|
|
93
82
|
end
|
|
94
83
|
end
|
|
95
|
-
local _attributes = {
|
|
96
|
-
tag = "frame",
|
|
97
|
-
}
|
|
84
|
+
local _attributes = {}
|
|
98
85
|
local _condition = id
|
|
99
86
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
100
87
|
_condition = "Slider"
|
|
101
88
|
end
|
|
102
89
|
_attributes.key = _condition
|
|
103
|
-
_attributes.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
90
|
+
_attributes.ref = ref
|
|
91
|
+
for _k, _v in root do
|
|
92
|
+
_attributes[_k] = _v
|
|
93
|
+
end
|
|
94
|
+
if className then
|
|
95
|
+
for _k, _v in className do
|
|
96
|
+
_attributes[_k] = _v
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
if sx then
|
|
100
|
+
for _k, _v in sx do
|
|
101
|
+
_attributes[_k] = _v
|
|
102
|
+
end
|
|
103
|
+
end
|
|
113
104
|
_attributes.Active = active
|
|
114
105
|
_attributes.Selectable = active
|
|
115
106
|
_attributes.BackgroundTransparency = if showFocus then 0.85 else 1
|
|
@@ -136,7 +127,7 @@ local function Slider(props)
|
|
|
136
127
|
update(rbx, input.Position.X)
|
|
137
128
|
end
|
|
138
129
|
end,
|
|
139
|
-
InputEnded = function(
|
|
130
|
+
InputEnded = function(_, input)
|
|
140
131
|
if isSliderDrag(input.UserInputType.Name) then
|
|
141
132
|
finish()
|
|
142
133
|
end
|
|
@@ -174,25 +165,6 @@ local function Slider(props)
|
|
|
174
165
|
setmetatable(_attributes_3, nil)
|
|
175
166
|
_condition_1 = React.createElement("uistroke", _attributes_3)
|
|
176
167
|
end
|
|
177
|
-
-- ▼ ReadonlyArray.map ▼
|
|
178
|
-
local _newValue = table.create(#markValues)
|
|
179
|
-
local _callback = function(markValue, index)
|
|
180
|
-
local markRatio = if span > 0 then (markValue - min) / span else 0
|
|
181
|
-
local _attributes_3 = {
|
|
182
|
-
key = `Mark-{index}`,
|
|
183
|
-
}
|
|
184
|
-
for _k, _v in mark do
|
|
185
|
-
_attributes_3[_k] = _v
|
|
186
|
-
end
|
|
187
|
-
_attributes_3.Position = UDim2.fromScale(markRatio, 0.5)
|
|
188
|
-
_attributes_3.BackgroundTransparency = if faded then 0.7 else 0.35
|
|
189
|
-
return React.createElement("frame", _attributes_3)
|
|
190
|
-
end
|
|
191
|
-
for _k, _v in markValues do
|
|
192
|
-
_newValue[_k] = _callback(_v, _k - 1, markValues)
|
|
193
|
-
end
|
|
194
|
-
-- ▲ ReadonlyArray.map ▲
|
|
195
|
-
local _exp_1 = React.createElement(React.Fragment, nil, _newValue)
|
|
196
168
|
local _attributes_3 = {
|
|
197
169
|
key = "Fill",
|
|
198
170
|
}
|
|
@@ -204,7 +176,7 @@ local function Slider(props)
|
|
|
204
176
|
_attributes_3.Size = UDim2.fromScale(ratio, 1)
|
|
205
177
|
local _attributes_4 = table.clone(corner)
|
|
206
178
|
setmetatable(_attributes_4, nil)
|
|
207
|
-
local
|
|
179
|
+
local _exp_1 = React.createElement("frame", _attributes_3, React.createElement("uicorner", _attributes_4))
|
|
208
180
|
local _attributes_5 = {
|
|
209
181
|
key = "Knob",
|
|
210
182
|
}
|
|
@@ -216,7 +188,7 @@ local function Slider(props)
|
|
|
216
188
|
_attributes_5.Position = UDim2.fromScale(ratio, 0.5)
|
|
217
189
|
local _attributes_6 = table.clone(corner)
|
|
218
190
|
setmetatable(_attributes_6, nil)
|
|
219
|
-
local
|
|
191
|
+
local _exp_2 = React.createElement("uicorner", _attributes_6)
|
|
220
192
|
local _condition_2 = showFocus
|
|
221
193
|
if _condition_2 then
|
|
222
194
|
local _attributes_7 = table.clone(stroke)
|
|
@@ -224,7 +196,7 @@ local function Slider(props)
|
|
|
224
196
|
_attributes_7.Thickness = 1
|
|
225
197
|
_condition_2 = React.createElement("uistroke", _attributes_7)
|
|
226
198
|
end
|
|
227
|
-
return React.createElement(
|
|
199
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _condition_1, _exp_1, React.createElement("frame", _attributes_5, _exp_2, _condition_2)))
|
|
228
200
|
end
|
|
229
201
|
local default = Slider
|
|
230
202
|
return {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ControlSize } from "../../../../theme/index";
|
|
2
|
-
export type SliderColor = "primary" | "accent";
|
|
3
2
|
export interface SliderStyleProps {
|
|
4
3
|
size?: ControlSize;
|
|
5
|
-
color?: SliderColor;
|
|
6
4
|
}
|
|
7
5
|
declare const useSliderStyles: (props: SliderStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
8
6
|
export default useSliderStyles;
|
|
@@ -6,12 +6,7 @@ local createStyles = _theme.createStyles
|
|
|
6
6
|
local componentStyles = _theme.componentStyles
|
|
7
7
|
local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
8
8
|
local size = _param.size
|
|
9
|
-
local color = _param.color
|
|
10
|
-
if color == nil then
|
|
11
|
-
color = "primary"
|
|
12
|
-
end
|
|
13
9
|
local metrics = controlMetrics(theme.density, size)
|
|
14
|
-
local tone = if color == "accent" then theme.palette.accent.main else theme.palette.primary.main
|
|
15
10
|
return createStyles({
|
|
16
11
|
root = {
|
|
17
12
|
Size = UDim2.new(1, 0, 0, metrics.sliderHeight),
|
|
@@ -26,7 +21,7 @@ local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
|
26
21
|
BorderSizePixel = 0,
|
|
27
22
|
},
|
|
28
23
|
fill = {
|
|
29
|
-
BackgroundColor3 =
|
|
24
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
30
25
|
BorderSizePixel = 0,
|
|
31
26
|
},
|
|
32
27
|
knob = {
|
|
@@ -44,14 +39,6 @@ local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
|
44
39
|
Thickness = 2,
|
|
45
40
|
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
46
41
|
},
|
|
47
|
-
mark = {
|
|
48
|
-
Size = UDim2.new(0, 2, 0, metrics.sliderTrack + 4),
|
|
49
|
-
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
50
|
-
BackgroundColor3 = theme.palette.text.secondary,
|
|
51
|
-
BackgroundTransparency = 0.35,
|
|
52
|
-
BorderSizePixel = 0,
|
|
53
|
-
ZIndex = 1,
|
|
54
|
-
},
|
|
55
42
|
})
|
|
56
43
|
end)
|
|
57
44
|
local default = useSliderStyles
|
|
@@ -6,8 +6,6 @@ export interface SnackbarProps {
|
|
|
6
6
|
duration?: number;
|
|
7
7
|
variant?: ToastVariants;
|
|
8
8
|
open?: boolean;
|
|
9
|
-
action?: string;
|
|
10
|
-
onAction?: () => void;
|
|
11
9
|
}
|
|
12
10
|
declare function Snackbar(props: CustomizedProps<Frame, SnackbarProps>): JSX.Element | undefined;
|
|
13
11
|
export default Snackbar;
|