@rbxts/uiblox 0.2.0-alpha.1 → 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.
Files changed (190) hide show
  1. package/README.md +11 -8
  2. package/out/theme/constants/NumberConstants.d.ts +3 -1
  3. package/out/theme/constants/NumberConstants.luau +3 -0
  4. package/out/theme/context/ThemeProvider.d.ts +1 -1
  5. package/out/theme/hooks/useTheme.d.ts +1 -1
  6. package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +1 -1
  7. package/out/theme/interfaces/spacing/Shape.d.ts +3 -0
  8. package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
  9. package/out/theme/interfaces/typography/FontSizes.luau +15 -8
  10. package/out/theme/interfaces/typography/ThemeTypography.d.ts +3 -0
  11. package/out/theme/interfaces/typography/Variants.d.ts +14 -15
  12. package/out/theme/interfaces/typography/Variants.luau +68 -18
  13. package/out/theme/themes/DarkTheme.luau +4 -0
  14. package/out/theme/themes/LightTheme.luau +4 -0
  15. package/out/theme/types/types.d.ts +1 -1
  16. package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
  17. package/out/ui/packages/accordion/components/Accordion.luau +5 -0
  18. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
  19. package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -2
  20. package/out/ui/packages/alert/components/Alert.d.ts +10 -0
  21. package/out/ui/packages/alert/components/Alert.luau +98 -0
  22. package/out/ui/packages/alert/components/Alert.styles.d.ts +6 -0
  23. package/out/ui/packages/alert/components/Alert.styles.luau +93 -0
  24. package/out/ui/packages/alert/components/alertTone.d.ts +2 -0
  25. package/out/ui/packages/alert/components/alertTone.luau +7 -0
  26. package/out/ui/packages/alert/index.d.ts +3 -0
  27. package/out/ui/packages/alert/init.luau +6 -0
  28. package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
  29. package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
  30. package/out/ui/packages/backdrop/components/Backdrop.luau +58 -0
  31. package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
  32. package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
  33. package/out/ui/packages/backdrop/index.d.ts +2 -0
  34. package/out/ui/packages/backdrop/init.luau +5 -0
  35. package/out/ui/packages/badge/components/Badge.styles.luau +6 -3
  36. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
  37. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +58 -24
  38. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
  39. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
  40. package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
  41. package/out/ui/packages/breadcrumbs/init.luau +3 -0
  42. package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +1 -1
  43. package/out/ui/packages/button/components/Button.luau +9 -5
  44. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
  45. package/out/ui/packages/chip/components/Chip.d.ts +3 -1
  46. package/out/ui/packages/chip/components/Chip.luau +39 -2
  47. package/out/ui/packages/chip/components/Chip.styles.d.ts +3 -0
  48. package/out/ui/packages/chip/components/Chip.styles.luau +40 -6
  49. package/out/ui/packages/circularProgress/components/CircularProgress.luau +13 -2
  50. package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
  51. package/out/ui/packages/dialog/components/Dialog.luau +27 -18
  52. package/out/ui/packages/fab/components/Fab.d.ts +1 -0
  53. package/out/ui/packages/fab/components/Fab.luau +57 -25
  54. package/out/ui/packages/fab/components/Fab.styles.d.ts +1 -0
  55. package/out/ui/packages/fab/components/Fab.styles.luau +26 -1
  56. package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
  57. package/out/ui/packages/fab/components/fabSize.luau +4 -0
  58. package/out/ui/packages/fab/index.d.ts +1 -1
  59. package/out/ui/packages/fab/init.luau +1 -0
  60. package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
  61. package/out/ui/packages/formText/components/FormHelperText.luau +44 -0
  62. package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
  63. package/out/ui/packages/formText/components/FormLabel.luau +46 -0
  64. package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
  65. package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
  66. package/out/ui/packages/formText/index.d.ts +4 -0
  67. package/out/ui/packages/formText/init.luau +6 -0
  68. package/out/ui/packages/iconButton/components/IconButton.luau +7 -2
  69. package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
  70. package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
  71. package/out/ui/packages/imageList/components/ImageList.luau +84 -0
  72. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
  73. package/out/ui/packages/imageList/components/ImageList.styles.luau +54 -0
  74. package/out/ui/packages/imageList/components/imageListLayout.d.ts +3 -0
  75. package/out/ui/packages/imageList/components/imageListLayout.luau +24 -0
  76. package/out/ui/packages/imageList/index.d.ts +2 -0
  77. package/out/ui/packages/imageList/init.luau +5 -0
  78. package/out/ui/packages/index.d.ts +8 -0
  79. package/out/ui/packages/init.luau +24 -0
  80. package/out/ui/packages/input/components/Input.luau +1 -1
  81. package/out/ui/packages/layout/components/Box.d.ts +11 -0
  82. package/out/ui/packages/layout/components/Box.luau +49 -0
  83. package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
  84. package/out/ui/packages/layout/components/Box.styles.luau +34 -0
  85. package/out/ui/packages/layout/components/Container.d.ts +10 -0
  86. package/out/ui/packages/layout/components/Container.luau +54 -0
  87. package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
  88. package/out/ui/packages/layout/components/Container.styles.luau +41 -0
  89. package/out/ui/packages/layout/components/Grid.d.ts +1 -1
  90. package/out/ui/packages/layout/components/Stack.d.ts +12 -0
  91. package/out/ui/packages/layout/components/Stack.luau +49 -0
  92. package/out/ui/packages/layout/components/Stack.styles.d.ts +8 -0
  93. package/out/ui/packages/layout/components/Stack.styles.luau +72 -0
  94. package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
  95. package/out/ui/packages/layout/components/boxPad.luau +59 -0
  96. package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
  97. package/out/ui/packages/layout/components/containerWidth.luau +17 -0
  98. package/out/ui/packages/layout/components/stackAlign.d.ts +8 -0
  99. package/out/ui/packages/layout/components/stackAlign.luau +29 -0
  100. package/out/ui/packages/layout/index.d.ts +10 -0
  101. package/out/ui/packages/layout/init.luau +4 -0
  102. package/out/ui/packages/link/components/Link.d.ts +11 -0
  103. package/out/ui/packages/link/components/Link.luau +83 -0
  104. package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
  105. package/out/ui/packages/link/components/Link.styles.luau +59 -0
  106. package/out/ui/packages/link/index.d.ts +3 -0
  107. package/out/ui/packages/link/init.luau +5 -0
  108. package/out/ui/packages/listItem/components/ListItem.d.ts +1 -0
  109. package/out/ui/packages/listItem/components/ListItem.luau +5 -0
  110. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
  111. package/out/ui/packages/listItem/components/ListItem.styles.luau +10 -5
  112. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +2 -0
  113. package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
  114. package/out/ui/packages/menu/components/Menu.d.ts +3 -0
  115. package/out/ui/packages/menu/components/Menu.luau +48 -23
  116. package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
  117. package/out/ui/packages/modal/components/Modal.d.ts +1 -1
  118. package/out/ui/packages/modal/components/Modal.luau +55 -37
  119. package/out/ui/packages/motion/index.d.ts +1 -1
  120. package/out/ui/packages/motion/init.luau +1 -0
  121. package/out/ui/packages/motion/unit.d.ts +5 -0
  122. package/out/ui/packages/motion/unit.luau +23 -0
  123. package/out/ui/packages/pagination/components/Pagination.d.ts +2 -0
  124. package/out/ui/packages/pagination/components/Pagination.luau +37 -21
  125. package/out/ui/packages/pagination/components/Pagination.styles.luau +9 -0
  126. package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
  127. package/out/ui/packages/pagination/components/pageRange.luau +91 -8
  128. package/out/ui/packages/pagination/index.d.ts +1 -0
  129. package/out/ui/packages/pagination/init.luau +1 -0
  130. package/out/ui/packages/paper/components/Paper.d.ts +1 -0
  131. package/out/ui/packages/paper/components/Paper.luau +8 -3
  132. package/out/ui/packages/popup/index.d.ts +1 -0
  133. package/out/ui/packages/popup/init.luau +1 -0
  134. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
  135. package/out/ui/packages/radioGroup/components/RadioGroup.luau +4 -2
  136. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
  137. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
  138. package/out/ui/packages/rating/components/Rating.d.ts +9 -0
  139. package/out/ui/packages/rating/components/Rating.luau +95 -0
  140. package/out/ui/packages/rating/components/Rating.styles.d.ts +4 -0
  141. package/out/ui/packages/rating/components/Rating.styles.luau +39 -0
  142. package/out/ui/packages/rating/index.d.ts +2 -0
  143. package/out/ui/packages/rating/init.luau +5 -0
  144. package/out/ui/packages/select/components/Select.d.ts +5 -0
  145. package/out/ui/packages/select/components/Select.luau +48 -24
  146. package/out/ui/packages/select/components/Select.styles.luau +1 -1
  147. package/out/ui/packages/skeleton/components/Skeleton.luau +3 -2
  148. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
  149. package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
  150. package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
  151. package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
  152. package/out/ui/packages/slider/components/Slider.d.ts +1 -0
  153. package/out/ui/packages/slider/components/Slider.luau +24 -1
  154. package/out/ui/packages/slider/components/Slider.styles.luau +8 -0
  155. package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
  156. package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
  157. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +17 -0
  158. package/out/ui/packages/speedDial/components/SpeedDial.luau +92 -0
  159. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +2 -0
  160. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +26 -0
  161. package/out/ui/packages/speedDial/index.d.ts +2 -0
  162. package/out/ui/packages/speedDial/init.luau +5 -0
  163. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  164. package/out/ui/packages/stateMatrix.d.ts +2 -0
  165. package/out/ui/packages/stateMatrix.luau +1843 -1437
  166. package/out/ui/packages/switch/components/Switch.styles.luau +1 -1
  167. package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
  168. package/out/ui/packages/tabs/components/Tabs.d.ts +2 -0
  169. package/out/ui/packages/tabs/components/Tabs.luau +10 -3
  170. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +4 -1
  171. package/out/ui/packages/tabs/components/Tabs.styles.luau +24 -10
  172. package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
  173. package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
  174. package/out/ui/packages/tabs/index.d.ts +1 -0
  175. package/out/ui/packages/tabs/init.luau +1 -0
  176. package/out/ui/packages/toast/components/Toast.styles.luau +1 -1
  177. package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +17 -0
  178. package/out/ui/packages/toggleButton/components/ToggleButton.luau +126 -0
  179. package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +5 -0
  180. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +58 -0
  181. package/out/ui/packages/toggleButton/index.d.ts +2 -0
  182. package/out/ui/packages/toggleButton/init.luau +7 -0
  183. package/out/ui/packages/typography/components/Typography.styles.luau +4 -5
  184. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +6 -0
  185. package/out/ui/packages/virtualList/components/EmptyListHint.luau +32 -0
  186. package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
  187. package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
  188. package/out/ui/packages/virtualList/index.d.ts +2 -0
  189. package/out/ui/packages/virtualList/init.luau +1 -0
  190. package/package.json +2 -2
