@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,6 +1,10 @@
|
|
|
1
|
+
import { ListItemTone } from "./listItemInk";
|
|
1
2
|
declare const useListItemStyles: (props: {
|
|
2
3
|
selected?: boolean;
|
|
3
4
|
disabled?: boolean;
|
|
4
5
|
dense?: boolean;
|
|
6
|
+
wrap?: boolean;
|
|
7
|
+
tone?: ListItemTone;
|
|
8
|
+
divider?: boolean;
|
|
5
9
|
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
6
10
|
export default useListItemStyles;
|
|
@@ -3,6 +3,10 @@ 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 listItemInk = TS.import(script, script.Parent, "listItemInk").listItemInk
|
|
7
|
+
local _listItemLayout = TS.import(script, script.Parent, "listItemLayout")
|
|
8
|
+
local listItemLabelLayout = _listItemLayout.listItemLabelLayout
|
|
9
|
+
local listItemSecondaryLayout = _listItemLayout.listItemSecondaryLayout
|
|
6
10
|
local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
7
11
|
local selected = _param.selected
|
|
8
12
|
if selected == nil then
|
|
@@ -16,8 +20,29 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
16
20
|
if dense == nil then
|
|
17
21
|
dense = false
|
|
18
22
|
end
|
|
23
|
+
local wrap = _param.wrap
|
|
24
|
+
if wrap == nil then
|
|
25
|
+
wrap = false
|
|
26
|
+
end
|
|
27
|
+
local tone = _param.tone
|
|
28
|
+
local divider = _param.divider
|
|
29
|
+
if divider == nil then
|
|
30
|
+
divider = false
|
|
31
|
+
end
|
|
19
32
|
local pad = theme.padding.calc(if dense == true then 0.5 else 1)
|
|
20
|
-
|
|
33
|
+
local primaryLayout = listItemLabelLayout(wrap)
|
|
34
|
+
local secondaryLayout = listItemSecondaryLayout()
|
|
35
|
+
local ink = listItemInk(tone, disabled)
|
|
36
|
+
local primaryColor = if ink == "error" then theme.palette.status.error.main elseif ink == "disabled" then theme.palette.text.disabled else theme.palette.text.primary
|
|
37
|
+
local textBox = function(label)
|
|
38
|
+
return {
|
|
39
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
40
|
+
Size = UDim2.new(label.widthScale, 0, 0, 0),
|
|
41
|
+
TextWrapped = label.wrapped,
|
|
42
|
+
TextTruncate = if label.truncate then Enum.TextTruncate.AtEnd else Enum.TextTruncate.None,
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
local _object = {
|
|
21
46
|
root = {
|
|
22
47
|
Size = UDim2.new(1, 0, 0, 0),
|
|
23
48
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
@@ -31,7 +56,7 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
31
56
|
},
|
|
32
57
|
padding = {
|
|
33
58
|
PaddingTop = UDim.new(0, pad),
|
|
34
|
-
PaddingBottom = UDim.new(0, pad),
|
|
59
|
+
PaddingBottom = UDim.new(0, if divider then 0 else pad),
|
|
35
60
|
PaddingLeft = UDim.new(0, pad),
|
|
36
61
|
PaddingRight = UDim.new(0, pad),
|
|
37
62
|
},
|
|
@@ -39,35 +64,49 @@ local useListItemStyles = componentStyles("ListItem", function(theme, _param)
|
|
|
39
64
|
FillDirection = Enum.FillDirection.Vertical,
|
|
40
65
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
41
66
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
}
|
|
68
|
+
local _left = "primary"
|
|
69
|
+
local _object_1 = {
|
|
70
|
+
LayoutOrder = 1,
|
|
71
|
+
}
|
|
72
|
+
for _k, _v in textBox(primaryLayout) do
|
|
73
|
+
_object_1[_k] = _v
|
|
74
|
+
end
|
|
75
|
+
_object_1.BackgroundTransparency = 1
|
|
76
|
+
_object_1.BorderSizePixel = 0
|
|
77
|
+
_object_1.Font = theme.typography.fontFamilies.default
|
|
78
|
+
_object_1.TextSize = if dense == true then theme.typography.fontSizes.caption else theme.typography.fontSizes.body
|
|
79
|
+
_object_1.TextColor3 = primaryColor
|
|
80
|
+
_object_1.TextXAlignment = Enum.TextXAlignment.Left
|
|
81
|
+
_object[_left] = _object_1
|
|
82
|
+
local _left_1 = "secondary"
|
|
83
|
+
local _object_2 = {
|
|
84
|
+
LayoutOrder = 2,
|
|
85
|
+
}
|
|
86
|
+
for _k, _v in textBox(secondaryLayout) do
|
|
87
|
+
_object_2[_k] = _v
|
|
88
|
+
end
|
|
89
|
+
_object_2.BackgroundTransparency = 1
|
|
90
|
+
_object_2.BorderSizePixel = 0
|
|
91
|
+
_object_2.Font = theme.typography.fontFamilies.default
|
|
92
|
+
_object_2.TextSize = theme.typography.fontSizes.caption
|
|
93
|
+
_object_2.TextColor3 = if disabled then theme.palette.text.disabled else theme.palette.text.secondary
|
|
94
|
+
_object_2.TextXAlignment = Enum.TextXAlignment.Left
|
|
95
|
+
_object[_left_1] = _object_2
|
|
96
|
+
_object.divider = {
|
|
97
|
+
LayoutOrder = 3,
|
|
98
|
+
Size = UDim2.new(1, 0, 0, pad),
|
|
99
|
+
BackgroundTransparency = 1,
|
|
100
|
+
BorderSizePixel = 0,
|
|
101
|
+
}
|
|
102
|
+
_object.line = {
|
|
103
|
+
AnchorPoint = Vector2.new(0, 1),
|
|
104
|
+
Position = UDim2.fromScale(0, 1),
|
|
105
|
+
Size = UDim2.new(1, 0, 0, 1),
|
|
106
|
+
BackgroundColor3 = theme.palette.divider,
|
|
107
|
+
BorderSizePixel = 0,
|
|
108
|
+
}
|
|
109
|
+
return createStyles(_object)
|
|
71
110
|
end)
|
|
72
111
|
local default = useListItemStyles
|
|
73
112
|
return {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Primary label color. Disabled wins over a danger tone.
|
|
3
|
+
local function listItemInk(tone, disabled)
|
|
4
|
+
if disabled == true then
|
|
5
|
+
return "disabled"
|
|
6
|
+
end
|
|
7
|
+
if tone == "danger" then
|
|
8
|
+
return "error"
|
|
9
|
+
end
|
|
10
|
+
return "primary"
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
listItemInk = listItemInk,
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ListItemFill = "clear" | "hover" | "pressed" | "selected";
|
|
2
|
+
export declare function listItemFill(input: {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
hover: boolean;
|
|
6
|
+
down: boolean;
|
|
7
|
+
}): ListItemFill;
|
|
8
|
+
export interface ListItemLabelLayout {
|
|
9
|
+
widthScale: number;
|
|
10
|
+
wrapped: boolean;
|
|
11
|
+
truncate: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Primary fills the row. It stays one line unless wrap is set. */
|
|
14
|
+
export declare function listItemLabelLayout(wrap?: boolean): ListItemLabelLayout;
|
|
15
|
+
/** Secondary wraps inside the same row. */
|
|
16
|
+
export declare function listItemSecondaryLayout(): ListItemLabelLayout;
|
|
17
|
+
/** Pixels the title column yields when a leading avatar or icon is present. */
|
|
18
|
+
export declare function listItemCopyInset(leading?: boolean): 0 | 40;
|
|
19
|
+
/** Pixels reserved for a control on the far side of the row. */
|
|
20
|
+
export declare function listItemTrailInset(trailing?: boolean): 0 | 48;
|
|
21
|
+
/** Title column inset, including the gaps beside any side slots. */
|
|
22
|
+
export declare function listItemRowInset(leading?: boolean, trailing?: boolean): number;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function listItemFill(input)
|
|
3
|
+
if input.disabled then
|
|
4
|
+
return "clear"
|
|
5
|
+
end
|
|
6
|
+
if input.down then
|
|
7
|
+
return "pressed"
|
|
8
|
+
end
|
|
9
|
+
if input.hover then
|
|
10
|
+
return "hover"
|
|
11
|
+
end
|
|
12
|
+
if input.selected then
|
|
13
|
+
return "selected"
|
|
14
|
+
end
|
|
15
|
+
return "clear"
|
|
16
|
+
end
|
|
17
|
+
--* Primary fills the row. It stays one line unless wrap is set.
|
|
18
|
+
local function listItemLabelLayout(wrap)
|
|
19
|
+
if wrap == true then
|
|
20
|
+
return {
|
|
21
|
+
widthScale = 1,
|
|
22
|
+
wrapped = true,
|
|
23
|
+
truncate = false,
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
return {
|
|
27
|
+
widthScale = 1,
|
|
28
|
+
wrapped = false,
|
|
29
|
+
truncate = true,
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
--* Secondary wraps inside the same row.
|
|
33
|
+
local function listItemSecondaryLayout()
|
|
34
|
+
return {
|
|
35
|
+
widthScale = 1,
|
|
36
|
+
wrapped = true,
|
|
37
|
+
truncate = false,
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
--* Pixels the title column yields when a leading avatar or icon is present.
|
|
41
|
+
local function listItemCopyInset(leading)
|
|
42
|
+
return if leading == true then 40 else 0
|
|
43
|
+
end
|
|
44
|
+
--* Pixels reserved for a control on the far side of the row.
|
|
45
|
+
local function listItemTrailInset(trailing)
|
|
46
|
+
return if trailing == true then 48 else 0
|
|
47
|
+
end
|
|
48
|
+
--* Title column inset, including the gaps beside any side slots.
|
|
49
|
+
local function listItemRowInset(leading, trailing)
|
|
50
|
+
local lead = listItemCopyInset(leading)
|
|
51
|
+
local trail = listItemTrailInset(trailing)
|
|
52
|
+
local gaps = 0
|
|
53
|
+
if lead > 0 then
|
|
54
|
+
gaps += 8
|
|
55
|
+
end
|
|
56
|
+
if trail > 0 then
|
|
57
|
+
gaps += 8
|
|
58
|
+
end
|
|
59
|
+
return lead + trail + gaps
|
|
60
|
+
end
|
|
61
|
+
return {
|
|
62
|
+
listItemFill = listItemFill,
|
|
63
|
+
listItemLabelLayout = listItemLabelLayout,
|
|
64
|
+
listItemSecondaryLayout = listItemSecondaryLayout,
|
|
65
|
+
listItemCopyInset = listItemCopyInset,
|
|
66
|
+
listItemTrailInset = listItemTrailInset,
|
|
67
|
+
listItemRowInset = listItemRowInset,
|
|
68
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { MarkdownLinkPayload } from "../parseMarkdown";
|
|
2
3
|
export interface MarkdownProps {
|
|
3
4
|
value?: string;
|
|
5
|
+
onLink?: (payload: MarkdownLinkPayload) => void;
|
|
4
6
|
}
|
|
5
7
|
declare function Markdown(props: CustomizedProps<Frame, MarkdownProps>): JSX.Element;
|
|
6
8
|
export default Markdown;
|
|
@@ -1,11 +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 useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
5
|
+
local CodeEditor = TS.import(script, script.Parent.Parent.Parent, "codeEditor").CodeEditor
|
|
4
6
|
local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
|
|
5
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
|
+
local Link = TS.import(script, script.Parent.Parent.Parent, "link").Link
|
|
6
9
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
7
10
|
local _parseMarkdown = TS.import(script, script.Parent.Parent, "parseMarkdown")
|
|
11
|
+
local inlinePieces = _parseMarkdown.inlinePieces
|
|
8
12
|
local inlinesToRichText = _parseMarkdown.inlinesToRichText
|
|
13
|
+
local markdownLinkPayload = _parseMarkdown.markdownLinkPayload
|
|
9
14
|
local parseMarkdown = _parseMarkdown.parseMarkdown
|
|
10
15
|
local useMarkdownStyles = TS.import(script, script.Parent, "Markdown.styles").default
|
|
11
16
|
local function headingVariant(level)
|
|
@@ -26,25 +31,28 @@ local function headingVariant(level)
|
|
|
26
31
|
end
|
|
27
32
|
return "h6"
|
|
28
33
|
end
|
|
29
|
-
local function textSizeFor(variant)
|
|
34
|
+
local function textSizeFor(sizes, variant)
|
|
30
35
|
if variant == "h1" then
|
|
31
|
-
return
|
|
36
|
+
return sizes.h1
|
|
32
37
|
end
|
|
33
38
|
if variant == "h2" then
|
|
34
|
-
return
|
|
39
|
+
return sizes.h2
|
|
35
40
|
end
|
|
36
41
|
if variant == "h3" then
|
|
37
|
-
return
|
|
42
|
+
return sizes.h3
|
|
38
43
|
end
|
|
39
44
|
if variant == "h4" then
|
|
40
|
-
return
|
|
45
|
+
return sizes.h4
|
|
41
46
|
end
|
|
42
|
-
if variant == "h5"
|
|
43
|
-
return
|
|
47
|
+
if variant == "h5" then
|
|
48
|
+
return sizes.h5
|
|
44
49
|
end
|
|
45
|
-
|
|
50
|
+
if variant == "h6" then
|
|
51
|
+
return sizes.h6
|
|
52
|
+
end
|
|
53
|
+
return sizes.body
|
|
46
54
|
end
|
|
47
|
-
local function richLabel(key, styles, inlines, variant, order)
|
|
55
|
+
local function richLabel(key, styles, inlines, variant, order, size, sizes)
|
|
48
56
|
local text = inlinesToRichText(inlines)
|
|
49
57
|
local _attributes = {
|
|
50
58
|
key = key,
|
|
@@ -52,13 +60,104 @@ local function richLabel(key, styles, inlines, variant, order)
|
|
|
52
60
|
for _k, _v in styles.text do
|
|
53
61
|
_attributes[_k] = _v
|
|
54
62
|
end
|
|
63
|
+
for _k, _v in (if size ~= nil then {
|
|
64
|
+
Size = size,
|
|
65
|
+
} else {}) do
|
|
66
|
+
_attributes[_k] = _v
|
|
67
|
+
end
|
|
55
68
|
_attributes.LayoutOrder = order
|
|
56
69
|
_attributes.Text = text
|
|
57
|
-
_attributes.TextSize = textSizeFor(variant)
|
|
70
|
+
_attributes.TextSize = textSizeFor(sizes or {}, variant)
|
|
58
71
|
_attributes.Font = if variant ~= nil and variant ~= "body" then Enum.Font.SourceSansBold else Enum.Font.SourceSans
|
|
59
72
|
return React.createElement("textlabel", _attributes)
|
|
60
73
|
end
|
|
61
|
-
local function
|
|
74
|
+
local function inlineHasLink(inlines)
|
|
75
|
+
for _, part in inlines do
|
|
76
|
+
if markdownLinkPayload(part) ~= nil then
|
|
77
|
+
return true
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
return false
|
|
81
|
+
end
|
|
82
|
+
local function inlineFlow(key, styles, inlines, variant, order, onLink, sizes, flow)
|
|
83
|
+
if flow == nil then
|
|
84
|
+
flow = styles.flow
|
|
85
|
+
end
|
|
86
|
+
if not inlineHasLink(inlines) then
|
|
87
|
+
local span = if flow ~= styles.flow then flow.Size else nil
|
|
88
|
+
return richLabel(key, styles, inlines, variant, order, span, sizes)
|
|
89
|
+
end
|
|
90
|
+
local pieces = inlinePieces(inlines)
|
|
91
|
+
local textSize = textSizeFor(sizes or {}, variant)
|
|
92
|
+
local font = if variant ~= nil and variant ~= "body" then Enum.Font.SourceSansBold else Enum.Font.SourceSans
|
|
93
|
+
local _attributes = {
|
|
94
|
+
key = key,
|
|
95
|
+
}
|
|
96
|
+
for _k, _v in flow do
|
|
97
|
+
_attributes[_k] = _v
|
|
98
|
+
end
|
|
99
|
+
_attributes.LayoutOrder = order
|
|
100
|
+
local _attributes_1 = table.clone(styles.flowLayout)
|
|
101
|
+
setmetatable(_attributes_1, nil)
|
|
102
|
+
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
103
|
+
-- ▼ ReadonlyArray.map ▼
|
|
104
|
+
local _newValue = table.create(#pieces)
|
|
105
|
+
local _callback = function(piece, index)
|
|
106
|
+
if piece.kind == "break" then
|
|
107
|
+
return React.createElement("frame", {
|
|
108
|
+
key = `br-{index}`,
|
|
109
|
+
LayoutOrder = index,
|
|
110
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
111
|
+
BackgroundTransparency = 1,
|
|
112
|
+
BorderSizePixel = 0,
|
|
113
|
+
})
|
|
114
|
+
end
|
|
115
|
+
if piece.kind == "link" then
|
|
116
|
+
local payload = markdownLinkPayload({
|
|
117
|
+
kind = "link",
|
|
118
|
+
text = piece.text,
|
|
119
|
+
href = piece.href,
|
|
120
|
+
})
|
|
121
|
+
if payload == nil then
|
|
122
|
+
return nil
|
|
123
|
+
end
|
|
124
|
+
return React.createElement(Link, {
|
|
125
|
+
key = `ln-{index}`,
|
|
126
|
+
text = payload.text,
|
|
127
|
+
color = "primary",
|
|
128
|
+
sx = {
|
|
129
|
+
TextSize = textSize,
|
|
130
|
+
Font = font,
|
|
131
|
+
LayoutOrder = index,
|
|
132
|
+
},
|
|
133
|
+
onActivated = function()
|
|
134
|
+
local _result = onLink
|
|
135
|
+
if _result ~= nil then
|
|
136
|
+
_result = _result(payload)
|
|
137
|
+
end
|
|
138
|
+
return _result
|
|
139
|
+
end,
|
|
140
|
+
})
|
|
141
|
+
end
|
|
142
|
+
local _attributes_2 = {
|
|
143
|
+
key = `wd-{index}`,
|
|
144
|
+
}
|
|
145
|
+
for _k, _v in styles.word do
|
|
146
|
+
_attributes_2[_k] = _v
|
|
147
|
+
end
|
|
148
|
+
_attributes_2.LayoutOrder = index
|
|
149
|
+
_attributes_2.Text = piece.text
|
|
150
|
+
_attributes_2.TextSize = textSize
|
|
151
|
+
_attributes_2.Font = font
|
|
152
|
+
return React.createElement("textlabel", _attributes_2)
|
|
153
|
+
end
|
|
154
|
+
for _k, _v in pieces do
|
|
155
|
+
_newValue[_k] = _callback(_v, _k - 1, pieces)
|
|
156
|
+
end
|
|
157
|
+
-- ▲ ReadonlyArray.map ▲
|
|
158
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
159
|
+
end
|
|
160
|
+
local function renderBlock(block, index, styles, sizes, onLink)
|
|
62
161
|
if block.kind == "heading" then
|
|
63
162
|
local _attributes = {
|
|
64
163
|
key = `h-{index}`,
|
|
@@ -67,7 +166,7 @@ local function renderBlock(block, index, styles)
|
|
|
67
166
|
_attributes[_k] = _v
|
|
68
167
|
end
|
|
69
168
|
_attributes.LayoutOrder = index
|
|
70
|
-
return React.createElement("frame", _attributes,
|
|
169
|
+
return React.createElement("frame", _attributes, inlineFlow("Text", styles, block.inlines, headingVariant(block.level), nil, onLink, sizes))
|
|
71
170
|
end
|
|
72
171
|
if block.kind == "paragraph" then
|
|
73
172
|
local _attributes = {
|
|
@@ -77,30 +176,19 @@ local function renderBlock(block, index, styles)
|
|
|
77
176
|
_attributes[_k] = _v
|
|
78
177
|
end
|
|
79
178
|
_attributes.LayoutOrder = index
|
|
80
|
-
return React.createElement("frame", _attributes,
|
|
179
|
+
return React.createElement("frame", _attributes, inlineFlow("Text", styles, block.inlines, "body", nil, onLink, sizes))
|
|
81
180
|
end
|
|
82
181
|
if block.kind == "code" then
|
|
83
|
-
|
|
182
|
+
return React.createElement(CodeEditor, {
|
|
84
183
|
key = `c-{index}`,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
184
|
+
value = block.text,
|
|
185
|
+
language = block.language,
|
|
186
|
+
readOnly = true,
|
|
187
|
+
className = {
|
|
188
|
+
LayoutOrder = index,
|
|
189
|
+
Size = (styles.block).Size,
|
|
190
|
+
},
|
|
92
191
|
})
|
|
93
|
-
local _attributes_1 = table.clone(styles.codePad)
|
|
94
|
-
setmetatable(_attributes_1, nil)
|
|
95
|
-
local _exp_1 = React.createElement("uipadding", _attributes_1)
|
|
96
|
-
local _attributes_2 = {
|
|
97
|
-
key = "Code",
|
|
98
|
-
}
|
|
99
|
-
for _k, _v in styles.codeText do
|
|
100
|
-
_attributes_2[_k] = _v
|
|
101
|
-
end
|
|
102
|
-
_attributes_2.Text = block.text
|
|
103
|
-
return React.createElement("frame", _attributes, _exp, _exp_1, React.createElement("textlabel", _attributes_2))
|
|
104
192
|
end
|
|
105
193
|
if block.kind == "hr" then
|
|
106
194
|
return React.createElement(Divider, {
|
|
@@ -109,6 +197,7 @@ local function renderBlock(block, index, styles)
|
|
|
109
197
|
padding = 0,
|
|
110
198
|
className = {
|
|
111
199
|
LayoutOrder = index,
|
|
200
|
+
Size = (styles.block).Size,
|
|
112
201
|
},
|
|
113
202
|
})
|
|
114
203
|
end
|
|
@@ -120,19 +209,122 @@ local function renderBlock(block, index, styles)
|
|
|
120
209
|
_attributes[_k] = _v
|
|
121
210
|
end
|
|
122
211
|
_attributes.LayoutOrder = index
|
|
123
|
-
local
|
|
124
|
-
|
|
125
|
-
|
|
212
|
+
local _attributes_1 = table.clone(styles.quoteCorner)
|
|
213
|
+
setmetatable(_attributes_1, nil)
|
|
214
|
+
local _exp = React.createElement("uicorner", _attributes_1)
|
|
215
|
+
local _attributes_2 = table.clone(styles.quoteBarPad)
|
|
216
|
+
setmetatable(_attributes_2, nil)
|
|
217
|
+
local _exp_1 = React.createElement("uipadding", _attributes_2)
|
|
218
|
+
local _attributes_3 = {
|
|
219
|
+
key = "Face",
|
|
220
|
+
}
|
|
221
|
+
for _k, _v in styles.quoteFace do
|
|
222
|
+
_attributes_3[_k] = _v
|
|
223
|
+
end
|
|
224
|
+
local _attributes_4 = table.clone(styles.quoteFaceCorner)
|
|
225
|
+
setmetatable(_attributes_4, nil)
|
|
226
|
+
local _exp_2 = React.createElement("uicorner", _attributes_4)
|
|
227
|
+
local _attributes_5 = table.clone(styles.quotePad)
|
|
228
|
+
setmetatable(_attributes_5, nil)
|
|
229
|
+
local _exp_3 = React.createElement("uipadding", _attributes_5)
|
|
230
|
+
local _attributes_6 = table.clone(styles.quoteStack)
|
|
231
|
+
setmetatable(_attributes_6, nil)
|
|
232
|
+
local _exp_4 = React.createElement("uilistlayout", _attributes_6)
|
|
233
|
+
local _exp_5 = block.paragraphs
|
|
234
|
+
-- ▼ ReadonlyArray.map ▼
|
|
235
|
+
local _newValue = table.create(#_exp_5)
|
|
236
|
+
local _callback = function(inlines, para)
|
|
237
|
+
return inlineFlow(`p-{para}`, styles, inlines, "body", para, onLink, sizes, styles.quoteFlow)
|
|
238
|
+
end
|
|
239
|
+
for _k, _v in _exp_5 do
|
|
240
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp_5)
|
|
241
|
+
end
|
|
242
|
+
-- ▲ ReadonlyArray.map ▲
|
|
243
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, React.createElement("frame", _attributes_3, _exp_2, _exp_3, _exp_4, _newValue))
|
|
244
|
+
end
|
|
245
|
+
if block.kind == "table" then
|
|
246
|
+
local alignOf = function(align)
|
|
247
|
+
if align == "center" then
|
|
248
|
+
return Enum.TextXAlignment.Center
|
|
249
|
+
end
|
|
250
|
+
if align == "right" then
|
|
251
|
+
return Enum.TextXAlignment.Right
|
|
252
|
+
end
|
|
253
|
+
return Enum.TextXAlignment.Left
|
|
254
|
+
end
|
|
255
|
+
local _array = { block.header }
|
|
256
|
+
local _length = #_array
|
|
257
|
+
local _array_1 = block.rows
|
|
258
|
+
table.move(_array_1, 1, #_array_1, _length + 1, _array)
|
|
259
|
+
local lines = _array
|
|
260
|
+
local _attributes = {
|
|
261
|
+
key = `t-{index}`,
|
|
262
|
+
}
|
|
263
|
+
for _k, _v in styles.tableScroll do
|
|
264
|
+
_attributes[_k] = _v
|
|
265
|
+
end
|
|
266
|
+
_attributes.LayoutOrder = index
|
|
126
267
|
local _attributes_1 = {
|
|
127
|
-
key = "
|
|
268
|
+
key = "Grid",
|
|
128
269
|
}
|
|
129
|
-
for _k, _v in styles.
|
|
270
|
+
for _k, _v in styles.tableGrid do
|
|
130
271
|
_attributes_1[_k] = _v
|
|
131
272
|
end
|
|
132
|
-
local
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
273
|
+
local _exp = React.createElement("uilistlayout", {
|
|
274
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
275
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
276
|
+
})
|
|
277
|
+
-- ▼ ReadonlyArray.map ▼
|
|
278
|
+
local _newValue = table.create(#lines)
|
|
279
|
+
local _callback = function(row, rowIndex)
|
|
280
|
+
local _attributes_2 = {
|
|
281
|
+
key = `tr-{rowIndex}`,
|
|
282
|
+
}
|
|
283
|
+
for _k, _v in styles.tableRow do
|
|
284
|
+
_attributes_2[_k] = _v
|
|
285
|
+
end
|
|
286
|
+
for _k, _v in (if rowIndex == 0 then styles.tableHead else {}) do
|
|
287
|
+
_attributes_2[_k] = _v
|
|
288
|
+
end
|
|
289
|
+
_attributes_2.LayoutOrder = rowIndex
|
|
290
|
+
local _attributes_3 = table.clone(styles.tableStroke)
|
|
291
|
+
setmetatable(_attributes_3, nil)
|
|
292
|
+
local _exp_1 = React.createElement("uistroke", _attributes_3)
|
|
293
|
+
local _exp_2 = React.createElement("uilistlayout", {
|
|
294
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
295
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
296
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
297
|
+
})
|
|
298
|
+
-- ▼ ReadonlyArray.map ▼
|
|
299
|
+
local _newValue_1 = table.create(#row)
|
|
300
|
+
local _callback_1 = function(cell, col)
|
|
301
|
+
local _attributes_4 = {
|
|
302
|
+
key = `td-{col}`,
|
|
303
|
+
}
|
|
304
|
+
for _k, _v in styles.tableCell do
|
|
305
|
+
_attributes_4[_k] = _v
|
|
306
|
+
end
|
|
307
|
+
for _k, _v in (if rowIndex == 0 then styles.tableHeadText else {}) do
|
|
308
|
+
_attributes_4[_k] = _v
|
|
309
|
+
end
|
|
310
|
+
_attributes_4.LayoutOrder = col
|
|
311
|
+
_attributes_4.Text = inlinesToRichText(cell)
|
|
312
|
+
_attributes_4.TextXAlignment = alignOf(block.align[col + 1] or "left")
|
|
313
|
+
local _attributes_5 = table.clone(styles.tableCellPad)
|
|
314
|
+
setmetatable(_attributes_5, nil)
|
|
315
|
+
return React.createElement("textlabel", _attributes_4, React.createElement("uipadding", _attributes_5))
|
|
316
|
+
end
|
|
317
|
+
for _k, _v in row do
|
|
318
|
+
_newValue_1[_k] = _callback_1(_v, _k - 1, row)
|
|
319
|
+
end
|
|
320
|
+
-- ▲ ReadonlyArray.map ▲
|
|
321
|
+
return React.createElement("frame", _attributes_2, _exp_1, _exp_2, _newValue_1)
|
|
322
|
+
end
|
|
323
|
+
for _k, _v in lines do
|
|
324
|
+
_newValue[_k] = _callback(_v, _k - 1, lines)
|
|
325
|
+
end
|
|
326
|
+
-- ▲ ReadonlyArray.map ▲
|
|
327
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _newValue))
|
|
136
328
|
end
|
|
137
329
|
if block.kind == "list" then
|
|
138
330
|
local _attributes = {
|
|
@@ -167,7 +359,7 @@ local function renderBlock(block, index, styles)
|
|
|
167
359
|
_attributes_1[_k] = _v
|
|
168
360
|
end
|
|
169
361
|
_attributes_1.LayoutOrder = itemIndex
|
|
170
|
-
return React.createElement("frame", _attributes_1,
|
|
362
|
+
return React.createElement("frame", _attributes_1, inlineFlow("Text", styles, labeled, "body", nil, onLink, sizes))
|
|
171
363
|
end
|
|
172
364
|
for _k, _v in _exp_1 do
|
|
173
365
|
_newValue[_k] = _callback(_v, _k - 1, _exp_1)
|
|
@@ -183,11 +375,14 @@ local function Markdown(props)
|
|
|
183
375
|
if value == nil then
|
|
184
376
|
value = ""
|
|
185
377
|
end
|
|
378
|
+
local onLink = _binding.onLink
|
|
186
379
|
local className = _binding.className
|
|
187
380
|
local sx = _binding.sx
|
|
188
381
|
local id = _binding.id
|
|
189
382
|
local ref = _binding.ref
|
|
190
383
|
local styles = useMarkdownStyles()
|
|
384
|
+
local _binding_1 = useTheme()
|
|
385
|
+
local theme = _binding_1.theme
|
|
191
386
|
local blocks = parseMarkdown(value)
|
|
192
387
|
local _attributes = {
|
|
193
388
|
tag = "frame",
|
|
@@ -201,19 +396,22 @@ local function Markdown(props)
|
|
|
201
396
|
_attributes.base = styles.root
|
|
202
397
|
_attributes.className = className
|
|
203
398
|
_attributes.sx = sx
|
|
204
|
-
local _attributes_1 = table.clone(styles.
|
|
399
|
+
local _attributes_1 = table.clone(styles.inset)
|
|
205
400
|
setmetatable(_attributes_1, nil)
|
|
206
|
-
local _exp = React.createElement("
|
|
401
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
402
|
+
local _attributes_2 = table.clone(styles.layout)
|
|
403
|
+
setmetatable(_attributes_2, nil)
|
|
404
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
207
405
|
-- ▼ ReadonlyArray.map ▼
|
|
208
406
|
local _newValue = table.create(#blocks)
|
|
209
407
|
local _callback = function(block, index)
|
|
210
|
-
return renderBlock(block, index, styles)
|
|
408
|
+
return renderBlock(block, index, styles, theme.typography.fontSizes, onLink)
|
|
211
409
|
end
|
|
212
410
|
for _k, _v in blocks do
|
|
213
411
|
_newValue[_k] = _callback(_v, _k - 1, blocks)
|
|
214
412
|
end
|
|
215
413
|
-- ▲ ReadonlyArray.map ▲
|
|
216
|
-
return React.createElement(SxHost, _attributes, _exp, _newValue)
|
|
414
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _newValue)
|
|
217
415
|
end
|
|
218
416
|
local default = Markdown
|
|
219
417
|
return {
|