@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,512 @@
|
|
|
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 UserInputService = TS.import(script, TS.getModule(script, "@rbxts", "services")).UserInputService
|
|
9
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
10
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
11
|
+
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
12
|
+
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
13
|
+
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
14
|
+
local useColorPickerStyles = TS.import(script, script.Parent, "ColorPicker.styles").default
|
|
15
|
+
local _colorValue = TS.import(script, script.Parent, "colorValue")
|
|
16
|
+
local byteToUnit = _colorValue.byteToUnit
|
|
17
|
+
local channelToByte = _colorValue.channelToByte
|
|
18
|
+
local colorBytes = _colorValue.colorBytes
|
|
19
|
+
local colorToHex = _colorValue.colorToHex
|
|
20
|
+
local hsvToColor3 = _colorValue.hsvToColor3
|
|
21
|
+
local parseHex = _colorValue.parseHex
|
|
22
|
+
local recentColors = _colorValue.recentColors
|
|
23
|
+
local rememberColor = _colorValue.rememberColor
|
|
24
|
+
local resolveHsv = _colorValue.resolveHsv
|
|
25
|
+
local sameColor = _colorValue.sameColor
|
|
26
|
+
local HUE_STOPS = { ColorSequenceKeypoint.new(0, Color3.new(1, 0, 0)), ColorSequenceKeypoint.new(1 / 6, Color3.new(1, 1, 0)), ColorSequenceKeypoint.new(2 / 6, Color3.new(0, 1, 0)), ColorSequenceKeypoint.new(3 / 6, Color3.new(0, 1, 1)), ColorSequenceKeypoint.new(4 / 6, Color3.new(0, 0, 1)), ColorSequenceKeypoint.new(5 / 6, Color3.new(1, 0, 1)), ColorSequenceKeypoint.new(1, Color3.new(1, 0, 0)) }
|
|
27
|
+
local function pointerInput(input)
|
|
28
|
+
return input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement
|
|
29
|
+
end
|
|
30
|
+
local function ColorPanel(props)
|
|
31
|
+
local _binding = props
|
|
32
|
+
local value = _binding.value
|
|
33
|
+
local onChange = _binding.onChange
|
|
34
|
+
local disabled = _binding.disabled
|
|
35
|
+
local styles = useColorPickerStyles()
|
|
36
|
+
local active = canActivate(disabled)
|
|
37
|
+
local hsvRef = useRef(resolveHsv(value))
|
|
38
|
+
local hsv, setHsv = useState(hsvRef.current)
|
|
39
|
+
local hexDraft, setHexDraft = useState(colorToHex(value))
|
|
40
|
+
local hexFault, setHexFault = useState(false)
|
|
41
|
+
local dragging = useRef(nil)
|
|
42
|
+
local latest = useRef(value)
|
|
43
|
+
local recents = recentColors()
|
|
44
|
+
useEffect(function()
|
|
45
|
+
if sameColor(value, latest.current) then
|
|
46
|
+
return nil
|
|
47
|
+
end
|
|
48
|
+
latest.current = value
|
|
49
|
+
local resolved = resolveHsv(value, hsvRef.current)
|
|
50
|
+
hsvRef.current = resolved
|
|
51
|
+
setHsv(resolved)
|
|
52
|
+
setHexDraft(colorToHex(value))
|
|
53
|
+
setHexFault(false)
|
|
54
|
+
end, { value })
|
|
55
|
+
local emit = function(hsvValue)
|
|
56
|
+
hsvRef.current = hsvValue
|
|
57
|
+
setHsv(hsvValue)
|
|
58
|
+
local color = hsvToColor3(hsvValue.h, hsvValue.s, hsvValue.v)
|
|
59
|
+
if sameColor(color, latest.current) then
|
|
60
|
+
return nil
|
|
61
|
+
end
|
|
62
|
+
latest.current = color
|
|
63
|
+
setHexDraft(colorToHex(color))
|
|
64
|
+
setHexFault(false)
|
|
65
|
+
onChange(color)
|
|
66
|
+
end
|
|
67
|
+
local updatePlane = function(rbx, position)
|
|
68
|
+
local size = rbx.AbsoluteSize
|
|
69
|
+
if size.X <= 0 or size.Y <= 0 then
|
|
70
|
+
return nil
|
|
71
|
+
end
|
|
72
|
+
local origin = rbx.AbsolutePosition
|
|
73
|
+
emit({
|
|
74
|
+
h = hsvRef.current.h,
|
|
75
|
+
s = math.clamp((position.X - origin.X) / size.X, 0, 1),
|
|
76
|
+
v = 1 - math.clamp((position.Y - origin.Y) / size.Y, 0, 1),
|
|
77
|
+
})
|
|
78
|
+
end
|
|
79
|
+
local updateHue = function(rbx, position)
|
|
80
|
+
local width = rbx.AbsoluteSize.X
|
|
81
|
+
if width <= 0 then
|
|
82
|
+
return nil
|
|
83
|
+
end
|
|
84
|
+
emit({
|
|
85
|
+
h = math.clamp((position.X - rbx.AbsolutePosition.X) / width, 0, 1),
|
|
86
|
+
s = hsvRef.current.s,
|
|
87
|
+
v = hsvRef.current.v,
|
|
88
|
+
})
|
|
89
|
+
end
|
|
90
|
+
local hueColor = hsvToColor3(hsv.h, 1, 1)
|
|
91
|
+
local channel = function(label, unit, apply)
|
|
92
|
+
local _attributes = {
|
|
93
|
+
key = label,
|
|
94
|
+
}
|
|
95
|
+
for _k, _v in styles.channel do
|
|
96
|
+
_attributes[_k] = _v
|
|
97
|
+
end
|
|
98
|
+
local _attributes_1 = table.clone(styles.rowLayout)
|
|
99
|
+
setmetatable(_attributes_1, nil)
|
|
100
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
101
|
+
local _attributes_2 = table.clone(styles.label)
|
|
102
|
+
setmetatable(_attributes_2, nil)
|
|
103
|
+
_attributes_2.Text = label
|
|
104
|
+
local _exp_1 = React.createElement("textlabel", _attributes_2)
|
|
105
|
+
local _attributes_3 = table.clone(styles.channelField)
|
|
106
|
+
setmetatable(_attributes_3, nil)
|
|
107
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, React.createElement("frame", _attributes_3, React.createElement(NumberInput, {
|
|
108
|
+
value = channelToByte(unit),
|
|
109
|
+
min = 0,
|
|
110
|
+
max = 255,
|
|
111
|
+
step = 1,
|
|
112
|
+
disabled = disabled,
|
|
113
|
+
width = UDim.new(1, 0),
|
|
114
|
+
onChange = function(byte)
|
|
115
|
+
return apply(byte)
|
|
116
|
+
end,
|
|
117
|
+
})))
|
|
118
|
+
end
|
|
119
|
+
local _attributes = {
|
|
120
|
+
key = "Panel",
|
|
121
|
+
}
|
|
122
|
+
for _k, _v in styles.root do
|
|
123
|
+
_attributes[_k] = _v
|
|
124
|
+
end
|
|
125
|
+
_attributes.BackgroundTransparency = 1
|
|
126
|
+
_attributes.Selectable = false
|
|
127
|
+
local _attributes_1 = table.clone(styles.column)
|
|
128
|
+
setmetatable(_attributes_1, nil)
|
|
129
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
130
|
+
local _attributes_2 = {
|
|
131
|
+
key = "Header",
|
|
132
|
+
}
|
|
133
|
+
for _k, _v in styles.row do
|
|
134
|
+
_attributes_2[_k] = _v
|
|
135
|
+
end
|
|
136
|
+
_attributes_2.LayoutOrder = 1
|
|
137
|
+
local _attributes_3 = table.clone(styles.rowLayout)
|
|
138
|
+
setmetatable(_attributes_3, nil)
|
|
139
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_3)
|
|
140
|
+
local _attributes_4 = {
|
|
141
|
+
key = "Swatch",
|
|
142
|
+
}
|
|
143
|
+
for _k, _v in styles.swatch do
|
|
144
|
+
_attributes_4[_k] = _v
|
|
145
|
+
end
|
|
146
|
+
_attributes_4.BackgroundColor3 = value
|
|
147
|
+
_attributes_4.LayoutOrder = 1
|
|
148
|
+
local _attributes_5 = table.clone(styles.corner)
|
|
149
|
+
setmetatable(_attributes_5, nil)
|
|
150
|
+
local _exp_2 = React.createElement("uicorner", _attributes_5)
|
|
151
|
+
local _attributes_6 = table.clone(styles.swatchStroke)
|
|
152
|
+
setmetatable(_attributes_6, nil)
|
|
153
|
+
local _exp_3 = React.createElement("frame", _attributes_4, _exp_2, React.createElement("uistroke", _attributes_6))
|
|
154
|
+
local _attributes_7 = {
|
|
155
|
+
key = "Hex",
|
|
156
|
+
}
|
|
157
|
+
for _k, _v in styles.hex do
|
|
158
|
+
_attributes_7[_k] = _v
|
|
159
|
+
end
|
|
160
|
+
_attributes_7.LayoutOrder = 2
|
|
161
|
+
local _exp_4 = React.createElement("frame", _attributes_2, _exp_1, _exp_3, React.createElement("frame", _attributes_7, React.createElement(Input, {
|
|
162
|
+
text = hexDraft,
|
|
163
|
+
placeholder = "#RRGGBB",
|
|
164
|
+
disabled = disabled,
|
|
165
|
+
hasError = hexFault,
|
|
166
|
+
width = UDim.new(1, 0),
|
|
167
|
+
onInput = function(text)
|
|
168
|
+
setHexDraft(text)
|
|
169
|
+
local parsed = parseHex(text)
|
|
170
|
+
if parsed == nil then
|
|
171
|
+
setHexFault(#text > 0)
|
|
172
|
+
return nil
|
|
173
|
+
end
|
|
174
|
+
setHexFault(false)
|
|
175
|
+
emit(resolveHsv(parsed, hsvRef.current))
|
|
176
|
+
end,
|
|
177
|
+
onTextChanged = function(text)
|
|
178
|
+
local parsed = parseHex(text)
|
|
179
|
+
if parsed == nil then
|
|
180
|
+
setHexFault(false)
|
|
181
|
+
setHexDraft(colorToHex(latest.current))
|
|
182
|
+
return nil
|
|
183
|
+
end
|
|
184
|
+
setHexFault(false)
|
|
185
|
+
emit(resolveHsv(parsed, hsvRef.current))
|
|
186
|
+
end,
|
|
187
|
+
})))
|
|
188
|
+
local _attributes_8 = {
|
|
189
|
+
key = "Plane",
|
|
190
|
+
}
|
|
191
|
+
for _k, _v in styles.plane do
|
|
192
|
+
_attributes_8[_k] = _v
|
|
193
|
+
end
|
|
194
|
+
_attributes_8.BackgroundColor3 = hueColor
|
|
195
|
+
_attributes_8.LayoutOrder = 2
|
|
196
|
+
_attributes_8.Selectable = active
|
|
197
|
+
_attributes_8.Active = active
|
|
198
|
+
_attributes_8.Event = {
|
|
199
|
+
InputBegan = function(rbx, input)
|
|
200
|
+
if not active or not pointerInput(input) or input.UserInputType == Enum.UserInputType.MouseMovement then
|
|
201
|
+
return nil
|
|
202
|
+
end
|
|
203
|
+
dragging.current = "plane"
|
|
204
|
+
updatePlane(rbx, input.Position)
|
|
205
|
+
end,
|
|
206
|
+
InputChanged = function(rbx, input)
|
|
207
|
+
if dragging.current == "plane" and pointerInput(input) then
|
|
208
|
+
updatePlane(rbx, input.Position)
|
|
209
|
+
end
|
|
210
|
+
end,
|
|
211
|
+
InputEnded = function(_, input)
|
|
212
|
+
if pointerInput(input) then
|
|
213
|
+
dragging.current = nil
|
|
214
|
+
end
|
|
215
|
+
end,
|
|
216
|
+
}
|
|
217
|
+
local _attributes_9 = table.clone(styles.corner)
|
|
218
|
+
setmetatable(_attributes_9, nil)
|
|
219
|
+
local _exp_5 = React.createElement("uicorner", _attributes_9)
|
|
220
|
+
local _exp_6 = React.createElement("uigradient", {
|
|
221
|
+
Color = ColorSequence.new(Color3.new(1, 1, 1), hueColor),
|
|
222
|
+
})
|
|
223
|
+
local _attributes_10 = {
|
|
224
|
+
key = "Shade",
|
|
225
|
+
}
|
|
226
|
+
for _k, _v in styles.planeOverlay do
|
|
227
|
+
_attributes_10[_k] = _v
|
|
228
|
+
end
|
|
229
|
+
local _attributes_11 = table.clone(styles.corner)
|
|
230
|
+
setmetatable(_attributes_11, nil)
|
|
231
|
+
local _exp_7 = React.createElement("frame", _attributes_10, React.createElement("uicorner", _attributes_11), React.createElement("uigradient", {
|
|
232
|
+
Rotation = 90,
|
|
233
|
+
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 0) }),
|
|
234
|
+
}))
|
|
235
|
+
local _attributes_12 = {
|
|
236
|
+
key = "Cursor",
|
|
237
|
+
}
|
|
238
|
+
for _k, _v in styles.cursor do
|
|
239
|
+
_attributes_12[_k] = _v
|
|
240
|
+
end
|
|
241
|
+
_attributes_12.Position = UDim2.fromScale(hsv.s, 1 - hsv.v)
|
|
242
|
+
local _exp_8 = React.createElement("uicorner", {
|
|
243
|
+
CornerRadius = UDim.new(1, 0),
|
|
244
|
+
})
|
|
245
|
+
local _attributes_13 = table.clone(styles.cursorStroke)
|
|
246
|
+
setmetatable(_attributes_13, nil)
|
|
247
|
+
local _exp_9 = React.createElement("frame", _attributes_8, _exp_5, _exp_6, _exp_7, React.createElement("frame", _attributes_12, _exp_8, React.createElement("uistroke", _attributes_13)))
|
|
248
|
+
local _attributes_14 = {
|
|
249
|
+
key = "Hue",
|
|
250
|
+
}
|
|
251
|
+
for _k, _v in styles.hue do
|
|
252
|
+
_attributes_14[_k] = _v
|
|
253
|
+
end
|
|
254
|
+
_attributes_14.LayoutOrder = 3
|
|
255
|
+
_attributes_14.Selectable = active
|
|
256
|
+
_attributes_14.Active = active
|
|
257
|
+
_attributes_14.Event = {
|
|
258
|
+
InputBegan = function(rbx, input)
|
|
259
|
+
if not active or not pointerInput(input) or input.UserInputType == Enum.UserInputType.MouseMovement then
|
|
260
|
+
return nil
|
|
261
|
+
end
|
|
262
|
+
dragging.current = "hue"
|
|
263
|
+
updateHue(rbx, input.Position)
|
|
264
|
+
end,
|
|
265
|
+
InputChanged = function(rbx, input)
|
|
266
|
+
if dragging.current == "hue" and pointerInput(input) then
|
|
267
|
+
updateHue(rbx, input.Position)
|
|
268
|
+
end
|
|
269
|
+
end,
|
|
270
|
+
InputEnded = function(_, input)
|
|
271
|
+
if pointerInput(input) then
|
|
272
|
+
dragging.current = nil
|
|
273
|
+
end
|
|
274
|
+
end,
|
|
275
|
+
}
|
|
276
|
+
local _attributes_15 = table.clone(styles.corner)
|
|
277
|
+
setmetatable(_attributes_15, nil)
|
|
278
|
+
local _exp_10 = React.createElement("uicorner", _attributes_15)
|
|
279
|
+
local _exp_11 = React.createElement("uigradient", {
|
|
280
|
+
Color = ColorSequence.new(HUE_STOPS),
|
|
281
|
+
})
|
|
282
|
+
local _attributes_16 = {
|
|
283
|
+
key = "Knob",
|
|
284
|
+
}
|
|
285
|
+
for _k, _v in styles.hueKnob do
|
|
286
|
+
_attributes_16[_k] = _v
|
|
287
|
+
end
|
|
288
|
+
_attributes_16.Position = UDim2.fromScale(hsv.h, 0.5)
|
|
289
|
+
local _attributes_17 = table.clone(styles.corner)
|
|
290
|
+
setmetatable(_attributes_17, nil)
|
|
291
|
+
local _exp_12 = React.createElement("frame", _attributes_14, _exp_10, _exp_11, React.createElement("frame", _attributes_16, React.createElement("uicorner", _attributes_17)))
|
|
292
|
+
local _attributes_18 = {
|
|
293
|
+
key = "Rgb",
|
|
294
|
+
}
|
|
295
|
+
for _k, _v in styles.row do
|
|
296
|
+
_attributes_18[_k] = _v
|
|
297
|
+
end
|
|
298
|
+
_attributes_18.LayoutOrder = 4
|
|
299
|
+
_attributes_18.Size = UDim2.new(1, 0, 0, 0)
|
|
300
|
+
_attributes_18.AutomaticSize = Enum.AutomaticSize.Y
|
|
301
|
+
local _attributes_19 = table.clone(styles.rowLayout)
|
|
302
|
+
setmetatable(_attributes_19, nil)
|
|
303
|
+
local _exp_13 = React.createElement("frame", _attributes_18, React.createElement("uilistlayout", _attributes_19), channel("R", value.R, function(byte)
|
|
304
|
+
return emit(resolveHsv(Color3.new(byteToUnit(byte), value.G, value.B), hsvRef.current))
|
|
305
|
+
end), channel("G", value.G, function(byte)
|
|
306
|
+
return emit(resolveHsv(Color3.new(value.R, byteToUnit(byte), value.B), hsvRef.current))
|
|
307
|
+
end), channel("B", value.B, function(byte)
|
|
308
|
+
return emit(resolveHsv(Color3.new(value.R, value.G, byteToUnit(byte)), hsvRef.current))
|
|
309
|
+
end))
|
|
310
|
+
local _condition = #recents > 0
|
|
311
|
+
if _condition then
|
|
312
|
+
local _attributes_20 = {
|
|
313
|
+
key = "Recent",
|
|
314
|
+
}
|
|
315
|
+
for _k, _v in styles.recent do
|
|
316
|
+
_attributes_20[_k] = _v
|
|
317
|
+
end
|
|
318
|
+
_attributes_20.LayoutOrder = 5
|
|
319
|
+
local _attributes_21 = table.clone(styles.rowLayout)
|
|
320
|
+
setmetatable(_attributes_21, nil)
|
|
321
|
+
local _exp_14 = React.createElement("uilistlayout", _attributes_21)
|
|
322
|
+
-- ▼ ReadonlyArray.map ▼
|
|
323
|
+
local _newValue = table.create(#recents)
|
|
324
|
+
local _callback = function(color, index)
|
|
325
|
+
local _attributes_22 = {
|
|
326
|
+
key = `Recent-{index}`,
|
|
327
|
+
}
|
|
328
|
+
for _k, _v in styles.recentChip do
|
|
329
|
+
_attributes_22[_k] = _v
|
|
330
|
+
end
|
|
331
|
+
_attributes_22.BackgroundColor3 = color
|
|
332
|
+
_attributes_22.LayoutOrder = index
|
|
333
|
+
_attributes_22.Event = {
|
|
334
|
+
Activated = function()
|
|
335
|
+
if active then
|
|
336
|
+
emit(resolveHsv(color, hsvRef.current))
|
|
337
|
+
end
|
|
338
|
+
end,
|
|
339
|
+
}
|
|
340
|
+
local _attributes_23 = table.clone(styles.corner)
|
|
341
|
+
setmetatable(_attributes_23, nil)
|
|
342
|
+
local _exp_15 = React.createElement("uicorner", _attributes_23)
|
|
343
|
+
local _attributes_24 = table.clone(styles.swatchStroke)
|
|
344
|
+
setmetatable(_attributes_24, nil)
|
|
345
|
+
return React.createElement("textbutton", _attributes_22, _exp_15, React.createElement("uistroke", _attributes_24))
|
|
346
|
+
end
|
|
347
|
+
for _k, _v in recents do
|
|
348
|
+
_newValue[_k] = _callback(_v, _k - 1, recents)
|
|
349
|
+
end
|
|
350
|
+
-- ▲ ReadonlyArray.map ▲
|
|
351
|
+
_condition = (React.createElement("frame", _attributes_20, _exp_14, _newValue))
|
|
352
|
+
end
|
|
353
|
+
return React.createElement("frame", _attributes, _exp, _exp_4, _exp_9, _exp_12, _exp_13, _condition)
|
|
354
|
+
end
|
|
355
|
+
local function ColorPicker(props)
|
|
356
|
+
local _binding = props
|
|
357
|
+
local value = _binding.value
|
|
358
|
+
local onChange = _binding.onChange
|
|
359
|
+
local disabled = _binding.disabled
|
|
360
|
+
local className = _binding.className
|
|
361
|
+
local sx = _binding.sx
|
|
362
|
+
local id = _binding.id
|
|
363
|
+
local ref = _binding.ref
|
|
364
|
+
local styles = useColorPickerStyles()
|
|
365
|
+
local _binding_1 = useTheme()
|
|
366
|
+
local theme = _binding_1.theme
|
|
367
|
+
local active = canActivate(disabled)
|
|
368
|
+
local anchor, setAnchor = useState()
|
|
369
|
+
local open, setOpen = useState(false)
|
|
370
|
+
local hexDraft, setHexDraft = useState(colorToHex(value))
|
|
371
|
+
local hexFault, setHexFault = useState(false)
|
|
372
|
+
local shown = open and active
|
|
373
|
+
useEffect(function()
|
|
374
|
+
setHexDraft(colorToHex(value))
|
|
375
|
+
setHexFault(false)
|
|
376
|
+
end, { value })
|
|
377
|
+
local close = function()
|
|
378
|
+
rememberColor(value)
|
|
379
|
+
setOpen(false)
|
|
380
|
+
end
|
|
381
|
+
useEffect(function()
|
|
382
|
+
if not shown then
|
|
383
|
+
return nil
|
|
384
|
+
end
|
|
385
|
+
local connection = UserInputService.InputBegan:Connect(function(input)
|
|
386
|
+
if input.KeyCode == Enum.KeyCode.Escape or input.KeyCode == Enum.KeyCode.ButtonB then
|
|
387
|
+
close()
|
|
388
|
+
end
|
|
389
|
+
end)
|
|
390
|
+
return function()
|
|
391
|
+
return connection:Disconnect()
|
|
392
|
+
end
|
|
393
|
+
end, { shown, value })
|
|
394
|
+
local _attributes = {}
|
|
395
|
+
local _condition = id
|
|
396
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
397
|
+
_condition = "ColorPicker"
|
|
398
|
+
end
|
|
399
|
+
_attributes.key = _condition
|
|
400
|
+
_attributes.ref = ref
|
|
401
|
+
for _k, _v in styles.field do
|
|
402
|
+
_attributes[_k] = _v
|
|
403
|
+
end
|
|
404
|
+
if className then
|
|
405
|
+
for _k, _v in className do
|
|
406
|
+
_attributes[_k] = _v
|
|
407
|
+
end
|
|
408
|
+
end
|
|
409
|
+
if sx then
|
|
410
|
+
for _k, _v in sx do
|
|
411
|
+
_attributes[_k] = _v
|
|
412
|
+
end
|
|
413
|
+
end
|
|
414
|
+
local _attributes_1 = table.clone(styles.rowLayout)
|
|
415
|
+
setmetatable(_attributes_1, nil)
|
|
416
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
417
|
+
local _attributes_2 = {
|
|
418
|
+
key = "Swatch",
|
|
419
|
+
ref = setAnchor,
|
|
420
|
+
}
|
|
421
|
+
for _k, _v in styles.swatchButton do
|
|
422
|
+
_attributes_2[_k] = _v
|
|
423
|
+
end
|
|
424
|
+
_attributes_2.BackgroundColor3 = value
|
|
425
|
+
_attributes_2.LayoutOrder = 1
|
|
426
|
+
_attributes_2.Active = active
|
|
427
|
+
_attributes_2.Selectable = active
|
|
428
|
+
_attributes_2.Event = {
|
|
429
|
+
Activated = function()
|
|
430
|
+
if not active then
|
|
431
|
+
return nil
|
|
432
|
+
end
|
|
433
|
+
if shown then
|
|
434
|
+
close()
|
|
435
|
+
else
|
|
436
|
+
setOpen(true)
|
|
437
|
+
end
|
|
438
|
+
end,
|
|
439
|
+
}
|
|
440
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
441
|
+
setmetatable(_attributes_3, nil)
|
|
442
|
+
local _exp_1 = React.createElement("uicorner", _attributes_3)
|
|
443
|
+
local _attributes_4 = table.clone(styles.swatchStroke)
|
|
444
|
+
setmetatable(_attributes_4, nil)
|
|
445
|
+
local _exp_2 = React.createElement("textbutton", _attributes_2, _exp_1, React.createElement("uistroke", _attributes_4))
|
|
446
|
+
local _attributes_5 = {
|
|
447
|
+
key = "Value",
|
|
448
|
+
}
|
|
449
|
+
for _k, _v in styles.value do
|
|
450
|
+
_attributes_5[_k] = _v
|
|
451
|
+
end
|
|
452
|
+
_attributes_5.LayoutOrder = 2
|
|
453
|
+
local _exp_3 = React.createElement("frame", _attributes_5, React.createElement(Input, {
|
|
454
|
+
text = hexDraft,
|
|
455
|
+
placeholder = colorBytes(value),
|
|
456
|
+
disabled = disabled,
|
|
457
|
+
hasError = hexFault,
|
|
458
|
+
width = UDim.new(1, 0),
|
|
459
|
+
onInput = function(text)
|
|
460
|
+
setHexDraft(text)
|
|
461
|
+
local parsed = parseHex(text)
|
|
462
|
+
if parsed == nil then
|
|
463
|
+
setHexFault(#text > 0)
|
|
464
|
+
return nil
|
|
465
|
+
end
|
|
466
|
+
setHexFault(false)
|
|
467
|
+
onChange(parsed)
|
|
468
|
+
end,
|
|
469
|
+
onTextChanged = function(text)
|
|
470
|
+
local parsed = parseHex(text)
|
|
471
|
+
if parsed == nil then
|
|
472
|
+
setHexFault(false)
|
|
473
|
+
setHexDraft(colorToHex(value))
|
|
474
|
+
return nil
|
|
475
|
+
end
|
|
476
|
+
setHexFault(false)
|
|
477
|
+
onChange(parsed)
|
|
478
|
+
end,
|
|
479
|
+
}))
|
|
480
|
+
local _condition_1 = shown
|
|
481
|
+
if _condition_1 then
|
|
482
|
+
local _attributes_6 = {
|
|
483
|
+
key = "Shell",
|
|
484
|
+
}
|
|
485
|
+
for _k, _v in styles.shell do
|
|
486
|
+
_attributes_6[_k] = _v
|
|
487
|
+
end
|
|
488
|
+
local _attributes_7 = table.clone(styles.corner)
|
|
489
|
+
setmetatable(_attributes_7, nil)
|
|
490
|
+
local _exp_4 = React.createElement("uicorner", _attributes_7)
|
|
491
|
+
local _attributes_8 = table.clone(styles.swatchStroke)
|
|
492
|
+
setmetatable(_attributes_8, nil)
|
|
493
|
+
local _exp_5 = React.createElement("uistroke", _attributes_8)
|
|
494
|
+
local _attributes_9 = table.clone(styles.shellPad)
|
|
495
|
+
setmetatable(_attributes_9, nil)
|
|
496
|
+
_condition_1 = (React.createElement(Popup, {
|
|
497
|
+
anchor = anchor,
|
|
498
|
+
preferredWidth = theme.spacing.calc(18),
|
|
499
|
+
preferredHeight = theme.spacing.calc(20),
|
|
500
|
+
onDismiss = close,
|
|
501
|
+
}, React.createElement("frame", _attributes_6, _exp_4, _exp_5, React.createElement("uipadding", _attributes_9), React.createElement(ColorPanel, {
|
|
502
|
+
value = value,
|
|
503
|
+
disabled = disabled,
|
|
504
|
+
onChange = onChange,
|
|
505
|
+
}))))
|
|
506
|
+
end
|
|
507
|
+
return React.createElement("frame", _attributes, _exp, _exp_2, _exp_3, _condition_1)
|
|
508
|
+
end
|
|
509
|
+
local default = ColorPicker
|
|
510
|
+
return {
|
|
511
|
+
default = default,
|
|
512
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
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 useColorPickerStyles = componentStyles("ColorPicker", function(theme)
|
|
7
|
+
return createStyles({
|
|
8
|
+
root = {
|
|
9
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
10
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
11
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
12
|
+
BackgroundTransparency = 1,
|
|
13
|
+
BorderSizePixel = 0,
|
|
14
|
+
Selectable = true,
|
|
15
|
+
},
|
|
16
|
+
column = {
|
|
17
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
18
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
19
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
20
|
+
},
|
|
21
|
+
row = {
|
|
22
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
23
|
+
BackgroundTransparency = 1,
|
|
24
|
+
BorderSizePixel = 0,
|
|
25
|
+
},
|
|
26
|
+
rowLayout = {
|
|
27
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
28
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
29
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
30
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
31
|
+
},
|
|
32
|
+
swatch = {
|
|
33
|
+
Size = UDim2.fromOffset(theme.spacing.calc(2), theme.spacing.calc(2)),
|
|
34
|
+
BorderSizePixel = 0,
|
|
35
|
+
},
|
|
36
|
+
swatchStroke = {
|
|
37
|
+
Color = theme.palette.divider,
|
|
38
|
+
Thickness = 1,
|
|
39
|
+
},
|
|
40
|
+
corner = {
|
|
41
|
+
CornerRadius = UDim.new(0, theme.padding.calc(0.5)),
|
|
42
|
+
},
|
|
43
|
+
hex = {
|
|
44
|
+
Size = UDim2.new(1, -theme.spacing.calc(3), 1, 0),
|
|
45
|
+
BackgroundTransparency = 1,
|
|
46
|
+
},
|
|
47
|
+
plane = {
|
|
48
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(8)),
|
|
49
|
+
BorderSizePixel = 0,
|
|
50
|
+
Active = true,
|
|
51
|
+
},
|
|
52
|
+
planeOverlay = {
|
|
53
|
+
Size = UDim2.fromScale(1, 1),
|
|
54
|
+
BackgroundColor3 = Color3.new(0, 0, 0),
|
|
55
|
+
BorderSizePixel = 0,
|
|
56
|
+
},
|
|
57
|
+
cursor = {
|
|
58
|
+
Size = UDim2.fromOffset(theme.spacing.calc(1), theme.spacing.calc(1)),
|
|
59
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
60
|
+
BackgroundTransparency = 1,
|
|
61
|
+
BorderSizePixel = 0,
|
|
62
|
+
},
|
|
63
|
+
cursorStroke = {
|
|
64
|
+
Color = Color3.new(1, 1, 1),
|
|
65
|
+
Thickness = 2,
|
|
66
|
+
},
|
|
67
|
+
hue = {
|
|
68
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(1.5)),
|
|
69
|
+
BorderSizePixel = 0,
|
|
70
|
+
Active = true,
|
|
71
|
+
},
|
|
72
|
+
hueKnob = {
|
|
73
|
+
Size = UDim2.fromOffset(theme.padding.calc(1), theme.spacing.calc(1.5)),
|
|
74
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
75
|
+
BackgroundColor3 = theme.palette.text.primary,
|
|
76
|
+
BorderSizePixel = 0,
|
|
77
|
+
},
|
|
78
|
+
channel = {
|
|
79
|
+
Size = UDim2.new(1 / 3, -theme.padding.calc(1), 0, theme.spacing.calc(2)),
|
|
80
|
+
BackgroundTransparency = 1,
|
|
81
|
+
},
|
|
82
|
+
label = {
|
|
83
|
+
Size = UDim2.new(0, theme.spacing.calc(1), 1, 0),
|
|
84
|
+
BackgroundTransparency = 1,
|
|
85
|
+
Font = theme.typography.fontFamilies.default,
|
|
86
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
87
|
+
TextColor3 = theme.palette.text.secondary,
|
|
88
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
89
|
+
},
|
|
90
|
+
channelField = {
|
|
91
|
+
Size = UDim2.new(1, -theme.spacing.calc(1), 1, 0),
|
|
92
|
+
BackgroundTransparency = 1,
|
|
93
|
+
},
|
|
94
|
+
field = {
|
|
95
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
96
|
+
BackgroundTransparency = 1,
|
|
97
|
+
BorderSizePixel = 0,
|
|
98
|
+
},
|
|
99
|
+
swatchButton = {
|
|
100
|
+
Size = UDim2.fromOffset(theme.spacing.calc(2), theme.spacing.calc(2)),
|
|
101
|
+
BorderSizePixel = 0,
|
|
102
|
+
AutoButtonColor = false,
|
|
103
|
+
Text = "",
|
|
104
|
+
},
|
|
105
|
+
value = {
|
|
106
|
+
Size = UDim2.new(1, -theme.spacing.calc(3), 1, 0),
|
|
107
|
+
BackgroundTransparency = 1,
|
|
108
|
+
},
|
|
109
|
+
shell = {
|
|
110
|
+
Size = UDim2.fromScale(1, 1),
|
|
111
|
+
BackgroundColor3 = theme.palette.surface.elevated,
|
|
112
|
+
BorderSizePixel = 0,
|
|
113
|
+
},
|
|
114
|
+
shellPad = {
|
|
115
|
+
PaddingTop = UDim.new(0, theme.padding.calc(1)),
|
|
116
|
+
PaddingBottom = UDim.new(0, theme.padding.calc(1)),
|
|
117
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(1)),
|
|
118
|
+
PaddingRight = UDim.new(0, theme.padding.calc(1)),
|
|
119
|
+
},
|
|
120
|
+
recent = {
|
|
121
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(1.5)),
|
|
122
|
+
BackgroundTransparency = 1,
|
|
123
|
+
},
|
|
124
|
+
recentChip = {
|
|
125
|
+
Size = UDim2.fromOffset(theme.spacing.calc(1.5), theme.spacing.calc(1.5)),
|
|
126
|
+
BorderSizePixel = 0,
|
|
127
|
+
AutoButtonColor = false,
|
|
128
|
+
Text = "",
|
|
129
|
+
},
|
|
130
|
+
link = {
|
|
131
|
+
Size = UDim2.new(0, 0, 0, theme.spacing.calc(1.5)),
|
|
132
|
+
AutomaticSize = Enum.AutomaticSize.X,
|
|
133
|
+
BackgroundTransparency = 1,
|
|
134
|
+
AutoButtonColor = false,
|
|
135
|
+
Font = theme.typography.fontFamilies.default,
|
|
136
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
137
|
+
TextColor3 = theme.palette.text.secondary,
|
|
138
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
end)
|
|
142
|
+
local default = useColorPickerStyles
|
|
143
|
+
return {
|
|
144
|
+
default = default,
|
|
145
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface ColorSequenceEditorProps {
|
|
3
|
+
value: ColorSequence;
|
|
4
|
+
onChange: (value: ColorSequence) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function ColorSequenceEditor(props: CustomizedProps<Frame, ColorSequenceEditorProps>): JSX.Element;
|
|
8
|
+
export default ColorSequenceEditor;
|