@rbxts/uiblox 0.2.0-alpha.18 → 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.
- package/README.md +0 -2
- package/out/theme/constants/NumberConstants.d.ts +0 -2
- package/out/theme/constants/NumberConstants.luau +0 -3
- package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
- package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
- package/out/theme/interfaces/typography/FontSizes.luau +8 -15
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -3
- package/out/theme/interfaces/typography/Variants.d.ts +15 -14
- package/out/theme/interfaces/typography/Variants.luau +18 -68
- package/out/theme/themes/DarkTheme.luau +0 -4
- package/out/theme/themes/LightTheme.luau +0 -4
- package/out/ui/packages/accordion/components/Accordion.d.ts +0 -1
- package/out/ui/packages/accordion/components/Accordion.luau +6 -22
- package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
- package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
- package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
- package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
- package/out/ui/packages/alert/components/Alert.d.ts +0 -1
- package/out/ui/packages/alert/components/Alert.luau +27 -36
- package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
- package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
- package/out/ui/packages/appBar/components/AppBar.luau +0 -5
- package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
- package/out/ui/packages/appBar/components/AppBar.styles.luau +2 -6
- package/out/ui/packages/autocomplete/components/Autocomplete.luau +0 -8
- package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.luau +12 -20
- package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
- package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
- package/out/ui/packages/badge/components/Badge.d.ts +0 -3
- package/out/ui/packages/badge/components/Badge.luau +8 -23
- package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
- package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +2 -8
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +24 -58
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
- package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
- package/out/ui/packages/breadcrumbs/init.luau +0 -3
- package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +1 -1
- package/out/ui/packages/button/components/Button.luau +5 -9
- package/out/ui/packages/card/components/Card.d.ts +0 -1
- package/out/ui/packages/card/components/Card.luau +0 -2
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/chip/components/Chip.d.ts +1 -4
- package/out/ui/packages/chip/components/Chip.luau +2 -44
- package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -4
- package/out/ui/packages/chip/components/Chip.styles.luau +7 -46
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +2 -13
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
- package/out/ui/packages/dialog/components/Dialog.luau +18 -27
- package/out/ui/packages/divider/components/Divider.d.ts +0 -1
- package/out/ui/packages/divider/components/Divider.luau +0 -48
- package/out/ui/packages/divider/components/Divider.styles.luau +0 -29
- package/out/ui/packages/drawer/components/Drawer.d.ts +0 -1
- package/out/ui/packages/drawer/components/Drawer.luau +1 -4
- package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
- package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
- package/out/ui/packages/fab/components/Fab.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.luau +25 -62
- package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
- package/out/ui/packages/fab/components/Fab.styles.luau +3 -33
- package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
- package/out/ui/packages/fab/components/fabSize.luau +0 -4
- package/out/ui/packages/fab/index.d.ts +1 -1
- package/out/ui/packages/fab/init.luau +0 -1
- package/out/ui/packages/iconButton/components/IconButton.luau +2 -7
- package/out/ui/packages/iconButton/components/IconButton.styles.luau +0 -3
- package/out/ui/packages/index.d.ts +0 -7
- package/out/ui/packages/init.luau +0 -21
- package/out/ui/packages/input/components/Input.luau +1 -1
- package/out/ui/packages/layout/components/Grid.d.ts +1 -1
- package/out/ui/packages/layout/index.d.ts +0 -10
- package/out/ui/packages/layout/init.luau +0 -4
- package/out/ui/packages/listItem/components/ListItem.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.luau +0 -5
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
- package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -10
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +0 -2
- package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +19 -23
- package/out/ui/packages/menu/components/Menu.d.ts +0 -4
- package/out/ui/packages/menu/components/Menu.luau +23 -52
- package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
- package/out/ui/packages/modal/components/Modal.d.ts +1 -1
- package/out/ui/packages/modal/components/Modal.luau +37 -55
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +0 -1
- package/out/ui/packages/motion/unit.d.ts +0 -5
- package/out/ui/packages/motion/unit.luau +0 -23
- package/out/ui/packages/pagination/components/Pagination.d.ts +1 -4
- package/out/ui/packages/pagination/components/Pagination.luau +22 -41
- package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -4
- package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -19
- package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
- package/out/ui/packages/pagination/components/pageRange.luau +8 -91
- package/out/ui/packages/pagination/index.d.ts +0 -1
- package/out/ui/packages/pagination/init.luau +0 -1
- package/out/ui/packages/paper/components/Paper.d.ts +1 -2
- package/out/ui/packages/paper/components/Paper.luau +3 -14
- package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
- package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
- package/out/ui/packages/popup/index.d.ts +0 -1
- package/out/ui/packages/popup/init.luau +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +2 -4
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
- package/out/ui/packages/select/components/Select.d.ts +0 -5
- package/out/ui/packages/select/components/Select.luau +24 -48
- package/out/ui/packages/select/components/Select.styles.luau +1 -1
- package/out/ui/packages/skeleton/components/Skeleton.luau +2 -3
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +2 -7
- package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
- package/out/ui/packages/slider/components/Slider.d.ts +0 -1
- package/out/ui/packages/slider/components/Slider.luau +1 -24
- package/out/ui/packages/slider/components/Slider.styles.luau +0 -8
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
- package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +0 -2
- package/out/ui/packages/stateMatrix.luau +221 -733
- package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
- package/out/ui/packages/stepper/components/Stepper.luau +1 -7
- package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
- package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
- package/out/ui/packages/switch/components/Switch.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.luau +0 -5
- package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -7
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/table/components/Table.d.ts +0 -1
- package/out/ui/packages/table/components/Table.luau +1 -4
- package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
- package/out/ui/packages/table/components/Table.styles.luau +6 -10
- package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
- package/out/ui/packages/tabs/components/Tabs.luau +3 -12
- package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
- package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
- package/out/ui/packages/tabs/index.d.ts +0 -1
- package/out/ui/packages/tabs/init.luau +0 -1
- package/out/ui/packages/toast/components/Toast.d.ts +0 -2
- package/out/ui/packages/toast/components/Toast.luau +1 -26
- package/out/ui/packages/toast/components/Toast.styles.luau +4 -22
- package/out/ui/packages/typography/components/Typography.styles.luau +5 -4
- package/out/ui/packages/virtualList/index.d.ts +0 -2
- package/out/ui/packages/virtualList/init.luau +0 -1
- package/package.json +2 -2
- package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
- package/out/ui/packages/backdrop/components/Backdrop.luau +0 -58
- package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
- package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
- package/out/ui/packages/backdrop/index.d.ts +0 -2
- package/out/ui/packages/backdrop/init.luau +0 -5
- package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
- package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
- package/out/ui/packages/formText/components/FormHelperText.d.ts +0 -8
- package/out/ui/packages/formText/components/FormHelperText.luau +0 -44
- package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
- package/out/ui/packages/formText/components/FormLabel.luau +0 -46
- package/out/ui/packages/formText/components/FormText.styles.d.ts +0 -5
- package/out/ui/packages/formText/components/FormText.styles.luau +0 -33
- package/out/ui/packages/formText/index.d.ts +0 -4
- package/out/ui/packages/formText/init.luau +0 -6
- package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
- package/out/ui/packages/imageList/components/ImageList.luau +0 -100
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
- package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
- package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
- package/out/ui/packages/imageList/index.d.ts +0 -2
- package/out/ui/packages/imageList/init.luau +0 -5
- package/out/ui/packages/layout/components/Box.d.ts +0 -11
- package/out/ui/packages/layout/components/Box.luau +0 -49
- package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
- package/out/ui/packages/layout/components/Box.styles.luau +0 -34
- package/out/ui/packages/layout/components/Container.d.ts +0 -10
- package/out/ui/packages/layout/components/Container.luau +0 -54
- package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
- package/out/ui/packages/layout/components/Container.styles.luau +0 -41
- package/out/ui/packages/layout/components/Stack.d.ts +0 -12
- package/out/ui/packages/layout/components/Stack.luau +0 -49
- package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -8
- package/out/ui/packages/layout/components/Stack.styles.luau +0 -72
- package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
- package/out/ui/packages/layout/components/boxPad.luau +0 -59
- package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
- package/out/ui/packages/layout/components/containerWidth.luau +0 -17
- package/out/ui/packages/layout/components/stackAlign.d.ts +0 -8
- package/out/ui/packages/layout/components/stackAlign.luau +0 -29
- package/out/ui/packages/link/components/Link.d.ts +0 -11
- package/out/ui/packages/link/components/Link.luau +0 -83
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -8
- package/out/ui/packages/link/components/Link.styles.luau +0 -59
- package/out/ui/packages/link/index.d.ts +0 -3
- package/out/ui/packages/link/init.luau +0 -5
- package/out/ui/packages/rating/components/Rating.d.ts +0 -11
- package/out/ui/packages/rating/components/Rating.luau +0 -101
- package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -6
- package/out/ui/packages/rating/components/Rating.styles.luau +0 -44
- package/out/ui/packages/rating/index.d.ts +0 -2
- package/out/ui/packages/rating/init.luau +0 -5
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
- package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
- package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
- package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
- package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
- package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -19
- package/out/ui/packages/speedDial/components/SpeedDial.luau +0 -101
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +0 -5
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +0 -31
- package/out/ui/packages/speedDial/index.d.ts +0 -3
- package/out/ui/packages/speedDial/init.luau +0 -5
- package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
- package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
- package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +0 -19
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +0 -135
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -7
- package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +0 -65
- package/out/ui/packages/toggleButton/index.d.ts +0 -2
- package/out/ui/packages/toggleButton/init.luau +0 -7
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +0 -6
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -32
- package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
- 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,20 +1,13 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local
|
|
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 =
|
|
7
|
-
h2 =
|
|
8
|
-
h3 =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 =
|
|
68
|
-
heading =
|
|
69
|
-
body =
|
|
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
|
-
|
|
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 = {
|
|
@@ -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
|
|
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
|
-
|
|
84
|
+
_attributes_6[_k] = _v
|
|
101
85
|
end
|
|
102
|
-
local
|
|
103
|
-
setmetatable(
|
|
104
|
-
return React.createElement("frame", _attributes, _exp, _exp_1,
|
|
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 {
|
|
@@ -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 =
|
|
32
|
-
Selectable =
|
|
30
|
+
Active = true,
|
|
31
|
+
Selectable = true,
|
|
33
32
|
},
|
|
34
33
|
title = {
|
|
35
|
-
AutomaticSize = Enum.AutomaticSize.
|
|
36
|
-
Size = UDim2.
|
|
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)),
|
|
@@ -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
|
}
|
|
@@ -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
|
|
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
|
|
55
|
-
key = "
|
|
53
|
+
local _attributes_5 = {
|
|
54
|
+
key = "Title",
|
|
56
55
|
}
|
|
57
|
-
for _k, _v in styles.
|
|
58
|
-
|
|
56
|
+
for _k, _v in styles.title do
|
|
57
|
+
_attributes_5[_k] = _v
|
|
59
58
|
end
|
|
60
|
-
|
|
61
|
-
|
|
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
|
|
69
|
-
key = "
|
|
62
|
+
local _attributes_5 = {
|
|
63
|
+
key = "Message",
|
|
70
64
|
}
|
|
71
|
-
for _k, _v in styles.
|
|
72
|
-
|
|
65
|
+
for _k, _v in styles.message do
|
|
66
|
+
_attributes_5[_k] = _v
|
|
73
67
|
end
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
local
|
|
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 = "
|
|
73
|
+
key = "Close",
|
|
81
74
|
}
|
|
82
|
-
for _k, _v in styles.
|
|
75
|
+
for _k, _v in styles.close do
|
|
83
76
|
_attributes_6[_k] = _v
|
|
84
77
|
end
|
|
85
|
-
_attributes_6.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
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 {
|
|
@@ -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 =
|
|
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 =
|
|
27
|
+
Color = tone.border,
|
|
31
28
|
Thickness = 1,
|
|
32
|
-
Transparency =
|
|
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 =
|
|
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 =
|
|
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(
|
|
81
|
-
Position = UDim2.new(1,
|
|
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 =
|
|
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 {
|
|
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
|
|
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 =
|
|
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
|