@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.
Files changed (187) hide show
  1. package/dist/DeviceMockFrame.d.ts +2 -1
  2. package/dist/RenderPage.d.ts +4 -3
  3. package/dist/attributes-editor/Field.d.ts +16 -0
  4. package/dist/attributes-editor/FieldInfoTooltip.d.ts +7 -0
  5. package/dist/attributes-editor/LayoutPreviewPicker.d.ts +12 -0
  6. package/dist/attributes-editor/SpecialCategorySection.d.ts +19 -0
  7. package/dist/attributes-editor/types.d.ts +14 -0
  8. package/dist/background.jpg +0 -0
  9. package/dist/build-components/Button/Button.d.ts +1 -1
  10. package/dist/build-components/Button/ButtonProps.generated.d.ts +26 -1
  11. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +27 -1
  12. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +25 -0
  13. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +25 -0
  14. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +27 -1
  15. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +27 -1
  16. package/dist/build-components/Image/ImageProps.generated.d.ts +25 -3
  17. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +27 -1
  18. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +25 -0
  19. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +25 -0
  20. package/dist/build-components/OnboardDot/OnboardDot.d.ts +1 -1
  21. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +22 -0
  22. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +4 -5
  23. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +25 -3
  24. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +24 -3
  25. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +25 -4
  26. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +4 -5
  27. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +4 -5
  28. package/dist/build-components/Text/TextProps.generated.d.ts +4 -5
  29. package/dist/build-components/View/ViewProps.generated.d.ts +3 -4
  30. package/dist/build-components/patterns.generated.d.ts +4855 -132
  31. package/dist/components/Breadcrumb.d.ts +3 -1
  32. package/dist/components/Checkbox.d.ts +17 -0
  33. package/dist/components/DeviceButton.d.ts +8 -0
  34. package/dist/components/DeviceNavigationBar.d.ts +10 -0
  35. package/dist/components/DeviceStatusBar.d.ts +9 -0
  36. package/dist/components/EditorHeader.d.ts +3 -8
  37. package/dist/index.cjs.js +5 -5
  38. package/dist/index.cjs.js.map +1 -1
  39. package/dist/index.esm.js +5 -5
  40. package/dist/index.esm.js.map +1 -1
  41. package/dist/mockOS/components/MockLaunchScreenComponent.d.ts +6 -0
  42. package/dist/mockOS/components/MockOSRouter.d.ts +8 -0
  43. package/dist/mockOS/components/PermissionModal.d.ts +9 -0
  44. package/dist/mockOS/context/MockOSContext.d.ts +36 -0
  45. package/dist/mockOS/hooks/useMockNavigation.d.ts +3 -0
  46. package/dist/mockOS/hooks/useMockPermission.d.ts +3 -0
  47. package/dist/mockOS/index.d.ts +9 -0
  48. package/dist/mockOS/managers/mockPermissionManager.d.ts +10 -0
  49. package/dist/mockOS/managers/navigationManager.d.ts +17 -0
  50. package/dist/modals/AddComponentModal.d.ts +8 -0
  51. package/dist/modals/ColorModal.d.ts +9 -0
  52. package/dist/modals/DeviceSelectorModal.d.ts +9 -0
  53. package/dist/modals/LocalicationModal.d.ts +8 -0
  54. package/dist/modals/Modal.d.ts +12 -0
  55. package/dist/modals/index.d.ts +5 -0
  56. package/dist/pages/ProjectPage.d.ts +1 -1
  57. package/dist/store.d.ts +0 -2
  58. package/dist/styles.css +1 -1
  59. package/dist/utils/patterns.d.ts +24 -0
  60. package/package.json +2 -1
  61. package/scripts/prebuild/utils/createGeneratedProps.js +11 -3
  62. package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +45 -6
  63. package/scripts/prebuild/utils/validatePatternJson.js +13 -5
  64. package/src/AttributesEditor.tsx +433 -312
  65. package/src/DeviceMockFrame.tsx +21 -37
  66. package/src/RenderPage.tsx +5 -4
  67. package/src/assets/images/android.svg +42 -42
  68. package/src/assets/images/apple.svg +15 -15
  69. package/src/attributes-editor/Field.tsx +662 -0
  70. package/src/attributes-editor/FieldInfoTooltip.tsx +49 -0
  71. package/src/attributes-editor/LayoutPreviewPicker.tsx +199 -0
  72. package/src/attributes-editor/SpecialCategorySection.tsx +284 -0
  73. package/src/attributes-editor/types.ts +30 -0
  74. package/src/build-components/Button/Button.tsx +10 -2
  75. package/src/build-components/Button/ButtonProps.generated.ts +37 -1
  76. package/src/build-components/Button/pattern.json +31 -2
  77. package/src/build-components/Carousel/Carousel.tsx +15 -2
  78. package/src/build-components/Carousel/CarouselProps.generated.ts +39 -1
  79. package/src/build-components/Carousel/pattern.json +10 -0
  80. package/src/build-components/CarouselButtons/CarouselButtons.tsx +6 -2
  81. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +36 -0
  82. package/src/build-components/CarouselButtons/pattern.json +22 -0
  83. package/src/build-components/CarouselDots/CarouselDots.tsx +40 -8
  84. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +36 -0
  85. package/src/build-components/CarouselDots/pattern.json +15 -0
  86. package/src/build-components/CarouselItem/CarouselItem.tsx +5 -2
  87. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +39 -1
  88. package/src/build-components/CarouselItem/pattern.json +7 -0
  89. package/src/build-components/CarouselProvider/CarouselProvider.tsx +10 -2
  90. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +39 -1
  91. package/src/build-components/CarouselProvider/pattern.json +7 -0
  92. package/src/build-components/Image/Image.tsx +8 -2
  93. package/src/build-components/Image/ImageProps.generated.ts +36 -3
  94. package/src/build-components/Image/pattern.json +46 -3
  95. package/src/build-components/Onboard/Onboard.tsx +6 -1
  96. package/src/build-components/Onboard/OnboardProps.generated.ts +39 -1
  97. package/src/build-components/Onboard/pattern.json +11 -0
  98. package/src/build-components/OnboardButton/OnboardButton.tsx +46 -5
  99. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +36 -0
  100. package/src/build-components/OnboardButton/pattern.json +71 -5
  101. package/src/build-components/OnboardButtons/OnboardButtons.tsx +20 -10
  102. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +36 -0
  103. package/src/build-components/OnboardButtons/pattern.json +70 -4
  104. package/src/build-components/OnboardDot/OnboardDot.tsx +104 -4
  105. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +22 -0
  106. package/src/build-components/OnboardDot/pattern.json +54 -1
  107. package/src/build-components/OnboardFooter/OnboardFooter.tsx +9 -3
  108. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +4 -5
  109. package/src/build-components/OnboardFooter/pattern.json +58 -2
  110. package/src/build-components/OnboardImage/OnboardImage.tsx +27 -5
  111. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +36 -3
  112. package/src/build-components/OnboardImage/pattern.json +21 -0
  113. package/src/build-components/OnboardItem/OnboardItem.tsx +6 -1
  114. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +35 -3
  115. package/src/build-components/OnboardItem/pattern.json +38 -2
  116. package/src/build-components/OnboardProvider/OnboardProvider.tsx +20 -8
  117. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +37 -4
  118. package/src/build-components/OnboardProvider/pattern.json +51 -4
  119. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +4 -5
  120. package/src/build-components/OnboardSubtitle/pattern.json +6 -0
  121. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +4 -5
  122. package/src/build-components/OnboardTitle/pattern.json +6 -0
  123. package/src/build-components/Text/Text.tsx +7 -3
  124. package/src/build-components/Text/TextProps.generated.ts +4 -5
  125. package/src/build-components/Text/pattern.json +38 -2
  126. package/src/build-components/View/View.tsx +9 -6
  127. package/src/build-components/View/ViewProps.generated.ts +3 -4
  128. package/src/build-components/View/pattern.json +227 -19
  129. package/src/build-components/patterns.generated.ts +4905 -139
  130. package/src/components/AttributesEditorPanel.tsx +7 -61
  131. package/src/components/Breadcrumb.tsx +37 -5
  132. package/src/components/Builder.tsx +180 -77
  133. package/src/components/Checkbox.tsx +81 -0
  134. package/src/components/DeviceButton.tsx +39 -0
  135. package/src/components/DeviceNavigationBar.tsx +201 -0
  136. package/src/components/DeviceStatusBar.tsx +85 -0
  137. package/src/components/EditorHeader.tsx +26 -74
  138. package/src/mockOS/components/MockLaunchScreenComponent.tsx +43 -0
  139. package/src/mockOS/components/MockOSRouter.tsx +115 -0
  140. package/src/mockOS/components/PermissionModal.tsx +270 -0
  141. package/src/mockOS/context/MockOSContext.tsx +179 -0
  142. package/src/mockOS/hooks/useMockNavigation.ts +11 -0
  143. package/src/mockOS/hooks/useMockPermission.ts +11 -0
  144. package/src/mockOS/index.ts +26 -0
  145. package/src/mockOS/managers/mockPermissionManager.ts +54 -0
  146. package/src/mockOS/managers/navigationManager.ts +91 -0
  147. package/src/modals/AddComponentModal.tsx +313 -0
  148. package/src/modals/ColorModal.tsx +268 -0
  149. package/src/modals/DeviceSelectorModal.tsx +57 -0
  150. package/src/modals/LocalicationModal.tsx +54 -0
  151. package/src/modals/Modal.tsx +57 -0
  152. package/src/modals/index.ts +5 -0
  153. package/src/pages/ProjectPage.tsx +19 -21
  154. package/src/pages/tabs/DebugTab.tsx +50 -9
  155. package/src/pages/tabs/PreviewTab.tsx +52 -40
  156. package/src/size-matters/index.ts +21 -5
  157. package/src/store.ts +0 -4
  158. package/src/styles/{global.scss → base/_global.scss} +92 -39
  159. package/src/styles/components/_attributes-editor.scss +261 -0
  160. package/src/styles/{editor.scss → components/_editor-shell.scss} +72 -57
  161. package/src/styles/components/_mockos-router.scss +140 -0
  162. package/src/styles/components/_ui-components.scss +183 -0
  163. package/src/styles/foundation/_colors.scss +8 -0
  164. package/src/styles/{_mixins.scss → foundation/_mixins.scss} +5 -4
  165. package/src/styles/{_reset.scss → foundation/_reset.scss} +5 -2
  166. package/src/styles/foundation/_sizes.scss +37 -0
  167. package/src/styles/foundation/_typography.scss +4 -0
  168. package/src/styles/foundation/_variables.scss +3 -0
  169. package/src/styles/index.scss +22 -136
  170. package/src/styles/layout/_builder.scss +68 -0
  171. package/src/styles/layout/_pages.scss +3 -0
  172. package/src/styles/modals/_add-component.scss +122 -0
  173. package/src/styles/modals/_color-modal.scss +130 -0
  174. package/src/styles/modals/_device-selector.scss +18 -0
  175. package/src/styles/modals/_localication-modal.scss +68 -0
  176. package/src/styles/modals/_modal-shell.scss +46 -0
  177. package/src/styles/utilities/_carousel.scss +125 -0
  178. package/src/types/images.d.ts +8 -0
  179. package/src/utils/extractTextStyle.ts +4 -2
  180. package/src/utils/extractViewStyle.ts +51 -7
  181. package/src/utils/patterns.ts +33 -0
  182. package/dist/build-components/OnboardDot/OnboardExpandingDotProps.generated.d.ts +0 -10
  183. package/src/build-components/OnboardDot/OnboardExpandingDotProps.generated.ts +0 -20
  184. package/src/styles/_variables.scss +0 -27
  185. package/src/styles/builder.scss +0 -60
  186. package/src/styles/components.scss +0 -88
  187. 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
