@rbxts/uiblox 0.1.53 → 0.2.0-alpha.1
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 +107 -28
- package/out/foundation/guard.d.ts +3 -0
- package/out/foundation/guard.luau +23 -0
- package/out/foundation/index.d.ts +1 -0
- package/out/foundation/init.luau +8 -0
- package/out/hooks/breakpoints.d.ts +10 -0
- package/out/hooks/breakpoints.luau +60 -0
- package/out/hooks/index.d.ts +4 -0
- package/out/hooks/init.luau +10 -0
- package/out/hooks/useBreakpoints.d.ts +6 -0
- package/out/hooks/useBreakpoints.luau +39 -0
- package/out/hooks/useReducedMotion.d.ts +1 -0
- package/out/hooks/useReducedMotion.luau +12 -0
- package/out/index.d.ts +3 -0
- package/out/init.luau +9 -0
- package/out/interaction/index.d.ts +4 -0
- package/out/interaction/init.luau +9 -0
- package/out/interaction/pointerRoute.d.ts +6 -0
- package/out/interaction/pointerRoute.luau +35 -0
- package/out/interaction/usePointer.d.ts +11 -0
- package/out/interaction/usePointer.luau +99 -0
- package/out/theme/constants/ColorConstants.d.ts +0 -3
- package/out/theme/constants/ColorConstants.luau +0 -96
- package/out/theme/constants/NumberConstants.d.ts +1 -1
- package/out/theme/constants/NumberConstants.luau +3 -4
- package/out/theme/context/ThemeProvider.d.ts +3 -0
- package/out/theme/context/ThemeProvider.luau +15 -8
- package/out/theme/context/themeScope.d.ts +5 -0
- package/out/theme/context/themeScope.luau +7 -0
- package/out/theme/hooks/useTheme.luau +15 -14
- package/out/theme/interfaces/density/controlMetrics.d.ts +21 -0
- package/out/theme/interfaces/density/controlMetrics.luau +67 -0
- package/out/theme/interfaces/density/index.d.ts +1 -0
- package/out/theme/interfaces/density/init.luau +7 -0
- package/out/theme/interfaces/index.d.ts +1 -0
- package/out/theme/interfaces/init.luau +3 -0
- package/out/theme/interfaces/palette/Palette.d.ts +39 -18
- package/out/theme/interfaces/palette/colors/index.d.ts +0 -1
- package/out/theme/interfaces/palette/index.d.ts +1 -0
- package/out/theme/interfaces/theme/Theme.d.ts +13 -0
- package/out/theme/interfaces/theme/ThemeConstants.d.ts +0 -18
- package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +7 -7
- package/out/theme/styles/index.d.ts +1 -2
- package/out/theme/styles/init.luau +3 -1
- package/out/theme/styles/types/index.d.ts +0 -1
- package/out/theme/styles/utilities/classNames.d.ts +3 -2
- package/out/theme/styles/utilities/classNames.luau +7 -173
- package/out/theme/styles/utilities/componentStyles.d.ts +7 -0
- package/out/theme/styles/utilities/componentStyles.luau +31 -0
- package/out/theme/styles/utilities/componentTheme.d.ts +20 -0
- package/out/theme/styles/utilities/componentTheme.luau +53 -0
- package/out/theme/styles/utilities/createStyles.d.ts +1 -2
- package/out/theme/styles/utilities/index.d.ts +5 -1
- package/out/theme/styles/utilities/init.luau +9 -1
- package/out/theme/styles/utilities/makeStyles.luau +14 -15
- package/out/theme/styles/utilities/resolveStyle.d.ts +32 -0
- package/out/theme/styles/utilities/resolveStyle.luau +66 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +68 -0
- package/out/theme/styles/utilities/variants.d.ts +19 -0
- package/out/theme/styles/utilities/variants.luau +59 -0
- package/out/theme/themes/DarkTheme.luau +4 -57
- package/out/theme/themes/LightTheme.luau +4 -57
- package/out/theme/themes/createPalette.d.ts +3 -0
- package/out/theme/themes/createPalette.luau +111 -0
- package/out/theme/themes/index.d.ts +1 -0
- package/out/theme/themes/init.luau +3 -0
- package/out/theme/types/types.d.ts +1 -0
- package/out/theme/utilites/colorMath.d.ts +8 -0
- package/out/theme/utilites/colorMath.luau +35 -0
- package/out/theme/utilites/index.d.ts +1 -0
- package/out/theme/utilites/init.luau +6 -0
- package/out/ui/enums/Icons.d.ts +5 -1
- package/out/ui/enums/Icons.luau +4 -0
- package/out/ui/index.d.ts +12 -0
- package/out/ui/init.luau +5 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +11 -0
- package/out/ui/packages/accordion/components/Accordion.luau +93 -0
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +4 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +65 -0
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
- package/out/ui/packages/accordion/components/accordionOpen.luau +10 -0
- package/out/ui/packages/accordion/index.d.ts +2 -0
- package/out/ui/packages/accordion/init.luau +5 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +10 -0
- package/out/ui/packages/appBar/components/AppBar.luau +77 -0
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +6 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +66 -0
- package/out/ui/packages/appBar/index.d.ts +3 -0
- package/out/ui/packages/appBar/init.luau +5 -0
- package/out/ui/packages/assetField/components/AssetField.d.ts +10 -0
- package/out/ui/packages/assetField/components/AssetField.luau +75 -0
- package/out/ui/packages/assetField/components/AssetField.styles.d.ts +2 -0
- package/out/ui/packages/assetField/components/AssetField.styles.luau +33 -0
- package/out/ui/packages/assetField/components/assetPreviewUri.d.ts +1 -0
- package/out/ui/packages/assetField/components/assetPreviewUri.luau +25 -0
- package/out/ui/packages/assetField/index.d.ts +2 -0
- package/out/ui/packages/assetField/init.luau +5 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.d.ts +5 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +47 -0
- package/out/ui/packages/autocomplete/components/autocompleteSearchable.d.ts +1 -0
- package/out/ui/packages/autocomplete/components/autocompleteSearchable.luau +7 -0
- package/out/ui/packages/autocomplete/index.d.ts +2 -0
- package/out/ui/packages/autocomplete/init.luau +5 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +8 -0
- package/out/ui/packages/avatar/components/Avatar.luau +69 -0
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +4 -0
- package/out/ui/packages/avatar/components/Avatar.styles.luau +39 -0
- package/out/ui/packages/avatar/components/avatarText.d.ts +1 -0
- package/out/ui/packages/avatar/components/avatarText.luau +17 -0
- package/out/ui/packages/avatar/index.d.ts +3 -0
- package/out/ui/packages/avatar/init.luau +6 -0
- package/out/ui/packages/badge/components/Badge.d.ts +10 -0
- package/out/ui/packages/badge/components/Badge.luau +69 -0
- package/out/ui/packages/badge/components/Badge.styles.d.ts +2 -0
- package/out/ui/packages/badge/components/Badge.styles.luau +38 -0
- package/out/ui/packages/badge/components/badgeValue.d.ts +1 -0
- package/out/ui/packages/badge/components/badgeValue.luau +7 -0
- package/out/ui/packages/badge/index.d.ts +3 -0
- package/out/ui/packages/badge/init.luau +6 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +10 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +86 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +58 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/init.luau +5 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +11 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +82 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +47 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +7 -0
- package/out/ui/packages/breadcrumbs/index.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/init.luau +5 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.d.ts +9 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +234 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.d.ts +2 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +98 -0
- package/out/ui/packages/brickColorPicker/components/brickColorCatalog.d.ts +1 -0
- package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +26 -0
- package/out/ui/packages/brickColorPicker/components/brickColorFilter.d.ts +2 -0
- package/out/ui/packages/brickColorPicker/components/brickColorFilter.luau +26 -0
- package/out/ui/packages/brickColorPicker/index.d.ts +3 -0
- package/out/ui/packages/brickColorPicker/init.luau +8 -0
- package/out/ui/packages/button/components/Button.d.ts +4 -0
- package/out/ui/packages/button/components/Button.luau +86 -34
- package/out/ui/packages/button/components/Button.styles.luau +15 -35
- package/out/ui/packages/button/components/activation.d.ts +1 -0
- package/out/ui/packages/button/components/activation.luau +7 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +12 -0
- package/out/ui/packages/button/components/buttonLook.luau +55 -0
- package/out/ui/packages/button/types/ButtonSize.d.ts +1 -1
- package/out/ui/packages/card/components/Card.d.ts +11 -0
- package/out/ui/packages/card/components/Card.luau +74 -0
- package/out/ui/packages/card/components/Card.styles.d.ts +2 -0
- package/out/ui/packages/card/components/Card.styles.luau +66 -0
- package/out/ui/packages/card/index.d.ts +2 -0
- package/out/ui/packages/card/init.luau +5 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.d.ts +8 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +89 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.d.ts +2 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +46 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +3 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +15 -0
- package/out/ui/packages/cframeEditor/index.d.ts +2 -0
- package/out/ui/packages/cframeEditor/init.luau +5 -0
- package/out/ui/packages/checkbox/components/Checkbox.d.ts +11 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +136 -0
- package/out/ui/packages/checkbox/components/Checkbox.styles.d.ts +6 -0
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +69 -0
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +5 -0
- package/out/ui/packages/checkbox/components/checkboxLook.luau +52 -0
- package/out/ui/packages/checkbox/components/nextChecked.d.ts +1 -0
- package/out/ui/packages/checkbox/components/nextChecked.luau +7 -0
- package/out/ui/packages/checkbox/index.d.ts +2 -0
- package/out/ui/packages/checkbox/init.luau +5 -0
- package/out/ui/packages/chip/components/Chip.d.ts +9 -0
- package/out/ui/packages/chip/components/Chip.luau +63 -0
- package/out/ui/packages/chip/components/Chip.styles.d.ts +5 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +47 -0
- package/out/ui/packages/chip/index.d.ts +2 -0
- package/out/ui/packages/chip/init.luau +5 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.d.ts +11 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +109 -0
- package/out/ui/packages/circularProgress/index.d.ts +2 -0
- package/out/ui/packages/circularProgress/init.luau +5 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.d.ts +8 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +512 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +145 -0
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.d.ts +8 -0
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +190 -0
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.d.ts +8 -0
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +240 -0
- package/out/ui/packages/colorPicker/components/colorValue.d.ts +22 -0
- package/out/ui/packages/colorPicker/components/colorValue.luau +157 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +26 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +307 -0
- package/out/ui/packages/colorPicker/index.d.ts +11 -0
- package/out/ui/packages/colorPicker/init.luau +37 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +11 -0
- package/out/ui/packages/dialog/components/Dialog.luau +56 -0
- package/out/ui/packages/dialog/components/Dialog.styles.d.ts +2 -0
- package/out/ui/packages/dialog/components/Dialog.styles.luau +55 -0
- package/out/ui/packages/dialog/index.d.ts +2 -0
- package/out/ui/packages/dialog/init.luau +5 -0
- package/out/ui/packages/divider/components/Divider.luau +6 -0
- package/out/ui/packages/divider/components/Divider.styles.luau +4 -4
- package/out/ui/packages/drawer/components/Drawer.d.ts +11 -0
- package/out/ui/packages/drawer/components/Drawer.luau +77 -0
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +2 -0
- package/out/ui/packages/drawer/components/Drawer.styles.luau +40 -0
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +2 -0
- package/out/ui/packages/drawer/components/drawerPlacement.luau +7 -0
- package/out/ui/packages/drawer/index.d.ts +3 -0
- package/out/ui/packages/drawer/init.luau +5 -0
- package/out/ui/packages/enumPicker/components/EnumPicker.d.ts +11 -0
- package/out/ui/packages/enumPicker/components/EnumPicker.luau +42 -0
- package/out/ui/packages/enumPicker/components/enumOptions.d.ts +5 -0
- package/out/ui/packages/enumPicker/components/enumOptions.luau +28 -0
- package/out/ui/packages/enumPicker/index.d.ts +2 -0
- package/out/ui/packages/enumPicker/init.luau +5 -0
- package/out/ui/packages/fab/components/Fab.d.ts +13 -0
- package/out/ui/packages/fab/components/Fab.luau +128 -0
- package/out/ui/packages/fab/components/Fab.styles.d.ts +7 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +40 -0
- package/out/ui/packages/fab/components/fabSize.d.ts +3 -0
- package/out/ui/packages/fab/components/fabSize.luau +29 -0
- package/out/ui/packages/fab/index.d.ts +3 -0
- package/out/ui/packages/fab/init.luau +8 -0
- package/out/ui/packages/fontEditor/components/FontEditor.d.ts +8 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +223 -0
- package/out/ui/packages/fontEditor/components/FontEditor.styles.d.ts +2 -0
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +56 -0
- package/out/ui/packages/fontEditor/components/fontValue.d.ts +10 -0
- package/out/ui/packages/fontEditor/components/fontValue.luau +81 -0
- package/out/ui/packages/fontEditor/index.d.ts +4 -0
- package/out/ui/packages/fontEditor/init.luau +10 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.d.ts +10 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +156 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.d.ts +2 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -0
- package/out/ui/packages/gradientEditor/components/gradientPatch.d.ts +8 -0
- package/out/ui/packages/gradientEditor/components/gradientPatch.luau +17 -0
- package/out/ui/packages/gradientEditor/components/gradientValue.d.ts +9 -0
- package/out/ui/packages/gradientEditor/components/gradientValue.luau +23 -0
- package/out/ui/packages/gradientEditor/index.d.ts +2 -0
- package/out/ui/packages/gradientEditor/init.luau +5 -0
- package/out/ui/packages/icon/components/Icon.luau +6 -0
- package/out/ui/packages/icon/components/Icon.styles.luau +7 -7
- package/out/ui/packages/iconButton/components/IconButton.d.ts +3 -0
- package/out/ui/packages/iconButton/components/IconButton.luau +53 -5
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +7 -7
- package/out/ui/packages/index.d.ts +49 -0
- package/out/ui/packages/init.luau +147 -0
- package/out/ui/packages/input/components/Input.d.ts +8 -1
- package/out/ui/packages/input/components/Input.luau +180 -60
- package/out/ui/packages/input/components/Input.styles.d.ts +3 -1
- package/out/ui/packages/input/components/Input.styles.luau +79 -53
- package/out/ui/packages/input/components/inputDraft.d.ts +1 -0
- package/out/ui/packages/input/components/inputDraft.luau +17 -0
- package/out/ui/packages/input/components/inputInsets.d.ts +4 -0
- package/out/ui/packages/input/components/inputInsets.luau +10 -0
- package/out/ui/packages/layout/components/Grid.luau +8 -2
- package/out/ui/packages/layout/components/List.luau +8 -2
- package/out/ui/packages/listItem/components/ListItem.d.ts +9 -0
- package/out/ui/packages/listItem/components/ListItem.luau +67 -0
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +5 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +64 -0
- package/out/ui/packages/listItem/index.d.ts +2 -0
- package/out/ui/packages/listItem/init.luau +5 -0
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +11 -2
- package/out/ui/packages/menu/components/Menu.d.ts +14 -0
- package/out/ui/packages/menu/components/Menu.luau +60 -0
- package/out/ui/packages/menu/components/Menu.styles.d.ts +2 -0
- package/out/ui/packages/menu/components/Menu.styles.luau +26 -0
- package/out/ui/packages/menu/index.d.ts +2 -0
- package/out/ui/packages/menu/init.luau +5 -0
- package/out/ui/packages/modal/components/Modal.d.ts +9 -0
- package/out/ui/packages/modal/components/Modal.luau +97 -0
- package/out/ui/packages/modal/components/Modal.styles.d.ts +2 -0
- package/out/ui/packages/modal/components/Modal.styles.luau +47 -0
- package/out/ui/packages/modal/components/dismissInput.d.ts +1 -0
- package/out/ui/packages/modal/components/dismissInput.luau +8 -0
- package/out/ui/packages/modal/components/focusTrap.d.ts +2 -0
- package/out/ui/packages/modal/components/focusTrap.luau +22 -0
- package/out/ui/packages/modal/index.d.ts +2 -0
- package/out/ui/packages/modal/init.luau +5 -0
- package/out/ui/packages/motion/duration.d.ts +2 -0
- package/out/ui/packages/motion/duration.luau +17 -0
- package/out/ui/packages/motion/index.d.ts +5 -0
- package/out/ui/packages/motion/init.luau +16 -0
- package/out/ui/packages/motion/loop.d.ts +1 -0
- package/out/ui/packages/motion/loop.luau +18 -0
- package/out/ui/packages/motion/play.d.ts +1 -0
- package/out/ui/packages/motion/play.luau +23 -0
- package/out/ui/packages/motion/resolveReduced.d.ts +1 -0
- package/out/ui/packages/motion/resolveReduced.luau +10 -0
- package/out/ui/packages/motion/unit.d.ts +8 -0
- package/out/ui/packages/motion/unit.luau +80 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +16 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +48 -0
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +29 -0
- package/out/ui/packages/numberInput/index.d.ts +2 -0
- package/out/ui/packages/numberInput/init.luau +5 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.d.ts +8 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +96 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.d.ts +2 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +41 -0
- package/out/ui/packages/numberRangeEditor/components/numberRangeValue.d.ts +4 -0
- package/out/ui/packages/numberRangeEditor/components/numberRangeValue.luau +16 -0
- package/out/ui/packages/numberRangeEditor/index.d.ts +2 -0
- package/out/ui/packages/numberRangeEditor/init.luau +5 -0
- package/out/ui/packages/pagination/components/Pagination.d.ts +9 -0
- package/out/ui/packages/pagination/components/Pagination.luau +72 -0
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +2 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +39 -0
- package/out/ui/packages/pagination/components/pageRange.d.ts +1 -0
- package/out/ui/packages/pagination/components/pageRange.luau +24 -0
- package/out/ui/packages/pagination/index.d.ts +2 -0
- package/out/ui/packages/pagination/init.luau +5 -0
- package/out/ui/packages/paper/components/Paper.d.ts +8 -0
- package/out/ui/packages/paper/components/Paper.luau +31 -0
- package/out/ui/packages/paper/components/Paper.styles.d.ts +4 -0
- package/out/ui/packages/paper/components/Paper.styles.luau +32 -0
- package/out/ui/packages/paper/index.d.ts +2 -0
- package/out/ui/packages/paper/init.luau +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.d.ts +8 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +85 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +46 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +3 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/physicalPropertiesEditor/index.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/init.luau +5 -0
- package/out/ui/packages/popup/components/Popup.d.ts +13 -0
- package/out/ui/packages/popup/components/Popup.luau +131 -0
- package/out/ui/packages/popup/components/Portal.d.ts +7 -0
- package/out/ui/packages/popup/components/Portal.luau +15 -0
- package/out/ui/packages/popup/components/placement.d.ts +9 -0
- package/out/ui/packages/popup/components/placement.luau +41 -0
- package/out/ui/packages/popup/components/portalTarget.d.ts +1 -0
- package/out/ui/packages/popup/components/portalTarget.luau +13 -0
- package/out/ui/packages/popup/index.d.ts +4 -0
- package/out/ui/packages/popup/init.luau +6 -0
- package/out/ui/packages/preloader/components/Preloader.luau +6 -0
- package/out/ui/packages/preloader/components/Preloader.styles.luau +3 -3
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +8 -1
- package/out/ui/packages/progressBar/components/ProgressBar.luau +61 -11
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +2 -2
- package/out/ui/packages/progressBar/index.d.ts +2 -3
- package/out/ui/packages/progressBar/init.luau +3 -4
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +16 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +112 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +6 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +66 -0
- package/out/ui/packages/radioGroup/index.d.ts +2 -0
- package/out/ui/packages/radioGroup/init.luau +5 -0
- package/out/ui/packages/rayEditor/components/RayEditor.d.ts +8 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +83 -0
- package/out/ui/packages/rayEditor/components/RayEditor.styles.d.ts +2 -0
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +37 -0
- package/out/ui/packages/rayEditor/components/rayParts.d.ts +1 -0
- package/out/ui/packages/rayEditor/components/rayParts.luau +10 -0
- package/out/ui/packages/rayEditor/index.d.ts +2 -0
- package/out/ui/packages/rayEditor/init.luau +5 -0
- package/out/ui/packages/rectEditor/components/RectEditor.d.ts +8 -0
- package/out/ui/packages/rectEditor/components/RectEditor.luau +85 -0
- package/out/ui/packages/rectEditor/components/RectEditor.styles.d.ts +2 -0
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +46 -0
- package/out/ui/packages/rectEditor/components/rectValue.d.ts +3 -0
- package/out/ui/packages/rectEditor/components/rectValue.luau +14 -0
- package/out/ui/packages/rectEditor/index.d.ts +2 -0
- package/out/ui/packages/rectEditor/init.luau +5 -0
- package/out/ui/packages/scroll/dragScroll.d.ts +8 -0
- package/out/ui/packages/scroll/dragScroll.luau +51 -0
- package/out/ui/packages/scroll/index.d.ts +2 -0
- package/out/ui/packages/scroll/init.luau +5 -0
- package/out/ui/packages/scroll/useDragScroll.d.ts +5 -0
- package/out/ui/packages/scroll/useDragScroll.luau +127 -0
- package/out/ui/packages/select/components/Select.d.ts +16 -0
- package/out/ui/packages/select/components/Select.luau +455 -0
- package/out/ui/packages/select/components/Select.styles.d.ts +6 -0
- package/out/ui/packages/select/components/Select.styles.luau +104 -0
- package/out/ui/packages/select/components/optionLabel.d.ts +1 -0
- package/out/ui/packages/select/components/optionLabel.luau +7 -0
- package/out/ui/packages/select/components/selectFilter.d.ts +4 -0
- package/out/ui/packages/select/components/selectFilter.luau +27 -0
- package/out/ui/packages/select/components/selectFocus.d.ts +4 -0
- package/out/ui/packages/select/components/selectFocus.luau +16 -0
- package/out/ui/packages/select/components/selectGroups.d.ts +18 -0
- package/out/ui/packages/select/components/selectGroups.luau +38 -0
- package/out/ui/packages/select/components/selectKey.d.ts +4 -0
- package/out/ui/packages/select/components/selectKey.luau +14 -0
- 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/select/components/selectMulti.d.ts +5 -0
- package/out/ui/packages/select/components/selectMulti.luau +26 -0
- package/out/ui/packages/select/components/selectTypeahead.d.ts +4 -0
- package/out/ui/packages/select/components/selectTypeahead.luau +58 -0
- package/out/ui/packages/select/components/stepChoice.d.ts +3 -0
- package/out/ui/packages/select/components/stepChoice.luau +24 -0
- package/out/ui/packages/select/index.d.ts +3 -0
- package/out/ui/packages/select/init.luau +8 -0
- package/out/ui/packages/shadow/components/Shadow.styles.luau +3 -3
- package/out/ui/packages/sidebar/components/Sidebar.luau +6 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +5 -5
- package/out/ui/packages/skeleton/components/Skeleton.d.ts +15 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +224 -0
- package/out/ui/packages/skeleton/components/Skeleton.styles.d.ts +2 -0
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +27 -0
- package/out/ui/packages/skeleton/components/skeletonMotion.d.ts +3 -0
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +17 -0
- package/out/ui/packages/skeleton/index.d.ts +3 -0
- package/out/ui/packages/skeleton/init.luau +7 -0
- package/out/ui/packages/slider/components/Slider.d.ts +13 -0
- package/out/ui/packages/slider/components/Slider.luau +204 -0
- package/out/ui/packages/slider/components/Slider.styles.d.ts +6 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +47 -0
- package/out/ui/packages/slider/components/sliderNudge.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderNudge.luau +39 -0
- package/out/ui/packages/slider/index.d.ts +2 -0
- package/out/ui/packages/slider/init.luau +5 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +11 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +41 -0
- package/out/ui/packages/snackbar/index.d.ts +2 -0
- package/out/ui/packages/snackbar/init.luau +5 -0
- package/out/ui/packages/splitPane/components/SplitPane.d.ts +14 -0
- package/out/ui/packages/splitPane/components/SplitPane.luau +241 -0
- package/out/ui/packages/splitPane/components/SplitPane.styles.d.ts +2 -0
- package/out/ui/packages/splitPane/components/SplitPane.styles.luau +59 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +5 -0
- package/out/ui/packages/splitPane/components/splitLook.luau +49 -0
- package/out/ui/packages/splitPane/components/splitSize.d.ts +10 -0
- package/out/ui/packages/splitPane/components/splitSize.luau +46 -0
- package/out/ui/packages/splitPane/index.d.ts +2 -0
- package/out/ui/packages/splitPane/init.luau +5 -0
- package/out/ui/packages/stateMatrix.d.ts +30 -0
- package/out/ui/packages/stateMatrix.luau +1471 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +7 -0
- package/out/ui/packages/stepper/components/Stepper.luau +62 -0
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.styles.luau +39 -0
- package/out/ui/packages/stepper/components/stepState.d.ts +2 -0
- package/out/ui/packages/stepper/components/stepState.luau +13 -0
- package/out/ui/packages/stepper/index.d.ts +3 -0
- package/out/ui/packages/stepper/init.luau +6 -0
- package/out/ui/packages/switch/components/Switch.d.ts +11 -0
- package/out/ui/packages/switch/components/Switch.luau +170 -0
- package/out/ui/packages/switch/components/Switch.styles.d.ts +6 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +62 -0
- package/out/ui/packages/switch/components/switchLook.d.ts +10 -0
- package/out/ui/packages/switch/components/switchLook.luau +63 -0
- package/out/ui/packages/switch/index.d.ts +2 -0
- package/out/ui/packages/switch/init.luau +5 -0
- package/out/ui/packages/table/components/Table.d.ts +9 -0
- package/out/ui/packages/table/components/Table.luau +135 -0
- package/out/ui/packages/table/components/Table.styles.d.ts +2 -0
- package/out/ui/packages/table/components/Table.styles.luau +70 -0
- package/out/ui/packages/table/components/rowSelected.d.ts +1 -0
- package/out/ui/packages/table/components/rowSelected.luau +7 -0
- package/out/ui/packages/table/index.d.ts +2 -0
- package/out/ui/packages/table/init.luau +5 -0
- package/out/ui/packages/tabs/components/Tabs.d.ts +10 -0
- package/out/ui/packages/tabs/components/Tabs.luau +113 -0
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +2 -0
- package/out/ui/packages/tabs/components/Tabs.styles.luau +55 -0
- package/out/ui/packages/tabs/index.d.ts +2 -0
- package/out/ui/packages/tabs/init.luau +5 -0
- package/out/ui/packages/toast/components/Toast.luau +6 -0
- package/out/ui/packages/toast/components/Toast.styles.luau +23 -10
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +7 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +119 -0
- package/out/ui/packages/tooltip/components/Tooltip.styles.d.ts +2 -0
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +43 -0
- package/out/ui/packages/tooltip/index.d.ts +2 -0
- package/out/ui/packages/tooltip/init.luau +5 -0
- package/out/ui/packages/treeView/components/TreeView.d.ts +1 -0
- package/out/ui/packages/treeView/components/TreeView.luau +201 -225
- package/out/ui/packages/treeView/components/TreeView.styles.luau +9 -37
- package/out/ui/packages/treeView/components/treeRows.d.ts +23 -0
- package/out/ui/packages/treeView/components/treeRows.luau +147 -0
- package/out/ui/packages/treeView/interfaces/Branch.d.ts +3 -0
- package/out/ui/packages/treeView/interfaces/Leaf.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +6 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +8 -11
- package/out/ui/packages/udimEditor/components/UDimEditor.d.ts +8 -0
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +127 -0
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.d.ts +2 -0
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +50 -0
- package/out/ui/packages/udimEditor/index.d.ts +2 -0
- package/out/ui/packages/udimEditor/init.luau +5 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.d.ts +10 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +87 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.d.ts +2 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +41 -0
- package/out/ui/packages/vectorEditor/components/vectorValue.d.ts +10 -0
- package/out/ui/packages/vectorEditor/components/vectorValue.luau +49 -0
- package/out/ui/packages/vectorEditor/index.d.ts +4 -0
- package/out/ui/packages/vectorEditor/init.luau +11 -0
- package/out/ui/packages/virtualList/components/VirtualList.d.ts +23 -0
- package/out/ui/packages/virtualList/components/VirtualList.luau +178 -0
- package/out/ui/packages/virtualList/components/VirtualList.styles.d.ts +2 -0
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +29 -0
- package/out/ui/packages/virtualList/components/virtualWindow.d.ts +10 -0
- package/out/ui/packages/virtualList/components/virtualWindow.luau +66 -0
- package/out/ui/packages/virtualList/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +5 -0
- package/package.json +7 -3
- package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -42
- package/out/theme/interfaces/palette/colors/Colors.luau +0 -2
- package/out/theme/styles/types/ConditionalStylesMap.d.ts +0 -2
- package/out/theme/styles/types/ConditionalStylesMap.luau +0 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
|
+
local stepState = TS.import(script, script.Parent, "stepState").stepState
|
|
6
|
+
local useStepperStyles = TS.import(script, script.Parent, "Stepper.styles").default
|
|
7
|
+
local function Stepper(props)
|
|
8
|
+
local _binding = props
|
|
9
|
+
local steps = _binding.steps
|
|
10
|
+
local activeStep = _binding.activeStep
|
|
11
|
+
local className = _binding.className
|
|
12
|
+
local sx = _binding.sx
|
|
13
|
+
local id = _binding.id
|
|
14
|
+
local ref = _binding.ref
|
|
15
|
+
local styles = useStepperStyles()
|
|
16
|
+
local _attributes = {}
|
|
17
|
+
local _condition = id
|
|
18
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
19
|
+
_condition = "Stepper"
|
|
20
|
+
end
|
|
21
|
+
_attributes.key = _condition
|
|
22
|
+
_attributes.ref = ref
|
|
23
|
+
for _k, _v in styles.root do
|
|
24
|
+
_attributes[_k] = _v
|
|
25
|
+
end
|
|
26
|
+
if className then
|
|
27
|
+
for _k, _v in className do
|
|
28
|
+
_attributes[_k] = _v
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
if sx then
|
|
32
|
+
for _k, _v in sx do
|
|
33
|
+
_attributes[_k] = _v
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
local _attributes_1 = table.clone(styles.list)
|
|
37
|
+
setmetatable(_attributes_1, nil)
|
|
38
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
39
|
+
-- ▼ ReadonlyArray.map ▼
|
|
40
|
+
local _newValue = table.create(#steps)
|
|
41
|
+
local _callback = function(label, index)
|
|
42
|
+
local state = stepState(index, activeStep)
|
|
43
|
+
local _attributes_2 = {
|
|
44
|
+
key = `{label}-{index}`,
|
|
45
|
+
}
|
|
46
|
+
for _k, _v in cx(styles.step, state == "active" and styles.active, state == "complete" and styles.complete) do
|
|
47
|
+
_attributes_2[_k] = _v
|
|
48
|
+
end
|
|
49
|
+
_attributes_2.Text = `{index + 1}. {label}`
|
|
50
|
+
_attributes_2.LayoutOrder = index
|
|
51
|
+
return React.createElement("textlabel", _attributes_2)
|
|
52
|
+
end
|
|
53
|
+
for _k, _v in steps do
|
|
54
|
+
_newValue[_k] = _callback(_v, _k - 1, steps)
|
|
55
|
+
end
|
|
56
|
+
-- ▲ ReadonlyArray.map ▲
|
|
57
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
58
|
+
end
|
|
59
|
+
local default = Stepper
|
|
60
|
+
return {
|
|
61
|
+
default = default,
|
|
62
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local useStepperStyles = componentStyles("Stepper", function(theme)
|
|
7
|
+
return createStyles({
|
|
8
|
+
root = {
|
|
9
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
10
|
+
Size = UDim2.fromScale(0, 0),
|
|
11
|
+
BackgroundTransparency = 1,
|
|
12
|
+
BorderSizePixel = 0,
|
|
13
|
+
},
|
|
14
|
+
list = {
|
|
15
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
16
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
17
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
18
|
+
},
|
|
19
|
+
step = {
|
|
20
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
21
|
+
Size = UDim2.fromScale(0, 0),
|
|
22
|
+
BackgroundTransparency = 1,
|
|
23
|
+
BorderSizePixel = 0,
|
|
24
|
+
Font = theme.typography.fontFamilies.default,
|
|
25
|
+
TextSize = theme.typography.fontSizes.body,
|
|
26
|
+
TextColor3 = theme.palette.text.secondary,
|
|
27
|
+
},
|
|
28
|
+
active = {
|
|
29
|
+
TextColor3 = theme.palette.primary.main,
|
|
30
|
+
},
|
|
31
|
+
complete = {
|
|
32
|
+
TextColor3 = theme.palette.text.primary,
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
end)
|
|
36
|
+
local default = useStepperStyles
|
|
37
|
+
return {
|
|
38
|
+
default = default,
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function stepState(index, activeStep)
|
|
3
|
+
if index < activeStep then
|
|
4
|
+
return "complete"
|
|
5
|
+
end
|
|
6
|
+
if index == activeStep then
|
|
7
|
+
return "active"
|
|
8
|
+
end
|
|
9
|
+
return "pending"
|
|
10
|
+
end
|
|
11
|
+
return {
|
|
12
|
+
stepState = stepState,
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
value: boolean;
|
|
4
|
+
onChange: (value: boolean) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
size?: ControlSize;
|
|
8
|
+
reducedMotion?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Switch(props: CustomizedProps<TextButton, SwitchProps>): JSX.Element;
|
|
11
|
+
export default Switch;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useRef = _react.useRef
|
|
7
|
+
local useState = _react.useState
|
|
8
|
+
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
9
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
10
|
+
local controlMetrics = _theme.controlMetrics
|
|
11
|
+
local cx = _theme.cx
|
|
12
|
+
local useTheme = _theme.useTheme
|
|
13
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
14
|
+
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion").playProperty
|
|
15
|
+
local useSwitchStyles = TS.import(script, script.Parent, "Switch.styles").default
|
|
16
|
+
local _switchLook = TS.import(script, script.Parent, "switchLook")
|
|
17
|
+
local switchPointer = _switchLook.switchPointer
|
|
18
|
+
local switchStrokeTransparency = _switchLook.switchStrokeTransparency
|
|
19
|
+
local switchThumbPlacement = _switchLook.switchThumbPlacement
|
|
20
|
+
local switchThumbTransparency = _switchLook.switchThumbTransparency
|
|
21
|
+
local switchTrackTransparency = _switchLook.switchTrackTransparency
|
|
22
|
+
local THUMB_SECONDS = 0.14
|
|
23
|
+
local function Switch(props)
|
|
24
|
+
local _binding = props
|
|
25
|
+
local value = _binding.value
|
|
26
|
+
local onChange = _binding.onChange
|
|
27
|
+
local disabled = _binding.disabled
|
|
28
|
+
local label = _binding.label
|
|
29
|
+
local size = _binding.size
|
|
30
|
+
local reducedProp = _binding.reducedMotion
|
|
31
|
+
local className = _binding.className
|
|
32
|
+
local sx = _binding.sx
|
|
33
|
+
local id = _binding.id
|
|
34
|
+
local ref = _binding.ref
|
|
35
|
+
local reducedMotion = useReducedMotion(reducedProp)
|
|
36
|
+
local _binding_1 = useTheme()
|
|
37
|
+
local theme = _binding_1.theme
|
|
38
|
+
local _binding_2 = useSwitchStyles({
|
|
39
|
+
size = size,
|
|
40
|
+
})
|
|
41
|
+
local root = _binding_2.root
|
|
42
|
+
local row = _binding_2.row
|
|
43
|
+
local track = _binding_2.track
|
|
44
|
+
local trackOn = _binding_2.trackOn
|
|
45
|
+
local knob = _binding_2.knob
|
|
46
|
+
local labelStyle = _binding_2.label
|
|
47
|
+
local corner = _binding_2.corner
|
|
48
|
+
local stroke = _binding_2.stroke
|
|
49
|
+
local hovering, setHovering = useState(false)
|
|
50
|
+
local pressed, setPressed = useState(false)
|
|
51
|
+
local focused, setFocused = useState(false)
|
|
52
|
+
local knobRef = useRef()
|
|
53
|
+
local placed = useRef(false)
|
|
54
|
+
local active = canActivate(disabled)
|
|
55
|
+
local pointer = if active then switchPointer(hovering, pressed, focused) else "rest"
|
|
56
|
+
local on = value == true
|
|
57
|
+
local inset = controlMetrics(theme.density, size).switchInset
|
|
58
|
+
local placement = switchThumbPlacement(on, inset)
|
|
59
|
+
useEffect(function()
|
|
60
|
+
local thumb = knobRef.current
|
|
61
|
+
if not thumb then
|
|
62
|
+
return nil
|
|
63
|
+
end
|
|
64
|
+
local goal = {
|
|
65
|
+
Position = UDim2.new(placement.scaleX, placement.offsetX, 0.5, 0),
|
|
66
|
+
AnchorPoint = Vector2.new(placement.anchorX, 0.5),
|
|
67
|
+
}
|
|
68
|
+
if not placed.current or reducedMotion == true then
|
|
69
|
+
thumb.Position = goal.Position
|
|
70
|
+
thumb.AnchorPoint = goal.AnchorPoint
|
|
71
|
+
placed.current = true
|
|
72
|
+
return nil
|
|
73
|
+
end
|
|
74
|
+
return playProperty(thumb, goal, THUMB_SECONDS, reducedMotion)
|
|
75
|
+
end, { placement.scaleX, placement.offsetX, placement.anchorX, reducedMotion })
|
|
76
|
+
local _attributes = {}
|
|
77
|
+
local _condition = id
|
|
78
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
79
|
+
_condition = "Switch"
|
|
80
|
+
end
|
|
81
|
+
_attributes.key = _condition
|
|
82
|
+
_attributes.ref = ref
|
|
83
|
+
for _k, _v in root do
|
|
84
|
+
_attributes[_k] = _v
|
|
85
|
+
end
|
|
86
|
+
if className then
|
|
87
|
+
for _k, _v in className do
|
|
88
|
+
_attributes[_k] = _v
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
if sx then
|
|
92
|
+
for _k, _v in sx do
|
|
93
|
+
_attributes[_k] = _v
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
_attributes.Active = active
|
|
97
|
+
_attributes.Selectable = not disabled
|
|
98
|
+
_attributes.BackgroundTransparency = if focused and active then 0.85 else 1
|
|
99
|
+
_attributes.Event = {
|
|
100
|
+
MouseButton1Click = function()
|
|
101
|
+
if active then
|
|
102
|
+
onChange(not value)
|
|
103
|
+
end
|
|
104
|
+
end,
|
|
105
|
+
MouseButton1Down = function()
|
|
106
|
+
if active then
|
|
107
|
+
setPressed(true)
|
|
108
|
+
end
|
|
109
|
+
end,
|
|
110
|
+
MouseButton1Up = function()
|
|
111
|
+
return setPressed(false)
|
|
112
|
+
end,
|
|
113
|
+
MouseEnter = function()
|
|
114
|
+
if active then
|
|
115
|
+
setHovering(true)
|
|
116
|
+
end
|
|
117
|
+
end,
|
|
118
|
+
MouseLeave = function()
|
|
119
|
+
setHovering(false)
|
|
120
|
+
setPressed(false)
|
|
121
|
+
end,
|
|
122
|
+
SelectionGained = function()
|
|
123
|
+
return setFocused(true)
|
|
124
|
+
end,
|
|
125
|
+
SelectionLost = function()
|
|
126
|
+
return setFocused(false)
|
|
127
|
+
end,
|
|
128
|
+
}
|
|
129
|
+
local _attributes_1 = table.clone(row)
|
|
130
|
+
setmetatable(_attributes_1, nil)
|
|
131
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
132
|
+
local _attributes_2 = table.clone(cx(track, on and trackOn, {
|
|
133
|
+
BackgroundTransparency = switchTrackTransparency(on, disabled == true, pointer),
|
|
134
|
+
}))
|
|
135
|
+
setmetatable(_attributes_2, nil)
|
|
136
|
+
_attributes_2.LayoutOrder = 1
|
|
137
|
+
local _attributes_3 = table.clone(corner)
|
|
138
|
+
setmetatable(_attributes_3, nil)
|
|
139
|
+
local _exp_1 = React.createElement("uicorner", _attributes_3)
|
|
140
|
+
local _attributes_4 = table.clone(cx(stroke, {
|
|
141
|
+
Transparency = switchStrokeTransparency(disabled == true, pointer),
|
|
142
|
+
}))
|
|
143
|
+
setmetatable(_attributes_4, nil)
|
|
144
|
+
local _exp_2 = React.createElement("uistroke", _attributes_4)
|
|
145
|
+
local _attributes_5 = {
|
|
146
|
+
ref = knobRef,
|
|
147
|
+
}
|
|
148
|
+
for _k, _v in cx(knob, {
|
|
149
|
+
BackgroundTransparency = switchThumbTransparency(disabled == true),
|
|
150
|
+
}) do
|
|
151
|
+
_attributes_5[_k] = _v
|
|
152
|
+
end
|
|
153
|
+
local _attributes_6 = table.clone(corner)
|
|
154
|
+
setmetatable(_attributes_6, nil)
|
|
155
|
+
local _exp_3 = React.createElement("frame", _attributes_2, _exp_1, _exp_2, React.createElement("frame", _attributes_5, React.createElement("uicorner", _attributes_6)))
|
|
156
|
+
local _condition_1 = label ~= nil
|
|
157
|
+
if _condition_1 then
|
|
158
|
+
local _attributes_7 = table.clone(labelStyle)
|
|
159
|
+
setmetatable(_attributes_7, nil)
|
|
160
|
+
_attributes_7.Text = label
|
|
161
|
+
_attributes_7.TextTransparency = if disabled == true then 0.5 else 0
|
|
162
|
+
_attributes_7.LayoutOrder = 2
|
|
163
|
+
_condition_1 = (React.createElement("textlabel", _attributes_7))
|
|
164
|
+
end
|
|
165
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_3, _condition_1)
|
|
166
|
+
end
|
|
167
|
+
local default = Switch
|
|
168
|
+
return {
|
|
169
|
+
default = default,
|
|
170
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ControlSize } from "../../../../theme/index";
|
|
2
|
+
export interface SwitchStyleProps {
|
|
3
|
+
size?: ControlSize;
|
|
4
|
+
}
|
|
5
|
+
declare const useSwitchStyles: (props: SwitchStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
6
|
+
export default useSwitchStyles;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local controlMetrics = _theme.controlMetrics
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local componentStyles = _theme.componentStyles
|
|
7
|
+
local useSwitchStyles = componentStyles("Switch", function(theme, _param)
|
|
8
|
+
local size = _param.size
|
|
9
|
+
local metrics = controlMetrics(theme.density, size)
|
|
10
|
+
return createStyles({
|
|
11
|
+
root = {
|
|
12
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
13
|
+
BackgroundTransparency = 1,
|
|
14
|
+
BorderSizePixel = 0,
|
|
15
|
+
Size = UDim2.fromScale(0, 0),
|
|
16
|
+
Text = "",
|
|
17
|
+
AutoButtonColor = false,
|
|
18
|
+
},
|
|
19
|
+
row = {
|
|
20
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
21
|
+
Padding = UDim.new(0, theme.padding.default),
|
|
22
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
23
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
24
|
+
},
|
|
25
|
+
track = {
|
|
26
|
+
Size = UDim2.fromOffset(metrics.switchTrackW, metrics.switchTrackH),
|
|
27
|
+
BackgroundColor3 = theme.palette.action.disabled,
|
|
28
|
+
BorderSizePixel = 0,
|
|
29
|
+
},
|
|
30
|
+
trackOn = {
|
|
31
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
32
|
+
},
|
|
33
|
+
knob = {
|
|
34
|
+
Size = UDim2.fromOffset(metrics.switchThumb, metrics.switchThumb),
|
|
35
|
+
BackgroundColor3 = theme.palette.surface.elevated,
|
|
36
|
+
BorderSizePixel = 0,
|
|
37
|
+
ZIndex = 2,
|
|
38
|
+
},
|
|
39
|
+
label = {
|
|
40
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
41
|
+
BackgroundTransparency = 1,
|
|
42
|
+
Size = UDim2.fromScale(0, 0),
|
|
43
|
+
TextColor3 = theme.palette.text.primary,
|
|
44
|
+
Font = theme.typography.fontFamilies.default,
|
|
45
|
+
TextSize = metrics.font,
|
|
46
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
47
|
+
TextWrapped = true,
|
|
48
|
+
},
|
|
49
|
+
corner = {
|
|
50
|
+
CornerRadius = UDim.new(1, 0),
|
|
51
|
+
},
|
|
52
|
+
stroke = {
|
|
53
|
+
Color = theme.palette.focus,
|
|
54
|
+
Thickness = 2,
|
|
55
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
end)
|
|
59
|
+
local default = useSwitchStyles
|
|
60
|
+
return {
|
|
61
|
+
default = default,
|
|
62
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SwitchPointer = "rest" | "hover" | "press" | "focus";
|
|
2
|
+
export declare function switchPointer(hovering: boolean, pressed: boolean, focused: boolean): SwitchPointer;
|
|
3
|
+
export declare function switchTrackTransparency(on: boolean, disabled: boolean, pointer: SwitchPointer): 0.08 | 0.35 | 0 | 0.25 | 0.65 | 0.55 | 0.15;
|
|
4
|
+
export declare function switchThumbTransparency(disabled: boolean): 0.35 | 0;
|
|
5
|
+
export declare function switchStrokeTransparency(disabled: boolean, pointer: SwitchPointer): 1 | 0.35 | 0;
|
|
6
|
+
export declare function switchThumbPlacement(on: boolean, inset: number): {
|
|
7
|
+
scaleX: number;
|
|
8
|
+
offsetX: number;
|
|
9
|
+
anchorX: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function switchPointer(hovering, pressed, focused)
|
|
3
|
+
if pressed then
|
|
4
|
+
return "press"
|
|
5
|
+
end
|
|
6
|
+
if focused then
|
|
7
|
+
return "focus"
|
|
8
|
+
end
|
|
9
|
+
if hovering then
|
|
10
|
+
return "hover"
|
|
11
|
+
end
|
|
12
|
+
return "rest"
|
|
13
|
+
end
|
|
14
|
+
local function switchTrackTransparency(on, disabled, pointer)
|
|
15
|
+
if disabled then
|
|
16
|
+
return if on then 0.55 else 0.65
|
|
17
|
+
end
|
|
18
|
+
if not on then
|
|
19
|
+
if pointer == "press" then
|
|
20
|
+
return 0.15
|
|
21
|
+
end
|
|
22
|
+
if pointer == "hover" or pointer == "focus" then
|
|
23
|
+
return 0.25
|
|
24
|
+
end
|
|
25
|
+
return 0.35
|
|
26
|
+
end
|
|
27
|
+
if pointer == "press" then
|
|
28
|
+
return 0.15
|
|
29
|
+
end
|
|
30
|
+
if pointer == "hover" then
|
|
31
|
+
return 0.08
|
|
32
|
+
end
|
|
33
|
+
return 0
|
|
34
|
+
end
|
|
35
|
+
local function switchThumbTransparency(disabled)
|
|
36
|
+
return if disabled then 0.35 else 0
|
|
37
|
+
end
|
|
38
|
+
local function switchStrokeTransparency(disabled, pointer)
|
|
39
|
+
if disabled then
|
|
40
|
+
return 1
|
|
41
|
+
end
|
|
42
|
+
if pointer == "focus" or pointer == "press" then
|
|
43
|
+
return 0
|
|
44
|
+
end
|
|
45
|
+
if pointer == "hover" then
|
|
46
|
+
return 0.35
|
|
47
|
+
end
|
|
48
|
+
return 1
|
|
49
|
+
end
|
|
50
|
+
local function switchThumbPlacement(on, inset)
|
|
51
|
+
return {
|
|
52
|
+
scaleX = if on then 1 else 0,
|
|
53
|
+
offsetX = if on then -inset else inset,
|
|
54
|
+
anchorX = if on then 1 else 0,
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
return {
|
|
58
|
+
switchPointer = switchPointer,
|
|
59
|
+
switchTrackTransparency = switchTrackTransparency,
|
|
60
|
+
switchThumbTransparency = switchThumbTransparency,
|
|
61
|
+
switchStrokeTransparency = switchStrokeTransparency,
|
|
62
|
+
switchThumbPlacement = switchThumbPlacement,
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface TableProps {
|
|
3
|
+
columns: string[];
|
|
4
|
+
rows: string[][];
|
|
5
|
+
selected?: number;
|
|
6
|
+
onRowActivated?: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
declare function Table(props: CustomizedProps<Frame, TableProps>): JSX.Element;
|
|
9
|
+
export default Table;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
|
+
local rowSelected = TS.import(script, script.Parent, "rowSelected").rowSelected
|
|
6
|
+
local useTableStyles = TS.import(script, script.Parent, "Table.styles").default
|
|
7
|
+
local function Table(props)
|
|
8
|
+
local _binding = props
|
|
9
|
+
local columns = _binding.columns
|
|
10
|
+
local rows = _binding.rows
|
|
11
|
+
local selected = _binding.selected
|
|
12
|
+
local onRowActivated = _binding.onRowActivated
|
|
13
|
+
local className = _binding.className
|
|
14
|
+
local sx = _binding.sx
|
|
15
|
+
local id = _binding.id
|
|
16
|
+
local ref = _binding.ref
|
|
17
|
+
local styles = useTableStyles()
|
|
18
|
+
local width = if #columns > 0 then 1 / #columns else 1
|
|
19
|
+
local _attributes = {}
|
|
20
|
+
local _condition = id
|
|
21
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
22
|
+
_condition = "Table"
|
|
23
|
+
end
|
|
24
|
+
_attributes.key = _condition
|
|
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
|
+
local _attributes_1 = table.clone(styles.corner)
|
|
40
|
+
setmetatable(_attributes_1, nil)
|
|
41
|
+
local _exp = React.createElement("uicorner", _attributes_1)
|
|
42
|
+
local _attributes_2 = table.clone(styles.list)
|
|
43
|
+
setmetatable(_attributes_2, nil)
|
|
44
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
45
|
+
local _attributes_3 = {
|
|
46
|
+
key = "Header",
|
|
47
|
+
}
|
|
48
|
+
for _k, _v in styles.header do
|
|
49
|
+
_attributes_3[_k] = _v
|
|
50
|
+
end
|
|
51
|
+
_attributes_3.LayoutOrder = 0
|
|
52
|
+
local _attributes_4 = table.clone(styles.padding)
|
|
53
|
+
setmetatable(_attributes_4, nil)
|
|
54
|
+
local _exp_2 = React.createElement("uipadding", _attributes_4)
|
|
55
|
+
local _attributes_5 = table.clone(styles.cells)
|
|
56
|
+
setmetatable(_attributes_5, nil)
|
|
57
|
+
local _exp_3 = React.createElement("uilistlayout", _attributes_5)
|
|
58
|
+
-- ▼ ReadonlyArray.map ▼
|
|
59
|
+
local _newValue = table.create(#columns)
|
|
60
|
+
local _callback = function(label, index)
|
|
61
|
+
local _attributes_6 = {
|
|
62
|
+
key = `h-{label}-{index}`,
|
|
63
|
+
}
|
|
64
|
+
for _k, _v in cx(styles.cell, styles.headerCell) do
|
|
65
|
+
_attributes_6[_k] = _v
|
|
66
|
+
end
|
|
67
|
+
_attributes_6.Text = label
|
|
68
|
+
_attributes_6.Size = UDim2.new(width, 0, 0, 0)
|
|
69
|
+
_attributes_6.LayoutOrder = index
|
|
70
|
+
return React.createElement("textlabel", _attributes_6)
|
|
71
|
+
end
|
|
72
|
+
for _k, _v in columns do
|
|
73
|
+
_newValue[_k] = _callback(_v, _k - 1, columns)
|
|
74
|
+
end
|
|
75
|
+
-- ▲ ReadonlyArray.map ▲
|
|
76
|
+
local _exp_4 = React.createElement("frame", _attributes_3, _exp_2, _exp_3, _newValue)
|
|
77
|
+
-- ▼ ReadonlyArray.map ▼
|
|
78
|
+
local _newValue_1 = table.create(#rows)
|
|
79
|
+
local _callback_1 = function(cells, rowIndex)
|
|
80
|
+
local _attributes_6 = {
|
|
81
|
+
key = `r-{rowIndex}`,
|
|
82
|
+
}
|
|
83
|
+
for _k, _v in cx(styles.row, rowSelected(rowIndex, selected) and styles.selected) do
|
|
84
|
+
_attributes_6[_k] = _v
|
|
85
|
+
end
|
|
86
|
+
_attributes_6.LayoutOrder = rowIndex + 1
|
|
87
|
+
_attributes_6.Event = {
|
|
88
|
+
Activated = function()
|
|
89
|
+
local _result = onRowActivated
|
|
90
|
+
if _result ~= nil then
|
|
91
|
+
_result = _result(rowIndex)
|
|
92
|
+
end
|
|
93
|
+
return _result
|
|
94
|
+
end,
|
|
95
|
+
}
|
|
96
|
+
local _attributes_7 = table.clone(styles.padding)
|
|
97
|
+
setmetatable(_attributes_7, nil)
|
|
98
|
+
local _exp_5 = React.createElement("uipadding", _attributes_7)
|
|
99
|
+
local _attributes_8 = table.clone(styles.cells)
|
|
100
|
+
setmetatable(_attributes_8, nil)
|
|
101
|
+
local _exp_6 = React.createElement("uilistlayout", _attributes_8)
|
|
102
|
+
-- ▼ ReadonlyArray.map ▼
|
|
103
|
+
local _newValue_2 = table.create(#columns)
|
|
104
|
+
local _callback_2 = function(_, colIndex)
|
|
105
|
+
local _attributes_9 = {
|
|
106
|
+
key = `c-{rowIndex}-{colIndex}`,
|
|
107
|
+
}
|
|
108
|
+
for _k, _v in styles.cell do
|
|
109
|
+
_attributes_9[_k] = _v
|
|
110
|
+
end
|
|
111
|
+
local _condition_1 = cells[colIndex + 1]
|
|
112
|
+
if _condition_1 == nil then
|
|
113
|
+
_condition_1 = ""
|
|
114
|
+
end
|
|
115
|
+
_attributes_9.Text = _condition_1
|
|
116
|
+
_attributes_9.Size = UDim2.new(width, 0, 0, 0)
|
|
117
|
+
_attributes_9.LayoutOrder = colIndex
|
|
118
|
+
return React.createElement("textlabel", _attributes_9)
|
|
119
|
+
end
|
|
120
|
+
for _k, _v in columns do
|
|
121
|
+
_newValue_2[_k] = _callback_2(_v, _k - 1, columns)
|
|
122
|
+
end
|
|
123
|
+
-- ▲ ReadonlyArray.map ▲
|
|
124
|
+
return React.createElement("textbutton", _attributes_6, _exp_5, _exp_6, _newValue_2)
|
|
125
|
+
end
|
|
126
|
+
for _k, _v in rows do
|
|
127
|
+
_newValue_1[_k] = _callback_1(_v, _k - 1, rows)
|
|
128
|
+
end
|
|
129
|
+
-- ▲ ReadonlyArray.map ▲
|
|
130
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, _exp_4, _newValue_1)
|
|
131
|
+
end
|
|
132
|
+
local default = Table
|
|
133
|
+
return {
|
|
134
|
+
default = default,
|
|
135
|
+
}
|