@rbxts/uiblox 0.2.0-alpha.19 → 0.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +0 -2
  2. package/out/theme/constants/NumberConstants.d.ts +0 -2
  3. package/out/theme/constants/NumberConstants.luau +0 -3
  4. package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
  5. package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
  6. package/out/theme/interfaces/typography/FontSizes.luau +8 -15
  7. package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -3
  8. package/out/theme/interfaces/typography/Variants.d.ts +15 -14
  9. package/out/theme/interfaces/typography/Variants.luau +18 -68
  10. package/out/theme/themes/DarkTheme.luau +0 -4
  11. package/out/theme/themes/LightTheme.luau +0 -4
  12. package/out/ui/packages/accordion/components/Accordion.d.ts +0 -1
  13. package/out/ui/packages/accordion/components/Accordion.luau +6 -22
  14. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
  15. package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
  16. package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
  17. package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
  18. package/out/ui/packages/alert/components/Alert.d.ts +0 -1
  19. package/out/ui/packages/alert/components/Alert.luau +27 -36
  20. package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
  21. package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
  22. package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
  23. package/out/ui/packages/appBar/components/AppBar.luau +0 -5
  24. package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
  25. package/out/ui/packages/appBar/components/AppBar.styles.luau +2 -6
  26. package/out/ui/packages/autocomplete/components/Autocomplete.luau +0 -8
  27. package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
  28. package/out/ui/packages/avatar/components/Avatar.luau +12 -20
  29. package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
  30. package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
  31. package/out/ui/packages/badge/components/Badge.d.ts +0 -3
  32. package/out/ui/packages/badge/components/Badge.luau +8 -23
  33. package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
  34. package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
  35. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
  36. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +2 -8
  37. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
  38. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
  39. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
  40. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +24 -58
  41. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
  42. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
  43. package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
  44. package/out/ui/packages/breadcrumbs/init.luau +0 -3
  45. package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +1 -1
  46. package/out/ui/packages/button/components/Button.luau +5 -9
  47. package/out/ui/packages/card/components/Card.d.ts +0 -1
  48. package/out/ui/packages/card/components/Card.luau +0 -2
  49. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
  50. package/out/ui/packages/chip/components/Chip.d.ts +1 -6
  51. package/out/ui/packages/chip/components/Chip.luau +2 -49
  52. package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -6
  53. package/out/ui/packages/chip/components/Chip.styles.luau +10 -55
  54. package/out/ui/packages/circularProgress/components/CircularProgress.luau +2 -13
  55. package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
  56. package/out/ui/packages/dialog/components/Dialog.luau +18 -27
  57. package/out/ui/packages/divider/components/Divider.d.ts +0 -1
  58. package/out/ui/packages/divider/components/Divider.luau +0 -48
  59. package/out/ui/packages/divider/components/Divider.styles.luau +0 -29
  60. package/out/ui/packages/drawer/components/Drawer.d.ts +0 -1
  61. package/out/ui/packages/drawer/components/Drawer.luau +1 -4
  62. package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
  63. package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
  64. package/out/ui/packages/fab/components/Fab.d.ts +0 -3
  65. package/out/ui/packages/fab/components/Fab.luau +25 -62
  66. package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
  67. package/out/ui/packages/fab/components/Fab.styles.luau +3 -33
  68. package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
  69. package/out/ui/packages/fab/components/fabSize.luau +0 -4
  70. package/out/ui/packages/fab/index.d.ts +1 -1
  71. package/out/ui/packages/fab/init.luau +0 -1
  72. package/out/ui/packages/iconButton/components/IconButton.luau +2 -7
  73. package/out/ui/packages/iconButton/components/IconButton.styles.luau +0 -3
  74. package/out/ui/packages/index.d.ts +0 -7
  75. package/out/ui/packages/init.luau +0 -21
  76. package/out/ui/packages/input/components/Input.luau +1 -1
  77. package/out/ui/packages/layout/components/Grid.d.ts +1 -1
  78. package/out/ui/packages/layout/index.d.ts +0 -10
  79. package/out/ui/packages/layout/init.luau +0 -4
  80. package/out/ui/packages/listItem/components/ListItem.d.ts +0 -1
  81. package/out/ui/packages/listItem/components/ListItem.luau +0 -5
  82. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
  83. package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -10
  84. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +0 -2
  85. package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +19 -23
  86. package/out/ui/packages/menu/components/Menu.d.ts +0 -5
  87. package/out/ui/packages/menu/components/Menu.luau +23 -54
  88. package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
  89. package/out/ui/packages/modal/components/Modal.d.ts +1 -1
  90. package/out/ui/packages/modal/components/Modal.luau +37 -55
  91. package/out/ui/packages/motion/index.d.ts +1 -1
  92. package/out/ui/packages/motion/init.luau +0 -1
  93. package/out/ui/packages/motion/unit.d.ts +0 -5
  94. package/out/ui/packages/motion/unit.luau +0 -23
  95. package/out/ui/packages/pagination/components/Pagination.d.ts +1 -4
  96. package/out/ui/packages/pagination/components/Pagination.luau +22 -41
  97. package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -4
  98. package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -19
  99. package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
  100. package/out/ui/packages/pagination/components/pageRange.luau +8 -91
  101. package/out/ui/packages/pagination/index.d.ts +0 -1
  102. package/out/ui/packages/pagination/init.luau +0 -1
  103. package/out/ui/packages/paper/components/Paper.d.ts +1 -2
  104. package/out/ui/packages/paper/components/Paper.luau +3 -14
  105. package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
  106. package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
  107. package/out/ui/packages/popup/index.d.ts +0 -1
  108. package/out/ui/packages/popup/init.luau +0 -1
  109. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
  110. package/out/ui/packages/radioGroup/components/RadioGroup.luau +2 -4
  111. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
  112. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
  113. package/out/ui/packages/select/components/Select.d.ts +0 -5
  114. package/out/ui/packages/select/components/Select.luau +24 -48
  115. package/out/ui/packages/select/components/Select.styles.luau +1 -1
  116. package/out/ui/packages/skeleton/components/Skeleton.luau +2 -3
  117. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +2 -7
  118. package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
  119. package/out/ui/packages/slider/components/Slider.d.ts +0 -1
  120. package/out/ui/packages/slider/components/Slider.luau +1 -24
  121. package/out/ui/packages/slider/components/Slider.styles.luau +0 -8
  122. package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
  123. package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
  124. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  125. package/out/ui/packages/stateMatrix.d.ts +0 -2
  126. package/out/ui/packages/stateMatrix.luau +221 -746
  127. package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
  128. package/out/ui/packages/stepper/components/Stepper.luau +1 -7
  129. package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
  130. package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
  131. package/out/ui/packages/switch/components/Switch.d.ts +0 -2
  132. package/out/ui/packages/switch/components/Switch.luau +0 -5
  133. package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
  134. package/out/ui/packages/switch/components/Switch.styles.luau +2 -7
  135. package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
  136. package/out/ui/packages/table/components/Table.d.ts +0 -1
  137. package/out/ui/packages/table/components/Table.luau +1 -4
  138. package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
  139. package/out/ui/packages/table/components/Table.styles.luau +6 -10
  140. package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
  141. package/out/ui/packages/tabs/components/Tabs.luau +3 -12
  142. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
  143. package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
  144. package/out/ui/packages/tabs/index.d.ts +0 -1
  145. package/out/ui/packages/tabs/init.luau +0 -1
  146. package/out/ui/packages/toast/components/Toast.d.ts +0 -2
  147. package/out/ui/packages/toast/components/Toast.luau +1 -26
  148. package/out/ui/packages/toast/components/Toast.styles.luau +4 -22
  149. package/out/ui/packages/typography/components/Typography.styles.luau +5 -4
  150. package/out/ui/packages/virtualList/index.d.ts +0 -2
  151. package/out/ui/packages/virtualList/init.luau +0 -1
  152. package/package.json +2 -2
  153. package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
  154. package/out/ui/packages/backdrop/components/Backdrop.luau +0 -58
  155. package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
  156. package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
  157. package/out/ui/packages/backdrop/index.d.ts +0 -2
  158. package/out/ui/packages/backdrop/init.luau +0 -5
  159. package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
  160. package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
  161. package/out/ui/packages/formText/components/FormHelperText.d.ts +0 -8
  162. package/out/ui/packages/formText/components/FormHelperText.luau +0 -44
  163. package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
  164. package/out/ui/packages/formText/components/FormLabel.luau +0 -46
  165. package/out/ui/packages/formText/components/FormText.styles.d.ts +0 -5
  166. package/out/ui/packages/formText/components/FormText.styles.luau +0 -33
  167. package/out/ui/packages/formText/index.d.ts +0 -4
  168. package/out/ui/packages/formText/init.luau +0 -6
  169. package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
  170. package/out/ui/packages/imageList/components/ImageList.luau +0 -100
  171. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
  172. package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
  173. package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
  174. package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
  175. package/out/ui/packages/imageList/index.d.ts +0 -2
  176. package/out/ui/packages/imageList/init.luau +0 -5
  177. package/out/ui/packages/layout/components/Box.d.ts +0 -11
  178. package/out/ui/packages/layout/components/Box.luau +0 -49
  179. package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
  180. package/out/ui/packages/layout/components/Box.styles.luau +0 -34
  181. package/out/ui/packages/layout/components/Container.d.ts +0 -10
  182. package/out/ui/packages/layout/components/Container.luau +0 -54
  183. package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
  184. package/out/ui/packages/layout/components/Container.styles.luau +0 -41
  185. package/out/ui/packages/layout/components/Stack.d.ts +0 -12
  186. package/out/ui/packages/layout/components/Stack.luau +0 -49
  187. package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -8
  188. package/out/ui/packages/layout/components/Stack.styles.luau +0 -72
  189. package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
  190. package/out/ui/packages/layout/components/boxPad.luau +0 -59
  191. package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
  192. package/out/ui/packages/layout/components/containerWidth.luau +0 -17
  193. package/out/ui/packages/layout/components/stackAlign.d.ts +0 -8
  194. package/out/ui/packages/layout/components/stackAlign.luau +0 -29
  195. package/out/ui/packages/link/components/Link.d.ts +0 -11
  196. package/out/ui/packages/link/components/Link.luau +0 -83
  197. package/out/ui/packages/link/components/Link.styles.d.ts +0 -8
  198. package/out/ui/packages/link/components/Link.styles.luau +0 -59
  199. package/out/ui/packages/link/index.d.ts +0 -3
  200. package/out/ui/packages/link/init.luau +0 -5
  201. package/out/ui/packages/rating/components/Rating.d.ts +0 -11
  202. package/out/ui/packages/rating/components/Rating.luau +0 -101
  203. package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -6
  204. package/out/ui/packages/rating/components/Rating.styles.luau +0 -44
  205. package/out/ui/packages/rating/index.d.ts +0 -2
  206. package/out/ui/packages/rating/init.luau +0 -5
  207. package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
  208. package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
  209. package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
  210. package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
  211. package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
  212. package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
  213. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -19
  214. package/out/ui/packages/speedDial/components/SpeedDial.luau +0 -101
  215. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +0 -5
  216. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +0 -31
  217. package/out/ui/packages/speedDial/index.d.ts +0 -3
  218. package/out/ui/packages/speedDial/init.luau +0 -5
  219. package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
  220. package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
  221. package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +0 -19
  222. package/out/ui/packages/toggleButton/components/ToggleButton.luau +0 -135
  223. package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -7
  224. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +0 -65
  225. package/out/ui/packages/toggleButton/index.d.ts +0 -2
  226. package/out/ui/packages/toggleButton/init.luau +0 -7
  227. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +0 -6
  228. package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -32
  229. package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
  230. package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +0 -26
