@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,261 @@
|
|
|
1
|
+
@use '../foundation/sizes' as sizes;
|
|
2
|
+
|
|
3
|
+
.attributes-editor {
|
|
4
|
+
&__component-meta {
|
|
5
|
+
margin-bottom: sizes.$spaceRelaxed;
|
|
6
|
+
padding: sizes.$spaceCozy sizes.$spaceComfy;
|
|
7
|
+
border-radius: sizes.$radiusRounded;
|
|
8
|
+
border: sizes.$borderWidthHairline solid #eee;
|
|
9
|
+
background: #f8f8f8;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__component-title,
|
|
13
|
+
&__field-label {
|
|
14
|
+
margin: 0;
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__component-title {
|
|
19
|
+
font-size: sizes.$fontSizeLg;
|
|
20
|
+
text-transform: capitalize;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__component-description {
|
|
24
|
+
margin: sizes.$spaceSnug 0 0;
|
|
25
|
+
font-size: sizes.$fontSizeBase;
|
|
26
|
+
color: #555;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__tabs {
|
|
30
|
+
display: flex;
|
|
31
|
+
gap: sizes.$spaceCompact;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
margin-bottom: sizes.$spaceComfy;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__tab-button {
|
|
37
|
+
padding: sizes.$spaceSnug sizes.$spaceCozy;
|
|
38
|
+
border-radius: sizes.$radiusMid;
|
|
39
|
+
border: sizes.$borderWidthHairline solid #ddd;
|
|
40
|
+
background: #fff;
|
|
41
|
+
color: #222;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
transition:
|
|
45
|
+
background 0.15s ease,
|
|
46
|
+
color 0.15s ease;
|
|
47
|
+
|
|
48
|
+
&:disabled {
|
|
49
|
+
opacity: 0.4;
|
|
50
|
+
cursor: default;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--active {
|
|
54
|
+
background: #222;
|
|
55
|
+
color: #fff;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__field-wrapper {
|
|
60
|
+
position: relative;
|
|
61
|
+
margin-bottom: sizes.$spaceComfy;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: sizes.$spaceTight;
|
|
65
|
+
width: 100%;
|
|
66
|
+
|
|
67
|
+
&--boolean {
|
|
68
|
+
flex-direction: row;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: sizes.$spaceCompact;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__field-label {
|
|
75
|
+
font-size: sizes.$fontSizeBase;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__empty-state {
|
|
79
|
+
padding: sizes.$spaceCompact;
|
|
80
|
+
opacity: 0.7;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__size-grid {
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: sizes.$spaceCozy;
|
|
86
|
+
flex-wrap: wrap;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__size-grid-item {
|
|
90
|
+
flex: 1;
|
|
91
|
+
min-width: sizes.$dimensionSizeGridMin;
|
|
92
|
+
max-width: sizes.$dimensionSizeGridMax;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&__size-field {
|
|
96
|
+
display: flex;
|
|
97
|
+
gap: sizes.$spaceSnug;
|
|
98
|
+
align-items: center;
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__size-field-input {
|
|
103
|
+
flex: 1;
|
|
104
|
+
min-width: 0;
|
|
105
|
+
height: sizes.$controlHeightMd;
|
|
106
|
+
line-height: sizes.$controlHeightMd;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&__size-field-select {
|
|
110
|
+
flex: 0 0 sizes.$dimensionSelectWidth;
|
|
111
|
+
min-width: sizes.$dimensionSelectMinWidth;
|
|
112
|
+
height: sizes.$controlHeightMd;
|
|
113
|
+
line-height: sizes.$controlHeightMd;
|
|
114
|
+
padding-inline: sizes.$spaceSnug;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.field-info-tooltip {
|
|
119
|
+
position: relative;
|
|
120
|
+
|
|
121
|
+
&__trigger {
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
font-size: sizes.$fontSizeXs;
|
|
126
|
+
line-height: 1.2;
|
|
127
|
+
color: #666;
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
font-weight: 600;
|
|
130
|
+
white-space: nowrap;
|
|
131
|
+
text-transform: uppercase;
|
|
132
|
+
letter-spacing: sizes.$letterSpacingTight;
|
|
133
|
+
background: transparent;
|
|
134
|
+
border: none;
|
|
135
|
+
padding: 0;
|
|
136
|
+
font-family: inherit;
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: sizes.$spaceTight;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__trigger:focus-visible {
|
|
143
|
+
outline: sizes.$outlineWidthFocus solid rgba(17, 24, 39, 0.4);
|
|
144
|
+
outline-offset: sizes.$outlineWidthFocus;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&__bubble {
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 50%;
|
|
150
|
+
right: 100%;
|
|
151
|
+
transform: translate(calc(-1 * sizes.$spaceCompact), -50%);
|
|
152
|
+
background: #111;
|
|
153
|
+
color: #fff;
|
|
154
|
+
padding: sizes.$spaceSnug sizes.$spaceInset;
|
|
155
|
+
border-radius: sizes.$radiusSoft;
|
|
156
|
+
font-size: sizes.$fontSizeSm;
|
|
157
|
+
line-height: 1.4;
|
|
158
|
+
width: sizes.$dimensionSizeGridMax;
|
|
159
|
+
text-align: left;
|
|
160
|
+
box-shadow: sizes.$shadowTooltip;
|
|
161
|
+
z-index: sizes.$zIndexRaised;
|
|
162
|
+
opacity: 0;
|
|
163
|
+
pointer-events: none;
|
|
164
|
+
transition:
|
|
165
|
+
opacity 0.15s ease,
|
|
166
|
+
transform 0.15s ease;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&__bubble--visible {
|
|
170
|
+
opacity: 1;
|
|
171
|
+
transform: translate(calc(-1 * sizes.$spaceCozy), -50%);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.special-category-section {
|
|
176
|
+
border: sizes.$borderWidthHairline solid #e0e0e0;
|
|
177
|
+
border-radius: sizes.$radiusRounded;
|
|
178
|
+
padding: sizes.$spaceCozy;
|
|
179
|
+
margin-bottom: sizes.$spaceComfy;
|
|
180
|
+
background: #fdfdfd;
|
|
181
|
+
|
|
182
|
+
&__header {
|
|
183
|
+
display: flex;
|
|
184
|
+
justify-content: space-between;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: sizes.$spaceCompact;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&__title {
|
|
190
|
+
margin: 0;
|
|
191
|
+
font-weight: 700;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&__toggle {
|
|
195
|
+
border: sizes.$borderWidthHairline solid #ddd;
|
|
196
|
+
background: #fff;
|
|
197
|
+
color: #222;
|
|
198
|
+
border-radius: sizes.$radiusSoft;
|
|
199
|
+
padding: sizes.$spaceTight sizes.$spaceInset;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
transition:
|
|
203
|
+
background 0.15s ease,
|
|
204
|
+
color 0.15s ease,
|
|
205
|
+
border-color 0.15s ease;
|
|
206
|
+
|
|
207
|
+
&[data-active='true'] {
|
|
208
|
+
background: #222;
|
|
209
|
+
color: #fff;
|
|
210
|
+
border-color: #222;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&__description {
|
|
215
|
+
margin: sizes.$spaceCompact 0 0;
|
|
216
|
+
color: #666;
|
|
217
|
+
font-size: sizes.$fontSizeSmPlus;
|
|
218
|
+
padding-bottom: sizes.$spaceComfy;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&__fields {
|
|
222
|
+
display: grid;
|
|
223
|
+
gap: sizes.$spaceCompact;
|
|
224
|
+
margin-top: sizes.$spaceCozy;
|
|
225
|
+
|
|
226
|
+
&--box {
|
|
227
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
228
|
+
grid-template-areas:
|
|
229
|
+
'top top'
|
|
230
|
+
'left right'
|
|
231
|
+
'bottom bottom';
|
|
232
|
+
|
|
233
|
+
// Target the FieldInfoTooltip wrapper which is the direct child
|
|
234
|
+
> .field-info-tooltip:has([data-field-slot='top']) {
|
|
235
|
+
grid-area: top;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
> .field-info-tooltip:has([data-field-slot='left']) {
|
|
239
|
+
grid-area: left;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
> .field-info-tooltip:has([data-field-slot='right']) {
|
|
243
|
+
grid-area: right;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
> .field-info-tooltip:has([data-field-slot='bottom']) {
|
|
247
|
+
grid-area: bottom;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&__field {
|
|
253
|
+
min-width: 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&__placeholder {
|
|
257
|
+
margin-top: sizes.$spaceCompact;
|
|
258
|
+
font-style: italic;
|
|
259
|
+
opacity: 0.7;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
1
|
+
@use '../foundation/colors' as colors;
|
|
2
|
+
@use '../foundation/sizes' as sizes;
|
|
3
|
+
@use '../foundation/mixins' as *;
|
|
3
4
|
|
|
4
5
|
.editor-tabs {
|
|
5
6
|
display: flex;
|
|
@@ -8,13 +9,23 @@
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.editor-tab {
|
|
11
|
-
padding: 8px 12px;
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
border: 1px solid transparent;
|
|
14
14
|
border-top-left-radius: 4px;
|
|
15
15
|
border-top-right-radius: 4px;
|
|
16
|
-
color:
|
|
16
|
+
color: colors.$textColor;
|
|
17
17
|
padding: 8px 12px;
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.editor-tab__label {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
line-height: 1.2;
|
|
28
|
+
font-size: clamp(0.85rem, 0.9rem + 0.2vw, 1rem);
|
|
18
29
|
}
|
|
19
30
|
|
|
20
31
|
.editor-tab--active {
|
|
@@ -45,14 +56,14 @@
|
|
|
45
56
|
display: flex;
|
|
46
57
|
align-items: center;
|
|
47
58
|
gap: 12px;
|
|
48
|
-
padding: 0
|
|
59
|
+
padding: 0 sizes.$spaceComfy;
|
|
49
60
|
height: 60px;
|
|
50
|
-
background:
|
|
51
|
-
border-bottom: 1px solid
|
|
61
|
+
background: colors.$canvasColor;
|
|
62
|
+
border-bottom: 1px solid colors.$borderColor;
|
|
52
63
|
}
|
|
53
64
|
|
|
54
65
|
.editor-header__title {
|
|
55
|
-
color:
|
|
66
|
+
color: colors.$textColor;
|
|
56
67
|
font-weight: 600;
|
|
57
68
|
}
|
|
58
69
|
|
|
@@ -64,17 +75,17 @@
|
|
|
64
75
|
gap: 8px;
|
|
65
76
|
overflow: auto;
|
|
66
77
|
height: 60px;
|
|
67
|
-
padding:
|
|
78
|
+
padding: sizes.$spaceTight;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
.editor-device-button {
|
|
71
82
|
position: relative;
|
|
72
83
|
min-width: 160px;
|
|
73
84
|
height: 100%;
|
|
74
|
-
border: 1px solid
|
|
85
|
+
border: 1px solid colors.$borderColor;
|
|
75
86
|
border-radius: 6px;
|
|
76
|
-
background:
|
|
77
|
-
color:
|
|
87
|
+
background: colors.$surfaceColor;
|
|
88
|
+
color: colors.$textColor;
|
|
78
89
|
cursor: pointer;
|
|
79
90
|
font-size: 12px;
|
|
80
91
|
&.editor-device-button--selected {
|
|
@@ -104,13 +115,30 @@
|
|
|
104
115
|
height: 36px;
|
|
105
116
|
min-width: 120px; /* visible even without content */
|
|
106
117
|
padding: 0 12px;
|
|
107
|
-
border: 1px solid
|
|
118
|
+
border: 1px solid colors.$borderColor;
|
|
108
119
|
border-radius: 6px;
|
|
109
|
-
background:
|
|
110
|
-
color:
|
|
120
|
+
background: colors.$surfaceColor;
|
|
121
|
+
color: colors.$textColor;
|
|
111
122
|
cursor: pointer;
|
|
112
123
|
}
|
|
113
124
|
|
|
125
|
+
.debug-button {
|
|
126
|
+
min-width: auto;
|
|
127
|
+
height: auto;
|
|
128
|
+
padding: 4px 12px;
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
line-height: 1.2;
|
|
131
|
+
border-radius: 999px;
|
|
132
|
+
background: rgba(255, 255, 255, 0.95);
|
|
133
|
+
border-color: rgba(15, 23, 42, 0.15);
|
|
134
|
+
box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.debug-button:hover {
|
|
138
|
+
background: #fff;
|
|
139
|
+
border-color: rgba(15, 23, 42, 0.3);
|
|
140
|
+
}
|
|
141
|
+
|
|
114
142
|
.editor-button:disabled {
|
|
115
143
|
opacity: 0.6;
|
|
116
144
|
cursor: default;
|
|
@@ -124,51 +152,38 @@
|
|
|
124
152
|
font-size: 12px;
|
|
125
153
|
}
|
|
126
154
|
|
|
127
|
-
/*
|
|
128
|
-
.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
.
|
|
141
|
-
|
|
142
|
-
top: 50%;
|
|
143
|
-
left: 50%;
|
|
144
|
-
transform: translate(-50%, -50%);
|
|
145
|
-
background: #fff;
|
|
146
|
-
border-radius: 8px;
|
|
147
|
-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
|
148
|
-
width: min(960px, calc(100vw - 40px));
|
|
149
|
-
max-height: calc(100vh - 120px);
|
|
150
|
-
display: flex;
|
|
151
|
-
flex-direction: column;
|
|
155
|
+
/* Builder add button */
|
|
156
|
+
.builder__add-button {
|
|
157
|
+
width: 100%;
|
|
158
|
+
margin-top: 12px;
|
|
159
|
+
min-height: 52px;
|
|
160
|
+
border-style: dashed;
|
|
161
|
+
border-color: #cbd5f5;
|
|
162
|
+
background: #f8fafc;
|
|
163
|
+
color: #0f172a;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
gap: 10px;
|
|
166
|
+
transition:
|
|
167
|
+
border-color 0.2s ease,
|
|
168
|
+
background 0.2s ease,
|
|
169
|
+
color 0.2s ease;
|
|
152
170
|
}
|
|
153
171
|
|
|
154
|
-
.
|
|
155
|
-
display: flex;
|
|
172
|
+
.builder__add-button-icon {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
width: 28px;
|
|
175
|
+
height: 28px;
|
|
176
|
+
border-radius: 999px;
|
|
156
177
|
align-items: center;
|
|
157
|
-
justify-content:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
.editor-device-grid {
|
|
163
|
-
padding: 16px;
|
|
164
|
-
display: grid;
|
|
165
|
-
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
166
|
-
gap: 12px;
|
|
167
|
-
overflow: auto;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
background: #2563eb;
|
|
180
|
+
color: #fff;
|
|
181
|
+
font-size: 18px;
|
|
182
|
+
line-height: 1;
|
|
168
183
|
}
|
|
169
184
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
.builder__add-button:hover {
|
|
186
|
+
border-color: #94a3b8;
|
|
187
|
+
background: #eef2ff;
|
|
188
|
+
color: #111827;
|
|
174
189
|
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
.mockos-router {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Screen Components
|
|
8
|
+
.mockos-screen {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.mockos-screen--center {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mockos-screen--launchscreen {
|
|
21
|
+
background-color: #000000;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mockos-screen--home {
|
|
25
|
+
padding: 20px;
|
|
26
|
+
background-color: #f5f5f5;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mockos-screen--onboard {
|
|
30
|
+
padding: 20px;
|
|
31
|
+
background-color: #ffffff;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mockos-screen--subscription {
|
|
35
|
+
padding: 20px;
|
|
36
|
+
background-color: #ffffff;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Screen Content
|
|
40
|
+
.mockos-screen__title {
|
|
41
|
+
font-size: 32px;
|
|
42
|
+
font-weight: bold;
|
|
43
|
+
color: #000;
|
|
44
|
+
margin-bottom: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mockos-screen__subtitle {
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
color: #666;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.mockos-screen__heading {
|
|
53
|
+
font-size: 24px;
|
|
54
|
+
font-weight: bold;
|
|
55
|
+
margin-bottom: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mockos-screen__text {
|
|
59
|
+
font-size: 16px;
|
|
60
|
+
color: #333;
|
|
61
|
+
margin-bottom: 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mockos-screen__plan {
|
|
65
|
+
padding: 16px;
|
|
66
|
+
border-radius: 8px;
|
|
67
|
+
text-align: center;
|
|
68
|
+
margin-bottom: 12px;
|
|
69
|
+
|
|
70
|
+
&--premium {
|
|
71
|
+
background-color: #007aff;
|
|
72
|
+
color: #fff;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--basic {
|
|
76
|
+
background-color: #e5e5e5;
|
|
77
|
+
color: #333;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Launcher
|
|
82
|
+
.mockos-launcher {
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
padding: 40px 20px;
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.mockos-launcher__grid {
|
|
91
|
+
display: grid;
|
|
92
|
+
grid-template-columns: repeat(4, 1fr);
|
|
93
|
+
gap: 20px;
|
|
94
|
+
padding: 20px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mockos-launcher__app {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: 8px;
|
|
102
|
+
background: transparent;
|
|
103
|
+
border: none;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
padding: 8px;
|
|
106
|
+
border-radius: 12px;
|
|
107
|
+
transition: background-color 0.2s;
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:active {
|
|
114
|
+
transform: scale(0.95);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mockos-launcher__app-icon {
|
|
119
|
+
width: 60px;
|
|
120
|
+
height: 60px;
|
|
121
|
+
border-radius: 13px;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
124
|
+
|
|
125
|
+
svg {
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: 100%;
|
|
128
|
+
display: block;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.mockos-launcher__app-name {
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
color: #ffffff;
|
|
135
|
+
text-align: center;
|
|
136
|
+
max-width: 70px;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
text-overflow: ellipsis;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
}
|