@rbxts/uiblox 0.2.0-alpha.3 → 0.2.0-alpha.31
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 +27 -109
- package/out/hooks/index.d.ts +1 -0
- package/out/hooks/init.luau +3 -0
- package/out/hooks/useBreakpoints.luau +2 -11
- package/out/hooks/viewportObserver.d.ts +10 -0
- package/out/hooks/viewportObserver.luau +75 -0
- package/out/theme/interfaces/theme/Theme.d.ts +15 -0
- package/out/theme/styles/utilities/componentStyles.luau +45 -3
- package/out/theme/styles/utilities/componentTheme.d.ts +15 -0
- package/out/theme/styles/utilities/index.d.ts +2 -0
- package/out/theme/styles/utilities/init.luau +7 -0
- package/out/theme/styles/utilities/resolveStyle.d.ts +10 -2
- package/out/theme/styles/utilities/resolveStyle.luau +7 -3
- package/out/theme/styles/utilities/resolveSx.d.ts +120 -0
- package/out/theme/styles/utilities/resolveSx.luau +524 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +9 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
- package/out/ui/packages/accordion/components/Accordion.luau +46 -30
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +16 -4
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
- package/out/ui/packages/accordion/components/accordionOpen.luau +4 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +48 -42
- package/out/ui/packages/alert/components/Alert.styles.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.styles.luau +17 -8
- package/out/ui/packages/appBar/components/AppBar.d.ts +2 -1
- package/out/ui/packages/appBar/components/AppBar.luau +47 -36
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +16 -5
- package/out/ui/packages/assetField/components/AssetField.luau +12 -16
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
- package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.luau +27 -26
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +2 -0
- package/out/ui/packages/avatar/components/Avatar.styles.luau +5 -1
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
- package/out/ui/packages/backdrop/components/Backdrop.luau +51 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
- package/out/ui/packages/backdrop/index.d.ts +2 -0
- package/out/ui/packages/backdrop/init.luau +5 -0
- package/out/ui/packages/badge/components/Badge.d.ts +3 -0
- package/out/ui/packages/badge/components/Badge.luau +32 -24
- package/out/ui/packages/badge/components/Badge.styles.d.ts +5 -1
- package/out/ui/packages/badge/components/Badge.styles.luau +20 -8
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +1 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +20 -18
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +3 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +6 -2
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +67 -40
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
- package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
- package/out/ui/packages/breadcrumbs/init.luau +3 -0
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
- package/out/ui/packages/button/components/Button.luau +28 -22
- package/out/ui/packages/card/components/Card.d.ts +3 -1
- package/out/ui/packages/card/components/Card.luau +10 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +75 -53
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +26 -9
- 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 +6 -1
- package/out/ui/packages/chip/components/Chip.luau +61 -17
- package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +54 -9
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +29 -18
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +16 -20
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +34 -20
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +34 -35
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +65 -62
- package/out/ui/packages/dialog/components/Dialog.d.ts +3 -2
- package/out/ui/packages/dialog/components/Dialog.luau +41 -21
- package/out/ui/packages/divider/components/Divider.d.ts +1 -0
- package/out/ui/packages/divider/components/Divider.luau +52 -17
- package/out/ui/packages/divider/components/Divider.styles.luau +32 -0
- package/out/ui/packages/divider/components/dividerLabel.d.ts +1 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +10 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.luau +71 -37
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +3 -1
- package/out/ui/packages/drawer/components/Drawer.styles.luau +3 -2
- package/out/ui/packages/fab/components/Fab.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.luau +79 -37
- package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +39 -3
- package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
- package/out/ui/packages/fab/components/fabSize.luau +4 -0
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +1 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
- package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
- package/out/ui/packages/formText/components/FormHelperText.luau +40 -0
- package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
- package/out/ui/packages/formText/components/FormLabel.luau +42 -0
- package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
- package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
- package/out/ui/packages/formText/index.d.ts +4 -0
- package/out/ui/packages/formText/init.luau +6 -0
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +56 -42
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -4
- package/out/ui/packages/host/components/SxHost.d.ts +18 -0
- package/out/ui/packages/host/components/SxHost.luau +210 -0
- package/out/ui/packages/host/hostPaint.d.ts +12 -0
- package/out/ui/packages/host/hostPaint.luau +34 -0
- package/out/ui/packages/host/hostRules.d.ts +15 -0
- package/out/ui/packages/host/hostRules.luau +92 -0
- package/out/ui/packages/host/index.d.ts +3 -0
- package/out/ui/packages/host/init.luau +13 -0
- package/out/ui/packages/icon/components/Icon.luau +9 -16
- package/out/ui/packages/iconButton/components/IconButton.luau +22 -17
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
- package/out/ui/packages/imageList/components/ImageList.luau +93 -0
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +73 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +4 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +31 -0
- package/out/ui/packages/imageList/index.d.ts +2 -0
- package/out/ui/packages/imageList/init.luau +5 -0
- package/out/ui/packages/index.d.ts +8 -0
- package/out/ui/packages/init.luau +24 -0
- package/out/ui/packages/input/components/Input.d.ts +1 -0
- package/out/ui/packages/input/components/Input.luau +22 -19
- package/out/ui/packages/layout/components/Box.d.ts +11 -0
- package/out/ui/packages/layout/components/Box.luau +40 -0
- package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
- package/out/ui/packages/layout/components/Box.styles.luau +34 -0
- package/out/ui/packages/layout/components/Container.d.ts +10 -0
- package/out/ui/packages/layout/components/Container.luau +45 -0
- package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
- package/out/ui/packages/layout/components/Container.styles.luau +41 -0
- package/out/ui/packages/layout/components/FlexItem.d.ts +12 -0
- package/out/ui/packages/layout/components/FlexItem.luau +40 -0
- package/out/ui/packages/layout/components/FlexItem.styles.d.ts +8 -0
- package/out/ui/packages/layout/components/FlexItem.styles.luau +66 -0
- package/out/ui/packages/layout/components/Grid.d.ts +5 -1
- package/out/ui/packages/layout/components/Grid.luau +41 -19
- package/out/ui/packages/layout/components/List.luau +9 -16
- package/out/ui/packages/layout/components/Stack.d.ts +14 -0
- package/out/ui/packages/layout/components/Stack.luau +44 -0
- package/out/ui/packages/layout/components/Stack.styles.d.ts +10 -0
- package/out/ui/packages/layout/components/Stack.styles.luau +101 -0
- package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
- package/out/ui/packages/layout/components/boxPad.luau +59 -0
- package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
- package/out/ui/packages/layout/components/containerWidth.luau +17 -0
- package/out/ui/packages/layout/components/flexItemMode.d.ts +6 -0
- package/out/ui/packages/layout/components/flexItemMode.luau +36 -0
- package/out/ui/packages/layout/components/gridProps.d.ts +3 -0
- package/out/ui/packages/layout/components/gridProps.luau +20 -0
- package/out/ui/packages/layout/components/stackAlign.d.ts +10 -0
- package/out/ui/packages/layout/components/stackAlign.luau +43 -0
- package/out/ui/packages/layout/index.d.ts +14 -0
- package/out/ui/packages/layout/init.luau +5 -0
- package/out/ui/packages/link/components/Link.d.ts +11 -0
- package/out/ui/packages/link/components/Link.luau +80 -0
- package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
- package/out/ui/packages/link/components/Link.styles.luau +59 -0
- package/out/ui/packages/link/index.d.ts +3 -0
- package/out/ui/packages/link/init.luau +5 -0
- package/out/ui/packages/listItem/components/ListItem.d.ts +4 -1
- package/out/ui/packages/listItem/components/ListItem.luau +44 -4
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +16 -5
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +7 -1
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +6 -0
- package/out/ui/packages/markdown/components/Markdown.luau +221 -0
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.styles.luau +101 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +16 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +315 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +6 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +132 -0
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +2 -0
- package/out/ui/packages/markdown/htmlToMarkdown.luau +350 -0
- package/out/ui/packages/markdown/index.d.ts +8 -0
- package/out/ui/packages/markdown/init.luau +11 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +42 -0
- package/out/ui/packages/markdown/parseMarkdown.luau +459 -0
- package/out/ui/packages/menu/components/Menu.d.ts +7 -1
- package/out/ui/packages/menu/components/Menu.luau +68 -26
- package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
- package/out/ui/packages/modal/components/Modal.d.ts +2 -1
- package/out/ui/packages/modal/components/Modal.luau +79 -37
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +1 -0
- package/out/ui/packages/motion/unit.d.ts +5 -0
- package/out/ui/packages/motion/unit.luau +23 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +2 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +16 -3
- package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
- package/out/ui/packages/pagination/components/Pagination.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.luau +62 -38
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +6 -1
- package/out/ui/packages/pagination/components/Pagination.styles.luau +36 -4
- package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
- package/out/ui/packages/pagination/components/pageRange.luau +91 -8
- package/out/ui/packages/pagination/index.d.ts +1 -0
- package/out/ui/packages/pagination/init.luau +1 -0
- package/out/ui/packages/paper/components/Paper.d.ts +4 -2
- package/out/ui/packages/paper/components/Paper.luau +31 -9
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +6 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -1
- package/out/ui/packages/popup/components/Popup.luau +35 -18
- package/out/ui/packages/popup/index.d.ts +1 -0
- package/out/ui/packages/popup/init.luau +1 -0
- package/out/ui/packages/preloader/components/Preloader.luau +9 -16
- package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +16 -18
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
- package/out/ui/packages/rating/components/Rating.d.ts +11 -0
- package/out/ui/packages/rating/components/Rating.luau +97 -0
- package/out/ui/packages/rating/components/Rating.styles.d.ts +6 -0
- package/out/ui/packages/rating/components/Rating.styles.luau +44 -0
- package/out/ui/packages/rating/index.d.ts +2 -0
- package/out/ui/packages/rating/init.luau +5 -0
- package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
- package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
- package/out/ui/packages/select/components/Select.d.ts +5 -0
- package/out/ui/packages/select/components/Select.luau +61 -77
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
- package/out/ui/packages/shadow/components/Shadow.luau +39 -17
- package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
- package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
- package/out/ui/packages/skeleton/components/Skeleton.luau +22 -30
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
- package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
- package/out/ui/packages/slider/components/Slider.d.ts +3 -0
- package/out/ui/packages/slider/components/Slider.luau +47 -19
- package/out/ui/packages/slider/components/Slider.styles.d.ts +2 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +14 -1
- package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
- package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +2 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +5 -0
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +1 -0
- package/out/ui/packages/snackbar/components/snackbarAction.luau +10 -0
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +19 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +97 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +5 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +31 -0
- package/out/ui/packages/speedDial/index.d.ts +3 -0
- package/out/ui/packages/speedDial/init.luau +5 -0
- package/out/ui/packages/splitPane/components/SplitPane.luau +13 -17
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +2 -0
- package/out/ui/packages/stateMatrix.luau +872 -881
- package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
- package/out/ui/packages/stepper/components/Stepper.luau +16 -17
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +3 -1
- package/out/ui/packages/stepper/components/Stepper.styles.luau +6 -2
- package/out/ui/packages/switch/components/Switch.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.luau +21 -16
- package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +6 -1
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +1 -0
- package/out/ui/packages/table/components/Table.luau +15 -19
- package/out/ui/packages/table/components/Table.styles.d.ts +3 -1
- package/out/ui/packages/table/components/Table.styles.luau +10 -6
- package/out/ui/packages/tabs/components/Tabs.d.ts +3 -0
- package/out/ui/packages/tabs/components/Tabs.luau +24 -19
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +5 -1
- package/out/ui/packages/tabs/components/Tabs.styles.luau +26 -10
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
- package/out/ui/packages/tabs/index.d.ts +1 -0
- package/out/ui/packages/tabs/init.luau +1 -0
- package/out/ui/packages/toast/components/Toast.d.ts +2 -0
- package/out/ui/packages/toast/components/Toast.luau +41 -13
- package/out/ui/packages/toast/components/Toast.styles.luau +23 -5
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +21 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +129 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +9 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +69 -0
- package/out/ui/packages/toggleButton/index.d.ts +2 -0
- package/out/ui/packages/toggleButton/init.luau +7 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
- package/out/ui/packages/treeView/components/TreeView.luau +9 -16
- package/out/ui/packages/typography/components/Typography.luau +13 -14
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +7 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +43 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
- package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
- package/out/ui/packages/virtualList/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +1 -0
- package/package.json +2 -2
- package/out/ui/packages/select/components/selectMotion.d.ts +0 -2
- package/out/ui/packages/select/components/selectMotion.luau +0 -12
|
@@ -17,10 +17,12 @@ local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "co
|
|
|
17
17
|
local spinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").spinnerPixels
|
|
18
18
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
19
19
|
local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
20
|
-
local
|
|
20
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
21
21
|
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
22
22
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
23
|
-
local
|
|
23
|
+
local _virtualList = TS.import(script, script.Parent.Parent.Parent, "virtualList")
|
|
24
|
+
local EmptyListHint = _virtualList.EmptyListHint
|
|
25
|
+
local VirtualList = _virtualList.VirtualList
|
|
24
26
|
local useSelectStyles = TS.import(script, script.Parent, "Select.styles").default
|
|
25
27
|
local optionLabel = TS.import(script, script.Parent, "optionLabel").optionLabel
|
|
26
28
|
local _selectFilter = TS.import(script, script.Parent, "selectFilter")
|
|
@@ -31,7 +33,6 @@ local _selectGroups = TS.import(script, script.Parent, "selectGroups")
|
|
|
31
33
|
local groupRows = _selectGroups.groupRows
|
|
32
34
|
local rowForOption = _selectGroups.rowForOption
|
|
33
35
|
local shouldHandleSelectKey = TS.import(script, script.Parent, "selectKey").shouldHandleSelectKey
|
|
34
|
-
local menuHold = TS.import(script, script.Parent, "selectMotion").menuHold
|
|
35
36
|
local _selectMulti = TS.import(script, script.Parent, "selectMulti")
|
|
36
37
|
local includesChoice = _selectMulti.includesChoice
|
|
37
38
|
local selectionLabel = _selectMulti.selectionLabel
|
|
@@ -53,6 +54,10 @@ local function Select(props)
|
|
|
53
54
|
placeholder = ""
|
|
54
55
|
end
|
|
55
56
|
local searchable = _binding.searchable
|
|
57
|
+
local defaultOpen = _binding.defaultOpen
|
|
58
|
+
local defaultQuery = _binding.defaultQuery
|
|
59
|
+
local emptyText = _binding.emptyText
|
|
60
|
+
local empty = _binding.empty
|
|
56
61
|
local reducedProp = _binding.reducedMotion
|
|
57
62
|
local size = _binding.size
|
|
58
63
|
local className = _binding.className
|
|
@@ -68,16 +73,18 @@ local function Select(props)
|
|
|
68
73
|
local row = controlMetrics(theme.density, size).height
|
|
69
74
|
local active = canActivate(disabled, loading)
|
|
70
75
|
local anchor, setAnchor = useState()
|
|
71
|
-
local open, setOpen = useState(
|
|
72
|
-
local held, setHeld = useState(false)
|
|
76
|
+
local open, setOpen = useState(defaultOpen == true and not loading)
|
|
73
77
|
local focused, setFocused = useState(false)
|
|
74
78
|
local highlight, setHighlight = useState(-1)
|
|
75
|
-
local
|
|
79
|
+
local _condition = defaultQuery
|
|
80
|
+
if _condition == nil then
|
|
81
|
+
_condition = ""
|
|
82
|
+
end
|
|
83
|
+
local query, setQuery = useState(_condition)
|
|
76
84
|
local recent = useRef()
|
|
77
85
|
local typed = useRef()
|
|
78
86
|
local onKeyRef = useRef()
|
|
79
87
|
local listRef = useRef()
|
|
80
|
-
local menuRef = useRef()
|
|
81
88
|
-- ▼ ReadonlyArray.find ▼
|
|
82
89
|
local _callback = function(option)
|
|
83
90
|
return option.value == value
|
|
@@ -95,7 +102,20 @@ local function Select(props)
|
|
|
95
102
|
local search = usesSelectSearch(#options, searchable)
|
|
96
103
|
local filtered = filterChoices(options, query)
|
|
97
104
|
local rows = groupRows(filtered)
|
|
98
|
-
local
|
|
105
|
+
local listHeight = if #rows == 0 then row else math.min(#rows * row, theme.spacing.calc(16))
|
|
106
|
+
local menuHeight = listHeight + (if search then row else 0)
|
|
107
|
+
local _condition_1 = empty
|
|
108
|
+
if _condition_1 == nil then
|
|
109
|
+
local _attributes = {}
|
|
110
|
+
local _condition_2 = emptyText
|
|
111
|
+
if _condition_2 == nil then
|
|
112
|
+
_condition_2 = (if #query > 0 or #options > 0 then "No results" else "No options")
|
|
113
|
+
end
|
|
114
|
+
_attributes.text = _condition_2
|
|
115
|
+
_attributes.height = row
|
|
116
|
+
_condition_1 = (React.createElement(EmptyListHint, _attributes))
|
|
117
|
+
end
|
|
118
|
+
local emptyHint = _condition_1
|
|
99
119
|
local close = function()
|
|
100
120
|
setOpen(false)
|
|
101
121
|
setQuery("")
|
|
@@ -125,15 +145,15 @@ local function Select(props)
|
|
|
125
145
|
if fromPointer == nil then
|
|
126
146
|
fromPointer = false
|
|
127
147
|
end
|
|
128
|
-
local
|
|
129
|
-
if
|
|
148
|
+
local _condition_2 = fromPointer
|
|
149
|
+
if _condition_2 then
|
|
130
150
|
local _result_1 = listRef.current
|
|
131
151
|
if _result_1 ~= nil then
|
|
132
152
|
_result_1 = _result_1.suppressClick()
|
|
133
153
|
end
|
|
134
|
-
|
|
154
|
+
_condition_2 = _result_1
|
|
135
155
|
end
|
|
136
|
-
if
|
|
156
|
+
if _condition_2 then
|
|
137
157
|
return nil
|
|
138
158
|
end
|
|
139
159
|
local choice = filtered[index + 1]
|
|
@@ -219,60 +239,28 @@ local function Select(props)
|
|
|
219
239
|
_result_1.ensureVisible(rowForOption(rows, highlight))
|
|
220
240
|
end
|
|
221
241
|
end, { shown, highlight })
|
|
222
|
-
useEffect(function()
|
|
223
|
-
if shown then
|
|
224
|
-
setHeld(true)
|
|
225
|
-
end
|
|
226
|
-
end, { shown })
|
|
227
242
|
useEffect(function()
|
|
228
243
|
if loading and open then
|
|
229
244
|
setOpen(false)
|
|
230
245
|
setQuery("")
|
|
231
246
|
end
|
|
232
247
|
end, { loading, open })
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
GroupTransparency = if shown then 0 else 1,
|
|
240
|
-
}, 0.12, reducedMotion)
|
|
241
|
-
local seconds = menuHold(shown, reducedMotion)
|
|
242
|
-
if seconds == 0 then
|
|
243
|
-
if not shown then
|
|
244
|
-
setHeld(false)
|
|
245
|
-
end
|
|
246
|
-
return stop
|
|
247
|
-
end
|
|
248
|
-
local wait = task.delay(seconds, function()
|
|
249
|
-
return setHeld(false)
|
|
250
|
-
end)
|
|
251
|
-
return function()
|
|
252
|
-
stop()
|
|
253
|
-
task.cancel(wait)
|
|
254
|
-
end
|
|
255
|
-
end, { shown, held, reducedMotion })
|
|
256
|
-
local _attributes = {}
|
|
257
|
-
local _condition = id
|
|
258
|
-
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
259
|
-
_condition = "Select"
|
|
260
|
-
end
|
|
261
|
-
_attributes.key = _condition
|
|
262
|
-
_attributes.ref = ref
|
|
263
|
-
for _k, _v in styles.root do
|
|
264
|
-
_attributes[_k] = _v
|
|
265
|
-
end
|
|
266
|
-
if className then
|
|
267
|
-
for _k, _v in className do
|
|
268
|
-
_attributes[_k] = _v
|
|
269
|
-
end
|
|
270
|
-
end
|
|
271
|
-
if sx then
|
|
272
|
-
for _k, _v in sx do
|
|
273
|
-
_attributes[_k] = _v
|
|
274
|
-
end
|
|
248
|
+
local _attributes = {
|
|
249
|
+
tag = "frame",
|
|
250
|
+
}
|
|
251
|
+
local _condition_2 = id
|
|
252
|
+
if not (_condition_2 ~= 0 and _condition_2 == _condition_2 and _condition_2 ~= "" and _condition_2) then
|
|
253
|
+
_condition_2 = "Select"
|
|
275
254
|
end
|
|
255
|
+
_attributes.key = _condition_2
|
|
256
|
+
_attributes.hostRef = ref
|
|
257
|
+
_attributes.base = styles.root
|
|
258
|
+
_attributes.className = className
|
|
259
|
+
_attributes.sx = sx
|
|
260
|
+
_attributes.state = {
|
|
261
|
+
disabled = disabled,
|
|
262
|
+
loading = loading,
|
|
263
|
+
}
|
|
276
264
|
local _attributes_1 = {
|
|
277
265
|
key = "Trigger",
|
|
278
266
|
ref = setAnchor,
|
|
@@ -290,11 +278,11 @@ local function Select(props)
|
|
|
290
278
|
if _result_2 ~= nil then
|
|
291
279
|
_result_2 = _result_2.label
|
|
292
280
|
end
|
|
293
|
-
local
|
|
294
|
-
if
|
|
295
|
-
|
|
281
|
+
local _condition_3 = _result_2
|
|
282
|
+
if _condition_3 == nil then
|
|
283
|
+
_condition_3 = placeholder
|
|
296
284
|
end
|
|
297
|
-
_result_1 =
|
|
285
|
+
_result_1 = _condition_3
|
|
298
286
|
end
|
|
299
287
|
_attributes_1.Text = _result_1
|
|
300
288
|
_attributes_1.Active = active
|
|
@@ -337,8 +325,8 @@ local function Select(props)
|
|
|
337
325
|
Position = UDim2.new(1, -theme.padding.calc(1), 0.5, 0),
|
|
338
326
|
},
|
|
339
327
|
})))
|
|
340
|
-
local
|
|
341
|
-
if
|
|
328
|
+
local _condition_3 = shown
|
|
329
|
+
if _condition_3 then
|
|
342
330
|
local _attributes_5 = {
|
|
343
331
|
key = "Menu",
|
|
344
332
|
}
|
|
@@ -356,8 +344,8 @@ local function Select(props)
|
|
|
356
344
|
FillDirection = Enum.FillDirection.Vertical,
|
|
357
345
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
358
346
|
})
|
|
359
|
-
local
|
|
360
|
-
if
|
|
347
|
+
local _condition_4 = search
|
|
348
|
+
if _condition_4 then
|
|
361
349
|
local _attributes_8 = {
|
|
362
350
|
key = "Search",
|
|
363
351
|
}
|
|
@@ -365,7 +353,7 @@ local function Select(props)
|
|
|
365
353
|
_attributes_8[_k] = _v
|
|
366
354
|
end
|
|
367
355
|
_attributes_8.LayoutOrder = 1
|
|
368
|
-
|
|
356
|
+
_condition_4 = (React.createElement("frame", _attributes_8, React.createElement(Input, {
|
|
369
357
|
text = query,
|
|
370
358
|
placeholder = "Search",
|
|
371
359
|
width = UDim.new(1, 0),
|
|
@@ -375,19 +363,14 @@ local function Select(props)
|
|
|
375
363
|
end,
|
|
376
364
|
})))
|
|
377
365
|
end
|
|
378
|
-
|
|
366
|
+
_condition_3 = (React.createElement(Popup, {
|
|
379
367
|
anchor = anchor,
|
|
380
368
|
preferredHeight = menuHeight,
|
|
381
369
|
onDismiss = close,
|
|
382
370
|
onInput = function(input)
|
|
383
371
|
return onKey(input, true)
|
|
384
372
|
end,
|
|
385
|
-
}, React.createElement("
|
|
386
|
-
ref = menuRef,
|
|
387
|
-
Size = UDim2.fromScale(1, 1),
|
|
388
|
-
BackgroundTransparency = 1,
|
|
389
|
-
GroupTransparency = 1,
|
|
390
|
-
}, React.createElement("frame", _attributes_5, _exp_3, _exp_4, _exp_5, _exp_6, _condition_2, React.createElement("frame", {
|
|
373
|
+
}, React.createElement("frame", _attributes_5, _exp_3, _exp_4, _exp_5, _exp_6, _condition_4, React.createElement("frame", {
|
|
391
374
|
key = "ListHost",
|
|
392
375
|
Size = UDim2.new(1, 0, 1, if search then -row else 0),
|
|
393
376
|
BackgroundTransparency = 1,
|
|
@@ -400,6 +383,7 @@ local function Select(props)
|
|
|
400
383
|
end,
|
|
401
384
|
itemHeight = row,
|
|
402
385
|
listRef = listRef,
|
|
386
|
+
empty = emptyHint,
|
|
403
387
|
className = styles.list,
|
|
404
388
|
renderItem = function(row)
|
|
405
389
|
if row.kind == "header" then
|
|
@@ -445,9 +429,9 @@ local function Select(props)
|
|
|
445
429
|
setmetatable(_attributes_9, nil)
|
|
446
430
|
return React.createElement("textbutton", _attributes_8, React.createElement("uipadding", _attributes_9))
|
|
447
431
|
end,
|
|
448
|
-
})))))
|
|
432
|
+
})))))
|
|
449
433
|
end
|
|
450
|
-
return React.createElement(
|
|
434
|
+
return React.createElement(SxHost, _attributes, _exp_2, _condition_3)
|
|
451
435
|
end
|
|
452
436
|
local default = Select
|
|
453
437
|
return {
|
|
@@ -44,7 +44,7 @@ local useSelectStyles = componentStyles("Select", function(theme, _param)
|
|
|
44
44
|
},
|
|
45
45
|
list = {
|
|
46
46
|
Size = UDim2.fromScale(1, 1),
|
|
47
|
-
|
|
47
|
+
BackgroundTransparency = 1,
|
|
48
48
|
BorderSizePixel = 0,
|
|
49
49
|
ScrollBarThickness = theme.padding.default,
|
|
50
50
|
ScrollBarImageColor3 = theme.palette.text.secondary,
|
|
@@ -4,49 +4,63 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useState = _react.useState
|
|
7
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
8
|
local useShadowStyles = TS.import(script, script.Parent, "Shadow.styles").default
|
|
8
|
-
local function Shadow()
|
|
9
|
+
local function Shadow(props)
|
|
9
10
|
local _binding = useShadowStyles()
|
|
10
11
|
local container = _binding.container
|
|
12
|
+
local blob = _binding.blob
|
|
11
13
|
local parent, setParent = useState(nil)
|
|
12
14
|
local cornerRadius, setCornerRadius = useState()
|
|
15
|
+
local blobSize, setBlobSize = useState(UDim2.fromOffset(0, 0))
|
|
16
|
+
local _binding_1 = props
|
|
17
|
+
local className = _binding_1.className
|
|
18
|
+
local sx = _binding_1.sx
|
|
19
|
+
local id = _binding_1.id
|
|
20
|
+
local ref = _binding_1.ref
|
|
13
21
|
local _condition = container.ZIndex
|
|
14
22
|
if _condition == nil then
|
|
15
23
|
_condition = 0
|
|
16
24
|
end
|
|
17
25
|
local defaultZIndex = _condition
|
|
18
26
|
local zIndex, setZIndex = useState(defaultZIndex)
|
|
19
|
-
-- Set any inherited properties
|
|
20
27
|
useEffect(function()
|
|
21
28
|
if not parent then
|
|
22
29
|
return nil
|
|
23
30
|
end
|
|
24
|
-
local _cornerRadius = parent
|
|
31
|
+
local _cornerRadius = parent:FindFirstChildOfClass("UICorner")
|
|
25
32
|
if _cornerRadius ~= nil then
|
|
26
|
-
_cornerRadius = _cornerRadius
|
|
27
|
-
if _cornerRadius ~= nil then
|
|
28
|
-
_cornerRadius = _cornerRadius.CornerRadius
|
|
29
|
-
end
|
|
33
|
+
_cornerRadius = _cornerRadius.CornerRadius
|
|
30
34
|
end
|
|
31
35
|
local cornerRadius = _cornerRadius
|
|
32
36
|
setCornerRadius(cornerRadius)
|
|
33
|
-
local
|
|
34
|
-
if _result ~= nil then
|
|
35
|
-
_result = _result.ZIndex
|
|
36
|
-
end
|
|
37
|
-
local _condition_1 = _result
|
|
37
|
+
local _condition_1 = parent.ZIndex
|
|
38
38
|
if _condition_1 == nil then
|
|
39
39
|
_condition_1 = defaultZIndex
|
|
40
40
|
end
|
|
41
41
|
setZIndex(_condition_1 - 1)
|
|
42
42
|
parent.ClipsDescendants = false
|
|
43
|
+
local sync = function()
|
|
44
|
+
setBlobSize(UDim2.fromOffset(parent.AbsoluteSize.X, parent.AbsoluteSize.Y))
|
|
45
|
+
end
|
|
46
|
+
sync()
|
|
47
|
+
local conn = parent:GetPropertyChangedSignal("AbsoluteSize"):Connect(sync)
|
|
48
|
+
return function()
|
|
49
|
+
return conn:Disconnect()
|
|
50
|
+
end
|
|
43
51
|
end, { parent })
|
|
44
52
|
local _attributes = {
|
|
45
|
-
|
|
53
|
+
tag = "frame",
|
|
46
54
|
}
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
local _condition_1 = id
|
|
56
|
+
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
57
|
+
_condition_1 = "Shadow"
|
|
49
58
|
end
|
|
59
|
+
_attributes.key = _condition_1
|
|
60
|
+
_attributes.hostRef = ref
|
|
61
|
+
_attributes.base = container
|
|
62
|
+
_attributes.className = className
|
|
63
|
+
_attributes.sx = sx
|
|
50
64
|
_attributes.ZIndex = zIndex
|
|
51
65
|
_attributes.Event = {
|
|
52
66
|
AncestryChanged = function(rbx, parent)
|
|
@@ -55,10 +69,18 @@ local function Shadow()
|
|
|
55
69
|
end
|
|
56
70
|
end,
|
|
57
71
|
}
|
|
58
|
-
|
|
72
|
+
local _attributes_1 = {
|
|
73
|
+
key = "Blob",
|
|
74
|
+
}
|
|
75
|
+
for _k, _v in blob do
|
|
76
|
+
_attributes_1[_k] = _v
|
|
77
|
+
end
|
|
78
|
+
_attributes_1.Size = blobSize
|
|
79
|
+
_attributes_1.ZIndex = zIndex
|
|
80
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, cornerRadius ~= nil and React.createElement("uicorner", {
|
|
59
81
|
key = "Corner",
|
|
60
82
|
CornerRadius = cornerRadius,
|
|
61
|
-
}))
|
|
83
|
+
})))
|
|
62
84
|
end
|
|
63
85
|
local default = Shadow
|
|
64
86
|
return {
|
|
@@ -6,11 +6,16 @@ local componentStyles = _theme.componentStyles
|
|
|
6
6
|
local useShadowStyles = componentStyles("Shadow", function(theme)
|
|
7
7
|
return createStyles({
|
|
8
8
|
container = {
|
|
9
|
-
Size = UDim2.
|
|
9
|
+
Size = UDim2.fromOffset(0, 0),
|
|
10
|
+
BackgroundTransparency = 1,
|
|
11
|
+
BorderSizePixel = 0,
|
|
12
|
+
ZIndex = -100,
|
|
13
|
+
},
|
|
14
|
+
blob = {
|
|
10
15
|
BackgroundColor3 = theme.palette.shadow,
|
|
11
16
|
BackgroundTransparency = 0.8,
|
|
12
17
|
BorderSizePixel = 0,
|
|
13
|
-
|
|
18
|
+
Position = UDim2.fromOffset(theme.spacing.calc(0.25), theme.spacing.calc(0.25)),
|
|
14
19
|
},
|
|
15
20
|
})
|
|
16
21
|
end)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local useSidebarStyles = TS.import(script, script.Parent, "Sidebar.styles").default
|
|
5
6
|
local function Sidebar(props)
|
|
6
7
|
local _binding = props
|
|
@@ -12,33 +13,25 @@ local function Sidebar(props)
|
|
|
12
13
|
local _binding_1 = useSidebarStyles(props)
|
|
13
14
|
local root = _binding_1.root
|
|
14
15
|
local container = _binding_1.container
|
|
15
|
-
local _attributes = {
|
|
16
|
+
local _attributes = {
|
|
17
|
+
tag = "frame",
|
|
18
|
+
}
|
|
16
19
|
local _condition = id
|
|
17
20
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
18
21
|
_condition = "Sidebar"
|
|
19
22
|
end
|
|
20
23
|
_attributes.key = _condition
|
|
21
|
-
_attributes.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if className ~= 0 and className == className and className ~= "" and className then
|
|
26
|
-
for _k, _v in className do
|
|
27
|
-
_attributes[_k] = _v
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
if sx ~= 0 and sx == sx and sx ~= "" and sx then
|
|
31
|
-
for _k, _v in sx do
|
|
32
|
-
_attributes[_k] = _v
|
|
33
|
-
end
|
|
34
|
-
end
|
|
24
|
+
_attributes.hostRef = ref
|
|
25
|
+
_attributes.base = root
|
|
26
|
+
_attributes.className = className
|
|
27
|
+
_attributes.sx = sx
|
|
35
28
|
local _attributes_1 = {
|
|
36
29
|
key = "Container",
|
|
37
30
|
}
|
|
38
31
|
for _k, _v in container do
|
|
39
32
|
_attributes_1[_k] = _v
|
|
40
33
|
end
|
|
41
|
-
return React.createElement(
|
|
34
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, children))
|
|
42
35
|
end
|
|
43
36
|
local default = Sidebar
|
|
44
37
|
return {
|
|
@@ -5,6 +5,7 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
9
|
local loopProperty = TS.import(script, script.Parent.Parent.Parent, "motion").loopProperty
|
|
9
10
|
local useSkeletonStyles = TS.import(script, script.Parent, "Skeleton.styles").default
|
|
10
11
|
local _skeletonMotion = TS.import(script, script.Parent, "skeletonMotion")
|
|
@@ -30,6 +31,7 @@ local function SkeletonBlock(props)
|
|
|
30
31
|
local circular = _binding_1.circular
|
|
31
32
|
local fillRef = useRef()
|
|
32
33
|
local gradientRef = useRef()
|
|
34
|
+
local showGradient = motion ~= "pulse"
|
|
33
35
|
useEffect(function()
|
|
34
36
|
local fill = fillRef.current
|
|
35
37
|
local gradient = gradientRef.current
|
|
@@ -45,7 +47,7 @@ local function SkeletonBlock(props)
|
|
|
45
47
|
if motion == "pulse" then
|
|
46
48
|
fill.BackgroundTransparency = 0
|
|
47
49
|
return loopProperty(fill, {
|
|
48
|
-
BackgroundTransparency = 0.
|
|
50
|
+
BackgroundTransparency = 0.45,
|
|
49
51
|
}, 0.9, true)
|
|
50
52
|
end
|
|
51
53
|
fill.BackgroundTransparency = 0
|
|
@@ -55,25 +57,21 @@ local function SkeletonBlock(props)
|
|
|
55
57
|
end, { motion })
|
|
56
58
|
local corner = if variant == "circular" then circular elseif variant == "rectangular" then nil else rounded
|
|
57
59
|
local side = if variant == "circular" then width else nil
|
|
58
|
-
local _attributes = {
|
|
60
|
+
local _attributes = {
|
|
61
|
+
tag = "frame",
|
|
62
|
+
}
|
|
59
63
|
local _condition = id
|
|
60
64
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
61
65
|
_condition = "Skeleton"
|
|
62
66
|
end
|
|
63
67
|
_attributes.key = _condition
|
|
64
|
-
_attributes.
|
|
65
|
-
_attributes.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
end
|
|
72
|
-
if sx then
|
|
73
|
-
for _k, _v in sx do
|
|
74
|
-
_attributes[_k] = _v
|
|
75
|
-
end
|
|
76
|
-
end
|
|
68
|
+
_attributes.hostRef = ref
|
|
69
|
+
_attributes.base = {
|
|
70
|
+
BackgroundTransparency = 1,
|
|
71
|
+
BorderSizePixel = 0,
|
|
72
|
+
}
|
|
73
|
+
_attributes.className = className
|
|
74
|
+
_attributes.sx = sx
|
|
77
75
|
local _condition_1 = side
|
|
78
76
|
if _condition_1 == nil then
|
|
79
77
|
_condition_1 = width
|
|
@@ -90,7 +88,7 @@ local function SkeletonBlock(props)
|
|
|
90
88
|
_attributes_1[_k] = _v
|
|
91
89
|
end
|
|
92
90
|
_attributes_1.Size = UDim2.new(1, 0, 1, 0)
|
|
93
|
-
local _condition_3 =
|
|
91
|
+
local _condition_3 = showGradient
|
|
94
92
|
if _condition_3 then
|
|
95
93
|
local _attributes_2 = {
|
|
96
94
|
ref = gradientRef,
|
|
@@ -106,7 +104,7 @@ local function SkeletonBlock(props)
|
|
|
106
104
|
setmetatable(_attributes_2, nil)
|
|
107
105
|
_condition_4 = React.createElement("uicorner", _attributes_2)
|
|
108
106
|
end
|
|
109
|
-
return React.createElement(
|
|
107
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _condition_3, _condition_4))
|
|
110
108
|
end
|
|
111
109
|
local function Skeleton(props)
|
|
112
110
|
local _binding = props
|
|
@@ -169,23 +167,17 @@ local function Skeleton(props)
|
|
|
169
167
|
end
|
|
170
168
|
end
|
|
171
169
|
local blockHeight = height * count + gap * (count - 1)
|
|
172
|
-
local _attributes = {
|
|
170
|
+
local _attributes = {
|
|
171
|
+
tag = "frame",
|
|
172
|
+
}
|
|
173
173
|
local _condition = id
|
|
174
174
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
175
175
|
_condition = "Skeleton"
|
|
176
176
|
end
|
|
177
177
|
_attributes.key = _condition
|
|
178
|
-
_attributes.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
_attributes[_k] = _v
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
if sx then
|
|
185
|
-
for _k, _v in sx do
|
|
186
|
-
_attributes[_k] = _v
|
|
187
|
-
end
|
|
188
|
-
end
|
|
178
|
+
_attributes.hostRef = ref
|
|
179
|
+
_attributes.className = className
|
|
180
|
+
_attributes.sx = sx
|
|
189
181
|
_attributes.Size = UDim2.new(0, width, 0, blockHeight)
|
|
190
182
|
_attributes.BackgroundTransparency = 1
|
|
191
183
|
_attributes.BorderSizePixel = 0
|
|
@@ -209,7 +201,7 @@ local function Skeleton(props)
|
|
|
209
201
|
_newValue[_k] = _callback(_v, _k - 1, rows)
|
|
210
202
|
end
|
|
211
203
|
-- ▲ ReadonlyArray.map ▲
|
|
212
|
-
return React.createElement(
|
|
204
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
213
205
|
end
|
|
214
206
|
local function SkeletonText(props)
|
|
215
207
|
local _attributes = table.clone(props)
|
|
@@ -3,15 +3,20 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
|
+
local skeletonTone = TS.import(script, script.Parent, "skeletonTone").skeletonTone
|
|
6
7
|
local useSkeletonStyles = componentStyles("Skeleton", function(theme)
|
|
8
|
+
local _binding = skeletonTone(theme)
|
|
9
|
+
local bone = _binding.bone
|
|
10
|
+
local shine = _binding.shine
|
|
7
11
|
return createStyles({
|
|
8
12
|
block = {
|
|
9
|
-
BackgroundColor3 =
|
|
13
|
+
BackgroundColor3 = bone,
|
|
10
14
|
BackgroundTransparency = 0,
|
|
11
15
|
BorderSizePixel = 0,
|
|
12
16
|
},
|
|
13
17
|
highlight = {
|
|
14
|
-
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0,
|
|
18
|
+
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, bone), ColorSequenceKeypoint.new(0.5, shine), ColorSequenceKeypoint.new(1, bone) }),
|
|
19
|
+
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.35), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(1, 0.35) }),
|
|
15
20
|
},
|
|
16
21
|
rounded = {
|
|
17
22
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -3,7 +3,7 @@ local function skeletonMotion(animation, reducedMotion)
|
|
|
3
3
|
if animation == false or reducedMotion == true then
|
|
4
4
|
return false
|
|
5
5
|
end
|
|
6
|
-
return animation or "
|
|
6
|
+
return animation or "shimmer"
|
|
7
7
|
end
|
|
8
8
|
local function skeletonLineWidth(width, index, count)
|
|
9
9
|
if count > 1 and index == count - 1 then
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface SkeletonPalette {
|
|
2
|
+
surface: {
|
|
3
|
+
canvas: Color3;
|
|
4
|
+
elevated: Color3;
|
|
5
|
+
};
|
|
6
|
+
action: {
|
|
7
|
+
hover: Color3;
|
|
8
|
+
};
|
|
9
|
+
text: {
|
|
10
|
+
secondary: Color3;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Bone + shimmer peak from semantic tokens; shine always lifts off the bone vs canvas. */
|
|
14
|
+
export declare function skeletonTone(theme: {
|
|
15
|
+
palette: SkeletonPalette;
|
|
16
|
+
}): {
|
|
17
|
+
bone: Color3;
|
|
18
|
+
shine: Color3;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local relativeLuminance = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme", "utilites", "colorMath").relativeLuminance
|
|
4
|
+
--* Bone + shimmer peak from semantic tokens; shine always lifts off the bone vs canvas.
|
|
5
|
+
local function skeletonTone(theme)
|
|
6
|
+
local lightCanvas = relativeLuminance(theme.palette.surface.canvas) > 0.5
|
|
7
|
+
return {
|
|
8
|
+
bone = theme.palette.action.hover,
|
|
9
|
+
shine = if lightCanvas then theme.palette.surface.elevated else theme.palette.text.secondary,
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
skeletonTone = skeletonTone,
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { SliderColor } from "./Slider.styles";
|
|
2
3
|
export interface SliderProps {
|
|
3
4
|
value: number;
|
|
4
5
|
onChange: (value: number) => void;
|
|
@@ -8,6 +9,8 @@ export interface SliderProps {
|
|
|
8
9
|
step?: number;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
size?: ControlSize;
|
|
12
|
+
marks?: boolean | ReadonlyArray<number>;
|
|
13
|
+
color?: SliderColor;
|
|
11
14
|
}
|
|
12
15
|
declare function Slider(props: CustomizedProps<Frame, SliderProps>): JSX.Element;
|
|
13
16
|
export default Slider;
|