@developer_tribe/react-builder 0.1.32 → 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 -17
- package/dist/RenderPage.d.ts +4 -11
- 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/index.d.ts +1 -0
- package/dist/build-components/patterns.generated.d.ts +4855 -132
- package/dist/components/AttributesEditorPanel.d.ts +9 -0
- package/dist/components/Breadcrumb.d.ts +15 -0
- package/dist/components/Builder.d.ts +9 -0
- 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 +10 -0
- package/dist/index.cjs.js +6 -5
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -0
- 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 +11 -0
- package/dist/pages/tabs/BuilderTab.d.ts +9 -0
- package/dist/pages/tabs/DebugTab.d.ts +7 -0
- package/dist/pages/tabs/PreviewTab.d.ts +3 -0
- package/dist/store.d.ts +15 -18
- package/dist/styles.css +1 -1
- package/dist/types/PreviewConfig.d.ts +6 -3
- package/dist/types/Project.d.ts +12 -2
- package/dist/utils/copyNode.d.ts +2 -0
- package/dist/utils/logger.d.ts +11 -0
- package/dist/utils/patterns.d.ts +24 -0
- package/dist/utils/useLogRender.d.ts +1 -0
- package/package.json +17 -9
- package/scripts/prebuild/utils/createBuildComponentsIndex.js +15 -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 +434 -311
- package/src/DeviceMockFrame.tsx +42 -67
- package/src/RenderPage.tsx +8 -44
- package/src/assets/images/android.svg +43 -0
- package/src/assets/images/apple.svg +16 -0
- package/src/assets/images/background.jpg +0 -0
- package/src/assets/samples/carousel-sample.json +2 -3
- package/src/assets/samples/getSamples.ts +49 -12
- package/src/assets/samples/simple-1.json +1 -2
- package/src/assets/samples/simple-2.json +1 -2
- package/src/assets/samples/vpn-onboard-1.json +1 -2
- package/src/assets/samples/vpn-onboard-2.json +1 -2
- package/src/assets/samples/vpn-onboard-3.json +1 -2
- package/src/assets/samples/vpn-onboard-4.json +1 -2
- package/src/assets/samples/vpn-onboard-5.json +1 -2
- package/src/assets/samples/vpn-onboard-6.json +1 -2
- 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 +12 -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 +17 -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 +8 -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 +42 -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 +7 -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 +10 -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 +8 -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 +53 -9
- 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 +27 -17
- 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 +106 -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 +14 -6
- 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 +29 -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 +8 -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 +22 -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/OnboardSubtitle.tsx +2 -0
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +4 -5
- package/src/build-components/OnboardSubtitle/pattern.json +6 -0
- package/src/build-components/OnboardTitle/OnboardTitle.tsx +2 -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 +12 -6
- 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 +11 -6
- package/src/build-components/View/ViewProps.generated.ts +3 -4
- package/src/build-components/View/pattern.json +227 -19
- package/src/build-components/index.ts +22 -0
- package/src/build-components/patterns.generated.ts +4905 -139
- package/src/components/AttributesEditorPanel.tsx +58 -0
- package/src/components/Breadcrumb.tsx +80 -0
- package/src/components/Builder.tsx +375 -0
- 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 +138 -0
- package/src/index.ts +8 -4
- 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 +150 -0
- package/src/pages/tabs/BuilderTab.tsx +33 -0
- package/src/pages/tabs/DebugTab.tsx +64 -0
- package/src/pages/tabs/PreviewTab.tsx +206 -0
- package/src/size-matters/index.ts +25 -5
- package/src/store.ts +56 -38
- package/src/styles/base/_global.scss +253 -0
- package/src/styles/components/_attributes-editor.scss +261 -0
- package/src/styles/components/_editor-shell.scss +189 -0
- 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/foundation/_mixins.scss +22 -0
- 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 -129
- 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/PreviewConfig.ts +14 -5
- package/src/types/Project.ts +15 -2
- package/src/types/images.d.ts +8 -0
- package/src/utils/copyNode.ts +7 -0
- package/src/utils/extractTextStyle.ts +8 -4
- package/src/utils/extractViewStyle.ts +51 -7
- package/src/utils/getDevices.ts +1 -0
- package/src/utils/logger.ts +76 -0
- package/src/utils/patterns.ts +33 -0
- package/src/utils/useLogRender.ts +13 -0
- package/dist/build-components/OnboardDot/OnboardExpandingDotProps.generated.d.ts +0 -10
- package/src/build-components/OnboardDot/OnboardExpandingDotProps.generated.ts +0 -20
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
@use '../foundation/colors' as colors;
|
|
2
|
+
@use '../foundation/sizes' as sizes;
|
|
3
|
+
@use '../foundation/typography' as type;
|
|
4
|
+
@use '../foundation/mixins' as *;
|
|
5
|
+
|
|
6
|
+
/* Global utility classes */
|
|
7
|
+
html,
|
|
8
|
+
body,
|
|
9
|
+
#root {
|
|
10
|
+
font-family: type.$bodyFont;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.editor-container {
|
|
14
|
+
height: 100vh;
|
|
15
|
+
width: 100vw;
|
|
16
|
+
display: flex;
|
|
17
|
+
overflow: hidden; /* Split panels manage their own scroll */
|
|
18
|
+
}
|
|
19
|
+
.editor-panel-builder {
|
|
20
|
+
padding: 4px 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.app-main {
|
|
24
|
+
flex: 1 1 auto;
|
|
25
|
+
background: colors.$canvasColor;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.page-bg {
|
|
29
|
+
background: colors.$canvasColor;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.grid-cards {
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
35
|
+
gap: sizes.$spaceComfy;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.btn-add {
|
|
39
|
+
height: 120px;
|
|
40
|
+
border: 2px dashed colors.$mutedTextColor;
|
|
41
|
+
border-radius: sizes.$radiusRounded;
|
|
42
|
+
background: #fff;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
color: colors.$textColor;
|
|
46
|
+
transition:
|
|
47
|
+
border-color 0.2s ease,
|
|
48
|
+
transform 0.1s ease,
|
|
49
|
+
box-shadow 0.2s ease;
|
|
50
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
border-color: darken(colors.$mutedTextColor, 10%);
|
|
54
|
+
transform: translateY(-1px);
|
|
55
|
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.split-left {
|
|
60
|
+
@include thin-scrollbar;
|
|
61
|
+
flex: 1 1 10%;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
border-right: 1px solid colors.$borderColor;
|
|
64
|
+
overflow: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.split-right {
|
|
68
|
+
position: relative;
|
|
69
|
+
flex: 1 1 45%;
|
|
70
|
+
max-height: calc(100vh + 60px);
|
|
71
|
+
//NOTE: Found by trial and error. We want it to make it full height of the screen with padding
|
|
72
|
+
padding: sizes.$spaceComfy;
|
|
73
|
+
padding-bottom: 120px;
|
|
74
|
+
overflow: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.split-right__controls {
|
|
78
|
+
position: sticky;
|
|
79
|
+
top: sizes.$spaceCozy;
|
|
80
|
+
z-index: 2;
|
|
81
|
+
display: flex;
|
|
82
|
+
margin-bottom: sizes.$spaceCozy;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.split-third {
|
|
86
|
+
flex: 1 1 25%;
|
|
87
|
+
min-width: 450px;
|
|
88
|
+
border-right: 1px solid colors.$borderColor;
|
|
89
|
+
overflow: auto;
|
|
90
|
+
max-height: calc(100vh - 120px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.split-right-background {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
left: 0;
|
|
97
|
+
right: 0;
|
|
98
|
+
bottom: 0;
|
|
99
|
+
height: calc(100vh + 60px);
|
|
100
|
+
background-size: cover;
|
|
101
|
+
background-position: center;
|
|
102
|
+
background-repeat: repeat;
|
|
103
|
+
background-size: 500px auto;
|
|
104
|
+
opacity: 0.2;
|
|
105
|
+
z-index: 0;
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.stage-wrapper {
|
|
110
|
+
display: flex;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
background: transparent;
|
|
113
|
+
padding: sizes.$spaceComfy;
|
|
114
|
+
position: relative;
|
|
115
|
+
z-index: 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.stage {
|
|
119
|
+
@include card;
|
|
120
|
+
border: 1px solid colors.$borderColor;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
|
|
123
|
+
.scroll-container {
|
|
124
|
+
/* Mobile-like scrollbar styling */
|
|
125
|
+
&::-webkit-scrollbar {
|
|
126
|
+
width: 8px;
|
|
127
|
+
height: 8px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&::-webkit-scrollbar-track {
|
|
131
|
+
background: transparent;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&::-webkit-scrollbar-thumb {
|
|
135
|
+
background: rgba(0, 0, 0, 0.25);
|
|
136
|
+
border-radius: 8px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* For Firefox */
|
|
140
|
+
scrollbar-width: thin;
|
|
141
|
+
scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Header */
|
|
146
|
+
.app-header {
|
|
147
|
+
position: sticky;
|
|
148
|
+
top: 0;
|
|
149
|
+
z-index: 10;
|
|
150
|
+
background: #fff;
|
|
151
|
+
border-bottom: 1px solid colors.$borderColor;
|
|
152
|
+
height: 60px;
|
|
153
|
+
padding: 0 sizes.$spaceComfy;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
|
|
158
|
+
a {
|
|
159
|
+
color: colors.$textColor;
|
|
160
|
+
text-decoration: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.app-header__brand {
|
|
165
|
+
font-weight: 700;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.app-header__nav {
|
|
169
|
+
display: flex;
|
|
170
|
+
gap: sizes.$spaceComfy;
|
|
171
|
+
}
|
|
172
|
+
.warning {
|
|
173
|
+
color: colors.$dangerColor;
|
|
174
|
+
font-size: 12px;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
margin-bottom: sizes.$spaceComfy;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Breadcrumb */
|
|
180
|
+
.breadcrumb {
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
gap: sizes.$spaceCozy;
|
|
184
|
+
font-size: 12px;
|
|
185
|
+
color: colors.$mutedTextColor;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.breadcrumb__back {
|
|
189
|
+
display: inline-flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
gap: sizes.$spaceTight;
|
|
192
|
+
padding: 0;
|
|
193
|
+
border: none;
|
|
194
|
+
background: none;
|
|
195
|
+
color: colors.$textColor;
|
|
196
|
+
font-weight: 600;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
transition: color 0.2s ease;
|
|
199
|
+
|
|
200
|
+
&:hover,
|
|
201
|
+
&:focus-visible {
|
|
202
|
+
color: colors.$accentColor;
|
|
203
|
+
outline: none;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.breadcrumb__back-icon {
|
|
208
|
+
font-size: 14px;
|
|
209
|
+
line-height: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.breadcrumb__list {
|
|
213
|
+
list-style: none;
|
|
214
|
+
padding: 0;
|
|
215
|
+
margin: 0;
|
|
216
|
+
display: flex;
|
|
217
|
+
align-items: center;
|
|
218
|
+
gap: sizes.$spaceCompact;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.breadcrumb__item {
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
&--clickable {
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.breadcrumb__separator {
|
|
230
|
+
color: colors.$borderColor;
|
|
231
|
+
margin: 0 sizes.$spaceTight;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.breadcrumb__link {
|
|
235
|
+
color: colors.$textColor;
|
|
236
|
+
text-decoration: none;
|
|
237
|
+
&:hover {
|
|
238
|
+
text-decoration: underline;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.breadcrumb__current {
|
|
243
|
+
color: colors.$mutedTextColor;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.device-status-bar {
|
|
247
|
+
position: relative;
|
|
248
|
+
z-index: 100;
|
|
249
|
+
}
|
|
250
|
+
.device-navigation-bar {
|
|
251
|
+
position: relative;
|
|
252
|
+
z-index: 100;
|
|
253
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
@use '../foundation/colors' as colors;
|
|
2
|
+
@use '../foundation/sizes' as sizes;
|
|
3
|
+
@use '../foundation/mixins' as *;
|
|
4
|
+
|
|
5
|
+
.editor-tabs {
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
border-bottom: 1px solid #e5e7eb;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.editor-tab {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
border: 1px solid transparent;
|
|
14
|
+
border-top-left-radius: 4px;
|
|
15
|
+
border-top-right-radius: 4px;
|
|
16
|
+
color: colors.$textColor;
|
|
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);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.editor-tab--active {
|
|
32
|
+
background: #fff;
|
|
33
|
+
border-color: #e5e7eb #e5e7eb #fff #e5e7eb;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.editor-panels {
|
|
37
|
+
padding: 12px;
|
|
38
|
+
&.editor-panels-debug {
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.jer-editor-container {
|
|
43
|
+
padding-left: 0 !important;
|
|
44
|
+
padding-right: 0 !important;
|
|
45
|
+
}
|
|
46
|
+
.editor-panel {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.editor-panel--active {
|
|
51
|
+
display: block;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Editor utility header */
|
|
55
|
+
.editor-header {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 12px;
|
|
59
|
+
padding: 0 sizes.$spaceComfy;
|
|
60
|
+
height: 60px;
|
|
61
|
+
background: colors.$canvasColor;
|
|
62
|
+
border-bottom: 1px solid colors.$borderColor;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.editor-header__title {
|
|
66
|
+
color: colors.$textColor;
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.editor-header__devices {
|
|
71
|
+
@include thin-scrollbar;
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: row;
|
|
74
|
+
align-items: stretch;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
overflow: auto;
|
|
77
|
+
height: 60px;
|
|
78
|
+
padding: sizes.$spaceTight;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.editor-device-button {
|
|
82
|
+
position: relative;
|
|
83
|
+
min-width: 160px;
|
|
84
|
+
height: 100%;
|
|
85
|
+
border: 1px solid colors.$borderColor;
|
|
86
|
+
border-radius: 6px;
|
|
87
|
+
background: colors.$surfaceColor;
|
|
88
|
+
color: colors.$textColor;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
font-size: 12px;
|
|
91
|
+
&.editor-device-button--selected {
|
|
92
|
+
border-color: #000;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.editor-device-button img {
|
|
97
|
+
position: absolute;
|
|
98
|
+
bottom: 4px;
|
|
99
|
+
right: 4px;
|
|
100
|
+
width: 16px;
|
|
101
|
+
height: 16px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.editor-header__actions {
|
|
105
|
+
margin-left: auto; /* push actions to the far right */
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 8px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.editor-button {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
height: 36px;
|
|
116
|
+
min-width: 120px; /* visible even without content */
|
|
117
|
+
padding: 0 12px;
|
|
118
|
+
border: 1px solid colors.$borderColor;
|
|
119
|
+
border-radius: 6px;
|
|
120
|
+
background: colors.$surfaceColor;
|
|
121
|
+
color: colors.$textColor;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
}
|
|
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
|
+
|
|
142
|
+
.editor-button:disabled {
|
|
143
|
+
opacity: 0.6;
|
|
144
|
+
cursor: default;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Specific hooks for save buttons (kept empty for now) */
|
|
148
|
+
.editor-save-button,
|
|
149
|
+
.editor-save-previewconfig-button {
|
|
150
|
+
color: #000;
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
}
|
|
154
|
+
|
|
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;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.builder__add-button-icon {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
width: 28px;
|
|
175
|
+
height: 28px;
|
|
176
|
+
border-radius: 999px;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
background: #2563eb;
|
|
180
|
+
color: #fff;
|
|
181
|
+
font-size: 18px;
|
|
182
|
+
line-height: 1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.builder__add-button:hover {
|
|
186
|
+
border-color: #94a3b8;
|
|
187
|
+
background: #eef2ff;
|
|
188
|
+
color: #111827;
|
|
189
|
+
}
|