@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
|
@@ -13,7 +13,7 @@ local function switchPointer(hovering, pressed, focused)
|
|
|
13
13
|
end
|
|
14
14
|
local function switchTrackTransparency(on, disabled, pointer)
|
|
15
15
|
if disabled then
|
|
16
|
-
return
|
|
16
|
+
return 0.5
|
|
17
17
|
end
|
|
18
18
|
if not on then
|
|
19
19
|
if pointer == "press" then
|
|
@@ -33,19 +33,13 @@ local function switchTrackTransparency(on, disabled, pointer)
|
|
|
33
33
|
return 0
|
|
34
34
|
end
|
|
35
35
|
local function switchThumbTransparency(disabled)
|
|
36
|
-
return if disabled then 0.
|
|
36
|
+
return if disabled then 0.5 else 0
|
|
37
37
|
end
|
|
38
38
|
local function switchStrokeTransparency(disabled, pointer)
|
|
39
|
-
if disabled then
|
|
39
|
+
if disabled or pointer ~= "focus" then
|
|
40
40
|
return 1
|
|
41
41
|
end
|
|
42
|
-
|
|
43
|
-
return 0
|
|
44
|
-
end
|
|
45
|
-
if pointer == "hover" then
|
|
46
|
-
return 0.35
|
|
47
|
-
end
|
|
48
|
-
return 1
|
|
42
|
+
return 0
|
|
49
43
|
end
|
|
50
44
|
local function switchThumbPlacement(on, inset)
|
|
51
45
|
return {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useState = _react.useState
|
|
4
6
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
8
|
local rowSelected = TS.import(script, script.Parent, "rowSelected").rowSelected
|
|
9
|
+
local sortedRowOrder = TS.import(script, script.Parent, "tableSort").sortedRowOrder
|
|
7
10
|
local _tableColumns = TS.import(script, script.Parent, "tableColumns")
|
|
8
11
|
local canSort = _tableColumns.canSort
|
|
9
12
|
local columnSizes = _tableColumns.columnSizes
|
|
@@ -11,6 +14,41 @@ local headerText = _tableColumns.headerText
|
|
|
11
14
|
local isTextCell = _tableColumns.isTextCell
|
|
12
15
|
local resolveColumn = _tableColumns.resolveColumn
|
|
13
16
|
local useTableStyles = TS.import(script, script.Parent, "Table.styles").default
|
|
17
|
+
local function TableRow(props)
|
|
18
|
+
local hovering, setHovering = useState(false)
|
|
19
|
+
local face = if props.selected then props.styles.selected elseif hovering then props.styles.hover else nil
|
|
20
|
+
local _attributes = {
|
|
21
|
+
key = `r-{props.rowIndex}`,
|
|
22
|
+
}
|
|
23
|
+
for _k, _v in cx(props.styles.row, face) do
|
|
24
|
+
_attributes[_k] = _v
|
|
25
|
+
end
|
|
26
|
+
_attributes.LayoutOrder = props.place + 1
|
|
27
|
+
_attributes.Event = {
|
|
28
|
+
Activated = props.onActivated,
|
|
29
|
+
MouseEnter = function()
|
|
30
|
+
return setHovering(true)
|
|
31
|
+
end,
|
|
32
|
+
MouseLeave = function()
|
|
33
|
+
return setHovering(false)
|
|
34
|
+
end,
|
|
35
|
+
}
|
|
36
|
+
local _attributes_1 = table.clone(props.styles.rowStroke)
|
|
37
|
+
setmetatable(_attributes_1, nil)
|
|
38
|
+
local _exp = React.createElement("uistroke", _attributes_1)
|
|
39
|
+
local _attributes_2 = table.clone(props.styles.tail)
|
|
40
|
+
setmetatable(_attributes_2, nil)
|
|
41
|
+
local _exp_1 = React.createElement("uipadding", _attributes_2)
|
|
42
|
+
local _attributes_3 = {
|
|
43
|
+
key = "Band",
|
|
44
|
+
}
|
|
45
|
+
for _k, _v in props.styles.band do
|
|
46
|
+
_attributes_3[_k] = _v
|
|
47
|
+
end
|
|
48
|
+
local _attributes_4 = table.clone(props.styles.cells)
|
|
49
|
+
setmetatable(_attributes_4, nil)
|
|
50
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), props.children))
|
|
51
|
+
end
|
|
14
52
|
local function textAlign(align)
|
|
15
53
|
if align == "center" then
|
|
16
54
|
return Enum.TextXAlignment.Center
|
|
@@ -48,6 +86,7 @@ local function Table(props)
|
|
|
48
86
|
-- ▲ ReadonlyArray.map ▲
|
|
49
87
|
local resolved = _newValue
|
|
50
88
|
local sizes = columnSizes(resolved)
|
|
89
|
+
local order = sortedRowOrder(rows, sortColumn, sortDirection)
|
|
51
90
|
local _attributes = {
|
|
52
91
|
tag = "frame",
|
|
53
92
|
}
|
|
@@ -73,12 +112,21 @@ local function Table(props)
|
|
|
73
112
|
_attributes_3[_k] = _v
|
|
74
113
|
end
|
|
75
114
|
_attributes_3.LayoutOrder = 0
|
|
76
|
-
local _attributes_4 = table.clone(styles.
|
|
115
|
+
local _attributes_4 = table.clone(styles.rowStroke)
|
|
77
116
|
setmetatable(_attributes_4, nil)
|
|
78
|
-
local _exp_2 = React.createElement("
|
|
79
|
-
local _attributes_5 = table.clone(styles.
|
|
117
|
+
local _exp_2 = React.createElement("uistroke", _attributes_4)
|
|
118
|
+
local _attributes_5 = table.clone(styles.tail)
|
|
80
119
|
setmetatable(_attributes_5, nil)
|
|
81
|
-
local _exp_3 = React.createElement("
|
|
120
|
+
local _exp_3 = React.createElement("uipadding", _attributes_5)
|
|
121
|
+
local _attributes_6 = {
|
|
122
|
+
key = "Band",
|
|
123
|
+
}
|
|
124
|
+
for _k, _v in styles.band do
|
|
125
|
+
_attributes_6[_k] = _v
|
|
126
|
+
end
|
|
127
|
+
local _attributes_7 = table.clone(styles.cells)
|
|
128
|
+
setmetatable(_attributes_7, nil)
|
|
129
|
+
local _exp_4 = React.createElement("uilistlayout", _attributes_7)
|
|
82
130
|
-- ▼ ReadonlyArray.map ▼
|
|
83
131
|
local _newValue_1 = table.create(#resolved)
|
|
84
132
|
local _callback_1 = function(column, index)
|
|
@@ -90,22 +138,22 @@ local function Table(props)
|
|
|
90
138
|
local label = if type(_header) == "string" then headerText(column.header, active, sortDirection) else nil
|
|
91
139
|
local clickable = canSort(column.sortable, onSort ~= nil)
|
|
92
140
|
if clickable then
|
|
93
|
-
local
|
|
141
|
+
local _attributes_8 = {
|
|
94
142
|
key = `h-{index}`,
|
|
95
143
|
}
|
|
96
144
|
for _k, _v in (cx(styles.cell, styles.headerCell)) do
|
|
97
|
-
|
|
145
|
+
_attributes_8[_k] = _v
|
|
98
146
|
end
|
|
99
147
|
local _condition_1 = label
|
|
100
148
|
if _condition_1 == nil then
|
|
101
149
|
_condition_1 = ""
|
|
102
150
|
end
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
151
|
+
_attributes_8.Text = _condition_1
|
|
152
|
+
_attributes_8.Size = box
|
|
153
|
+
_attributes_8.TextXAlignment = align
|
|
154
|
+
_attributes_8.AutoButtonColor = false
|
|
155
|
+
_attributes_8.LayoutOrder = index
|
|
156
|
+
_attributes_8.Event = {
|
|
109
157
|
Activated = function()
|
|
110
158
|
local _result = onSort
|
|
111
159
|
if _result ~= nil then
|
|
@@ -114,20 +162,20 @@ local function Table(props)
|
|
|
114
162
|
return _result
|
|
115
163
|
end,
|
|
116
164
|
}
|
|
117
|
-
return React.createElement("textbutton",
|
|
165
|
+
return React.createElement("textbutton", _attributes_8, label == nil and (column.header))
|
|
118
166
|
end
|
|
119
167
|
if label ~= nil then
|
|
120
|
-
local
|
|
168
|
+
local _attributes_8 = {
|
|
121
169
|
key = `h-{index}`,
|
|
122
170
|
}
|
|
123
171
|
for _k, _v in cx(styles.cell, styles.headerCell) do
|
|
124
|
-
|
|
172
|
+
_attributes_8[_k] = _v
|
|
125
173
|
end
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return React.createElement("textlabel",
|
|
174
|
+
_attributes_8.Text = label
|
|
175
|
+
_attributes_8.Size = box
|
|
176
|
+
_attributes_8.TextXAlignment = align
|
|
177
|
+
_attributes_8.LayoutOrder = index
|
|
178
|
+
return React.createElement("textlabel", _attributes_8)
|
|
131
179
|
end
|
|
132
180
|
return React.createElement("frame", {
|
|
133
181
|
key = `h-{index}`,
|
|
@@ -142,32 +190,11 @@ local function Table(props)
|
|
|
142
190
|
_newValue_1[_k] = _callback_1(_v, _k - 1, resolved)
|
|
143
191
|
end
|
|
144
192
|
-- ▲ ReadonlyArray.map ▲
|
|
145
|
-
local
|
|
193
|
+
local _exp_5 = React.createElement("frame", _attributes_3, _exp_2, _exp_3, React.createElement("frame", _attributes_6, _exp_4, React.createElement(React.Fragment, nil, _newValue_1)))
|
|
146
194
|
-- ▼ ReadonlyArray.map ▼
|
|
147
|
-
local _newValue_2 = table.create(#
|
|
148
|
-
local _callback_2 = function(
|
|
149
|
-
local
|
|
150
|
-
key = `r-{rowIndex}`,
|
|
151
|
-
}
|
|
152
|
-
for _k, _v in cx(styles.row, rowSelected(rowIndex, selected) and styles.selected) do
|
|
153
|
-
_attributes_6[_k] = _v
|
|
154
|
-
end
|
|
155
|
-
_attributes_6.LayoutOrder = rowIndex + 1
|
|
156
|
-
_attributes_6.Event = {
|
|
157
|
-
Activated = function()
|
|
158
|
-
local _result = onRowActivated
|
|
159
|
-
if _result ~= nil then
|
|
160
|
-
_result = _result(rowIndex)
|
|
161
|
-
end
|
|
162
|
-
return _result
|
|
163
|
-
end,
|
|
164
|
-
}
|
|
165
|
-
local _attributes_7 = table.clone(styles.padding)
|
|
166
|
-
setmetatable(_attributes_7, nil)
|
|
167
|
-
local _exp_5 = React.createElement("uipadding", _attributes_7)
|
|
168
|
-
local _attributes_8 = table.clone(styles.cells)
|
|
169
|
-
setmetatable(_attributes_8, nil)
|
|
170
|
-
local _exp_6 = React.createElement("uilistlayout", _attributes_8)
|
|
195
|
+
local _newValue_2 = table.create(#order)
|
|
196
|
+
local _callback_2 = function(rowIndex, place)
|
|
197
|
+
local cells = rows[rowIndex + 1]
|
|
171
198
|
-- ▼ ReadonlyArray.map ▼
|
|
172
199
|
local _newValue_3 = table.create(#resolved)
|
|
173
200
|
local _callback_3 = function(column, colIndex)
|
|
@@ -175,21 +202,23 @@ local function Table(props)
|
|
|
175
202
|
local box = UDim2.new(size.scale, size.offset, 0, 0)
|
|
176
203
|
local value = cells[colIndex + 1]
|
|
177
204
|
if isTextCell(value) then
|
|
178
|
-
local
|
|
205
|
+
local _attributes_8 = {
|
|
179
206
|
key = `c-{rowIndex}-{colIndex}`,
|
|
180
207
|
}
|
|
181
208
|
for _k, _v in styles.cell do
|
|
182
|
-
|
|
209
|
+
_attributes_8[_k] = _v
|
|
183
210
|
end
|
|
184
211
|
local _condition_1 = value
|
|
185
212
|
if _condition_1 == nil then
|
|
186
213
|
_condition_1 = ""
|
|
187
214
|
end
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
215
|
+
_attributes_8.Text = _condition_1
|
|
216
|
+
_attributes_8.Size = box
|
|
217
|
+
_attributes_8.TextXAlignment = textAlign(column.align)
|
|
218
|
+
_attributes_8.TextWrapped = column.wrap
|
|
219
|
+
_attributes_8.TextTruncate = if column.wrap then Enum.TextTruncate.None else Enum.TextTruncate.AtEnd
|
|
220
|
+
_attributes_8.LayoutOrder = colIndex
|
|
221
|
+
return React.createElement("textlabel", _attributes_8)
|
|
193
222
|
end
|
|
194
223
|
return React.createElement("frame", {
|
|
195
224
|
key = `c-{rowIndex}-{colIndex}`,
|
|
@@ -204,13 +233,26 @@ local function Table(props)
|
|
|
204
233
|
_newValue_3[_k] = _callback_3(_v, _k - 1, resolved)
|
|
205
234
|
end
|
|
206
235
|
-- ▲ ReadonlyArray.map ▲
|
|
207
|
-
return React.createElement(
|
|
236
|
+
return React.createElement(TableRow, {
|
|
237
|
+
key = `r-{rowIndex}`,
|
|
238
|
+
rowIndex = rowIndex,
|
|
239
|
+
place = place,
|
|
240
|
+
selected = rowSelected(rowIndex, selected),
|
|
241
|
+
styles = styles,
|
|
242
|
+
onActivated = function()
|
|
243
|
+
local _result = onRowActivated
|
|
244
|
+
if _result ~= nil then
|
|
245
|
+
_result = _result(rowIndex)
|
|
246
|
+
end
|
|
247
|
+
return _result
|
|
248
|
+
end,
|
|
249
|
+
}, React.createElement(React.Fragment, nil, _newValue_3))
|
|
208
250
|
end
|
|
209
|
-
for _k, _v in
|
|
210
|
-
_newValue_2[_k] = _callback_2(_v, _k - 1,
|
|
251
|
+
for _k, _v in order do
|
|
252
|
+
_newValue_2[_k] = _callback_2(_v, _k - 1, order)
|
|
211
253
|
end
|
|
212
254
|
-- ▲ ReadonlyArray.map ▲
|
|
213
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1,
|
|
255
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_5, React.createElement(React.Fragment, nil, _newValue_2))
|
|
214
256
|
end
|
|
215
257
|
local default = Table
|
|
216
258
|
return {
|
|
@@ -7,6 +7,7 @@ local useTableStyles = componentStyles("Table", function(theme, _param)
|
|
|
7
7
|
local dense = _param.dense
|
|
8
8
|
local padY = theme.padding.calc(if dense == true then 0.5 else 1)
|
|
9
9
|
local padX = theme.padding.calc(if dense == true then 1 else 1.5)
|
|
10
|
+
local heading = theme.typography.variants.h6
|
|
10
11
|
local textSize = if dense == true then theme.typography.fontSizes.caption else theme.typography.fontSizes.body
|
|
11
12
|
return createStyles({
|
|
12
13
|
root = {
|
|
@@ -33,12 +34,22 @@ local useTableStyles = componentStyles("Table", function(theme, _param)
|
|
|
33
34
|
BackgroundColor3 = theme.palette.action.selected,
|
|
34
35
|
BackgroundTransparency = 0,
|
|
35
36
|
},
|
|
37
|
+
hover = {
|
|
38
|
+
BackgroundColor3 = theme.palette.action.hover,
|
|
39
|
+
BackgroundTransparency = 0,
|
|
40
|
+
},
|
|
36
41
|
header = {
|
|
37
42
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
38
43
|
Size = UDim2.new(1, 0, 0, 0),
|
|
39
|
-
BackgroundColor3 = theme.palette.surface.
|
|
44
|
+
BackgroundColor3 = theme.palette.surface.elevated,
|
|
40
45
|
BorderSizePixel = 0,
|
|
41
46
|
},
|
|
47
|
+
rowStroke = {
|
|
48
|
+
Color = theme.palette.divider,
|
|
49
|
+
Thickness = 1,
|
|
50
|
+
Transparency = 0,
|
|
51
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
52
|
+
},
|
|
42
53
|
cells = {
|
|
43
54
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
44
55
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
@@ -54,14 +65,20 @@ local useTableStyles = componentStyles("Table", function(theme, _param)
|
|
|
54
65
|
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
55
66
|
},
|
|
56
67
|
headerCell = {
|
|
57
|
-
Font = theme.typography.fontFamilies.
|
|
68
|
+
Font = theme.typography.fontFamilies[heading.family],
|
|
69
|
+
TextSize = heading.size,
|
|
70
|
+
LineHeight = heading.leading,
|
|
58
71
|
TextColor3 = theme.palette.text.secondary,
|
|
59
72
|
},
|
|
60
|
-
|
|
61
|
-
|
|
73
|
+
band = {
|
|
74
|
+
Position = UDim2.new(0, padX, 0, padY),
|
|
75
|
+
Size = UDim2.new(1, -(padX * 2), 0, 0),
|
|
76
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
77
|
+
BackgroundTransparency = 1,
|
|
78
|
+
BorderSizePixel = 0,
|
|
79
|
+
},
|
|
80
|
+
tail = {
|
|
62
81
|
PaddingBottom = UDim.new(0, padY),
|
|
63
|
-
PaddingLeft = UDim.new(0, padX),
|
|
64
|
-
PaddingRight = UDim.new(0, padX),
|
|
65
82
|
},
|
|
66
83
|
corner = {
|
|
67
84
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -6,6 +6,7 @@ export interface TableColumnSpec {
|
|
|
6
6
|
flex?: number;
|
|
7
7
|
align?: TableAlign;
|
|
8
8
|
sortable?: boolean;
|
|
9
|
+
wrap?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface ResolvedColumn {
|
|
11
12
|
header: unknown;
|
|
@@ -13,6 +14,7 @@ export interface ResolvedColumn {
|
|
|
13
14
|
flex?: number;
|
|
14
15
|
align: TableAlign;
|
|
15
16
|
sortable: boolean;
|
|
17
|
+
wrap: boolean;
|
|
16
18
|
}
|
|
17
19
|
export interface ColumnSize {
|
|
18
20
|
scale: number;
|
|
@@ -6,6 +6,7 @@ local function resolveColumn(column)
|
|
|
6
6
|
header = column,
|
|
7
7
|
align = "left",
|
|
8
8
|
sortable = false,
|
|
9
|
+
wrap = false,
|
|
9
10
|
}
|
|
10
11
|
end
|
|
11
12
|
return {
|
|
@@ -14,6 +15,7 @@ local function resolveColumn(column)
|
|
|
14
15
|
flex = column.flex,
|
|
15
16
|
align = column.align or "left",
|
|
16
17
|
sortable = column.sortable == true,
|
|
18
|
+
wrap = column.wrap == true,
|
|
17
19
|
}
|
|
18
20
|
end
|
|
19
21
|
--* Scale/offset for each column. Number widths are scales. Flex shares whatever scale is left.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function sortKey(value)
|
|
3
|
+
local _value = value
|
|
4
|
+
if type(_value) == "number" then
|
|
5
|
+
return value
|
|
6
|
+
end
|
|
7
|
+
local _value_1 = value
|
|
8
|
+
local _condition = type(_value_1) == "string"
|
|
9
|
+
if _condition then
|
|
10
|
+
_condition = value ~= ""
|
|
11
|
+
end
|
|
12
|
+
if _condition then
|
|
13
|
+
local numeric = tonumber(value)
|
|
14
|
+
if numeric ~= nil then
|
|
15
|
+
return numeric
|
|
16
|
+
end
|
|
17
|
+
return value
|
|
18
|
+
end
|
|
19
|
+
return ""
|
|
20
|
+
end
|
|
21
|
+
local function keyBefore(left, right)
|
|
22
|
+
local _left = left
|
|
23
|
+
local _condition = type(_left) == "number"
|
|
24
|
+
if _condition then
|
|
25
|
+
local _right = right
|
|
26
|
+
_condition = type(_right) == "number"
|
|
27
|
+
end
|
|
28
|
+
if _condition then
|
|
29
|
+
return left < right
|
|
30
|
+
end
|
|
31
|
+
local _left_1 = left
|
|
32
|
+
local leftText = if type(_left_1) == "number" then `{left}` else left
|
|
33
|
+
local _right = right
|
|
34
|
+
local rightText = if type(_right) == "number" then `{right}` else right
|
|
35
|
+
return leftText < rightText
|
|
36
|
+
end
|
|
37
|
+
local function rowBefore(rows, left, right, column, desc)
|
|
38
|
+
local leftKey = sortKey(rows[left + 1][column + 1])
|
|
39
|
+
local rightKey = sortKey(rows[right + 1][column + 1])
|
|
40
|
+
if leftKey == rightKey then
|
|
41
|
+
return false
|
|
42
|
+
end
|
|
43
|
+
local before = keyBefore(leftKey, rightKey)
|
|
44
|
+
return if desc then not before else before
|
|
45
|
+
end
|
|
46
|
+
--* Source indexes in sort order. Ties keep the original row order.
|
|
47
|
+
local function sortedRowOrder(rows, column, direction)
|
|
48
|
+
local count = #rows
|
|
49
|
+
local order = {}
|
|
50
|
+
do
|
|
51
|
+
local index = 0
|
|
52
|
+
local _shouldIncrement = false
|
|
53
|
+
while true do
|
|
54
|
+
if _shouldIncrement then
|
|
55
|
+
index += 1
|
|
56
|
+
else
|
|
57
|
+
_shouldIncrement = true
|
|
58
|
+
end
|
|
59
|
+
if not (index < count) then
|
|
60
|
+
break
|
|
61
|
+
end
|
|
62
|
+
local _index = index
|
|
63
|
+
table.insert(order, _index)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
if column == nil then
|
|
67
|
+
return order
|
|
68
|
+
end
|
|
69
|
+
local desc = direction == "desc"
|
|
70
|
+
do
|
|
71
|
+
local index = 1
|
|
72
|
+
local _shouldIncrement = false
|
|
73
|
+
while true do
|
|
74
|
+
if _shouldIncrement then
|
|
75
|
+
index += 1
|
|
76
|
+
else
|
|
77
|
+
_shouldIncrement = true
|
|
78
|
+
end
|
|
79
|
+
if not (index < count) then
|
|
80
|
+
break
|
|
81
|
+
end
|
|
82
|
+
local current = order[index + 1]
|
|
83
|
+
local slot = index
|
|
84
|
+
while slot > 0 and rowBefore(rows, current, order[slot], column, desc) do
|
|
85
|
+
order[slot + 1] = order[slot]
|
|
86
|
+
slot -= 1
|
|
87
|
+
end
|
|
88
|
+
order[slot + 1] = current
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
return order
|
|
92
|
+
end
|
|
93
|
+
return {
|
|
94
|
+
sortedRowOrder = sortedRowOrder,
|
|
95
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useRef = _react.useRef
|
|
4
7
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
5
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
6
9
|
local stepChoice = TS.import(script, script.Parent.Parent.Parent, "select", "components", "stepChoice").stepChoice
|
|
7
10
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
|
+
local tabScroll = TS.import(script, script.Parent, "tabScroll").tabScroll
|
|
8
12
|
local tabsIsVertical = TS.import(script, script.Parent, "tabsOrientation").tabsIsVertical
|
|
9
13
|
local useTabsStyles = TS.import(script, script.Parent, "Tabs.styles").default
|
|
10
14
|
local function Tabs(props)
|
|
@@ -24,12 +28,61 @@ local function Tabs(props)
|
|
|
24
28
|
centered = centered,
|
|
25
29
|
})
|
|
26
30
|
local vertical = tabsIsVertical(orientation)
|
|
31
|
+
local frame = useRef()
|
|
32
|
+
local tabs = useRef({})
|
|
27
33
|
local choose = function(index)
|
|
28
34
|
local choice = options[index + 1]
|
|
29
35
|
if choice ~= nil and canActivate(disabled or choice.disabled) and choice.value ~= value then
|
|
30
36
|
onChange(choice.value)
|
|
31
37
|
end
|
|
32
38
|
end
|
|
39
|
+
useEffect(function()
|
|
40
|
+
local alive = true
|
|
41
|
+
local reveal = function()
|
|
42
|
+
if not alive then
|
|
43
|
+
return nil
|
|
44
|
+
end
|
|
45
|
+
local host = frame.current
|
|
46
|
+
if host == nil then
|
|
47
|
+
return nil
|
|
48
|
+
end
|
|
49
|
+
-- ▼ ReadonlyArray.findIndex ▼
|
|
50
|
+
local _callback = function(option)
|
|
51
|
+
return option.value == value
|
|
52
|
+
end
|
|
53
|
+
local _result = -1
|
|
54
|
+
for _i, _v in options do
|
|
55
|
+
if _callback(_v, _i - 1, options) == true then
|
|
56
|
+
_result = _i - 1
|
|
57
|
+
break
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
-- ▲ ReadonlyArray.findIndex ▲
|
|
61
|
+
local index = _result
|
|
62
|
+
local tab = tabs.current[index + 1]
|
|
63
|
+
if tab == nil then
|
|
64
|
+
return nil
|
|
65
|
+
end
|
|
66
|
+
local current = if vertical then host.CanvasPosition.Y else host.CanvasPosition.X
|
|
67
|
+
local origin = if vertical then host.AbsolutePosition.Y else host.AbsolutePosition.X
|
|
68
|
+
local start = if vertical then tab.AbsolutePosition.Y else tab.AbsolutePosition.X
|
|
69
|
+
local size = if vertical then tab.AbsoluteSize.Y else tab.AbsoluteSize.X
|
|
70
|
+
local view = if vertical then host.AbsoluteSize.Y else host.AbsoluteSize.X
|
|
71
|
+
if view <= 0 then
|
|
72
|
+
return nil
|
|
73
|
+
end
|
|
74
|
+
local scrolled = tabScroll(current, start - (origin - current), size, view)
|
|
75
|
+
if math.abs(scrolled - current) < 1 then
|
|
76
|
+
return nil
|
|
77
|
+
end
|
|
78
|
+
host.CanvasPosition = if vertical then Vector2.new(host.CanvasPosition.X, scrolled) else Vector2.new(scrolled, host.CanvasPosition.Y)
|
|
79
|
+
end
|
|
80
|
+
-- Next frame. A deferred scroll write runs inside this effect flush and re-enters render.
|
|
81
|
+
task.delay(0, reveal)
|
|
82
|
+
return function()
|
|
83
|
+
alive = false
|
|
84
|
+
end
|
|
85
|
+
end, { value, vertical, #options })
|
|
33
86
|
local onKey = function(_, input)
|
|
34
87
|
-- ▼ ReadonlyArray.findIndex ▼
|
|
35
88
|
local _callback = function(option)
|
|
@@ -60,7 +113,17 @@ local function Tabs(props)
|
|
|
60
113
|
_condition = "Tabs"
|
|
61
114
|
end
|
|
62
115
|
_attributes.key = _condition
|
|
63
|
-
_attributes.hostRef =
|
|
116
|
+
_attributes.hostRef = function(instance)
|
|
117
|
+
frame.current = instance
|
|
118
|
+
if ref == nil then
|
|
119
|
+
return nil
|
|
120
|
+
end
|
|
121
|
+
if type(ref) == "function" then
|
|
122
|
+
ref(instance)
|
|
123
|
+
else
|
|
124
|
+
ref.current = instance
|
|
125
|
+
end
|
|
126
|
+
end
|
|
64
127
|
_attributes.base = styles.root
|
|
65
128
|
_attributes.className = className
|
|
66
129
|
_attributes.sx = sx
|
|
@@ -83,6 +146,11 @@ local function Tabs(props)
|
|
|
83
146
|
end
|
|
84
147
|
_attributes_2.Text = choice.label
|
|
85
148
|
_attributes_2.LayoutOrder = index
|
|
149
|
+
_attributes_2.ref = function(rbx)
|
|
150
|
+
if rbx ~= nil then
|
|
151
|
+
tabs.current[index + 1] = rbx
|
|
152
|
+
end
|
|
153
|
+
end
|
|
86
154
|
_attributes_2.Active = active
|
|
87
155
|
_attributes_2.Selectable = active
|
|
88
156
|
_attributes_2.Event = {
|
|
@@ -94,17 +162,20 @@ local function Tabs(props)
|
|
|
94
162
|
local _attributes_3 = table.clone(styles.padding)
|
|
95
163
|
setmetatable(_attributes_3, nil)
|
|
96
164
|
local _exp_1 = React.createElement("uipadding", _attributes_3)
|
|
165
|
+
local _attributes_4 = table.clone(styles.cap)
|
|
166
|
+
setmetatable(_attributes_4, nil)
|
|
167
|
+
local _exp_2 = React.createElement("uisizeconstraint", _attributes_4)
|
|
97
168
|
local _condition_1 = selected
|
|
98
169
|
if _condition_1 then
|
|
99
|
-
local
|
|
170
|
+
local _attributes_5 = {
|
|
100
171
|
key = "Indicator",
|
|
101
172
|
}
|
|
102
173
|
for _k, _v in styles.indicator do
|
|
103
|
-
|
|
174
|
+
_attributes_5[_k] = _v
|
|
104
175
|
end
|
|
105
|
-
_condition_1 = React.createElement("frame",
|
|
176
|
+
_condition_1 = React.createElement("frame", _attributes_5)
|
|
106
177
|
end
|
|
107
|
-
return React.createElement("textbutton", _attributes_2, _exp_1, _condition_1)
|
|
178
|
+
return React.createElement("textbutton", _attributes_2, _exp_1, _exp_2, _condition_1)
|
|
108
179
|
end
|
|
109
180
|
for _k, _v in options do
|
|
110
181
|
_newValue[_k] = _callback(_v, _k - 1, options)
|
|
@@ -3,12 +3,15 @@ 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 tabIndicatorBox = TS.import(script, script.Parent, "tabIndicator").tabIndicatorBox
|
|
6
7
|
local tabsIsVertical = TS.import(script, script.Parent, "tabsOrientation").tabsIsVertical
|
|
7
8
|
local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
8
9
|
local orientation = _param.orientation
|
|
9
10
|
local centered = _param.centered
|
|
10
11
|
local vertical = tabsIsVertical(orientation)
|
|
11
12
|
local bar = theme.padding.calc(0.5)
|
|
13
|
+
local gutter = theme.padding.calc(2)
|
|
14
|
+
local mark = tabIndicatorBox(vertical, bar, gutter)
|
|
12
15
|
return createStyles({
|
|
13
16
|
root = {
|
|
14
17
|
Size = if vertical then UDim2.new(0, theme.spacing.calc(16), 1, 0) else UDim2.new(1, 0, 0, theme.spacing.calc(4)),
|
|
@@ -37,6 +40,10 @@ local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
|
37
40
|
Font = theme.typography.fontFamilies.default,
|
|
38
41
|
TextSize = theme.typography.fontSizes.body,
|
|
39
42
|
TextXAlignment = if vertical then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
|
|
43
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
44
|
+
},
|
|
45
|
+
cap = {
|
|
46
|
+
MaxSize = Vector2.new(if vertical then math.huge else theme.spacing.calc(16), math.huge),
|
|
40
47
|
},
|
|
41
48
|
selected = {
|
|
42
49
|
TextColor3 = theme.palette.text.primary,
|
|
@@ -50,19 +57,13 @@ local useTabsStyles = componentStyles("Tabs", function(theme, _param)
|
|
|
50
57
|
PaddingTop = UDim.new(0, if vertical then theme.padding.calc(1) else 0),
|
|
51
58
|
PaddingBottom = UDim.new(0, if vertical then theme.padding.calc(1) else 0),
|
|
52
59
|
},
|
|
53
|
-
indicator =
|
|
54
|
-
Size = UDim2.new(
|
|
55
|
-
Position = UDim2.new(0, 0, 0.5, 0),
|
|
56
|
-
AnchorPoint = Vector2.new(0, 0.5),
|
|
57
|
-
BackgroundColor3 = theme.palette.primary.main,
|
|
58
|
-
BorderSizePixel = 0,
|
|
59
|
-
}) else ({
|
|
60
|
-
Size = UDim2.new(1, theme.padding.calc(4), 0, bar),
|
|
61
|
-
Position = UDim2.fromScale(0.5, 1),
|
|
62
|
-
AnchorPoint = Vector2.new(0.5, 1),
|
|
60
|
+
indicator = {
|
|
61
|
+
Size = UDim2.new(mark.widthScale, mark.widthOffset, mark.heightScale, mark.heightOffset),
|
|
62
|
+
Position = if vertical then UDim2.new(0, 0, 0.5, 0) else UDim2.fromScale(0.5, 1),
|
|
63
|
+
AnchorPoint = if vertical then Vector2.new(0, 0.5) else Vector2.new(0.5, 1),
|
|
63
64
|
BackgroundColor3 = theme.palette.primary.main,
|
|
64
65
|
BorderSizePixel = 0,
|
|
65
|
-
}
|
|
66
|
+
},
|
|
66
67
|
})
|
|
67
68
|
end)
|
|
68
69
|
local default = useTabsStyles
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Indicator box inside a tab. Horizontal width stays on the tab; a positive width offset spills into the next one. */
|
|
2
|
+
export declare function tabIndicatorBox(vertical: boolean, bar: number, gutter: number): {
|
|
3
|
+
widthScale: number;
|
|
4
|
+
widthOffset: number;
|
|
5
|
+
heightScale: number;
|
|
6
|
+
heightOffset: number;
|
|
7
|
+
};
|