@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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function pagerPlace(index, count)
|
|
3
|
+
if count <= 0 or index <= 0 then
|
|
4
|
+
return 0
|
|
5
|
+
end
|
|
6
|
+
if index >= count then
|
|
7
|
+
return count - 1
|
|
8
|
+
end
|
|
9
|
+
return index
|
|
10
|
+
end
|
|
11
|
+
local function pagerStep(index, count, delta)
|
|
12
|
+
return pagerPlace(pagerPlace(index, count) + delta, count)
|
|
13
|
+
end
|
|
14
|
+
local function pagerLabel(index, count)
|
|
15
|
+
local place = pagerPlace(index, count)
|
|
16
|
+
local shown = if count <= 0 then 0 else place + 1
|
|
17
|
+
local total = if count < 0 then 0 else count
|
|
18
|
+
return `{shown} / {total}`
|
|
19
|
+
end
|
|
20
|
+
return {
|
|
21
|
+
pagerPlace = pagerPlace,
|
|
22
|
+
pagerStep = pagerStep,
|
|
23
|
+
pagerLabel = pagerLabel,
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.Pager = TS.import(script, script, "components", "Pager").default
|
|
5
|
+
local _pagerStep = TS.import(script, script, "components", "pagerStep")
|
|
6
|
+
exports.pagerLabel = _pagerStep.pagerLabel
|
|
7
|
+
exports.pagerPlace = _pagerStep.pagerPlace
|
|
8
|
+
exports.pagerStep = _pagerStep.pagerStep
|
|
9
|
+
return exports
|
|
@@ -24,7 +24,7 @@ local usePaginationStyles = componentStyles("Pagination", function(theme, _param
|
|
|
24
24
|
},
|
|
25
25
|
list = {
|
|
26
26
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
27
|
-
Padding = UDim.new(0, theme.padding.calc(if size == "small" then 0.
|
|
27
|
+
Padding = UDim.new(0, theme.padding.calc(if size == "small" then 0.5 else 1)),
|
|
28
28
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
29
29
|
},
|
|
30
30
|
page = {
|
|
@@ -36,10 +36,13 @@ local usePaginationStyles = componentStyles("Pagination", function(theme, _param
|
|
|
36
36
|
Font = theme.typography.fontFamilies.default,
|
|
37
37
|
TextSize = text,
|
|
38
38
|
TextColor3 = theme.palette.text.primary,
|
|
39
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
40
|
+
TextXAlignment = Enum.TextXAlignment.Center,
|
|
39
41
|
},
|
|
40
42
|
selected = {
|
|
41
43
|
BackgroundColor3 = theme.palette.action.selected,
|
|
42
44
|
BackgroundTransparency = 0,
|
|
45
|
+
TextColor3 = theme.palette.text.primary,
|
|
43
46
|
},
|
|
44
47
|
stroke = {
|
|
45
48
|
Color = theme.palette.border,
|
|
@@ -30,22 +30,28 @@ local function Paper(props)
|
|
|
30
30
|
_attributes.className = className
|
|
31
31
|
_attributes.sx = sx
|
|
32
32
|
local _exp = elevation == "raised" and React.createElement(Shadow)
|
|
33
|
-
local _attributes_1 =
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
local _attributes_1 = {
|
|
34
|
+
key = "Content",
|
|
35
|
+
}
|
|
36
|
+
for _k, _v in styles.content do
|
|
37
|
+
_attributes_1[_k] = _v
|
|
38
|
+
end
|
|
39
|
+
local _attributes_2 = table.clone(styles.padding)
|
|
40
|
+
setmetatable(_attributes_2, nil)
|
|
41
|
+
local _exp_1 = React.createElement("frame", _attributes_1, React.createElement("uipadding", _attributes_2), children)
|
|
36
42
|
local _condition_1 = square ~= true
|
|
37
43
|
if _condition_1 then
|
|
38
|
-
local
|
|
39
|
-
setmetatable(
|
|
40
|
-
_condition_1 = React.createElement("uicorner",
|
|
44
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
45
|
+
setmetatable(_attributes_3, nil)
|
|
46
|
+
_condition_1 = React.createElement("uicorner", _attributes_3)
|
|
41
47
|
end
|
|
42
|
-
local _condition_2 = elevation
|
|
48
|
+
local _condition_2 = elevation ~= "raised"
|
|
43
49
|
if _condition_2 then
|
|
44
|
-
local
|
|
45
|
-
setmetatable(
|
|
46
|
-
_condition_2 = React.createElement("uistroke",
|
|
50
|
+
local _attributes_3 = table.clone(styles.stroke)
|
|
51
|
+
setmetatable(_attributes_3, nil)
|
|
52
|
+
_condition_2 = React.createElement("uistroke", _attributes_3)
|
|
47
53
|
end
|
|
48
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1, _condition_1, _condition_2
|
|
54
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _condition_1, _condition_2)
|
|
49
55
|
end
|
|
50
56
|
local default = Paper
|
|
51
57
|
return {
|
|
@@ -8,6 +8,7 @@ local usePaperStyles = componentStyles("Paper", function(theme, _param)
|
|
|
8
8
|
if elevation == nil then
|
|
9
9
|
elevation = "flat"
|
|
10
10
|
end
|
|
11
|
+
local pad = theme.spacing.calc(2)
|
|
11
12
|
return createStyles({
|
|
12
13
|
root = {
|
|
13
14
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -16,16 +17,22 @@ local usePaperStyles = componentStyles("Paper", function(theme, _param)
|
|
|
16
17
|
BorderSizePixel = 0,
|
|
17
18
|
},
|
|
18
19
|
stroke = {
|
|
19
|
-
Color = theme.palette.border,
|
|
20
|
+
Color = if elevation == "outlined" then theme.palette.border else theme.palette.divider,
|
|
20
21
|
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
21
22
|
Thickness = 1,
|
|
22
23
|
Transparency = 0,
|
|
23
24
|
},
|
|
25
|
+
content = {
|
|
26
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
27
|
+
Size = UDim2.fromScale(0, 0),
|
|
28
|
+
BackgroundTransparency = 1,
|
|
29
|
+
BorderSizePixel = 0,
|
|
30
|
+
},
|
|
24
31
|
padding = {
|
|
25
|
-
PaddingTop = UDim.new(0,
|
|
26
|
-
PaddingBottom = UDim.new(0,
|
|
27
|
-
PaddingLeft = UDim.new(0,
|
|
28
|
-
PaddingRight = UDim.new(0,
|
|
32
|
+
PaddingTop = UDim.new(0, pad),
|
|
33
|
+
PaddingBottom = UDim.new(0, pad),
|
|
34
|
+
PaddingLeft = UDim.new(0, pad),
|
|
35
|
+
PaddingRight = UDim.new(0, pad),
|
|
29
36
|
},
|
|
30
37
|
corner = {
|
|
31
38
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local useEditorHover = TS.import(script, script.Parent.Parent.Parent, "editorFace").useEditorHover
|
|
4
5
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
6
7
|
local usePhysicalPropertiesEditorStyles = TS.import(script, script.Parent, "PhysicalPropertiesEditor.styles").default
|
|
7
8
|
local _physicalParts = TS.import(script, script.Parent, "physicalParts")
|
|
8
9
|
local patchPhysicalParts = _physicalParts.patchPhysicalParts
|
|
10
|
+
local physicalBounds = _physicalParts.physicalBounds
|
|
9
11
|
local physicalCaption = _physicalParts.physicalCaption
|
|
10
12
|
local physicalRows = _physicalParts.physicalRows
|
|
11
13
|
local function PhysicalPropertiesEditor(props)
|
|
@@ -18,6 +20,7 @@ local function PhysicalPropertiesEditor(props)
|
|
|
18
20
|
local id = _binding.id
|
|
19
21
|
local ref = _binding.ref
|
|
20
22
|
local styles = usePhysicalPropertiesEditorStyles()
|
|
23
|
+
local hover = useEditorHover(disabled)
|
|
21
24
|
local amounts = {
|
|
22
25
|
Density = value.Density,
|
|
23
26
|
Friction = value.Friction,
|
|
@@ -38,12 +41,18 @@ local function PhysicalPropertiesEditor(props)
|
|
|
38
41
|
end
|
|
39
42
|
_attributes.key = _condition
|
|
40
43
|
_attributes.hostRef = ref
|
|
41
|
-
|
|
44
|
+
local _object = table.clone(styles.root)
|
|
45
|
+
setmetatable(_object, nil)
|
|
46
|
+
for _k, _v in hover.face do
|
|
47
|
+
_object[_k] = _v
|
|
48
|
+
end
|
|
49
|
+
_attributes.base = _object
|
|
42
50
|
_attributes.className = className
|
|
43
51
|
_attributes.sx = sx
|
|
44
52
|
_attributes.state = {
|
|
45
53
|
disabled = disabled,
|
|
46
54
|
}
|
|
55
|
+
_attributes.Event = hover.event
|
|
47
56
|
local _attributes_1 = table.clone(styles.wrap)
|
|
48
57
|
setmetatable(_attributes_1, nil)
|
|
49
58
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -84,8 +93,12 @@ local function PhysicalPropertiesEditor(props)
|
|
|
84
93
|
_attributes_7.LayoutOrder = 2
|
|
85
94
|
return React.createElement("frame", _attributes_4, _exp_3, _exp_4, React.createElement("frame", _attributes_7, React.createElement(NumberInput, {
|
|
86
95
|
value = amounts[field],
|
|
96
|
+
min = physicalBounds(field).min,
|
|
97
|
+
max = physicalBounds(field).max,
|
|
98
|
+
step = physicalBounds(field).step,
|
|
87
99
|
places = 4,
|
|
88
100
|
disabled = disabled,
|
|
101
|
+
size = "small",
|
|
89
102
|
width = UDim.new(1, 0),
|
|
90
103
|
onChange = function(amount)
|
|
91
104
|
return commit(field, amount)
|
package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau
CHANGED
|
@@ -4,9 +4,12 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
|
|
|
4
4
|
local controlMetrics = _theme.controlMetrics
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
6
|
local componentStyles = _theme.componentStyles
|
|
7
|
+
local _editorFace = TS.import(script, script.Parent.Parent.Parent, "editorFace")
|
|
8
|
+
local editorPad = _editorFace.editorPad
|
|
9
|
+
local editorText = _editorFace.editorText
|
|
7
10
|
local usePhysicalPropertiesEditorStyles = componentStyles("PhysicalPropertiesEditor", function(theme)
|
|
8
|
-
local gap = theme
|
|
9
|
-
|
|
11
|
+
local gap = editorPad(theme)
|
|
12
|
+
local _object = {
|
|
10
13
|
root = {
|
|
11
14
|
Size = UDim2.new(1, 0, 0, 0),
|
|
12
15
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
@@ -15,7 +18,7 @@ local usePhysicalPropertiesEditorStyles = componentStyles("PhysicalPropertiesEdi
|
|
|
15
18
|
},
|
|
16
19
|
wrap = {
|
|
17
20
|
FillDirection = Enum.FillDirection.Vertical,
|
|
18
|
-
Padding = UDim.new(0,
|
|
21
|
+
Padding = UDim.new(0, gap),
|
|
19
22
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
20
23
|
},
|
|
21
24
|
pair = {
|
|
@@ -35,24 +38,26 @@ local usePhysicalPropertiesEditorStyles = componentStyles("PhysicalPropertiesEdi
|
|
|
35
38
|
},
|
|
36
39
|
stack = {
|
|
37
40
|
FillDirection = Enum.FillDirection.Vertical,
|
|
38
|
-
Padding = UDim.new(0,
|
|
41
|
+
Padding = UDim.new(0, gap),
|
|
39
42
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
40
43
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
}
|
|
45
|
+
local _left = "label"
|
|
46
|
+
local _object_1 = {
|
|
47
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
48
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
49
|
+
BackgroundTransparency = 1,
|
|
50
|
+
TextColor3 = theme.palette.text.secondary,
|
|
51
|
+
}
|
|
52
|
+
for _k, _v in editorText(theme) do
|
|
53
|
+
_object_1[_k] = _v
|
|
54
|
+
end
|
|
55
|
+
_object[_left] = _object_1
|
|
56
|
+
_object.field = {
|
|
57
|
+
Size = UDim2.new(1, 0, 0, controlMetrics(theme.density).height),
|
|
58
|
+
BackgroundTransparency = 1,
|
|
59
|
+
}
|
|
60
|
+
return createStyles(_object)
|
|
56
61
|
end)
|
|
57
62
|
local default = usePhysicalPropertiesEditorStyles
|
|
58
63
|
return {
|
|
@@ -2,4 +2,9 @@ export type PhysicalField = "Density" | "Friction" | "Elasticity" | "FrictionWei
|
|
|
2
2
|
export declare function physicalFields(): PhysicalField[];
|
|
3
3
|
export declare function physicalCaption(field: PhysicalField): "Density" | "Friction" | "Elasticity" | "Friction wt" | "Elasticity wt";
|
|
4
4
|
export declare function physicalRows(): PhysicalField[][];
|
|
5
|
+
export declare function physicalBounds(field: PhysicalField): {
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
step: number;
|
|
9
|
+
};
|
|
5
10
|
export declare function patchPhysicalParts(density: number, friction: number, elasticity: number, frictionWeight: number, elasticityWeight: number, field: PhysicalField, amount: number): number[];
|
|
@@ -14,6 +14,27 @@ end
|
|
|
14
14
|
local function physicalRows()
|
|
15
15
|
return { { "Density", "Friction" }, { "Elasticity", "FrictionWeight" }, { "ElasticityWeight" } }
|
|
16
16
|
end
|
|
17
|
+
local function physicalBounds(field)
|
|
18
|
+
if field == "Density" then
|
|
19
|
+
return {
|
|
20
|
+
min = 0.01,
|
|
21
|
+
max = 100,
|
|
22
|
+
step = 0.01,
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
if field == "Friction" or field == "Elasticity" then
|
|
26
|
+
return {
|
|
27
|
+
min = 0,
|
|
28
|
+
max = 1,
|
|
29
|
+
step = 0.01,
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
return {
|
|
33
|
+
min = 0,
|
|
34
|
+
max = 100,
|
|
35
|
+
step = 0.1,
|
|
36
|
+
}
|
|
37
|
+
end
|
|
17
38
|
local function patchPhysicalParts(density, friction, elasticity, frictionWeight, elasticityWeight, field, amount)
|
|
18
39
|
local parts = { density, friction, elasticity, frictionWeight, elasticityWeight }
|
|
19
40
|
local index = if field == "Density" then 0 elseif field == "Friction" then 1 elseif field == "Elasticity" then 2 elseif field == "FrictionWeight" then 3 else 4
|
|
@@ -24,5 +45,6 @@ return {
|
|
|
24
45
|
physicalFields = physicalFields,
|
|
25
46
|
physicalCaption = physicalCaption,
|
|
26
47
|
physicalRows = physicalRows,
|
|
48
|
+
physicalBounds = physicalBounds,
|
|
27
49
|
patchPhysicalParts = patchPhysicalParts,
|
|
28
50
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
export interface PopoverProps {
|
|
4
|
+
anchor?: GuiObject;
|
|
5
|
+
open?: boolean;
|
|
6
|
+
preferredHeight?: number;
|
|
7
|
+
preferredWidth?: number;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function Popover(props: CustomizedProps<Frame, PopoverProps>): JSX.Element;
|
|
12
|
+
export default Popover;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
|
+
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
6
|
+
local usePopoverStyles = TS.import(script, script.Parent, "Popover.styles").default
|
|
7
|
+
local function Popover(props)
|
|
8
|
+
local _binding = props
|
|
9
|
+
local anchor = _binding.anchor
|
|
10
|
+
local open = _binding.open
|
|
11
|
+
local preferredHeight = _binding.preferredHeight
|
|
12
|
+
local preferredWidth = _binding.preferredWidth
|
|
13
|
+
local onDismiss = _binding.onDismiss
|
|
14
|
+
local children = _binding.children
|
|
15
|
+
local className = _binding.className
|
|
16
|
+
local sx = _binding.sx
|
|
17
|
+
local id = _binding.id
|
|
18
|
+
local ref = _binding.ref
|
|
19
|
+
local styles = usePopoverStyles()
|
|
20
|
+
local closed = open ~= true
|
|
21
|
+
local _attributes = {
|
|
22
|
+
tag = "frame",
|
|
23
|
+
}
|
|
24
|
+
local _condition = id
|
|
25
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
26
|
+
_condition = "Popover"
|
|
27
|
+
end
|
|
28
|
+
_attributes.key = _condition
|
|
29
|
+
_attributes.hostRef = ref
|
|
30
|
+
_attributes.base = styles.root
|
|
31
|
+
_attributes.className = className
|
|
32
|
+
_attributes.sx = sx
|
|
33
|
+
local _attributes_1 = table.clone(styles.corner)
|
|
34
|
+
setmetatable(_attributes_1, nil)
|
|
35
|
+
local _exp = React.createElement("uicorner", _attributes_1)
|
|
36
|
+
local _attributes_2 = table.clone(styles.stroke)
|
|
37
|
+
setmetatable(_attributes_2, nil)
|
|
38
|
+
local _exp_1 = React.createElement("uistroke", _attributes_2)
|
|
39
|
+
local _attributes_3 = table.clone(styles.padding)
|
|
40
|
+
setmetatable(_attributes_3, nil)
|
|
41
|
+
return React.createElement(Popup, {
|
|
42
|
+
open = not closed,
|
|
43
|
+
anchor = anchor,
|
|
44
|
+
preferredHeight = preferredHeight,
|
|
45
|
+
preferredWidth = preferredWidth,
|
|
46
|
+
onDismiss = onDismiss,
|
|
47
|
+
}, React.createElement(SxHost, _attributes, _exp, _exp_1, React.createElement("uipadding", _attributes_3), children))
|
|
48
|
+
end
|
|
49
|
+
local default = Popover
|
|
50
|
+
return {
|
|
51
|
+
default = default,
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 usePopoverStyles = componentStyles("Popover", function(theme)
|
|
7
|
+
return createStyles({
|
|
8
|
+
root = {
|
|
9
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
10
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
11
|
+
BackgroundColor3 = theme.palette.surface.elevated,
|
|
12
|
+
BorderSizePixel = 0,
|
|
13
|
+
},
|
|
14
|
+
corner = {
|
|
15
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
16
|
+
},
|
|
17
|
+
stroke = {
|
|
18
|
+
Color = theme.palette.border,
|
|
19
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
20
|
+
},
|
|
21
|
+
padding = {
|
|
22
|
+
PaddingTop = UDim.new(0, theme.spacing.calc(2)),
|
|
23
|
+
PaddingBottom = UDim.new(0, theme.spacing.calc(2)),
|
|
24
|
+
PaddingLeft = UDim.new(0, theme.spacing.calc(2)),
|
|
25
|
+
PaddingRight = UDim.new(0, theme.spacing.calc(2)),
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
end)
|
|
29
|
+
local default = usePopoverStyles
|
|
30
|
+
return {
|
|
31
|
+
default = default,
|
|
32
|
+
}
|
|
@@ -6,6 +6,8 @@ export interface PopupProps {
|
|
|
6
6
|
preferredHeight?: number;
|
|
7
7
|
/** Content width. Falls back to the anchor width. Clamped to the layer. */
|
|
8
8
|
preferredWidth?: number;
|
|
9
|
+
/** Stays mounted through the close tween. Omit to show while the parent renders it. */
|
|
10
|
+
open?: boolean;
|
|
9
11
|
onDismiss?: () => void;
|
|
10
12
|
onInput?: (input: InputObject) => void;
|
|
11
13
|
children?: React.ReactNode;
|
|
@@ -5,15 +5,45 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useState = _react.useState
|
|
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
|
|
8
10
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
|
+
local motionDuration = TS.import(script, script.Parent.Parent.Parent, "motion", "duration").motionDuration
|
|
12
|
+
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion", "play").playProperty
|
|
9
13
|
local popupPlacement = TS.import(script, script.Parent, "placement").popupPlacement
|
|
10
14
|
local Portal = TS.import(script, script.Parent, "Portal").default
|
|
11
15
|
local portalTarget = TS.import(script, script.Parent, "portalTarget").portalTarget
|
|
16
|
+
local function MotionScale(props)
|
|
17
|
+
local ref = useRef()
|
|
18
|
+
local reduced = useReducedMotion()
|
|
19
|
+
local _binding = useTheme()
|
|
20
|
+
local theme = _binding.theme
|
|
21
|
+
local open = props.open
|
|
22
|
+
useEffect(function()
|
|
23
|
+
local scale = ref.current
|
|
24
|
+
if not scale then
|
|
25
|
+
return nil
|
|
26
|
+
end
|
|
27
|
+
if open and not reduced then
|
|
28
|
+
scale.Scale = 0.96
|
|
29
|
+
end
|
|
30
|
+
local seconds = if open then theme.motion.default else theme.motion.fast
|
|
31
|
+
local stop = playProperty(scale, {
|
|
32
|
+
Scale = if open then 1 else 0.96,
|
|
33
|
+
}, seconds, reduced)
|
|
34
|
+
return stop
|
|
35
|
+
end, { open, reduced, theme })
|
|
36
|
+
return React.createElement("uiscale", {
|
|
37
|
+
key = "Motion",
|
|
38
|
+
ref = ref,
|
|
39
|
+
})
|
|
40
|
+
end
|
|
12
41
|
local function Popup(props)
|
|
13
42
|
local _binding = props
|
|
14
43
|
local anchor = _binding.anchor
|
|
15
44
|
local preferredHeight = _binding.preferredHeight
|
|
16
45
|
local preferredWidth = _binding.preferredWidth
|
|
46
|
+
local open = _binding.open
|
|
17
47
|
local onDismiss = _binding.onDismiss
|
|
18
48
|
local onInput = _binding.onInput
|
|
19
49
|
local children = _binding.children
|
|
@@ -21,6 +51,36 @@ local function Popup(props)
|
|
|
21
51
|
local sx = _binding.sx
|
|
22
52
|
local id = _binding.id
|
|
23
53
|
local ref = _binding.ref
|
|
54
|
+
local visible = open ~= false
|
|
55
|
+
local held, setHeld = useState(visible)
|
|
56
|
+
local reduced = useReducedMotion()
|
|
57
|
+
local _binding_1 = useTheme()
|
|
58
|
+
local theme = _binding_1.theme
|
|
59
|
+
useEffect(function()
|
|
60
|
+
if visible then
|
|
61
|
+
setHeld(true)
|
|
62
|
+
end
|
|
63
|
+
end, { visible })
|
|
64
|
+
useEffect(function()
|
|
65
|
+
if not held or visible then
|
|
66
|
+
return nil
|
|
67
|
+
end
|
|
68
|
+
local delay = motionDuration(theme.motion.fast, reduced)
|
|
69
|
+
if delay == 0 then
|
|
70
|
+
setHeld(false)
|
|
71
|
+
return nil
|
|
72
|
+
end
|
|
73
|
+
local alive = true
|
|
74
|
+
local thread = task.delay(delay, function()
|
|
75
|
+
if alive then
|
|
76
|
+
setHeld(false)
|
|
77
|
+
end
|
|
78
|
+
end)
|
|
79
|
+
return function()
|
|
80
|
+
alive = false
|
|
81
|
+
task.cancel(thread)
|
|
82
|
+
end
|
|
83
|
+
end, { visible, held, reduced, theme })
|
|
24
84
|
local dismiss = useRef(onDismiss)
|
|
25
85
|
dismiss.current = onDismiss
|
|
26
86
|
local _, bump = useState(0)
|
|
@@ -72,7 +132,7 @@ local function Popup(props)
|
|
|
72
132
|
return nil
|
|
73
133
|
end
|
|
74
134
|
end, { anchor, layer })
|
|
75
|
-
if not anchor or not layer then
|
|
135
|
+
if not held or not anchor or not layer then
|
|
76
136
|
return nil
|
|
77
137
|
end
|
|
78
138
|
local _exp = anchor.AbsolutePosition.X
|
|
@@ -140,7 +200,9 @@ local function Popup(props)
|
|
|
140
200
|
Size = UDim2.fromScale(1, 1),
|
|
141
201
|
BackgroundTransparency = 1,
|
|
142
202
|
ZIndex = 20000,
|
|
143
|
-
}, _exp_8, React.createElement(SxHost, _attributes,
|
|
203
|
+
}, _exp_8, React.createElement(SxHost, _attributes, React.createElement(MotionScale, {
|
|
204
|
+
open = visible,
|
|
205
|
+
}), children)))
|
|
144
206
|
end
|
|
145
207
|
local default = Popup
|
|
146
208
|
return {
|
|
@@ -11,9 +11,11 @@ local function popupPlacement(anchorX, anchorY, anchorW, anchorH, layerX, layerY
|
|
|
11
11
|
end
|
|
12
12
|
local localX = anchorX - layerX
|
|
13
13
|
local localY = anchorY - layerY
|
|
14
|
-
local
|
|
15
|
-
local
|
|
16
|
-
local
|
|
14
|
+
local top = math.clamp(localY, 0, layerH)
|
|
15
|
+
local bottom = math.clamp(localY + anchorH, 0, layerH)
|
|
16
|
+
local spaceAbove = top
|
|
17
|
+
local spaceBelow = math.max(0, layerH - bottom)
|
|
18
|
+
local above = spaceAbove > spaceBelow and (contentH == 0 or contentH > spaceBelow)
|
|
17
19
|
local maxHeight = if above then spaceAbove else spaceBelow
|
|
18
20
|
local width = if contentW > 0 then contentW else anchorW
|
|
19
21
|
if width > layerW then
|
|
@@ -29,7 +31,7 @@ local function popupPlacement(anchorX, anchorY, anchorW, anchorH, layerX, layerY
|
|
|
29
31
|
local height = if contentH > 0 then math.min(contentH, maxHeight) else 0
|
|
30
32
|
return {
|
|
31
33
|
x = x,
|
|
32
|
-
y = if above then
|
|
34
|
+
y = if above then top else bottom,
|
|
33
35
|
width = width,
|
|
34
36
|
height = height,
|
|
35
37
|
maxHeight = maxHeight,
|
|
@@ -101,7 +101,7 @@ local function ProgressBar(props)
|
|
|
101
101
|
_attributes_6[_k] = _v
|
|
102
102
|
end
|
|
103
103
|
_attributes_6.Size = UDim2.new(unit, 0, 1, 0)
|
|
104
|
-
_attributes_6.BackgroundColor3 = color or theme.palette.
|
|
104
|
+
_attributes_6.BackgroundColor3 = color or theme.palette.primary.main
|
|
105
105
|
_attributes_6.BackgroundTransparency = if disabled then 0.55 else 0
|
|
106
106
|
local _attributes_7 = {
|
|
107
107
|
key = "Corner",
|
|
@@ -24,7 +24,8 @@ local useProgressBarStyles = componentStyles("ProgressBar", function(theme)
|
|
|
24
24
|
Size = UDim2.new(1, -theme.options.constants.borders.divider * 2, 1, -theme.options.constants.borders.divider * 2),
|
|
25
25
|
Position = UDim2.new(0.5, 0, 0.5, 0),
|
|
26
26
|
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
27
|
-
|
|
27
|
+
BackgroundColor3 = theme.palette.surface.input,
|
|
28
|
+
BackgroundTransparency = 0,
|
|
28
29
|
BorderSizePixel = 0,
|
|
29
30
|
ClipsDescendants = true,
|
|
30
31
|
ZIndex = 110001,
|
|
@@ -32,7 +33,7 @@ local useProgressBarStyles = componentStyles("ProgressBar", function(theme)
|
|
|
32
33
|
fill = {
|
|
33
34
|
Position = UDim2.new(0, 0, 0.5, 0),
|
|
34
35
|
AnchorPoint = Vector2.new(0, 0.5),
|
|
35
|
-
BackgroundColor3 = theme.palette.
|
|
36
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
36
37
|
BorderSizePixel = 0,
|
|
37
38
|
ZIndex = 110001,
|
|
38
39
|
},
|
|
@@ -5,9 +5,12 @@ export interface ChoiceOption<T> {
|
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
group?: string;
|
|
7
7
|
}
|
|
8
|
+
export interface RadioOption<T> extends ChoiceOption<T> {
|
|
9
|
+
hint?: string;
|
|
10
|
+
}
|
|
8
11
|
export interface RadioGroupProps<T> {
|
|
9
12
|
value: T;
|
|
10
|
-
options:
|
|
13
|
+
options: RadioOption<T>[];
|
|
11
14
|
onChange: (value: T) => void;
|
|
12
15
|
disabled?: boolean;
|
|
13
16
|
size?: ControlSize;
|