@@ -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 _attributes_2 = {
25
- key = "Title",
26
- }
27
- for _k, _v in styles.title do
28
- _attributes_2[_k] = _v
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.Text = title
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
- _attributes_3[_k] = _v
41
+ _attributes_2[_k] = _v
37
42
  end
38
- local _exp_2 = React.createElement("frame", _attributes_3, children)
39
- local _attributes_4 = {
40
- key = "Actions",
41
- }
42
- for _k, _v in styles.actions do
43
- _attributes_4[_k] = _v
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, _exp_1, _exp_2, React.createElement("frame", _attributes_4, React.createElement("uilistlayout", _attributes_5), actions)))
60
+ }, React.createElement("frame", _attributes, _exp, _condition, _exp_1, _condition_1))
52
61
  end
53
62
  local default = Dialog
54
63
  return {
@@ -3,6 +3,7 @@ import { Icons } from "../../../enums/index";
3
3
  import { FabSize } from "./fabSize";
4
4
  export interface FabProps {
5
5
  icon: Icons;
6
+ label?: string;
6
7
  size?: FabSize;
7
8
  disabled?: boolean;
8
9
  loading?: boolean;
@@ -8,11 +8,14 @@ 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 fabIconPixels = TS.import(script, script.Parent, "fabSize").fabIconPixels
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"
@@ -29,9 +32,11 @@ local function Fab(props)
29
32
  local id = _binding.id
30
33
  local ref = _binding.ref
31
34
  local active = canActivate(disabled, loading)
35
+ local extended = fabExtended(label)
32
36
  local styles = useFabStyles({
33
37
  size = size,
34
38
  disabled = not active,
39
+ extended = extended,
35
40
  })
36
41
  local _binding_1 = useTheme()
37
42
  local theme = _binding_1.theme
@@ -45,6 +50,34 @@ local function Fab(props)
45
50
  setHovering(false)
46
51
  setFocused(false)
47
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
48
81
  local _attributes = {}
49
82
  local _condition = id
50
83
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
@@ -95,32 +128,31 @@ local function Fab(props)
95
128
  setmetatable(_attributes_1, nil)
96
129
  local _exp = React.createElement("uicorner", _attributes_1)
97
130
  local _exp_1 = React.createElement(Shadow)
98
- local _result
99
- if loading then
100
- _result = (React.createElement(CircularProgress, {
101
- size = iconPx,
102
- thickness = 2,
103
- color = theme.palette.primary.on,
104
- reducedMotion = reducedMotion,
105
- className = {
106
- AnchorPoint = Vector2.new(0.5, 0.5),
107
- Position = UDim2.fromScale(0.5, 0.5),
108
- },
109
- }))
110
- else
111
- local _attributes_2 = {
112
- key = "Icon",
113
- }
114
- for _k, _v in styles.icon do
115
- _attributes_2[_k] = _v
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)
116
150
  end
117
- _attributes_2.Size = UDim2.fromOffset(iconPx, iconPx)
118
- _attributes_2.AnchorPoint = Vector2.new(0.5, 0.5)
119
- _attributes_2.Position = UDim2.fromScale(0.5, 0.5)
120
- _attributes_2.Image = tostring(icon)
121
- _result = (React.createElement("imagelabel", _attributes_2))
151
+ _result_1 = (React.createElement(React.Fragment, nil, _exp_2, _exp_3, _exp_4, _condition_1))
152
+ else
153
+ _result_1 = iconEl
122
154
  end
123
- return React.createElement("textbutton", _attributes, _exp, _exp_1, _result)
155
+ return React.createElement("textbutton", _attributes, _exp, _exp_1, _result_1)
124
156
  end
125
157
  local default = Fab
126
158
  return {
@@ -2,6 +2,7 @@ import { FabSize } from "./fabSize";
2
2
  export interface FabStyleProps {
3
3
  size?: FabSize;
4
4
  disabled?: boolean;
5
+ extended?: boolean;
5
6
  }
6
7
  declare const useFabStyles: (props: FabStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
7
8
  export default useFabStyles;
@@ -10,10 +10,12 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
10
10
  size = "medium"
11
11
  end
12
12
  local disabled = _param.disabled
13
+ local extended = _param.extended
13
14
  local diameter = fabPixels(size)
14
15
  return createStyles({
15
16
  root = {
16
- Size = UDim2.fromOffset(diameter, diameter),
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,
17
19
  BackgroundColor3 = theme.palette.primary.main,
18
20
  BackgroundTransparency = if disabled then 0.5 else 0,
19
21
  BorderSizePixel = 0,
@@ -24,6 +26,17 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
24
26
  corner = {
25
27
  CornerRadius = UDim.new(1, 0),
26
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
+ },
27
40
  icon = {
28
41
  Size = UDim2.fromScale(1, 1),
29
42
  BackgroundTransparency = 1,
@@ -31,6 +44,18 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
31
44
  ScaleType = Enum.ScaleType.Fit,
32
45
  ImageColor3 = theme.palette.primary.on,
33
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,
34
59
  },
35
60
  })
36
61
  end)
@@ -1,3 +1,4 @@
1
1
  export type FabSize = "small" | "medium" | "large";
2
2
  export declare function fabPixels(size?: FabSize): 40 | 64 | 56;
3
3
  export declare function fabIconPixels(size?: FabSize): 18 | 24 | 28;
4
+ export declare function fabExtended(label?: string): boolean;
@@ -23,7 +23,11 @@ local function fabIconPixels(size)
23
23
  end
24
24
  return 24
25
25
  end
26
+ local function fabExtended(label)
27
+ return label ~= nil and label ~= ""
28
+ end
26
29
  return {
27
30
  fabPixels = fabPixels,
28
31
  fabIconPixels = fabIconPixels,
32
+ fabExtended = fabExtended,
29
33
  }
@@ -1,3 +1,3 @@
1
1
  export { default as Fab } from "./components/Fab";
2
2
  export { FabProps } from "./components/Fab";
3
- export { FabSize, fabPixels, fabIconPixels } from "./components/fabSize";
3
+ export { FabSize, fabPixels, fabIconPixels, fabExtended } from "./components/fabSize";
@@ -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,5 @@
1
+ declare const useFormTextStyles: (props: {
2
+ hasError?: boolean;
3
+ disabled?: boolean;
4
+ }) => import("../../../../theme/index").ClassNameMap<string>;
5
+ export default useFormTextStyles;
@@ -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,4 @@
1
+ export { default as FormLabel } from "./components/FormLabel";
2
+ export { FormLabelProps } from "./components/FormLabel";
3
+ export { default as FormHelperText } from "./components/FormHelperText";
4
+ export { FormHelperTextProps } from "./components/FormHelperText";
@@ -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 reducedMotion = _binding.reducedMotion
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
- return React.createElement("imagebutton", _attributes, loading and (React.createElement(CircularProgress, {
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,84 @@
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 useImageListStyles = TS.import(script, script.Parent, "ImageList.styles").default
5
+ local function ImageList(props)
6
+ local _binding = props
7
+ local items = _binding.items
8
+ local cols = _binding.cols
9
+ local gap = _binding.gap
10
+ local itemSize = _binding.itemSize
11
+ local onItemActivated = _binding.onItemActivated
12
+ local className = _binding.className
13
+ local sx = _binding.sx
14
+ local id = _binding.id
15
+ local ref = _binding.ref
16
+ local styles = useImageListStyles({
17
+ cols = cols,
18
+ gap = gap,
19
+ itemSize = itemSize,
20
+ })
21
+ local _attributes = {}
22
+ local _condition = id
23
+ if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
24
+ _condition = "ImageList"
25
+ end
26
+ _attributes.key = _condition
27
+ _attributes.ref = ref
28
+ for _k, _v in styles.root do
29
+ _attributes[_k] = _v
30
+ end
31
+ if className then
32
+ for _k, _v in className do
33
+ _attributes[_k] = _v
34
+ end
35
+ end
36
+ if sx then
37
+ for _k, _v in sx do
38
+ _attributes[_k] = _v
39
+ end
40
+ end
41
+ local _attributes_1 = table.clone(styles.grid)
42
+ setmetatable(_attributes_1, nil)
43
+ local _exp = React.createElement("uigridlayout", _attributes_1)
44
+ -- ▼ ReadonlyArray.map ▼
45
+ local _newValue = table.create(#items)
46
+ local _callback = function(item, index)
47
+ local _attributes_2 = {
48
+ key = `Tile-{index}`,
49
+ }
50
+ for _k, _v in styles.tile do
51
+ _attributes_2[_k] = _v
52
+ end
53
+ _attributes_2.LayoutOrder = index
54
+ _attributes_2.Event = {
55
+ Activated = function()
56
+ local _result = onItemActivated
57
+ if _result ~= nil then
58
+ _result = _result(index)
59
+ end
60
+ return _result
61
+ end,
62
+ }
63
+ local _attributes_3 = table.clone(styles.corner)
64
+ setmetatable(_attributes_3, nil)
65
+ local _exp_1 = React.createElement("uicorner", _attributes_3)
66
+ local _attributes_4 = {
67
+ key = "Image",
68
+ }
69
+ for _k, _v in styles.image do
70
+ _attributes_4[_k] = _v
71
+ end
72
+ _attributes_4.Image = item.src
73
+ return React.createElement("imagebutton", _attributes_2, _exp_1, React.createElement("imagelabel", _attributes_4))
74
+ end
75
+ for _k, _v in items do
76
+ _newValue[_k] = _callback(_v, _k - 1, items)
77
+ end
78
+ -- ▲ ReadonlyArray.map ▲
79
+ return React.createElement("frame", _attributes, _exp, _newValue)
80
+ end
81
+ local default = ImageList
82
+ return {
83
+ default = default,
84
+ }
@@ -0,0 +1,6 @@
1
+ declare const useImageListStyles: (props: {
2
+ cols?: number;
3
+ gap?: number;
4
+ itemSize?: number;
5
+ }) => import("../../../../theme/index").ClassNameMap<string>;
6
+ export default useImageListStyles;
@@ -0,0 +1,54 @@
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
+ return createStyles({
17
+ root = {
18
+ AutomaticSize = Enum.AutomaticSize.XY,
19
+ Size = UDim2.fromScale(0, 0),
20
+ BackgroundTransparency = 1,
21
+ BorderSizePixel = 0,
22
+ },
23
+ grid = {
24
+ CellSize = UDim2.fromOffset(size, size),
25
+ CellPadding = UDim2.fromOffset(pad, pad),
26
+ FillDirection = Enum.FillDirection.Horizontal,
27
+ FillDirectionMaxCells = imageListCols(cols),
28
+ SortOrder = Enum.SortOrder.LayoutOrder,
29
+ StartCorner = Enum.StartCorner.TopLeft,
30
+ HorizontalAlignment = Enum.HorizontalAlignment.Left,
31
+ VerticalAlignment = Enum.VerticalAlignment.Top,
32
+ },
33
+ tile = {
34
+ Size = UDim2.fromOffset(size, size),
35
+ BackgroundColor3 = theme.palette.surface.input,
36
+ BorderSizePixel = 0,
37
+ AutoButtonColor = false,
38
+ Text = "",
39
+ },
40
+ corner = {
41
+ CornerRadius = UDim.new(0, theme.shape.borderRadius),
42
+ },
43
+ image = {
44
+ Size = UDim2.fromScale(1, 1),
45
+ BackgroundTransparency = 1,
46
+ BorderSizePixel = 0,
47
+ ScaleType = Enum.ScaleType.Crop,
48
+ },
49
+ })
50
+ end)
51
+ local default = useImageListStyles
52
+ return {
53
+ default = default,
54
+ }
@@ -0,0 +1,3 @@
1
+ export declare function imageListCols(cols?: number): number;
2
+ export declare function imageListGap(gap?: number): number;
3
+ export declare function imageListItemSize(itemSize?: number): number;