@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
|
@@ -5,9 +5,11 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useState = _react.useState
|
|
8
|
+
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
9
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
9
10
|
local cx = _theme.cx
|
|
10
11
|
local useTheme = _theme.useTheme
|
|
12
|
+
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion", "play").playProperty
|
|
11
13
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
12
14
|
local spinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").spinnerPixels
|
|
13
15
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
@@ -15,6 +17,7 @@ local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divide
|
|
|
15
17
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
16
18
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
17
19
|
local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
|
|
20
|
+
local clampText = TS.import(script, script.Parent, "clampText").clampText
|
|
18
21
|
local syncInputDraft = TS.import(script, script.Parent, "inputDraft").syncInputDraft
|
|
19
22
|
local function adornmentAlign()
|
|
20
23
|
return React.createElement("uilistlayout", {
|
|
@@ -54,6 +57,11 @@ local function Input(props)
|
|
|
54
57
|
rounded = true
|
|
55
58
|
end
|
|
56
59
|
local size = _binding.size
|
|
60
|
+
local multiline = _binding.multiline
|
|
61
|
+
if multiline == nil then
|
|
62
|
+
multiline = false
|
|
63
|
+
end
|
|
64
|
+
local maxLength = _binding.maxLength
|
|
57
65
|
local reducedMotion = _binding.reducedMotion
|
|
58
66
|
local startAdornment = _binding.startAdornment
|
|
59
67
|
local endAdornment = _binding.endAdornment
|
|
@@ -67,6 +75,8 @@ local function Input(props)
|
|
|
67
75
|
local id = _binding.id
|
|
68
76
|
local ref = _binding.ref
|
|
69
77
|
local focusedRef = useRef(false)
|
|
78
|
+
local strokeRef = useRef()
|
|
79
|
+
local motion = useReducedMotion(reducedMotion)
|
|
70
80
|
local entered = useRef(false)
|
|
71
81
|
local _condition = text
|
|
72
82
|
if _condition == nil then
|
|
@@ -74,6 +84,7 @@ local function Input(props)
|
|
|
74
84
|
end
|
|
75
85
|
local draft, setDraft = useState(_condition)
|
|
76
86
|
local focused, setFocused = useState(false)
|
|
87
|
+
local contentHeight, setContentHeight = useState(0)
|
|
77
88
|
local _binding_1 = useTheme()
|
|
78
89
|
local theme = _binding_1.theme
|
|
79
90
|
local active = canActivate(disabled, loading)
|
|
@@ -82,6 +93,7 @@ local function Input(props)
|
|
|
82
93
|
local _object = table.clone(props)
|
|
83
94
|
setmetatable(_object, nil)
|
|
84
95
|
_object.focused = focused
|
|
96
|
+
_object.contentHeight = contentHeight
|
|
85
97
|
local _binding_2 = useInputStyles(_object)
|
|
86
98
|
local root = _binding_2.root
|
|
87
99
|
local font = _binding_2.font
|
|
@@ -95,14 +107,28 @@ local function Input(props)
|
|
|
95
107
|
local errorColorText = _binding_2.errorColorText
|
|
96
108
|
local divider = _binding_2.divider
|
|
97
109
|
local corner = _binding_2.corner
|
|
98
|
-
local stroke = _binding_2.stroke
|
|
99
110
|
useEffect(function()
|
|
100
111
|
setDraft(function(current)
|
|
101
|
-
return syncInputDraft(focusedRef.current, text, current)
|
|
112
|
+
return clampText(syncInputDraft(focusedRef.current, text, current), maxLength)
|
|
102
113
|
end)
|
|
103
|
-
end, { text })
|
|
114
|
+
end, { text, maxLength })
|
|
104
115
|
local showStroke = variant == "outlined" or variant == "filled"
|
|
105
116
|
local showCorner = rounded
|
|
117
|
+
local ink = if hasError then theme.palette.status.error.main elseif focused then theme.palette.focus else theme.palette.border
|
|
118
|
+
local weight = if focused then 2 else 1
|
|
119
|
+
useEffect(function()
|
|
120
|
+
if not showStroke then
|
|
121
|
+
return nil
|
|
122
|
+
end
|
|
123
|
+
local line = strokeRef.current
|
|
124
|
+
if not line then
|
|
125
|
+
return nil
|
|
126
|
+
end
|
|
127
|
+
return playProperty(line, {
|
|
128
|
+
Color = ink,
|
|
129
|
+
Thickness = weight,
|
|
130
|
+
}, theme.motion.fast, motion)
|
|
131
|
+
end, { showStroke, ink, weight, motion, theme })
|
|
106
132
|
local _attributes = {
|
|
107
133
|
tag = "frame",
|
|
108
134
|
}
|
|
@@ -132,27 +158,26 @@ local function Input(props)
|
|
|
132
158
|
for _k, _v in shell do
|
|
133
159
|
_attributes_2[_k] = _v
|
|
134
160
|
end
|
|
135
|
-
local
|
|
161
|
+
local _exp = showStroke and React.createElement("uistroke", {
|
|
162
|
+
ref = strokeRef,
|
|
163
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
164
|
+
Transparency = 0,
|
|
165
|
+
})
|
|
166
|
+
local _condition_2 = showCorner
|
|
136
167
|
if _condition_2 then
|
|
137
|
-
local _attributes_3 = table.clone(stroke)
|
|
138
|
-
setmetatable(_attributes_3, nil)
|
|
139
|
-
_condition_2 = React.createElement("uistroke", _attributes_3)
|
|
140
|
-
end
|
|
141
|
-
local _condition_3 = showCorner
|
|
142
|
-
if _condition_3 then
|
|
143
168
|
local _attributes_3 = table.clone(corner)
|
|
144
169
|
setmetatable(_attributes_3, nil)
|
|
145
|
-
|
|
170
|
+
_condition_2 = React.createElement("uicorner", _attributes_3)
|
|
146
171
|
end
|
|
147
|
-
local
|
|
148
|
-
if
|
|
172
|
+
local _condition_3 = startAdornment ~= nil
|
|
173
|
+
if _condition_3 then
|
|
149
174
|
local _attributes_3 = {
|
|
150
175
|
key = "Start",
|
|
151
176
|
}
|
|
152
177
|
for _k, _v in startSlot do
|
|
153
178
|
_attributes_3[_k] = _v
|
|
154
179
|
end
|
|
155
|
-
|
|
180
|
+
_condition_3 = (React.createElement("frame", _attributes_3, adornmentAlign(), startAdornment))
|
|
156
181
|
end
|
|
157
182
|
local _attributes_3 = {
|
|
158
183
|
key = "Field",
|
|
@@ -167,6 +192,7 @@ local function Input(props)
|
|
|
167
192
|
_attributes_3.TextEditable = editable
|
|
168
193
|
_attributes_3.Text = draft
|
|
169
194
|
_attributes_3.PlaceholderText = placeholder
|
|
195
|
+
_attributes_3.MultiLine = multiline
|
|
170
196
|
for _k, _v in cx(hasError and errorColorText) do
|
|
171
197
|
_attributes_3[_k] = _v
|
|
172
198
|
end
|
|
@@ -175,9 +201,19 @@ local function Input(props)
|
|
|
175
201
|
if not editable then
|
|
176
202
|
return nil
|
|
177
203
|
end
|
|
178
|
-
|
|
204
|
+
local capped = clampText(rbx.Text, maxLength)
|
|
205
|
+
if rbx.Text ~= capped then
|
|
206
|
+
rbx.Text = capped
|
|
207
|
+
return nil
|
|
208
|
+
end
|
|
209
|
+
setDraft(capped)
|
|
179
210
|
if focusedRef.current and onInput then
|
|
180
|
-
onInput(
|
|
211
|
+
onInput(capped)
|
|
212
|
+
end
|
|
213
|
+
end,
|
|
214
|
+
TextBounds = function(rbx)
|
|
215
|
+
if multiline then
|
|
216
|
+
setContentHeight(rbx.TextBounds.Y)
|
|
181
217
|
end
|
|
182
218
|
end,
|
|
183
219
|
}
|
|
@@ -194,67 +230,68 @@ local function Input(props)
|
|
|
194
230
|
end
|
|
195
231
|
end,
|
|
196
232
|
ReturnPressedFromOnScreenKeyboard = function(rbx)
|
|
197
|
-
if not editable or entered.current or not onEnterPressed then
|
|
233
|
+
if not editable or multiline or entered.current or not onEnterPressed then
|
|
198
234
|
return nil
|
|
199
235
|
end
|
|
200
236
|
entered.current = true
|
|
201
|
-
onEnterPressed(rbx.Text)
|
|
237
|
+
onEnterPressed(clampText(rbx.Text, maxLength))
|
|
202
238
|
end,
|
|
203
239
|
FocusLost = function(rbx, enterPressed)
|
|
204
240
|
focusedRef.current = false
|
|
205
241
|
setFocused(false)
|
|
206
|
-
local committed = rbx.Text
|
|
242
|
+
local committed = clampText(rbx.Text, maxLength)
|
|
207
243
|
if editable and onTextChanged then
|
|
208
244
|
onTextChanged(committed)
|
|
209
245
|
end
|
|
210
|
-
if editable and enterPressed and not entered.current and onEnterPressed then
|
|
246
|
+
if editable and not multiline and enterPressed and not entered.current and onEnterPressed then
|
|
211
247
|
onEnterPressed(committed)
|
|
212
248
|
end
|
|
213
249
|
entered.current = false
|
|
214
250
|
if onBlur then
|
|
215
251
|
onBlur()
|
|
216
252
|
end
|
|
217
|
-
local
|
|
218
|
-
if
|
|
219
|
-
|
|
253
|
+
local _condition_4 = text
|
|
254
|
+
if _condition_4 == nil then
|
|
255
|
+
_condition_4 = ""
|
|
220
256
|
end
|
|
221
|
-
setDraft(
|
|
257
|
+
setDraft(clampText(_condition_4, maxLength))
|
|
222
258
|
end,
|
|
223
259
|
}
|
|
224
|
-
local
|
|
225
|
-
local
|
|
226
|
-
if
|
|
260
|
+
local _exp_1 = React.createElement("textbox", _attributes_3)
|
|
261
|
+
local _condition_4 = loading
|
|
262
|
+
if _condition_4 then
|
|
227
263
|
local _attributes_4 = {
|
|
228
264
|
key = "End",
|
|
229
265
|
}
|
|
230
266
|
for _k, _v in endSlot do
|
|
231
267
|
_attributes_4[_k] = _v
|
|
232
268
|
end
|
|
233
|
-
|
|
269
|
+
_condition_4 = (React.createElement("frame", _attributes_4, adornmentAlign(), React.createElement(CircularProgress, {
|
|
234
270
|
size = spinnerPixels(size),
|
|
235
271
|
thickness = 2,
|
|
236
272
|
color = theme.palette.text.secondary,
|
|
237
273
|
reducedMotion = reducedMotion,
|
|
238
274
|
})))
|
|
239
275
|
end
|
|
240
|
-
local
|
|
241
|
-
if
|
|
276
|
+
local _condition_5 = endSlotContent ~= nil
|
|
277
|
+
if _condition_5 then
|
|
242
278
|
local _attributes_4 = {
|
|
243
279
|
key = "End",
|
|
244
280
|
}
|
|
245
281
|
for _k, _v in endSlot do
|
|
246
282
|
_attributes_4[_k] = _v
|
|
247
283
|
end
|
|
248
|
-
|
|
284
|
+
_condition_5 = (React.createElement("frame", _attributes_4, adornmentAlign(), endSlotContent))
|
|
249
285
|
end
|
|
250
|
-
local
|
|
251
|
-
local
|
|
286
|
+
local _exp_2 = React.createElement("frame", _attributes_2, _exp, _condition_2, _condition_3, _exp_1, _condition_4, _condition_5)
|
|
287
|
+
local _exp_3 = variant == "standard" and (React.createElement(Divider, {
|
|
252
288
|
padding = 0,
|
|
289
|
+
weight = if focused then 2 else nil,
|
|
253
290
|
orientation = Orientations.Horizontal,
|
|
254
291
|
className = cx(divider, hasError and errorColorFrame),
|
|
255
292
|
}))
|
|
256
|
-
local
|
|
257
|
-
if
|
|
293
|
+
local _condition_6 = helperText ~= nil
|
|
294
|
+
if _condition_6 then
|
|
258
295
|
local _attributes_4 = {
|
|
259
296
|
key = "HelperText",
|
|
260
297
|
}
|
|
@@ -268,9 +305,9 @@ local function Input(props)
|
|
|
268
305
|
_attributes_4[_k] = _v
|
|
269
306
|
end
|
|
270
307
|
_attributes_4.Text = helperText
|
|
271
|
-
|
|
308
|
+
_condition_6 = (React.createElement("textlabel", _attributes_4))
|
|
272
309
|
end
|
|
273
|
-
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1,
|
|
310
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp_2, _exp_3, _condition_6))
|
|
274
311
|
end
|
|
275
312
|
local default = Input
|
|
276
313
|
return {
|
|
@@ -4,12 +4,11 @@ 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
|
|
8
|
+
local fieldChrome = TS.import(script, script.Parent, "fieldChrome").fieldChrome
|
|
7
9
|
local inputInsets = TS.import(script, script.Parent, "inputInsets").inputInsets
|
|
10
|
+
local multilineHeight = TS.import(script, script.Parent, "multilineHeight").multilineHeight
|
|
8
11
|
local useInputStyles = componentStyles("Input", function(theme, _param)
|
|
9
|
-
local color = _param.color
|
|
10
|
-
if color == nil then
|
|
11
|
-
color = "primary"
|
|
12
|
-
end
|
|
13
12
|
local margin = _param.margin
|
|
14
13
|
if margin == nil then
|
|
15
14
|
margin = "none"
|
|
@@ -42,15 +41,31 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
|
|
|
42
41
|
hasError = false
|
|
43
42
|
end
|
|
44
43
|
local size = _param.size
|
|
44
|
+
local multiline = _param.multiline
|
|
45
|
+
if multiline == nil then
|
|
46
|
+
multiline = false
|
|
47
|
+
end
|
|
48
|
+
local minRows = _param.minRows
|
|
49
|
+
if minRows == nil then
|
|
50
|
+
minRows = 2
|
|
51
|
+
end
|
|
52
|
+
local maxRows = _param.maxRows
|
|
53
|
+
if maxRows == nil then
|
|
54
|
+
maxRows = 5
|
|
55
|
+
end
|
|
56
|
+
local contentHeight = _param.contentHeight
|
|
57
|
+
if contentHeight == nil then
|
|
58
|
+
contentHeight = 0
|
|
59
|
+
end
|
|
45
60
|
local metrics = controlMetrics(theme.density, size)
|
|
61
|
+
local chrome = fieldChrome(metrics.height, theme.padding.calc(1))
|
|
46
62
|
local hasStart = startAdornment ~= nil
|
|
47
63
|
local hasEnd = endAdornment ~= nil or loading
|
|
48
64
|
local icon = metrics.icon
|
|
49
|
-
local gap =
|
|
65
|
+
local gap = chrome.padX
|
|
50
66
|
local insets = inputInsets(hasStart, hasEnd, icon, gap)
|
|
51
|
-
local
|
|
52
|
-
local
|
|
53
|
-
local focusAccent = if hasError then theme.palette.status.error.main else theme.palette.focus
|
|
67
|
+
local verticalPad = chrome.padX
|
|
68
|
+
local fieldHeight = if multiline then multilineHeight(contentHeight, metrics.font, minRows, maxRows, verticalPad) else chrome.height
|
|
54
69
|
local makeRootStyles = function()
|
|
55
70
|
local defaultStyles = {}
|
|
56
71
|
defaultStyles.BackgroundTransparency = 1
|
|
@@ -96,9 +111,15 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
|
|
|
96
111
|
defaultStyles.Position = UDim2.new(0, insets.left, 0, 0)
|
|
97
112
|
defaultStyles.Size = UDim2.new(1, -(insets.left + insets.right), 1, 0)
|
|
98
113
|
defaultStyles.TextXAlignment = Enum.TextXAlignment.Left
|
|
99
|
-
defaultStyles.
|
|
114
|
+
defaultStyles.TextYAlignment = if multiline then Enum.TextYAlignment.Top else Enum.TextYAlignment.Center
|
|
115
|
+
defaultStyles.TextWrapped = multiline
|
|
116
|
+
defaultStyles.TextTruncate = if multiline then Enum.TextTruncate.None else Enum.TextTruncate.AtEnd
|
|
100
117
|
defaultStyles.ClearTextOnFocus = clearsTextOnFocus
|
|
101
118
|
defaultStyles.ZIndex = 12000
|
|
119
|
+
if multiline then
|
|
120
|
+
defaultStyles.Position = UDim2.new(0, insets.left, 0, verticalPad)
|
|
121
|
+
defaultStyles.Size = UDim2.new(1, -(insets.left + insets.right), 1, -verticalPad * 2)
|
|
122
|
+
end
|
|
102
123
|
return defaultStyles
|
|
103
124
|
end
|
|
104
125
|
local makeMarginStyles = function()
|
|
@@ -132,7 +153,7 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
|
|
|
132
153
|
ZIndex = 13000,
|
|
133
154
|
}
|
|
134
155
|
end
|
|
135
|
-
|
|
156
|
+
local _object = {
|
|
136
157
|
root = makeRootStyles(),
|
|
137
158
|
font = {
|
|
138
159
|
TextSize = metrics.font,
|
|
@@ -162,19 +183,25 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
|
|
|
162
183
|
},
|
|
163
184
|
divider = {
|
|
164
185
|
Position = UDim2.new(0, 0, 0, fieldHeight),
|
|
165
|
-
BackgroundColor3 =
|
|
186
|
+
BackgroundColor3 = if focused then theme.palette.focus else theme.palette.border,
|
|
166
187
|
ZIndex = 11000,
|
|
167
188
|
},
|
|
168
189
|
corner = {
|
|
169
190
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
170
191
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
192
|
+
}
|
|
193
|
+
local _left = "stroke"
|
|
194
|
+
local _object_1 = {
|
|
195
|
+
Color = if hasError then theme.palette.status.error.main elseif focused then theme.palette.focus else theme.palette.border,
|
|
196
|
+
Transparency = 0,
|
|
197
|
+
Thickness = 1,
|
|
198
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
199
|
+
}
|
|
200
|
+
for _k, _v in (if focused then focusRing(if hasError then theme.palette.status.error.main else theme.palette.focus) else {}) do
|
|
201
|
+
_object_1[_k] = _v
|
|
202
|
+
end
|
|
203
|
+
_object[_left] = _object_1
|
|
204
|
+
return createStyles(_object)
|
|
178
205
|
end)
|
|
179
206
|
local default = useInputStyles
|
|
180
207
|
return {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Keep a field within max characters. A missing or negative max leaves the text alone.
|
|
3
|
+
local function clampText(text, max)
|
|
4
|
+
if max == nil or max < 0 then
|
|
5
|
+
return text
|
|
6
|
+
end
|
|
7
|
+
if #text <= max then
|
|
8
|
+
return text
|
|
9
|
+
end
|
|
10
|
+
local _text = text
|
|
11
|
+
local _max = max
|
|
12
|
+
return string.sub(_text, 1, _max)
|
|
13
|
+
end
|
|
14
|
+
return {
|
|
15
|
+
clampText = clampText,
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* Shared single-line field size. Height is the control metric. Inset is one padding step.
|
|
3
|
+
local function fieldChrome(controlHeight, padUnit)
|
|
4
|
+
return {
|
|
5
|
+
height = controlHeight,
|
|
6
|
+
padX = padUnit,
|
|
7
|
+
}
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
fieldChrome = fieldChrome,
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function multilineHeight(measured: number, lineHeight: number, minRows: number, maxRows: number, padding: number): number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function multilineHeight(measured, lineHeight, minRows, maxRows, padding)
|
|
3
|
+
local minimumRows = math.max(1, math.floor(minRows))
|
|
4
|
+
local maximumRows = math.max(minimumRows, math.floor(maxRows))
|
|
5
|
+
local minimum = minimumRows * lineHeight + padding * 2
|
|
6
|
+
local maximum = maximumRows * lineHeight + padding * 2
|
|
7
|
+
return math.clamp(measured + padding * 2, minimum, maximum)
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
multilineHeight = multilineHeight,
|
|
11
|
+
}
|
|
@@ -1,8 +1,71 @@
|
|
|
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 _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
+
local resolveSx = _theme.resolveSx
|
|
6
|
+
local useTheme = _theme.useTheme
|
|
4
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
|
+
local boxPadSides = TS.import(script, script.Parent, "boxPad").boxPadSides
|
|
5
9
|
local useBoxStyles = TS.import(script, script.Parent, "Box.styles").default
|
|
10
|
+
local _Pad = TS.import(script, script.Parent, "Pad")
|
|
11
|
+
local automaticAxes = _Pad.automaticAxes
|
|
12
|
+
local Pad = _Pad.Pad
|
|
13
|
+
local padActive = _Pad.padActive
|
|
14
|
+
local styleAutomaticSize = _Pad.styleAutomaticSize
|
|
15
|
+
local withoutPad = _Pad.withoutPad
|
|
16
|
+
local function padPixels(themePad, padding, resolved)
|
|
17
|
+
local sides = boxPadSides(padding)
|
|
18
|
+
if sides.top + sides.right + sides.bottom + sides.left > 0 then
|
|
19
|
+
return {
|
|
20
|
+
left = themePad(sides.left),
|
|
21
|
+
right = themePad(sides.right),
|
|
22
|
+
top = themePad(sides.top),
|
|
23
|
+
bottom = themePad(sides.bottom),
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
local _object = {}
|
|
27
|
+
local _left = "left"
|
|
28
|
+
local _result = resolved
|
|
29
|
+
if _result ~= nil then
|
|
30
|
+
_result = _result.PaddingLeft.Offset
|
|
31
|
+
end
|
|
32
|
+
local _condition = _result
|
|
33
|
+
if _condition == nil then
|
|
34
|
+
_condition = 0
|
|
35
|
+
end
|
|
36
|
+
_object[_left] = _condition
|
|
37
|
+
local _left_1 = "right"
|
|
38
|
+
local _result_1 = resolved
|
|
39
|
+
if _result_1 ~= nil then
|
|
40
|
+
_result_1 = _result_1.PaddingRight.Offset
|
|
41
|
+
end
|
|
42
|
+
local _condition_1 = _result_1
|
|
43
|
+
if _condition_1 == nil then
|
|
44
|
+
_condition_1 = 0
|
|
45
|
+
end
|
|
46
|
+
_object[_left_1] = _condition_1
|
|
47
|
+
local _left_2 = "top"
|
|
48
|
+
local _result_2 = resolved
|
|
49
|
+
if _result_2 ~= nil then
|
|
50
|
+
_result_2 = _result_2.PaddingTop.Offset
|
|
51
|
+
end
|
|
52
|
+
local _condition_2 = _result_2
|
|
53
|
+
if _condition_2 == nil then
|
|
54
|
+
_condition_2 = 0
|
|
55
|
+
end
|
|
56
|
+
_object[_left_2] = _condition_2
|
|
57
|
+
local _left_3 = "bottom"
|
|
58
|
+
local _result_3 = resolved
|
|
59
|
+
if _result_3 ~= nil then
|
|
60
|
+
_result_3 = _result_3.PaddingBottom.Offset
|
|
61
|
+
end
|
|
62
|
+
local _condition_3 = _result_3
|
|
63
|
+
if _condition_3 == nil then
|
|
64
|
+
_condition_3 = 0
|
|
65
|
+
end
|
|
66
|
+
_object[_left_3] = _condition_3
|
|
67
|
+
return _object
|
|
68
|
+
end
|
|
6
69
|
local function Box(props)
|
|
7
70
|
local _binding = props
|
|
8
71
|
local padding = _binding.padding
|
|
@@ -12,27 +75,43 @@ local function Box(props)
|
|
|
12
75
|
local sx = _binding.sx
|
|
13
76
|
local id = _binding.id
|
|
14
77
|
local ref = _binding.ref
|
|
78
|
+
local _binding_1 = useTheme()
|
|
79
|
+
local theme = _binding_1.theme
|
|
15
80
|
local styles = useBoxStyles({
|
|
16
|
-
padding = padding,
|
|
17
81
|
bgcolor = bgcolor,
|
|
18
82
|
})
|
|
83
|
+
local resolved = resolveSx(theme, sx).padding
|
|
84
|
+
local edges = padPixels(function(step)
|
|
85
|
+
return theme.spacing.calc(step)
|
|
86
|
+
end, padding, resolved)
|
|
87
|
+
local inset = padActive(edges.left, edges.right, edges.top, edges.bottom)
|
|
88
|
+
local _result = sx
|
|
89
|
+
if _result ~= nil then
|
|
90
|
+
_result = _result.AutomaticSize
|
|
91
|
+
end
|
|
92
|
+
local _condition = _result
|
|
93
|
+
if _condition == nil then
|
|
94
|
+
_condition = styleAutomaticSize(styles.root)
|
|
95
|
+
end
|
|
96
|
+
local auto = automaticAxes(_condition)
|
|
19
97
|
local _attributes = {}
|
|
20
|
-
local
|
|
21
|
-
if not (
|
|
22
|
-
|
|
98
|
+
local _condition_1 = id
|
|
99
|
+
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
100
|
+
_condition_1 = "Box"
|
|
23
101
|
end
|
|
24
|
-
_attributes.key =
|
|
102
|
+
_attributes.key = _condition_1
|
|
25
103
|
_attributes.hostRef = ref
|
|
26
104
|
_attributes.base = styles.root
|
|
27
105
|
_attributes.className = className
|
|
28
|
-
_attributes.sx = sx
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
106
|
+
_attributes.sx = if inset then withoutPad(sx) else sx
|
|
107
|
+
return React.createElement(SxHost, _attributes, if inset then (React.createElement(Pad, {
|
|
108
|
+
left = edges.left,
|
|
109
|
+
right = edges.right,
|
|
110
|
+
top = edges.top,
|
|
111
|
+
bottom = edges.bottom,
|
|
112
|
+
autoX = auto.x,
|
|
113
|
+
autoY = auto.y,
|
|
114
|
+
}, children)) else children)
|
|
36
115
|
end
|
|
37
116
|
local default = Box
|
|
38
117
|
return {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { BoxPad } from "./boxPad";
|
|
2
1
|
export type BoxBg = "transparent" | "paper" | "elevated" | "input";
|
|
3
2
|
declare const useBoxStyles: (props: {
|
|
4
|
-
padding?: BoxPad;
|
|
5
3
|
bgcolor?: BoxBg;
|
|
6
4
|
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
7
5
|
export default useBoxStyles;
|
|
@@ -3,14 +3,11 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local componentStyles = _theme.componentStyles
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
|
-
local boxPadSides = TS.import(script, script.Parent, "boxPad").boxPadSides
|
|
7
6
|
local useBoxStyles = componentStyles("Box", function(theme, _param)
|
|
8
|
-
local padding = _param.padding
|
|
9
7
|
local bgcolor = _param.bgcolor
|
|
10
8
|
if bgcolor == nil then
|
|
11
9
|
bgcolor = "transparent"
|
|
12
10
|
end
|
|
13
|
-
local sides = boxPadSides(padding)
|
|
14
11
|
local fill = if bgcolor == "paper" then theme.palette.surface.paper elseif bgcolor == "elevated" then theme.palette.surface.elevated elseif bgcolor == "input" then theme.palette.surface.input else theme.palette.surface.paper
|
|
15
12
|
return createStyles({
|
|
16
13
|
root = {
|
|
@@ -20,12 +17,6 @@ local useBoxStyles = componentStyles("Box", function(theme, _param)
|
|
|
20
17
|
BackgroundTransparency = if bgcolor == "transparent" then 1 else 0,
|
|
21
18
|
BorderSizePixel = 0,
|
|
22
19
|
},
|
|
23
|
-
padding = {
|
|
24
|
-
PaddingTop = UDim.new(0, theme.spacing.calc(sides.top)),
|
|
25
|
-
PaddingRight = UDim.new(0, theme.spacing.calc(sides.right)),
|
|
26
|
-
PaddingBottom = UDim.new(0, theme.spacing.calc(sides.bottom)),
|
|
27
|
-
PaddingLeft = UDim.new(0, theme.spacing.calc(sides.left)),
|
|
28
|
-
},
|
|
29
20
|
})
|
|
30
21
|
end)
|
|
31
22
|
local default = useBoxStyles
|