package/README.md CHANGED
@@ -36,8 +36,6 @@ npm install @rbxts/uiblox
36
36
  4. Use packaged components from `@rbxts/uiblox` (`Button`, `Input`, `Select`, …).
37
37
  5. Preview components in [Storyblox](https://github.com/bjlarouche/storyblox) with `*.stories` modules.
38
38
 
39
- Token reference (spacing, density, typography, shape, palette, `resolveStyle`): [docs/STYLING.md](docs/STYLING.md).
40
-
41
39
  ```tsx
42
40
  import React from "@rbxts/react";
43
41
  import { Button, DarkTheme, ThemeProvider } from "@rbxts/uiblox";
@@ -2,7 +2,5 @@ import { IconSizes } from "../interfaces/iconSizes/index";
2
2
  export declare const SPACING_BASE = 8;
3
3
  export declare const PADDING_BASE = 4;
4
4
  export declare const BORDER_RADIUS = 4;
5
- /** UICorner scale for pill/capsule controls (1 = fully round). */
6
- export declare const PILL_SCALE = 1;
7
5
  export declare const CONTENT_WIDTH = 1024;
8
6
  export declare const ICON_SIZES: IconSizes;
@@ -2,8 +2,6 @@
2
2
  local SPACING_BASE = 8
3
3
  local PADDING_BASE = 4
4
4
  local BORDER_RADIUS = 4
5
- --* UICorner scale for pill/capsule controls (1 = fully round).
6
- local PILL_SCALE = 1
7
5
  local CONTENT_WIDTH = 1024
8
6
  local ICON_SIZES = {
9
7
  small = 16,
@@ -14,7 +12,6 @@ return {
14
12
  SPACING_BASE = SPACING_BASE,
15
13
  PADDING_BASE = PADDING_BASE,
16
14
  BORDER_RADIUS = BORDER_RADIUS,
17
- PILL_SCALE = PILL_SCALE,
18
15
  CONTENT_WIDTH = CONTENT_WIDTH,
19
16
  ICON_SIZES = ICON_SIZES,
20
17
  }
@@ -1,6 +1,3 @@
1
1
  export default interface Shape {
2
- /** Pixel radius for squared controls (Button, Input, Paper). */
3
2
  borderRadius: number;
4
- /** UICorner scale for capsules (Switch, Chip). Use `new UDim(pillScale, 0)`. */
5
- pillScale: number;
6
3
  }
@@ -1,3 +1,3 @@
1
1
  import { FontSizeOptions } from "./FontSizeOptions";
2
- export declare const baseFontSize: number;
2
+ export declare const baseFontSize = 14;
3
3
  export declare const allFontSizes: FontSizeOptions;
@@ -1,20 +1,13 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
- local TS = _G[script]
3
- local allTypographyVariants = TS.import(script, script.Parent, "Variants").allTypographyVariants
4
- local baseFontSize = allTypographyVariants.body.size
2
+ local baseFontSize = 14
5
3
  local allFontSizes = {
6
- h1 = allTypographyVariants.h1.size,
7
- h2 = allTypographyVariants.h2.size,
8
- h3 = allTypographyVariants.h3.size,
9
- h4 = allTypographyVariants.h4.size,
10
- h5 = allTypographyVariants.h5.size,
11
- h6 = allTypographyVariants.h6.size,
12
- subtitle1 = allTypographyVariants.subtitle1.size,
13
- subtitle2 = allTypographyVariants.subtitle2.size,
14
- body = allTypographyVariants.body.size,
15
- caption = allTypographyVariants.caption.size,
16
- overline = allTypographyVariants.overline.size,
17
- button = allTypographyVariants.button.size,
4
+ h1 = 28,
5
+ h2 = 22,
6
+ h3 = 18,
7
+ body = baseFontSize,
8
+ caption = 12,
9
+ overline = 10,
10
+ button = 13,
18
11
  }
19
12
  return {
20
13
  baseFontSize = baseFontSize,
@@ -1,10 +1,7 @@
1
1
  import { FontFamilyOptions } from "./FontFamilyOptions";
2
2
  import { FontSizeOptions } from "./FontSizeOptions";
3
- import { FontSizeVariant } from "./FontSizeOptions";
4
- import { TypographyVariantSpec } from "./Variants";
5
3
  interface ThemeTypography {
6
4
  fontSizes: FontSizeOptions;
7
5
  fontFamilies: FontFamilyOptions;
8
- variants: Record<FontSizeVariant, TypographyVariantSpec>;
9
6
  }
10
7
  export default ThemeTypography;
@@ -1,17 +1,18 @@
1
- import { FontFamilyVariant } from "./FontFamilyOptions";
2
- import { FontSizeVariant } from "./FontSizeOptions";
3
- export interface TypographyVariantSpec {
4
- size: number;
5
- family: FontFamilyVariant;
6
- /** Approx CSS weight; Roblox TextLabel uses `family` / FontFace */
7
- weight: number;
8
- }
9
- export type TypographyVariants = FontSizeVariant;
10
- /** Size + family + weight per typography variant. */
11
- export declare const allTypographyVariants: Record<FontSizeVariant, TypographyVariantSpec>;
12
- /** @deprecated prefer allTypographyVariants[*].weight */
13
- export declare const TypographyWeights: {
1
+ import { Tokens } from "../tokens/Tokens";
2
+ export type TypographyTokens = {
3
+ [key in Tokens]: string;
4
+ };
5
+ export interface TypographyWeights {
14
6
  title: number;
15
7
  heading: number;
16
8
  body: number;
17
- };
9
+ xl?: number;
10
+ lg?: number;
11
+ md?: number;
12
+ sm?: number;
13
+ xs?: number;
14
+ default?: number;
15
+ }
16
+ export type TypographyVariants = keyof TypographyWeights;
17
+ export declare const TypographyWeights: TypographyWeights;
18
+ export declare const TypographyTokens: TypographyTokens;
@@ -1,74 +1,24 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
- --* Size + family + weight per typography variant.
3
- local allTypographyVariants = {
4
- h1 = {
5
- size = 28,
6
- family = "bold",
7
- weight = 700,
8
- },
9
- h2 = {
10
- size = 22,
11
- family = "bold",
12
- weight = 700,
13
- },
14
- h3 = {
15
- size = 18,
16
- family = "semibold",
17
- weight = 600,
18
- },
19
- h4 = {
20
- size = 16,
21
- family = "semibold",
22
- weight = 600,
23
- },
24
- h5 = {
25
- size = 14,
26
- family = "semibold",
27
- weight = 600,
28
- },
29
- h6 = {
30
- size = 14,
31
- family = "semibold",
32
- weight = 600,
33
- },
34
- subtitle1 = {
35
- size = 16,
36
- family = "default",
37
- weight = 400,
38
- },
39
- subtitle2 = {
40
- size = 14,
41
- family = "semibold",
42
- weight = 600,
43
- },
44
- body = {
45
- size = 14,
46
- family = "default",
47
- weight = 400,
48
- },
49
- button = {
50
- size = 13,
51
- family = "semibold",
52
- weight = 600,
53
- },
54
- caption = {
55
- size = 12,
56
- family = "default",
57
- weight = 400,
58
- },
59
- overline = {
60
- size = 10,
61
- family = "default",
62
- weight = 400,
63
- },
64
- }
65
- --* @deprecated prefer allTypographyVariants[*].weight
66
2
  local TypographyWeights = {
67
- title = 700,
68
- heading = 600,
69
- body = 400,
3
+ title = 800,
4
+ heading = 500,
5
+ body = 300,
6
+ }
7
+ local TypographyTokens = {
8
+ [120] = "64px",
9
+ [110] = "48px",
10
+ [100] = "40px",
11
+ [90] = "32px",
12
+ [80] = "28px",
13
+ [70] = "24px",
14
+ [60] = "20px",
15
+ [50] = "18px",
16
+ [40] = "16px",
17
+ [30] = "14px",
18
+ [20] = "12px",
19
+ [10] = "10px",
70
20
  }
71
21
  return {
72
- allTypographyVariants = allTypographyVariants,
22
+ TypographyTokens = TypographyTokens,
73
23
  TypographyWeights = TypographyWeights,
74
24
  }
@@ -6,11 +6,9 @@ local BORDER_RADIUS = _NumberConstants.BORDER_RADIUS
6
6
  local CONTENT_WIDTH = _NumberConstants.CONTENT_WIDTH
7
7
  local ICON_SIZES = _NumberConstants.ICON_SIZES
8
8
  local PADDING_BASE = _NumberConstants.PADDING_BASE
9
- local PILL_SCALE = _NumberConstants.PILL_SCALE
10
9
  local SPACING_BASE = _NumberConstants.SPACING_BASE
11
10
  local DEFAULT_BORDERS = TS.import(script, script.Parent.Parent, "constants", "ColorConstants").DEFAULT_BORDERS
12
11
  local allFontFamilies = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontFamilies").allFontFamilies
13
- local allTypographyVariants = TS.import(script, script.Parent.Parent, "interfaces", "typography", "Variants").allTypographyVariants
14
12
  local createDarkPalette = TS.import(script, script.Parent, "createPalette").createDarkPalette
15
13
  local DarkTheme = {
16
14
  type = "Dark",
@@ -30,12 +28,10 @@ local DarkTheme = {
30
28
  },
31
29
  shape = {
32
30
  borderRadius = BORDER_RADIUS,
33
- pillScale = PILL_SCALE,
34
31
  },
35
32
  typography = {
36
33
  fontSizes = allFontSizes,
37
34
  fontFamilies = allFontFamilies,
38
- variants = allTypographyVariants,
39
35
  },
40
36
  options = {
41
37
  constants = {
@@ -6,11 +6,9 @@ local BORDER_RADIUS = _NumberConstants.BORDER_RADIUS
6
6
  local CONTENT_WIDTH = _NumberConstants.CONTENT_WIDTH
7
7
  local ICON_SIZES = _NumberConstants.ICON_SIZES
8
8
  local PADDING_BASE = _NumberConstants.PADDING_BASE
9
- local PILL_SCALE = _NumberConstants.PILL_SCALE
10
9
  local SPACING_BASE = _NumberConstants.SPACING_BASE
11
10
  local DEFAULT_BORDERS = TS.import(script, script.Parent.Parent, "constants", "ColorConstants").DEFAULT_BORDERS
12
11
  local allFontFamilies = TS.import(script, script.Parent.Parent, "interfaces", "typography", "FontFamilies").allFontFamilies
13
- local allTypographyVariants = TS.import(script, script.Parent.Parent, "interfaces", "typography", "Variants").allTypographyVariants
14
12
  local createLightPalette = TS.import(script, script.Parent, "createPalette").createLightPalette
15
13
  local LightTheme = {
16
14
  type = "Light",
@@ -30,12 +28,10 @@ local LightTheme = {
30
28
  },
31
29
  shape = {
32
30
  borderRadius = BORDER_RADIUS,
33
- pillScale = PILL_SCALE,
34
31
  },
35
32
  typography = {
36
33
  fontSizes = allFontSizes,
37
34
  fontFamilies = allFontFamilies,
38
- variants = allTypographyVariants,
39
35
  },
40
36
  options = {
41
37
  constants = {
@@ -4,7 +4,6 @@ export interface AccordionProps {
4
4
  title: string;
5
5
  open?: boolean;
6
6
  defaultOpen?: boolean;
7
- disabled?: boolean;
8
7
  onChange?: (open: boolean) => void;
9
8
  children?: React.ReactNode;
10
9
  }
@@ -3,17 +3,13 @@ local TS = _G[script]
3
3
  local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local React = _react
5
5
  local useState = _react.useState
6
- local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
7
- local _accordionOpen = TS.import(script, script.Parent, "accordionOpen")
8
- local accordionGlyph = _accordionOpen.accordionGlyph
9
- local accordionOpen = _accordionOpen.accordionOpen
6
+ local accordionOpen = TS.import(script, script.Parent, "accordionOpen").accordionOpen
10
7
  local useAccordionStyles = TS.import(script, script.Parent, "Accordion.styles").default
11
8
  local function Accordion(props)
12
9
  local _binding = props
13
10
  local title = _binding.title
14
11
  local controlled = _binding.open
15
12
  local defaultOpen = _binding.defaultOpen
16
- local disabled = _binding.disabled
17
13
  local onChange = _binding.onChange
18
14
  local children = _binding.children
19
15
  local className = _binding.className
@@ -24,12 +20,8 @@ local function Accordion(props)
24
20
  local open = accordionOpen(localOpen, controlled)
25
21
  local styles = useAccordionStyles({
26
22
  open = open,
27
- disabled = disabled,
28
23
  })
29
24
  local toggle = function()
30
- if disabled == true then
31
- return nil
32
- end
33
25
  local nextOpen = not open
34
26
  if controlled == nil then
35
27
  setLocalOpen(nextOpen)
@@ -84,24 +76,16 @@ local function Accordion(props)
84
76
  _attributes_5[_k] = _v
85
77
  end
86
78
  _attributes_5.Text = title
87
- local _exp_3 = React.createElement("textlabel", _attributes_5)
79
+ local _exp_3 = React.createElement("textbutton", _attributes_3, _exp_2, React.createElement("textlabel", _attributes_5))
88
80
  local _attributes_6 = {
89
- key = "Icon",
90
- }
91
- for _k, _v in styles.icon do
92
- _attributes_6[_k] = _v
93
- end
94
- _attributes_6.Image = if accordionGlyph(open) == "expanded" then Icons.Expanded else Icons.Collapsed
95
- local _exp_4 = React.createElement("textbutton", _attributes_3, _exp_2, _exp_3, React.createElement("imagelabel", _attributes_6))
96
- local _attributes_7 = {
97
81
  key = "Body",
98
82
  }
99
83
  for _k, _v in styles.body do
100
- _attributes_7[_k] = _v
84
+ _attributes_6[_k] = _v
101
85
  end
102
- local _attributes_8 = table.clone(styles.padding)
103
- setmetatable(_attributes_8, nil)
104
- return React.createElement("frame", _attributes, _exp, _exp_1, _exp_4, React.createElement("frame", _attributes_7, React.createElement("uipadding", _attributes_8), children))
86
+ local _attributes_7 = table.clone(styles.padding)
87
+ setmetatable(_attributes_7, nil)
88
+ return React.createElement("frame", _attributes, _exp, _exp_1, _exp_3, React.createElement("frame", _attributes_6, React.createElement("uipadding", _attributes_7), children))
105
89
  end
106
90
  local default = Accordion
107
91
  return {
@@ -1,5 +1,4 @@
1
1
  declare const useAccordionStyles: (props: {
2
2
  open?: boolean;
3
- disabled?: boolean;
4
3
  }) => import("../../../../theme/index").ClassNameMap<string>;
5
4
  export default useAccordionStyles;
@@ -8,7 +8,6 @@ local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
8
8
  if open == nil then
9
9
  open = false
10
10
  end
11
- local disabled = _param.disabled
12
11
  return createStyles({
13
12
  root = {
14
13
  AutomaticSize = Enum.AutomaticSize.Y,
@@ -28,30 +27,19 @@ local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
28
27
  BorderSizePixel = 0,
29
28
  AutoButtonColor = false,
30
29
  Text = "",
31
- Active = disabled ~= true,
32
- Selectable = disabled ~= true,
30
+ Active = true,
31
+ Selectable = true,
33
32
  },
34
33
  title = {
35
- AutomaticSize = Enum.AutomaticSize.Y,
36
- Size = UDim2.new(1, -theme.spacing.calc(4), 0, 0),
34
+ AutomaticSize = Enum.AutomaticSize.XY,
35
+ Size = UDim2.fromScale(0, 0),
37
36
  BackgroundTransparency = 1,
38
37
  BorderSizePixel = 0,
39
38
  Font = theme.typography.fontFamilies.default,
40
39
  TextSize = theme.typography.fontSizes.body,
41
40
  TextColor3 = theme.palette.text.primary,
42
- TextTransparency = if disabled == true then 0.5 else 0,
43
41
  TextXAlignment = Enum.TextXAlignment.Left,
44
42
  },
45
- icon = {
46
- Size = UDim2.fromOffset(theme.options.constants.iconSizes.small, theme.options.constants.iconSizes.small),
47
- Position = UDim2.new(1, -theme.padding.calc(1.5), 0.5, 0),
48
- AnchorPoint = Vector2.new(1, 0.5),
49
- BackgroundTransparency = 1,
50
- BorderSizePixel = 0,
51
- ScaleType = Enum.ScaleType.Fit,
52
- ImageColor3 = theme.palette.text.primary,
53
- ImageTransparency = if disabled == true then 0.5 else 0,
54
- },
55
43
  padding = {
56
44
  PaddingTop = UDim.new(0, theme.padding.calc(1)),
57
45
  PaddingBottom = UDim.new(0, theme.padding.calc(1)),
@@ -1,2 +1 @@
1
1
  export declare function accordionOpen(expanded: boolean | undefined, controlled: boolean | undefined): boolean;
2
- export declare function accordionGlyph(open?: boolean): "expanded" | "collapsed";
@@ -5,10 +5,6 @@ local function accordionOpen(expanded, controlled)
5
5
  end
6
6
  return expanded == true
7
7
  end
8
- local function accordionGlyph(open)
9
- return if open == true then "expanded" else "collapsed"
10
- end
11
8
  return {
12
9
  accordionOpen = accordionOpen,
13
- accordionGlyph = accordionGlyph,
14
10
  }
@@ -5,7 +5,6 @@ export interface AlertProps {
5
5
  title?: string;
6
6
  message: string;
7
7
  onClose?: () => void;
8
- filled?: boolean;
9
8
  }
10
9
  declare function Alert(props: CustomizedProps<Frame, AlertProps>): JSX.Element;
11
10
  export default Alert;
@@ -9,16 +9,12 @@ local function Alert(props)
9
9
  local title = _binding.title
10
10
  local message = _binding.message
11
11
  local onClose = _binding.onClose
12
- local filled = _binding.filled
13
12
  local className = _binding.className
14
13
  local sx = _binding.sx
15
14
  local id = _binding.id
16
15
  local ref = _binding.ref
17
- local dismissible = onClose ~= nil
18
16
  local styles = useAlertStyles({
19
17
  severity = severity,
20
- dismissible = dismissible,
21
- filled = filled,
22
18
  })
23
19
  local _attributes = {}
24
20
  local _condition = id
@@ -49,50 +45,45 @@ local function Alert(props)
49
45
  local _attributes_3 = table.clone(styles.stroke)
50
46
  setmetatable(_attributes_3, nil)
51
47
  local _exp_2 = React.createElement("uistroke", _attributes_3)
52
- local _condition_1 = dismissible
48
+ local _attributes_4 = table.clone(styles.layout)
49
+ setmetatable(_attributes_4, nil)
50
+ local _exp_3 = React.createElement("uilistlayout", _attributes_4)
51
+ local _condition_1 = title ~= nil and title ~= ""
53
52
  if _condition_1 then
54
- local _attributes_4 = {
55
- key = "Close",
53
+ local _attributes_5 = {
54
+ key = "Title",
56
55
  }
57
- for _k, _v in styles.close do
58
- _attributes_4[_k] = _v
56
+ for _k, _v in styles.title do
57
+ _attributes_5[_k] = _v
59
58
  end
60
- _attributes_4.Image = tostring(Icons.Close)
61
- _attributes_4.Event = {
62
- Activated = function()
63
- return onClose()
64
- end,
65
- }
66
- _condition_1 = (React.createElement("imagebutton", _attributes_4))
59
+ _attributes_5.Text = title
60
+ _condition_1 = React.createElement("textlabel", _attributes_5)
67
61
  end
68
- local _attributes_4 = {
69
- key = "Body",
62
+ local _attributes_5 = {
63
+ key = "Message",
70
64
  }
71
- for _k, _v in styles.body do
72
- _attributes_4[_k] = _v
65
+ for _k, _v in styles.message do
66
+ _attributes_5[_k] = _v
73
67
  end
74
- local _attributes_5 = table.clone(styles.layout)
75
- setmetatable(_attributes_5, nil)
76
- local _exp_3 = React.createElement("uilistlayout", _attributes_5)
77
- local _condition_2 = title ~= nil and title ~= ""
68
+ _attributes_5.Text = message
69
+ local _exp_4 = React.createElement("textlabel", _attributes_5)
70
+ local _condition_2 = onClose ~= nil
78
71
  if _condition_2 then
79
72
  local _attributes_6 = {
80
- key = "Title",
73
+ key = "Close",
81
74
  }
82
- for _k, _v in styles.title do
75
+ for _k, _v in styles.close do
83
76
  _attributes_6[_k] = _v
84
77
  end
85
- _attributes_6.Text = title
86
- _condition_2 = React.createElement("textlabel", _attributes_6)
87
- end
88
- local _attributes_6 = {
89
- key = "Message",
90
- }
91
- for _k, _v in styles.message do
92
- _attributes_6[_k] = _v
78
+ _attributes_6.Image = tostring(Icons.Close)
79
+ _attributes_6.Event = {
80
+ Activated = function()
81
+ return onClose()
82
+ end,
83
+ }
84
+ _condition_2 = (React.createElement("imagebutton", _attributes_6))
93
85
  end
94
- _attributes_6.Text = message
95
- return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, _condition_1, React.createElement("frame", _attributes_4, _exp_3, _condition_2, React.createElement("textlabel", _attributes_6)))
86
+ return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, _exp_3, _condition_1, _exp_4, _condition_2)
96
87
  end
97
88
  local default = Alert
98
89
  return {
@@ -1,7 +1,5 @@
1
1
  import { AlertSeverity } from "./alertTone";
2
2
  declare const useAlertStyles: (props: {
3
3
  severity?: AlertSeverity;
4
- dismissible?: boolean;
5
- filled?: boolean;
6
4
  }) => import("../../../../theme/index").ClassNameMap<string>;
7
5
  export default useAlertStyles;
@@ -6,15 +6,12 @@ local createStyles = _theme.createStyles
6
6
  local alertSeverity = TS.import(script, script.Parent, "alertTone").alertSeverity
7
7
  local useAlertStyles = componentStyles("Alert", function(theme, _param)
8
8
  local severity = _param.severity
9
- local dismissible = _param.dismissible
10
- local filled = _param.filled
11
9
  local tone = theme.palette.status[alertSeverity(severity)]
12
- local closeSize = theme.spacing.calc(2)
13
10
  local _object = {
14
11
  root = {
15
12
  AutomaticSize = Enum.AutomaticSize.Y,
16
13
  Size = UDim2.new(1, 0, 0, 0),
17
- BackgroundColor3 = if filled == true then tone.main else tone.surface,
14
+ BackgroundColor3 = tone.surface,
18
15
  BorderSizePixel = 0,
19
16
  },
20
17
  padding = {
@@ -27,17 +24,11 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
27
24
  CornerRadius = UDim.new(0, theme.shape.borderRadius),
28
25
  },
29
26
  stroke = {
30
- Color = if filled == true then tone.main else tone.border,
27
+ Color = tone.border,
31
28
  Thickness = 1,
32
- Transparency = if filled == true then 1 else 0,
29
+ Transparency = 0,
33
30
  ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
34
31
  },
35
- body = {
36
- AutomaticSize = Enum.AutomaticSize.Y,
37
- Size = UDim2.new(1, if dismissible == true then -(closeSize + theme.padding.calc(1)) else 0, 0, 0),
38
- BackgroundTransparency = 1,
39
- BorderSizePixel = 0,
40
- },
41
32
  layout = {
42
33
  FillDirection = Enum.FillDirection.Vertical,
43
34
  HorizontalAlignment = Enum.HorizontalAlignment.Left,
@@ -52,7 +43,7 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
52
43
  BorderSizePixel = 0,
53
44
  Font = theme.typography.fontFamilies.default,
54
45
  TextSize = theme.typography.fontSizes.body,
55
- TextColor3 = if filled == true then tone.on else tone.main,
46
+ TextColor3 = tone.main,
56
47
  TextXAlignment = Enum.TextXAlignment.Left,
57
48
  LayoutOrder = 1,
58
49
  },
@@ -71,18 +62,18 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
71
62
  _condition = theme.typography.fontSizes.body
72
63
  end
73
64
  _object_1[_left_1] = _condition
74
- _object_1.TextColor3 = if filled == true then tone.on else theme.palette.text.primary
65
+ _object_1.TextColor3 = theme.palette.text.primary
75
66
  _object_1.TextXAlignment = Enum.TextXAlignment.Left
76
67
  _object_1.TextWrapped = true
77
68
  _object_1.LayoutOrder = 2
78
69
  _object[_left] = _object_1
79
70
  _object.close = {
80
- Size = UDim2.fromOffset(closeSize, closeSize),
81
- Position = UDim2.new(1, 0, 0, 0),
71
+ Size = UDim2.fromOffset(theme.spacing.calc(2), theme.spacing.calc(2)),
72
+ Position = UDim2.new(1, -theme.padding.calc(1), 0, theme.padding.calc(1)),
82
73
  AnchorPoint = Vector2.new(1, 0),
83
74
  BackgroundTransparency = 1,
84
75
  BorderSizePixel = 0,
85
- ImageColor3 = if filled == true then tone.on else theme.palette.text.secondary,
76
+ ImageColor3 = theme.palette.text.secondary,
86
77
  ScaleType = Enum.ScaleType.Fit,
87
78
  ZIndex = 2,
88
79
  }
@@ -1,10 +1,9 @@
1
1
  import React from "@rbxts/react";
2
2
  import { CustomizedProps } from "../../../../theme/index";
3
- import { AppBarColor, AppBarElevation } from "./AppBar.styles";
3
+ import { AppBarElevation } from "./AppBar.styles";
4
4
  export interface AppBarProps {
5
5
  title?: string;
6
6
  elevation?: AppBarElevation;
7
- color?: AppBarColor;
8
7
  children?: React.ReactNode;
9
8
  }
10
9
  declare function AppBar(props: CustomizedProps<Frame, AppBarProps>): JSX.Element;
@@ -13,10 +13,6 @@ local function AppBar(props)
13
13
  if elevation == nil then
14
14
  elevation = "raised"
15
15
  end
16
- local color = _binding.color
17
- if color == nil then
18
- color = "default"
19
- end
20
16
  local children = _binding.children
21
17
  local className = _binding.className
22
18
  local sx = _binding.sx
@@ -24,7 +20,6 @@ local function AppBar(props)
24
20
  local ref = _binding.ref
25
21
  local styles = useAppBarStyles({
26
22
  elevation = elevation,
27
- color = color,
28
23
  hasActions = children ~= nil,
29
24
  })
30
25
  local _attributes = {}
@@ -1,8 +1,6 @@
1
1
  export type AppBarElevation = "flat" | "raised";
2
- export type AppBarColor = "default" | "primary";
3
2
  declare const useAppBarStyles: (props: {
4
3
  elevation?: AppBarElevation;
5
- color?: AppBarColor;
6
4
  hasActions?: boolean;
7
5
  }) => import("../../../../theme/index").ClassNameMap<string>;
8
6
  export default useAppBarStyles;
@@ -8,10 +8,6 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
8
8
  if elevation == nil then
9
9
  elevation = "raised"
10
10
  end
11
- local color = _param.color
12
- if color == nil then
13
- color = "default"
14
- end
15
11
  local hasActions = _param.hasActions
16
12
  if hasActions == nil then
17
13
  hasActions = false
@@ -19,7 +15,7 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
19
15
  local _object = {
20
16
  root = {
21
17
  Size = UDim2.new(1, 0, 0, theme.spacing.calc(7)),
22
- BackgroundColor3 = if color == "primary" then theme.palette.primary.main elseif elevation == "raised" then theme.palette.surface.elevated else theme.palette.surface.paper,
18
+ BackgroundColor3 = if elevation == "raised" then theme.palette.surface.elevated else theme.palette.surface.paper,
23
19
  BorderSizePixel = 0,
24
20
  ZIndex = 11000,
25
21
  },
@@ -41,7 +37,7 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
41
37
  _condition = theme.typography.fontSizes.body
42
38
  end
43
39
  _object_1[_left_1] = _condition
44
- _object_1.TextColor3 = if color == "primary" then theme.palette.primary.on else theme.palette.text.primary
40
+ _object_1.TextColor3 = theme.palette.text.primary
45
41
  _object_1.TextXAlignment = Enum.TextXAlignment.Left
46
42
  _object_1.TextYAlignment = Enum.TextYAlignment.Center
47
43
  _object_1.TextTruncate = Enum.TextTruncate.AtEnd