@rbxts/uiblox 0.2.0-alpha.0 → 0.2.0-alpha.10
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 +51 -34
- package/out/theme/constants/NumberConstants.d.ts +4 -2
- package/out/theme/constants/NumberConstants.luau +6 -4
- package/out/theme/context/ThemeProvider.d.ts +1 -1
- package/out/theme/hooks/useTheme.d.ts +1 -1
- package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +1 -1
- 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/styles/utilities/index.d.ts +1 -1
- package/out/theme/styles/utilities/init.luau +3 -1
- package/out/theme/styles/utilities/resolveStyle.d.ts +32 -0
- package/out/theme/styles/utilities/resolveStyle.luau +66 -0
- package/out/theme/themes/DarkTheme.luau +4 -0
- package/out/theme/themes/LightTheme.luau +4 -0
- package/out/theme/types/types.d.ts +1 -1
- package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.luau +5 -0
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -2
- package/out/ui/packages/alert/components/Alert.d.ts +10 -0
- package/out/ui/packages/alert/components/Alert.luau +98 -0
- package/out/ui/packages/alert/components/Alert.styles.d.ts +6 -0
- package/out/ui/packages/alert/components/Alert.styles.luau +93 -0
- package/out/ui/packages/alert/components/alertTone.d.ts +2 -0
- package/out/ui/packages/alert/components/alertTone.luau +7 -0
- package/out/ui/packages/alert/index.d.ts +3 -0
- package/out/ui/packages/alert/init.luau +6 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +10 -0
- package/out/ui/packages/appBar/components/AppBar.luau +77 -0
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +6 -0
- package/out/ui/packages/appBar/components/AppBar.styles.luau +66 -0
- package/out/ui/packages/appBar/index.d.ts +3 -0
- package/out/ui/packages/appBar/init.luau +5 -0
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +10 -0
- 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.styles.luau +6 -3
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +10 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +86 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +58 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/init.luau +5 -0
- 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/button/components/Button.styles.luau +0 -6
- package/out/ui/packages/button/components/buttonLook.d.ts +2 -2
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +3 -1
- package/out/ui/packages/chip/components/Chip.luau +39 -2
- package/out/ui/packages/chip/components/Chip.styles.d.ts +3 -0
- package/out/ui/packages/chip/components/Chip.styles.luau +40 -6
- 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/fab/components/Fab.d.ts +14 -0
- package/out/ui/packages/fab/components/Fab.luau +160 -0
- package/out/ui/packages/fab/components/Fab.styles.d.ts +8 -0
- package/out/ui/packages/fab/components/Fab.styles.luau +65 -0
- package/out/ui/packages/fab/components/fabSize.d.ts +4 -0
- package/out/ui/packages/fab/components/fabSize.luau +33 -0
- package/out/ui/packages/fab/index.d.ts +3 -0
- package/out/ui/packages/fab/init.luau +9 -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/icon/components/Icon.styles.luau +4 -4
- package/out/ui/packages/iconButton/components/IconButton.luau +7 -2
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +7 -4
- package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
- package/out/ui/packages/imageList/components/ImageList.luau +84 -0
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +54 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +3 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +24 -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 +11 -0
- package/out/ui/packages/init.luau +33 -0
- package/out/ui/packages/input/components/Input.d.ts +2 -0
- package/out/ui/packages/input/components/Input.luau +64 -27
- package/out/ui/packages/input/components/Input.styles.luau +6 -2
- 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 +1 -0
- package/out/ui/packages/listItem/components/ListItem.luau +5 -0
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +10 -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 +3 -0
- package/out/ui/packages/menu/components/Menu.luau +48 -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 +2 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +4 -0
- package/out/ui/packages/pagination/components/Pagination.d.ts +2 -0
- package/out/ui/packages/pagination/components/Pagination.luau +37 -21
- package/out/ui/packages/pagination/components/Pagination.styles.luau +9 -0
- 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 +1 -0
- package/out/ui/packages/paper/components/Paper.luau +8 -3
- 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 +9 -0
- package/out/ui/packages/rating/components/Rating.luau +95 -0
- package/out/ui/packages/rating/components/Rating.styles.d.ts +4 -0
- package/out/ui/packages/rating/components/Rating.styles.luau +39 -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 +6 -0
- package/out/ui/packages/select/components/Select.luau +74 -27
- package/out/ui/packages/select/components/Select.styles.luau +3 -3
- package/out/ui/packages/sidebar/components/Sidebar.styles.luau +2 -2
- 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 +1 -0
- package/out/ui/packages/slider/components/Slider.luau +24 -1
- package/out/ui/packages/slider/components/Slider.styles.luau +8 -0
- 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/speedDial/components/SpeedDial.d.ts +17 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +92 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +2 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +26 -0
- package/out/ui/packages/speedDial/index.d.ts +2 -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 +1843 -1335
- package/out/ui/packages/switch/components/Switch.styles.luau +1 -1
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/tabs/components/Tabs.d.ts +2 -0
- package/out/ui/packages/tabs/components/Tabs.luau +10 -3
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +4 -1
- package/out/ui/packages/tabs/components/Tabs.styles.luau +24 -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.styles.luau +1 -1
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +17 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +126 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +5 -0
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +58 -0
- package/out/ui/packages/toggleButton/index.d.ts +2 -0
- package/out/ui/packages/toggleButton/init.luau +7 -0
- package/out/ui/packages/treeView/components/TreeView.luau +3 -3
- package/out/ui/packages/treeView/components/TreeView.styles.luau +3 -3
- 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
- package/out/theme/styles/utilities/interaction.d.ts +0 -13
- package/out/theme/styles/utilities/interaction.luau +0 -68
|
@@ -12,6 +12,8 @@ local function Dialog(props)
|
|
|
12
12
|
local children = _binding.children
|
|
13
13
|
local actions = _binding.actions
|
|
14
14
|
local styles = useDialogStyles()
|
|
15
|
+
local hasTitle = title ~= nil and title ~= ""
|
|
16
|
+
local hasActions = actions ~= nil
|
|
15
17
|
local _attributes = {
|
|
16
18
|
key = "Column",
|
|
17
19
|
}
|
|
@@ -21,34 +23,41 @@ local function Dialog(props)
|
|
|
21
23
|
local _attributes_1 = table.clone(styles.columnList)
|
|
22
24
|
setmetatable(_attributes_1, nil)
|
|
23
25
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
24
|
-
local
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
local _condition = hasTitle
|
|
27
|
+
if _condition then
|
|
28
|
+
local _attributes_2 = {
|
|
29
|
+
key = "Title",
|
|
30
|
+
}
|
|
31
|
+
for _k, _v in styles.title do
|
|
32
|
+
_attributes_2[_k] = _v
|
|
33
|
+
end
|
|
34
|
+
_attributes_2.Text = title
|
|
35
|
+
_condition = React.createElement("textlabel", _attributes_2)
|
|
29
36
|
end
|
|
30
|
-
_attributes_2
|
|
31
|
-
local _exp_1 = React.createElement("textlabel", _attributes_2)
|
|
32
|
-
local _attributes_3 = {
|
|
37
|
+
local _attributes_2 = {
|
|
33
38
|
key = "Body",
|
|
34
39
|
}
|
|
35
40
|
for _k, _v in styles.body do
|
|
36
|
-
|
|
41
|
+
_attributes_2[_k] = _v
|
|
37
42
|
end
|
|
38
|
-
local
|
|
39
|
-
local
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
local _exp_1 = React.createElement("frame", _attributes_2, children)
|
|
44
|
+
local _condition_1 = hasActions
|
|
45
|
+
if _condition_1 then
|
|
46
|
+
local _attributes_3 = {
|
|
47
|
+
key = "Actions",
|
|
48
|
+
}
|
|
49
|
+
for _k, _v in styles.actions do
|
|
50
|
+
_attributes_3[_k] = _v
|
|
51
|
+
end
|
|
52
|
+
local _attributes_4 = table.clone(styles.actionList)
|
|
53
|
+
setmetatable(_attributes_4, nil)
|
|
54
|
+
_condition_1 = (React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), actions))
|
|
44
55
|
end
|
|
45
|
-
local _attributes_5 = table.clone(styles.actionList)
|
|
46
|
-
setmetatable(_attributes_5, nil)
|
|
47
56
|
return React.createElement(Modal, {
|
|
48
57
|
host = host,
|
|
49
58
|
open = open,
|
|
50
59
|
onClose = onClose,
|
|
51
|
-
}, React.createElement("frame", _attributes, _exp,
|
|
60
|
+
}, React.createElement("frame", _attributes, _exp, _condition, _exp_1, _condition_1))
|
|
52
61
|
end
|
|
53
62
|
local default = Dialog
|
|
54
63
|
return {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { Icons } from "../../../enums/index";
|
|
3
|
+
import { FabSize } from "./fabSize";
|
|
4
|
+
export interface FabProps {
|
|
5
|
+
icon: Icons;
|
|
6
|
+
label?: string;
|
|
7
|
+
size?: FabSize;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
reducedMotion?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare function Fab(props: CustomizedProps<TextButton, FabProps>): JSX.Element;
|
|
14
|
+
export default Fab;
|
|
@@ -0,0 +1,160 @@
|
|
|
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 React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useState = _react.useState
|
|
7
|
+
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
8
|
+
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
|
+
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
10
|
+
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
11
|
+
local _fabSize = TS.import(script, script.Parent, "fabSize")
|
|
12
|
+
local fabExtended = _fabSize.fabExtended
|
|
13
|
+
local fabIconPixels = _fabSize.fabIconPixels
|
|
14
|
+
local useFabStyles = TS.import(script, script.Parent, "Fab.styles").default
|
|
15
|
+
local function Fab(props)
|
|
16
|
+
local _binding = props
|
|
17
|
+
local icon = _binding.icon
|
|
18
|
+
local label = _binding.label
|
|
19
|
+
local size = _binding.size
|
|
20
|
+
if size == nil then
|
|
21
|
+
size = "medium"
|
|
22
|
+
end
|
|
23
|
+
local disabled = _binding.disabled
|
|
24
|
+
local loading = _binding.loading
|
|
25
|
+
if loading == nil then
|
|
26
|
+
loading = false
|
|
27
|
+
end
|
|
28
|
+
local reducedMotion = _binding.reducedMotion
|
|
29
|
+
local onClick = _binding.onClick
|
|
30
|
+
local className = _binding.className
|
|
31
|
+
local sx = _binding.sx
|
|
32
|
+
local id = _binding.id
|
|
33
|
+
local ref = _binding.ref
|
|
34
|
+
local active = canActivate(disabled, loading)
|
|
35
|
+
local extended = fabExtended(label)
|
|
36
|
+
local styles = useFabStyles({
|
|
37
|
+
size = size,
|
|
38
|
+
disabled = not active,
|
|
39
|
+
extended = extended,
|
|
40
|
+
})
|
|
41
|
+
local _binding_1 = useTheme()
|
|
42
|
+
local theme = _binding_1.theme
|
|
43
|
+
local hovering, setHovering = useState(false)
|
|
44
|
+
local focused, setFocused = useState(false)
|
|
45
|
+
local iconPx = fabIconPixels(size)
|
|
46
|
+
useEffect(function()
|
|
47
|
+
if active then
|
|
48
|
+
return nil
|
|
49
|
+
end
|
|
50
|
+
setHovering(false)
|
|
51
|
+
setFocused(false)
|
|
52
|
+
end, { active })
|
|
53
|
+
local _result
|
|
54
|
+
if loading then
|
|
55
|
+
_result = (React.createElement(CircularProgress, {
|
|
56
|
+
size = iconPx,
|
|
57
|
+
thickness = 2,
|
|
58
|
+
color = theme.palette.primary.on,
|
|
59
|
+
reducedMotion = reducedMotion,
|
|
60
|
+
className = if extended then {
|
|
61
|
+
LayoutOrder = 1,
|
|
62
|
+
} else {
|
|
63
|
+
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
64
|
+
Position = UDim2.fromScale(0.5, 0.5),
|
|
65
|
+
},
|
|
66
|
+
}))
|
|
67
|
+
else
|
|
68
|
+
local _attributes = {
|
|
69
|
+
key = "Icon",
|
|
70
|
+
}
|
|
71
|
+
for _k, _v in styles.icon do
|
|
72
|
+
_attributes[_k] = _v
|
|
73
|
+
end
|
|
74
|
+
_attributes.Size = UDim2.fromOffset(iconPx, iconPx)
|
|
75
|
+
_attributes.AnchorPoint = if extended then Vector2.new(0, 0) else Vector2.new(0.5, 0.5)
|
|
76
|
+
_attributes.Position = if extended then UDim2.fromScale(0, 0) else UDim2.fromScale(0.5, 0.5)
|
|
77
|
+
_attributes.Image = tostring(icon)
|
|
78
|
+
_result = (React.createElement("imagelabel", _attributes))
|
|
79
|
+
end
|
|
80
|
+
local iconEl = _result
|
|
81
|
+
local _attributes = {}
|
|
82
|
+
local _condition = id
|
|
83
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
84
|
+
_condition = "Fab"
|
|
85
|
+
end
|
|
86
|
+
_attributes.key = _condition
|
|
87
|
+
_attributes.ref = ref
|
|
88
|
+
for _k, _v in styles.root do
|
|
89
|
+
_attributes[_k] = _v
|
|
90
|
+
end
|
|
91
|
+
if className then
|
|
92
|
+
for _k, _v in className do
|
|
93
|
+
_attributes[_k] = _v
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
if sx then
|
|
97
|
+
for _k, _v in sx do
|
|
98
|
+
_attributes[_k] = _v
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
_attributes.Active = active
|
|
102
|
+
_attributes.Selectable = active
|
|
103
|
+
_attributes.BackgroundTransparency = if not active then 0.5 elseif hovering or focused then 0.15 else 0
|
|
104
|
+
_attributes.Event = {
|
|
105
|
+
Activated = function()
|
|
106
|
+
if active and onClick then
|
|
107
|
+
onClick()
|
|
108
|
+
end
|
|
109
|
+
end,
|
|
110
|
+
MouseEnter = function()
|
|
111
|
+
if active then
|
|
112
|
+
setHovering(true)
|
|
113
|
+
end
|
|
114
|
+
end,
|
|
115
|
+
MouseLeave = function()
|
|
116
|
+
return setHovering(false)
|
|
117
|
+
end,
|
|
118
|
+
SelectionGained = function()
|
|
119
|
+
if active then
|
|
120
|
+
setFocused(true)
|
|
121
|
+
end
|
|
122
|
+
end,
|
|
123
|
+
SelectionLost = function()
|
|
124
|
+
return setFocused(false)
|
|
125
|
+
end,
|
|
126
|
+
}
|
|
127
|
+
local _attributes_1 = table.clone(styles.corner)
|
|
128
|
+
setmetatable(_attributes_1, nil)
|
|
129
|
+
local _exp = React.createElement("uicorner", _attributes_1)
|
|
130
|
+
local _exp_1 = React.createElement(Shadow)
|
|
131
|
+
local _result_1
|
|
132
|
+
if extended then
|
|
133
|
+
local _attributes_2 = table.clone(styles.padding)
|
|
134
|
+
setmetatable(_attributes_2, nil)
|
|
135
|
+
local _exp_2 = React.createElement("uipadding", _attributes_2)
|
|
136
|
+
local _attributes_3 = table.clone(styles.row)
|
|
137
|
+
setmetatable(_attributes_3, nil)
|
|
138
|
+
local _exp_3 = React.createElement("uilistlayout", _attributes_3)
|
|
139
|
+
local _exp_4 = iconEl
|
|
140
|
+
local _condition_1 = not loading
|
|
141
|
+
if _condition_1 then
|
|
142
|
+
local _attributes_4 = {
|
|
143
|
+
key = "Label",
|
|
144
|
+
}
|
|
145
|
+
for _k, _v in styles.label do
|
|
146
|
+
_attributes_4[_k] = _v
|
|
147
|
+
end
|
|
148
|
+
_attributes_4.Text = label
|
|
149
|
+
_condition_1 = React.createElement("textlabel", _attributes_4)
|
|
150
|
+
end
|
|
151
|
+
_result_1 = (React.createElement(React.Fragment, nil, _exp_2, _exp_3, _exp_4, _condition_1))
|
|
152
|
+
else
|
|
153
|
+
_result_1 = iconEl
|
|
154
|
+
end
|
|
155
|
+
return React.createElement("textbutton", _attributes, _exp, _exp_1, _result_1)
|
|
156
|
+
end
|
|
157
|
+
local default = Fab
|
|
158
|
+
return {
|
|
159
|
+
default = default,
|
|
160
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FabSize } from "./fabSize";
|
|
2
|
+
export interface FabStyleProps {
|
|
3
|
+
size?: FabSize;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
extended?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const useFabStyles: (props: FabStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
8
|
+
export default useFabStyles;
|
|
@@ -0,0 +1,65 @@
|
|
|
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 fabPixels = TS.import(script, script.Parent, "fabSize").fabPixels
|
|
7
|
+
local useFabStyles = componentStyles("Fab", function(theme, _param)
|
|
8
|
+
local size = _param.size
|
|
9
|
+
if size == nil then
|
|
10
|
+
size = "medium"
|
|
11
|
+
end
|
|
12
|
+
local disabled = _param.disabled
|
|
13
|
+
local extended = _param.extended
|
|
14
|
+
local diameter = fabPixels(size)
|
|
15
|
+
return createStyles({
|
|
16
|
+
root = {
|
|
17
|
+
Size = if extended == true then UDim2.new(0, 0, 0, diameter) else UDim2.fromOffset(diameter, diameter),
|
|
18
|
+
AutomaticSize = if extended == true then Enum.AutomaticSize.X else Enum.AutomaticSize.None,
|
|
19
|
+
BackgroundColor3 = theme.palette.primary.main,
|
|
20
|
+
BackgroundTransparency = if disabled then 0.5 else 0,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
AutoButtonColor = false,
|
|
23
|
+
Text = "",
|
|
24
|
+
ZIndex = 12000,
|
|
25
|
+
},
|
|
26
|
+
corner = {
|
|
27
|
+
CornerRadius = UDim.new(1, 0),
|
|
28
|
+
},
|
|
29
|
+
padding = {
|
|
30
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(2)),
|
|
31
|
+
PaddingRight = UDim.new(0, theme.padding.calc(2.5)),
|
|
32
|
+
},
|
|
33
|
+
row = {
|
|
34
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
35
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
36
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Center,
|
|
37
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
38
|
+
Padding = UDim.new(0, theme.padding.calc(1)),
|
|
39
|
+
},
|
|
40
|
+
icon = {
|
|
41
|
+
Size = UDim2.fromScale(1, 1),
|
|
42
|
+
BackgroundTransparency = 1,
|
|
43
|
+
BorderSizePixel = 0,
|
|
44
|
+
ScaleType = Enum.ScaleType.Fit,
|
|
45
|
+
ImageColor3 = theme.palette.primary.on,
|
|
46
|
+
ImageTransparency = if disabled then 0.5 else 0,
|
|
47
|
+
LayoutOrder = 1,
|
|
48
|
+
},
|
|
49
|
+
label = {
|
|
50
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
51
|
+
Size = UDim2.fromScale(0, 0),
|
|
52
|
+
BackgroundTransparency = 1,
|
|
53
|
+
BorderSizePixel = 0,
|
|
54
|
+
Font = theme.typography.fontFamilies.default,
|
|
55
|
+
TextSize = theme.typography.fontSizes.body,
|
|
56
|
+
TextColor3 = theme.palette.primary.on,
|
|
57
|
+
TextTransparency = if disabled then 0.5 else 0,
|
|
58
|
+
LayoutOrder = 2,
|
|
59
|
+
},
|
|
60
|
+
})
|
|
61
|
+
end)
|
|
62
|
+
local default = useFabStyles
|
|
63
|
+
return {
|
|
64
|
+
default = default,
|
|
65
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function fabPixels(size)
|
|
3
|
+
if size == nil then
|
|
4
|
+
size = "medium"
|
|
5
|
+
end
|
|
6
|
+
if size == "small" then
|
|
7
|
+
return 40
|
|
8
|
+
end
|
|
9
|
+
if size == "large" then
|
|
10
|
+
return 64
|
|
11
|
+
end
|
|
12
|
+
return 56
|
|
13
|
+
end
|
|
14
|
+
local function fabIconPixels(size)
|
|
15
|
+
if size == nil then
|
|
16
|
+
size = "medium"
|
|
17
|
+
end
|
|
18
|
+
if size == "small" then
|
|
19
|
+
return 18
|
|
20
|
+
end
|
|
21
|
+
if size == "large" then
|
|
22
|
+
return 28
|
|
23
|
+
end
|
|
24
|
+
return 24
|
|
25
|
+
end
|
|
26
|
+
local function fabExtended(label)
|
|
27
|
+
return label ~= nil and label ~= ""
|
|
28
|
+
end
|
|
29
|
+
return {
|
|
30
|
+
fabPixels = fabPixels,
|
|
31
|
+
fabIconPixels = fabIconPixels,
|
|
32
|
+
fabExtended = fabExtended,
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.Fab = TS.import(script, script, "components", "Fab").default
|
|
5
|
+
local _fabSize = TS.import(script, script, "components", "fabSize")
|
|
6
|
+
exports.fabPixels = _fabSize.fabPixels
|
|
7
|
+
exports.fabIconPixels = _fabSize.fabIconPixels
|
|
8
|
+
exports.fabExtended = _fabSize.fabExtended
|
|
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
|
|
@@ -9,10 +9,10 @@ local useIconStyles = componentStyles("Icon", function(theme, props)
|
|
|
9
9
|
local size = _binding.size
|
|
10
10
|
repeat
|
|
11
11
|
if size == "xxs" then
|
|
12
|
-
return UDim2.new(0, theme.spacing.calc(
|
|
12
|
+
return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
|
|
13
13
|
end
|
|
14
14
|
if size == "xs" then
|
|
15
|
-
return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
|
|
15
|
+
return UDim2.new(0, theme.spacing.calc(1.5), 0, theme.spacing.calc(1.5))
|
|
16
16
|
end
|
|
17
17
|
if size == "sm" then
|
|
18
18
|
return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
|
|
@@ -21,10 +21,10 @@ local useIconStyles = componentStyles("Icon", function(theme, props)
|
|
|
21
21
|
return UDim2.new(0, theme.spacing.calc(3), 0, theme.spacing.calc(3))
|
|
22
22
|
end
|
|
23
23
|
if size == "lg" then
|
|
24
|
-
return UDim2.new(0, theme.spacing.calc(
|
|
24
|
+
return UDim2.new(0, theme.spacing.calc(4), 0, theme.spacing.calc(4))
|
|
25
25
|
end
|
|
26
26
|
if size == "xl" then
|
|
27
|
-
return UDim2.new(0, theme.spacing.calc(
|
|
27
|
+
return UDim2.new(0, theme.spacing.calc(5), 0, theme.spacing.calc(5))
|
|
28
28
|
end
|
|
29
29
|
return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
|
|
30
30
|
until true
|
|
@@ -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,
|
|
@@ -9,10 +9,10 @@ local useIconButtonStyles = componentStyles("IconButton", function(theme, props)
|
|
|
9
9
|
local size = _binding.size
|
|
10
10
|
repeat
|
|
11
11
|
if size == "xxs" then
|
|
12
|
-
return UDim2.new(0, theme.spacing.calc(
|
|
12
|
+
return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
|
|
13
13
|
end
|
|
14
14
|
if size == "xs" then
|
|
15
|
-
return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
|
|
15
|
+
return UDim2.new(0, theme.spacing.calc(1.5), 0, theme.spacing.calc(1.5))
|
|
16
16
|
end
|
|
17
17
|
if size == "sm" then
|
|
18
18
|
return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
|
|
@@ -21,10 +21,10 @@ local useIconButtonStyles = componentStyles("IconButton", function(theme, props)
|
|
|
21
21
|
return UDim2.new(0, theme.spacing.calc(3), 0, theme.spacing.calc(3))
|
|
22
22
|
end
|
|
23
23
|
if size == "lg" then
|
|
24
|
-
return UDim2.new(0, theme.spacing.calc(
|
|
24
|
+
return UDim2.new(0, theme.spacing.calc(4), 0, theme.spacing.calc(4))
|
|
25
25
|
end
|
|
26
26
|
if size == "xl" then
|
|
27
|
-
return UDim2.new(0, theme.spacing.calc(
|
|
27
|
+
return UDim2.new(0, theme.spacing.calc(5), 0, theme.spacing.calc(5))
|
|
28
28
|
end
|
|
29
29
|
return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
|
|
30
30
|
until true
|
|
@@ -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;
|