fontdue-js 0.1.0 → 0.1.1
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/dist/__generated__/TypeTestersIDQuery.graphql.js +103 -57
- package/dist/__generated__/TypeTestersSlugQuery.graphql.js +103 -57
- package/dist/__generated__/TypeTesters_collection.graphql.d.ts +3 -0
- package/dist/__generated__/TypeTesters_collection.graphql.js +20 -6
- package/dist/components/AddToCartBanner/index.js +6 -4
- package/dist/components/BuyButton/index.js +21 -17
- package/dist/components/BuyingOptions/index.js +10 -7
- package/dist/components/Cart/AddressFields.js +10 -7
- package/dist/components/Cart/CartItem/index.js +71 -53
- package/dist/components/Cart/CartOrder.js +18 -14
- package/dist/components/Cart/CartState.js +16 -13
- package/dist/components/Cart/CartTotals.js +65 -59
- package/dist/components/Cart/Checkout.js +30 -23
- package/dist/components/Cart/CustomerFields.js +7 -6
- package/dist/components/Cart/Download.js +11 -9
- package/dist/components/Cart/EmptyCart.js +5 -4
- package/dist/components/Cart/IdentityBox.js +27 -24
- package/dist/components/Cart/index.js +23 -17
- package/dist/components/CartButton/index.js +12 -9
- package/dist/components/CharacterViewer/index.js +65 -54
- package/dist/components/CollectionAa/index.js +15 -11
- package/dist/components/CookieNotification/index.js +46 -38
- package/dist/components/CouponText/index.js +6 -4
- package/dist/components/Family/FamilyList.js +23 -20
- package/dist/components/Family/index.js +11 -8
- package/dist/components/FontFamilies/index.js +15 -12
- package/dist/components/FontStyle/index.js +10 -9
- package/dist/components/FontdueProvider/index.js +7 -6
- package/dist/components/NewsletterSignup/index.js +12 -10
- package/dist/components/Precart/License.js +8 -7
- package/dist/components/Precart/index.js +16 -11
- package/dist/components/Price/index.js +34 -27
- package/dist/components/PriceBar/PriceBarSection.js +14 -11
- package/dist/components/PriceBar/index.js +2 -2
- package/dist/components/Root/index.js +4 -1
- package/dist/components/Root/productState.js +3 -2
- package/dist/components/SKUPrice/index.js +7 -6
- package/dist/components/Select/index.js +22 -15
- package/dist/components/SelectButton/index.js +15 -13
- package/dist/components/SelectField/index.js +27 -24
- package/dist/components/SpecimenLink/index.js +14 -11
- package/dist/components/StickyNav/index.js +16 -13
- package/dist/components/StoreModal/StoreModalBundleButton.js +7 -6
- package/dist/components/StoreModal/StoreModalCart.js +10 -8
- package/dist/components/StoreModal/StoreModalCheckout.js +5 -4
- package/dist/components/StoreModal/StoreModalContainer.js +4 -3
- package/dist/components/StoreModal/StoreModalDownload.js +5 -4
- package/dist/components/StoreModal/StoreModalFamily.js +5 -4
- package/dist/components/StoreModal/StoreModalFamilyButton.js +7 -6
- package/dist/components/StoreModal/StoreModalIndex.js +4 -3
- package/dist/components/StoreModal/StoreModalLoader.js +4 -3
- package/dist/components/StoreModal/StoreModalProduct.js +4 -3
- package/dist/components/StoreModal/StoreModalReview.js +11 -9
- package/dist/components/StoreModal/StoreModalReviewIdentity.js +6 -3
- package/dist/components/StoreModal/StoreModalStyleButton.js +7 -6
- package/dist/components/StoreModalProductLicenseSelection/ContainerElement.js +15 -12
- package/dist/components/StoreModalProductLicenseSelection/LicenseElement.js +9 -8
- package/dist/components/StoreModalProductLicenseSelection/LicenseVariableElement.js +31 -25
- package/dist/components/StoreModalProductLicenseSelection/LicenseVariableRadioElement.js +13 -10
- package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +22 -13
- package/dist/components/StoreModalProductLicenseSelection/index.js +12 -9
- package/dist/components/StoreModalProductSummary/index.js +10 -8
- package/dist/components/StripeProvider/index.js +5 -4
- package/dist/components/Stylesheet/index.js +4 -3
- package/dist/components/TestFontsForm/index.js +32 -25
- package/dist/components/TestModeBanner/index.js +9 -7
- package/dist/components/TextField/index.js +32 -29
- package/dist/components/ThemeConfig/index.js +9 -7
- package/dist/components/TypeTester/TypeTesterAlignButtons.js +5 -4
- package/dist/components/TypeTester/TypeTesterBullet.js +5 -4
- package/dist/components/TypeTester/TypeTesterContent.js +9 -8
- package/dist/components/TypeTester/TypeTesterContext.js +6 -5
- package/dist/components/TypeTester/TypeTesterEditAll.js +4 -3
- package/dist/components/TypeTester/TypeTesterFeatures.js +16 -10
- package/dist/components/TypeTester/TypeTesterFeaturesButton.js +18 -15
- package/dist/components/TypeTester/TypeTesterFitter.js +5 -4
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +6 -5
- package/dist/components/TypeTester/TypeTesterInput.js +7 -6
- package/dist/components/TypeTester/TypeTesterSlider.js +15 -11
- package/dist/components/TypeTester/TypeTesterStandalone.js +18 -16
- package/dist/components/TypeTester/TypeTesterState.js +4 -3
- package/dist/components/TypeTester/TypeTesterStyleSelect.js +39 -26
- package/dist/components/TypeTester/TypeTesterStyleSelectData.js +7 -6
- package/dist/components/TypeTester/TypeTesterToolbar.js +6 -5
- package/dist/components/TypeTester/index.js +36 -29
- package/dist/components/TypeTester/useTypeTesterStyler.js +21 -19
- package/dist/components/TypeTesters/index.js +40 -34
- package/dist/components/VariableTableAmounts/index.js +5 -4
- package/dist/components/elements/Button/index.js +11 -8
- package/dist/components/elements/StoreModalCartLayout/index.js +29 -26
- package/dist/components/elements/StoreModalContainer/index.js +14 -13
- package/dist/components/elements/StoreModalDownloadLayout/index.js +17 -14
- package/dist/components/elements/StoreModalFamily/index.js +22 -19
- package/dist/components/elements/StoreModalFamilyButton/index.js +12 -11
- package/dist/components/elements/StoreModalIndexItem/index.js +9 -8
- package/dist/components/elements/StoreModalPageContainer/index.js +18 -15
- package/dist/components/elements/StoreModalReviewConfirm/index.js +9 -8
- package/dist/components/elements/StoreModalReviewItem/index.js +11 -8
- package/dist/components/elements/StoreModalReviewLayout/index.js +50 -47
- package/dist/components/elements/StoreModalStyleButton/index.js +10 -9
- package/dist/components/useFontStyle.js +6 -5
- package/dist/utils.js +3 -2
- package/dist/vanilla/FontStyle.js +10 -8
- package/fontdue.css +6 -0
- package/fontdue.css.map +1 -1
- package/package.json +1 -1
|
@@ -67,20 +67,21 @@ const getSku = fontStyle => {
|
|
|
67
67
|
}, null);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
const TypeTesterComponent =
|
|
71
|
-
id,
|
|
72
|
-
productId,
|
|
73
|
-
direction,
|
|
74
|
-
fontStyle,
|
|
75
|
-
viewer,
|
|
76
|
-
onSelectFontStyleId,
|
|
77
|
-
onFocus,
|
|
78
|
-
onBlur,
|
|
79
|
-
features,
|
|
80
|
-
config: propsConfig
|
|
81
|
-
}) => {
|
|
70
|
+
const TypeTesterComponent = _ref => {
|
|
82
71
|
var _config$shy, _config$toolsPosition, _config$selectButtonS, _config$priceText;
|
|
83
72
|
|
|
73
|
+
let {
|
|
74
|
+
id,
|
|
75
|
+
productId,
|
|
76
|
+
direction,
|
|
77
|
+
fontStyle,
|
|
78
|
+
viewer,
|
|
79
|
+
onSelectFontStyleId,
|
|
80
|
+
onFocus,
|
|
81
|
+
onBlur,
|
|
82
|
+
features,
|
|
83
|
+
config: propsConfig
|
|
84
|
+
} = _ref;
|
|
84
85
|
const contentRef = (0, _react.useRef)(null);
|
|
85
86
|
const ref = (0, _react.useRef)(null);
|
|
86
87
|
const [buyButtonIsHovered, setBuyButtonIsHovered] = (0, _react.useState)(false);
|
|
@@ -168,10 +169,12 @@ const TypeTesterComponent = ({
|
|
|
168
169
|
}, /*#__PURE__*/_react.default.createElement(_FontStyle.default, {
|
|
169
170
|
fontStyle: fontStyle,
|
|
170
171
|
className: "type-tester__text__font-style"
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
}, _ref2 => {
|
|
173
|
+
let {
|
|
174
|
+
loaded,
|
|
175
|
+
style
|
|
176
|
+
} = _ref2;
|
|
177
|
+
|
|
175
178
|
if (loaded) {
|
|
176
179
|
var _config$truncate, _config$min, _config$max, _config$autofitOnChan;
|
|
177
180
|
|
|
@@ -202,10 +205,11 @@ const TypeTester = (0, _reactRelay.createFragmentContainer)(TypeTesterComponent,
|
|
|
202
205
|
viewer: _TypeTester_viewer !== void 0 ? _TypeTester_viewer : (_TypeTester_viewer = require("../../__generated__/TypeTester_viewer.graphql"), _TypeTester_viewer.hash && _TypeTester_viewer.hash !== "a12af7126d512a50ab0b7e5e14a7d8eb" && console.error("The definition of 'TypeTester_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTester_viewer)
|
|
203
206
|
});
|
|
204
207
|
|
|
205
|
-
const TypeTesterWrapper =
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
const TypeTesterWrapper = _ref3 => {
|
|
209
|
+
let {
|
|
210
|
+
fontStyleId,
|
|
211
|
+
...rest
|
|
212
|
+
} = _ref3;
|
|
209
213
|
const [selectedFontStyleId, setSelectedFontStyleId] = (0, _react.useState)(fontStyleId);
|
|
210
214
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
211
215
|
if (!selectedFontStyleId) return null; // TODO: do we need an extra QueryRenderer here?
|
|
@@ -223,15 +227,18 @@ const TypeTesterWrapper = ({
|
|
|
223
227
|
variables: {
|
|
224
228
|
id: selectedFontStyleId
|
|
225
229
|
},
|
|
226
|
-
render:
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
230
|
+
render: _ref4 => {
|
|
231
|
+
let {
|
|
232
|
+
props
|
|
233
|
+
} = _ref4;
|
|
234
|
+
return /*#__PURE__*/_react.default.createElement(_reactStaticContainer.default, {
|
|
235
|
+
shouldUpdate: props
|
|
236
|
+
}, props && /*#__PURE__*/_react.default.createElement(TypeTester, _extends({
|
|
237
|
+
fontStyle: props.fontStyle,
|
|
238
|
+
viewer: props.viewer,
|
|
239
|
+
onSelectFontStyleId: setSelectedFontStyleId
|
|
240
|
+
}, rest)));
|
|
241
|
+
}
|
|
235
242
|
});
|
|
236
243
|
};
|
|
237
244
|
|
|
@@ -11,9 +11,10 @@ var _throttled = require("@react-hook/window-size/throttled");
|
|
|
11
11
|
|
|
12
12
|
var _reactDeviceDetect = require("react-device-detect");
|
|
13
13
|
|
|
14
|
-
const createClone =
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const createClone = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
fontStyles
|
|
17
|
+
} = _ref;
|
|
17
18
|
const clone = document.createElement('div');
|
|
18
19
|
clone.style.display = 'inline-block';
|
|
19
20
|
clone.style.whiteSpace = 'pre';
|
|
@@ -29,22 +30,23 @@ const createClone = ({
|
|
|
29
30
|
return clone;
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
const useTypeTesterStyler =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
const useTypeTesterStyler = _ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
size,
|
|
36
|
+
autofit,
|
|
37
|
+
autofitOnChange,
|
|
38
|
+
features,
|
|
39
|
+
setSize,
|
|
40
|
+
min,
|
|
41
|
+
max,
|
|
42
|
+
truncate,
|
|
43
|
+
focused,
|
|
44
|
+
lineHeight,
|
|
45
|
+
fontStyles,
|
|
46
|
+
content,
|
|
47
|
+
contentEdited,
|
|
48
|
+
alignment
|
|
49
|
+
} = _ref2;
|
|
48
50
|
const ref = (0, _react.useRef)(null);
|
|
49
51
|
const clone = (0, _react.useRef)(createClone({
|
|
50
52
|
fontStyles
|
|
@@ -67,19 +67,20 @@ const getTypeTesterGroups = collection => {
|
|
|
67
67
|
}, []);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
const TypeTestersBase =
|
|
71
|
-
collection,
|
|
72
|
-
precartOpen,
|
|
73
|
-
includePriceBar,
|
|
74
|
-
defaultMode,
|
|
75
|
-
autofit,
|
|
76
|
-
onFocus,
|
|
77
|
-
onBlur,
|
|
78
|
-
onToolbarOpenClose,
|
|
79
|
-
...rest
|
|
80
|
-
}) => {
|
|
70
|
+
const TypeTestersBase = _ref => {
|
|
81
71
|
var _config$typeTester$to, _config$typeTester, _collection$typeTeste3, _collection$typeTeste4, _collection$typeTeste5, _collection$typeTeste6, _collection$typeTeste7;
|
|
82
72
|
|
|
73
|
+
let {
|
|
74
|
+
collection,
|
|
75
|
+
precartOpen,
|
|
76
|
+
includePriceBar,
|
|
77
|
+
defaultMode,
|
|
78
|
+
autofit,
|
|
79
|
+
onFocus,
|
|
80
|
+
onBlur,
|
|
81
|
+
onToolbarOpenClose,
|
|
82
|
+
...rest
|
|
83
|
+
} = _ref;
|
|
83
84
|
const config = (0, _react.useContext)(_ConfigContext.default);
|
|
84
85
|
let toolsPosition = (_config$typeTester$to = config === null || config === void 0 ? void 0 : (_config$typeTester = config.typeTester) === null || _config$typeTester === void 0 ? void 0 : _config$typeTester.toolsPosition) !== null && _config$typeTester$to !== void 0 ? _config$typeTester$to : 'inline';
|
|
85
86
|
if (!collection) return null;
|
|
@@ -105,11 +106,13 @@ const TypeTestersBase = ({
|
|
|
105
106
|
features: collection.typeTesterFeatures,
|
|
106
107
|
onToolbarOpenClose: onToolbarOpenClose
|
|
107
108
|
}), getTypeTesterGroups(collection).map((typeTesterGroup, i) => {
|
|
108
|
-
var _anyTypeTester$fontSt, _anyTypeTester$fontSt2;
|
|
109
|
+
var _anyTypeTester$fontSt, _anyTypeTester$fontSt2, _collection$parent$id, _collection$parent;
|
|
109
110
|
|
|
110
111
|
if (typeTesterGroup.length === 0) return null;
|
|
111
112
|
const anyTypeTester = typeTesterGroup[0];
|
|
112
|
-
const currentFamilyId = (_anyTypeTester$fontSt = anyTypeTester.fontStyle) === null || _anyTypeTester$fontSt === void 0 ? void 0 : (_anyTypeTester$fontSt2 = _anyTypeTester$fontSt.family) === null || _anyTypeTester$fontSt2 === void 0 ? void 0 : _anyTypeTester$fontSt2.id;
|
|
113
|
+
const currentFamilyId = (_anyTypeTester$fontSt = anyTypeTester.fontStyle) === null || _anyTypeTester$fontSt === void 0 ? void 0 : (_anyTypeTester$fontSt2 = _anyTypeTester$fontSt.family) === null || _anyTypeTester$fontSt2 === void 0 ? void 0 : _anyTypeTester$fontSt2.id; // when clicking Select/Buy, open modal in relevant superfamily/family
|
|
114
|
+
|
|
115
|
+
const productId = (_collection$parent$id = (_collection$parent = collection.parent) === null || _collection$parent === void 0 ? void 0 : _collection$parent.id) !== null && _collection$parent$id !== void 0 ? _collection$parent$id : collection.id;
|
|
113
116
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
114
117
|
key: i
|
|
115
118
|
}, includePriceBar && precartOpen && currentFamilyId && /*#__PURE__*/_react.default.createElement(_PriceBar.default, {
|
|
@@ -122,7 +125,7 @@ const TypeTestersBase = ({
|
|
|
122
125
|
fontStyleId: (_node$fontStyle$id = (_node$fontStyle = node.fontStyle) === null || _node$fontStyle === void 0 ? void 0 : _node$fontStyle.id) !== null && _node$fontStyle$id !== void 0 ? _node$fontStyle$id : null,
|
|
123
126
|
direction: node.direction === 'rtl' ? 'rtl' : 'ltr',
|
|
124
127
|
key: j,
|
|
125
|
-
productId:
|
|
128
|
+
productId: productId,
|
|
126
129
|
onFocus: onFocus,
|
|
127
130
|
onBlur: onBlur,
|
|
128
131
|
features: collection.typeTesterFeatures
|
|
@@ -132,7 +135,7 @@ const TypeTestersBase = ({
|
|
|
132
135
|
};
|
|
133
136
|
|
|
134
137
|
const TypeTesters = (0, _reactRelay.createFragmentContainer)(TypeTestersBase, {
|
|
135
|
-
collection: _TypeTesters_collection !== void 0 ? _TypeTesters_collection : (_TypeTesters_collection = require("../../__generated__/TypeTesters_collection.graphql"), _TypeTesters_collection.hash && _TypeTesters_collection.hash !== "
|
|
138
|
+
collection: _TypeTesters_collection !== void 0 ? _TypeTesters_collection : (_TypeTesters_collection = require("../../__generated__/TypeTesters_collection.graphql"), _TypeTesters_collection.hash && _TypeTesters_collection.hash !== "4ff9e6c40559c9747603613a550fc10b" && console.error("The definition of 'TypeTesters_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTesters_collection)
|
|
136
139
|
});
|
|
137
140
|
|
|
138
141
|
const getDefaultMode = (stringValue, autofit) => {
|
|
@@ -141,17 +144,18 @@ const getDefaultMode = (stringValue, autofit) => {
|
|
|
141
144
|
return 'local';
|
|
142
145
|
};
|
|
143
146
|
|
|
144
|
-
const TypeTestersQueryRenderer =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
const TypeTestersQueryRenderer = _ref2 => {
|
|
148
|
+
let {
|
|
149
|
+
collectionId,
|
|
150
|
+
collectionSlug,
|
|
151
|
+
defaultMode,
|
|
152
|
+
autofit,
|
|
153
|
+
tags,
|
|
154
|
+
excludeTags,
|
|
155
|
+
onFocus,
|
|
156
|
+
onBlur,
|
|
157
|
+
onToolbarOpenClose
|
|
158
|
+
} = _ref2;
|
|
155
159
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
156
160
|
const precartOpen = (0, _reactRedux.useSelector)(state => state.precartOpen);
|
|
157
161
|
return /*#__PURE__*/_react.default.createElement(_ConfigContext.default.Consumer, null, config => {
|
|
@@ -170,10 +174,11 @@ const TypeTestersQueryRenderer = ({
|
|
|
170
174
|
tags,
|
|
171
175
|
excludeTags
|
|
172
176
|
},
|
|
173
|
-
render:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
+
render: _ref3 => {
|
|
178
|
+
let {
|
|
179
|
+
error,
|
|
180
|
+
props
|
|
181
|
+
} = _ref3;
|
|
177
182
|
if (error) return null;
|
|
178
183
|
return /*#__PURE__*/_react.default.createElement(_reactStaticContainer.default, {
|
|
179
184
|
shouldUpdate: props
|
|
@@ -201,12 +206,13 @@ const TypeTestersQueryRenderer = ({
|
|
|
201
206
|
tags,
|
|
202
207
|
excludeTags
|
|
203
208
|
},
|
|
204
|
-
render:
|
|
205
|
-
error,
|
|
206
|
-
props
|
|
207
|
-
}) => {
|
|
209
|
+
render: _ref4 => {
|
|
208
210
|
var _props$viewer$slug$co, _props$viewer, _props$viewer$slug;
|
|
209
211
|
|
|
212
|
+
let {
|
|
213
|
+
error,
|
|
214
|
+
props
|
|
215
|
+
} = _ref4;
|
|
210
216
|
if (error) return null;
|
|
211
217
|
return /*#__PURE__*/_react.default.createElement(_reactStaticContainer.default, {
|
|
212
218
|
shouldUpdate: props
|
|
@@ -13,12 +13,13 @@ var _VariableTableAmounts_variable, _VariableTableAmounts_option;
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
const VariableTableAmounts =
|
|
17
|
-
variable,
|
|
18
|
-
option
|
|
19
|
-
}) => {
|
|
16
|
+
const VariableTableAmounts = _ref => {
|
|
20
17
|
var _variable$units;
|
|
21
18
|
|
|
19
|
+
let {
|
|
20
|
+
variable,
|
|
21
|
+
option
|
|
22
|
+
} = _ref;
|
|
22
23
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
23
24
|
className: "variable-table-amounts"
|
|
24
25
|
}, variable === null || variable === void 0 ? void 0 : (_variable$units = variable.units) === null || _variable$units === void 0 ? void 0 : _variable$units.map((unit, i) => {
|
|
@@ -11,14 +11,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
|
|
12
12
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
13
|
|
|
14
|
-
const Button =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const Button = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
type,
|
|
17
|
+
className,
|
|
18
|
+
...rest
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("button", _extends({
|
|
21
|
+
className: className || 'button',
|
|
22
|
+
type: type || 'button'
|
|
23
|
+
}, rest));
|
|
24
|
+
};
|
|
22
25
|
|
|
23
26
|
var _default = Button;
|
|
24
27
|
exports.default = _default;
|
|
@@ -11,32 +11,35 @@ var _Button = _interopRequireDefault(require("../Button"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
const StoreModalCartLayout =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, "
|
|
14
|
+
const StoreModalCartLayout = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
onClickCheckoutButton,
|
|
17
|
+
checkoutDisabled,
|
|
18
|
+
children: {
|
|
19
|
+
items,
|
|
20
|
+
couponCodeInput,
|
|
21
|
+
totals,
|
|
22
|
+
checkoutText
|
|
23
|
+
}
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: "store-modal__cart__container"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: "store-modal__cart__items"
|
|
29
|
+
}, items), /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
className: "store-modal__cart__coupon-code-input"
|
|
31
|
+
}, couponCodeInput), /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: "store-modal__cart__totals"
|
|
33
|
+
}, totals), /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: "store-modal__cart__checkout"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
36
|
+
className: "store-modal__cart__checkout-button",
|
|
37
|
+
onClick: onClickCheckoutButton,
|
|
38
|
+
disabled: checkoutDisabled
|
|
39
|
+
}, checkoutText, /*#__PURE__*/_react.default.createElement("span", {
|
|
40
|
+
className: "store-modal__cart__arrow"
|
|
41
|
+
}, " \u2192"))));
|
|
42
|
+
};
|
|
40
43
|
|
|
41
44
|
var _default = StoreModalCartLayout;
|
|
42
45
|
exports.default = _default;
|
|
@@ -19,19 +19,20 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
const StoreModalContainer =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
22
|
+
const StoreModalContainer = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
onClickBackground,
|
|
25
|
+
onClickClose,
|
|
26
|
+
onClickBack,
|
|
27
|
+
onClickCart,
|
|
28
|
+
showCartButton,
|
|
29
|
+
uiFontUrl,
|
|
30
|
+
uiFontName,
|
|
31
|
+
children: {
|
|
32
|
+
backText,
|
|
33
|
+
body
|
|
34
|
+
}
|
|
35
|
+
} = _ref;
|
|
35
36
|
const container = (0, _react.useRef)(null);
|
|
36
37
|
const handleScrollToTop = (0, _react.useCallback)(() => {
|
|
37
38
|
var _container$current, _container$current$sc;
|
|
@@ -11,20 +11,23 @@ var _Icons = require("../../Icons");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
const StoreModalDownloadLayout =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
const StoreModalDownloadLayout = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
archiveUrl,
|
|
17
|
+
children: {
|
|
18
|
+
message
|
|
19
|
+
}
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "store-modal__download__section"
|
|
23
|
+
}, message), archiveUrl && /*#__PURE__*/_react.default.createElement("div", {
|
|
24
|
+
className: "store-modal__download__section"
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
26
|
+
target: "_blank",
|
|
27
|
+
href: archiveUrl,
|
|
28
|
+
className: "store-modal__download__button"
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.DownloadFonts, null), " Download your order")));
|
|
30
|
+
};
|
|
28
31
|
|
|
29
32
|
var _default = StoreModalDownloadLayout;
|
|
30
33
|
exports.default = _default;
|
|
@@ -9,25 +9,28 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
const StoreModalFamily =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
12
|
+
const StoreModalFamily = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children: {
|
|
15
|
+
stylesheet,
|
|
16
|
+
bundles,
|
|
17
|
+
familyButton,
|
|
18
|
+
styleGroups
|
|
19
|
+
}
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "store-modal__family__container"
|
|
23
|
+
}, stylesheet, /*#__PURE__*/_react.default.cloneElement(familyButton, {
|
|
24
|
+
className: 'store-modal__family__family-button'
|
|
25
|
+
}), bundles === null || bundles === void 0 ? void 0 : bundles.map(bundle => /*#__PURE__*/_react.default.cloneElement(bundle, {
|
|
26
|
+
className: 'store-modal__family__bundle-button'
|
|
27
|
+
})), styleGroups === null || styleGroups === void 0 ? void 0 : styleGroups.map((group, i) => /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: "store-modal__family__group",
|
|
29
|
+
key: i
|
|
30
|
+
}, group.map(styleButton => /*#__PURE__*/_react.default.cloneElement(styleButton, {
|
|
31
|
+
className: 'store-modal__family__style-button'
|
|
32
|
+
})))));
|
|
33
|
+
};
|
|
31
34
|
|
|
32
35
|
var _default = StoreModalFamily;
|
|
33
36
|
exports.default = _default;
|
|
@@ -15,17 +15,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
|
-
const StoreModalFamilyButton =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
const StoreModalFamilyButton = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
selected,
|
|
21
|
+
onClick,
|
|
22
|
+
className,
|
|
23
|
+
children: {
|
|
24
|
+
name,
|
|
25
|
+
label,
|
|
26
|
+
price
|
|
27
|
+
},
|
|
28
|
+
...rest
|
|
29
|
+
} = _ref;
|
|
29
30
|
if (!price) return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
31
|
className: "store-modal__family-button__no-price"
|
|
31
32
|
});
|
|
@@ -9,14 +9,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
const StoreModalIndexItem =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
12
|
+
const StoreModalIndexItem = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
onClick,
|
|
15
|
+
children: {
|
|
16
|
+
aa,
|
|
17
|
+
name,
|
|
18
|
+
label
|
|
19
|
+
}
|
|
20
|
+
} = _ref;
|
|
20
21
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
21
22
|
onClick: onClick,
|
|
22
23
|
className: "store-modal__index-item__button"
|
|
@@ -9,21 +9,24 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
const StoreModalPageContainer =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, title
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
}, stickyFooter
|
|
12
|
+
const StoreModalPageContainer = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children: {
|
|
15
|
+
title,
|
|
16
|
+
body,
|
|
17
|
+
stickyFooter
|
|
18
|
+
}
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: "store-modal__page__container"
|
|
22
|
+
}, title && /*#__PURE__*/_react.default.createElement("h1", {
|
|
23
|
+
className: "store-modal__page__title"
|
|
24
|
+
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: "store-modal__page__body"
|
|
26
|
+
}, body), stickyFooter && /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
+
className: "store-modal__page__sticky-footer"
|
|
28
|
+
}, stickyFooter));
|
|
29
|
+
};
|
|
27
30
|
|
|
28
31
|
var _default = StoreModalPageContainer;
|
|
29
32
|
exports.default = _default;
|
|
@@ -19,16 +19,17 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
const StoreModalReviewConfirm =
|
|
23
|
-
children: {
|
|
24
|
-
eulaText,
|
|
25
|
-
submitText
|
|
26
|
-
},
|
|
27
|
-
onSubmit,
|
|
28
|
-
submitting
|
|
29
|
-
}) => {
|
|
22
|
+
const StoreModalReviewConfirm = _ref => {
|
|
30
23
|
var _config$form$checkbox, _config$form;
|
|
31
24
|
|
|
25
|
+
let {
|
|
26
|
+
children: {
|
|
27
|
+
eulaText,
|
|
28
|
+
submitText
|
|
29
|
+
},
|
|
30
|
+
onSubmit,
|
|
31
|
+
submitting
|
|
32
|
+
} = _ref;
|
|
32
33
|
const [acceptedEULA, setAcceptedEULA] = (0, _react.useState)(false);
|
|
33
34
|
const config = (0, _react.useContext)(_ConfigContext.default);
|
|
34
35
|
const checkboxStyle = (_config$form$checkbox = (_config$form = config.form) === null || _config$form === void 0 ? void 0 : _config$form.checkboxStyle) !== null && _config$form$checkbox !== void 0 ? _config$form$checkbox : 'check';
|