@rbxts/uiblox 0.2.0-alpha.35 → 0.2.0-alpha.37
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/out/theme/styles/utilities/focusRing.d.ts +5 -0
- package/out/theme/styles/utilities/focusRing.luau +11 -0
- package/out/theme/styles/utilities/index.d.ts +1 -0
- package/out/theme/styles/utilities/init.luau +1 -0
- package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
- package/out/theme/styles/utilities/resolveSx.luau +53 -12
- package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
- package/out/ui/packages/accordion/components/Accordion.luau +55 -19
- package/out/ui/packages/accordion/components/Accordion.styles.luau +49 -29
- package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
- package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
- package/out/ui/packages/alert/components/Alert.d.ts +2 -0
- package/out/ui/packages/alert/components/Alert.luau +24 -1
- package/out/ui/packages/alert/components/Alert.styles.luau +11 -0
- package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
- package/out/ui/packages/alert/components/alertAction.luau +11 -0
- package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
- package/out/ui/packages/appBar/components/AppBar.luau +59 -15
- package/out/ui/packages/appBar/components/AppBar.styles.luau +24 -0
- package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
- package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +102 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
- package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +50 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
- package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
- package/out/ui/packages/avatarGroup/index.d.ts +3 -0
- package/out/ui/packages/avatarGroup/init.luau +6 -0
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +20 -0
- package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
- package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
- package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +16 -5
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +6 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
- package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
- package/out/ui/packages/button/components/Button.d.ts +2 -0
- package/out/ui/packages/button/components/Button.luau +59 -10
- package/out/ui/packages/button/components/Button.styles.luau +2 -0
- package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
- package/out/ui/packages/button/components/buttonLook.luau +11 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +13 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +102 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
- package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
- package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
- package/out/ui/packages/buttonGroup/index.d.ts +3 -0
- package/out/ui/packages/buttonGroup/init.luau +6 -0
- package/out/ui/packages/card/components/Card.d.ts +1 -0
- package/out/ui/packages/card/components/Card.luau +21 -2
- package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
- package/out/ui/packages/card/components/Card.styles.luau +16 -7
- package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
- package/out/ui/packages/card/components/cardWidth.luau +36 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +9 -4
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +10 -1
- package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
- package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
- package/out/ui/packages/checkbox/components/Checkbox.luau +2 -1
- package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
- package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
- package/out/ui/packages/chip/components/Chip.styles.luau +9 -6
- package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
- package/out/ui/packages/chip/components/chipTone.luau +11 -0
- package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
- package/out/ui/packages/collapse/components/Collapse.luau +34 -0
- package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
- package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
- package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
- package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
- package/out/ui/packages/collapse/index.d.ts +3 -0
- package/out/ui/packages/collapse/init.luau +6 -0
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +4 -2
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +4 -2
- package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
- package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
- package/out/ui/packages/colorPicker/index.d.ts +1 -1
- package/out/ui/packages/colorPicker/init.luau +2 -0
- package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
- package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
- package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
- package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
- package/out/ui/packages/copyButton/index.d.ts +3 -0
- package/out/ui/packages/copyButton/init.luau +6 -0
- package/out/ui/packages/cover/components/Cover.d.ts +8 -0
- package/out/ui/packages/cover/components/Cover.luau +47 -0
- package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
- package/out/ui/packages/cover/components/coverFill.luau +14 -0
- package/out/ui/packages/cover/index.d.ts +3 -0
- package/out/ui/packages/cover/init.luau +6 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
- package/out/ui/packages/dateRange/components/DateRangePicker.luau +167 -88
- package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
- package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
- package/out/ui/packages/dateRange/index.d.ts +1 -1
- package/out/ui/packages/dateRange/init.luau +3 -0
- package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
- package/out/ui/packages/dialog/components/Dialog.luau +55 -6
- package/out/ui/packages/dialog/components/Dialog.styles.luau +5 -3
- package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
- package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
- package/out/ui/packages/divider/components/Divider.luau +57 -12
- package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
- package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
- package/out/ui/packages/drawer/components/Drawer.d.ts +1 -0
- package/out/ui/packages/drawer/components/Drawer.luau +18 -3
- package/out/ui/packages/drawer/components/drawerPlacement.d.ts +13 -1
- package/out/ui/packages/drawer/components/drawerPlacement.luau +28 -0
- package/out/ui/packages/fab/components/fabSize.d.ts +1 -1
- package/out/ui/packages/iconButton/components/IconButton.d.ts +2 -0
- package/out/ui/packages/iconButton/components/IconButton.luau +37 -3
- package/out/ui/packages/iconButton/components/transportGlyph.d.ts +9 -0
- package/out/ui/packages/iconButton/components/transportGlyph.luau +73 -0
- package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
- package/out/ui/packages/imageList/components/ImageList.luau +57 -11
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +16 -10
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +10 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +44 -0
- package/out/ui/packages/index.d.ts +12 -0
- package/out/ui/packages/init.luau +36 -0
- package/out/ui/packages/input/components/Input.d.ts +4 -0
- package/out/ui/packages/input/components/Input.luau +29 -9
- package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
- package/out/ui/packages/input/components/Input.styles.luau +42 -12
- package/out/ui/packages/input/components/clampText.d.ts +2 -0
- package/out/ui/packages/input/components/clampText.luau +16 -0
- package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
- package/out/ui/packages/input/components/multilineHeight.luau +11 -0
- package/out/ui/packages/link/components/Link.luau +13 -9
- package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
- package/out/ui/packages/link/components/Link.styles.luau +1 -12
- package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
- package/out/ui/packages/listItem/components/ListItem.luau +97 -39
- package/out/ui/packages/listItem/components/ListItem.styles.d.ts +3 -0
- package/out/ui/packages/listItem/components/ListItem.styles.luau +52 -30
- package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
- package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
- package/out/ui/packages/listItem/components/listItemLayout.d.ts +12 -0
- package/out/ui/packages/listItem/components/listItemLayout.luau +41 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +91 -6
- package/out/ui/packages/markdown/components/Markdown.styles.luau +25 -0
- package/out/ui/packages/markdown/index.d.ts +2 -2
- package/out/ui/packages/markdown/init.luau +2 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +21 -1
- package/out/ui/packages/markdown/parseMarkdown.luau +109 -2
- package/out/ui/packages/menu/components/Menu.d.ts +3 -0
- package/out/ui/packages/menu/components/Menu.luau +68 -21
- package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
- package/out/ui/packages/menu/components/menuIcon.luau +32 -0
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +67 -1
- package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
- package/out/ui/packages/pager/components/Pager.d.ts +11 -0
- package/out/ui/packages/pager/components/Pager.luau +112 -0
- package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
- package/out/ui/packages/pager/components/Pager.styles.luau +61 -0
- package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
- package/out/ui/packages/pager/components/pagerStep.luau +24 -0
- package/out/ui/packages/pager/index.d.ts +3 -0
- package/out/ui/packages/pager/init.luau +9 -0
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
- package/out/ui/packages/popover/components/Popover.d.ts +12 -0
- package/out/ui/packages/popover/components/Popover.luau +50 -0
- package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
- package/out/ui/packages/popover/components/Popover.styles.luau +26 -0
- package/out/ui/packages/popover/index.d.ts +2 -0
- package/out/ui/packages/popover/init.luau +5 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +51 -8
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
- package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
- package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
- package/out/ui/packages/radioGroup/index.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.d.ts +1 -1
- package/out/ui/packages/rating/components/Rating.luau +4 -2
- package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
- package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
- package/out/ui/packages/reorder/index.d.ts +2 -0
- package/out/ui/packages/reorder/init.luau +14 -0
- package/out/ui/packages/reorder/reorder.d.ts +24 -0
- package/out/ui/packages/reorder/reorder.luau +178 -0
- package/out/ui/packages/reorder/useReorderDrag.d.ts +15 -0
- package/out/ui/packages/reorder/useReorderDrag.luau +129 -0
- package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
- package/out/ui/packages/select/components/Select.luau +18 -1
- package/out/ui/packages/select/components/Select.styles.luau +2 -5
- package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
- package/out/ui/packages/select/components/selectWidth.luau +15 -0
- package/out/ui/packages/shadow/components/Shadow.luau +14 -2
- package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
- package/out/ui/packages/slider/components/RangeSlider.luau +231 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
- package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
- package/out/ui/packages/slider/components/Slider.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.luau +44 -11
- package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
- package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
- package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
- package/out/ui/packages/slider/components/rangeValue.luau +77 -0
- package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
- package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
- package/out/ui/packages/slider/index.d.ts +3 -0
- package/out/ui/packages/slider/init.luau +6 -0
- package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
- package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
- package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
- package/out/ui/packages/sparkline/components/Sparkline.luau +69 -7
- package/out/ui/packages/sparkline/index.d.ts +1 -1
- package/out/ui/packages/sparkline/init.luau +6 -1
- package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
- package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
- package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.luau +56 -9
- package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
- package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +45 -3
- package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
- package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
- package/out/ui/packages/stateMatrix.d.ts +1 -0
- package/out/ui/packages/stateMatrix.luau +9 -0
- package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
- package/out/ui/packages/stepper/components/Stepper.luau +35 -7
- package/out/ui/packages/stepper/components/Stepper.styles.luau +3 -0
- package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
- package/out/ui/packages/stepper/components/stepState.luau +12 -1
- package/out/ui/packages/stepper/index.d.ts +1 -1
- package/out/ui/packages/stepper/init.luau +3 -1
- package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
- package/out/ui/packages/table/components/Table.luau +8 -5
- package/out/ui/packages/table/components/tableSort.d.ts +2 -0
- package/out/ui/packages/table/components/tableSort.luau +95 -0
- package/out/ui/packages/table/index.d.ts +1 -0
- package/out/ui/packages/table/init.luau +1 -0
- package/out/ui/packages/tabs/components/Tabs.luau +70 -2
- package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
- package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
- package/out/ui/packages/text/components/Text.d.ts +7 -0
- package/out/ui/packages/text/components/Text.luau +54 -0
- package/out/ui/packages/text/components/textBox.d.ts +12 -0
- package/out/ui/packages/text/components/textBox.luau +21 -0
- package/out/ui/packages/text/index.d.ts +2 -0
- package/out/ui/packages/text/init.luau +5 -0
- package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
- package/out/ui/packages/timeField/components/TimeField.luau +102 -0
- package/out/ui/packages/timeField/index.d.ts +4 -0
- package/out/ui/packages/timeField/init.luau +9 -0
- package/out/ui/packages/timeField/timeValue.d.ts +8 -0
- package/out/ui/packages/timeField/timeValue.luau +49 -0
- package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
- package/out/ui/packages/timeline/components/Timeline.luau +99 -0
- package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
- package/out/ui/packages/timeline/components/Timeline.styles.luau +106 -0
- package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
- package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
- package/out/ui/packages/timeline/index.d.ts +3 -0
- package/out/ui/packages/timeline/init.luau +8 -0
- package/out/ui/packages/toast/components/Toast.d.ts +1 -0
- package/out/ui/packages/toast/components/Toast.luau +59 -12
- package/out/ui/packages/toast/components/Toast.styles.luau +6 -3
- package/out/ui/packages/toast/components/toastPlace.d.ts +12 -0
- package/out/ui/packages/toast/components/toastPlace.luau +31 -0
- package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
- package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
- package/out/ui/packages/tooltip/components/Tooltip.styles.luau +30 -0
- package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
- package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
- package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +1 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
- package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
- package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
- package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
- package/out/ui/packages/weekGrid/index.d.ts +3 -0
- package/out/ui/packages/weekGrid/init.luau +8 -0
- package/package.json +67 -69
|
@@ -3,6 +3,7 @@ export { default as makeStyles } from "./makeStyles";
|
|
|
3
3
|
export { default as classNames, cx } from "./classNames";
|
|
4
4
|
export { applyVariants, CompoundVariant } from "./variants";
|
|
5
5
|
export { default as componentStyles } from "./componentStyles";
|
|
6
|
+
export { focusRing } from "./focusRing";
|
|
6
7
|
export { resolveResponsive, Responsive } from "../../../hooks/breakpoints";
|
|
7
8
|
export { clearStyleCaches, createStyleCache, styleDepsKey } from "./styleCache";
|
|
8
9
|
export { resolveSx, resolvePaletteToken, PaletteToken, ResolvedSx, SxColor, SxGradient, SxInput } from "./resolveSx";
|
|
@@ -8,6 +8,7 @@ exports.classNames = _classNames.default
|
|
|
8
8
|
exports.cx = _classNames.cx
|
|
9
9
|
exports.applyVariants = TS.import(script, script, "variants").applyVariants
|
|
10
10
|
exports.componentStyles = TS.import(script, script, "componentStyles").default
|
|
11
|
+
exports.focusRing = TS.import(script, script, "focusRing").focusRing
|
|
11
12
|
exports.resolveResponsive = TS.import(script, script.Parent.Parent.Parent, "hooks", "breakpoints").resolveResponsive
|
|
12
13
|
local _styleCache = TS.import(script, script, "styleCache")
|
|
13
14
|
exports.clearStyleCaches = _styleCache.clearStyleCaches
|
|
@@ -33,10 +33,13 @@ interface SxTheme {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
export type SxColor = PaletteToken | Color3;
|
|
36
|
-
/**
|
|
36
|
+
/** Color stops on a UIGradient child. Times default to even spacing. */
|
|
37
37
|
export interface SxGradient {
|
|
38
38
|
colors: SxColor[];
|
|
39
39
|
rotation?: number;
|
|
40
|
+
times?: number[];
|
|
41
|
+
transparency?: number | NumberSequence;
|
|
42
|
+
offset?: Vector2;
|
|
40
43
|
}
|
|
41
44
|
/** CSS-like shorthands + pass-through Instance props. No CSS string parser. */
|
|
42
45
|
export type SxInput = {
|
|
@@ -110,6 +113,8 @@ export interface ResolvedSx {
|
|
|
110
113
|
gradient?: {
|
|
111
114
|
Color: ColorSequence;
|
|
112
115
|
Rotation: number;
|
|
116
|
+
Transparency?: NumberSequence;
|
|
117
|
+
Offset?: Vector2;
|
|
113
118
|
};
|
|
114
119
|
}
|
|
115
120
|
/**
|
|
@@ -108,8 +108,18 @@ local SHORTHAND = {
|
|
|
108
108
|
z = true,
|
|
109
109
|
gradient = true,
|
|
110
110
|
}
|
|
111
|
-
--*
|
|
111
|
+
--* Color stops on a UIGradient child. Times default to even spacing.
|
|
112
112
|
--* CSS-like shorthands + pass-through Instance props. No CSS string parser.
|
|
113
|
+
local function gradientTransparency(value)
|
|
114
|
+
if value == nil then
|
|
115
|
+
return nil
|
|
116
|
+
end
|
|
117
|
+
local _value = value
|
|
118
|
+
if type(_value) == "number" then
|
|
119
|
+
return NumberSequence.new(value)
|
|
120
|
+
end
|
|
121
|
+
return value
|
|
122
|
+
end
|
|
113
123
|
local function pick(value, width)
|
|
114
124
|
if value == nil then
|
|
115
125
|
return nil
|
|
@@ -456,21 +466,46 @@ local function resolveSx(theme, sx, width)
|
|
|
456
466
|
end
|
|
457
467
|
-- ▲ ReadonlyArray.map ▲
|
|
458
468
|
local stops = _newValue
|
|
459
|
-
local
|
|
460
|
-
|
|
461
|
-
local
|
|
462
|
-
local
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
469
|
+
local count = #stops
|
|
470
|
+
local last = math.max(count - 1, 1)
|
|
471
|
+
local times = gradientVal.times
|
|
472
|
+
local keypoints = {}
|
|
473
|
+
local previous = 0
|
|
474
|
+
do
|
|
475
|
+
local index = 0
|
|
476
|
+
local _shouldIncrement = false
|
|
477
|
+
while true do
|
|
478
|
+
if _shouldIncrement then
|
|
479
|
+
index += 1
|
|
480
|
+
else
|
|
481
|
+
_shouldIncrement = true
|
|
482
|
+
end
|
|
483
|
+
if not (index < count) then
|
|
484
|
+
break
|
|
485
|
+
end
|
|
486
|
+
local time = if count == 1 then 0 else index / last
|
|
487
|
+
if times ~= nil and count > 1 and times[index + 1] ~= nil then
|
|
488
|
+
if index == 0 then
|
|
489
|
+
time = 0
|
|
490
|
+
elseif index == count - 1 then
|
|
491
|
+
time = 1
|
|
492
|
+
else
|
|
493
|
+
time = math.clamp(times[index + 1], previous, 1)
|
|
494
|
+
end
|
|
495
|
+
end
|
|
496
|
+
if time < previous then
|
|
497
|
+
time = previous
|
|
498
|
+
end
|
|
499
|
+
previous = time
|
|
500
|
+
local _colorSequenceKeypoint = ColorSequenceKeypoint.new(time, stops[index + 1])
|
|
501
|
+
table.insert(keypoints, _colorSequenceKeypoint)
|
|
502
|
+
end
|
|
467
503
|
end
|
|
468
|
-
|
|
469
|
-
local keypoints = _newValue_1
|
|
470
|
-
if #stops == 1 then
|
|
504
|
+
if count == 1 then
|
|
471
505
|
local _colorSequenceKeypoint = ColorSequenceKeypoint.new(1, stops[1])
|
|
472
506
|
table.insert(keypoints, _colorSequenceKeypoint)
|
|
473
507
|
end
|
|
508
|
+
local transparency = gradientTransparency(gradientVal.transparency)
|
|
474
509
|
local _object = {
|
|
475
510
|
Color = ColorSequence.new(keypoints),
|
|
476
511
|
}
|
|
@@ -481,6 +516,12 @@ local function resolveSx(theme, sx, width)
|
|
|
481
516
|
end
|
|
482
517
|
_object[_left] = _condition_4
|
|
483
518
|
gradient = _object
|
|
519
|
+
if transparency ~= nil then
|
|
520
|
+
gradient.Transparency = transparency
|
|
521
|
+
end
|
|
522
|
+
if gradientVal.offset ~= nil then
|
|
523
|
+
gradient.Offset = gradientVal.offset
|
|
524
|
+
end
|
|
484
525
|
end
|
|
485
526
|
for key, raw in pairs(sx) do
|
|
486
527
|
local name = key
|
|
@@ -5,6 +5,8 @@ local React = _react
|
|
|
5
5
|
local useState = _react.useState
|
|
6
6
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
7
7
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
|
+
local Collapse = TS.import(script, script.Parent.Parent.Parent, "collapse").Collapse
|
|
9
|
+
local accordionNote = TS.import(script, script.Parent, "accordionNote").accordionNote
|
|
8
10
|
local _accordionOpen = TS.import(script, script.Parent, "accordionOpen")
|
|
9
11
|
local accordionGlyph = _accordionOpen.accordionGlyph
|
|
10
12
|
local accordionOpen = _accordionOpen.accordionOpen
|
|
@@ -12,6 +14,7 @@ local useAccordionStyles = TS.import(script, script.Parent, "Accordion.styles").
|
|
|
12
14
|
local function Accordion(props)
|
|
13
15
|
local _binding = props
|
|
14
16
|
local title = _binding.title
|
|
17
|
+
local note = _binding.note
|
|
15
18
|
local controlled = _binding.open
|
|
16
19
|
local defaultOpen = _binding.defaultOpen
|
|
17
20
|
local disabled = _binding.disabled
|
|
@@ -24,6 +27,7 @@ local function Accordion(props)
|
|
|
24
27
|
local ref = _binding.ref
|
|
25
28
|
local localOpen, setLocalOpen = useState(defaultOpen == true)
|
|
26
29
|
local open = accordionOpen(localOpen, controlled)
|
|
30
|
+
local summary = accordionNote(note)
|
|
27
31
|
local styles = useAccordionStyles({
|
|
28
32
|
open = open,
|
|
29
33
|
disabled = disabled,
|
|
@@ -77,31 +81,63 @@ local function Accordion(props)
|
|
|
77
81
|
local _attributes_3 = table.clone(styles.padding)
|
|
78
82
|
setmetatable(_attributes_3, nil)
|
|
79
83
|
local _exp_1 = React.createElement("uipadding", _attributes_3)
|
|
80
|
-
local
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
local _result
|
|
85
|
+
if summary == nil then
|
|
86
|
+
local _attributes_4 = {
|
|
87
|
+
key = "Title",
|
|
88
|
+
}
|
|
89
|
+
for _k, _v in styles.title do
|
|
90
|
+
_attributes_4[_k] = _v
|
|
91
|
+
end
|
|
92
|
+
_attributes_4.Text = title
|
|
93
|
+
_result = (React.createElement("textlabel", _attributes_4))
|
|
94
|
+
else
|
|
95
|
+
local _attributes_4 = {
|
|
96
|
+
key = "Copy",
|
|
97
|
+
}
|
|
98
|
+
for _k, _v in styles.copy do
|
|
99
|
+
_attributes_4[_k] = _v
|
|
100
|
+
end
|
|
101
|
+
local _exp_2 = React.createElement("uilistlayout", {
|
|
102
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
103
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
104
|
+
Padding = UDim.new(0, 0),
|
|
105
|
+
})
|
|
106
|
+
local _attributes_5 = {
|
|
107
|
+
key = "Title",
|
|
108
|
+
}
|
|
109
|
+
for _k, _v in styles.title do
|
|
110
|
+
_attributes_5[_k] = _v
|
|
111
|
+
end
|
|
112
|
+
_attributes_5.Size = UDim2.new(1, 0, 0, 0)
|
|
113
|
+
_attributes_5.Text = title
|
|
114
|
+
_attributes_5.LayoutOrder = 1
|
|
115
|
+
local _exp_3 = React.createElement("textlabel", _attributes_5)
|
|
116
|
+
local _attributes_6 = {
|
|
117
|
+
key = "Note",
|
|
118
|
+
}
|
|
119
|
+
for _k, _v in styles.note do
|
|
120
|
+
_attributes_6[_k] = _v
|
|
121
|
+
end
|
|
122
|
+
_attributes_6.Text = summary
|
|
123
|
+
_attributes_6.LayoutOrder = 2
|
|
124
|
+
_result = (React.createElement("frame", _attributes_4, _exp_2, _exp_3, React.createElement("textlabel", _attributes_6)))
|
|
85
125
|
end
|
|
86
|
-
_attributes_4
|
|
87
|
-
local _exp_2 = React.createElement("textlabel", _attributes_4)
|
|
88
|
-
local _attributes_5 = {
|
|
126
|
+
local _attributes_4 = {
|
|
89
127
|
key = "Icon",
|
|
90
128
|
}
|
|
91
129
|
for _k, _v in styles.icon do
|
|
92
|
-
|
|
130
|
+
_attributes_4[_k] = _v
|
|
93
131
|
end
|
|
94
|
-
|
|
95
|
-
local
|
|
96
|
-
local
|
|
132
|
+
_attributes_4.Image = if accordionGlyph(open) == "expanded" then Icons.Expanded else Icons.Collapsed
|
|
133
|
+
local _exp_2 = React.createElement("textbutton", _attributes_2, _exp_1, _result, React.createElement("imagelabel", _attributes_4))
|
|
134
|
+
local _attributes_5 = table.clone(styles.padding)
|
|
135
|
+
setmetatable(_attributes_5, nil)
|
|
136
|
+
return React.createElement(SxHost, _attributes, _condition_1, _exp, _exp_2, React.createElement(Collapse, {
|
|
97
137
|
key = "Body",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
end
|
|
102
|
-
local _attributes_7 = table.clone(styles.padding)
|
|
103
|
-
setmetatable(_attributes_7, nil)
|
|
104
|
-
return React.createElement(SxHost, _attributes, _condition_1, _exp, _exp_3, React.createElement("frame", _attributes_6, React.createElement("uipadding", _attributes_7), children))
|
|
138
|
+
open = open,
|
|
139
|
+
className = styles.body,
|
|
140
|
+
}, React.createElement("uipadding", _attributes_5), children))
|
|
105
141
|
end
|
|
106
142
|
local default = Accordion
|
|
107
143
|
return {
|
|
@@ -4,12 +4,8 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
|
|
|
4
4
|
local componentStyles = _theme.componentStyles
|
|
5
5
|
local createStyles = _theme.createStyles
|
|
6
6
|
local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
|
|
7
|
-
local open = _param.open
|
|
8
|
-
if open == nil then
|
|
9
|
-
open = false
|
|
10
|
-
end
|
|
11
7
|
local disabled = _param.disabled
|
|
12
|
-
|
|
8
|
+
local _object = {
|
|
13
9
|
root = {
|
|
14
10
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
15
11
|
Size = UDim2.new(1, 0, 0, 0),
|
|
@@ -42,34 +38,58 @@ local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
|
|
|
42
38
|
TextTransparency = if disabled == true then 0.5 else 0,
|
|
43
39
|
TextXAlignment = Enum.TextXAlignment.Left,
|
|
44
40
|
},
|
|
45
|
-
|
|
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
|
-
padding = {
|
|
56
|
-
PaddingTop = UDim.new(0, theme.padding.calc(1)),
|
|
57
|
-
PaddingBottom = UDim.new(0, theme.padding.calc(1)),
|
|
58
|
-
PaddingLeft = UDim.new(0, theme.padding.calc(1.5)),
|
|
59
|
-
PaddingRight = UDim.new(0, theme.padding.calc(1.5)),
|
|
60
|
-
},
|
|
61
|
-
body = {
|
|
62
|
-
LayoutOrder = 2,
|
|
41
|
+
copy = {
|
|
63
42
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
64
|
-
Size = UDim2.new(1,
|
|
43
|
+
Size = UDim2.new(1, -theme.spacing.calc(4), 0, 0),
|
|
65
44
|
BackgroundTransparency = 1,
|
|
66
45
|
BorderSizePixel = 0,
|
|
67
|
-
Visible = open,
|
|
68
46
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
47
|
+
}
|
|
48
|
+
local _left = "note"
|
|
49
|
+
local _object_1 = {
|
|
50
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
51
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
52
|
+
BackgroundTransparency = 1,
|
|
53
|
+
BorderSizePixel = 0,
|
|
54
|
+
Font = theme.typography.fontFamilies.default,
|
|
55
|
+
}
|
|
56
|
+
local _left_1 = "TextSize"
|
|
57
|
+
local _condition = theme.typography.fontSizes.caption
|
|
58
|
+
if _condition == nil then
|
|
59
|
+
_condition = theme.typography.fontSizes.body
|
|
60
|
+
end
|
|
61
|
+
_object_1[_left_1] = _condition
|
|
62
|
+
_object_1.TextColor3 = theme.palette.text.secondary
|
|
63
|
+
_object_1.TextTransparency = if disabled == true then 0.5 else 0
|
|
64
|
+
_object_1.TextXAlignment = Enum.TextXAlignment.Left
|
|
65
|
+
_object[_left] = _object_1
|
|
66
|
+
_object.icon = {
|
|
67
|
+
Size = UDim2.fromOffset(theme.options.constants.iconSizes.small, theme.options.constants.iconSizes.small),
|
|
68
|
+
Position = UDim2.new(1, -theme.padding.calc(1.5), 0.5, 0),
|
|
69
|
+
AnchorPoint = Vector2.new(1, 0.5),
|
|
70
|
+
BackgroundTransparency = 1,
|
|
71
|
+
BorderSizePixel = 0,
|
|
72
|
+
ScaleType = Enum.ScaleType.Fit,
|
|
73
|
+
ImageColor3 = theme.palette.text.primary,
|
|
74
|
+
ImageTransparency = if disabled == true then 0.5 else 0,
|
|
75
|
+
}
|
|
76
|
+
_object.padding = {
|
|
77
|
+
PaddingTop = UDim.new(0, theme.padding.calc(1)),
|
|
78
|
+
PaddingBottom = UDim.new(0, theme.padding.calc(1)),
|
|
79
|
+
PaddingLeft = UDim.new(0, theme.padding.calc(1.5)),
|
|
80
|
+
PaddingRight = UDim.new(0, theme.padding.calc(1.5)),
|
|
81
|
+
}
|
|
82
|
+
_object.body = {
|
|
83
|
+
LayoutOrder = 2,
|
|
84
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
85
|
+
Size = UDim2.new(1, 0, 0, 0),
|
|
86
|
+
BackgroundTransparency = 1,
|
|
87
|
+
BorderSizePixel = 0,
|
|
88
|
+
}
|
|
89
|
+
_object.corner = {
|
|
90
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
91
|
+
}
|
|
92
|
+
return createStyles(_object)
|
|
73
93
|
end)
|
|
74
94
|
local default = useAccordionStyles
|
|
75
95
|
return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
--* An empty note stays off the header. The body still hides when the panel is shut.
|
|
3
|
+
local function accordionNote(note)
|
|
4
|
+
if note == nil or note == "" then
|
|
5
|
+
return nil
|
|
6
|
+
end
|
|
7
|
+
return note
|
|
8
|
+
end
|
|
9
|
+
return {
|
|
10
|
+
accordionNote = accordionNote,
|
|
11
|
+
}
|
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
5
5
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
+
local alertAction = TS.import(script, script.Parent, "alertAction").alertAction
|
|
6
7
|
local useAlertStyles = TS.import(script, script.Parent, "Alert.styles").default
|
|
7
8
|
local function Alert(props)
|
|
8
9
|
local _binding = props
|
|
@@ -10,6 +11,8 @@ local function Alert(props)
|
|
|
10
11
|
local title = _binding.title
|
|
11
12
|
local message = _binding.message
|
|
12
13
|
local onClose = _binding.onClose
|
|
14
|
+
local action = _binding.action
|
|
15
|
+
local onAction = _binding.onAction
|
|
13
16
|
local filled = _binding.filled
|
|
14
17
|
local square = _binding.square
|
|
15
18
|
local className = _binding.className
|
|
@@ -17,6 +20,7 @@ local function Alert(props)
|
|
|
17
20
|
local id = _binding.id
|
|
18
21
|
local ref = _binding.ref
|
|
19
22
|
local dismissible = onClose ~= nil
|
|
23
|
+
local label = alertAction(action)
|
|
20
24
|
local styles = useAlertStyles({
|
|
21
25
|
severity = severity,
|
|
22
26
|
dismissible = dismissible,
|
|
@@ -89,7 +93,26 @@ local function Alert(props)
|
|
|
89
93
|
_attributes_5[_k] = _v
|
|
90
94
|
end
|
|
91
95
|
_attributes_5.Text = message
|
|
92
|
-
|
|
96
|
+
local _exp_3 = React.createElement("textlabel", _attributes_5)
|
|
97
|
+
local _condition_4 = label ~= nil
|
|
98
|
+
if _condition_4 then
|
|
99
|
+
local _attributes_6 = {
|
|
100
|
+
key = "Action",
|
|
101
|
+
}
|
|
102
|
+
for _k, _v in styles.action do
|
|
103
|
+
_attributes_6[_k] = _v
|
|
104
|
+
end
|
|
105
|
+
_attributes_6.Text = label
|
|
106
|
+
_attributes_6.Event = {
|
|
107
|
+
Activated = function()
|
|
108
|
+
if onAction then
|
|
109
|
+
onAction()
|
|
110
|
+
end
|
|
111
|
+
end,
|
|
112
|
+
}
|
|
113
|
+
_condition_4 = (React.createElement("textbutton", _attributes_6))
|
|
114
|
+
end
|
|
115
|
+
return React.createElement(SxHost, _attributes, _exp, _condition_1, _exp_1, _condition_2, React.createElement("frame", _attributes_3, _exp_2, _condition_3, _exp_3, _condition_4))
|
|
93
116
|
end
|
|
94
117
|
local default = Alert
|
|
95
118
|
return {
|
|
@@ -76,6 +76,17 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
76
76
|
_object_1.TextWrapped = true
|
|
77
77
|
_object_1.LayoutOrder = 2
|
|
78
78
|
_object[_left] = _object_1
|
|
79
|
+
_object.action = {
|
|
80
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
81
|
+
Size = UDim2.fromScale(0, 0),
|
|
82
|
+
BackgroundTransparency = 1,
|
|
83
|
+
BorderSizePixel = 0,
|
|
84
|
+
Font = theme.typography.fontFamilies.default,
|
|
85
|
+
TextSize = theme.typography.fontSizes.body,
|
|
86
|
+
TextColor3 = if filled == true then tone.on else tone.main,
|
|
87
|
+
AutoButtonColor = false,
|
|
88
|
+
LayoutOrder = 3,
|
|
89
|
+
}
|
|
79
90
|
_object.close = {
|
|
80
91
|
Size = UDim2.fromOffset(closeSize, closeSize),
|
|
81
92
|
Position = UDim2.new(1, 0, 0, 0),
|
|
@@ -3,6 +3,7 @@ import { CustomizedProps } from "../../../../theme/index";
|
|
|
3
3
|
import { AppBarColor, AppBarElevation } from "./AppBar.styles";
|
|
4
4
|
export interface AppBarProps {
|
|
5
5
|
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
6
7
|
elevation?: AppBarElevation;
|
|
7
8
|
color?: AppBarColor;
|
|
8
9
|
children?: React.ReactNode;
|
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
5
5
|
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
|
+
local appBarSubtitle = TS.import(script, script.Parent, "appBarSubtitle").appBarSubtitle
|
|
6
7
|
local useAppBarStyles = TS.import(script, script.Parent, "AppBar.styles").default
|
|
7
8
|
local function AppBar(props)
|
|
8
9
|
local _binding = props
|
|
@@ -10,6 +11,7 @@ local function AppBar(props)
|
|
|
10
11
|
if title == nil then
|
|
11
12
|
title = ""
|
|
12
13
|
end
|
|
14
|
+
local subtitle = _binding.subtitle
|
|
13
15
|
local elevation = _binding.elevation
|
|
14
16
|
if elevation == nil then
|
|
15
17
|
elevation = "raised"
|
|
@@ -29,26 +31,68 @@ local function AppBar(props)
|
|
|
29
31
|
color = color,
|
|
30
32
|
hasActions = hasActions,
|
|
31
33
|
})
|
|
32
|
-
local
|
|
33
|
-
|
|
34
|
+
local line = appBarSubtitle(subtitle)
|
|
35
|
+
local _result
|
|
36
|
+
if line == nil then
|
|
37
|
+
local _condition = title ~= ""
|
|
38
|
+
if _condition then
|
|
39
|
+
local _attributes = {
|
|
40
|
+
key = "Title",
|
|
41
|
+
}
|
|
42
|
+
for _k, _v in styles.title do
|
|
43
|
+
_attributes[_k] = _v
|
|
44
|
+
end
|
|
45
|
+
_attributes.Text = title
|
|
46
|
+
_condition = React.createElement("textlabel", _attributes)
|
|
47
|
+
end
|
|
48
|
+
_result = _condition
|
|
49
|
+
else
|
|
34
50
|
local _attributes = {
|
|
35
|
-
key = "
|
|
51
|
+
key = "Titles",
|
|
36
52
|
}
|
|
37
|
-
for _k, _v in styles.
|
|
53
|
+
for _k, _v in styles.titles do
|
|
38
54
|
_attributes[_k] = _v
|
|
39
55
|
end
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
local _exp = React.createElement("uilistlayout", {
|
|
57
|
+
FillDirection = Enum.FillDirection.Vertical,
|
|
58
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
59
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
60
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
61
|
+
Padding = UDim.new(0, 0),
|
|
62
|
+
})
|
|
63
|
+
local _condition = title ~= ""
|
|
64
|
+
if _condition then
|
|
65
|
+
local _attributes_1 = {
|
|
66
|
+
key = "Title",
|
|
67
|
+
}
|
|
68
|
+
for _k, _v in styles.title do
|
|
69
|
+
_attributes_1[_k] = _v
|
|
70
|
+
end
|
|
71
|
+
_attributes_1.Size = UDim2.new(0, 0, 0, 0)
|
|
72
|
+
_attributes_1.AutomaticSize = Enum.AutomaticSize.XY
|
|
73
|
+
_attributes_1.Text = title
|
|
74
|
+
_attributes_1.LayoutOrder = 1
|
|
75
|
+
_condition = (React.createElement("textlabel", _attributes_1))
|
|
76
|
+
end
|
|
77
|
+
local _attributes_1 = {
|
|
78
|
+
key = "Subtitle",
|
|
79
|
+
}
|
|
80
|
+
for _k, _v in styles.subtitle do
|
|
81
|
+
_attributes_1[_k] = _v
|
|
82
|
+
end
|
|
83
|
+
_attributes_1.Text = line
|
|
84
|
+
_attributes_1.LayoutOrder = 2
|
|
85
|
+
_result = (React.createElement("frame", _attributes, _exp, _condition, React.createElement("textlabel", _attributes_1)))
|
|
42
86
|
end
|
|
43
|
-
local titleLabel =
|
|
87
|
+
local titleLabel = _result
|
|
44
88
|
local _attributes = {
|
|
45
89
|
tag = "frame",
|
|
46
90
|
}
|
|
47
|
-
local
|
|
48
|
-
if not (
|
|
49
|
-
|
|
91
|
+
local _condition = id
|
|
92
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
93
|
+
_condition = "AppBar"
|
|
50
94
|
end
|
|
51
|
-
_attributes.key =
|
|
95
|
+
_attributes.key = _condition
|
|
52
96
|
_attributes.hostRef = ref
|
|
53
97
|
_attributes.base = styles.root
|
|
54
98
|
_attributes.className = className
|
|
@@ -57,7 +101,7 @@ local function AppBar(props)
|
|
|
57
101
|
setmetatable(_attributes_1, nil)
|
|
58
102
|
local _exp = React.createElement("uipadding", _attributes_1)
|
|
59
103
|
local _exp_1 = elevation == "raised" and React.createElement(Shadow)
|
|
60
|
-
local
|
|
104
|
+
local _result_1
|
|
61
105
|
if hasActions then
|
|
62
106
|
local _attributes_2 = table.clone(styles.row)
|
|
63
107
|
setmetatable(_attributes_2, nil)
|
|
@@ -71,16 +115,16 @@ local function AppBar(props)
|
|
|
71
115
|
end
|
|
72
116
|
local _attributes_4 = table.clone(styles.actionsLayout)
|
|
73
117
|
setmetatable(_attributes_4, nil)
|
|
74
|
-
|
|
118
|
+
_result_1 = (React.createElement("frame", {
|
|
75
119
|
key = "Row",
|
|
76
120
|
Size = UDim2.fromScale(1, 1),
|
|
77
121
|
BackgroundTransparency = 1,
|
|
78
122
|
BorderSizePixel = 0,
|
|
79
123
|
}, _exp_2, _exp_3, React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), children)))
|
|
80
124
|
else
|
|
81
|
-
|
|
125
|
+
_result_1 = titleLabel
|
|
82
126
|
end
|
|
83
|
-
return React.createElement(SxHost, _attributes, _exp, _exp_1,
|
|
127
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _result_1)
|
|
84
128
|
end
|
|
85
129
|
local default = AppBar
|
|
86
130
|
return {
|
|
@@ -54,6 +54,30 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
|
|
|
54
54
|
_object_1.TextYAlignment = Enum.TextYAlignment.Center
|
|
55
55
|
_object_1.TextTruncate = Enum.TextTruncate.AtEnd
|
|
56
56
|
_object[_left] = _object_1
|
|
57
|
+
_object.titles = {
|
|
58
|
+
LayoutOrder = 1,
|
|
59
|
+
AutomaticSize = if hasActions then Enum.AutomaticSize.XY else Enum.AutomaticSize.Y,
|
|
60
|
+
Size = if hasActions then UDim2.fromScale(0, 0) else UDim2.new(1, 0, 1, 0),
|
|
61
|
+
BackgroundTransparency = 1,
|
|
62
|
+
BorderSizePixel = 0,
|
|
63
|
+
}
|
|
64
|
+
local _left_2 = "subtitle"
|
|
65
|
+
local _object_2 = {
|
|
66
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
67
|
+
Size = UDim2.fromScale(0, 0),
|
|
68
|
+
BackgroundTransparency = 1,
|
|
69
|
+
BorderSizePixel = 0,
|
|
70
|
+
Font = theme.typography.fontFamilies.default,
|
|
71
|
+
}
|
|
72
|
+
local _left_3 = "TextSize"
|
|
73
|
+
local _condition_1 = theme.typography.fontSizes.caption
|
|
74
|
+
if _condition_1 == nil then
|
|
75
|
+
_condition_1 = theme.typography.fontSizes.body
|
|
76
|
+
end
|
|
77
|
+
_object_2[_left_3] = _condition_1
|
|
78
|
+
_object_2.TextColor3 = if color == "primary" then theme.palette.primary.on else theme.palette.text.secondary
|
|
79
|
+
_object_2.TextXAlignment = Enum.TextXAlignment.Left
|
|
80
|
+
_object[_left_2] = _object_2
|
|
57
81
|
_object.actions = {
|
|
58
82
|
LayoutOrder = 2,
|
|
59
83
|
AutomaticSize = Enum.AutomaticSize.X,
|