@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,194 +0,0 @@
1
- import { JsonEditor } from 'json-edit-react';
2
- import { Localication, TargetedScreenSize } from '../..';
3
- import { useLogRender } from '../../utils/useLogRender';
4
- import { useRenderStore } from '../../store';
5
-
6
- type PreviewTabProps = {};
7
-
8
- export function PreviewTab({}: PreviewTabProps) {
9
- useLogRender('PreviewTab');
10
- const { appConfig, setAppConfig } = useRenderStore((s) => ({
11
- appConfig: s.appConfig,
12
- setAppConfig: s.setAppConfig,
13
- }));
14
- return (
15
- <div
16
- role="tabpanel"
17
- className="editor-panel editor-panel--active"
18
- aria-hidden={false}
19
- >
20
- <div style={{ padding: 12 }}>
21
- <div
22
- style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }}
23
- >
24
- <div>Default Language</div>
25
- <select
26
- value={appConfig.defaultLanguage ?? 'en'}
27
- onChange={(e) => {
28
- setAppConfig({
29
- ...appConfig,
30
- defaultLanguage: e.target.value,
31
- });
32
- }}
33
- >
34
- {Object.keys(appConfig.localication ?? {}).map((language) => (
35
- <option key={language} value={language}>
36
- {language}
37
- </option>
38
- ))}
39
- </select>
40
- </div>
41
- <div
42
- style={{
43
- display: 'grid',
44
- gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
45
- gap: 12,
46
- marginTop: 8,
47
- }}
48
- >
49
- <div>Light Background Color</div>
50
- <input
51
- type="color"
52
- value={appConfig.screenStyle?.light.backgroundColor ?? '#FDFDFD'}
53
- onChange={(e) => {
54
- const next = {
55
- ...appConfig.screenStyle,
56
- light: {
57
- ...(appConfig.screenStyle?.light ?? {
58
- color: '#161827',
59
- }),
60
- backgroundColor: e.target.value,
61
- },
62
- };
63
-
64
- setAppConfig({
65
- ...appConfig,
66
- screenStyle: next,
67
- });
68
- }}
69
- className="input input--color"
70
- />
71
- <div>Light Color</div>
72
- <input
73
- type="color"
74
- value={appConfig.screenStyle?.light.color ?? '#161827'}
75
- onChange={(e) => {
76
- const next = {
77
- ...appConfig.screenStyle,
78
- light: {
79
- ...(appConfig.screenStyle?.light ?? {
80
- backgroundColor: '#FDFDFD',
81
- }),
82
- color: e.target.value,
83
- },
84
- };
85
-
86
- setAppConfig({
87
- ...appConfig,
88
- screenStyle: next,
89
- });
90
- }}
91
- className="input input--color"
92
- />
93
- <div>Dark Background Color</div>
94
- <input
95
- type="color"
96
- value={appConfig.screenStyle?.dark.backgroundColor ?? '#12131A'}
97
- onChange={(e) => {
98
- const next = {
99
- ...appConfig.screenStyle,
100
- dark: {
101
- ...(appConfig.screenStyle?.dark ?? {
102
- color: '#E9EBF9',
103
- }),
104
- backgroundColor: e.target.value,
105
- },
106
- };
107
-
108
- setAppConfig({
109
- ...appConfig,
110
- screenStyle: next,
111
- });
112
- }}
113
- className="input input--color"
114
- />
115
- <div>Dark Color</div>
116
- <input
117
- type="color"
118
- value={appConfig.screenStyle?.dark.color ?? '#E9EBF9'}
119
- onChange={(e) => {
120
- const next = {
121
- ...appConfig.screenStyle,
122
- dark: {
123
- ...(appConfig.screenStyle?.dark ?? {
124
- backgroundColor: '#12131A',
125
- }),
126
- color: e.target.value,
127
- },
128
- };
129
- setAppConfig({
130
- ...appConfig,
131
- screenStyle: next,
132
- });
133
- }}
134
- className="input input--color"
135
- />
136
- </div>
137
- <div
138
- style={{
139
- display: 'flex',
140
- alignItems: 'center',
141
- gap: 8,
142
- marginTop: 8,
143
- }}
144
- >
145
- <div>Dark Mode</div>
146
- <input
147
- type="checkbox"
148
- checked={appConfig.theme === 'dark'}
149
- onChange={(e) => {
150
- const nextTheme = e.target.checked ? 'dark' : 'light';
151
-
152
- setAppConfig({
153
- ...appConfig,
154
- theme: nextTheme,
155
- });
156
- }}
157
- />
158
- </div>
159
- <div
160
- style={{
161
- display: 'flex',
162
- alignItems: 'center',
163
- gap: 8,
164
- marginTop: 8,
165
- }}
166
- >
167
- <div>Is RTL</div>
168
- <input
169
- type="checkbox"
170
- checked={appConfig.isRtl ?? false}
171
- onChange={(e) => {
172
- setAppConfig({
173
- ...appConfig,
174
- isRtl: e.target.checked,
175
- });
176
- }}
177
- />
178
- </div>
179
- <div style={{ marginTop: 8 }}>
180
- <JsonEditor
181
- rootName="localication"
182
- data={appConfig.localication ?? {}}
183
- setData={(data) => {
184
- setAppConfig({
185
- ...appConfig,
186
- localication: data as Localication,
187
- });
188
- }}
189
- />
190
- </div>
191
- </div>
192
- </div>
193
- );
194
- }
@@ -1,27 +0,0 @@
1
- // Color palette
2
- $color-background: #f3f4f6;
3
- $color-border: #e5e7eb;
4
- $color-text: #111827;
5
- $color-muted: #9ca3af;
6
- $color-error: #ef4444;
7
- $color-button: cornflowerblue;
8
-
9
- // Spacing
10
- $space-1: 4px;
11
- $space-2: 8px;
12
- $space-3: 12px;
13
- $space-4: 16px;
14
- $space-5: 20px;
15
- $space-6: 24px;
16
-
17
- // Radius & shadow
18
- $radius-xs: 4px;
19
- $radius-sm: 8px;
20
- $radius-md: 12px;
21
- $radius-lg: 24px;
22
- $shadow-card: 0 10px 30px rgba(0, 0, 0, 0.12);
23
-
24
- // Fonts
25
- $font-sans:
26
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
27
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
@@ -1,60 +0,0 @@
1
- @use './variables' as *;
2
- @use './mixins' as *;
3
-
4
- .builder {
5
- display: flex;
6
- flex-direction: column;
7
- gap: $space-3;
8
- }
9
-
10
- .builder__breadcrumbs {
11
- display: flex;
12
- flex-direction: row;
13
- gap: $space-2;
14
- }
15
-
16
- .builder__breadcrumb {
17
- color: $color-muted;
18
- font-size: 12px;
19
- }
20
-
21
- .builder__current {
22
- font-weight: 600;
23
- }
24
-
25
- .builder__list {
26
- display: flex;
27
- flex-wrap: wrap;
28
- gap: $space-2;
29
- }
30
-
31
- .builder__button {
32
- @include card;
33
- padding: $space-3 $space-3;
34
- font-size: 14px;
35
- background: $color-button;
36
- color: #fff;
37
- cursor: pointer;
38
- }
39
-
40
- .builder__node {
41
- @include card;
42
- padding: $space-3;
43
- }
44
-
45
- .builder__node-type {
46
- margin: 0 0 $space-2 0;
47
- font-weight: 600;
48
- }
49
-
50
- .builder__children {
51
- display: flex;
52
- flex-direction: column;
53
- gap: $space-2;
54
- }
55
-
56
- .builder__text,
57
- .builder__placeholder {
58
- color: $color-muted;
59
- font-size: 12px;
60
- }
@@ -1,88 +0,0 @@
1
- @use './variables' as *;
2
- @use './mixins' as *;
3
-
4
- .editor-controls {
5
- display: grid;
6
- grid-template-columns: auto 1fr;
7
- gap: $space-3;
8
- padding: $space-4;
9
- }
10
-
11
- .editor-section {
12
- background: #fff;
13
- border: 1px solid $color-border;
14
- border-radius: $radius-md;
15
- padding: $space-4;
16
- }
17
-
18
- .form-row {
19
- display: grid;
20
- grid-template-columns: 160px 1fr;
21
- align-items: center;
22
- gap: $space-3;
23
- margin-bottom: $space-3;
24
- }
25
-
26
- .form-actions {
27
- display: flex;
28
- gap: $space-3;
29
- margin-top: $space-4;
30
- }
31
-
32
- .btn {
33
- padding: 8px 12px;
34
- border-radius: 8px;
35
- border: 1px solid $color-border;
36
- background: #fff;
37
- cursor: pointer;
38
- transition:
39
- background 0.2s ease,
40
- box-shadow 0.2s ease;
41
-
42
- &:hover {
43
- background: #f9fafb;
44
- box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
45
- }
46
- }
47
-
48
- /* Inputs */
49
- .input {
50
- display: inline-flex;
51
- align-items: center;
52
- height: 32px;
53
- padding: 0 8px;
54
- border: 1px solid $color-border;
55
- border-radius: $radius-md;
56
- background: #fff;
57
- color: $color-text;
58
- font: inherit;
59
- outline: none;
60
- transition:
61
- border-color 0.15s ease,
62
- box-shadow 0.15s ease;
63
-
64
- &:focus {
65
- border-color: darken($color-border, 8%);
66
- box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
67
- }
68
- }
69
-
70
- .input--color {
71
- padding: 0;
72
- width: 40px;
73
- height: 28px;
74
- border-radius: 6px;
75
- cursor: pointer;
76
-
77
- &::-webkit-color-swatch-wrapper {
78
- padding: 0;
79
- }
80
- &::-webkit-color-swatch {
81
- border: none;
82
- border-radius: 4px;
83
- }
84
- &::-moz-color-swatch {
85
- border: none;
86
- border-radius: 4px;
87
- }
88
- }
@@ -1,174 +0,0 @@
1
- @use './variables' as *;
2
- @use './mixins' as *;
3
-
4
- .editor-tabs {
5
- display: flex;
6
- gap: 8px;
7
- border-bottom: 1px solid #e5e7eb;
8
- }
9
-
10
- .editor-tab {
11
- padding: 8px 12px;
12
- cursor: pointer;
13
- border: 1px solid transparent;
14
- border-top-left-radius: 4px;
15
- border-top-right-radius: 4px;
16
- color: #111827;
17
- padding: 8px 12px;
18
- }
19
-
20
- .editor-tab--active {
21
- background: #fff;
22
- border-color: #e5e7eb #e5e7eb #fff #e5e7eb;
23
- }
24
-
25
- .editor-panels {
26
- padding: 12px;
27
- &.editor-panels-debug {
28
- padding: 0;
29
- }
30
- }
31
- .jer-editor-container {
32
- padding-left: 0 !important;
33
- padding-right: 0 !important;
34
- }
35
- .editor-panel {
36
- display: none;
37
- }
38
-
39
- .editor-panel--active {
40
- display: block;
41
- }
42
-
43
- /* Editor utility header */
44
- .editor-header {
45
- display: flex;
46
- align-items: center;
47
- gap: 12px;
48
- padding: 0 $space-4;
49
- height: 60px;
50
- background: #f9fafb;
51
- border-bottom: 1px solid #e5e7eb;
52
- }
53
-
54
- .editor-header__title {
55
- color: #111827;
56
- font-weight: 600;
57
- }
58
-
59
- .editor-header__devices {
60
- @include thin-scrollbar;
61
- display: flex;
62
- flex-direction: row;
63
- align-items: stretch;
64
- gap: 8px;
65
- overflow: auto;
66
- height: 60px;
67
- padding: $space-1;
68
- }
69
-
70
- .editor-device-button {
71
- position: relative;
72
- min-width: 160px;
73
- height: 100%;
74
- border: 1px solid #e5e7eb;
75
- border-radius: 6px;
76
- background: #ffffff;
77
- color: #111827;
78
- cursor: pointer;
79
- font-size: 12px;
80
- &.editor-device-button--selected {
81
- border-color: #000;
82
- }
83
- }
84
-
85
- .editor-device-button img {
86
- position: absolute;
87
- bottom: 4px;
88
- right: 4px;
89
- width: 16px;
90
- height: 16px;
91
- }
92
-
93
- .editor-header__actions {
94
- margin-left: auto; /* push actions to the far right */
95
- display: flex;
96
- align-items: center;
97
- gap: 8px;
98
- }
99
-
100
- .editor-button {
101
- display: inline-flex;
102
- align-items: center;
103
- justify-content: center;
104
- height: 36px;
105
- min-width: 120px; /* visible even without content */
106
- padding: 0 12px;
107
- border: 1px solid #e5e7eb;
108
- border-radius: 6px;
109
- background: #ffffff;
110
- color: #111827;
111
- cursor: pointer;
112
- }
113
-
114
- .editor-button:disabled {
115
- opacity: 0.6;
116
- cursor: default;
117
- }
118
-
119
- /* Specific hooks for save buttons (kept empty for now) */
120
- .editor-save-button,
121
- .editor-save-previewconfig-button {
122
- color: #000;
123
- font-weight: 600;
124
- font-size: 12px;
125
- }
126
-
127
- /* Modal */
128
- .editor-modal {
129
- position: fixed;
130
- inset: 0;
131
- z-index: 1000;
132
- }
133
-
134
- .editor-modal__overlay {
135
- position: absolute;
136
- inset: 0;
137
- background: rgba(0, 0, 0, 0.4);
138
- }
139
-
140
- .editor-modal__content {
141
- position: absolute;
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;
152
- }
153
-
154
- .editor-modal__header {
155
- display: flex;
156
- align-items: center;
157
- justify-content: space-between;
158
- padding: 12px 16px;
159
- border-bottom: 1px solid #e5e7eb;
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;
168
- }
169
-
170
- /* Reuse device button style inside modal grid */
171
- .editor-device-grid .editor-device-button {
172
- height: 80px;
173
- min-width: unset;
174
- }