@rbxts/uiblox 0.2.0-alpha.36 → 0.2.0-alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -18
- package/out/theme/constants/NumberConstants.d.ts +10 -0
- package/out/theme/constants/NumberConstants.luau +12 -0
- package/out/theme/interfaces/density/controlMetrics.luau +2 -2
- package/out/theme/interfaces/palette/Palette.d.ts +7 -0
- package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
- package/out/theme/interfaces/theme/Theme.d.ts +6 -0
- package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +3 -1
- package/out/theme/interfaces/typography/Variants.luau +25 -1
- package/out/theme/styles/utilities/focusRing.d.ts +7 -0
- package/out/theme/styles/utilities/focusRing.luau +14 -0
- package/out/theme/styles/utilities/index.d.ts +1 -0
- package/out/theme/styles/utilities/init.luau +3 -0
- package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
- package/out/theme/styles/utilities/resolveSx.luau +53 -12
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/theme/themes/createPalette.luau +15 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.luau +112 -32
- package/out/ui/packages/accordion/components/Accordion.styles.luau +70 -32
- package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
- package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +39 -12
- package/out/ui/packages/alert/components/Alert.styles.luau +44 -22
- package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
- package/out/ui/packages/alert/components/alertAction.luau +11 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
- package/out/ui/packages/appBar/components/AppBar.luau +88 -22
- package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -11
- package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
- package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +9 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +107 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +55 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
- package/out/ui/packages/avatarGroup/index.d.ts +3 -0
- package/out/ui/packages/avatarGroup/init.luau +6 -0
- package/out/ui/packages/badge/components/Badge.luau +14 -11
- package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +24 -3
- package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +21 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +10 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
- package/out/ui/packages/button/components/Button.d.ts +2 -0
- package/out/ui/packages/button/components/Button.luau +112 -36
- package/out/ui/packages/button/components/Button.styles.luau +2 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
- package/out/ui/packages/button/components/buttonLook.luau +11 -0
- package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
- package/out/ui/packages/button/components/buttonPaint.luau +70 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +14 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +117 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
- package/out/ui/packages/buttonGroup/index.d.ts +3 -0
- package/out/ui/packages/buttonGroup/init.luau +6 -0
- package/out/ui/packages/card/components/Card.d.ts +1 -0
- package/out/ui/packages/card/components/Card.luau +21 -2
- package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
- package/out/ui/packages/card/components/Card.styles.luau +20 -9
- package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
- package/out/ui/packages/card/components/cardWidth.luau +36 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +18 -5
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -32
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +7 -5
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
- package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
- package/out/ui/packages/chip/components/Chip.luau +16 -14
- package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
- package/out/ui/packages/chip/components/Chip.styles.luau +15 -9
- package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
- package/out/ui/packages/chip/components/chipTone.luau +11 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
- package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
- package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
- package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
- package/out/ui/packages/codeEditor/index.d.ts +2 -0
- package/out/ui/packages/codeEditor/init.luau +5 -0
- package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
- package/out/ui/packages/collapse/components/Collapse.luau +34 -0
- package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
- package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
- package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
- package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
- package/out/ui/packages/collapse/index.d.ts +3 -0
- package/out/ui/packages/collapse/init.luau +6 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
- package/out/ui/packages/colorPicker/index.d.ts +1 -1
- package/out/ui/packages/colorPicker/init.luau +2 -0
- package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
- package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
- package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
- package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
- package/out/ui/packages/copyButton/index.d.ts +3 -0
- package/out/ui/packages/copyButton/init.luau +6 -0
- package/out/ui/packages/cover/components/Cover.d.ts +8 -0
- package/out/ui/packages/cover/components/Cover.luau +47 -0
- package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
- package/out/ui/packages/cover/components/coverFill.luau +14 -0
- package/out/ui/packages/cover/index.d.ts +3 -0
- package/out/ui/packages/cover/init.luau +6 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +186 -95
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
- package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
- package/out/ui/packages/dateRange/index.d.ts +1 -1
- package/out/ui/packages/dateRange/init.luau +3 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
- package/out/ui/packages/dialog/components/Dialog.luau +55 -6
- package/out/ui/packages/dialog/components/Dialog.styles.luau +9 -5
- package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
- package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
- package/out/ui/packages/divider/components/Divider.luau +60 -13
- package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +2 -0
- package/out/ui/packages/drawer/components/Drawer.luau +51 -7
- package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +15 -1
- package/out/ui/packages/drawer/components/drawerPlacement.luau +46 -0
- package/out/ui/packages/editorFace.d.ts +22 -0
- package/out/ui/packages/editorFace.luau +49 -0
- package/out/ui/packages/fab/components/Fab.luau +19 -6
- package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
- package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
- package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
- package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
- package/out/ui/packages/icon/components/Icon.d.ts +6 -2
- package/out/ui/packages/icon/components/Icon.luau +23 -3
- package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
- package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
- package/out/ui/packages/icon/components/glyphs.luau +64 -0
- package/out/ui/packages/icon/index.d.ts +1 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +6 -1
- package/out/ui/packages/iconButton/components/IconButton.luau +112 -11
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
- package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
- package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
- package/out/ui/packages/iconButton/components/transportGlyph.d.ts +10 -0
- package/out/ui/packages/iconButton/components/transportGlyph.luau +77 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
- package/out/ui/packages/imageList/components/ImageList.luau +28 -7
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +17 -10
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +8 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +36 -0
- package/out/ui/packages/index.d.ts +12 -0
- package/out/ui/packages/init.luau +36 -0
- package/out/ui/packages/input/components/Input.d.ts +4 -0
- package/out/ui/packages/input/components/Input.luau +74 -37
- package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
- package/out/ui/packages/input/components/Input.styles.luau +45 -18
- package/out/ui/packages/input/components/clampText.d.ts +2 -0
- package/out/ui/packages/input/components/clampText.luau +16 -0
- package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
- package/out/ui/packages/input/components/fieldChrome.luau +11 -0
- package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
- package/out/ui/packages/input/components/multilineHeight.luau +11 -0
- package/out/ui/packages/layout/components/Box.luau +92 -13
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
- package/out/ui/packages/layout/components/Box.styles.luau +0 -9
- package/out/ui/packages/layout/components/Grid.luau +81 -16
- package/out/ui/packages/layout/components/Pad.d.ts +24 -0
- package/out/ui/packages/layout/components/Pad.luau +88 -0
- package/out/ui/packages/layout/components/Stack.luau +79 -13
- package/out/ui/packages/link/components/Link.luau +17 -7
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
- package/out/ui/packages/link/components/Link.styles.luau +3 -5
- package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
- package/out/ui/packages/listItem/components/ListItem.luau +155 -40
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +4 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +70 -31
- package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
- package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
- package/out/ui/packages/listItem/components/listItemLayout.d.ts +22 -0
- package/out/ui/packages/listItem/components/listItemLayout.luau +68 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +244 -46
- package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -51
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
- package/out/ui/packages/markdown/index.d.ts +2 -2
- package/out/ui/packages/markdown/init.luau +2 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +30 -2
- package/out/ui/packages/markdown/parseMarkdown.luau +453 -25
- package/out/ui/packages/menu/components/Menu.d.ts +4 -1
- package/out/ui/packages/menu/components/Menu.luau +76 -28
- package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
- package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
- package/out/ui/packages/menu/components/menuIcon.luau +32 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +82 -1
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
- package/out/ui/packages/pager/components/Pager.d.ts +11 -0
- package/out/ui/packages/pager/components/Pager.luau +114 -0
- package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
- package/out/ui/packages/pager/components/Pager.styles.luau +66 -0
- package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
- package/out/ui/packages/pager/components/pagerStep.luau +24 -0
- package/out/ui/packages/pager/index.d.ts +3 -0
- package/out/ui/packages/pager/init.luau +9 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
- package/out/ui/packages/paper/components/Paper.luau +17 -11
- package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +14 -1
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
- package/out/ui/packages/popover/components/Popover.d.ts +12 -0
- package/out/ui/packages/popover/components/Popover.luau +52 -0
- package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
- package/out/ui/packages/popover/components/Popover.styles.luau +32 -0
- package/out/ui/packages/popover/index.d.ts +2 -0
- package/out/ui/packages/popover/init.luau +5 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -0
- package/out/ui/packages/popup/components/Popup.luau +64 -2
- package/out/ui/packages/popup/components/placement.luau +6 -4
- package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +53 -9
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
- package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
- package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
- package/out/ui/packages/radioGroup/index.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.luau +48 -4
- package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
- package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
- package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
- package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
- package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
- package/out/ui/packages/select/components/Select.d.ts +2 -0
- package/out/ui/packages/select/components/Select.luau +164 -105
- package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
- package/out/ui/packages/select/components/Select.styles.luau +30 -9
- package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
- package/out/ui/packages/select/components/selectWidth.luau +15 -0
- package/out/ui/packages/shadow/components/Shadow.luau +202 -21
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
- package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
- package/out/ui/packages/slider/components/RangeSlider.luau +232 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
- package/out/ui/packages/slider/components/Slider.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.luau +53 -25
- package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
- package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
- package/out/ui/packages/slider/components/rangeValue.luau +77 -0
- package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
- package/out/ui/packages/slider/index.d.ts +3 -0
- package/out/ui/packages/slider/init.luau +6 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
- package/out/ui/packages/sparkline/components/Sparkline.luau +72 -8
- package/out/ui/packages/sparkline/index.d.ts +1 -1
- package/out/ui/packages/sparkline/init.luau +6 -1
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
- package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +59 -9
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +50 -3
- package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
- package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +1 -0
- package/out/ui/packages/stateMatrix.luau +9 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.luau +35 -7
- package/out/ui/packages/stepper/components/Stepper.styles.luau +12 -6
- package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
- package/out/ui/packages/stepper/components/stepState.luau +12 -1
- package/out/ui/packages/stepper/index.d.ts +1 -1
- package/out/ui/packages/stepper/init.luau +3 -1
- package/out/ui/packages/switch/components/Switch.luau +2 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
- package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
- package/out/ui/packages/switch/components/switchLook.luau +4 -10
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +99 -57
- package/out/ui/packages/table/components/Table.styles.luau +23 -6
- package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
- package/out/ui/packages/table/components/tableColumns.luau +2 -0
- package/out/ui/packages/table/components/tableSort.d.ts +2 -0
- package/out/ui/packages/table/components/tableSort.luau +95 -0
- package/out/ui/packages/table/index.d.ts +1 -0
- package/out/ui/packages/table/init.luau +1 -0
- package/out/ui/packages/tabs/components/Tabs.luau +77 -6
- package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
- package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
- package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
- package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
- package/out/ui/packages/text/components/Text.d.ts +9 -0
- package/out/ui/packages/text/components/Text.luau +64 -0
- package/out/ui/packages/text/components/textBox.d.ts +12 -0
- package/out/ui/packages/text/components/textBox.luau +21 -0
- package/out/ui/packages/text/index.d.ts +2 -0
- package/out/ui/packages/text/init.luau +5 -0
- package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
- package/out/ui/packages/timeField/components/TimeField.luau +106 -0
- package/out/ui/packages/timeField/index.d.ts +4 -0
- package/out/ui/packages/timeField/init.luau +9 -0
- package/out/ui/packages/timeField/timeValue.d.ts +8 -0
- package/out/ui/packages/timeField/timeValue.luau +49 -0
- package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
- package/out/ui/packages/timeline/components/Timeline.luau +102 -0
- package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
- package/out/ui/packages/timeline/components/Timeline.styles.luau +115 -0
- package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
- package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
- package/out/ui/packages/timeline/index.d.ts +3 -0
- package/out/ui/packages/timeline/init.luau +8 -0
- package/out/ui/packages/toast/components/Toast.d.ts +1 -0
- package/out/ui/packages/toast/components/Toast.luau +200 -57
- package/out/ui/packages/toast/components/Toast.styles.luau +40 -20
- package/out/ui/packages/toast/components/toastPlace.d.ts +16 -0
- package/out/ui/packages/toast/components/toastPlace.luau +44 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
- package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +31 -1
- package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
- package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
- package/out/ui/packages/treeView/components/TreeView.luau +12 -13
- package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
- package/out/ui/packages/typography/components/Typography.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +8 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +18 -3
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
- package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
- package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
- package/out/ui/packages/weekGrid/index.d.ts +3 -0
- package/out/ui/packages/weekGrid/init.luau +8 -0
- package/package.json +2 -2
|
@@ -4,11 +4,19 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useRef = _react.useRef
|
|
6
6
|
local useState = _react.useState
|
|
7
|
-
local
|
|
7
|
+
local TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
|
|
8
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
9
|
+
local controlFade = _theme.controlFade
|
|
10
|
+
local controlMetrics = _theme.controlMetrics
|
|
11
|
+
local cx = _theme.cx
|
|
12
|
+
local useTheme = _theme.useTheme
|
|
8
13
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
14
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
15
|
local commitNumber = TS.import(script, script.Parent.Parent.Parent, "numberInput", "components", "numberValue").commitNumber
|
|
11
16
|
local useSliderStyles = TS.import(script, script.Parent, "Slider.styles").default
|
|
17
|
+
local _sliderLabel = TS.import(script, script.Parent, "sliderLabel")
|
|
18
|
+
local sliderLabel = _sliderLabel.sliderLabel
|
|
19
|
+
local sliderSlot = _sliderLabel.sliderSlot
|
|
12
20
|
local sliderMarkValues = TS.import(script, script.Parent, "sliderMarks").sliderMarkValues
|
|
13
21
|
local _sliderNudge = TS.import(script, script.Parent, "sliderNudge")
|
|
14
22
|
local isSliderDrag = _sliderNudge.isSliderDrag
|
|
@@ -26,6 +34,7 @@ local function Slider(props)
|
|
|
26
34
|
local disabled = _binding.disabled
|
|
27
35
|
local size = _binding.size
|
|
28
36
|
local marks = _binding.marks
|
|
37
|
+
local format = _binding.format
|
|
29
38
|
local color = _binding.color
|
|
30
39
|
if color == nil then
|
|
31
40
|
color = "primary"
|
|
@@ -34,17 +43,26 @@ local function Slider(props)
|
|
|
34
43
|
local sx = _binding.sx
|
|
35
44
|
local id = _binding.id
|
|
36
45
|
local ref = _binding.ref
|
|
37
|
-
local
|
|
46
|
+
local labelText = sliderLabel(format, value)
|
|
47
|
+
local _binding_1 = useTheme()
|
|
48
|
+
local theme = _binding_1.theme
|
|
49
|
+
local metrics = controlMetrics(theme.density, size)
|
|
50
|
+
local caption = theme.typography.variants.caption
|
|
51
|
+
local font = theme.typography.fontFamilies[caption.family] or Enum.Font.SourceSans
|
|
52
|
+
local slot = if labelText == nil then 0 else sliderSlot(TextService:GetTextSize(labelText, caption.size, font, Vector2.new(10000, 100)).X, 52, 4)
|
|
53
|
+
local _binding_2 = useSliderStyles({
|
|
38
54
|
size = size,
|
|
39
55
|
color = color,
|
|
56
|
+
labeled = labelText ~= nil,
|
|
40
57
|
})
|
|
41
|
-
local root =
|
|
42
|
-
local track =
|
|
43
|
-
local fill =
|
|
44
|
-
local knob =
|
|
45
|
-
local corner =
|
|
46
|
-
local stroke =
|
|
47
|
-
local mark =
|
|
58
|
+
local root = _binding_2.root
|
|
59
|
+
local track = _binding_2.track
|
|
60
|
+
local fill = _binding_2.fill
|
|
61
|
+
local knob = _binding_2.knob
|
|
62
|
+
local corner = _binding_2.corner
|
|
63
|
+
local stroke = _binding_2.stroke
|
|
64
|
+
local mark = _binding_2.mark
|
|
65
|
+
local label = _binding_2.label
|
|
48
66
|
local active = canActivate(disabled)
|
|
49
67
|
local focused, setFocused = useState(false)
|
|
50
68
|
local hovering, setHovering = useState(false)
|
|
@@ -112,7 +130,6 @@ local function Slider(props)
|
|
|
112
130
|
}
|
|
113
131
|
_attributes.Active = active
|
|
114
132
|
_attributes.Selectable = active
|
|
115
|
-
_attributes.BackgroundTransparency = if showFocus then 0.85 else 1
|
|
116
133
|
_attributes.Event = {
|
|
117
134
|
InputBegan = function(rbx, input)
|
|
118
135
|
if not active then
|
|
@@ -161,19 +178,15 @@ local function Slider(props)
|
|
|
161
178
|
key = "Track",
|
|
162
179
|
}
|
|
163
180
|
for _k, _v in cx(track, {
|
|
164
|
-
BackgroundTransparency = if faded then
|
|
181
|
+
BackgroundTransparency = if faded then controlFade elseif hovering and active then 0.2 else 0.35,
|
|
182
|
+
}, labelText ~= nil and {
|
|
183
|
+
Size = UDim2.new(1, -(slot + 4), 0, metrics.sliderTrack),
|
|
165
184
|
}) do
|
|
166
185
|
_attributes_1[_k] = _v
|
|
167
186
|
end
|
|
168
187
|
local _attributes_2 = table.clone(corner)
|
|
169
188
|
setmetatable(_attributes_2, nil)
|
|
170
189
|
local _exp = React.createElement("uicorner", _attributes_2)
|
|
171
|
-
local _condition_1 = showFocus
|
|
172
|
-
if _condition_1 then
|
|
173
|
-
local _attributes_3 = table.clone(stroke)
|
|
174
|
-
setmetatable(_attributes_3, nil)
|
|
175
|
-
_condition_1 = React.createElement("uistroke", _attributes_3)
|
|
176
|
-
end
|
|
177
190
|
-- ▼ ReadonlyArray.map ▼
|
|
178
191
|
local _newValue = table.create(#markValues)
|
|
179
192
|
local _callback = function(markValue, index)
|
|
@@ -185,7 +198,7 @@ local function Slider(props)
|
|
|
185
198
|
_attributes_3[_k] = _v
|
|
186
199
|
end
|
|
187
200
|
_attributes_3.Position = UDim2.fromScale(markRatio, 0.5)
|
|
188
|
-
_attributes_3.BackgroundTransparency = if faded then
|
|
201
|
+
_attributes_3.BackgroundTransparency = if faded then controlFade else 0.35
|
|
189
202
|
return React.createElement("frame", _attributes_3)
|
|
190
203
|
end
|
|
191
204
|
for _k, _v in markValues do
|
|
@@ -197,7 +210,7 @@ local function Slider(props)
|
|
|
197
210
|
key = "Fill",
|
|
198
211
|
}
|
|
199
212
|
for _k, _v in cx(fill, {
|
|
200
|
-
BackgroundTransparency = if faded then
|
|
213
|
+
BackgroundTransparency = if faded then controlFade elseif pressed then 0.1 else 0,
|
|
201
214
|
}) do
|
|
202
215
|
_attributes_3[_k] = _v
|
|
203
216
|
end
|
|
@@ -209,7 +222,7 @@ local function Slider(props)
|
|
|
209
222
|
key = "Knob",
|
|
210
223
|
}
|
|
211
224
|
for _k, _v in cx(knob, {
|
|
212
|
-
BackgroundTransparency = if faded then
|
|
225
|
+
BackgroundTransparency = if faded then controlFade else 0,
|
|
213
226
|
}) do
|
|
214
227
|
_attributes_5[_k] = _v
|
|
215
228
|
end
|
|
@@ -217,14 +230,29 @@ local function Slider(props)
|
|
|
217
230
|
local _attributes_6 = table.clone(corner)
|
|
218
231
|
setmetatable(_attributes_6, nil)
|
|
219
232
|
local _exp_3 = React.createElement("uicorner", _attributes_6)
|
|
220
|
-
local
|
|
221
|
-
if
|
|
233
|
+
local _condition_1 = showFocus
|
|
234
|
+
if _condition_1 then
|
|
222
235
|
local _attributes_7 = table.clone(stroke)
|
|
223
236
|
setmetatable(_attributes_7, nil)
|
|
224
|
-
|
|
225
|
-
|
|
237
|
+
_condition_1 = React.createElement("uistroke", _attributes_7)
|
|
238
|
+
end
|
|
239
|
+
local _exp_4 = React.createElement("frame", _attributes_1, _exp, _exp_1, _exp_2, React.createElement("frame", _attributes_5, _exp_3, _condition_1))
|
|
240
|
+
local _result
|
|
241
|
+
if labelText ~= nil then
|
|
242
|
+
local _attributes_7 = {
|
|
243
|
+
key = "Value",
|
|
244
|
+
}
|
|
245
|
+
for _k, _v in label do
|
|
246
|
+
_attributes_7[_k] = _v
|
|
247
|
+
end
|
|
248
|
+
_attributes_7.Size = UDim2.new(0, slot, 1, 0)
|
|
249
|
+
_attributes_7.Text = labelText
|
|
250
|
+
_attributes_7.TextTransparency = if faded then controlFade else 0
|
|
251
|
+
_result = (React.createElement("textlabel", _attributes_7))
|
|
252
|
+
else
|
|
253
|
+
_result = nil
|
|
226
254
|
end
|
|
227
|
-
return React.createElement(SxHost, _attributes,
|
|
255
|
+
return React.createElement(SxHost, _attributes, _exp_4, _result)
|
|
228
256
|
end
|
|
229
257
|
local default = Slider
|
|
230
258
|
return {
|
|
@@ -3,6 +3,7 @@ export type SliderColor = "primary" | "accent";
|
|
|
3
3
|
export interface SliderStyleProps {
|
|
4
4
|
size?: ControlSize;
|
|
5
5
|
color?: SliderColor;
|
|
6
|
+
labeled?: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare const useSliderStyles: (props: SliderStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
8
9
|
export default useSliderStyles;
|
|
@@ -4,14 +4,20 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
|
|
|
4
4
|
local controlMetrics = _theme.controlMetrics
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
6
|
local componentStyles = _theme.componentStyles
|
|
7
|
+
local focusRing = _theme.focusRing
|
|
7
8
|
local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
8
9
|
local size = _param.size
|
|
9
10
|
local color = _param.color
|
|
10
11
|
if color == nil then
|
|
11
12
|
color = "primary"
|
|
12
13
|
end
|
|
14
|
+
local labeled = _param.labeled
|
|
15
|
+
if labeled == nil then
|
|
16
|
+
labeled = false
|
|
17
|
+
end
|
|
13
18
|
local metrics = controlMetrics(theme.density, size)
|
|
14
19
|
local tone = if color == "accent" then theme.palette.accent.main else theme.palette.primary.main
|
|
20
|
+
local caption = theme.typography.variants.caption
|
|
15
21
|
return createStyles({
|
|
16
22
|
root = {
|
|
17
23
|
Size = UDim2.new(1, 0, 0, metrics.sliderHeight),
|
|
@@ -19,7 +25,7 @@ local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
|
19
25
|
BorderSizePixel = 0,
|
|
20
26
|
},
|
|
21
27
|
track = {
|
|
22
|
-
Size = UDim2.new(1, 0, 0, metrics.sliderTrack),
|
|
28
|
+
Size = UDim2.new(1, if labeled then -56 else 0, 0, metrics.sliderTrack),
|
|
23
29
|
Position = UDim2.fromScale(0, 0.5),
|
|
24
30
|
AnchorPoint = Vector2.new(0, 0.5),
|
|
25
31
|
BackgroundColor3 = theme.palette.action.disabled,
|
|
@@ -39,10 +45,18 @@ local useSliderStyles = componentStyles("Slider", function(theme, _param)
|
|
|
39
45
|
corner = {
|
|
40
46
|
CornerRadius = UDim.new(1, 0),
|
|
41
47
|
},
|
|
42
|
-
stroke =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
stroke = focusRing(theme.palette.focus),
|
|
49
|
+
label = {
|
|
50
|
+
Size = UDim2.new(0, 52, 1, 0),
|
|
51
|
+
Position = UDim2.fromScale(1, 0.5),
|
|
52
|
+
AnchorPoint = Vector2.new(1, 0.5),
|
|
53
|
+
BackgroundTransparency = 1,
|
|
54
|
+
BorderSizePixel = 0,
|
|
55
|
+
Font = theme.typography.fontFamilies[caption.family],
|
|
56
|
+
TextSize = caption.size,
|
|
57
|
+
TextColor3 = theme.palette.text.secondary,
|
|
58
|
+
TextXAlignment = Enum.TextXAlignment.Right,
|
|
59
|
+
TextYAlignment = Enum.TextYAlignment.Center,
|
|
46
60
|
},
|
|
47
61
|
mark = {
|
|
48
62
|
Size = UDim2.new(0, 2, 0, metrics.sliderTrack + 4),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type RangeThumb = "low" | "high";
|
|
2
|
+
export interface RangeValue {
|
|
3
|
+
start: number;
|
|
4
|
+
finish: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function orderRange(start: number, finish: number): RangeValue;
|
|
7
|
+
export declare function rangeRatios(start: number, finish: number, min: number, max: number): {
|
|
8
|
+
low: number;
|
|
9
|
+
high: number;
|
|
10
|
+
};
|
|
11
|
+
/** Ties belong to the high thumb. */
|
|
12
|
+
export declare function rangeThumb(pointer: number, start: number, finish: number): RangeThumb;
|
|
13
|
+
export declare function rangeMove(thumb: RangeThumb, value: number, start: number, finish: number): {
|
|
14
|
+
thumb: "high";
|
|
15
|
+
start: number;
|
|
16
|
+
finish: number;
|
|
17
|
+
} | {
|
|
18
|
+
thumb: "low";
|
|
19
|
+
start: number;
|
|
20
|
+
finish: number;
|
|
21
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function orderRange(start, finish)
|
|
3
|
+
if start <= finish then
|
|
4
|
+
return {
|
|
5
|
+
start = start,
|
|
6
|
+
finish = finish,
|
|
7
|
+
}
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
start = finish,
|
|
11
|
+
finish = start,
|
|
12
|
+
}
|
|
13
|
+
end
|
|
14
|
+
local function unit(value, min, span)
|
|
15
|
+
local ratio = (value - min) / span
|
|
16
|
+
if ratio < 0 then
|
|
17
|
+
ratio = 0
|
|
18
|
+
end
|
|
19
|
+
if ratio > 1 then
|
|
20
|
+
ratio = 1
|
|
21
|
+
end
|
|
22
|
+
return ratio
|
|
23
|
+
end
|
|
24
|
+
local function rangeRatios(start, finish, min, max)
|
|
25
|
+
local span = max - min
|
|
26
|
+
local ordered = orderRange(start, finish)
|
|
27
|
+
if not (span > 0) then
|
|
28
|
+
return {
|
|
29
|
+
low = 0,
|
|
30
|
+
high = 0,
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
return {
|
|
34
|
+
low = unit(ordered.start, min, span),
|
|
35
|
+
high = unit(ordered.finish, min, span),
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
--* Ties belong to the high thumb.
|
|
39
|
+
local function rangeThumb(pointer, start, finish)
|
|
40
|
+
local ordered = orderRange(start, finish)
|
|
41
|
+
return if pointer < (ordered.start + ordered.finish) / 2 then "low" else "high"
|
|
42
|
+
end
|
|
43
|
+
local function rangeMove(thumb, value, start, finish)
|
|
44
|
+
local ordered = orderRange(start, finish)
|
|
45
|
+
if thumb == "low" then
|
|
46
|
+
if value > ordered.finish then
|
|
47
|
+
return {
|
|
48
|
+
thumb = "high",
|
|
49
|
+
start = ordered.finish,
|
|
50
|
+
finish = value,
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
return {
|
|
54
|
+
thumb = "low",
|
|
55
|
+
start = value,
|
|
56
|
+
finish = ordered.finish,
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
if value < ordered.start then
|
|
60
|
+
return {
|
|
61
|
+
thumb = "low",
|
|
62
|
+
start = value,
|
|
63
|
+
finish = ordered.start,
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
return {
|
|
67
|
+
thumb = "high",
|
|
68
|
+
start = ordered.start,
|
|
69
|
+
finish = value,
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
return {
|
|
73
|
+
orderRange = orderRange,
|
|
74
|
+
rangeRatios = rangeRatios,
|
|
75
|
+
rangeThumb = rangeThumb,
|
|
76
|
+
rangeMove = rangeMove,
|
|
77
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Caption for the current value. Missing or blank format leaves the track full width. */
|
|
2
|
+
export declare function sliderLabel(format: ((value: number) => string) | undefined, value: number): string | undefined;
|
|
3
|
+
/** A long caption grows past the short slot. A short caption keeps that slot. */
|
|
4
|
+
export declare function sliderSlot(textWidth: number, floor: number, pad?: number): number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Caption for the current value. Missing or blank format leaves the track full width.
|
|
3
|
+
local function sliderLabel(format, value)
|
|
4
|
+
if format == nil then
|
|
5
|
+
return nil
|
|
6
|
+
end
|
|
7
|
+
local text = format(value)
|
|
8
|
+
if text == "" then
|
|
9
|
+
return nil
|
|
10
|
+
end
|
|
11
|
+
return text
|
|
12
|
+
end
|
|
13
|
+
--* A long caption grows past the short slot. A short caption keeps that slot.
|
|
14
|
+
local function sliderSlot(textWidth, floor, pad)
|
|
15
|
+
if pad == nil then
|
|
16
|
+
pad = 0
|
|
17
|
+
end
|
|
18
|
+
local need = textWidth + pad
|
|
19
|
+
if need < 0 then
|
|
20
|
+
need = 0
|
|
21
|
+
end
|
|
22
|
+
if floor > need then
|
|
23
|
+
return floor
|
|
24
|
+
end
|
|
25
|
+
return need
|
|
26
|
+
end
|
|
27
|
+
return {
|
|
28
|
+
sliderLabel = sliderLabel,
|
|
29
|
+
sliderSlot = sliderSlot,
|
|
30
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { default as Slider } from "./components/Slider";
|
|
2
2
|
export { SliderProps } from "./components/Slider";
|
|
3
|
+
export { default as RangeSlider } from "./components/RangeSlider";
|
|
4
|
+
export { RangeSliderProps } from "./components/RangeSlider";
|
|
5
|
+
export { orderRange, rangeMove, rangeRatios, rangeThumb, RangeValue } from "./components/rangeValue";
|
|
@@ -2,4 +2,10 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
4
|
exports.Slider = TS.import(script, script, "components", "Slider").default
|
|
5
|
+
exports.RangeSlider = TS.import(script, script, "components", "RangeSlider").default
|
|
6
|
+
local _rangeValue = TS.import(script, script, "components", "rangeValue")
|
|
7
|
+
exports.orderRange = _rangeValue.orderRange
|
|
8
|
+
exports.rangeMove = _rangeValue.rangeMove
|
|
9
|
+
exports.rangeRatios = _rangeValue.rangeRatios
|
|
10
|
+
exports.rangeThumb = _rangeValue.rangeThumb
|
|
5
11
|
return exports
|
|
@@ -15,6 +15,7 @@ local function Snackbar(props)
|
|
|
15
15
|
end
|
|
16
16
|
local action = _binding.action
|
|
17
17
|
local onAction = _binding.onAction
|
|
18
|
+
local edge = _binding.edge
|
|
18
19
|
local className = _binding.className
|
|
19
20
|
local sx = _binding.sx
|
|
20
21
|
local id = _binding.id
|
|
@@ -29,6 +30,7 @@ local function Snackbar(props)
|
|
|
29
30
|
variant = variant,
|
|
30
31
|
action = snackbarActionLabel(action),
|
|
31
32
|
onAction = onAction,
|
|
33
|
+
edge = edge,
|
|
32
34
|
className = className,
|
|
33
35
|
sx = sx,
|
|
34
36
|
}
|
|
@@ -4,6 +4,9 @@ export interface SparklineProps {
|
|
|
4
4
|
width?: number;
|
|
5
5
|
height?: number;
|
|
6
6
|
color?: Color3;
|
|
7
|
+
area?: boolean;
|
|
8
|
+
mark?: number;
|
|
9
|
+
onPick?: (index: number) => void;
|
|
7
10
|
}
|
|
8
11
|
declare function Sparkline(props: CustomizedProps<Frame, SparklineProps>): JSX.Element;
|
|
9
12
|
export default Sparkline;
|
|
@@ -1,9 +1,15 @@
|
|
|
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 useRef = _react.useRef
|
|
4
6
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
5
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
-
local
|
|
8
|
+
local _sparklineLayout = TS.import(script, script.Parent.Parent, "sparklineLayout")
|
|
9
|
+
local sparklineArea = _sparklineLayout.sparklineArea
|
|
10
|
+
local sparklineLayout = _sparklineLayout.sparklineLayout
|
|
11
|
+
local sparklinePick = _sparklineLayout.sparklinePick
|
|
12
|
+
local sparklinePoint = _sparklineLayout.sparklinePoint
|
|
7
13
|
local function Sparkline(props)
|
|
8
14
|
local _binding = props
|
|
9
15
|
local values = _binding.values
|
|
@@ -16,13 +22,21 @@ local function Sparkline(props)
|
|
|
16
22
|
height = 36
|
|
17
23
|
end
|
|
18
24
|
local color = _binding.color
|
|
25
|
+
local area = _binding.area
|
|
26
|
+
local mark = _binding.mark
|
|
27
|
+
local onPick = _binding.onPick
|
|
19
28
|
local className = _binding.className
|
|
20
29
|
local sx = _binding.sx
|
|
21
30
|
local id = _binding.id
|
|
22
31
|
local ref = _binding.ref
|
|
23
32
|
local _binding_1 = useTheme()
|
|
24
33
|
local theme = _binding_1.theme
|
|
25
|
-
local
|
|
34
|
+
local host = useRef()
|
|
35
|
+
local inset = 6
|
|
36
|
+
local dot = 6
|
|
37
|
+
local segments = sparklineLayout(values, width, height, inset)
|
|
38
|
+
local bars = if area == true then sparklineArea(values, width, height, inset) else {}
|
|
39
|
+
local marked = if mark ~= nil then sparklinePoint(values, mark, width, height, inset) else nil
|
|
26
40
|
local stroke = color or theme.palette.primary.main
|
|
27
41
|
local _attributes = {
|
|
28
42
|
tag = "frame",
|
|
@@ -32,7 +46,30 @@ local function Sparkline(props)
|
|
|
32
46
|
_condition = "Sparkline"
|
|
33
47
|
end
|
|
34
48
|
_attributes.key = _condition
|
|
35
|
-
_attributes.hostRef =
|
|
49
|
+
_attributes.hostRef = function(instance)
|
|
50
|
+
host.current = instance
|
|
51
|
+
if ref == nil then
|
|
52
|
+
return nil
|
|
53
|
+
end
|
|
54
|
+
if type(ref) == "function" then
|
|
55
|
+
ref(instance)
|
|
56
|
+
return nil
|
|
57
|
+
end
|
|
58
|
+
ref.current = instance
|
|
59
|
+
end
|
|
60
|
+
_attributes.Active = onPick ~= nil
|
|
61
|
+
_attributes.Event = if onPick == nil then nil else {
|
|
62
|
+
InputBegan = function(input)
|
|
63
|
+
local frame = host.current
|
|
64
|
+
if frame == nil then
|
|
65
|
+
return nil
|
|
66
|
+
end
|
|
67
|
+
if input.UserInputType ~= Enum.UserInputType.MouseButton1 and input.UserInputType ~= Enum.UserInputType.Touch then
|
|
68
|
+
return nil
|
|
69
|
+
end
|
|
70
|
+
sparklinePick(input.Position.X - frame.AbsolutePosition.X, #values, width, onPick, inset)
|
|
71
|
+
end,
|
|
72
|
+
}
|
|
36
73
|
_attributes.base = {
|
|
37
74
|
Size = UDim2.fromOffset(width, height),
|
|
38
75
|
BackgroundTransparency = 1,
|
|
@@ -42,8 +79,35 @@ local function Sparkline(props)
|
|
|
42
79
|
_attributes.className = className
|
|
43
80
|
_attributes.sx = sx
|
|
44
81
|
-- ▼ ReadonlyArray.map ▼
|
|
45
|
-
local _newValue = table.create(#
|
|
46
|
-
local _callback = function(
|
|
82
|
+
local _newValue = table.create(#bars)
|
|
83
|
+
local _callback = function(bar, index)
|
|
84
|
+
return if bar.height < 1 then nil else (React.createElement("frame", {
|
|
85
|
+
key = `a-{index}`,
|
|
86
|
+
Position = UDim2.fromOffset(bar.x, bar.y),
|
|
87
|
+
Size = UDim2.fromOffset(math.max(bar.width, 1), bar.height),
|
|
88
|
+
BackgroundColor3 = stroke,
|
|
89
|
+
BackgroundTransparency = 0.62,
|
|
90
|
+
BorderSizePixel = 0,
|
|
91
|
+
}))
|
|
92
|
+
end
|
|
93
|
+
for _k, _v in bars do
|
|
94
|
+
_newValue[_k] = _callback(_v, _k - 1, bars)
|
|
95
|
+
end
|
|
96
|
+
-- ▲ ReadonlyArray.map ▲
|
|
97
|
+
local _exp = if marked ~= nil then (React.createElement("frame", {
|
|
98
|
+
key = "Mark",
|
|
99
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
100
|
+
Position = UDim2.fromOffset(marked.x, marked.y),
|
|
101
|
+
Size = UDim2.fromOffset(dot, dot),
|
|
102
|
+
BackgroundColor3 = stroke,
|
|
103
|
+
BorderSizePixel = 0,
|
|
104
|
+
ZIndex = 3,
|
|
105
|
+
}, React.createElement("uicorner", {
|
|
106
|
+
CornerRadius = UDim.new(1, 0),
|
|
107
|
+
}))) else nil
|
|
108
|
+
-- ▼ ReadonlyArray.map ▼
|
|
109
|
+
local _newValue_1 = table.create(#segments)
|
|
110
|
+
local _callback_1 = function(segment, index)
|
|
47
111
|
return React.createElement("frame", {
|
|
48
112
|
key = `s-{index}`,
|
|
49
113
|
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
@@ -55,10 +119,10 @@ local function Sparkline(props)
|
|
|
55
119
|
})
|
|
56
120
|
end
|
|
57
121
|
for _k, _v in segments do
|
|
58
|
-
|
|
122
|
+
_newValue_1[_k] = _callback_1(_v, _k - 1, segments)
|
|
59
123
|
end
|
|
60
124
|
-- ▲ ReadonlyArray.map ▲
|
|
61
|
-
return React.createElement(SxHost, _attributes, _newValue)
|
|
125
|
+
return React.createElement(SxHost, _attributes, _newValue, _exp, _newValue_1)
|
|
62
126
|
end
|
|
63
127
|
local default = Sparkline
|
|
64
128
|
return {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as Sparkline } from "./components/Sparkline";
|
|
2
2
|
export { SparklineProps } from "./components/Sparkline";
|
|
3
|
-
export { sparklineLayout, SparkSegment } from "./sparklineLayout";
|
|
3
|
+
export { sparklineArea, sparklineIndex, sparklineLayout, sparklinePick, sparklinePoint, SparkBar, SparkSegment } from "./sparklineLayout";
|
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
4
|
exports.Sparkline = TS.import(script, script, "components", "Sparkline").default
|
|
5
|
-
|
|
5
|
+
local _sparklineLayout = TS.import(script, script, "sparklineLayout")
|
|
6
|
+
exports.sparklineArea = _sparklineLayout.sparklineArea
|
|
7
|
+
exports.sparklineIndex = _sparklineLayout.sparklineIndex
|
|
8
|
+
exports.sparklineLayout = _sparklineLayout.sparklineLayout
|
|
9
|
+
exports.sparklinePick = _sparklineLayout.sparklinePick
|
|
10
|
+
exports.sparklinePoint = _sparklineLayout.sparklinePoint
|
|
6
11
|
return exports
|
|
@@ -4,5 +4,22 @@ export interface SparkSegment {
|
|
|
4
4
|
length: number;
|
|
5
5
|
rotation: number;
|
|
6
6
|
}
|
|
7
|
+
export interface SparkBar {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
7
13
|
/** Line segments for a number series. Empty and single-point series draw nothing. */
|
|
8
14
|
export declare function sparklineLayout(values: number[], width: number, height: number, pad?: number): SparkSegment[];
|
|
15
|
+
/** Vertical slices under the line. Missing when the series cannot draw. */
|
|
16
|
+
export declare function sparklineArea(values: number[], width: number, height: number, pad?: number): SparkBar[];
|
|
17
|
+
/** Nearest sample from a local x. Undefined when the trace cannot be hit. */
|
|
18
|
+
export declare function sparklineIndex(localX: number, count: number, width: number, pad?: number): number | undefined;
|
|
19
|
+
/** Calls onPick with the nearest sample. Does nothing when the callback is absent. */
|
|
20
|
+
export declare function sparklinePick(localX: number, count: number, width: number, onPick?: (index: number) => void, pad?: number): number | undefined;
|
|
21
|
+
/** Point for a sample, used to mark the trace. */
|
|
22
|
+
export declare function sparklinePoint(values: number[], index: number, width: number, height: number, pad?: number): {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
} | undefined;
|