@rbxts/uiblox 0.1.53 → 0.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -28
- package/out/foundation/guard.d.ts +3 -0
- package/out/foundation/guard.luau +23 -0
- package/out/foundation/index.d.ts +1 -0
- package/out/foundation/init.luau +8 -0
- package/out/hooks/breakpoints.d.ts +10 -0
- package/out/hooks/breakpoints.luau +60 -0
- package/out/hooks/index.d.ts +4 -0
- package/out/hooks/init.luau +10 -0
- package/out/hooks/useBreakpoints.d.ts +6 -0
- package/out/hooks/useBreakpoints.luau +39 -0
- package/out/hooks/useReducedMotion.d.ts +1 -0
- package/out/hooks/useReducedMotion.luau +12 -0
- package/out/index.d.ts +3 -0
- package/out/init.luau +9 -0
- package/out/interaction/index.d.ts +4 -0
- package/out/interaction/init.luau +9 -0
- package/out/interaction/pointerRoute.d.ts +6 -0
- package/out/interaction/pointerRoute.luau +35 -0
- package/out/interaction/usePointer.d.ts +11 -0
- package/out/interaction/usePointer.luau +99 -0
- package/out/theme/constants/ColorConstants.d.ts +0 -3
- package/out/theme/constants/ColorConstants.luau +0 -96
- package/out/theme/constants/NumberConstants.d.ts +1 -1
- package/out/theme/constants/NumberConstants.luau +3 -4
- package/out/theme/context/ThemeProvider.d.ts +3 -0
- package/out/theme/context/ThemeProvider.luau +15 -8
- package/out/theme/context/themeScope.d.ts +5 -0
- package/out/theme/context/themeScope.luau +7 -0
- package/out/theme/hooks/useTheme.luau +15 -14
- package/out/theme/interfaces/density/controlMetrics.d.ts +21 -0
- package/out/theme/interfaces/density/controlMetrics.luau +67 -0
- package/out/theme/interfaces/density/index.d.ts +1 -0
- package/out/theme/interfaces/density/init.luau +7 -0
- package/out/theme/interfaces/index.d.ts +1 -0
- package/out/theme/interfaces/init.luau +3 -0
- package/out/theme/interfaces/palette/Palette.d.ts +39 -18
- package/out/theme/interfaces/palette/colors/index.d.ts +0 -1
- package/out/theme/interfaces/palette/index.d.ts +1 -0
- package/out/theme/interfaces/theme/Theme.d.ts +13 -0
- package/out/theme/interfaces/theme/ThemeConstants.d.ts +0 -18
- package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +7 -7
- package/out/theme/styles/index.d.ts +1 -2
- package/out/theme/styles/init.luau +3 -1
- package/out/theme/styles/types/index.d.ts +0 -1
- package/out/theme/styles/utilities/classNames.d.ts +3 -2
- package/out/theme/styles/utilities/classNames.luau +7 -173
- package/out/theme/styles/utilities/componentStyles.d.ts +7 -0
- package/out/theme/styles/utilities/componentStyles.luau +31 -0
- package/out/theme/styles/utilities/componentTheme.d.ts +20 -0
- package/out/theme/styles/utilities/componentTheme.luau +53 -0
- package/out/theme/styles/utilities/createStyles.d.ts +1 -2
- package/out/theme/styles/utilities/index.d.ts +5 -1
- package/out/theme/styles/utilities/init.luau +9 -1
- package/out/theme/styles/utilities/makeStyles.luau +14 -15
- package/out/theme/styles/utilities/resolveStyle.d.ts +32 -0
- package/out/theme/styles/utilities/resolveStyle.luau +66 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +68 -0
- package/out/theme/styles/utilities/variants.d.ts +19 -0
- package/out/theme/styles/utilities/variants.luau +59 -0
- package/out/theme/themes/DarkTheme.luau +4 -57
- package/out/theme/themes/LightTheme.luau +4 -57
- package/out/theme/themes/createPalette.d.ts +3 -0
- package/out/theme/themes/createPalette.luau +111 -0
- package/out/theme/themes/index.d.ts +1 -0
- package/out/theme/themes/init.luau +3 -0
- package/out/theme/types/types.d.ts +1 -0
- package/out/theme/utilites/colorMath.d.ts +8 -0
- package/out/theme/utilites/colorMath.luau +35 -0
- package/out/theme/utilites/index.d.ts +1 -0
- package/out/theme/utilites/init.luau +6 -0
- package/out/ui/enums/Icons.d.ts +5 -1
- package/out/ui/enums/Icons.luau +4 -0
- package/out/ui/index.d.ts +12 -0
- package/out/ui/init.luau +5 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +11 -0
- package/out/ui/packages/accordion/components/Accordion.luau +93 -0
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +4 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +65 -0
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
- package/out/ui/packages/accordion/components/accordionOpen.luau +10 -0
- package/out/ui/packages/accordion/index.d.ts +2 -0
- package/out/ui/packages/accordion/init.luau +5 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +10 -0
- package/out/ui/packages/appBar/components/AppBar.luau +77 -0
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +6 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +66 -0
- package/out/ui/packages/appBar/index.d.ts +3 -0
- package/out/ui/packages/appBar/init.luau +5 -0
- package/out/ui/packages/assetField/components/AssetField.d.ts +10 -0
- package/out/ui/packages/assetField/components/AssetField.luau +75 -0
- package/out/ui/packages/assetField/components/AssetField.styles.d.ts +2 -0
- package/out/ui/packages/assetField/components/AssetField.styles.luau +33 -0
- package/out/ui/packages/assetField/components/assetPreviewUri.d.ts +1 -0
- package/out/ui/packages/assetField/components/assetPreviewUri.luau +25 -0
- package/out/ui/packages/assetField/index.d.ts +2 -0
- package/out/ui/packages/assetField/init.luau +5 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.d.ts +5 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +47 -0
- package/out/ui/packages/autocomplete/components/autocompleteSearchable.d.ts +1 -0
- package/out/ui/packages/autocomplete/components/autocompleteSearchable.luau +7 -0
- package/out/ui/packages/autocomplete/index.d.ts +2 -0
- package/out/ui/packages/autocomplete/init.luau +5 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +8 -0
- package/out/ui/packages/avatar/components/Avatar.luau +69 -0
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +4 -0
- package/out/ui/packages/avatar/components/Avatar.styles.luau +39 -0
- package/out/ui/packages/avatar/components/avatarText.d.ts +1 -0
- package/out/ui/packages/avatar/components/avatarText.luau +17 -0
- package/out/ui/packages/avatar/index.d.ts +3 -0
- package/out/ui/packages/avatar/init.luau +6 -0
- package/out/ui/packages/badge/components/Badge.d.ts +10 -0
- package/out/ui/packages/badge/components/Badge.luau +69 -0
- package/out/ui/packages/badge/components/Badge.styles.d.ts +2 -0
- package/out/ui/packages/badge/components/Badge.styles.luau +38 -0
- package/out/ui/packages/badge/components/badgeValue.d.ts +1 -0
- package/out/ui/packages/badge/components/badgeValue.luau +7 -0
- package/out/ui/packages/badge/index.d.ts +3 -0
- package/out/ui/packages/badge/init.luau +6 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +10 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +86 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +58 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/init.luau +5 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +11 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +82 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +47 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +7 -0
- package/out/ui/packages/breadcrumbs/index.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/init.luau +5 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.d.ts +9 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +234 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.d.ts +2 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +98 -0
- package/out/ui/packages/brickColorPicker/components/brickColorCatalog.d.ts +1 -0
- package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +26 -0
- package/out/ui/packages/brickColorPicker/components/brickColorFilter.d.ts +2 -0
- package/out/ui/packages/brickColorPicker/components/brickColorFilter.luau +26 -0
- package/out/ui/packages/brickColorPicker/index.d.ts +3 -0
- package/out/ui/packages/brickColorPicker/init.luau +8 -0
- package/out/ui/packages/button/components/Button.d.ts +4 -0
- package/out/ui/packages/button/components/Button.luau +86 -34
- package/out/ui/packages/button/components/Button.styles.luau +15 -35
- package/out/ui/packages/button/components/activation.d.ts +1 -0
- package/out/ui/packages/button/components/activation.luau +7 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +12 -0
- package/out/ui/packages/button/components/buttonLook.luau +55 -0
- package/out/ui/packages/button/types/ButtonSize.d.ts +1 -1
- package/out/ui/packages/card/components/Card.d.ts +11 -0
- package/out/ui/packages/card/components/Card.luau +74 -0
- package/out/ui/packages/card/components/Card.styles.d.ts +2 -0
- package/out/ui/packages/card/components/Card.styles.luau +66 -0
- package/out/ui/packages/card/index.d.ts +2 -0
- package/out/ui/packages/card/init.luau +5 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.d.ts +8 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +89 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.d.ts +2 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +46 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +3 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +15 -0
- package/out/ui/packages/cframeEditor/index.d.ts +2 -0
- package/out/ui/packages/cframeEditor/init.luau +5 -0
- package/out/ui/packages/checkbox/components/Checkbox.d.ts +11 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +136 -0
- package/out/ui/packages/checkbox/components/Checkbox.styles.d.ts +6 -0
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +69 -0
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +5 -0
- package/out/ui/packages/checkbox/components/checkboxLook.luau +52 -0
- package/out/ui/packages/checkbox/components/nextChecked.d.ts +1 -0
- package/out/ui/packages/checkbox/components/nextChecked.luau +7 -0
- package/out/ui/packages/checkbox/index.d.ts +2 -0
- package/out/ui/packages/checkbox/init.luau +5 -0
- package/out/ui/packages/chip/components/Chip.d.ts +9 -0
- package/out/ui/packages/chip/components/Chip.luau +63 -0
- package/out/ui/packages/chip/components/Chip.styles.d.ts +5 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +47 -0
- package/out/ui/packages/chip/index.d.ts +2 -0
- package/out/ui/packages/chip/init.luau +5 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.d.ts +11 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +109 -0
- package/out/ui/packages/circularProgress/index.d.ts +2 -0
- package/out/ui/packages/circularProgress/init.luau +5 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.d.ts +8 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +512 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +145 -0
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.d.ts +8 -0
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +190 -0
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.d.ts +8 -0
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +240 -0
- package/out/ui/packages/colorPicker/components/colorValue.d.ts +22 -0
- package/out/ui/packages/colorPicker/components/colorValue.luau +157 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +26 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +307 -0
- package/out/ui/packages/colorPicker/index.d.ts +11 -0
- package/out/ui/packages/colorPicker/init.luau +37 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +11 -0
- package/out/ui/packages/dialog/components/Dialog.luau +56 -0
- package/out/ui/packages/dialog/components/Dialog.styles.d.ts +2 -0
- package/out/ui/packages/dialog/components/Dialog.styles.luau +55 -0
- package/out/ui/packages/dialog/index.d.ts +2 -0
- package/out/ui/packages/dialog/init.luau +5 -0
- package/out/ui/packages/divider/components/Divider.luau +6 -0
- package/out/ui/packages/divider/components/Divider.styles.luau +4 -4
- package/out/ui/packages/drawer/components/Drawer.d.ts +11 -0
- package/out/ui/packages/drawer/components/Drawer.luau +77 -0
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +2 -0
- package/out/ui/packages/drawer/components/Drawer.styles.luau +40 -0
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +2 -0
- package/out/ui/packages/drawer/components/drawerPlacement.luau +7 -0
- package/out/ui/packages/drawer/index.d.ts +3 -0
- package/out/ui/packages/drawer/init.luau +5 -0
- package/out/ui/packages/enumPicker/components/EnumPicker.d.ts +11 -0
- package/out/ui/packages/enumPicker/components/EnumPicker.luau +42 -0
- package/out/ui/packages/enumPicker/components/enumOptions.d.ts +5 -0
- package/out/ui/packages/enumPicker/components/enumOptions.luau +28 -0
- package/out/ui/packages/enumPicker/index.d.ts +2 -0
- package/out/ui/packages/enumPicker/init.luau +5 -0
- package/out/ui/packages/fab/components/Fab.d.ts +13 -0
- package/out/ui/packages/fab/components/Fab.luau +128 -0
- package/out/ui/packages/fab/components/Fab.styles.d.ts +7 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +40 -0
- package/out/ui/packages/fab/components/fabSize.d.ts +3 -0
- package/out/ui/packages/fab/components/fabSize.luau +29 -0
- package/out/ui/packages/fab/index.d.ts +3 -0
- package/out/ui/packages/fab/init.luau +8 -0
- package/out/ui/packages/fontEditor/components/FontEditor.d.ts +8 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +223 -0
- package/out/ui/packages/fontEditor/components/FontEditor.styles.d.ts +2 -0
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +56 -0
- package/out/ui/packages/fontEditor/components/fontValue.d.ts +10 -0
- package/out/ui/packages/fontEditor/components/fontValue.luau +81 -0
- package/out/ui/packages/fontEditor/index.d.ts +4 -0
- package/out/ui/packages/fontEditor/init.luau +10 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.d.ts +10 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +156 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.d.ts +2 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -0
- package/out/ui/packages/gradientEditor/components/gradientPatch.d.ts +8 -0
- package/out/ui/packages/gradientEditor/components/gradientPatch.luau +17 -0
- package/out/ui/packages/gradientEditor/components/gradientValue.d.ts +9 -0
- package/out/ui/packages/gradientEditor/components/gradientValue.luau +23 -0
- package/out/ui/packages/gradientEditor/index.d.ts +2 -0
- package/out/ui/packages/gradientEditor/init.luau +5 -0
- package/out/ui/packages/icon/components/Icon.luau +6 -0
- package/out/ui/packages/icon/components/Icon.styles.luau +7 -7
- package/out/ui/packages/iconButton/components/IconButton.d.ts +3 -0
- package/out/ui/packages/iconButton/components/IconButton.luau +53 -5
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +7 -7
- package/out/ui/packages/index.d.ts +49 -0
- package/out/ui/packages/init.luau +147 -0
- package/out/ui/packages/input/components/Input.d.ts +8 -1
- package/out/ui/packages/input/components/Input.luau +180 -60
- package/out/ui/packages/input/components/Input.styles.d.ts +3 -1
- package/out/ui/packages/input/components/Input.styles.luau +79 -53
- package/out/ui/packages/input/components/inputDraft.d.ts +1 -0
- package/out/ui/packages/input/components/inputDraft.luau +17 -0
- package/out/ui/packages/input/components/inputInsets.d.ts +4 -0
- package/out/ui/packages/input/components/inputInsets.luau +10 -0
- package/out/ui/packages/layout/components/Grid.luau +8 -2
- package/out/ui/packages/layout/components/List.luau +8 -2
- package/out/ui/packages/listItem/components/ListItem.d.ts +9 -0
- package/out/ui/packages/listItem/components/ListItem.luau +67 -0
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +5 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +64 -0
- package/out/ui/packages/listItem/index.d.ts +2 -0
- package/out/ui/packages/listItem/init.luau +5 -0
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +11 -2
- package/out/ui/packages/menu/components/Menu.d.ts +14 -0
- package/out/ui/packages/menu/components/Menu.luau +60 -0
- package/out/ui/packages/menu/components/Menu.styles.d.ts +2 -0
- package/out/ui/packages/menu/components/Menu.styles.luau +26 -0
- package/out/ui/packages/menu/index.d.ts +2 -0
- package/out/ui/packages/menu/init.luau +5 -0
- package/out/ui/packages/modal/components/Modal.d.ts +9 -0
- package/out/ui/packages/modal/components/Modal.luau +97 -0
- package/out/ui/packages/modal/components/Modal.styles.d.ts +2 -0
- package/out/ui/packages/modal/components/Modal.styles.luau +47 -0
- package/out/ui/packages/modal/components/dismissInput.d.ts +1 -0
- package/out/ui/packages/modal/components/dismissInput.luau +8 -0
- package/out/ui/packages/modal/components/focusTrap.d.ts +2 -0
- package/out/ui/packages/modal/components/focusTrap.luau +22 -0
- package/out/ui/packages/modal/index.d.ts +2 -0
- package/out/ui/packages/modal/init.luau +5 -0
- package/out/ui/packages/motion/duration.d.ts +2 -0
- package/out/ui/packages/motion/duration.luau +17 -0
- package/out/ui/packages/motion/index.d.ts +5 -0
- package/out/ui/packages/motion/init.luau +16 -0
- package/out/ui/packages/motion/loop.d.ts +1 -0
- package/out/ui/packages/motion/loop.luau +18 -0
- package/out/ui/packages/motion/play.d.ts +1 -0
- package/out/ui/packages/motion/play.luau +23 -0
- package/out/ui/packages/motion/resolveReduced.d.ts +1 -0
- package/out/ui/packages/motion/resolveReduced.luau +10 -0
- package/out/ui/packages/motion/unit.d.ts +8 -0
- package/out/ui/packages/motion/unit.luau +80 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +16 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +48 -0
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +29 -0
- package/out/ui/packages/numberInput/index.d.ts +2 -0
- package/out/ui/packages/numberInput/init.luau +5 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.d.ts +8 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +96 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.d.ts +2 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +41 -0
- package/out/ui/packages/numberRangeEditor/components/numberRangeValue.d.ts +4 -0
- package/out/ui/packages/numberRangeEditor/components/numberRangeValue.luau +16 -0
- package/out/ui/packages/numberRangeEditor/index.d.ts +2 -0
- package/out/ui/packages/numberRangeEditor/init.luau +5 -0
- package/out/ui/packages/pagination/components/Pagination.d.ts +9 -0
- package/out/ui/packages/pagination/components/Pagination.luau +72 -0
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +2 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +39 -0
- package/out/ui/packages/pagination/components/pageRange.d.ts +1 -0
- package/out/ui/packages/pagination/components/pageRange.luau +24 -0
- package/out/ui/packages/pagination/index.d.ts +2 -0
- package/out/ui/packages/pagination/init.luau +5 -0
- package/out/ui/packages/paper/components/Paper.d.ts +8 -0
- package/out/ui/packages/paper/components/Paper.luau +31 -0
- package/out/ui/packages/paper/components/Paper.styles.d.ts +4 -0
- package/out/ui/packages/paper/components/Paper.styles.luau +32 -0
- package/out/ui/packages/paper/index.d.ts +2 -0
- package/out/ui/packages/paper/init.luau +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.d.ts +8 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +85 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +46 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +3 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/physicalPropertiesEditor/index.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/init.luau +5 -0
- package/out/ui/packages/popup/components/Popup.d.ts +13 -0
- package/out/ui/packages/popup/components/Popup.luau +131 -0
- package/out/ui/packages/popup/components/Portal.d.ts +7 -0
- package/out/ui/packages/popup/components/Portal.luau +15 -0
- package/out/ui/packages/popup/components/placement.d.ts +9 -0
- package/out/ui/packages/popup/components/placement.luau +41 -0
- package/out/ui/packages/popup/components/portalTarget.d.ts +1 -0
- package/out/ui/packages/popup/components/portalTarget.luau +13 -0
- package/out/ui/packages/popup/index.d.ts +4 -0
- package/out/ui/packages/popup/init.luau +6 -0
- package/out/ui/packages/preloader/components/Preloader.luau +6 -0
- package/out/ui/packages/preloader/components/Preloader.styles.luau +3 -3
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +8 -1
- package/out/ui/packages/progressBar/components/ProgressBar.luau +61 -11
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +2 -2
- package/out/ui/packages/progressBar/index.d.ts +2 -3
- package/out/ui/packages/progressBar/init.luau +3 -4
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +16 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +112 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +6 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +66 -0
- package/out/ui/packages/radioGroup/index.d.ts +2 -0
- package/out/ui/packages/radioGroup/init.luau +5 -0
- package/out/ui/packages/rayEditor/components/RayEditor.d.ts +8 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +83 -0
- package/out/ui/packages/rayEditor/components/RayEditor.styles.d.ts +2 -0
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +37 -0
- package/out/ui/packages/rayEditor/components/rayParts.d.ts +1 -0
- package/out/ui/packages/rayEditor/components/rayParts.luau +10 -0
- package/out/ui/packages/rayEditor/index.d.ts +2 -0
- package/out/ui/packages/rayEditor/init.luau +5 -0
- package/out/ui/packages/rectEditor/components/RectEditor.d.ts +8 -0
- package/out/ui/packages/rectEditor/components/RectEditor.luau +85 -0
- package/out/ui/packages/rectEditor/components/RectEditor.styles.d.ts +2 -0
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +46 -0
- package/out/ui/packages/rectEditor/components/rectValue.d.ts +3 -0
- package/out/ui/packages/rectEditor/components/rectValue.luau +14 -0
- package/out/ui/packages/rectEditor/index.d.ts +2 -0
- package/out/ui/packages/rectEditor/init.luau +5 -0
- package/out/ui/packages/scroll/dragScroll.d.ts +8 -0
- package/out/ui/packages/scroll/dragScroll.luau +51 -0
- package/out/ui/packages/scroll/index.d.ts +2 -0
- package/out/ui/packages/scroll/init.luau +5 -0
- package/out/ui/packages/scroll/useDragScroll.d.ts +5 -0
- package/out/ui/packages/scroll/useDragScroll.luau +127 -0
- package/out/ui/packages/select/components/Select.d.ts +16 -0
- package/out/ui/packages/select/components/Select.luau +455 -0
- package/out/ui/packages/select/components/Select.styles.d.ts +6 -0
- package/out/ui/packages/select/components/Select.styles.luau +104 -0
- package/out/ui/packages/select/components/optionLabel.d.ts +1 -0
- package/out/ui/packages/select/components/optionLabel.luau +7 -0
- package/out/ui/packages/select/components/selectFilter.d.ts +4 -0
- package/out/ui/packages/select/components/selectFilter.luau +27 -0
- package/out/ui/packages/select/components/selectFocus.d.ts +4 -0
- package/out/ui/packages/select/components/selectFocus.luau +16 -0
- package/out/ui/packages/select/components/selectGroups.d.ts +18 -0
- package/out/ui/packages/select/components/selectGroups.luau +38 -0
- package/out/ui/packages/select/components/selectKey.d.ts +4 -0
- package/out/ui/packages/select/components/selectKey.luau +14 -0
- package/out/ui/packages/select/components/selectMotion.d.ts +2 -0
- package/out/ui/packages/select/components/selectMotion.luau +12 -0
- package/out/ui/packages/select/components/selectMulti.d.ts +5 -0
- package/out/ui/packages/select/components/selectMulti.luau +26 -0
- package/out/ui/packages/select/components/selectTypeahead.d.ts +4 -0
- package/out/ui/packages/select/components/selectTypeahead.luau +58 -0
- package/out/ui/packages/select/components/stepChoice.d.ts +3 -0
- package/out/ui/packages/select/components/stepChoice.luau +24 -0
- package/out/ui/packages/select/index.d.ts +3 -0
- package/out/ui/packages/select/init.luau +8 -0
- package/out/ui/packages/shadow/components/Shadow.styles.luau +3 -3
- package/out/ui/packages/sidebar/components/Sidebar.luau +6 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +5 -5
- package/out/ui/packages/skeleton/components/Skeleton.d.ts +15 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +224 -0
- package/out/ui/packages/skeleton/components/Skeleton.styles.d.ts +2 -0
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +27 -0
- package/out/ui/packages/skeleton/components/skeletonMotion.d.ts +3 -0
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +17 -0
- package/out/ui/packages/skeleton/index.d.ts +3 -0
- package/out/ui/packages/skeleton/init.luau +7 -0
- package/out/ui/packages/slider/components/Slider.d.ts +13 -0
- package/out/ui/packages/slider/components/Slider.luau +204 -0
- package/out/ui/packages/slider/components/Slider.styles.d.ts +6 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +47 -0
- package/out/ui/packages/slider/components/sliderNudge.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderNudge.luau +39 -0
- package/out/ui/packages/slider/index.d.ts +2 -0
- package/out/ui/packages/slider/init.luau +5 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +11 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +41 -0
- package/out/ui/packages/snackbar/index.d.ts +2 -0
- package/out/ui/packages/snackbar/init.luau +5 -0
- package/out/ui/packages/splitPane/components/SplitPane.d.ts +14 -0
- package/out/ui/packages/splitPane/components/SplitPane.luau +241 -0
- package/out/ui/packages/splitPane/components/SplitPane.styles.d.ts +2 -0
- package/out/ui/packages/splitPane/components/SplitPane.styles.luau +59 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +5 -0
- package/out/ui/packages/splitPane/components/splitLook.luau +49 -0
- package/out/ui/packages/splitPane/components/splitSize.d.ts +10 -0
- package/out/ui/packages/splitPane/components/splitSize.luau +46 -0
- package/out/ui/packages/splitPane/index.d.ts +2 -0
- package/out/ui/packages/splitPane/init.luau +5 -0
- package/out/ui/packages/stateMatrix.d.ts +30 -0
- package/out/ui/packages/stateMatrix.luau +1471 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +7 -0
- package/out/ui/packages/stepper/components/Stepper.luau +62 -0
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.styles.luau +39 -0
- package/out/ui/packages/stepper/components/stepState.d.ts +2 -0
- package/out/ui/packages/stepper/components/stepState.luau +13 -0
- package/out/ui/packages/stepper/index.d.ts +3 -0
- package/out/ui/packages/stepper/init.luau +6 -0
- package/out/ui/packages/switch/components/Switch.d.ts +11 -0
- package/out/ui/packages/switch/components/Switch.luau +170 -0
- package/out/ui/packages/switch/components/Switch.styles.d.ts +6 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +62 -0
- package/out/ui/packages/switch/components/switchLook.d.ts +10 -0
- package/out/ui/packages/switch/components/switchLook.luau +63 -0
- package/out/ui/packages/switch/index.d.ts +2 -0
- package/out/ui/packages/switch/init.luau +5 -0
- package/out/ui/packages/table/components/Table.d.ts +9 -0
- package/out/ui/packages/table/components/Table.luau +135 -0
- package/out/ui/packages/table/components/Table.styles.d.ts +2 -0
- package/out/ui/packages/table/components/Table.styles.luau +70 -0
- package/out/ui/packages/table/components/rowSelected.d.ts +1 -0
- package/out/ui/packages/table/components/rowSelected.luau +7 -0
- package/out/ui/packages/table/index.d.ts +2 -0
- package/out/ui/packages/table/init.luau +5 -0
- package/out/ui/packages/tabs/components/Tabs.d.ts +10 -0
- package/out/ui/packages/tabs/components/Tabs.luau +113 -0
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +2 -0
- package/out/ui/packages/tabs/components/Tabs.styles.luau +55 -0
- package/out/ui/packages/tabs/index.d.ts +2 -0
- package/out/ui/packages/tabs/init.luau +5 -0
- package/out/ui/packages/toast/components/Toast.luau +6 -0
- package/out/ui/packages/toast/components/Toast.styles.luau +23 -10
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +7 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +119 -0
- package/out/ui/packages/tooltip/components/Tooltip.styles.d.ts +2 -0
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +43 -0
- package/out/ui/packages/tooltip/index.d.ts +2 -0
- package/out/ui/packages/tooltip/init.luau +5 -0
- package/out/ui/packages/treeView/components/TreeView.d.ts +1 -0
- package/out/ui/packages/treeView/components/TreeView.luau +201 -225
- package/out/ui/packages/treeView/components/TreeView.styles.luau +9 -37
- package/out/ui/packages/treeView/components/treeRows.d.ts +23 -0
- package/out/ui/packages/treeView/components/treeRows.luau +147 -0
- package/out/ui/packages/treeView/interfaces/Branch.d.ts +3 -0
- package/out/ui/packages/treeView/interfaces/Leaf.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +6 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +8 -11
- package/out/ui/packages/udimEditor/components/UDimEditor.d.ts +8 -0
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +127 -0
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.d.ts +2 -0
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +50 -0
- package/out/ui/packages/udimEditor/index.d.ts +2 -0
- package/out/ui/packages/udimEditor/init.luau +5 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.d.ts +10 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +87 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.d.ts +2 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +41 -0
- package/out/ui/packages/vectorEditor/components/vectorValue.d.ts +10 -0
- package/out/ui/packages/vectorEditor/components/vectorValue.luau +49 -0
- package/out/ui/packages/vectorEditor/index.d.ts +4 -0
- package/out/ui/packages/vectorEditor/init.luau +11 -0
- package/out/ui/packages/virtualList/components/VirtualList.d.ts +23 -0
- package/out/ui/packages/virtualList/components/VirtualList.luau +178 -0
- package/out/ui/packages/virtualList/components/VirtualList.styles.d.ts +2 -0
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +29 -0
- package/out/ui/packages/virtualList/components/virtualWindow.d.ts +10 -0
- package/out/ui/packages/virtualList/components/virtualWindow.luau +66 -0
- package/out/ui/packages/virtualList/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +5 -0
- package/package.json +7 -3
- package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -42
- package/out/theme/interfaces/palette/colors/Colors.luau +0 -2
- package/out/theme/styles/types/ConditionalStylesMap.d.ts +0 -2
- package/out/theme/styles/types/ConditionalStylesMap.luau +0 -2
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local SPACING_BASE =
|
|
2
|
+
local SPACING_BASE = 8
|
|
3
3
|
local PADDING_BASE = 4
|
|
4
|
-
-- align with UIBlox design
|
|
5
4
|
local BORDER_RADIUS = 4
|
|
6
5
|
local CONTENT_WIDTH = 1024
|
|
7
6
|
local ICON_SIZES = {
|
|
8
7
|
small = 16,
|
|
9
|
-
medium =
|
|
10
|
-
large =
|
|
8
|
+
medium = 24,
|
|
9
|
+
large = 32,
|
|
11
10
|
}
|
|
12
11
|
return {
|
|
13
12
|
SPACING_BASE = SPACING_BASE,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
1
2
|
import { Theme } from "../interfaces/index";
|
|
2
3
|
import { CustomizedProps } from "../types/index";
|
|
4
|
+
import { ThemeScope } from "./themeScope";
|
|
5
|
+
export declare const ThemeContext: React.Context<ThemeScope<Theme> | undefined>;
|
|
3
6
|
export interface ThemeProviderProps {
|
|
4
7
|
theme?: Theme;
|
|
5
8
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
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 StrictMode = _react.StrictMode
|
|
6
5
|
local useEffect = _react.useEffect
|
|
7
|
-
local
|
|
6
|
+
local useMemo = _react.useMemo
|
|
7
|
+
local useState = _react.useState
|
|
8
8
|
local DEFAULT_THEME = TS.import(script, script.Parent.Parent, "constants").DEFAULT_THEME
|
|
9
|
-
local
|
|
9
|
+
local ThemeContext = React.createContext(nil)
|
|
10
10
|
local function ThemeProvider(props)
|
|
11
11
|
local _binding = props
|
|
12
12
|
local theme = _binding.theme
|
|
@@ -14,15 +14,22 @@ local function ThemeProvider(props)
|
|
|
14
14
|
theme = DEFAULT_THEME
|
|
15
15
|
end
|
|
16
16
|
local children = _binding.children
|
|
17
|
-
|
|
17
|
+
local current, setCurrent = useState(theme)
|
|
18
18
|
useEffect(function()
|
|
19
|
-
|
|
19
|
+
setCurrent(theme)
|
|
20
20
|
end, { theme })
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
local value = useMemo(function()
|
|
22
|
+
return {
|
|
23
|
+
theme = current,
|
|
24
|
+
setTheme = setCurrent,
|
|
25
|
+
}
|
|
26
|
+
end, { current })
|
|
27
|
+
return React.createElement(ThemeContext.Provider, {
|
|
28
|
+
value = value,
|
|
29
|
+
}, children)
|
|
24
30
|
end
|
|
25
31
|
local default = ThemeProvider
|
|
26
32
|
return {
|
|
33
|
+
ThemeContext = ThemeContext,
|
|
27
34
|
default = default,
|
|
28
35
|
}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local useContext = _react.useContext
|
|
4
5
|
local useEffect = _react.useEffect
|
|
5
|
-
local useMemo = _react.useMemo
|
|
6
6
|
local useState = _react.useState
|
|
7
|
+
local ThemeContext = TS.import(script, script.Parent.Parent, "context", "ThemeProvider").ThemeContext
|
|
7
8
|
local themeProducer = TS.import(script, script.Parent.Parent, "context", "ThemeProducer").themeProducer
|
|
9
|
+
local readScopedTheme = TS.import(script, script.Parent.Parent, "context", "themeScope").readScopedTheme
|
|
8
10
|
local useTheme = function()
|
|
9
|
-
local
|
|
11
|
+
local provided = useContext(ThemeContext)
|
|
12
|
+
local fallbackTheme, setFallbackTheme = useState(themeProducer:getState())
|
|
10
13
|
useEffect(function()
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
if provided then
|
|
15
|
+
return nil
|
|
16
|
+
end
|
|
17
|
+
local unsubscribeFn = themeProducer:subscribe(function(state)
|
|
18
|
+
setFallbackTheme(state)
|
|
13
19
|
end)
|
|
14
20
|
return function()
|
|
15
21
|
unsubscribeFn()
|
|
16
22
|
end
|
|
17
|
-
end)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
theme = theme,
|
|
24
|
-
setTheme = memoizedSetTheme,
|
|
25
|
-
}
|
|
26
|
-
end, { theme, setTheme })
|
|
23
|
+
end, { provided })
|
|
24
|
+
return readScopedTheme(provided, {
|
|
25
|
+
theme = fallbackTheme,
|
|
26
|
+
setTheme = themeProducer.setTheme,
|
|
27
|
+
})
|
|
27
28
|
end
|
|
28
29
|
local default = useTheme
|
|
29
30
|
return {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ControlSize = "small" | "medium" | "large";
|
|
2
|
+
export type ThemeDensity = "compact" | "comfortable";
|
|
3
|
+
export interface ControlMetrics {
|
|
4
|
+
height: number;
|
|
5
|
+
checkbox: number;
|
|
6
|
+
switchTrackW: number;
|
|
7
|
+
switchTrackH: number;
|
|
8
|
+
switchThumb: number;
|
|
9
|
+
switchInset: number;
|
|
10
|
+
sliderHeight: number;
|
|
11
|
+
sliderTrack: number;
|
|
12
|
+
sliderKnob: number;
|
|
13
|
+
radio: number;
|
|
14
|
+
icon: number;
|
|
15
|
+
font: number;
|
|
16
|
+
markFont: number;
|
|
17
|
+
buttonHeight: number;
|
|
18
|
+
buttonWidth: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function resolveControlSize(density?: ThemeDensity, size?: ControlSize): ControlSize;
|
|
21
|
+
export declare function controlMetrics(density?: ThemeDensity, size?: ControlSize): ControlMetrics;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local METRICS = {
|
|
3
|
+
small = {
|
|
4
|
+
height = 22,
|
|
5
|
+
checkbox = 16,
|
|
6
|
+
switchTrackW = 32,
|
|
7
|
+
switchTrackH = 18,
|
|
8
|
+
switchThumb = 14,
|
|
9
|
+
switchInset = 2,
|
|
10
|
+
sliderHeight = 22,
|
|
11
|
+
sliderTrack = 4,
|
|
12
|
+
sliderKnob = 12,
|
|
13
|
+
radio = 14,
|
|
14
|
+
icon = 14,
|
|
15
|
+
font = 13,
|
|
16
|
+
markFont = 11,
|
|
17
|
+
buttonHeight = 24,
|
|
18
|
+
buttonWidth = 96,
|
|
19
|
+
},
|
|
20
|
+
medium = {
|
|
21
|
+
height = 24,
|
|
22
|
+
checkbox = 20,
|
|
23
|
+
switchTrackW = 48,
|
|
24
|
+
switchTrackH = 24,
|
|
25
|
+
switchThumb = 18,
|
|
26
|
+
switchInset = 3,
|
|
27
|
+
sliderHeight = 24,
|
|
28
|
+
sliderTrack = 6,
|
|
29
|
+
sliderKnob = 14,
|
|
30
|
+
radio = 18,
|
|
31
|
+
icon = 18,
|
|
32
|
+
font = 14,
|
|
33
|
+
markFont = 12,
|
|
34
|
+
buttonHeight = 36,
|
|
35
|
+
buttonWidth = 144,
|
|
36
|
+
},
|
|
37
|
+
large = {
|
|
38
|
+
height = 36,
|
|
39
|
+
checkbox = 24,
|
|
40
|
+
switchTrackW = 60,
|
|
41
|
+
switchTrackH = 36,
|
|
42
|
+
switchThumb = 30,
|
|
43
|
+
switchInset = 3,
|
|
44
|
+
sliderHeight = 36,
|
|
45
|
+
sliderTrack = 8,
|
|
46
|
+
sliderKnob = 18,
|
|
47
|
+
radio = 22,
|
|
48
|
+
icon = 18,
|
|
49
|
+
font = 16,
|
|
50
|
+
markFont = 12,
|
|
51
|
+
buttonHeight = 48,
|
|
52
|
+
buttonWidth = 192,
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
local function resolveControlSize(density, size)
|
|
56
|
+
if size ~= nil then
|
|
57
|
+
return size
|
|
58
|
+
end
|
|
59
|
+
return if density == "compact" then "small" else "medium"
|
|
60
|
+
end
|
|
61
|
+
local function controlMetrics(density, size)
|
|
62
|
+
return METRICS[resolveControlSize(density, size)]
|
|
63
|
+
end
|
|
64
|
+
return {
|
|
65
|
+
resolveControlSize = resolveControlSize,
|
|
66
|
+
controlMetrics = controlMetrics,
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { controlMetrics, resolveControlSize, type ControlMetrics, type ControlSize, type ThemeDensity, } from "./controlMetrics";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
local _controlMetrics = TS.import(script, script, "controlMetrics")
|
|
5
|
+
exports.controlMetrics = _controlMetrics.controlMetrics
|
|
6
|
+
exports.resolveControlSize = _controlMetrics.resolveControlSize
|
|
7
|
+
return exports
|
|
@@ -1,26 +1,47 @@
|
|
|
1
|
+
export interface BrandRole {
|
|
2
|
+
main: Color3;
|
|
3
|
+
on: Color3;
|
|
4
|
+
hover: Color3;
|
|
5
|
+
pressed: Color3;
|
|
6
|
+
}
|
|
7
|
+
export interface StatusRole {
|
|
8
|
+
main: Color3;
|
|
9
|
+
on: Color3;
|
|
10
|
+
surface: Color3;
|
|
11
|
+
border: Color3;
|
|
12
|
+
}
|
|
1
13
|
export default interface Palette {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
secondary: {
|
|
6
|
-
main: Color3;
|
|
7
|
-
};
|
|
8
|
-
error: {
|
|
9
|
-
main: Color3;
|
|
10
|
-
};
|
|
11
|
-
warning: {
|
|
12
|
-
main: Color3;
|
|
13
|
-
};
|
|
14
|
-
success: {
|
|
15
|
-
main: Color3;
|
|
16
|
-
};
|
|
17
|
-
background: {
|
|
18
|
-
default: Color3;
|
|
14
|
+
surface: {
|
|
15
|
+
canvas: Color3;
|
|
19
16
|
paper: Color3;
|
|
17
|
+
elevated: Color3;
|
|
18
|
+
overlay: Color3;
|
|
19
|
+
input: Color3;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
primary: BrandRole;
|
|
22
|
+
accent: BrandRole;
|
|
22
23
|
text: {
|
|
23
24
|
primary: Color3;
|
|
24
25
|
secondary: Color3;
|
|
26
|
+
disabled: Color3;
|
|
27
|
+
inverse: Color3;
|
|
28
|
+
link: Color3;
|
|
29
|
+
};
|
|
30
|
+
border: Color3;
|
|
31
|
+
divider: Color3;
|
|
32
|
+
focus: Color3;
|
|
33
|
+
action: {
|
|
34
|
+
hover: Color3;
|
|
35
|
+
pressed: Color3;
|
|
36
|
+
selected: Color3;
|
|
37
|
+
disabled: Color3;
|
|
38
|
+
};
|
|
39
|
+
status: {
|
|
40
|
+
success: StatusRole;
|
|
41
|
+
warning: StatusRole;
|
|
42
|
+
error: StatusRole;
|
|
43
|
+
info: StatusRole;
|
|
25
44
|
};
|
|
45
|
+
backdrop: Color3;
|
|
46
|
+
shadow: Color3;
|
|
26
47
|
}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
|
+
import { ThemeDensity } from "../density/index";
|
|
1
2
|
import { Palette } from "../palette/index";
|
|
2
3
|
import { Padding, Shape, Spacing } from "../spacing/index";
|
|
3
4
|
import { ThemeTypography } from "../typography/index";
|
|
4
5
|
import ThemeOptions from "./ThemeOptions";
|
|
5
6
|
interface Theme {
|
|
6
7
|
type: string;
|
|
8
|
+
density: ThemeDensity;
|
|
9
|
+
reducedMotion?: boolean;
|
|
7
10
|
options: ThemeOptions;
|
|
8
11
|
palette: Palette;
|
|
9
12
|
padding: Padding;
|
|
10
13
|
shape: Shape;
|
|
11
14
|
spacing: Spacing;
|
|
12
15
|
typography: ThemeTypography;
|
|
16
|
+
components?: {
|
|
17
|
+
[name: string]: {
|
|
18
|
+
defaultProps?: {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
styleOverrides?: {
|
|
22
|
+
[slot: string]: object;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
13
26
|
}
|
|
14
27
|
export default Theme;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import { Borders } from "../spacing/index";
|
|
2
2
|
import { IconSizes } from "../iconSizes/index";
|
|
3
|
-
import { ColorTokens } from "../palette/colorTokens/index";
|
|
4
|
-
import { CommonColors } from "../palette/colors/Common";
|
|
5
|
-
import { Colors } from "../palette/colors/index";
|
|
6
3
|
export default interface ThemeConstants {
|
|
7
4
|
contentWidth: number;
|
|
8
5
|
iconSizes: IconSizes;
|
|
9
|
-
colors: Colors;
|
|
10
6
|
borders: Borders;
|
|
11
|
-
extendedPalette: {
|
|
12
|
-
Blue: ColorTokens;
|
|
13
|
-
Common: CommonColors;
|
|
14
|
-
Dark: ColorTokens;
|
|
15
|
-
Gray: ColorTokens;
|
|
16
|
-
Green: ColorTokens;
|
|
17
|
-
Light: ColorTokens;
|
|
18
|
-
Magenta: ColorTokens;
|
|
19
|
-
Orange: ColorTokens;
|
|
20
|
-
Purple: ColorTokens;
|
|
21
|
-
Red: ColorTokens;
|
|
22
|
-
Turquoise: ColorTokens;
|
|
23
|
-
Yellow: ColorTokens;
|
|
24
|
-
};
|
|
25
7
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local baseFontSize =
|
|
2
|
+
local baseFontSize = 14
|
|
3
3
|
local allFontSizes = {
|
|
4
|
-
h1 =
|
|
5
|
-
h2 =
|
|
6
|
-
h3 =
|
|
4
|
+
h1 = 28,
|
|
5
|
+
h2 = 22,
|
|
6
|
+
h3 = 18,
|
|
7
7
|
body = baseFontSize,
|
|
8
|
-
caption =
|
|
9
|
-
overline =
|
|
10
|
-
button =
|
|
8
|
+
caption = 12,
|
|
9
|
+
overline = 10,
|
|
10
|
+
button = 13,
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
13
|
baseFontSize = baseFontSize,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { ClassNameMap } from "./types/index";
|
|
2
2
|
export { WriteableStyle } from "./types/index";
|
|
3
|
-
export { ConditionalStylesMap } from "./types/index";
|
|
4
3
|
export { createStyles } from "./utilities/index";
|
|
5
4
|
export { makeStyles } from "./utilities/index";
|
|
6
|
-
export { classNames } from "./utilities/index";
|
|
5
|
+
export { classNames, cx } from "./utilities/index";
|
|
7
6
|
export * from "./utilities/index";
|
|
@@ -3,7 +3,9 @@ local TS = _G[script]
|
|
|
3
3
|
local exports = {}
|
|
4
4
|
exports.createStyles = TS.import(script, script, "utilities").createStyles
|
|
5
5
|
exports.makeStyles = TS.import(script, script, "utilities").makeStyles
|
|
6
|
-
|
|
6
|
+
local _utilities = TS.import(script, script, "utilities")
|
|
7
|
+
exports.classNames = _utilities.classNames
|
|
8
|
+
exports.cx = _utilities.cx
|
|
7
9
|
for _k, _v in TS.import(script, script, "utilities") or {} do
|
|
8
10
|
exports[_k] = _v
|
|
9
11
|
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { WriteableStyle
|
|
2
|
-
declare
|
|
1
|
+
import type { WriteableStyle } from "../types/index";
|
|
2
|
+
declare const classNames: <T extends Instance>(...args: Array<WriteableStyle<T> | false | undefined>) => WriteableStyle<T>;
|
|
3
3
|
export default classNames;
|
|
4
|
+
export { classNames as cx };
|
|
@@ -1,187 +1,21 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local
|
|
3
|
-
local
|
|
4
|
-
local styles = { ... }
|
|
2
|
+
local classNames = function(...)
|
|
3
|
+
local args = { ... }
|
|
5
4
|
local style = {}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
for _i in styles do
|
|
9
|
-
if _i > _length then
|
|
10
|
-
_length = _i
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
local _result = {}
|
|
14
|
-
local _resultLength = 0
|
|
15
|
-
for _i = 1, _length do
|
|
16
|
-
local _v = styles[_i]
|
|
17
|
-
if _v ~= nil then
|
|
18
|
-
_resultLength += 1
|
|
19
|
-
_result[_resultLength] = _v
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
-- ▲ ReadonlyArray.filterUndefined ▲
|
|
23
|
-
-- ▼ ReadonlyArray.forEach ▼
|
|
24
|
-
local _callback = function(value)
|
|
25
|
-
if value ~= 0 and value == value and value ~= "" and value then
|
|
5
|
+
for _, arg in args do
|
|
6
|
+
if arg ~= false and arg ~= nil then
|
|
26
7
|
local _object = table.clone(style)
|
|
27
8
|
setmetatable(_object, nil)
|
|
28
|
-
for _k, _v in
|
|
9
|
+
for _k, _v in arg do
|
|
29
10
|
_object[_k] = _v
|
|
30
11
|
end
|
|
31
12
|
style = _object
|
|
32
13
|
end
|
|
33
14
|
end
|
|
34
|
-
|
|
35
|
-
_callback(_v, _k - 1, _result)
|
|
36
|
-
end
|
|
37
|
-
-- ▲ ReadonlyArray.forEach ▲
|
|
38
|
-
local _result_1 = conditionalStyles
|
|
39
|
-
if _result_1 ~= nil then
|
|
40
|
-
-- ▼ ReadonlyMap.forEach ▼
|
|
41
|
-
local _callback_1 = function(value, key)
|
|
42
|
-
if value then
|
|
43
|
-
local _object = table.clone(style)
|
|
44
|
-
setmetatable(_object, nil)
|
|
45
|
-
if key ~= 0 and key == key and key ~= "" and key then
|
|
46
|
-
for _k, _v in key do
|
|
47
|
-
_object[_k] = _v
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
style = _object
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
for _k, _v in _result_1 do
|
|
54
|
-
_callback_1(_v, _k, _result_1)
|
|
55
|
-
end
|
|
56
|
-
-- ▲ ReadonlyMap.forEach ▲
|
|
57
|
-
end
|
|
58
|
-
local _object = table.clone(style)
|
|
59
|
-
setmetatable(_object, nil)
|
|
60
|
-
return _object
|
|
61
|
-
end
|
|
62
|
-
-- Use variadic tuple types to allow for multiple WriteableStyle<T> arguments with an optional ConditionalStyles<T> argument at the end
|
|
63
|
-
local function classNames(...)
|
|
64
|
-
local args = { ... }
|
|
65
|
-
-- Check if last argument is ConditionalStyles
|
|
66
|
-
local hasConditionalStyles = function(args)
|
|
67
|
-
local _exitType, _returns = TS.try(function()
|
|
68
|
-
local lastArg = args[#args]
|
|
69
|
-
-- If the last argument is undefined or not a table then its not a ConditionalStyles<T>
|
|
70
|
-
-- Map<K, V> compiles to a table literal (ref: https://roblox-ts.com/docs/api/constructors)
|
|
71
|
-
if lastArg == nil or not (type(lastArg) == "table") then
|
|
72
|
-
return TS.TRY_RETURN, { false }
|
|
73
|
-
end
|
|
74
|
-
local lastArgAsConditionalStylesMap = lastArg
|
|
75
|
-
local matchesMapFormat = true
|
|
76
|
-
local _result = lastArgAsConditionalStylesMap
|
|
77
|
-
if _result ~= nil then
|
|
78
|
-
-- ▼ ReadonlyMap.forEach ▼
|
|
79
|
-
local _callback = function(value, key)
|
|
80
|
-
-- Assume that the last argument is a ConditionalStyles<T> with correct format (Map<WriteableStyle<T>, boolean>)
|
|
81
|
-
-- If the key is not a WriteableStyle<T> then it does not match the format
|
|
82
|
-
-- If the value is not a boolean then it does not match the format
|
|
83
|
-
local _value = value
|
|
84
|
-
local _condition = not (type(_value) == "boolean")
|
|
85
|
-
if not _condition then
|
|
86
|
-
local _key = key
|
|
87
|
-
_condition = not (type(_key) == "table")
|
|
88
|
-
end
|
|
89
|
-
if _condition then
|
|
90
|
-
matchesMapFormat = false
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
for _k, _v in _result do
|
|
94
|
-
_callback(_v, _k, _result)
|
|
95
|
-
end
|
|
96
|
-
-- ▲ ReadonlyMap.forEach ▲
|
|
97
|
-
end
|
|
98
|
-
return TS.TRY_RETURN, { matchesMapFormat }
|
|
99
|
-
end, function()
|
|
100
|
-
-- If we catch an error, it means that the last argument is not a ConditionalStyles<T>
|
|
101
|
-
return TS.TRY_RETURN, { false }
|
|
102
|
-
end)
|
|
103
|
-
if _exitType then
|
|
104
|
-
return unpack(_returns)
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
local _exitType, _returns = TS.try(function()
|
|
108
|
-
if hasConditionalStyles(args) then
|
|
109
|
-
-- Handle case with ConditionalStyles
|
|
110
|
-
-- ▼ Array.pop ▼
|
|
111
|
-
local _length = #args
|
|
112
|
-
local _result = args[_length]
|
|
113
|
-
args[_length] = nil
|
|
114
|
-
-- ▲ Array.pop ▲
|
|
115
|
-
local conditionalStyles = _result
|
|
116
|
-
local styles = args
|
|
117
|
-
-- ConditionalStyles<T> is the last argument
|
|
118
|
-
-- ▼ ReadonlyArray.filterUndefined ▼
|
|
119
|
-
local _length_1 = 0
|
|
120
|
-
for _i in styles do
|
|
121
|
-
if _i > _length_1 then
|
|
122
|
-
_length_1 = _i
|
|
123
|
-
end
|
|
124
|
-
end
|
|
125
|
-
local _result_1 = {}
|
|
126
|
-
local _resultLength = 0
|
|
127
|
-
for _i = 1, _length_1 do
|
|
128
|
-
local _v = styles[_i]
|
|
129
|
-
if _v ~= nil then
|
|
130
|
-
_resultLength += 1
|
|
131
|
-
_result_1[_resultLength] = _v
|
|
132
|
-
end
|
|
133
|
-
end
|
|
134
|
-
-- ▲ ReadonlyArray.filterUndefined ▲
|
|
135
|
-
return TS.TRY_RETURN, { classNamesInternal(conditionalStyles, unpack(_result_1)) }
|
|
136
|
-
end
|
|
137
|
-
end, function()
|
|
138
|
-
-- If we catch an error, like attempt to iterate over a string value, it means that the last argument is not a ConditionalStyles<T>
|
|
139
|
-
local styles = args
|
|
140
|
-
-- ▼ ReadonlyArray.filterUndefined ▼
|
|
141
|
-
local _length = 0
|
|
142
|
-
for _i in styles do
|
|
143
|
-
if _i > _length then
|
|
144
|
-
_length = _i
|
|
145
|
-
end
|
|
146
|
-
end
|
|
147
|
-
local _result = {}
|
|
148
|
-
local _resultLength = 0
|
|
149
|
-
for _i = 1, _length do
|
|
150
|
-
local _v = styles[_i]
|
|
151
|
-
if _v ~= nil then
|
|
152
|
-
_resultLength += 1
|
|
153
|
-
_result[_resultLength] = _v
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
-- ▲ ReadonlyArray.filterUndefined ▲
|
|
157
|
-
return TS.TRY_RETURN, { classNamesInternal(nil, unpack(_result)) }
|
|
158
|
-
end)
|
|
159
|
-
if _exitType then
|
|
160
|
-
return unpack(_returns)
|
|
161
|
-
end
|
|
162
|
-
-- Handle case without ConditionalStyles
|
|
163
|
-
-- All args are WriteableStyle<T>
|
|
164
|
-
local styles = args
|
|
165
|
-
-- ▼ ReadonlyArray.filterUndefined ▼
|
|
166
|
-
local _length = 0
|
|
167
|
-
for _i in styles do
|
|
168
|
-
if _i > _length then
|
|
169
|
-
_length = _i
|
|
170
|
-
end
|
|
171
|
-
end
|
|
172
|
-
local _result = {}
|
|
173
|
-
local _resultLength = 0
|
|
174
|
-
for _i = 1, _length do
|
|
175
|
-
local _v = styles[_i]
|
|
176
|
-
if _v ~= nil then
|
|
177
|
-
_resultLength += 1
|
|
178
|
-
_result[_resultLength] = _v
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
-- ▲ ReadonlyArray.filterUndefined ▲
|
|
182
|
-
return classNamesInternal(nil, unpack(_result))
|
|
15
|
+
return style
|
|
183
16
|
end
|
|
184
17
|
local default = classNames
|
|
185
18
|
return {
|
|
186
19
|
default = default,
|
|
20
|
+
cx = classNames,
|
|
187
21
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Theme } from "../../interfaces/theme/index";
|
|
2
|
+
import { ClassNameMap } from "../types/styles";
|
|
3
|
+
type TMakeStyles<ClassKey extends string = string> = (theme: Theme) => ClassNameMap<ClassKey>;
|
|
4
|
+
type TMakeStylesWithProps<Props, ClassKey extends string = string> = (theme: Theme, props: Props) => ClassNameMap<ClassKey>;
|
|
5
|
+
type TVariantF<Props> = keyof Props extends never ? TMakeStyles : TMakeStylesWithProps<Props>;
|
|
6
|
+
declare const componentStyles: <Props = {}, ClassKey extends string = string>(name: string, factory: TVariantF<Props>) => keyof Props extends never ? () => ClassNameMap<ClassKey> : (props: Props) => ClassNameMap<ClassKey>;
|
|
7
|
+
export default componentStyles;
|