@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,11 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface EnumPickerProps {
|
|
3
|
+
value: EnumItem;
|
|
4
|
+
items: EnumItem[];
|
|
5
|
+
onChange: (value: EnumItem) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
searchable?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function EnumPicker(props: CustomizedProps<Frame, EnumPickerProps>): JSX.Element;
|
|
11
|
+
export default EnumPicker;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 Select = TS.import(script, script.Parent.Parent.Parent, "select").Select
|
|
5
|
+
local enumOptions = TS.import(script, script.Parent, "enumOptions").enumOptions
|
|
6
|
+
local function EnumPicker(props)
|
|
7
|
+
local _binding = props
|
|
8
|
+
local value = _binding.value
|
|
9
|
+
local items = _binding.items
|
|
10
|
+
local onChange = _binding.onChange
|
|
11
|
+
local disabled = _binding.disabled
|
|
12
|
+
local searchable = _binding.searchable
|
|
13
|
+
if searchable == nil then
|
|
14
|
+
searchable = true
|
|
15
|
+
end
|
|
16
|
+
local placeholder = _binding.placeholder
|
|
17
|
+
local className = _binding.className
|
|
18
|
+
local sx = _binding.sx
|
|
19
|
+
local id = _binding.id
|
|
20
|
+
local ref = _binding.ref
|
|
21
|
+
local _attributes = {
|
|
22
|
+
value = value,
|
|
23
|
+
options = enumOptions(items),
|
|
24
|
+
onChange = onChange,
|
|
25
|
+
disabled = disabled,
|
|
26
|
+
searchable = searchable,
|
|
27
|
+
placeholder = placeholder,
|
|
28
|
+
className = className,
|
|
29
|
+
sx = sx,
|
|
30
|
+
}
|
|
31
|
+
local _condition = id
|
|
32
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
33
|
+
_condition = "EnumPicker"
|
|
34
|
+
end
|
|
35
|
+
_attributes.id = _condition
|
|
36
|
+
_attributes.ref = ref
|
|
37
|
+
return React.createElement(Select, _attributes)
|
|
38
|
+
end
|
|
39
|
+
local default = EnumPicker
|
|
40
|
+
return {
|
|
41
|
+
default = default,
|
|
42
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function enumOptions(items)
|
|
3
|
+
-- ▼ ReadonlyArray.map ▼
|
|
4
|
+
local _newValue = table.create(#items)
|
|
5
|
+
local _callback = function(item)
|
|
6
|
+
return {
|
|
7
|
+
label = item.Name,
|
|
8
|
+
value = item,
|
|
9
|
+
}
|
|
10
|
+
end
|
|
11
|
+
for _k, _v in items do
|
|
12
|
+
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
13
|
+
end
|
|
14
|
+
-- ▲ ReadonlyArray.map ▲
|
|
15
|
+
return _newValue
|
|
16
|
+
end
|
|
17
|
+
local function enumItemByName(items, name)
|
|
18
|
+
for _, item in items do
|
|
19
|
+
if item.Name == name then
|
|
20
|
+
return item
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
return nil
|
|
24
|
+
end
|
|
25
|
+
return {
|
|
26
|
+
enumOptions = enumOptions,
|
|
27
|
+
enumItemByName = enumItemByName,
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { Icons } from "../../../enums/index";
|
|
3
|
+
import { FabSize } from "./fabSize";
|
|
4
|
+
export interface FabProps {
|
|
5
|
+
icon: Icons;
|
|
6
|
+
size?: FabSize;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
reducedMotion?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function Fab(props: CustomizedProps<TextButton, FabProps>): JSX.Element;
|
|
13
|
+
export default Fab;
|
|
@@ -0,0 +1,128 @@
|
|
|
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 useState = _react.useState
|
|
7
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
8
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
|
+
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
10
|
+
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
11
|
+
local fabIconPixels = TS.import(script, script.Parent, "fabSize").fabIconPixels
|
|
12
|
+
local useFabStyles = TS.import(script, script.Parent, "Fab.styles").default
|
|
13
|
+
local function Fab(props)
|
|
14
|
+
local _binding = props
|
|
15
|
+
local icon = _binding.icon
|
|
16
|
+
local size = _binding.size
|
|
17
|
+
if size == nil then
|
|
18
|
+
size = "medium"
|
|
19
|
+
end
|
|
20
|
+
local disabled = _binding.disabled
|
|
21
|
+
local loading = _binding.loading
|
|
22
|
+
if loading == nil then
|
|
23
|
+
loading = false
|
|
24
|
+
end
|
|
25
|
+
local reducedMotion = _binding.reducedMotion
|
|
26
|
+
local onClick = _binding.onClick
|
|
27
|
+
local className = _binding.className
|
|
28
|
+
local sx = _binding.sx
|
|
29
|
+
local id = _binding.id
|
|
30
|
+
local ref = _binding.ref
|
|
31
|
+
local active = canActivate(disabled, loading)
|
|
32
|
+
local styles = useFabStyles({
|
|
33
|
+
size = size,
|
|
34
|
+
disabled = not active,
|
|
35
|
+
})
|
|
36
|
+
local _binding_1 = useTheme()
|
|
37
|
+
local theme = _binding_1.theme
|
|
38
|
+
local hovering, setHovering = useState(false)
|
|
39
|
+
local focused, setFocused = useState(false)
|
|
40
|
+
local iconPx = fabIconPixels(size)
|
|
41
|
+
useEffect(function()
|
|
42
|
+
if active then
|
|
43
|
+
return nil
|
|
44
|
+
end
|
|
45
|
+
setHovering(false)
|
|
46
|
+
setFocused(false)
|
|
47
|
+
end, { active })
|
|
48
|
+
local _attributes = {}
|
|
49
|
+
local _condition = id
|
|
50
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
51
|
+
_condition = "Fab"
|
|
52
|
+
end
|
|
53
|
+
_attributes.key = _condition
|
|
54
|
+
_attributes.ref = ref
|
|
55
|
+
for _k, _v in styles.root do
|
|
56
|
+
_attributes[_k] = _v
|
|
57
|
+
end
|
|
58
|
+
if className then
|
|
59
|
+
for _k, _v in className do
|
|
60
|
+
_attributes[_k] = _v
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
if sx then
|
|
64
|
+
for _k, _v in sx do
|
|
65
|
+
_attributes[_k] = _v
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
_attributes.Active = active
|
|
69
|
+
_attributes.Selectable = active
|
|
70
|
+
_attributes.BackgroundTransparency = if not active then 0.5 elseif hovering or focused then 0.15 else 0
|
|
71
|
+
_attributes.Event = {
|
|
72
|
+
Activated = function()
|
|
73
|
+
if active and onClick then
|
|
74
|
+
onClick()
|
|
75
|
+
end
|
|
76
|
+
end,
|
|
77
|
+
MouseEnter = function()
|
|
78
|
+
if active then
|
|
79
|
+
setHovering(true)
|
|
80
|
+
end
|
|
81
|
+
end,
|
|
82
|
+
MouseLeave = function()
|
|
83
|
+
return setHovering(false)
|
|
84
|
+
end,
|
|
85
|
+
SelectionGained = function()
|
|
86
|
+
if active then
|
|
87
|
+
setFocused(true)
|
|
88
|
+
end
|
|
89
|
+
end,
|
|
90
|
+
SelectionLost = function()
|
|
91
|
+
return setFocused(false)
|
|
92
|
+
end,
|
|
93
|
+
}
|
|
94
|
+
local _attributes_1 = table.clone(styles.corner)
|
|
95
|
+
setmetatable(_attributes_1, nil)
|
|
96
|
+
local _exp = React.createElement("uicorner", _attributes_1)
|
|
97
|
+
local _exp_1 = React.createElement(Shadow)
|
|
98
|
+
local _result
|
|
99
|
+
if loading then
|
|
100
|
+
_result = (React.createElement(CircularProgress, {
|
|
101
|
+
size = iconPx,
|
|
102
|
+
thickness = 2,
|
|
103
|
+
color = theme.palette.primary.on,
|
|
104
|
+
reducedMotion = reducedMotion,
|
|
105
|
+
className = {
|
|
106
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
107
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
108
|
+
},
|
|
109
|
+
}))
|
|
110
|
+
else
|
|
111
|
+
local _attributes_2 = {
|
|
112
|
+
key = "Icon",
|
|
113
|
+
}
|
|
114
|
+
for _k, _v in styles.icon do
|
|
115
|
+
_attributes_2[_k] = _v
|
|
116
|
+
end
|
|
117
|
+
_attributes_2.Size = UDim2.fromOffset(iconPx, iconPx)
|
|
118
|
+
_attributes_2.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
119
|
+
_attributes_2.Position = UDim2.fromScale(0.5, 0.5)
|
|
120
|
+
_attributes_2.Image = tostring(icon)
|
|
121
|
+
_result = (React.createElement("imagelabel", _attributes_2))
|
|
122
|
+
end
|
|
123
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, _result)
|
|
124
|
+
end
|
|
125
|
+
local default = Fab
|
|
126
|
+
return {
|
|
127
|
+
default = default,
|
|
128
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 fabPixels = TS.import(script, script.Parent, "fabSize").fabPixels
|
|
7
|
+
local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
8
|
+
local size = _param.size
|
|
9
|
+
if size == nil then
|
|
10
|
+
size = "medium"
|
|
11
|
+
end
|
|
12
|
+
local disabled = _param.disabled
|
|
13
|
+
local diameter = fabPixels(size)
|
|
14
|
+
return createStyles({
|
|
15
|
+
root = {
|
|
16
|
+
Size = UDim2.fromOffset(diameter, diameter),
|
|
17
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
18
|
+
BackgroundTransparency = if disabled then 0.5 else 0,
|
|
19
|
+
BorderSizePixel = 0,
|
|
20
|
+
AutoButtonColor = false,
|
|
21
|
+
Text = "",
|
|
22
|
+
ZIndex = 12000,
|
|
23
|
+
},
|
|
24
|
+
corner = {
|
|
25
|
+
CornerRadius = UDim.new(1, 0),
|
|
26
|
+
},
|
|
27
|
+
icon = {
|
|
28
|
+
Size = UDim2.fromScale(1, 1),
|
|
29
|
+
BackgroundTransparency = 1,
|
|
30
|
+
BorderSizePixel = 0,
|
|
31
|
+
ScaleType = Enum.ScaleType.Fit,
|
|
32
|
+
ImageColor3 = theme.palette.primary.on,
|
|
33
|
+
ImageTransparency = if disabled then 0.5 else 0,
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
end)
|
|
37
|
+
local default = useFabStyles
|
|
38
|
+
return {
|
|
39
|
+
default = default,
|
|
40
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function fabPixels(size)
|
|
3
|
+
if size == nil then
|
|
4
|
+
size = "medium"
|
|
5
|
+
end
|
|
6
|
+
if size == "small" then
|
|
7
|
+
return 40
|
|
8
|
+
end
|
|
9
|
+
if size == "large" then
|
|
10
|
+
return 64
|
|
11
|
+
end
|
|
12
|
+
return 56
|
|
13
|
+
end
|
|
14
|
+
local function fabIconPixels(size)
|
|
15
|
+
if size == nil then
|
|
16
|
+
size = "medium"
|
|
17
|
+
end
|
|
18
|
+
if size == "small" then
|
|
19
|
+
return 18
|
|
20
|
+
end
|
|
21
|
+
if size == "large" then
|
|
22
|
+
return 28
|
|
23
|
+
end
|
|
24
|
+
return 24
|
|
25
|
+
end
|
|
26
|
+
return {
|
|
27
|
+
fabPixels = fabPixels,
|
|
28
|
+
fabIconPixels = fabIconPixels,
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.Fab = TS.import(script, script, "components", "Fab").default
|
|
5
|
+
local _fabSize = TS.import(script, script, "components", "fabSize")
|
|
6
|
+
exports.fabPixels = _fabSize.fabPixels
|
|
7
|
+
exports.fabIconPixels = _fabSize.fabIconPixels
|
|
8
|
+
return exports
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface FontEditorProps {
|
|
3
|
+
value: Font;
|
|
4
|
+
onChange: (value: Font) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function FontEditor(props: CustomizedProps<Frame, FontEditorProps>): JSX.Element;
|
|
8
|
+
export default FontEditor;
|
|
@@ -0,0 +1,223 @@
|
|
|
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 useState = _react.useState
|
|
6
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
7
|
+
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
8
|
+
local Select = TS.import(script, script.Parent.Parent.Parent, "select").Select
|
|
9
|
+
local useFontEditorStyles = TS.import(script, script.Parent, "FontEditor.styles").default
|
|
10
|
+
local _fontValue = TS.import(script, script.Parent, "fontValue")
|
|
11
|
+
local enumFamilies = _fontValue.enumFamilies
|
|
12
|
+
local familyLabel = _fontValue.familyLabel
|
|
13
|
+
local writeFont = _fontValue.writeFont
|
|
14
|
+
local function enumOptions(items)
|
|
15
|
+
-- ▼ ReadonlyArray.map ▼
|
|
16
|
+
local _newValue = table.create(#items)
|
|
17
|
+
local _callback = function(item)
|
|
18
|
+
return {
|
|
19
|
+
label = item.Name,
|
|
20
|
+
value = item.Name,
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
for _k, _v in items do
|
|
24
|
+
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
25
|
+
end
|
|
26
|
+
-- ▲ ReadonlyArray.map ▲
|
|
27
|
+
return _newValue
|
|
28
|
+
end
|
|
29
|
+
local cachedFamilies
|
|
30
|
+
local function builtInFamilies()
|
|
31
|
+
if cachedFamilies ~= nil then
|
|
32
|
+
return cachedFamilies
|
|
33
|
+
end
|
|
34
|
+
local fonts = {}
|
|
35
|
+
for _, item in Enum.Font:GetEnumItems() do
|
|
36
|
+
local _arg0 = Font.fromEnum(item)
|
|
37
|
+
table.insert(fonts, _arg0)
|
|
38
|
+
end
|
|
39
|
+
cachedFamilies = enumFamilies(fonts)
|
|
40
|
+
return cachedFamilies
|
|
41
|
+
end
|
|
42
|
+
local function FontEditor(props)
|
|
43
|
+
local _binding = props
|
|
44
|
+
local value = _binding.value
|
|
45
|
+
local onChange = _binding.onChange
|
|
46
|
+
local disabled = _binding.disabled
|
|
47
|
+
local className = _binding.className
|
|
48
|
+
local sx = _binding.sx
|
|
49
|
+
local id = _binding.id
|
|
50
|
+
local ref = _binding.ref
|
|
51
|
+
local styles = useFontEditorStyles()
|
|
52
|
+
local active = canActivate(disabled)
|
|
53
|
+
local families = builtInFamilies()
|
|
54
|
+
-- ▼ ReadonlyArray.find ▼
|
|
55
|
+
local _callback = function(item)
|
|
56
|
+
return item.family == value.Family
|
|
57
|
+
end
|
|
58
|
+
local _result
|
|
59
|
+
for _i, _v in families do
|
|
60
|
+
if _callback(_v, _i - 1, families) == true then
|
|
61
|
+
_result = _v
|
|
62
|
+
break
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
-- ▲ ReadonlyArray.find ▲
|
|
66
|
+
if _result == nil then
|
|
67
|
+
local _arg1 = {
|
|
68
|
+
label = familyLabel(value.Family),
|
|
69
|
+
family = value.Family,
|
|
70
|
+
}
|
|
71
|
+
table.insert(families, 1, _arg1)
|
|
72
|
+
end
|
|
73
|
+
local custom, setCustom = useState(value.Family)
|
|
74
|
+
local weights = enumOptions(Enum.FontWeight:GetEnumItems())
|
|
75
|
+
local stylesList = enumOptions(Enum.FontStyle:GetEnumItems())
|
|
76
|
+
local _attributes = {}
|
|
77
|
+
local _condition = id
|
|
78
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
79
|
+
_condition = "FontEditor"
|
|
80
|
+
end
|
|
81
|
+
_attributes.key = _condition
|
|
82
|
+
_attributes.ref = ref
|
|
83
|
+
for _k, _v in styles.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
|
+
local _attributes_1 = table.clone(styles.column)
|
|
97
|
+
setmetatable(_attributes_1, nil)
|
|
98
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
99
|
+
local _attributes_2 = {
|
|
100
|
+
key = "Family",
|
|
101
|
+
}
|
|
102
|
+
for _k, _v in styles.row do
|
|
103
|
+
_attributes_2[_k] = _v
|
|
104
|
+
end
|
|
105
|
+
_attributes_2.LayoutOrder = 1
|
|
106
|
+
local _attributes_3 = {
|
|
107
|
+
value = value.Family,
|
|
108
|
+
}
|
|
109
|
+
-- ▼ ReadonlyArray.map ▼
|
|
110
|
+
local _newValue = table.create(#families)
|
|
111
|
+
local _callback_1 = function(item)
|
|
112
|
+
return {
|
|
113
|
+
label = item.label,
|
|
114
|
+
value = item.family,
|
|
115
|
+
}
|
|
116
|
+
end
|
|
117
|
+
for _k, _v in families do
|
|
118
|
+
_newValue[_k] = _callback_1(_v, _k - 1, families)
|
|
119
|
+
end
|
|
120
|
+
-- ▲ ReadonlyArray.map ▲
|
|
121
|
+
_attributes_3.options = _newValue
|
|
122
|
+
_attributes_3.disabled = disabled
|
|
123
|
+
_attributes_3.className = styles.fill
|
|
124
|
+
_attributes_3.onChange = function(family)
|
|
125
|
+
setCustom(family)
|
|
126
|
+
onChange(writeFont(family, value.Weight, value.Style))
|
|
127
|
+
end
|
|
128
|
+
local _exp_1 = React.createElement("frame", _attributes_2, React.createElement(Select, _attributes_3))
|
|
129
|
+
local _attributes_4 = {
|
|
130
|
+
key = "Custom",
|
|
131
|
+
}
|
|
132
|
+
for _k, _v in styles.row do
|
|
133
|
+
_attributes_4[_k] = _v
|
|
134
|
+
end
|
|
135
|
+
_attributes_4.LayoutOrder = 2
|
|
136
|
+
local _exp_2 = React.createElement("frame", _attributes_4, React.createElement(Input, {
|
|
137
|
+
text = custom,
|
|
138
|
+
placeholder = "rbxasset://fonts/families/…",
|
|
139
|
+
disabled = disabled,
|
|
140
|
+
width = UDim.new(1, 0),
|
|
141
|
+
onInput = function(text)
|
|
142
|
+
return setCustom(text)
|
|
143
|
+
end,
|
|
144
|
+
onTextChanged = function(text)
|
|
145
|
+
if #text == 0 then
|
|
146
|
+
return nil
|
|
147
|
+
end
|
|
148
|
+
setCustom(text)
|
|
149
|
+
onChange(writeFont(text, value.Weight, value.Style))
|
|
150
|
+
end,
|
|
151
|
+
}))
|
|
152
|
+
local _attributes_5 = {
|
|
153
|
+
key = "Face",
|
|
154
|
+
}
|
|
155
|
+
for _k, _v in styles.row do
|
|
156
|
+
_attributes_5[_k] = _v
|
|
157
|
+
end
|
|
158
|
+
_attributes_5.LayoutOrder = 3
|
|
159
|
+
local _exp_3 = React.createElement("uilistlayout", {
|
|
160
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
161
|
+
Padding = UDim.new(0, 4),
|
|
162
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
163
|
+
})
|
|
164
|
+
local _attributes_6 = {
|
|
165
|
+
key = "Weight",
|
|
166
|
+
}
|
|
167
|
+
for _k, _v in styles.pair do
|
|
168
|
+
_attributes_6[_k] = _v
|
|
169
|
+
end
|
|
170
|
+
_attributes_6.LayoutOrder = 1
|
|
171
|
+
local _exp_4 = React.createElement("frame", _attributes_6, React.createElement(Select, {
|
|
172
|
+
value = value.Weight.Name,
|
|
173
|
+
options = weights,
|
|
174
|
+
disabled = not active,
|
|
175
|
+
className = styles.fill,
|
|
176
|
+
onChange = function(name)
|
|
177
|
+
local weight = (Enum.FontWeight)[name]
|
|
178
|
+
if weight ~= nil then
|
|
179
|
+
onChange(writeFont(value.Family, weight, value.Style))
|
|
180
|
+
end
|
|
181
|
+
end,
|
|
182
|
+
}))
|
|
183
|
+
local _attributes_7 = {
|
|
184
|
+
key = "Style",
|
|
185
|
+
}
|
|
186
|
+
for _k, _v in styles.pair do
|
|
187
|
+
_attributes_7[_k] = _v
|
|
188
|
+
end
|
|
189
|
+
_attributes_7.LayoutOrder = 2
|
|
190
|
+
local _exp_5 = React.createElement("frame", _attributes_5, _exp_3, _exp_4, React.createElement("frame", _attributes_7, React.createElement(Select, {
|
|
191
|
+
value = value.Style.Name,
|
|
192
|
+
options = stylesList,
|
|
193
|
+
disabled = not active,
|
|
194
|
+
className = styles.fill,
|
|
195
|
+
onChange = function(name)
|
|
196
|
+
local face = (Enum.FontStyle)[name]
|
|
197
|
+
if face ~= nil then
|
|
198
|
+
onChange(writeFont(value.Family, value.Weight, face))
|
|
199
|
+
end
|
|
200
|
+
end,
|
|
201
|
+
})))
|
|
202
|
+
local _attributes_8 = {
|
|
203
|
+
key = "Preview",
|
|
204
|
+
}
|
|
205
|
+
for _k, _v in styles.preview do
|
|
206
|
+
_attributes_8[_k] = _v
|
|
207
|
+
end
|
|
208
|
+
_attributes_8.LayoutOrder = 4
|
|
209
|
+
_attributes_8.FontFace = value
|
|
210
|
+
local _attributes_9 = table.clone(styles.padding)
|
|
211
|
+
setmetatable(_attributes_9, nil)
|
|
212
|
+
local _exp_6 = React.createElement("uipadding", _attributes_9)
|
|
213
|
+
local _attributes_10 = table.clone(styles.corner)
|
|
214
|
+
setmetatable(_attributes_10, nil)
|
|
215
|
+
local _exp_7 = React.createElement("uicorner", _attributes_10)
|
|
216
|
+
local _attributes_11 = table.clone(styles.stroke)
|
|
217
|
+
setmetatable(_attributes_11, nil)
|
|
218
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, _exp_5, React.createElement("textlabel", _attributes_8, _exp_6, _exp_7, React.createElement("uistroke", _attributes_11)))
|
|
219
|
+
end
|
|
220
|
+
local default = FontEditor
|
|
221
|
+
return {
|
|
222
|
+
default = default,
|
|
223
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 createStyles = _theme.createStyles
|
|
5
|
+
local componentStyles = _theme.componentStyles
|
|
6
|
+
local useFontEditorStyles = componentStyles("FontEditor", function(theme)
|
|
7
|
+
return createStyles({
|
|
8
|
+
root = {
|
|
9
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
10
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
11
|
+
BackgroundTransparency = 1,
|
|
12
|
+
BorderSizePixel = 0,
|
|
13
|
+
},
|
|
14
|
+
column = {
|
|
15
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
16
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
17
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
18
|
+
},
|
|
19
|
+
row = {
|
|
20
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
21
|
+
BackgroundTransparency = 1,
|
|
22
|
+
},
|
|
23
|
+
pair = {
|
|
24
|
+
Size = UDim2.new(0.5, -theme.padding.calc(0.5), 0, theme.spacing.calc(2)),
|
|
25
|
+
BackgroundTransparency = 1,
|
|
26
|
+
},
|
|
27
|
+
fill = {
|
|
28
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
29
|
+
},
|
|
30
|
+
preview = {
|
|
31
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
|
|
32
|
+
BackgroundColor3 = theme.palette.surface.input,
|
|
33
|
+
BorderSizePixel = 0,
|
|
34
|
+
Text = "The quick brown fox",
|
|
35
|
+
TextColor3 = theme.palette.text.primary,
|
|
36
|
+
TextSize = theme.typography.fontSizes.body,
|
|
37
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
38
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
39
|
+
},
|
|
40
|
+
padding = {
|
|
41
|
+
PaddingLeft = UDim.new(0, theme.padding.default),
|
|
42
|
+
PaddingRight = UDim.new(0, theme.padding.default),
|
|
43
|
+
},
|
|
44
|
+
corner = {
|
|
45
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
46
|
+
},
|
|
47
|
+
stroke = {
|
|
48
|
+
Color = theme.palette.border,
|
|
49
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
end)
|
|
53
|
+
local default = useFontEditorStyles
|
|
54
|
+
return {
|
|
55
|
+
default = default,
|
|
56
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FontFamily {
|
|
2
|
+
label: string;
|
|
3
|
+
family: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function familyLabel(family: string): string;
|
|
6
|
+
export declare function uniqueFamilies(families: string[]): FontFamily[];
|
|
7
|
+
export declare function enumFamilies(items: {
|
|
8
|
+
Family: string;
|
|
9
|
+
}[]): FontFamily[];
|
|
10
|
+
export declare function writeFont(family: string, weight: Enum.FontWeight, style: Enum.FontStyle): Font;
|