@rbxts/uiblox 0.2.0-alpha.18 → 0.2.0-alpha.2
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 +0 -2
- package/out/theme/constants/NumberConstants.d.ts +0 -2
- package/out/theme/constants/NumberConstants.luau +0 -3
- package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
- package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +8 -15
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -3
- package/out/theme/interfaces/typography/Variants.d.ts +15 -14
- package/out/theme/interfaces/typography/Variants.luau +18 -68
- package/out/theme/themes/DarkTheme.luau +0 -4
- package/out/theme/themes/LightTheme.luau +0 -4
- package/out/ui/packages/accordion/components/Accordion.d.ts +0 -1
- package/out/ui/packages/accordion/components/Accordion.luau +6 -22
- 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 -1
- package/out/ui/packages/alert/components/Alert.luau +27 -36
- 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 +0 -5
- 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/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 +12 -20
- 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 +8 -23
- 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 +2 -8
- 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 +24 -58
- 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/brickColorCatalog.luau +1 -1
- package/out/ui/packages/button/components/Button.luau +5 -9
- package/out/ui/packages/card/components/Card.d.ts +0 -1
- package/out/ui/packages/card/components/Card.luau +0 -2
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +1 -4
- package/out/ui/packages/chip/components/Chip.luau +2 -44
- package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -4
- package/out/ui/packages/chip/components/Chip.styles.luau +7 -46
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +2 -13
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
- package/out/ui/packages/dialog/components/Dialog.luau +18 -27
- package/out/ui/packages/divider/components/Divider.d.ts +0 -1
- package/out/ui/packages/divider/components/Divider.luau +0 -48
- package/out/ui/packages/divider/components/Divider.styles.luau +0 -29
- package/out/ui/packages/drawer/components/Drawer.d.ts +0 -1
- package/out/ui/packages/drawer/components/Drawer.luau +1 -4
- 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 +25 -62
- package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.styles.luau +3 -33
- 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/iconButton/components/IconButton.luau +2 -7
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +0 -3
- package/out/ui/packages/index.d.ts +0 -7
- package/out/ui/packages/init.luau +0 -21
- package/out/ui/packages/input/components/Input.luau +1 -1
- package/out/ui/packages/layout/components/Grid.d.ts +1 -1
- package/out/ui/packages/layout/index.d.ts +0 -10
- package/out/ui/packages/layout/init.luau +0 -4
- package/out/ui/packages/listItem/components/ListItem.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.luau +0 -5
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -10
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +0 -2
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +19 -23
- package/out/ui/packages/menu/components/Menu.d.ts +0 -4
- package/out/ui/packages/menu/components/Menu.luau +23 -52
- package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
- package/out/ui/packages/modal/components/Modal.d.ts +1 -1
- package/out/ui/packages/modal/components/Modal.luau +37 -55
- 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/pagination/components/Pagination.d.ts +1 -4
- package/out/ui/packages/pagination/components/Pagination.luau +22 -41
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -4
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -19
- 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 +1 -2
- package/out/ui/packages/paper/components/Paper.luau +3 -14
- 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/popup/index.d.ts +0 -1
- package/out/ui/packages/popup/init.luau +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +2 -4
- 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/select/components/Select.d.ts +0 -5
- package/out/ui/packages/select/components/Select.luau +24 -48
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/skeleton/components/Skeleton.luau +2 -3
- 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 -1
- package/out/ui/packages/slider/components/Slider.luau +1 -24
- package/out/ui/packages/slider/components/Slider.styles.luau +0 -8
- 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/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +0 -2
- package/out/ui/packages/stateMatrix.luau +221 -733
- package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
- package/out/ui/packages/stepper/components/Stepper.luau +1 -7
- 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 +0 -5
- package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -7
- 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 +1 -4
- 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 +3 -12
- 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 +1 -26
- package/out/ui/packages/toast/components/Toast.styles.luau +4 -22
- package/out/ui/packages/typography/components/Typography.styles.luau +5 -4
- 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/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
- package/out/ui/packages/backdrop/components/Backdrop.luau +0 -58
- 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 -44
- package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
- package/out/ui/packages/formText/components/FormLabel.luau +0 -46
- 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/imageList/components/ImageList.d.ts +0 -14
- package/out/ui/packages/imageList/components/ImageList.luau +0 -100
- 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 -49
- 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 -54
- 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/Stack.d.ts +0 -12
- package/out/ui/packages/layout/components/Stack.luau +0 -49
- package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -8
- package/out/ui/packages/layout/components/Stack.styles.luau +0 -72
- 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/stackAlign.d.ts +0 -8
- package/out/ui/packages/layout/components/stackAlign.luau +0 -29
- package/out/ui/packages/link/components/Link.d.ts +0 -11
- package/out/ui/packages/link/components/Link.luau +0 -83
- 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/rating/components/Rating.d.ts +0 -11
- package/out/ui/packages/rating/components/Rating.luau +0 -101
- 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 -101
- 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 -19
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +0 -135
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -7
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +0 -65
- 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 -6
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -32
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +0 -26
|
@@ -71,33 +71,10 @@ local function arcKeys(value)
|
|
|
71
71
|
transparency = 1,
|
|
72
72
|
} }
|
|
73
73
|
end
|
|
74
|
-
--* Indeterminate ring: long clear trail, bright head — reads as a sweep.
|
|
75
|
-
local function spinArcKeys()
|
|
76
|
-
return { {
|
|
77
|
-
time = 0,
|
|
78
|
-
transparency = 1,
|
|
79
|
-
}, {
|
|
80
|
-
time = 0.45,
|
|
81
|
-
transparency = 1,
|
|
82
|
-
}, {
|
|
83
|
-
time = 0.7,
|
|
84
|
-
transparency = 0.55,
|
|
85
|
-
}, {
|
|
86
|
-
time = 0.88,
|
|
87
|
-
transparency = 0,
|
|
88
|
-
}, {
|
|
89
|
-
time = 0.96,
|
|
90
|
-
transparency = 0.35,
|
|
91
|
-
}, {
|
|
92
|
-
time = 1,
|
|
93
|
-
transparency = 1,
|
|
94
|
-
} }
|
|
95
|
-
end
|
|
96
74
|
return {
|
|
97
75
|
clampUnit = clampUnit,
|
|
98
76
|
stopOnce = stopOnce,
|
|
99
77
|
progressUnit = progressUnit,
|
|
100
78
|
progressSpin = progressSpin,
|
|
101
79
|
arcKeys = arcKeys,
|
|
102
|
-
spinArcKeys = spinArcKeys,
|
|
103
80
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
export interface PaginationProps {
|
|
3
3
|
count: number;
|
|
4
4
|
page: number;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
siblingCount?: number;
|
|
7
|
-
boundaryCount?: number;
|
|
8
|
-
size?: ControlSize;
|
|
9
6
|
onChange: (page: number) => void;
|
|
10
7
|
}
|
|
11
8
|
declare function Pagination(props: CustomizedProps<Frame, PaginationProps>): JSX.Element;
|
|
@@ -9,18 +9,12 @@ local function Pagination(props)
|
|
|
9
9
|
local count = _binding.count
|
|
10
10
|
local page = _binding.page
|
|
11
11
|
local disabled = _binding.disabled
|
|
12
|
-
local siblingCount = _binding.siblingCount
|
|
13
|
-
local boundaryCount = _binding.boundaryCount
|
|
14
|
-
local size = _binding.size
|
|
15
12
|
local onChange = _binding.onChange
|
|
16
13
|
local className = _binding.className
|
|
17
14
|
local sx = _binding.sx
|
|
18
15
|
local id = _binding.id
|
|
19
16
|
local ref = _binding.ref
|
|
20
|
-
local styles = usePaginationStyles(
|
|
21
|
-
size = size,
|
|
22
|
-
})
|
|
23
|
-
local tokens = pageRange(count, page, siblingCount, boundaryCount)
|
|
17
|
+
local styles = usePaginationStyles()
|
|
24
18
|
local _attributes = {}
|
|
25
19
|
local _condition = id
|
|
26
20
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
@@ -44,43 +38,30 @@ local function Pagination(props)
|
|
|
44
38
|
local _attributes_1 = table.clone(styles.list)
|
|
45
39
|
setmetatable(_attributes_1, nil)
|
|
46
40
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
41
|
+
local _exp_1 = pageRange(count)
|
|
47
42
|
-- ▼ ReadonlyArray.map ▼
|
|
48
|
-
local _newValue = table.create(#
|
|
49
|
-
local _callback = function(item
|
|
50
|
-
local
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
for _k, _v in styles.ellipsis do
|
|
56
|
-
_attributes_2[_k] = _v
|
|
57
|
-
end
|
|
58
|
-
_attributes_2.LayoutOrder = index
|
|
59
|
-
_result = (React.createElement("textlabel", _attributes_2))
|
|
60
|
-
else
|
|
61
|
-
local _attributes_2 = {
|
|
62
|
-
key = tostring(item),
|
|
63
|
-
}
|
|
64
|
-
for _k, _v in cx(styles.page, item == page and styles.selected) do
|
|
65
|
-
_attributes_2[_k] = _v
|
|
66
|
-
end
|
|
67
|
-
_attributes_2.Text = tostring(item)
|
|
68
|
-
_attributes_2.LayoutOrder = index
|
|
69
|
-
_attributes_2.Active = disabled ~= true
|
|
70
|
-
_attributes_2.Selectable = disabled ~= true
|
|
71
|
-
_attributes_2.Event = {
|
|
72
|
-
Activated = function()
|
|
73
|
-
return disabled ~= true and item ~= page and onChange(item)
|
|
74
|
-
end,
|
|
75
|
-
}
|
|
76
|
-
local _attributes_3 = table.clone(styles.corner)
|
|
77
|
-
setmetatable(_attributes_3, nil)
|
|
78
|
-
_result = (React.createElement("textbutton", _attributes_2, React.createElement("uicorner", _attributes_3)))
|
|
43
|
+
local _newValue = table.create(#_exp_1)
|
|
44
|
+
local _callback = function(item)
|
|
45
|
+
local _attributes_2 = {
|
|
46
|
+
key = tostring(item),
|
|
47
|
+
}
|
|
48
|
+
for _k, _v in cx(styles.page, item == page and styles.selected) do
|
|
49
|
+
_attributes_2[_k] = _v
|
|
79
50
|
end
|
|
80
|
-
|
|
51
|
+
_attributes_2.Text = tostring(item)
|
|
52
|
+
_attributes_2.Active = disabled ~= true
|
|
53
|
+
_attributes_2.Selectable = disabled ~= true
|
|
54
|
+
_attributes_2.Event = {
|
|
55
|
+
Activated = function()
|
|
56
|
+
return disabled ~= true and item ~= page and onChange(item)
|
|
57
|
+
end,
|
|
58
|
+
}
|
|
59
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
60
|
+
setmetatable(_attributes_3, nil)
|
|
61
|
+
return React.createElement("textbutton", _attributes_2, React.createElement("uicorner", _attributes_3))
|
|
81
62
|
end
|
|
82
|
-
for _k, _v in
|
|
83
|
-
_newValue[_k] = _callback(_v, _k - 1,
|
|
63
|
+
for _k, _v in _exp_1 do
|
|
64
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp_1)
|
|
84
65
|
end
|
|
85
66
|
-- ▲ ReadonlyArray.map ▲
|
|
86
67
|
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const usePaginationStyles: (props: {
|
|
3
|
-
size?: ControlSize;
|
|
4
|
-
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
1
|
+
declare const usePaginationStyles: () => import("../../../../theme/index").ClassNameMap<string>;
|
|
5
2
|
export default usePaginationStyles;
|
|
@@ -3,13 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local componentStyles = _theme.componentStyles
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
|
-
local usePaginationStyles = componentStyles("Pagination", function(theme
|
|
7
|
-
local size = _param.size
|
|
8
|
-
if size == nil then
|
|
9
|
-
size = "medium"
|
|
10
|
-
end
|
|
11
|
-
local box = if size == "small" then theme.spacing.calc(2.5) elseif size == "large" then theme.spacing.calc(4) else theme.spacing.calc(3)
|
|
12
|
-
local text = if size == "small" then theme.typography.fontSizes.caption elseif size == "large" then theme.typography.fontSizes.h6 else theme.typography.fontSizes.body
|
|
6
|
+
local usePaginationStyles = componentStyles("Pagination", function(theme)
|
|
13
7
|
return createStyles({
|
|
14
8
|
root = {
|
|
15
9
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -19,30 +13,21 @@ local usePaginationStyles = componentStyles("Pagination", function(theme, _param
|
|
|
19
13
|
},
|
|
20
14
|
list = {
|
|
21
15
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
22
|
-
Padding = UDim.new(0, theme.padding.calc(
|
|
16
|
+
Padding = UDim.new(0, theme.padding.calc(0.5)),
|
|
23
17
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
24
18
|
},
|
|
25
19
|
page = {
|
|
26
|
-
Size = UDim2.fromOffset(
|
|
20
|
+
Size = UDim2.fromOffset(theme.spacing.calc(3), theme.spacing.calc(3)),
|
|
27
21
|
BackgroundColor3 = theme.palette.surface.input,
|
|
28
22
|
BorderSizePixel = 0,
|
|
29
23
|
AutoButtonColor = false,
|
|
30
24
|
Font = theme.typography.fontFamilies.default,
|
|
31
|
-
TextSize =
|
|
25
|
+
TextSize = theme.typography.fontSizes.body,
|
|
32
26
|
TextColor3 = theme.palette.text.primary,
|
|
33
27
|
},
|
|
34
28
|
selected = {
|
|
35
29
|
BackgroundColor3 = theme.palette.action.selected,
|
|
36
30
|
},
|
|
37
|
-
ellipsis = {
|
|
38
|
-
Size = UDim2.fromOffset(box, box),
|
|
39
|
-
BackgroundTransparency = 1,
|
|
40
|
-
BorderSizePixel = 0,
|
|
41
|
-
Font = theme.typography.fontFamilies.default,
|
|
42
|
-
TextSize = text,
|
|
43
|
-
TextColor3 = theme.palette.text.secondary,
|
|
44
|
-
Text = "…",
|
|
45
|
-
},
|
|
46
31
|
corner = {
|
|
47
32
|
CornerRadius = UDim.new(1, 0),
|
|
48
33
|
},
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare function pageRange(count: number, page?: number, siblingCount?: number, boundaryCount?: number): PageToken[];
|
|
1
|
+
export declare function pageRange(count: number): number[];
|
|
@@ -1,106 +1,23 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local function pageRange(count
|
|
3
|
-
|
|
4
|
-
page = 1
|
|
5
|
-
end
|
|
6
|
-
if siblingCount == nil then
|
|
7
|
-
siblingCount = 1
|
|
8
|
-
end
|
|
9
|
-
if boundaryCount == nil then
|
|
10
|
-
boundaryCount = 1
|
|
11
|
-
end
|
|
12
|
-
local total = math.max(0, math.floor(count))
|
|
13
|
-
if total == 0 then
|
|
14
|
-
return {}
|
|
15
|
-
end
|
|
16
|
-
local current = math.clamp(math.floor(page), 1, total)
|
|
17
|
-
local siblings = math.max(0, math.floor(siblingCount))
|
|
18
|
-
local boundaries = math.max(0, math.floor(boundaryCount))
|
|
19
|
-
local rangeLength = boundaries * 2 + siblings * 2 + 3
|
|
20
|
-
if total <= rangeLength then
|
|
21
|
-
local all = {}
|
|
22
|
-
do
|
|
23
|
-
local i = 1
|
|
24
|
-
local _shouldIncrement = false
|
|
25
|
-
while true do
|
|
26
|
-
if _shouldIncrement then
|
|
27
|
-
i += 1
|
|
28
|
-
else
|
|
29
|
-
_shouldIncrement = true
|
|
30
|
-
end
|
|
31
|
-
if not (i <= total) then
|
|
32
|
-
break
|
|
33
|
-
end
|
|
34
|
-
local _i = i
|
|
35
|
-
table.insert(all, _i)
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
return all
|
|
39
|
-
end
|
|
40
|
-
local startFrom = math.max(current - siblings, boundaries + 2)
|
|
41
|
-
local endAt = math.min(current + siblings, total - (boundaries + 1))
|
|
42
|
-
local tokens = {}
|
|
43
|
-
do
|
|
44
|
-
local i = 1
|
|
45
|
-
local _shouldIncrement = false
|
|
46
|
-
while true do
|
|
47
|
-
if _shouldIncrement then
|
|
48
|
-
i += 1
|
|
49
|
-
else
|
|
50
|
-
_shouldIncrement = true
|
|
51
|
-
end
|
|
52
|
-
if not (i <= boundaries) then
|
|
53
|
-
break
|
|
54
|
-
end
|
|
55
|
-
local _i = i
|
|
56
|
-
table.insert(tokens, _i)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
if startFrom > boundaries + 2 then
|
|
60
|
-
table.insert(tokens, "ellipsis")
|
|
61
|
-
elseif boundaries + 1 < startFrom then
|
|
62
|
-
local _arg0 = boundaries + 1
|
|
63
|
-
table.insert(tokens, _arg0)
|
|
64
|
-
end
|
|
65
|
-
do
|
|
66
|
-
local i = startFrom
|
|
67
|
-
local _shouldIncrement = false
|
|
68
|
-
while true do
|
|
69
|
-
if _shouldIncrement then
|
|
70
|
-
i += 1
|
|
71
|
-
else
|
|
72
|
-
_shouldIncrement = true
|
|
73
|
-
end
|
|
74
|
-
if not (i <= endAt) then
|
|
75
|
-
break
|
|
76
|
-
end
|
|
77
|
-
local _i = i
|
|
78
|
-
table.insert(tokens, _i)
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
if endAt < total - (boundaries + 1) then
|
|
82
|
-
table.insert(tokens, "ellipsis")
|
|
83
|
-
elseif endAt + 1 < total - boundaries + 1 then
|
|
84
|
-
local _arg0 = endAt + 1
|
|
85
|
-
table.insert(tokens, _arg0)
|
|
86
|
-
end
|
|
2
|
+
local function pageRange(count)
|
|
3
|
+
local pages = {}
|
|
87
4
|
do
|
|
88
|
-
local
|
|
5
|
+
local page = 1
|
|
89
6
|
local _shouldIncrement = false
|
|
90
7
|
while true do
|
|
91
8
|
if _shouldIncrement then
|
|
92
|
-
|
|
9
|
+
page += 1
|
|
93
10
|
else
|
|
94
11
|
_shouldIncrement = true
|
|
95
12
|
end
|
|
96
|
-
if not (
|
|
13
|
+
if not (page <= math.max(0, math.floor(count))) then
|
|
97
14
|
break
|
|
98
15
|
end
|
|
99
|
-
local
|
|
100
|
-
table.insert(
|
|
16
|
+
local _page = page
|
|
17
|
+
table.insert(pages, _page)
|
|
101
18
|
end
|
|
102
19
|
end
|
|
103
|
-
return
|
|
20
|
+
return pages
|
|
104
21
|
end
|
|
105
22
|
return {
|
|
106
23
|
pageRange = pageRange,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
export type PaperElevation = "flat" | "raised"
|
|
2
|
+
export type PaperElevation = "flat" | "raised";
|
|
3
3
|
export interface PaperProps {
|
|
4
4
|
elevation?: PaperElevation;
|
|
5
|
-
square?: boolean;
|
|
6
5
|
children?: React.ReactNode;
|
|
7
6
|
}
|
|
8
7
|
declare function Paper(props: PaperProps): JSX.Element;
|
|
@@ -8,7 +8,6 @@ local function Paper(props)
|
|
|
8
8
|
if elevation == nil then
|
|
9
9
|
elevation = "flat"
|
|
10
10
|
end
|
|
11
|
-
local square = _binding.square
|
|
12
11
|
local children = _binding.children
|
|
13
12
|
local styles = usePaperStyles({
|
|
14
13
|
elevation = elevation,
|
|
@@ -22,19 +21,9 @@ local function Paper(props)
|
|
|
22
21
|
local _attributes_1 = table.clone(styles.padding)
|
|
23
22
|
setmetatable(_attributes_1, nil)
|
|
24
23
|
local _exp = React.createElement("uipadding", _attributes_1)
|
|
25
|
-
local
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
setmetatable(_attributes_2, nil)
|
|
29
|
-
_condition = React.createElement("uicorner", _attributes_2)
|
|
30
|
-
end
|
|
31
|
-
local _condition_1 = elevation == "outlined"
|
|
32
|
-
if _condition_1 then
|
|
33
|
-
local _attributes_2 = table.clone(styles.stroke)
|
|
34
|
-
setmetatable(_attributes_2, nil)
|
|
35
|
-
_condition_1 = React.createElement("uistroke", _attributes_2)
|
|
36
|
-
end
|
|
37
|
-
return React.createElement("frame", _attributes, _exp, _condition, _condition_1, children)
|
|
24
|
+
local _attributes_2 = table.clone(styles.corner)
|
|
25
|
+
setmetatable(_attributes_2, nil)
|
|
26
|
+
return React.createElement("frame", _attributes, _exp, React.createElement("uicorner", _attributes_2), children)
|
|
38
27
|
end
|
|
39
28
|
local default = Paper
|
|
40
29
|
return {
|
|
@@ -15,12 +15,6 @@ local usePaperStyles = componentStyles("Paper", function(theme, _param)
|
|
|
15
15
|
BackgroundColor3 = if elevation == "raised" then theme.palette.surface.elevated else theme.palette.surface.paper,
|
|
16
16
|
BorderSizePixel = 0,
|
|
17
17
|
},
|
|
18
|
-
stroke = {
|
|
19
|
-
Color = theme.palette.border,
|
|
20
|
-
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
21
|
-
Thickness = 1,
|
|
22
|
-
Transparency = 0,
|
|
23
|
-
},
|
|
24
18
|
padding = {
|
|
25
19
|
PaddingTop = UDim.new(0, theme.padding.calc(2)),
|
|
26
20
|
PaddingBottom = UDim.new(0, theme.padding.calc(2)),
|
|
@@ -2,4 +2,3 @@ export { default as Popup } from "./components/Popup";
|
|
|
2
2
|
export { PopupProps } from "./components/Popup";
|
|
3
3
|
export { default as Portal } from "./components/Portal";
|
|
4
4
|
export { PortalProps } from "./components/Portal";
|
|
5
|
-
export { portalTarget } from "./components/portalTarget";
|
|
@@ -3,5 +3,4 @@ local TS = _G[script]
|
|
|
3
3
|
local exports = {}
|
|
4
4
|
exports.Popup = TS.import(script, script, "components", "Popup").default
|
|
5
5
|
exports.Portal = TS.import(script, script, "components", "Portal").default
|
|
6
|
-
exports.portalTarget = TS.import(script, script, "components", "portalTarget").portalTarget
|
|
7
6
|
return exports
|
|
@@ -11,7 +11,6 @@ export interface RadioGroupProps<T> {
|
|
|
11
11
|
onChange: (value: T) => void;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
size?: ControlSize;
|
|
14
|
-
row?: boolean;
|
|
15
14
|
}
|
|
16
15
|
declare function RadioGroup<T>(props: CustomizedProps<Frame, RadioGroupProps<T>>): JSX.Element;
|
|
17
16
|
export default RadioGroup;
|
|
@@ -10,19 +10,17 @@ local function RadioGroup(props)
|
|
|
10
10
|
local onChange = _binding.onChange
|
|
11
11
|
local disabled = _binding.disabled
|
|
12
12
|
local size = _binding.size
|
|
13
|
-
local row = _binding.row
|
|
14
13
|
local className = _binding.className
|
|
15
14
|
local sx = _binding.sx
|
|
16
15
|
local id = _binding.id
|
|
17
16
|
local ref = _binding.ref
|
|
18
17
|
local _binding_1 = useRadioGroupStyles({
|
|
19
18
|
size = size,
|
|
20
|
-
row = row,
|
|
21
19
|
})
|
|
22
20
|
local root = _binding_1.root
|
|
23
21
|
local list = _binding_1.list
|
|
24
22
|
local option = _binding_1.option
|
|
25
|
-
local
|
|
23
|
+
local row = _binding_1.row
|
|
26
24
|
local ring = _binding_1.ring
|
|
27
25
|
local dot = _binding_1.dot
|
|
28
26
|
local stroke = _binding_1.stroke
|
|
@@ -72,7 +70,7 @@ local function RadioGroup(props)
|
|
|
72
70
|
end
|
|
73
71
|
end,
|
|
74
72
|
}
|
|
75
|
-
local _attributes_3 = table.clone(
|
|
73
|
+
local _attributes_3 = table.clone(row)
|
|
76
74
|
setmetatable(_attributes_3, nil)
|
|
77
75
|
local _exp_1 = React.createElement("uilistlayout", _attributes_3)
|
|
78
76
|
local _attributes_4 = table.clone(ring)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ControlSize } from "../../../../theme/index";
|
|
2
2
|
export interface RadioGroupStyleProps {
|
|
3
3
|
size?: ControlSize;
|
|
4
|
-
row?: boolean;
|
|
5
4
|
}
|
|
6
5
|
declare const useRadioGroupStyles: (props: RadioGroupStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
7
6
|
export default useRadioGroupStyles;
|
|
@@ -6,7 +6,6 @@ local createStyles = _theme.createStyles
|
|
|
6
6
|
local componentStyles = _theme.componentStyles
|
|
7
7
|
local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param)
|
|
8
8
|
local size = _param.size
|
|
9
|
-
local row = _param.row
|
|
10
9
|
local metrics = controlMetrics(theme.density, size)
|
|
11
10
|
return createStyles({
|
|
12
11
|
root = {
|
|
@@ -16,10 +15,8 @@ local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param
|
|
|
16
15
|
BorderSizePixel = 0,
|
|
17
16
|
},
|
|
18
17
|
list = {
|
|
19
|
-
FillDirection = if row == true then Enum.FillDirection.Horizontal else Enum.FillDirection.Vertical,
|
|
20
18
|
Padding = UDim.new(0, theme.padding.default),
|
|
21
19
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
22
|
-
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
23
20
|
},
|
|
24
21
|
option = {
|
|
25
22
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -28,7 +25,7 @@ local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param
|
|
|
28
25
|
BorderSizePixel = 0,
|
|
29
26
|
Text = "",
|
|
30
27
|
},
|
|
31
|
-
|
|
28
|
+
row = {
|
|
32
29
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
33
30
|
Padding = UDim.new(0, theme.padding.default),
|
|
34
31
|
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "@rbxts/react";
|
|
2
1
|
import { ControlSize, CustomizedProps } from "../../../../theme/index";
|
|
3
2
|
import { ChoiceOption } from "../../radioGroup/index";
|
|
4
3
|
export interface SelectProps<T> {
|
|
@@ -10,10 +9,6 @@ export interface SelectProps<T> {
|
|
|
10
9
|
loading?: boolean;
|
|
11
10
|
placeholder?: string;
|
|
12
11
|
searchable?: boolean;
|
|
13
|
-
defaultOpen?: boolean;
|
|
14
|
-
defaultQuery?: string;
|
|
15
|
-
emptyText?: string;
|
|
16
|
-
empty?: React.Element;
|
|
17
12
|
reducedMotion?: boolean;
|
|
18
13
|
size?: ControlSize;
|
|
19
14
|
}
|
|
@@ -20,9 +20,7 @@ local Input = TS.import(script, script.Parent.Parent.Parent, "input").Input
|
|
|
20
20
|
local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion").playProperty
|
|
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
|
|
24
|
-
local EmptyListHint = _virtualList.EmptyListHint
|
|
25
|
-
local VirtualList = _virtualList.VirtualList
|
|
23
|
+
local VirtualList = TS.import(script, script.Parent.Parent.Parent, "virtualList").VirtualList
|
|
26
24
|
local useSelectStyles = TS.import(script, script.Parent, "Select.styles").default
|
|
27
25
|
local optionLabel = TS.import(script, script.Parent, "optionLabel").optionLabel
|
|
28
26
|
local _selectFilter = TS.import(script, script.Parent, "selectFilter")
|
|
@@ -55,10 +53,6 @@ local function Select(props)
|
|
|
55
53
|
placeholder = ""
|
|
56
54
|
end
|
|
57
55
|
local searchable = _binding.searchable
|
|
58
|
-
local defaultOpen = _binding.defaultOpen
|
|
59
|
-
local defaultQuery = _binding.defaultQuery
|
|
60
|
-
local emptyText = _binding.emptyText
|
|
61
|
-
local empty = _binding.empty
|
|
62
56
|
local reducedProp = _binding.reducedMotion
|
|
63
57
|
local size = _binding.size
|
|
64
58
|
local className = _binding.className
|
|
@@ -74,15 +68,11 @@ local function Select(props)
|
|
|
74
68
|
local row = controlMetrics(theme.density, size).height
|
|
75
69
|
local active = canActivate(disabled, loading)
|
|
76
70
|
local anchor, setAnchor = useState()
|
|
77
|
-
local open, setOpen = useState(
|
|
71
|
+
local open, setOpen = useState(false)
|
|
78
72
|
local held, setHeld = useState(false)
|
|
79
73
|
local focused, setFocused = useState(false)
|
|
80
74
|
local highlight, setHighlight = useState(-1)
|
|
81
|
-
local
|
|
82
|
-
if _condition == nil then
|
|
83
|
-
_condition = ""
|
|
84
|
-
end
|
|
85
|
-
local query, setQuery = useState(_condition)
|
|
75
|
+
local query, setQuery = useState("")
|
|
86
76
|
local recent = useRef()
|
|
87
77
|
local typed = useRef()
|
|
88
78
|
local onKeyRef = useRef()
|
|
@@ -105,20 +95,7 @@ local function Select(props)
|
|
|
105
95
|
local search = usesSelectSearch(#options, searchable)
|
|
106
96
|
local filtered = filterChoices(options, query)
|
|
107
97
|
local rows = groupRows(filtered)
|
|
108
|
-
local
|
|
109
|
-
local menuHeight = listHeight + (if search then row else 0)
|
|
110
|
-
local _condition_1 = empty
|
|
111
|
-
if _condition_1 == nil then
|
|
112
|
-
local _attributes = {}
|
|
113
|
-
local _condition_2 = emptyText
|
|
114
|
-
if _condition_2 == nil then
|
|
115
|
-
_condition_2 = (if #query > 0 or #options > 0 then "No results" else "No options")
|
|
116
|
-
end
|
|
117
|
-
_attributes.text = _condition_2
|
|
118
|
-
_attributes.height = row
|
|
119
|
-
_condition_1 = (React.createElement(EmptyListHint, _attributes))
|
|
120
|
-
end
|
|
121
|
-
local emptyHint = _condition_1
|
|
98
|
+
local menuHeight = math.min(#rows * row, theme.spacing.calc(16)) + (if search then row else 0)
|
|
122
99
|
local close = function()
|
|
123
100
|
setOpen(false)
|
|
124
101
|
setQuery("")
|
|
@@ -148,15 +125,15 @@ local function Select(props)
|
|
|
148
125
|
if fromPointer == nil then
|
|
149
126
|
fromPointer = false
|
|
150
127
|
end
|
|
151
|
-
local
|
|
152
|
-
if
|
|
128
|
+
local _condition = fromPointer
|
|
129
|
+
if _condition then
|
|
153
130
|
local _result_1 = listRef.current
|
|
154
131
|
if _result_1 ~= nil then
|
|
155
132
|
_result_1 = _result_1.suppressClick()
|
|
156
133
|
end
|
|
157
|
-
|
|
134
|
+
_condition = _result_1
|
|
158
135
|
end
|
|
159
|
-
if
|
|
136
|
+
if _condition then
|
|
160
137
|
return nil
|
|
161
138
|
end
|
|
162
139
|
local choice = filtered[index + 1]
|
|
@@ -277,11 +254,11 @@ local function Select(props)
|
|
|
277
254
|
end
|
|
278
255
|
end, { shown, held, reducedMotion })
|
|
279
256
|
local _attributes = {}
|
|
280
|
-
local
|
|
281
|
-
if not (
|
|
282
|
-
|
|
257
|
+
local _condition = id
|
|
258
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
259
|
+
_condition = "Select"
|
|
283
260
|
end
|
|
284
|
-
_attributes.key =
|
|
261
|
+
_attributes.key = _condition
|
|
285
262
|
_attributes.ref = ref
|
|
286
263
|
for _k, _v in styles.root do
|
|
287
264
|
_attributes[_k] = _v
|
|
@@ -313,11 +290,11 @@ local function Select(props)
|
|
|
313
290
|
if _result_2 ~= nil then
|
|
314
291
|
_result_2 = _result_2.label
|
|
315
292
|
end
|
|
316
|
-
local
|
|
317
|
-
if
|
|
318
|
-
|
|
293
|
+
local _condition_1 = _result_2
|
|
294
|
+
if _condition_1 == nil then
|
|
295
|
+
_condition_1 = placeholder
|
|
319
296
|
end
|
|
320
|
-
_result_1 =
|
|
297
|
+
_result_1 = _condition_1
|
|
321
298
|
end
|
|
322
299
|
_attributes_1.Text = _result_1
|
|
323
300
|
_attributes_1.Active = active
|
|
@@ -360,8 +337,8 @@ local function Select(props)
|
|
|
360
337
|
Position = UDim2.new(1, -theme.padding.calc(1), 0.5, 0),
|
|
361
338
|
},
|
|
362
339
|
})))
|
|
363
|
-
local
|
|
364
|
-
if
|
|
340
|
+
local _condition_1 = (shown or held)
|
|
341
|
+
if _condition_1 then
|
|
365
342
|
local _attributes_5 = {
|
|
366
343
|
key = "Menu",
|
|
367
344
|
}
|
|
@@ -379,8 +356,8 @@ local function Select(props)
|
|
|
379
356
|
FillDirection = Enum.FillDirection.Vertical,
|
|
380
357
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
381
358
|
})
|
|
382
|
-
local
|
|
383
|
-
if
|
|
359
|
+
local _condition_2 = search
|
|
360
|
+
if _condition_2 then
|
|
384
361
|
local _attributes_8 = {
|
|
385
362
|
key = "Search",
|
|
386
363
|
}
|
|
@@ -388,7 +365,7 @@ local function Select(props)
|
|
|
388
365
|
_attributes_8[_k] = _v
|
|
389
366
|
end
|
|
390
367
|
_attributes_8.LayoutOrder = 1
|
|
391
|
-
|
|
368
|
+
_condition_2 = (React.createElement("frame", _attributes_8, React.createElement(Input, {
|
|
392
369
|
text = query,
|
|
393
370
|
placeholder = "Search",
|
|
394
371
|
width = UDim.new(1, 0),
|
|
@@ -398,7 +375,7 @@ local function Select(props)
|
|
|
398
375
|
end,
|
|
399
376
|
})))
|
|
400
377
|
end
|
|
401
|
-
|
|
378
|
+
_condition_1 = (React.createElement(Popup, {
|
|
402
379
|
anchor = anchor,
|
|
403
380
|
preferredHeight = menuHeight,
|
|
404
381
|
onDismiss = close,
|
|
@@ -410,7 +387,7 @@ local function Select(props)
|
|
|
410
387
|
Size = UDim2.fromScale(1, 1),
|
|
411
388
|
BackgroundTransparency = 1,
|
|
412
389
|
GroupTransparency = 1,
|
|
413
|
-
}, React.createElement("frame", _attributes_5, _exp_3, _exp_4, _exp_5, _exp_6,
|
|
390
|
+
}, React.createElement("frame", _attributes_5, _exp_3, _exp_4, _exp_5, _exp_6, _condition_2, React.createElement("frame", {
|
|
414
391
|
key = "ListHost",
|
|
415
392
|
Size = UDim2.new(1, 0, 1, if search then -row else 0),
|
|
416
393
|
BackgroundTransparency = 1,
|
|
@@ -423,7 +400,6 @@ local function Select(props)
|
|
|
423
400
|
end,
|
|
424
401
|
itemHeight = row,
|
|
425
402
|
listRef = listRef,
|
|
426
|
-
empty = emptyHint,
|
|
427
403
|
className = styles.list,
|
|
428
404
|
renderItem = function(row)
|
|
429
405
|
if row.kind == "header" then
|
|
@@ -471,7 +447,7 @@ local function Select(props)
|
|
|
471
447
|
end,
|
|
472
448
|
}))))))
|
|
473
449
|
end
|
|
474
|
-
return React.createElement("frame", _attributes, _exp_2,
|
|
450
|
+
return React.createElement("frame", _attributes, _exp_2, _condition_1)
|
|
475
451
|
end
|
|
476
452
|
local default = Select
|
|
477
453
|
return {
|