@rbxts/uiblox 0.2.0-alpha.28 → 0.2.0-alpha.3
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 +109 -27
- package/out/hooks/index.d.ts +0 -1
- package/out/hooks/init.luau +0 -3
- package/out/hooks/useBreakpoints.luau +11 -2
- package/out/theme/interfaces/theme/Theme.d.ts +0 -15
- package/out/theme/styles/utilities/componentStyles.luau +3 -45
- package/out/theme/styles/utilities/componentTheme.d.ts +0 -15
- package/out/theme/styles/utilities/index.d.ts +0 -2
- package/out/theme/styles/utilities/init.luau +0 -7
- package/out/theme/styles/utilities/resolveStyle.d.ts +2 -10
- package/out/theme/styles/utilities/resolveStyle.luau +3 -7
- package/out/theme/styles/utilities/styleCache.d.ts +0 -2
- package/out/theme/styles/utilities/styleCache.luau +0 -9
- package/out/ui/packages/accordion/components/Accordion.d.ts +0 -2
- package/out/ui/packages/accordion/components/Accordion.luau +30 -46
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
- package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
- package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
- package/out/ui/packages/alert/components/Alert.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.luau +42 -48
- package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
- package/out/ui/packages/appBar/components/AppBar.luau +16 -14
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
- package/out/ui/packages/appBar/components/AppBar.styles.luau +2 -6
- package/out/ui/packages/assetField/components/AssetField.luau +16 -12
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +0 -8
- package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.luau +26 -27
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
- package/out/ui/packages/badge/components/Badge.d.ts +0 -3
- package/out/ui/packages/badge/components/Badge.luau +24 -32
- package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
- package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +18 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +40 -67
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
- package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/init.luau +0 -3
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +16 -12
- package/out/ui/packages/button/components/Button.luau +22 -28
- package/out/ui/packages/card/components/Card.d.ts +1 -3
- package/out/ui/packages/card/components/Card.luau +0 -10
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +53 -75
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +9 -26
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +1 -6
- package/out/ui/packages/chip/components/Chip.luau +17 -61
- package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -6
- package/out/ui/packages/chip/components/Chip.styles.luau +9 -54
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +18 -29
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +20 -16
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +20 -34
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +35 -34
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +62 -65
- package/out/ui/packages/dialog/components/Dialog.d.ts +2 -3
- package/out/ui/packages/dialog/components/Dialog.luau +21 -41
- package/out/ui/packages/divider/components/Divider.d.ts +0 -1
- package/out/ui/packages/divider/components/Divider.luau +17 -52
- package/out/ui/packages/divider/components/Divider.styles.luau +0 -32
- package/out/ui/packages/drawer/components/Drawer.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.luau +37 -71
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
- package/out/ui/packages/fab/components/Fab.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.luau +37 -79
- package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.styles.luau +3 -39
- package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
- package/out/ui/packages/fab/components/fabSize.luau +0 -4
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +0 -1
- package/out/ui/packages/fontEditor/components/FontEditor.luau +16 -12
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +42 -56
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +4 -37
- package/out/ui/packages/icon/components/Icon.luau +16 -9
- package/out/ui/packages/iconButton/components/IconButton.luau +17 -22
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +0 -3
- package/out/ui/packages/index.d.ts +0 -8
- package/out/ui/packages/init.luau +0 -24
- package/out/ui/packages/input/components/Input.d.ts +0 -1
- package/out/ui/packages/input/components/Input.luau +19 -22
- package/out/ui/packages/layout/components/Grid.d.ts +1 -5
- package/out/ui/packages/layout/components/Grid.luau +19 -41
- package/out/ui/packages/layout/components/List.luau +16 -9
- package/out/ui/packages/layout/index.d.ts +0 -14
- package/out/ui/packages/layout/init.luau +0 -5
- package/out/ui/packages/listItem/components/ListItem.d.ts +1 -4
- package/out/ui/packages/listItem/components/ListItem.luau +4 -44
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -16
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +1 -7
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +19 -23
- package/out/ui/packages/menu/components/Menu.d.ts +1 -7
- package/out/ui/packages/menu/components/Menu.luau +26 -68
- package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
- package/out/ui/packages/modal/components/Modal.d.ts +1 -2
- package/out/ui/packages/modal/components/Modal.luau +37 -79
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +0 -1
- package/out/ui/packages/motion/unit.d.ts +0 -5
- package/out/ui/packages/motion/unit.luau +0 -23
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +0 -2
- package/out/ui/packages/numberInput/components/NumberInput.luau +3 -16
- package/out/ui/packages/numberInput/components/numberValue.d.ts +0 -1
- package/out/ui/packages/numberInput/components/numberValue.luau +0 -45
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +16 -12
- package/out/ui/packages/pagination/components/Pagination.d.ts +1 -6
- package/out/ui/packages/pagination/components/Pagination.luau +38 -62
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -6
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -36
- package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
- package/out/ui/packages/pagination/components/pageRange.luau +8 -91
- package/out/ui/packages/pagination/index.d.ts +0 -1
- package/out/ui/packages/pagination/init.luau +0 -1
- package/out/ui/packages/paper/components/Paper.d.ts +2 -4
- package/out/ui/packages/paper/components/Paper.luau +8 -28
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +38 -63
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +7 -21
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +0 -2
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +0 -14
- package/out/ui/packages/popup/components/Popup.d.ts +1 -2
- package/out/ui/packages/popup/components/Popup.luau +18 -35
- package/out/ui/packages/popup/index.d.ts +0 -1
- package/out/ui/packages/popup/init.luau +0 -1
- package/out/ui/packages/preloader/components/Preloader.luau +16 -9
- package/out/ui/packages/progressBar/components/ProgressBar.luau +16 -12
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +18 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
- package/out/ui/packages/rayEditor/components/RayEditor.luau +16 -12
- package/out/ui/packages/rectEditor/components/RectEditor.luau +43 -86
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +7 -30
- package/out/ui/packages/select/components/Select.d.ts +0 -5
- package/out/ui/packages/select/components/Select.luau +77 -61
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/select/components/selectMotion.d.ts +2 -0
- package/out/ui/packages/select/components/selectMotion.luau +12 -0
- package/out/ui/packages/shadow/components/Shadow.d.ts +1 -2
- package/out/ui/packages/shadow/components/Shadow.luau +17 -39
- package/out/ui/packages/shadow/components/Shadow.styles.luau +2 -7
- package/out/ui/packages/sidebar/components/Sidebar.luau +16 -9
- package/out/ui/packages/skeleton/components/Skeleton.luau +30 -22
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +2 -7
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
- package/out/ui/packages/slider/components/Slider.d.ts +0 -3
- package/out/ui/packages/slider/components/Slider.luau +19 -47
- package/out/ui/packages/slider/components/Slider.styles.d.ts +0 -2
- package/out/ui/packages/slider/components/Slider.styles.luau +1 -14
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
- package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
- package/out/ui/packages/splitPane/components/SplitPane.luau +17 -13
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +0 -2
- package/out/ui/packages/stateMatrix.luau +445 -1632
- package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
- package/out/ui/packages/stepper/components/Stepper.luau +17 -16
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
- package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
- package/out/ui/packages/switch/components/Switch.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.luau +16 -21
- package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +1 -6
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +0 -1
- package/out/ui/packages/table/components/Table.luau +19 -15
- package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
- package/out/ui/packages/table/components/Table.styles.luau +6 -10
- package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
- package/out/ui/packages/tabs/components/Tabs.luau +19 -24
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
- package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
- package/out/ui/packages/tabs/index.d.ts +0 -1
- package/out/ui/packages/tabs/init.luau +0 -1
- package/out/ui/packages/toast/components/Toast.d.ts +0 -2
- package/out/ui/packages/toast/components/Toast.luau +13 -41
- package/out/ui/packages/toast/components/Toast.styles.luau +5 -23
- package/out/ui/packages/tooltip/components/Tooltip.luau +16 -9
- package/out/ui/packages/treeView/components/TreeView.luau +16 -9
- package/out/ui/packages/typography/components/Typography.luau +14 -13
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +16 -12
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +16 -12
- package/out/ui/packages/virtualList/components/VirtualList.luau +16 -9
- package/out/ui/packages/virtualList/index.d.ts +0 -2
- package/out/ui/packages/virtualList/init.luau +0 -1
- package/package.json +2 -2
- package/out/hooks/viewportObserver.d.ts +0 -10
- package/out/hooks/viewportObserver.luau +0 -75
- package/out/theme/styles/utilities/resolveSx.d.ts +0 -110
- package/out/theme/styles/utilities/resolveSx.luau +0 -479
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
- package/out/ui/packages/backdrop/components/Backdrop.luau +0 -51
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
- package/out/ui/packages/backdrop/index.d.ts +0 -2
- package/out/ui/packages/backdrop/init.luau +0 -5
- package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
- package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
- package/out/ui/packages/formText/components/FormHelperText.d.ts +0 -8
- package/out/ui/packages/formText/components/FormHelperText.luau +0 -40
- package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
- package/out/ui/packages/formText/components/FormLabel.luau +0 -42
- package/out/ui/packages/formText/components/FormText.styles.d.ts +0 -5
- package/out/ui/packages/formText/components/FormText.styles.luau +0 -33
- package/out/ui/packages/formText/index.d.ts +0 -4
- package/out/ui/packages/formText/init.luau +0 -6
- package/out/ui/packages/host/components/SxHost.d.ts +0 -18
- package/out/ui/packages/host/components/SxHost.luau +0 -202
- package/out/ui/packages/host/hostPaint.d.ts +0 -11
- package/out/ui/packages/host/hostPaint.luau +0 -33
- package/out/ui/packages/host/hostRules.d.ts +0 -15
- package/out/ui/packages/host/hostRules.luau +0 -92
- package/out/ui/packages/host/index.d.ts +0 -3
- package/out/ui/packages/host/init.luau +0 -13
- package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
- package/out/ui/packages/imageList/components/ImageList.luau +0 -93
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
- package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
- package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
- package/out/ui/packages/imageList/index.d.ts +0 -2
- package/out/ui/packages/imageList/init.luau +0 -5
- package/out/ui/packages/layout/components/Box.d.ts +0 -11
- package/out/ui/packages/layout/components/Box.luau +0 -40
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
- package/out/ui/packages/layout/components/Box.styles.luau +0 -34
- package/out/ui/packages/layout/components/Container.d.ts +0 -10
- package/out/ui/packages/layout/components/Container.luau +0 -45
- package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
- package/out/ui/packages/layout/components/Container.styles.luau +0 -41
- package/out/ui/packages/layout/components/FlexItem.d.ts +0 -12
- package/out/ui/packages/layout/components/FlexItem.luau +0 -40
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +0 -8
- package/out/ui/packages/layout/components/FlexItem.styles.luau +0 -66
- package/out/ui/packages/layout/components/Stack.d.ts +0 -14
- package/out/ui/packages/layout/components/Stack.luau +0 -44
- package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -10
- package/out/ui/packages/layout/components/Stack.styles.luau +0 -101
- package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
- package/out/ui/packages/layout/components/boxPad.luau +0 -59
- package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
- package/out/ui/packages/layout/components/containerWidth.luau +0 -17
- package/out/ui/packages/layout/components/flexItemMode.d.ts +0 -6
- package/out/ui/packages/layout/components/flexItemMode.luau +0 -36
- package/out/ui/packages/layout/components/gridProps.d.ts +0 -3
- package/out/ui/packages/layout/components/gridProps.luau +0 -20
- package/out/ui/packages/layout/components/stackAlign.d.ts +0 -10
- package/out/ui/packages/layout/components/stackAlign.luau +0 -43
- package/out/ui/packages/link/components/Link.d.ts +0 -11
- package/out/ui/packages/link/components/Link.luau +0 -80
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -8
- package/out/ui/packages/link/components/Link.styles.luau +0 -59
- package/out/ui/packages/link/index.d.ts +0 -3
- package/out/ui/packages/link/init.luau +0 -5
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +0 -11
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +0 -2
- package/out/ui/packages/markdown/components/Markdown.d.ts +0 -6
- package/out/ui/packages/markdown/components/Markdown.luau +0 -221
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +0 -2
- package/out/ui/packages/markdown/components/Markdown.styles.luau +0 -101
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +0 -16
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +0 -315
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +0 -6
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +0 -132
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +0 -2
- package/out/ui/packages/markdown/htmlToMarkdown.luau +0 -350
- package/out/ui/packages/markdown/index.d.ts +0 -8
- package/out/ui/packages/markdown/init.luau +0 -11
- package/out/ui/packages/markdown/parseMarkdown.d.ts +0 -42
- package/out/ui/packages/markdown/parseMarkdown.luau +0 -459
- package/out/ui/packages/rating/components/Rating.d.ts +0 -11
- package/out/ui/packages/rating/components/Rating.luau +0 -97
- package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -6
- package/out/ui/packages/rating/components/Rating.styles.luau +0 -44
- package/out/ui/packages/rating/index.d.ts +0 -2
- package/out/ui/packages/rating/init.luau +0 -5
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
- package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
- package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
- package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
- package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -19
- package/out/ui/packages/speedDial/components/SpeedDial.luau +0 -97
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +0 -5
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +0 -31
- package/out/ui/packages/speedDial/index.d.ts +0 -3
- package/out/ui/packages/speedDial/init.luau +0 -5
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
- package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +0 -21
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +0 -129
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -9
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +0 -69
- package/out/ui/packages/toggleButton/index.d.ts +0 -2
- package/out/ui/packages/toggleButton/init.luau +0 -7
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +0 -7
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -43
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +0 -26
|
@@ -7,7 +7,6 @@ local useEffect = _react.useEffect
|
|
|
7
7
|
local useRef = _react.useRef
|
|
8
8
|
local DEFAULT_THEME = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DEFAULT_THEME
|
|
9
9
|
local Directions = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Directions
|
|
10
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
10
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
12
11
|
local useToastStyles = TS.import(script, script.Parent, "Toast.styles").default
|
|
13
12
|
local TWEEN_DURATION = 0.5
|
|
@@ -19,8 +18,6 @@ local function Toast(props)
|
|
|
19
18
|
if duration == nil then
|
|
20
19
|
duration = 4
|
|
21
20
|
end
|
|
22
|
-
local action = _binding.action
|
|
23
|
-
local onAction = _binding.onAction
|
|
24
21
|
local className = _binding.className
|
|
25
22
|
local sx = _binding.sx
|
|
26
23
|
local id = _binding.id
|
|
@@ -29,7 +26,6 @@ local function Toast(props)
|
|
|
29
26
|
local container = _binding_1.container
|
|
30
27
|
local label = _binding_1.label
|
|
31
28
|
local close = _binding_1.close
|
|
32
|
-
local actionStyle = _binding_1.action
|
|
33
29
|
local activePosition = _binding_1.activePosition
|
|
34
30
|
local inActivePosition = _binding_1.inActivePosition
|
|
35
31
|
local frameRef = useRef()
|
|
@@ -61,28 +57,26 @@ local function Toast(props)
|
|
|
61
57
|
onDismiss()
|
|
62
58
|
end
|
|
63
59
|
end, {})
|
|
64
|
-
local _attributes = {
|
|
65
|
-
tag = "frame",
|
|
66
|
-
}
|
|
60
|
+
local _attributes = {}
|
|
67
61
|
local _condition = id
|
|
68
62
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
69
63
|
_condition = "Toast"
|
|
70
64
|
end
|
|
71
65
|
_attributes.key = _condition
|
|
72
|
-
_attributes.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
_attributes.ref = frameRef
|
|
67
|
+
for _k, _v in container do
|
|
68
|
+
_attributes[_k] = _v
|
|
69
|
+
end
|
|
70
|
+
if className then
|
|
71
|
+
for _k, _v in className do
|
|
72
|
+
_attributes[_k] = _v
|
|
76
73
|
end
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
end
|
|
75
|
+
if sx then
|
|
76
|
+
for _k, _v in sx do
|
|
77
|
+
_attributes[_k] = _v
|
|
80
78
|
end
|
|
81
|
-
ref.current = instance
|
|
82
79
|
end
|
|
83
|
-
_attributes.base = container
|
|
84
|
-
_attributes.className = className
|
|
85
|
-
_attributes.sx = sx
|
|
86
80
|
local _exp = React.createElement("uicorner", {
|
|
87
81
|
key = "Corner",
|
|
88
82
|
CornerRadius = UDim.new(0, DEFAULT_THEME.shape.borderRadius),
|
|
@@ -96,28 +90,6 @@ local function Toast(props)
|
|
|
96
90
|
end
|
|
97
91
|
_attributes_1.Text = text
|
|
98
92
|
local _exp_2 = React.createElement("textlabel", _attributes_1)
|
|
99
|
-
local _condition_1 = action ~= nil and #action > 0
|
|
100
|
-
if _condition_1 then
|
|
101
|
-
local _attributes_2 = {
|
|
102
|
-
key = "Action",
|
|
103
|
-
}
|
|
104
|
-
for _k, _v in actionStyle do
|
|
105
|
-
_attributes_2[_k] = _v
|
|
106
|
-
end
|
|
107
|
-
_attributes_2.Text = action
|
|
108
|
-
_attributes_2.Event = {
|
|
109
|
-
Activated = function()
|
|
110
|
-
if onAction then
|
|
111
|
-
onAction()
|
|
112
|
-
end
|
|
113
|
-
tween(Directions.Out)
|
|
114
|
-
if onDismiss then
|
|
115
|
-
onDismiss()
|
|
116
|
-
end
|
|
117
|
-
end,
|
|
118
|
-
}
|
|
119
|
-
_condition_1 = (React.createElement("textbutton", _attributes_2))
|
|
120
|
-
end
|
|
121
93
|
local _attributes_2 = {
|
|
122
94
|
key = "Close",
|
|
123
95
|
}
|
|
@@ -132,7 +104,7 @@ local function Toast(props)
|
|
|
132
104
|
end
|
|
133
105
|
end,
|
|
134
106
|
}
|
|
135
|
-
return React.createElement(
|
|
107
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, React.createElement("imagebutton", _attributes_2))
|
|
136
108
|
end
|
|
137
109
|
local default = Toast
|
|
138
110
|
return {
|
|
@@ -11,7 +11,6 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
11
11
|
if variant == nil then
|
|
12
12
|
variant = ToastVariants.default
|
|
13
13
|
end
|
|
14
|
-
local action = _param.action
|
|
15
14
|
local getToastColors = function()
|
|
16
15
|
repeat
|
|
17
16
|
if variant == (ToastVariants.success) then
|
|
@@ -39,48 +38,31 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
39
38
|
until true
|
|
40
39
|
end
|
|
41
40
|
local toastColors = getToastColors()
|
|
42
|
-
local hasAction = action ~= nil and #action > 0
|
|
43
|
-
local actionSlot = if hasAction then theme.spacing.calc(8) else 0
|
|
44
41
|
local ACTIVE_POSITION = UDim2.new(0.5, 0, 1, -DEFAULT_THEME.padding.calc(2))
|
|
45
42
|
local INACTIVE_POSITION = UDim2.new(0.5, 0, 1, DEFAULT_THEME.spacing.calc(20) + DEFAULT_THEME.padding.calc(2))
|
|
46
43
|
return createStyles({
|
|
47
44
|
container = {
|
|
48
45
|
Size = UDim2.new(0, theme.spacing.calc(20), 0, theme.spacing.calc(4)),
|
|
49
|
-
Position =
|
|
46
|
+
Position = INACTIVE_POSITION,
|
|
50
47
|
BackgroundColor3 = toastColors.background,
|
|
51
48
|
AnchorPoint = Vector2.new(0.5, 1),
|
|
52
49
|
BorderSizePixel = 0,
|
|
53
50
|
ZIndex = 50000,
|
|
54
51
|
},
|
|
55
52
|
label = {
|
|
56
|
-
Size = UDim2.new(1, -
|
|
57
|
-
Position =
|
|
58
|
-
AnchorPoint =
|
|
53
|
+
Size = UDim2.new(1, -theme.padding.calc(4), 1, -theme.padding.calc(4)),
|
|
54
|
+
Position = UDim2.new(0.5, 0, 0.5, 0),
|
|
55
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
59
56
|
BackgroundTransparency = 1,
|
|
60
57
|
BorderSizePixel = 0,
|
|
61
58
|
TextSize = theme.typography.fontSizes.body,
|
|
62
59
|
TextColor3 = toastColors.content,
|
|
63
60
|
Font = theme.typography.fontFamilies.default,
|
|
64
|
-
TextXAlignment = if hasAction then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
|
|
65
|
-
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
66
61
|
TextScaled = false,
|
|
67
62
|
ZIndex = 50001,
|
|
68
63
|
},
|
|
69
|
-
action = {
|
|
70
|
-
AutomaticSize = Enum.AutomaticSize.X,
|
|
71
|
-
Size = UDim2.new(0, 0, 0, theme.spacing.calc(3)),
|
|
72
|
-
Position = UDim2.new(1, -(theme.padding.calc(2) + theme.options.constants.iconSizes.small + theme.padding.calc(1)), 0.5, 0),
|
|
73
|
-
AnchorPoint = Vector2.new(1, 0.5),
|
|
74
|
-
BackgroundTransparency = 1,
|
|
75
|
-
BorderSizePixel = 0,
|
|
76
|
-
Font = theme.typography.fontFamilies.default,
|
|
77
|
-
TextSize = theme.typography.fontSizes.body,
|
|
78
|
-
TextColor3 = toastColors.content,
|
|
79
|
-
AutoButtonColor = false,
|
|
80
|
-
ZIndex = 50001,
|
|
81
|
-
},
|
|
82
64
|
close = {
|
|
83
|
-
Size = UDim2.new(0, theme.
|
|
65
|
+
Size = UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1)),
|
|
84
66
|
Position = UDim2.new(1, -theme.padding.calc(2), 0, theme.padding.calc(2)),
|
|
85
67
|
AnchorPoint = Vector2.new(1, 0),
|
|
86
68
|
ImageColor3 = toastColors.content,
|
|
@@ -7,7 +7,6 @@ local useRef = _react.useRef
|
|
|
7
7
|
local useState = _react.useState
|
|
8
8
|
local TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
|
|
9
9
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
10
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
11
10
|
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
12
11
|
local useTooltipStyles = TS.import(script, script.Parent, "Tooltip.styles").default
|
|
13
12
|
local function Tooltip(props)
|
|
@@ -51,18 +50,26 @@ local function Tooltip(props)
|
|
|
51
50
|
useEffect(function()
|
|
52
51
|
return cancel
|
|
53
52
|
end, {})
|
|
54
|
-
local _attributes = {
|
|
55
|
-
tag = "frame",
|
|
56
|
-
}
|
|
53
|
+
local _attributes = {}
|
|
57
54
|
local _condition_1 = id
|
|
58
55
|
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
59
56
|
_condition_1 = "Tooltip"
|
|
60
57
|
end
|
|
61
58
|
_attributes.key = _condition_1
|
|
62
|
-
_attributes.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
_attributes.ref = ref
|
|
60
|
+
for _k, _v in styles.root do
|
|
61
|
+
_attributes[_k] = _v
|
|
62
|
+
end
|
|
63
|
+
if className then
|
|
64
|
+
for _k, _v in className do
|
|
65
|
+
_attributes[_k] = _v
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
if sx then
|
|
69
|
+
for _k, _v in sx do
|
|
70
|
+
_attributes[_k] = _v
|
|
71
|
+
end
|
|
72
|
+
end
|
|
66
73
|
_attributes.Event = {
|
|
67
74
|
MouseEnter = function(rbx)
|
|
68
75
|
setAnchor(rbx)
|
|
@@ -104,7 +111,7 @@ local function Tooltip(props)
|
|
|
104
111
|
preferredHeight = tipHeight,
|
|
105
112
|
}, React.createElement("textlabel", _attributes_1, _exp_1, _exp_2, React.createElement("uistroke", _attributes_4))))
|
|
106
113
|
end
|
|
107
|
-
return React.createElement(
|
|
114
|
+
return React.createElement("frame", _attributes, _exp, _condition_2)
|
|
108
115
|
end
|
|
109
116
|
local default = Tooltip
|
|
110
117
|
return {
|
|
@@ -9,7 +9,6 @@ local useState = _react.useState
|
|
|
9
9
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
10
10
|
local cx = _theme.cx
|
|
11
11
|
local useTheme = _theme.useTheme
|
|
12
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
13
12
|
local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
14
13
|
local Typography = TS.import(script, script.Parent.Parent.Parent, "typography").Typography
|
|
15
14
|
local VirtualList = TS.import(script, script.Parent.Parent.Parent, "virtualList").VirtualList
|
|
@@ -253,18 +252,26 @@ local function TreeView(props)
|
|
|
253
252
|
family = if bold then "bold" else "default",
|
|
254
253
|
}))
|
|
255
254
|
end
|
|
256
|
-
local _attributes = {
|
|
257
|
-
tag = "frame",
|
|
258
|
-
}
|
|
255
|
+
local _attributes = {}
|
|
259
256
|
local _condition = id
|
|
260
257
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
261
258
|
_condition = "TreeView"
|
|
262
259
|
end
|
|
263
260
|
_attributes.key = _condition
|
|
264
|
-
_attributes.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
_attributes.ref = ref
|
|
262
|
+
for _k, _v in root do
|
|
263
|
+
_attributes[_k] = _v
|
|
264
|
+
end
|
|
265
|
+
if className then
|
|
266
|
+
for _k, _v in className do
|
|
267
|
+
_attributes[_k] = _v
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
if sx then
|
|
271
|
+
for _k, _v in sx do
|
|
272
|
+
_attributes[_k] = _v
|
|
273
|
+
end
|
|
274
|
+
end
|
|
268
275
|
local _attributes_1 = {}
|
|
269
276
|
local _object = {
|
|
270
277
|
Text = tree.title,
|
|
@@ -276,7 +283,7 @@ local function TreeView(props)
|
|
|
276
283
|
_attributes_1.color = "textSecondary"
|
|
277
284
|
_attributes_1.variant = "body"
|
|
278
285
|
_attributes_1.family = "bold"
|
|
279
|
-
return React.createElement(
|
|
286
|
+
return React.createElement("frame", _attributes, React.createElement(Typography, _attributes_1), React.createElement(VirtualList, {
|
|
280
287
|
key = "List",
|
|
281
288
|
items = rows,
|
|
282
289
|
getKey = function(entry)
|
|
@@ -1,7 +1,6 @@
|
|
|
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 SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
4
|
local useTypographyStyles = TS.import(script, script.Parent, "Typography.styles").default
|
|
6
5
|
local function Typography(props)
|
|
7
6
|
local _binding = props
|
|
@@ -17,29 +16,31 @@ local function Typography(props)
|
|
|
17
16
|
local _binding_1 = useTypographyStyles(props)
|
|
18
17
|
local root = _binding_1.root
|
|
19
18
|
local variantToken = _binding_1.variantToken
|
|
20
|
-
local _attributes = {
|
|
21
|
-
tag = "textlabel",
|
|
22
|
-
}
|
|
19
|
+
local _attributes = {}
|
|
23
20
|
local _condition = id
|
|
24
21
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
25
22
|
_condition = "Typography"
|
|
26
23
|
end
|
|
27
24
|
_attributes.key = _condition
|
|
28
|
-
_attributes.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
_attributes.ref = ref
|
|
26
|
+
for _k, _v in root do
|
|
27
|
+
_attributes[_k] = _v
|
|
28
|
+
end
|
|
29
|
+
_attributes.Text = text
|
|
32
30
|
if className ~= 0 and className == className and className ~= "" and className then
|
|
33
31
|
for _k, _v in className do
|
|
34
|
-
|
|
32
|
+
_attributes[_k] = _v
|
|
35
33
|
end
|
|
36
34
|
end
|
|
37
35
|
for _k, _v in variantToken do
|
|
38
|
-
|
|
36
|
+
_attributes[_k] = _v
|
|
37
|
+
end
|
|
38
|
+
if sx ~= 0 and sx == sx and sx ~= "" and sx then
|
|
39
|
+
for _k, _v in sx do
|
|
40
|
+
_attributes[_k] = _v
|
|
41
|
+
end
|
|
39
42
|
end
|
|
40
|
-
|
|
41
|
-
_attributes.sx = sx
|
|
42
|
-
return React.createElement(SxHost, _attributes, children)
|
|
43
|
+
return React.createElement("textlabel", _attributes, children)
|
|
43
44
|
end
|
|
44
45
|
local default = Typography
|
|
45
46
|
return {
|
|
@@ -1,7 +1,6 @@
|
|
|
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 SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
4
|
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
6
5
|
local _vectorValue = TS.import(script, script.Parent.Parent.Parent, "vectorEditor", "components", "vectorValue")
|
|
7
6
|
local writeUDim = _vectorValue.writeUDim
|
|
@@ -42,21 +41,26 @@ local function UDimEditor(props)
|
|
|
42
41
|
onChange = commit,
|
|
43
42
|
})))
|
|
44
43
|
end
|
|
45
|
-
local _attributes = {
|
|
46
|
-
tag = "frame",
|
|
47
|
-
}
|
|
44
|
+
local _attributes = {}
|
|
48
45
|
local _condition = id
|
|
49
46
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
50
47
|
_condition = "UDimEditor"
|
|
51
48
|
end
|
|
52
49
|
_attributes.key = _condition
|
|
53
|
-
_attributes.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
_attributes.ref = ref
|
|
51
|
+
for _k, _v in styles.root do
|
|
52
|
+
_attributes[_k] = _v
|
|
53
|
+
end
|
|
54
|
+
if className then
|
|
55
|
+
for _k, _v in className do
|
|
56
|
+
_attributes[_k] = _v
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
if sx then
|
|
60
|
+
for _k, _v in sx do
|
|
61
|
+
_attributes[_k] = _v
|
|
62
|
+
end
|
|
63
|
+
end
|
|
60
64
|
local _attributes_1 = table.clone(styles.column)
|
|
61
65
|
setmetatable(_attributes_1, nil)
|
|
62
66
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -115,7 +119,7 @@ local function UDimEditor(props)
|
|
|
115
119
|
return onChange(writeUDim(value, "Offset", amount))
|
|
116
120
|
end, 2)))
|
|
117
121
|
end
|
|
118
|
-
return React.createElement(
|
|
122
|
+
return React.createElement("frame", _attributes, _exp, _result)
|
|
119
123
|
end
|
|
120
124
|
local default = UDimEditor
|
|
121
125
|
return {
|
|
@@ -1,7 +1,6 @@
|
|
|
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 SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
4
|
local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
|
|
6
5
|
local useVectorEditorStyles = TS.import(script, script.Parent, "VectorEditor.styles").default
|
|
7
6
|
local _vectorValue = TS.import(script, script.Parent, "vectorValue")
|
|
@@ -20,21 +19,26 @@ local function VectorEditor(props)
|
|
|
20
19
|
local styles = useVectorEditorStyles()
|
|
21
20
|
local isVector3 = typeof(value) == "Vector3"
|
|
22
21
|
local axes = props.axes or (if isVector3 then ({ "X", "Y", "Z" }) else ({ "X", "Y" }))
|
|
23
|
-
local _attributes = {
|
|
24
|
-
tag = "frame",
|
|
25
|
-
}
|
|
22
|
+
local _attributes = {}
|
|
26
23
|
local _condition = id
|
|
27
24
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
28
25
|
_condition = "VectorEditor"
|
|
29
26
|
end
|
|
30
27
|
_attributes.key = _condition
|
|
31
|
-
_attributes.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
_attributes.ref = ref
|
|
29
|
+
for _k, _v in styles.root do
|
|
30
|
+
_attributes[_k] = _v
|
|
31
|
+
end
|
|
32
|
+
if className then
|
|
33
|
+
for _k, _v in className do
|
|
34
|
+
_attributes[_k] = _v
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
if sx then
|
|
38
|
+
for _k, _v in sx do
|
|
39
|
+
_attributes[_k] = _v
|
|
40
|
+
end
|
|
41
|
+
end
|
|
38
42
|
local _attributes_1 = table.clone(styles.row)
|
|
39
43
|
setmetatable(_attributes_1, nil)
|
|
40
44
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -75,7 +79,7 @@ local function VectorEditor(props)
|
|
|
75
79
|
_newValue[_k] = _callback(_v, _k - 1, axes)
|
|
76
80
|
end
|
|
77
81
|
-- ▲ ReadonlyArray.map ▲
|
|
78
|
-
return React.createElement(
|
|
82
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
79
83
|
end
|
|
80
84
|
local default = VectorEditor
|
|
81
85
|
return {
|
|
@@ -5,7 +5,6 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useState = _react.useState
|
|
8
|
-
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
8
|
local useDragScroll = TS.import(script, script.Parent.Parent.Parent, "scroll").useDragScroll
|
|
10
9
|
local useVirtualListStyles = TS.import(script, script.Parent, "VirtualList.styles").default
|
|
11
10
|
local _virtualWindow = TS.import(script, script.Parent, "virtualWindow")
|
|
@@ -143,15 +142,13 @@ local function VirtualList(props)
|
|
|
143
142
|
end
|
|
144
143
|
end
|
|
145
144
|
end
|
|
146
|
-
local _attributes = {
|
|
147
|
-
tag = "scrollingframe",
|
|
148
|
-
}
|
|
145
|
+
local _attributes = {}
|
|
149
146
|
local _condition = id
|
|
150
147
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
151
148
|
_condition = "VirtualList"
|
|
152
149
|
end
|
|
153
150
|
_attributes.key = _condition
|
|
154
|
-
_attributes.
|
|
151
|
+
_attributes.ref = function(rbx)
|
|
155
152
|
setFrame(rbx)
|
|
156
153
|
if type(ref) == "function" then
|
|
157
154
|
ref(rbx)
|
|
@@ -159,11 +156,21 @@ local function VirtualList(props)
|
|
|
159
156
|
ref.current = rbx
|
|
160
157
|
end
|
|
161
158
|
end
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
for _k, _v in styles.root do
|
|
160
|
+
_attributes[_k] = _v
|
|
161
|
+
end
|
|
162
|
+
if className then
|
|
163
|
+
for _k, _v in className do
|
|
164
|
+
_attributes[_k] = _v
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
if sx then
|
|
168
|
+
for _k, _v in sx do
|
|
169
|
+
_attributes[_k] = _v
|
|
170
|
+
end
|
|
171
|
+
end
|
|
165
172
|
_attributes.CanvasSize = UDim2.fromOffset(0, canvasHeight)
|
|
166
|
-
return React.createElement(
|
|
173
|
+
return React.createElement("scrollingframe", _attributes, if count == 0 then empty else rows, children)
|
|
167
174
|
end
|
|
168
175
|
local default = VirtualList
|
|
169
176
|
return {
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export { default as VirtualList } from "./components/VirtualList";
|
|
2
2
|
export { VirtualListProps, VirtualListHandle, VirtualListItemState, VirtualListAlign, } from "./components/VirtualList";
|
|
3
|
-
export { default as EmptyListHint } from "./components/EmptyListHint";
|
|
4
|
-
export { EmptyListHintProps } from "./components/EmptyListHint";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/uiblox",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.3",
|
|
4
4
|
"description": "UI Library and theming for roblox-ts projects",
|
|
5
5
|
"main": "out/init.luau",
|
|
6
6
|
"packageManager": "pnpm@11.3.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "rbxtsc",
|
|
9
9
|
"watch": "rbxtsc -w",
|
|
10
10
|
"pack:check": "node scripts/pack-check.mjs",
|
|
11
|
-
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/
|
|
11
|
+
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-motion.check.mjs && node --experimental-strip-types scripts/select-polish.check.mjs && node --experimental-strip-types scripts/reduced-motion.check.mjs && node --experimental-strip-types scripts/card.check.mjs && node --experimental-strip-types scripts/chip.check.mjs && node --experimental-strip-types scripts/badge.check.mjs && node --experimental-strip-types scripts/avatar.check.mjs && node --experimental-strip-types scripts/drawer.check.mjs && node --experimental-strip-types scripts/breadcrumbs.check.mjs && node --experimental-strip-types scripts/pagination.check.mjs && node --experimental-strip-types scripts/stepper.check.mjs && node --experimental-strip-types scripts/accordion.check.mjs && node --experimental-strip-types scripts/snackbar.check.mjs && node --experimental-strip-types scripts/table.check.mjs && node --experimental-strip-types scripts/autocomplete.check.mjs && node --experimental-strip-types scripts/field-loading.check.mjs && node --experimental-strip-types scripts/fab.check.mjs && node --experimental-strip-types scripts/appbar.check.mjs && node --experimental-strip-types scripts/bottom-navigation.check.mjs && node --experimental-strip-types scripts/alert.check.mjs && node --experimental-strip-types scripts/cframe-editor.check.mjs && node --experimental-strip-types scripts/enum-picker.check.mjs && node --experimental-strip-types scripts/number-range.check.mjs && node --experimental-strip-types scripts/rect-editor.check.mjs && node --experimental-strip-types scripts/asset-field.check.mjs && node --experimental-strip-types scripts/gradient-editor.check.mjs && node --experimental-strip-types scripts/ray-editor.check.mjs && node --experimental-strip-types scripts/physical-properties.check.mjs && node --experimental-strip-types scripts/brickcolor-picker.check.mjs",
|
|
12
12
|
"prepublishOnly": "pnpm build"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type Size = {
|
|
2
|
-
width: number;
|
|
3
|
-
height: number;
|
|
4
|
-
};
|
|
5
|
-
type Listener = (size: Size) => void;
|
|
6
|
-
/** One AbsoluteSize connection per host; shared by all subscribers. */
|
|
7
|
-
export declare function observeViewport(host: GuiObject, listener: Listener): () => void;
|
|
8
|
-
/** Test helper — drop all host observers. */
|
|
9
|
-
export declare function clearViewportObservers(): void;
|
|
10
|
-
export {};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local hosts = {}
|
|
3
|
-
--* One AbsoluteSize connection per host; shared by all subscribers.
|
|
4
|
-
local function observeViewport(host, listener)
|
|
5
|
-
local _host = host
|
|
6
|
-
local entry = hosts[_host]
|
|
7
|
-
if entry == nil then
|
|
8
|
-
entry = {
|
|
9
|
-
listeners = {},
|
|
10
|
-
size = {
|
|
11
|
-
width = host.AbsoluteSize.X,
|
|
12
|
-
height = host.AbsoluteSize.Y,
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
local _host_1 = host
|
|
16
|
-
local _entry = entry
|
|
17
|
-
hosts[_host_1] = _entry
|
|
18
|
-
local read = function()
|
|
19
|
-
local _host_2 = host
|
|
20
|
-
local current = hosts[_host_2]
|
|
21
|
-
if current == nil then
|
|
22
|
-
return nil
|
|
23
|
-
end
|
|
24
|
-
current.size = {
|
|
25
|
-
width = host.AbsoluteSize.X,
|
|
26
|
-
height = host.AbsoluteSize.Y,
|
|
27
|
-
}
|
|
28
|
-
for _, cb in current.listeners do
|
|
29
|
-
cb(current.size)
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
read()
|
|
33
|
-
entry.connection = host:GetPropertyChangedSignal("AbsoluteSize"):Connect(read)
|
|
34
|
-
end
|
|
35
|
-
local _listeners = entry.listeners
|
|
36
|
-
local _listener = listener
|
|
37
|
-
table.insert(_listeners, _listener)
|
|
38
|
-
listener(entry.size)
|
|
39
|
-
return function()
|
|
40
|
-
local _host_1 = host
|
|
41
|
-
local current = hosts[_host_1]
|
|
42
|
-
if current == nil then
|
|
43
|
-
return nil
|
|
44
|
-
end
|
|
45
|
-
local _listeners_1 = current.listeners
|
|
46
|
-
local _listener_1 = listener
|
|
47
|
-
local index = (table.find(_listeners_1, _listener_1) or 0) - 1
|
|
48
|
-
if index >= 0 then
|
|
49
|
-
table.remove(current.listeners, index + 1)
|
|
50
|
-
end
|
|
51
|
-
if #current.listeners == 0 then
|
|
52
|
-
local _result = current.connection
|
|
53
|
-
if _result ~= nil then
|
|
54
|
-
_result:Disconnect()
|
|
55
|
-
end
|
|
56
|
-
local _host_2 = host
|
|
57
|
-
hosts[_host_2] = nil
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
--* Test helper — drop all host observers.
|
|
62
|
-
local function clearViewportObservers()
|
|
63
|
-
for _, entry in hosts do
|
|
64
|
-
local _result = entry.connection
|
|
65
|
-
if _result ~= nil then
|
|
66
|
-
_result:Disconnect()
|
|
67
|
-
end
|
|
68
|
-
table.clear(entry.listeners)
|
|
69
|
-
end
|
|
70
|
-
table.clear(hosts)
|
|
71
|
-
end
|
|
72
|
-
return {
|
|
73
|
-
observeViewport = observeViewport,
|
|
74
|
-
clearViewportObservers = clearViewportObservers,
|
|
75
|
-
}
|