@rbxts/uiblox 0.2.0-alpha.36 → 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 -8
- package/out/ui/packages/init.luau +0 -24
- 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/reorder/index.d.ts +0 -2
- package/out/ui/packages/reorder/init.luau +0 -14
- package/out/ui/packages/reorder/reorder.d.ts +0 -24
- package/out/ui/packages/reorder/reorder.luau +0 -178
- package/out/ui/packages/reorder/useReorderDrag.d.ts +0 -15
- package/out/ui/packages/reorder/useReorderDrag.luau +0 -129
- package/out/ui/packages/scroll/components/ScrollView.d.ts +0 -7
- package/out/ui/packages/scroll/components/ScrollView.luau +0 -42
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
- package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
- package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
- package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
- package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +0 -9
- package/out/ui/packages/sparkline/components/Sparkline.luau +0 -66
- package/out/ui/packages/sparkline/index.d.ts +0 -3
- package/out/ui/packages/sparkline/init.luau +0 -6
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +0 -8
- package/out/ui/packages/sparkline/sparklineLayout.luau +0 -75
- package/out/ui/packages/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
|
@@ -11,13 +11,8 @@ local function Card(props)
|
|
|
11
11
|
if elevation == nil then
|
|
12
12
|
elevation = "flat"
|
|
13
13
|
end
|
|
14
|
-
local square = _binding.square
|
|
15
14
|
local actions = _binding.actions
|
|
16
15
|
local children = _binding.children
|
|
17
|
-
local className = _binding.className
|
|
18
|
-
local sx = _binding.sx
|
|
19
|
-
local id = _binding.id
|
|
20
|
-
local ref = _binding.ref
|
|
21
16
|
local styles = useCardStyles()
|
|
22
17
|
local _attributes = {
|
|
23
18
|
key = "Column",
|
|
@@ -71,11 +66,6 @@ local function Card(props)
|
|
|
71
66
|
end
|
|
72
67
|
return React.createElement(Paper, {
|
|
73
68
|
elevation = elevation,
|
|
74
|
-
square = square,
|
|
75
|
-
className = className,
|
|
76
|
-
sx = sx,
|
|
77
|
-
id = id,
|
|
78
|
-
ref = ref,
|
|
79
69
|
}, React.createElement("frame", _attributes, _exp, _condition, _condition_1, _exp_1, _condition_2))
|
|
80
70
|
end
|
|
81
71
|
local default = Card
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
4
|
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
6
5
|
local useCFrameEditorStyles = TS.import(script, script.Parent, "CFrameEditor.styles").default
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
6
|
+
local _cframeValue = TS.import(script, script.Parent, "cframeValue")
|
|
7
|
+
local cframeFields = _cframeValue.cframeFields
|
|
8
|
+
local nextCFrameParts = _cframeValue.nextCFrameParts
|
|
10
9
|
local function CFrameEditor(props)
|
|
11
10
|
local _binding = props
|
|
12
11
|
local value = _binding.value
|
|
@@ -26,84 +25,63 @@ local function CFrameEditor(props)
|
|
|
26
25
|
local _arg0 = CFrame.Angles(math.rad(parts[4]), math.rad(parts[5]), math.rad(parts[6]))
|
|
27
26
|
onChange(_cFrame * _arg0)
|
|
28
27
|
end
|
|
29
|
-
local
|
|
30
|
-
local _attributes = {
|
|
31
|
-
key = title,
|
|
32
|
-
}
|
|
33
|
-
for _k, _v in styles.group do
|
|
34
|
-
_attributes[_k] = _v
|
|
35
|
-
end
|
|
36
|
-
_attributes.LayoutOrder = order
|
|
37
|
-
local _attributes_1 = table.clone(styles.wrap)
|
|
38
|
-
setmetatable(_attributes_1, nil)
|
|
39
|
-
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
40
|
-
local _attributes_2 = table.clone(styles.groupLabel)
|
|
41
|
-
setmetatable(_attributes_2, nil)
|
|
42
|
-
_attributes_2.Text = title
|
|
43
|
-
_attributes_2.LayoutOrder = 1
|
|
44
|
-
local _exp_1 = React.createElement("textlabel", _attributes_2)
|
|
45
|
-
local _attributes_3 = {
|
|
46
|
-
key = "Axes",
|
|
47
|
-
}
|
|
48
|
-
for _k, _v in styles.axes do
|
|
49
|
-
_attributes_3[_k] = _v
|
|
50
|
-
end
|
|
51
|
-
_attributes_3.LayoutOrder = 2
|
|
52
|
-
local _attributes_4 = table.clone(styles.row)
|
|
53
|
-
setmetatable(_attributes_4, nil)
|
|
54
|
-
local _exp_2 = React.createElement("uilistlayout", _attributes_4)
|
|
55
|
-
-- ▼ ReadonlyArray.map ▼
|
|
56
|
-
local _newValue = table.create(#fields)
|
|
57
|
-
local _callback = function(field, index)
|
|
58
|
-
local _attributes_5 = {
|
|
59
|
-
key = field,
|
|
60
|
-
}
|
|
61
|
-
for _k, _v in styles.axis do
|
|
62
|
-
_attributes_5[_k] = _v
|
|
63
|
-
end
|
|
64
|
-
_attributes_5.LayoutOrder = index + 1
|
|
65
|
-
local _attributes_6 = table.clone(styles.row)
|
|
66
|
-
setmetatable(_attributes_6, nil)
|
|
67
|
-
local _exp_3 = React.createElement("uilistlayout", _attributes_6)
|
|
68
|
-
local _attributes_7 = table.clone(styles.label)
|
|
69
|
-
setmetatable(_attributes_7, nil)
|
|
70
|
-
_attributes_7.Text = field
|
|
71
|
-
local _exp_4 = React.createElement("textlabel", _attributes_7)
|
|
72
|
-
local _attributes_8 = table.clone(styles.field)
|
|
73
|
-
setmetatable(_attributes_8, nil)
|
|
74
|
-
return React.createElement("frame", _attributes_5, _exp_3, _exp_4, React.createElement("frame", _attributes_8, React.createElement(NumberInput, {
|
|
75
|
-
value = amounts[offset + index + 1],
|
|
76
|
-
disabled = disabled,
|
|
77
|
-
width = UDim.new(1, 0),
|
|
78
|
-
onChange = function(amount)
|
|
79
|
-
return commit(field, amount)
|
|
80
|
-
end,
|
|
81
|
-
})))
|
|
82
|
-
end
|
|
83
|
-
for _k, _v in fields do
|
|
84
|
-
_newValue[_k] = _callback(_v, _k - 1, fields)
|
|
85
|
-
end
|
|
86
|
-
-- ▲ ReadonlyArray.map ▲
|
|
87
|
-
return React.createElement("frame", _attributes, _exp, _exp_1, React.createElement("frame", _attributes_3, _exp_2, React.createElement(React.Fragment, nil, _newValue)))
|
|
88
|
-
end
|
|
89
|
-
local _attributes = {
|
|
90
|
-
tag = "frame",
|
|
91
|
-
}
|
|
28
|
+
local _attributes = {}
|
|
92
29
|
local _condition = id
|
|
93
30
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
94
31
|
_condition = "CFrameEditor"
|
|
95
32
|
end
|
|
96
33
|
_attributes.key = _condition
|
|
97
|
-
_attributes.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
34
|
+
_attributes.ref = ref
|
|
35
|
+
for _k, _v in styles.root do
|
|
36
|
+
_attributes[_k] = _v
|
|
37
|
+
end
|
|
38
|
+
if className then
|
|
39
|
+
for _k, _v in className do
|
|
40
|
+
_attributes[_k] = _v
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
if sx then
|
|
44
|
+
for _k, _v in sx do
|
|
45
|
+
_attributes[_k] = _v
|
|
46
|
+
end
|
|
47
|
+
end
|
|
104
48
|
local _attributes_1 = table.clone(styles.wrap)
|
|
105
49
|
setmetatable(_attributes_1, nil)
|
|
106
|
-
|
|
50
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
51
|
+
local _exp_1 = cframeFields()
|
|
52
|
+
-- ▼ ReadonlyArray.map ▼
|
|
53
|
+
local _newValue = table.create(#_exp_1)
|
|
54
|
+
local _callback = function(field, index)
|
|
55
|
+
local _attributes_2 = {
|
|
56
|
+
key = field,
|
|
57
|
+
}
|
|
58
|
+
for _k, _v in styles.axis do
|
|
59
|
+
_attributes_2[_k] = _v
|
|
60
|
+
end
|
|
61
|
+
_attributes_2.LayoutOrder = index + 1
|
|
62
|
+
local _attributes_3 = table.clone(styles.row)
|
|
63
|
+
setmetatable(_attributes_3, nil)
|
|
64
|
+
local _exp_2 = React.createElement("uilistlayout", _attributes_3)
|
|
65
|
+
local _attributes_4 = table.clone(styles.label)
|
|
66
|
+
setmetatable(_attributes_4, nil)
|
|
67
|
+
_attributes_4.Text = field
|
|
68
|
+
local _exp_3 = React.createElement("textlabel", _attributes_4)
|
|
69
|
+
local _attributes_5 = table.clone(styles.field)
|
|
70
|
+
setmetatable(_attributes_5, nil)
|
|
71
|
+
return React.createElement("frame", _attributes_2, _exp_2, _exp_3, React.createElement("frame", _attributes_5, React.createElement(NumberInput, {
|
|
72
|
+
value = amounts[index + 1],
|
|
73
|
+
disabled = disabled,
|
|
74
|
+
width = UDim.new(1, 0),
|
|
75
|
+
onChange = function(amount)
|
|
76
|
+
return commit(field, amount)
|
|
77
|
+
end,
|
|
78
|
+
})))
|
|
79
|
+
end
|
|
80
|
+
for _k, _v in _exp_1 do
|
|
81
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp_1)
|
|
82
|
+
end
|
|
83
|
+
-- ▲ ReadonlyArray.map ▲
|
|
84
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
107
85
|
end
|
|
108
86
|
local default = CFrameEditor
|
|
109
87
|
return {
|
|
@@ -11,48 +11,31 @@ local useCFrameEditorStyles = componentStyles("CFrameEditor", function(theme)
|
|
|
11
11
|
BackgroundTransparency = 1,
|
|
12
12
|
BorderSizePixel = 0,
|
|
13
13
|
},
|
|
14
|
-
wrap = {
|
|
15
|
-
FillDirection = Enum.FillDirection.Vertical,
|
|
16
|
-
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
17
|
-
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
18
|
-
},
|
|
19
14
|
row = {
|
|
20
15
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
21
|
-
Padding = UDim.new(0, theme.padding.calc(
|
|
16
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
22
17
|
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
23
18
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
24
19
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
groupLabel = {
|
|
31
|
-
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
32
|
-
BackgroundTransparency = 1,
|
|
33
|
-
Font = theme.typography.fontFamilies.default,
|
|
34
|
-
TextSize = theme.typography.fontSizes.button,
|
|
35
|
-
TextColor3 = theme.palette.text.secondary,
|
|
36
|
-
TextXAlignment = Enum.TextXAlignment.Left,
|
|
37
|
-
},
|
|
38
|
-
axes = {
|
|
39
|
-
Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
|
|
40
|
-
BackgroundTransparency = 1,
|
|
20
|
+
wrap = {
|
|
21
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
22
|
+
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
23
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
41
24
|
},
|
|
42
25
|
axis = {
|
|
43
|
-
Size = UDim2.new(1
|
|
26
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
44
27
|
BackgroundTransparency = 1,
|
|
45
28
|
},
|
|
46
29
|
label = {
|
|
47
|
-
Size = UDim2.new(0, theme.spacing.calc(2
|
|
30
|
+
Size = UDim2.new(0, theme.spacing.calc(2), 1, 0),
|
|
48
31
|
BackgroundTransparency = 1,
|
|
49
32
|
Font = theme.typography.fontFamilies.default,
|
|
50
|
-
TextSize = theme.typography.fontSizes.
|
|
33
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
51
34
|
TextColor3 = theme.palette.text.secondary,
|
|
52
35
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
53
36
|
},
|
|
54
37
|
field = {
|
|
55
|
-
Size = UDim2.new(1, -theme.spacing.calc(2
|
|
38
|
+
Size = UDim2.new(1, -theme.spacing.calc(2), 1, 0),
|
|
56
39
|
BackgroundTransparency = 1,
|
|
57
40
|
},
|
|
58
41
|
})
|
|
@@ -5,7 +5,6 @@ local React = _react
|
|
|
5
5
|
local useState = _react.useState
|
|
6
6
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
7
7
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
8
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
8
|
local useCheckboxStyles = TS.import(script, script.Parent, "Checkbox.styles").default
|
|
10
9
|
local _checkboxLook = TS.import(script, script.Parent, "checkboxLook")
|
|
11
10
|
local checkboxBoxTransparency = _checkboxLook.checkboxBoxTransparency
|
|
@@ -46,25 +45,26 @@ local function Checkbox(props)
|
|
|
46
45
|
local pointer = if active then checkboxPointer(hovering, pressed, focused) else "rest"
|
|
47
46
|
local boxTransparency = checkboxBoxTransparency(filled, disabled == true, pointer)
|
|
48
47
|
local strokeTransparency = checkboxStrokeTransparency(filled, disabled == true, pointer)
|
|
49
|
-
local _attributes = {
|
|
50
|
-
tag = "textbutton",
|
|
51
|
-
}
|
|
48
|
+
local _attributes = {}
|
|
52
49
|
local _condition = id
|
|
53
50
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
54
51
|
_condition = "Checkbox"
|
|
55
52
|
end
|
|
56
53
|
_attributes.key = _condition
|
|
57
|
-
_attributes.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
_attributes.ref = ref
|
|
55
|
+
for _k, _v in 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
|
|
68
68
|
_attributes.Active = active
|
|
69
69
|
_attributes.Selectable = not disabled
|
|
70
70
|
_attributes.BackgroundTransparency = if focused and active then 0.85 else 1
|
|
@@ -128,7 +128,7 @@ local function Checkbox(props)
|
|
|
128
128
|
_attributes_6.LayoutOrder = 2
|
|
129
129
|
_condition_1 = (React.createElement("textlabel", _attributes_6))
|
|
130
130
|
end
|
|
131
|
-
return React.createElement(
|
|
131
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_3, _condition_1)
|
|
132
132
|
end
|
|
133
133
|
local default = Checkbox
|
|
134
134
|
return {
|
|
@@ -2,4 +2,4 @@ export type CheckboxPointer = "rest" | "hover" | "press" | "focus";
|
|
|
2
2
|
export declare function checkboxMark(value: boolean, mixed?: boolean): "" | "–" | "✓";
|
|
3
3
|
export declare function checkboxPointer(hovering: boolean, pressed: boolean, focused: boolean): CheckboxPointer;
|
|
4
4
|
export declare function checkboxBoxTransparency(filled: boolean, disabled: boolean, pointer: CheckboxPointer): 1 | 0 | 0.7 | 0.55 | 0.85;
|
|
5
|
-
export declare function checkboxStrokeTransparency(filled: boolean, disabled: boolean, pointer: CheckboxPointer): 0 | 0.25 | 0.
|
|
5
|
+
export declare function checkboxStrokeTransparency(filled: boolean, disabled: boolean, pointer: CheckboxPointer): 0 | 0.25 | 0.55 | 0.45 | 0.2;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChipColor } from "./Chip.styles";
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
3
2
|
export interface ChipProps {
|
|
4
3
|
label: string;
|
|
5
4
|
selected?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
size?: ControlSize;
|
|
8
|
-
variant?: "filled" | "outlined";
|
|
9
|
-
color?: ChipColor;
|
|
10
6
|
onActivated?: () => void;
|
|
11
|
-
onDelete?: () => void;
|
|
12
7
|
}
|
|
13
8
|
declare function Chip(props: CustomizedProps<TextButton, ChipProps>): JSX.Element;
|
|
14
9
|
export default Chip;
|
|
@@ -1,55 +1,42 @@
|
|
|
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 Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
5
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
4
|
local useChipStyles = TS.import(script, script.Parent, "Chip.styles").default
|
|
7
5
|
local function Chip(props)
|
|
8
6
|
local _binding = props
|
|
9
7
|
local label = _binding.label
|
|
10
8
|
local selected = _binding.selected
|
|
11
9
|
local disabled = _binding.disabled
|
|
12
|
-
local size = _binding.size
|
|
13
|
-
local variant = _binding.variant
|
|
14
|
-
if variant == nil then
|
|
15
|
-
variant = "filled"
|
|
16
|
-
end
|
|
17
|
-
local color = _binding.color
|
|
18
|
-
if color == nil then
|
|
19
|
-
color = "default"
|
|
20
|
-
end
|
|
21
10
|
local onActivated = _binding.onActivated
|
|
22
|
-
local onDelete = _binding.onDelete
|
|
23
11
|
local className = _binding.className
|
|
24
12
|
local sx = _binding.sx
|
|
25
13
|
local id = _binding.id
|
|
26
14
|
local ref = _binding.ref
|
|
27
|
-
local deletable = onDelete ~= nil
|
|
28
15
|
local styles = useChipStyles({
|
|
29
16
|
selected = selected,
|
|
30
17
|
disabled = disabled,
|
|
31
|
-
deletable = deletable,
|
|
32
|
-
size = size,
|
|
33
|
-
variant = variant,
|
|
34
|
-
color = color,
|
|
35
18
|
})
|
|
36
|
-
local _attributes = {
|
|
37
|
-
tag = "textbutton",
|
|
38
|
-
}
|
|
19
|
+
local _attributes = {}
|
|
39
20
|
local _condition = id
|
|
40
21
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
41
22
|
_condition = "Chip"
|
|
42
23
|
end
|
|
43
24
|
_attributes.key = _condition
|
|
44
|
-
_attributes.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
_attributes.ref = ref
|
|
26
|
+
for _k, _v in styles.root do
|
|
27
|
+
_attributes[_k] = _v
|
|
28
|
+
end
|
|
29
|
+
if className then
|
|
30
|
+
for _k, _v in className do
|
|
31
|
+
_attributes[_k] = _v
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
if sx then
|
|
35
|
+
for _k, _v in sx do
|
|
36
|
+
_attributes[_k] = _v
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
_attributes.Text = label
|
|
53
40
|
_attributes.Event = {
|
|
54
41
|
Activated = function()
|
|
55
42
|
if disabled ~= true then
|
|
@@ -68,38 +55,7 @@ local function Chip(props)
|
|
|
68
55
|
local _exp_1 = React.createElement("uicorner", _attributes_2)
|
|
69
56
|
local _attributes_3 = table.clone(styles.stroke)
|
|
70
57
|
setmetatable(_attributes_3, nil)
|
|
71
|
-
|
|
72
|
-
local _condition_1 = deletable
|
|
73
|
-
if _condition_1 then
|
|
74
|
-
local _attributes_4 = table.clone(styles.row)
|
|
75
|
-
setmetatable(_attributes_4, nil)
|
|
76
|
-
local _exp_3 = React.createElement("uilistlayout", _attributes_4)
|
|
77
|
-
local _attributes_5 = {
|
|
78
|
-
key = "Label",
|
|
79
|
-
}
|
|
80
|
-
for _k, _v in styles.label do
|
|
81
|
-
_attributes_5[_k] = _v
|
|
82
|
-
end
|
|
83
|
-
_attributes_5.Text = label
|
|
84
|
-
local _exp_4 = React.createElement("textlabel", _attributes_5)
|
|
85
|
-
local _attributes_6 = {
|
|
86
|
-
key = "Delete",
|
|
87
|
-
}
|
|
88
|
-
for _k, _v in styles.delete do
|
|
89
|
-
_attributes_6[_k] = _v
|
|
90
|
-
end
|
|
91
|
-
_attributes_6.Image = tostring(Icons.Close)
|
|
92
|
-
_attributes_6.Active = disabled ~= true
|
|
93
|
-
_attributes_6.Event = {
|
|
94
|
-
Activated = function()
|
|
95
|
-
if disabled ~= true then
|
|
96
|
-
onDelete()
|
|
97
|
-
end
|
|
98
|
-
end,
|
|
99
|
-
}
|
|
100
|
-
_condition_1 = (React.createElement(React.Fragment, nil, _exp_3, _exp_4, React.createElement("imagebutton", _attributes_6)))
|
|
101
|
-
end
|
|
102
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _condition_1)
|
|
58
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, React.createElement("uistroke", _attributes_3))
|
|
103
59
|
end
|
|
104
60
|
local default = Chip
|
|
105
61
|
return {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { ControlSize } from "../../../../theme/index";
|
|
2
|
-
export type ChipColor = "default" | "primary";
|
|
3
1
|
declare const useChipStyles: (props: {
|
|
4
2
|
selected?: boolean;
|
|
5
3
|
disabled?: boolean;
|
|
6
|
-
deletable?: boolean;
|
|
7
|
-
size?: ControlSize;
|
|
8
|
-
variant?: "filled" | "outlined";
|
|
9
|
-
color?: ChipColor;
|
|
10
4
|
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
11
5
|
export default useChipStyles;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
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
|
-
local controlMetrics = _theme.controlMetrics
|
|
6
5
|
local createStyles = _theme.createStyles
|
|
7
6
|
local useChipStyles = componentStyles("Chip", function(theme, _param)
|
|
8
7
|
local selected = _param.selected
|
|
@@ -13,76 +12,32 @@ local useChipStyles = componentStyles("Chip", function(theme, _param)
|
|
|
13
12
|
if disabled == nil then
|
|
14
13
|
disabled = false
|
|
15
14
|
end
|
|
16
|
-
local deletable = _param.deletable
|
|
17
|
-
if deletable == nil then
|
|
18
|
-
deletable = false
|
|
19
|
-
end
|
|
20
|
-
local size = _param.size
|
|
21
|
-
local variant = _param.variant
|
|
22
|
-
if variant == nil then
|
|
23
|
-
variant = "filled"
|
|
24
|
-
end
|
|
25
|
-
local color = _param.color
|
|
26
|
-
if color == nil then
|
|
27
|
-
color = "default"
|
|
28
|
-
end
|
|
29
|
-
local metrics = controlMetrics(theme.density, size)
|
|
30
|
-
local padY = if size == "small" then 0.25 elseif size == "large" then 0.75 else 0.5
|
|
31
|
-
local padX = if size == "small" then 1 elseif size == "large" then 2 else 1.5
|
|
32
|
-
local deletePx = metrics.icon
|
|
33
|
-
local primary = color == "primary"
|
|
34
|
-
local ink = if disabled then theme.palette.text.disabled elseif primary then if variant == "outlined" then theme.palette.primary.main else theme.palette.primary.on else theme.palette.text.primary
|
|
35
15
|
return createStyles({
|
|
36
16
|
root = {
|
|
37
17
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
38
18
|
Size = UDim2.fromScale(0, 0),
|
|
39
|
-
BackgroundColor3 = if
|
|
40
|
-
BackgroundTransparency = if variant == "outlined" and selected ~= true then 1 else 0,
|
|
19
|
+
BackgroundColor3 = if selected then theme.palette.action.selected else theme.palette.surface.input,
|
|
41
20
|
BorderSizePixel = 0,
|
|
42
21
|
AutoButtonColor = false,
|
|
43
22
|
Active = not disabled,
|
|
44
23
|
Selectable = not disabled,
|
|
45
|
-
TextColor3 =
|
|
24
|
+
TextColor3 = if disabled then theme.palette.text.disabled else theme.palette.text.primary,
|
|
46
25
|
Font = theme.typography.fontFamilies.default,
|
|
47
|
-
TextSize =
|
|
26
|
+
TextSize = theme.typography.fontSizes.body,
|
|
48
27
|
},
|
|
49
28
|
padding = {
|
|
50
|
-
PaddingTop = UDim.new(0, theme.padding.calc(
|
|
51
|
-
PaddingBottom = UDim.new(0, theme.padding.calc(
|
|
52
|
-
PaddingLeft = UDim.new(0, theme.padding.calc(
|
|
53
|
-
PaddingRight = UDim.new(0, theme.padding.calc(
|
|
29
|
+
PaddingTop = UDim.new(0, theme.padding.calc(0.5)),
|
|
30
|
+
PaddingBottom = UDim.new(0, theme.padding.calc(0.5)),
|
|
31
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(1.5)),
|
|
32
|
+
PaddingRight = UDim.new(0, theme.padding.calc(1.5)),
|
|
54
33
|
},
|
|
55
34
|
corner = {
|
|
56
35
|
CornerRadius = UDim.new(theme.shape.pillScale, 0),
|
|
57
36
|
},
|
|
58
37
|
stroke = {
|
|
59
|
-
Color =
|
|
38
|
+
Color = theme.palette.border,
|
|
60
39
|
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
61
|
-
Transparency = if
|
|
62
|
-
},
|
|
63
|
-
row = {
|
|
64
|
-
FillDirection = Enum.FillDirection.Horizontal,
|
|
65
|
-
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
66
|
-
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
67
|
-
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
68
|
-
},
|
|
69
|
-
label = {
|
|
70
|
-
AutomaticSize = Enum.AutomaticSize.XY,
|
|
71
|
-
Size = UDim2.fromScale(0, 0),
|
|
72
|
-
BackgroundTransparency = 1,
|
|
73
|
-
BorderSizePixel = 0,
|
|
74
|
-
TextColor3 = ink,
|
|
75
|
-
Font = theme.typography.fontFamilies.default,
|
|
76
|
-
TextSize = metrics.font,
|
|
77
|
-
LayoutOrder = 1,
|
|
78
|
-
},
|
|
79
|
-
delete = {
|
|
80
|
-
Size = UDim2.fromOffset(deletePx, deletePx),
|
|
81
|
-
BackgroundTransparency = 1,
|
|
82
|
-
BorderSizePixel = 0,
|
|
83
|
-
AutoButtonColor = false,
|
|
84
|
-
ImageColor3 = if disabled then theme.palette.text.disabled elseif primary and variant ~= "outlined" then theme.palette.primary.on else theme.palette.text.secondary,
|
|
85
|
-
LayoutOrder = 2,
|
|
40
|
+
Transparency = if selected then 1 else 0,
|
|
86
41
|
},
|
|
87
42
|
})
|
|
88
43
|
end)
|
|
@@ -6,12 +6,10 @@ local useEffect = _react.useEffect
|
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
8
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
9
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
9
|
local _motion = TS.import(script, script.Parent.Parent.Parent, "motion")
|
|
11
10
|
local arcKeys = _motion.arcKeys
|
|
12
11
|
local loopProperty = _motion.loopProperty
|
|
13
12
|
local progressSpin = _motion.progressSpin
|
|
14
|
-
local spinArcKeys = _motion.spinArcKeys
|
|
15
13
|
local function CircularProgress(props)
|
|
16
14
|
local _binding = props
|
|
17
15
|
local value = _binding.value
|
|
@@ -40,17 +38,7 @@ local function CircularProgress(props)
|
|
|
40
38
|
local shown = if indeterminate then (if motion == "spin" then nil else 0.25) else value
|
|
41
39
|
local _result
|
|
42
40
|
if shown == nil then
|
|
43
|
-
|
|
44
|
-
-- ▼ ReadonlyArray.map ▼
|
|
45
|
-
local _newValue = table.create(#_exp)
|
|
46
|
-
local _callback = function(key)
|
|
47
|
-
return NumberSequenceKeypoint.new(key.time, key.transparency)
|
|
48
|
-
end
|
|
49
|
-
for _k, _v in _exp do
|
|
50
|
-
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
51
|
-
end
|
|
52
|
-
-- ▲ ReadonlyArray.map ▲
|
|
53
|
-
_result = NumberSequence.new(_newValue)
|
|
41
|
+
_result = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.35, 1), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(0.65, 1), NumberSequenceKeypoint.new(1, 1) })
|
|
54
42
|
else
|
|
55
43
|
local _exp = arcKeys(shown)
|
|
56
44
|
-- ▼ ReadonlyArray.map ▼
|
|
@@ -78,31 +66,32 @@ local function CircularProgress(props)
|
|
|
78
66
|
end
|
|
79
67
|
gradient.Rotation = -90
|
|
80
68
|
end, { motion })
|
|
81
|
-
local _attributes = {
|
|
82
|
-
tag = "frame",
|
|
83
|
-
}
|
|
69
|
+
local _attributes = {}
|
|
84
70
|
local _condition = id
|
|
85
71
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
86
72
|
_condition = "CircularProgress"
|
|
87
73
|
end
|
|
88
74
|
_attributes.key = _condition
|
|
89
|
-
_attributes.
|
|
90
|
-
_attributes.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
75
|
+
_attributes.ref = ref
|
|
76
|
+
_attributes.Size = UDim2.new(0, size, 0, size)
|
|
77
|
+
_attributes.BackgroundTransparency = 1
|
|
78
|
+
_attributes.BorderSizePixel = 0
|
|
79
|
+
if className then
|
|
80
|
+
for _k, _v in className do
|
|
81
|
+
_attributes[_k] = _v
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
if sx then
|
|
85
|
+
for _k, _v in sx do
|
|
86
|
+
_attributes[_k] = _v
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
return React.createElement("frame", _attributes, React.createElement("uicorner", {
|
|
101
90
|
CornerRadius = UDim.new(1, 0),
|
|
102
91
|
}), React.createElement("uistroke", {
|
|
103
92
|
Color = tint,
|
|
104
93
|
Thickness = thickness,
|
|
105
|
-
Transparency = if disabled then 0.
|
|
94
|
+
Transparency = if disabled then 0.75 else 0.7,
|
|
106
95
|
}), React.createElement("uistroke", {
|
|
107
96
|
Color = tint,
|
|
108
97
|
Thickness = thickness,
|