@developer_tribe/react-builder 1.0.1 → 1.0.3

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 (218) hide show
  1. package/dist/AttributesEditor.d.ts +3 -1
  2. package/dist/DeviceMockFrame.d.ts +2 -1
  3. package/dist/RenderPage.d.ts +5 -3
  4. package/dist/attributes-editor/Field.d.ts +17 -0
  5. package/dist/attributes-editor/FieldInfoTooltip.d.ts +7 -0
  6. package/dist/attributes-editor/LayoutPreviewPicker.d.ts +12 -0
  7. package/dist/attributes-editor/SpecialCategorySection.d.ts +20 -0
  8. package/dist/attributes-editor/types.d.ts +14 -0
  9. package/dist/background.jpg +0 -0
  10. package/dist/build-components/BackgroundImage/BackgroundImage.d.ts +5 -0
  11. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +44 -0
  12. package/dist/build-components/Button/Button.d.ts +1 -1
  13. package/dist/build-components/Button/ButtonProps.generated.d.ts +33 -1
  14. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +34 -1
  15. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +32 -0
  16. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +32 -0
  17. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +34 -1
  18. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +34 -1
  19. package/dist/build-components/Image/ImageProps.generated.d.ts +32 -3
  20. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +34 -1
  21. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +32 -0
  22. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +32 -0
  23. package/dist/build-components/OnboardDot/OnboardDot.d.ts +1 -1
  24. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +29 -0
  25. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +11 -5
  26. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +32 -3
  27. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +31 -3
  28. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +32 -5
  29. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +11 -5
  30. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +11 -5
  31. package/dist/build-components/Text/TextProps.generated.d.ts +11 -5
  32. package/dist/build-components/View/ViewProps.generated.d.ts +10 -4
  33. package/dist/build-components/index.d.ts +2 -1
  34. package/dist/build-components/patterns.generated.d.ts +6288 -136
  35. package/dist/components/AttributesEditorPanel.d.ts +3 -4
  36. package/dist/components/Breadcrumb.d.ts +3 -1
  37. package/dist/components/Builder.d.ts +2 -1
  38. package/dist/components/BuilderButton.d.ts +9 -0
  39. package/dist/components/Checkbox.d.ts +17 -0
  40. package/dist/components/DeviceButton.d.ts +8 -0
  41. package/dist/components/DeviceNavigationBar.d.ts +10 -0
  42. package/dist/components/DeviceStatusBar.d.ts +9 -0
  43. package/dist/components/EditorHeader.d.ts +3 -8
  44. package/dist/index.cjs.js +5 -5
  45. package/dist/index.cjs.js.map +1 -1
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.esm.js +5 -5
  48. package/dist/index.esm.js.map +1 -1
  49. package/dist/mockOS/components/MockLaunchScreenComponent.d.ts +6 -0
  50. package/dist/mockOS/components/MockOSRouter.d.ts +8 -0
  51. package/dist/mockOS/components/PermissionModal.d.ts +9 -0
  52. package/dist/mockOS/context/MockOSContext.d.ts +36 -0
  53. package/dist/mockOS/hooks/useMockNavigation.d.ts +3 -0
  54. package/dist/mockOS/hooks/useMockPermission.d.ts +3 -0
  55. package/dist/mockOS/index.d.ts +9 -0
  56. package/dist/mockOS/managers/mockPermissionManager.d.ts +10 -0
  57. package/dist/mockOS/managers/navigationManager.d.ts +17 -0
  58. package/dist/modals/AddComponentModal.d.ts +8 -0
  59. package/dist/modals/ColorModal.d.ts +11 -0
  60. package/dist/modals/DeviceSelectorModal.d.ts +9 -0
  61. package/dist/modals/LocalicationModal.d.ts +8 -0
  62. package/dist/modals/Modal.d.ts +12 -0
  63. package/dist/modals/index.d.ts +5 -0
  64. package/dist/pages/ProjectPage.d.ts +3 -3
  65. package/dist/pages/tabs/BuilderPanel.d.ts +8 -0
  66. package/dist/pages/tabs/{DebugTab.d.ts → SideTool.d.ts} +2 -2
  67. package/dist/store.d.ts +7 -3
  68. package/dist/styles.css +1 -1
  69. package/dist/types/Project.d.ts +11 -0
  70. package/dist/utils/analyseNode.d.ts +1 -0
  71. package/dist/utils/extractTextStyle.d.ts +8 -1
  72. package/dist/utils/extractViewStyle.d.ts +8 -1
  73. package/dist/utils/parseColor.d.ts +7 -0
  74. package/dist/utils/patterns.d.ts +24 -0
  75. package/package.json +2 -1
  76. package/scripts/prebuild/utils/createGeneratedProps.js +11 -3
  77. package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +45 -6
  78. package/scripts/prebuild/utils/validatePatternJson.js +13 -5
  79. package/src/AttributesEditor.tsx +493 -310
  80. package/src/DeviceMockFrame.tsx +21 -37
  81. package/src/RenderPage.tsx +86 -7
  82. package/src/assets/images/android.svg +42 -42
  83. package/src/assets/images/apple.svg +15 -15
  84. package/src/attributes-editor/Field.tsx +669 -0
  85. package/src/attributes-editor/FieldInfoTooltip.tsx +49 -0
  86. package/src/attributes-editor/LayoutPreviewPicker.tsx +199 -0
  87. package/src/attributes-editor/SpecialCategorySection.tsx +285 -0
  88. package/src/attributes-editor/types.ts +30 -0
  89. package/src/build-components/BackgroundImage/BackgroundImage.tsx +87 -0
  90. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +60 -0
  91. package/src/build-components/BackgroundImage/pattern.json +45 -0
  92. package/src/build-components/Button/Button.tsx +37 -2
  93. package/src/build-components/Button/ButtonProps.generated.ts +44 -1
  94. package/src/build-components/Button/pattern.json +31 -2
  95. package/src/build-components/Carousel/Carousel.tsx +39 -2
  96. package/src/build-components/Carousel/CarouselProps.generated.ts +46 -1
  97. package/src/build-components/Carousel/pattern.json +10 -0
  98. package/src/build-components/CarouselButtons/CarouselButtons.tsx +21 -2
  99. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +43 -0
  100. package/src/build-components/CarouselButtons/pattern.json +22 -0
  101. package/src/build-components/CarouselDots/CarouselDots.tsx +49 -8
  102. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +43 -0
  103. package/src/build-components/CarouselDots/pattern.json +15 -0
  104. package/src/build-components/CarouselItem/CarouselItem.tsx +21 -2
  105. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +46 -1
  106. package/src/build-components/CarouselItem/pattern.json +7 -0
  107. package/src/build-components/CarouselProvider/CarouselProvider.tsx +21 -2
  108. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +46 -1
  109. package/src/build-components/CarouselProvider/pattern.json +7 -0
  110. package/src/build-components/Image/Image.tsx +33 -2
  111. package/src/build-components/Image/ImageProps.generated.ts +43 -3
  112. package/src/build-components/Image/pattern.json +46 -3
  113. package/src/build-components/Onboard/Onboard.tsx +6 -1
  114. package/src/build-components/Onboard/OnboardProps.generated.ts +46 -1
  115. package/src/build-components/Onboard/pattern.json +11 -0
  116. package/src/build-components/OnboardButton/OnboardButton.tsx +54 -6
  117. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +43 -0
  118. package/src/build-components/OnboardButton/pattern.json +71 -5
  119. package/src/build-components/OnboardButtons/OnboardButtons.tsx +33 -11
  120. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +43 -0
  121. package/src/build-components/OnboardButtons/pattern.json +70 -4
  122. package/src/build-components/OnboardDot/OnboardDot.tsx +113 -4
  123. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +29 -0
  124. package/src/build-components/OnboardDot/pattern.json +55 -2
  125. package/src/build-components/OnboardFooter/OnboardFooter.tsx +20 -4
  126. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +11 -5
  127. package/src/build-components/OnboardFooter/pattern.json +58 -2
  128. package/src/build-components/OnboardImage/OnboardImage.tsx +49 -5
  129. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +43 -3
  130. package/src/build-components/OnboardImage/pattern.json +21 -0
  131. package/src/build-components/OnboardItem/OnboardItem.tsx +17 -1
  132. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +42 -3
  133. package/src/build-components/OnboardItem/pattern.json +38 -2
  134. package/src/build-components/OnboardProvider/OnboardProvider.tsx +52 -18
  135. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +44 -5
  136. package/src/build-components/OnboardProvider/pattern.json +44 -5
  137. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +11 -5
  138. package/src/build-components/OnboardSubtitle/pattern.json +7 -1
  139. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +11 -5
  140. package/src/build-components/OnboardTitle/pattern.json +7 -1
  141. package/src/build-components/RenderNode.generated.tsx +3 -0
  142. package/src/build-components/Text/Text.tsx +34 -6
  143. package/src/build-components/Text/TextProps.generated.ts +11 -5
  144. package/src/build-components/Text/pattern.json +38 -2
  145. package/src/build-components/View/View.tsx +33 -6
  146. package/src/build-components/View/ViewProps.generated.ts +10 -4
  147. package/src/build-components/View/pattern.json +285 -19
  148. package/src/build-components/index.ts +5 -0
  149. package/src/build-components/patterns.generated.ts +6346 -143
  150. package/src/components/AttributesEditorPanel.tsx +17 -64
  151. package/src/components/Breadcrumb.tsx +37 -5
  152. package/src/components/Builder.tsx +311 -108
  153. package/src/components/BuilderButton.tsx +127 -0
  154. package/src/components/Checkbox.tsx +81 -0
  155. package/src/components/DeviceButton.tsx +39 -0
  156. package/src/components/DeviceNavigationBar.tsx +201 -0
  157. package/src/components/DeviceStatusBar.tsx +85 -0
  158. package/src/components/EditorHeader.tsx +26 -74
  159. package/src/index.ts +2 -2
  160. package/src/mockOS/components/MockLaunchScreenComponent.tsx +43 -0
  161. package/src/mockOS/components/MockOSRouter.tsx +123 -0
  162. package/src/mockOS/components/PermissionModal.tsx +270 -0
  163. package/src/mockOS/context/MockOSContext.tsx +179 -0
  164. package/src/mockOS/hooks/useMockNavigation.ts +11 -0
  165. package/src/mockOS/hooks/useMockPermission.ts +11 -0
  166. package/src/mockOS/index.ts +26 -0
  167. package/src/mockOS/managers/mockPermissionManager.ts +54 -0
  168. package/src/mockOS/managers/navigationManager.ts +91 -0
  169. package/src/modals/AddComponentModal.tsx +313 -0
  170. package/src/modals/ColorModal.tsx +425 -0
  171. package/src/modals/DeviceSelectorModal.tsx +57 -0
  172. package/src/modals/LocalicationModal.tsx +54 -0
  173. package/src/modals/Modal.tsx +57 -0
  174. package/src/modals/index.ts +5 -0
  175. package/src/pages/ProjectPage.tsx +307 -71
  176. package/src/pages/tabs/{BuilderTab.tsx → BuilderPanel.tsx} +13 -9
  177. package/src/pages/tabs/SideTool.tsx +259 -0
  178. package/src/size-matters/index.ts +27 -5
  179. package/src/store.ts +13 -5
  180. package/src/styles/base/_global.scss +404 -0
  181. package/src/styles/components/_attributes-editor.scss +273 -0
  182. package/src/styles/components/_editor-shell.scss +212 -0
  183. package/src/styles/components/_mockos-router.scss +140 -0
  184. package/src/styles/components/_ui-components.scss +183 -0
  185. package/src/styles/foundation/_colors.scss +8 -0
  186. package/src/styles/{_mixins.scss → foundation/_mixins.scss} +5 -4
  187. package/src/styles/{_reset.scss → foundation/_reset.scss} +5 -2
  188. package/src/styles/foundation/_sizes.scss +37 -0
  189. package/src/styles/foundation/_typography.scss +4 -0
  190. package/src/styles/foundation/_variables.scss +3 -0
  191. package/src/styles/index.scss +22 -136
  192. package/src/styles/layout/_builder.scss +124 -0
  193. package/src/styles/layout/_pages.scss +3 -0
  194. package/src/styles/modals/_add-component.scss +122 -0
  195. package/src/styles/modals/_color-modal.scss +159 -0
  196. package/src/styles/modals/_device-selector.scss +18 -0
  197. package/src/styles/modals/_localication-modal.scss +68 -0
  198. package/src/styles/modals/_modal-shell.scss +46 -0
  199. package/src/styles/utilities/_carousel.scss +125 -0
  200. package/src/types/Project.ts +14 -0
  201. package/src/types/images.d.ts +8 -0
  202. package/src/utils/analyseNode.ts +98 -0
  203. package/src/utils/extractTextStyle.ts +28 -10
  204. package/src/utils/extractViewStyle.ts +77 -9
  205. package/src/utils/parseColor.ts +43 -0
  206. package/src/utils/patterns.ts +33 -0
  207. package/dist/build-components/OnboardDot/OnboardExpandingDotProps.generated.d.ts +0 -10
  208. package/dist/pages/tabs/BuilderTab.d.ts +0 -9
  209. package/dist/pages/tabs/PreviewTab.d.ts +0 -3
  210. package/src/build-components/OnboardDot/OnboardExpandingDotProps.generated.ts +0 -20
  211. package/src/pages/tabs/DebugTab.tsx +0 -23
  212. package/src/pages/tabs/PreviewTab.tsx +0 -194
  213. package/src/styles/_variables.scss +0 -27
  214. package/src/styles/builder.scss +0 -60
  215. package/src/styles/components.scss +0 -88
  216. package/src/styles/editor.scss +0 -174
  217. package/src/styles/global.scss +0 -200
  218. package/src/styles/pages.scss +0 -2
