@rbxts/uiblox 0.2.0-alpha.35 → 0.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -27
- package/out/hooks/index.d.ts +0 -1
- package/out/hooks/init.luau +0 -3
- package/out/hooks/useBreakpoints.luau +11 -2
- package/out/theme/interfaces/theme/Theme.d.ts +0 -15
- package/out/theme/styles/utilities/componentStyles.luau +3 -45
- package/out/theme/styles/utilities/componentTheme.d.ts +0 -15
- package/out/theme/styles/utilities/index.d.ts +0 -2
- package/out/theme/styles/utilities/init.luau +0 -7
- package/out/theme/styles/utilities/resolveStyle.d.ts +2 -10
- package/out/theme/styles/utilities/resolveStyle.luau +3 -7
- package/out/theme/styles/utilities/styleCache.d.ts +0 -2
- package/out/theme/styles/utilities/styleCache.luau +0 -9
- package/out/theme/types/types.d.ts +1 -2
- package/out/ui/packages/accordion/components/Accordion.d.ts +0 -2
- package/out/ui/packages/accordion/components/Accordion.luau +30 -46
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
- package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
- package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
- package/out/ui/packages/alert/components/Alert.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.luau +42 -48
- package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
- package/out/ui/packages/appBar/components/AppBar.luau +36 -47
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
- package/out/ui/packages/appBar/components/AppBar.styles.luau +5 -16
- package/out/ui/packages/assetField/components/AssetField.luau +16 -12
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +0 -8
- package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.luau +26 -27
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
- package/out/ui/packages/badge/components/Badge.d.ts +0 -3
- package/out/ui/packages/badge/components/Badge.luau +24 -32
- package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
- package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +18 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +40 -67
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
- package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/init.luau +0 -3
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +16 -12
- package/out/ui/packages/button/components/Button.luau +18 -20
- package/out/ui/packages/card/components/Card.d.ts +1 -3
- package/out/ui/packages/card/components/Card.luau +0 -10
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +53 -75
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +9 -26
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +1 -6
- package/out/ui/packages/chip/components/Chip.luau +17 -61
- package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -6
- package/out/ui/packages/chip/components/Chip.styles.luau +9 -54
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +18 -29
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +20 -16
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +20 -34
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +35 -34
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +62 -65
- package/out/ui/packages/dialog/components/Dialog.d.ts +2 -3
- package/out/ui/packages/dialog/components/Dialog.luau +21 -41
- package/out/ui/packages/divider/components/Divider.d.ts +0 -1
- package/out/ui/packages/divider/components/Divider.luau +17 -52
- package/out/ui/packages/divider/components/Divider.styles.luau +0 -32
- package/out/ui/packages/drawer/components/Drawer.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.luau +37 -71
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
- package/out/ui/packages/fab/components/Fab.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.luau +37 -79
- package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.styles.luau +3 -39
- package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
- package/out/ui/packages/fab/components/fabSize.luau +0 -4
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +0 -1
- package/out/ui/packages/fontEditor/components/FontEditor.luau +16 -12
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +42 -56
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +4 -37
- package/out/ui/packages/icon/components/Icon.luau +16 -9
- package/out/ui/packages/iconButton/components/IconButton.luau +16 -16
- package/out/ui/packages/index.d.ts +0 -7
- package/out/ui/packages/init.luau +0 -21
- package/out/ui/packages/input/components/Input.d.ts +0 -1
- package/out/ui/packages/input/components/Input.luau +18 -21
- package/out/ui/packages/layout/components/Grid.d.ts +1 -5
- package/out/ui/packages/layout/components/Grid.luau +19 -41
- package/out/ui/packages/layout/components/List.luau +16 -9
- package/out/ui/packages/layout/index.d.ts +0 -14
- package/out/ui/packages/layout/init.luau +0 -5
- package/out/ui/packages/link/components/Link.luau +16 -13
- package/out/ui/packages/listItem/components/ListItem.d.ts +1 -4
- package/out/ui/packages/listItem/components/ListItem.luau +4 -44
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -16
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +1 -5
- package/out/ui/packages/menu/components/Menu.d.ts +1 -7
- package/out/ui/packages/menu/components/Menu.luau +26 -68
- package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
- package/out/ui/packages/modal/components/Modal.d.ts +1 -2
- package/out/ui/packages/modal/components/Modal.luau +37 -79
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +0 -1
- package/out/ui/packages/motion/unit.d.ts +0 -5
- package/out/ui/packages/motion/unit.luau +0 -23
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +0 -2
- package/out/ui/packages/numberInput/components/NumberInput.luau +3 -16
- package/out/ui/packages/numberInput/components/numberValue.d.ts +0 -1
- package/out/ui/packages/numberInput/components/numberValue.luau +0 -45
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +16 -12
- package/out/ui/packages/pagination/components/Pagination.d.ts +1 -6
- package/out/ui/packages/pagination/components/Pagination.luau +38 -62
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -6
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -36
- package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
- package/out/ui/packages/pagination/components/pageRange.luau +8 -91
- package/out/ui/packages/pagination/index.d.ts +0 -1
- package/out/ui/packages/pagination/init.luau +0 -1
- package/out/ui/packages/paper/components/Paper.d.ts +2 -4
- package/out/ui/packages/paper/components/Paper.luau +9 -31
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +38 -63
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +7 -21
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +0 -2
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +0 -14
- package/out/ui/packages/popup/components/Popup.d.ts +1 -2
- package/out/ui/packages/popup/components/Popup.luau +18 -35
- package/out/ui/packages/popup/index.d.ts +0 -1
- package/out/ui/packages/popup/init.luau +0 -1
- package/out/ui/packages/preloader/components/Preloader.luau +16 -9
- package/out/ui/packages/progressBar/components/ProgressBar.luau +16 -12
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +18 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
- package/out/ui/packages/rating/components/Rating.d.ts +1 -3
- package/out/ui/packages/rating/components/Rating.luau +17 -19
- package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -2
- package/out/ui/packages/rating/components/Rating.styles.luau +2 -7
- package/out/ui/packages/rayEditor/components/RayEditor.luau +16 -12
- package/out/ui/packages/rectEditor/components/RectEditor.luau +43 -86
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +7 -30
- package/out/ui/packages/scroll/index.d.ts +0 -2
- package/out/ui/packages/scroll/init.luau +0 -1
- package/out/ui/packages/select/components/Select.d.ts +0 -5
- package/out/ui/packages/select/components/Select.luau +77 -61
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/select/components/selectMotion.d.ts +2 -0
- package/out/ui/packages/select/components/selectMotion.luau +12 -0
- package/out/ui/packages/shadow/components/Shadow.d.ts +1 -2
- package/out/ui/packages/shadow/components/Shadow.luau +17 -39
- package/out/ui/packages/shadow/components/Shadow.styles.luau +2 -7
- package/out/ui/packages/sidebar/components/Sidebar.luau +16 -9
- package/out/ui/packages/skeleton/components/Skeleton.luau +28 -19
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +3 -7
- package/out/ui/packages/slider/components/Slider.d.ts +0 -3
- package/out/ui/packages/slider/components/Slider.luau +19 -47
- package/out/ui/packages/slider/components/Slider.styles.d.ts +0 -2
- package/out/ui/packages/slider/components/Slider.styles.luau +1 -14
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
- package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
- package/out/ui/packages/splitPane/components/SplitPane.luau +17 -13
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +0 -2
- package/out/ui/packages/stateMatrix.luau +929 -843
- package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
- package/out/ui/packages/stepper/components/Stepper.luau +17 -16
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
- package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
- package/out/ui/packages/switch/components/Switch.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.luau +16 -21
- package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +1 -6
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +2 -16
- package/out/ui/packages/table/components/Table.luau +53 -136
- package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
- package/out/ui/packages/table/components/Table.styles.luau +6 -10
- package/out/ui/packages/table/index.d.ts +1 -2
- package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
- package/out/ui/packages/tabs/components/Tabs.luau +19 -24
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
- package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
- package/out/ui/packages/tabs/index.d.ts +0 -1
- package/out/ui/packages/tabs/init.luau +0 -1
- package/out/ui/packages/toast/components/Toast.d.ts +0 -2
- package/out/ui/packages/toast/components/Toast.luau +13 -41
- package/out/ui/packages/toast/components/Toast.styles.luau +5 -23
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +1 -5
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +33 -36
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +5 -16
- package/out/ui/packages/tooltip/components/Tooltip.luau +16 -9
- package/out/ui/packages/treeView/components/TreeView.luau +16 -9
- package/out/ui/packages/typography/components/Typography.luau +14 -13
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +16 -12
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +16 -12
- package/out/ui/packages/virtualList/components/VirtualList.luau +16 -9
- package/out/ui/packages/virtualList/index.d.ts +0 -2
- package/out/ui/packages/virtualList/init.luau +0 -1
- package/package.json +2 -2
- package/out/hooks/viewportObserver.d.ts +0 -10
- package/out/hooks/viewportObserver.luau +0 -75
- package/out/theme/styles/utilities/resolveSx.d.ts +0 -120
- package/out/theme/styles/utilities/resolveSx.luau +0 -524
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
- package/out/ui/packages/backdrop/components/Backdrop.luau +0 -51
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
- package/out/ui/packages/backdrop/index.d.ts +0 -2
- package/out/ui/packages/backdrop/init.luau +0 -5
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +0 -11
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +0 -253
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +0 -18
- package/out/ui/packages/dateRange/dateRangeValue.luau +0 -121
- package/out/ui/packages/dateRange/index.d.ts +0 -3
- package/out/ui/packages/dateRange/init.luau +0 -16
- package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
- package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
- package/out/ui/packages/formText/components/FormHelperText.d.ts +0 -8
- package/out/ui/packages/formText/components/FormHelperText.luau +0 -40
- package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
- package/out/ui/packages/formText/components/FormLabel.luau +0 -42
- package/out/ui/packages/formText/components/FormText.styles.d.ts +0 -5
- package/out/ui/packages/formText/components/FormText.styles.luau +0 -33
- package/out/ui/packages/formText/index.d.ts +0 -4
- package/out/ui/packages/formText/init.luau +0 -6
- package/out/ui/packages/host/components/SxHost.d.ts +0 -18
- package/out/ui/packages/host/components/SxHost.luau +0 -210
- package/out/ui/packages/host/hostPaint.d.ts +0 -12
- package/out/ui/packages/host/hostPaint.luau +0 -34
- package/out/ui/packages/host/hostRules.d.ts +0 -15
- package/out/ui/packages/host/hostRules.luau +0 -92
- package/out/ui/packages/host/index.d.ts +0 -3
- package/out/ui/packages/host/init.luau +0 -13
- package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
- package/out/ui/packages/imageList/components/ImageList.luau +0 -93
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
- package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
- package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
- package/out/ui/packages/imageList/index.d.ts +0 -2
- package/out/ui/packages/imageList/init.luau +0 -5
- package/out/ui/packages/layout/components/Box.d.ts +0 -11
- package/out/ui/packages/layout/components/Box.luau +0 -40
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
- package/out/ui/packages/layout/components/Box.styles.luau +0 -34
- package/out/ui/packages/layout/components/Container.d.ts +0 -10
- package/out/ui/packages/layout/components/Container.luau +0 -45
- package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
- package/out/ui/packages/layout/components/Container.styles.luau +0 -41
- package/out/ui/packages/layout/components/FlexItem.d.ts +0 -12
- package/out/ui/packages/layout/components/FlexItem.luau +0 -40
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +0 -8
- package/out/ui/packages/layout/components/FlexItem.styles.luau +0 -66
- package/out/ui/packages/layout/components/Stack.d.ts +0 -14
- package/out/ui/packages/layout/components/Stack.luau +0 -44
- package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -10
- package/out/ui/packages/layout/components/Stack.styles.luau +0 -101
- package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
- package/out/ui/packages/layout/components/boxPad.luau +0 -59
- package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
- package/out/ui/packages/layout/components/containerWidth.luau +0 -17
- package/out/ui/packages/layout/components/flexItemMode.d.ts +0 -6
- package/out/ui/packages/layout/components/flexItemMode.luau +0 -36
- package/out/ui/packages/layout/components/gridProps.d.ts +0 -3
- package/out/ui/packages/layout/components/gridProps.luau +0 -20
- package/out/ui/packages/layout/components/stackAlign.d.ts +0 -10
- package/out/ui/packages/layout/components/stackAlign.luau +0 -43
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +0 -11
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +0 -2
- package/out/ui/packages/markdown/components/Markdown.d.ts +0 -6
- package/out/ui/packages/markdown/components/Markdown.luau +0 -221
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +0 -2
- package/out/ui/packages/markdown/components/Markdown.styles.luau +0 -101
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +0 -22
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +0 -433
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +0 -6
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +0 -161
- package/out/ui/packages/markdown/components/markdownEditorHeight.d.ts +0 -1
- package/out/ui/packages/markdown/components/markdownEditorHeight.luau +0 -13
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +0 -2
- package/out/ui/packages/markdown/htmlToMarkdown.luau +0 -350
- package/out/ui/packages/markdown/index.d.ts +0 -8
- package/out/ui/packages/markdown/init.luau +0 -11
- package/out/ui/packages/markdown/parseMarkdown.d.ts +0 -42
- package/out/ui/packages/markdown/parseMarkdown.luau +0 -459
- package/out/ui/packages/scroll/components/ScrollView.d.ts +0 -7
- package/out/ui/packages/scroll/components/ScrollView.luau +0 -42
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
- package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
- package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
- package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
- package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +0 -9
- package/out/ui/packages/sparkline/components/Sparkline.luau +0 -66
- package/out/ui/packages/sparkline/index.d.ts +0 -3
- package/out/ui/packages/sparkline/init.luau +0 -6
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +0 -8
- package/out/ui/packages/sparkline/sparklineLayout.luau +0 -75
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -19
- package/out/ui/packages/speedDial/components/SpeedDial.luau +0 -97
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +0 -5
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +0 -31
- package/out/ui/packages/speedDial/index.d.ts +0 -3
- package/out/ui/packages/speedDial/init.luau +0 -5
- package/out/ui/packages/table/components/tableColumns.d.ts +0 -26
- package/out/ui/packages/table/components/tableColumns.luau +0 -92
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
- package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +0 -7
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -43
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +0 -26
|
@@ -1,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 Modal = TS.import(script, script.Parent.Parent.Parent, "modal").Modal
|
|
6
5
|
local useDialogStyles = TS.import(script, script.Parent, "Dialog.styles").default
|
|
7
6
|
local function Dialog(props)
|
|
@@ -12,63 +11,44 @@ local function Dialog(props)
|
|
|
12
11
|
local onClose = _binding.onClose
|
|
13
12
|
local children = _binding.children
|
|
14
13
|
local actions = _binding.actions
|
|
15
|
-
local className = _binding.className
|
|
16
|
-
local sx = _binding.sx
|
|
17
|
-
local id = _binding.id
|
|
18
|
-
local ref = _binding.ref
|
|
19
14
|
local styles = useDialogStyles()
|
|
20
|
-
local hasTitle = title ~= nil and title ~= ""
|
|
21
|
-
local hasActions = actions ~= nil
|
|
22
15
|
local _attributes = {
|
|
23
|
-
|
|
16
|
+
key = "Column",
|
|
24
17
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_condition = "Column"
|
|
18
|
+
for _k, _v in styles.column do
|
|
19
|
+
_attributes[_k] = _v
|
|
28
20
|
end
|
|
29
|
-
_attributes.key = _condition
|
|
30
|
-
_attributes.hostRef = ref
|
|
31
|
-
_attributes.base = styles.column
|
|
32
|
-
_attributes.className = className
|
|
33
|
-
_attributes.sx = sx
|
|
34
21
|
local _attributes_1 = table.clone(styles.columnList)
|
|
35
22
|
setmetatable(_attributes_1, nil)
|
|
36
23
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
37
|
-
local _condition_1 = hasTitle
|
|
38
|
-
if _condition_1 then
|
|
39
|
-
local _attributes_2 = {
|
|
40
|
-
key = "Title",
|
|
41
|
-
}
|
|
42
|
-
for _k, _v in styles.title do
|
|
43
|
-
_attributes_2[_k] = _v
|
|
44
|
-
end
|
|
45
|
-
_attributes_2.Text = title
|
|
46
|
-
_condition_1 = React.createElement("textlabel", _attributes_2)
|
|
47
|
-
end
|
|
48
24
|
local _attributes_2 = {
|
|
25
|
+
key = "Title",
|
|
26
|
+
}
|
|
27
|
+
for _k, _v in styles.title do
|
|
28
|
+
_attributes_2[_k] = _v
|
|
29
|
+
end
|
|
30
|
+
_attributes_2.Text = title
|
|
31
|
+
local _exp_1 = React.createElement("textlabel", _attributes_2)
|
|
32
|
+
local _attributes_3 = {
|
|
49
33
|
key = "Body",
|
|
50
34
|
}
|
|
51
35
|
for _k, _v in styles.body do
|
|
52
|
-
|
|
36
|
+
_attributes_3[_k] = _v
|
|
53
37
|
end
|
|
54
|
-
local
|
|
55
|
-
local
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
for _k, _v in styles.actions do
|
|
61
|
-
_attributes_3[_k] = _v
|
|
62
|
-
end
|
|
63
|
-
local _attributes_4 = table.clone(styles.actionList)
|
|
64
|
-
setmetatable(_attributes_4, nil)
|
|
65
|
-
_condition_2 = (React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), actions))
|
|
38
|
+
local _exp_2 = React.createElement("frame", _attributes_3, children)
|
|
39
|
+
local _attributes_4 = {
|
|
40
|
+
key = "Actions",
|
|
41
|
+
}
|
|
42
|
+
for _k, _v in styles.actions do
|
|
43
|
+
_attributes_4[_k] = _v
|
|
66
44
|
end
|
|
45
|
+
local _attributes_5 = table.clone(styles.actionList)
|
|
46
|
+
setmetatable(_attributes_5, nil)
|
|
67
47
|
return React.createElement(Modal, {
|
|
68
48
|
host = host,
|
|
69
49
|
open = open,
|
|
70
50
|
onClose = onClose,
|
|
71
|
-
}, React.createElement(
|
|
51
|
+
}, React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, React.createElement("frame", _attributes_4, React.createElement("uilistlayout", _attributes_5), actions)))
|
|
72
52
|
end
|
|
73
53
|
local default = Dialog
|
|
74
54
|
return {
|
|
@@ -9,7 +9,6 @@ export interface DividerProps {
|
|
|
9
9
|
transparency?: number;
|
|
10
10
|
weight?: number;
|
|
11
11
|
anchorPoint?: Vector2;
|
|
12
|
-
text?: string;
|
|
13
12
|
}
|
|
14
13
|
declare function Divider<T extends DefaultDividerComponent>(props: CustomizedProps<T, DividerProps>): JSX.Element;
|
|
15
14
|
export default Divider;
|
|
@@ -1,72 +1,37 @@
|
|
|
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 Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
5
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
-
local dividerLabel = TS.import(script, script.Parent, "dividerLabel").dividerLabel
|
|
7
4
|
local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").default
|
|
8
5
|
local function Divider(props)
|
|
9
6
|
local _binding = props
|
|
10
|
-
local text = _binding.text
|
|
11
|
-
local orientation = _binding.orientation
|
|
12
7
|
local className = _binding.className
|
|
13
8
|
local sx = _binding.sx
|
|
14
9
|
local id = _binding.id
|
|
15
10
|
local ref = _binding.ref
|
|
16
11
|
local _binding_1 = useDividerStyles(props)
|
|
17
12
|
local root = _binding_1.root
|
|
18
|
-
local
|
|
19
|
-
local line = _binding_1.line
|
|
20
|
-
local caption = _binding_1.caption
|
|
21
|
-
local captionPad = _binding_1.captionPad
|
|
22
|
-
local label = dividerLabel(text)
|
|
23
|
-
if label ~= nil and orientation ~= Orientations.Vertical then
|
|
24
|
-
local _attributes = {
|
|
25
|
-
tag = "frame",
|
|
26
|
-
}
|
|
27
|
-
local _condition = id
|
|
28
|
-
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
29
|
-
_condition = "Divider"
|
|
30
|
-
end
|
|
31
|
-
_attributes.key = _condition
|
|
32
|
-
_attributes.hostRef = ref
|
|
33
|
-
_attributes.base = shell
|
|
34
|
-
_attributes.className = className
|
|
35
|
-
_attributes.sx = sx
|
|
36
|
-
local _attributes_1 = {
|
|
37
|
-
key = "Line",
|
|
38
|
-
}
|
|
39
|
-
for _k, _v in line do
|
|
40
|
-
_attributes_1[_k] = _v
|
|
41
|
-
end
|
|
42
|
-
local _exp = React.createElement("frame", _attributes_1)
|
|
43
|
-
local _attributes_2 = {
|
|
44
|
-
key = "Label",
|
|
45
|
-
}
|
|
46
|
-
for _k, _v in caption do
|
|
47
|
-
_attributes_2[_k] = _v
|
|
48
|
-
end
|
|
49
|
-
_attributes_2.Text = label
|
|
50
|
-
local _attributes_3 = table.clone(captionPad)
|
|
51
|
-
setmetatable(_attributes_3, nil)
|
|
52
|
-
return React.createElement(SxHost, _attributes, _exp, React.createElement("textlabel", _attributes_2, React.createElement("uipadding", _attributes_3)))
|
|
53
|
-
end
|
|
54
|
-
local _attributes = {
|
|
55
|
-
tag = "frame",
|
|
56
|
-
}
|
|
13
|
+
local _attributes = {}
|
|
57
14
|
local _condition = id
|
|
58
15
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
59
16
|
_condition = "Divider"
|
|
60
17
|
end
|
|
61
18
|
_attributes.key = _condition
|
|
62
|
-
_attributes.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
_attributes.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
19
|
+
_attributes.ref = ref
|
|
20
|
+
for _k, _v in root do
|
|
21
|
+
_attributes[_k] = _v
|
|
22
|
+
end
|
|
23
|
+
_attributes.BorderSizePixel = 0
|
|
24
|
+
if className ~= 0 and className == className and className ~= "" and className then
|
|
25
|
+
for _k, _v in className do
|
|
26
|
+
_attributes[_k] = _v
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
if sx ~= 0 and sx == sx and sx ~= "" and sx then
|
|
30
|
+
for _k, _v in sx do
|
|
31
|
+
_attributes[_k] = _v
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
return React.createElement("frame", _attributes)
|
|
70
35
|
end
|
|
71
36
|
local default = Divider
|
|
72
37
|
return {
|
|
@@ -32,38 +32,6 @@ local useDividerStyles = componentStyles("Divider", function(theme, props)
|
|
|
32
32
|
anchorPoint = Vector2.new(0, 0)
|
|
33
33
|
end
|
|
34
34
|
return createStyles({
|
|
35
|
-
shell = {
|
|
36
|
-
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
37
|
-
BackgroundTransparency = 1,
|
|
38
|
-
BorderSizePixel = 0,
|
|
39
|
-
ClipsDescendants = true,
|
|
40
|
-
},
|
|
41
|
-
line = {
|
|
42
|
-
Size = UDim2.new(1, 0, 0, weight),
|
|
43
|
-
Position = UDim2.new(0, 0, 0.5, 0),
|
|
44
|
-
AnchorPoint = Vector2.new(0, 0.5),
|
|
45
|
-
BackgroundColor3 = color,
|
|
46
|
-
BackgroundTransparency = transparency,
|
|
47
|
-
BorderSizePixel = 0,
|
|
48
|
-
},
|
|
49
|
-
caption = {
|
|
50
|
-
AutomaticSize = Enum.AutomaticSize.X,
|
|
51
|
-
Size = UDim2.new(0, 0, 1, 0),
|
|
52
|
-
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
53
|
-
Position = UDim2.new(0.5, 0, 0.5, 0),
|
|
54
|
-
BackgroundColor3 = theme.palette.surface.canvas,
|
|
55
|
-
BorderSizePixel = 0,
|
|
56
|
-
Font = theme.typography.fontFamilies.default,
|
|
57
|
-
TextSize = theme.typography.fontSizes.caption,
|
|
58
|
-
TextColor3 = theme.palette.text.secondary,
|
|
59
|
-
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
60
|
-
TextXAlignment = Enum.TextXAlignment.Center,
|
|
61
|
-
ZIndex = 2,
|
|
62
|
-
},
|
|
63
|
-
captionPad = {
|
|
64
|
-
PaddingLeft = UDim.new(0, theme.padding.calc(1)),
|
|
65
|
-
PaddingRight = UDim.new(0, theme.padding.calc(1)),
|
|
66
|
-
},
|
|
67
35
|
root = {
|
|
68
36
|
Position = position or UDim2.new(0, 0, 0, 0),
|
|
69
37
|
Size = UDim2.new(if orientation == Orientations.Horizontal then 1 else 0, if orientation == Orientations.Horizontal then -padding * 2 else weight, if orientation == Orientations.Vertical then 1 else 0, if orientation == Orientations.Vertical then -padding * 2 else weight),
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
import { CustomizedProps } from "../../../../theme/index";
|
|
3
2
|
import { DrawerEdge } from "./drawerPlacement";
|
|
4
3
|
export interface DrawerProps {
|
|
5
4
|
host?: Instance;
|
|
6
5
|
open: boolean;
|
|
7
6
|
edge?: DrawerEdge;
|
|
8
|
-
width?: number;
|
|
9
7
|
onClose: () => void;
|
|
10
8
|
children?: React.ReactNode;
|
|
11
9
|
}
|
|
12
|
-
declare function Drawer(props:
|
|
10
|
+
declare function Drawer(props: DrawerProps): JSX.Element | undefined;
|
|
13
11
|
export default Drawer;
|
|
@@ -4,13 +4,9 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
|
-
local useState = _react.useState
|
|
8
7
|
local UserInputService = TS.import(script, TS.getModule(script, "@rbxts", "services")).UserInputService
|
|
9
|
-
local
|
|
8
|
+
local Portal = TS.import(script, script.Parent.Parent.Parent, "popup").Portal
|
|
10
9
|
local isDismissInput = TS.import(script, script.Parent.Parent.Parent, "modal", "components", "dismissInput").isDismissInput
|
|
11
|
-
local _popup = TS.import(script, script.Parent.Parent.Parent, "popup")
|
|
12
|
-
local Portal = _popup.Portal
|
|
13
|
-
local portalTarget = _popup.portalTarget
|
|
14
10
|
local drawerAnchor = TS.import(script, script.Parent, "drawerPlacement").drawerAnchor
|
|
15
11
|
local useDrawerStyles = TS.import(script, script.Parent, "Drawer.styles").default
|
|
16
12
|
local function Drawer(props)
|
|
@@ -21,25 +17,11 @@ local function Drawer(props)
|
|
|
21
17
|
if edge == nil then
|
|
22
18
|
edge = "left"
|
|
23
19
|
end
|
|
24
|
-
local width = _binding.width
|
|
25
20
|
local onClose = _binding.onClose
|
|
26
21
|
local children = _binding.children
|
|
27
|
-
local
|
|
28
|
-
local sx = _binding.sx
|
|
29
|
-
local id = _binding.id
|
|
30
|
-
local ref = _binding.ref
|
|
31
|
-
local styles = useDrawerStyles({
|
|
32
|
-
width = width,
|
|
33
|
-
})
|
|
22
|
+
local styles = useDrawerStyles()
|
|
34
23
|
local close = useRef(onClose)
|
|
35
|
-
local anchor = useRef()
|
|
36
|
-
local layer, setLayer = useState(function()
|
|
37
|
-
return portalTarget(host)
|
|
38
|
-
end)
|
|
39
24
|
close.current = onClose
|
|
40
|
-
useEffect(function()
|
|
41
|
-
setLayer(portalTarget(host or anchor.current))
|
|
42
|
-
end, { host, open })
|
|
43
25
|
useEffect(function()
|
|
44
26
|
if not open then
|
|
45
27
|
return nil
|
|
@@ -52,58 +34,42 @@ local function Drawer(props)
|
|
|
52
34
|
return function()
|
|
53
35
|
return connection:Disconnect()
|
|
54
36
|
end
|
|
55
|
-
end, { open
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
local _exp_1 = React.createElement("textbutton", _attributes_1)
|
|
85
|
-
local _attributes_2 = {
|
|
86
|
-
tag = "frame",
|
|
87
|
-
}
|
|
88
|
-
local _condition_1 = id
|
|
89
|
-
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
90
|
-
_condition_1 = "Panel"
|
|
91
|
-
end
|
|
92
|
-
_attributes_2.key = _condition_1
|
|
93
|
-
_attributes_2.hostRef = ref
|
|
94
|
-
_attributes_2.base = panelStyle
|
|
95
|
-
_attributes_2.className = className
|
|
96
|
-
_attributes_2.sx = sx
|
|
97
|
-
_attributes_2.AnchorPoint = Vector2.new(placement, 0)
|
|
98
|
-
_attributes_2.Position = UDim2.fromScale(placement, 0)
|
|
99
|
-
_attributes_2.ZIndex = panelStyle.ZIndex
|
|
100
|
-
local _attributes_3 = table.clone(styles.padding)
|
|
101
|
-
setmetatable(_attributes_3, nil)
|
|
102
|
-
_condition = (React.createElement(Portal, {
|
|
103
|
-
host = layer,
|
|
104
|
-
}, React.createElement("frame", _attributes, _exp_1, React.createElement(SxHost, _attributes_2, React.createElement("uipadding", _attributes_3), children))))
|
|
37
|
+
end, { open })
|
|
38
|
+
if not open then
|
|
39
|
+
return nil
|
|
40
|
+
end
|
|
41
|
+
local anchor = drawerAnchor(edge)
|
|
42
|
+
local _attributes = {
|
|
43
|
+
key = "Drawer",
|
|
44
|
+
}
|
|
45
|
+
for _k, _v in styles.root do
|
|
46
|
+
_attributes[_k] = _v
|
|
47
|
+
end
|
|
48
|
+
local _attributes_1 = {
|
|
49
|
+
key = "Backdrop",
|
|
50
|
+
}
|
|
51
|
+
for _k, _v in styles.backdrop do
|
|
52
|
+
_attributes_1[_k] = _v
|
|
53
|
+
end
|
|
54
|
+
_attributes_1.Event = {
|
|
55
|
+
Activated = function()
|
|
56
|
+
return close.current()
|
|
57
|
+
end,
|
|
58
|
+
}
|
|
59
|
+
local _exp = React.createElement("textbutton", _attributes_1)
|
|
60
|
+
local _attributes_2 = {
|
|
61
|
+
key = "Panel",
|
|
62
|
+
}
|
|
63
|
+
for _k, _v in styles.panel do
|
|
64
|
+
_attributes_2[_k] = _v
|
|
105
65
|
end
|
|
106
|
-
|
|
66
|
+
_attributes_2.AnchorPoint = Vector2.new(anchor, 0)
|
|
67
|
+
_attributes_2.Position = UDim2.fromScale(anchor, 0)
|
|
68
|
+
local _attributes_3 = table.clone(styles.padding)
|
|
69
|
+
setmetatable(_attributes_3, nil)
|
|
70
|
+
return React.createElement(Portal, {
|
|
71
|
+
host = host,
|
|
72
|
+
}, React.createElement("frame", _attributes, _exp, React.createElement("frame", _attributes_2, React.createElement("uipadding", _attributes_3), children)))
|
|
107
73
|
end
|
|
108
74
|
local default = Drawer
|
|
109
75
|
return {
|
|
@@ -3,8 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local componentStyles = _theme.componentStyles
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
|
-
local useDrawerStyles = componentStyles("Drawer", function(theme
|
|
7
|
-
local width = _param.width
|
|
6
|
+
local useDrawerStyles = componentStyles("Drawer", function(theme)
|
|
8
7
|
return createStyles({
|
|
9
8
|
root = {
|
|
10
9
|
Size = UDim2.fromScale(1, 1),
|
|
@@ -22,7 +21,7 @@ local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
|
|
|
22
21
|
ZIndex = 30000,
|
|
23
22
|
},
|
|
24
23
|
panel = {
|
|
25
|
-
Size = UDim2.new(0,
|
|
24
|
+
Size = UDim2.new(0, theme.spacing.calc(20), 1, 0),
|
|
26
25
|
BackgroundColor3 = theme.palette.surface.elevated,
|
|
27
26
|
BorderSizePixel = 0,
|
|
28
27
|
ZIndex = 30001,
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
import { Icons } from "../../../enums/index";
|
|
3
3
|
import { FabSize } from "./fabSize";
|
|
4
|
-
import { FabColor } from "./Fab.styles";
|
|
5
4
|
export interface FabProps {
|
|
6
5
|
icon: Icons;
|
|
7
|
-
label?: string;
|
|
8
6
|
size?: FabSize;
|
|
9
|
-
color?: FabColor;
|
|
10
7
|
disabled?: boolean;
|
|
11
8
|
loading?: boolean;
|
|
12
9
|
reducedMotion?: boolean;
|
|
@@ -7,24 +7,16 @@ local useState = _react.useState
|
|
|
7
7
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
8
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
9
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
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
|
-
local
|
|
13
|
-
local fabExtended = _fabSize.fabExtended
|
|
14
|
-
local fabIconPixels = _fabSize.fabIconPixels
|
|
11
|
+
local fabIconPixels = TS.import(script, script.Parent, "fabSize").fabIconPixels
|
|
15
12
|
local useFabStyles = TS.import(script, script.Parent, "Fab.styles").default
|
|
16
13
|
local function Fab(props)
|
|
17
14
|
local _binding = props
|
|
18
15
|
local icon = _binding.icon
|
|
19
|
-
local label = _binding.label
|
|
20
16
|
local size = _binding.size
|
|
21
17
|
if size == nil then
|
|
22
18
|
size = "medium"
|
|
23
19
|
end
|
|
24
|
-
local color = _binding.color
|
|
25
|
-
if color == nil then
|
|
26
|
-
color = "primary"
|
|
27
|
-
end
|
|
28
20
|
local disabled = _binding.disabled
|
|
29
21
|
local loading = _binding.loading
|
|
30
22
|
if loading == nil then
|
|
@@ -37,12 +29,9 @@ local function Fab(props)
|
|
|
37
29
|
local id = _binding.id
|
|
38
30
|
local ref = _binding.ref
|
|
39
31
|
local active = canActivate(disabled, loading)
|
|
40
|
-
local extended = fabExtended(label)
|
|
41
32
|
local styles = useFabStyles({
|
|
42
33
|
size = size,
|
|
43
|
-
color = color,
|
|
44
34
|
disabled = not active,
|
|
45
|
-
extended = extended,
|
|
46
35
|
})
|
|
47
36
|
local _binding_1 = useTheme()
|
|
48
37
|
local theme = _binding_1.theme
|
|
@@ -56,52 +45,26 @@ local function Fab(props)
|
|
|
56
45
|
setHovering(false)
|
|
57
46
|
setFocused(false)
|
|
58
47
|
end, { active })
|
|
59
|
-
local
|
|
60
|
-
if loading then
|
|
61
|
-
_result = (React.createElement(CircularProgress, {
|
|
62
|
-
size = iconPx,
|
|
63
|
-
thickness = 2,
|
|
64
|
-
color = theme.palette.primary.on,
|
|
65
|
-
reducedMotion = reducedMotion,
|
|
66
|
-
className = if extended then {
|
|
67
|
-
LayoutOrder = 1,
|
|
68
|
-
} else {
|
|
69
|
-
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
70
|
-
Position = UDim2.fromScale(0.5, 0.5),
|
|
71
|
-
},
|
|
72
|
-
}))
|
|
73
|
-
else
|
|
74
|
-
local _attributes = {
|
|
75
|
-
key = "Icon",
|
|
76
|
-
}
|
|
77
|
-
for _k, _v in styles.icon do
|
|
78
|
-
_attributes[_k] = _v
|
|
79
|
-
end
|
|
80
|
-
_attributes.Size = UDim2.fromOffset(iconPx, iconPx)
|
|
81
|
-
_attributes.AnchorPoint = if extended then Vector2.new(0, 0) else Vector2.new(0.5, 0.5)
|
|
82
|
-
_attributes.Position = if extended then UDim2.fromScale(0, 0) else UDim2.fromScale(0.5, 0.5)
|
|
83
|
-
_attributes.Image = tostring(icon)
|
|
84
|
-
_result = (React.createElement("imagelabel", _attributes))
|
|
85
|
-
end
|
|
86
|
-
local iconEl = _result
|
|
87
|
-
local _attributes = {
|
|
88
|
-
tag = "textbutton",
|
|
89
|
-
}
|
|
48
|
+
local _attributes = {}
|
|
90
49
|
local _condition = id
|
|
91
50
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
92
51
|
_condition = "Fab"
|
|
93
52
|
end
|
|
94
53
|
_attributes.key = _condition
|
|
95
|
-
_attributes.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
54
|
+
_attributes.ref = ref
|
|
55
|
+
for _k, _v in styles.root do
|
|
56
|
+
_attributes[_k] = _v
|
|
57
|
+
end
|
|
58
|
+
if className then
|
|
59
|
+
for _k, _v in className do
|
|
60
|
+
_attributes[_k] = _v
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
if sx then
|
|
64
|
+
for _k, _v in sx do
|
|
65
|
+
_attributes[_k] = _v
|
|
66
|
+
end
|
|
67
|
+
end
|
|
105
68
|
_attributes.Active = active
|
|
106
69
|
_attributes.Selectable = active
|
|
107
70
|
_attributes.BackgroundTransparency = if not active then 0.5 elseif hovering or focused then 0.15 else 0
|
|
@@ -132,37 +95,32 @@ local function Fab(props)
|
|
|
132
95
|
setmetatable(_attributes_1, nil)
|
|
133
96
|
local _exp = React.createElement("uicorner", _attributes_1)
|
|
134
97
|
local _exp_1 = React.createElement(Shadow)
|
|
135
|
-
local
|
|
136
|
-
if
|
|
98
|
+
local _result
|
|
99
|
+
if loading then
|
|
100
|
+
_result = (React.createElement(CircularProgress, {
|
|
101
|
+
size = iconPx,
|
|
102
|
+
thickness = 2,
|
|
103
|
+
color = theme.palette.primary.on,
|
|
104
|
+
reducedMotion = reducedMotion,
|
|
105
|
+
className = {
|
|
106
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
107
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
108
|
+
},
|
|
109
|
+
}))
|
|
110
|
+
else
|
|
137
111
|
local _attributes_2 = {
|
|
138
|
-
key = "
|
|
112
|
+
key = "Icon",
|
|
139
113
|
}
|
|
140
|
-
for _k, _v in styles.
|
|
114
|
+
for _k, _v in styles.icon do
|
|
141
115
|
_attributes_2[_k] = _v
|
|
142
116
|
end
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
local _exp_3 = React.createElement("uilistlayout", _attributes_4)
|
|
149
|
-
local _exp_4 = iconEl
|
|
150
|
-
local _condition_1 = not loading
|
|
151
|
-
if _condition_1 then
|
|
152
|
-
local _attributes_5 = {
|
|
153
|
-
key = "Label",
|
|
154
|
-
}
|
|
155
|
-
for _k, _v in styles.label do
|
|
156
|
-
_attributes_5[_k] = _v
|
|
157
|
-
end
|
|
158
|
-
_attributes_5.Text = label
|
|
159
|
-
_condition_1 = React.createElement("textlabel", _attributes_5)
|
|
160
|
-
end
|
|
161
|
-
_result_1 = (React.createElement("frame", _attributes_2, _exp_2, _exp_3, _exp_4, _condition_1))
|
|
162
|
-
else
|
|
163
|
-
_result_1 = iconEl
|
|
117
|
+
_attributes_2.Size = UDim2.fromOffset(iconPx, iconPx)
|
|
118
|
+
_attributes_2.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
119
|
+
_attributes_2.Position = UDim2.fromScale(0.5, 0.5)
|
|
120
|
+
_attributes_2.Image = tostring(icon)
|
|
121
|
+
_result = (React.createElement("imagelabel", _attributes_2))
|
|
164
122
|
end
|
|
165
|
-
return React.createElement(
|
|
123
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, _result)
|
|
166
124
|
end
|
|
167
125
|
local default = Fab
|
|
168
126
|
return {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { FabSize } from "./fabSize";
|
|
2
|
-
export type FabColor = "primary" | "accent";
|
|
3
2
|
export interface FabStyleProps {
|
|
4
3
|
size?: FabSize;
|
|
5
|
-
color?: FabColor;
|
|
6
4
|
disabled?: boolean;
|
|
7
|
-
extended?: boolean;
|
|
8
5
|
}
|
|
9
6
|
declare const useFabStyles: (props: FabStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
10
7
|
export default useFabStyles;
|
|
@@ -9,19 +9,12 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
9
9
|
if size == nil then
|
|
10
10
|
size = "medium"
|
|
11
11
|
end
|
|
12
|
-
local color = _param.color
|
|
13
|
-
if color == nil then
|
|
14
|
-
color = "primary"
|
|
15
|
-
end
|
|
16
12
|
local disabled = _param.disabled
|
|
17
|
-
local extended = _param.extended
|
|
18
13
|
local diameter = fabPixels(size)
|
|
19
|
-
local tone = if color == "accent" then theme.palette.accent else theme.palette.primary
|
|
20
14
|
return createStyles({
|
|
21
15
|
root = {
|
|
22
|
-
Size =
|
|
23
|
-
|
|
24
|
-
BackgroundColor3 = tone.main,
|
|
16
|
+
Size = UDim2.fromOffset(diameter, diameter),
|
|
17
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
25
18
|
BackgroundTransparency = if disabled then 0.5 else 0,
|
|
26
19
|
BorderSizePixel = 0,
|
|
27
20
|
AutoButtonColor = false,
|
|
@@ -31,42 +24,13 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
31
24
|
corner = {
|
|
32
25
|
CornerRadius = UDim.new(1, 0),
|
|
33
26
|
},
|
|
34
|
-
content = {
|
|
35
|
-
Size = UDim2.new(0, 0, 0, diameter),
|
|
36
|
-
AutomaticSize = Enum.AutomaticSize.X,
|
|
37
|
-
BackgroundTransparency = 1,
|
|
38
|
-
BorderSizePixel = 0,
|
|
39
|
-
},
|
|
40
|
-
padding = {
|
|
41
|
-
PaddingLeft = UDim.new(0, theme.padding.calc(2)),
|
|
42
|
-
PaddingRight = UDim.new(0, theme.padding.calc(2.5)),
|
|
43
|
-
},
|
|
44
|
-
row = {
|
|
45
|
-
FillDirection = Enum.FillDirection.Horizontal,
|
|
46
|
-
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
47
|
-
HorizontalAlignment = Enum.HorizontalAlignment.Center,
|
|
48
|
-
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
49
|
-
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
50
|
-
},
|
|
51
27
|
icon = {
|
|
52
28
|
Size = UDim2.fromScale(1, 1),
|
|
53
29
|
BackgroundTransparency = 1,
|
|
54
30
|
BorderSizePixel = 0,
|
|
55
31
|
ScaleType = Enum.ScaleType.Fit,
|
|
56
|
-
ImageColor3 =
|
|
32
|
+
ImageColor3 = theme.palette.primary.on,
|
|
57
33
|
ImageTransparency = if disabled then 0.5 else 0,
|
|
58
|
-
LayoutOrder = 1,
|
|
59
|
-
},
|
|
60
|
-
label = {
|
|
61
|
-
AutomaticSize = Enum.AutomaticSize.XY,
|
|
62
|
-
Size = UDim2.fromScale(0, 0),
|
|
63
|
-
BackgroundTransparency = 1,
|
|
64
|
-
BorderSizePixel = 0,
|
|
65
|
-
Font = theme.typography.fontFamilies.default,
|
|
66
|
-
TextSize = theme.typography.fontSizes.body,
|
|
67
|
-
TextColor3 = tone.on,
|
|
68
|
-
TextTransparency = if disabled then 0.5 else 0,
|
|
69
|
-
LayoutOrder = 2,
|
|
70
34
|
},
|
|
71
35
|
})
|
|
72
36
|
end)
|