@media-quest/builder 0.0.31 → 0.0.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@media-quest/builder",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "Builder library for Media-quest schemas",
5
5
  "main": "dist/public-api.js",
6
6
  "types": "dist/public-api.d.js",
@@ -24,6 +24,6 @@
24
24
  "dts": true
25
25
  },
26
26
  "peerDependencies": {
27
- "@media-quest/engine": "0.0.31"
27
+ "@media-quest/engine": "0.0.33"
28
28
  }
29
29
  }
@@ -20,12 +20,14 @@ const Colors = {
20
20
  white: "#ffffff",
21
21
  backgroundGray: "#F0F0F0",
22
22
  backgroundWhite: "white",
23
- progressBackGround: "#164AC4",
24
- progressForGround: "#F5F5F5",
23
+ // progressBackGround: "#164AC4",
24
+ // progressForGround: "#F5F5F5",
25
25
  // red: "red",
26
26
  // yellow: "yellow",
27
27
  };
28
28
 
29
+ const MAIN_TEXT_FONT_SIZE = 35;
30
+ const MAIN_TEXT_LINE_HEIGHT = 1.2;
29
31
  const fraction = 472.6 / 600;
30
32
 
31
33
  const LAYER_0 = 0;
@@ -90,6 +92,7 @@ const btnTextBase: PStyle = {
90
92
  width: VIDEO_CONTROLS_WIDTH / 2,
91
93
  textAlign: "center",
92
94
  visibility: "hidden",
95
+ margin: { _unit: "px", value: 0 },
93
96
  // backgroundColor: Colors.yellow,
94
97
  };
95
98
 
@@ -141,14 +144,16 @@ const muteUnMuteStyles: { css: PStyle; cssDisabled: PStyle; cssEnabled: PStyle }
141
144
  cssDisabled: { opacity: 0.3, cursor: "not-allowed" },
142
145
  cssEnabled: { opacity: 0.8, cursor: "pointer" },
143
146
  };
144
- const buttonBaseCss = (): CssTheme => ({
147
+ const responseButtonBaseCss = (): CssTheme => ({
145
148
  css: {
146
149
  backgroundColor: Colors.primary,
147
150
  borderColor: Colors.primary,
148
151
  textColor: Colors.white,
149
152
  fontWeight: 600,
150
- fontSize: { _unit: "px", value: 45 },
151
- letterSpacing: { _unit: "px", value: 2 },
153
+ fontSize: { _unit: "px", value: 30 },
154
+ lineHeight: 1,
155
+ maxWidth: 30,
156
+ // flex: "0 0 auto",
152
157
  paddingLeft: { _unit: "px", value: 30 },
153
158
  paddingTop: { _unit: "px", value: 10 },
154
159
  paddingBottom: { _unit: "px", value: 10 },
@@ -159,12 +164,13 @@ const buttonBaseCss = (): CssTheme => ({
159
164
  position: "relative",
160
165
  display: "block",
161
166
  cursor: "pointer",
167
+ // maxWidth: { _unit: "percent", value: 10 },
162
168
  },
163
169
  cssDisabled: { opacity: 0.3, cursor: "not-allowed" },
164
170
  cssEnabled: { opacity: 1, cursor: "pointer" },
165
171
  });
166
172
  export const primaryButton = (overridesCss: PStyle): BuilderOptionTheme => {
167
- const base = buttonBaseCss();
173
+ const base = responseButtonBaseCss();
168
174
  const optionTheme: BuilderOptionTheme = {
169
175
  name: "primary-button",
170
176
  normal: {
@@ -188,6 +194,7 @@ export const primaryButton = (overridesCss: PStyle): BuilderOptionTheme => {
188
194
  btn: {
189
195
  css: {
190
196
  ...base.css,
197
+ ...overridesCss,
191
198
  backgroundColor: Colors.secondary,
192
199
  borderColor: Colors.secondary,
193
200
  textColor: Colors.primary,
@@ -316,7 +323,8 @@ export const Theme2: IDefaultTheme = {
316
323
  backgroundColor: Colors.white,
317
324
  textAlign: "left",
318
325
  textColor: "black",
319
- fontSize: { _unit: "px", value: 40 },
326
+ fontSize: { _unit: "px", value: 35 },
327
+ lineHeight: 1.2,
320
328
  },
321
329
  audio: {
322
330
  iconUrl: THEME_2_ICONS.audioPlay.dataUrl,
@@ -354,19 +362,20 @@ export const Theme2: IDefaultTheme = {
354
362
  container: {
355
363
  base: {
356
364
  display: "flex",
357
- justifyContent: "space-evenly",
365
+ justifyContent: "flex-start",
358
366
  width: BUTTON_BAR_WIDTH,
367
+ height: 8,
359
368
  bottom: Q_AREA_BOTTOM + H_M3,
360
369
  left: Q_AREA_LEFT + W_M3,
361
370
  // backgroundColor: "green",
362
371
  gap: { _unit: "px", value: 20 },
363
- alignItems: "center",
372
+ alignItems: "stretch",
364
373
  },
365
- whenSingle: { justifyContent: "space-evenly" },
374
+ whenSingle: { justifyContent: "center" },
366
375
  whenMany: { justifyContent: "flex-start" },
367
376
  },
368
377
 
369
- nextButtonTheme: primaryButton({}),
378
+ nextButtonTheme: primaryButton({ height: 100 }),
370
379
  responseButtons: primaryButton({}),
371
380
  },
372
381
  };