@rbxts/uiblox 0.1.13 → 0.1.15

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 (127) hide show
  1. package/README.md +10 -10
  2. package/out/index.d.ts +2 -0
  3. package/out/theme/components/ThemeProducer.d.ts +7 -0
  4. package/out/theme/components/ThemeProvider.d.ts +7 -0
  5. package/out/theme/components/ThemeWrapper.d.ts +7 -0
  6. package/out/theme/components/index.d.ts +5 -0
  7. package/out/theme/constants/NumberConstants.d.ts +6 -0
  8. package/out/theme/constants/ThemeConstants.d.ts +5 -0
  9. package/out/theme/constants/index.d.ts +2 -0
  10. package/out/theme/index.d.ts +19 -0
  11. package/out/theme/interfaces/iconSizes/IconSizes.d.ts +5 -0
  12. package/out/theme/interfaces/iconSizes/index.d.ts +1 -0
  13. package/out/theme/interfaces/index.d.ts +13 -0
  14. package/out/theme/interfaces/palette/Palette.d.ts +26 -0
  15. package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +4 -0
  16. package/out/theme/interfaces/palette/colorTokens/index.d.ts +1 -0
  17. package/out/theme/interfaces/palette/colors/Blue.d.ts +3 -0
  18. package/out/theme/interfaces/palette/colors/Colors.d.ts +42 -0
  19. package/out/theme/interfaces/palette/colors/Common.d.ts +6 -0
  20. package/out/theme/interfaces/palette/colors/Dark.d.ts +3 -0
  21. package/out/theme/interfaces/palette/colors/Gray.d.ts +3 -0
  22. package/out/theme/interfaces/palette/colors/Green.d.ts +3 -0
  23. package/out/theme/interfaces/palette/colors/Light.d.ts +3 -0
  24. package/out/theme/interfaces/palette/colors/Magenta.d.ts +3 -0
  25. package/out/theme/interfaces/palette/colors/Orange.d.ts +3 -0
  26. package/out/theme/interfaces/palette/colors/Purple.d.ts +3 -0
  27. package/out/theme/interfaces/palette/colors/Red.d.ts +3 -0
  28. package/out/theme/interfaces/palette/colors/Turquoise.d.ts +3 -0
  29. package/out/theme/interfaces/palette/colors/Yellow.d.ts +3 -0
  30. package/out/theme/interfaces/palette/colors/index.d.ts +13 -0
  31. package/out/theme/interfaces/palette/index.d.ts +3 -0
  32. package/out/theme/interfaces/spacing/Borders.d.ts +4 -0
  33. package/out/theme/interfaces/spacing/Padding.d.ts +4 -0
  34. package/out/theme/interfaces/spacing/Shape.d.ts +3 -0
  35. package/out/theme/interfaces/spacing/Spacing.d.ts +4 -0
  36. package/out/theme/interfaces/spacing/index.d.ts +4 -0
  37. package/out/theme/interfaces/theme/Theme.d.ts +14 -0
  38. package/out/theme/interfaces/theme/ThemeConstants.d.ts +25 -0
  39. package/out/theme/interfaces/theme/ThemeOptions.d.ts +4 -0
  40. package/out/theme/interfaces/theme/index.d.ts +3 -0
  41. package/out/theme/interfaces/tokens/Tokens.d.ts +1 -0
  42. package/out/theme/interfaces/tokens/index.d.ts +1 -0
  43. package/out/theme/interfaces/typography/FontFamilies.d.ts +2 -0
  44. package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +3 -0
  45. package/out/theme/interfaces/typography/FontSizeOptions.d.ts +3 -0
  46. package/out/theme/interfaces/typography/FontSizes.d.ts +3 -0
  47. package/out/theme/interfaces/typography/ThemeTypography.d.ts +7 -0
  48. package/out/theme/interfaces/typography/Variants.d.ts +18 -0
  49. package/out/theme/interfaces/typography/index.d.ts +8 -0
  50. package/out/theme/styles/index.d.ts +5 -0
  51. package/out/theme/styles/types/WriteableStyle.d.ts +1 -0
  52. package/out/theme/styles/types/index.d.ts +2 -0
  53. package/out/theme/styles/types/styles.d.ts +2 -0
  54. package/out/theme/styles/utilities/classNames.d.ts +7 -0
  55. package/out/theme/styles/utilities/classNames.luau +15 -1
  56. package/out/theme/styles/utilities/createStyles.d.ts +3 -0
  57. package/out/theme/styles/utilities/index.d.ts +3 -0
  58. package/out/theme/styles/utilities/makeStyles.d.ts +7 -0
  59. package/out/theme/themes/DarkTheme.d.ts +3 -0
  60. package/out/theme/themes/LightTheme.d.ts +3 -0
  61. package/out/theme/themes/index.d.ts +3 -0
  62. package/out/theme/types/index.d.ts +7 -0
  63. package/out/theme/types/types.d.ts +12 -0
  64. package/out/theme/utilites/Color3FromHex.d.ts +2 -0
  65. package/out/theme/utilites/index.d.ts +1 -0
  66. package/out/ui/constants/ImageConstants.d.ts +2 -0
  67. package/out/ui/constants/LayoutConstants.d.ts +1 -0
  68. package/out/ui/constants/index.d.ts +2 -0
  69. package/out/ui/enums/Directions.d.ts +8 -0
  70. package/out/ui/enums/Icons.d.ts +40 -0
  71. package/out/ui/enums/Orientations.d.ts +4 -0
  72. package/out/ui/enums/index.d.ts +3 -0
  73. package/out/ui/index.d.ts +34 -0
  74. package/out/ui/packages/button/components/Button.d.ts +24 -0
  75. package/out/ui/packages/button/components/Button.styles.d.ts +3 -0
  76. package/out/ui/packages/button/index.d.ts +6 -0
  77. package/out/ui/packages/button/types/ButtonColor.d.ts +1 -0
  78. package/out/ui/packages/button/types/ButtonSize.d.ts +1 -0
  79. package/out/ui/packages/button/types/ButtonVariant.d.ts +1 -0
  80. package/out/ui/packages/button/types/index.d.ts +3 -0
  81. package/out/ui/packages/divider/components/Divider.d.ts +13 -0
  82. package/out/ui/packages/divider/components/Divider.styles.d.ts +3 -0
  83. package/out/ui/packages/divider/index.d.ts +3 -0
  84. package/out/ui/packages/icon/components/Icon.d.ts +10 -0
  85. package/out/ui/packages/icon/components/Icon.styles.d.ts +3 -0
  86. package/out/ui/packages/icon/index.d.ts +3 -0
  87. package/out/ui/packages/iconButton/components/IconButton.d.ts +12 -0
  88. package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +3 -0
  89. package/out/ui/packages/iconButton/index.d.ts +3 -0
  90. package/out/ui/packages/index.d.ts +11 -0
  91. package/out/ui/packages/input/components/Input.d.ts +22 -0
  92. package/out/ui/packages/input/components/Input.styles.d.ts +3 -0
  93. package/out/ui/packages/input/index.d.ts +6 -0
  94. package/out/ui/packages/input/types/InputColor.d.ts +1 -0
  95. package/out/ui/packages/input/types/InputMargin.d.ts +1 -0
  96. package/out/ui/packages/input/types/InputVariant.d.ts +1 -0
  97. package/out/ui/packages/input/types/index.d.ts +3 -0
  98. package/out/ui/packages/progressBar/components/ProgressBar.d.ts +7 -0
  99. package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +2 -0
  100. package/out/ui/packages/progressBar/index.d.ts +3 -0
  101. package/out/ui/packages/shadow/components/Shadow.d.ts +2 -0
  102. package/out/ui/packages/shadow/components/Shadow.styles.d.ts +2 -0
  103. package/out/ui/packages/shadow/index.d.ts +2 -0
  104. package/out/ui/packages/sidebar/components/Sidebar.d.ts +8 -0
  105. package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +3 -0
  106. package/out/ui/packages/sidebar/index.d.ts +4 -0
  107. package/out/ui/packages/sidebar/types/SidebarType.d.ts +1 -0
  108. package/out/ui/packages/sidebar/types/index.d.ts +1 -0
  109. package/out/ui/packages/toast/components/Toast.d.ts +10 -0
  110. package/out/ui/packages/toast/components/Toast.styles.d.ts +3 -0
  111. package/out/ui/packages/toast/enums/ToastVariants.d.ts +7 -0
  112. package/out/ui/packages/toast/index.d.ts +5 -0
  113. package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +5 -0
  114. package/out/ui/packages/treeView/components/TreeView.d.ts +11 -0
  115. package/out/ui/packages/treeView/components/TreeView.styles.d.ts +2 -0
  116. package/out/ui/packages/treeView/index.d.ts +6 -0
  117. package/out/ui/packages/treeView/interfaces/Branch.d.ts +6 -0
  118. package/out/ui/packages/treeView/interfaces/Leaf.d.ts +4 -0
  119. package/out/ui/packages/treeView/interfaces/Tree.d.ts +5 -0
  120. package/out/ui/packages/typography/components/Typography.d.ts +18 -0
  121. package/out/ui/packages/typography/components/Typography.styles.d.ts +3 -0
  122. package/out/ui/packages/typography/index.d.ts +6 -0
  123. package/out/ui/packages/typography/types/TypographyAlignment.d.ts +1 -0
  124. package/out/ui/packages/typography/types/TypographyColor.d.ts +1 -0
  125. package/out/ui/packages/typography/types/TypographyDisplay.d.ts +1 -0
  126. package/out/ui/packages/typography/types/index.d.ts +3 -0
  127. package/package.json +1 -1
