@idealyst/theme 1.0.83 → 1.0.85
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/package.json +2 -1
- package/src/components/CLAUDE.md +468 -0
- package/src/components/accordion.ts +34 -0
- package/src/components/activity-indicator.ts +28 -0
- package/src/components/alert.ts +32 -0
- package/src/components/avatar.ts +27 -0
- package/src/components/badge.ts +28 -0
- package/src/components/breadcrumb.ts +36 -0
- package/src/components/button.ts +32 -0
- package/src/components/card.ts +31 -0
- package/src/components/checkbox.ts +37 -0
- package/src/components/chip.ts +34 -0
- package/src/components/dialog.ts +31 -0
- package/src/components/divider.ts +36 -0
- package/src/components/icon.ts +26 -0
- package/src/components/image.ts +22 -0
- package/src/components/index.ts +37 -0
- package/src/components/input.ts +35 -0
- package/src/components/list.ts +40 -0
- package/src/components/menu-item.ts +29 -0
- package/src/components/menu.ts +32 -0
- package/src/components/popover.ts +25 -0
- package/src/components/pressable.ts +20 -0
- package/src/components/progress.ts +35 -0
- package/src/components/radio-button.ts +38 -0
- package/src/components/screen.ts +25 -0
- package/src/components/select.ts +62 -0
- package/src/components/skeleton.ts +26 -0
- package/src/components/slider.ts +62 -0
- package/src/components/svg-image.ts +24 -0
- package/src/components/switch.ts +54 -0
- package/src/components/tab-bar.ts +54 -0
- package/src/components/table.ts +57 -0
- package/src/components/text.ts +29 -0
- package/src/components/textarea.ts +53 -0
- package/src/components/tooltip.ts +29 -0
- package/src/components/video.ts +18 -0
- package/src/components/view.ts +31 -0
- package/src/darkTheme.ts +890 -0
- package/src/index.ts +7 -166
- package/src/lightTheme.ts +873 -0
- package/src/styles.ts +14 -0
- package/src/theme/color.ts +15 -0
- package/src/theme/index.ts +16 -0
- package/src/theme/intent.ts +8 -0
- package/src/theme/shadow.ts +18 -0
- package/src/theme/size.ts +182 -0
- package/src/theme/surface.ts +3 -0
- package/src/unistyles.ts +6 -14
- package/src/variants/color.ts +9 -0
- package/src/variants/index.ts +2 -0
- package/src/variants/intent.ts +16 -0
- package/src/variants/size.ts +0 -0
- package/CLAUDE.md +0 -447
- package/LLM-ACCESS-GUIDE.md +0 -208
- package/README.md +0 -633
- package/src/README.md +0 -138
- package/src/breakpoints.ts +0 -8
- package/src/colorResolver.ts +0 -218
- package/src/colors.md +0 -353
- package/src/colors.ts +0 -315
- package/src/common.ts +0 -92
- package/src/defaultThemes.md +0 -407
- package/src/defaultThemes.ts +0 -238
- package/src/themeBuilder.md +0 -400
- package/src/themeBuilder.ts +0 -602
- package/src/variantHelpers.ts +0 -584
- package/src/variants.ts +0 -56
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Intent } from "../theme/intent";
|
|
3
|
+
import { Size } from "../theme/size";
|
|
4
|
+
|
|
5
|
+
type SliderSize = Size;
|
|
6
|
+
type SliderIntent = Intent;
|
|
7
|
+
|
|
8
|
+
type SliderTrackVariants = {
|
|
9
|
+
size: SliderSize;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type SliderFilledTrackVariants = {
|
|
14
|
+
intent: SliderIntent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type SliderThumbVariants = {
|
|
18
|
+
size: SliderSize;
|
|
19
|
+
intent: SliderIntent;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type SliderThumbIconVariants = {
|
|
24
|
+
size: SliderSize;
|
|
25
|
+
intent: SliderIntent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type SliderMarkVariants = {
|
|
29
|
+
size: SliderSize;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type ExpandedSliderTrackStyles = StylesheetStyles<keyof SliderTrackVariants>;
|
|
33
|
+
export type ExpandedSliderFilledTrackStyles = StylesheetStyles<keyof SliderFilledTrackVariants>;
|
|
34
|
+
export type ExpandedSliderThumbStyles = StylesheetStyles<keyof SliderThumbVariants>;
|
|
35
|
+
export type ExpandedSliderThumbIconStyles = StylesheetStyles<keyof SliderThumbIconVariants>;
|
|
36
|
+
export type ExpandedSliderMarkStyles = StylesheetStyles<keyof SliderMarkVariants>;
|
|
37
|
+
export type ExpandedSliderStyles = StylesheetStyles<never>;
|
|
38
|
+
|
|
39
|
+
export type SliderStylesheet = {
|
|
40
|
+
container: ExpandedSliderStyles;
|
|
41
|
+
sliderWrapper: ExpandedSliderStyles;
|
|
42
|
+
track: ExpandedSliderTrackStyles;
|
|
43
|
+
filledTrack: ExpandedSliderFilledTrackStyles;
|
|
44
|
+
thumb: ExpandedSliderThumbStyles;
|
|
45
|
+
thumbActive: ExpandedSliderStyles;
|
|
46
|
+
thumbIcon: ExpandedSliderThumbIconStyles;
|
|
47
|
+
valueLabel: ExpandedSliderStyles;
|
|
48
|
+
minMaxLabels: ExpandedSliderStyles;
|
|
49
|
+
minMaxLabel: ExpandedSliderStyles;
|
|
50
|
+
marks: ExpandedSliderStyles;
|
|
51
|
+
mark: ExpandedSliderMarkStyles;
|
|
52
|
+
markLabel: ExpandedSliderStyles;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* NOTE: The slider stylesheet implementation has been moved to
|
|
57
|
+
* @idealyst/components/src/Slider/Slider.styles.tsx
|
|
58
|
+
*
|
|
59
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
60
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
61
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
62
|
+
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Intent } from "../theme/intent";
|
|
3
|
+
|
|
4
|
+
type SVGImageIntent = Intent;
|
|
5
|
+
|
|
6
|
+
type SVGImageVariants = {
|
|
7
|
+
intent: SVGImageIntent;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type ExpandedSVGImageStyles = StylesheetStyles<keyof SVGImageVariants>;
|
|
11
|
+
|
|
12
|
+
export type SVGImageStylesheet = {
|
|
13
|
+
container: ExpandedSVGImageStyles;
|
|
14
|
+
image: ExpandedSVGImageStyles;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* NOTE: The svg-image stylesheet implementation has been moved to
|
|
19
|
+
* @idealyst/components/src/SVGImage/SVGImage.styles.tsx
|
|
20
|
+
*
|
|
21
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
22
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
23
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
24
|
+
*/
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Intent } from "../theme/intent";
|
|
3
|
+
import { Size } from "../theme/size";
|
|
4
|
+
|
|
5
|
+
type SwitchSize = Size;
|
|
6
|
+
type SwitchIntent = Intent;
|
|
7
|
+
type LabelPosition = 'left' | 'right';
|
|
8
|
+
|
|
9
|
+
type SwitchTrackVariants = {
|
|
10
|
+
size: SwitchSize;
|
|
11
|
+
checked: boolean;
|
|
12
|
+
intent: SwitchIntent;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type SwitchThumbVariants = {
|
|
17
|
+
size: SwitchSize;
|
|
18
|
+
checked: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type ThumbIconVariants = {
|
|
22
|
+
size: SwitchSize;
|
|
23
|
+
checked: boolean;
|
|
24
|
+
intent: SwitchIntent;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type LabelVariants = {
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
position: LabelPosition;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type ExpandedSwitchTrackStyles = StylesheetStyles<keyof SwitchTrackVariants>;
|
|
33
|
+
export type ExpandedSwitchThumbStyles = StylesheetStyles<keyof SwitchThumbVariants>;
|
|
34
|
+
export type ExpandedThumbIconStyles = StylesheetStyles<keyof ThumbIconVariants>;
|
|
35
|
+
export type ExpandedLabelStyles = StylesheetStyles<keyof LabelVariants>;
|
|
36
|
+
export type ExpandedSwitchStyles = StylesheetStyles<never>;
|
|
37
|
+
|
|
38
|
+
export type SwitchStylesheet = {
|
|
39
|
+
container: ExpandedSwitchStyles;
|
|
40
|
+
switchContainer: ExpandedSwitchStyles;
|
|
41
|
+
switchTrack: ExpandedSwitchTrackStyles;
|
|
42
|
+
switchThumb: ExpandedSwitchThumbStyles;
|
|
43
|
+
thumbIcon: ExpandedThumbIconStyles;
|
|
44
|
+
label: ExpandedLabelStyles;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* NOTE: The switch stylesheet implementation has been moved to
|
|
49
|
+
* @idealyst/components/src/Switch/Switch.styles.tsx
|
|
50
|
+
*
|
|
51
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
52
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
53
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
54
|
+
*/
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Size } from "../theme/size";
|
|
3
|
+
|
|
4
|
+
type TabBarSize = Size;
|
|
5
|
+
type TabBarType = 'default' | 'pills' | 'underline';
|
|
6
|
+
type PillMode = 'light' | 'dark';
|
|
7
|
+
|
|
8
|
+
type TabBarContainerVariants = {
|
|
9
|
+
type: TabBarType;
|
|
10
|
+
size: TabBarSize;
|
|
11
|
+
pillMode: PillMode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
type TabBarTabVariants = {
|
|
15
|
+
size: TabBarSize;
|
|
16
|
+
type: TabBarType;
|
|
17
|
+
active: boolean;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
pillMode: PillMode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type TabBarLabelVariants = {
|
|
23
|
+
size: TabBarSize;
|
|
24
|
+
type: TabBarType;
|
|
25
|
+
active: boolean;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
pillMode: PillMode;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
type TabBarIndicatorVariants = {
|
|
31
|
+
type: TabBarType;
|
|
32
|
+
pillMode: PillMode;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type ExpandedTabBarContainerStyles = StylesheetStyles<keyof TabBarContainerVariants>;
|
|
36
|
+
export type ExpandedTabBarTabStyles = StylesheetStyles<keyof TabBarTabVariants>;
|
|
37
|
+
export type ExpandedTabBarLabelStyles = StylesheetStyles<keyof TabBarLabelVariants>;
|
|
38
|
+
export type ExpandedTabBarIndicatorStyles = StylesheetStyles<keyof TabBarIndicatorVariants>;
|
|
39
|
+
|
|
40
|
+
export type TabBarStylesheet = {
|
|
41
|
+
container: ExpandedTabBarContainerStyles;
|
|
42
|
+
tab: ExpandedTabBarTabStyles;
|
|
43
|
+
tabLabel: ExpandedTabBarLabelStyles;
|
|
44
|
+
indicator: ExpandedTabBarIndicatorStyles;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* NOTE: The tab-bar stylesheet implementation has been moved to
|
|
49
|
+
* @idealyst/components/src/TabBar/TabBar.styles.tsx
|
|
50
|
+
*
|
|
51
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
52
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
53
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
54
|
+
*/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Size } from "../theme/size";
|
|
3
|
+
|
|
4
|
+
type TableType = 'default' | 'bordered' | 'striped';
|
|
5
|
+
type TableSize = Size;
|
|
6
|
+
type TableAlign = 'left' | 'center' | 'right';
|
|
7
|
+
|
|
8
|
+
type TableContainerVariants = {
|
|
9
|
+
type: TableType;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type TableHeadVariants = {
|
|
13
|
+
sticky: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type TableRowVariants = {
|
|
17
|
+
type: TableType;
|
|
18
|
+
clickable: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type TableHeaderCellVariants = {
|
|
22
|
+
size: TableSize;
|
|
23
|
+
align: TableAlign;
|
|
24
|
+
type: TableType;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type TableCellVariants = {
|
|
28
|
+
size: TableSize;
|
|
29
|
+
align: TableAlign;
|
|
30
|
+
type: TableType;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type ExpandedTableContainerStyles = StylesheetStyles<keyof TableContainerVariants>;
|
|
34
|
+
export type ExpandedTableHeadStyles = StylesheetStyles<keyof TableHeadVariants>;
|
|
35
|
+
export type ExpandedTableRowStyles = StylesheetStyles<keyof TableRowVariants>;
|
|
36
|
+
export type ExpandedTableHeaderCellStyles = StylesheetStyles<keyof TableHeaderCellVariants>;
|
|
37
|
+
export type ExpandedTableCellStyles = StylesheetStyles<keyof TableCellVariants>;
|
|
38
|
+
export type ExpandedTableStyles = StylesheetStyles<never>;
|
|
39
|
+
|
|
40
|
+
export type TableStylesheet = {
|
|
41
|
+
container: ExpandedTableContainerStyles;
|
|
42
|
+
table: ExpandedTableStyles;
|
|
43
|
+
thead: ExpandedTableHeadStyles;
|
|
44
|
+
tbody: ExpandedTableStyles;
|
|
45
|
+
row: ExpandedTableRowStyles;
|
|
46
|
+
headerCell: ExpandedTableHeaderCellStyles;
|
|
47
|
+
cell: ExpandedTableCellStyles;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* NOTE: The table stylesheet implementation has been moved to
|
|
52
|
+
* @idealyst/components/src/Table/Table.styles.tsx
|
|
53
|
+
*
|
|
54
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
55
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
56
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
57
|
+
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Color } from "../theme/color";
|
|
3
|
+
import { Size } from "../theme/size";
|
|
4
|
+
|
|
5
|
+
type TextSize = Size;
|
|
6
|
+
type TextWeight = 'light' | 'normal' | 'medium' | 'semibold' | 'bold';
|
|
7
|
+
type TextAlign = 'left' | 'center' | 'right';
|
|
8
|
+
|
|
9
|
+
type TextVariants = {
|
|
10
|
+
size: TextSize;
|
|
11
|
+
weight: TextWeight;
|
|
12
|
+
align: TextAlign;
|
|
13
|
+
color: Color;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type ExpandedTextStyles = StylesheetStyles<keyof TextVariants>;
|
|
17
|
+
|
|
18
|
+
export type TextStylesheet = {
|
|
19
|
+
text: ExpandedTextStyles;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* NOTE: The text stylesheet implementation has been moved to
|
|
24
|
+
* @idealyst/components/src/Text/Text.styles.tsx
|
|
25
|
+
*
|
|
26
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
27
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
28
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
29
|
+
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Intent } from "../theme/intent";
|
|
3
|
+
import { Size } from "../theme/size";
|
|
4
|
+
|
|
5
|
+
type TextAreaSize = Size;
|
|
6
|
+
type TextAreaIntent = Intent;
|
|
7
|
+
type TextAreaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
8
|
+
|
|
9
|
+
type TextAreaLabelVariants = {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type TextAreaTextareaVariants = {
|
|
14
|
+
size: TextAreaSize;
|
|
15
|
+
intent: TextAreaIntent;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
hasError: boolean;
|
|
18
|
+
resize: TextAreaResize;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type TextAreaHelperTextVariants = {
|
|
22
|
+
hasError: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type TextAreaCharacterCountVariants = {
|
|
26
|
+
isNearLimit: boolean;
|
|
27
|
+
isAtLimit: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type ExpandedTextAreaLabelStyles = StylesheetStyles<keyof TextAreaLabelVariants>;
|
|
31
|
+
export type ExpandedTextAreaTextareaStyles = StylesheetStyles<keyof TextAreaTextareaVariants>;
|
|
32
|
+
export type ExpandedTextAreaHelperTextStyles = StylesheetStyles<keyof TextAreaHelperTextVariants>;
|
|
33
|
+
export type ExpandedTextAreaCharacterCountStyles = StylesheetStyles<keyof TextAreaCharacterCountVariants>;
|
|
34
|
+
export type ExpandedTextAreaStyles = StylesheetStyles<never>;
|
|
35
|
+
|
|
36
|
+
export type TextAreaStylesheet = {
|
|
37
|
+
container: ExpandedTextAreaStyles;
|
|
38
|
+
label: ExpandedTextAreaLabelStyles;
|
|
39
|
+
textareaContainer: ExpandedTextAreaStyles;
|
|
40
|
+
textarea: ExpandedTextAreaTextareaStyles;
|
|
41
|
+
helperText: ExpandedTextAreaHelperTextStyles;
|
|
42
|
+
footer: ExpandedTextAreaStyles;
|
|
43
|
+
characterCount: ExpandedTextAreaCharacterCountStyles;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* NOTE: The textarea stylesheet implementation has been moved to
|
|
48
|
+
* @idealyst/components/src/TextArea/TextArea.styles.tsx
|
|
49
|
+
*
|
|
50
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
51
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
52
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
53
|
+
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Size } from "../theme/size";
|
|
3
|
+
import { Intent } from "../theme/intent";
|
|
4
|
+
|
|
5
|
+
type TooltipSize = Size;
|
|
6
|
+
type TooltipIntent = Intent;
|
|
7
|
+
type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
|
|
9
|
+
type TooltipTooltipVariants = {
|
|
10
|
+
size: TooltipSize;
|
|
11
|
+
intent: TooltipIntent;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ExpandedTooltipTooltipStyles = StylesheetStyles<keyof TooltipTooltipVariants>;
|
|
15
|
+
export type ExpandedTooltipStyles = StylesheetStyles<never>;
|
|
16
|
+
|
|
17
|
+
export type TooltipStylesheet = {
|
|
18
|
+
container: ExpandedTooltipStyles;
|
|
19
|
+
tooltip: ExpandedTooltipTooltipStyles;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* NOTE: The tooltip stylesheet implementation has been moved to
|
|
24
|
+
* @idealyst/components/src/Tooltip/Tooltip.styles.tsx
|
|
25
|
+
*
|
|
26
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
27
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
28
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
29
|
+
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
|
|
3
|
+
export type ExpandedVideoStyles = StylesheetStyles<never>;
|
|
4
|
+
|
|
5
|
+
export type VideoStylesheet = {
|
|
6
|
+
container: ExpandedVideoStyles;
|
|
7
|
+
video: ExpandedVideoStyles;
|
|
8
|
+
fallback: ExpandedVideoStyles;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* NOTE: The video stylesheet implementation has been moved to
|
|
13
|
+
* @idealyst/components/src/Video/Video.styles.tsx
|
|
14
|
+
*
|
|
15
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
16
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
17
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
18
|
+
*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StylesheetStyles } from "../styles";
|
|
2
|
+
import { Surface } from "../theme/surface";
|
|
3
|
+
|
|
4
|
+
type ViewSpacing = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type ViewMargin = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
type ViewBackground = Surface | 'transparent';
|
|
7
|
+
type ViewRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
+
type ViewBorder = 'none' | 'thin' | 'thick';
|
|
9
|
+
|
|
10
|
+
type ViewVariants = {
|
|
11
|
+
spacing: ViewSpacing;
|
|
12
|
+
margin: ViewMargin;
|
|
13
|
+
background: ViewBackground;
|
|
14
|
+
radius: ViewRadius;
|
|
15
|
+
border: ViewBorder;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ExpandedViewStyles = StylesheetStyles<keyof ViewVariants>;
|
|
19
|
+
|
|
20
|
+
export type ViewStylesheet = {
|
|
21
|
+
view: ExpandedViewStyles;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* NOTE: The view stylesheet implementation has been moved to
|
|
26
|
+
* @idealyst/components/src/View/View.styles.tsx
|
|
27
|
+
*
|
|
28
|
+
* This was necessary because Unistyles' Babel transform on native cannot resolve
|
|
29
|
+
* function calls to extract variant structures at compile time. The styles must be
|
|
30
|
+
* inlined directly in StyleSheet.create() for variants to work on native.
|
|
31
|
+
*/
|