@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
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useRef = _react.useRef
|
|
5
7
|
local useState = _react.useState
|
|
6
|
-
local
|
|
8
|
+
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
9
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
10
|
+
local controlMetrics = _theme.controlMetrics
|
|
11
|
+
local cx = _theme.cx
|
|
12
|
+
local useTheme = _theme.useTheme
|
|
13
|
+
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion", "play").playProperty
|
|
7
14
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local
|
|
15
|
+
local Collapse = TS.import(script, script.Parent.Parent.Parent, "collapse").Collapse
|
|
16
|
+
local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
17
|
+
local accordionNote = TS.import(script, script.Parent, "accordionNote").accordionNote
|
|
18
|
+
local accordionOpen = TS.import(script, script.Parent, "accordionOpen").accordionOpen
|
|
11
19
|
local useAccordionStyles = TS.import(script, script.Parent, "Accordion.styles").default
|
|
12
20
|
local function Accordion(props)
|
|
13
21
|
local _binding = props
|
|
14
22
|
local title = _binding.title
|
|
23
|
+
local note = _binding.note
|
|
15
24
|
local controlled = _binding.open
|
|
16
25
|
local defaultOpen = _binding.defaultOpen
|
|
17
26
|
local disabled = _binding.disabled
|
|
@@ -23,11 +32,27 @@ local function Accordion(props)
|
|
|
23
32
|
local id = _binding.id
|
|
24
33
|
local ref = _binding.ref
|
|
25
34
|
local localOpen, setLocalOpen = useState(defaultOpen == true)
|
|
35
|
+
local hovering, setHovering = useState(false)
|
|
26
36
|
local open = accordionOpen(localOpen, controlled)
|
|
37
|
+
local summary = accordionNote(note)
|
|
27
38
|
local styles = useAccordionStyles({
|
|
28
39
|
open = open,
|
|
29
40
|
disabled = disabled,
|
|
30
41
|
})
|
|
42
|
+
local _binding_1 = useTheme()
|
|
43
|
+
local theme = _binding_1.theme
|
|
44
|
+
local reduced = useReducedMotion()
|
|
45
|
+
local iconRef = useRef()
|
|
46
|
+
local icon = controlMetrics(theme.density).icon
|
|
47
|
+
useEffect(function()
|
|
48
|
+
local icon = iconRef.current
|
|
49
|
+
if not icon then
|
|
50
|
+
return nil
|
|
51
|
+
end
|
|
52
|
+
return playProperty(icon, {
|
|
53
|
+
Rotation = if open then 90 else 0,
|
|
54
|
+
}, theme.motion.default, reduced)
|
|
55
|
+
end, { open, reduced, theme })
|
|
31
56
|
local toggle = function()
|
|
32
57
|
if disabled == true then
|
|
33
58
|
return nil
|
|
@@ -62,46 +87,101 @@ local function Accordion(props)
|
|
|
62
87
|
setmetatable(_attributes_1, nil)
|
|
63
88
|
_condition_1 = React.createElement("uicorner", _attributes_1)
|
|
64
89
|
end
|
|
65
|
-
local _attributes_1 = table.clone(styles.
|
|
90
|
+
local _attributes_1 = table.clone(styles.stroke)
|
|
66
91
|
setmetatable(_attributes_1, nil)
|
|
67
|
-
local _exp = React.createElement("
|
|
68
|
-
local _attributes_2 =
|
|
92
|
+
local _exp = React.createElement("uistroke", _attributes_1)
|
|
93
|
+
local _attributes_2 = table.clone(styles.list)
|
|
94
|
+
setmetatable(_attributes_2, nil)
|
|
95
|
+
local _exp_1 = React.createElement("uilistlayout", _attributes_2)
|
|
96
|
+
local _attributes_3 = {
|
|
69
97
|
key = "Header",
|
|
70
98
|
}
|
|
71
|
-
for _k, _v in styles.header do
|
|
72
|
-
|
|
99
|
+
for _k, _v in cx(styles.header, hovering and disabled ~= true and styles.hover) do
|
|
100
|
+
_attributes_3[_k] = _v
|
|
73
101
|
end
|
|
74
|
-
|
|
102
|
+
_attributes_3.Event = {
|
|
75
103
|
Activated = toggle,
|
|
104
|
+
MouseEnter = function()
|
|
105
|
+
return setHovering(true)
|
|
106
|
+
end,
|
|
107
|
+
MouseLeave = function()
|
|
108
|
+
return setHovering(false)
|
|
109
|
+
end,
|
|
76
110
|
}
|
|
77
|
-
local
|
|
78
|
-
setmetatable(
|
|
79
|
-
local
|
|
80
|
-
local
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
local _attributes_4 = table.clone(styles.tail)
|
|
112
|
+
setmetatable(_attributes_4, nil)
|
|
113
|
+
local _exp_2 = React.createElement("uipadding", _attributes_4)
|
|
114
|
+
local _result
|
|
115
|
+
if summary == nil then
|
|
116
|
+
local _attributes_5 = {
|
|
117
|
+
key = "Title",
|
|
118
|
+
}
|
|
119
|
+
for _k, _v in styles.title do
|
|
120
|
+
_attributes_5[_k] = _v
|
|
121
|
+
end
|
|
122
|
+
_attributes_5.Text = title
|
|
123
|
+
_result = (React.createElement("textlabel", _attributes_5))
|
|
124
|
+
else
|
|
125
|
+
local _attributes_5 = {
|
|
126
|
+
key = "Copy",
|
|
127
|
+
}
|
|
128
|
+
for _k, _v in styles.copy do
|
|
129
|
+
_attributes_5[_k] = _v
|
|
130
|
+
end
|
|
131
|
+
local _exp_3 = React.createElement("uilistlayout", {
|
|
132
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
133
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
134
|
+
Padding = UDim.new(0, 0),
|
|
135
|
+
})
|
|
136
|
+
local _attributes_6 = {
|
|
137
|
+
key = "Title",
|
|
138
|
+
}
|
|
139
|
+
for _k, _v in styles.title do
|
|
140
|
+
_attributes_6[_k] = _v
|
|
141
|
+
end
|
|
142
|
+
_attributes_6.Position = UDim2.new(0, 0, 0, 0)
|
|
143
|
+
_attributes_6.Size = UDim2.new(1, 0, 0, 0)
|
|
144
|
+
_attributes_6.Text = title
|
|
145
|
+
_attributes_6.LayoutOrder = 1
|
|
146
|
+
local _exp_4 = React.createElement("textlabel", _attributes_6)
|
|
147
|
+
local _attributes_7 = {
|
|
148
|
+
key = "Note",
|
|
149
|
+
}
|
|
150
|
+
for _k, _v in styles.note do
|
|
151
|
+
_attributes_7[_k] = _v
|
|
152
|
+
end
|
|
153
|
+
_attributes_7.Text = summary
|
|
154
|
+
_attributes_7.LayoutOrder = 2
|
|
155
|
+
_result = (React.createElement("frame", _attributes_5, _exp_3, _exp_4, React.createElement("textlabel", _attributes_7)))
|
|
85
156
|
end
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
local _attributes_5 = {
|
|
157
|
+
local _exp_3 = React.createElement("textbutton", _attributes_3, _exp_2, _result, React.createElement(SxHost, {
|
|
158
|
+
tag = "frame",
|
|
89
159
|
key = "Icon",
|
|
160
|
+
hostRef = iconRef,
|
|
161
|
+
base = {
|
|
162
|
+
BackgroundTransparency = 1,
|
|
163
|
+
BorderSizePixel = 0,
|
|
164
|
+
Size = UDim2.new(0, icon, 0, icon),
|
|
165
|
+
},
|
|
166
|
+
className = styles.icon,
|
|
167
|
+
}, React.createElement(Icon, {
|
|
168
|
+
glyph = "chevronRight",
|
|
169
|
+
size = icon,
|
|
170
|
+
tint = if disabled == true then theme.palette.text.disabled else theme.palette.text.primary,
|
|
171
|
+
})))
|
|
172
|
+
local _attributes_5 = {
|
|
173
|
+
key = "Inset",
|
|
90
174
|
}
|
|
91
|
-
for _k, _v in styles.
|
|
175
|
+
for _k, _v in styles.band do
|
|
92
176
|
_attributes_5[_k] = _v
|
|
93
177
|
end
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
178
|
+
local _attributes_6 = table.clone(styles.tail)
|
|
179
|
+
setmetatable(_attributes_6, nil)
|
|
180
|
+
return React.createElement(SxHost, _attributes, _condition_1, _exp, _exp_1, _exp_3, React.createElement(Collapse, {
|
|
97
181
|
key = "Body",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
end
|
|
102
|
-
local _attributes_7 = table.clone(styles.padding)
|
|
103
|
-
setmetatable(_attributes_7, nil)
|
|
104
|
-
return React.createElement(SxHost, _attributes, _condition_1, _exp, _exp_3, React.createElement("frame", _attributes_6, React.createElement("uipadding", _attributes_7), children))
|
|
182
|
+
open = open,
|
|
183
|
+
className = styles.body,
|
|
184
|
+
}, React.createElement("frame", _attributes_5, React.createElement("uipadding", _attributes_6), children)))
|
|
105
185
|
end
|
|
106
186
|
local default = Accordion
|
|
107
187
|
return {
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
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
|
+
local controlMetrics = _theme.controlMetrics
|
|
5
6
|
local createStyles = _theme.createStyles
|
|
6
7
|
local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
|
|
7
|
-
local open = _param.open
|
|
8
|
-
if open == nil then
|
|
9
|
-
open = false
|
|
10
|
-
end
|
|
11
8
|
local disabled = _param.disabled
|
|
12
|
-
|
|
9
|
+
local heading = theme.typography.variants.h6
|
|
10
|
+
local padX = theme.padding.calc(1.5)
|
|
11
|
+
local padY = theme.padding.calc(1)
|
|
12
|
+
local icon = controlMetrics(theme.density).icon
|
|
13
|
+
local firstLine = padY + math.floor((heading.size * heading.leading) / 2)
|
|
14
|
+
local _object = {
|
|
13
15
|
root = {
|
|
14
16
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
15
17
|
Size = UDim2.new(1, 0, 0, 0),
|
|
@@ -31,45 +33,81 @@ local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
|
|
|
31
33
|
Active = disabled ~= true,
|
|
32
34
|
Selectable = disabled ~= true,
|
|
33
35
|
},
|
|
36
|
+
hover = {
|
|
37
|
+
BackgroundColor3 = theme.palette.action.hover,
|
|
38
|
+
BackgroundTransparency = 0,
|
|
39
|
+
},
|
|
40
|
+
tail = {
|
|
41
|
+
PaddingBottom = UDim.new(0, padY),
|
|
42
|
+
},
|
|
43
|
+
band = {
|
|
44
|
+
Position = UDim2.new(0, padX, 0, padY),
|
|
45
|
+
Size = UDim2.new(1, -(padX * 2), 0, 0),
|
|
46
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
47
|
+
BackgroundTransparency = 1,
|
|
48
|
+
BorderSizePixel = 0,
|
|
49
|
+
},
|
|
34
50
|
title = {
|
|
35
51
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
36
|
-
|
|
52
|
+
Position = UDim2.new(0, padX, 0, padY),
|
|
53
|
+
Size = UDim2.new(1, -(padX * 2 + icon), 0, 0),
|
|
37
54
|
BackgroundTransparency = 1,
|
|
38
55
|
BorderSizePixel = 0,
|
|
39
|
-
Font = theme.typography.fontFamilies.
|
|
40
|
-
TextSize =
|
|
56
|
+
Font = theme.typography.fontFamilies[heading.family],
|
|
57
|
+
TextSize = heading.size,
|
|
58
|
+
LineHeight = heading.leading,
|
|
59
|
+
TextWrapped = true,
|
|
41
60
|
TextColor3 = theme.palette.text.primary,
|
|
42
61
|
TextTransparency = if disabled == true then 0.5 else 0,
|
|
43
62
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
44
63
|
},
|
|
45
|
-
|
|
46
|
-
Size = UDim2.fromOffset(theme.options.constants.iconSizes.small, theme.options.constants.iconSizes.small),
|
|
47
|
-
Position = UDim2.new(1, -theme.padding.calc(1.5), 0.5, 0),
|
|
48
|
-
AnchorPoint = Vector2.new(1, 0.5),
|
|
49
|
-
BackgroundTransparency = 1,
|
|
50
|
-
BorderSizePixel = 0,
|
|
51
|
-
ScaleType = Enum.ScaleType.Fit,
|
|
52
|
-
ImageColor3 = theme.palette.text.primary,
|
|
53
|
-
ImageTransparency = if disabled == true then 0.5 else 0,
|
|
54
|
-
},
|
|
55
|
-
padding = {
|
|
56
|
-
PaddingTop = UDim.new(0, theme.padding.calc(1)),
|
|
57
|
-
PaddingBottom = UDim.new(0, theme.padding.calc(1)),
|
|
58
|
-
PaddingLeft = UDim.new(0, theme.padding.calc(1.5)),
|
|
59
|
-
PaddingRight = UDim.new(0, theme.padding.calc(1.5)),
|
|
60
|
-
},
|
|
61
|
-
body = {
|
|
62
|
-
LayoutOrder = 2,
|
|
64
|
+
copy = {
|
|
63
65
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
64
|
-
|
|
66
|
+
Position = UDim2.new(0, padX, 0, padY),
|
|
67
|
+
Size = UDim2.new(1, -(padX * 2 + icon), 0, 0),
|
|
65
68
|
BackgroundTransparency = 1,
|
|
66
69
|
BorderSizePixel = 0,
|
|
67
|
-
Visible = open,
|
|
68
|
-
},
|
|
69
|
-
corner = {
|
|
70
|
-
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
71
70
|
},
|
|
72
|
-
}
|
|
71
|
+
}
|
|
72
|
+
local _left = "note"
|
|
73
|
+
local _object_1 = {
|
|
74
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
75
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
76
|
+
BackgroundTransparency = 1,
|
|
77
|
+
BorderSizePixel = 0,
|
|
78
|
+
Font = theme.typography.fontFamilies.default,
|
|
79
|
+
}
|
|
80
|
+
local _left_1 = "TextSize"
|
|
81
|
+
local _condition = theme.typography.fontSizes.caption
|
|
82
|
+
if _condition == nil then
|
|
83
|
+
_condition = theme.typography.fontSizes.body
|
|
84
|
+
end
|
|
85
|
+
_object_1[_left_1] = _condition
|
|
86
|
+
_object_1.TextWrapped = true
|
|
87
|
+
_object_1.TextColor3 = theme.palette.text.secondary
|
|
88
|
+
_object_1.TextTransparency = if disabled == true then 0.5 else 0
|
|
89
|
+
_object_1.TextXAlignment = Enum.TextXAlignment.Left
|
|
90
|
+
_object[_left] = _object_1
|
|
91
|
+
_object.icon = {
|
|
92
|
+
Position = UDim2.new(1, -padX, 0, firstLine),
|
|
93
|
+
AnchorPoint = Vector2.new(1, 0.5),
|
|
94
|
+
}
|
|
95
|
+
_object.body = {
|
|
96
|
+
LayoutOrder = 2,
|
|
97
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
98
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
99
|
+
BackgroundTransparency = 1,
|
|
100
|
+
BorderSizePixel = 0,
|
|
101
|
+
}
|
|
102
|
+
_object.corner = {
|
|
103
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
104
|
+
}
|
|
105
|
+
_object.stroke = {
|
|
106
|
+
Color = theme.palette.border,
|
|
107
|
+
Thickness = 1,
|
|
108
|
+
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
109
|
+
}
|
|
110
|
+
return createStyles(_object)
|
|
73
111
|
end)
|
|
74
112
|
local default = useAccordionStyles
|
|
75
113
|
return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* An empty note stays off the header. The body still hides when the panel is shut.
|
|
3
|
+
local function accordionNote(note)
|
|
4
|
+
if note == nil or note == "" then
|
|
5
|
+
return nil
|
|
6
|
+
end
|
|
7
|
+
return note
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
accordionNote = accordionNote,
|
|
11
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
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 Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
5
4
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
|
+
local IconButton = TS.import(script, script.Parent.Parent.Parent, "iconButton").IconButton
|
|
6
|
+
local alertAction = TS.import(script, script.Parent, "alertAction").alertAction
|
|
6
7
|
local useAlertStyles = TS.import(script, script.Parent, "Alert.styles").default
|
|
7
8
|
local function Alert(props)
|
|
8
9
|
local _binding = props
|
|
@@ -10,6 +11,8 @@ local function Alert(props)
|
|
|
10
11
|
local title = _binding.title
|
|
11
12
|
local message = _binding.message
|
|
12
13
|
local onClose = _binding.onClose
|
|
14
|
+
local action = _binding.action
|
|
15
|
+
local onAction = _binding.onAction
|
|
13
16
|
local filled = _binding.filled
|
|
14
17
|
local square = _binding.square
|
|
15
18
|
local className = _binding.className
|
|
@@ -17,6 +20,7 @@ local function Alert(props)
|
|
|
17
20
|
local id = _binding.id
|
|
18
21
|
local ref = _binding.ref
|
|
19
22
|
local dismissible = onClose ~= nil
|
|
23
|
+
local label = alertAction(action)
|
|
20
24
|
local styles = useAlertStyles({
|
|
21
25
|
severity = severity,
|
|
22
26
|
dismissible = dismissible,
|
|
@@ -49,18 +53,22 @@ local function Alert(props)
|
|
|
49
53
|
local _condition_2 = dismissible
|
|
50
54
|
if _condition_2 then
|
|
51
55
|
local _attributes_3 = {
|
|
52
|
-
|
|
56
|
+
id = "Close",
|
|
57
|
+
glyph = "close",
|
|
53
58
|
}
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
local _result = (styles.closeGlyph).Size
|
|
60
|
+
if _result ~= nil then
|
|
61
|
+
_result = _result.X.Offset
|
|
56
62
|
end
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
local _condition_3 = _result
|
|
64
|
+
if _condition_3 == nil then
|
|
65
|
+
_condition_3 = 16
|
|
66
|
+
end
|
|
67
|
+
_attributes_3.iconSize = _condition_3
|
|
68
|
+
_attributes_3.tint = (styles.closeGlyph).ImageColor3
|
|
69
|
+
_attributes_3.className = styles.close
|
|
70
|
+
_attributes_3.onClick = onClose
|
|
71
|
+
_condition_2 = (React.createElement(IconButton, _attributes_3))
|
|
64
72
|
end
|
|
65
73
|
local _attributes_3 = {
|
|
66
74
|
key = "Body",
|
|
@@ -89,7 +97,26 @@ local function Alert(props)
|
|
|
89
97
|
_attributes_5[_k] = _v
|
|
90
98
|
end
|
|
91
99
|
_attributes_5.Text = message
|
|
92
|
-
|
|
100
|
+
local _exp_3 = React.createElement("textlabel", _attributes_5)
|
|
101
|
+
local _condition_4 = label ~= nil
|
|
102
|
+
if _condition_4 then
|
|
103
|
+
local _attributes_6 = {
|
|
104
|
+
key = "Action",
|
|
105
|
+
}
|
|
106
|
+
for _k, _v in styles.action do
|
|
107
|
+
_attributes_6[_k] = _v
|
|
108
|
+
end
|
|
109
|
+
_attributes_6.Text = label
|
|
110
|
+
_attributes_6.Event = {
|
|
111
|
+
Activated = function()
|
|
112
|
+
if onAction then
|
|
113
|
+
onAction()
|
|
114
|
+
end
|
|
115
|
+
end,
|
|
116
|
+
}
|
|
117
|
+
_condition_4 = (React.createElement("textbutton", _attributes_6))
|
|
118
|
+
end
|
|
119
|
+
return React.createElement(SxHost, _attributes, _exp, _condition_1, _exp_1, _condition_2, React.createElement("frame", _attributes_3, _exp_2, _condition_3, _exp_3, _condition_4))
|
|
93
120
|
end
|
|
94
121
|
local default = Alert
|
|
95
122
|
return {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
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
|
+
local controlMetrics = _theme.controlMetrics
|
|
5
6
|
local createStyles = _theme.createStyles
|
|
6
7
|
local alertSeverity = TS.import(script, script.Parent, "alertTone").alertSeverity
|
|
7
8
|
local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
@@ -9,7 +10,17 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
9
10
|
local dismissible = _param.dismissible
|
|
10
11
|
local filled = _param.filled
|
|
11
12
|
local tone = theme.palette.status[alertSeverity(severity)]
|
|
12
|
-
local
|
|
13
|
+
local padX = theme.padding.calc(2)
|
|
14
|
+
local padY = theme.padding.calc(1.5)
|
|
15
|
+
local _condition = theme.typography.fontSizes.body
|
|
16
|
+
if _condition == nil then
|
|
17
|
+
_condition = theme.typography.variants.body.size
|
|
18
|
+
end
|
|
19
|
+
local glyph = _condition
|
|
20
|
+
local icon = controlMetrics(theme.density).icon
|
|
21
|
+
local hit = math.max(theme.spacing.calc(3), icon + theme.padding.calc(2))
|
|
22
|
+
local closeGap = if dismissible == true then hit + theme.padding.calc(1) else 0
|
|
23
|
+
local ink = if filled == true then tone.on else theme.palette.text.primary
|
|
13
24
|
local _object = {
|
|
14
25
|
root = {
|
|
15
26
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
@@ -18,10 +29,7 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
18
29
|
BorderSizePixel = 0,
|
|
19
30
|
},
|
|
20
31
|
padding = {
|
|
21
|
-
|
|
22
|
-
PaddingBottom = UDim.new(0, theme.padding.calc(1.5)),
|
|
23
|
-
PaddingLeft = UDim.new(0, theme.padding.calc(2)),
|
|
24
|
-
PaddingRight = UDim.new(0, theme.padding.calc(2)),
|
|
32
|
+
PaddingBottom = UDim.new(0, padY),
|
|
25
33
|
},
|
|
26
34
|
corner = {
|
|
27
35
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -33,8 +41,9 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
33
41
|
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
34
42
|
},
|
|
35
43
|
body = {
|
|
44
|
+
Position = UDim2.new(0, padX, 0, padY),
|
|
36
45
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
37
|
-
Size = UDim2.new(1,
|
|
46
|
+
Size = UDim2.new(1, -(padX * 2 + closeGap), 0, 0),
|
|
38
47
|
BackgroundTransparency = 1,
|
|
39
48
|
BorderSizePixel = 0,
|
|
40
49
|
},
|
|
@@ -46,46 +55,59 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
46
55
|
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
47
56
|
},
|
|
48
57
|
title = {
|
|
49
|
-
AutomaticSize = Enum.AutomaticSize.
|
|
50
|
-
Size = UDim2.
|
|
58
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
59
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
51
60
|
BackgroundTransparency = 1,
|
|
52
61
|
BorderSizePixel = 0,
|
|
53
62
|
Font = theme.typography.fontFamilies.default,
|
|
54
63
|
TextSize = theme.typography.fontSizes.body,
|
|
55
|
-
TextColor3 =
|
|
64
|
+
TextColor3 = ink,
|
|
56
65
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
66
|
+
TextWrapped = true,
|
|
57
67
|
LayoutOrder = 1,
|
|
58
68
|
},
|
|
59
69
|
}
|
|
60
70
|
local _left = "message"
|
|
61
71
|
local _object_1 = {
|
|
62
|
-
AutomaticSize = Enum.AutomaticSize.
|
|
63
|
-
Size = UDim2.
|
|
72
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
73
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
64
74
|
BackgroundTransparency = 1,
|
|
65
75
|
BorderSizePixel = 0,
|
|
66
76
|
Font = theme.typography.fontFamilies.default,
|
|
67
77
|
}
|
|
68
78
|
local _left_1 = "TextSize"
|
|
69
|
-
local
|
|
70
|
-
if
|
|
71
|
-
|
|
79
|
+
local _condition_1 = theme.typography.fontSizes.caption
|
|
80
|
+
if _condition_1 == nil then
|
|
81
|
+
_condition_1 = theme.typography.fontSizes.body
|
|
72
82
|
end
|
|
73
|
-
_object_1[_left_1] =
|
|
74
|
-
_object_1.TextColor3 =
|
|
83
|
+
_object_1[_left_1] = _condition_1
|
|
84
|
+
_object_1.TextColor3 = ink
|
|
75
85
|
_object_1.TextXAlignment = Enum.TextXAlignment.Left
|
|
76
86
|
_object_1.TextWrapped = true
|
|
77
87
|
_object_1.LayoutOrder = 2
|
|
78
88
|
_object[_left] = _object_1
|
|
79
|
-
_object.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
_object.action = {
|
|
90
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
91
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
92
|
+
TextWrapped = true,
|
|
83
93
|
BackgroundTransparency = 1,
|
|
84
94
|
BorderSizePixel = 0,
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
Font = theme.typography.fontFamilies.default,
|
|
96
|
+
TextSize = theme.typography.fontSizes.body,
|
|
97
|
+
TextColor3 = ink,
|
|
98
|
+
AutoButtonColor = false,
|
|
99
|
+
LayoutOrder = 3,
|
|
100
|
+
}
|
|
101
|
+
_object.close = {
|
|
102
|
+
Size = UDim2.fromOffset(hit, hit),
|
|
103
|
+
Position = UDim2.new(1, -padX, 0, padY + glyph / 2),
|
|
104
|
+
AnchorPoint = Vector2.new(1, 0.5),
|
|
87
105
|
ZIndex = 2,
|
|
88
106
|
}
|
|
107
|
+
_object.closeGlyph = {
|
|
108
|
+
Size = UDim2.fromOffset(icon, icon),
|
|
109
|
+
ImageColor3 = ink,
|
|
110
|
+
}
|
|
89
111
|
return createStyles(_object)
|
|
90
112
|
end)
|
|
91
113
|
local default = useAlertStyles
|
|
@@ -3,6 +3,7 @@ import { CustomizedProps } from "../../../../theme/index";
|
|
|
3
3
|
import { AppBarColor, AppBarElevation } from "./AppBar.styles";
|
|
4
4
|
export interface AppBarProps {
|
|
5
5
|
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
6
7
|
elevation?: AppBarElevation;
|
|
7
8
|
color?: AppBarColor;
|
|
8
9
|
children?: React.ReactNode;
|