@rbxts/uiblox 0.2.0-alpha.35 → 0.2.0-alpha.4
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/autocomplete/components/Autocomplete.luau +0 -8
- 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 -6
- package/out/ui/packages/chip/components/Chip.luau +17 -61
- package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -6
- package/out/ui/packages/chip/components/Chip.styles.luau +9 -54
- 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/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 -7
- package/out/ui/packages/init.luau +0 -21
- 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/index.d.ts +0 -14
- package/out/ui/packages/layout/init.luau +0 -5
- 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 -7
- package/out/ui/packages/menu/components/Menu.luau +26 -68
- package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
- 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.d.ts +0 -5
- package/out/ui/packages/select/components/Select.luau +77 -61
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- 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/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 +929 -843
- 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/VirtualList.luau +16 -9
- package/out/ui/packages/virtualList/index.d.ts +0 -2
- package/out/ui/packages/virtualList/init.luau +0 -1
- 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/formText/components/FormHelperText.d.ts +0 -8
- package/out/ui/packages/formText/components/FormHelperText.luau +0 -40
- package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
- package/out/ui/packages/formText/components/FormLabel.luau +0 -42
- package/out/ui/packages/formText/components/FormText.styles.d.ts +0 -5
- package/out/ui/packages/formText/components/FormText.styles.luau +0 -33
- package/out/ui/packages/formText/index.d.ts +0 -4
- package/out/ui/packages/formText/init.luau +0 -6
- 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/Stack.d.ts +0 -14
- package/out/ui/packages/layout/components/Stack.luau +0 -44
- package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -10
- package/out/ui/packages/layout/components/Stack.styles.luau +0 -101
- 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/layout/components/stackAlign.d.ts +0 -10
- package/out/ui/packages/layout/components/stackAlign.luau +0 -43
- 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/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/speedDial/components/SpeedDial.d.ts +0 -19
- package/out/ui/packages/speedDial/components/SpeedDial.luau +0 -97
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +0 -5
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +0 -31
- package/out/ui/packages/speedDial/index.d.ts +0 -3
- package/out/ui/packages/speedDial/init.luau +0 -5
- 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
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +0 -7
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -43
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +0 -26
|
@@ -1,106 +1,23 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local function pageRange(count
|
|
3
|
-
|
|
4
|
-
page = 1
|
|
5
|
-
end
|
|
6
|
-
if siblingCount == nil then
|
|
7
|
-
siblingCount = 1
|
|
8
|
-
end
|
|
9
|
-
if boundaryCount == nil then
|
|
10
|
-
boundaryCount = 1
|
|
11
|
-
end
|
|
12
|
-
local total = math.max(0, math.floor(count))
|
|
13
|
-
if total == 0 then
|
|
14
|
-
return {}
|
|
15
|
-
end
|
|
16
|
-
local current = math.clamp(math.floor(page), 1, total)
|
|
17
|
-
local siblings = math.max(0, math.floor(siblingCount))
|
|
18
|
-
local boundaries = math.max(0, math.floor(boundaryCount))
|
|
19
|
-
local rangeLength = boundaries * 2 + siblings * 2 + 3
|
|
20
|
-
if total <= rangeLength then
|
|
21
|
-
local all = {}
|
|
22
|
-
do
|
|
23
|
-
local i = 1
|
|
24
|
-
local _shouldIncrement = false
|
|
25
|
-
while true do
|
|
26
|
-
if _shouldIncrement then
|
|
27
|
-
i += 1
|
|
28
|
-
else
|
|
29
|
-
_shouldIncrement = true
|
|
30
|
-
end
|
|
31
|
-
if not (i <= total) then
|
|
32
|
-
break
|
|
33
|
-
end
|
|
34
|
-
local _i = i
|
|
35
|
-
table.insert(all, _i)
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
return all
|
|
39
|
-
end
|
|
40
|
-
local startFrom = math.max(current - siblings, boundaries + 2)
|
|
41
|
-
local endAt = math.min(current + siblings, total - (boundaries + 1))
|
|
42
|
-
local tokens = {}
|
|
43
|
-
do
|
|
44
|
-
local i = 1
|
|
45
|
-
local _shouldIncrement = false
|
|
46
|
-
while true do
|
|
47
|
-
if _shouldIncrement then
|
|
48
|
-
i += 1
|
|
49
|
-
else
|
|
50
|
-
_shouldIncrement = true
|
|
51
|
-
end
|
|
52
|
-
if not (i <= boundaries) then
|
|
53
|
-
break
|
|
54
|
-
end
|
|
55
|
-
local _i = i
|
|
56
|
-
table.insert(tokens, _i)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
if startFrom > boundaries + 2 then
|
|
60
|
-
table.insert(tokens, "ellipsis")
|
|
61
|
-
elseif boundaries + 1 < startFrom then
|
|
62
|
-
local _arg0 = boundaries + 1
|
|
63
|
-
table.insert(tokens, _arg0)
|
|
64
|
-
end
|
|
65
|
-
do
|
|
66
|
-
local i = startFrom
|
|
67
|
-
local _shouldIncrement = false
|
|
68
|
-
while true do
|
|
69
|
-
if _shouldIncrement then
|
|
70
|
-
i += 1
|
|
71
|
-
else
|
|
72
|
-
_shouldIncrement = true
|
|
73
|
-
end
|
|
74
|
-
if not (i <= endAt) then
|
|
75
|
-
break
|
|
76
|
-
end
|
|
77
|
-
local _i = i
|
|
78
|
-
table.insert(tokens, _i)
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
if endAt < total - (boundaries + 1) then
|
|
82
|
-
table.insert(tokens, "ellipsis")
|
|
83
|
-
elseif endAt + 1 < total - boundaries + 1 then
|
|
84
|
-
local _arg0 = endAt + 1
|
|
85
|
-
table.insert(tokens, _arg0)
|
|
86
|
-
end
|
|
2
|
+
local function pageRange(count)
|
|
3
|
+
local pages = {}
|
|
87
4
|
do
|
|
88
|
-
local
|
|
5
|
+
local page = 1
|
|
89
6
|
local _shouldIncrement = false
|
|
90
7
|
while true do
|
|
91
8
|
if _shouldIncrement then
|
|
92
|
-
|
|
9
|
+
page += 1
|
|
93
10
|
else
|
|
94
11
|
_shouldIncrement = true
|
|
95
12
|
end
|
|
96
|
-
if not (
|
|
13
|
+
if not (page <= math.max(0, math.floor(count))) then
|
|
97
14
|
break
|
|
98
15
|
end
|
|
99
|
-
local
|
|
100
|
-
table.insert(
|
|
16
|
+
local _page = page
|
|
17
|
+
table.insert(pages, _page)
|
|
101
18
|
end
|
|
102
19
|
end
|
|
103
|
-
return
|
|
20
|
+
return pages
|
|
104
21
|
end
|
|
105
22
|
return {
|
|
106
23
|
pageRange = pageRange,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
|
|
3
|
-
export type PaperElevation = "flat" | "raised" | "outlined";
|
|
2
|
+
export type PaperElevation = "flat" | "raised";
|
|
4
3
|
export interface PaperProps {
|
|
5
4
|
elevation?: PaperElevation;
|
|
6
|
-
square?: boolean;
|
|
7
5
|
children?: React.ReactNode;
|
|
8
6
|
}
|
|
9
|
-
declare function Paper(props:
|
|
7
|
+
declare function Paper(props: PaperProps): JSX.Element;
|
|
10
8
|
export default Paper;
|
|
@@ -1,8 +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
|
-
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
6
4
|
local usePaperStyles = TS.import(script, script.Parent, "Paper.styles").default
|
|
7
5
|
local function Paper(props)
|
|
8
6
|
local _binding = props
|
|
@@ -10,42 +8,22 @@ local function Paper(props)
|
|
|
10
8
|
if elevation == nil then
|
|
11
9
|
elevation = "flat"
|
|
12
10
|
end
|
|
13
|
-
local square = _binding.square
|
|
14
11
|
local children = _binding.children
|
|
15
|
-
local className = _binding.className
|
|
16
|
-
local sx = _binding.sx
|
|
17
|
-
local id = _binding.id
|
|
18
|
-
local ref = _binding.ref
|
|
19
12
|
local styles = usePaperStyles({
|
|
20
13
|
elevation = elevation,
|
|
21
14
|
})
|
|
22
|
-
local _attributes = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
local _attributes = {
|
|
16
|
+
key = "Paper",
|
|
17
|
+
}
|
|
18
|
+
for _k, _v in styles.root do
|
|
19
|
+
_attributes[_k] = _v
|
|
26
20
|
end
|
|
27
|
-
_attributes.key = _condition
|
|
28
|
-
_attributes.hostRef = ref
|
|
29
|
-
_attributes.base = styles.root
|
|
30
|
-
_attributes.className = className
|
|
31
|
-
_attributes.sx = sx
|
|
32
|
-
local _exp = elevation == "raised" and React.createElement(Shadow)
|
|
33
21
|
local _attributes_1 = table.clone(styles.padding)
|
|
34
22
|
setmetatable(_attributes_1, nil)
|
|
35
|
-
local
|
|
36
|
-
local
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
setmetatable(_attributes_2, nil)
|
|
40
|
-
_condition_1 = React.createElement("uicorner", _attributes_2)
|
|
41
|
-
end
|
|
42
|
-
local _condition_2 = elevation == "outlined"
|
|
43
|
-
if _condition_2 then
|
|
44
|
-
local _attributes_2 = table.clone(styles.stroke)
|
|
45
|
-
setmetatable(_attributes_2, nil)
|
|
46
|
-
_condition_2 = React.createElement("uistroke", _attributes_2)
|
|
47
|
-
end
|
|
48
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1, _condition_1, _condition_2, children)
|
|
23
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
24
|
+
local _attributes_2 = table.clone(styles.corner)
|
|
25
|
+
setmetatable(_attributes_2, nil)
|
|
26
|
+
return React.createElement("frame", _attributes, _exp, React.createElement("uicorner", _attributes_2), children)
|
|
49
27
|
end
|
|
50
28
|
local default = Paper
|
|
51
29
|
return {
|
|
@@ -15,12 +15,6 @@ local usePaperStyles = componentStyles("Paper", function(theme, _param)
|
|
|
15
15
|
BackgroundColor3 = if elevation == "raised" then theme.palette.surface.elevated else theme.palette.surface.paper,
|
|
16
16
|
BorderSizePixel = 0,
|
|
17
17
|
},
|
|
18
|
-
stroke = {
|
|
19
|
-
Color = theme.palette.border,
|
|
20
|
-
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
21
|
-
Thickness = 1,
|
|
22
|
-
Transparency = 0,
|
|
23
|
-
},
|
|
24
18
|
padding = {
|
|
25
19
|
PaddingTop = UDim.new(0, theme.padding.calc(2)),
|
|
26
20
|
PaddingBottom = UDim.new(0, theme.padding.calc(2)),
|
|
@@ -1,13 +1,11 @@
|
|
|
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 NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
6
5
|
local usePhysicalPropertiesEditorStyles = TS.import(script, script.Parent, "PhysicalPropertiesEditor.styles").default
|
|
7
6
|
local _physicalParts = TS.import(script, script.Parent, "physicalParts")
|
|
8
7
|
local patchPhysicalParts = _physicalParts.patchPhysicalParts
|
|
9
|
-
local
|
|
10
|
-
local physicalRows = _physicalParts.physicalRows
|
|
8
|
+
local physicalFields = _physicalParts.physicalFields
|
|
11
9
|
local function PhysicalPropertiesEditor(props)
|
|
12
10
|
local _binding = props
|
|
13
11
|
local value = _binding.value
|
|
@@ -18,91 +16,68 @@ local function PhysicalPropertiesEditor(props)
|
|
|
18
16
|
local id = _binding.id
|
|
19
17
|
local ref = _binding.ref
|
|
20
18
|
local styles = usePhysicalPropertiesEditorStyles()
|
|
21
|
-
local amounts = {
|
|
22
|
-
Density = value.Density,
|
|
23
|
-
Friction = value.Friction,
|
|
24
|
-
Elasticity = value.Elasticity,
|
|
25
|
-
FrictionWeight = value.FrictionWeight,
|
|
26
|
-
ElasticityWeight = value.ElasticityWeight,
|
|
27
|
-
}
|
|
19
|
+
local amounts = { value.Density, value.Friction, value.Elasticity, value.FrictionWeight, value.ElasticityWeight }
|
|
28
20
|
local commit = function(field, amount)
|
|
29
21
|
local parts = patchPhysicalParts(value.Density, value.Friction, value.Elasticity, value.FrictionWeight, value.ElasticityWeight, field, amount)
|
|
30
22
|
onChange(PhysicalProperties.new(parts[1], parts[2], parts[3], parts[4], parts[5]))
|
|
31
23
|
end
|
|
32
|
-
local _attributes = {
|
|
33
|
-
tag = "frame",
|
|
34
|
-
}
|
|
24
|
+
local _attributes = {}
|
|
35
25
|
local _condition = id
|
|
36
26
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
37
27
|
_condition = "PhysicalPropertiesEditor"
|
|
38
28
|
end
|
|
39
29
|
_attributes.key = _condition
|
|
40
|
-
_attributes.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
_attributes.ref = ref
|
|
31
|
+
for _k, _v in styles.root do
|
|
32
|
+
_attributes[_k] = _v
|
|
33
|
+
end
|
|
34
|
+
if className then
|
|
35
|
+
for _k, _v in className do
|
|
36
|
+
_attributes[_k] = _v
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
if sx then
|
|
40
|
+
for _k, _v in sx do
|
|
41
|
+
_attributes[_k] = _v
|
|
42
|
+
end
|
|
43
|
+
end
|
|
47
44
|
local _attributes_1 = table.clone(styles.wrap)
|
|
48
45
|
setmetatable(_attributes_1, nil)
|
|
49
46
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
50
|
-
local _exp_1 =
|
|
47
|
+
local _exp_1 = physicalFields()
|
|
51
48
|
-- ▼ ReadonlyArray.map ▼
|
|
52
49
|
local _newValue = table.create(#_exp_1)
|
|
53
|
-
local _callback = function(
|
|
50
|
+
local _callback = function(field, index)
|
|
54
51
|
local _attributes_2 = {
|
|
55
|
-
key =
|
|
52
|
+
key = field,
|
|
56
53
|
}
|
|
57
|
-
for _k, _v in styles.
|
|
54
|
+
for _k, _v in styles.axis do
|
|
58
55
|
_attributes_2[_k] = _v
|
|
59
56
|
end
|
|
60
|
-
_attributes_2.LayoutOrder =
|
|
61
|
-
local _attributes_3 = table.clone(styles.
|
|
57
|
+
_attributes_2.LayoutOrder = index + 1
|
|
58
|
+
local _attributes_3 = table.clone(styles.row)
|
|
62
59
|
setmetatable(_attributes_3, nil)
|
|
63
60
|
local _exp_2 = React.createElement("uilistlayout", _attributes_3)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
setmetatable(_attributes_6, nil)
|
|
79
|
-
_attributes_6.Text = physicalCaption(field)
|
|
80
|
-
_attributes_6.LayoutOrder = 1
|
|
81
|
-
local _exp_4 = React.createElement("textlabel", _attributes_6)
|
|
82
|
-
local _attributes_7 = table.clone(styles.field)
|
|
83
|
-
setmetatable(_attributes_7, nil)
|
|
84
|
-
_attributes_7.LayoutOrder = 2
|
|
85
|
-
return React.createElement("frame", _attributes_4, _exp_3, _exp_4, React.createElement("frame", _attributes_7, React.createElement(NumberInput, {
|
|
86
|
-
value = amounts[field],
|
|
87
|
-
places = 4,
|
|
88
|
-
disabled = disabled,
|
|
89
|
-
width = UDim.new(1, 0),
|
|
90
|
-
onChange = function(amount)
|
|
91
|
-
return commit(field, amount)
|
|
92
|
-
end,
|
|
93
|
-
})))
|
|
94
|
-
end
|
|
95
|
-
for _k, _v in row do
|
|
96
|
-
_newValue_1[_k] = _callback_1(_v, _k - 1, row)
|
|
97
|
-
end
|
|
98
|
-
-- ▲ ReadonlyArray.map ▲
|
|
99
|
-
return React.createElement("frame", _attributes_2, _exp_2, React.createElement(React.Fragment, nil, _newValue_1))
|
|
61
|
+
local _attributes_4 = table.clone(styles.label)
|
|
62
|
+
setmetatable(_attributes_4, nil)
|
|
63
|
+
_attributes_4.Text = field
|
|
64
|
+
local _exp_3 = React.createElement("textlabel", _attributes_4)
|
|
65
|
+
local _attributes_5 = table.clone(styles.field)
|
|
66
|
+
setmetatable(_attributes_5, nil)
|
|
67
|
+
return React.createElement("frame", _attributes_2, _exp_2, _exp_3, React.createElement("frame", _attributes_5, React.createElement(NumberInput, {
|
|
68
|
+
value = amounts[index + 1],
|
|
69
|
+
disabled = disabled,
|
|
70
|
+
width = UDim.new(1, 0),
|
|
71
|
+
onChange = function(amount)
|
|
72
|
+
return commit(field, amount)
|
|
73
|
+
end,
|
|
74
|
+
})))
|
|
100
75
|
end
|
|
101
76
|
for _k, _v in _exp_1 do
|
|
102
77
|
_newValue[_k] = _callback(_v, _k - 1, _exp_1)
|
|
103
78
|
end
|
|
104
79
|
-- ▲ ReadonlyArray.map ▲
|
|
105
|
-
return React.createElement(
|
|
80
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
106
81
|
end
|
|
107
82
|
local default = PhysicalPropertiesEditor
|
|
108
83
|
return {
|
package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
-
local controlMetrics = _theme.controlMetrics
|
|
5
4
|
local createStyles = _theme.createStyles
|
|
6
5
|
local componentStyles = _theme.componentStyles
|
|
7
6
|
local usePhysicalPropertiesEditorStyles = componentStyles("PhysicalPropertiesEditor", function(theme)
|
|
8
|
-
local gap = theme.padding.calc(1)
|
|
9
7
|
return createStyles({
|
|
10
8
|
root = {
|
|
11
9
|
Size = UDim2.new(1, 0, 0, 0),
|
|
@@ -18,38 +16,26 @@ local usePhysicalPropertiesEditorStyles = componentStyles("PhysicalPropertiesEdi
|
|
|
18
16
|
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
19
17
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
20
18
|
},
|
|
21
|
-
|
|
19
|
+
row = {
|
|
22
20
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
23
|
-
Padding = UDim.new(0,
|
|
21
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
22
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
24
23
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
25
24
|
},
|
|
26
|
-
|
|
27
|
-
Size = UDim2.new(1, 0, 0,
|
|
28
|
-
AutomaticSize = Enum.AutomaticSize.Y,
|
|
29
|
-
BackgroundTransparency = 1,
|
|
30
|
-
},
|
|
31
|
-
cell = {
|
|
32
|
-
Size = UDim2.new(0.5, -gap / 2, 0, 0),
|
|
33
|
-
AutomaticSize = Enum.AutomaticSize.Y,
|
|
25
|
+
axis = {
|
|
26
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
34
27
|
BackgroundTransparency = 1,
|
|
35
28
|
},
|
|
36
|
-
stack = {
|
|
37
|
-
FillDirection = Enum.FillDirection.Vertical,
|
|
38
|
-
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
39
|
-
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
40
|
-
},
|
|
41
29
|
label = {
|
|
42
|
-
Size = UDim2.new(
|
|
43
|
-
AutomaticSize = Enum.AutomaticSize.Y,
|
|
30
|
+
Size = UDim2.new(0, theme.spacing.calc(7), 1, 0),
|
|
44
31
|
BackgroundTransparency = 1,
|
|
45
32
|
Font = theme.typography.fontFamilies.default,
|
|
46
33
|
TextSize = theme.typography.fontSizes.caption,
|
|
47
34
|
TextColor3 = theme.palette.text.secondary,
|
|
48
35
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
49
|
-
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
50
36
|
},
|
|
51
37
|
field = {
|
|
52
|
-
Size = UDim2.new(1,
|
|
38
|
+
Size = UDim2.new(1, -theme.spacing.calc(7), 1, 0),
|
|
53
39
|
BackgroundTransparency = 1,
|
|
54
40
|
},
|
|
55
41
|
})
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export type PhysicalField = "Density" | "Friction" | "Elasticity" | "FrictionWeight" | "ElasticityWeight";
|
|
2
2
|
export declare function physicalFields(): PhysicalField[];
|
|
3
|
-
export declare function physicalCaption(field: PhysicalField): "Density" | "Friction" | "Elasticity" | "Friction wt" | "Elasticity wt";
|
|
4
|
-
export declare function physicalRows(): PhysicalField[][];
|
|
5
3
|
export declare function patchPhysicalParts(density: number, friction: number, elasticity: number, frictionWeight: number, elasticityWeight: number, field: PhysicalField, amount: number): number[];
|
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
local function physicalFields()
|
|
3
3
|
return { "Density", "Friction", "Elasticity", "FrictionWeight", "ElasticityWeight" }
|
|
4
4
|
end
|
|
5
|
-
local function physicalCaption(field)
|
|
6
|
-
if field == "FrictionWeight" then
|
|
7
|
-
return "Friction wt"
|
|
8
|
-
end
|
|
9
|
-
if field == "ElasticityWeight" then
|
|
10
|
-
return "Elasticity wt"
|
|
11
|
-
end
|
|
12
|
-
return field
|
|
13
|
-
end
|
|
14
|
-
local function physicalRows()
|
|
15
|
-
return { { "Density", "Friction" }, { "Elasticity", "FrictionWeight" }, { "ElasticityWeight" } }
|
|
16
|
-
end
|
|
17
5
|
local function patchPhysicalParts(density, friction, elasticity, frictionWeight, elasticityWeight, field, amount)
|
|
18
6
|
local parts = { density, friction, elasticity, frictionWeight, elasticityWeight }
|
|
19
7
|
local index = if field == "Density" then 0 elseif field == "Friction" then 1 elseif field == "Elasticity" then 2 elseif field == "FrictionWeight" then 3 else 4
|
|
@@ -22,7 +10,5 @@ local function patchPhysicalParts(density, friction, elasticity, frictionWeight,
|
|
|
22
10
|
end
|
|
23
11
|
return {
|
|
24
12
|
physicalFields = physicalFields,
|
|
25
|
-
physicalCaption = physicalCaption,
|
|
26
|
-
physicalRows = physicalRows,
|
|
27
13
|
patchPhysicalParts = patchPhysicalParts,
|
|
28
14
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
import { CustomizedProps } from "../../../../theme/index";
|
|
3
2
|
export interface PopupProps {
|
|
4
3
|
anchor?: GuiObject;
|
|
5
4
|
/** Content height. Flips above the anchor and caps the shell. */
|
|
@@ -10,5 +9,5 @@ export interface PopupProps {
|
|
|
10
9
|
onInput?: (input: InputObject) => void;
|
|
11
10
|
children?: React.ReactNode;
|
|
12
11
|
}
|
|
13
|
-
declare function Popup(props:
|
|
12
|
+
declare function Popup(props: PopupProps): JSX.Element | undefined;
|
|
14
13
|
export default Popup;
|
|
@@ -5,7 +5,6 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useState = _react.useState
|
|
8
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
8
|
local popupPlacement = TS.import(script, script.Parent, "placement").popupPlacement
|
|
10
9
|
local Portal = TS.import(script, script.Parent, "Portal").default
|
|
11
10
|
local portalTarget = TS.import(script, script.Parent, "portalTarget").portalTarget
|
|
@@ -17,10 +16,6 @@ local function Popup(props)
|
|
|
17
16
|
local onDismiss = _binding.onDismiss
|
|
18
17
|
local onInput = _binding.onInput
|
|
19
18
|
local children = _binding.children
|
|
20
|
-
local className = _binding.className
|
|
21
|
-
local sx = _binding.sx
|
|
22
|
-
local id = _binding.id
|
|
23
|
-
local ref = _binding.ref
|
|
24
19
|
local dismiss = useRef(onDismiss)
|
|
25
20
|
dismiss.current = onDismiss
|
|
26
21
|
local _, bump = useState(0)
|
|
@@ -93,7 +88,14 @@ local function Popup(props)
|
|
|
93
88
|
end
|
|
94
89
|
local place = popupPlacement(_exp, _exp_1, _exp_2, _exp_3, _exp_4, _exp_5, _exp_6, _exp_7, _condition, _condition_1)
|
|
95
90
|
local capped = place.height > 0
|
|
96
|
-
|
|
91
|
+
return React.createElement(Portal, {
|
|
92
|
+
host = layer,
|
|
93
|
+
}, React.createElement("frame", {
|
|
94
|
+
key = "Popup",
|
|
95
|
+
Size = UDim2.fromScale(1, 1),
|
|
96
|
+
BackgroundTransparency = 1,
|
|
97
|
+
ZIndex = 20000,
|
|
98
|
+
}, onDismiss and (React.createElement("textbutton", {
|
|
97
99
|
key = "Backdrop",
|
|
98
100
|
Size = UDim2.fromScale(1, 1),
|
|
99
101
|
BackgroundTransparency = 1,
|
|
@@ -111,36 +113,17 @@ local function Popup(props)
|
|
|
111
113
|
return _result
|
|
112
114
|
end,
|
|
113
115
|
},
|
|
114
|
-
}))
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
end
|
|
122
|
-
_attributes.key = _condition_2
|
|
123
|
-
_attributes.hostRef = ref
|
|
124
|
-
_attributes.base = {
|
|
116
|
+
})), React.createElement("frame", {
|
|
117
|
+
key = "Content",
|
|
118
|
+
Position = UDim2.fromOffset(place.x, place.y),
|
|
119
|
+
AnchorPoint = Vector2.new(0, if place.above then 1 else 0),
|
|
120
|
+
Size = if capped then UDim2.fromOffset(place.width, place.height) else UDim2.fromOffset(place.width, 0),
|
|
121
|
+
AutomaticSize = if capped then Enum.AutomaticSize.None else Enum.AutomaticSize.Y,
|
|
122
|
+
ClipsDescendants = capped,
|
|
125
123
|
BackgroundTransparency = 1,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
_attributes.Position = UDim2.fromOffset(place.x, place.y)
|
|
130
|
-
_attributes.AnchorPoint = Vector2.new(0, if place.above then 1 else 0)
|
|
131
|
-
_attributes.Size = if capped then UDim2.fromOffset(place.width, place.height) else UDim2.fromOffset(place.width, 0)
|
|
132
|
-
_attributes.AutomaticSize = if capped then Enum.AutomaticSize.None else Enum.AutomaticSize.Y
|
|
133
|
-
_attributes.ClipsDescendants = capped
|
|
134
|
-
_attributes.Active = false
|
|
135
|
-
_attributes.ZIndex = 20001
|
|
136
|
-
return React.createElement(Portal, {
|
|
137
|
-
host = layer,
|
|
138
|
-
}, React.createElement("frame", {
|
|
139
|
-
key = "Popup",
|
|
140
|
-
Size = UDim2.fromScale(1, 1),
|
|
141
|
-
BackgroundTransparency = 1,
|
|
142
|
-
ZIndex = 20000,
|
|
143
|
-
}, _exp_8, React.createElement(SxHost, _attributes, children)))
|
|
124
|
+
Active = false,
|
|
125
|
+
ZIndex = 20001,
|
|
126
|
+
}, children)))
|
|
144
127
|
end
|
|
145
128
|
local default = Popup
|
|
146
129
|
return {
|
|
@@ -2,4 +2,3 @@ export { default as Popup } from "./components/Popup";
|
|
|
2
2
|
export { PopupProps } from "./components/Popup";
|
|
3
3
|
export { default as Portal } from "./components/Portal";
|
|
4
4
|
export { PortalProps } from "./components/Portal";
|
|
5
|
-
export { portalTarget } from "./components/portalTarget";
|
|
@@ -3,5 +3,4 @@ local TS = _G[script]
|
|
|
3
3
|
local exports = {}
|
|
4
4
|
exports.Popup = TS.import(script, script, "components", "Popup").default
|
|
5
5
|
exports.Portal = TS.import(script, script, "components", "Portal").default
|
|
6
|
-
exports.portalTarget = TS.import(script, script, "components", "portalTarget").portalTarget
|
|
7
6
|
return exports
|
|
@@ -9,7 +9,6 @@ local _pretty_react_hooks = TS.import(script, TS.getModule(script, "@rbxts", "pr
|
|
|
9
9
|
local useAsyncEffect = _pretty_react_hooks.useAsyncEffect
|
|
10
10
|
local useDeferState = _pretty_react_hooks.useDeferState
|
|
11
11
|
local ContentProvider = TS.import(script, TS.getModule(script, "@rbxts", "services")).ContentProvider
|
|
12
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
13
12
|
local ProgressBar = TS.import(script, script.Parent.Parent.Parent, "progressBar").ProgressBar
|
|
14
13
|
local usePreloaderStyles = TS.import(script, script.Parent, "Preloader.styles").default
|
|
15
14
|
local function Preloader(props)
|
|
@@ -104,18 +103,26 @@ local function Preloader(props)
|
|
|
104
103
|
children = children,
|
|
105
104
|
})
|
|
106
105
|
else
|
|
107
|
-
local _attributes = {
|
|
108
|
-
tag = "frame",
|
|
109
|
-
}
|
|
106
|
+
local _attributes = {}
|
|
110
107
|
local _condition = id
|
|
111
108
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
112
109
|
_condition = "Preloader"
|
|
113
110
|
end
|
|
114
111
|
_attributes.key = _condition
|
|
115
|
-
_attributes.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
_attributes.ref = ref
|
|
113
|
+
for _k, _v in container do
|
|
114
|
+
_attributes[_k] = _v
|
|
115
|
+
end
|
|
116
|
+
if className then
|
|
117
|
+
for _k, _v in className do
|
|
118
|
+
_attributes[_k] = _v
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
if sx then
|
|
122
|
+
for _k, _v in sx do
|
|
123
|
+
_attributes[_k] = _v
|
|
124
|
+
end
|
|
125
|
+
end
|
|
119
126
|
local _exp = Adornment ~= nil and React.createElement(Adornment, {
|
|
120
127
|
progress = percentage,
|
|
121
128
|
})
|
|
@@ -135,7 +142,7 @@ local function Preloader(props)
|
|
|
135
142
|
progress = percentage,
|
|
136
143
|
})))
|
|
137
144
|
end
|
|
138
|
-
_result = (React.createElement(
|
|
145
|
+
_result = (React.createElement("frame", _attributes, _exp, _condition_1, _condition_2))
|
|
139
146
|
end
|
|
140
147
|
return React.createElement(React.Fragment, nil, _result)
|
|
141
148
|
end
|