@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
|
@@ -3,40 +3,32 @@ 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
|
|
7
|
-
local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
8
|
-
local orientation = _param.orientation
|
|
9
|
-
local centered = _param.centered
|
|
10
|
-
local vertical = tabsIsVertical(orientation)
|
|
11
|
-
local bar = theme.padding.calc(0.5)
|
|
6
|
+
local useTabsStyles = componentStyles("Tabs", function(theme)
|
|
12
7
|
return createStyles({
|
|
13
8
|
root = {
|
|
14
|
-
Size =
|
|
9
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(4)),
|
|
15
10
|
BackgroundTransparency = 1,
|
|
16
11
|
BorderSizePixel = 0,
|
|
17
12
|
CanvasSize = UDim2.fromScale(0, 0),
|
|
18
|
-
AutomaticCanvasSize =
|
|
19
|
-
ScrollingDirection =
|
|
13
|
+
AutomaticCanvasSize = Enum.AutomaticSize.X,
|
|
14
|
+
ScrollingDirection = Enum.ScrollingDirection.X,
|
|
20
15
|
HorizontalScrollBarInset = Enum.ScrollBarInset.Always,
|
|
21
|
-
VerticalScrollBarInset = Enum.ScrollBarInset.Always,
|
|
22
16
|
ScrollBarThickness = theme.padding.calc(0.5),
|
|
23
17
|
ScrollBarImageColor3 = theme.palette.text.secondary,
|
|
24
18
|
},
|
|
25
19
|
list = {
|
|
26
|
-
FillDirection =
|
|
27
|
-
HorizontalAlignment = if centered == true and vertical ~= true then Enum.HorizontalAlignment.Center else Enum.HorizontalAlignment.Left,
|
|
20
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
28
21
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
29
22
|
},
|
|
30
23
|
tab = {
|
|
31
|
-
AutomaticSize =
|
|
32
|
-
Size =
|
|
24
|
+
AutomaticSize = Enum.AutomaticSize.X,
|
|
25
|
+
Size = UDim2.fromScale(0, 1),
|
|
33
26
|
BackgroundTransparency = 1,
|
|
34
27
|
BorderSizePixel = 0,
|
|
35
28
|
AutoButtonColor = false,
|
|
36
29
|
TextColor3 = theme.palette.text.secondary,
|
|
37
30
|
Font = theme.typography.fontFamilies.default,
|
|
38
31
|
TextSize = theme.typography.fontSizes.body,
|
|
39
|
-
TextXAlignment = if vertical then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
|
|
40
32
|
},
|
|
41
33
|
selected = {
|
|
42
34
|
TextColor3 = theme.palette.text.primary,
|
|
@@ -47,22 +39,14 @@ local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
|
47
39
|
padding = {
|
|
48
40
|
PaddingLeft = UDim.new(0, theme.padding.calc(2)),
|
|
49
41
|
PaddingRight = UDim.new(0, theme.padding.calc(2)),
|
|
50
|
-
PaddingTop = UDim.new(0, if vertical then theme.padding.calc(1) else 0),
|
|
51
|
-
PaddingBottom = UDim.new(0, if vertical then theme.padding.calc(1) else 0),
|
|
52
42
|
},
|
|
53
|
-
indicator =
|
|
54
|
-
Size = UDim2.new(
|
|
55
|
-
Position = UDim2.new(0, 0, 0.5, 0),
|
|
56
|
-
AnchorPoint = Vector2.new(0, 0.5),
|
|
57
|
-
BackgroundColor3 = theme.palette.primary.main,
|
|
58
|
-
BorderSizePixel = 0,
|
|
59
|
-
}) else ({
|
|
60
|
-
Size = UDim2.new(1, theme.padding.calc(4), 0, bar),
|
|
43
|
+
indicator = {
|
|
44
|
+
Size = UDim2.new(1, theme.padding.calc(4), 0, theme.padding.calc(0.5)),
|
|
61
45
|
Position = UDim2.fromScale(0.5, 1),
|
|
62
46
|
AnchorPoint = Vector2.new(0.5, 1),
|
|
63
47
|
BackgroundColor3 = theme.palette.primary.main,
|
|
64
48
|
BorderSizePixel = 0,
|
|
65
|
-
}
|
|
49
|
+
},
|
|
66
50
|
})
|
|
67
51
|
end)
|
|
68
52
|
local default = useTabsStyles
|
|
@@ -7,7 +7,6 @@ local useEffect = _react.useEffect
|
|
|
7
7
|
local useRef = _react.useRef
|
|
8
8
|
local DEFAULT_THEME = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DEFAULT_THEME
|
|
9
9
|
local Directions = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Directions
|
|
10
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
10
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
12
11
|
local useToastStyles = TS.import(script, script.Parent, "Toast.styles").default
|
|
13
12
|
local TWEEN_DURATION = 0.5
|
|
@@ -19,8 +18,6 @@ local function Toast(props)
|
|
|
19
18
|
if duration == nil then
|
|
20
19
|
duration = 4
|
|
21
20
|
end
|
|
22
|
-
local action = _binding.action
|
|
23
|
-
local onAction = _binding.onAction
|
|
24
21
|
local className = _binding.className
|
|
25
22
|
local sx = _binding.sx
|
|
26
23
|
local id = _binding.id
|
|
@@ -29,7 +26,6 @@ local function Toast(props)
|
|
|
29
26
|
local container = _binding_1.container
|
|
30
27
|
local label = _binding_1.label
|
|
31
28
|
local close = _binding_1.close
|
|
32
|
-
local actionStyle = _binding_1.action
|
|
33
29
|
local activePosition = _binding_1.activePosition
|
|
34
30
|
local inActivePosition = _binding_1.inActivePosition
|
|
35
31
|
local frameRef = useRef()
|
|
@@ -61,28 +57,26 @@ local function Toast(props)
|
|
|
61
57
|
onDismiss()
|
|
62
58
|
end
|
|
63
59
|
end, {})
|
|
64
|
-
local _attributes = {
|
|
65
|
-
tag = "frame",
|
|
66
|
-
}
|
|
60
|
+
local _attributes = {}
|
|
67
61
|
local _condition = id
|
|
68
62
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
69
63
|
_condition = "Toast"
|
|
70
64
|
end
|
|
71
65
|
_attributes.key = _condition
|
|
72
|
-
_attributes.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
_attributes.ref = frameRef
|
|
67
|
+
for _k, _v in container do
|
|
68
|
+
_attributes[_k] = _v
|
|
69
|
+
end
|
|
70
|
+
if className then
|
|
71
|
+
for _k, _v in className do
|
|
72
|
+
_attributes[_k] = _v
|
|
76
73
|
end
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
end
|
|
75
|
+
if sx then
|
|
76
|
+
for _k, _v in sx do
|
|
77
|
+
_attributes[_k] = _v
|
|
80
78
|
end
|
|
81
|
-
ref.current = instance
|
|
82
79
|
end
|
|
83
|
-
_attributes.base = container
|
|
84
|
-
_attributes.className = className
|
|
85
|
-
_attributes.sx = sx
|
|
86
80
|
local _exp = React.createElement("uicorner", {
|
|
87
81
|
key = "Corner",
|
|
88
82
|
CornerRadius = UDim.new(0, DEFAULT_THEME.shape.borderRadius),
|
|
@@ -96,28 +90,6 @@ local function Toast(props)
|
|
|
96
90
|
end
|
|
97
91
|
_attributes_1.Text = text
|
|
98
92
|
local _exp_2 = React.createElement("textlabel", _attributes_1)
|
|
99
|
-
local _condition_1 = action ~= nil and #action > 0
|
|
100
|
-
if _condition_1 then
|
|
101
|
-
local _attributes_2 = {
|
|
102
|
-
key = "Action",
|
|
103
|
-
}
|
|
104
|
-
for _k, _v in actionStyle do
|
|
105
|
-
_attributes_2[_k] = _v
|
|
106
|
-
end
|
|
107
|
-
_attributes_2.Text = action
|
|
108
|
-
_attributes_2.Event = {
|
|
109
|
-
Activated = function()
|
|
110
|
-
if onAction then
|
|
111
|
-
onAction()
|
|
112
|
-
end
|
|
113
|
-
tween(Directions.Out)
|
|
114
|
-
if onDismiss then
|
|
115
|
-
onDismiss()
|
|
116
|
-
end
|
|
117
|
-
end,
|
|
118
|
-
}
|
|
119
|
-
_condition_1 = (React.createElement("textbutton", _attributes_2))
|
|
120
|
-
end
|
|
121
93
|
local _attributes_2 = {
|
|
122
94
|
key = "Close",
|
|
123
95
|
}
|
|
@@ -132,7 +104,7 @@ local function Toast(props)
|
|
|
132
104
|
end
|
|
133
105
|
end,
|
|
134
106
|
}
|
|
135
|
-
return React.createElement(
|
|
107
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, React.createElement("imagebutton", _attributes_2))
|
|
136
108
|
end
|
|
137
109
|
local default = Toast
|
|
138
110
|
return {
|
|
@@ -11,7 +11,6 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
11
11
|
if variant == nil then
|
|
12
12
|
variant = ToastVariants.default
|
|
13
13
|
end
|
|
14
|
-
local action = _param.action
|
|
15
14
|
local getToastColors = function()
|
|
16
15
|
repeat
|
|
17
16
|
if variant == (ToastVariants.success) then
|
|
@@ -39,48 +38,31 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
39
38
|
until true
|
|
40
39
|
end
|
|
41
40
|
local toastColors = getToastColors()
|
|
42
|
-
local hasAction = action ~= nil and #action > 0
|
|
43
|
-
local actionSlot = if hasAction then theme.spacing.calc(8) else 0
|
|
44
41
|
local ACTIVE_POSITION = UDim2.new(0.5, 0, 1, -DEFAULT_THEME.padding.calc(2))
|
|
45
42
|
local INACTIVE_POSITION = UDim2.new(0.5, 0, 1, DEFAULT_THEME.spacing.calc(20) + DEFAULT_THEME.padding.calc(2))
|
|
46
43
|
return createStyles({
|
|
47
44
|
container = {
|
|
48
45
|
Size = UDim2.new(0, theme.spacing.calc(20), 0, theme.spacing.calc(4)),
|
|
49
|
-
Position =
|
|
46
|
+
Position = INACTIVE_POSITION,
|
|
50
47
|
BackgroundColor3 = toastColors.background,
|
|
51
48
|
AnchorPoint = Vector2.new(0.5, 1),
|
|
52
49
|
BorderSizePixel = 0,
|
|
53
50
|
ZIndex = 50000,
|
|
54
51
|
},
|
|
55
52
|
label = {
|
|
56
|
-
Size = UDim2.new(1, -
|
|
57
|
-
Position =
|
|
58
|
-
AnchorPoint =
|
|
53
|
+
Size = UDim2.new(1, -theme.padding.calc(4), 1, -theme.padding.calc(4)),
|
|
54
|
+
Position = UDim2.new(0.5, 0, 0.5, 0),
|
|
55
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
59
56
|
BackgroundTransparency = 1,
|
|
60
57
|
BorderSizePixel = 0,
|
|
61
58
|
TextSize = theme.typography.fontSizes.body,
|
|
62
59
|
TextColor3 = toastColors.content,
|
|
63
60
|
Font = theme.typography.fontFamilies.default,
|
|
64
|
-
TextXAlignment = if hasAction then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
|
|
65
|
-
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
66
61
|
TextScaled = false,
|
|
67
62
|
ZIndex = 50001,
|
|
68
63
|
},
|
|
69
|
-
action = {
|
|
70
|
-
AutomaticSize = Enum.AutomaticSize.X,
|
|
71
|
-
Size = UDim2.new(0, 0, 0, theme.spacing.calc(3)),
|
|
72
|
-
Position = UDim2.new(1, -(theme.padding.calc(2) + theme.options.constants.iconSizes.small + theme.padding.calc(1)), 0.5, 0),
|
|
73
|
-
AnchorPoint = Vector2.new(1, 0.5),
|
|
74
|
-
BackgroundTransparency = 1,
|
|
75
|
-
BorderSizePixel = 0,
|
|
76
|
-
Font = theme.typography.fontFamilies.default,
|
|
77
|
-
TextSize = theme.typography.fontSizes.body,
|
|
78
|
-
TextColor3 = toastColors.content,
|
|
79
|
-
AutoButtonColor = false,
|
|
80
|
-
ZIndex = 50001,
|
|
81
|
-
},
|
|
82
64
|
close = {
|
|
83
|
-
Size = UDim2.new(0, theme.
|
|
65
|
+
Size = UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1)),
|
|
84
66
|
Position = UDim2.new(1, -theme.padding.calc(2), 0, theme.padding.calc(2)),
|
|
85
67
|
AnchorPoint = Vector2.new(1, 0),
|
|
86
68
|
ImageColor3 = toastColors.content,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
import { ChoiceOption } from "../../radioGroup/index";
|
|
3
|
-
import { ToggleButtonOrientation } from "./ToggleButton.styles";
|
|
4
3
|
export interface ToggleButtonProps {
|
|
5
4
|
label: string;
|
|
6
5
|
selected?: boolean;
|
|
7
6
|
disabled?: boolean;
|
|
8
|
-
size?: ControlSize;
|
|
9
7
|
onActivated?: () => void;
|
|
10
8
|
}
|
|
11
9
|
declare function ToggleButton(props: CustomizedProps<TextButton, ToggleButtonProps>): JSX.Element;
|
|
@@ -14,8 +12,6 @@ export interface ToggleButtonGroupProps<T> {
|
|
|
14
12
|
options: ChoiceOption<T>[];
|
|
15
13
|
onChange: (value: T) => void;
|
|
16
14
|
disabled?: boolean;
|
|
17
|
-
size?: ControlSize;
|
|
18
|
-
orientation?: ToggleButtonOrientation;
|
|
19
15
|
}
|
|
20
16
|
export declare function ToggleButtonGroup<T>(props: CustomizedProps<Frame, ToggleButtonGroupProps<T>>): JSX.Element;
|
|
21
17
|
export default ToggleButton;
|
|
@@ -2,17 +2,12 @@
|
|
|
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
|
|
6
5
|
local useToggleButtonStyles = TS.import(script, script.Parent, "ToggleButton.styles").default
|
|
7
6
|
local function ToggleButton(props)
|
|
8
7
|
local _binding = props
|
|
9
8
|
local label = _binding.label
|
|
10
9
|
local selected = _binding.selected
|
|
11
10
|
local disabled = _binding.disabled
|
|
12
|
-
local size = _binding.size
|
|
13
|
-
if size == nil then
|
|
14
|
-
size = "medium"
|
|
15
|
-
end
|
|
16
11
|
local onActivated = _binding.onActivated
|
|
17
12
|
local className = _binding.className
|
|
18
13
|
local sx = _binding.sx
|
|
@@ -21,25 +16,28 @@ local function ToggleButton(props)
|
|
|
21
16
|
local styles = useToggleButtonStyles({
|
|
22
17
|
selected = selected,
|
|
23
18
|
disabled = disabled,
|
|
24
|
-
size = size,
|
|
25
19
|
})
|
|
26
20
|
local active = canActivate(disabled)
|
|
27
|
-
local _attributes = {
|
|
28
|
-
tag = "textbutton",
|
|
29
|
-
}
|
|
21
|
+
local _attributes = {}
|
|
30
22
|
local _condition = id
|
|
31
23
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
32
24
|
_condition = "ToggleButton"
|
|
33
25
|
end
|
|
34
26
|
_attributes.key = _condition
|
|
35
|
-
_attributes.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
_attributes.ref = ref
|
|
28
|
+
for _k, _v in styles.root do
|
|
29
|
+
_attributes[_k] = _v
|
|
30
|
+
end
|
|
31
|
+
if className then
|
|
32
|
+
for _k, _v in className do
|
|
33
|
+
_attributes[_k] = _v
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
if sx then
|
|
37
|
+
for _k, _v in sx do
|
|
38
|
+
_attributes[_k] = _v
|
|
39
|
+
end
|
|
40
|
+
end
|
|
43
41
|
_attributes.Text = label
|
|
44
42
|
_attributes.Active = active
|
|
45
43
|
_attributes.Selectable = active
|
|
@@ -61,7 +59,7 @@ local function ToggleButton(props)
|
|
|
61
59
|
local _exp_1 = React.createElement("uicorner", _attributes_2)
|
|
62
60
|
local _attributes_3 = table.clone(styles.stroke)
|
|
63
61
|
setmetatable(_attributes_3, nil)
|
|
64
|
-
return React.createElement(
|
|
62
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, React.createElement("uistroke", _attributes_3))
|
|
65
63
|
end
|
|
66
64
|
local function ToggleButtonGroup(props)
|
|
67
65
|
local _binding = props
|
|
@@ -69,31 +67,31 @@ local function ToggleButtonGroup(props)
|
|
|
69
67
|
local options = _binding.options
|
|
70
68
|
local onChange = _binding.onChange
|
|
71
69
|
local disabled = _binding.disabled
|
|
72
|
-
local size = _binding.size
|
|
73
|
-
local orientation = _binding.orientation
|
|
74
70
|
local className = _binding.className
|
|
75
71
|
local sx = _binding.sx
|
|
76
72
|
local id = _binding.id
|
|
77
73
|
local ref = _binding.ref
|
|
78
|
-
local styles = useToggleButtonStyles({
|
|
79
|
-
|
|
80
|
-
orientation = orientation,
|
|
81
|
-
})
|
|
82
|
-
local _attributes = {
|
|
83
|
-
tag = "frame",
|
|
84
|
-
}
|
|
74
|
+
local styles = useToggleButtonStyles({})
|
|
75
|
+
local _attributes = {}
|
|
85
76
|
local _condition = id
|
|
86
77
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
87
78
|
_condition = "ToggleButtonGroup"
|
|
88
79
|
end
|
|
89
80
|
_attributes.key = _condition
|
|
90
|
-
_attributes.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
_attributes.ref = ref
|
|
82
|
+
for _k, _v in styles.group do
|
|
83
|
+
_attributes[_k] = _v
|
|
84
|
+
end
|
|
85
|
+
if className then
|
|
86
|
+
for _k, _v in className do
|
|
87
|
+
_attributes[_k] = _v
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
if sx then
|
|
91
|
+
for _k, _v in sx do
|
|
92
|
+
_attributes[_k] = _v
|
|
93
|
+
end
|
|
94
|
+
end
|
|
97
95
|
local _attributes_1 = table.clone(styles.list)
|
|
98
96
|
setmetatable(_attributes_1, nil)
|
|
99
97
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -105,7 +103,6 @@ local function ToggleButtonGroup(props)
|
|
|
105
103
|
label = choice.label,
|
|
106
104
|
selected = choice.value == value,
|
|
107
105
|
disabled = disabled == true or choice.disabled == true,
|
|
108
|
-
size = size,
|
|
109
106
|
onActivated = function()
|
|
110
107
|
if choice.value ~= value then
|
|
111
108
|
onChange(choice.value)
|
|
@@ -120,7 +117,7 @@ local function ToggleButtonGroup(props)
|
|
|
120
117
|
_newValue[_k] = _callback(_v, _k - 1, options)
|
|
121
118
|
end
|
|
122
119
|
-- ▲ ReadonlyArray.map ▲
|
|
123
|
-
return React.createElement(
|
|
120
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
124
121
|
end
|
|
125
122
|
local default = ToggleButton
|
|
126
123
|
return {
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { ControlSize } from "../../../../theme/index";
|
|
2
|
-
export type ToggleButtonOrientation = "horizontal" | "vertical";
|
|
3
1
|
declare const useToggleButtonStyles: (props: {
|
|
4
2
|
selected?: boolean;
|
|
5
3
|
disabled?: boolean;
|
|
6
|
-
size?: ControlSize;
|
|
7
|
-
orientation?: ToggleButtonOrientation;
|
|
8
4
|
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
9
5
|
export default useToggleButtonStyles;
|
|
@@ -12,21 +12,10 @@ local useToggleButtonStyles = componentStyles("ToggleButton", function(theme, _p
|
|
|
12
12
|
if disabled == nil then
|
|
13
13
|
disabled = false
|
|
14
14
|
end
|
|
15
|
-
local size = _param.size
|
|
16
|
-
if size == nil then
|
|
17
|
-
size = "medium"
|
|
18
|
-
end
|
|
19
|
-
local orientation = _param.orientation
|
|
20
|
-
if orientation == nil then
|
|
21
|
-
orientation = "horizontal"
|
|
22
|
-
end
|
|
23
|
-
local height = if size == "small" then theme.spacing.calc(3) elseif size == "large" then theme.spacing.calc(5) else theme.spacing.calc(4)
|
|
24
|
-
local textSize = if size == "small" then theme.typography.fontSizes.caption elseif size == "large" then theme.typography.fontSizes.h6 else theme.typography.fontSizes.body
|
|
25
|
-
local pad = theme.padding.calc(if size == "small" then 1 else 1.5)
|
|
26
15
|
return createStyles({
|
|
27
16
|
root = {
|
|
28
17
|
AutomaticSize = Enum.AutomaticSize.X,
|
|
29
|
-
Size = UDim2.new(0, 0, 0,
|
|
18
|
+
Size = UDim2.new(0, 0, 0, theme.spacing.calc(4)),
|
|
30
19
|
BackgroundColor3 = if selected then theme.palette.action.selected else theme.palette.surface.input,
|
|
31
20
|
BorderSizePixel = 0,
|
|
32
21
|
AutoButtonColor = false,
|
|
@@ -34,11 +23,11 @@ local useToggleButtonStyles = componentStyles("ToggleButton", function(theme, _p
|
|
|
34
23
|
Selectable = not disabled,
|
|
35
24
|
TextColor3 = if disabled then theme.palette.text.disabled elseif selected then theme.palette.primary.main else theme.palette.text.primary,
|
|
36
25
|
Font = theme.typography.fontFamilies.default,
|
|
37
|
-
TextSize =
|
|
26
|
+
TextSize = theme.typography.fontSizes.body,
|
|
38
27
|
},
|
|
39
28
|
padding = {
|
|
40
|
-
PaddingLeft = UDim.new(0,
|
|
41
|
-
PaddingRight = UDim.new(0,
|
|
29
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(1.5)),
|
|
30
|
+
PaddingRight = UDim.new(0, theme.padding.calc(1.5)),
|
|
42
31
|
},
|
|
43
32
|
corner = {
|
|
44
33
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -55,7 +44,7 @@ local useToggleButtonStyles = componentStyles("ToggleButton", function(theme, _p
|
|
|
55
44
|
BorderSizePixel = 0,
|
|
56
45
|
},
|
|
57
46
|
list = {
|
|
58
|
-
FillDirection =
|
|
47
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
59
48
|
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
60
49
|
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
61
50
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
@@ -7,7 +7,6 @@ local useRef = _react.useRef
|
|
|
7
7
|
local useState = _react.useState
|
|
8
8
|
local TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
|
|
9
9
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
10
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
10
|
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
12
11
|
local useTooltipStyles = TS.import(script, script.Parent, "Tooltip.styles").default
|
|
13
12
|
local function Tooltip(props)
|
|
@@ -51,18 +50,26 @@ local function Tooltip(props)
|
|
|
51
50
|
useEffect(function()
|
|
52
51
|
return cancel
|
|
53
52
|
end, {})
|
|
54
|
-
local _attributes = {
|
|
55
|
-
tag = "frame",
|
|
56
|
-
}
|
|
53
|
+
local _attributes = {}
|
|
57
54
|
local _condition_1 = id
|
|
58
55
|
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
59
56
|
_condition_1 = "Tooltip"
|
|
60
57
|
end
|
|
61
58
|
_attributes.key = _condition_1
|
|
62
|
-
_attributes.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
_attributes.ref = ref
|
|
60
|
+
for _k, _v in styles.root do
|
|
61
|
+
_attributes[_k] = _v
|
|
62
|
+
end
|
|
63
|
+
if className then
|
|
64
|
+
for _k, _v in className do
|
|
65
|
+
_attributes[_k] = _v
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
if sx then
|
|
69
|
+
for _k, _v in sx do
|
|
70
|
+
_attributes[_k] = _v
|
|
71
|
+
end
|
|
72
|
+
end
|
|
66
73
|
_attributes.Event = {
|
|
67
74
|
MouseEnter = function(rbx)
|
|
68
75
|
setAnchor(rbx)
|
|
@@ -104,7 +111,7 @@ local function Tooltip(props)
|
|
|
104
111
|
preferredHeight = tipHeight,
|
|
105
112
|
}, React.createElement("textlabel", _attributes_1, _exp_1, _exp_2, React.createElement("uistroke", _attributes_4))))
|
|
106
113
|
end
|
|
107
|
-
return React.createElement(
|
|
114
|
+
return React.createElement("frame", _attributes, _exp, _condition_2)
|
|
108
115
|
end
|
|
109
116
|
local default = Tooltip
|
|
110
117
|
return {
|
|
@@ -9,7 +9,6 @@ local useState = _react.useState
|
|
|
9
9
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
10
10
|
local cx = _theme.cx
|
|
11
11
|
local useTheme = _theme.useTheme
|
|
12
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
13
12
|
local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
14
13
|
local Typography = TS.import(script, script.Parent.Parent.Parent, "typography").Typography
|
|
15
14
|
local VirtualList = TS.import(script, script.Parent.Parent.Parent, "virtualList").VirtualList
|
|
@@ -253,18 +252,26 @@ local function TreeView(props)
|
|
|
253
252
|
family = if bold then "bold" else "default",
|
|
254
253
|
}))
|
|
255
254
|
end
|
|
256
|
-
local _attributes = {
|
|
257
|
-
tag = "frame",
|
|
258
|
-
}
|
|
255
|
+
local _attributes = {}
|
|
259
256
|
local _condition = id
|
|
260
257
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
261
258
|
_condition = "TreeView"
|
|
262
259
|
end
|
|
263
260
|
_attributes.key = _condition
|
|
264
|
-
_attributes.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
_attributes.ref = ref
|
|
262
|
+
for _k, _v in root do
|
|
263
|
+
_attributes[_k] = _v
|
|
264
|
+
end
|
|
265
|
+
if className then
|
|
266
|
+
for _k, _v in className do
|
|
267
|
+
_attributes[_k] = _v
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
if sx then
|
|
271
|
+
for _k, _v in sx do
|
|
272
|
+
_attributes[_k] = _v
|
|
273
|
+
end
|
|
274
|
+
end
|
|
268
275
|
local _attributes_1 = {}
|
|
269
276
|
local _object = {
|
|
270
277
|
Text = tree.title,
|
|
@@ -276,7 +283,7 @@ local function TreeView(props)
|
|
|
276
283
|
_attributes_1.color = "textSecondary"
|
|
277
284
|
_attributes_1.variant = "body"
|
|
278
285
|
_attributes_1.family = "bold"
|
|
279
|
-
return React.createElement(
|
|
286
|
+
return React.createElement("frame", _attributes, React.createElement(Typography, _attributes_1), React.createElement(VirtualList, {
|
|
280
287
|
key = "List",
|
|
281
288
|
items = rows,
|
|
282
289
|
getKey = function(entry)
|
|
@@ -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 useTypographyStyles = TS.import(script, script.Parent, "Typography.styles").default
|
|
6
5
|
local function Typography(props)
|
|
7
6
|
local _binding = props
|
|
@@ -17,29 +16,31 @@ local function Typography(props)
|
|
|
17
16
|
local _binding_1 = useTypographyStyles(props)
|
|
18
17
|
local root = _binding_1.root
|
|
19
18
|
local variantToken = _binding_1.variantToken
|
|
20
|
-
local _attributes = {
|
|
21
|
-
tag = "textlabel",
|
|
22
|
-
}
|
|
19
|
+
local _attributes = {}
|
|
23
20
|
local _condition = id
|
|
24
21
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
25
22
|
_condition = "Typography"
|
|
26
23
|
end
|
|
27
24
|
_attributes.key = _condition
|
|
28
|
-
_attributes.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
_attributes.ref = ref
|
|
26
|
+
for _k, _v in root do
|
|
27
|
+
_attributes[_k] = _v
|
|
28
|
+
end
|
|
29
|
+
_attributes.Text = text
|
|
32
30
|
if className ~= 0 and className == className and className ~= "" and className then
|
|
33
31
|
for _k, _v in className do
|
|
34
|
-
|
|
32
|
+
_attributes[_k] = _v
|
|
35
33
|
end
|
|
36
34
|
end
|
|
37
35
|
for _k, _v in variantToken do
|
|
38
|
-
|
|
36
|
+
_attributes[_k] = _v
|
|
37
|
+
end
|
|
38
|
+
if sx ~= 0 and sx == sx and sx ~= "" and sx then
|
|
39
|
+
for _k, _v in sx do
|
|
40
|
+
_attributes[_k] = _v
|
|
41
|
+
end
|
|
39
42
|
end
|
|
40
|
-
|
|
41
|
-
_attributes.sx = sx
|
|
42
|
-
return React.createElement(SxHost, _attributes, children)
|
|
43
|
+
return React.createElement("textlabel", _attributes, children)
|
|
43
44
|
end
|
|
44
45
|
local default = Typography
|
|
45
46
|
return {
|