@rbxts/uiblox 0.1.53 → 0.2.0-alpha.0
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 +67 -2
- 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/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/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 +7 -1
- package/out/theme/styles/utilities/interaction.d.ts +13 -0
- package/out/theme/styles/utilities/interaction.luau +68 -0
- package/out/theme/styles/utilities/makeStyles.luau +14 -15
- 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/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 +45 -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/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 +18 -32
- 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/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 +3 -3
- 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 +3 -3
- package/out/ui/packages/index.d.ts +46 -0
- package/out/ui/packages/init.luau +138 -0
- package/out/ui/packages/input/components/Input.d.ts +6 -1
- package/out/ui/packages/input/components/Input.luau +137 -54
- package/out/ui/packages/input/components/Input.styles.d.ts +3 -1
- package/out/ui/packages/input/components/Input.styles.luau +74 -52
- 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 +14 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +44 -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 +15 -0
- package/out/ui/packages/select/components/Select.luau +432 -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 +3 -3
- 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 +1369 -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 +6 -34
- 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,204 @@
|
|
|
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 useRef = _react.useRef
|
|
6
|
+
local useState = _react.useState
|
|
7
|
+
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
8
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
|
+
local commitNumber = TS.import(script, script.Parent.Parent.Parent, "numberInput", "components", "numberValue").commitNumber
|
|
10
|
+
local useSliderStyles = TS.import(script, script.Parent, "Slider.styles").default
|
|
11
|
+
local _sliderNudge = TS.import(script, script.Parent, "sliderNudge")
|
|
12
|
+
local isSliderDrag = _sliderNudge.isSliderDrag
|
|
13
|
+
local isSliderMove = _sliderNudge.isSliderMove
|
|
14
|
+
local nudgeDelta = _sliderNudge.nudgeDelta
|
|
15
|
+
local nudgeValue = _sliderNudge.nudgeValue
|
|
16
|
+
local function Slider(props)
|
|
17
|
+
local _binding = props
|
|
18
|
+
local value = _binding.value
|
|
19
|
+
local onChange = _binding.onChange
|
|
20
|
+
local onCommit = _binding.onCommit
|
|
21
|
+
local min = _binding.min
|
|
22
|
+
local max = _binding.max
|
|
23
|
+
local step = _binding.step
|
|
24
|
+
local disabled = _binding.disabled
|
|
25
|
+
local size = _binding.size
|
|
26
|
+
local className = _binding.className
|
|
27
|
+
local sx = _binding.sx
|
|
28
|
+
local id = _binding.id
|
|
29
|
+
local ref = _binding.ref
|
|
30
|
+
local _binding_1 = useSliderStyles({
|
|
31
|
+
size = size,
|
|
32
|
+
})
|
|
33
|
+
local root = _binding_1.root
|
|
34
|
+
local track = _binding_1.track
|
|
35
|
+
local fill = _binding_1.fill
|
|
36
|
+
local knob = _binding_1.knob
|
|
37
|
+
local corner = _binding_1.corner
|
|
38
|
+
local stroke = _binding_1.stroke
|
|
39
|
+
local active = canActivate(disabled)
|
|
40
|
+
local focused, setFocused = useState(false)
|
|
41
|
+
local hovering, setHovering = useState(false)
|
|
42
|
+
local pressed, setPressed = useState(false)
|
|
43
|
+
local dragging = useRef(false)
|
|
44
|
+
local latest = useRef(value)
|
|
45
|
+
local ratio = if max > min then (math.clamp(value, min, max) - min) / (max - min) else 0
|
|
46
|
+
local faded = disabled == true
|
|
47
|
+
local showFocus = focused and active
|
|
48
|
+
local update = function(rbx, x)
|
|
49
|
+
local width = rbx.AbsoluteSize.X
|
|
50
|
+
if width <= 0 then
|
|
51
|
+
return nil
|
|
52
|
+
end
|
|
53
|
+
local committed = commitNumber(min + ((x - rbx.AbsolutePosition.X) / width) * (max - min), min, max, step)
|
|
54
|
+
if committed == nil or committed == latest.current then
|
|
55
|
+
return nil
|
|
56
|
+
end
|
|
57
|
+
latest.current = committed
|
|
58
|
+
onChange(committed)
|
|
59
|
+
end
|
|
60
|
+
local finish = function()
|
|
61
|
+
if not dragging.current then
|
|
62
|
+
return nil
|
|
63
|
+
end
|
|
64
|
+
dragging.current = false
|
|
65
|
+
setPressed(false)
|
|
66
|
+
if onCommit then
|
|
67
|
+
onCommit(latest.current)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
local nudge = function(direction)
|
|
71
|
+
if not active then
|
|
72
|
+
return nil
|
|
73
|
+
end
|
|
74
|
+
local nudged = nudgeValue(value, min, max, step, direction)
|
|
75
|
+
if nudged == nil or nudged == value then
|
|
76
|
+
return nil
|
|
77
|
+
end
|
|
78
|
+
latest.current = nudged
|
|
79
|
+
onChange(nudged)
|
|
80
|
+
if onCommit then
|
|
81
|
+
onCommit(nudged)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
local _attributes = {}
|
|
85
|
+
local _condition = id
|
|
86
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
87
|
+
_condition = "Slider"
|
|
88
|
+
end
|
|
89
|
+
_attributes.key = _condition
|
|
90
|
+
_attributes.ref = ref
|
|
91
|
+
for _k, _v in root do
|
|
92
|
+
_attributes[_k] = _v
|
|
93
|
+
end
|
|
94
|
+
if className then
|
|
95
|
+
for _k, _v in className do
|
|
96
|
+
_attributes[_k] = _v
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
if sx then
|
|
100
|
+
for _k, _v in sx do
|
|
101
|
+
_attributes[_k] = _v
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
_attributes.Active = active
|
|
105
|
+
_attributes.Selectable = active
|
|
106
|
+
_attributes.BackgroundTransparency = if showFocus then 0.85 else 1
|
|
107
|
+
_attributes.Event = {
|
|
108
|
+
InputBegan = function(rbx, input)
|
|
109
|
+
if not active then
|
|
110
|
+
return nil
|
|
111
|
+
end
|
|
112
|
+
local direction = nudgeDelta(input.KeyCode.Name)
|
|
113
|
+
if direction ~= nil then
|
|
114
|
+
nudge(direction)
|
|
115
|
+
return nil
|
|
116
|
+
end
|
|
117
|
+
if not isSliderDrag(input.UserInputType.Name) then
|
|
118
|
+
return nil
|
|
119
|
+
end
|
|
120
|
+
dragging.current = true
|
|
121
|
+
setPressed(true)
|
|
122
|
+
latest.current = value
|
|
123
|
+
update(rbx, input.Position.X)
|
|
124
|
+
end,
|
|
125
|
+
InputChanged = function(rbx, input)
|
|
126
|
+
if dragging.current and isSliderMove(input.UserInputType.Name) then
|
|
127
|
+
update(rbx, input.Position.X)
|
|
128
|
+
end
|
|
129
|
+
end,
|
|
130
|
+
InputEnded = function(_, input)
|
|
131
|
+
if isSliderDrag(input.UserInputType.Name) then
|
|
132
|
+
finish()
|
|
133
|
+
end
|
|
134
|
+
end,
|
|
135
|
+
MouseEnter = function()
|
|
136
|
+
if active then
|
|
137
|
+
setHovering(true)
|
|
138
|
+
end
|
|
139
|
+
end,
|
|
140
|
+
MouseLeave = function()
|
|
141
|
+
setHovering(false)
|
|
142
|
+
finish()
|
|
143
|
+
end,
|
|
144
|
+
SelectionGained = function()
|
|
145
|
+
return setFocused(true)
|
|
146
|
+
end,
|
|
147
|
+
SelectionLost = function()
|
|
148
|
+
return setFocused(false)
|
|
149
|
+
end,
|
|
150
|
+
}
|
|
151
|
+
local _attributes_1 = {
|
|
152
|
+
key = "Track",
|
|
153
|
+
}
|
|
154
|
+
for _k, _v in cx(track, {
|
|
155
|
+
BackgroundTransparency = if faded then 0.55 elseif hovering and active then 0.2 else 0.35,
|
|
156
|
+
}) do
|
|
157
|
+
_attributes_1[_k] = _v
|
|
158
|
+
end
|
|
159
|
+
local _attributes_2 = table.clone(corner)
|
|
160
|
+
setmetatable(_attributes_2, nil)
|
|
161
|
+
local _exp = React.createElement("uicorner", _attributes_2)
|
|
162
|
+
local _condition_1 = showFocus
|
|
163
|
+
if _condition_1 then
|
|
164
|
+
local _attributes_3 = table.clone(stroke)
|
|
165
|
+
setmetatable(_attributes_3, nil)
|
|
166
|
+
_condition_1 = React.createElement("uistroke", _attributes_3)
|
|
167
|
+
end
|
|
168
|
+
local _attributes_3 = {
|
|
169
|
+
key = "Fill",
|
|
170
|
+
}
|
|
171
|
+
for _k, _v in cx(fill, {
|
|
172
|
+
BackgroundTransparency = if faded then 0.55 elseif pressed then 0.1 else 0,
|
|
173
|
+
}) do
|
|
174
|
+
_attributes_3[_k] = _v
|
|
175
|
+
end
|
|
176
|
+
_attributes_3.Size = UDim2.fromScale(ratio, 1)
|
|
177
|
+
local _attributes_4 = table.clone(corner)
|
|
178
|
+
setmetatable(_attributes_4, nil)
|
|
179
|
+
local _exp_1 = React.createElement("frame", _attributes_3, React.createElement("uicorner", _attributes_4))
|
|
180
|
+
local _attributes_5 = {
|
|
181
|
+
key = "Knob",
|
|
182
|
+
}
|
|
183
|
+
for _k, _v in cx(knob, {
|
|
184
|
+
BackgroundTransparency = if faded then 0.45 else 0,
|
|
185
|
+
}) do
|
|
186
|
+
_attributes_5[_k] = _v
|
|
187
|
+
end
|
|
188
|
+
_attributes_5.Position = UDim2.fromScale(ratio, 0.5)
|
|
189
|
+
local _attributes_6 = table.clone(corner)
|
|
190
|
+
setmetatable(_attributes_6, nil)
|
|
191
|
+
local _exp_2 = React.createElement("uicorner", _attributes_6)
|
|
192
|
+
local _condition_2 = showFocus
|
|
193
|
+
if _condition_2 then
|
|
194
|
+
local _attributes_7 = table.clone(stroke)
|
|
195
|
+
setmetatable(_attributes_7, nil)
|
|
196
|
+
_attributes_7.Thickness = 1
|
|
197
|
+
_condition_2 = React.createElement("uistroke", _attributes_7)
|
|
198
|
+
end
|
|
199
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _condition_1, _exp_1, React.createElement("frame", _attributes_5, _exp_2, _condition_2)))
|
|
200
|
+
end
|
|
201
|
+
local default = Slider
|
|
202
|
+
return {
|
|
203
|
+
default = default,
|
|
204
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ControlSize } from "../../../../theme/index";
|
|
2
|
+
export interface SliderStyleProps {
|
|
3
|
+
size?: ControlSize;
|
|
4
|
+
}
|
|
5
|
+
declare const useSliderStyles: (props: SliderStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
6
|
+
export default useSliderStyles;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local controlMetrics = _theme.controlMetrics
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local componentStyles = _theme.componentStyles
|
|
7
|
+
local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
8
|
+
local size = _param.size
|
|
9
|
+
local metrics = controlMetrics(theme.density, size)
|
|
10
|
+
return createStyles({
|
|
11
|
+
root = {
|
|
12
|
+
Size = UDim2.new(1, 0, 0, metrics.sliderHeight),
|
|
13
|
+
BackgroundTransparency = 1,
|
|
14
|
+
BorderSizePixel = 0,
|
|
15
|
+
},
|
|
16
|
+
track = {
|
|
17
|
+
Size = UDim2.new(1, 0, 0, metrics.sliderTrack),
|
|
18
|
+
Position = UDim2.fromScale(0, 0.5),
|
|
19
|
+
AnchorPoint = Vector2.new(0, 0.5),
|
|
20
|
+
BackgroundColor3 = theme.palette.action.disabled,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
},
|
|
23
|
+
fill = {
|
|
24
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
25
|
+
BorderSizePixel = 0,
|
|
26
|
+
},
|
|
27
|
+
knob = {
|
|
28
|
+
Size = UDim2.fromOffset(metrics.sliderKnob, metrics.sliderKnob),
|
|
29
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
30
|
+
BackgroundColor3 = theme.palette.text.primary,
|
|
31
|
+
BorderSizePixel = 0,
|
|
32
|
+
ZIndex = 2,
|
|
33
|
+
},
|
|
34
|
+
corner = {
|
|
35
|
+
CornerRadius = UDim.new(1, 0),
|
|
36
|
+
},
|
|
37
|
+
stroke = {
|
|
38
|
+
Color = theme.palette.focus,
|
|
39
|
+
Thickness = 2,
|
|
40
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
end)
|
|
44
|
+
local default = useSliderStyles
|
|
45
|
+
return {
|
|
46
|
+
default = default,
|
|
47
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function nudgeDelta(key: string): number | undefined;
|
|
2
|
+
export declare function nudgeValue(value: number, min: number, max: number, step: number | undefined, direction: number): number | undefined;
|
|
3
|
+
export declare function isSliderDrag(kind: string): kind is "MouseButton1" | "Touch";
|
|
4
|
+
export declare function isSliderMove(kind: string): kind is "MouseMovement" | "Touch";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function nudgeDelta(key)
|
|
3
|
+
if key == "Left" or key == "DPadLeft" or key == "ButtonL" then
|
|
4
|
+
return -1
|
|
5
|
+
end
|
|
6
|
+
if key == "Right" or key == "DPadRight" or key == "ButtonR" then
|
|
7
|
+
return 1
|
|
8
|
+
end
|
|
9
|
+
return nil
|
|
10
|
+
end
|
|
11
|
+
local function nudgeValue(value, min, max, step, direction)
|
|
12
|
+
local delta = if step ~= nil and step > 0 then step else (max - min) / 10
|
|
13
|
+
local result = value + direction * delta
|
|
14
|
+
if step ~= nil and step > 0 then
|
|
15
|
+
result = min + math.floor((result - min) / step + 0.5) * step
|
|
16
|
+
end
|
|
17
|
+
if result < min then
|
|
18
|
+
result = min
|
|
19
|
+
end
|
|
20
|
+
if result > max then
|
|
21
|
+
result = max
|
|
22
|
+
end
|
|
23
|
+
if result ~= result or result == math.huge or result == -math.huge then
|
|
24
|
+
return nil
|
|
25
|
+
end
|
|
26
|
+
return result
|
|
27
|
+
end
|
|
28
|
+
local function isSliderDrag(kind)
|
|
29
|
+
return kind == "MouseButton1" or kind == "Touch"
|
|
30
|
+
end
|
|
31
|
+
local function isSliderMove(kind)
|
|
32
|
+
return kind == "MouseMovement" or kind == "Touch"
|
|
33
|
+
end
|
|
34
|
+
return {
|
|
35
|
+
nudgeDelta = nudgeDelta,
|
|
36
|
+
nudgeValue = nudgeValue,
|
|
37
|
+
isSliderDrag = isSliderDrag,
|
|
38
|
+
isSliderMove = isSliderMove,
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import ToastVariants from "../../toast/enums/ToastVariants";
|
|
3
|
+
export interface SnackbarProps {
|
|
4
|
+
message: string;
|
|
5
|
+
onDismiss: () => void;
|
|
6
|
+
duration?: number;
|
|
7
|
+
variant?: ToastVariants;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Snackbar(props: CustomizedProps<Frame, SnackbarProps>): JSX.Element | undefined;
|
|
11
|
+
export default Snackbar;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 Toast = TS.import(script, script.Parent.Parent.Parent, "toast").Toast
|
|
5
|
+
local function Snackbar(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local message = _binding.message
|
|
8
|
+
local onDismiss = _binding.onDismiss
|
|
9
|
+
local duration = _binding.duration
|
|
10
|
+
local variant = _binding.variant
|
|
11
|
+
local open = _binding.open
|
|
12
|
+
if open == nil then
|
|
13
|
+
open = true
|
|
14
|
+
end
|
|
15
|
+
local className = _binding.className
|
|
16
|
+
local sx = _binding.sx
|
|
17
|
+
local id = _binding.id
|
|
18
|
+
local ref = _binding.ref
|
|
19
|
+
if not open then
|
|
20
|
+
return nil
|
|
21
|
+
end
|
|
22
|
+
local _attributes = {
|
|
23
|
+
text = message,
|
|
24
|
+
onDismiss = onDismiss,
|
|
25
|
+
duration = duration,
|
|
26
|
+
variant = variant,
|
|
27
|
+
className = className,
|
|
28
|
+
sx = sx,
|
|
29
|
+
}
|
|
30
|
+
local _condition = id
|
|
31
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
32
|
+
_condition = "Snackbar"
|
|
33
|
+
end
|
|
34
|
+
_attributes.id = _condition
|
|
35
|
+
_attributes.ref = ref
|
|
36
|
+
return React.createElement(Toast, _attributes)
|
|
37
|
+
end
|
|
38
|
+
local default = Snackbar
|
|
39
|
+
return {
|
|
40
|
+
default = default,
|
|
41
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
export interface SplitPaneProps {
|
|
4
|
+
value: number;
|
|
5
|
+
onChange: (value: number) => void;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
vertical?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
first?: React.ReactNode;
|
|
11
|
+
second?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare function SplitPane(props: CustomizedProps<Frame, SplitPaneProps>): JSX.Element;
|
|
14
|
+
export default SplitPane;
|
|
@@ -0,0 +1,241 @@
|
|
|
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 useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
9
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
10
|
+
local useSplitPaneStyles = TS.import(script, script.Parent, "SplitPane.styles").default
|
|
11
|
+
local _splitLook = TS.import(script, script.Parent, "splitLook")
|
|
12
|
+
local splitHitTransparency = _splitLook.splitHitTransparency
|
|
13
|
+
local splitMarkTransparency = _splitLook.splitMarkTransparency
|
|
14
|
+
local splitPointer = _splitLook.splitPointer
|
|
15
|
+
local splitRuleTransparency = _splitLook.splitRuleTransparency
|
|
16
|
+
local _splitSize = TS.import(script, script.Parent, "splitSize")
|
|
17
|
+
local clampSplit = _splitSize.clampSplit
|
|
18
|
+
local splitBoxDims = _splitSize.splitBoxDims
|
|
19
|
+
local splitRuleDims = _splitSize.splitRuleDims
|
|
20
|
+
local toUDim2 = _splitSize.toUDim2
|
|
21
|
+
local function SplitPane(props)
|
|
22
|
+
local _binding = props
|
|
23
|
+
local value = _binding.value
|
|
24
|
+
local onChange = _binding.onChange
|
|
25
|
+
local min = _binding.min
|
|
26
|
+
local max = _binding.max
|
|
27
|
+
local vertical = _binding.vertical
|
|
28
|
+
if vertical == nil then
|
|
29
|
+
vertical = false
|
|
30
|
+
end
|
|
31
|
+
local disabled = _binding.disabled
|
|
32
|
+
local first = _binding.first
|
|
33
|
+
local second = _binding.second
|
|
34
|
+
local className = _binding.className
|
|
35
|
+
local sx = _binding.sx
|
|
36
|
+
local id = _binding.id
|
|
37
|
+
local ref = _binding.ref
|
|
38
|
+
local styles = useSplitPaneStyles()
|
|
39
|
+
local _binding_1 = useTheme()
|
|
40
|
+
local theme = _binding_1.theme
|
|
41
|
+
local thickness = theme.padding.calc(3)
|
|
42
|
+
local active = canActivate(disabled)
|
|
43
|
+
local body, setBody = useState()
|
|
44
|
+
local total, setTotal = useState(0)
|
|
45
|
+
local dragging, setDragging = useState(false)
|
|
46
|
+
local hovering, setHovering = useState(false)
|
|
47
|
+
local start = useRef(value)
|
|
48
|
+
local axis = function(vector)
|
|
49
|
+
return if vertical then vector.Y else vector.X
|
|
50
|
+
end
|
|
51
|
+
local size = clampSplit(value, total - thickness, min, max)
|
|
52
|
+
local at = function(offset)
|
|
53
|
+
return if vertical then UDim2.fromOffset(0, offset) else UDim2.fromOffset(offset, 0)
|
|
54
|
+
end
|
|
55
|
+
local along = function(offset, scale)
|
|
56
|
+
if scale == nil then
|
|
57
|
+
scale = 0
|
|
58
|
+
end
|
|
59
|
+
return if vertical then UDim2.new(1, 0, scale, offset) else UDim2.new(scale, offset, 1, 0)
|
|
60
|
+
end
|
|
61
|
+
local pointer = splitPointer(hovering, dragging)
|
|
62
|
+
local markTransparency = splitMarkTransparency(pointer, disabled)
|
|
63
|
+
local ruleTransparency = splitRuleTransparency(pointer, disabled)
|
|
64
|
+
local markLen = theme.spacing.calc(2) + theme.padding.default
|
|
65
|
+
local markGap = theme.padding.default / 2
|
|
66
|
+
local markThick = theme.options.constants.borders.divider
|
|
67
|
+
local ruleThick = theme.options.constants.borders.default
|
|
68
|
+
local gripAcross = markThick * 3 + markGap * 2
|
|
69
|
+
useEffect(function()
|
|
70
|
+
if not body then
|
|
71
|
+
return nil
|
|
72
|
+
end
|
|
73
|
+
local measure = function()
|
|
74
|
+
return setTotal(axis(body.AbsoluteSize))
|
|
75
|
+
end
|
|
76
|
+
measure()
|
|
77
|
+
local connection = body:GetPropertyChangedSignal("AbsoluteSize"):Connect(measure)
|
|
78
|
+
return function()
|
|
79
|
+
return connection:Disconnect()
|
|
80
|
+
end
|
|
81
|
+
end, { body, vertical })
|
|
82
|
+
local _attributes = {}
|
|
83
|
+
local _condition = id
|
|
84
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
85
|
+
_condition = "SplitPane"
|
|
86
|
+
end
|
|
87
|
+
_attributes.key = _condition
|
|
88
|
+
_attributes.ref = ref
|
|
89
|
+
for _k, _v in styles.root do
|
|
90
|
+
_attributes[_k] = _v
|
|
91
|
+
end
|
|
92
|
+
if className then
|
|
93
|
+
for _k, _v in className do
|
|
94
|
+
_attributes[_k] = _v
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
if sx then
|
|
98
|
+
for _k, _v in sx do
|
|
99
|
+
_attributes[_k] = _v
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
local _attributes_1 = {
|
|
103
|
+
key = "Body",
|
|
104
|
+
ref = setBody,
|
|
105
|
+
}
|
|
106
|
+
for _k, _v in styles.body do
|
|
107
|
+
_attributes_1[_k] = _v
|
|
108
|
+
end
|
|
109
|
+
local _attributes_2 = {
|
|
110
|
+
key = "First",
|
|
111
|
+
}
|
|
112
|
+
for _k, _v in styles.pane do
|
|
113
|
+
_attributes_2[_k] = _v
|
|
114
|
+
end
|
|
115
|
+
_attributes_2.Size = along(size)
|
|
116
|
+
local _exp = React.createElement("frame", _attributes_2, first)
|
|
117
|
+
local _attributes_3 = {
|
|
118
|
+
key = "Divider",
|
|
119
|
+
}
|
|
120
|
+
for _k, _v in styles.divider do
|
|
121
|
+
_attributes_3[_k] = _v
|
|
122
|
+
end
|
|
123
|
+
_attributes_3.Position = at(size)
|
|
124
|
+
_attributes_3.Size = along(thickness)
|
|
125
|
+
_attributes_3.BackgroundTransparency = splitHitTransparency(pointer, disabled)
|
|
126
|
+
_attributes_3.Active = active
|
|
127
|
+
_attributes_3.Event = {
|
|
128
|
+
InputBegan = function(_, input)
|
|
129
|
+
if not active or input.UserInputType ~= Enum.UserInputType.MouseButton1 then
|
|
130
|
+
return nil
|
|
131
|
+
end
|
|
132
|
+
start.current = size
|
|
133
|
+
setDragging(true)
|
|
134
|
+
end,
|
|
135
|
+
MouseEnter = function()
|
|
136
|
+
if active then
|
|
137
|
+
setHovering(true)
|
|
138
|
+
end
|
|
139
|
+
end,
|
|
140
|
+
MouseLeave = function()
|
|
141
|
+
return setHovering(false)
|
|
142
|
+
end,
|
|
143
|
+
}
|
|
144
|
+
local _attributes_4 = {
|
|
145
|
+
key = "Rule",
|
|
146
|
+
}
|
|
147
|
+
for _k, _v in styles.rule do
|
|
148
|
+
_attributes_4[_k] = _v
|
|
149
|
+
end
|
|
150
|
+
_attributes_4.Size = toUDim2(splitRuleDims(vertical, ruleThick))
|
|
151
|
+
_attributes_4.BackgroundTransparency = ruleTransparency
|
|
152
|
+
local _exp_1 = React.createElement("frame", _attributes_4)
|
|
153
|
+
local _attributes_5 = {
|
|
154
|
+
key = "Grip",
|
|
155
|
+
}
|
|
156
|
+
for _k, _v in styles.grip do
|
|
157
|
+
_attributes_5[_k] = _v
|
|
158
|
+
end
|
|
159
|
+
_attributes_5.Size = toUDim2(splitBoxDims(vertical, markLen, gripAcross))
|
|
160
|
+
local _exp_2 = React.createElement("uilistlayout", {
|
|
161
|
+
key = "GripLayout",
|
|
162
|
+
FillDirection = if vertical then Enum.FillDirection.Vertical else Enum.FillDirection.Horizontal,
|
|
163
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Center,
|
|
164
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
165
|
+
Padding = UDim.new(0, markGap),
|
|
166
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
167
|
+
})
|
|
168
|
+
local _exp_3 = { 1, 2, 3 }
|
|
169
|
+
-- ▼ ReadonlyArray.map ▼
|
|
170
|
+
local _newValue = table.create(#_exp_3)
|
|
171
|
+
local _callback = function(index)
|
|
172
|
+
local _attributes_6 = {
|
|
173
|
+
key = `Mark{index}`,
|
|
174
|
+
}
|
|
175
|
+
for _k, _v in styles.mark do
|
|
176
|
+
_attributes_6[_k] = _v
|
|
177
|
+
end
|
|
178
|
+
_attributes_6.LayoutOrder = index
|
|
179
|
+
_attributes_6.Size = toUDim2(splitBoxDims(vertical, markLen, markThick))
|
|
180
|
+
_attributes_6.BackgroundTransparency = markTransparency
|
|
181
|
+
return React.createElement("frame", _attributes_6)
|
|
182
|
+
end
|
|
183
|
+
for _k, _v in _exp_3 do
|
|
184
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp_3)
|
|
185
|
+
end
|
|
186
|
+
-- ▲ ReadonlyArray.map ▲
|
|
187
|
+
local _exp_4 = React.createElement("frame", _attributes_3, _exp_1, React.createElement("frame", _attributes_5, _exp_2, _newValue))
|
|
188
|
+
local _attributes_6 = {
|
|
189
|
+
key = "Second",
|
|
190
|
+
}
|
|
191
|
+
for _k, _v in styles.pane do
|
|
192
|
+
_attributes_6[_k] = _v
|
|
193
|
+
end
|
|
194
|
+
_attributes_6.Position = at(size + thickness)
|
|
195
|
+
_attributes_6.Size = along(-size - thickness, 1)
|
|
196
|
+
local _exp_5 = React.createElement("frame", _attributes_6, second)
|
|
197
|
+
local _condition_1 = dragging and active
|
|
198
|
+
if _condition_1 then
|
|
199
|
+
local _attributes_7 = {
|
|
200
|
+
key = "Overlay",
|
|
201
|
+
}
|
|
202
|
+
for _k, _v in styles.overlay do
|
|
203
|
+
_attributes_7[_k] = _v
|
|
204
|
+
end
|
|
205
|
+
_attributes_7.Event = {
|
|
206
|
+
InputChanged = function(rbx, input)
|
|
207
|
+
if input.UserInputType ~= Enum.UserInputType.MouseMovement then
|
|
208
|
+
return nil
|
|
209
|
+
end
|
|
210
|
+
local alongPointer = axis(input.Position) - axis(rbx.AbsolutePosition) - thickness / 2
|
|
211
|
+
local resized = clampSplit(alongPointer, total - thickness, min, max)
|
|
212
|
+
if resized ~= value then
|
|
213
|
+
onChange(resized)
|
|
214
|
+
end
|
|
215
|
+
end,
|
|
216
|
+
InputBegan = function(_, input)
|
|
217
|
+
if input.KeyCode ~= Enum.KeyCode.Escape then
|
|
218
|
+
return nil
|
|
219
|
+
end
|
|
220
|
+
setDragging(false)
|
|
221
|
+
if start.current ~= value then
|
|
222
|
+
onChange(start.current)
|
|
223
|
+
end
|
|
224
|
+
end,
|
|
225
|
+
InputEnded = function(_, input)
|
|
226
|
+
if input.UserInputType == Enum.UserInputType.MouseButton1 then
|
|
227
|
+
setDragging(false)
|
|
228
|
+
end
|
|
229
|
+
end,
|
|
230
|
+
MouseLeave = function()
|
|
231
|
+
return setDragging(false)
|
|
232
|
+
end,
|
|
233
|
+
}
|
|
234
|
+
_condition_1 = (React.createElement("frame", _attributes_7))
|
|
235
|
+
end
|
|
236
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _exp_4, _exp_5, _condition_1))
|
|
237
|
+
end
|
|
238
|
+
local default = SplitPane
|
|
239
|
+
return {
|
|
240
|
+
default = default,
|
|
241
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 useSplitPaneStyles = componentStyles("SplitPane", function(theme)
|
|
7
|
+
return createStyles({
|
|
8
|
+
root = {
|
|
9
|
+
Size = UDim2.fromScale(1, 1),
|
|
10
|
+
BackgroundTransparency = 1,
|
|
11
|
+
BorderSizePixel = 0,
|
|
12
|
+
},
|
|
13
|
+
body = {
|
|
14
|
+
Size = UDim2.fromScale(1, 1),
|
|
15
|
+
BackgroundColor3 = theme.palette.surface.paper,
|
|
16
|
+
BackgroundTransparency = 0,
|
|
17
|
+
BorderSizePixel = 0,
|
|
18
|
+
},
|
|
19
|
+
pane = {
|
|
20
|
+
BackgroundTransparency = 1,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
ClipsDescendants = true,
|
|
23
|
+
},
|
|
24
|
+
divider = {
|
|
25
|
+
BackgroundColor3 = theme.palette.text.primary,
|
|
26
|
+
BackgroundTransparency = 1,
|
|
27
|
+
BorderSizePixel = 0,
|
|
28
|
+
Active = true,
|
|
29
|
+
ZIndex = 5,
|
|
30
|
+
},
|
|
31
|
+
rule = {
|
|
32
|
+
BackgroundColor3 = theme.palette.divider,
|
|
33
|
+
BorderSizePixel = 0,
|
|
34
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
35
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
36
|
+
},
|
|
37
|
+
grip = {
|
|
38
|
+
BackgroundTransparency = 1,
|
|
39
|
+
BorderSizePixel = 0,
|
|
40
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
41
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
42
|
+
},
|
|
43
|
+
mark = {
|
|
44
|
+
BackgroundColor3 = theme.palette.text.secondary,
|
|
45
|
+
BorderSizePixel = 0,
|
|
46
|
+
},
|
|
47
|
+
overlay = {
|
|
48
|
+
Size = UDim2.fromScale(1, 1),
|
|
49
|
+
BackgroundTransparency = 1,
|
|
50
|
+
BorderSizePixel = 0,
|
|
51
|
+
Active = true,
|
|
52
|
+
ZIndex = 20000,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
end)
|
|
56
|
+
local default = useSplitPaneStyles
|
|
57
|
+
return {
|
|
58
|
+
default = default,
|
|
59
|
+
}
|