@rbxts/uiblox 0.1.52 → 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 +90 -37
- 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 +27 -22
- 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,27 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function filterChoices(options, query)
|
|
3
|
+
if #query == 0 then
|
|
4
|
+
return options
|
|
5
|
+
end
|
|
6
|
+
local needle = string.lower(query)
|
|
7
|
+
local matched = {}
|
|
8
|
+
for _, option in options do
|
|
9
|
+
if (string.find(string.lower(option.label), needle, 1, true)) ~= nil then
|
|
10
|
+
table.insert(matched, option)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
return matched
|
|
14
|
+
end
|
|
15
|
+
local function usesSelectSearch(count, searchable)
|
|
16
|
+
if searchable == false then
|
|
17
|
+
return false
|
|
18
|
+
end
|
|
19
|
+
if searchable == true then
|
|
20
|
+
return true
|
|
21
|
+
end
|
|
22
|
+
return count > 8
|
|
23
|
+
end
|
|
24
|
+
return {
|
|
25
|
+
filterChoices = filterChoices,
|
|
26
|
+
usesSelectSearch = usesSelectSearch,
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function canFocusGui(object)
|
|
3
|
+
local _condition = object ~= nil and object.Parent ~= nil
|
|
4
|
+
if _condition then
|
|
5
|
+
local _self = object
|
|
6
|
+
local _result = _self.FindFirstAncestorWhichIsA
|
|
7
|
+
if _result ~= nil then
|
|
8
|
+
_result = _result(_self, "PlayerGui")
|
|
9
|
+
end
|
|
10
|
+
_condition = _result ~= nil
|
|
11
|
+
end
|
|
12
|
+
return _condition
|
|
13
|
+
end
|
|
14
|
+
return {
|
|
15
|
+
canFocusGui = canFocusGui,
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface GroupedChoice {
|
|
2
|
+
label: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
group?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectHeaderRow {
|
|
7
|
+
kind: "header";
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SelectOptionRow {
|
|
11
|
+
kind: "option";
|
|
12
|
+
label: string;
|
|
13
|
+
optionIndex: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type SelectRow = SelectHeaderRow | SelectOptionRow;
|
|
17
|
+
export declare function groupRows(options: GroupedChoice[]): SelectRow[];
|
|
18
|
+
export declare function rowForOption(rows: SelectRow[], optionIndex: number): number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function groupRows(options)
|
|
3
|
+
local rows = {}
|
|
4
|
+
local current = ""
|
|
5
|
+
for index = 0, #options - 1 do
|
|
6
|
+
local option = options[index + 1]
|
|
7
|
+
local group = option.group
|
|
8
|
+
if group ~= nil and group ~= current then
|
|
9
|
+
current = group
|
|
10
|
+
local _arg0 = {
|
|
11
|
+
kind = "header",
|
|
12
|
+
label = group,
|
|
13
|
+
}
|
|
14
|
+
table.insert(rows, _arg0)
|
|
15
|
+
end
|
|
16
|
+
local _arg0 = {
|
|
17
|
+
kind = "option",
|
|
18
|
+
label = option.label,
|
|
19
|
+
optionIndex = index,
|
|
20
|
+
disabled = option.disabled,
|
|
21
|
+
}
|
|
22
|
+
table.insert(rows, _arg0)
|
|
23
|
+
end
|
|
24
|
+
return rows
|
|
25
|
+
end
|
|
26
|
+
local function rowForOption(rows, optionIndex)
|
|
27
|
+
for index = 0, #rows - 1 do
|
|
28
|
+
local row = rows[index + 1]
|
|
29
|
+
if row.kind == "option" and row.optionIndex == optionIndex then
|
|
30
|
+
return index
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
return 0
|
|
34
|
+
end
|
|
35
|
+
return {
|
|
36
|
+
groupRows = groupRows,
|
|
37
|
+
rowForOption = rowForOption,
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local SAME_FRAME = 1 / 60
|
|
3
|
+
local function shouldHandleSelectKey(open, focused, fromControl, textboxFocused, key, now, previous)
|
|
4
|
+
if textboxFocused or (not open and not focused and not fromControl) then
|
|
5
|
+
return false
|
|
6
|
+
end
|
|
7
|
+
if previous ~= nil and previous.key == key and now - previous.at < SAME_FRAME then
|
|
8
|
+
return false
|
|
9
|
+
end
|
|
10
|
+
return true
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
shouldHandleSelectKey = shouldHandleSelectKey,
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local SELECT_MENU_SECONDS = 0.12
|
|
3
|
+
local function menuHold(open, reducedMotion)
|
|
4
|
+
if open or reducedMotion == true then
|
|
5
|
+
return 0
|
|
6
|
+
end
|
|
7
|
+
return SELECT_MENU_SECONDS
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
menuHold = menuHold,
|
|
11
|
+
SELECT_MENU_SECONDS = SELECT_MENU_SECONDS,
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function includesChoice(values, value)
|
|
3
|
+
if values == nil then
|
|
4
|
+
return false
|
|
5
|
+
end
|
|
6
|
+
for _, item in values do
|
|
7
|
+
if item == value then
|
|
8
|
+
return true
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
return false
|
|
12
|
+
end
|
|
13
|
+
local function selectionLabel(options, values, placeholder)
|
|
14
|
+
local text = ""
|
|
15
|
+
for _, option in options do
|
|
16
|
+
if not includesChoice(values, option.value) then
|
|
17
|
+
continue
|
|
18
|
+
end
|
|
19
|
+
text = if #text == 0 then option.label else `{text}, {option.label}`
|
|
20
|
+
end
|
|
21
|
+
return if #text == 0 then placeholder else text
|
|
22
|
+
end
|
|
23
|
+
return {
|
|
24
|
+
includesChoice = includesChoice,
|
|
25
|
+
selectionLabel = selectionLabel,
|
|
26
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function lower(value)
|
|
3
|
+
return string.lower(value)
|
|
4
|
+
end
|
|
5
|
+
local function startsWith(label, query)
|
|
6
|
+
local _exp = lower(label)
|
|
7
|
+
local _arg1 = #query
|
|
8
|
+
return string.sub(_exp, 1, _arg1) == query
|
|
9
|
+
end
|
|
10
|
+
local function findChoice(options, from, query)
|
|
11
|
+
local count = #options
|
|
12
|
+
if count == 0 or #query == 0 then
|
|
13
|
+
return nil
|
|
14
|
+
end
|
|
15
|
+
do
|
|
16
|
+
local step = 0
|
|
17
|
+
local _shouldIncrement = false
|
|
18
|
+
while true do
|
|
19
|
+
if _shouldIncrement then
|
|
20
|
+
step += 1
|
|
21
|
+
else
|
|
22
|
+
_shouldIncrement = true
|
|
23
|
+
end
|
|
24
|
+
if not (step < count) then
|
|
25
|
+
break
|
|
26
|
+
end
|
|
27
|
+
local index = (from + step) % count
|
|
28
|
+
local option = options[index + 1]
|
|
29
|
+
if option == nil or option.disabled == true then
|
|
30
|
+
continue
|
|
31
|
+
end
|
|
32
|
+
if startsWith(option.label, query) then
|
|
33
|
+
return index
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
return nil
|
|
38
|
+
end
|
|
39
|
+
local function typeaheadChoice(options, highlight, query)
|
|
40
|
+
local needle = lower(query)
|
|
41
|
+
local match = findChoice(options, highlight + 1, needle)
|
|
42
|
+
if match ~= nil then
|
|
43
|
+
return match
|
|
44
|
+
end
|
|
45
|
+
if #needle > 1 then
|
|
46
|
+
local _arg0 = #needle
|
|
47
|
+
local _arg1 = #needle
|
|
48
|
+
local last = string.sub(needle, _arg0, _arg1)
|
|
49
|
+
local again = findChoice(options, highlight + 1, last)
|
|
50
|
+
if again ~= nil then
|
|
51
|
+
return again
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
return highlight
|
|
55
|
+
end
|
|
56
|
+
return {
|
|
57
|
+
typeaheadChoice = typeaheadChoice,
|
|
58
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function stepChoice(options, from, delta)
|
|
3
|
+
do
|
|
4
|
+
local index = from + delta
|
|
5
|
+
local _shouldIncrement = false
|
|
6
|
+
while true do
|
|
7
|
+
if _shouldIncrement then
|
|
8
|
+
index += delta
|
|
9
|
+
else
|
|
10
|
+
_shouldIncrement = true
|
|
11
|
+
end
|
|
12
|
+
if not (options[index + 1] ~= nil) then
|
|
13
|
+
break
|
|
14
|
+
end
|
|
15
|
+
if not options[index + 1].disabled then
|
|
16
|
+
return index
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
return from
|
|
21
|
+
end
|
|
22
|
+
return {
|
|
23
|
+
stepChoice = stepChoice,
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.Select = TS.import(script, script, "components", "Select").default
|
|
5
|
+
local _selectFilter = TS.import(script, script, "components", "selectFilter")
|
|
6
|
+
exports.filterChoices = _selectFilter.filterChoices
|
|
7
|
+
exports.usesSelectSearch = _selectFilter.usesSelectSearch
|
|
8
|
+
return exports
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
|
-
local
|
|
6
|
-
local useShadowStyles =
|
|
5
|
+
local componentStyles = _theme.componentStyles
|
|
6
|
+
local useShadowStyles = componentStyles("Shadow", function(theme)
|
|
7
7
|
return createStyles({
|
|
8
8
|
container = {
|
|
9
9
|
Size = UDim2.new(1, theme.spacing.calc(0.25), 1, theme.spacing.calc(0.25)),
|
|
10
|
-
BackgroundColor3 = theme.
|
|
10
|
+
BackgroundColor3 = theme.palette.shadow,
|
|
11
11
|
BackgroundTransparency = 0.8,
|
|
12
12
|
BorderSizePixel = 0,
|
|
13
13
|
ZIndex = -100,
|
|
@@ -5,6 +5,7 @@ local useSidebarStyles = TS.import(script, script.Parent, "Sidebar.styles").defa
|
|
|
5
5
|
local function Sidebar(props)
|
|
6
6
|
local _binding = props
|
|
7
7
|
local className = _binding.className
|
|
8
|
+
local sx = _binding.sx
|
|
8
9
|
local children = _binding.children
|
|
9
10
|
local id = _binding.id
|
|
10
11
|
local ref = _binding.ref
|
|
@@ -26,6 +27,11 @@ local function Sidebar(props)
|
|
|
26
27
|
_attributes[_k] = _v
|
|
27
28
|
end
|
|
28
29
|
end
|
|
30
|
+
if sx ~= 0 and sx == sx and sx ~= "" and sx then
|
|
31
|
+
for _k, _v in sx do
|
|
32
|
+
_attributes[_k] = _v
|
|
33
|
+
end
|
|
34
|
+
end
|
|
29
35
|
local _attributes_1 = {
|
|
30
36
|
key = "Container",
|
|
31
37
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
|
-
local
|
|
5
|
+
local componentStyles = _theme.componentStyles
|
|
6
6
|
local ROBLOX_UI_OFFSET = TS.import(script, script.Parent.Parent.Parent.Parent, "constants").ROBLOX_UI_OFFSET
|
|
7
|
-
local useSidebarStyles =
|
|
7
|
+
local useSidebarStyles = componentStyles("Sidebar", function(theme, props)
|
|
8
8
|
local _binding = props
|
|
9
9
|
local size = _binding.size
|
|
10
10
|
local ignoreInset = _binding.ignoreInset
|
|
@@ -18,7 +18,7 @@ local useSidebarStyles = makeStyles(function(theme, props)
|
|
|
18
18
|
return createStyles({
|
|
19
19
|
root = {
|
|
20
20
|
Size = UDim2.new(0, if size == "compact" then sidebarWidths.compact else sidebarWidths.large, 1, 0),
|
|
21
|
-
BackgroundColor3 = theme.
|
|
21
|
+
BackgroundColor3 = theme.palette.surface.paper,
|
|
22
22
|
BorderSizePixel = 0,
|
|
23
23
|
ZIndex = 5000,
|
|
24
24
|
},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { SkeletonAnimation } from "./skeletonMotion";
|
|
3
|
+
export type SkeletonVariant = "text" | "rectangular" | "rounded" | "circular";
|
|
4
|
+
export interface SkeletonProps {
|
|
5
|
+
variant?: SkeletonVariant;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
lines?: number;
|
|
9
|
+
gap?: number;
|
|
10
|
+
animation?: SkeletonAnimation;
|
|
11
|
+
reducedMotion?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function Skeleton(props: CustomizedProps<Frame, SkeletonProps>): JSX.Element;
|
|
14
|
+
export declare function SkeletonText(props: CustomizedProps<Frame, Omit<SkeletonProps, "variant">>): JSX.Element;
|
|
15
|
+
export default Skeleton;
|
|
@@ -0,0 +1,224 @@
|
|
|
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 useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
|
+
local loopProperty = TS.import(script, script.Parent.Parent.Parent, "motion").loopProperty
|
|
9
|
+
local useSkeletonStyles = TS.import(script, script.Parent, "Skeleton.styles").default
|
|
10
|
+
local _skeletonMotion = TS.import(script, script.Parent, "skeletonMotion")
|
|
11
|
+
local skeletonLineWidth = _skeletonMotion.skeletonLineWidth
|
|
12
|
+
local skeletonMotion = _skeletonMotion.skeletonMotion
|
|
13
|
+
local function SkeletonBlock(props)
|
|
14
|
+
local _binding = props
|
|
15
|
+
local variant = _binding.variant
|
|
16
|
+
if variant == nil then
|
|
17
|
+
variant = "text"
|
|
18
|
+
end
|
|
19
|
+
local width = _binding.width
|
|
20
|
+
local height = _binding.height
|
|
21
|
+
local motion = _binding.motion
|
|
22
|
+
local className = _binding.className
|
|
23
|
+
local sx = _binding.sx
|
|
24
|
+
local id = _binding.id
|
|
25
|
+
local ref = _binding.ref
|
|
26
|
+
local _binding_1 = useSkeletonStyles()
|
|
27
|
+
local block = _binding_1.block
|
|
28
|
+
local highlight = _binding_1.highlight
|
|
29
|
+
local rounded = _binding_1.rounded
|
|
30
|
+
local circular = _binding_1.circular
|
|
31
|
+
local fillRef = useRef()
|
|
32
|
+
local gradientRef = useRef()
|
|
33
|
+
useEffect(function()
|
|
34
|
+
local fill = fillRef.current
|
|
35
|
+
local gradient = gradientRef.current
|
|
36
|
+
if not fill then
|
|
37
|
+
return nil
|
|
38
|
+
end
|
|
39
|
+
if motion == "shimmer" and gradient then
|
|
40
|
+
gradient.Offset = Vector2.new(-1, 0)
|
|
41
|
+
return loopProperty(gradient, {
|
|
42
|
+
Offset = Vector2.new(1, 0),
|
|
43
|
+
}, 1.2)
|
|
44
|
+
end
|
|
45
|
+
if motion == "pulse" then
|
|
46
|
+
fill.BackgroundTransparency = 0
|
|
47
|
+
return loopProperty(fill, {
|
|
48
|
+
BackgroundTransparency = 0.55,
|
|
49
|
+
}, 0.9, true)
|
|
50
|
+
end
|
|
51
|
+
fill.BackgroundTransparency = 0
|
|
52
|
+
if gradient then
|
|
53
|
+
gradient.Offset = Vector2.new(0, 0)
|
|
54
|
+
end
|
|
55
|
+
end, { motion })
|
|
56
|
+
local corner = if variant == "circular" then circular elseif variant == "rectangular" then nil else rounded
|
|
57
|
+
local side = if variant == "circular" then width else nil
|
|
58
|
+
local _attributes = {}
|
|
59
|
+
local _condition = id
|
|
60
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
61
|
+
_condition = "Skeleton"
|
|
62
|
+
end
|
|
63
|
+
_attributes.key = _condition
|
|
64
|
+
_attributes.ref = ref
|
|
65
|
+
_attributes.BackgroundTransparency = 1
|
|
66
|
+
_attributes.BorderSizePixel = 0
|
|
67
|
+
if className then
|
|
68
|
+
for _k, _v in className do
|
|
69
|
+
_attributes[_k] = _v
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
if sx then
|
|
73
|
+
for _k, _v in sx do
|
|
74
|
+
_attributes[_k] = _v
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
local _condition_1 = side
|
|
78
|
+
if _condition_1 == nil then
|
|
79
|
+
_condition_1 = width
|
|
80
|
+
end
|
|
81
|
+
local _condition_2 = side
|
|
82
|
+
if _condition_2 == nil then
|
|
83
|
+
_condition_2 = height
|
|
84
|
+
end
|
|
85
|
+
_attributes.Size = UDim2.new(0, _condition_1, 0, _condition_2)
|
|
86
|
+
local _attributes_1 = {
|
|
87
|
+
ref = fillRef,
|
|
88
|
+
}
|
|
89
|
+
for _k, _v in block do
|
|
90
|
+
_attributes_1[_k] = _v
|
|
91
|
+
end
|
|
92
|
+
_attributes_1.Size = UDim2.new(1, 0, 1, 0)
|
|
93
|
+
local _condition_3 = motion == "shimmer"
|
|
94
|
+
if _condition_3 then
|
|
95
|
+
local _attributes_2 = {
|
|
96
|
+
ref = gradientRef,
|
|
97
|
+
}
|
|
98
|
+
for _k, _v in highlight do
|
|
99
|
+
_attributes_2[_k] = _v
|
|
100
|
+
end
|
|
101
|
+
_condition_3 = React.createElement("uigradient", _attributes_2)
|
|
102
|
+
end
|
|
103
|
+
local _condition_4 = corner ~= nil
|
|
104
|
+
if _condition_4 then
|
|
105
|
+
local _attributes_2 = table.clone(corner)
|
|
106
|
+
setmetatable(_attributes_2, nil)
|
|
107
|
+
_condition_4 = React.createElement("uicorner", _attributes_2)
|
|
108
|
+
end
|
|
109
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _condition_3, _condition_4))
|
|
110
|
+
end
|
|
111
|
+
local function Skeleton(props)
|
|
112
|
+
local _binding = props
|
|
113
|
+
local variant = _binding.variant
|
|
114
|
+
if variant == nil then
|
|
115
|
+
variant = "text"
|
|
116
|
+
end
|
|
117
|
+
local width = _binding.width
|
|
118
|
+
if width == nil then
|
|
119
|
+
width = if variant == "circular" then 40 else 160
|
|
120
|
+
end
|
|
121
|
+
local height = _binding.height
|
|
122
|
+
if height == nil then
|
|
123
|
+
height = if variant == "text" then 14 else 40
|
|
124
|
+
end
|
|
125
|
+
local lines = _binding.lines
|
|
126
|
+
if lines == nil then
|
|
127
|
+
lines = 1
|
|
128
|
+
end
|
|
129
|
+
local gap = _binding.gap
|
|
130
|
+
if gap == nil then
|
|
131
|
+
gap = 8
|
|
132
|
+
end
|
|
133
|
+
local animation = _binding.animation
|
|
134
|
+
local reducedProp = _binding.reducedMotion
|
|
135
|
+
local className = _binding.className
|
|
136
|
+
local sx = _binding.sx
|
|
137
|
+
local id = _binding.id
|
|
138
|
+
local ref = _binding.ref
|
|
139
|
+
local reducedMotion = useReducedMotion(reducedProp)
|
|
140
|
+
local motion = skeletonMotion(animation, reducedMotion)
|
|
141
|
+
local count = if variant == "text" then math.max(lines, 1) else 1
|
|
142
|
+
if count <= 1 then
|
|
143
|
+
return React.createElement(SkeletonBlock, {
|
|
144
|
+
variant = variant,
|
|
145
|
+
width = width,
|
|
146
|
+
height = height,
|
|
147
|
+
motion = motion,
|
|
148
|
+
className = className,
|
|
149
|
+
sx = sx,
|
|
150
|
+
id = id,
|
|
151
|
+
ref = ref,
|
|
152
|
+
})
|
|
153
|
+
end
|
|
154
|
+
local rows = {}
|
|
155
|
+
do
|
|
156
|
+
local index = 0
|
|
157
|
+
local _shouldIncrement = false
|
|
158
|
+
while true do
|
|
159
|
+
if _shouldIncrement then
|
|
160
|
+
index += 1
|
|
161
|
+
else
|
|
162
|
+
_shouldIncrement = true
|
|
163
|
+
end
|
|
164
|
+
if not (index < count) then
|
|
165
|
+
break
|
|
166
|
+
end
|
|
167
|
+
local _index = index
|
|
168
|
+
table.insert(rows, _index)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
local blockHeight = height * count + gap * (count - 1)
|
|
172
|
+
local _attributes = {}
|
|
173
|
+
local _condition = id
|
|
174
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
175
|
+
_condition = "Skeleton"
|
|
176
|
+
end
|
|
177
|
+
_attributes.key = _condition
|
|
178
|
+
_attributes.ref = ref
|
|
179
|
+
if className then
|
|
180
|
+
for _k, _v in className do
|
|
181
|
+
_attributes[_k] = _v
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
if sx then
|
|
185
|
+
for _k, _v in sx do
|
|
186
|
+
_attributes[_k] = _v
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
_attributes.Size = UDim2.new(0, width, 0, blockHeight)
|
|
190
|
+
_attributes.BackgroundTransparency = 1
|
|
191
|
+
_attributes.BorderSizePixel = 0
|
|
192
|
+
local _exp = React.createElement("uilistlayout", {
|
|
193
|
+
Padding = UDim.new(0, gap),
|
|
194
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
195
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
196
|
+
})
|
|
197
|
+
-- ▼ ReadonlyArray.map ▼
|
|
198
|
+
local _newValue = table.create(#rows)
|
|
199
|
+
local _callback = function(index)
|
|
200
|
+
return React.createElement(SkeletonBlock, {
|
|
201
|
+
key = `line-{index}`,
|
|
202
|
+
variant = "text",
|
|
203
|
+
width = skeletonLineWidth(width, index, count),
|
|
204
|
+
height = height,
|
|
205
|
+
motion = motion,
|
|
206
|
+
})
|
|
207
|
+
end
|
|
208
|
+
for _k, _v in rows do
|
|
209
|
+
_newValue[_k] = _callback(_v, _k - 1, rows)
|
|
210
|
+
end
|
|
211
|
+
-- ▲ ReadonlyArray.map ▲
|
|
212
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
213
|
+
end
|
|
214
|
+
local function SkeletonText(props)
|
|
215
|
+
local _attributes = table.clone(props)
|
|
216
|
+
setmetatable(_attributes, nil)
|
|
217
|
+
_attributes.variant = "text"
|
|
218
|
+
return React.createElement(Skeleton, _attributes)
|
|
219
|
+
end
|
|
220
|
+
local default = Skeleton
|
|
221
|
+
return {
|
|
222
|
+
SkeletonText = SkeletonText,
|
|
223
|
+
default = default,
|
|
224
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 useSkeletonStyles = componentStyles("Skeleton", function(theme)
|
|
7
|
+
return createStyles({
|
|
8
|
+
block = {
|
|
9
|
+
BackgroundColor3 = theme.palette.surface.paper,
|
|
10
|
+
BackgroundTransparency = 0,
|
|
11
|
+
BorderSizePixel = 0,
|
|
12
|
+
},
|
|
13
|
+
highlight = {
|
|
14
|
+
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, theme.palette.surface.paper), ColorSequenceKeypoint.new(0.5, theme.palette.text.secondary), ColorSequenceKeypoint.new(1, theme.palette.surface.paper) }),
|
|
15
|
+
},
|
|
16
|
+
rounded = {
|
|
17
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
18
|
+
},
|
|
19
|
+
circular = {
|
|
20
|
+
CornerRadius = UDim.new(0.5, 0),
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
end)
|
|
24
|
+
local default = useSkeletonStyles
|
|
25
|
+
return {
|
|
26
|
+
default = default,
|
|
27
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type SkeletonAnimation = "pulse" | "shimmer" | false;
|
|
2
|
+
export declare function skeletonMotion(animation: SkeletonAnimation | undefined, reducedMotion?: boolean): SkeletonAnimation;
|
|
3
|
+
export declare function skeletonLineWidth(width: number, index: number, count: number): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function skeletonMotion(animation, reducedMotion)
|
|
3
|
+
if animation == false or reducedMotion == true then
|
|
4
|
+
return false
|
|
5
|
+
end
|
|
6
|
+
return animation or "pulse"
|
|
7
|
+
end
|
|
8
|
+
local function skeletonLineWidth(width, index, count)
|
|
9
|
+
if count > 1 and index == count - 1 then
|
|
10
|
+
return (width * 62) / 100
|
|
11
|
+
end
|
|
12
|
+
return width
|
|
13
|
+
end
|
|
14
|
+
return {
|
|
15
|
+
skeletonMotion = skeletonMotion,
|
|
16
|
+
skeletonLineWidth = skeletonLineWidth,
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface SliderProps {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
onCommit?: (value: number) => void;
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
size?: ControlSize;
|
|
11
|
+
}
|
|
12
|
+
declare function Slider(props: CustomizedProps<Frame, SliderProps>): JSX.Element;
|
|
13
|
+
export default Slider;
|