package/README.md CHANGED
@@ -36,12 +36,12 @@ How does it do this? Well, there are two main exports from this package:
36
36
  - An extensible Theme type + default Dark (default) and Light themes
37
37
  - ... Light theme palette is a WIP
38
38
  - makeStyles/createStyles utilities to serve up Instance-extended property
39
- tables that can be applied to your Roact Components
40
- - ThemeProvider which can wrap your application and uses Rodux to tell
39
+ tables that can be applied to your React Components
40
+ - ThemeProvider which can wrap your application and uses Reflex to tell
41
41
  sub-components which theme to style off of (via makeStyles)
42
- - Uses Rodux
42
+ - Uses Reflex
43
43
  - @rbxts/uiblox -> ui
44
- - Packaged and reusable typed Roact components
44
+ - Packaged and reusable typed React components
45
45
 
46
46
  # How to use
47
47
 
@@ -65,10 +65,10 @@ You can house all of your components within shared.
65
65
  #### src/shared/ui/app/App.tsx
66
66
 
67
67
  The top-level class for our UI. Loads the actual ApplLayout into ScreenGui. This
68
- is what we later pass to `Roact.mount()`.
68
+ is what we later pass to `React.mount()`.
69
69
 
70
70
  ```javascript
71
- import Roact, { Component } from "@rbxts/roact";
71
+ import React, { Component } from "@rbxts/react";
72
72
 
73
73
  class App extends Component {
74
74
  render() {
@@ -94,7 +94,7 @@ You can also choose to create your own theme with the `Theme` interface exported
94
94
  from `@rbxts/uiblox`.
95
95
 
96
96
  ```javascript
