@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
|
@@ -4,7 +4,15 @@ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
6
|
local createStyles = _theme.createStyles
|
|
7
|
+
local resolveSx = _theme.resolveSx
|
|
8
|
+
local useTheme = _theme.useTheme
|
|
7
9
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
|
+
local _Pad = TS.import(script, script.Parent, "Pad")
|
|
11
|
+
local automaticAxes = _Pad.automaticAxes
|
|
12
|
+
local Pad = _Pad.Pad
|
|
13
|
+
local padActive = _Pad.padActive
|
|
14
|
+
local styleAutomaticSize = _Pad.styleAutomaticSize
|
|
15
|
+
local withoutPad = _Pad.withoutPad
|
|
8
16
|
local _gridProps = TS.import(script, script.Parent, "gridProps")
|
|
9
17
|
local gridCornerKey = _gridProps.gridCornerKey
|
|
10
18
|
local gridMaxCells = _gridProps.gridMaxCells
|
|
@@ -92,7 +100,9 @@ local function Grid(props)
|
|
|
92
100
|
local children = _binding.children
|
|
93
101
|
local id = _binding.id
|
|
94
102
|
local ref = _binding.ref
|
|
95
|
-
local _binding_1 =
|
|
103
|
+
local _binding_1 = useTheme()
|
|
104
|
+
local theme = _binding_1.theme
|
|
105
|
+
local _binding_2 = useGridStyles({
|
|
96
106
|
cellPadding = cellPadding,
|
|
97
107
|
cellSize = cellSize,
|
|
98
108
|
gap = gap,
|
|
@@ -105,25 +115,80 @@ local function Grid(props)
|
|
|
105
115
|
horizontalAlignment = horizontalAlignment,
|
|
106
116
|
verticalAlignment = verticalAlignment,
|
|
107
117
|
})
|
|
108
|
-
local baseGrid =
|
|
109
|
-
local baseLayout =
|
|
110
|
-
local
|
|
111
|
-
local
|
|
112
|
-
if
|
|
113
|
-
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
local
|
|
118
|
+
local baseGrid = _binding_2.baseGrid
|
|
119
|
+
local baseLayout = _binding_2.baseLayout
|
|
120
|
+
local pad = resolveSx(theme, sx).padding
|
|
121
|
+
local _result = pad
|
|
122
|
+
if _result ~= nil then
|
|
123
|
+
_result = _result.PaddingLeft.Offset
|
|
124
|
+
end
|
|
125
|
+
local _condition = _result
|
|
126
|
+
if _condition == nil then
|
|
127
|
+
_condition = 0
|
|
128
|
+
end
|
|
129
|
+
local left = _condition
|
|
130
|
+
local _result_1 = pad
|
|
131
|
+
if _result_1 ~= nil then
|
|
132
|
+
_result_1 = _result_1.PaddingRight.Offset
|
|
133
|
+
end
|
|
134
|
+
local _condition_1 = _result_1
|
|
135
|
+
if _condition_1 == nil then
|
|
136
|
+
_condition_1 = 0
|
|
137
|
+
end
|
|
138
|
+
local right = _condition_1
|
|
139
|
+
local _result_2 = pad
|
|
140
|
+
if _result_2 ~= nil then
|
|
141
|
+
_result_2 = _result_2.PaddingTop.Offset
|
|
142
|
+
end
|
|
143
|
+
local _condition_2 = _result_2
|
|
144
|
+
if _condition_2 == nil then
|
|
145
|
+
_condition_2 = 0
|
|
146
|
+
end
|
|
147
|
+
local top = _condition_2
|
|
148
|
+
local _result_3 = pad
|
|
149
|
+
if _result_3 ~= nil then
|
|
150
|
+
_result_3 = _result_3.PaddingBottom.Offset
|
|
151
|
+
end
|
|
152
|
+
local _condition_3 = _result_3
|
|
153
|
+
if _condition_3 == nil then
|
|
154
|
+
_condition_3 = 0
|
|
155
|
+
end
|
|
156
|
+
local bottom = _condition_3
|
|
157
|
+
local inset = padActive(left, right, top, bottom)
|
|
158
|
+
local _result_4 = sx
|
|
159
|
+
if _result_4 ~= nil then
|
|
160
|
+
_result_4 = _result_4.AutomaticSize
|
|
161
|
+
end
|
|
162
|
+
local _condition_4 = _result_4
|
|
163
|
+
if _condition_4 == nil then
|
|
164
|
+
_condition_4 = styleAutomaticSize(baseGrid)
|
|
165
|
+
end
|
|
166
|
+
local auto = automaticAxes(_condition_4)
|
|
167
|
+
local _attributes = {
|
|
121
168
|
key = "GridLayout",
|
|
122
169
|
}
|
|
123
170
|
for _k, _v in baseLayout do
|
|
124
|
-
|
|
171
|
+
_attributes[_k] = _v
|
|
172
|
+
end
|
|
173
|
+
local body = (React.createElement(React.Fragment, nil, React.createElement("uigridlayout", _attributes), children))
|
|
174
|
+
local _attributes_1 = {}
|
|
175
|
+
local _condition_5 = id
|
|
176
|
+
if not (_condition_5 ~= 0 and _condition_5 == _condition_5 and _condition_5 ~= "" and _condition_5) then
|
|
177
|
+
_condition_5 = "Grid"
|
|
125
178
|
end
|
|
126
|
-
|
|
179
|
+
_attributes_1.key = _condition_5
|
|
180
|
+
_attributes_1.hostRef = ref
|
|
181
|
+
_attributes_1.base = baseGrid
|
|
182
|
+
_attributes_1.className = className
|
|
183
|
+
_attributes_1.sx = if inset then withoutPad(sx) else sx
|
|
184
|
+
return React.createElement(SxHost, _attributes_1, if inset then (React.createElement(Pad, {
|
|
185
|
+
left = left,
|
|
186
|
+
right = right,
|
|
187
|
+
top = top,
|
|
188
|
+
bottom = bottom,
|
|
189
|
+
autoX = auto.x,
|
|
190
|
+
autoY = auto.y,
|
|
191
|
+
}, body)) else body)
|
|
127
192
|
end
|
|
128
193
|
local default = Grid
|
|
129
194
|
return {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
/** Padding on the host offsets scale-sized children without shrinking them. */
|
|
3
|
+
export declare function withoutPad(sx: object | undefined): {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
} | undefined;
|
|
6
|
+
export declare function styleAutomaticSize(style: object): Enum.AutomaticSize | undefined;
|
|
7
|
+
export declare function automaticAxes(value: Enum.AutomaticSize | undefined): {
|
|
8
|
+
x: boolean;
|
|
9
|
+
y: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function padActive(left: number, right: number, top: number, bottom: number): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Fixed axes use a shrunk size so scale children stop at the padding.
|
|
14
|
+
* Automatic axes keep trailing padding on the content instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Pad(props: {
|
|
17
|
+
left: number;
|
|
18
|
+
right: number;
|
|
19
|
+
top: number;
|
|
20
|
+
bottom: number;
|
|
21
|
+
autoX: boolean;
|
|
22
|
+
autoY: boolean;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
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 function isPadKey(key)
|
|
5
|
+
return key == "p" or key == "px" or key == "py" or key == "pt" or key == "pr" or key == "pb" or key == "pl" or key == "padding"
|
|
6
|
+
end
|
|
7
|
+
--* Padding on the host offsets scale-sized children without shrinking them.
|
|
8
|
+
local function withoutPad(sx)
|
|
9
|
+
if sx == nil then
|
|
10
|
+
return nil
|
|
11
|
+
end
|
|
12
|
+
local rest = {}
|
|
13
|
+
local kept = false
|
|
14
|
+
for key, value in pairs(sx) do
|
|
15
|
+
local name = tostring(key)
|
|
16
|
+
if isPadKey(name) then
|
|
17
|
+
continue
|
|
18
|
+
end
|
|
19
|
+
rest[name] = value
|
|
20
|
+
kept = true
|
|
21
|
+
end
|
|
22
|
+
return if kept then rest else nil
|
|
23
|
+
end
|
|
24
|
+
local function styleAutomaticSize(style)
|
|
25
|
+
return style.AutomaticSize
|
|
26
|
+
end
|
|
27
|
+
local function automaticAxes(value)
|
|
28
|
+
if value == Enum.AutomaticSize.X then
|
|
29
|
+
return {
|
|
30
|
+
x = true,
|
|
31
|
+
y = false,
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
if value == Enum.AutomaticSize.Y then
|
|
35
|
+
return {
|
|
36
|
+
x = false,
|
|
37
|
+
y = true,
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
if value == Enum.AutomaticSize.XY then
|
|
41
|
+
return {
|
|
42
|
+
x = true,
|
|
43
|
+
y = true,
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
return {
|
|
47
|
+
x = false,
|
|
48
|
+
y = false,
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
local function padActive(left, right, top, bottom)
|
|
52
|
+
return left + right + top + bottom > 0
|
|
53
|
+
end
|
|
54
|
+
--[[
|
|
55
|
+
*
|
|
56
|
+
* Fixed axes use a shrunk size so scale children stop at the padding.
|
|
57
|
+
* Automatic axes keep trailing padding on the content instead.
|
|
58
|
+
|
|
59
|
+
]]
|
|
60
|
+
local function Pad(props)
|
|
61
|
+
local _binding = props
|
|
62
|
+
local left = _binding.left
|
|
63
|
+
local right = _binding.right
|
|
64
|
+
local top = _binding.top
|
|
65
|
+
local bottom = _binding.bottom
|
|
66
|
+
local autoX = _binding.autoX
|
|
67
|
+
local autoY = _binding.autoY
|
|
68
|
+
local children = _binding.children
|
|
69
|
+
local auto = if autoX and autoY then Enum.AutomaticSize.XY elseif autoY then Enum.AutomaticSize.Y elseif autoX then Enum.AutomaticSize.X else Enum.AutomaticSize.None
|
|
70
|
+
return React.createElement("frame", {
|
|
71
|
+
key = "Pad",
|
|
72
|
+
Position = UDim2.new(0, left, 0, top),
|
|
73
|
+
Size = UDim2.new(if autoX then 0 else 1, if autoX then 0 else -(left + right), if autoY then 0 else 1, if autoY then 0 else -(top + bottom)),
|
|
74
|
+
AutomaticSize = auto,
|
|
75
|
+
BackgroundTransparency = 1,
|
|
76
|
+
BorderSizePixel = 0,
|
|
77
|
+
}, if autoX or autoY then (React.createElement("uipadding", {
|
|
78
|
+
PaddingRight = UDim.new(0, if autoX then right else 0),
|
|
79
|
+
PaddingBottom = UDim.new(0, if autoY then bottom else 0),
|
|
80
|
+
})) else nil, children)
|
|
81
|
+
end
|
|
82
|
+
return {
|
|
83
|
+
withoutPad = withoutPad,
|
|
84
|
+
styleAutomaticSize = styleAutomaticSize,
|
|
85
|
+
automaticAxes = automaticAxes,
|
|
86
|
+
padActive = padActive,
|
|
87
|
+
Pad = Pad,
|
|
88
|
+
}
|
|
@@ -1,7 +1,16 @@
|
|
|
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 _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
+
local resolveSx = _theme.resolveSx
|
|
6
|
+
local useTheme = _theme.useTheme
|
|
4
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
|
+
local _Pad = TS.import(script, script.Parent, "Pad")
|
|
9
|
+
local automaticAxes = _Pad.automaticAxes
|
|
10
|
+
local Pad = _Pad.Pad
|
|
11
|
+
local padActive = _Pad.padActive
|
|
12
|
+
local styleAutomaticSize = _Pad.styleAutomaticSize
|
|
13
|
+
local withoutPad = _Pad.withoutPad
|
|
5
14
|
local useStackStyles = TS.import(script, script.Parent, "Stack.styles").default
|
|
6
15
|
local function Stack(props)
|
|
7
16
|
local _binding = props
|
|
@@ -16,6 +25,8 @@ local function Stack(props)
|
|
|
16
25
|
local sx = _binding.sx
|
|
17
26
|
local id = _binding.id
|
|
18
27
|
local ref = _binding.ref
|
|
28
|
+
local _binding_1 = useTheme()
|
|
29
|
+
local theme = _binding_1.theme
|
|
19
30
|
local styles = useStackStyles({
|
|
20
31
|
direction = direction,
|
|
21
32
|
spacing = spacing,
|
|
@@ -24,19 +35,74 @@ local function Stack(props)
|
|
|
24
35
|
alignItems = alignItems,
|
|
25
36
|
justifyContent = justifyContent,
|
|
26
37
|
})
|
|
27
|
-
local
|
|
28
|
-
local
|
|
29
|
-
if
|
|
30
|
-
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
local
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
local pad = resolveSx(theme, sx).padding
|
|
39
|
+
local _result = pad
|
|
40
|
+
if _result ~= nil then
|
|
41
|
+
_result = _result.PaddingLeft.Offset
|
|
42
|
+
end
|
|
43
|
+
local _condition = _result
|
|
44
|
+
if _condition == nil then
|
|
45
|
+
_condition = 0
|
|
46
|
+
end
|
|
47
|
+
local left = _condition
|
|
48
|
+
local _result_1 = pad
|
|
49
|
+
if _result_1 ~= nil then
|
|
50
|
+
_result_1 = _result_1.PaddingRight.Offset
|
|
51
|
+
end
|
|
52
|
+
local _condition_1 = _result_1
|
|
53
|
+
if _condition_1 == nil then
|
|
54
|
+
_condition_1 = 0
|
|
55
|
+
end
|
|
56
|
+
local right = _condition_1
|
|
57
|
+
local _result_2 = pad
|
|
58
|
+
if _result_2 ~= nil then
|
|
59
|
+
_result_2 = _result_2.PaddingTop.Offset
|
|
60
|
+
end
|
|
61
|
+
local _condition_2 = _result_2
|
|
62
|
+
if _condition_2 == nil then
|
|
63
|
+
_condition_2 = 0
|
|
64
|
+
end
|
|
65
|
+
local top = _condition_2
|
|
66
|
+
local _result_3 = pad
|
|
67
|
+
if _result_3 ~= nil then
|
|
68
|
+
_result_3 = _result_3.PaddingBottom.Offset
|
|
69
|
+
end
|
|
70
|
+
local _condition_3 = _result_3
|
|
71
|
+
if _condition_3 == nil then
|
|
72
|
+
_condition_3 = 0
|
|
73
|
+
end
|
|
74
|
+
local bottom = _condition_3
|
|
75
|
+
local inset = padActive(left, right, top, bottom)
|
|
76
|
+
local _result_4 = sx
|
|
77
|
+
if _result_4 ~= nil then
|
|
78
|
+
_result_4 = _result_4.AutomaticSize
|
|
79
|
+
end
|
|
80
|
+
local _condition_4 = _result_4
|
|
81
|
+
if _condition_4 == nil then
|
|
82
|
+
_condition_4 = styleAutomaticSize(styles.root)
|
|
83
|
+
end
|
|
84
|
+
local auto = automaticAxes(_condition_4)
|
|
85
|
+
local _attributes = table.clone(styles.list)
|
|
86
|
+
setmetatable(_attributes, nil)
|
|
87
|
+
local body = (React.createElement(React.Fragment, nil, React.createElement("uilistlayout", _attributes), children))
|
|
88
|
+
local _attributes_1 = {}
|
|
89
|
+
local _condition_5 = id
|
|
90
|
+
if not (_condition_5 ~= 0 and _condition_5 == _condition_5 and _condition_5 ~= "" and _condition_5) then
|
|
91
|
+
_condition_5 = "Stack"
|
|
92
|
+
end
|
|
93
|
+
_attributes_1.key = _condition_5
|
|
94
|
+
_attributes_1.hostRef = ref
|
|
95
|
+
_attributes_1.base = styles.root
|
|
96
|
+
_attributes_1.className = className
|
|
97
|
+
_attributes_1.sx = if inset then withoutPad(sx) else sx
|
|
98
|
+
return React.createElement(SxHost, _attributes_1, if inset then (React.createElement(Pad, {
|
|
99
|
+
left = left,
|
|
100
|
+
right = right,
|
|
101
|
+
top = top,
|
|
102
|
+
bottom = bottom,
|
|
103
|
+
autoX = auto.x,
|
|
104
|
+
autoY = auto.y,
|
|
105
|
+
}, body)) else body)
|
|
40
106
|
end
|
|
41
107
|
local default = Stack
|
|
42
108
|
return {
|
|
@@ -25,10 +25,10 @@ local function Link(props)
|
|
|
25
25
|
local ref = _binding.ref
|
|
26
26
|
local hover, setHover = useState(false)
|
|
27
27
|
local showUnderline = underline == "always" or (underline == "hover" and hover)
|
|
28
|
+
local reserve = underline ~= "none"
|
|
28
29
|
local styles = useLinkStyles({
|
|
29
30
|
color = color,
|
|
30
31
|
disabled = disabled,
|
|
31
|
-
showUnderline = showUnderline,
|
|
32
32
|
})
|
|
33
33
|
local active = canActivate(disabled)
|
|
34
34
|
local _attributes = {
|
|
@@ -66,13 +66,23 @@ local function Link(props)
|
|
|
66
66
|
return setHover(false)
|
|
67
67
|
end,
|
|
68
68
|
}
|
|
69
|
-
local
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
local _result
|
|
70
|
+
if reserve then
|
|
71
|
+
local _attributes_1 = table.clone(styles.reserve)
|
|
72
|
+
setmetatable(_attributes_1, nil)
|
|
73
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
74
|
+
local _attributes_2 = {
|
|
75
|
+
key = "Underline",
|
|
76
|
+
}
|
|
77
|
+
for _k, _v in styles.underline do
|
|
78
|
+
_attributes_2[_k] = _v
|
|
79
|
+
end
|
|
80
|
+
_attributes_2.BackgroundTransparency = if showUnderline then 0 else 1
|
|
81
|
+
_result = (React.createElement(React.Fragment, nil, _exp, React.createElement("frame", _attributes_2)))
|
|
82
|
+
else
|
|
83
|
+
_result = nil
|
|
74
84
|
end
|
|
75
|
-
return React.createElement(SxHost, _attributes,
|
|
85
|
+
return React.createElement(SxHost, _attributes, _result)
|
|
76
86
|
end
|
|
77
87
|
local default = Link
|
|
78
88
|
return {
|
|
@@ -24,10 +24,6 @@ local useLinkStyles = componentStyles("Link", function(theme, _param)
|
|
|
24
24
|
if disabled == nil then
|
|
25
25
|
disabled = false
|
|
26
26
|
end
|
|
27
|
-
local showUnderline = _param.showUnderline
|
|
28
|
-
if showUnderline == nil then
|
|
29
|
-
showUnderline = true
|
|
30
|
-
end
|
|
31
27
|
local ink = linkColor(theme, color, disabled)
|
|
32
28
|
return createStyles({
|
|
33
29
|
root = {
|
|
@@ -48,9 +44,11 @@ local useLinkStyles = componentStyles("Link", function(theme, _param)
|
|
|
48
44
|
Position = UDim2.new(0, 0, 1, 0),
|
|
49
45
|
AnchorPoint = Vector2.new(0, 1),
|
|
50
46
|
BackgroundColor3 = ink,
|
|
51
|
-
BackgroundTransparency = if showUnderline then 0 else 1,
|
|
52
47
|
BorderSizePixel = 0,
|
|
53
48
|
},
|
|
49
|
+
reserve = {
|
|
50
|
+
PaddingBottom = UDim.new(0, 1),
|
|
51
|
+
},
|
|
54
52
|
})
|
|
55
53
|
end)
|
|
56
54
|
local default = useLinkStyles
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
1
2
|
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
import { ListItemTone } from "./listItemInk";
|
|
2
4
|
export interface ListItemProps {
|
|
3
5
|
text: string;
|
|
4
6
|
secondary?: string;
|
|
@@ -6,6 +8,10 @@ export interface ListItemProps {
|
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
dense?: boolean;
|
|
8
10
|
divider?: boolean;
|
|
11
|
+
wrap?: boolean;
|
|
12
|
+
tone?: ListItemTone;
|
|
13
|
+
leading?: React.ReactNode;
|
|
14
|
+
trailing?: React.ReactNode;
|
|
9
15
|
onActivated?: () => void;
|
|
10
16
|
}
|
|
11
17
|
declare function ListItem(props: CustomizedProps<TextButton, ListItemProps>): JSX.Element;
|
|
@@ -1,7 +1,16 @@
|
|
|
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 useState = _react.useState
|
|
7
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
4
8
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
|
+
local _listItemLayout = TS.import(script, script.Parent, "listItemLayout")
|
|
10
|
+
local listItemCopyInset = _listItemLayout.listItemCopyInset
|
|
11
|
+
local listItemFill = _listItemLayout.listItemFill
|
|
12
|
+
local listItemRowInset = _listItemLayout.listItemRowInset
|
|
13
|
+
local listItemTrailInset = _listItemLayout.listItemTrailInset
|
|
5
14
|
local useListItemStyles = TS.import(script, script.Parent, "ListItem.styles").default
|
|
6
15
|
local function ListItem(props)
|
|
7
16
|
local _binding = props
|
|
@@ -23,6 +32,13 @@ local function ListItem(props)
|
|
|
23
32
|
if divider == nil then
|
|
24
33
|
divider = false
|
|
25
34
|
end
|
|
35
|
+
local wrap = _binding.wrap
|
|
36
|
+
if wrap == nil then
|
|
37
|
+
wrap = false
|
|
38
|
+
end
|
|
39
|
+
local tone = _binding.tone
|
|
40
|
+
local leading = _binding.leading
|
|
41
|
+
local trailing = _binding.trailing
|
|
26
42
|
local onActivated = _binding.onActivated
|
|
27
43
|
local className = _binding.className
|
|
28
44
|
local sx = _binding.sx
|
|
@@ -32,62 +48,155 @@ local function ListItem(props)
|
|
|
32
48
|
selected = selected,
|
|
33
49
|
disabled = disabled,
|
|
34
50
|
dense = dense,
|
|
51
|
+
wrap = wrap,
|
|
52
|
+
tone = tone,
|
|
53
|
+
divider = divider,
|
|
54
|
+
})
|
|
55
|
+
local _binding_1 = useTheme()
|
|
56
|
+
local theme = _binding_1.theme
|
|
57
|
+
local hovering, setHovering = useState(false)
|
|
58
|
+
local down, setDown = useState(false)
|
|
59
|
+
local face = listItemFill({
|
|
60
|
+
disabled = disabled,
|
|
61
|
+
selected = selected,
|
|
62
|
+
hover = hovering and not disabled,
|
|
63
|
+
down = down and not disabled,
|
|
35
64
|
})
|
|
65
|
+
local fill = if face == "pressed" then theme.palette.action.pressed elseif face == "hover" then theme.palette.action.hover else theme.palette.action.selected
|
|
66
|
+
local pad = theme.padding.calc(if dense == true then 0.5 else 1)
|
|
67
|
+
local lead = listItemCopyInset(leading ~= nil)
|
|
68
|
+
useEffect(function()
|
|
69
|
+
if not disabled then
|
|
70
|
+
return nil
|
|
71
|
+
end
|
|
72
|
+
setHovering(false)
|
|
73
|
+
setDown(false)
|
|
74
|
+
end, { disabled })
|
|
75
|
+
local trail = listItemTrailInset(trailing ~= nil)
|
|
76
|
+
local rowInset = listItemRowInset(leading ~= nil, trailing ~= nil)
|
|
77
|
+
local textSize = UDim2.new(1, if rowInset > 0 then 0 else -pad * 2, 0, 0)
|
|
36
78
|
local _attributes = {
|
|
79
|
+
key = "Primary",
|
|
80
|
+
}
|
|
81
|
+
for _k, _v in styles.primary do
|
|
82
|
+
_attributes[_k] = _v
|
|
83
|
+
end
|
|
84
|
+
_attributes.Size = textSize
|
|
85
|
+
_attributes.Text = text
|
|
86
|
+
local _exp = React.createElement("textlabel", _attributes)
|
|
87
|
+
local _result
|
|
88
|
+
if secondary ~= nil and #secondary > 0 then
|
|
89
|
+
local _attributes_1 = {
|
|
90
|
+
key = "Secondary",
|
|
91
|
+
}
|
|
92
|
+
for _k, _v in styles.secondary do
|
|
93
|
+
_attributes_1[_k] = _v
|
|
94
|
+
end
|
|
95
|
+
_attributes_1.Size = textSize
|
|
96
|
+
_attributes_1.Text = secondary
|
|
97
|
+
_result = (React.createElement("textlabel", _attributes_1))
|
|
98
|
+
else
|
|
99
|
+
_result = nil
|
|
100
|
+
end
|
|
101
|
+
local copy = (React.createElement(React.Fragment, nil, _exp, _result))
|
|
102
|
+
local _attributes_1 = {
|
|
37
103
|
tag = "textbutton",
|
|
38
104
|
}
|
|
39
105
|
local _condition = id
|
|
40
106
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
41
107
|
_condition = "ListItem"
|
|
42
108
|
end
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
109
|
+
_attributes_1.key = _condition
|
|
110
|
+
_attributes_1.hostRef = ref
|
|
111
|
+
local _object = table.clone(styles.root)
|
|
112
|
+
setmetatable(_object, nil)
|
|
113
|
+
_object.BackgroundColor3 = fill
|
|
114
|
+
_object.BackgroundTransparency = if face == "clear" then 1 else 0
|
|
115
|
+
_attributes_1.base = _object
|
|
116
|
+
_attributes_1.className = className
|
|
117
|
+
_attributes_1.sx = sx
|
|
118
|
+
_attributes_1.state = {
|
|
49
119
|
disabled = disabled,
|
|
50
120
|
selected = selected,
|
|
121
|
+
hover = hovering,
|
|
122
|
+
pressed = down,
|
|
51
123
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
124
|
+
_attributes_1.Text = ""
|
|
125
|
+
_attributes_1.Active = not disabled
|
|
126
|
+
_attributes_1.Selectable = not disabled
|
|
127
|
+
_attributes_1.AutoButtonColor = false
|
|
128
|
+
_attributes_1.Event = {
|
|
57
129
|
Activated = function()
|
|
58
130
|
if not disabled and onActivated ~= nil then
|
|
59
131
|
onActivated()
|
|
60
132
|
end
|
|
61
133
|
end,
|
|
134
|
+
MouseEnter = function()
|
|
135
|
+
if not disabled then
|
|
136
|
+
setHovering(true)
|
|
137
|
+
end
|
|
138
|
+
end,
|
|
139
|
+
MouseLeave = function()
|
|
140
|
+
setHovering(false)
|
|
141
|
+
setDown(false)
|
|
142
|
+
end,
|
|
143
|
+
MouseButton1Down = function()
|
|
144
|
+
if not disabled then
|
|
145
|
+
setDown(true)
|
|
146
|
+
end
|
|
147
|
+
end,
|
|
148
|
+
MouseButton1Up = function()
|
|
149
|
+
return setDown(false)
|
|
150
|
+
end,
|
|
62
151
|
}
|
|
63
|
-
local
|
|
64
|
-
setmetatable(_attributes_1, nil)
|
|
65
|
-
local _exp = React.createElement("uipadding", _attributes_1)
|
|
66
|
-
local _attributes_2 = table.clone(styles.list)
|
|
152
|
+
local _attributes_2 = table.clone(styles.padding)
|
|
67
153
|
setmetatable(_attributes_2, nil)
|
|
68
|
-
local _exp_1 = React.createElement("
|
|
69
|
-
local _attributes_3 =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
154
|
+
local _exp_1 = React.createElement("uipadding", _attributes_2)
|
|
155
|
+
local _attributes_3 = table.clone(styles.list)
|
|
156
|
+
setmetatable(_attributes_3, nil)
|
|
157
|
+
local _exp_2 = React.createElement("uilistlayout", _attributes_3)
|
|
158
|
+
local _result_1
|
|
159
|
+
if rowInset > 0 then
|
|
160
|
+
local _exp_3 = React.createElement("uilistlayout", {
|
|
161
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
162
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
163
|
+
Padding = UDim.new(0, 8),
|
|
164
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
165
|
+
})
|
|
166
|
+
local _exp_4 = if lead > 0 then (React.createElement("frame", {
|
|
167
|
+
key = "Lead",
|
|
168
|
+
LayoutOrder = 0,
|
|
169
|
+
Size = UDim2.fromOffset(lead, lead),
|
|
170
|
+
BackgroundTransparency = 1,
|
|
171
|
+
BorderSizePixel = 0,
|
|
172
|
+
}, leading)) else nil
|
|
173
|
+
local _attributes_4 = table.clone(styles.list)
|
|
174
|
+
setmetatable(_attributes_4, nil)
|
|
175
|
+
_result_1 = (React.createElement("frame", {
|
|
176
|
+
key = "Body",
|
|
177
|
+
Size = UDim2.new(1, -pad * 2, 0, 0),
|
|
178
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
179
|
+
BackgroundTransparency = 1,
|
|
180
|
+
BorderSizePixel = 0,
|
|
181
|
+
}, _exp_3, _exp_4, React.createElement("frame", {
|
|
182
|
+
key = "Copy",
|
|
183
|
+
LayoutOrder = 1,
|
|
184
|
+
Size = UDim2.new(1, -rowInset, 0, 0),
|
|
185
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
186
|
+
BackgroundTransparency = 1,
|
|
187
|
+
BorderSizePixel = 0,
|
|
188
|
+
}, React.createElement("uilistlayout", _attributes_4), copy), if trail > 0 then (React.createElement("frame", {
|
|
189
|
+
key = "Trail",
|
|
190
|
+
LayoutOrder = 2,
|
|
191
|
+
Size = UDim2.new(0, trail, 0, 0),
|
|
192
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
193
|
+
BackgroundTransparency = 1,
|
|
194
|
+
BorderSizePixel = 0,
|
|
195
|
+
}, trailing)) else nil))
|
|
87
196
|
else
|
|
88
|
-
|
|
197
|
+
_result_1 = copy
|
|
89
198
|
end
|
|
90
|
-
local
|
|
199
|
+
local _result_2
|
|
91
200
|
if divider == true then
|
|
92
201
|
local _attributes_4 = {
|
|
93
202
|
key = "Divider",
|
|
@@ -95,11 +204,17 @@ local function ListItem(props)
|
|
|
95
204
|
for _k, _v in styles.divider do
|
|
96
205
|
_attributes_4[_k] = _v
|
|
97
206
|
end
|
|
98
|
-
|
|
207
|
+
local _attributes_5 = {
|
|
208
|
+
key = "Line",
|
|
209
|
+
}
|
|
210
|
+
for _k, _v in styles.line do
|
|
211
|
+
_attributes_5[_k] = _v
|
|
212
|
+
end
|
|
213
|
+
_result_2 = (React.createElement("frame", _attributes_4, React.createElement("frame", _attributes_5)))
|
|
99
214
|
else
|
|
100
|
-
|
|
215
|
+
_result_2 = nil
|
|
101
216
|
end
|
|
102
|
-
return React.createElement(SxHost,
|
|
217
|
+
return React.createElement(SxHost, _attributes_1, _exp_1, _exp_2, _result_1, _result_2)
|
|
103
218
|
end
|
|
104
219
|
local default = ListItem
|
|
105
220
|
return {
|