@thryveai/theme-interfaces 1.4.8-beta3 → 1.4.8-beta7

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.
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminThemeTemplate = exports.AdminTemplateInputTypes = void 0;
4
+ exports.AdminTemplateInputTypes = {
5
+ checkbox: "checkbox",
6
+ collapsableObject: "collapsableObject",
7
+ color: "color",
8
+ dropdown: "dropdown",
9
+ inputChar: "inputChar",
10
+ inputNumber: "inputChar",
11
+ multiDropdown: "multiDropdown",
12
+ nullObject: "nullObject",
13
+ object: "object",
14
+ string: "string",
15
+ };
16
+ var buttonGenerator = function (buttonName) { return ({
17
+ title: buttonName + " Button",
18
+ description: "Settings for the " + buttonName + " button",
19
+ type: exports.AdminTemplateInputTypes.collapsableObject,
20
+ value: {
21
+ borderRadius: {
22
+ title: "Border Radius",
23
+ locationInTheme: "data.buttons." + buttonName + ".borderRadius",
24
+ type: exports.AdminTemplateInputTypes.string,
25
+ },
26
+ fontWeight: {
27
+ title: "Font Weight",
28
+ locationInTheme: "data.buttons." + buttonName + ".fontWeight",
29
+ type: exports.AdminTemplateInputTypes.string,
30
+ },
31
+ textTransform: {
32
+ title: "Text Transform",
33
+ locationInTheme: "data.buttons." + buttonName + ".textTransform",
34
+ type: exports.AdminTemplateInputTypes.dropdown,
35
+ options: ["none", "capitalize", "uppercase", "lowercase"],
36
+ },
37
+ static: buttonStateGenerator("static", "data.buttons." + buttonName),
38
+ hover: buttonStateGenerator("hover", "data.buttons." + buttonName),
39
+ clicked: buttonStateGenerator("clicked", "data.buttons." + buttonName),
40
+ disabled: buttonStateGenerator("disabled", "data.buttons." + buttonName),
41
+ },
42
+ }); };
43
+ var buttonStateGenerator = function (stateName, buttonLocation) { return ({
44
+ title: stateName + " Colors",
45
+ description: "How the button will look in " + stateName + " state",
46
+ type: exports.AdminTemplateInputTypes.collapsableObject,
47
+ value: {
48
+ bgColor: {
49
+ title: "Background",
50
+ locationInTheme: buttonLocation + "." + stateName + ".bgColor",
51
+ type: exports.AdminTemplateInputTypes.color,
52
+ },
53
+ borderColor: {
54
+ title: "Border Color",
55
+ locationInTheme: buttonLocation + "." + stateName + ".borderColor",
56
+ type: exports.AdminTemplateInputTypes.color,
57
+ },
58
+ color: {
59
+ title: "Text Color",
60
+ locationInTheme: buttonLocation + "." + stateName + ".color",
61
+ type: exports.AdminTemplateInputTypes.color,
62
+ },
63
+ iconColor: {
64
+ title: "Icon Color (if any)",
65
+ locationInTheme: buttonLocation + "." + stateName + ".iconColor",
66
+ type: exports.AdminTemplateInputTypes.color,
67
+ },
68
+ },
69
+ }); };
70
+ var colorGenerator = function (colorName, colorLocation) { return ({
71
+ title: colorName,
72
+ locationInTheme: colorLocation + "." + colorName,
73
+ type: exports.AdminTemplateInputTypes.color,
74
+ }); };
75
+ exports.AdminThemeTemplate = {
76
+ colors: {
77
+ title: "Colors",
78
+ description: "Change your themes colors",
79
+ helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
80
+ type: exports.AdminTemplateInputTypes.collapsableObject,
81
+ value: {
82
+ brandColors: {
83
+ title: "Brand Colors",
84
+ description: "Change your themes colors",
85
+ type: exports.AdminTemplateInputTypes.collapsableObject,
86
+ value: {
87
+ primary1: colorGenerator("primary1", "data.colors.brandColors"),
88
+ primary2: colorGenerator("primary2", "data.colors.brandColors"),
89
+ primary3: colorGenerator("primary3", "data.colors.brandColors"),
90
+ primary4: colorGenerator("primary4", "data.colors.brandColors"),
91
+ primary5: colorGenerator("primary5", "data.colors.brandColors"),
92
+ secondary1: colorGenerator("secondary1", "data.colors.brandColors"),
93
+ secondary2: colorGenerator("secondary2", "data.colors.brandColors"),
94
+ secondary3: colorGenerator("secondary3", "data.colors.brandColors"),
95
+ secondary4: colorGenerator("secondary4", "data.colors.brandColors"),
96
+ secondary5: colorGenerator("secondary5", "data.colors.brandColors"),
97
+ tertiary1: colorGenerator("tertiary1", "data.colors.brandColors"),
98
+ tertiary2: colorGenerator("tertiary2", "data.colors.brandColors"),
99
+ tertiary3: colorGenerator("tertiary3", "data.colors.brandColors"),
100
+ tertiary4: colorGenerator("tertiary4", "data.colors.brandColors"),
101
+ tertiary5: colorGenerator("tertiary5", "data.colors.brandColors"),
102
+ },
103
+ },
104
+ uiColors: {
105
+ title: "UI Colors",
106
+ description: "Change your themes colors",
107
+ type: exports.AdminTemplateInputTypes.collapsableObject,
108
+ value: {
109
+ success: colorGenerator("success", "data.colors.uiColors"),
110
+ successDark: colorGenerator("successDark", "data.colors.uiColors"),
111
+ successLight: colorGenerator("successLight", "data.colors.uiColors"),
112
+ warn: colorGenerator("warn", "data.colors.uiColors"),
113
+ warnDark: colorGenerator("warnDark", "data.colors.uiColors"),
114
+ warnLight: colorGenerator("warnLight", "data.colors.uiColors"),
115
+ alert: colorGenerator("alert", "data.colors.uiColors"),
116
+ alertDark: colorGenerator("alertDark", "data.colors.uiColors"),
117
+ alertLight: colorGenerator("alertLight", "data.colors.uiColors"),
118
+ greyscale1: colorGenerator("greyscale1", "data.colors.uiColors"),
119
+ greyscale2: colorGenerator("greyscale2", "data.colors.uiColors"),
120
+ greyscale3: colorGenerator("greyscale3", "data.colors.uiColors"),
121
+ greyscale4: colorGenerator("greyscale4", "data.colors.uiColors"),
122
+ greyscale5: colorGenerator("greyscale5", "data.colors.uiColors"),
123
+ greyscale6: colorGenerator("greyscale6", "data.colors.uiColors"),
124
+ greyscale7: colorGenerator("greyscale7", "data.colors.uiColors"),
125
+ promotion1: colorGenerator("promotion1", "data.colors.uiColors"),
126
+ promotion2: colorGenerator("promotion2", "data.colors.uiColors"),
127
+ },
128
+ },
129
+ },
130
+ },
131
+ buttons: {
132
+ title: "Buttons",
133
+ description: "Change your themes buttons",
134
+ helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
135
+ type: exports.AdminTemplateInputTypes.collapsableObject,
136
+ value: {
137
+ globalThemeBorderRadius: {
138
+ title: "Global Theme Border Radius",
139
+ description: "The br for the whole site",
140
+ locationInTheme: "data.buttons.globalThemeBorderRadius",
141
+ type: exports.AdminTemplateInputTypes.string,
142
+ },
143
+ globalThemeFontWeight: {
144
+ title: "Global Theme Font Weight",
145
+ description: "The font weight for the whole site",
146
+ locationInTheme: "data.buttons.globalThemeFontWeight",
147
+ type: exports.AdminTemplateInputTypes.string,
148
+ },
149
+ globalThemeFontFamily: {
150
+ title: "Global Theme Font Family",
151
+ description: "The font family for the whole site",
152
+ locationInTheme: "data.buttons.globalThemeFontFamily",
153
+ type: exports.AdminTemplateInputTypes.string,
154
+ },
155
+ iconPosition: {
156
+ title: "Button Icon Position",
157
+ description: "Which side of the button should the icon appear",
158
+ locationInTheme: "data.buttons.iconPosition",
159
+ type: exports.AdminTemplateInputTypes.dropdown,
160
+ options: ["left", "right"],
161
+ },
162
+ primary: buttonGenerator("primary"),
163
+ primaryLight: buttonGenerator("primaryLight"),
164
+ secondary: buttonGenerator("secondary"),
165
+ secondaryLight: buttonGenerator("secondaryLight"),
166
+ checkout: buttonGenerator("checkout"),
167
+ filterSort: {
168
+ title: "Filter Sort",
169
+ description: "Colors for the filter sort buttons",
170
+ type: exports.AdminTemplateInputTypes.collapsableObject,
171
+ value: {
172
+ color: colorGenerator("color", "data.buttons.filterSort"),
173
+ hoverColor: colorGenerator("hoverColor", "data.buttons.filterSort"),
174
+ },
175
+ },
176
+ },
177
+ },
178
+ header: {
179
+ title: "Header",
180
+ description: "Change your header styles",
181
+ type: exports.AdminTemplateInputTypes.collapsableObject,
182
+ value: {
183
+ topMenu: {
184
+ title: "Top Menu",
185
+ description: "Change your Top Menu bar styles",
186
+ type: exports.AdminTemplateInputTypes.collapsableObject,
187
+ value: {
188
+ color: colorGenerator("color", "data.header.topMenu"),
189
+ backgroundColor: colorGenerator("backgroundColor", "data.header.topMenu"),
190
+ links: {
191
+ title: "Top Menu Links",
192
+ type: exports.AdminTemplateInputTypes.collapsableObject,
193
+ value: {
194
+ static: {
195
+ title: "Links Static State",
196
+ type: exports.AdminTemplateInputTypes.collapsableObject,
197
+ value: {
198
+ color: colorGenerator("color", "data.header.topMenu.links.static"),
199
+ },
200
+ },
201
+ hover: {
202
+ title: "Links Hover State",
203
+ type: exports.AdminTemplateInputTypes.collapsableObject,
204
+ value: {
205
+ color: colorGenerator("color", "data.header.topMenu.links.hover"),
206
+ },
207
+ },
208
+ clicked: {
209
+ title: "Links Clicked State",
210
+ type: exports.AdminTemplateInputTypes.collapsableObject,
211
+ value: {
212
+ color: colorGenerator("color", "data.header.topMenu.links.clicked"),
213
+ },
214
+ },
215
+ visited: {
216
+ title: "Links Visited State",
217
+ type: exports.AdminTemplateInputTypes.collapsableObject,
218
+ value: {
219
+ color: colorGenerator("color", "data.header.topMenu.links.visited"),
220
+ },
221
+ },
222
+ },
223
+ },
224
+ },
225
+ },
226
+ mainMenu: {
227
+ title: "Main Menu",
228
+ description: "Change your Main Menu bar styles",
229
+ type: exports.AdminTemplateInputTypes.collapsableObject,
230
+ value: {
231
+ color: colorGenerator("color", "data.header.mainMenu"),
232
+ backgroundColor: colorGenerator("backgroundColor", "data.header.mainMenu"),
233
+ },
234
+ },
235
+ bottomMenu: {
236
+ title: "Bottom Menu",
237
+ description: "Change your Bottom Menu bar styles",
238
+ type: exports.AdminTemplateInputTypes.collapsableObject,
239
+ value: {
240
+ color: colorGenerator("color", "data.header.bottomMenu"),
241
+ hoverColor: colorGenerator("hoverColor", "data.header.bottomMenu"),
242
+ backgroundColor: colorGenerator("backgroundColor", "data.header.bottomMenu"),
243
+ textTransform: {
244
+ title: "Text Transform",
245
+ locationInTheme: "data.header.bottomMenu",
246
+ type: exports.AdminTemplateInputTypes.dropdown,
247
+ options: ["none", "capitalize", "uppercase", "lowercase"],
248
+ },
249
+ fontWeight: {
250
+ title: "Font Weight",
251
+ type: exports.AdminTemplateInputTypes.dropdown,
252
+ options: ["none", "capitalize", "uppercase", "lowercase"],
253
+ },
254
+ },
255
+ },
256
+ storePopover: {
257
+ title: "Store Popover",
258
+ description: "Change store popover styles",
259
+ type: exports.AdminTemplateInputTypes.collapsableObject,
260
+ value: {
261
+ backgroundColor: colorGenerator("backgroundColor", "data.header.storePopover"),
262
+ activeBackgroundColor: colorGenerator("activeBackgroundColor", "data.header.storePopover"),
263
+ color: colorGenerator("color", "data.header.storePopover"),
264
+ activeColor: colorGenerator("activeColor", "data.header.storePopover"),
265
+ borderRadius: {
266
+ title: "Border Radius",
267
+ locationInTheme: "data.header.storePopover",
268
+ type: exports.AdminTemplateInputTypes.inputChar,
269
+ },
270
+ reserveTimeIconPosition: {
271
+ title: "Reserve Timeslot",
272
+ description: "Controls Timeslot icons position inside reserve button",
273
+ type: exports.AdminTemplateInputTypes.dropdown,
274
+ options: ["left", "right", "center"],
275
+ },
276
+ },
277
+ },
278
+ accountPopover: {
279
+ title: "Account Popover",
280
+ description: "Change account popover styles",
281
+ type: exports.AdminTemplateInputTypes.collapsableObject,
282
+ value: {
283
+ color: colorGenerator("color", "data.header.accountPopover"),
284
+ backgroundColor: colorGenerator("backgroundColor", "data.header.accountPopover"),
285
+ links: {
286
+ title: "Links",
287
+ description: "Change Links inside account popover",
288
+ type: exports.AdminTemplateInputTypes.collapsableObject,
289
+ value: {
290
+ color: {
291
+ title: "Color styles",
292
+ type: exports.AdminTemplateInputTypes.collapsableObject,
293
+ value: {
294
+ static: colorGenerator("static", "data.header.accountPopover.links.color"),
295
+ hover: colorGenerator("hover", "data.header.accountPopover.links.color"),
296
+ visited: colorGenerator("visited", "data.header.accountPopover.links.color"),
297
+ },
298
+ },
299
+ },
300
+ },
301
+ },
302
+ },
303
+ },
304
+ },
305
+ };
306
+ exports.default = exports.AdminThemeTemplate;
package/index.d.ts CHANGED
@@ -3,9 +3,10 @@ import { IIconsObject, PaymentTypesLogos, PaymentCards, IconNames, IconNamesToFi
3
3
  import { ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource } from "./theme.interfaces";
4
4
  import { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource } from "./default-theme.interface";
5
5
  import AdminSettingsTemplate from "./admin-settings-template";
6
+ import AdminThemeTemplate, { AdminTemplateInputTypes } from "./admin-theme-template";
6
7
  import defaultConfig from "./default.config";
7
8
  export { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource, ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource, };
8
9
  export { IIconsObject, PaymentTypesLogos, PaymentCards, IconNames, IconNamesToFiles, };
9
10
  export { IRetailerSettings, ISecondTierAuthorization, IFlippConfig, IFlippConfigV2, IFlippScriptUrls, IAllSettings, ISMSConfig, IDefaultRetailerSettings, ICtaButtons, IAddressesSettings, IAccountPageSettings, ILayoutSettings, ILoggingLevel, IDefaultSearchParams, IDefaultStoreLocation, IDefaultCounty, IRetailerCountry, IRestrictMapPlaces, IValidationType, INutritionZone, IFooterTypes, IRegistrationFieldTypes, IRegistrationFieldNames, IValidateLength, IValidateDateRange, IRegistrationField, ICheckoutValidation, ISearchPreviewVisibility, IPaymentCards, IGlobalAnimations, ILayoutAnimationsConfetti, IGlobalCheckoutProps, IAddressIntegration, IAddressFinderType, };
10
- export { AdminSettingsTemplate };
11
+ export { AdminSettingsTemplate, AdminThemeTemplate, AdminTemplateInputTypes };
11
12
  export { defaultConfig };
package/index.js CHANGED
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultConfig = exports.AdminSettingsTemplate = exports.IconNamesToFiles = void 0;
3
+ exports.defaultConfig = exports.AdminTemplateInputTypes = exports.AdminThemeTemplate = exports.AdminSettingsTemplate = exports.IconNamesToFiles = void 0;
4
4
  var icons_interfaces_1 = require("./icons.interfaces");
5
5
  Object.defineProperty(exports, "IconNamesToFiles", { enumerable: true, get: function () { return icons_interfaces_1.IconNamesToFiles; } });
6
6
  var admin_settings_template_1 = require("./admin-settings-template");
7
7
  exports.AdminSettingsTemplate = admin_settings_template_1.default;
8
+ var admin_theme_template_1 = require("./admin-theme-template");
9
+ exports.AdminThemeTemplate = admin_theme_template_1.default;
10
+ Object.defineProperty(exports, "AdminTemplateInputTypes", { enumerable: true, get: function () { return admin_theme_template_1.AdminTemplateInputTypes; } });
8
11
  var default_config_1 = require("./default.config");
9
12
  exports.defaultConfig = default_config_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thryveai/theme-interfaces",
3
- "version": "1.4.8-beta3",
3
+ "version": "1.4.8-beta7",
4
4
  "description": "Shared Interfaces for all ThryveAi storefront retailer themes.",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -11,4 +11,4 @@
11
11
  "devDependencies": {
12
12
  "typescript": "4.3.5"
13
13
  }
14
- }
14
+ }