@developer_tribe/react-builder 1.0.1 → 1.0.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/dist/DeviceMockFrame.d.ts +2 -1
- package/dist/RenderPage.d.ts +4 -3
- package/dist/attributes-editor/Field.d.ts +16 -0
- package/dist/attributes-editor/FieldInfoTooltip.d.ts +7 -0
- package/dist/attributes-editor/LayoutPreviewPicker.d.ts +12 -0
- package/dist/attributes-editor/SpecialCategorySection.d.ts +19 -0
- package/dist/attributes-editor/types.d.ts +14 -0
- package/dist/background.jpg +0 -0
- package/dist/build-components/Button/Button.d.ts +1 -1
- package/dist/build-components/Button/ButtonProps.generated.d.ts +26 -1
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +27 -1
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +25 -0
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +25 -0
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +27 -1
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +27 -1
- package/dist/build-components/Image/ImageProps.generated.d.ts +25 -3
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +27 -1
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +25 -0
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +25 -0
- package/dist/build-components/OnboardDot/OnboardDot.d.ts +1 -1
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +22 -0
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +4 -5
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +25 -3
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +24 -3
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +25 -4
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +4 -5
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +4 -5
- package/dist/build-components/Text/TextProps.generated.d.ts +4 -5
- package/dist/build-components/View/ViewProps.generated.d.ts +3 -4
- package/dist/build-components/patterns.generated.d.ts +4855 -132
- package/dist/components/Breadcrumb.d.ts +3 -1
- package/dist/components/Checkbox.d.ts +17 -0
- package/dist/components/DeviceButton.d.ts +8 -0
- package/dist/components/DeviceNavigationBar.d.ts +10 -0
- package/dist/components/DeviceStatusBar.d.ts +9 -0
- package/dist/components/EditorHeader.d.ts +3 -8
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/mockOS/components/MockLaunchScreenComponent.d.ts +6 -0
- package/dist/mockOS/components/MockOSRouter.d.ts +8 -0
- package/dist/mockOS/components/PermissionModal.d.ts +9 -0
- package/dist/mockOS/context/MockOSContext.d.ts +36 -0
- package/dist/mockOS/hooks/useMockNavigation.d.ts +3 -0
- package/dist/mockOS/hooks/useMockPermission.d.ts +3 -0
- package/dist/mockOS/index.d.ts +9 -0
- package/dist/mockOS/managers/mockPermissionManager.d.ts +10 -0
- package/dist/mockOS/managers/navigationManager.d.ts +17 -0
- package/dist/modals/AddComponentModal.d.ts +8 -0
- package/dist/modals/ColorModal.d.ts +9 -0
- package/dist/modals/DeviceSelectorModal.d.ts +9 -0
- package/dist/modals/LocalicationModal.d.ts +8 -0
- package/dist/modals/Modal.d.ts +12 -0
- package/dist/modals/index.d.ts +5 -0
- package/dist/pages/ProjectPage.d.ts +1 -1
- package/dist/store.d.ts +0 -2
- package/dist/styles.css +1 -1
- package/dist/utils/patterns.d.ts +24 -0
- package/package.json +2 -1
- package/scripts/prebuild/utils/createGeneratedProps.js +11 -3
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +45 -6
- package/scripts/prebuild/utils/validatePatternJson.js +13 -5
- package/src/AttributesEditor.tsx +433 -312
- package/src/DeviceMockFrame.tsx +21 -37
- package/src/RenderPage.tsx +5 -4
- package/src/assets/images/android.svg +42 -42
- package/src/assets/images/apple.svg +15 -15
- package/src/attributes-editor/Field.tsx +662 -0
- package/src/attributes-editor/FieldInfoTooltip.tsx +49 -0
- package/src/attributes-editor/LayoutPreviewPicker.tsx +199 -0
- package/src/attributes-editor/SpecialCategorySection.tsx +284 -0
- package/src/attributes-editor/types.ts +30 -0
- package/src/build-components/Button/Button.tsx +10 -2
- package/src/build-components/Button/ButtonProps.generated.ts +37 -1
- package/src/build-components/Button/pattern.json +31 -2
- package/src/build-components/Carousel/Carousel.tsx +15 -2
- package/src/build-components/Carousel/CarouselProps.generated.ts +39 -1
- package/src/build-components/Carousel/pattern.json +10 -0
- package/src/build-components/CarouselButtons/CarouselButtons.tsx +6 -2
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +36 -0
- package/src/build-components/CarouselButtons/pattern.json +22 -0
- package/src/build-components/CarouselDots/CarouselDots.tsx +40 -8
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +36 -0
- package/src/build-components/CarouselDots/pattern.json +15 -0
- package/src/build-components/CarouselItem/CarouselItem.tsx +5 -2
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +39 -1
- package/src/build-components/CarouselItem/pattern.json +7 -0
- package/src/build-components/CarouselProvider/CarouselProvider.tsx +10 -2
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +39 -1
- package/src/build-components/CarouselProvider/pattern.json +7 -0
- package/src/build-components/Image/Image.tsx +8 -2
- package/src/build-components/Image/ImageProps.generated.ts +36 -3
- package/src/build-components/Image/pattern.json +46 -3
- package/src/build-components/Onboard/Onboard.tsx +6 -1
- package/src/build-components/Onboard/OnboardProps.generated.ts +39 -1
- package/src/build-components/Onboard/pattern.json +11 -0
- package/src/build-components/OnboardButton/OnboardButton.tsx +46 -5
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +36 -0
- package/src/build-components/OnboardButton/pattern.json +71 -5
- package/src/build-components/OnboardButtons/OnboardButtons.tsx +20 -10
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +36 -0
- package/src/build-components/OnboardButtons/pattern.json +70 -4
- package/src/build-components/OnboardDot/OnboardDot.tsx +104 -4
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +22 -0
- package/src/build-components/OnboardDot/pattern.json +54 -1
- package/src/build-components/OnboardFooter/OnboardFooter.tsx +9 -3
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +4 -5
- package/src/build-components/OnboardFooter/pattern.json +58 -2
- package/src/build-components/OnboardImage/OnboardImage.tsx +27 -5
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +36 -3
- package/src/build-components/OnboardImage/pattern.json +21 -0
- package/src/build-components/OnboardItem/OnboardItem.tsx +6 -1
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +35 -3
- package/src/build-components/OnboardItem/pattern.json +38 -2
- package/src/build-components/OnboardProvider/OnboardProvider.tsx +20 -8
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +37 -4
- package/src/build-components/OnboardProvider/pattern.json +51 -4
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +4 -5
- package/src/build-components/OnboardSubtitle/pattern.json +6 -0
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +4 -5
- package/src/build-components/OnboardTitle/pattern.json +6 -0
- package/src/build-components/Text/Text.tsx +7 -3
- package/src/build-components/Text/TextProps.generated.ts +4 -5
- package/src/build-components/Text/pattern.json +38 -2
- package/src/build-components/View/View.tsx +9 -6
- package/src/build-components/View/ViewProps.generated.ts +3 -4
- package/src/build-components/View/pattern.json +227 -19
- package/src/build-components/patterns.generated.ts +4905 -139
- package/src/components/AttributesEditorPanel.tsx +7 -61
- package/src/components/Breadcrumb.tsx +37 -5
- package/src/components/Builder.tsx +180 -77
- package/src/components/Checkbox.tsx +81 -0
- package/src/components/DeviceButton.tsx +39 -0
- package/src/components/DeviceNavigationBar.tsx +201 -0
- package/src/components/DeviceStatusBar.tsx +85 -0
- package/src/components/EditorHeader.tsx +26 -74
- package/src/mockOS/components/MockLaunchScreenComponent.tsx +43 -0
- package/src/mockOS/components/MockOSRouter.tsx +115 -0
- package/src/mockOS/components/PermissionModal.tsx +270 -0
- package/src/mockOS/context/MockOSContext.tsx +179 -0
- package/src/mockOS/hooks/useMockNavigation.ts +11 -0
- package/src/mockOS/hooks/useMockPermission.ts +11 -0
- package/src/mockOS/index.ts +26 -0
- package/src/mockOS/managers/mockPermissionManager.ts +54 -0
- package/src/mockOS/managers/navigationManager.ts +91 -0
- package/src/modals/AddComponentModal.tsx +313 -0
- package/src/modals/ColorModal.tsx +268 -0
- package/src/modals/DeviceSelectorModal.tsx +57 -0
- package/src/modals/LocalicationModal.tsx +54 -0
- package/src/modals/Modal.tsx +57 -0
- package/src/modals/index.ts +5 -0
- package/src/pages/ProjectPage.tsx +19 -21
- package/src/pages/tabs/DebugTab.tsx +50 -9
- package/src/pages/tabs/PreviewTab.tsx +52 -40
- package/src/size-matters/index.ts +21 -5
- package/src/store.ts +0 -4
- package/src/styles/{global.scss → base/_global.scss} +92 -39
- package/src/styles/components/_attributes-editor.scss +261 -0
- package/src/styles/{editor.scss → components/_editor-shell.scss} +72 -57
- package/src/styles/components/_mockos-router.scss +140 -0
- package/src/styles/components/_ui-components.scss +183 -0
- package/src/styles/foundation/_colors.scss +8 -0
- package/src/styles/{_mixins.scss → foundation/_mixins.scss} +5 -4
- package/src/styles/{_reset.scss → foundation/_reset.scss} +5 -2
- package/src/styles/foundation/_sizes.scss +37 -0
- package/src/styles/foundation/_typography.scss +4 -0
- package/src/styles/foundation/_variables.scss +3 -0
- package/src/styles/index.scss +22 -136
- package/src/styles/layout/_builder.scss +68 -0
- package/src/styles/layout/_pages.scss +3 -0
- package/src/styles/modals/_add-component.scss +122 -0
- package/src/styles/modals/_color-modal.scss +130 -0
- package/src/styles/modals/_device-selector.scss +18 -0
- package/src/styles/modals/_localication-modal.scss +68 -0
- package/src/styles/modals/_modal-shell.scss +46 -0
- package/src/styles/utilities/_carousel.scss +125 -0
- package/src/types/images.d.ts +8 -0
- package/src/utils/extractTextStyle.ts +4 -2
- package/src/utils/extractViewStyle.ts +51 -7
- package/src/utils/patterns.ts +33 -0
- package/dist/build-components/OnboardDot/OnboardExpandingDotProps.generated.d.ts +0 -10
- package/src/build-components/OnboardDot/OnboardExpandingDotProps.generated.ts +0 -20
- package/src/styles/_variables.scss +0 -27
- package/src/styles/builder.scss +0 -60
- package/src/styles/components.scss +0 -88
- package/src/styles/pages.scss +0 -2
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
@use '../foundation/colors' as colors;
|
|
2
|
+
@use '../foundation/sizes' as sizes;
|
|
3
|
+
@use '../foundation/mixins' as *;
|
|
4
|
+
|
|
5
|
+
.editor-controls {
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: auto 1fr;
|
|
8
|
+
gap: sizes.$spaceCozy;
|
|
9
|
+
padding: sizes.$spaceComfy;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.editor-section {
|
|
13
|
+
background: #fff;
|
|
14
|
+
border: 1px solid colors.$borderColor;
|
|
15
|
+
border-radius: sizes.$radiusRounded;
|
|
16
|
+
padding: sizes.$spaceComfy;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.form-row {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: 160px 1fr;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: sizes.$spaceCozy;
|
|
24
|
+
margin-bottom: sizes.$spaceCozy;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.form-actions {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: sizes.$spaceCozy;
|
|
30
|
+
margin-top: sizes.$spaceComfy;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.btn {
|
|
34
|
+
padding: 8px 12px;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
border: 1px solid colors.$borderColor;
|
|
37
|
+
background: #fff;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
transition:
|
|
40
|
+
background 0.2s ease,
|
|
41
|
+
box-shadow 0.2s ease;
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
background: #f9fafb;
|
|
45
|
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Inputs */
|
|
50
|
+
.input {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
height: 32px;
|
|
54
|
+
padding: 0 8px;
|
|
55
|
+
border: 1px solid colors.$borderColor;
|
|
56
|
+
border-radius: sizes.$radiusRounded;
|
|
57
|
+
background: #fff;
|
|
58
|
+
color: colors.$textColor;
|
|
59
|
+
font: inherit;
|
|
60
|
+
outline: none;
|
|
61
|
+
transition:
|
|
62
|
+
border-color 0.15s ease,
|
|
63
|
+
box-shadow 0.15s ease;
|
|
64
|
+
|
|
65
|
+
&:focus {
|
|
66
|
+
border-color: darken(colors.$borderColor, 8%);
|
|
67
|
+
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.input--color {
|
|
72
|
+
padding: 0;
|
|
73
|
+
width: 40px;
|
|
74
|
+
height: 28px;
|
|
75
|
+
border-radius: 6px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
|
|
78
|
+
&::-webkit-color-swatch-wrapper {
|
|
79
|
+
padding: 0;
|
|
80
|
+
}
|
|
81
|
+
&::-webkit-color-swatch {
|
|
82
|
+
border: none;
|
|
83
|
+
border-radius: 4px;
|
|
84
|
+
}
|
|
85
|
+
&::-moz-color-swatch {
|
|
86
|
+
border: none;
|
|
87
|
+
border-radius: 4px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Checkbox */
|
|
92
|
+
.builder-checkbox {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
gap: 4px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.builder-checkbox__label {
|
|
99
|
+
display: inline-flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: 10px;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
color: colors.$textColor;
|
|
104
|
+
font-weight: 600;
|
|
105
|
+
position: relative;
|
|
106
|
+
user-select: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.builder-checkbox__native {
|
|
110
|
+
position: absolute;
|
|
111
|
+
opacity: 0;
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
width: 1px;
|
|
114
|
+
height: 1px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.builder-checkbox__control {
|
|
118
|
+
width: 20px;
|
|
119
|
+
height: 20px;
|
|
120
|
+
border-radius: 6px;
|
|
121
|
+
border: 2px solid colors.$borderColor;
|
|
122
|
+
background: #fff;
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
transition:
|
|
127
|
+
background 0.2s ease,
|
|
128
|
+
border-color 0.2s ease,
|
|
129
|
+
box-shadow 0.2s ease,
|
|
130
|
+
transform 0.2s ease;
|
|
131
|
+
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
|
|
132
|
+
|
|
133
|
+
&::after {
|
|
134
|
+
content: '';
|
|
135
|
+
width: 6px;
|
|
136
|
+
height: 12px;
|
|
137
|
+
border-right: 2px solid transparent;
|
|
138
|
+
border-bottom: 2px solid transparent;
|
|
139
|
+
transform: rotate(45deg) scale(0);
|
|
140
|
+
transform-origin: center;
|
|
141
|
+
transition:
|
|
142
|
+
transform 0.2s ease,
|
|
143
|
+
border-color 0.2s ease;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.builder-checkbox__label:hover .builder-checkbox__control {
|
|
148
|
+
transform: translateY(-1px);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.builder-checkbox__native:focus-visible + .builder-checkbox__control {
|
|
152
|
+
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.builder-checkbox__native:checked + .builder-checkbox__control {
|
|
156
|
+
background: linear-gradient(135deg, #1f2937, #4f46e5);
|
|
157
|
+
border-color: transparent;
|
|
158
|
+
box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.builder-checkbox__native:checked + .builder-checkbox__control::after {
|
|
162
|
+
border-color: #fff;
|
|
163
|
+
transform: rotate(45deg) scale(1);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.builder-checkbox__text {
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
line-height: 1.4;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.builder-checkbox__helper {
|
|
172
|
+
font-size: 12px;
|
|
173
|
+
color: #6b7280;
|
|
174
|
+
margin-left: 30px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.builder-checkbox--disabled {
|
|
178
|
+
opacity: 0.6;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.builder-checkbox--disabled .builder-checkbox__label {
|
|
182
|
+
cursor: not-allowed;
|
|
183
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
@use './
|
|
1
|
+
@use './colors' as colors;
|
|
2
|
+
@use './sizes' as sizes;
|
|
2
3
|
@mixin center-content {
|
|
3
4
|
display: flex;
|
|
4
5
|
align-items: center;
|
|
@@ -6,9 +7,9 @@
|
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
@mixin card {
|
|
9
|
-
background:
|
|
10
|
-
border: 1px solid
|
|
11
|
-
border-radius:
|
|
10
|
+
background: colors.$surfaceColor;
|
|
11
|
+
border: 1px solid colors.$borderColor;
|
|
12
|
+
border-radius: sizes.$radiusSoft;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
@mixin thin-scrollbar {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@use './colors' as colors;
|
|
2
|
+
@use './typography' as type;
|
|
3
|
+
|
|
1
4
|
*,
|
|
2
5
|
*::before,
|
|
3
6
|
*::after {
|
|
@@ -11,8 +14,8 @@ body,
|
|
|
11
14
|
padding: 0;
|
|
12
15
|
}
|
|
13
16
|
body {
|
|
14
|
-
background:
|
|
15
|
-
|
|
17
|
+
background: colors.$surfaceColor;
|
|
18
|
+
font-family: type.$bodyFont;
|
|
16
19
|
-webkit-font-smoothing: antialiased;
|
|
17
20
|
-moz-osx-font-smoothing: grayscale;
|
|
18
21
|
overflow: hidden; /* Prevent page scroll; panels will handle their own scroll */
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* Library sizing scale (spacing, radii, shadow) stays centralized. */
|
|
2
|
+
$spaceTight: 4px;
|
|
3
|
+
$spaceSnug: 6px;
|
|
4
|
+
$spaceCompact: 8px;
|
|
5
|
+
$spaceInset: 10px;
|
|
6
|
+
$spaceCozy: 12px;
|
|
7
|
+
$spaceComfy: 16px;
|
|
8
|
+
$spaceRelaxed: 20px;
|
|
9
|
+
$spaceRoomy: 24px;
|
|
10
|
+
|
|
11
|
+
$radiusSoft: 4px;
|
|
12
|
+
$radiusMid: 6px;
|
|
13
|
+
$radiusRounded: 8px;
|
|
14
|
+
$radiusPill: 12px;
|
|
15
|
+
|
|
16
|
+
$borderWidthHairline: 1px;
|
|
17
|
+
$outlineWidthFocus: 2px;
|
|
18
|
+
|
|
19
|
+
$cardShadow: 0 10px 30px rgba(0, 0, 0, 0.12);
|
|
20
|
+
$shadowTooltip: 0 6px 16px rgba(0, 0, 0, 0.2);
|
|
21
|
+
|
|
22
|
+
$fontSizeXs: 11px;
|
|
23
|
+
$fontSizeSm: 12px;
|
|
24
|
+
$fontSizeSmPlus: 13px;
|
|
25
|
+
$fontSizeBase: 14px;
|
|
26
|
+
$fontSizeLg: 18px;
|
|
27
|
+
|
|
28
|
+
$letterSpacingTight: 0.5px;
|
|
29
|
+
|
|
30
|
+
$controlHeightMd: 36px;
|
|
31
|
+
$dimensionSelectMinWidth: 60px;
|
|
32
|
+
$dimensionSelectWidth: 72px;
|
|
33
|
+
$dimensionSizeGridMin: 140px;
|
|
34
|
+
$dimensionSizeGridMax: 220px;
|
|
35
|
+
|
|
36
|
+
$zIndexRaised: 20;
|
|
37
|
+
|
package/src/styles/index.scss
CHANGED
|
@@ -1,137 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
@use './
|
|
3
|
-
@use './
|
|
4
|
-
@use './
|
|
5
|
-
@use './
|
|
6
|
-
@use './
|
|
7
|
-
@use './builder.scss';
|
|
8
|
-
@use './editor.scss';
|
|
1
|
+
/* Entry point consumed by the builder package. */
|
|
2
|
+
@use './foundation/colors';
|
|
3
|
+
@use './foundation/sizes';
|
|
4
|
+
@use './foundation/typography';
|
|
5
|
+
@use './foundation/mixins';
|
|
6
|
+
@use './foundation/reset';
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
transform: translate3d(0, 0, 0);
|
|
27
|
-
flex: 0 0 var(--slide-size);
|
|
28
|
-
min-width: 0;
|
|
29
|
-
padding-left: var(--slide-spacing);
|
|
30
|
-
flex: 0 0 100%;
|
|
31
|
-
}
|
|
32
|
-
.embla__slide__number {
|
|
33
|
-
box-shadow: inset 0 0 0 0.2rem var(--detail-medium-contrast);
|
|
34
|
-
border-radius: 1.8rem;
|
|
35
|
-
font-size: 4rem;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
height: var(--slide-height);
|
|
41
|
-
user-select: none;
|
|
42
|
-
}
|
|
43
|
-
.embla__controls {
|
|
44
|
-
display: grid;
|
|
45
|
-
grid-template-columns: auto 1fr;
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
gap: 1.2rem;
|
|
48
|
-
margin-top: 1.8rem;
|
|
49
|
-
}
|
|
50
|
-
.embla__buttons {
|
|
51
|
-
display: grid;
|
|
52
|
-
grid-template-columns: repeat(2, 1fr);
|
|
53
|
-
gap: 0.6rem;
|
|
54
|
-
align-items: center;
|
|
55
|
-
}
|
|
56
|
-
.embla__button {
|
|
57
|
-
-webkit-tap-highlight-color: rgba(var(--text-high-contrast-rgb-value), 0.5);
|
|
58
|
-
-webkit-appearance: none;
|
|
59
|
-
appearance: none;
|
|
60
|
-
background-color: transparent;
|
|
61
|
-
touch-action: manipulation;
|
|
62
|
-
display: inline-flex;
|
|
63
|
-
text-decoration: none;
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
border: 0;
|
|
66
|
-
padding: 0;
|
|
67
|
-
margin: 0;
|
|
68
|
-
box-shadow: inset 0 0 0 0.2rem var(--detail-medium-contrast);
|
|
69
|
-
width: 3.6rem;
|
|
70
|
-
height: 3.6rem;
|
|
71
|
-
z-index: 1;
|
|
72
|
-
border-radius: 50%;
|
|
73
|
-
color: var(--text-body);
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
justify-content: center;
|
|
77
|
-
}
|
|
78
|
-
.embla__button:disabled {
|
|
79
|
-
color: var(--detail-high-contrast);
|
|
80
|
-
}
|
|
81
|
-
.embla__button__svg {
|
|
82
|
-
width: 35%;
|
|
83
|
-
height: 35%;
|
|
84
|
-
}
|
|
85
|
-
.embla__dots {
|
|
86
|
-
display: flex;
|
|
87
|
-
flex-wrap: wrap;
|
|
88
|
-
justify-content: center;
|
|
89
|
-
align-items: center;
|
|
90
|
-
margin-right: 0;
|
|
91
|
-
height: 50px;
|
|
92
|
-
}
|
|
93
|
-
.embla__dot {
|
|
94
|
-
-webkit-tap-highlight-color: rgba(var(--text-high-contrast-rgb-value), 0.5);
|
|
95
|
-
-webkit-appearance: none;
|
|
96
|
-
appearance: none;
|
|
97
|
-
background-color: transparent;
|
|
98
|
-
touch-action: manipulation;
|
|
99
|
-
display: inline-flex;
|
|
100
|
-
text-decoration: none;
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
border: 0;
|
|
103
|
-
padding: 0;
|
|
104
|
-
margin: 0;
|
|
105
|
-
width: 2.6rem;
|
|
106
|
-
height: 2.6rem;
|
|
107
|
-
display: flex;
|
|
108
|
-
align-items: center;
|
|
109
|
-
justify-content: center;
|
|
110
|
-
border-radius: 50%;
|
|
111
|
-
}
|
|
112
|
-
.embla__dot:after {
|
|
113
|
-
box-shadow: inset 0 0 0 0.2rem var(--detail-medium-contrast);
|
|
114
|
-
width: 1.4rem;
|
|
115
|
-
height: 1.4rem;
|
|
116
|
-
border-radius: 50%;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
content: '';
|
|
120
|
-
}
|
|
121
|
-
.embla__dot--selected:after {
|
|
122
|
-
box-shadow: inset 0 0 0 0.2rem var(--text-body);
|
|
123
|
-
}
|
|
124
|
-
.carousel-provider {
|
|
125
|
-
height: 100%;
|
|
126
|
-
}
|
|
127
|
-
.embla {
|
|
128
|
-
height: 100%;
|
|
129
|
-
}
|
|
130
|
-
.embla__viewport {
|
|
131
|
-
height: 100%;
|
|
132
|
-
display: flex;
|
|
133
|
-
flex-direction: column;
|
|
134
|
-
}
|
|
135
|
-
.embla__container {
|
|
136
|
-
flex: 1;
|
|
137
|
-
}
|
|
8
|
+
@use './base/global';
|
|
9
|
+
@use './layout/pages';
|
|
10
|
+
@use './layout/builder';
|
|
11
|
+
|
|
12
|
+
@use './components/ui-components';
|
|
13
|
+
@use './components/editor-shell';
|
|
14
|
+
@use './components/attributes-editor';
|
|
15
|
+
@use './components/mockos-router';
|
|
16
|
+
|
|
17
|
+
@use './modals/modal-shell';
|
|
18
|
+
@use './modals/add-component';
|
|
19
|
+
@use './modals/device-selector';
|
|
20
|
+
@use './modals/color-modal';
|
|
21
|
+
@use './modals/localication-modal';
|
|
22
|
+
|
|
23
|
+
@use './utilities/carousel';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use '../foundation/colors' as colors;
|
|
2
|
+
@use '../foundation/sizes' as sizes;
|
|
3
|
+
@use '../foundation/mixins' as *;
|
|
4
|
+
|
|
5
|
+
.builder {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: sizes.$spaceCozy;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.builder__breadcrumbs {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
gap: sizes.$spaceCompact;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.builder__breadcrumb {
|
|
18
|
+
color: colors.$mutedTextColor;
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.builder__current {
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.builder__list {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
gap: sizes.$spaceCompact;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.builder__button {
|
|
33
|
+
@include card;
|
|
34
|
+
padding: sizes.$spaceCozy sizes.$spaceCozy;
|
|
35
|
+
background: colors.$accentColor;
|
|
36
|
+
color: #fff;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.builder__button-label {
|
|
40
|
+
font-size: 13px;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.builder__button-condition {
|
|
45
|
+
font-size: 10px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.builder__node {
|
|
49
|
+
@include card;
|
|
50
|
+
padding: sizes.$spaceCozy;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.builder__node-type {
|
|
54
|
+
margin: 0 0 sizes.$spaceCompact 0;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.builder__children {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: sizes.$spaceCompact;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.builder__text,
|
|
65
|
+
.builder__placeholder {
|
|
66
|
+
color: colors.$mutedTextColor;
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
@use '../foundation/colors' as colors;
|
|
2
|
+
@use '../foundation/sizes' as sizes;
|
|
3
|
+
|
|
4
|
+
.add-component-modal {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
height: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.add-component-modal__body {
|
|
11
|
+
flex: 1;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
padding-bottom: sizes.$spaceRoomy;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.add-component-modal__section {
|
|
17
|
+
padding: 0 sizes.$spaceRoomy;
|
|
18
|
+
margin-bottom: sizes.$spaceRoomy;
|
|
19
|
+
|
|
20
|
+
&:first-of-type {
|
|
21
|
+
margin-top: sizes.$spaceRoomy;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.add-component-modal__section-title {
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
margin-bottom: sizes.$spaceCozy;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.add-component-modal__toggle {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: sizes.$spaceCozy;
|
|
35
|
+
margin: 0 sizes.$spaceRoomy sizes.$spaceRoomy;
|
|
36
|
+
padding: sizes.$spaceCozy 0;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
user-select: none;
|
|
39
|
+
|
|
40
|
+
input {
|
|
41
|
+
width: 18px;
|
|
42
|
+
height: 18px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.add-component-modal__group {
|
|
47
|
+
background: colors.$surfaceColor;
|
|
48
|
+
border: 1px solid colors.$borderColor;
|
|
49
|
+
border-radius: 12px;
|
|
50
|
+
padding: sizes.$spaceComfy;
|
|
51
|
+
margin-bottom: sizes.$spaceCozy;
|
|
52
|
+
box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.add-component-modal__group-title {
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
color: colors.$mutedTextColor;
|
|
59
|
+
margin-bottom: sizes.$spaceCozy;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.add-component-modal__grid {
|
|
63
|
+
padding: sizes.$spaceComfy;
|
|
64
|
+
display: grid;
|
|
65
|
+
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
66
|
+
gap: sizes.$spaceCozy;
|
|
67
|
+
overflow: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.add-component-modal__card {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: sizes.$spaceCozy;
|
|
74
|
+
padding: sizes.$spaceCozy;
|
|
75
|
+
border: 1px solid colors.$borderColor;
|
|
76
|
+
border-radius: 10px;
|
|
77
|
+
background: colors.$canvasColor;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
text-align: left;
|
|
80
|
+
transition:
|
|
81
|
+
border-color 0.2s ease,
|
|
82
|
+
box-shadow 0.2s ease,
|
|
83
|
+
transform 0.2s ease;
|
|
84
|
+
color: inherit;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.add-component-modal__card:hover {
|
|
88
|
+
border-color: colors.$accentColor;
|
|
89
|
+
box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
|
|
90
|
+
transform: translateY(-2px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.add-component-modal__thumbnail {
|
|
94
|
+
width: 100%;
|
|
95
|
+
aspect-ratio: 4 / 3;
|
|
96
|
+
border-radius: 8px;
|
|
97
|
+
background: colors.$canvasColor;
|
|
98
|
+
border: 1px dashed colors.$borderColor;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
color: colors.$accentColor;
|
|
103
|
+
font-weight: 600;
|
|
104
|
+
font-size: 12px;
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
letter-spacing: 0.05em;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.add-component-modal__title {
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
color: colors.$textColor;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.add-component-modal__empty {
|
|
115
|
+
margin: sizes.$spaceCozy 0;
|
|
116
|
+
padding: sizes.$spaceComfy;
|
|
117
|
+
border: 1px dashed colors.$borderColor;
|
|
118
|
+
border-radius: 10px;
|
|
119
|
+
color: colors.$mutedTextColor;
|
|
120
|
+
font-size: 14px;
|
|
121
|
+
text-align: center;
|
|
122
|
+
}
|