@rbxts/uiblox 0.2.0-alpha.36 → 0.2.0-alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -18
- package/out/theme/constants/NumberConstants.d.ts +10 -0
- package/out/theme/constants/NumberConstants.luau +12 -0
- package/out/theme/interfaces/density/controlMetrics.luau +2 -2
- package/out/theme/interfaces/palette/Palette.d.ts +7 -0
- package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
- package/out/theme/interfaces/theme/Theme.d.ts +6 -0
- package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +3 -1
- package/out/theme/interfaces/typography/Variants.luau +25 -1
- package/out/theme/styles/utilities/focusRing.d.ts +7 -0
- package/out/theme/styles/utilities/focusRing.luau +14 -0
- package/out/theme/styles/utilities/index.d.ts +1 -0
- package/out/theme/styles/utilities/init.luau +3 -0
- package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
- package/out/theme/styles/utilities/resolveSx.luau +53 -12
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/theme/themes/createPalette.luau +15 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.luau +112 -32
- package/out/ui/packages/accordion/components/Accordion.styles.luau +70 -32
- package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
- package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +39 -12
- package/out/ui/packages/alert/components/Alert.styles.luau +44 -22
- package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
- package/out/ui/packages/alert/components/alertAction.luau +11 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
- package/out/ui/packages/appBar/components/AppBar.luau +88 -22
- package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -11
- package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
- package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +9 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +107 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +55 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
- package/out/ui/packages/avatarGroup/index.d.ts +3 -0
- package/out/ui/packages/avatarGroup/init.luau +6 -0
- package/out/ui/packages/badge/components/Badge.luau +14 -11
- package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +24 -3
- package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +21 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +10 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
- package/out/ui/packages/button/components/Button.d.ts +2 -0
- package/out/ui/packages/button/components/Button.luau +112 -36
- package/out/ui/packages/button/components/Button.styles.luau +2 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
- package/out/ui/packages/button/components/buttonLook.luau +11 -0
- package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
- package/out/ui/packages/button/components/buttonPaint.luau +70 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +14 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +117 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
- package/out/ui/packages/buttonGroup/index.d.ts +3 -0
- package/out/ui/packages/buttonGroup/init.luau +6 -0
- package/out/ui/packages/card/components/Card.d.ts +1 -0
- package/out/ui/packages/card/components/Card.luau +21 -2
- package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
- package/out/ui/packages/card/components/Card.styles.luau +20 -9
- package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
- package/out/ui/packages/card/components/cardWidth.luau +36 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +18 -5
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -32
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +7 -5
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
- package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
- package/out/ui/packages/chip/components/Chip.luau +16 -14
- package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
- package/out/ui/packages/chip/components/Chip.styles.luau +15 -9
- package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
- package/out/ui/packages/chip/components/chipTone.luau +11 -0
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
- package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
- package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
- package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
- package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
- package/out/ui/packages/codeEditor/index.d.ts +2 -0
- package/out/ui/packages/codeEditor/init.luau +5 -0
- package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
- package/out/ui/packages/collapse/components/Collapse.luau +34 -0
- package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
- package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
- package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
- package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
- package/out/ui/packages/collapse/index.d.ts +3 -0
- package/out/ui/packages/collapse/init.luau +6 -0
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +16 -6
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
- package/out/ui/packages/colorPicker/index.d.ts +1 -1
- package/out/ui/packages/colorPicker/init.luau +2 -0
- package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
- package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
- package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
- package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
- package/out/ui/packages/copyButton/index.d.ts +3 -0
- package/out/ui/packages/copyButton/init.luau +6 -0
- package/out/ui/packages/cover/components/Cover.d.ts +8 -0
- package/out/ui/packages/cover/components/Cover.luau +47 -0
- package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
- package/out/ui/packages/cover/components/coverFill.luau +14 -0
- package/out/ui/packages/cover/index.d.ts +3 -0
- package/out/ui/packages/cover/init.luau +6 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +186 -95
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
- package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
- package/out/ui/packages/dateRange/index.d.ts +1 -1
- package/out/ui/packages/dateRange/init.luau +3 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
- package/out/ui/packages/dialog/components/Dialog.luau +55 -6
- package/out/ui/packages/dialog/components/Dialog.styles.luau +9 -5
- package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
- package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
- package/out/ui/packages/divider/components/Divider.luau +60 -13
- package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +2 -0
- package/out/ui/packages/drawer/components/Drawer.luau +51 -7
- package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +15 -1
- package/out/ui/packages/drawer/components/drawerPlacement.luau +46 -0
- package/out/ui/packages/editorFace.d.ts +22 -0
- package/out/ui/packages/editorFace.luau +49 -0
- package/out/ui/packages/fab/components/Fab.luau +19 -6
- package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
- package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
- package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
- package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
- package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
- package/out/ui/packages/icon/components/Icon.d.ts +6 -2
- package/out/ui/packages/icon/components/Icon.luau +23 -3
- package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
- package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
- package/out/ui/packages/icon/components/glyphs.luau +64 -0
- package/out/ui/packages/icon/index.d.ts +1 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +6 -1
- package/out/ui/packages/iconButton/components/IconButton.luau +112 -11
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
- package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
- package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
- package/out/ui/packages/iconButton/components/transportGlyph.d.ts +10 -0
- package/out/ui/packages/iconButton/components/transportGlyph.luau +77 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
- package/out/ui/packages/imageList/components/ImageList.luau +28 -7
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +17 -10
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +8 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +36 -0
- package/out/ui/packages/index.d.ts +12 -0
- package/out/ui/packages/init.luau +36 -0
- package/out/ui/packages/input/components/Input.d.ts +4 -0
- package/out/ui/packages/input/components/Input.luau +74 -37
- package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
- package/out/ui/packages/input/components/Input.styles.luau +45 -18
- package/out/ui/packages/input/components/clampText.d.ts +2 -0
- package/out/ui/packages/input/components/clampText.luau +16 -0
- package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
- package/out/ui/packages/input/components/fieldChrome.luau +11 -0
- package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
- package/out/ui/packages/input/components/multilineHeight.luau +11 -0
- package/out/ui/packages/layout/components/Box.luau +92 -13
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
- package/out/ui/packages/layout/components/Box.styles.luau +0 -9
- package/out/ui/packages/layout/components/Grid.luau +81 -16
- package/out/ui/packages/layout/components/Pad.d.ts +24 -0
- package/out/ui/packages/layout/components/Pad.luau +88 -0
- package/out/ui/packages/layout/components/Stack.luau +79 -13
- package/out/ui/packages/link/components/Link.luau +17 -7
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
- package/out/ui/packages/link/components/Link.styles.luau +3 -5
- package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
- package/out/ui/packages/listItem/components/ListItem.luau +155 -40
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +4 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +70 -31
- package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
- package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
- package/out/ui/packages/listItem/components/listItemLayout.d.ts +22 -0
- package/out/ui/packages/listItem/components/listItemLayout.luau +68 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +244 -46
- package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -51
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
- package/out/ui/packages/markdown/index.d.ts +2 -2
- package/out/ui/packages/markdown/init.luau +2 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +30 -2
- package/out/ui/packages/markdown/parseMarkdown.luau +453 -25
- package/out/ui/packages/menu/components/Menu.d.ts +4 -1
- package/out/ui/packages/menu/components/Menu.luau +76 -28
- package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
- package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
- package/out/ui/packages/menu/components/menuIcon.luau +32 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +82 -1
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
- package/out/ui/packages/pager/components/Pager.d.ts +11 -0
- package/out/ui/packages/pager/components/Pager.luau +114 -0
- package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
- package/out/ui/packages/pager/components/Pager.styles.luau +66 -0
- package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
- package/out/ui/packages/pager/components/pagerStep.luau +24 -0
- package/out/ui/packages/pager/index.d.ts +3 -0
- package/out/ui/packages/pager/init.luau +9 -0
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
- package/out/ui/packages/paper/components/Paper.luau +17 -11
- package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +14 -1
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
- package/out/ui/packages/popover/components/Popover.d.ts +12 -0
- package/out/ui/packages/popover/components/Popover.luau +52 -0
- package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
- package/out/ui/packages/popover/components/Popover.styles.luau +32 -0
- package/out/ui/packages/popover/index.d.ts +2 -0
- package/out/ui/packages/popover/init.luau +5 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -0
- package/out/ui/packages/popup/components/Popup.luau +64 -2
- package/out/ui/packages/popup/components/placement.luau +6 -4
- package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
- package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +53 -9
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
- package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
- package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
- package/out/ui/packages/radioGroup/index.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.luau +48 -4
- package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
- package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
- package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
- package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
- package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
- package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
- package/out/ui/packages/select/components/Select.d.ts +2 -0
- package/out/ui/packages/select/components/Select.luau +164 -105
- package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
- package/out/ui/packages/select/components/Select.styles.luau +30 -9
- package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
- package/out/ui/packages/select/components/selectWidth.luau +15 -0
- package/out/ui/packages/shadow/components/Shadow.luau +202 -21
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
- package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
- package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
- package/out/ui/packages/slider/components/RangeSlider.luau +232 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
- package/out/ui/packages/slider/components/Slider.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.luau +53 -25
- package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
- package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
- package/out/ui/packages/slider/components/rangeValue.luau +77 -0
- package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
- package/out/ui/packages/slider/index.d.ts +3 -0
- package/out/ui/packages/slider/init.luau +6 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
- package/out/ui/packages/sparkline/components/Sparkline.luau +72 -8
- package/out/ui/packages/sparkline/index.d.ts +1 -1
- package/out/ui/packages/sparkline/init.luau +6 -1
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
- package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +59 -9
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +50 -3
- package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
- package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +1 -0
- package/out/ui/packages/stateMatrix.luau +9 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.luau +35 -7
- package/out/ui/packages/stepper/components/Stepper.styles.luau +12 -6
- package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
- package/out/ui/packages/stepper/components/stepState.luau +12 -1
- package/out/ui/packages/stepper/index.d.ts +1 -1
- package/out/ui/packages/stepper/init.luau +3 -1
- package/out/ui/packages/switch/components/Switch.luau +2 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
- package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
- package/out/ui/packages/switch/components/switchLook.luau +4 -10
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +99 -57
- package/out/ui/packages/table/components/Table.styles.luau +23 -6
- package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
- package/out/ui/packages/table/components/tableColumns.luau +2 -0
- package/out/ui/packages/table/components/tableSort.d.ts +2 -0
- package/out/ui/packages/table/components/tableSort.luau +95 -0
- package/out/ui/packages/table/index.d.ts +1 -0
- package/out/ui/packages/table/init.luau +1 -0
- package/out/ui/packages/tabs/components/Tabs.luau +77 -6
- package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
- package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
- package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
- package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
- package/out/ui/packages/text/components/Text.d.ts +9 -0
- package/out/ui/packages/text/components/Text.luau +64 -0
- package/out/ui/packages/text/components/textBox.d.ts +12 -0
- package/out/ui/packages/text/components/textBox.luau +21 -0
- package/out/ui/packages/text/index.d.ts +2 -0
- package/out/ui/packages/text/init.luau +5 -0
- package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
- package/out/ui/packages/timeField/components/TimeField.luau +106 -0
- package/out/ui/packages/timeField/index.d.ts +4 -0
- package/out/ui/packages/timeField/init.luau +9 -0
- package/out/ui/packages/timeField/timeValue.d.ts +8 -0
- package/out/ui/packages/timeField/timeValue.luau +49 -0
- package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
- package/out/ui/packages/timeline/components/Timeline.luau +102 -0
- package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
- package/out/ui/packages/timeline/components/Timeline.styles.luau +115 -0
- package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
- package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
- package/out/ui/packages/timeline/index.d.ts +3 -0
- package/out/ui/packages/timeline/init.luau +8 -0
- package/out/ui/packages/toast/components/Toast.d.ts +1 -0
- package/out/ui/packages/toast/components/Toast.luau +200 -57
- package/out/ui/packages/toast/components/Toast.styles.luau +40 -20
- package/out/ui/packages/toast/components/toastPlace.d.ts +16 -0
- package/out/ui/packages/toast/components/toastPlace.luau +44 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
- package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +31 -1
- package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
- package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
- package/out/ui/packages/treeView/components/TreeView.luau +12 -13
- package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
- package/out/ui/packages/typography/components/Typography.d.ts +2 -0
- package/out/ui/packages/typography/components/Typography.luau +8 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
- package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +18 -3
- package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
- package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
- package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
- package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
- package/out/ui/packages/weekGrid/index.d.ts +3 -0
- package/out/ui/packages/weekGrid/init.luau +8 -0
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local useEditorHover = TS.import(script, script.Parent.Parent.Parent, "editorFace").useEditorHover
|
|
4
5
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local _colorPicker = TS.import(script, script.Parent.Parent.Parent, "colorPicker")
|
|
6
7
|
local ColorSequenceEditor = _colorPicker.ColorSequenceEditor
|
|
@@ -22,6 +23,7 @@ local function GradientEditor(props)
|
|
|
22
23
|
local id = _binding.id
|
|
23
24
|
local ref = _binding.ref
|
|
24
25
|
local styles = useGradientEditorStyles()
|
|
26
|
+
local hover = useEditorHover(disabled)
|
|
25
27
|
local _attributes = {
|
|
26
28
|
tag = "frame",
|
|
27
29
|
}
|
|
@@ -31,12 +33,18 @@ local function GradientEditor(props)
|
|
|
31
33
|
end
|
|
32
34
|
_attributes.key = _condition
|
|
33
35
|
_attributes.hostRef = ref
|
|
34
|
-
|
|
36
|
+
local _object = table.clone(styles.root)
|
|
37
|
+
setmetatable(_object, nil)
|
|
38
|
+
for _k, _v in hover.face do
|
|
39
|
+
_object[_k] = _v
|
|
40
|
+
end
|
|
41
|
+
_attributes.base = _object
|
|
35
42
|
_attributes.className = className
|
|
36
43
|
_attributes.sx = sx
|
|
37
44
|
_attributes.state = {
|
|
38
45
|
disabled = disabled,
|
|
39
46
|
}
|
|
47
|
+
_attributes.Event = hover.event
|
|
40
48
|
local _attributes_1 = table.clone(styles.column)
|
|
41
49
|
setmetatable(_attributes_1, nil)
|
|
42
50
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -58,10 +66,10 @@ local function GradientEditor(props)
|
|
|
58
66
|
value = value.color,
|
|
59
67
|
disabled = disabled,
|
|
60
68
|
onChange = function(color)
|
|
61
|
-
local
|
|
62
|
-
setmetatable(
|
|
63
|
-
|
|
64
|
-
return onChange(
|
|
69
|
+
local _object_1 = table.clone(value)
|
|
70
|
+
setmetatable(_object_1, nil)
|
|
71
|
+
_object_1.color = color
|
|
72
|
+
return onChange(_object_1)
|
|
65
73
|
end,
|
|
66
74
|
}))
|
|
67
75
|
local _attributes_5 = {
|
|
@@ -82,10 +90,10 @@ local function GradientEditor(props)
|
|
|
82
90
|
value = value.transparency,
|
|
83
91
|
disabled = disabled,
|
|
84
92
|
onChange = function(transparency)
|
|
85
|
-
local
|
|
86
|
-
setmetatable(
|
|
87
|
-
|
|
88
|
-
return onChange(
|
|
93
|
+
local _object_1 = table.clone(value)
|
|
94
|
+
setmetatable(_object_1, nil)
|
|
95
|
+
_object_1.transparency = transparency
|
|
96
|
+
return onChange(_object_1)
|
|
89
97
|
end,
|
|
90
98
|
}))
|
|
91
99
|
local _attributes_8 = {
|
|
@@ -142,10 +150,10 @@ local function GradientEditor(props)
|
|
|
142
150
|
value = value.offset,
|
|
143
151
|
disabled = disabled,
|
|
144
152
|
onChange = function(offset)
|
|
145
|
-
local
|
|
146
|
-
setmetatable(
|
|
147
|
-
|
|
148
|
-
return onChange(
|
|
153
|
+
local _object_1 = table.clone(value)
|
|
154
|
+
setmetatable(_object_1, nil)
|
|
155
|
+
_object_1.offset = offset
|
|
156
|
+
return onChange(_object_1)
|
|
149
157
|
end,
|
|
150
158
|
})))
|
|
151
159
|
local _attributes_17 = {
|
|
@@ -3,8 +3,11 @@ 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 _editorFace = TS.import(script, script.Parent.Parent.Parent, "editorFace")
|
|
7
|
+
local editorPad = _editorFace.editorPad
|
|
8
|
+
local editorText = _editorFace.editorText
|
|
6
9
|
local useGradientEditorStyles = componentStyles("GradientEditor", function(theme)
|
|
7
|
-
|
|
10
|
+
local _object = {
|
|
8
11
|
root = {
|
|
9
12
|
Size = UDim2.new(1, 0, 0, 0),
|
|
10
13
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
@@ -13,7 +16,7 @@ local useGradientEditorStyles = componentStyles("GradientEditor", function(theme
|
|
|
13
16
|
},
|
|
14
17
|
column = {
|
|
15
18
|
FillDirection = Enum.FillDirection.Vertical,
|
|
16
|
-
Padding = UDim.new(0, theme
|
|
19
|
+
Padding = UDim.new(0, editorPad(theme)),
|
|
17
20
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
18
21
|
},
|
|
19
22
|
block = {
|
|
@@ -21,48 +24,53 @@ local useGradientEditorStyles = componentStyles("GradientEditor", function(theme
|
|
|
21
24
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
22
25
|
BackgroundTransparency = 1,
|
|
23
26
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
27
|
+
}
|
|
28
|
+
local _left = "label"
|
|
29
|
+
local _object_1 = {
|
|
30
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
31
|
+
BackgroundTransparency = 1,
|
|
32
|
+
TextColor3 = theme.palette.text.secondary,
|
|
33
|
+
}
|
|
34
|
+
for _k, _v in editorText(theme) do
|
|
35
|
+
_object_1[_k] = _v
|
|
36
|
+
end
|
|
37
|
+
_object[_left] = _object_1
|
|
38
|
+
_object.metrics = {
|
|
39
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
40
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
41
|
+
BackgroundTransparency = 1,
|
|
42
|
+
}
|
|
43
|
+
_object.metricsRow = {
|
|
44
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
45
|
+
Padding = UDim.new(0, editorPad(theme)),
|
|
46
|
+
VerticalAlignment = Enum.VerticalAlignment.Top,
|
|
47
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
48
|
+
}
|
|
49
|
+
_object.metric = {
|
|
50
|
+
Size = UDim2.new(0.5, -editorPad(theme) / 2, 0, 0),
|
|
51
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
52
|
+
BackgroundTransparency = 1,
|
|
53
|
+
}
|
|
54
|
+
_object.metricInner = {
|
|
55
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
56
|
+
Padding = UDim.new(0, editorPad(theme)),
|
|
57
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
58
|
+
}
|
|
59
|
+
local _left_1 = "metricLabel"
|
|
60
|
+
local _object_2 = {
|
|
61
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
|
|
62
|
+
BackgroundTransparency = 1,
|
|
63
|
+
TextColor3 = theme.palette.text.secondary,
|
|
64
|
+
}
|
|
65
|
+
for _k, _v in editorText(theme) do
|
|
66
|
+
_object_2[_k] = _v
|
|
67
|
+
end
|
|
68
|
+
_object[_left_1] = _object_2
|
|
69
|
+
_object.metricField = {
|
|
70
|
+
Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
|
|
71
|
+
BackgroundTransparency = 1,
|
|
72
|
+
}
|
|
73
|
+
return createStyles(_object)
|
|
66
74
|
end)
|
|
67
75
|
local default = useGradientEditorStyles
|
|
68
76
|
return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Glyph } from "./glyphs";
|
|
2
|
+
interface DrawnGlyphProps {
|
|
3
|
+
name: Glyph;
|
|
4
|
+
size: number;
|
|
5
|
+
color: Color3;
|
|
6
|
+
transparency?: number;
|
|
7
|
+
zIndex?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Fills its parent. Parts are placed by scale so only the stroke weight depends on `size`. */
|
|
10
|
+
export declare function DrawnGlyph(props: DrawnGlyphProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local _glyphs = TS.import(script, script.Parent, "glyphs")
|
|
5
|
+
local glyphParts = _glyphs.glyphParts
|
|
6
|
+
local glyphStroke = _glyphs.glyphStroke
|
|
7
|
+
local GRID = 24
|
|
8
|
+
local PILL = UDim.new(1, 0)
|
|
9
|
+
local CENTER = Vector2.new(0.5, 0.5)
|
|
10
|
+
--* Fills its parent. Parts are placed by scale so only the stroke weight depends on `size`.
|
|
11
|
+
local function DrawnGlyph(props)
|
|
12
|
+
local _binding = props
|
|
13
|
+
local name = _binding.name
|
|
14
|
+
local size = _binding.size
|
|
15
|
+
local color = _binding.color
|
|
16
|
+
local transparency = _binding.transparency
|
|
17
|
+
if transparency == nil then
|
|
18
|
+
transparency = 0
|
|
19
|
+
end
|
|
20
|
+
local zIndex = _binding.zIndex
|
|
21
|
+
local t = glyphStroke(size)
|
|
22
|
+
local _exp = glyphParts(name)
|
|
23
|
+
-- ▼ ReadonlyArray.map ▼
|
|
24
|
+
local _newValue = table.create(#_exp)
|
|
25
|
+
local _callback = function(part, index)
|
|
26
|
+
local key = `g{index}`
|
|
27
|
+
if part.kind == "bar" then
|
|
28
|
+
local dx = part.x2 - part.x1
|
|
29
|
+
local dy = part.y2 - part.y1
|
|
30
|
+
return React.createElement("frame", {
|
|
31
|
+
key = key,
|
|
32
|
+
AnchorPoint = CENTER,
|
|
33
|
+
Position = UDim2.fromScale((part.x1 + part.x2) / 2 / GRID, (part.y1 + part.y2) / 2 / GRID),
|
|
34
|
+
Size = UDim2.new(math.sqrt(dx * dx + dy * dy) / GRID, t, 0, t),
|
|
35
|
+
Rotation = math.deg(math.atan2(dy, dx)),
|
|
36
|
+
BackgroundColor3 = color,
|
|
37
|
+
BackgroundTransparency = transparency,
|
|
38
|
+
BorderSizePixel = 0,
|
|
39
|
+
ZIndex = zIndex,
|
|
40
|
+
}, React.createElement("uicorner", {
|
|
41
|
+
CornerRadius = PILL,
|
|
42
|
+
}))
|
|
43
|
+
end
|
|
44
|
+
if part.kind == "dot" then
|
|
45
|
+
return React.createElement("frame", {
|
|
46
|
+
key = key,
|
|
47
|
+
AnchorPoint = CENTER,
|
|
48
|
+
Position = UDim2.fromScale(part.x / GRID, part.y / GRID),
|
|
49
|
+
Size = UDim2.fromScale(part.d / GRID, part.d / GRID),
|
|
50
|
+
SizeConstraint = Enum.SizeConstraint.RelativeXX,
|
|
51
|
+
BackgroundColor3 = color,
|
|
52
|
+
BackgroundTransparency = transparency,
|
|
53
|
+
BorderSizePixel = 0,
|
|
54
|
+
ZIndex = zIndex,
|
|
55
|
+
}, React.createElement("uicorner", {
|
|
56
|
+
CornerRadius = PILL,
|
|
57
|
+
}))
|
|
58
|
+
end
|
|
59
|
+
local ringed = part.kind == "ring"
|
|
60
|
+
local w = if ringed then part.d else part.w
|
|
61
|
+
local h = if ringed then part.d else part.h
|
|
62
|
+
local x = if ringed then part.x - part.d / 2 else part.x
|
|
63
|
+
local y = if ringed then part.y - part.d / 2 else part.y
|
|
64
|
+
return React.createElement("frame", {
|
|
65
|
+
key = key,
|
|
66
|
+
Position = UDim2.new(x / GRID, t, y / GRID, t),
|
|
67
|
+
Size = UDim2.new(w / GRID, -t * 2, h / GRID, -t * 2),
|
|
68
|
+
BackgroundTransparency = 1,
|
|
69
|
+
BorderSizePixel = 0,
|
|
70
|
+
ZIndex = zIndex,
|
|
71
|
+
}, React.createElement("uicorner", {
|
|
72
|
+
CornerRadius = if ringed then PILL else UDim.new(0, t),
|
|
73
|
+
}), React.createElement("uistroke", {
|
|
74
|
+
Color = color,
|
|
75
|
+
Thickness = t,
|
|
76
|
+
Transparency = transparency,
|
|
77
|
+
}))
|
|
78
|
+
end
|
|
79
|
+
for _k, _v in _exp do
|
|
80
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
81
|
+
end
|
|
82
|
+
-- ▲ ReadonlyArray.map ▲
|
|
83
|
+
return React.createElement(React.Fragment, nil, _newValue)
|
|
84
|
+
end
|
|
85
|
+
return {
|
|
86
|
+
DrawnGlyph = DrawnGlyph,
|
|
87
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Icons } from "../../../enums/index";
|
|
2
2
|
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
import { Glyph } from "./glyphs";
|
|
3
4
|
export interface IconProps {
|
|
4
|
-
icon
|
|
5
|
-
|
|
5
|
+
icon?: Icons;
|
|
6
|
+
/** Drawn glyph. Wins over `icon`. */
|
|
7
|
+
glyph?: Glyph;
|
|
8
|
+
/** Named step, or pixels from `controlMetrics().icon`. */
|
|
9
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | number;
|
|
6
10
|
tint?: Color3;
|
|
7
11
|
}
|
|
8
12
|
type DefaultIconComponent = ImageLabel;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
|
+
local DrawnGlyph = TS.import(script, script.Parent, "DrawnGlyph").DrawnGlyph
|
|
5
6
|
local useIconStyles = TS.import(script, script.Parent, "Icon.styles").default
|
|
6
7
|
local function Icon(props)
|
|
7
8
|
local _binding = props
|
|
8
9
|
local icon = _binding.icon
|
|
10
|
+
local glyph = _binding.glyph
|
|
9
11
|
local tint = _binding.tint
|
|
10
12
|
local className = _binding.className
|
|
11
13
|
local sx = _binding.sx
|
|
@@ -13,6 +15,7 @@ local function Icon(props)
|
|
|
13
15
|
local ref = _binding.ref
|
|
14
16
|
local _binding_1 = useIconStyles(props)
|
|
15
17
|
local container = _binding_1.container
|
|
18
|
+
local color = tint or (container.ImageColor3)
|
|
16
19
|
local _attributes = {
|
|
17
20
|
tag = "imagelabel",
|
|
18
21
|
}
|
|
@@ -25,9 +28,26 @@ local function Icon(props)
|
|
|
25
28
|
_attributes.base = container
|
|
26
29
|
_attributes.className = className
|
|
27
30
|
_attributes.sx = sx
|
|
28
|
-
_attributes.Image = tostring(icon)
|
|
29
|
-
_attributes.ImageColor3 =
|
|
30
|
-
|
|
31
|
+
_attributes.Image = if glyph ~= nil or icon == nil then "" else tostring(icon)
|
|
32
|
+
_attributes.ImageColor3 = color
|
|
33
|
+
local _condition_1 = glyph ~= nil
|
|
34
|
+
if _condition_1 then
|
|
35
|
+
local _attributes_1 = {
|
|
36
|
+
name = glyph,
|
|
37
|
+
}
|
|
38
|
+
local _result = container.Size
|
|
39
|
+
if _result ~= nil then
|
|
40
|
+
_result = _result.X.Offset
|
|
41
|
+
end
|
|
42
|
+
local _condition_2 = _result
|
|
43
|
+
if _condition_2 == nil then
|
|
44
|
+
_condition_2 = 16
|
|
45
|
+
end
|
|
46
|
+
_attributes_1.size = _condition_2
|
|
47
|
+
_attributes_1.color = color
|
|
48
|
+
_condition_1 = (React.createElement(DrawnGlyph, _attributes_1))
|
|
49
|
+
end
|
|
50
|
+
return React.createElement(SxHost, _attributes, _condition_1)
|
|
31
51
|
end
|
|
32
52
|
local default = Icon
|
|
33
53
|
return {
|
|
@@ -7,6 +7,9 @@ local useIconStyles = componentStyles("Icon", function(theme, props)
|
|
|
7
7
|
local getIconSize = function(props)
|
|
8
8
|
local _binding = props
|
|
9
9
|
local size = _binding.size
|
|
10
|
+
if type(size) == "number" then
|
|
11
|
+
return UDim2.fromOffset(size, size)
|
|
12
|
+
end
|
|
10
13
|
repeat
|
|
11
14
|
if size == "xxs" then
|
|
12
15
|
return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type Glyph = "close" | "chevronDown" | "chevronRight" | "check" | "add" | "remove" | "search" | "menu" | "more" | "error" | "warning" | "info" | "success" | "folder" | "expand";
|
|
2
|
+
/** On a 24-unit grid. Bars run between two points, rings and dots sit on a center, boxes span a corner and size. */
|
|
3
|
+
export type GlyphPart = {
|
|
4
|
+
kind: "bar";
|
|
5
|
+
x1: number;
|
|
6
|
+
y1: number;
|
|
7
|
+
x2: number;
|
|
8
|
+
y2: number;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "ring";
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
d: number;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "dot";
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
d: number;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "box";
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
w: number;
|
|
24
|
+
h: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function glyphParts(name: Glyph): GlyphPart[];
|
|
27
|
+
/** Stroke weight for a glyph drawn at `size` pixels. */
|
|
28
|
+
export declare function glyphStroke(size: number): number;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* On a 24-unit grid. Bars run between two points, rings and dots sit on a center, boxes span a corner and size.
|
|
3
|
+
local bar = function(x1, y1, x2, y2)
|
|
4
|
+
return {
|
|
5
|
+
kind = "bar",
|
|
6
|
+
x1 = x1,
|
|
7
|
+
y1 = y1,
|
|
8
|
+
x2 = x2,
|
|
9
|
+
y2 = y2,
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
local ring = function(x, y, d)
|
|
13
|
+
return {
|
|
14
|
+
kind = "ring",
|
|
15
|
+
x = x,
|
|
16
|
+
y = y,
|
|
17
|
+
d = d,
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
local dot = function(x, y, d)
|
|
21
|
+
return {
|
|
22
|
+
kind = "dot",
|
|
23
|
+
x = x,
|
|
24
|
+
y = y,
|
|
25
|
+
d = d,
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
local box = function(x, y, w, h)
|
|
29
|
+
return {
|
|
30
|
+
kind = "box",
|
|
31
|
+
x = x,
|
|
32
|
+
y = y,
|
|
33
|
+
w = w,
|
|
34
|
+
h = h,
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
local GLYPHS = {
|
|
38
|
+
close = { bar(6, 6, 18, 18), bar(18, 6, 6, 18) },
|
|
39
|
+
chevronDown = { bar(6, 9, 12, 15), bar(12, 15, 18, 9) },
|
|
40
|
+
chevronRight = { bar(9, 6, 15, 12), bar(15, 12, 9, 18) },
|
|
41
|
+
check = { bar(5, 12.5, 10, 17.5), bar(10, 17.5, 19, 7.5) },
|
|
42
|
+
add = { bar(12, 5, 12, 19), bar(5, 12, 19, 12) },
|
|
43
|
+
remove = { bar(5, 12, 19, 12) },
|
|
44
|
+
search = { ring(10.5, 10.5, 11), bar(15, 15, 19.5, 19.5) },
|
|
45
|
+
menu = { bar(4, 7, 20, 7), bar(4, 12, 20, 12), bar(4, 17, 20, 17) },
|
|
46
|
+
more = { dot(5.5, 12, 3.5), dot(12, 12, 3.5), dot(18.5, 12, 3.5) },
|
|
47
|
+
error = { ring(12, 12, 18), bar(12, 7.5, 12, 12.5), dot(12, 16, 2.5) },
|
|
48
|
+
warning = { bar(12, 4, 21, 19.5), bar(21, 19.5, 3, 19.5), bar(3, 19.5, 12, 4), bar(12, 9.5, 12, 14), dot(12, 17, 2.5) },
|
|
49
|
+
info = { ring(12, 12, 18), dot(12, 8, 2.5), bar(12, 11, 12, 16.5) },
|
|
50
|
+
success = { ring(12, 12, 18), bar(8, 12.5, 11, 15.5), bar(11, 15.5, 16.5, 9) },
|
|
51
|
+
folder = { box(3, 8, 18, 11), box(3, 5, 7, 4) },
|
|
52
|
+
expand = { bar(4, 9, 4, 4), bar(4, 4, 9, 4), bar(15, 4, 20, 4), bar(20, 4, 20, 9), bar(20, 15, 20, 20), bar(20, 20, 15, 20), bar(9, 20, 4, 20), bar(4, 20, 4, 15) },
|
|
53
|
+
}
|
|
54
|
+
local function glyphParts(name)
|
|
55
|
+
return GLYPHS[name]
|
|
56
|
+
end
|
|
57
|
+
--* Stroke weight for a glyph drawn at `size` pixels.
|
|
58
|
+
local function glyphStroke(size)
|
|
59
|
+
return math.max(1, math.floor(size / 9))
|
|
60
|
+
end
|
|
61
|
+
return {
|
|
62
|
+
glyphParts = glyphParts,
|
|
63
|
+
glyphStroke = glyphStroke,
|
|
64
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Icons } from "../../../enums/index";
|
|
2
2
|
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
import { Glyph } from "../../icon/components/glyphs";
|
|
4
|
+
import { TransportGlyph } from "./transportGlyph";
|
|
3
5
|
export interface IconButtonProps {
|
|
4
|
-
icon
|
|
6
|
+
icon?: Icons;
|
|
7
|
+
glyph?: TransportGlyph | Glyph;
|
|
8
|
+
/** Glyph pixels, usually `controlMetrics().icon`. `size` stays the hit target. */
|
|
9
|
+
iconSize?: number;
|
|
5
10
|
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
11
|
tint: Color3;
|
|
7
12
|
selected?: boolean;
|
|
@@ -5,14 +5,27 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useState = _react.useState
|
|
7
7
|
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
9
|
+
local focusRing = _theme.focusRing
|
|
10
|
+
local useTheme = _theme.useTheme
|
|
8
11
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
12
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
10
13
|
local iconSpinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").iconSpinnerPixels
|
|
11
14
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
15
|
+
local DrawnGlyph = TS.import(script, script.Parent.Parent.Parent, "icon", "components", "DrawnGlyph").DrawnGlyph
|
|
16
|
+
local _iconButtonBox = TS.import(script, script.Parent, "iconButtonBox")
|
|
17
|
+
local iconButtonFace = _iconButtonBox.iconButtonFace
|
|
18
|
+
local iconButtonScale = _iconButtonBox.iconButtonScale
|
|
19
|
+
local iconGlyphExtent = _iconButtonBox.iconGlyphExtent
|
|
12
20
|
local useIconButtonStyles = TS.import(script, script.Parent, "IconButton.styles").default
|
|
21
|
+
local _transportGlyph = TS.import(script, script.Parent, "transportGlyph")
|
|
22
|
+
local isTransportGlyph = _transportGlyph.isTransportGlyph
|
|
23
|
+
local transportGlyph = _transportGlyph.transportGlyph
|
|
13
24
|
local function IconButton(props)
|
|
14
25
|
local _binding = props
|
|
15
26
|
local icon = _binding.icon
|
|
27
|
+
local glyph = _binding.glyph
|
|
28
|
+
local iconSize = _binding.iconSize
|
|
16
29
|
local selected = _binding.selected
|
|
17
30
|
local tint = _binding.tint
|
|
18
31
|
local disabled = _binding.disabled
|
|
@@ -29,27 +42,52 @@ local function IconButton(props)
|
|
|
29
42
|
local _binding_1 = useIconButtonStyles(props)
|
|
30
43
|
local container = _binding_1.container
|
|
31
44
|
local corner = _binding_1.corner
|
|
45
|
+
local _binding_2 = useTheme()
|
|
46
|
+
local theme = _binding_2.theme
|
|
32
47
|
local reducedMotion = useReducedMotion(reducedProp)
|
|
33
48
|
local active = canActivate(disabled, loading)
|
|
49
|
+
local extent = theme.spacing.calc(iconButtonScale(props.size))
|
|
50
|
+
local _condition = iconSize
|
|
51
|
+
if _condition == nil then
|
|
52
|
+
_condition = iconGlyphExtent(extent)
|
|
53
|
+
end
|
|
54
|
+
local glyphBox = _condition
|
|
55
|
+
local drawn = if glyph ~= nil and isTransportGlyph(glyph) and not loading then transportGlyph(glyph, glyphBox) else nil
|
|
56
|
+
local sketched = if glyph ~= nil and not isTransportGlyph(glyph) and not loading then glyph else nil
|
|
34
57
|
local hovering, setHovering = useState(false)
|
|
58
|
+
local down, setDown = useState(false)
|
|
35
59
|
local focused, setFocused = useState(false)
|
|
60
|
+
local face = iconButtonFace({
|
|
61
|
+
disabled = disabled == true,
|
|
62
|
+
loading = loading,
|
|
63
|
+
selected = selected == true,
|
|
64
|
+
hover = hovering and active,
|
|
65
|
+
down = down and active,
|
|
66
|
+
})
|
|
67
|
+
local fill = if face == "pressed" then theme.palette.action.pressed elseif face == "selected" then theme.palette.action.selected else theme.palette.action.hover
|
|
68
|
+
local mark = if disabled == true and not loading then 0.45 else 0
|
|
36
69
|
useEffect(function()
|
|
37
70
|
if active then
|
|
38
71
|
return nil
|
|
39
72
|
end
|
|
40
73
|
setHovering(false)
|
|
74
|
+
setDown(false)
|
|
41
75
|
setFocused(false)
|
|
42
76
|
end, { active })
|
|
43
77
|
local _attributes = {
|
|
44
78
|
tag = "imagebutton",
|
|
45
79
|
}
|
|
46
|
-
local
|
|
47
|
-
if not (
|
|
48
|
-
|
|
80
|
+
local _condition_1 = id
|
|
81
|
+
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
82
|
+
_condition_1 = "IconButton"
|
|
49
83
|
end
|
|
50
|
-
_attributes.key =
|
|
84
|
+
_attributes.key = _condition_1
|
|
51
85
|
_attributes.hostRef = ref
|
|
52
|
-
|
|
86
|
+
local _object = table.clone(container)
|
|
87
|
+
setmetatable(_object, nil)
|
|
88
|
+
_object.BackgroundColor3 = fill
|
|
89
|
+
_object.BackgroundTransparency = if face == "clear" then 1 else 0
|
|
90
|
+
_attributes.base = _object
|
|
53
91
|
_attributes.className = className
|
|
54
92
|
_attributes.sx = sx
|
|
55
93
|
_attributes.state = {
|
|
@@ -57,14 +95,14 @@ local function IconButton(props)
|
|
|
57
95
|
loading = loading,
|
|
58
96
|
selected = selected,
|
|
59
97
|
hover = hovering,
|
|
98
|
+
pressed = down,
|
|
60
99
|
focused = focused,
|
|
61
100
|
}
|
|
62
101
|
_attributes.Active = active
|
|
63
|
-
_attributes.AutoButtonColor =
|
|
102
|
+
_attributes.AutoButtonColor = false
|
|
64
103
|
_attributes.Selectable = active
|
|
65
|
-
_attributes.
|
|
66
|
-
_attributes.
|
|
67
|
-
_attributes.ImageTransparency = if loading then 1 else 0
|
|
104
|
+
_attributes.Image = if drawn ~= nil or sketched ~= nil or icon == nil then "" else tostring(icon)
|
|
105
|
+
_attributes.ImageTransparency = if drawn ~= nil or sketched ~= nil or loading then 1 else mark
|
|
68
106
|
_attributes.ImageColor3 = tint or container.ImageColor3
|
|
69
107
|
_attributes.Event = {
|
|
70
108
|
MouseButton1Click = function()
|
|
@@ -72,13 +110,22 @@ local function IconButton(props)
|
|
|
72
110
|
onClick()
|
|
73
111
|
end
|
|
74
112
|
end,
|
|
113
|
+
MouseButton1Down = function()
|
|
114
|
+
if active then
|
|
115
|
+
setDown(true)
|
|
116
|
+
end
|
|
117
|
+
end,
|
|
118
|
+
MouseButton1Up = function()
|
|
119
|
+
return setDown(false)
|
|
120
|
+
end,
|
|
75
121
|
MouseEnter = function()
|
|
76
122
|
if active then
|
|
77
123
|
setHovering(true)
|
|
78
124
|
end
|
|
79
125
|
end,
|
|
80
126
|
MouseLeave = function()
|
|
81
|
-
|
|
127
|
+
setHovering(false)
|
|
128
|
+
setDown(false)
|
|
82
129
|
end,
|
|
83
130
|
SelectionGained = function()
|
|
84
131
|
if active then
|
|
@@ -91,7 +138,61 @@ local function IconButton(props)
|
|
|
91
138
|
}
|
|
92
139
|
local _attributes_1 = table.clone(corner)
|
|
93
140
|
setmetatable(_attributes_1, nil)
|
|
94
|
-
|
|
141
|
+
local _exp = React.createElement("uicorner", _attributes_1)
|
|
142
|
+
local _result
|
|
143
|
+
if focused and active then
|
|
144
|
+
local _attributes_2 = table.clone(focusRing(theme.palette.focus))
|
|
145
|
+
setmetatable(_attributes_2, nil)
|
|
146
|
+
_result = React.createElement("uistroke", _attributes_2)
|
|
147
|
+
else
|
|
148
|
+
_result = nil
|
|
149
|
+
end
|
|
150
|
+
local _result_1
|
|
151
|
+
if drawn ~= nil then
|
|
152
|
+
-- ▼ ReadonlyArray.map ▼
|
|
153
|
+
local _newValue = table.create(#drawn)
|
|
154
|
+
local _callback = function(part, index)
|
|
155
|
+
return React.createElement("frame", {
|
|
156
|
+
key = `g-{index}`,
|
|
157
|
+
Position = UDim2.fromOffset(part.x, part.y),
|
|
158
|
+
Size = UDim2.fromOffset(math.max(part.w, 1), math.max(part.h, 1)),
|
|
159
|
+
BackgroundColor3 = tint,
|
|
160
|
+
BackgroundTransparency = mark,
|
|
161
|
+
BorderSizePixel = 0,
|
|
162
|
+
ZIndex = 12001,
|
|
163
|
+
})
|
|
164
|
+
end
|
|
165
|
+
for _k, _v in drawn do
|
|
166
|
+
_newValue[_k] = _callback(_v, _k - 1, drawn)
|
|
167
|
+
end
|
|
168
|
+
-- ▲ ReadonlyArray.map ▲
|
|
169
|
+
_result_1 = (React.createElement("frame", {
|
|
170
|
+
key = "Glyph",
|
|
171
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
172
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
173
|
+
Size = UDim2.fromOffset(glyphBox, glyphBox),
|
|
174
|
+
BackgroundTransparency = 1,
|
|
175
|
+
BorderSizePixel = 0,
|
|
176
|
+
ZIndex = 12001,
|
|
177
|
+
}, _newValue))
|
|
178
|
+
else
|
|
179
|
+
_result_1 = nil
|
|
180
|
+
end
|
|
181
|
+
return React.createElement(SxHost, _attributes, _exp, _result, _result_1, sketched ~= nil and (React.createElement("frame", {
|
|
182
|
+
key = "Glyph",
|
|
183
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
184
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
185
|
+
Size = UDim2.fromOffset(glyphBox, glyphBox),
|
|
186
|
+
BackgroundTransparency = 1,
|
|
187
|
+
BorderSizePixel = 0,
|
|
188
|
+
ZIndex = 12001,
|
|
189
|
+
}, React.createElement(DrawnGlyph, {
|
|
190
|
+
name = sketched,
|
|
191
|
+
size = glyphBox,
|
|
192
|
+
color = tint,
|
|
193
|
+
transparency = mark,
|
|
194
|
+
zIndex = 12001,
|
|
195
|
+
}))), loading and (React.createElement(CircularProgress, {
|
|
95
196
|
size = iconSpinnerPixels(props.size),
|
|
96
197
|
thickness = 2,
|
|
97
198
|
color = tint,
|