@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,9 +1,17 @@
|
|
|
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 useEffect = _react.useEffect
|
|
6
|
+
local useRef = _react.useRef
|
|
7
|
+
local useState = _react.useState
|
|
8
|
+
local TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
|
|
9
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
4
10
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
5
11
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
-
local
|
|
12
|
+
local _dividerLabel = TS.import(script, script.Parent, "dividerLabel")
|
|
13
|
+
local dividerFit = _dividerLabel.dividerFit
|
|
14
|
+
local dividerLabel = _dividerLabel.dividerLabel
|
|
7
15
|
local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").default
|
|
8
16
|
local function Divider(props)
|
|
9
17
|
local _binding = props
|
|
@@ -19,17 +27,52 @@ local function Divider(props)
|
|
|
19
27
|
local line = _binding_1.line
|
|
20
28
|
local caption = _binding_1.caption
|
|
21
29
|
local captionPad = _binding_1.captionPad
|
|
30
|
+
local _binding_2 = useTheme()
|
|
31
|
+
local theme = _binding_2.theme
|
|
22
32
|
local label = dividerLabel(text)
|
|
23
|
-
|
|
33
|
+
local labeled = label ~= nil and orientation ~= Orientations.Vertical
|
|
34
|
+
local shellRef = useRef()
|
|
35
|
+
local box, setBox = useState(0)
|
|
36
|
+
local _condition = theme.typography.fontSizes.caption
|
|
37
|
+
if _condition == nil then
|
|
38
|
+
_condition = 12
|
|
39
|
+
end
|
|
40
|
+
local textSize = _condition
|
|
41
|
+
local font = theme.typography.fontFamilies.default or Enum.Font.SourceSans
|
|
42
|
+
local measured = if labeled then TextService:GetTextSize(label, textSize, font, Vector2.new(10000, 100)).X else 0
|
|
43
|
+
local room = math.max(0, box - theme.padding.calc(2) * 2)
|
|
44
|
+
local fit = if labeled then dividerFit(measured + theme.padding.calc(1) * 2, room) else 0
|
|
45
|
+
useEffect(function()
|
|
46
|
+
local rbx = shellRef.current
|
|
47
|
+
if not rbx then
|
|
48
|
+
return nil
|
|
49
|
+
end
|
|
50
|
+
local update = function()
|
|
51
|
+
return setBox(rbx.AbsoluteSize.X)
|
|
52
|
+
end
|
|
53
|
+
update()
|
|
54
|
+
local connection = rbx:GetPropertyChangedSignal("AbsoluteSize"):Connect(update)
|
|
55
|
+
return function()
|
|
56
|
+
return connection:Disconnect()
|
|
57
|
+
end
|
|
58
|
+
end)
|
|
59
|
+
if labeled then
|
|
24
60
|
local _attributes = {
|
|
25
61
|
tag = "frame",
|
|
26
62
|
}
|
|
27
|
-
local
|
|
28
|
-
if not (
|
|
29
|
-
|
|
63
|
+
local _condition_1 = id
|
|
64
|
+
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
65
|
+
_condition_1 = "Divider"
|
|
66
|
+
end
|
|
67
|
+
_attributes.key = _condition_1
|
|
68
|
+
_attributes.hostRef = function(instance)
|
|
69
|
+
shellRef.current = instance
|
|
70
|
+
if type(ref) == "function" then
|
|
71
|
+
ref(instance)
|
|
72
|
+
elseif ref ~= nil then
|
|
73
|
+
ref.current = instance
|
|
74
|
+
end
|
|
30
75
|
end
|
|
31
|
-
_attributes.key = _condition
|
|
32
|
-
_attributes.hostRef = ref
|
|
33
76
|
_attributes.base = shell
|
|
34
77
|
_attributes.className = className
|
|
35
78
|
_attributes.sx = sx
|
|
@@ -47,18 +90,22 @@ local function Divider(props)
|
|
|
47
90
|
_attributes_2[_k] = _v
|
|
48
91
|
end
|
|
49
92
|
_attributes_2.Text = label
|
|
93
|
+
_attributes_2.Size = if fit > 0 then UDim2.new(0, fit, 1, 0) else UDim2.new(0, 0, 1, 0)
|
|
94
|
+
_attributes_2.AutomaticSize = if fit > 0 then Enum.AutomaticSize.None else Enum.AutomaticSize.X
|
|
50
95
|
local _attributes_3 = table.clone(captionPad)
|
|
51
96
|
setmetatable(_attributes_3, nil)
|
|
52
|
-
return React.createElement(SxHost, _attributes, _exp, React.createElement("textlabel", _attributes_2, React.createElement("uipadding", _attributes_3)
|
|
97
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement("textlabel", _attributes_2, React.createElement("uipadding", _attributes_3), if room > 0 then React.createElement("uisizeconstraint", {
|
|
98
|
+
MaxSize = Vector2.new(room, math.huge),
|
|
99
|
+
}) else nil))
|
|
53
100
|
end
|
|
54
101
|
local _attributes = {
|
|
55
102
|
tag = "frame",
|
|
56
103
|
}
|
|
57
|
-
local
|
|
58
|
-
if not (
|
|
59
|
-
|
|
104
|
+
local _condition_1 = id
|
|
105
|
+
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
106
|
+
_condition_1 = "Divider"
|
|
60
107
|
end
|
|
61
|
-
_attributes.key =
|
|
108
|
+
_attributes.key = _condition_1
|
|
62
109
|
_attributes.hostRef = ref
|
|
63
110
|
local _object = table.clone(root)
|
|
64
111
|
setmetatable(_object, nil)
|
|
@@ -57,6 +57,7 @@ local useDividerStyles = componentStyles("Divider", function(theme, props)
|
|
|
57
57
|
TextSize = theme.typography.fontSizes.caption,
|
|
58
58
|
TextColor3 = theme.palette.text.secondary,
|
|
59
59
|
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
60
|
+
TextWrapped = false,
|
|
60
61
|
TextXAlignment = Enum.TextXAlignment.Center,
|
|
61
62
|
ZIndex = 2,
|
|
62
63
|
},
|
|
@@ -5,6 +5,17 @@ local function dividerLabel(text)
|
|
|
5
5
|
end
|
|
6
6
|
return text
|
|
7
7
|
end
|
|
8
|
+
--* A caption wider than the row caps. A short caption stays on the line.
|
|
9
|
+
local function dividerFit(textWidth, box)
|
|
10
|
+
if box <= 0 then
|
|
11
|
+
return 0
|
|
12
|
+
end
|
|
13
|
+
if textWidth <= box then
|
|
14
|
+
return 0
|
|
15
|
+
end
|
|
16
|
+
return box
|
|
17
|
+
end
|
|
8
18
|
return {
|
|
9
19
|
dividerLabel = dividerLabel,
|
|
20
|
+
dividerFit = dividerFit,
|
|
10
21
|
}
|
|
@@ -6,12 +6,13 @@ local useEffect = _react.useEffect
|
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useState = _react.useState
|
|
8
8
|
local UserInputService = TS.import(script, TS.getModule(script, "@rbxts", "services")).UserInputService
|
|
9
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
9
10
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
11
|
local isDismissInput = TS.import(script, script.Parent.Parent.Parent, "modal", "components", "dismissInput").isDismissInput
|
|
11
12
|
local _popup = TS.import(script, script.Parent.Parent.Parent, "popup")
|
|
12
13
|
local Portal = _popup.Portal
|
|
13
14
|
local portalTarget = _popup.portalTarget
|
|
14
|
-
local
|
|
15
|
+
local drawerFit = TS.import(script, script.Parent, "drawerPlacement").drawerFit
|
|
15
16
|
local useDrawerStyles = TS.import(script, script.Parent, "Drawer.styles").default
|
|
16
17
|
local function Drawer(props)
|
|
17
18
|
local _binding = props
|
|
@@ -22,6 +23,8 @@ local function Drawer(props)
|
|
|
22
23
|
edge = "left"
|
|
23
24
|
end
|
|
24
25
|
local width = _binding.width
|
|
26
|
+
local height = _binding.height
|
|
27
|
+
local title = _binding.title
|
|
25
28
|
local onClose = _binding.onClose
|
|
26
29
|
local children = _binding.children
|
|
27
30
|
local className = _binding.className
|
|
@@ -31,6 +34,8 @@ local function Drawer(props)
|
|
|
31
34
|
local styles = useDrawerStyles({
|
|
32
35
|
width = width,
|
|
33
36
|
})
|
|
37
|
+
local _binding_1 = useTheme()
|
|
38
|
+
local theme = _binding_1.theme
|
|
34
39
|
local close = useRef(onClose)
|
|
35
40
|
local anchor = useRef()
|
|
36
41
|
local layer, setLayer = useState(function()
|
|
@@ -53,7 +58,23 @@ local function Drawer(props)
|
|
|
53
58
|
return connection:Disconnect()
|
|
54
59
|
end
|
|
55
60
|
end, { open, layer })
|
|
56
|
-
local
|
|
61
|
+
local _result
|
|
62
|
+
if edge == "bottom" then
|
|
63
|
+
local _condition = height
|
|
64
|
+
if _condition == nil then
|
|
65
|
+
_condition = theme.spacing.calc(20)
|
|
66
|
+
end
|
|
67
|
+
_result = _condition
|
|
68
|
+
else
|
|
69
|
+
local _condition = width
|
|
70
|
+
if _condition == nil then
|
|
71
|
+
_condition = theme.spacing.calc(20)
|
|
72
|
+
end
|
|
73
|
+
_result = _condition
|
|
74
|
+
end
|
|
75
|
+
local span = _result
|
|
76
|
+
local room = if layer ~= nil then (if edge == "bottom" then layer.AbsoluteSize.Y else layer.AbsoluteSize.X) else 0
|
|
77
|
+
local box = drawerFit(edge, span, room)
|
|
57
78
|
local panelStyle = styles.panel
|
|
58
79
|
local _exp = React.createElement("frame", {
|
|
59
80
|
key = "DrawerAnchor",
|
|
@@ -94,14 +115,37 @@ local function Drawer(props)
|
|
|
94
115
|
_attributes_2.base = panelStyle
|
|
95
116
|
_attributes_2.className = className
|
|
96
117
|
_attributes_2.sx = sx
|
|
97
|
-
_attributes_2.AnchorPoint = Vector2.new(
|
|
98
|
-
_attributes_2.Position = UDim2.fromScale(
|
|
118
|
+
_attributes_2.AnchorPoint = Vector2.new(box.anchorX, box.anchorY)
|
|
119
|
+
_attributes_2.Position = UDim2.fromScale(box.posX, box.posY)
|
|
120
|
+
_attributes_2.Size = UDim2.new(box.sizeX, box.sizeXO, box.sizeY, box.sizeYO)
|
|
99
121
|
_attributes_2.ZIndex = panelStyle.ZIndex
|
|
100
|
-
local
|
|
101
|
-
|
|
122
|
+
local _exp_2 = React.createElement("uilistlayout", {
|
|
123
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
124
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
125
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
126
|
+
})
|
|
127
|
+
local _result_1
|
|
128
|
+
if title ~= nil and #title > 0 then
|
|
129
|
+
local _attributes_3 = {
|
|
130
|
+
key = "Title",
|
|
131
|
+
}
|
|
132
|
+
for _k, _v in styles.title do
|
|
133
|
+
_attributes_3[_k] = _v
|
|
134
|
+
end
|
|
135
|
+
_attributes_3.Text = title
|
|
136
|
+
_result_1 = (React.createElement("textlabel", _attributes_3))
|
|
137
|
+
else
|
|
138
|
+
_result_1 = nil
|
|
139
|
+
end
|
|
102
140
|
_condition = (React.createElement(Portal, {
|
|
103
141
|
host = layer,
|
|
104
|
-
}, React.createElement("frame", _attributes, _exp_1, React.createElement(SxHost, _attributes_2, React.createElement("
|
|
142
|
+
}, React.createElement("frame", _attributes, _exp_1, React.createElement(SxHost, _attributes_2, React.createElement("frame", {
|
|
143
|
+
key = "Pad",
|
|
144
|
+
Size = UDim2.new(1, -theme.padding.calc(4), 1, -theme.padding.calc(4)),
|
|
145
|
+
Position = UDim2.new(0, theme.padding.calc(2), 0, theme.padding.calc(2)),
|
|
146
|
+
BackgroundTransparency = 1,
|
|
147
|
+
BorderSizePixel = 0,
|
|
148
|
+
}, _exp_2, _result_1, children)))))
|
|
105
149
|
end
|
|
106
150
|
return React.createElement(React.Fragment, nil, _exp, _condition)
|
|
107
151
|
end
|
|
@@ -5,6 +5,7 @@ local componentStyles = _theme.componentStyles
|
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
6
|
local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
|
|
7
7
|
local width = _param.width
|
|
8
|
+
local heading = theme.typography.variants.h6
|
|
8
9
|
return createStyles({
|
|
9
10
|
root = {
|
|
10
11
|
Size = UDim2.fromScale(1, 1),
|
|
@@ -27,11 +28,18 @@ local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
|
|
|
27
28
|
BorderSizePixel = 0,
|
|
28
29
|
ZIndex = 30001,
|
|
29
30
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
title = {
|
|
32
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
33
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
34
|
+
BackgroundTransparency = 1,
|
|
35
|
+
BorderSizePixel = 0,
|
|
36
|
+
TextWrapped = true,
|
|
37
|
+
Font = theme.typography.fontFamilies[heading.family],
|
|
38
|
+
TextSize = heading.size,
|
|
39
|
+
LineHeight = heading.leading,
|
|
40
|
+
TextColor3 = theme.palette.text.primary,
|
|
41
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
42
|
+
ZIndex = 30002,
|
|
35
43
|
},
|
|
36
44
|
})
|
|
37
45
|
end)
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
export type DrawerEdge = "left" | "right";
|
|
1
|
+
export type DrawerEdge = "left" | "right" | "bottom";
|
|
2
2
|
export declare function drawerAnchor(edge: DrawerEdge): 1 | 0;
|
|
3
|
+
export interface DrawerBox {
|
|
4
|
+
anchorX: number;
|
|
5
|
+
anchorY: number;
|
|
6
|
+
posX: number;
|
|
7
|
+
posY: number;
|
|
8
|
+
sizeX: number;
|
|
9
|
+
sizeXO: number;
|
|
10
|
+
sizeY: number;
|
|
11
|
+
sizeYO: number;
|
|
12
|
+
}
|
|
13
|
+
/** Side drawers keep a column. A bottom sheet spans the width and sits on the lower edge. */
|
|
14
|
+
export declare function drawerBox(edge: DrawerEdge, span: number): DrawerBox;
|
|
15
|
+
/** Keep the panel on its edge and leave the scrim visible. */
|
|
16
|
+
export declare function drawerFit(edge: DrawerEdge, span: number, limit: number): DrawerBox;
|
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
local function drawerAnchor(edge)
|
|
3
3
|
return if edge == "left" then 0 else 1
|
|
4
4
|
end
|
|
5
|
+
--* Side drawers keep a column. A bottom sheet spans the width and sits on the lower edge.
|
|
6
|
+
local function drawerBox(edge, span)
|
|
7
|
+
local size = if span > 0 then span else 160
|
|
8
|
+
if edge == "bottom" then
|
|
9
|
+
return {
|
|
10
|
+
anchorX = 0,
|
|
11
|
+
anchorY = 1,
|
|
12
|
+
posX = 0,
|
|
13
|
+
posY = 1,
|
|
14
|
+
sizeX = 1,
|
|
15
|
+
sizeXO = 0,
|
|
16
|
+
sizeY = 0,
|
|
17
|
+
sizeYO = size,
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
local side = drawerAnchor(edge)
|
|
21
|
+
return {
|
|
22
|
+
anchorX = side,
|
|
23
|
+
anchorY = 0,
|
|
24
|
+
posX = side,
|
|
25
|
+
posY = 0,
|
|
26
|
+
sizeX = 0,
|
|
27
|
+
sizeXO = size,
|
|
28
|
+
sizeY = 1,
|
|
29
|
+
sizeYO = 0,
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
--* Keep the panel on its edge and leave the scrim visible.
|
|
33
|
+
local function drawerFit(edge, span, limit)
|
|
34
|
+
local box = drawerBox(edge, span)
|
|
35
|
+
local room = if limit > 0 then limit else 0
|
|
36
|
+
if edge == "bottom" then
|
|
37
|
+
local size = if room > 0 and box.sizeYO > room then room else box.sizeYO
|
|
38
|
+
local _object = table.clone(box)
|
|
39
|
+
setmetatable(_object, nil)
|
|
40
|
+
_object.sizeYO = size
|
|
41
|
+
return _object
|
|
42
|
+
end
|
|
43
|
+
local size = if room > 0 and box.sizeXO > room then room else box.sizeXO
|
|
44
|
+
local _object = table.clone(box)
|
|
45
|
+
setmetatable(_object, nil)
|
|
46
|
+
_object.sizeXO = size
|
|
47
|
+
return _object
|
|
48
|
+
end
|
|
5
49
|
return {
|
|
6
50
|
drawerAnchor = drawerAnchor,
|
|
51
|
+
drawerBox = drawerBox,
|
|
52
|
+
drawerFit = drawerFit,
|
|
7
53
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ControlSize, Theme } from "../../theme/index";
|
|
2
|
+
export declare function editorPad(theme: Theme): number;
|
|
3
|
+
/** Same height as the Input these rows host, so the label and the field share one center. */
|
|
4
|
+
export declare function editorRowHeight(theme: Theme, size?: ControlSize): number;
|
|
5
|
+
export declare function editorText(theme: Theme): {
|
|
6
|
+
Font: Required<Enum.Font> | undefined;
|
|
7
|
+
TextSize: number | undefined;
|
|
8
|
+
TextTruncate: Enum.TextTruncate.AtEnd;
|
|
9
|
+
TextXAlignment: Enum.TextXAlignment.Left;
|
|
10
|
+
TextYAlignment: Enum.TextYAlignment.Center;
|
|
11
|
+
};
|
|
12
|
+
export declare function useEditorHover(disabled?: boolean): {
|
|
13
|
+
active: boolean;
|
|
14
|
+
face: {
|
|
15
|
+
BackgroundColor3: Color3;
|
|
16
|
+
BackgroundTransparency: number;
|
|
17
|
+
};
|
|
18
|
+
event: {
|
|
19
|
+
MouseEnter: () => void;
|
|
20
|
+
MouseLeave: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local useState = TS.import(script, TS.getModule(script, "@rbxts", "react")).useState
|
|
4
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent, "theme")
|
|
5
|
+
local controlMetrics = _theme.controlMetrics
|
|
6
|
+
local useTheme = _theme.useTheme
|
|
7
|
+
local function editorPad(theme)
|
|
8
|
+
return theme.padding.calc(1)
|
|
9
|
+
end
|
|
10
|
+
--* Same height as the Input these rows host, so the label and the field share one center.
|
|
11
|
+
local function editorRowHeight(theme, size)
|
|
12
|
+
return controlMetrics(theme.density, size).height
|
|
13
|
+
end
|
|
14
|
+
local function editorText(theme)
|
|
15
|
+
return {
|
|
16
|
+
Font = theme.typography.fontFamilies.default,
|
|
17
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
18
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
19
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
20
|
+
TextYAlignment = Enum.TextYAlignment.Center,
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
local function useEditorHover(disabled)
|
|
24
|
+
local _binding = useTheme()
|
|
25
|
+
local theme = _binding.theme
|
|
26
|
+
local hovering, setHovering = useState(false)
|
|
27
|
+
local active = hovering and disabled ~= true
|
|
28
|
+
return {
|
|
29
|
+
active = active,
|
|
30
|
+
face = {
|
|
31
|
+
BackgroundColor3 = theme.palette.action.hover,
|
|
32
|
+
BackgroundTransparency = if active then 0 else 1,
|
|
33
|
+
},
|
|
34
|
+
event = {
|
|
35
|
+
MouseEnter = function()
|
|
36
|
+
return setHovering(true)
|
|
37
|
+
end,
|
|
38
|
+
MouseLeave = function()
|
|
39
|
+
return setHovering(false)
|
|
40
|
+
end,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
return {
|
|
45
|
+
editorPad = editorPad,
|
|
46
|
+
editorRowHeight = editorRowHeight,
|
|
47
|
+
editorText = editorText,
|
|
48
|
+
useEditorHover = useEditorHover,
|
|
49
|
+
}
|
|
@@ -4,7 +4,10 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useState = _react.useState
|
|
7
|
-
local
|
|
7
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
8
|
+
local controlFade = _theme.controlFade
|
|
9
|
+
local focusRing = _theme.focusRing
|
|
10
|
+
local useTheme = _theme.useTheme
|
|
8
11
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
12
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
10
13
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
@@ -46,6 +49,7 @@ local function Fab(props)
|
|
|
46
49
|
})
|
|
47
50
|
local _binding_1 = useTheme()
|
|
48
51
|
local theme = _binding_1.theme
|
|
52
|
+
local tone = if color == "accent" then theme.palette.accent else theme.palette.primary
|
|
49
53
|
local hovering, setHovering = useState(false)
|
|
50
54
|
local focused, setFocused = useState(false)
|
|
51
55
|
local iconPx = fabIconPixels(size)
|
|
@@ -104,7 +108,8 @@ local function Fab(props)
|
|
|
104
108
|
}
|
|
105
109
|
_attributes.Active = active
|
|
106
110
|
_attributes.Selectable = active
|
|
107
|
-
_attributes.
|
|
111
|
+
_attributes.BackgroundColor3 = if active and hovering then tone.hover else tone.main
|
|
112
|
+
_attributes.BackgroundTransparency = if disabled == true then controlFade else 0
|
|
108
113
|
_attributes.Event = {
|
|
109
114
|
Activated = function()
|
|
110
115
|
if active and onClick then
|
|
@@ -131,8 +136,16 @@ local function Fab(props)
|
|
|
131
136
|
local _attributes_1 = table.clone(styles.corner)
|
|
132
137
|
setmetatable(_attributes_1, nil)
|
|
133
138
|
local _exp = React.createElement("uicorner", _attributes_1)
|
|
134
|
-
local _exp_1 = React.createElement(Shadow)
|
|
135
139
|
local _result_1
|
|
140
|
+
if focused and active then
|
|
141
|
+
local _attributes_2 = table.clone(focusRing(theme.palette.focus))
|
|
142
|
+
setmetatable(_attributes_2, nil)
|
|
143
|
+
_result_1 = React.createElement("uistroke", _attributes_2)
|
|
144
|
+
else
|
|
145
|
+
_result_1 = nil
|
|
146
|
+
end
|
|
147
|
+
local _exp_1 = React.createElement(Shadow)
|
|
148
|
+
local _result_2
|
|
136
149
|
if extended then
|
|
137
150
|
local _attributes_2 = {
|
|
138
151
|
key = "Content",
|
|
@@ -158,11 +171,11 @@ local function Fab(props)
|
|
|
158
171
|
_attributes_5.Text = label
|
|
159
172
|
_condition_1 = React.createElement("textlabel", _attributes_5)
|
|
160
173
|
end
|
|
161
|
-
|
|
174
|
+
_result_2 = (React.createElement("frame", _attributes_2, _exp_2, _exp_3, _exp_4, _condition_1))
|
|
162
175
|
else
|
|
163
|
-
|
|
176
|
+
_result_2 = iconEl
|
|
164
177
|
end
|
|
165
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1,
|
|
178
|
+
return React.createElement(SxHost, _attributes, _exp, _result_1, _exp_1, _result_2)
|
|
166
179
|
end
|
|
167
180
|
local default = Fab
|
|
168
181
|
return {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local componentStyles = _theme.componentStyles
|
|
5
|
+
local controlFade = _theme.controlFade
|
|
5
6
|
local createStyles = _theme.createStyles
|
|
6
7
|
local fabPixels = TS.import(script, script.Parent, "fabSize").fabPixels
|
|
7
8
|
local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
@@ -22,7 +23,7 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
22
23
|
Size = if extended == true then UDim2.new(0, 0, 0, diameter) else UDim2.fromOffset(diameter, diameter),
|
|
23
24
|
AutomaticSize = if extended == true then Enum.AutomaticSize.X else Enum.AutomaticSize.None,
|
|
24
25
|
BackgroundColor3 = tone.main,
|
|
25
|
-
BackgroundTransparency = if disabled then
|
|
26
|
+
BackgroundTransparency = if disabled then controlFade else 0,
|
|
26
27
|
BorderSizePixel = 0,
|
|
27
28
|
AutoButtonColor = false,
|
|
28
29
|
Text = "",
|
|
@@ -54,7 +55,7 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
54
55
|
BorderSizePixel = 0,
|
|
55
56
|
ScaleType = Enum.ScaleType.Fit,
|
|
56
57
|
ImageColor3 = tone.on,
|
|
57
|
-
ImageTransparency =
|
|
58
|
+
ImageTransparency = 0,
|
|
58
59
|
LayoutOrder = 1,
|
|
59
60
|
},
|
|
60
61
|
label = {
|
|
@@ -65,7 +66,7 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
65
66
|
Font = theme.typography.fontFamilies.default,
|
|
66
67
|
TextSize = theme.typography.fontSizes.body,
|
|
67
68
|
TextColor3 = tone.on,
|
|
68
|
-
TextTransparency =
|
|
69
|
+
TextTransparency = 0,
|
|
69
70
|
LayoutOrder = 2,
|
|
70
71
|
},
|
|
71
72
|
})
|
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local React = _react
|
|
5
5
|
local useState = _react.useState
|
|
6
|
+
local useEditorHover = TS.import(script, script.Parent.Parent.Parent, "editorFace").useEditorHover
|
|
6
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
8
9
|
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
@@ -34,8 +35,10 @@ local function builtInFamilies()
|
|
|
34
35
|
end
|
|
35
36
|
local fonts = {}
|
|
36
37
|
for _, item in Enum.Font:GetEnumItems() do
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
if item ~= Enum.Font.Unknown then
|
|
39
|
+
local _arg0 = Font.fromEnum(item)
|
|
40
|
+
table.insert(fonts, _arg0)
|
|
41
|
+
end
|
|
39
42
|
end
|
|
40
43
|
cachedFamilies = enumFamilies(fonts)
|
|
41
44
|
return cachedFamilies
|
|
@@ -50,6 +53,7 @@ local function FontEditor(props)
|
|
|
50
53
|
local id = _binding.id
|
|
51
54
|
local ref = _binding.ref
|
|
52
55
|
local styles = useFontEditorStyles()
|
|
56
|
+
local hover = useEditorHover(disabled)
|
|
53
57
|
local active = canActivate(disabled)
|
|
54
58
|
local families = builtInFamilies()
|
|
55
59
|
-- ▼ ReadonlyArray.find ▼
|
|
@@ -83,12 +87,18 @@ local function FontEditor(props)
|
|
|
83
87
|
end
|
|
84
88
|
_attributes.key = _condition
|
|
85
89
|
_attributes.hostRef = ref
|
|
86
|
-
|
|
90
|
+
local _object = table.clone(styles.root)
|
|
91
|
+
setmetatable(_object, nil)
|
|
92
|
+
for _k, _v in hover.face do
|
|
93
|
+
_object[_k] = _v
|
|
94
|
+
end
|
|
95
|
+
_attributes.base = _object
|
|
87
96
|
_attributes.className = className
|
|
88
97
|
_attributes.sx = sx
|
|
89
98
|
_attributes.state = {
|
|
90
99
|
disabled = disabled,
|
|
91
100
|
}
|
|
101
|
+
_attributes.Event = hover.event
|
|
92
102
|
local _attributes_1 = table.clone(styles.column)
|
|
93
103
|
setmetatable(_attributes_1, nil)
|
|
94
104
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -3,8 +3,12 @@ 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 _editorFace = TS.import(script, script.Parent.Parent.Parent, "editorFace")
|
|
7
|
+
local editorPad = _editorFace.editorPad
|
|
8
|
+
local editorRowHeight = _editorFace.editorRowHeight
|
|
9
|
+
local editorText = _editorFace.editorText
|
|
6
10
|
local useFontEditorStyles = componentStyles("FontEditor", function(theme)
|
|
7
|
-
|
|
11
|
+
local _object = {
|
|
8
12
|
root = {
|
|
9
13
|
Size = UDim2.new(1, 0, 0, 0),
|
|
10
14
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
@@ -13,42 +17,47 @@ local useFontEditorStyles = componentStyles("FontEditor", function(theme)
|
|
|
13
17
|
},
|
|
14
18
|
column = {
|
|
15
19
|
FillDirection = Enum.FillDirection.Vertical,
|
|
16
|
-
Padding = UDim.new(0, theme
|
|
20
|
+
Padding = UDim.new(0, editorPad(theme)),
|
|
17
21
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
18
22
|
},
|
|
19
23
|
row = {
|
|
20
|
-
Size = UDim2.new(1, 0, 0,
|
|
24
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
25
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
21
26
|
BackgroundTransparency = 1,
|
|
22
27
|
},
|
|
23
28
|
pair = {
|
|
24
|
-
Size = UDim2.new(0.5, -theme.padding.calc(0.5), 0,
|
|
29
|
+
Size = UDim2.new(0.5, -theme.padding.calc(0.5), 0, 0),
|
|
30
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
25
31
|
BackgroundTransparency = 1,
|
|
26
32
|
},
|
|
27
33
|
fill = {
|
|
28
|
-
Size = UDim2.new(1, 0, 0, theme
|
|
29
|
-
},
|
|
30
|
-
preview = {
|
|
31
|
-
Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
|
|
32
|
-
BackgroundColor3 = theme.palette.surface.input,
|
|
33
|
-
BorderSizePixel = 0,
|
|
34
|
-
Text = "The quick brown fox",
|
|
35
|
-
TextColor3 = theme.palette.text.primary,
|
|
36
|
-
TextSize = theme.typography.fontSizes.body,
|
|
37
|
-
TextXAlignment = Enum.TextXAlignment.Left,
|
|
38
|
-
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
39
|
-
},
|
|
40
|
-
padding = {
|
|
41
|
-
PaddingLeft = UDim.new(0, theme.padding.default),
|
|
42
|
-
PaddingRight = UDim.new(0, theme.padding.default),
|
|
43
|
-
},
|
|
44
|
-
corner = {
|
|
45
|
-
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
46
|
-
},
|
|
47
|
-
stroke = {
|
|
48
|
-
Color = theme.palette.border,
|
|
49
|
-
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
34
|
+
Size = UDim2.new(1, 0, 0, editorRowHeight(theme)),
|
|
50
35
|
},
|
|
51
|
-
}
|
|
36
|
+
}
|
|
37
|
+
local _left = "preview"
|
|
38
|
+
local _object_1 = {
|
|
39
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
|
|
40
|
+
BackgroundColor3 = theme.palette.surface.input,
|
|
41
|
+
BorderSizePixel = 0,
|
|
42
|
+
Text = "The quick brown fox",
|
|
43
|
+
TextColor3 = theme.palette.text.primary,
|
|
44
|
+
}
|
|
45
|
+
for _k, _v in editorText(theme) do
|
|
46
|
+
_object_1[_k] = _v
|
|
47
|
+
end
|
|
48
|
+
_object[_left] = _object_1
|
|
49
|
+
_object.padding = {
|
|
50
|
+
PaddingLeft = UDim.new(0, editorPad(theme)),
|
|
51
|
+
PaddingRight = UDim.new(0, editorPad(theme)),
|
|
52
|
+
}
|
|
53
|
+
_object.corner = {
|
|
54
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
55
|
+
}
|
|
56
|
+
_object.stroke = {
|
|
57
|
+
Color = theme.palette.border,
|
|
58
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
59
|
+
}
|
|
60
|
+
return createStyles(_object)
|
|
52
61
|
end)
|
|
53
62
|
local default = useFontEditorStyles
|
|
54
63
|
return {
|