@rbxts/uiblox 0.2.0-alpha.2 → 0.2.0-alpha.20
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 +2 -0
- package/out/theme/constants/NumberConstants.d.ts +2 -0
- package/out/theme/constants/NumberConstants.luau +3 -0
- package/out/theme/interfaces/spacing/Shape.d.ts +3 -0
- package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +15 -8
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +3 -0
- package/out/theme/interfaces/typography/Variants.d.ts +14 -15
- package/out/theme/interfaces/typography/Variants.luau +68 -18
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
- package/out/ui/packages/accordion/components/Accordion.luau +36 -16
- 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 +40 -27
- 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 +5 -0
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +6 -2
- 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 +20 -12
- 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 +58 -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 +23 -8
- 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 +8 -2
- 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 +58 -24
- 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/brickColorCatalog.luau +1 -1
- package/out/ui/packages/button/components/Button.luau +9 -5
- package/out/ui/packages/card/components/Card.d.ts +1 -0
- package/out/ui/packages/card/components/Card.luau +2 -0
- 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 +49 -2
- package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +55 -10
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +13 -2
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
- package/out/ui/packages/dialog/components/Dialog.luau +27 -18
- package/out/ui/packages/divider/components/Divider.d.ts +1 -0
- package/out/ui/packages/divider/components/Divider.luau +48 -0
- package/out/ui/packages/divider/components/Divider.styles.luau +29 -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 +1 -0
- package/out/ui/packages/drawer/components/Drawer.luau +4 -1
- 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 +62 -25
- package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +33 -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/formText/components/FormHelperText.d.ts +8 -0
- package/out/ui/packages/formText/components/FormHelperText.luau +44 -0
- package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
- package/out/ui/packages/formText/components/FormLabel.luau +46 -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/iconButton/components/IconButton.luau +7 -2
- 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 +100 -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 +7 -0
- package/out/ui/packages/init.luau +21 -0
- package/out/ui/packages/input/components/Input.d.ts +1 -0
- package/out/ui/packages/input/components/Input.luau +8 -3
- package/out/ui/packages/layout/components/Box.d.ts +11 -0
- package/out/ui/packages/layout/components/Box.luau +49 -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 +54 -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/Grid.d.ts +1 -1
- package/out/ui/packages/layout/components/Stack.d.ts +12 -0
- package/out/ui/packages/layout/components/Stack.luau +49 -0
- package/out/ui/packages/layout/components/Stack.styles.d.ts +8 -0
- package/out/ui/packages/layout/components/Stack.styles.luau +72 -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/stackAlign.d.ts +8 -0
- package/out/ui/packages/layout/components/stackAlign.luau +29 -0
- package/out/ui/packages/layout/index.d.ts +10 -0
- package/out/ui/packages/layout/init.luau +4 -0
- package/out/ui/packages/link/components/Link.d.ts +11 -0
- package/out/ui/packages/link/components/Link.luau +83 -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 +2 -0
- package/out/ui/packages/listItem/components/ListItem.luau +22 -1
- 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 +2 -0
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
- package/out/ui/packages/menu/components/Menu.d.ts +5 -0
- package/out/ui/packages/menu/components/Menu.luau +54 -23
- package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
- package/out/ui/packages/modal/components/Modal.d.ts +1 -1
- package/out/ui/packages/modal/components/Modal.luau +55 -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 +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +2 -0
- package/out/ui/packages/pagination/components/Pagination.d.ts +4 -1
- package/out/ui/packages/pagination/components/Pagination.luau +41 -22
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +4 -1
- package/out/ui/packages/pagination/components/Pagination.styles.luau +19 -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 +2 -1
- package/out/ui/packages/paper/components/Paper.luau +14 -3
- 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/popup/index.d.ts +1 -0
- package/out/ui/packages/popup/init.luau +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +4 -2
- 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 +101 -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/select/components/Select.d.ts +5 -0
- package/out/ui/packages/select/components/Select.luau +48 -24
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/skeleton/components/Skeleton.luau +3 -2
- 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 +32 -3
- 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 +101 -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/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +2 -0
- package/out/ui/packages/stateMatrix.luau +809 -252
- package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
- package/out/ui/packages/stepper/components/Stepper.luau +7 -1
- 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 +5 -0
- package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
- package/out/ui/packages/switch/components/Switch.styles.luau +7 -2
- 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 +4 -1
- 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 +12 -3
- 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 +26 -1
- package/out/ui/packages/toast/components/Toast.styles.luau +22 -4
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +19 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +135 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +7 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +65 -0
- package/out/ui/packages/toggleButton/index.d.ts +2 -0
- package/out/ui/packages/toggleButton/init.luau +7 -0
- package/out/ui/packages/typography/components/Typography.styles.luau +4 -5
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +6 -0
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +32 -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/index.d.ts +2 -0
- package/out/ui/packages/virtualList/init.luau +1 -0
- package/package.json +2 -2
|
@@ -3,7 +3,8 @@ 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 useDrawerStyles = componentStyles("Drawer", function(theme)
|
|
6
|
+
local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
|
|
7
|
+
local width = _param.width
|
|
7
8
|
return createStyles({
|
|
8
9
|
root = {
|
|
9
10
|
Size = UDim2.fromScale(1, 1),
|
|
@@ -21,7 +22,7 @@ local useDrawerStyles = componentStyles("Drawer", function(theme)
|
|
|
21
22
|
ZIndex = 30000,
|
|
22
23
|
},
|
|
23
24
|
panel = {
|
|
24
|
-
Size = UDim2.new(0, theme.spacing.calc(20), 1, 0),
|
|
25
|
+
Size = UDim2.new(0, if width ~= nil and width > 0 then width else theme.spacing.calc(20), 1, 0),
|
|
25
26
|
BackgroundColor3 = theme.palette.surface.elevated,
|
|
26
27
|
BorderSizePixel = 0,
|
|
27
28
|
ZIndex = 30001,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
import { Icons } from "../../../enums/index";
|
|
3
3
|
import { FabSize } from "./fabSize";
|
|
4
|
+
import { FabColor } from "./Fab.styles";
|
|
4
5
|
export interface FabProps {
|
|
5
6
|
icon: Icons;
|
|
7
|
+
label?: string;
|
|
6
8
|
size?: FabSize;
|
|
9
|
+
color?: FabColor;
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
loading?: boolean;
|
|
9
12
|
reducedMotion?: boolean;
|
|
@@ -8,15 +8,22 @@ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "t
|
|
|
8
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
9
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
10
10
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
11
|
-
local
|
|
11
|
+
local _fabSize = TS.import(script, script.Parent, "fabSize")
|
|
12
|
+
local fabExtended = _fabSize.fabExtended
|
|
13
|
+
local fabIconPixels = _fabSize.fabIconPixels
|
|
12
14
|
local useFabStyles = TS.import(script, script.Parent, "Fab.styles").default
|
|
13
15
|
local function Fab(props)
|
|
14
16
|
local _binding = props
|
|
15
17
|
local icon = _binding.icon
|
|
18
|
+
local label = _binding.label
|
|
16
19
|
local size = _binding.size
|
|
17
20
|
if size == nil then
|
|
18
21
|
size = "medium"
|
|
19
22
|
end
|
|
23
|
+
local color = _binding.color
|
|
24
|
+
if color == nil then
|
|
25
|
+
color = "primary"
|
|
26
|
+
end
|
|
20
27
|
local disabled = _binding.disabled
|
|
21
28
|
local loading = _binding.loading
|
|
22
29
|
if loading == nil then
|
|
@@ -29,9 +36,12 @@ local function Fab(props)
|
|
|
29
36
|
local id = _binding.id
|
|
30
37
|
local ref = _binding.ref
|
|
31
38
|
local active = canActivate(disabled, loading)
|
|
39
|
+
local extended = fabExtended(label)
|
|
32
40
|
local styles = useFabStyles({
|
|
33
41
|
size = size,
|
|
42
|
+
color = color,
|
|
34
43
|
disabled = not active,
|
|
44
|
+
extended = extended,
|
|
35
45
|
})
|
|
36
46
|
local _binding_1 = useTheme()
|
|
37
47
|
local theme = _binding_1.theme
|
|
@@ -45,6 +55,34 @@ local function Fab(props)
|
|
|
45
55
|
setHovering(false)
|
|
46
56
|
setFocused(false)
|
|
47
57
|
end, { active })
|
|
58
|
+
local _result
|
|
59
|
+
if loading then
|
|
60
|
+
_result = (React.createElement(CircularProgress, {
|
|
61
|
+
size = iconPx,
|
|
62
|
+
thickness = 2,
|
|
63
|
+
color = theme.palette.primary.on,
|
|
64
|
+
reducedMotion = reducedMotion,
|
|
65
|
+
className = if extended then {
|
|
66
|
+
LayoutOrder = 1,
|
|
67
|
+
} else {
|
|
68
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
69
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
70
|
+
},
|
|
71
|
+
}))
|
|
72
|
+
else
|
|
73
|
+
local _attributes = {
|
|
74
|
+
key = "Icon",
|
|
75
|
+
}
|
|
76
|
+
for _k, _v in styles.icon do
|
|
77
|
+
_attributes[_k] = _v
|
|
78
|
+
end
|
|
79
|
+
_attributes.Size = UDim2.fromOffset(iconPx, iconPx)
|
|
80
|
+
_attributes.AnchorPoint = if extended then Vector2.new(0, 0) else Vector2.new(0.5, 0.5)
|
|
81
|
+
_attributes.Position = if extended then UDim2.fromScale(0, 0) else UDim2.fromScale(0.5, 0.5)
|
|
82
|
+
_attributes.Image = tostring(icon)
|
|
83
|
+
_result = (React.createElement("imagelabel", _attributes))
|
|
84
|
+
end
|
|
85
|
+
local iconEl = _result
|
|
48
86
|
local _attributes = {}
|
|
49
87
|
local _condition = id
|
|
50
88
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
@@ -95,32 +133,31 @@ local function Fab(props)
|
|
|
95
133
|
setmetatable(_attributes_1, nil)
|
|
96
134
|
local _exp = React.createElement("uicorner", _attributes_1)
|
|
97
135
|
local _exp_1 = React.createElement(Shadow)
|
|
98
|
-
local
|
|
99
|
-
if
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
136
|
+
local _result_1
|
|
137
|
+
if extended then
|
|
138
|
+
local _attributes_2 = table.clone(styles.padding)
|
|
139
|
+
setmetatable(_attributes_2, nil)
|
|
140
|
+
local _exp_2 = React.createElement("uipadding", _attributes_2)
|
|
141
|
+
local _attributes_3 = table.clone(styles.row)
|
|
142
|
+
setmetatable(_attributes_3, nil)
|
|
143
|
+
local _exp_3 = React.createElement("uilistlayout", _attributes_3)
|
|
144
|
+
local _exp_4 = iconEl
|
|
145
|
+
local _condition_1 = not loading
|
|
146
|
+
if _condition_1 then
|
|
147
|
+
local _attributes_4 = {
|
|
148
|
+
key = "Label",
|
|
149
|
+
}
|
|
150
|
+
for _k, _v in styles.label do
|
|
151
|
+
_attributes_4[_k] = _v
|
|
152
|
+
end
|
|
153
|
+
_attributes_4.Text = label
|
|
154
|
+
_condition_1 = React.createElement("textlabel", _attributes_4)
|
|
116
155
|
end
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
_attributes_2.Image = tostring(icon)
|
|
121
|
-
_result = (React.createElement("imagelabel", _attributes_2))
|
|
156
|
+
_result_1 = (React.createElement(React.Fragment, nil, _exp_2, _exp_3, _exp_4, _condition_1))
|
|
157
|
+
else
|
|
158
|
+
_result_1 = iconEl
|
|
122
159
|
end
|
|
123
|
-
return React.createElement("textbutton", _attributes, _exp, _exp_1,
|
|
160
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, _result_1)
|
|
124
161
|
end
|
|
125
162
|
local default = Fab
|
|
126
163
|
return {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { FabSize } from "./fabSize";
|
|
2
|
+
export type FabColor = "primary" | "accent";
|
|
2
3
|
export interface FabStyleProps {
|
|
3
4
|
size?: FabSize;
|
|
5
|
+
color?: FabColor;
|
|
4
6
|
disabled?: boolean;
|
|
7
|
+
extended?: boolean;
|
|
5
8
|
}
|
|
6
9
|
declare const useFabStyles: (props: FabStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
7
10
|
export default useFabStyles;
|
|
@@ -9,12 +9,19 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
9
9
|
if size == nil then
|
|
10
10
|
size = "medium"
|
|
11
11
|
end
|
|
12
|
+
local color = _param.color
|
|
13
|
+
if color == nil then
|
|
14
|
+
color = "primary"
|
|
15
|
+
end
|
|
12
16
|
local disabled = _param.disabled
|
|
17
|
+
local extended = _param.extended
|
|
13
18
|
local diameter = fabPixels(size)
|
|
19
|
+
local tone = if color == "accent" then theme.palette.accent else theme.palette.primary
|
|
14
20
|
return createStyles({
|
|
15
21
|
root = {
|
|
16
|
-
Size = UDim2.fromOffset(diameter, diameter),
|
|
17
|
-
|
|
22
|
+
Size = if extended == true then UDim2.new(0, 0, 0, diameter) else UDim2.fromOffset(diameter, diameter),
|
|
23
|
+
AutomaticSize = if extended == true then Enum.AutomaticSize.X else Enum.AutomaticSize.None,
|
|
24
|
+
BackgroundColor3 = tone.main,
|
|
18
25
|
BackgroundTransparency = if disabled then 0.5 else 0,
|
|
19
26
|
BorderSizePixel = 0,
|
|
20
27
|
AutoButtonColor = false,
|
|
@@ -24,13 +31,36 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
|
24
31
|
corner = {
|
|
25
32
|
CornerRadius = UDim.new(1, 0),
|
|
26
33
|
},
|
|
34
|
+
padding = {
|
|
35
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(2)),
|
|
36
|
+
PaddingRight = UDim.new(0, theme.padding.calc(2.5)),
|
|
37
|
+
},
|
|
38
|
+
row = {
|
|
39
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
40
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
41
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Center,
|
|
42
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
43
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
44
|
+
},
|
|
27
45
|
icon = {
|
|
28
46
|
Size = UDim2.fromScale(1, 1),
|
|
29
47
|
BackgroundTransparency = 1,
|
|
30
48
|
BorderSizePixel = 0,
|
|
31
49
|
ScaleType = Enum.ScaleType.Fit,
|
|
32
|
-
ImageColor3 =
|
|
50
|
+
ImageColor3 = tone.on,
|
|
33
51
|
ImageTransparency = if disabled then 0.5 else 0,
|
|
52
|
+
LayoutOrder = 1,
|
|
53
|
+
},
|
|
54
|
+
label = {
|
|
55
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
56
|
+
Size = UDim2.fromScale(0, 0),
|
|
57
|
+
BackgroundTransparency = 1,
|
|
58
|
+
BorderSizePixel = 0,
|
|
59
|
+
Font = theme.typography.fontFamilies.default,
|
|
60
|
+
TextSize = theme.typography.fontSizes.body,
|
|
61
|
+
TextColor3 = tone.on,
|
|
62
|
+
TextTransparency = if disabled then 0.5 else 0,
|
|
63
|
+
LayoutOrder = 2,
|
|
34
64
|
},
|
|
35
65
|
})
|
|
36
66
|
end)
|
|
@@ -5,4 +5,5 @@ exports.Fab = TS.import(script, script, "components", "Fab").default
|
|
|
5
5
|
local _fabSize = TS.import(script, script, "components", "fabSize")
|
|
6
6
|
exports.fabPixels = _fabSize.fabPixels
|
|
7
7
|
exports.fabIconPixels = _fabSize.fabIconPixels
|
|
8
|
+
exports.fabExtended = _fabSize.fabExtended
|
|
8
9
|
return exports
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface FormHelperTextProps {
|
|
3
|
+
text: string;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function FormHelperText(props: CustomizedProps<TextLabel, FormHelperTextProps>): JSX.Element;
|
|
8
|
+
export default FormHelperText;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local useFormTextStyles = TS.import(script, script.Parent, "FormText.styles").default
|
|
5
|
+
local function FormHelperText(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local text = _binding.text
|
|
8
|
+
local hasError = _binding.hasError
|
|
9
|
+
local disabled = _binding.disabled
|
|
10
|
+
local className = _binding.className
|
|
11
|
+
local sx = _binding.sx
|
|
12
|
+
local id = _binding.id
|
|
13
|
+
local ref = _binding.ref
|
|
14
|
+
local styles = useFormTextStyles({
|
|
15
|
+
hasError = hasError,
|
|
16
|
+
disabled = disabled,
|
|
17
|
+
})
|
|
18
|
+
local _attributes = {}
|
|
19
|
+
local _condition = id
|
|
20
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
21
|
+
_condition = "FormHelperText"
|
|
22
|
+
end
|
|
23
|
+
_attributes.key = _condition
|
|
24
|
+
_attributes.ref = ref
|
|
25
|
+
for _k, _v in styles.root do
|
|
26
|
+
_attributes[_k] = _v
|
|
27
|
+
end
|
|
28
|
+
if className then
|
|
29
|
+
for _k, _v in className do
|
|
30
|
+
_attributes[_k] = _v
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
if sx then
|
|
34
|
+
for _k, _v in sx do
|
|
35
|
+
_attributes[_k] = _v
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
_attributes.Text = text
|
|
39
|
+
return React.createElement("textlabel", _attributes)
|
|
40
|
+
end
|
|
41
|
+
local default = FormHelperText
|
|
42
|
+
return {
|
|
43
|
+
default = default,
|
|
44
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface FormLabelProps {
|
|
3
|
+
text: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
hasError?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function FormLabel(props: CustomizedProps<TextLabel, FormLabelProps>): JSX.Element;
|
|
9
|
+
export default FormLabel;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local useFormTextStyles = TS.import(script, script.Parent, "FormText.styles").default
|
|
5
|
+
local function FormLabel(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local text = _binding.text
|
|
8
|
+
local required = _binding.required
|
|
9
|
+
local hasError = _binding.hasError
|
|
10
|
+
local disabled = _binding.disabled
|
|
11
|
+
local className = _binding.className
|
|
12
|
+
local sx = _binding.sx
|
|
13
|
+
local id = _binding.id
|
|
14
|
+
local ref = _binding.ref
|
|
15
|
+
local styles = useFormTextStyles({
|
|
16
|
+
hasError = hasError,
|
|
17
|
+
disabled = disabled,
|
|
18
|
+
})
|
|
19
|
+
local caption = if required == true then `{text} *` else text
|
|
20
|
+
local _attributes = {}
|
|
21
|
+
local _condition = id
|
|
22
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
23
|
+
_condition = "FormLabel"
|
|
24
|
+
end
|
|
25
|
+
_attributes.key = _condition
|
|
26
|
+
_attributes.ref = ref
|
|
27
|
+
for _k, _v in styles.root do
|
|
28
|
+
_attributes[_k] = _v
|
|
29
|
+
end
|
|
30
|
+
if className then
|
|
31
|
+
for _k, _v in className do
|
|
32
|
+
_attributes[_k] = _v
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
if sx then
|
|
36
|
+
for _k, _v in sx do
|
|
37
|
+
_attributes[_k] = _v
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
_attributes.Text = caption
|
|
41
|
+
return React.createElement("textlabel", _attributes)
|
|
42
|
+
end
|
|
43
|
+
local default = FormLabel
|
|
44
|
+
return {
|
|
45
|
+
default = default,
|
|
46
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local useFormTextStyles = componentStyles("FormText", function(theme, _param)
|
|
7
|
+
local hasError = _param.hasError
|
|
8
|
+
if hasError == nil then
|
|
9
|
+
hasError = false
|
|
10
|
+
end
|
|
11
|
+
local disabled = _param.disabled
|
|
12
|
+
if disabled == nil then
|
|
13
|
+
disabled = false
|
|
14
|
+
end
|
|
15
|
+
local color = if disabled then theme.palette.text.disabled elseif hasError then theme.palette.status.error.main else theme.palette.text.secondary
|
|
16
|
+
return createStyles({
|
|
17
|
+
root = {
|
|
18
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
19
|
+
Size = UDim2.fromScale(0, 0),
|
|
20
|
+
BackgroundTransparency = 1,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
TextColor3 = color,
|
|
23
|
+
Font = theme.typography.fontFamilies.default,
|
|
24
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
25
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
26
|
+
TextWrapped = true,
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
end)
|
|
30
|
+
local default = useFormTextStyles
|
|
31
|
+
return {
|
|
32
|
+
default = default,
|
|
33
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.FormLabel = TS.import(script, script, "components", "FormLabel").default
|
|
5
|
+
exports.FormHelperText = TS.import(script, script, "components", "FormHelperText").default
|
|
6
|
+
return exports
|
|
@@ -4,6 +4,7 @@ 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 useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
7
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
8
9
|
local iconSpinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").iconSpinnerPixels
|
|
9
10
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
@@ -18,7 +19,7 @@ local function IconButton(props)
|
|
|
18
19
|
if loading == nil then
|
|
19
20
|
loading = false
|
|
20
21
|
end
|
|
21
|
-
local
|
|
22
|
+
local reducedProp = _binding.reducedMotion
|
|
22
23
|
local onClick = _binding.onClick
|
|
23
24
|
local className = _binding.className
|
|
24
25
|
local sx = _binding.sx
|
|
@@ -26,6 +27,8 @@ local function IconButton(props)
|
|
|
26
27
|
local ref = _binding.ref
|
|
27
28
|
local _binding_1 = useIconButtonStyles(props)
|
|
28
29
|
local container = _binding_1.container
|
|
30
|
+
local corner = _binding_1.corner
|
|
31
|
+
local reducedMotion = useReducedMotion(reducedProp)
|
|
29
32
|
local active = canActivate(disabled, loading)
|
|
30
33
|
local hovering, setHovering = useState(false)
|
|
31
34
|
local focused, setFocused = useState(false)
|
|
@@ -86,7 +89,9 @@ local function IconButton(props)
|
|
|
86
89
|
return setFocused(false)
|
|
87
90
|
end,
|
|
88
91
|
}
|
|
89
|
-
|
|
92
|
+
local _attributes_1 = table.clone(corner)
|
|
93
|
+
setmetatable(_attributes_1, nil)
|
|
94
|
+
return React.createElement("imagebutton", _attributes, React.createElement("uicorner", _attributes_1), loading and (React.createElement(CircularProgress, {
|
|
90
95
|
size = iconSpinnerPixels(props.size),
|
|
91
96
|
thickness = 2,
|
|
92
97
|
color = tint,
|
|
@@ -39,6 +39,9 @@ local useIconButtonStyles = componentStyles("IconButton", function(theme, props)
|
|
|
39
39
|
ScaleType = Enum.ScaleType.Fit,
|
|
40
40
|
ZIndex = 12000,
|
|
41
41
|
},
|
|
42
|
+
corner = {
|
|
43
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
44
|
+
},
|
|
42
45
|
})
|
|
43
46
|
end)
|
|
44
47
|
local default = useIconButtonStyles
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface ImageListItem {
|
|
3
|
+
src: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ImageListProps {
|
|
7
|
+
items: ImageListItem[];
|
|
8
|
+
cols?: number;
|
|
9
|
+
gap?: number;
|
|
10
|
+
itemSize?: number;
|
|
11
|
+
onItemActivated?: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
declare function ImageList(props: CustomizedProps<Frame, ImageListProps>): JSX.Element;
|
|
14
|
+
export default ImageList;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local imageListTitle = TS.import(script, script.Parent, "imageListLayout").imageListTitle
|
|
5
|
+
local useImageListStyles = TS.import(script, script.Parent, "ImageList.styles").default
|
|
6
|
+
local function ImageList(props)
|
|
7
|
+
local _binding = props
|
|
8
|
+
local items = _binding.items
|
|
9
|
+
local cols = _binding.cols
|
|
10
|
+
local gap = _binding.gap
|
|
11
|
+
local itemSize = _binding.itemSize
|
|
12
|
+
local onItemActivated = _binding.onItemActivated
|
|
13
|
+
local className = _binding.className
|
|
14
|
+
local sx = _binding.sx
|
|
15
|
+
local id = _binding.id
|
|
16
|
+
local ref = _binding.ref
|
|
17
|
+
local styles = useImageListStyles({
|
|
18
|
+
cols = cols,
|
|
19
|
+
gap = gap,
|
|
20
|
+
itemSize = itemSize,
|
|
21
|
+
})
|
|
22
|
+
local _attributes = {}
|
|
23
|
+
local _condition = id
|
|
24
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
25
|
+
_condition = "ImageList"
|
|
26
|
+
end
|
|
27
|
+
_attributes.key = _condition
|
|
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
|
|
42
|
+
local _attributes_1 = table.clone(styles.grid)
|
|
43
|
+
setmetatable(_attributes_1, nil)
|
|
44
|
+
local _exp = React.createElement("uigridlayout", _attributes_1)
|
|
45
|
+
-- ▼ ReadonlyArray.map ▼
|
|
46
|
+
local _newValue = table.create(#items)
|
|
47
|
+
local _callback = function(item, index)
|
|
48
|
+
local title = imageListTitle(item.title)
|
|
49
|
+
local _attributes_2 = {
|
|
50
|
+
key = `Tile-{index}`,
|
|
51
|
+
}
|
|
52
|
+
for _k, _v in styles.tile do
|
|
53
|
+
_attributes_2[_k] = _v
|
|
54
|
+
end
|
|
55
|
+
_attributes_2.LayoutOrder = index
|
|
56
|
+
_attributes_2.Event = {
|
|
57
|
+
Activated = function()
|
|
58
|
+
local _result = onItemActivated
|
|
59
|
+
if _result ~= nil then
|
|
60
|
+
_result = _result(index)
|
|
61
|
+
end
|
|
62
|
+
return _result
|
|
63
|
+
end,
|
|
64
|
+
}
|
|
65
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
66
|
+
setmetatable(_attributes_3, nil)
|
|
67
|
+
local _exp_1 = React.createElement("uicorner", _attributes_3)
|
|
68
|
+
local _attributes_4 = {
|
|
69
|
+
key = "Image",
|
|
70
|
+
}
|
|
71
|
+
for _k, _v in styles.image do
|
|
72
|
+
_attributes_4[_k] = _v
|
|
73
|
+
end
|
|
74
|
+
_attributes_4.Image = item.src
|
|
75
|
+
local _exp_2 = React.createElement("imagelabel", _attributes_4)
|
|
76
|
+
local _condition_1 = title ~= nil
|
|
77
|
+
if _condition_1 then
|
|
78
|
+
local _attributes_5 = {
|
|
79
|
+
key = "Title",
|
|
80
|
+
}
|
|
81
|
+
for _k, _v in styles.title do
|
|
82
|
+
_attributes_5[_k] = _v
|
|
83
|
+
end
|
|
84
|
+
_attributes_5.Text = title
|
|
85
|
+
local _attributes_6 = table.clone(styles.titlePad)
|
|
86
|
+
setmetatable(_attributes_6, nil)
|
|
87
|
+
_condition_1 = (React.createElement("textlabel", _attributes_5, React.createElement("uipadding", _attributes_6)))
|
|
88
|
+
end
|
|
89
|
+
return React.createElement("imagebutton", _attributes_2, _exp_1, _exp_2, _condition_1)
|
|
90
|
+
end
|
|
91
|
+
for _k, _v in items do
|
|
92
|
+
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
93
|
+
end
|
|
94
|
+
-- ▲ ReadonlyArray.map ▲
|
|
95
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
96
|
+
end
|
|
97
|
+
local default = ImageList
|
|
98
|
+
return {
|
|
99
|
+
default = default,
|
|
100
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local _imageListLayout = TS.import(script, script.Parent, "imageListLayout")
|
|
7
|
+
local imageListCols = _imageListLayout.imageListCols
|
|
8
|
+
local imageListGap = _imageListLayout.imageListGap
|
|
9
|
+
local imageListItemSize = _imageListLayout.imageListItemSize
|
|
10
|
+
local useImageListStyles = componentStyles("ImageList", function(theme, _param)
|
|
11
|
+
local cols = _param.cols
|
|
12
|
+
local gap = _param.gap
|
|
13
|
+
local itemSize = _param.itemSize
|
|
14
|
+
local size = imageListItemSize(itemSize)
|
|
15
|
+
local pad = theme.spacing.calc(imageListGap(gap))
|
|
16
|
+
local bar = theme.spacing.calc(2.5)
|
|
17
|
+
return createStyles({
|
|
18
|
+
root = {
|
|
19
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
20
|
+
Size = UDim2.fromScale(0, 0),
|
|
21
|
+
BackgroundTransparency = 1,
|
|
22
|
+
BorderSizePixel = 0,
|
|
23
|
+
},
|
|
24
|
+
grid = {
|
|
25
|
+
CellSize = UDim2.fromOffset(size, size),
|
|
26
|
+
CellPadding = UDim2.fromOffset(pad, pad),
|
|
27
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
28
|
+
FillDirectionMaxCells = imageListCols(cols),
|
|
29
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
30
|
+
StartCorner = Enum.StartCorner.TopLeft,
|
|
31
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
32
|
+
VerticalAlignment = Enum.VerticalAlignment.Top,
|
|
33
|
+
},
|
|
34
|
+
tile = {
|
|
35
|
+
Size = UDim2.fromOffset(size, size),
|
|
36
|
+
BackgroundColor3 = theme.palette.surface.input,
|
|
37
|
+
BorderSizePixel = 0,
|
|
38
|
+
AutoButtonColor = false,
|
|
39
|
+
ClipsDescendants = true,
|
|
40
|
+
Text = "",
|
|
41
|
+
},
|
|
42
|
+
corner = {
|
|
43
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
44
|
+
},
|
|
45
|
+
image = {
|
|
46
|
+
Size = UDim2.fromScale(1, 1),
|
|
47
|
+
BackgroundTransparency = 1,
|
|
48
|
+
BorderSizePixel = 0,
|
|
49
|
+
ScaleType = Enum.ScaleType.Crop,
|
|
50
|
+
},
|
|
51
|
+
title = {
|
|
52
|
+
Size = UDim2.new(1, 0, 0, bar),
|
|
53
|
+
Position = UDim2.new(0, 0, 1, -bar),
|
|
54
|
+
BackgroundColor3 = theme.palette.surface.overlay,
|
|
55
|
+
BackgroundTransparency = 0.25,
|
|
56
|
+
BorderSizePixel = 0,
|
|
57
|
+
Font = theme.typography.fontFamilies.default,
|
|
58
|
+
TextSize = theme.typography.fontSizes.caption,
|
|
59
|
+
TextColor3 = theme.palette.text.inverse,
|
|
60
|
+
TextXAlignment = Enum.TextXAlignment.Left,
|
|
61
|
+
TextTruncate = Enum.TextTruncate.AtEnd,
|
|
62
|
+
ZIndex = 2,
|
|
63
|
+
},
|
|
64
|
+
titlePad = {
|
|
65
|
+
PaddingLeft = UDim.new(0, theme.spacing.calc(0.5)),
|
|
66
|
+
PaddingRight = UDim.new(0, theme.spacing.calc(0.5)),
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
end)
|
|
70
|
+
local default = useImageListStyles
|
|
71
|
+
return {
|
|
72
|
+
default = default,
|
|
73
|
+
}
|