@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
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local BoatTween = TS.import(script, TS.getModule(script, "@rbxts", "boat-tween").src).BoatTween
|
|
4
3
|
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
5
4
|
local React = _react
|
|
6
5
|
local useEffect = _react.useEffect
|
|
7
6
|
local useRef = _react.useRef
|
|
8
|
-
local
|
|
9
|
-
local
|
|
7
|
+
local TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
|
|
8
|
+
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
9
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
10
10
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
|
+
local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
12
|
+
local IconButton = TS.import(script, script.Parent.Parent.Parent, "iconButton").IconButton
|
|
13
|
+
local motionDuration = TS.import(script, script.Parent.Parent.Parent, "motion", "duration").motionDuration
|
|
14
|
+
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion", "play").playProperty
|
|
11
15
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
12
16
|
local useToastStyles = TS.import(script, script.Parent, "Toast.styles").default
|
|
13
|
-
local
|
|
17
|
+
local _toastPlace = TS.import(script, script.Parent, "toastPlace")
|
|
18
|
+
local toastGlyph = _toastPlace.toastGlyph
|
|
19
|
+
local toastHold = _toastPlace.toastHold
|
|
20
|
+
local toastWrap = _toastPlace.toastWrap
|
|
21
|
+
local function withoutPosition(style)
|
|
22
|
+
local body = {}
|
|
23
|
+
for key, value in pairs(style) do
|
|
24
|
+
if key ~= "Position" then
|
|
25
|
+
body[key] = value
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
return body
|
|
29
|
+
end
|
|
14
30
|
local function Toast(props)
|
|
15
31
|
local _binding = props
|
|
16
32
|
local text = _binding.text
|
|
@@ -21,6 +37,7 @@ local function Toast(props)
|
|
|
21
37
|
end
|
|
22
38
|
local action = _binding.action
|
|
23
39
|
local onAction = _binding.onAction
|
|
40
|
+
local toggledAt = _binding.toggledAt
|
|
24
41
|
local className = _binding.className
|
|
25
42
|
local sx = _binding.sx
|
|
26
43
|
local id = _binding.id
|
|
@@ -29,48 +46,166 @@ local function Toast(props)
|
|
|
29
46
|
local container = _binding_1.container
|
|
30
47
|
local label = _binding_1.label
|
|
31
48
|
local close = _binding_1.close
|
|
49
|
+
local closeGlyph = _binding_1.closeGlyph
|
|
50
|
+
local mark = _binding_1.mark
|
|
32
51
|
local actionStyle = _binding_1.action
|
|
33
52
|
local activePosition = _binding_1.activePosition
|
|
34
53
|
local inActivePosition = _binding_1.inActivePosition
|
|
54
|
+
local _binding_2 = useTheme()
|
|
55
|
+
local theme = _binding_2.theme
|
|
56
|
+
local reduced = useReducedMotion()
|
|
35
57
|
local frameRef = useRef()
|
|
36
|
-
local
|
|
37
|
-
|
|
38
|
-
|
|
58
|
+
local dismiss = useRef(onDismiss)
|
|
59
|
+
dismiss.current = onDismiss
|
|
60
|
+
local timer = useRef()
|
|
61
|
+
local exitTimer = useRef()
|
|
62
|
+
local stopMotion = useRef(function() end)
|
|
63
|
+
local leaving = useRef(false)
|
|
64
|
+
local font = theme.typography.fontFamilies.default or Enum.Font.SourceSans
|
|
65
|
+
local _condition = theme.typography.fontSizes.body
|
|
66
|
+
if _condition == nil then
|
|
67
|
+
_condition = 14
|
|
68
|
+
end
|
|
69
|
+
local textSize = _condition
|
|
70
|
+
local glyph = toastGlyph(props.variant)
|
|
71
|
+
local _exp = (if action ~= nil and #action > 0 then theme.spacing.calc(8) else 0)
|
|
72
|
+
local _condition_1 = theme.typography.fontSizes.caption
|
|
73
|
+
if _condition_1 == nil then
|
|
74
|
+
_condition_1 = 12
|
|
75
|
+
end
|
|
76
|
+
local actionSlot = _exp + _condition_1 + theme.padding.calc(1)
|
|
77
|
+
local _result = closeGlyph.Size
|
|
78
|
+
if _result ~= nil then
|
|
79
|
+
_result = _result.X.Offset
|
|
80
|
+
end
|
|
81
|
+
local _condition_2 = _result
|
|
82
|
+
if _condition_2 == nil then
|
|
83
|
+
_condition_2 = 16
|
|
84
|
+
end
|
|
85
|
+
local iconSize = _condition_2
|
|
86
|
+
local lead = if glyph ~= nil then iconSize + theme.padding.calc(1) else 0
|
|
87
|
+
local box = theme.spacing.calc(20) - theme.padding.calc(4) - actionSlot - lead
|
|
88
|
+
local bounds = TextService:GetTextSize(text, textSize, font, Vector2.new(10000, 100))
|
|
89
|
+
local wrap = toastWrap(bounds.X, box)
|
|
90
|
+
local pad = theme.padding.calc(2)
|
|
91
|
+
local _result_1
|
|
92
|
+
if wrap then
|
|
93
|
+
local _object = table.clone(container)
|
|
94
|
+
setmetatable(_object, nil)
|
|
95
|
+
_object.AutomaticSize = Enum.AutomaticSize.Y
|
|
96
|
+
_result_1 = _object
|
|
97
|
+
else
|
|
98
|
+
_result_1 = container
|
|
99
|
+
end
|
|
100
|
+
local boxStyle = _result_1
|
|
101
|
+
local _result_2
|
|
102
|
+
if wrap then
|
|
103
|
+
local _object = table.clone(label)
|
|
104
|
+
setmetatable(_object, nil)
|
|
105
|
+
_object.TextWrapped = true
|
|
106
|
+
_object.TextTruncate = Enum.TextTruncate.None
|
|
107
|
+
_object.AutomaticSize = Enum.AutomaticSize.Y
|
|
108
|
+
_object.Size = UDim2.new(1, -(theme.padding.calc(4) + actionSlot + lead), 0, 0)
|
|
109
|
+
_object.AnchorPoint = Vector2.new(0, 0)
|
|
110
|
+
_object.Position = UDim2.new(0, pad + lead, 0, pad)
|
|
111
|
+
_object.TextXAlignment = Enum.TextXAlignment.Left
|
|
112
|
+
_object.TextYAlignment = Enum.TextYAlignment.Top
|
|
113
|
+
_result_2 = _object
|
|
114
|
+
else
|
|
115
|
+
_result_2 = label
|
|
116
|
+
end
|
|
117
|
+
local labelStyle = _result_2
|
|
118
|
+
local active = activePosition.Position
|
|
119
|
+
local idle = inActivePosition.Position
|
|
120
|
+
local clock = useRef({
|
|
121
|
+
active = active,
|
|
122
|
+
idle = idle,
|
|
123
|
+
enter = theme.motion.slow,
|
|
124
|
+
exit = theme.motion.default,
|
|
125
|
+
reduced = reduced,
|
|
126
|
+
duration = duration,
|
|
127
|
+
})
|
|
128
|
+
clock.current = {
|
|
129
|
+
active = active,
|
|
130
|
+
idle = idle,
|
|
131
|
+
enter = theme.motion.slow,
|
|
132
|
+
exit = theme.motion.default,
|
|
133
|
+
reduced = reduced,
|
|
134
|
+
duration = duration,
|
|
135
|
+
}
|
|
136
|
+
local leave = function()
|
|
137
|
+
if leaving.current then
|
|
39
138
|
return nil
|
|
40
139
|
end
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
140
|
+
leaving.current = true
|
|
141
|
+
if timer.current then
|
|
142
|
+
task.cancel(timer.current)
|
|
143
|
+
timer.current = nil
|
|
144
|
+
end
|
|
145
|
+
stopMotion.current()
|
|
146
|
+
local frame = frameRef.current
|
|
147
|
+
local now = clock.current
|
|
148
|
+
if frame and now.idle then
|
|
149
|
+
stopMotion.current = playProperty(frame, {
|
|
150
|
+
Position = now.idle,
|
|
151
|
+
GroupTransparency = 1,
|
|
152
|
+
}, now.exit, now.reduced)
|
|
153
|
+
end
|
|
154
|
+
exitTimer.current = task.delay(motionDuration(now.exit, now.reduced), function()
|
|
155
|
+
exitTimer.current = nil
|
|
156
|
+
dismiss.current()
|
|
157
|
+
end)
|
|
55
158
|
end
|
|
56
159
|
useEffect(function()
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
160
|
+
local frame = frameRef.current
|
|
161
|
+
if not frame then
|
|
162
|
+
return nil
|
|
163
|
+
end
|
|
164
|
+
leaving.current = false
|
|
165
|
+
local now = clock.current
|
|
166
|
+
if now.idle then
|
|
167
|
+
frame.Position = now.idle
|
|
168
|
+
end
|
|
169
|
+
frame.GroupTransparency = 1
|
|
170
|
+
stopMotion.current()
|
|
171
|
+
if now.active then
|
|
172
|
+
stopMotion.current = playProperty(frame, {
|
|
173
|
+
Position = now.active,
|
|
174
|
+
GroupTransparency = 0,
|
|
175
|
+
}, now.enter, now.reduced)
|
|
176
|
+
end
|
|
177
|
+
local hold = task.delay(toastHold(now.enter, now.duration, now.reduced), function()
|
|
178
|
+
timer.current = nil
|
|
179
|
+
leave()
|
|
180
|
+
end)
|
|
181
|
+
timer.current = hold
|
|
182
|
+
return function()
|
|
183
|
+
if timer.current == hold then
|
|
184
|
+
task.cancel(hold)
|
|
185
|
+
end
|
|
186
|
+
if exitTimer.current then
|
|
187
|
+
task.cancel(exitTimer.current)
|
|
188
|
+
end
|
|
189
|
+
exitTimer.current = nil
|
|
190
|
+
stopMotion.current()
|
|
62
191
|
end
|
|
63
|
-
end, {})
|
|
192
|
+
end, { duration, text, toggledAt, reduced })
|
|
64
193
|
local _attributes = {
|
|
65
|
-
tag = "
|
|
194
|
+
tag = "canvasgroup",
|
|
66
195
|
}
|
|
67
|
-
local
|
|
68
|
-
if not (
|
|
69
|
-
|
|
196
|
+
local _condition_3 = id
|
|
197
|
+
if not (_condition_3 ~= 0 and _condition_3 == _condition_3 and _condition_3 ~= "" and _condition_3) then
|
|
198
|
+
_condition_3 = "Toast"
|
|
70
199
|
end
|
|
71
|
-
_attributes.key =
|
|
200
|
+
_attributes.key = _condition_3
|
|
72
201
|
_attributes.hostRef = function(instance)
|
|
73
202
|
frameRef.current = instance
|
|
203
|
+
if instance and clock.current.idle then
|
|
204
|
+
instance.Position = clock.current.idle
|
|
205
|
+
end
|
|
206
|
+
if instance then
|
|
207
|
+
instance.GroupTransparency = 1
|
|
208
|
+
end
|
|
74
209
|
if ref == nil then
|
|
75
210
|
return nil
|
|
76
211
|
end
|
|
@@ -80,24 +215,33 @@ local function Toast(props)
|
|
|
80
215
|
end
|
|
81
216
|
ref.current = instance
|
|
82
217
|
end
|
|
83
|
-
_attributes.base =
|
|
218
|
+
_attributes.base = withoutPosition(boxStyle)
|
|
84
219
|
_attributes.className = className
|
|
85
220
|
_attributes.sx = sx
|
|
86
|
-
local
|
|
221
|
+
local _exp_1 = React.createElement("uicorner", {
|
|
87
222
|
key = "Corner",
|
|
88
|
-
CornerRadius = UDim.new(0,
|
|
223
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
89
224
|
})
|
|
90
|
-
local
|
|
225
|
+
local _exp_2 = React.createElement(Shadow)
|
|
226
|
+
local _exp_3 = wrap and React.createElement("uipadding", {
|
|
227
|
+
PaddingBottom = UDim.new(0, pad),
|
|
228
|
+
})
|
|
229
|
+
local _exp_4 = glyph ~= nil and (React.createElement(Icon, {
|
|
230
|
+
glyph = glyph,
|
|
231
|
+
size = iconSize,
|
|
232
|
+
tint = closeGlyph.ImageColor3,
|
|
233
|
+
className = mark,
|
|
234
|
+
}))
|
|
91
235
|
local _attributes_1 = {
|
|
92
236
|
key = "Label",
|
|
93
237
|
}
|
|
94
|
-
for _k, _v in
|
|
238
|
+
for _k, _v in labelStyle do
|
|
95
239
|
_attributes_1[_k] = _v
|
|
96
240
|
end
|
|
97
241
|
_attributes_1.Text = text
|
|
98
|
-
local
|
|
99
|
-
local
|
|
100
|
-
if
|
|
242
|
+
local _exp_5 = React.createElement("textlabel", _attributes_1)
|
|
243
|
+
local _condition_4 = action ~= nil and #action > 0
|
|
244
|
+
if _condition_4 then
|
|
101
245
|
local _attributes_2 = {
|
|
102
246
|
key = "Action",
|
|
103
247
|
}
|
|
@@ -110,29 +254,28 @@ local function Toast(props)
|
|
|
110
254
|
if onAction then
|
|
111
255
|
onAction()
|
|
112
256
|
end
|
|
113
|
-
|
|
114
|
-
if onDismiss then
|
|
115
|
-
onDismiss()
|
|
116
|
-
end
|
|
257
|
+
leave()
|
|
117
258
|
end,
|
|
118
259
|
}
|
|
119
|
-
|
|
260
|
+
_condition_4 = (React.createElement("textbutton", _attributes_2))
|
|
120
261
|
end
|
|
121
262
|
local _attributes_2 = {
|
|
122
|
-
|
|
263
|
+
id = "Close",
|
|
264
|
+
glyph = "close",
|
|
123
265
|
}
|
|
124
|
-
|
|
125
|
-
|
|
266
|
+
local _result_3 = closeGlyph.Size
|
|
267
|
+
if _result_3 ~= nil then
|
|
268
|
+
_result_3 = _result_3.X.Offset
|
|
126
269
|
end
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return React.createElement(SxHost, _attributes,
|
|
270
|
+
local _condition_5 = _result_3
|
|
271
|
+
if _condition_5 == nil then
|
|
272
|
+
_condition_5 = 16
|
|
273
|
+
end
|
|
274
|
+
_attributes_2.iconSize = _condition_5
|
|
275
|
+
_attributes_2.tint = closeGlyph.ImageColor3
|
|
276
|
+
_attributes_2.className = close
|
|
277
|
+
_attributes_2.onClick = leave
|
|
278
|
+
return React.createElement(SxHost, _attributes, _exp_1, _exp_2, _exp_3, _exp_4, _exp_5, _condition_4, React.createElement(IconButton, _attributes_2))
|
|
136
279
|
end
|
|
137
280
|
local default = Toast
|
|
138
281
|
return {
|
|
@@ -3,15 +3,18 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
|
-
local
|
|
7
|
-
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
6
|
+
local controlMetrics = _theme.controlMetrics
|
|
8
7
|
local ToastVariants = TS.import(script, script.Parent.Parent, "enums", "ToastVariants").default
|
|
8
|
+
local _toastPlace = TS.import(script, script.Parent, "toastPlace")
|
|
9
|
+
local toastGlyph = _toastPlace.toastGlyph
|
|
10
|
+
local toastPlace = _toastPlace.toastPlace
|
|
9
11
|
local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
10
12
|
local variant = _param.variant
|
|
11
13
|
if variant == nil then
|
|
12
14
|
variant = ToastVariants.default
|
|
13
15
|
end
|
|
14
16
|
local action = _param.action
|
|
17
|
+
local edge = _param.edge
|
|
15
18
|
local getToastColors = function()
|
|
16
19
|
repeat
|
|
17
20
|
if variant == (ToastVariants.success) then
|
|
@@ -32,6 +35,12 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
32
35
|
content = theme.palette.status.warning.on,
|
|
33
36
|
}
|
|
34
37
|
end
|
|
38
|
+
if variant == (ToastVariants.info) then
|
|
39
|
+
return {
|
|
40
|
+
background = theme.palette.status.info.main,
|
|
41
|
+
content = theme.palette.status.info.on,
|
|
42
|
+
}
|
|
43
|
+
end
|
|
35
44
|
return {
|
|
36
45
|
background = theme.palette.surface.overlay,
|
|
37
46
|
content = theme.palette.text.primary,
|
|
@@ -40,36 +49,43 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
40
49
|
end
|
|
41
50
|
local toastColors = getToastColors()
|
|
42
51
|
local hasAction = action ~= nil and #action > 0
|
|
43
|
-
local
|
|
44
|
-
local
|
|
45
|
-
local
|
|
52
|
+
local glyph = controlMetrics(theme.density).icon
|
|
53
|
+
local hit = glyph + theme.padding.calc(2)
|
|
54
|
+
local marked = toastGlyph(variant) ~= nil
|
|
55
|
+
local lead = if marked then glyph + theme.padding.calc(1) else 0
|
|
56
|
+
local pinLeft = hasAction or marked
|
|
57
|
+
local actionSlot = (if hasAction then theme.spacing.calc(8) else 0) + hit
|
|
58
|
+
local place = toastPlace(edge, theme.padding.calc(2), theme.spacing.calc(20) + theme.padding.calc(2))
|
|
59
|
+
local ACTIVE_POSITION = UDim2.new(0.5, 0, place.activeY, place.activeOffset)
|
|
60
|
+
local INACTIVE_POSITION = UDim2.new(0.5, 0, place.idleY, place.idleOffset)
|
|
46
61
|
return createStyles({
|
|
47
62
|
container = {
|
|
48
63
|
Size = UDim2.new(0, theme.spacing.calc(20), 0, theme.spacing.calc(4)),
|
|
49
64
|
Position = ACTIVE_POSITION,
|
|
50
65
|
BackgroundColor3 = toastColors.background,
|
|
51
|
-
AnchorPoint = Vector2.new(0.5,
|
|
66
|
+
AnchorPoint = Vector2.new(0.5, place.anchorY),
|
|
52
67
|
BorderSizePixel = 0,
|
|
53
68
|
ZIndex = 50000,
|
|
54
69
|
},
|
|
55
70
|
label = {
|
|
56
|
-
Size = UDim2.new(1, -(theme.padding.calc(4) + actionSlot), 1, -theme.padding.calc(4)),
|
|
57
|
-
Position = if
|
|
58
|
-
AnchorPoint = if
|
|
71
|
+
Size = UDim2.new(1, -(theme.padding.calc(4) + actionSlot + lead), 1, -theme.padding.calc(4)),
|
|
72
|
+
Position = if pinLeft then UDim2.new(0, theme.padding.calc(2) + lead, 0.5, 0) else UDim2.new(0.5, 0, 0.5, 0),
|
|
73
|
+
AnchorPoint = if pinLeft then Vector2.new(0, 0.5) else Vector2.new(0.5, 0.5),
|
|
59
74
|
BackgroundTransparency = 1,
|
|
60
75
|
BorderSizePixel = 0,
|
|
61
76
|
TextSize = theme.typography.fontSizes.body,
|
|
62
77
|
TextColor3 = toastColors.content,
|
|
63
78
|
Font = theme.typography.fontFamilies.default,
|
|
64
|
-
TextXAlignment = if
|
|
65
|
-
|
|
79
|
+
TextXAlignment = if pinLeft then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
|
|
80
|
+
TextWrapped = true,
|
|
81
|
+
TextTruncate = Enum.TextTruncate.None,
|
|
66
82
|
TextScaled = false,
|
|
67
83
|
ZIndex = 50001,
|
|
68
84
|
},
|
|
69
85
|
action = {
|
|
70
86
|
AutomaticSize = Enum.AutomaticSize.X,
|
|
71
87
|
Size = UDim2.new(0, 0, 0, theme.spacing.calc(3)),
|
|
72
|
-
Position = UDim2.new(1, -(theme.padding.calc(
|
|
88
|
+
Position = UDim2.new(1, -(theme.padding.calc(1) + hit), 0.5, 0),
|
|
73
89
|
AnchorPoint = Vector2.new(1, 0.5),
|
|
74
90
|
BackgroundTransparency = 1,
|
|
75
91
|
BorderSizePixel = 0,
|
|
@@ -80,17 +96,21 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
80
96
|
ZIndex = 50001,
|
|
81
97
|
},
|
|
82
98
|
close = {
|
|
83
|
-
Size = UDim2.
|
|
84
|
-
Position = UDim2.new(1, -theme.padding.calc(
|
|
85
|
-
AnchorPoint = Vector2.new(1, 0),
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
Size = UDim2.fromOffset(hit, hit),
|
|
100
|
+
Position = UDim2.new(1, -theme.padding.calc(1), 0.5, 0),
|
|
101
|
+
AnchorPoint = Vector2.new(1, 0.5),
|
|
102
|
+
ZIndex = 50001,
|
|
103
|
+
},
|
|
104
|
+
mark = {
|
|
105
|
+
Position = UDim2.new(0, theme.padding.calc(2), 0.5, 0),
|
|
106
|
+
AnchorPoint = Vector2.new(0, 0.5),
|
|
88
107
|
BackgroundTransparency = 1,
|
|
89
|
-
AutoButtonColor = false,
|
|
90
|
-
BorderSizePixel = 0,
|
|
91
|
-
Active = true,
|
|
92
108
|
ZIndex = 50001,
|
|
93
109
|
},
|
|
110
|
+
closeGlyph = {
|
|
111
|
+
Size = UDim2.fromOffset(glyph, glyph),
|
|
112
|
+
ImageColor3 = toastColors.content,
|
|
113
|
+
},
|
|
94
114
|
activePosition = {
|
|
95
115
|
Position = ACTIVE_POSITION,
|
|
96
116
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ToastEdge = "top" | "bottom";
|
|
2
|
+
export interface ToastPlace {
|
|
3
|
+
anchorY: number;
|
|
4
|
+
activeY: number;
|
|
5
|
+
activeOffset: number;
|
|
6
|
+
idleY: number;
|
|
7
|
+
idleOffset: number;
|
|
8
|
+
}
|
|
9
|
+
/** Bottom stays the default. Top sits on the upper edge and hides above the frame. */
|
|
10
|
+
export declare function toastPlace(edge: ToastEdge | undefined, inset: number, hidden: number): ToastPlace;
|
|
11
|
+
/** A line wider than the toast wraps. A short line stays one row. */
|
|
12
|
+
export declare function toastWrap(textWidth: number, box: number): boolean;
|
|
13
|
+
export type ToastGlyph = "success" | "error" | "warning" | "info";
|
|
14
|
+
export declare function toastGlyph(variant?: string): ToastGlyph | undefined;
|
|
15
|
+
/** Enter slide, then the visible duration. Reduced motion skips the slide. */
|
|
16
|
+
export declare function toastHold(enter: number, visible: number, reduced?: boolean): number;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Bottom stays the default. Top sits on the upper edge and hides above the frame.
|
|
3
|
+
local function toastPlace(edge, inset, hidden)
|
|
4
|
+
if edge == "top" then
|
|
5
|
+
return {
|
|
6
|
+
anchorY = 0,
|
|
7
|
+
activeY = 0,
|
|
8
|
+
activeOffset = inset,
|
|
9
|
+
idleY = 0,
|
|
10
|
+
idleOffset = -hidden,
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
return {
|
|
14
|
+
anchorY = 1,
|
|
15
|
+
activeY = 1,
|
|
16
|
+
activeOffset = -inset,
|
|
17
|
+
idleY = 1,
|
|
18
|
+
idleOffset = hidden,
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
--* A line wider than the toast wraps. A short line stays one row.
|
|
22
|
+
local function toastWrap(textWidth, box)
|
|
23
|
+
if box <= 0 then
|
|
24
|
+
return false
|
|
25
|
+
end
|
|
26
|
+
return textWidth > box
|
|
27
|
+
end
|
|
28
|
+
local function toastGlyph(variant)
|
|
29
|
+
if variant == "success" or variant == "error" or variant == "warning" or variant == "info" then
|
|
30
|
+
return variant
|
|
31
|
+
end
|
|
32
|
+
return nil
|
|
33
|
+
end
|
|
34
|
+
--* Enter slide, then the visible duration. Reduced motion skips the slide.
|
|
35
|
+
local function toastHold(enter, visible, reduced)
|
|
36
|
+
local slide = if reduced == true then 0 else enter
|
|
37
|
+
return slide + visible
|
|
38
|
+
end
|
|
39
|
+
return {
|
|
40
|
+
toastPlace = toastPlace,
|
|
41
|
+
toastWrap = toastWrap,
|
|
42
|
+
toastGlyph = toastGlyph,
|
|
43
|
+
toastHold = toastHold,
|
|
44
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useState = _react.useState
|
|
6
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
7
|
+
local controlFade = _theme.controlFade
|
|
8
|
+
local focusRing = _theme.focusRing
|
|
9
|
+
local useTheme = _theme.useTheme
|
|
4
10
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
5
11
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
12
|
local useToggleButtonStyles = TS.import(script, script.Parent, "ToggleButton.styles").default
|
|
@@ -23,7 +29,12 @@ local function ToggleButton(props)
|
|
|
23
29
|
disabled = disabled,
|
|
24
30
|
size = size,
|
|
25
31
|
})
|
|
32
|
+
local _binding_1 = useTheme()
|
|
33
|
+
local theme = _binding_1.theme
|
|
26
34
|
local active = canActivate(disabled)
|
|
35
|
+
local hovering, setHovering = useState(false)
|
|
36
|
+
local focused, setFocused = useState(false)
|
|
37
|
+
local face = if selected == true then theme.palette.action.selected elseif hovering and active then theme.palette.action.hover else theme.palette.surface.input
|
|
27
38
|
local _attributes = {
|
|
28
39
|
tag = "textbutton",
|
|
29
40
|
}
|
|
@@ -39,10 +50,14 @@ local function ToggleButton(props)
|
|
|
39
50
|
_attributes.state = {
|
|
40
51
|
disabled = disabled,
|
|
41
52
|
selected = selected,
|
|
53
|
+
hover = hovering,
|
|
54
|
+
focused = focused,
|
|
42
55
|
}
|
|
43
56
|
_attributes.Text = label
|
|
44
57
|
_attributes.Active = active
|
|
45
58
|
_attributes.Selectable = active
|
|
59
|
+
_attributes.BackgroundColor3 = face
|
|
60
|
+
_attributes.BackgroundTransparency = if disabled == true then controlFade else 0
|
|
46
61
|
_attributes.Event = {
|
|
47
62
|
Activated = function()
|
|
48
63
|
if active then
|
|
@@ -52,6 +67,22 @@ local function ToggleButton(props)
|
|
|
52
67
|
end
|
|
53
68
|
end
|
|
54
69
|
end,
|
|
70
|
+
MouseEnter = function()
|
|
71
|
+
if active then
|
|
72
|
+
setHovering(true)
|
|
73
|
+
end
|
|
74
|
+
end,
|
|
75
|
+
MouseLeave = function()
|
|
76
|
+
return setHovering(false)
|
|
77
|
+
end,
|
|
78
|
+
SelectionGained = function()
|
|
79
|
+
if active then
|
|
80
|
+
setFocused(true)
|
|
81
|
+
end
|
|
82
|
+
end,
|
|
83
|
+
SelectionLost = function()
|
|
84
|
+
return setFocused(false)
|
|
85
|
+
end,
|
|
55
86
|
}
|
|
56
87
|
local _attributes_1 = table.clone(styles.padding)
|
|
57
88
|
setmetatable(_attributes_1, nil)
|
|
@@ -59,9 +90,17 @@ local function ToggleButton(props)
|
|
|
59
90
|
local _attributes_2 = table.clone(styles.corner)
|
|
60
91
|
setmetatable(_attributes_2, nil)
|
|
61
92
|
local _exp_1 = React.createElement("uicorner", _attributes_2)
|
|
62
|
-
local
|
|
63
|
-
|
|
64
|
-
|
|
93
|
+
local _result
|
|
94
|
+
if focused and active then
|
|
95
|
+
local _attributes_3 = table.clone(focusRing(theme.palette.focus))
|
|
96
|
+
setmetatable(_attributes_3, nil)
|
|
97
|
+
_result = React.createElement("uistroke", _attributes_3)
|
|
98
|
+
else
|
|
99
|
+
local _attributes_3 = table.clone(styles.stroke)
|
|
100
|
+
setmetatable(_attributes_3, nil)
|
|
101
|
+
_result = React.createElement("uistroke", _attributes_3)
|
|
102
|
+
end
|
|
103
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _result)
|
|
65
104
|
end
|
|
66
105
|
local function ToggleButtonGroup(props)
|
|
67
106
|
local _binding = props
|
|
@@ -32,7 +32,7 @@ local useToggleButtonStyles = componentStyles("ToggleButton", function(theme, _p
|
|
|
32
32
|
AutoButtonColor = false,
|
|
33
33
|
Active = not disabled,
|
|
34
34
|
Selectable = not disabled,
|
|
35
|
-
TextColor3 = if
|
|
35
|
+
TextColor3 = if selected then theme.palette.primary.main else theme.palette.text.primary,
|
|
36
36
|
Font = theme.typography.fontFamilies.default,
|
|
37
37
|
TextSize = textSize,
|
|
38
38
|
},
|