+ }
@@ -0,0 +1,8 @@
1
+ /* Library color tokens live in a single place for easy discovery. */
2
+ $textColor: #111827;
3
+ $mutedTextColor: #6b7280;
4
+ $surfaceColor: #ffffff;
5
+ $canvasColor: #f3f4f6;
6
+ $borderColor: #e5e7eb;
7
+ $accentColor: #2563eb;
8
+ $dangerColor: #ef4444;
@@ -1,4 +1,5 @@
1
- @use './variables' as *;
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: #fff;
10
- border: 1px solid $color-border;
11
- border-radius: $radius-xs;
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: #fff;
15
- //font-family: $font-sans;
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
+
@@ -0,0 +1,4 @@
1
+ $bodyFont:
2
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
3
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
4
+
@@ -0,0 +1,3 @@
1
+ @forward './colors';
2
+ @forward './sizes';
3
+ @forward './typography';
@@ -1,137 +1,23 @@
1
- @use './variables' as *;
2
- @use './mixins' as *;
3
- @use './reset';
4
- @use './global.scss';
5
- @use './pages.scss';
6
- @use './components.scss';
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
- .embla {
11
- max-width: 48rem;
12
- margin: auto;
13
- --slide-height: 19rem;
14
- --slide-spacing: 1rem;
15
- --slide-size: 70%;
16
- }
17
- .embla__viewport {
18
- overflow: hidden;
19
- }
20
- .embla__container {
21
- display: flex;
22
- touch-action: pan-y pinch-zoom;
23
- margin-left: calc(var(--slide-spacing) * -1);
24
- }
25
- .embla__slide {
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,3 @@
1
+ @use '../foundation/colors' as colors;
2
+ @use '../foundation/sizes' as sizes;
3
+ @use '../foundation/mixins' as *;
@@ -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
+ }