@@ -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,124 @@
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__list-item {
33
+ flex: 1 1 220px;
34
+ min-width: 220px;
35
+ }
36
+
37
+ .builder__button {
38
+ position: relative;
39
+ display: flex;
40
+ align-items: stretch;
41
+ > .builder__button-link {
42
+ flex: 1;
43
+ min-width: 0; // allow text to shrink inside flex layout
44
+ display: flex;
45
+ align-items: center;
46
+ @include card;
47
+ height: sizes.$buttonHeight;
48
+ line-height: sizes.$buttonHeight - 3px; // simple adjustment to center the text
49
+ padding: 0 sizes.$spaceTight;
50
+ margin: 0;
51
+ background: colors.$accentColor;
52
+ color: #fff;
53
+ font-size: clamp(sizes.$fontSizeXs, 1.3vw, sizes.$fontSizeSmPlus);
54
+ white-space: nowrap;
55
+ overflow: hidden;
56
+ text-overflow: ellipsis;
57
+ cursor: pointer;
58
+ }
59
+ }
60
+
61
+ .builder__sort-controls {
62
+ display: flex;
63
+ flex-direction: column;
64
+ gap: sizes.$spaceTight;
65
+ }
66
+
67
+ .builder__sort-button {
68
+ width: 32px;
69
+ height: 18px;
70
+ border: none;
71
+ border-radius: sizes.$radiusSoft;
72
+ background: colors.$canvasColor;
73
+ color: colors.$mutedTextColor;
74
+ font-size: 14px;
75
+ cursor: pointer;
76
+ line-height: 1;
77
+ box-shadow: inset 0 0 0 1px colors.$borderColor;
78
+ padding: 0;
79
+ &:disabled {
80
+ opacity: 0.4;
81
+ cursor: not-allowed;
82
+ }
83
+ }
84
+
85
+ .builder__button-condition {
86
+ position: absolute;
87
+ bottom: -10px;
88
+ font-size: 8px;
89
+ }
90
+
91
+ .builder__node {
92
+ @include card;
93
+ padding: sizes.$spaceSnug;
94
+ }
95
+
96
+ .builder__node-type {
97
+ margin: 0 0 sizes.$spaceCompact 0;
98
+ font-weight: 600;
99
+ }
100
+
101
+ .builder__children {
102
+ position: relative;
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: sizes.$spaceComfy;
106
+ > :not(:first-child) {
107
+ margin-left: sizes.$spaceComfy;
108
+ }
109
+ &::before {
110
+ content: '';
111
+ position: absolute;
112
+ left: 6px;
113
+ top: 2 * sizes.$spaceTight + sizes.$spaceComfy;
114
+ bottom: 0;
115
+ width: 1px;
116
+ background: colors.$borderColor;
117
+ }
118
+ }
119
+
120
+ .builder__text,
121
+ .builder__placeholder {
122
+ color: colors.$mutedTextColor;
123
+ font-size: 12px;
124
+ }
@@ -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
+ }
@@ -0,0 +1,159 @@
1
+ @use '../foundation/colors' as colors;
2
+ @use '../foundation/sizes' as sizes;
3
+
4
+ .color-modal {
5
+ width: min(520px, calc(100vw - 32px));
6
+ max-height: 90vh;
7
+ padding: sizes.$spaceRoomy;
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: sizes.$spaceComfy;
11
+ overflow-y: auto;
12
+ }
13
+
14
+ .color-modal__selected {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: space-between;
18
+ background: colors.$canvasColor;
19
+ border-radius: 8px;
20
+ padding: sizes.$spaceCozy sizes.$spaceComfy;
21
+ }
22
+
23
+ .color-modal__selected-info {
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 12px;
27
+ }
28
+
29
+ .color-modal__selected-preview {
30
+ width: 32px;
31
+ height: 32px;
32
+ border-radius: 6px;
33
+ border: 1px solid rgba(0, 0, 0, 0.1);
34
+ }
35
+
36
+ .color-modal__selected-label {
37
+ margin: 0;
38
+ font-size: 12px;
39
+ color: colors.$mutedTextColor;
40
+ }
41
+
42
+ .color-modal__selected-value {
43
+ margin: 0;
44
+ font-weight: 600;
45
+ }
46
+
47
+ .color-modal__toggle {
48
+ display: flex;
49
+ flex-direction: column;
50
+ gap: sizes.$spaceSnug;
51
+ padding: 0 sizes.$spaceCompact;
52
+ }
53
+
54
+ .color-modal__toggle-label {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: sizes.$spaceCompact;
58
+ font-size: 13px;
59
+ font-weight: 600;
60
+ color: colors.$textColor;
61
+ cursor: pointer;
62
+ }
63
+
64
+ .color-modal__toggle-input {
65
+ width: 16px;
66
+ height: 16px;
67
+ accent-color: colors.$accentColor;
68
+ }
69
+
70
+ .color-modal__toggle-description {
71
+ margin: 0;
72
+ font-size: 12px;
73
+ color: colors.$mutedTextColor;
74
+ }
75
+
76
+ .color-modal__link-button {
77
+ border: none;
78
+ background: none;
79
+ color: colors.$accentColor;
80
+ font-weight: 600;
81
+ font-size: 13px;
82
+ cursor: pointer;
83
+ padding: 4px 8px;
84
+ }
85
+
86
+ .color-section {
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: sizes.$spaceCompact;
90
+ }
91
+
92
+ .color-section__header {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: space-between;
96
+ gap: 8px;
97
+ }
98
+
99
+ .color-section__title {
100
+ margin: 0;
101
+ font-weight: 600;
102
+ }
103
+
104
+ .color-section__swatches {
105
+ display: grid;
106
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
107
+ gap: sizes.$spaceCompact;
108
+ }
109
+
110
+ .color-section__empty {
111
+ margin: 0;
112
+ font-size: 12px;
113
+ color: colors.$mutedTextColor;
114
+ }
115
+
116
+ .color-modal__swatch {
117
+ border: 1px solid colors.$borderColor;
118
+ border-radius: 8px;
119
+ padding: 8px;
120
+ background: colors.$surfaceColor;
121
+ display: flex;
122
+ flex-direction: column;
123
+ gap: 6px;
124
+ text-align: left;
125
+ cursor: pointer;
126
+ transition:
127
+ border-color 0.2s ease,
128
+ box-shadow 0.2s ease;
129
+ }
130
+
131
+ .color-modal__swatch--active {
132
+ border-color: colors.$textColor;
133
+ box-shadow: 0 0 0 1px colors.$textColor inset;
134
+ }
135
+
136
+ .color-modal__swatch-preview {
137
+ width: 100%;
138
+ height: 32px;
139
+ border-radius: 6px;
140
+ }
141
+
142
+ .color-modal__swatch-preview--light {
143
+ border: 1px solid rgba(0, 0, 0, 0.1);
144
+ }
145
+
146
+ .color-modal__swatch-label {
147
+ font-size: 12px;
148
+ font-weight: 600;
149
+ color: colors.$textColor;
150
+ }
151
+
152
+ .color-modal__swatch-value {
153
+ font-size: 11px;
154
+ color: colors.$mutedTextColor;
155
+ }
156
+
157
+ .color-modal__input {
158
+ display: none;
159
+ }
@@ -0,0 +1,18 @@
1
+ @use '../foundation/sizes' as sizes;
2
+
3
+ .device-selector-modal {
4
+ padding-bottom: sizes.$spaceRoomy;
5
+ }
6
+
7
+ .device-selector-modal__grid {
8
+ padding: sizes.$spaceRoomy;
9
+ display: grid;
10
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
11
+ gap: sizes.$spaceCozy;
12
+ overflow: auto;
13
+ }
14
+
15
+ .device-selector-modal__grid .editor-device-button {
16
+ height: 80px;
17
+ min-width: unset;
18
+ }
@@ -0,0 +1,68 @@
1
+ @use '../foundation/colors' as colors;
2
+ @use '../foundation/sizes' as sizes;
3
+
4
+ .localication-modal__content {
5
+ width: calc(100vw - 32px);
6
+ height: calc(100vh - 32px);
7
+ max-width: 1600px;
8
+ max-height: calc(100vh - 32px);
9
+ padding: 0;
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+
14
+ .localication-modal__header {
15
+ padding: sizes.$spaceComfy sizes.$spaceRoomy;
16
+ border-bottom: 1px solid colors.$borderColor;
17
+ display: flex;
18
+ align-items: center;
19
+ gap: 16px;
20
+ }
21
+
22
+ .localication-modal__header-main {
23
+ flex: 1;
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: 4px;
27
+ }
28
+
29
+ .localication-modal__description {
30
+ margin: 0;
31
+ font-size: 13px;
32
+ color: colors.$mutedTextColor;
33
+ }
34
+
35
+ .localication-modal__body {
36
+ flex: 1;
37
+ min-height: 0;
38
+ padding: sizes.$spaceRoomy;
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: sizes.$spaceComfy;
42
+ overflow: auto;
43
+ }
44
+
45
+ .localication-modal__editor {
46
+ flex: 1;
47
+ min-height: 0;
48
+ overflow: auto;
49
+ border: 1px solid colors.$borderColor;
50
+ border-radius: sizes.$radiusRounded;
51
+ background: colors.$canvasColor;
52
+ }
53
+
54
+ .localication-modal__json-editor {
55
+ height: 100%;
56
+ width: 100%;
57
+ display: block;
58
+ padding: sizes.$spaceCozy;
59
+ overflow: auto;
60
+ }
61
+
62
+ .modal--scrollable .localication-modal__content {
63
+ overflow: hidden;
64
+ }
65
+
66
+ .modal--scrollable .localication-modal__body {
67
+ overflow: auto;
68
+ }
@@ -0,0 +1,46 @@
1
+ @use '../foundation/colors' as colors;
2
+ @use '../foundation/sizes' as sizes;
3
+
4
+ .modal {
5
+ position: fixed;
6
+ inset: 0;
7
+ z-index: 10000;
8
+ }
9
+
10
+ .modal__overlay {
11
+ position: absolute;
12
+ inset: 0;
13
+ background: rgba(0, 0, 0, 0.4);
14
+ z-index: 0;
15
+ }
16
+
17
+ .modal__content {
18
+ position: absolute;
19
+ top: 50%;
20
+ left: 50%;
21
+ transform: translate(-50%, -50%);
22
+ background: colors.$surfaceColor;
23
+ border-radius: sizes.$radiusPill;
24
+ box-shadow: sizes.$cardShadow;
25
+ width: min(960px, calc(100vw - 40px));
26
+ max-height: calc(100vh - 120px);
27
+ display: flex;
28
+ flex-direction: column;
29
+ overflow: hidden;
30
+ z-index: 1;
31
+ }
32
+
33
+ .modal__header {
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: space-between;
37
+ padding: sizes.$spaceComfy sizes.$spaceRoomy;
38
+ border-bottom: 1px solid colors.$borderColor;
39
+ gap: 12px;
40
+ }
41
+
42
+ .modal__title {
43
+ margin: 0;
44
+ font-size: 16px;
45
+ font-weight: 700;
46
+ }