@rbxts/uiblox 0.2.0-alpha.3 → 0.2.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -109
- package/out/hooks/index.d.ts +1 -0
- package/out/hooks/init.luau +3 -0
- package/out/hooks/useBreakpoints.luau +2 -11
- package/out/hooks/viewportObserver.d.ts +10 -0
- package/out/hooks/viewportObserver.luau +75 -0
- package/out/theme/interfaces/theme/Theme.d.ts +15 -0
- package/out/theme/styles/utilities/componentStyles.luau +45 -3
- package/out/theme/styles/utilities/componentTheme.d.ts +15 -0
- package/out/theme/styles/utilities/index.d.ts +2 -0
- package/out/theme/styles/utilities/init.luau +7 -0
- package/out/theme/styles/utilities/resolveStyle.d.ts +10 -2
- package/out/theme/styles/utilities/resolveStyle.luau +7 -3
- package/out/theme/styles/utilities/resolveSx.d.ts +120 -0
- package/out/theme/styles/utilities/resolveSx.luau +524 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +9 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
- package/out/ui/packages/accordion/components/Accordion.luau +46 -30
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +16 -4
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
- package/out/ui/packages/accordion/components/accordionOpen.luau +4 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +48 -42
- package/out/ui/packages/alert/components/Alert.styles.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.styles.luau +17 -8
- package/out/ui/packages/appBar/components/AppBar.d.ts +2 -1
- package/out/ui/packages/appBar/components/AppBar.luau +47 -36
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +16 -5
- package/out/ui/packages/assetField/components/AssetField.luau +12 -16
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +27 -26
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.styles.luau +5 -1
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
- package/out/ui/packages/backdrop/components/Backdrop.luau +51 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
- package/out/ui/packages/backdrop/index.d.ts +2 -0
- package/out/ui/packages/backdrop/init.luau +5 -0
- package/out/ui/packages/badge/components/Badge.d.ts +3 -0
- package/out/ui/packages/badge/components/Badge.luau +32 -24
- package/out/ui/packages/badge/components/Badge.styles.d.ts +5 -1
- package/out/ui/packages/badge/components/Badge.styles.luau +20 -8
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +1 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +20 -18
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +3 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +6 -2
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +67 -40
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
- package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/init.luau +3 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
- package/out/ui/packages/button/components/Button.luau +28 -22
- package/out/ui/packages/card/components/Card.d.ts +3 -1
- package/out/ui/packages/card/components/Card.luau +10 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +75 -53
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +26 -9
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +6 -1
- package/out/ui/packages/chip/components/Chip.luau +61 -17
- package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +54 -9
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +29 -18
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +16 -20
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +34 -20
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +34 -35
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +65 -62
- package/out/ui/packages/dialog/components/Dialog.d.ts +3 -2
- package/out/ui/packages/dialog/components/Dialog.luau +41 -21
- package/out/ui/packages/divider/components/Divider.d.ts +1 -0
- package/out/ui/packages/divider/components/Divider.luau +52 -17
- package/out/ui/packages/divider/components/Divider.styles.luau +32 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +1 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +10 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.luau +71 -37
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.styles.luau +3 -2
- package/out/ui/packages/fab/components/Fab.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.luau +79 -37
- package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +39 -3
- package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
- package/out/ui/packages/fab/components/fabSize.luau +4 -0
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +1 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
- package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
- package/out/ui/packages/formText/components/FormHelperText.luau +40 -0
- package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
- package/out/ui/packages/formText/components/FormLabel.luau +42 -0
- package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
- package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
- package/out/ui/packages/formText/index.d.ts +4 -0
- package/out/ui/packages/formText/init.luau +6 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +56 -42
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -4
- package/out/ui/packages/host/components/SxHost.d.ts +18 -0
- package/out/ui/packages/host/components/SxHost.luau +210 -0
- package/out/ui/packages/host/hostPaint.d.ts +12 -0
- package/out/ui/packages/host/hostPaint.luau +34 -0
- package/out/ui/packages/host/hostRules.d.ts +15 -0
- package/out/ui/packages/host/hostRules.luau +92 -0
- package/out/ui/packages/host/index.d.ts +3 -0
- package/out/ui/packages/host/init.luau +13 -0
- package/out/ui/packages/icon/components/Icon.luau +9 -16
- package/out/ui/packages/iconButton/components/IconButton.luau +22 -17
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
- package/out/ui/packages/imageList/components/ImageList.luau +93 -0
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +73 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +4 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +31 -0
- package/out/ui/packages/imageList/index.d.ts +2 -0
- package/out/ui/packages/imageList/init.luau +5 -0
- package/out/ui/packages/index.d.ts +8 -0
- package/out/ui/packages/init.luau +24 -0
- package/out/ui/packages/input/components/Input.d.ts +1 -0
- package/out/ui/packages/input/components/Input.luau +22 -19
- package/out/ui/packages/layout/components/Box.d.ts +11 -0
- package/out/ui/packages/layout/components/Box.luau +40 -0
- package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
- package/out/ui/packages/layout/components/Box.styles.luau +34 -0
- package/out/ui/packages/layout/components/Container.d.ts +10 -0
- package/out/ui/packages/layout/components/Container.luau +45 -0
- package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
- package/out/ui/packages/layout/components/Container.styles.luau +41 -0
- package/out/ui/packages/layout/components/FlexItem.d.ts +12 -0
- package/out/ui/packages/layout/components/FlexItem.luau +40 -0
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +8 -0
- package/out/ui/packages/layout/components/FlexItem.styles.luau +66 -0
- package/out/ui/packages/layout/components/Grid.d.ts +5 -1
- package/out/ui/packages/layout/components/Grid.luau +41 -19
- package/out/ui/packages/layout/components/List.luau +9 -16
- package/out/ui/packages/layout/components/Stack.d.ts +14 -0
- package/out/ui/packages/layout/components/Stack.luau +44 -0
- package/out/ui/packages/layout/components/Stack.styles.d.ts +10 -0
- package/out/ui/packages/layout/components/Stack.styles.luau +101 -0
- package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
- package/out/ui/packages/layout/components/boxPad.luau +59 -0
- package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
- package/out/ui/packages/layout/components/containerWidth.luau +17 -0
- package/out/ui/packages/layout/components/flexItemMode.d.ts +6 -0
- package/out/ui/packages/layout/components/flexItemMode.luau +36 -0
- package/out/ui/packages/layout/components/gridProps.d.ts +3 -0
- package/out/ui/packages/layout/components/gridProps.luau +20 -0
- package/out/ui/packages/layout/components/stackAlign.d.ts +10 -0
- package/out/ui/packages/layout/components/stackAlign.luau +43 -0
- package/out/ui/packages/layout/index.d.ts +14 -0
- package/out/ui/packages/layout/init.luau +5 -0
- package/out/ui/packages/link/components/Link.d.ts +11 -0
- package/out/ui/packages/link/components/Link.luau +80 -0
- package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
- package/out/ui/packages/link/components/Link.styles.luau +59 -0
- package/out/ui/packages/link/index.d.ts +3 -0
- package/out/ui/packages/link/init.luau +5 -0
- package/out/ui/packages/listItem/components/ListItem.d.ts +4 -1
- package/out/ui/packages/listItem/components/ListItem.luau +44 -4
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +16 -5
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +7 -1
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +6 -0
- package/out/ui/packages/markdown/components/Markdown.luau +221 -0
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.styles.luau +101 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +16 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +315 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +6 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +132 -0
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +2 -0
- package/out/ui/packages/markdown/htmlToMarkdown.luau +350 -0
- package/out/ui/packages/markdown/index.d.ts +8 -0
- package/out/ui/packages/markdown/init.luau +11 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +42 -0
- package/out/ui/packages/markdown/parseMarkdown.luau +459 -0
- package/out/ui/packages/menu/components/Menu.d.ts +7 -1
- package/out/ui/packages/menu/components/Menu.luau +68 -26
- package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
- package/out/ui/packages/modal/components/Modal.d.ts +2 -1
- package/out/ui/packages/modal/components/Modal.luau +79 -37
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +1 -0
- package/out/ui/packages/motion/unit.d.ts +5 -0
- package/out/ui/packages/motion/unit.luau +23 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +2 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +16 -3
- package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
- package/out/ui/packages/pagination/components/Pagination.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.luau +62 -38
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.styles.luau +36 -4
- package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
- package/out/ui/packages/pagination/components/pageRange.luau +91 -8
- package/out/ui/packages/pagination/index.d.ts +1 -0
- package/out/ui/packages/pagination/init.luau +1 -0
- package/out/ui/packages/paper/components/Paper.d.ts +4 -2
- package/out/ui/packages/paper/components/Paper.luau +31 -9
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +6 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -1
- package/out/ui/packages/popup/components/Popup.luau +35 -18
- package/out/ui/packages/popup/index.d.ts +1 -0
- package/out/ui/packages/popup/init.luau +1 -0
- package/out/ui/packages/preloader/components/Preloader.luau +9 -16
- package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +16 -18
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
- package/out/ui/packages/rating/components/Rating.d.ts +11 -0
- package/out/ui/packages/rating/components/Rating.luau +97 -0
- package/out/ui/packages/rating/components/Rating.styles.d.ts +6 -0
- package/out/ui/packages/rating/components/Rating.styles.luau +44 -0
- package/out/ui/packages/rating/index.d.ts +2 -0
- package/out/ui/packages/rating/init.luau +5 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
- package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
- package/out/ui/packages/select/components/Select.d.ts +5 -0
- package/out/ui/packages/select/components/Select.luau +61 -77
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
- package/out/ui/packages/shadow/components/Shadow.luau +39 -17
- package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
- package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
- package/out/ui/packages/skeleton/components/Skeleton.luau +22 -30
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
- package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
- package/out/ui/packages/slider/components/Slider.d.ts +3 -0
- package/out/ui/packages/slider/components/Slider.luau +47 -19
- package/out/ui/packages/slider/components/Slider.styles.d.ts +2 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +14 -1
- package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
- package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +2 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +5 -0
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +1 -0
- package/out/ui/packages/snackbar/components/snackbarAction.luau +10 -0
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +19 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +97 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +5 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +31 -0
- package/out/ui/packages/speedDial/index.d.ts +3 -0
- package/out/ui/packages/speedDial/init.luau +5 -0
- package/out/ui/packages/splitPane/components/SplitPane.luau +13 -17
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +2 -0
- package/out/ui/packages/stateMatrix.luau +872 -881
- package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
- package/out/ui/packages/stepper/components/Stepper.luau +16 -17
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +3 -1
- package/out/ui/packages/stepper/components/Stepper.styles.luau +6 -2
- package/out/ui/packages/switch/components/Switch.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.luau +21 -16
- package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +6 -1
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +15 -19
- package/out/ui/packages/table/components/Table.styles.d.ts +3 -1
- package/out/ui/packages/table/components/Table.styles.luau +10 -6
- package/out/ui/packages/tabs/components/Tabs.d.ts +3 -0
- package/out/ui/packages/tabs/components/Tabs.luau +24 -19
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +5 -1
- package/out/ui/packages/tabs/components/Tabs.styles.luau +26 -10
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
- package/out/ui/packages/tabs/index.d.ts +1 -0
- package/out/ui/packages/tabs/init.luau +1 -0
- package/out/ui/packages/toast/components/Toast.d.ts +2 -0
- package/out/ui/packages/toast/components/Toast.luau +41 -13
- package/out/ui/packages/toast/components/Toast.styles.luau +23 -5
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +21 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +129 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +9 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +69 -0
- package/out/ui/packages/toggleButton/index.d.ts +2 -0
- package/out/ui/packages/toggleButton/init.luau +7 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
- package/out/ui/packages/treeView/components/TreeView.luau +9 -16
- package/out/ui/packages/typography/components/Typography.luau +13 -14
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +7 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +43 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
- package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
- package/out/ui/packages/virtualList/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +1 -0
- package/package.json +2 -2
- package/out/ui/packages/select/components/selectMotion.d.ts +0 -2
- package/out/ui/packages/select/components/selectMotion.luau +0 -12
|
@@ -10,6 +10,7 @@ local _motion = TS.import(script, script.Parent.Parent.Parent, "motion")
|
|
|
10
10
|
local loopProperty = _motion.loopProperty
|
|
11
11
|
local progressSpin = _motion.progressSpin
|
|
12
12
|
local progressUnit = _motion.progressUnit
|
|
13
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
13
14
|
local useProgressBarStyles = TS.import(script, script.Parent, "ProgressBar.styles").default
|
|
14
15
|
local function ProgressBar(props)
|
|
15
16
|
local _binding = props
|
|
@@ -53,26 +54,21 @@ local function ProgressBar(props)
|
|
|
53
54
|
Position = UDim2.new(1, 0, 0.5, 0),
|
|
54
55
|
}, 1.1)
|
|
55
56
|
end, { motion, unit })
|
|
56
|
-
local _attributes = {
|
|
57
|
+
local _attributes = {
|
|
58
|
+
tag = "frame",
|
|
59
|
+
}
|
|
57
60
|
local _condition = id
|
|
58
61
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
59
62
|
_condition = "ProgressBar"
|
|
60
63
|
end
|
|
61
64
|
_attributes.key = _condition
|
|
62
|
-
_attributes.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
if sx then
|
|
72
|
-
for _k, _v in sx do
|
|
73
|
-
_attributes[_k] = _v
|
|
74
|
-
end
|
|
75
|
-
end
|
|
65
|
+
_attributes.hostRef = ref
|
|
66
|
+
_attributes.base = container
|
|
67
|
+
_attributes.className = className
|
|
68
|
+
_attributes.sx = sx
|
|
69
|
+
_attributes.state = {
|
|
70
|
+
disabled = disabled,
|
|
71
|
+
}
|
|
76
72
|
local _attributes_1 = {
|
|
77
73
|
key = "Bar",
|
|
78
74
|
}
|
|
@@ -113,7 +109,7 @@ local function ProgressBar(props)
|
|
|
113
109
|
for _k, _v in corner do
|
|
114
110
|
_attributes_7[_k] = _v
|
|
115
111
|
end
|
|
116
|
-
return React.createElement(
|
|
112
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp, _exp_1, React.createElement("frame", _attributes_4, _exp_2, React.createElement("frame", _attributes_6, React.createElement("uicorner", _attributes_7)))))
|
|
117
113
|
end
|
|
118
114
|
local default = ProgressBar
|
|
119
115
|
return {
|
|
@@ -11,6 +11,7 @@ export interface RadioGroupProps<T> {
|
|
|
11
11
|
onChange: (value: T) => void;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
size?: ControlSize;
|
|
14
|
+
row?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare function RadioGroup<T>(props: CustomizedProps<Frame, RadioGroupProps<T>>): JSX.Element;
|
|
16
17
|
export default RadioGroup;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local useRadioGroupStyles = TS.import(script, script.Parent, "RadioGroup.styles").default
|
|
6
7
|
local function RadioGroup(props)
|
|
7
8
|
local _binding = props
|
|
@@ -10,42 +11,39 @@ local function RadioGroup(props)
|
|
|
10
11
|
local onChange = _binding.onChange
|
|
11
12
|
local disabled = _binding.disabled
|
|
12
13
|
local size = _binding.size
|
|
14
|
+
local row = _binding.row
|
|
13
15
|
local className = _binding.className
|
|
14
16
|
local sx = _binding.sx
|
|
15
17
|
local id = _binding.id
|
|
16
18
|
local ref = _binding.ref
|
|
17
19
|
local _binding_1 = useRadioGroupStyles({
|
|
18
20
|
size = size,
|
|
21
|
+
row = row,
|
|
19
22
|
})
|
|
20
23
|
local root = _binding_1.root
|
|
21
24
|
local list = _binding_1.list
|
|
22
25
|
local option = _binding_1.option
|
|
23
|
-
local
|
|
26
|
+
local optionRow = _binding_1.optionRow
|
|
24
27
|
local ring = _binding_1.ring
|
|
25
28
|
local dot = _binding_1.dot
|
|
26
29
|
local stroke = _binding_1.stroke
|
|
27
30
|
local corner = _binding_1.corner
|
|
28
31
|
local label = _binding_1.label
|
|
29
|
-
local _attributes = {
|
|
32
|
+
local _attributes = {
|
|
33
|
+
tag = "frame",
|
|
34
|
+
}
|
|
30
35
|
local _condition = id
|
|
31
36
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
32
37
|
_condition = "RadioGroup"
|
|
33
38
|
end
|
|
34
39
|
_attributes.key = _condition
|
|
35
|
-
_attributes.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
if sx then
|
|
45
|
-
for _k, _v in sx do
|
|
46
|
-
_attributes[_k] = _v
|
|
47
|
-
end
|
|
48
|
-
end
|
|
40
|
+
_attributes.hostRef = ref
|
|
41
|
+
_attributes.base = root
|
|
42
|
+
_attributes.className = className
|
|
43
|
+
_attributes.sx = sx
|
|
44
|
+
_attributes.state = {
|
|
45
|
+
disabled = disabled,
|
|
46
|
+
}
|
|
49
47
|
local _attributes_1 = table.clone(list)
|
|
50
48
|
setmetatable(_attributes_1, nil)
|
|
51
49
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -70,7 +68,7 @@ local function RadioGroup(props)
|
|
|
70
68
|
end
|
|
71
69
|
end,
|
|
72
70
|
}
|
|
73
|
-
local _attributes_3 = table.clone(
|
|
71
|
+
local _attributes_3 = table.clone(optionRow)
|
|
74
72
|
setmetatable(_attributes_3, nil)
|
|
75
73
|
local _exp_1 = React.createElement("uilistlayout", _attributes_3)
|
|
76
74
|
local _attributes_4 = table.clone(ring)
|
|
@@ -104,7 +102,7 @@ local function RadioGroup(props)
|
|
|
104
102
|
_newValue[_k] = _callback(_v, _k - 1, options)
|
|
105
103
|
end
|
|
106
104
|
-- ▲ ReadonlyArray.map ▲
|
|
107
|
-
return React.createElement(
|
|
105
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
108
106
|
end
|
|
109
107
|
local default = RadioGroup
|
|
110
108
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ControlSize } from "../../../../theme/index";
|
|
2
2
|
export interface RadioGroupStyleProps {
|
|
3
3
|
size?: ControlSize;
|
|
4
|
+
row?: boolean;
|
|
4
5
|
}
|
|
5
6
|
declare const useRadioGroupStyles: (props: RadioGroupStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
6
7
|
export default useRadioGroupStyles;
|
|
@@ -6,6 +6,7 @@ local createStyles = _theme.createStyles
|
|
|
6
6
|
local componentStyles = _theme.componentStyles
|
|
7
7
|
local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param)
|
|
8
8
|
local size = _param.size
|
|
9
|
+
local row = _param.row
|
|
9
10
|
local metrics = controlMetrics(theme.density, size)
|
|
10
11
|
return createStyles({
|
|
11
12
|
root = {
|
|
@@ -15,8 +16,10 @@ local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param
|
|
|
15
16
|
BorderSizePixel = 0,
|
|
16
17
|
},
|
|
17
18
|
list = {
|
|
19
|
+
FillDirection = if row == true then Enum.FillDirection.Horizontal else Enum.FillDirection.Vertical,
|
|
18
20
|
Padding = UDim.new(0, theme.padding.default),
|
|
19
21
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
22
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
20
23
|
},
|
|
21
24
|
option = {
|
|
22
25
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -25,7 +28,7 @@ local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param
|
|
|
25
28
|
BorderSizePixel = 0,
|
|
26
29
|
Text = "",
|
|
27
30
|
},
|
|
28
|
-
|
|
31
|
+
optionRow = {
|
|
29
32
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
30
33
|
Padding = UDim.new(0, theme.padding.default),
|
|
31
34
|
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface RatingProps {
|
|
3
|
+
value: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
size?: ControlSize;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
onChange: (value: number) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function Rating(props: CustomizedProps<Frame, RatingProps>): JSX.Element;
|
|
11
|
+
export default Rating;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
5
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
6
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
|
+
local useRatingStyles = TS.import(script, script.Parent, "Rating.styles").default
|
|
8
|
+
local function Rating(props)
|
|
9
|
+
local _binding = props
|
|
10
|
+
local value = _binding.value
|
|
11
|
+
local max = _binding.max
|
|
12
|
+
if max == nil then
|
|
13
|
+
max = 5
|
|
14
|
+
end
|
|
15
|
+
local size = _binding.size
|
|
16
|
+
if size == nil then
|
|
17
|
+
size = "medium"
|
|
18
|
+
end
|
|
19
|
+
local disabled = _binding.disabled
|
|
20
|
+
local readOnly = _binding.readOnly
|
|
21
|
+
local onChange = _binding.onChange
|
|
22
|
+
local className = _binding.className
|
|
23
|
+
local sx = _binding.sx
|
|
24
|
+
local id = _binding.id
|
|
25
|
+
local ref = _binding.ref
|
|
26
|
+
local styles = useRatingStyles({
|
|
27
|
+
disabled = disabled,
|
|
28
|
+
size = size,
|
|
29
|
+
})
|
|
30
|
+
local active = canActivate(disabled) and readOnly ~= true
|
|
31
|
+
local stars = {}
|
|
32
|
+
do
|
|
33
|
+
local i = 1
|
|
34
|
+
local _shouldIncrement = false
|
|
35
|
+
while true do
|
|
36
|
+
if _shouldIncrement then
|
|
37
|
+
i += 1
|
|
38
|
+
else
|
|
39
|
+
_shouldIncrement = true
|
|
40
|
+
end
|
|
41
|
+
if not (i <= max) then
|
|
42
|
+
break
|
|
43
|
+
end
|
|
44
|
+
local _i = i
|
|
45
|
+
table.insert(stars, _i)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
local _attributes = {
|
|
49
|
+
tag = "frame",
|
|
50
|
+
}
|
|
51
|
+
local _condition = id
|
|
52
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
53
|
+
_condition = "Rating"
|
|
54
|
+
end
|
|
55
|
+
_attributes.key = _condition
|
|
56
|
+
_attributes.hostRef = ref
|
|
57
|
+
_attributes.base = styles.root
|
|
58
|
+
_attributes.className = className
|
|
59
|
+
_attributes.sx = sx
|
|
60
|
+
_attributes.state = {
|
|
61
|
+
disabled = disabled,
|
|
62
|
+
}
|
|
63
|
+
local _attributes_1 = table.clone(styles.list)
|
|
64
|
+
setmetatable(_attributes_1, nil)
|
|
65
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
66
|
+
-- ▼ ReadonlyArray.map ▼
|
|
67
|
+
local _newValue = table.create(#stars)
|
|
68
|
+
local _callback = function(n)
|
|
69
|
+
local _attributes_2 = {
|
|
70
|
+
key = `Star-{n}`,
|
|
71
|
+
}
|
|
72
|
+
for _k, _v in styles.star do
|
|
73
|
+
_attributes_2[_k] = _v
|
|
74
|
+
end
|
|
75
|
+
_attributes_2.Image = tostring(if n <= value then Icons.StarFilled else Icons.Star)
|
|
76
|
+
_attributes_2.LayoutOrder = n
|
|
77
|
+
_attributes_2.Active = active
|
|
78
|
+
_attributes_2.Selectable = active
|
|
79
|
+
_attributes_2.Event = {
|
|
80
|
+
Activated = function()
|
|
81
|
+
if active then
|
|
82
|
+
onChange(if n == value then 0 else n)
|
|
83
|
+
end
|
|
84
|
+
end,
|
|
85
|
+
}
|
|
86
|
+
return React.createElement("imagebutton", _attributes_2)
|
|
87
|
+
end
|
|
88
|
+
for _k, _v in stars do
|
|
89
|
+
_newValue[_k] = _callback(_v, _k - 1, stars)
|
|
90
|
+
end
|
|
91
|
+
-- ▲ ReadonlyArray.map ▲
|
|
92
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
93
|
+
end
|
|
94
|
+
local default = Rating
|
|
95
|
+
return {
|
|
96
|
+
default = default,
|
|
97
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local useRatingStyles = componentStyles("Rating", function(theme, _param)
|
|
7
|
+
local disabled = _param.disabled
|
|
8
|
+
if disabled == nil then
|
|
9
|
+
disabled = false
|
|
10
|
+
end
|
|
11
|
+
local size = _param.size
|
|
12
|
+
if size == nil then
|
|
13
|
+
size = "medium"
|
|
14
|
+
end
|
|
15
|
+
local star = if size == "small" then theme.spacing.calc(2) elseif size == "large" then theme.spacing.calc(4) else theme.spacing.calc(3)
|
|
16
|
+
return createStyles({
|
|
17
|
+
root = {
|
|
18
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
19
|
+
Size = UDim2.fromScale(0, 0),
|
|
20
|
+
BackgroundTransparency = 1,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
},
|
|
23
|
+
list = {
|
|
24
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
25
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
26
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
27
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
28
|
+
Padding = UDim.new(0, theme.padding.calc(if size == "small" then 0.25 else 0.5)),
|
|
29
|
+
},
|
|
30
|
+
star = {
|
|
31
|
+
Size = UDim2.fromOffset(star, star),
|
|
32
|
+
BackgroundTransparency = 1,
|
|
33
|
+
BorderSizePixel = 0,
|
|
34
|
+
AutoButtonColor = false,
|
|
35
|
+
Active = not disabled,
|
|
36
|
+
Selectable = not disabled,
|
|
37
|
+
ImageColor3 = if disabled then theme.palette.text.disabled else theme.palette.primary.main,
|
|
38
|
+
},
|
|
39
|
+
})
|
|
40
|
+
end)
|
|
41
|
+
local default = useRatingStyles
|
|
42
|
+
return {
|
|
43
|
+
default = default,
|
|
44
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local VectorEditor = TS.import(script, script.Parent.Parent.Parent, "vectorEditor").VectorEditor
|
|
5
6
|
local useRayEditorStyles = TS.import(script, script.Parent, "RayEditor.styles").default
|
|
6
7
|
local function RayEditor(props)
|
|
@@ -13,26 +14,21 @@ local function RayEditor(props)
|
|
|
13
14
|
local id = _binding.id
|
|
14
15
|
local ref = _binding.ref
|
|
15
16
|
local styles = useRayEditorStyles()
|
|
16
|
-
local _attributes = {
|
|
17
|
+
local _attributes = {
|
|
18
|
+
tag = "frame",
|
|
19
|
+
}
|
|
17
20
|
local _condition = id
|
|
18
21
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
19
22
|
_condition = "RayEditor"
|
|
20
23
|
end
|
|
21
24
|
_attributes.key = _condition
|
|
22
|
-
_attributes.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
if sx then
|
|
32
|
-
for _k, _v in sx do
|
|
33
|
-
_attributes[_k] = _v
|
|
34
|
-
end
|
|
35
|
-
end
|
|
25
|
+
_attributes.hostRef = ref
|
|
26
|
+
_attributes.base = styles.root
|
|
27
|
+
_attributes.className = className
|
|
28
|
+
_attributes.sx = sx
|
|
29
|
+
_attributes.state = {
|
|
30
|
+
disabled = disabled,
|
|
31
|
+
}
|
|
36
32
|
local _attributes_1 = table.clone(styles.column)
|
|
37
33
|
setmetatable(_attributes_1, nil)
|
|
38
34
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -69,7 +65,7 @@ local function RayEditor(props)
|
|
|
69
65
|
local _attributes_7 = table.clone(styles.label)
|
|
70
66
|
setmetatable(_attributes_7, nil)
|
|
71
67
|
_attributes_7.Text = "Direction"
|
|
72
|
-
return React.createElement(
|
|
68
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_2, React.createElement("frame", _attributes_5, _exp_3, React.createElement("textlabel", _attributes_7), React.createElement(VectorEditor, {
|
|
73
69
|
value = value.Direction,
|
|
74
70
|
disabled = disabled,
|
|
75
71
|
onChange = function(direction)
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
5
6
|
local useRectEditorStyles = TS.import(script, script.Parent, "RectEditor.styles").default
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
|
|
7
|
+
local writeRectParts = TS.import(script, script.Parent, "rectValue").writeRectParts
|
|
8
|
+
local GROUPS = { {
|
|
9
|
+
title = "Min",
|
|
10
|
+
fields = { "MinX", "MinY" },
|
|
11
|
+
}, {
|
|
12
|
+
title = "Max",
|
|
13
|
+
fields = { "MaxX", "MaxY" },
|
|
14
|
+
} }
|
|
9
15
|
local function RectEditor(props)
|
|
10
16
|
local _binding = props
|
|
11
17
|
local value = _binding.value
|
|
@@ -16,68 +22,105 @@ local function RectEditor(props)
|
|
|
16
22
|
local id = _binding.id
|
|
17
23
|
local ref = _binding.ref
|
|
18
24
|
local styles = useRectEditorStyles()
|
|
19
|
-
local amounts = {
|
|
25
|
+
local amounts = {
|
|
26
|
+
MinX = value.Min.X,
|
|
27
|
+
MinY = value.Min.Y,
|
|
28
|
+
MaxX = value.Max.X,
|
|
29
|
+
MaxY = value.Max.Y,
|
|
30
|
+
}
|
|
20
31
|
local commit = function(field, amount)
|
|
21
32
|
local parts = writeRectParts(value.Min.X, value.Min.Y, value.Max.X, value.Max.Y, field, amount)
|
|
22
33
|
onChange(Rect.new(parts[1], parts[2], parts[3], parts[4]))
|
|
23
34
|
end
|
|
24
|
-
local _attributes = {
|
|
35
|
+
local _attributes = {
|
|
36
|
+
tag = "frame",
|
|
37
|
+
}
|
|
25
38
|
local _condition = id
|
|
26
39
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
27
40
|
_condition = "RectEditor"
|
|
28
41
|
end
|
|
29
42
|
_attributes.key = _condition
|
|
30
|
-
_attributes.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
if sx then
|
|
40
|
-
for _k, _v in sx do
|
|
41
|
-
_attributes[_k] = _v
|
|
42
|
-
end
|
|
43
|
-
end
|
|
43
|
+
_attributes.hostRef = ref
|
|
44
|
+
_attributes.base = styles.root
|
|
45
|
+
_attributes.className = className
|
|
46
|
+
_attributes.sx = sx
|
|
47
|
+
_attributes.state = {
|
|
48
|
+
disabled = disabled,
|
|
49
|
+
}
|
|
44
50
|
local _attributes_1 = table.clone(styles.wrap)
|
|
45
51
|
setmetatable(_attributes_1, nil)
|
|
46
52
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
47
|
-
local _exp_1 = rectFields()
|
|
48
53
|
-- ▼ ReadonlyArray.map ▼
|
|
49
|
-
local _newValue = table.create(#
|
|
50
|
-
local _callback = function(
|
|
54
|
+
local _newValue = table.create(#GROUPS)
|
|
55
|
+
local _callback = function(group, groupIndex)
|
|
51
56
|
local _attributes_2 = {
|
|
52
|
-
key =
|
|
57
|
+
key = group.title,
|
|
53
58
|
}
|
|
54
|
-
for _k, _v in styles.
|
|
59
|
+
for _k, _v in styles.group do
|
|
55
60
|
_attributes_2[_k] = _v
|
|
56
61
|
end
|
|
57
|
-
_attributes_2.LayoutOrder =
|
|
58
|
-
local _attributes_3 = table.clone(styles.
|
|
62
|
+
_attributes_2.LayoutOrder = groupIndex + 1
|
|
63
|
+
local _attributes_3 = table.clone(styles.wrap)
|
|
59
64
|
setmetatable(_attributes_3, nil)
|
|
60
|
-
local
|
|
61
|
-
local _attributes_4 = table.clone(styles.
|
|
65
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_3)
|
|
66
|
+
local _attributes_4 = table.clone(styles.groupLabel)
|
|
62
67
|
setmetatable(_attributes_4, nil)
|
|
63
|
-
_attributes_4.Text =
|
|
64
|
-
|
|
65
|
-
local
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
_attributes_4.Text = group.title
|
|
69
|
+
_attributes_4.LayoutOrder = 1
|
|
70
|
+
local _exp_2 = React.createElement("textlabel", _attributes_4)
|
|
71
|
+
local _attributes_5 = {
|
|
72
|
+
key = "Pair",
|
|
73
|
+
}
|
|
74
|
+
for _k, _v in styles.group do
|
|
75
|
+
_attributes_5[_k] = _v
|
|
76
|
+
end
|
|
77
|
+
_attributes_5.LayoutOrder = 2
|
|
78
|
+
local _attributes_6 = table.clone(styles.pair)
|
|
79
|
+
setmetatable(_attributes_6, nil)
|
|
80
|
+
local _exp_3 = React.createElement("uilistlayout", _attributes_6)
|
|
81
|
+
local _exp_4 = group.fields
|
|
82
|
+
-- ▼ ReadonlyArray.map ▼
|
|
83
|
+
local _newValue_1 = table.create(#_exp_4)
|
|
84
|
+
local _callback_1 = function(field, index)
|
|
85
|
+
local _attributes_7 = {
|
|
86
|
+
key = field,
|
|
87
|
+
}
|
|
88
|
+
for _k, _v in styles.cell do
|
|
89
|
+
_attributes_7[_k] = _v
|
|
90
|
+
end
|
|
91
|
+
_attributes_7.LayoutOrder = index + 1
|
|
92
|
+
local _attributes_8 = table.clone(styles.stack)
|
|
93
|
+
setmetatable(_attributes_8, nil)
|
|
94
|
+
local _exp_5 = React.createElement("uilistlayout", _attributes_8)
|
|
95
|
+
local _attributes_9 = table.clone(styles.label)
|
|
96
|
+
setmetatable(_attributes_9, nil)
|
|
97
|
+
_attributes_9.Text = field
|
|
98
|
+
_attributes_9.LayoutOrder = 1
|
|
99
|
+
local _exp_6 = React.createElement("textlabel", _attributes_9)
|
|
100
|
+
local _attributes_10 = table.clone(styles.field)
|
|
101
|
+
setmetatable(_attributes_10, nil)
|
|
102
|
+
_attributes_10.LayoutOrder = 2
|
|
103
|
+
return React.createElement("frame", _attributes_7, _exp_5, _exp_6, React.createElement("frame", _attributes_10, React.createElement(NumberInput, {
|
|
104
|
+
value = amounts[field],
|
|
105
|
+
places = 4,
|
|
106
|
+
disabled = disabled,
|
|
107
|
+
width = UDim.new(1, 0),
|
|
108
|
+
onChange = function(amount)
|
|
109
|
+
return commit(field, amount)
|
|
110
|
+
end,
|
|
111
|
+
})))
|
|
112
|
+
end
|
|
113
|
+
for _k, _v in _exp_4 do
|
|
114
|
+
_newValue_1[_k] = _callback_1(_v, _k - 1, _exp_4)
|
|
115
|
+
end
|
|
116
|
+
-- ▲ ReadonlyArray.map ▲
|
|
117
|
+
return React.createElement("frame", _attributes_2, _exp_1, _exp_2, React.createElement("frame", _attributes_5, _exp_3, React.createElement(React.Fragment, nil, _newValue_1)))
|
|
75
118
|
end
|
|
76
|
-
for _k, _v in
|
|
77
|
-
_newValue[_k] = _callback(_v, _k - 1,
|
|
119
|
+
for _k, _v in GROUPS do
|
|
120
|
+
_newValue[_k] = _callback(_v, _k - 1, GROUPS)
|
|
78
121
|
end
|
|
79
122
|
-- ▲ ReadonlyArray.map ▲
|
|
80
|
-
return React.createElement(
|
|
123
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
81
124
|
end
|
|
82
125
|
local default = RectEditor
|
|
83
126
|
return {
|
|
@@ -1,9 +1,11 @@
|
|
|
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
|
|
4
5
|
local createStyles = _theme.createStyles
|
|
5
6
|
local componentStyles = _theme.componentStyles
|
|
6
7
|
local useRectEditorStyles = componentStyles("RectEditor", function(theme)
|
|
8
|
+
local gap = theme.padding.calc(1)
|
|
7
9
|
return createStyles({
|
|
8
10
|
root = {
|
|
9
11
|
Size = UDim2.new(1, 0, 0, 0),
|
|
@@ -16,26 +18,47 @@ local useRectEditorStyles = componentStyles("RectEditor", function(theme)
|
|
|
16
18
|
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
17
19
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
18
20
|
},
|
|
19
|
-
|
|
21
|
+
group = {
|
|
22
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
23
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
24
|
+
BackgroundTransparency = 1,
|
|
25
|
+
},
|
|
26
|
+
groupLabel = {
|
|
27
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
28
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
29
|
+
BackgroundTransparency = 1,
|
|
30
|
+
Font = theme.typography.fontFamilies.default,
|
|
31
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
32
|
+
TextColor3 = theme.palette.text.secondary,
|
|
33
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
34
|
+
},
|
|
35
|
+
pair = {
|
|
20
36
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
21
|
-
Padding = UDim.new(0,
|
|
22
|
-
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
37
|
+
Padding = UDim.new(0, gap),
|
|
23
38
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
24
39
|
},
|
|
25
|
-
|
|
26
|
-
Size = UDim2.new(
|
|
40
|
+
cell = {
|
|
41
|
+
Size = UDim2.new(0.5, -gap / 2, 0, 0),
|
|
42
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
27
43
|
BackgroundTransparency = 1,
|
|
28
44
|
},
|
|
45
|
+
stack = {
|
|
46
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
47
|
+
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
48
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
49
|
+
},
|
|
29
50
|
label = {
|
|
30
|
-
Size = UDim2.new(
|
|
51
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
52
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
31
53
|
BackgroundTransparency = 1,
|
|
32
54
|
Font = theme.typography.fontFamilies.default,
|
|
33
55
|
TextSize = theme.typography.fontSizes.caption,
|
|
34
56
|
TextColor3 = theme.palette.text.secondary,
|
|
35
57
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
58
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
36
59
|
},
|
|
37
60
|
field = {
|
|
38
|
-
Size = UDim2.new(1,
|
|
61
|
+
Size = UDim2.new(1, 0, 0, controlMetrics(theme.density).height),
|
|
39
62
|
BackgroundTransparency = 1,
|
|
40
63
|
},
|
|
41
64
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
1
2
|
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
3
|
import { ChoiceOption } from "../../radioGroup/index";
|
|
3
4
|
export interface SelectProps<T> {
|
|
@@ -9,6 +10,10 @@ export interface SelectProps<T> {
|
|
|
9
10
|
loading?: boolean;
|
|
10
11
|
placeholder?: string;
|
|
11
12
|
searchable?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
defaultQuery?: string;
|
|
15
|
+
emptyText?: string;
|
|
16
|
+
empty?: React.Element;
|
|
12
17
|
reducedMotion?: boolean;
|
|
13
18
|
size?: ControlSize;
|
|
14
19
|
}
|