@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
3
|
import { InputColor, InputMargin, InputVariant } from "../types/index";
|
|
3
4
|
export type DefaultInputComponent = Frame;
|
|
4
5
|
export interface InputProps {
|
|
@@ -13,7 +14,11 @@ export interface InputProps {
|
|
|
13
14
|
placeholder?: string;
|
|
14
15
|
rounded?: boolean;
|
|
15
16
|
clearsTextOnFocus?: boolean;
|
|
17
|
+
size?: ControlSize;
|
|
18
|
+
startAdornment?: React.Element;
|
|
19
|
+
endAdornment?: React.Element;
|
|
16
20
|
onTextChanged?: (text: string) => void;
|
|
21
|
+
onInput?: (text: string) => void;
|
|
17
22
|
onFocus?: () => void;
|
|
18
23
|
onBlur?: () => void;
|
|
19
24
|
onEnterPressed?: (text: string) => void;
|
|
@@ -2,11 +2,22 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useRef = _react.useRef
|
|
5
7
|
local useState = _react.useState
|
|
6
|
-
local
|
|
8
|
+
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
7
9
|
local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
|
|
8
10
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
9
11
|
local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
|
|
12
|
+
local syncInputDraft = TS.import(script, script.Parent, "inputDraft").syncInputDraft
|
|
13
|
+
local function adornmentAlign()
|
|
14
|
+
return React.createElement("uilistlayout", {
|
|
15
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
16
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Center,
|
|
17
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
18
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
19
|
+
})
|
|
20
|
+
end
|
|
10
21
|
local function Input(props)
|
|
11
22
|
local _binding = props
|
|
12
23
|
local text = _binding.text
|
|
@@ -28,29 +39,49 @@ local function Input(props)
|
|
|
28
39
|
if rounded == nil then
|
|
29
40
|
rounded = false
|
|
30
41
|
end
|
|
42
|
+
local startAdornment = _binding.startAdornment
|
|
43
|
+
local endAdornment = _binding.endAdornment
|
|
31
44
|
local onTextChanged = _binding.onTextChanged
|
|
45
|
+
local onInput = _binding.onInput
|
|
32
46
|
local onFocus = _binding.onFocus
|
|
33
47
|
local onBlur = _binding.onBlur
|
|
34
48
|
local onEnterPressed = _binding.onEnterPressed
|
|
35
49
|
local className = _binding.className
|
|
50
|
+
local sx = _binding.sx
|
|
36
51
|
local id = _binding.id
|
|
37
52
|
local ref = _binding.ref
|
|
38
|
-
local
|
|
53
|
+
local focusedRef = useRef(false)
|
|
54
|
+
local entered = useRef(false)
|
|
55
|
+
local _condition = text
|
|
56
|
+
if _condition == nil then
|
|
57
|
+
_condition = ""
|
|
58
|
+
end
|
|
59
|
+
local draft, setDraft = useState(_condition)
|
|
60
|
+
local focused, setFocused = useState(false)
|
|
61
|
+
local _object = table.clone(props)
|
|
62
|
+
setmetatable(_object, nil)
|
|
63
|
+
_object.focused = focused
|
|
64
|
+
local _binding_1 = useInputStyles(_object)
|
|
39
65
|
local root = _binding_1.root
|
|
40
66
|
local font = _binding_1.font
|
|
41
67
|
local margin = _binding_1.margin
|
|
68
|
+
local shell = _binding_1.shell
|
|
42
69
|
local box = _binding_1.box
|
|
70
|
+
local startSlot = _binding_1.startSlot
|
|
71
|
+
local endSlot = _binding_1.endSlot
|
|
43
72
|
local helper = _binding_1.helper
|
|
44
73
|
local errorColorFrame = _binding_1.errorColorFrame
|
|
45
74
|
local errorColorText = _binding_1.errorColorText
|
|
46
75
|
local divider = _binding_1.divider
|
|
47
76
|
local corner = _binding_1.corner
|
|
48
77
|
local stroke = _binding_1.stroke
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
78
|
+
useEffect(function()
|
|
79
|
+
setDraft(function(current)
|
|
80
|
+
return syncInputDraft(focusedRef.current, text, current)
|
|
81
|
+
end)
|
|
82
|
+
end, { text })
|
|
83
|
+
local showStroke = variant == "outlined" or variant == "filled"
|
|
84
|
+
local showCorner = rounded
|
|
54
85
|
local _attributes = {}
|
|
55
86
|
local _condition_1 = id
|
|
56
87
|
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
@@ -66,6 +97,11 @@ local function Input(props)
|
|
|
66
97
|
_attributes[_k] = _v
|
|
67
98
|
end
|
|
68
99
|
end
|
|
100
|
+
if sx then
|
|
101
|
+
for _k, _v in sx do
|
|
102
|
+
_attributes[_k] = _v
|
|
103
|
+
end
|
|
104
|
+
end
|
|
69
105
|
local _attributes_1 = {
|
|
70
106
|
key = "Margin",
|
|
71
107
|
}
|
|
@@ -73,81 +109,128 @@ local function Input(props)
|
|
|
73
109
|
_attributes_1[_k] = _v
|
|
74
110
|
end
|
|
75
111
|
local _attributes_2 = {
|
|
112
|
+
key = "Shell",
|
|
113
|
+
}
|
|
114
|
+
for _k, _v in shell do
|
|
115
|
+
_attributes_2[_k] = _v
|
|
116
|
+
end
|
|
117
|
+
local _condition_2 = showStroke
|
|
118
|
+
if _condition_2 then
|
|
119
|
+
local _attributes_3 = table.clone(stroke)
|
|
120
|
+
setmetatable(_attributes_3, nil)
|
|
121
|
+
_condition_2 = React.createElement("uistroke", _attributes_3)
|
|
122
|
+
end
|
|
123
|
+
local _condition_3 = showCorner
|
|
124
|
+
if _condition_3 then
|
|
125
|
+
local _attributes_3 = table.clone(corner)
|
|
126
|
+
setmetatable(_attributes_3, nil)
|
|
127
|
+
_condition_3 = React.createElement("uicorner", _attributes_3)
|
|
128
|
+
end
|
|
129
|
+
local _condition_4 = startAdornment ~= nil
|
|
130
|
+
if _condition_4 then
|
|
131
|
+
local _attributes_3 = {
|
|
132
|
+
key = "Start",
|
|
133
|
+
}
|
|
134
|
+
for _k, _v in startSlot do
|
|
135
|
+
_attributes_3[_k] = _v
|
|
136
|
+
end
|
|
137
|
+
_condition_4 = (React.createElement("frame", _attributes_3, adornmentAlign(), startAdornment))
|
|
138
|
+
end
|
|
139
|
+
local _attributes_3 = {
|
|
76
140
|
key = "Field",
|
|
77
141
|
}
|
|
78
142
|
for _k, _v in font do
|
|
79
|
-
|
|
143
|
+
_attributes_3[_k] = _v
|
|
80
144
|
end
|
|
81
145
|
for _k, _v in box do
|
|
82
|
-
|
|
146
|
+
_attributes_3[_k] = _v
|
|
83
147
|
end
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
for _k, _v in
|
|
88
|
-
[
|
|
89
|
-
}) do
|
|
90
|
-
_attributes_2[_k] = _v
|
|
148
|
+
_attributes_3.Active = not disabled
|
|
149
|
+
_attributes_3.Text = draft
|
|
150
|
+
_attributes_3.PlaceholderText = placeholder
|
|
151
|
+
for _k, _v in cx(hasError and errorColorText) do
|
|
152
|
+
_attributes_3[_k] = _v
|
|
91
153
|
end
|
|
92
|
-
|
|
154
|
+
_attributes_3.Change = {
|
|
155
|
+
Text = function(rbx)
|
|
156
|
+
setDraft(rbx.Text)
|
|
157
|
+
if focusedRef.current and onInput then
|
|
158
|
+
onInput(rbx.Text)
|
|
159
|
+
end
|
|
160
|
+
end,
|
|
161
|
+
}
|
|
162
|
+
_attributes_3.Event = {
|
|
163
|
+
Focused = function()
|
|
164
|
+
focusedRef.current = true
|
|
165
|
+
entered.current = false
|
|
166
|
+
setFocused(true)
|
|
167
|
+
if onFocus then
|
|
168
|
+
onFocus()
|
|
169
|
+
end
|
|
170
|
+
end,
|
|
93
171
|
ReturnPressedFromOnScreenKeyboard = function(rbx)
|
|
94
|
-
if onEnterPressed then
|
|
95
|
-
|
|
96
|
-
onEnterPressed(text)
|
|
172
|
+
if entered.current or not onEnterPressed then
|
|
173
|
+
return nil
|
|
97
174
|
end
|
|
175
|
+
entered.current = true
|
|
176
|
+
onEnterPressed(rbx.Text)
|
|
98
177
|
end,
|
|
99
|
-
|
|
100
|
-
|
|
178
|
+
FocusLost = function(rbx, enterPressed)
|
|
179
|
+
focusedRef.current = false
|
|
180
|
+
setFocused(false)
|
|
181
|
+
local committed = rbx.Text
|
|
101
182
|
if onTextChanged then
|
|
102
|
-
|
|
103
|
-
onTextChanged(text)
|
|
183
|
+
onTextChanged(committed)
|
|
104
184
|
end
|
|
185
|
+
if enterPressed and not entered.current and onEnterPressed then
|
|
186
|
+
onEnterPressed(committed)
|
|
187
|
+
end
|
|
188
|
+
entered.current = false
|
|
105
189
|
if onBlur then
|
|
106
190
|
onBlur()
|
|
107
191
|
end
|
|
192
|
+
local _condition_5 = text
|
|
193
|
+
if _condition_5 == nil then
|
|
194
|
+
_condition_5 = ""
|
|
195
|
+
end
|
|
196
|
+
setDraft(_condition_5)
|
|
108
197
|
end,
|
|
109
198
|
}
|
|
110
|
-
local
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
_condition_3 = React.createElement("uicorner", _attributes_3)
|
|
199
|
+
local _exp = React.createElement("textbox", _attributes_3)
|
|
200
|
+
local _condition_5 = endAdornment ~= nil
|
|
201
|
+
if _condition_5 then
|
|
202
|
+
local _attributes_4 = {
|
|
203
|
+
key = "End",
|
|
204
|
+
}
|
|
205
|
+
for _k, _v in endSlot do
|
|
206
|
+
_attributes_4[_k] = _v
|
|
207
|
+
end
|
|
208
|
+
_condition_5 = (React.createElement("frame", _attributes_4, adornmentAlign(), endAdornment))
|
|
121
209
|
end
|
|
122
|
-
local
|
|
123
|
-
local
|
|
210
|
+
local _exp_1 = React.createElement("frame", _attributes_2, _condition_2, _condition_3, _condition_4, _exp, _condition_5)
|
|
211
|
+
local _exp_2 = variant == "standard" and (React.createElement(Divider, {
|
|
124
212
|
padding = 0,
|
|
125
213
|
orientation = Orientations.Horizontal,
|
|
126
|
-
className =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
local _condition_4 = helperText ~= nil
|
|
132
|
-
if _condition_4 then
|
|
133
|
-
local _attributes_3 = {
|
|
214
|
+
className = cx(divider, hasError and errorColorFrame),
|
|
215
|
+
}))
|
|
216
|
+
local _condition_6 = helperText ~= nil
|
|
217
|
+
if _condition_6 then
|
|
218
|
+
local _attributes_4 = {
|
|
134
219
|
key = "HelperText",
|
|
135
220
|
}
|
|
136
221
|
for _k, _v in font do
|
|
137
|
-
|
|
222
|
+
_attributes_4[_k] = _v
|
|
138
223
|
end
|
|
139
224
|
for _k, _v in helper do
|
|
140
|
-
|
|
225
|
+
_attributes_4[_k] = _v
|
|
141
226
|
end
|
|
142
|
-
for _k, _v in
|
|
143
|
-
[
|
|
144
|
-
}) do
|
|
145
|
-
_attributes_3[_k] = _v
|
|
227
|
+
for _k, _v in cx(hasError and errorColorText) do
|
|
228
|
+
_attributes_4[_k] = _v
|
|
146
229
|
end
|
|
147
|
-
|
|
148
|
-
|
|
230
|
+
_attributes_4.Text = helperText
|
|
231
|
+
_condition_6 = (React.createElement("textlabel", _attributes_4))
|
|
149
232
|
end
|
|
150
|
-
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1,
|
|
233
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp_1, _exp_2, _condition_6))
|
|
151
234
|
end
|
|
152
235
|
local default = Input
|
|
153
236
|
return {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { InputProps } from "./Input";
|
|
2
|
-
declare const useInputStyles: (props: InputProps
|
|
2
|
+
declare const useInputStyles: (props: InputProps & {
|
|
3
|
+
focused?: boolean;
|
|
4
|
+
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
3
5
|
export default useInputStyles;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local controlMetrics = _theme.controlMetrics
|
|
4
5
|
local createStyles = _theme.createStyles
|
|
5
|
-
local
|
|
6
|
-
local
|
|
6
|
+
local componentStyles = _theme.componentStyles
|
|
7
|
+
local inputInsets = TS.import(script, script.Parent, "inputInsets").inputInsets
|
|
8
|
+
local useInputStyles = componentStyles("Input", function(theme, _param)
|
|
7
9
|
local color = _param.color
|
|
8
10
|
if color == nil then
|
|
9
11
|
color = "primary"
|
|
@@ -25,21 +27,37 @@ local useInputStyles = makeStyles(function(theme, _param)
|
|
|
25
27
|
if clearsTextOnFocus == nil then
|
|
26
28
|
clearsTextOnFocus = false
|
|
27
29
|
end
|
|
30
|
+
local startAdornment = _param.startAdornment
|
|
31
|
+
local endAdornment = _param.endAdornment
|
|
32
|
+
local focused = _param.focused
|
|
33
|
+
if focused == nil then
|
|
34
|
+
focused = false
|
|
35
|
+
end
|
|
36
|
+
local hasError = _param.hasError
|
|
37
|
+
if hasError == nil then
|
|
38
|
+
hasError = false
|
|
39
|
+
end
|
|
40
|
+
local size = _param.size
|
|
41
|
+
local metrics = controlMetrics(theme.density, size)
|
|
42
|
+
local hasStart = startAdornment ~= nil
|
|
43
|
+
local hasEnd = endAdornment ~= nil
|
|
44
|
+
local icon = metrics.icon
|
|
45
|
+
local gap = theme.padding.calc(1)
|
|
46
|
+
local insets = inputInsets(hasStart, hasEnd, icon, gap)
|
|
47
|
+
local fieldHeight = metrics.height + (if variant == "standard" then 0 else theme.padding.calc(1))
|
|
48
|
+
local accent = if color == "primary" then theme.palette.primary.main else theme.palette.text.primary
|
|
49
|
+
local focusAccent = if hasError then theme.palette.status.error.main else theme.palette.focus
|
|
28
50
|
local makeRootStyles = function()
|
|
29
51
|
local defaultStyles = {}
|
|
30
52
|
defaultStyles.BackgroundTransparency = 1
|
|
31
53
|
defaultStyles.BorderSizePixel = 0
|
|
32
|
-
defaultStyles.Size = UDim2.new(width.Scale, width.Offset, 0, if helperText ~= nil then
|
|
33
|
-
-- Increase size vertically to account for margin
|
|
54
|
+
defaultStyles.Size = UDim2.new(width.Scale, width.Offset, 0, if helperText ~= nil then fieldHeight + metrics.height else fieldHeight)
|
|
34
55
|
repeat
|
|
35
|
-
|
|
36
|
-
break
|
|
37
|
-
end
|
|
56
|
+
local _fallthrough = false
|
|
38
57
|
if margin == "dense" then
|
|
39
|
-
|
|
40
|
-
break
|
|
58
|
+
_fallthrough = true
|
|
41
59
|
end
|
|
42
|
-
if margin == "normal" then
|
|
60
|
+
if _fallthrough or margin == "normal" then
|
|
43
61
|
defaultStyles.Size = UDim2.new(defaultStyles.Size.X.Scale, defaultStyles.Size.X.Offset, defaultStyles.Size.Y.Scale, defaultStyles.Size.Y.Offset + theme.padding.calc(2))
|
|
44
62
|
break
|
|
45
63
|
end
|
|
@@ -48,35 +66,33 @@ local useInputStyles = makeStyles(function(theme, _param)
|
|
|
48
66
|
defaultStyles.ZIndex = 10000
|
|
49
67
|
return defaultStyles
|
|
50
68
|
end
|
|
69
|
+
local makeShellStyles = function()
|
|
70
|
+
local shell = {
|
|
71
|
+
Size = UDim2.new(1, 0, 0, fieldHeight),
|
|
72
|
+
Position = UDim2.new(0, 0, 0, 0),
|
|
73
|
+
BackgroundTransparency = 1,
|
|
74
|
+
BorderSizePixel = 0,
|
|
75
|
+
ZIndex = 11000,
|
|
76
|
+
}
|
|
77
|
+
if variant == "filled" then
|
|
78
|
+
shell.BackgroundColor3 = theme.palette.surface.input
|
|
79
|
+
shell.BackgroundTransparency = 0
|
|
80
|
+
elseif variant == "outlined" then
|
|
81
|
+
shell.BackgroundColor3 = theme.palette.surface.input
|
|
82
|
+
shell.BackgroundTransparency = 0.35
|
|
83
|
+
end
|
|
84
|
+
return shell
|
|
85
|
+
end
|
|
51
86
|
local makeBoxStyles = function()
|
|
52
87
|
local defaultStyles = {}
|
|
53
|
-
defaultStyles.
|
|
88
|
+
defaultStyles.BackgroundTransparency = 1
|
|
89
|
+
defaultStyles.BorderSizePixel = 0
|
|
54
90
|
defaultStyles.PlaceholderColor3 = theme.palette.text.secondary
|
|
55
|
-
defaultStyles.
|
|
56
|
-
defaultStyles.
|
|
57
|
-
|
|
58
|
-
if variant == "filled" then
|
|
59
|
-
defaultStyles.BackgroundTransparency = 0
|
|
60
|
-
defaultStyles.BorderSizePixel = 0
|
|
61
|
-
break
|
|
62
|
-
end
|
|
63
|
-
if variant == "outlined" then
|
|
64
|
-
defaultStyles.TextColor3 = theme.palette.text.primary
|
|
65
|
-
defaultStyles.BackgroundTransparency = 1
|
|
66
|
-
defaultStyles.BorderSizePixel = theme.options.constants.borders.default
|
|
67
|
-
break
|
|
68
|
-
end
|
|
69
|
-
if variant == "standard" then
|
|
70
|
-
defaultStyles.TextColor3 = theme.palette.text.primary
|
|
71
|
-
defaultStyles.BackgroundTransparency = 1
|
|
72
|
-
defaultStyles.BorderSizePixel = 0
|
|
73
|
-
break
|
|
74
|
-
end
|
|
75
|
-
defaultStyles.BackgroundTransparency = 0
|
|
76
|
-
defaultStyles.BorderSizePixel = 0
|
|
77
|
-
break
|
|
78
|
-
until true
|
|
91
|
+
defaultStyles.TextColor3 = theme.palette.text.primary
|
|
92
|
+
defaultStyles.Position = UDim2.new(0, insets.left, 0, 0)
|
|
93
|
+
defaultStyles.Size = UDim2.new(1, -(insets.left + insets.right), 1, 0)
|
|
79
94
|
defaultStyles.TextXAlignment = Enum.TextXAlignment.Left
|
|
95
|
+
defaultStyles.TextTruncate = Enum.TextTruncate.AtEnd
|
|
80
96
|
defaultStyles.ClearTextOnFocus = clearsTextOnFocus
|
|
81
97
|
defaultStyles.ZIndex = 12000
|
|
82
98
|
return defaultStyles
|
|
@@ -85,15 +101,9 @@ local useInputStyles = makeStyles(function(theme, _param)
|
|
|
85
101
|
local defaultStyles = {}
|
|
86
102
|
defaultStyles.BackgroundTransparency = 1
|
|
87
103
|
defaultStyles.BorderSizePixel = 0
|
|
88
|
-
-- Center in root
|
|
89
104
|
defaultStyles.Position = UDim2.new(0.5, 0, 0.5, 0)
|
|
90
105
|
defaultStyles.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
91
|
-
-- Margin controls vertical spacing around the input component
|
|
92
106
|
repeat
|
|
93
|
-
if margin == "none" then
|
|
94
|
-
defaultStyles.Size = UDim2.new(1, -theme.padding.calc(0), 1, 0)
|
|
95
|
-
break
|
|
96
|
-
end
|
|
97
107
|
if margin == "dense" then
|
|
98
108
|
defaultStyles.Size = UDim2.new(1, -theme.padding.calc(2), 1, -theme.padding.calc(2))
|
|
99
109
|
break
|
|
@@ -102,20 +112,33 @@ local useInputStyles = makeStyles(function(theme, _param)
|
|
|
102
112
|
defaultStyles.Size = UDim2.new(1, -theme.padding.calc(4), 1, -theme.padding.calc(4))
|
|
103
113
|
break
|
|
104
114
|
end
|
|
105
|
-
defaultStyles.Size = UDim2.new(1,
|
|
115
|
+
defaultStyles.Size = UDim2.new(1, 0, 1, 0)
|
|
106
116
|
break
|
|
107
117
|
until true
|
|
108
118
|
defaultStyles.ZIndex = 11000
|
|
109
119
|
return defaultStyles
|
|
110
120
|
end
|
|
121
|
+
local slot = function(side)
|
|
122
|
+
return {
|
|
123
|
+
Size = UDim2.new(0, icon, 0, icon),
|
|
124
|
+
Position = UDim2.new(if side == "start" then 0 else 1, if side == "start" then gap else -gap, 0.5, 0),
|
|
125
|
+
AnchorPoint = Vector2.new(if side == "start" then 0 else 1, 0.5),
|
|
126
|
+
BackgroundTransparency = 1,
|
|
127
|
+
BorderSizePixel = 0,
|
|
128
|
+
ZIndex = 13000,
|
|
129
|
+
}
|
|
130
|
+
end
|
|
111
131
|
return createStyles({
|
|
112
132
|
root = makeRootStyles(),
|
|
113
133
|
font = {
|
|
114
|
-
TextSize =
|
|
134
|
+
TextSize = metrics.font,
|
|
115
135
|
Font = theme.typography.fontFamilies.default,
|
|
116
136
|
},
|
|
117
137
|
margin = makeMarginStyles(),
|
|
138
|
+
shell = makeShellStyles(),
|
|
118
139
|
box = makeBoxStyles(),
|
|
140
|
+
startSlot = slot("start"),
|
|
141
|
+
endSlot = slot("end"),
|
|
119
142
|
helper = {
|
|
120
143
|
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
121
144
|
Position = UDim2.new(0, 0, 1, 0),
|
|
@@ -127,25 +150,24 @@ local useInputStyles = makeStyles(function(theme, _param)
|
|
|
127
150
|
ZIndex = 11000,
|
|
128
151
|
},
|
|
129
152
|
errorColorFrame = {
|
|
130
|
-
BackgroundColor3 = theme.palette.error.main,
|
|
131
|
-
BorderColor3 = theme.palette.error.main,
|
|
153
|
+
BackgroundColor3 = theme.palette.status.error.main,
|
|
154
|
+
BorderColor3 = theme.palette.status.error.main,
|
|
132
155
|
},
|
|
133
156
|
errorColorText = {
|
|
134
|
-
TextColor3 = theme.palette.error.main,
|
|
135
|
-
BackgroundColor3 = theme.palette.error.main,
|
|
136
|
-
BorderColor3 = theme.palette.error.main,
|
|
157
|
+
TextColor3 = theme.palette.status.error.main,
|
|
137
158
|
},
|
|
138
159
|
divider = {
|
|
139
|
-
Position = UDim2.new(0, 0, 0,
|
|
140
|
-
BackgroundColor3 =
|
|
160
|
+
Position = UDim2.new(0, 0, 0, fieldHeight),
|
|
161
|
+
BackgroundColor3 = accent,
|
|
141
162
|
ZIndex = 11000,
|
|
142
163
|
},
|
|
143
164
|
corner = {
|
|
144
165
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
145
166
|
},
|
|
146
167
|
stroke = {
|
|
147
|
-
Color = if
|
|
148
|
-
Transparency = 0,
|
|
168
|
+
Color = if hasError then theme.palette.status.error.main elseif focused then focusAccent else accent,
|
|
169
|
+
Transparency = if focused or hasError then 0 else 0.45,
|
|
170
|
+
Thickness = if focused then 1.5 else 1,
|
|
149
171
|
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
150
172
|
},
|
|
151
173
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function syncInputDraft(focused: boolean, text: string | undefined, draft: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function syncInputDraft(focused, text, draft)
|
|
3
|
+
local _result
|
|
4
|
+
if focused then
|
|
5
|
+
_result = draft
|
|
6
|
+
else
|
|
7
|
+
local _condition = text
|
|
8
|
+
if _condition == nil then
|
|
9
|
+
_condition = ""
|
|
10
|
+
end
|
|
11
|
+
_result = _condition
|
|
12
|
+
end
|
|
13
|
+
return _result
|
|
14
|
+
end
|
|
15
|
+
return {
|
|
16
|
+
syncInputDraft = syncInputDraft,
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function inputInsets(hasStart, hasEnd, icon, gap)
|
|
3
|
+
return {
|
|
4
|
+
left = gap + (if hasStart then icon + gap else 0),
|
|
5
|
+
right = gap + (if hasEnd then icon + gap else 0),
|
|
6
|
+
}
|
|
7
|
+
end
|
|
8
|
+
return {
|
|
9
|
+
inputInsets = inputInsets,
|
|
10
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
-
local
|
|
5
|
+
local componentStyles = _theme.componentStyles
|
|
6
6
|
local createStyles = _theme.createStyles
|
|
7
|
-
local useGridStyles =
|
|
7
|
+
local useGridStyles = componentStyles("Grid", function(_, props)
|
|
8
8
|
return createStyles({
|
|
9
9
|
baseGrid = {
|
|
10
10
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -59,6 +59,7 @@ local function Grid(props)
|
|
|
59
59
|
verticalAlignment = Enum.VerticalAlignment.Top
|
|
60
60
|
end
|
|
61
61
|
local className = _binding.className
|
|
62
|
+
local sx = _binding.sx
|
|
62
63
|
local children = _binding.children
|
|
63
64
|
local id = _binding.id
|
|
64
65
|
local ref = _binding.ref
|
|
@@ -89,6 +90,11 @@ local function Grid(props)
|
|
|
89
90
|
_attributes[_k] = _v
|
|
90
91
|
end
|
|
91
92
|
end
|
|
93
|
+
if sx then
|
|
94
|
+
for _k, _v in sx do
|
|
95
|
+
_attributes[_k] = _v
|
|
96
|
+
end
|
|
97
|
+
end
|
|
92
98
|
local _attributes_1 = {
|
|
93
99
|
key = "GridLayout",
|
|
94
100
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
-
local
|
|
5
|
+
local componentStyles = _theme.componentStyles
|
|
6
6
|
local createStyles = _theme.createStyles
|
|
7
|
-
local useListStyles =
|
|
7
|
+
local useListStyles = componentStyles("List", function(_, props)
|
|
8
8
|
return createStyles({
|
|
9
9
|
baseList = {
|
|
10
10
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -59,6 +59,7 @@ local function List(props)
|
|
|
59
59
|
verticalFlex = Enum.UIFlexAlignment.None
|
|
60
60
|
end
|
|
61
61
|
local className = _binding.className
|
|
62
|
+
local sx = _binding.sx
|
|
62
63
|
local children = _binding.children
|
|
63
64
|
local id = _binding.id
|
|
64
65
|
local ref = _binding.ref
|
|
@@ -89,6 +90,11 @@ local function List(props)
|
|
|
89
90
|
_attributes[_k] = _v
|
|
90
91
|
end
|
|
91
92
|
end
|
|
93
|
+
if sx then
|
|
94
|
+
for _k, _v in sx do
|
|
95
|
+
_attributes[_k] = _v
|
|
96
|
+
end
|
|
97
|
+
end
|
|
92
98
|
local _attributes_1 = {
|
|
93
99
|
key = "ListLayout",
|
|
94
100
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 useListItemStyles = TS.import(script, script.Parent, "ListItem.styles").default
|
|
5
|
+
local function ListItem(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local text = _binding.text
|
|
8
|
+
local secondary = _binding.secondary
|
|
9
|
+
local selected = _binding.selected
|
|
10
|
+
if selected == nil then
|
|
11
|
+
selected = false
|
|
12
|
+
end
|
|
13
|
+
local disabled = _binding.disabled
|
|
14
|
+
if disabled == nil then
|
|
15
|
+
disabled = false
|
|
16
|
+
end
|
|
17
|
+
local onActivated = _binding.onActivated
|
|
18
|
+
local styles = useListItemStyles({
|
|
19
|
+
selected = selected,
|
|
20
|
+
disabled = disabled,
|
|
21
|
+
})
|
|
22
|
+
local _attributes = {
|
|
23
|
+
key = "ListItem",
|
|
24
|
+
}
|
|
25
|
+
for _k, _v in styles.root do
|
|
26
|
+
_attributes[_k] = _v
|
|
27
|
+
end
|
|
28
|
+
_attributes.Event = {
|
|
29
|
+
Activated = function()
|
|
30
|
+
if not disabled and onActivated ~= nil then
|
|
31
|
+
onActivated()
|
|
32
|
+
end
|
|
33
|
+
end,
|
|
34
|
+
}
|
|
35
|
+
local _attributes_1 = table.clone(styles.padding)
|
|
36
|
+
setmetatable(_attributes_1, nil)
|
|
37
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
38
|
+
local _attributes_2 = table.clone(styles.list)
|
|
39
|
+
setmetatable(_attributes_2, nil)
|
|
40
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
41
|
+
local _attributes_3 = {
|
|
42
|
+
key = "Primary",
|
|
43
|
+
}
|
|
44
|
+
for _k, _v in styles.primary do
|
|
45
|
+
_attributes_3[_k] = _v
|
|
46
|
+
end
|
|
47
|
+
_attributes_3.Text = text
|
|
48
|
+
local _exp_2 = React.createElement("textlabel", _attributes_3)
|
|
49
|
+
local _result
|
|
50
|
+
if secondary ~= nil and #secondary > 0 then
|
|
51
|
+
local _attributes_4 = {
|
|
52
|
+
key = "Secondary",
|
|
53
|
+
}
|
|
54
|
+
for _k, _v in styles.secondary do
|
|
55
|
+
_attributes_4[_k] = _v
|
|
56
|
+
end
|
|
57
|
+
_attributes_4.Text = secondary
|
|
58
|
+
_result = (React.createElement("textlabel", _attributes_4))
|
|
59
|
+
else
|
|
60
|
+
_result = nil
|
|
61
|
+
end
|
|
62
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, _exp_2, _result)
|
|
63
|
+
end
|
|
64
|
+
local default = ListItem
|
|
65
|
+
return {
|
|
66
|
+
default = default,
|
|
67
|
+
}
|