@rbxts/uiblox 0.2.0-alpha.3 → 0.2.0-alpha.31
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 +27 -109
- package/out/hooks/index.d.ts +1 -0
- package/out/hooks/init.luau +3 -0
- package/out/hooks/useBreakpoints.luau +2 -11
- package/out/hooks/viewportObserver.d.ts +10 -0
- package/out/hooks/viewportObserver.luau +75 -0
- package/out/theme/interfaces/theme/Theme.d.ts +15 -0
- package/out/theme/styles/utilities/componentStyles.luau +45 -3
- package/out/theme/styles/utilities/componentTheme.d.ts +15 -0
- package/out/theme/styles/utilities/index.d.ts +2 -0
- package/out/theme/styles/utilities/init.luau +7 -0
- package/out/theme/styles/utilities/resolveStyle.d.ts +10 -2
- package/out/theme/styles/utilities/resolveStyle.luau +7 -3
- package/out/theme/styles/utilities/resolveSx.d.ts +120 -0
- package/out/theme/styles/utilities/resolveSx.luau +524 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +9 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
- package/out/ui/packages/accordion/components/Accordion.luau +46 -30
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +16 -4
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
- package/out/ui/packages/accordion/components/accordionOpen.luau +4 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +48 -42
- package/out/ui/packages/alert/components/Alert.styles.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.styles.luau +17 -8
- package/out/ui/packages/appBar/components/AppBar.d.ts +2 -1
- package/out/ui/packages/appBar/components/AppBar.luau +47 -36
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +16 -5
- package/out/ui/packages/assetField/components/AssetField.luau +12 -16
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +27 -26
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.styles.luau +5 -1
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
- package/out/ui/packages/backdrop/components/Backdrop.luau +51 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
- package/out/ui/packages/backdrop/index.d.ts +2 -0
- package/out/ui/packages/backdrop/init.luau +5 -0
- package/out/ui/packages/badge/components/Badge.d.ts +3 -0
- package/out/ui/packages/badge/components/Badge.luau +32 -24
- package/out/ui/packages/badge/components/Badge.styles.d.ts +5 -1
- package/out/ui/packages/badge/components/Badge.styles.luau +20 -8
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +1 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +20 -18
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +3 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +6 -2
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +67 -40
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
- package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/init.luau +3 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
- package/out/ui/packages/button/components/Button.luau +28 -22
- package/out/ui/packages/card/components/Card.d.ts +3 -1
- package/out/ui/packages/card/components/Card.luau +10 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +75 -53
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +26 -9
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +6 -1
- package/out/ui/packages/chip/components/Chip.luau +61 -17
- package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +54 -9
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +29 -18
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +16 -20
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +34 -20
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +34 -35
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +65 -62
- package/out/ui/packages/dialog/components/Dialog.d.ts +3 -2
- package/out/ui/packages/dialog/components/Dialog.luau +41 -21
- package/out/ui/packages/divider/components/Divider.d.ts +1 -0
- package/out/ui/packages/divider/components/Divider.luau +52 -17
- package/out/ui/packages/divider/components/Divider.styles.luau +32 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +1 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +10 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.luau +71 -37
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.styles.luau +3 -2
- package/out/ui/packages/fab/components/Fab.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.luau +79 -37
- package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +39 -3
- package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
- package/out/ui/packages/fab/components/fabSize.luau +4 -0
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +1 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
- package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
- package/out/ui/packages/formText/components/FormHelperText.luau +40 -0
- package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
- package/out/ui/packages/formText/components/FormLabel.luau +42 -0
- package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
- package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
- package/out/ui/packages/formText/index.d.ts +4 -0
- package/out/ui/packages/formText/init.luau +6 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +56 -42
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -4
- package/out/ui/packages/host/components/SxHost.d.ts +18 -0
- package/out/ui/packages/host/components/SxHost.luau +210 -0
- package/out/ui/packages/host/hostPaint.d.ts +12 -0
- package/out/ui/packages/host/hostPaint.luau +34 -0
- package/out/ui/packages/host/hostRules.d.ts +15 -0
- package/out/ui/packages/host/hostRules.luau +92 -0
- package/out/ui/packages/host/index.d.ts +3 -0
- package/out/ui/packages/host/init.luau +13 -0
- package/out/ui/packages/icon/components/Icon.luau +9 -16
- package/out/ui/packages/iconButton/components/IconButton.luau +22 -17
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
- package/out/ui/packages/imageList/components/ImageList.luau +93 -0
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +73 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +4 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +31 -0
- package/out/ui/packages/imageList/index.d.ts +2 -0
- package/out/ui/packages/imageList/init.luau +5 -0
- package/out/ui/packages/index.d.ts +8 -0
- package/out/ui/packages/init.luau +24 -0
- package/out/ui/packages/input/components/Input.d.ts +1 -0
- package/out/ui/packages/input/components/Input.luau +22 -19
- package/out/ui/packages/layout/components/Box.d.ts +11 -0
- package/out/ui/packages/layout/components/Box.luau +40 -0
- package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
- package/out/ui/packages/layout/components/Box.styles.luau +34 -0
- package/out/ui/packages/layout/components/Container.d.ts +10 -0
- package/out/ui/packages/layout/components/Container.luau +45 -0
- package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
- package/out/ui/packages/layout/components/Container.styles.luau +41 -0
- package/out/ui/packages/layout/components/FlexItem.d.ts +12 -0
- package/out/ui/packages/layout/components/FlexItem.luau +40 -0
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +8 -0
- package/out/ui/packages/layout/components/FlexItem.styles.luau +66 -0
- package/out/ui/packages/layout/components/Grid.d.ts +5 -1
- package/out/ui/packages/layout/components/Grid.luau +41 -19
- package/out/ui/packages/layout/components/List.luau +9 -16
- package/out/ui/packages/layout/components/Stack.d.ts +14 -0
- package/out/ui/packages/layout/components/Stack.luau +44 -0
- package/out/ui/packages/layout/components/Stack.styles.d.ts +10 -0
- package/out/ui/packages/layout/components/Stack.styles.luau +101 -0
- package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
- package/out/ui/packages/layout/components/boxPad.luau +59 -0
- package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
- package/out/ui/packages/layout/components/containerWidth.luau +17 -0
- package/out/ui/packages/layout/components/flexItemMode.d.ts +6 -0
- package/out/ui/packages/layout/components/flexItemMode.luau +36 -0
- package/out/ui/packages/layout/components/gridProps.d.ts +3 -0
- package/out/ui/packages/layout/components/gridProps.luau +20 -0
- package/out/ui/packages/layout/components/stackAlign.d.ts +10 -0
- package/out/ui/packages/layout/components/stackAlign.luau +43 -0
- package/out/ui/packages/layout/index.d.ts +14 -0
- package/out/ui/packages/layout/init.luau +5 -0
- package/out/ui/packages/link/components/Link.d.ts +11 -0
- package/out/ui/packages/link/components/Link.luau +80 -0
- package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
- package/out/ui/packages/link/components/Link.styles.luau +59 -0
- package/out/ui/packages/link/index.d.ts +3 -0
- package/out/ui/packages/link/init.luau +5 -0
- package/out/ui/packages/listItem/components/ListItem.d.ts +4 -1
- package/out/ui/packages/listItem/components/ListItem.luau +44 -4
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +16 -5
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +7 -1
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +6 -0
- package/out/ui/packages/markdown/components/Markdown.luau +221 -0
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.styles.luau +101 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +16 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +315 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +6 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +132 -0
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +2 -0
- package/out/ui/packages/markdown/htmlToMarkdown.luau +350 -0
- package/out/ui/packages/markdown/index.d.ts +8 -0
- package/out/ui/packages/markdown/init.luau +11 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +42 -0
- package/out/ui/packages/markdown/parseMarkdown.luau +459 -0
- package/out/ui/packages/menu/components/Menu.d.ts +7 -1
- package/out/ui/packages/menu/components/Menu.luau +68 -26
- package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
- package/out/ui/packages/modal/components/Modal.d.ts +2 -1
- package/out/ui/packages/modal/components/Modal.luau +79 -37
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +1 -0
- package/out/ui/packages/motion/unit.d.ts +5 -0
- package/out/ui/packages/motion/unit.luau +23 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +2 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +16 -3
- package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
- package/out/ui/packages/pagination/components/Pagination.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.luau +62 -38
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.styles.luau +36 -4
- package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
- package/out/ui/packages/pagination/components/pageRange.luau +91 -8
- package/out/ui/packages/pagination/index.d.ts +1 -0
- package/out/ui/packages/pagination/init.luau +1 -0
- package/out/ui/packages/paper/components/Paper.d.ts +4 -2
- package/out/ui/packages/paper/components/Paper.luau +31 -9
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +6 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -1
- package/out/ui/packages/popup/components/Popup.luau +35 -18
- package/out/ui/packages/popup/index.d.ts +1 -0
- package/out/ui/packages/popup/init.luau +1 -0
- package/out/ui/packages/preloader/components/Preloader.luau +9 -16
- package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +16 -18
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
- package/out/ui/packages/rating/components/Rating.d.ts +11 -0
- package/out/ui/packages/rating/components/Rating.luau +97 -0
- package/out/ui/packages/rating/components/Rating.styles.d.ts +6 -0
- package/out/ui/packages/rating/components/Rating.styles.luau +44 -0
- package/out/ui/packages/rating/index.d.ts +2 -0
- package/out/ui/packages/rating/init.luau +5 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
- package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
- package/out/ui/packages/select/components/Select.d.ts +5 -0
- package/out/ui/packages/select/components/Select.luau +61 -77
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
- package/out/ui/packages/shadow/components/Shadow.luau +39 -17
- package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
- package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
- package/out/ui/packages/skeleton/components/Skeleton.luau +22 -30
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
- package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
- package/out/ui/packages/slider/components/Slider.d.ts +3 -0
- package/out/ui/packages/slider/components/Slider.luau +47 -19
- package/out/ui/packages/slider/components/Slider.styles.d.ts +2 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +14 -1
- package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
- package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +2 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +5 -0
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +1 -0
- package/out/ui/packages/snackbar/components/snackbarAction.luau +10 -0
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +19 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +97 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +5 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +31 -0
- package/out/ui/packages/speedDial/index.d.ts +3 -0
- package/out/ui/packages/speedDial/init.luau +5 -0
- package/out/ui/packages/splitPane/components/SplitPane.luau +13 -17
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +2 -0
- package/out/ui/packages/stateMatrix.luau +872 -881
- package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
- package/out/ui/packages/stepper/components/Stepper.luau +16 -17
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +3 -1
- package/out/ui/packages/stepper/components/Stepper.styles.luau +6 -2
- package/out/ui/packages/switch/components/Switch.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.luau +21 -16
- package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +6 -1
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +15 -19
- package/out/ui/packages/table/components/Table.styles.d.ts +3 -1
- package/out/ui/packages/table/components/Table.styles.luau +10 -6
- package/out/ui/packages/tabs/components/Tabs.d.ts +3 -0
- package/out/ui/packages/tabs/components/Tabs.luau +24 -19
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +5 -1
- package/out/ui/packages/tabs/components/Tabs.styles.luau +26 -10
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
- package/out/ui/packages/tabs/index.d.ts +1 -0
- package/out/ui/packages/tabs/init.luau +1 -0
- package/out/ui/packages/toast/components/Toast.d.ts +2 -0
- package/out/ui/packages/toast/components/Toast.luau +41 -13
- package/out/ui/packages/toast/components/Toast.styles.luau +23 -5
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +21 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +129 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +9 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +69 -0
- package/out/ui/packages/toggleButton/index.d.ts +2 -0
- package/out/ui/packages/toggleButton/init.luau +7 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
- package/out/ui/packages/treeView/components/TreeView.luau +9 -16
- package/out/ui/packages/typography/components/Typography.luau +13 -14
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +7 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +43 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
- package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
- package/out/ui/packages/virtualList/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +1 -0
- package/package.json +2 -2
- package/out/ui/packages/select/components/selectMotion.d.ts +0 -2
- package/out/ui/packages/select/components/selectMotion.luau +0 -12
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
import { Icons } from "../../../enums/index";
|
|
3
3
|
import { FabSize } from "./fabSize";
|
|
4
|
+
import { FabColor } from "./Fab.styles";
|
|
4
5
|
export interface FabProps {
|
|
5
6
|
icon: Icons;
|
|
7
|
+
label?: string;
|
|
6
8
|
size?: FabSize;
|
|
9
|
+
color?: FabColor;
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
loading?: boolean;
|
|
9
12
|
reducedMotion?: boolean;
|
|
@@ -7,16 +7,24 @@ local useState = _react.useState
|
|
|
7
7
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
8
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
9
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
10
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
11
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
11
|
-
local
|
|
12
|
+
local _fabSize = TS.import(script, script.Parent, "fabSize")
|
|
13
|
+
local fabExtended = _fabSize.fabExtended
|
|
14
|
+
local fabIconPixels = _fabSize.fabIconPixels
|
|
12
15
|
local useFabStyles = TS.import(script, script.Parent, "Fab.styles").default
|
|
13
16
|
local function Fab(props)
|
|
14
17
|
local _binding = props
|
|
15
18
|
local icon = _binding.icon
|
|
19
|
+
local label = _binding.label
|
|
16
20
|
local size = _binding.size
|
|
17
21
|
if size == nil then
|
|
18
22
|
size = "medium"
|
|
19
23
|
end
|
|
24
|
+
local color = _binding.color
|
|
25
|
+
if color == nil then
|
|
26
|
+
color = "primary"
|
|
27
|
+
end
|
|
20
28
|
local disabled = _binding.disabled
|
|
21
29
|
local loading = _binding.loading
|
|
22
30
|
if loading == nil then
|
|
@@ -29,9 +37,12 @@ local function Fab(props)
|
|
|
29
37
|
local id = _binding.id
|
|
30
38
|
local ref = _binding.ref
|
|
31
39
|
local active = canActivate(disabled, loading)
|
|
40
|
+
local extended = fabExtended(label)
|
|
32
41
|
local styles = useFabStyles({
|
|
33
42
|
size = size,
|
|
43
|
+
color = color,
|
|
34
44
|
disabled = not active,
|
|
45
|
+
extended = extended,
|
|
35
46
|
})
|
|
36
47
|
local _binding_1 = useTheme()
|
|
37
48
|
local theme = _binding_1.theme
|
|
@@ -45,26 +56,52 @@ local function Fab(props)
|
|
|
45
56
|
setHovering(false)
|
|
46
57
|
setFocused(false)
|
|
47
58
|
end, { active })
|
|
48
|
-
local
|
|
59
|
+
local _result
|
|
60
|
+
if loading then
|
|
61
|
+
_result = (React.createElement(CircularProgress, {
|
|
62
|
+
size = iconPx,
|
|
63
|
+
thickness = 2,
|
|
64
|
+
color = theme.palette.primary.on,
|
|
65
|
+
reducedMotion = reducedMotion,
|
|
66
|
+
className = if extended then {
|
|
67
|
+
LayoutOrder = 1,
|
|
68
|
+
} else {
|
|
69
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
70
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
71
|
+
},
|
|
72
|
+
}))
|
|
73
|
+
else
|
|
74
|
+
local _attributes = {
|
|
75
|
+
key = "Icon",
|
|
76
|
+
}
|
|
77
|
+
for _k, _v in styles.icon do
|
|
78
|
+
_attributes[_k] = _v
|
|
79
|
+
end
|
|
80
|
+
_attributes.Size = UDim2.fromOffset(iconPx, iconPx)
|
|
81
|
+
_attributes.AnchorPoint = if extended then Vector2.new(0, 0) else Vector2.new(0.5, 0.5)
|
|
82
|
+
_attributes.Position = if extended then UDim2.fromScale(0, 0) else UDim2.fromScale(0.5, 0.5)
|
|
83
|
+
_attributes.Image = tostring(icon)
|
|
84
|
+
_result = (React.createElement("imagelabel", _attributes))
|
|
85
|
+
end
|
|
86
|
+
local iconEl = _result
|
|
87
|
+
local _attributes = {
|
|
88
|
+
tag = "textbutton",
|
|
89
|
+
}
|
|
49
90
|
local _condition = id
|
|
50
91
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
51
92
|
_condition = "Fab"
|
|
52
93
|
end
|
|
53
94
|
_attributes.key = _condition
|
|
54
|
-
_attributes.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
for _k, _v in sx do
|
|
65
|
-
_attributes[_k] = _v
|
|
66
|
-
end
|
|
67
|
-
end
|
|
95
|
+
_attributes.hostRef = ref
|
|
96
|
+
_attributes.base = styles.root
|
|
97
|
+
_attributes.className = className
|
|
98
|
+
_attributes.sx = sx
|
|
99
|
+
_attributes.state = {
|
|
100
|
+
disabled = disabled,
|
|
101
|
+
loading = loading,
|
|
102
|
+
hover = hovering,
|
|
103
|
+
focused = focused,
|
|
104
|
+
}
|
|
68
105
|
_attributes.Active = active
|
|
69
106
|
_attributes.Selectable = active
|
|
70
107
|
_attributes.BackgroundTransparency = if not active then 0.5 elseif hovering or focused then 0.15 else 0
|
|
@@ -95,32 +132,37 @@ local function Fab(props)
|
|
|
95
132
|
setmetatable(_attributes_1, nil)
|
|
96
133
|
local _exp = React.createElement("uicorner", _attributes_1)
|
|
97
134
|
local _exp_1 = React.createElement(Shadow)
|
|
98
|
-
local
|
|
99
|
-
if
|
|
100
|
-
_result = (React.createElement(CircularProgress, {
|
|
101
|
-
size = iconPx,
|
|
102
|
-
thickness = 2,
|
|
103
|
-
color = theme.palette.primary.on,
|
|
104
|
-
reducedMotion = reducedMotion,
|
|
105
|
-
className = {
|
|
106
|
-
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
107
|
-
Position = UDim2.fromScale(0.5, 0.5),
|
|
108
|
-
},
|
|
109
|
-
}))
|
|
110
|
-
else
|
|
135
|
+
local _result_1
|
|
136
|
+
if extended then
|
|
111
137
|
local _attributes_2 = {
|
|
112
|
-
key = "
|
|
138
|
+
key = "Content",
|
|
113
139
|
}
|
|
114
|
-
for _k, _v in styles.
|
|
140
|
+
for _k, _v in styles.content do
|
|
115
141
|
_attributes_2[_k] = _v
|
|
116
142
|
end
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
143
|
+
local _attributes_3 = table.clone(styles.padding)
|
|
144
|
+
setmetatable(_attributes_3, nil)
|
|
145
|
+
local _exp_2 = React.createElement("uipadding", _attributes_3)
|
|
146
|
+
local _attributes_4 = table.clone(styles.row)
|
|
147
|
+
setmetatable(_attributes_4, nil)
|
|
148
|
+
local _exp_3 = React.createElement("uilistlayout", _attributes_4)
|
|
149
|
+
local _exp_4 = iconEl
|
|
150
|
+
local _condition_1 = not loading
|
|
151
|
+
if _condition_1 then
|
|
152
|
+
local _attributes_5 = {
|
|
153
|
+
key = "Label",
|
|
154
|
+
}
|
|
155
|
+
for _k, _v in styles.label do
|
|
156
|
+
_attributes_5[_k] = _v
|
|
157
|
+
end
|
|
158
|
+
_attributes_5.Text = label
|
|
159
|
+
_condition_1 = React.createElement("textlabel", _attributes_5)
|
|
160
|
+
end
|
|
161
|
+
_result_1 = (React.createElement("frame", _attributes_2, _exp_2, _exp_3, _exp_4, _condition_1))
|
|
162
|
+
else
|
|
163
|
+
_result_1 = iconEl
|
|
122
164
|
end
|
|
123
|
-
return React.createElement(
|
|
165
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _result_1)
|
|
124
166
|
end
|
|
125
167
|
local default = Fab
|
|
126
168
|
return {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { FabSize } from "./fabSize";
|
|
2
|
+
export type FabColor = "primary" | "accent";
|
|
2
3
|
export interface FabStyleProps {
|
|
3
4
|
size?: FabSize;
|
|
5
|
+
color?: FabColor;
|
|
4
6
|
disabled?: boolean;
|
|
7
|
+
extended?: boolean;
|
|
5
8
|
}
|
|
6
9
|
declare const useFabStyles: (props: FabStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
7
10
|
export default useFabStyles;
|
|
@@ -9,12 +9,19 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
9
9
|
if size == nil then
|
|
10
10
|
size = "medium"
|
|
11
11
|
end
|
|
12
|
+
local color = _param.color
|
|
13
|
+
if color == nil then
|
|
14
|
+
color = "primary"
|
|
15
|
+
end
|
|
12
16
|
local disabled = _param.disabled
|
|
17
|
+
local extended = _param.extended
|
|
13
18
|
local diameter = fabPixels(size)
|
|
19
|
+
local tone = if color == "accent" then theme.palette.accent else theme.palette.primary
|
|
14
20
|
return createStyles({
|
|
15
21
|
root = {
|
|
16
|
-
Size = UDim2.fromOffset(diameter, diameter),
|
|
17
|
-
|
|
22
|
+
Size = if extended == true then UDim2.new(0, 0, 0, diameter) else UDim2.fromOffset(diameter, diameter),
|
|
23
|
+
AutomaticSize = if extended == true then Enum.AutomaticSize.X else Enum.AutomaticSize.None,
|
|
24
|
+
BackgroundColor3 = tone.main,
|
|
18
25
|
BackgroundTransparency = if disabled then 0.5 else 0,
|
|
19
26
|
BorderSizePixel = 0,
|
|
20
27
|
AutoButtonColor = false,
|
|
@@ -24,13 +31,42 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
24
31
|
corner = {
|
|
25
32
|
CornerRadius = UDim.new(1, 0),
|
|
26
33
|
},
|
|
34
|
+
content = {
|
|
35
|
+
Size = UDim2.new(0, 0, 0, diameter),
|
|
36
|
+
AutomaticSize = Enum.AutomaticSize.X,
|
|
37
|
+
BackgroundTransparency = 1,
|
|
38
|
+
BorderSizePixel = 0,
|
|
39
|
+
},
|
|
40
|
+
padding = {
|
|
41
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(2)),
|
|
42
|
+
PaddingRight = UDim.new(0, theme.padding.calc(2.5)),
|
|
43
|
+
},
|
|
44
|
+
row = {
|
|
45
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
46
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
47
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Center,
|
|
48
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
49
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
50
|
+
},
|
|
27
51
|
icon = {
|
|
28
52
|
Size = UDim2.fromScale(1, 1),
|
|
29
53
|
BackgroundTransparency = 1,
|
|
30
54
|
BorderSizePixel = 0,
|
|
31
55
|
ScaleType = Enum.ScaleType.Fit,
|
|
32
|
-
ImageColor3 =
|
|
56
|
+
ImageColor3 = tone.on,
|
|
33
57
|
ImageTransparency = if disabled then 0.5 else 0,
|
|
58
|
+
LayoutOrder = 1,
|
|
59
|
+
},
|
|
60
|
+
label = {
|
|
61
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
62
|
+
Size = UDim2.fromScale(0, 0),
|
|
63
|
+
BackgroundTransparency = 1,
|
|
64
|
+
BorderSizePixel = 0,
|
|
65
|
+
Font = theme.typography.fontFamilies.default,
|
|
66
|
+
TextSize = theme.typography.fontSizes.body,
|
|
67
|
+
TextColor3 = tone.on,
|
|
68
|
+
TextTransparency = if disabled then 0.5 else 0,
|
|
69
|
+
LayoutOrder = 2,
|
|
34
70
|
},
|
|
35
71
|
})
|
|
36
72
|
end)
|
|
@@ -5,4 +5,5 @@ exports.Fab = TS.import(script, script, "components", "Fab").default
|
|
|
5
5
|
local _fabSize = TS.import(script, script, "components", "fabSize")
|
|
6
6
|
exports.fabPixels = _fabSize.fabPixels
|
|
7
7
|
exports.fabIconPixels = _fabSize.fabIconPixels
|
|
8
|
+
exports.fabExtended = _fabSize.fabExtended
|
|
8
9
|
return exports
|
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local React = _react
|
|
5
5
|
local useState = _react.useState
|
|
6
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
7
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
7
8
|
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
8
9
|
local Select = TS.import(script, script.Parent.Parent.Parent, "select").Select
|
|
@@ -73,26 +74,21 @@ local function FontEditor(props)
|
|
|
73
74
|
local custom, setCustom = useState(value.Family)
|
|
74
75
|
local weights = enumOptions(Enum.FontWeight:GetEnumItems())
|
|
75
76
|
local stylesList = enumOptions(Enum.FontStyle:GetEnumItems())
|
|
76
|
-
local _attributes = {
|
|
77
|
+
local _attributes = {
|
|
78
|
+
tag = "frame",
|
|
79
|
+
}
|
|
77
80
|
local _condition = id
|
|
78
81
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
79
82
|
_condition = "FontEditor"
|
|
80
83
|
end
|
|
81
84
|
_attributes.key = _condition
|
|
82
|
-
_attributes.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
if sx then
|
|
92
|
-
for _k, _v in sx do
|
|
93
|
-
_attributes[_k] = _v
|
|
94
|
-
end
|
|
95
|
-
end
|
|
85
|
+
_attributes.hostRef = ref
|
|
86
|
+
_attributes.base = styles.root
|
|
87
|
+
_attributes.className = className
|
|
88
|
+
_attributes.sx = sx
|
|
89
|
+
_attributes.state = {
|
|
90
|
+
disabled = disabled,
|
|
91
|
+
}
|
|
96
92
|
local _attributes_1 = table.clone(styles.column)
|
|
97
93
|
setmetatable(_attributes_1, nil)
|
|
98
94
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -215,7 +211,7 @@ local function FontEditor(props)
|
|
|
215
211
|
local _exp_7 = React.createElement("uicorner", _attributes_10)
|
|
216
212
|
local _attributes_11 = table.clone(styles.stroke)
|
|
217
213
|
setmetatable(_attributes_11, nil)
|
|
218
|
-
return React.createElement(
|
|
214
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _exp_5, React.createElement("textlabel", _attributes_8, _exp_6, _exp_7, React.createElement("uistroke", _attributes_11)))
|
|
219
215
|
end
|
|
220
216
|
local default = FontEditor
|
|
221
217
|
return {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface FormHelperTextProps {
|
|
3
|
+
text: string;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function FormHelperText(props: CustomizedProps<TextLabel, FormHelperTextProps>): JSX.Element;
|
|
8
|
+
export default FormHelperText;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
|
+
local useFormTextStyles = TS.import(script, script.Parent, "FormText.styles").default
|
|
6
|
+
local function FormHelperText(props)
|
|
7
|
+
local _binding = props
|
|
8
|
+
local text = _binding.text
|
|
9
|
+
local hasError = _binding.hasError
|
|
10
|
+
local disabled = _binding.disabled
|
|
11
|
+
local className = _binding.className
|
|
12
|
+
local sx = _binding.sx
|
|
13
|
+
local id = _binding.id
|
|
14
|
+
local ref = _binding.ref
|
|
15
|
+
local styles = useFormTextStyles({
|
|
16
|
+
hasError = hasError,
|
|
17
|
+
disabled = disabled,
|
|
18
|
+
})
|
|
19
|
+
local _attributes = {
|
|
20
|
+
tag = "textlabel",
|
|
21
|
+
}
|
|
22
|
+
local _condition = id
|
|
23
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
24
|
+
_condition = "FormHelperText"
|
|
25
|
+
end
|
|
26
|
+
_attributes.key = _condition
|
|
27
|
+
_attributes.hostRef = ref
|
|
28
|
+
_attributes.base = styles.root
|
|
29
|
+
_attributes.className = className
|
|
30
|
+
_attributes.sx = sx
|
|
31
|
+
_attributes.state = {
|
|
32
|
+
disabled = disabled,
|
|
33
|
+
}
|
|
34
|
+
_attributes.Text = text
|
|
35
|
+
return React.createElement(SxHost, _attributes)
|
|
36
|
+
end
|
|
37
|
+
local default = FormHelperText
|
|
38
|
+
return {
|
|
39
|
+
default = default,
|
|
40
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface FormLabelProps {
|
|
3
|
+
text: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
hasError?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function FormLabel(props: CustomizedProps<TextLabel, FormLabelProps>): JSX.Element;
|
|
9
|
+
export default FormLabel;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
|
+
local useFormTextStyles = TS.import(script, script.Parent, "FormText.styles").default
|
|
6
|
+
local function FormLabel(props)
|
|
7
|
+
local _binding = props
|
|
8
|
+
local text = _binding.text
|
|
9
|
+
local required = _binding.required
|
|
10
|
+
local hasError = _binding.hasError
|
|
11
|
+
local disabled = _binding.disabled
|
|
12
|
+
local className = _binding.className
|
|
13
|
+
local sx = _binding.sx
|
|
14
|
+
local id = _binding.id
|
|
15
|
+
local ref = _binding.ref
|
|
16
|
+
local styles = useFormTextStyles({
|
|
17
|
+
hasError = hasError,
|
|
18
|
+
disabled = disabled,
|
|
19
|
+
})
|
|
20
|
+
local caption = if required == true then `{text} *` else text
|
|
21
|
+
local _attributes = {
|
|
22
|
+
tag = "textlabel",
|
|
23
|
+
}
|
|
24
|
+
local _condition = id
|
|
25
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
26
|
+
_condition = "FormLabel"
|
|
27
|
+
end
|
|
28
|
+
_attributes.key = _condition
|
|
29
|
+
_attributes.hostRef = ref
|
|
30
|
+
_attributes.base = styles.root
|
|
31
|
+
_attributes.className = className
|
|
32
|
+
_attributes.sx = sx
|
|
33
|
+
_attributes.state = {
|
|
34
|
+
disabled = disabled,
|
|
35
|
+
}
|
|
36
|
+
_attributes.Text = caption
|
|
37
|
+
return React.createElement(SxHost, _attributes)
|
|
38
|
+
end
|
|
39
|
+
local default = FormLabel
|
|
40
|
+
return {
|
|
41
|
+
default = default,
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local useFormTextStyles = componentStyles("FormText", function(theme, _param)
|
|
7
|
+
local hasError = _param.hasError
|
|
8
|
+
if hasError == nil then
|
|
9
|
+
hasError = false
|
|
10
|
+
end
|
|
11
|
+
local disabled = _param.disabled
|
|
12
|
+
if disabled == nil then
|
|
13
|
+
disabled = false
|
|
14
|
+
end
|
|
15
|
+
local color = if disabled then theme.palette.text.disabled elseif hasError then theme.palette.status.error.main else theme.palette.text.secondary
|
|
16
|
+
return createStyles({
|
|
17
|
+
root = {
|
|
18
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
19
|
+
Size = UDim2.fromScale(0, 0),
|
|
20
|
+
BackgroundTransparency = 1,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
TextColor3 = color,
|
|
23
|
+
Font = theme.typography.fontFamilies.default,
|
|
24
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
25
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
26
|
+
TextWrapped = true,
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
end)
|
|
30
|
+
local default = useFormTextStyles
|
|
31
|
+
return {
|
|
32
|
+
default = default,
|
|
33
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.FormLabel = TS.import(script, script, "components", "FormLabel").default
|
|
5
|
+
exports.FormHelperText = TS.import(script, script, "components", "FormHelperText").default
|
|
6
|
+
return exports
|