@rbxts/uiblox 0.2.0-alpha.36 → 0.2.0-alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -18
- package/out/theme/constants/NumberConstants.d.ts +10 -0
- package/out/theme/constants/NumberConstants.luau +12 -0
- package/out/theme/interfaces/density/controlMetrics.luau +2 -2
- package/out/theme/interfaces/palette/Palette.d.ts +7 -0
- package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
- package/out/theme/interfaces/theme/Theme.d.ts +6 -0
- package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +3 -1
- package/out/theme/interfaces/typography/Variants.luau +25 -1
- package/out/theme/styles/utilities/focusRing.d.ts +7 -0
- package/out/theme/styles/utilities/focusRing.luau +14 -0
- package/out/theme/styles/utilities/index.d.ts +1 -0
- package/out/theme/styles/utilities/init.luau +3 -0
- package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
- package/out/theme/styles/utilities/resolveSx.luau +53 -12
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/theme/themes/createPalette.luau +15 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.luau +112 -32
- package/out/ui/packages/accordion/components/Accordion.styles.luau +70 -32
- package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
- package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +39 -12
- package/out/ui/packages/alert/components/Alert.styles.luau +44 -22
- package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
- package/out/ui/packages/alert/components/alertAction.luau +11 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
- package/out/ui/packages/appBar/components/AppBar.luau +88 -22
- package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -11
- package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
- package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +9 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +107 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +55 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
- package/out/ui/packages/avatarGroup/index.d.ts +3 -0
- package/out/ui/packages/avatarGroup/init.luau +6 -0
- package/out/ui/packages/badge/components/Badge.luau +14 -11
- package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +24 -3
- package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +21 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +10 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
- package/out/ui/packages/button/components/Button.d.ts +2 -0
- package/out/ui/packages/button/components/Button.luau +112 -36
- package/out/ui/packages/button/components/Button.styles.luau +2 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
- package/out/ui/packages/button/components/buttonLook.luau +11 -0
- package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
- package/out/ui/packages/button/components/buttonPaint.luau +70 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +14 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +117 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
- package/out/ui/packages/buttonGroup/index.d.ts +3 -0
- package/out/ui/packages/buttonGroup/init.luau +6 -0
- package/out/ui/packages/card/components/Card.d.ts +1 -0
- package/out/ui/packages/card/components/Card.luau +21 -2
- package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
- package/out/ui/packages/card/components/Card.styles.luau +20 -9
- package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
- package/out/ui/packages/card/components/cardWidth.luau +36 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +18 -5
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -32
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +7 -5
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
- package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
- package/out/ui/packages/chip/components/Chip.luau +16 -14
- package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
- package/out/ui/packages/chip/components/Chip.styles.luau +15 -9
- package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
- package/out/ui/packages/chip/components/chipTone.luau +11 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
- package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
- package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
- package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
- package/out/ui/packages/codeEditor/index.d.ts +2 -0
- package/out/ui/packages/codeEditor/init.luau +5 -0
- package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
- package/out/ui/packages/collapse/components/Collapse.luau +34 -0
- package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
- package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
- package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
- package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
- package/out/ui/packages/collapse/index.d.ts +3 -0
- package/out/ui/packages/collapse/init.luau +6 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
- package/out/ui/packages/colorPicker/index.d.ts +1 -1
- package/out/ui/packages/colorPicker/init.luau +2 -0
- package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
- package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
- package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
- package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
- package/out/ui/packages/copyButton/index.d.ts +3 -0
- package/out/ui/packages/copyButton/init.luau +6 -0
- package/out/ui/packages/cover/components/Cover.d.ts +8 -0
- package/out/ui/packages/cover/components/Cover.luau +47 -0
- package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
- package/out/ui/packages/cover/components/coverFill.luau +14 -0
- package/out/ui/packages/cover/index.d.ts +3 -0
- package/out/ui/packages/cover/init.luau +6 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +186 -95
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
- package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
- package/out/ui/packages/dateRange/index.d.ts +1 -1
- package/out/ui/packages/dateRange/init.luau +3 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
- package/out/ui/packages/dialog/components/Dialog.luau +55 -6
- package/out/ui/packages/dialog/components/Dialog.styles.luau +9 -5
- package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
- package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
- package/out/ui/packages/divider/components/Divider.luau +60 -13
- package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +2 -0
- package/out/ui/packages/drawer/components/Drawer.luau +51 -7
- package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +15 -1
- package/out/ui/packages/drawer/components/drawerPlacement.luau +46 -0
- package/out/ui/packages/editorFace.d.ts +22 -0
- package/out/ui/packages/editorFace.luau +49 -0
- package/out/ui/packages/fab/components/Fab.luau +19 -6
- package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
- package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
- package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
- package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
- package/out/ui/packages/icon/components/Icon.d.ts +6 -2
- package/out/ui/packages/icon/components/Icon.luau +23 -3
- package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
- package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
- package/out/ui/packages/icon/components/glyphs.luau +64 -0
- package/out/ui/packages/icon/index.d.ts +1 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +6 -1
- package/out/ui/packages/iconButton/components/IconButton.luau +112 -11
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
- package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
- package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
- package/out/ui/packages/iconButton/components/transportGlyph.d.ts +10 -0
- package/out/ui/packages/iconButton/components/transportGlyph.luau +77 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
- package/out/ui/packages/imageList/components/ImageList.luau +28 -7
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +17 -10
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +8 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +36 -0
- package/out/ui/packages/index.d.ts +12 -0
- package/out/ui/packages/init.luau +36 -0
- package/out/ui/packages/input/components/Input.d.ts +4 -0
- package/out/ui/packages/input/components/Input.luau +74 -37
- package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
- package/out/ui/packages/input/components/Input.styles.luau +45 -18
- package/out/ui/packages/input/components/clampText.d.ts +2 -0
- package/out/ui/packages/input/components/clampText.luau +16 -0
- package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
- package/out/ui/packages/input/components/fieldChrome.luau +11 -0
- package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
- package/out/ui/packages/input/components/multilineHeight.luau +11 -0
- package/out/ui/packages/layout/components/Box.luau +92 -13
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
- package/out/ui/packages/layout/components/Box.styles.luau +0 -9
- package/out/ui/packages/layout/components/Grid.luau +81 -16
- package/out/ui/packages/layout/components/Pad.d.ts +24 -0
- package/out/ui/packages/layout/components/Pad.luau +88 -0
- package/out/ui/packages/layout/components/Stack.luau +79 -13
- package/out/ui/packages/link/components/Link.luau +17 -7
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
- package/out/ui/packages/link/components/Link.styles.luau +3 -5
- package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
- package/out/ui/packages/listItem/components/ListItem.luau +155 -40
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +4 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +70 -31
- package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
- package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
- package/out/ui/packages/listItem/components/listItemLayout.d.ts +22 -0
- package/out/ui/packages/listItem/components/listItemLayout.luau +68 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +244 -46
- package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -51
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
- package/out/ui/packages/markdown/index.d.ts +2 -2
- package/out/ui/packages/markdown/init.luau +2 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +30 -2
- package/out/ui/packages/markdown/parseMarkdown.luau +453 -25
- package/out/ui/packages/menu/components/Menu.d.ts +4 -1
- package/out/ui/packages/menu/components/Menu.luau +76 -28
- package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
- package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
- package/out/ui/packages/menu/components/menuIcon.luau +32 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +82 -1
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
- package/out/ui/packages/pager/components/Pager.d.ts +11 -0
- package/out/ui/packages/pager/components/Pager.luau +114 -0
- package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
- package/out/ui/packages/pager/components/Pager.styles.luau +66 -0
- package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
- package/out/ui/packages/pager/components/pagerStep.luau +24 -0
- package/out/ui/packages/pager/index.d.ts +3 -0
- package/out/ui/packages/pager/init.luau +9 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
- package/out/ui/packages/paper/components/Paper.luau +17 -11
- package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +14 -1
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
- package/out/ui/packages/popover/components/Popover.d.ts +12 -0
- package/out/ui/packages/popover/components/Popover.luau +52 -0
- package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
- package/out/ui/packages/popover/components/Popover.styles.luau +32 -0
- package/out/ui/packages/popover/index.d.ts +2 -0
- package/out/ui/packages/popover/init.luau +5 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -0
- package/out/ui/packages/popup/components/Popup.luau +64 -2
- package/out/ui/packages/popup/components/placement.luau +6 -4
- package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +53 -9
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
- package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
- package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
- package/out/ui/packages/radioGroup/index.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.luau +48 -4
- package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
- package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
- package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
- package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
- package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
- package/out/ui/packages/select/components/Select.d.ts +2 -0
- package/out/ui/packages/select/components/Select.luau +164 -105
- package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
- package/out/ui/packages/select/components/Select.styles.luau +30 -9
- package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
- package/out/ui/packages/select/components/selectWidth.luau +15 -0
- package/out/ui/packages/shadow/components/Shadow.luau +202 -21
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
- package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
- package/out/ui/packages/slider/components/RangeSlider.luau +232 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
- package/out/ui/packages/slider/components/Slider.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.luau +53 -25
- package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
- package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
- package/out/ui/packages/slider/components/rangeValue.luau +77 -0
- package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
- package/out/ui/packages/slider/index.d.ts +3 -0
- package/out/ui/packages/slider/init.luau +6 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
- package/out/ui/packages/sparkline/components/Sparkline.luau +72 -8
- package/out/ui/packages/sparkline/index.d.ts +1 -1
- package/out/ui/packages/sparkline/init.luau +6 -1
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
- package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +59 -9
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +50 -3
- package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
- package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +1 -0
- package/out/ui/packages/stateMatrix.luau +9 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.luau +35 -7
- package/out/ui/packages/stepper/components/Stepper.styles.luau +12 -6
- package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
- package/out/ui/packages/stepper/components/stepState.luau +12 -1
- package/out/ui/packages/stepper/index.d.ts +1 -1
- package/out/ui/packages/stepper/init.luau +3 -1
- package/out/ui/packages/switch/components/Switch.luau +2 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
- package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
- package/out/ui/packages/switch/components/switchLook.luau +4 -10
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +99 -57
- package/out/ui/packages/table/components/Table.styles.luau +23 -6
- package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
- package/out/ui/packages/table/components/tableColumns.luau +2 -0
- package/out/ui/packages/table/components/tableSort.d.ts +2 -0
- package/out/ui/packages/table/components/tableSort.luau +95 -0
- package/out/ui/packages/table/index.d.ts +1 -0
- package/out/ui/packages/table/init.luau +1 -0
- package/out/ui/packages/tabs/components/Tabs.luau +77 -6
- package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
- package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
- package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
- package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
- package/out/ui/packages/text/components/Text.d.ts +9 -0
- package/out/ui/packages/text/components/Text.luau +64 -0
- package/out/ui/packages/text/components/textBox.d.ts +12 -0
- package/out/ui/packages/text/components/textBox.luau +21 -0
- package/out/ui/packages/text/index.d.ts +2 -0
- package/out/ui/packages/text/init.luau +5 -0
- package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
- package/out/ui/packages/timeField/components/TimeField.luau +106 -0
- package/out/ui/packages/timeField/index.d.ts +4 -0
- package/out/ui/packages/timeField/init.luau +9 -0
- package/out/ui/packages/timeField/timeValue.d.ts +8 -0
- package/out/ui/packages/timeField/timeValue.luau +49 -0
- package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
- package/out/ui/packages/timeline/components/Timeline.luau +102 -0
- package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
- package/out/ui/packages/timeline/components/Timeline.styles.luau +115 -0
- package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
- package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
- package/out/ui/packages/timeline/index.d.ts +3 -0
- package/out/ui/packages/timeline/init.luau +8 -0
- package/out/ui/packages/toast/components/Toast.d.ts +1 -0
- package/out/ui/packages/toast/components/Toast.luau +200 -57
- package/out/ui/packages/toast/components/Toast.styles.luau +40 -20
- package/out/ui/packages/toast/components/toastPlace.d.ts +16 -0
- package/out/ui/packages/toast/components/toastPlace.luau +44 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
- package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +31 -1
- package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
- package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
- package/out/ui/packages/treeView/components/TreeView.luau +12 -13
- package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
- package/out/ui/packages/typography/components/Typography.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +8 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +18 -3
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
- package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
- package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
- package/out/ui/packages/weekGrid/index.d.ts +3 -0
- package/out/ui/packages/weekGrid/init.luau +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Indicator box inside a tab. Horizontal width stays on the tab; a positive width offset spills into the next one.
|
|
3
|
+
local function tabIndicatorBox(vertical, bar, gutter)
|
|
4
|
+
if vertical then
|
|
5
|
+
return {
|
|
6
|
+
widthScale = 0,
|
|
7
|
+
widthOffset = bar,
|
|
8
|
+
heightScale = 1,
|
|
9
|
+
heightOffset = -gutter,
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
widthScale = 1,
|
|
14
|
+
widthOffset = 0,
|
|
15
|
+
heightScale = 0,
|
|
16
|
+
heightOffset = bar,
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
return {
|
|
20
|
+
tabIndicatorBox = tabIndicatorBox,
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Canvas offset that keeps the selected tab inside the view.
|
|
3
|
+
local function tabScroll(current, tabStart, tabSize, view)
|
|
4
|
+
if view <= 0 then
|
|
5
|
+
return current
|
|
6
|
+
end
|
|
7
|
+
if tabStart < current then
|
|
8
|
+
return if tabStart < 0 then 0 else tabStart
|
|
9
|
+
end
|
|
10
|
+
local tabEnd = tabStart + tabSize
|
|
11
|
+
if tabEnd > current + view then
|
|
12
|
+
return tabEnd - view
|
|
13
|
+
end
|
|
14
|
+
return current
|
|
15
|
+
end
|
|
16
|
+
return {
|
|
17
|
+
tabScroll = tabScroll,
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface TextProps {
|
|
3
|
+
text?: string;
|
|
4
|
+
wrap?: boolean;
|
|
5
|
+
richText?: boolean;
|
|
6
|
+
fontFace?: Font;
|
|
7
|
+
}
|
|
8
|
+
declare function Text(props: CustomizedProps<TextLabel, TextProps>): JSX.Element;
|
|
9
|
+
export default Text;
|
|
@@ -0,0 +1,64 @@
|
|
|
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 useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
+
local textBox = TS.import(script, script.Parent, "textBox").textBox
|
|
7
|
+
local function Text(props)
|
|
8
|
+
local _binding = props
|
|
9
|
+
local text = _binding.text
|
|
10
|
+
if text == nil then
|
|
11
|
+
text = ""
|
|
12
|
+
end
|
|
13
|
+
local wrap = _binding.wrap
|
|
14
|
+
local richText = _binding.richText
|
|
15
|
+
local fontFace = _binding.fontFace
|
|
16
|
+
local className = _binding.className
|
|
17
|
+
local sx = _binding.sx
|
|
18
|
+
local id = _binding.id
|
|
19
|
+
local ref = _binding.ref
|
|
20
|
+
local _binding_1 = useTheme()
|
|
21
|
+
local theme = _binding_1.theme
|
|
22
|
+
local box = textBox(wrap)
|
|
23
|
+
local _attributes = {
|
|
24
|
+
tag = "textlabel",
|
|
25
|
+
}
|
|
26
|
+
local _condition = id
|
|
27
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
28
|
+
_condition = "Text"
|
|
29
|
+
end
|
|
30
|
+
_attributes.key = _condition
|
|
31
|
+
_attributes.hostRef = ref
|
|
32
|
+
local _object = {
|
|
33
|
+
Text = text,
|
|
34
|
+
Size = UDim2.new(box.widthScale, 0, box.heightScale, 0),
|
|
35
|
+
AutomaticSize = if box.automatic == "Y" then Enum.AutomaticSize.Y else Enum.AutomaticSize.XY,
|
|
36
|
+
TextWrapped = box.wrapped,
|
|
37
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
38
|
+
BackgroundTransparency = 1,
|
|
39
|
+
BorderSizePixel = 0,
|
|
40
|
+
Font = theme.typography.fontFamilies[theme.typography.variants.body.family],
|
|
41
|
+
TextSize = theme.typography.variants.body.size,
|
|
42
|
+
LineHeight = theme.typography.variants.body.leading,
|
|
43
|
+
TextYAlignment = Enum.TextYAlignment.Top,
|
|
44
|
+
TextColor3 = theme.palette.text.primary,
|
|
45
|
+
RichText = richText == true,
|
|
46
|
+
}
|
|
47
|
+
for _k, _v in (if fontFace ~= nil then {
|
|
48
|
+
FontFace = fontFace,
|
|
49
|
+
} else {}) do
|
|
50
|
+
_object[_k] = _v
|
|
51
|
+
end
|
|
52
|
+
if className then
|
|
53
|
+
for _k, _v in className do
|
|
54
|
+
_object[_k] = _v
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
_attributes.base = _object
|
|
58
|
+
_attributes.sx = sx
|
|
59
|
+
return React.createElement(SxHost, _attributes)
|
|
60
|
+
end
|
|
61
|
+
local default = Text
|
|
62
|
+
return {
|
|
63
|
+
default = default,
|
|
64
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Shrink-wrap by default. Wrap uses the parent width and grows with the text. */
|
|
2
|
+
export declare function textBox(wrap?: boolean): {
|
|
3
|
+
widthScale: number;
|
|
4
|
+
heightScale: number;
|
|
5
|
+
automatic: "Y";
|
|
6
|
+
wrapped: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
widthScale: number;
|
|
9
|
+
heightScale: number;
|
|
10
|
+
automatic: "XY";
|
|
11
|
+
wrapped: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Shrink-wrap by default. Wrap uses the parent width and grows with the text.
|
|
3
|
+
local function textBox(wrap)
|
|
4
|
+
if wrap == true then
|
|
5
|
+
return {
|
|
6
|
+
widthScale = 1,
|
|
7
|
+
heightScale = 0,
|
|
8
|
+
automatic = "Y",
|
|
9
|
+
wrapped = true,
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
widthScale = 0,
|
|
14
|
+
heightScale = 0,
|
|
15
|
+
automatic = "XY",
|
|
16
|
+
wrapped = false,
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
return {
|
|
20
|
+
textBox = textBox,
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { TimeOfDay } from "../timeValue";
|
|
3
|
+
export interface TimeFieldProps {
|
|
4
|
+
value: TimeOfDay;
|
|
5
|
+
onChange: (value: TimeOfDay) => void;
|
|
6
|
+
step?: number;
|
|
7
|
+
wrap?: boolean;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function TimeField(props: CustomizedProps<Frame, TimeFieldProps>): JSX.Element;
|
|
13
|
+
export default TimeField;
|
|
@@ -0,0 +1,106 @@
|
|
|
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 _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
+
local controlMetrics = _theme.controlMetrics
|
|
6
|
+
local useTheme = _theme.useTheme
|
|
7
|
+
local fieldChrome = TS.import(script, script.Parent.Parent.Parent, "input", "components", "fieldChrome").fieldChrome
|
|
8
|
+
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
9
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
|
+
local resolveTime = TS.import(script, script.Parent.Parent, "timeValue").resolveTime
|
|
11
|
+
local function TimeField(props)
|
|
12
|
+
local _binding = props
|
|
13
|
+
local value = _binding.value
|
|
14
|
+
local onChange = _binding.onChange
|
|
15
|
+
local step = _binding.step
|
|
16
|
+
if step == nil then
|
|
17
|
+
step = 1
|
|
18
|
+
end
|
|
19
|
+
local wrap = _binding.wrap
|
|
20
|
+
if wrap == nil then
|
|
21
|
+
wrap = true
|
|
22
|
+
end
|
|
23
|
+
local min = _binding.min
|
|
24
|
+
local max = _binding.max
|
|
25
|
+
local disabled = _binding.disabled
|
|
26
|
+
local className = _binding.className
|
|
27
|
+
local sx = _binding.sx
|
|
28
|
+
local id = _binding.id
|
|
29
|
+
local ref = _binding.ref
|
|
30
|
+
local _binding_1 = useTheme()
|
|
31
|
+
local theme = _binding_1.theme
|
|
32
|
+
local chrome = fieldChrome(controlMetrics(theme.density).height, theme.padding.calc(1))
|
|
33
|
+
local commit = function(hour, minute)
|
|
34
|
+
local resolved = resolveTime({
|
|
35
|
+
hour = hour,
|
|
36
|
+
minute = minute,
|
|
37
|
+
}, step, wrap, min, max)
|
|
38
|
+
if resolved == nil then
|
|
39
|
+
return nil
|
|
40
|
+
end
|
|
41
|
+
if resolved.hour == value.hour and resolved.minute == value.minute then
|
|
42
|
+
return nil
|
|
43
|
+
end
|
|
44
|
+
onChange(resolved)
|
|
45
|
+
end
|
|
46
|
+
local _attributes = {
|
|
47
|
+
tag = "frame",
|
|
48
|
+
}
|
|
49
|
+
local _condition = id
|
|
50
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
51
|
+
_condition = "TimeField"
|
|
52
|
+
end
|
|
53
|
+
_attributes.key = _condition
|
|
54
|
+
_attributes.hostRef = ref
|
|
55
|
+
_attributes.base = {
|
|
56
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
57
|
+
Size = UDim2.fromScale(0, 0),
|
|
58
|
+
BackgroundTransparency = 1,
|
|
59
|
+
BorderSizePixel = 0,
|
|
60
|
+
}
|
|
61
|
+
_attributes.className = className
|
|
62
|
+
_attributes.sx = sx
|
|
63
|
+
return React.createElement(SxHost, _attributes, React.createElement("uilistlayout", {
|
|
64
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
65
|
+
Padding = UDim.new(0, chrome.padX),
|
|
66
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
67
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
68
|
+
}), React.createElement(NumberInput, {
|
|
69
|
+
value = value.hour,
|
|
70
|
+
step = 1,
|
|
71
|
+
disabled = disabled,
|
|
72
|
+
width = UDim.new(0, theme.spacing.calc(12)),
|
|
73
|
+
sx = {
|
|
74
|
+
LayoutOrder = 0,
|
|
75
|
+
},
|
|
76
|
+
onChange = function(hour)
|
|
77
|
+
return commit(hour, value.minute)
|
|
78
|
+
end,
|
|
79
|
+
}), React.createElement("textlabel", {
|
|
80
|
+
Text = ":",
|
|
81
|
+
LayoutOrder = 1,
|
|
82
|
+
BackgroundTransparency = 1,
|
|
83
|
+
BorderSizePixel = 0,
|
|
84
|
+
Size = UDim2.fromOffset(8, chrome.height),
|
|
85
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
86
|
+
TextWrapped = false,
|
|
87
|
+
Font = theme.typography.fontFamilies.default,
|
|
88
|
+
TextSize = theme.typography.fontSizes.body,
|
|
89
|
+
TextColor3 = theme.palette.text.secondary,
|
|
90
|
+
}), React.createElement(NumberInput, {
|
|
91
|
+
value = value.minute,
|
|
92
|
+
step = step,
|
|
93
|
+
disabled = disabled,
|
|
94
|
+
width = UDim.new(0, theme.spacing.calc(12)),
|
|
95
|
+
sx = {
|
|
96
|
+
LayoutOrder = 2,
|
|
97
|
+
},
|
|
98
|
+
onChange = function(minute)
|
|
99
|
+
return commit(value.hour, minute)
|
|
100
|
+
end,
|
|
101
|
+
}))
|
|
102
|
+
end
|
|
103
|
+
local default = TimeField
|
|
104
|
+
return {
|
|
105
|
+
default = default,
|
|
106
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.TimeField = TS.import(script, script, "components", "TimeField").default
|
|
5
|
+
local _timeValue = TS.import(script, script, "timeValue")
|
|
6
|
+
exports.resolveTime = _timeValue.resolveTime
|
|
7
|
+
exports.timeRangeOk = _timeValue.timeRangeOk
|
|
8
|
+
exports.timeToMinutes = _timeValue.timeToMinutes
|
|
9
|
+
return exports
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface TimeOfDay {
|
|
2
|
+
hour: number;
|
|
3
|
+
minute: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function timeToMinutes(value: TimeOfDay): number;
|
|
6
|
+
/** Snap to a minute step. Wrap into the day, or reject an invalid range. */
|
|
7
|
+
export declare function resolveTime(value: TimeOfDay, step?: number, wrap?: boolean, min?: number, max?: number): TimeOfDay | undefined;
|
|
8
|
+
export declare function timeRangeOk(start: TimeOfDay, finish: TimeOfDay): boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local DAY = 1440
|
|
3
|
+
local function modDay(total)
|
|
4
|
+
local remainder = total % DAY
|
|
5
|
+
return if remainder < 0 then remainder + DAY else remainder
|
|
6
|
+
end
|
|
7
|
+
local function timeToMinutes(value)
|
|
8
|
+
return value.hour * 60 + value.minute
|
|
9
|
+
end
|
|
10
|
+
--* Snap to a minute step. Wrap into the day, or reject an invalid range.
|
|
11
|
+
local function resolveTime(value, step, wrap, min, max)
|
|
12
|
+
if step == nil then
|
|
13
|
+
step = 1
|
|
14
|
+
end
|
|
15
|
+
if wrap == nil then
|
|
16
|
+
wrap = true
|
|
17
|
+
end
|
|
18
|
+
if step <= 0 then
|
|
19
|
+
return nil
|
|
20
|
+
end
|
|
21
|
+
if min ~= nil and max ~= nil and min > max then
|
|
22
|
+
return nil
|
|
23
|
+
end
|
|
24
|
+
local size = math.max(1, math.floor(step))
|
|
25
|
+
local total = math.floor((value.hour * 60 + value.minute) / size + 0.5) * size
|
|
26
|
+
if wrap then
|
|
27
|
+
total = modDay(total)
|
|
28
|
+
elseif total < 0 or total >= DAY then
|
|
29
|
+
return nil
|
|
30
|
+
end
|
|
31
|
+
if min ~= nil and total < min then
|
|
32
|
+
return nil
|
|
33
|
+
end
|
|
34
|
+
if max ~= nil and total > max then
|
|
35
|
+
return nil
|
|
36
|
+
end
|
|
37
|
+
return {
|
|
38
|
+
hour = math.floor(total / 60),
|
|
39
|
+
minute = total % 60,
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
local function timeRangeOk(start, finish)
|
|
43
|
+
return timeToMinutes(finish) > timeToMinutes(start)
|
|
44
|
+
end
|
|
45
|
+
return {
|
|
46
|
+
timeToMinutes = timeToMinutes,
|
|
47
|
+
resolveTime = resolveTime,
|
|
48
|
+
timeRangeOk = timeRangeOk,
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { TimelineTone } from "./timelineRail";
|
|
3
|
+
export interface TimelineItem {
|
|
4
|
+
title: string;
|
|
5
|
+
caption?: string;
|
|
6
|
+
tone?: TimelineTone;
|
|
7
|
+
}
|
|
8
|
+
export interface TimelineProps {
|
|
9
|
+
items: TimelineItem[];
|
|
10
|
+
}
|
|
11
|
+
declare function Timeline(props: CustomizedProps<Frame, TimelineProps>): JSX.Element;
|
|
12
|
+
export default Timeline;
|
|
@@ -0,0 +1,102 @@
|
|
|
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 cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
+
local useTimelineStyles = TS.import(script, script.Parent, "Timeline.styles").default
|
|
7
|
+
local _timelineRail = TS.import(script, script.Parent, "timelineRail")
|
|
8
|
+
local timelineRail = _timelineRail.timelineRail
|
|
9
|
+
local timelineTone = _timelineRail.timelineTone
|
|
10
|
+
local function Timeline(props)
|
|
11
|
+
local _binding = props
|
|
12
|
+
local items = _binding.items
|
|
13
|
+
local className = _binding.className
|
|
14
|
+
local sx = _binding.sx
|
|
15
|
+
local id = _binding.id
|
|
16
|
+
local ref = _binding.ref
|
|
17
|
+
local styles = useTimelineStyles()
|
|
18
|
+
local count = #items
|
|
19
|
+
local _attributes = {
|
|
20
|
+
tag = "frame",
|
|
21
|
+
}
|
|
22
|
+
local _condition = id
|
|
23
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
24
|
+
_condition = "Timeline"
|
|
25
|
+
end
|
|
26
|
+
_attributes.key = _condition
|
|
27
|
+
_attributes.hostRef = ref
|
|
28
|
+
_attributes.base = styles.root
|
|
29
|
+
_attributes.className = className
|
|
30
|
+
_attributes.sx = sx
|
|
31
|
+
local _attributes_1 = table.clone(styles.inset)
|
|
32
|
+
setmetatable(_attributes_1, nil)
|
|
33
|
+
local _exp = React.createElement("uipadding", _attributes_1)
|
|
34
|
+
local _attributes_2 = table.clone(styles.list)
|
|
35
|
+
setmetatable(_attributes_2, nil)
|
|
36
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
37
|
+
-- ▼ ReadonlyArray.map ▼
|
|
38
|
+
local _newValue = table.create(#items)
|
|
39
|
+
local _callback = function(item, index)
|
|
40
|
+
local tone = timelineTone(item.tone)
|
|
41
|
+
local mark = if tone == "done" then styles.done elseif tone == "active" then styles.active elseif tone == "error" then styles.error else styles.pending
|
|
42
|
+
local caption = item.caption
|
|
43
|
+
local _attributes_3 = {
|
|
44
|
+
key = `{item.title}-{index}`,
|
|
45
|
+
}
|
|
46
|
+
for _k, _v in styles.item do
|
|
47
|
+
_attributes_3[_k] = _v
|
|
48
|
+
end
|
|
49
|
+
_attributes_3.LayoutOrder = index
|
|
50
|
+
local _attributes_4 = table.clone(styles.row)
|
|
51
|
+
setmetatable(_attributes_4, nil)
|
|
52
|
+
local _exp_2 = React.createElement("uilistlayout", _attributes_4)
|
|
53
|
+
local _attributes_5 = table.clone(styles.rail)
|
|
54
|
+
setmetatable(_attributes_5, nil)
|
|
55
|
+
local _result
|
|
56
|
+
if timelineRail(index, count) then
|
|
57
|
+
local _attributes_6 = table.clone(styles.line)
|
|
58
|
+
setmetatable(_attributes_6, nil)
|
|
59
|
+
_result = React.createElement("frame", _attributes_6)
|
|
60
|
+
else
|
|
61
|
+
_result = nil
|
|
62
|
+
end
|
|
63
|
+
local _attributes_6 = table.clone(cx(styles.dot, mark))
|
|
64
|
+
setmetatable(_attributes_6, nil)
|
|
65
|
+
local _exp_3 = React.createElement("frame", _attributes_5, _result, React.createElement("frame", _attributes_6, React.createElement("uicorner", {
|
|
66
|
+
CornerRadius = UDim.new(1, 0),
|
|
67
|
+
})))
|
|
68
|
+
local _attributes_7 = table.clone(styles.body)
|
|
69
|
+
setmetatable(_attributes_7, nil)
|
|
70
|
+
local _attributes_8 = table.clone(styles.bodyPad)
|
|
71
|
+
setmetatable(_attributes_8, nil)
|
|
72
|
+
local _exp_4 = React.createElement("uipadding", _attributes_8)
|
|
73
|
+
local _attributes_9 = table.clone(styles.bodyList)
|
|
74
|
+
setmetatable(_attributes_9, nil)
|
|
75
|
+
local _exp_5 = React.createElement("uilistlayout", _attributes_9)
|
|
76
|
+
local _attributes_10 = table.clone(styles.title)
|
|
77
|
+
setmetatable(_attributes_10, nil)
|
|
78
|
+
_attributes_10.Text = item.title
|
|
79
|
+
_attributes_10.LayoutOrder = 0
|
|
80
|
+
local _exp_6 = React.createElement("textlabel", _attributes_10)
|
|
81
|
+
local _result_1
|
|
82
|
+
if caption ~= nil and #caption > 0 then
|
|
83
|
+
local _attributes_11 = table.clone(styles.caption)
|
|
84
|
+
setmetatable(_attributes_11, nil)
|
|
85
|
+
_attributes_11.Text = caption
|
|
86
|
+
_attributes_11.LayoutOrder = 1
|
|
87
|
+
_result_1 = (React.createElement("textlabel", _attributes_11))
|
|
88
|
+
else
|
|
89
|
+
_result_1 = nil
|
|
90
|
+
end
|
|
91
|
+
return React.createElement("frame", _attributes_3, _exp_2, _exp_3, React.createElement("frame", _attributes_7, _exp_4, _exp_5, _exp_6, _result_1))
|
|
92
|
+
end
|
|
93
|
+
for _k, _v in items do
|
|
94
|
+
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
95
|
+
end
|
|
96
|
+
-- ▲ ReadonlyArray.map ▲
|
|
97
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, React.createElement(React.Fragment, nil, _newValue))
|
|
98
|
+
end
|
|
99
|
+
local default = Timeline
|
|
100
|
+
return {
|
|
101
|
+
default = default,
|
|
102
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local useTimelineStyles = componentStyles("Timeline", function(theme)
|
|
7
|
+
local dot = theme.spacing.calc(1.5)
|
|
8
|
+
local rail = theme.spacing.calc(2)
|
|
9
|
+
local pad = theme.padding.calc(1)
|
|
10
|
+
return createStyles({
|
|
11
|
+
root = {
|
|
12
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
13
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
14
|
+
BackgroundTransparency = 1,
|
|
15
|
+
BorderSizePixel = 0,
|
|
16
|
+
},
|
|
17
|
+
inset = {
|
|
18
|
+
PaddingLeft = UDim.new(0, pad),
|
|
19
|
+
PaddingRight = UDim.new(0, pad),
|
|
20
|
+
},
|
|
21
|
+
list = {
|
|
22
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
23
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
24
|
+
Padding = UDim.new(0, 0),
|
|
25
|
+
},
|
|
26
|
+
item = {
|
|
27
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
28
|
+
Size = UDim2.new(1, -pad * 2, 0, 0),
|
|
29
|
+
BackgroundTransparency = 1,
|
|
30
|
+
BorderSizePixel = 0,
|
|
31
|
+
},
|
|
32
|
+
row = {
|
|
33
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
34
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
35
|
+
ItemLineAlignment = Enum.ItemLineAlignment.Stretch,
|
|
36
|
+
Padding = UDim.new(0, theme.spacing.calc(1)),
|
|
37
|
+
},
|
|
38
|
+
rail = {
|
|
39
|
+
Size = UDim2.fromOffset(rail, 0),
|
|
40
|
+
LayoutOrder = 0,
|
|
41
|
+
BackgroundTransparency = 1,
|
|
42
|
+
BorderSizePixel = 0,
|
|
43
|
+
},
|
|
44
|
+
dot = {
|
|
45
|
+
AnchorPoint = Vector2.new(0.5, 0),
|
|
46
|
+
Position = UDim2.new(0.5, 0, 0, 2),
|
|
47
|
+
Size = UDim2.fromOffset(dot, dot),
|
|
48
|
+
BorderSizePixel = 0,
|
|
49
|
+
ZIndex = 2,
|
|
50
|
+
},
|
|
51
|
+
done = {
|
|
52
|
+
BackgroundColor3 = theme.palette.status.success.main,
|
|
53
|
+
},
|
|
54
|
+
active = {
|
|
55
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
56
|
+
},
|
|
57
|
+
pending = {
|
|
58
|
+
BackgroundColor3 = theme.palette.text.disabled,
|
|
59
|
+
},
|
|
60
|
+
error = {
|
|
61
|
+
BackgroundColor3 = theme.palette.status.error.main,
|
|
62
|
+
},
|
|
63
|
+
line = {
|
|
64
|
+
AnchorPoint = Vector2.new(0.5, 0),
|
|
65
|
+
Position = UDim2.new(0.5, 0, 0, dot + 2),
|
|
66
|
+
Size = UDim2.new(0, 2, 1, -(dot + 2)),
|
|
67
|
+
BackgroundColor3 = theme.palette.divider,
|
|
68
|
+
BorderSizePixel = 0,
|
|
69
|
+
ZIndex = 1,
|
|
70
|
+
},
|
|
71
|
+
body = {
|
|
72
|
+
LayoutOrder = 1,
|
|
73
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
74
|
+
Size = UDim2.new(1, -(rail + theme.spacing.calc(1)), 0, 0),
|
|
75
|
+
BackgroundTransparency = 1,
|
|
76
|
+
BorderSizePixel = 0,
|
|
77
|
+
},
|
|
78
|
+
bodyPad = {
|
|
79
|
+
PaddingBottom = UDim.new(0, theme.padding.calc(2)),
|
|
80
|
+
},
|
|
81
|
+
bodyList = {
|
|
82
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
83
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
84
|
+
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
85
|
+
},
|
|
86
|
+
title = {
|
|
87
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
88
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
89
|
+
BackgroundTransparency = 1,
|
|
90
|
+
BorderSizePixel = 0,
|
|
91
|
+
Font = theme.typography.fontFamilies.default,
|
|
92
|
+
TextSize = theme.typography.fontSizes.body,
|
|
93
|
+
TextColor3 = theme.palette.text.primary,
|
|
94
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
95
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
96
|
+
TextWrapped = false,
|
|
97
|
+
},
|
|
98
|
+
caption = {
|
|
99
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
100
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
101
|
+
BackgroundTransparency = 1,
|
|
102
|
+
BorderSizePixel = 0,
|
|
103
|
+
Font = theme.typography.fontFamilies.default,
|
|
104
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
105
|
+
TextColor3 = theme.palette.text.secondary,
|
|
106
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
107
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
108
|
+
TextWrapped = false,
|
|
109
|
+
},
|
|
110
|
+
})
|
|
111
|
+
end)
|
|
112
|
+
local default = useTimelineStyles
|
|
113
|
+
return {
|
|
114
|
+
default = default,
|
|
115
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type TimelineTone = "done" | "active" | "pending" | "error";
|
|
2
|
+
export declare function timelineTone(tone?: string): TimelineTone;
|
|
3
|
+
/** Connector under an item. The last item, and a list shorter than two, has none. */
|
|
4
|
+
export declare function timelineRail(index: number, count: number): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function timelineTone(tone)
|
|
3
|
+
if tone == "done" or tone == "active" or tone == "error" or tone == "pending" then
|
|
4
|
+
return tone
|
|
5
|
+
end
|
|
6
|
+
return "pending"
|
|
7
|
+
end
|
|
8
|
+
--* Connector under an item. The last item, and a list shorter than two, has none.
|
|
9
|
+
local function timelineRail(index, count)
|
|
10
|
+
return index >= 0 and count > 1 and index < count - 1
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
timelineTone = timelineTone,
|
|
14
|
+
timelineRail = timelineRail,
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.Timeline = TS.import(script, script, "components", "Timeline").default
|
|
5
|
+
local _timelineRail = TS.import(script, script, "components", "timelineRail")
|
|
6
|
+
exports.timelineRail = _timelineRail.timelineRail
|
|
7
|
+
exports.timelineTone = _timelineRail.timelineTone
|
|
8
|
+
return exports
|