97
- import Roact, { Component } from "@rbxts/roact";
97
+ import React, { Component } from "@rbxts/react";
98
98
  import { Storyblox } from "shared/ui/storyblox";
99
99
  import { DarkTheme, ThemeProvider } from "@rbxts/uiblox";
100
100
  import usePageLayoutStyles from "./PageLayout.styles";
@@ -205,7 +205,7 @@ Some sample logic for mounting app when player spawns (on client).
205
205
  Mount the App in the LocalPlayer's `PlayerGui`.
206
206
 
207
207
  ```javascript
208
- import Roact, { Tree } from "@rbxts/roact";
208
+ import React, { Tree } from "@rbxts/react";
209
209
  import { Players } from "@rbxts/services";
210
210
  import { App } from "shared/ui/App";
211
211
 
@@ -216,13 +216,13 @@ class AppLoader {
216
216
  const playerGui = Players.LocalPlayer.FindFirstChild("PlayerGui") as PlayerGui;
217
217
 
218
218
  const appComponent = <App />;
219
- this._tree = Roact.mount(appComponent, playerGui, "App");
219
+ this._tree = React.mount(appComponent, playerGui, "App");
220
220
  print("App mounted");
221
221
  }
222
222
 
223
223
  Unmount() {
224
224
  if (this._tree) {
225
- Roact.unmount(this._tree);
225
+ React.unmount(this._tree);
226
226
  print("App unmounted");
227
227
  }
228
228
  }
package/out/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./theme/index";
2
+ export * from "./ui/index";
@@ -0,0 +1,7 @@
1
+ import { Theme } from "../interfaces/theme/index";
2
+ import { InferState } from "@rbxts/reflex";
3
+ export declare const themeProducer: import("@rbxts/reflex").Producer<Theme, {
4
+ setTheme: (_state: Theme, theme: Theme) => Theme;
5
+ }>;
6
+ export type ThemeProducer = typeof themeProducer;
7
+ export type ThemeState = InferState<ThemeProducer>;
@@ -0,0 +1,7 @@
1
+ import { Theme } from "../interfaces/theme/index";
2
+ import { CustomizedProps } from "../types/index";
3
+ export interface ThemeProviderProps {
4
+ theme?: Theme;
5
+ }
6
+ declare function ThemeProvider(props: CustomizedProps<Instance, ThemeProviderProps>): JSX.Element;
7
+ export default ThemeProvider;
@@ -0,0 +1,7 @@
1
+ import { Theme } from "../interfaces/theme/index";
2
+ import { CustomizedProps } from "../types/index";
3
+ export interface ThemeWrapperProps {
4
+ theme?: Theme;
5
+ }
6
+ declare function ThemeWrapper(props: CustomizedProps<Instance, ThemeWrapperProps>): JSX.Element;
7
+ export default ThemeWrapper;
@@ -0,0 +1,5 @@
1
+ export { default as ThemeProvider } from "./ThemeProvider";
2
+ export { ThemeProviderProps } from "./ThemeProvider";
3
+ export * from "./ThemeProvider";
4
+ export { ThemeState } from "./ThemeProducer";
5
+ export { ThemeProducer } from "./ThemeProducer";
@@ -0,0 +1,6 @@
1
+ import { IconSizes } from "../interfaces/index";
2
+ export declare const SPACING_BASE = 12;
3
+ export declare const PADDING_BASE = 4;
4
+ export declare const BORDER_RADIUS = 4;
5
+ export declare const CONTENT_WIDTH = 1024;
6
+ export declare const ICON_SIZES: IconSizes;
@@ -0,0 +1,5 @@
1
+ import { Colors } from "../interfaces/palette/colors/index";
2
+ import { Borders } from "../interfaces/spacing/index";
3
+ export declare const DARK_THEME_COLORS: Colors;
4
+ export declare const LIGHT_THEME_COLORS: Colors;
5
+ export declare const DEFAULT_BORDERS: Borders;
@@ -0,0 +1,2 @@
1
+ export * from "./NumberConstants";
2
+ export * from "./ThemeConstants";
@@ -0,0 +1,19 @@
1
+ export { default as Theme } from "./interfaces/theme/Theme";
2
+ export { ThemeProvider } from "./components/index";
3
+ export { ThemeState } from "./components/index";
4
+ export * from "./components/index";
5
+ export * from "./constants/index";
6
+ export * from "./interfaces/index";
7
+ export * from "./styles/index";
8
+ export * from "./themes/index";
9
+ export { default as DefaultTheme } from "./themes/index";
10
+ export { default as DarkTheme } from "./themes/DarkTheme";
11
+ export { default as LightTheme } from "./themes/LightTheme";
12
+ export { CommonProps } from "./types/index";
13
+ export { BaseDefaultProps } from "./types/index";
14
+ export { BaseCustomizedProps } from "./types/index";
15
+ export { DefaultProps } from "./types/index";
16
+ export { CustomizedProps } from "./types/index";
17
+ export { CustomizedRef } from "./types/index";
18
+ export { CustomizedForwardRefComponent } from "./types/index";
19
+ export * from "./utilites/index";
@@ -0,0 +1,5 @@
1
+ export default interface IconSizes {
2
+ small: number;
3
+ medium: number;
4
+ large: number;
5
+ }
@@ -0,0 +1 @@
1
+ export { default as IconSizes } from "./IconSizes";
@@ -0,0 +1,13 @@
1
+ export { IconSizes } from "./iconSizes/index";
2
+ export * from "./palette/index";
3
+ export { Borders } from "./spacing/index";
4
+ export { Padding } from "./spacing/index";
5
+ export { Shape } from "./spacing/index";
6
+ export { Spacing } from "./spacing/index";
7
+ export * from "../styles/index";
8
+ export { Theme } from "./theme/index";
9
+ export { ThemeConstants } from "./theme/index";
10
+ export { ThemeOptions } from "./theme/index";
11
+ export * from "../themes/index";
12
+ export { Tokens } from "./tokens/index";
13
+ export * from "./typography/index";
@@ -0,0 +1,26 @@
1
+ export default interface Palette {
2
+ primary: {
3
+ main: Color3;
4
+ };
5
+ secondary: {
6
+ main: Color3;
7
+ };
8
+ error: {
9
+ main: Color3;
10
+ };
11
+ warning: {
12
+ main: Color3;
13
+ };
14
+ success: {
15
+ main: Color3;
16
+ };
17
+ background: {
18
+ default: Color3;
19
+ paper: Color3;
20
+ };
21
+ divider: Color3;
22
+ text: {
23
+ primary: Color3;
24
+ secondary: Color3;
25
+ };
26
+ }
@@ -0,0 +1,4 @@
1
+ import { Tokens } from "../../../index";
2
+ export type ColorTokens = {
3
+ [key in Tokens]: Color3;
4
+ };
@@ -0,0 +1 @@
1
+ export { ColorTokens } from "./ColorTokens";
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Blue: ColorTokens;
3
+ export default Blue;
@@ -0,0 +1,42 @@
1
+ export default interface Colors {
2
+ backgroundDefault: Color3;
3
+ backgroundContrast: Color3;
4
+ backgroundMuted: Color3;
5
+ backgroundUIDefault: Color3;
6
+ backgroundUIMuted: Color3;
7
+ backgroundUIContrast: Color3;
8
+ UIDefault: Color3;
9
+ UIMuted: Color3;
10
+ UIEmphasis: Color3;
11
+ textDefault: Color3;
12
+ textMuted: Color3;
13
+ textEmphasis: Color3;
14
+ iconDefault: Color3;
15
+ iconEmphasis: Color3;
16
+ iconOnHover: Color3;
17
+ systemPrimaryDefault: Color3;
18
+ systemPrimaryOnHover: Color3;
19
+ systemPrimaryContent: Color3;
20
+ contextualPrimaryDefault: Color3;
21
+ contextualPrimaryOnHover: Color3;
22
+ contextualPrimaryContent: Color3;
23
+ secondaryDefault: Color3;
24
+ secondaryOnHover: Color3;
25
+ secondaryContent: Color3;
26
+ divider: Color3;
27
+ overlay: Color3;
28
+ dropShadow: Color3;
29
+ navigationBar: Color3;
30
+ badge: Color3;
31
+ badgeContent: Color3;
32
+ placeholder: Color3;
33
+ online: Color3;
34
+ offline: Color3;
35
+ alert: Color3;
36
+ success: Color3;
37
+ accent: Color3;
38
+ link: Color3;
39
+ caution: Color3;
40
+ text: Color3;
41
+ background: Color3;
42
+ }
@@ -0,0 +1,6 @@
1
+ export interface CommonColors {
2
+ Black: Color3;
3
+ White: Color3;
4
+ }
5
+ declare const Common: CommonColors;
6
+ export default Common;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Dark: ColorTokens;
3
+ export default Dark;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Gray: ColorTokens;
3
+ export default Gray;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Green: ColorTokens;
3
+ export default Green;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Light: ColorTokens;
3
+ export default Light;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Magenta: ColorTokens;
3
+ export default Magenta;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Orange: ColorTokens;
3
+ export default Orange;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Purple: ColorTokens;
3
+ export default Purple;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Red: ColorTokens;
3
+ export default Red;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Turquoise: ColorTokens;
3
+ export default Turquoise;
@@ -0,0 +1,3 @@
1
+ import { ColorTokens } from "../colorTokens/ColorTokens";
2
+ declare const Yellow: ColorTokens;
3
+ export default Yellow;
@@ -0,0 +1,13 @@
1
+ export { default as Blue } from "./Blue";
2
+ export { default as Common } from "./Common";
3
+ export { default as Gray } from "./Gray";
4
+ export { default as Green } from "./Green";
5
+ export { default as Magenta } from "./Magenta";
6
+ export { default as Orange } from "./Orange";
7
+ export { default as Purple } from "./Purple";
8
+ export { default as Red } from "./Red";
9
+ export { default as Turquoise } from "./Turquoise";
10
+ export { default as Yellow } from "./Yellow";
11
+ export { default as Dark } from "./Dark";
12
+ export { default as Light } from "./Light";
13
+ export { default as Colors } from "./Colors";
@@ -0,0 +1,3 @@
1
+ export * from "./colors/index";
2
+ export { ColorTokens } from "./colorTokens/index";
3
+ export { default as Palette } from "./Palette";
@@ -0,0 +1,4 @@
1
+ export default interface Borders {
2
+ default: number;
3
+ divider: number;
4
+ }
@@ -0,0 +1,4 @@
1
+ export default interface Padding {
2
+ default: number;
3
+ calc: (multiple: number) => number;
4
+ }
@@ -0,0 +1,3 @@
1
+ export default interface Shape {
2
+ borderRadius: number;
3
+ }
@@ -0,0 +1,4 @@
1
+ export default interface Spacing {
2
+ default: number;
3
+ calc: (multiple: number) => number;
4
+ }
@@ -0,0 +1,4 @@
1
+ export { default as Borders } from "./Borders";
2
+ export { default as Padding } from "./Padding";
3
+ export { default as Shape } from "./Shape";
4
+ export { default as Spacing } from "./Spacing";
@@ -0,0 +1,14 @@
1
+ import { Palette } from "../palette/index";
2
+ import { Padding, Shape, Spacing } from "../spacing/index";
3
+ import { ThemeTypography } from "../typography/index";
4
+ import ThemeOptions from "./ThemeOptions";
5
+ interface Theme {
6
+ type: string;
7
+ options: ThemeOptions;
8
+ palette: Palette;
9
+ padding: Padding;
10
+ shape: Shape;
11
+ spacing: Spacing;
12
+ typography: ThemeTypography;
13
+ }
14
+ export default Theme;
@@ -0,0 +1,25 @@
1
+ import { Borders } from "../spacing/index";
2
+ import { IconSizes } from "../iconSizes/index";
3
+ import { ColorTokens } from "../palette/colorTokens/index";
4
+ import { CommonColors } from "../palette/colors/Common";
5
+ import { Colors } from "../palette/colors/index";
6
+ export default interface ThemeConstants {
7
+ contentWidth: number;
8
+ iconSizes: IconSizes;
9
+ colors: Colors;
10
+ borders: Borders;
11
+ extendedPalette: {
12
+ Blue: ColorTokens;
13
+ Common: CommonColors;
14
+ Dark: ColorTokens;
15
+ Gray: ColorTokens;
16
+ Green: ColorTokens;
17
+ Light: ColorTokens;
18
+ Magenta: ColorTokens;
19
+ Orange: ColorTokens;
20
+ Purple: ColorTokens;
21
+ Red: ColorTokens;
22
+ Turquoise: ColorTokens;
23
+ Yellow: ColorTokens;
24
+ };
25
+ }
@@ -0,0 +1,4 @@
1
+ import ThemeConstants from "./ThemeConstants";
2
+ export default interface ThemeOptions {
3
+ constants: ThemeConstants;
4
+ }
@@ -0,0 +1,3 @@
1
+ export { default as Theme } from "./Theme";
2
+ export { default as ThemeConstants } from "./ThemeConstants";
3
+ export { default as ThemeOptions } from "./ThemeOptions";
@@ -0,0 +1 @@
1
+ export type Tokens = "120" | "110" | "100" | "90" | "80" | "70" | "60" | "50" | "40" | "30" | "20" | "10";
@@ -0,0 +1 @@
1
+ export { Tokens } from "./Tokens";
@@ -0,0 +1,2 @@
1
+ import { FontFamilyOptions } from "./FontFamilyOptions";
2
+ export declare const allFontFamilies: FontFamilyOptions;
@@ -0,0 +1,3 @@
1
+ export type FontFamilyVariant = "default" | "bold" | "semibold" | "light" | "italics";
2
+ export interface FontFamilyOptions extends Partial<Record<FontFamilyVariant, Required<Enum.Font>>> {
3
+ }
@@ -0,0 +1,3 @@
1
+ export type FontSizeVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body" | "caption" | "button" | "overline";
2
+ export interface FontSizeOptions extends Partial<Record<FontSizeVariant, Required<number>>> {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { FontSizeOptions } from "./FontSizeOptions";
2
+ export declare const baseFontSize = 16;
3
+ export declare const allFontSizes: FontSizeOptions;
@@ -0,0 +1,7 @@
1
+ import { FontFamilyOptions } from "./FontFamilyOptions";
2
+ import { FontSizeOptions } from "./FontSizeOptions";
3
+ interface ThemeTypography {
4
+ fontSizes: FontSizeOptions;
5
+ fontFamilies: FontFamilyOptions;
6
+ }
7
+ export default ThemeTypography;
@@ -0,0 +1,18 @@
1
+ import { Tokens } from "../tokens/Tokens";
2
+ export type TypographyTokens = {
3
+ [key in Tokens]: string;
4
+ };
5
+ export interface TypographyWeights {
6
+ title: number;
7
+ heading: number;
8
+ body: number;
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;
@@ -0,0 +1,8 @@
1
+ export { default as ThemeTypography } from "./ThemeTypography";
2
+ export * from "./FontSizes";
3
+ export * from "./FontFamilies";
4
+ export { FontSizeVariant } from "./FontSizeOptions";
5
+ export { FontSizeOptions } from "./FontSizeOptions";
6
+ export { FontFamilyVariant } from "./FontFamilyOptions";
7
+ export { FontFamilyOptions } from "./FontFamilyOptions";
8
+ export * from "./Variants";
@@ -0,0 +1,5 @@
1
+ export { ClassNameMap } from "./types/index";
2
+ export { WriteableStyle } from "./types/index";
3
+ export { createStyles } from "./utilities/index";
4
+ export { makeStyles } from "./utilities/index";
5
+ export { classNames } from "./utilities/index";
@@ -0,0 +1 @@
1
+ export type WriteableStyle<T extends Instance> = Partial<WritableInstanceProperties<T>>;
@@ -0,0 +1,2 @@
1
+ export { ClassNameMap } from "./styles";
2
+ export { WriteableStyle } from "./WriteableStyle";
@@ -0,0 +1,2 @@
1
+ import { WriteableStyle } from "./WriteableStyle";
2
+ export type ClassNameMap<ClassKey extends string = string, T extends Instance = Instance> = Record<ClassKey, Partial<WriteableStyle<T>>>;
@@ -0,0 +1,7 @@
1
+ import { WriteableStyle } from "../types/WriteableStyle";
2
+ export type GenericStyle = {
3
+ [property: string]: boolean;
4
+ };
5
+ export type ConditionalStyles<T extends Instance> = Map<WriteableStyle<T>, boolean>;
6
+ declare const classNames: <T extends Instance>(conditionalStyles?: ConditionalStyles<T>, ...styles: Array<WriteableStyle<T>>) => WriteableStyle<T>;
7
+ export default classNames;
@@ -22,9 +22,23 @@ local classNames = function(conditionalStyles, ...)
22
22
  end
23
23
  -- ▲ ReadonlyMap.forEach ▲
24
24
  end
25
+ -- ▼ ReadonlyArray.forEach ▼
26
+ local _callback = function(value)
27
+ if value ~= 0 and value == value and value ~= "" and value then
28
+ local _object = table.clone(style)
29
+ setmetatable(_object, nil)
30
+ for _k, _v in value do
31
+ _object[_k] = _v
32
+ end
33
+ style = _object
34
+ end
35
+ end
36
+ for _k, _v in styles do
37
+ _callback(_v, _k - 1, styles)
38
+ end
39
+ -- ▲ ReadonlyArray.forEach ▲
25
40
  local _object = table.clone(style)
26
41
  setmetatable(_object, nil)
27
- _object.styles = styles
28
42
  return _object
29
43
  end
30
44
  local default = classNames
@@ -0,0 +1,3 @@
1
+ import { ClassNameMap } from "../types/styles";
2
+ declare const createStyles: <ClassKey extends string = string>(styles: ClassNameMap<ClassKey>) => ClassNameMap<ClassKey>;
3
+ export default createStyles;
@@ -0,0 +1,3 @@
1
+ export { default as createStyles } from "./createStyles";
2
+ export { default as makeStyles } from "./makeStyles";
3
+ export { default as classNames } from "./classNames";
@@ -0,0 +1,7 @@
1
+ import { Theme } from "../../interfaces/theme/index";
2
+ import { ClassNameMap } from "../types/styles";
3
+ type TMakeStyles<ClassKey extends string = string> = (theme: Theme) => ClassNameMap<ClassKey>;
4
+ type TMakeStylesWithProps<Props, ClassKey extends string = string> = (theme: Theme, props: Props) => ClassNameMap<ClassKey>;
5
+ type TVariantF<Props> = keyof Props extends never ? TMakeStyles : TMakeStylesWithProps<Props>;
6
+ declare const makeStyles: <Props = {}, ClassKey extends string = string>(f: TVariantF<Props>) => keyof Props extends never ? () => ClassNameMap<ClassKey> : (props: Props) => ClassNameMap<ClassKey>;
7
+ export default makeStyles;
@@ -0,0 +1,3 @@
1
+ import { Theme } from "../interfaces/theme/index";
2
+ declare const DarkTheme: Theme;
3
+ export default DarkTheme;
@@ -0,0 +1,3 @@
1
+ import { Theme } from "../interfaces/theme/index";
2
+ declare const LightTheme: Theme;
3
+ export default LightTheme;
@@ -0,0 +1,3 @@
1
+ export { default } from "./DarkTheme";
2
+ export { default as DarkTheme } from "./DarkTheme";
3
+ export { default as LightTheme } from "./LightTheme";
@@ -0,0 +1,7 @@
1
+ export { CommonProps } from "./types";
2
+ export { BaseDefaultProps } from "./types";
3
+ export { BaseCustomizedProps } from "./types";
4
+ export { DefaultProps } from "./types";
5
+ export { CustomizedProps } from "./types";
6
+ export { CustomizedRef } from "./types";
7
+ export { CustomizedForwardRefComponent } from "./types";
@@ -0,0 +1,12 @@
1
+ import React, { PropsWithChildren } from "@rbxts/react";
2
+ import { WriteableStyle } from "../interfaces/index";
3
+ export interface CommonProps<T extends Instance> extends PropsWithChildren {
4
+ className?: WriteableStyle<T>;
5
+ component?: T;
6
+ }
7
+ export type BaseDefaultProps<T extends Instance, P> = CommonProps<T> & P;
8
+ export type BaseCustomizedProps<T extends Instance, P> = BaseDefaultProps<T, P>;
9
+ export type DefaultProps<T extends Instance, P = {}> = BaseDefaultProps<T, P>;
10
+ export type CustomizedProps<T extends Instance, P = {}> = BaseCustomizedProps<T, P>;
11
+ export type CustomizedRef<T extends Instance> = T extends Instance ? any : T extends keyof React.ReactElement<T> ? WritableInstanceProperties<T> : never;
12
+ export type CustomizedForwardRefComponent<D extends Instance, P = {}> = <T extends Instance = D>(props: CustomizedProps<T, P> & WritableInstanceProperties<CustomizedRef<T>>) => React.Element | undefined;
@@ -0,0 +1,2 @@
1
+ declare const Color3FromHex: (hex: string) => Color3;
2
+ export default Color3FromHex;
@@ -0,0 +1 @@
1
+ export { default as Color3FromHex } from "./Color3FromHex";
@@ -0,0 +1,2 @@
1
+ export declare const PRELOADER_LOGO_IMAGE = "rbxassetid://8972054582";
2
+ export declare const PAGE_NOT_FOUND_IMAGE = "rbxassetid://9058373693";
@@ -0,0 +1 @@
1
+ export declare const ROBLOX_UI_OFFSET: number;
@@ -0,0 +1,2 @@
1
+ export * from "./ImageConstants";
2
+ export * from "./LayoutConstants";
@@ -0,0 +1,8 @@
1
+ export declare enum Directions {
2
+ In = "In",
3
+ Out = "Out",
4
+ Left = "Left",
5
+ Right = "Right",
6
+ Up = "Up",
7
+ Down = "Down"
8
+ }