@rbxts/uiblox 0.2.0-alpha.36 → 0.2.0-alpha.38
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 +1 -18
- package/out/theme/constants/NumberConstants.d.ts +10 -0
- package/out/theme/constants/NumberConstants.luau +12 -0
- package/out/theme/interfaces/density/controlMetrics.luau +2 -2
- package/out/theme/interfaces/palette/Palette.d.ts +7 -0
- package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
- package/out/theme/interfaces/theme/Theme.d.ts +6 -0
- package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +3 -1
- package/out/theme/interfaces/typography/Variants.luau +25 -1
- package/out/theme/styles/utilities/focusRing.d.ts +7 -0
- package/out/theme/styles/utilities/focusRing.luau +14 -0
- package/out/theme/styles/utilities/index.d.ts +1 -0
- package/out/theme/styles/utilities/init.luau +3 -0
- package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
- package/out/theme/styles/utilities/resolveSx.luau +53 -12
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/theme/themes/createPalette.luau +15 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.luau +112 -32
- package/out/ui/packages/accordion/components/Accordion.styles.luau +70 -32
- package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
- package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +39 -12
- package/out/ui/packages/alert/components/Alert.styles.luau +44 -22
- package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
- package/out/ui/packages/alert/components/alertAction.luau +11 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
- package/out/ui/packages/appBar/components/AppBar.luau +88 -22
- package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -11
- package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
- package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +9 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +107 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +55 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
- package/out/ui/packages/avatarGroup/index.d.ts +3 -0
- package/out/ui/packages/avatarGroup/init.luau +6 -0
- package/out/ui/packages/badge/components/Badge.luau +14 -11
- package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +24 -3
- package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +21 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +10 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
- package/out/ui/packages/button/components/Button.d.ts +2 -0
- package/out/ui/packages/button/components/Button.luau +112 -36
- package/out/ui/packages/button/components/Button.styles.luau +2 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
- package/out/ui/packages/button/components/buttonLook.luau +11 -0
- package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
- package/out/ui/packages/button/components/buttonPaint.luau +70 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +14 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +117 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
- package/out/ui/packages/buttonGroup/index.d.ts +3 -0
- package/out/ui/packages/buttonGroup/init.luau +6 -0
- package/out/ui/packages/card/components/Card.d.ts +1 -0
- package/out/ui/packages/card/components/Card.luau +21 -2
- package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
- package/out/ui/packages/card/components/Card.styles.luau +20 -9
- package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
- package/out/ui/packages/card/components/cardWidth.luau +36 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +18 -5
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -32
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +7 -5
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
- package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
- package/out/ui/packages/chip/components/Chip.luau +16 -14
- package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
- package/out/ui/packages/chip/components/Chip.styles.luau +15 -9
- package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
- package/out/ui/packages/chip/components/chipTone.luau +11 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
- package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
- package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
- package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
- package/out/ui/packages/codeEditor/index.d.ts +2 -0
- package/out/ui/packages/codeEditor/init.luau +5 -0
- package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
- package/out/ui/packages/collapse/components/Collapse.luau +34 -0
- package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
- package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
- package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
- package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
- package/out/ui/packages/collapse/index.d.ts +3 -0
- package/out/ui/packages/collapse/init.luau +6 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
- package/out/ui/packages/colorPicker/index.d.ts +1 -1
- package/out/ui/packages/colorPicker/init.luau +2 -0
- package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
- package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
- package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
- package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
- package/out/ui/packages/copyButton/index.d.ts +3 -0
- package/out/ui/packages/copyButton/init.luau +6 -0
- package/out/ui/packages/cover/components/Cover.d.ts +8 -0
- package/out/ui/packages/cover/components/Cover.luau +47 -0
- package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
- package/out/ui/packages/cover/components/coverFill.luau +14 -0
- package/out/ui/packages/cover/index.d.ts +3 -0
- package/out/ui/packages/cover/init.luau +6 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +186 -95
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
- package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
- package/out/ui/packages/dateRange/index.d.ts +1 -1
- package/out/ui/packages/dateRange/init.luau +3 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
- package/out/ui/packages/dialog/components/Dialog.luau +55 -6
- package/out/ui/packages/dialog/components/Dialog.styles.luau +9 -5
- package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
- package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
- package/out/ui/packages/divider/components/Divider.luau +60 -13
- package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +2 -0
- package/out/ui/packages/drawer/components/Drawer.luau +51 -7
- package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +15 -1
- package/out/ui/packages/drawer/components/drawerPlacement.luau +46 -0
- package/out/ui/packages/editorFace.d.ts +22 -0
- package/out/ui/packages/editorFace.luau +49 -0
- package/out/ui/packages/fab/components/Fab.luau +19 -6
- package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
- package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
- package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
- package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
- package/out/ui/packages/icon/components/Icon.d.ts +6 -2
- package/out/ui/packages/icon/components/Icon.luau +23 -3
- package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
- package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
- package/out/ui/packages/icon/components/glyphs.luau +64 -0
- package/out/ui/packages/icon/index.d.ts +1 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +6 -1
- package/out/ui/packages/iconButton/components/IconButton.luau +112 -11
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
- package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
- package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
- package/out/ui/packages/iconButton/components/transportGlyph.d.ts +10 -0
- package/out/ui/packages/iconButton/components/transportGlyph.luau +77 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
- package/out/ui/packages/imageList/components/ImageList.luau +28 -7
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +17 -10
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +8 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +36 -0
- package/out/ui/packages/index.d.ts +12 -0
- package/out/ui/packages/init.luau +36 -0
- package/out/ui/packages/input/components/Input.d.ts +4 -0
- package/out/ui/packages/input/components/Input.luau +74 -37
- package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
- package/out/ui/packages/input/components/Input.styles.luau +45 -18
- package/out/ui/packages/input/components/clampText.d.ts +2 -0
- package/out/ui/packages/input/components/clampText.luau +16 -0
- package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
- package/out/ui/packages/input/components/fieldChrome.luau +11 -0
- package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
- package/out/ui/packages/input/components/multilineHeight.luau +11 -0
- package/out/ui/packages/layout/components/Box.luau +92 -13
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
- package/out/ui/packages/layout/components/Box.styles.luau +0 -9
- package/out/ui/packages/layout/components/Grid.luau +81 -16
- package/out/ui/packages/layout/components/Pad.d.ts +24 -0
- package/out/ui/packages/layout/components/Pad.luau +88 -0
- package/out/ui/packages/layout/components/Stack.luau +79 -13
- package/out/ui/packages/link/components/Link.luau +17 -7
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
- package/out/ui/packages/link/components/Link.styles.luau +3 -5
- package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
- package/out/ui/packages/listItem/components/ListItem.luau +155 -40
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +4 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +70 -31
- package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
- package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
- package/out/ui/packages/listItem/components/listItemLayout.d.ts +22 -0
- package/out/ui/packages/listItem/components/listItemLayout.luau +68 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +244 -46
- package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -51
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
- package/out/ui/packages/markdown/index.d.ts +2 -2
- package/out/ui/packages/markdown/init.luau +2 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +30 -2
- package/out/ui/packages/markdown/parseMarkdown.luau +453 -25
- package/out/ui/packages/menu/components/Menu.d.ts +4 -1
- package/out/ui/packages/menu/components/Menu.luau +76 -28
- package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
- package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
- package/out/ui/packages/menu/components/menuIcon.luau +32 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +82 -1
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
- package/out/ui/packages/pager/components/Pager.d.ts +11 -0
- package/out/ui/packages/pager/components/Pager.luau +114 -0
- package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
- package/out/ui/packages/pager/components/Pager.styles.luau +66 -0
- package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
- package/out/ui/packages/pager/components/pagerStep.luau +24 -0
- package/out/ui/packages/pager/index.d.ts +3 -0
- package/out/ui/packages/pager/init.luau +9 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
- package/out/ui/packages/paper/components/Paper.luau +17 -11
- package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +14 -1
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
- package/out/ui/packages/popover/components/Popover.d.ts +12 -0
- package/out/ui/packages/popover/components/Popover.luau +52 -0
- package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
- package/out/ui/packages/popover/components/Popover.styles.luau +32 -0
- package/out/ui/packages/popover/index.d.ts +2 -0
- package/out/ui/packages/popover/init.luau +5 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -0
- package/out/ui/packages/popup/components/Popup.luau +64 -2
- package/out/ui/packages/popup/components/placement.luau +6 -4
- package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +53 -9
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
- package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
- package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
- package/out/ui/packages/radioGroup/index.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.luau +48 -4
- package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
- package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
- package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
- package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
- package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
- package/out/ui/packages/select/components/Select.d.ts +2 -0
- package/out/ui/packages/select/components/Select.luau +164 -105
- package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
- package/out/ui/packages/select/components/Select.styles.luau +30 -9
- package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
- package/out/ui/packages/select/components/selectWidth.luau +15 -0
- package/out/ui/packages/shadow/components/Shadow.luau +202 -21
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
- package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
- package/out/ui/packages/slider/components/RangeSlider.luau +232 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
- package/out/ui/packages/slider/components/Slider.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.luau +53 -25
- package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
- package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
- package/out/ui/packages/slider/components/rangeValue.luau +77 -0
- package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
- package/out/ui/packages/slider/index.d.ts +3 -0
- package/out/ui/packages/slider/init.luau +6 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
- package/out/ui/packages/sparkline/components/Sparkline.luau +72 -8
- package/out/ui/packages/sparkline/index.d.ts +1 -1
- package/out/ui/packages/sparkline/init.luau +6 -1
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
- package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +59 -9
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +50 -3
- package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
- package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +1 -0
- package/out/ui/packages/stateMatrix.luau +9 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.luau +35 -7
- package/out/ui/packages/stepper/components/Stepper.styles.luau +12 -6
- package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
- package/out/ui/packages/stepper/components/stepState.luau +12 -1
- package/out/ui/packages/stepper/index.d.ts +1 -1
- package/out/ui/packages/stepper/init.luau +3 -1
- package/out/ui/packages/switch/components/Switch.luau +2 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
- package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
- package/out/ui/packages/switch/components/switchLook.luau +4 -10
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +99 -57
- package/out/ui/packages/table/components/Table.styles.luau +23 -6
- package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
- package/out/ui/packages/table/components/tableColumns.luau +2 -0
- package/out/ui/packages/table/components/tableSort.d.ts +2 -0
- package/out/ui/packages/table/components/tableSort.luau +95 -0
- package/out/ui/packages/table/index.d.ts +1 -0
- package/out/ui/packages/table/init.luau +1 -0
- package/out/ui/packages/tabs/components/Tabs.luau +77 -6
- package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
- package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
- package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
- package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
- package/out/ui/packages/text/components/Text.d.ts +9 -0
- package/out/ui/packages/text/components/Text.luau +64 -0
- package/out/ui/packages/text/components/textBox.d.ts +12 -0
- package/out/ui/packages/text/components/textBox.luau +21 -0
- package/out/ui/packages/text/index.d.ts +2 -0
- package/out/ui/packages/text/init.luau +5 -0
- package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
- package/out/ui/packages/timeField/components/TimeField.luau +106 -0
- package/out/ui/packages/timeField/index.d.ts +4 -0
- package/out/ui/packages/timeField/init.luau +9 -0
- package/out/ui/packages/timeField/timeValue.d.ts +8 -0
- package/out/ui/packages/timeField/timeValue.luau +49 -0
- package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
- package/out/ui/packages/timeline/components/Timeline.luau +102 -0
- package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
- package/out/ui/packages/timeline/components/Timeline.styles.luau +115 -0
- package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
- package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
- package/out/ui/packages/timeline/index.d.ts +3 -0
- package/out/ui/packages/timeline/init.luau +8 -0
- package/out/ui/packages/toast/components/Toast.d.ts +1 -0
- package/out/ui/packages/toast/components/Toast.luau +200 -57
- package/out/ui/packages/toast/components/Toast.styles.luau +40 -20
- package/out/ui/packages/toast/components/toastPlace.d.ts +16 -0
- package/out/ui/packages/toast/components/toastPlace.luau +44 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
- package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +31 -1
- package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
- package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
- package/out/ui/packages/treeView/components/TreeView.luau +12 -13
- package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
- package/out/ui/packages/typography/components/Typography.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +8 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +18 -3
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
- package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
- package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
- package/out/ui/packages/weekGrid/index.d.ts +3 -0
- package/out/ui/packages/weekGrid/init.luau +8 -0
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
5
5
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
+
local appBarSubtitle = TS.import(script, script.Parent, "appBarSubtitle").appBarSubtitle
|
|
6
7
|
local useAppBarStyles = TS.import(script, script.Parent, "AppBar.styles").default
|
|
7
8
|
local function AppBar(props)
|
|
8
9
|
local _binding = props
|
|
@@ -10,6 +11,7 @@ local function AppBar(props)
|
|
|
10
11
|
if title == nil then
|
|
11
12
|
title = ""
|
|
12
13
|
end
|
|
14
|
+
local subtitle = _binding.subtitle
|
|
13
15
|
local elevation = _binding.elevation
|
|
14
16
|
if elevation == nil then
|
|
15
17
|
elevation = "raised"
|
|
@@ -29,40 +31,104 @@ local function AppBar(props)
|
|
|
29
31
|
color = color,
|
|
30
32
|
hasActions = hasActions,
|
|
31
33
|
})
|
|
32
|
-
local
|
|
33
|
-
|
|
34
|
+
local line = appBarSubtitle(subtitle)
|
|
35
|
+
local _result
|
|
36
|
+
if line == nil then
|
|
37
|
+
local _condition = title ~= ""
|
|
38
|
+
if _condition then
|
|
39
|
+
local _attributes = {
|
|
40
|
+
key = "Title",
|
|
41
|
+
}
|
|
42
|
+
for _k, _v in styles.title do
|
|
43
|
+
_attributes[_k] = _v
|
|
44
|
+
end
|
|
45
|
+
_attributes.Text = title
|
|
46
|
+
_condition = (React.createElement("textlabel", _attributes, hasActions and React.createElement("uiflexitem", {
|
|
47
|
+
key = "Flex",
|
|
48
|
+
FlexMode = Enum.UIFlexMode.Fill,
|
|
49
|
+
})))
|
|
50
|
+
end
|
|
51
|
+
_result = _condition
|
|
52
|
+
else
|
|
34
53
|
local _attributes = {
|
|
35
|
-
key = "
|
|
54
|
+
key = "Titles",
|
|
36
55
|
}
|
|
37
|
-
for _k, _v in styles.
|
|
56
|
+
for _k, _v in styles.titles do
|
|
38
57
|
_attributes[_k] = _v
|
|
39
58
|
end
|
|
40
|
-
|
|
41
|
-
|
|
59
|
+
local _exp = hasActions and React.createElement("uiflexitem", {
|
|
60
|
+
key = "Flex",
|
|
61
|
+
FlexMode = Enum.UIFlexMode.Fill,
|
|
62
|
+
})
|
|
63
|
+
local _exp_1 = React.createElement("uilistlayout", {
|
|
64
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
65
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
66
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
67
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
68
|
+
Padding = UDim.new(0, 0),
|
|
69
|
+
})
|
|
70
|
+
local _condition = title ~= ""
|
|
71
|
+
if _condition then
|
|
72
|
+
local _attributes_1 = {
|
|
73
|
+
key = "Title",
|
|
74
|
+
}
|
|
75
|
+
for _k, _v in styles.title do
|
|
76
|
+
_attributes_1[_k] = _v
|
|
77
|
+
end
|
|
78
|
+
_attributes_1.Size = UDim2.new(1, 0, 0, 0)
|
|
79
|
+
_attributes_1.AutomaticSize = Enum.AutomaticSize.Y
|
|
80
|
+
_attributes_1.TextWrapped = true
|
|
81
|
+
_attributes_1.TextTruncate = Enum.TextTruncate.None
|
|
82
|
+
_attributes_1.Text = title
|
|
83
|
+
_attributes_1.LayoutOrder = 1
|
|
84
|
+
_condition = (React.createElement("textlabel", _attributes_1))
|
|
85
|
+
end
|
|
86
|
+
local _attributes_1 = {
|
|
87
|
+
key = "Subtitle",
|
|
88
|
+
}
|
|
89
|
+
for _k, _v in styles.subtitle do
|
|
90
|
+
_attributes_1[_k] = _v
|
|
91
|
+
end
|
|
92
|
+
_attributes_1.Text = line
|
|
93
|
+
_attributes_1.LayoutOrder = 2
|
|
94
|
+
_result = (React.createElement("frame", _attributes, _exp, _exp_1, _condition, React.createElement("textlabel", _attributes_1)))
|
|
42
95
|
end
|
|
43
|
-
local titleLabel =
|
|
96
|
+
local titleLabel = _result
|
|
44
97
|
local _attributes = {
|
|
45
98
|
tag = "frame",
|
|
46
99
|
}
|
|
47
|
-
local
|
|
48
|
-
if not (
|
|
49
|
-
|
|
100
|
+
local _condition = id
|
|
101
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
102
|
+
_condition = "AppBar"
|
|
50
103
|
end
|
|
51
|
-
_attributes.key =
|
|
104
|
+
_attributes.key = _condition
|
|
52
105
|
_attributes.hostRef = ref
|
|
53
106
|
_attributes.base = styles.root
|
|
54
107
|
_attributes.className = className
|
|
55
108
|
_attributes.sx = sx
|
|
56
|
-
local
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
109
|
+
local _exp = elevation == "raised" and React.createElement(Shadow)
|
|
110
|
+
local _condition_1 = elevation == "flat" and color == "default"
|
|
111
|
+
if _condition_1 then
|
|
112
|
+
local _attributes_1 = {
|
|
113
|
+
key = "Divider",
|
|
114
|
+
}
|
|
115
|
+
for _k, _v in styles.divider do
|
|
116
|
+
_attributes_1[_k] = _v
|
|
117
|
+
end
|
|
118
|
+
_condition_1 = React.createElement("frame", _attributes_1)
|
|
119
|
+
end
|
|
120
|
+
local _attributes_1 = {
|
|
121
|
+
key = "Inset",
|
|
122
|
+
}
|
|
123
|
+
for _k, _v in styles.inset do
|
|
124
|
+
_attributes_1[_k] = _v
|
|
125
|
+
end
|
|
126
|
+
local _result_1
|
|
61
127
|
if hasActions then
|
|
62
128
|
local _attributes_2 = table.clone(styles.row)
|
|
63
129
|
setmetatable(_attributes_2, nil)
|
|
64
|
-
local
|
|
65
|
-
local
|
|
130
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
131
|
+
local _exp_2 = titleLabel
|
|
66
132
|
local _attributes_3 = {
|
|
67
133
|
key = "Actions",
|
|
68
134
|
}
|
|
@@ -71,16 +137,16 @@ local function AppBar(props)
|
|
|
71
137
|
end
|
|
72
138
|
local _attributes_4 = table.clone(styles.actionsLayout)
|
|
73
139
|
setmetatable(_attributes_4, nil)
|
|
74
|
-
|
|
140
|
+
_result_1 = (React.createElement("frame", {
|
|
75
141
|
key = "Row",
|
|
76
142
|
Size = UDim2.fromScale(1, 1),
|
|
77
143
|
BackgroundTransparency = 1,
|
|
78
144
|
BorderSizePixel = 0,
|
|
79
|
-
},
|
|
145
|
+
}, _exp_1, _exp_2, React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), children)))
|
|
80
146
|
else
|
|
81
|
-
|
|
147
|
+
_result_1 = titleLabel
|
|
82
148
|
end
|
|
83
|
-
return React.createElement(SxHost, _attributes, _exp,
|
|
149
|
+
return React.createElement(SxHost, _attributes, _exp, _condition_1, React.createElement("frame", _attributes_1, _result_1))
|
|
84
150
|
end
|
|
85
151
|
local default = AppBar
|
|
86
152
|
return {
|
|
@@ -16,6 +16,8 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
|
|
|
16
16
|
if hasActions == nil then
|
|
17
17
|
hasActions = false
|
|
18
18
|
end
|
|
19
|
+
local heading = theme.typography.variants.h6
|
|
20
|
+
local pad = theme.padding.calc(2)
|
|
19
21
|
local _object = {
|
|
20
22
|
root = {
|
|
21
23
|
Size = UDim2.new(1, 0, 0, theme.spacing.calc(7)),
|
|
@@ -23,9 +25,18 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
|
|
|
23
25
|
BorderSizePixel = 0,
|
|
24
26
|
ZIndex = 11000,
|
|
25
27
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
divider = {
|
|
29
|
+
AnchorPoint = Vector2.new(0, 1),
|
|
30
|
+
Position = UDim2.fromScale(0, 1),
|
|
31
|
+
Size = UDim2.new(1, 0, 0, 1),
|
|
32
|
+
BackgroundColor3 = theme.palette.border,
|
|
33
|
+
BorderSizePixel = 0,
|
|
34
|
+
},
|
|
35
|
+
inset = {
|
|
36
|
+
Position = UDim2.new(0, pad, 0, 0),
|
|
37
|
+
Size = UDim2.new(1, -(pad * 2), 1, 0),
|
|
38
|
+
BackgroundTransparency = 1,
|
|
39
|
+
BorderSizePixel = 0,
|
|
29
40
|
},
|
|
30
41
|
row = {
|
|
31
42
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
@@ -33,26 +44,45 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
|
|
|
33
44
|
HorizontalFlex = Enum.UIFlexAlignment.SpaceBetween,
|
|
34
45
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
35
46
|
},
|
|
47
|
+
title = {
|
|
48
|
+
LayoutOrder = 1,
|
|
49
|
+
AutomaticSize = Enum.AutomaticSize.None,
|
|
50
|
+
Size = if hasActions then UDim2.new(0, 0, 1, 0) else UDim2.new(1, 0, 1, 0),
|
|
51
|
+
BackgroundTransparency = 1,
|
|
52
|
+
BorderSizePixel = 0,
|
|
53
|
+
Font = theme.typography.fontFamilies[heading.family],
|
|
54
|
+
TextSize = heading.size,
|
|
55
|
+
LineHeight = heading.leading,
|
|
56
|
+
TextColor3 = if color == "primary" then theme.palette.primary.on else theme.palette.text.primary,
|
|
57
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
58
|
+
TextYAlignment = Enum.TextYAlignment.Center,
|
|
59
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
60
|
+
},
|
|
61
|
+
titles = {
|
|
62
|
+
LayoutOrder = 1,
|
|
63
|
+
AutomaticSize = if hasActions then Enum.AutomaticSize.None else Enum.AutomaticSize.Y,
|
|
64
|
+
Size = if hasActions then UDim2.new(0, 0, 1, 0) else UDim2.new(1, 0, 1, 0),
|
|
65
|
+
BackgroundTransparency = 1,
|
|
66
|
+
BorderSizePixel = 0,
|
|
67
|
+
},
|
|
36
68
|
}
|
|
37
|
-
local _left = "
|
|
69
|
+
local _left = "subtitle"
|
|
38
70
|
local _object_1 = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
71
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
72
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
73
|
+
TextWrapped = true,
|
|
42
74
|
BackgroundTransparency = 1,
|
|
43
75
|
BorderSizePixel = 0,
|
|
44
76
|
Font = theme.typography.fontFamilies.default,
|
|
45
77
|
}
|
|
46
78
|
local _left_1 = "TextSize"
|
|
47
|
-
local _condition = theme.typography.fontSizes.
|
|
79
|
+
local _condition = theme.typography.fontSizes.caption
|
|
48
80
|
if _condition == nil then
|
|
49
81
|
_condition = theme.typography.fontSizes.body
|
|
50
82
|
end
|
|
51
83
|
_object_1[_left_1] = _condition
|
|
52
|
-
_object_1.TextColor3 = if color == "primary" then theme.palette.primary.on else theme.palette.text.
|
|
84
|
+
_object_1.TextColor3 = if color == "primary" then theme.palette.primary.on else theme.palette.text.secondary
|
|
53
85
|
_object_1.TextXAlignment = Enum.TextXAlignment.Left
|
|
54
|
-
_object_1.TextYAlignment = Enum.TextYAlignment.Center
|
|
55
|
-
_object_1.TextTruncate = Enum.TextTruncate.AtEnd
|
|
56
86
|
_object[_left] = _object_1
|
|
57
87
|
_object.actions = {
|
|
58
88
|
LayoutOrder = 2,
|
|
@@ -19,6 +19,8 @@ local function Autocomplete(props)
|
|
|
19
19
|
local empty = _binding.empty
|
|
20
20
|
local reducedMotion = _binding.reducedMotion
|
|
21
21
|
local size = _binding.size
|
|
22
|
+
local hasError = _binding.hasError
|
|
23
|
+
local helperText = _binding.helperText
|
|
22
24
|
local className = _binding.className
|
|
23
25
|
local sx = _binding.sx
|
|
24
26
|
local id = _binding.id
|
|
@@ -38,6 +40,8 @@ local function Autocomplete(props)
|
|
|
38
40
|
empty = empty,
|
|
39
41
|
reducedMotion = reducedMotion,
|
|
40
42
|
size = size,
|
|
43
|
+
hasError = hasError,
|
|
44
|
+
helperText = helperText,
|
|
41
45
|
className = className,
|
|
42
46
|
sx = sx,
|
|
43
47
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
1
2
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
3
|
import { AvatarVariant } from "./Avatar.styles";
|
|
3
4
|
export interface AvatarProps {
|
|
@@ -5,6 +6,7 @@ export interface AvatarProps {
|
|
|
5
6
|
image?: string;
|
|
6
7
|
size?: number;
|
|
7
8
|
variant?: AvatarVariant;
|
|
9
|
+
children?: React.ReactNode;
|
|
8
10
|
}
|
|
9
11
|
declare function Avatar(props: CustomizedProps<Frame, AvatarProps>): JSX.Element;
|
|
10
12
|
export default Avatar;
|
|
@@ -16,6 +16,7 @@ local function Avatar(props)
|
|
|
16
16
|
if variant == nil then
|
|
17
17
|
variant = "circular"
|
|
18
18
|
end
|
|
19
|
+
local children = _binding.children
|
|
19
20
|
local className = _binding.className
|
|
20
21
|
local sx = _binding.sx
|
|
21
22
|
local id = _binding.id
|
|
@@ -51,7 +52,13 @@ local function Avatar(props)
|
|
|
51
52
|
_attributes_1[_k] = _v
|
|
52
53
|
end
|
|
53
54
|
_attributes_1.Image = image
|
|
54
|
-
|
|
55
|
+
local _condition_2 = variant ~= "square"
|
|
56
|
+
if _condition_2 then
|
|
57
|
+
local _attributes_2 = table.clone(styles.corner)
|
|
58
|
+
setmetatable(_attributes_2, nil)
|
|
59
|
+
_condition_2 = React.createElement("uicorner", _attributes_2)
|
|
60
|
+
end
|
|
61
|
+
_result = (React.createElement("imagelabel", _attributes_1, _condition_2))
|
|
55
62
|
else
|
|
56
63
|
local _attributes_1 = {
|
|
57
64
|
key = "Initials",
|
|
@@ -62,7 +69,7 @@ local function Avatar(props)
|
|
|
62
69
|
_attributes_1.Text = avatarInitials(name)
|
|
63
70
|
_result = (React.createElement("textlabel", _attributes_1))
|
|
64
71
|
end
|
|
65
|
-
return React.createElement(SxHost, _attributes, _condition_1, _result)
|
|
72
|
+
return React.createElement(SxHost, _attributes, _condition_1, _result, children)
|
|
66
73
|
end
|
|
67
74
|
local default = Avatar
|
|
68
75
|
return {
|
|
@@ -20,17 +20,24 @@ local useAvatarStyles = componentStyles("Avatar", function(theme, _param)
|
|
|
20
20
|
ClipsDescendants = true,
|
|
21
21
|
},
|
|
22
22
|
image = {
|
|
23
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
24
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
23
25
|
Size = UDim2.fromScale(1, 1),
|
|
24
26
|
BackgroundTransparency = 1,
|
|
25
27
|
BorderSizePixel = 0,
|
|
28
|
+
ScaleType = Enum.ScaleType.Crop,
|
|
26
29
|
},
|
|
27
30
|
text = {
|
|
31
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
32
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
28
33
|
Size = UDim2.fromScale(1, 1),
|
|
29
34
|
BackgroundTransparency = 1,
|
|
30
35
|
BorderSizePixel = 0,
|
|
31
36
|
Font = theme.typography.fontFamilies.default,
|
|
32
37
|
TextSize = math.max(12, size * 0.4),
|
|
33
38
|
TextColor3 = theme.palette.primary.on,
|
|
39
|
+
TextXAlignment = Enum.TextXAlignment.Center,
|
|
40
|
+
TextYAlignment = Enum.TextYAlignment.Center,
|
|
34
41
|
},
|
|
35
42
|
corner = {
|
|
36
43
|
CornerRadius = if variant == "rounded" then UDim.new(0, theme.shape.borderRadius) else UDim.new(1, 0),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { AvatarVariant } from "../../avatar/components/Avatar.styles";
|
|
3
|
+
export interface AvatarGroupEntry {
|
|
4
|
+
name?: string;
|
|
5
|
+
image?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AvatarGroupProps {
|
|
8
|
+
items: AvatarGroupEntry[];
|
|
9
|
+
max?: number;
|
|
10
|
+
size?: number;
|
|
11
|
+
variant?: AvatarVariant;
|
|
12
|
+
}
|
|
13
|
+
declare function AvatarGroup(props: CustomizedProps<Frame, AvatarGroupProps>): JSX.Element;
|
|
14
|
+
export default AvatarGroup;
|
|
@@ -0,0 +1,107 @@
|
|
|
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 Avatar = TS.import(script, script.Parent.Parent.Parent, "avatar").Avatar
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
+
local avatarGroupCut = TS.import(script, script.Parent, "avatarGroupCut").avatarGroupCut
|
|
7
|
+
local useAvatarGroupStyles = TS.import(script, script.Parent, "AvatarGroup.styles").default
|
|
8
|
+
local function AvatarGroup(props)
|
|
9
|
+
local _binding = props
|
|
10
|
+
local items = _binding.items
|
|
11
|
+
local max = _binding.max
|
|
12
|
+
local size = _binding.size
|
|
13
|
+
if size == nil then
|
|
14
|
+
size = 40
|
|
15
|
+
end
|
|
16
|
+
local variant = _binding.variant
|
|
17
|
+
if variant == nil then
|
|
18
|
+
variant = "circular"
|
|
19
|
+
end
|
|
20
|
+
local className = _binding.className
|
|
21
|
+
local sx = _binding.sx
|
|
22
|
+
local id = _binding.id
|
|
23
|
+
local ref = _binding.ref
|
|
24
|
+
local styles = useAvatarGroupStyles({
|
|
25
|
+
size = size,
|
|
26
|
+
variant = variant,
|
|
27
|
+
})
|
|
28
|
+
local count = #items
|
|
29
|
+
local shown = avatarGroupCut(count, max)
|
|
30
|
+
local extra = count - shown
|
|
31
|
+
local _attributes = {
|
|
32
|
+
tag = "frame",
|
|
33
|
+
}
|
|
34
|
+
local _condition = id
|
|
35
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
36
|
+
_condition = "AvatarGroup"
|
|
37
|
+
end
|
|
38
|
+
_attributes.key = _condition
|
|
39
|
+
_attributes.hostRef = ref
|
|
40
|
+
_attributes.base = styles.root
|
|
41
|
+
_attributes.className = className
|
|
42
|
+
_attributes.sx = sx
|
|
43
|
+
local _attributes_1 = table.clone(styles.list)
|
|
44
|
+
setmetatable(_attributes_1, nil)
|
|
45
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
46
|
+
-- ▼ ReadonlyArray.map ▼
|
|
47
|
+
local _newValue = table.create(#items)
|
|
48
|
+
local _callback = function(entry, index)
|
|
49
|
+
if index >= shown then
|
|
50
|
+
return nil
|
|
51
|
+
end
|
|
52
|
+
local _attributes_2 = {}
|
|
53
|
+
local _condition_1 = entry.name
|
|
54
|
+
if _condition_1 == nil then
|
|
55
|
+
_condition_1 = "face"
|
|
56
|
+
end
|
|
57
|
+
_attributes_2.key = `{_condition_1}-{index}`
|
|
58
|
+
_attributes_2.name = entry.name
|
|
59
|
+
_attributes_2.image = entry.image
|
|
60
|
+
_attributes_2.size = size
|
|
61
|
+
_attributes_2.variant = variant
|
|
62
|
+
_attributes_2.className = {
|
|
63
|
+
LayoutOrder = index,
|
|
64
|
+
ZIndex = index + 1,
|
|
65
|
+
}
|
|
66
|
+
local _attributes_3 = table.clone(styles.ring)
|
|
67
|
+
setmetatable(_attributes_3, nil)
|
|
68
|
+
return React.createElement(Avatar, _attributes_2, React.createElement("uistroke", _attributes_3))
|
|
69
|
+
end
|
|
70
|
+
for _k, _v in items do
|
|
71
|
+
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
72
|
+
end
|
|
73
|
+
-- ▲ ReadonlyArray.map ▲
|
|
74
|
+
local _result
|
|
75
|
+
if extra > 0 then
|
|
76
|
+
local _attributes_2 = {
|
|
77
|
+
key = "Extra",
|
|
78
|
+
}
|
|
79
|
+
for _k, _v in styles.surplus do
|
|
80
|
+
_attributes_2[_k] = _v
|
|
81
|
+
end
|
|
82
|
+
_attributes_2.LayoutOrder = shown
|
|
83
|
+
_attributes_2.ZIndex = shown + 1
|
|
84
|
+
local _result_1
|
|
85
|
+
if variant ~= "square" then
|
|
86
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
87
|
+
setmetatable(_attributes_3, nil)
|
|
88
|
+
_result_1 = React.createElement("uicorner", _attributes_3)
|
|
89
|
+
else
|
|
90
|
+
_result_1 = nil
|
|
91
|
+
end
|
|
92
|
+
local _attributes_3 = table.clone(styles.ring)
|
|
93
|
+
setmetatable(_attributes_3, nil)
|
|
94
|
+
local _exp_1 = React.createElement("uistroke", _attributes_3)
|
|
95
|
+
local _attributes_4 = table.clone(styles.surplusText)
|
|
96
|
+
setmetatable(_attributes_4, nil)
|
|
97
|
+
_attributes_4.Text = `+{extra}`
|
|
98
|
+
_result = (React.createElement("frame", _attributes_2, _result_1, _exp_1, React.createElement("textlabel", _attributes_4)))
|
|
99
|
+
else
|
|
100
|
+
_result = nil
|
|
101
|
+
end
|
|
102
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue, _result))
|
|
103
|
+
end
|
|
104
|
+
local default = AvatarGroup
|
|
105
|
+
return {
|
|
106
|
+
default = default,
|
|
107
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 useAvatarGroupStyles = componentStyles("AvatarGroup", function(theme, _param)
|
|
7
|
+
local size = _param.size
|
|
8
|
+
if size == nil then
|
|
9
|
+
size = 40
|
|
10
|
+
end
|
|
11
|
+
local variant = _param.variant
|
|
12
|
+
if variant == nil then
|
|
13
|
+
variant = "circular"
|
|
14
|
+
end
|
|
15
|
+
local overlap = math.max(theme.padding.calc(1), math.floor(size / 5))
|
|
16
|
+
return createStyles({
|
|
17
|
+
root = {
|
|
18
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
19
|
+
Size = UDim2.fromScale(0, 0),
|
|
20
|
+
BackgroundTransparency = 1,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
},
|
|
23
|
+
list = {
|
|
24
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
25
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
26
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
27
|
+
Padding = UDim.new(0, -overlap),
|
|
28
|
+
},
|
|
29
|
+
surplus = {
|
|
30
|
+
Size = UDim2.fromOffset(size, size),
|
|
31
|
+
BackgroundColor3 = theme.palette.surface.elevated,
|
|
32
|
+
BorderSizePixel = 0,
|
|
33
|
+
},
|
|
34
|
+
surplusText = {
|
|
35
|
+
Size = UDim2.fromScale(1, 1),
|
|
36
|
+
BackgroundTransparency = 1,
|
|
37
|
+
BorderSizePixel = 0,
|
|
38
|
+
Font = theme.typography.fontFamilies.default,
|
|
39
|
+
TextSize = math.max(12, size * 0.35),
|
|
40
|
+
TextColor3 = theme.palette.text.primary,
|
|
41
|
+
},
|
|
42
|
+
ring = {
|
|
43
|
+
Color = theme.palette.surface.canvas,
|
|
44
|
+
Thickness = 2,
|
|
45
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
46
|
+
},
|
|
47
|
+
corner = {
|
|
48
|
+
CornerRadius = if variant == "rounded" then UDim.new(0, theme.shape.borderRadius) else UDim.new(1, 0),
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
end)
|
|
52
|
+
local default = useAvatarGroupStyles
|
|
53
|
+
return {
|
|
54
|
+
default = default,
|
|
55
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Faces drawn before a surplus badge. A max below 2, or a short list, shows every face.
|
|
3
|
+
local function avatarGroupCut(count, max)
|
|
4
|
+
if max == nil or max ~= max or max < 2 or count <= max then
|
|
5
|
+
return count
|
|
6
|
+
end
|
|
7
|
+
return max - 1
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
avatarGroupCut = avatarGroupCut,
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.AvatarGroup = TS.import(script, script, "components", "AvatarGroup").default
|
|
5
|
+
exports.avatarGroupCut = TS.import(script, script, "components", "avatarGroupCut").avatarGroupCut
|
|
6
|
+
return exports
|
|
@@ -49,27 +49,30 @@ local function Badge(props)
|
|
|
49
49
|
_attributes.base = styles.root
|
|
50
50
|
_attributes.className = className
|
|
51
51
|
_attributes.sx = sx
|
|
52
|
-
local
|
|
52
|
+
local _attributes_1 = table.clone(styles.inset)
|
|
53
|
+
setmetatable(_attributes_1, nil)
|
|
54
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
55
|
+
local _exp_1 = children
|
|
53
56
|
local _condition_1 = shown
|
|
54
57
|
if _condition_1 then
|
|
55
|
-
local
|
|
58
|
+
local _attributes_2 = {
|
|
56
59
|
key = "Count",
|
|
57
60
|
}
|
|
58
61
|
for _k, _v in styles.badge do
|
|
59
|
-
|
|
62
|
+
_attributes_2[_k] = _v
|
|
60
63
|
end
|
|
61
|
-
|
|
64
|
+
_attributes_2.Text = if isDot then "" else badgeText(count, max)
|
|
62
65
|
local _condition_2 = isDot ~= true
|
|
63
66
|
if _condition_2 then
|
|
64
|
-
local
|
|
65
|
-
setmetatable(
|
|
66
|
-
_condition_2 = React.createElement("uipadding",
|
|
67
|
+
local _attributes_3 = table.clone(styles.padding)
|
|
68
|
+
setmetatable(_attributes_3, nil)
|
|
69
|
+
_condition_2 = React.createElement("uipadding", _attributes_3)
|
|
67
70
|
end
|
|
68
|
-
local
|
|
69
|
-
setmetatable(
|
|
70
|
-
_condition_1 = (React.createElement("textlabel",
|
|
71
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
72
|
+
setmetatable(_attributes_3, nil)
|
|
73
|
+
_condition_1 = (React.createElement("textlabel", _attributes_2, _condition_2, React.createElement("uicorner", _attributes_3)))
|
|
71
74
|
end
|
|
72
|
-
return React.createElement(SxHost, _attributes, _exp, _condition_1)
|
|
75
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _condition_1)
|
|
73
76
|
end
|
|
74
77
|
local default = Badge
|
|
75
78
|
return {
|
|
@@ -30,11 +30,15 @@ local useBadgeStyles = componentStyles("Badge", function(theme, _param)
|
|
|
30
30
|
BorderSizePixel = 0,
|
|
31
31
|
Font = theme.typography.fontFamilies.default,
|
|
32
32
|
TextSize = theme.typography.fontSizes.caption,
|
|
33
|
-
TextColor3 =
|
|
33
|
+
TextColor3 = tone.on,
|
|
34
34
|
TextXAlignment = Enum.TextXAlignment.Center,
|
|
35
35
|
TextYAlignment = Enum.TextYAlignment.Center,
|
|
36
36
|
ZIndex = 2,
|
|
37
37
|
},
|
|
38
|
+
inset = {
|
|
39
|
+
PaddingTop = UDim.new(0, diameter / 2),
|
|
40
|
+
PaddingRight = UDim.new(0, diameter / 2),
|
|
41
|
+
},
|
|
38
42
|
padding = {
|
|
39
43
|
PaddingLeft = UDim.new(0, if variant == "dot" then 0 else theme.padding.calc(0.5)),
|
|
40
44
|
PaddingRight = UDim.new(0, if variant == "dot" then 0 else theme.padding.calc(0.5)),
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
import { ChoiceOption } from "../../radioGroup/index";
|
|
3
|
+
export interface BottomNavOption<T> extends ChoiceOption<T> {
|
|
4
|
+
badge?: number;
|
|
5
|
+
}
|
|
3
6
|
export interface BottomNavigationProps<T> {
|
|
4
7
|
value: T;
|
|
5
|
-
options:
|
|
8
|
+
options: BottomNavOption<T>[];
|
|
6
9
|
onChange: (value: T) => void;
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
showLabels?: boolean;
|