@algolia/satellite 2.9.1 → 2.11.0
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/cjs/Actions/Accordion/Accordion.js +1 -2
- package/dist/cjs/Actions/Accordion/Accordion.styles.d.ts +2 -2
- package/dist/cjs/Actions/Accordion/Accordion.styles.js +23 -23
- package/dist/cjs/Actions/Button/PolymorphicButton.js +1 -2
- package/dist/cjs/Actions/Button/styles.js +4 -4
- package/dist/cjs/Actions/IconButtonWithFeedback/IconButtonWithFeedback.js +1 -1
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +2 -2
- package/dist/cjs/Actions/ToggleGroup/ToggleGroup.js +1 -2
- package/dist/cjs/Chat/ChatCodeDisplay/ChatCodeDisplay.js +2 -3
- package/dist/cjs/Chat/ChatCodeDisplay/ChatCodeDisplay.styles.d.ts +4 -4
- package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +2 -2
- package/dist/cjs/Chat/ChatContextContainer/ChatContextContainer.styles.d.ts +2 -2
- package/dist/cjs/Chat/ChatMessage/ChatMessage.js +1 -1
- package/dist/cjs/Chat/ChatMessage/ChatMessage.styles.d.ts +2 -2
- package/dist/cjs/Chat/ChatMessage/ChatMessage.styles.js +10 -10
- package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +3 -3
- package/dist/cjs/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +3 -3
- package/dist/cjs/Chat/ChatMessages/ChatMessages.styles.d.ts +2 -2
- package/dist/cjs/Chat/ChatPrompt/ChatPrompt.styles.d.ts +2 -2
- package/dist/cjs/Fields/AutoComplete/AutoComplete.js +14 -14
- package/dist/cjs/Fields/DatePicker/components/Popover.js +2 -3
- package/dist/cjs/Fields/Dropzone/Dropzone.js +5 -5
- package/dist/cjs/Fields/FilePicker/FilePicker.js +4 -4
- package/dist/cjs/Fields/Form/stories/AsynchronousValidation.js +17 -18
- package/dist/cjs/Fields/Form/stories/Complex.js +67 -68
- package/dist/cjs/Fields/Form/stories/DependentFieldsValidation.js +9 -10
- package/dist/cjs/Fields/Form/stories/DirtyFields.js +18 -19
- package/dist/cjs/Fields/Form/stories/DynamicFieldsValidation.js +19 -20
- package/dist/cjs/Fields/Form/stories/ExtraErrors.js +13 -14
- package/dist/cjs/Fields/Form/stories/FieldArrays.js +23 -24
- package/dist/cjs/Fields/Form/stories/JSONForms.js +79 -79
- package/dist/cjs/Fields/Form/stories/MultiStep.js +72 -73
- package/dist/cjs/Fields/Form/stories/ValidationStrategies.js +15 -16
- package/dist/cjs/Fields/Input/Input.js +10 -10
- package/dist/cjs/Fields/SelectableCard/SelectableCard.js +9 -9
- package/dist/cjs/Fields/Switch/Switch.tailwind.js +4 -1
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +2 -2
- package/dist/cjs/Icons/AmexCardIcon.d.ts +2 -0
- package/dist/cjs/Icons/AmexCardIcon.js +34 -0
- package/dist/cjs/Icons/DiscoverCardIcon.d.ts +2 -0
- package/dist/cjs/Icons/DiscoverCardIcon.js +34 -0
- package/dist/cjs/Icons/MasterCardIcon.d.ts +2 -0
- package/dist/cjs/Icons/MasterCardIcon.js +34 -0
- package/dist/cjs/Icons/VisaCardIcon.d.ts +2 -0
- package/dist/cjs/Icons/VisaCardIcon.js +34 -0
- package/dist/cjs/Icons/index.d.ts +5 -1
- package/dist/cjs/Icons/index.js +34 -0
- package/dist/cjs/Indicators/Avatars/utils.js +4 -4
- package/dist/cjs/Indicators/Badge/Badge.js +4 -4
- package/dist/cjs/Indicators/Banners/Alert/Alert.js +13 -13
- package/dist/cjs/Indicators/Banners/Promote/Promote.js +4 -4
- package/dist/cjs/Indicators/EmptyState/EmptyState.js +16 -16
- package/dist/cjs/Indicators/Medallion/Medallion.js +3 -3
- package/dist/cjs/Indicators/ProgressBar/ProgressBar.js +1 -2
- package/dist/cjs/Indicators/Separator/Separator.js +1 -2
- package/dist/cjs/Indicators/Tag/Tag.js +10 -10
- package/dist/cjs/Indicators/Toast/Toast.js +12 -13
- package/dist/cjs/Indicators/Toast/Toasts.js +2 -3
- package/dist/cjs/Layout/CollapsibleCard/CollapsibleCard.js +1 -2
- package/dist/cjs/Layout/FlexGrid/FlexGrid.js +11 -11
- package/dist/cjs/Layout/Tables/DataTable/DataTable.js +3 -3
- package/dist/cjs/Navigation/Stepper/Step.js +12 -12
- package/dist/cjs/Navigation/Tabs/components/LinkTab.js +6 -6
- package/dist/cjs/Overlay/MenuButton/MenuButton.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/MenuButton.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/Content.js +1 -1
- package/dist/cjs/Overlay/MenuButton/components/CustomTrigger.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/DefaultTrigger.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/Divider.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItem.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/items/Item.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/items/LinkItem.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/items/RadioItem.js +1 -2
- package/dist/cjs/Overlay/MenuButton/components/items/ToggleItem.js +1 -2
- package/dist/cjs/Overlay/Modal/Modal.js +9 -10
- package/dist/cjs/Overlay/Popover/Popover.js +2 -3
- package/dist/cjs/Overlay/TooltipWrapper/TooltipWrapper.js +2 -3
- package/dist/cjs/utils/getTextFromReactNode.js +1 -1
- package/dist/cjs/utils/onlyText.js +2 -2
- package/dist/esm/Actions/Accordion/Accordion.styles.d.ts +2 -2
- package/dist/esm/Actions/Accordion/Accordion.styles.js +23 -23
- package/dist/esm/Actions/Button/styles.js +4 -4
- package/dist/esm/Actions/IconButtonWithFeedback/IconButtonWithFeedback.js +1 -1
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +2 -2
- package/dist/esm/Chat/ChatCodeDisplay/ChatCodeDisplay.js +1 -1
- package/dist/esm/Chat/ChatCodeDisplay/ChatCodeDisplay.styles.d.ts +4 -4
- package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +2 -2
- package/dist/esm/Chat/ChatContextContainer/ChatContextContainer.styles.d.ts +2 -2
- package/dist/esm/Chat/ChatMessage/ChatMessage.js +1 -1
- package/dist/esm/Chat/ChatMessage/ChatMessage.styles.d.ts +2 -2
- package/dist/esm/Chat/ChatMessage/ChatMessage.styles.js +10 -10
- package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +3 -3
- package/dist/esm/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +3 -3
- package/dist/esm/Chat/ChatMessages/ChatMessages.styles.d.ts +2 -2
- package/dist/esm/Chat/ChatPrompt/ChatPrompt.styles.d.ts +2 -2
- package/dist/esm/Fields/AutoComplete/AutoComplete.js +14 -14
- package/dist/esm/Fields/DatePicker/components/Popover.js +1 -1
- package/dist/esm/Fields/Dropzone/Dropzone.js +5 -5
- package/dist/esm/Fields/FilePicker/FilePicker.js +4 -4
- package/dist/esm/Fields/Form/stories/AsynchronousValidation.js +16 -16
- package/dist/esm/Fields/Form/stories/Complex.js +66 -66
- package/dist/esm/Fields/Form/stories/DependentFieldsValidation.js +8 -8
- package/dist/esm/Fields/Form/stories/DirtyFields.js +17 -17
- package/dist/esm/Fields/Form/stories/DynamicFieldsValidation.js +18 -18
- package/dist/esm/Fields/Form/stories/ExtraErrors.js +12 -12
- package/dist/esm/Fields/Form/stories/FieldArrays.js +22 -22
- package/dist/esm/Fields/Form/stories/JSONForms.js +79 -79
- package/dist/esm/Fields/Form/stories/MultiStep.js +71 -71
- package/dist/esm/Fields/Form/stories/ValidationStrategies.js +14 -14
- package/dist/esm/Fields/Input/Input.js +10 -10
- package/dist/esm/Fields/SelectableCard/SelectableCard.js +9 -9
- package/dist/esm/Fields/Switch/Switch.tailwind.js +4 -1
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +2 -2
- package/dist/esm/Icons/AmexCardIcon.d.ts +2 -0
- package/dist/esm/Icons/AmexCardIcon.js +27 -0
- package/dist/esm/Icons/DiscoverCardIcon.d.ts +2 -0
- package/dist/esm/Icons/DiscoverCardIcon.js +27 -0
- package/dist/esm/Icons/MasterCardIcon.d.ts +2 -0
- package/dist/esm/Icons/MasterCardIcon.js +27 -0
- package/dist/esm/Icons/VisaCardIcon.d.ts +2 -0
- package/dist/esm/Icons/VisaCardIcon.js +27 -0
- package/dist/esm/Icons/index.d.ts +5 -1
- package/dist/esm/Icons/index.js +5 -1
- package/dist/esm/Indicators/Avatars/utils.js +4 -4
- package/dist/esm/Indicators/Badge/Badge.js +4 -4
- package/dist/esm/Indicators/Banners/Alert/Alert.js +13 -13
- package/dist/esm/Indicators/Banners/Promote/Promote.js +4 -4
- package/dist/esm/Indicators/EmptyState/EmptyState.js +16 -16
- package/dist/esm/Indicators/Medallion/Medallion.js +3 -3
- package/dist/esm/Indicators/Tag/Tag.js +10 -10
- package/dist/esm/Indicators/Toast/Toast.js +11 -11
- package/dist/esm/Indicators/Toast/Toasts.js +1 -1
- package/dist/esm/Layout/FlexGrid/FlexGrid.js +11 -11
- package/dist/esm/Layout/Tables/DataTable/DataTable.js +3 -3
- package/dist/esm/Navigation/Stepper/Step.js +12 -12
- package/dist/esm/Navigation/Tabs/components/LinkTab.js +6 -6
- package/dist/esm/Overlay/MenuButton/MenuButton.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/Content.js +1 -1
- package/dist/esm/Overlay/Modal/Modal.js +8 -8
- package/dist/esm/Overlay/Popover/Popover.js +1 -1
- package/dist/esm/Overlay/TooltipWrapper/TooltipWrapper.js +1 -1
- package/dist/esm/utils/getTextFromReactNode.js +1 -1
- package/dist/esm/utils/onlyText.js +2 -2
- package/dist/satellite.min.css +1 -1
- package/package.json +19 -28
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70
|
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70;
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -178,23 +178,23 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
178
178
|
state: getFieldState("variants"),
|
|
179
179
|
className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
180
180
|
children: /*#__PURE__*/_jsx("div", {
|
|
181
|
-
className: stl(
|
|
181
|
+
className: stl(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["mt-7"]))),
|
|
182
182
|
children: variantsOptions.map(function (option) {
|
|
183
183
|
return /*#__PURE__*/_jsxs("label", {
|
|
184
184
|
htmlFor: option.value,
|
|
185
|
-
className: stl(
|
|
185
|
+
className: stl(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["flex flex-col gap-3 p-6 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
186
186
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
187
|
-
className: stl(
|
|
187
|
+
className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["flex items-center gap-2"]))),
|
|
188
188
|
children: [/*#__PURE__*/_jsx(RadioButton, _objectSpread(_objectSpread({
|
|
189
189
|
id: option.value,
|
|
190
190
|
"aria-labelledby": option.value,
|
|
191
191
|
required: true
|
|
192
192
|
}, field), {}, {
|
|
193
193
|
value: option.value,
|
|
194
|
-
className: stl(
|
|
194
|
+
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["shrink-0"])))
|
|
195
195
|
})), option.title]
|
|
196
196
|
}), /*#__PURE__*/_jsx("div", {
|
|
197
|
-
className: stl(
|
|
197
|
+
className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["ml-6 typo-subdued"]))),
|
|
198
198
|
children: option.description
|
|
199
199
|
})]
|
|
200
200
|
}, option.value);
|
|
@@ -209,30 +209,30 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
209
209
|
var field = _ref2.field;
|
|
210
210
|
return /*#__PURE__*/_jsx(Field, {
|
|
211
211
|
label: /*#__PURE__*/_jsx("h2", {
|
|
212
|
-
className: stl(
|
|
212
|
+
className: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
213
213
|
children: "How would you like to show out-of-stock items?"
|
|
214
214
|
}),
|
|
215
215
|
labelFor: outOfStockEnum[0],
|
|
216
216
|
state: getFieldState("outOfStock"),
|
|
217
|
-
className: stl(
|
|
217
|
+
className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
218
218
|
children: /*#__PURE__*/_jsx("div", {
|
|
219
|
-
className: stl(
|
|
219
|
+
className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["mt-7"]))),
|
|
220
220
|
children: outOfStockOptions.map(function (option) {
|
|
221
221
|
return /*#__PURE__*/_jsxs("label", {
|
|
222
222
|
htmlFor: option.value,
|
|
223
|
-
className: stl(
|
|
223
|
+
className: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["flex flex-col gap-3 p-6 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
224
224
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
225
|
-
className: stl(
|
|
225
|
+
className: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["flex items-center gap-2"]))),
|
|
226
226
|
children: [/*#__PURE__*/_jsx(RadioButton, _objectSpread(_objectSpread({
|
|
227
227
|
id: option.value,
|
|
228
228
|
"aria-labelledby": option.value,
|
|
229
229
|
required: true
|
|
230
230
|
}, field), {}, {
|
|
231
231
|
value: option.value,
|
|
232
|
-
className: stl(
|
|
232
|
+
className: stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["shrink-0"])))
|
|
233
233
|
})), option.title]
|
|
234
234
|
}), /*#__PURE__*/_jsx("div", {
|
|
235
|
-
className: stl(
|
|
235
|
+
className: stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["ml-6 typo-subdued"]))),
|
|
236
236
|
children: option.description
|
|
237
237
|
})]
|
|
238
238
|
}, option.value);
|
|
@@ -247,21 +247,21 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
247
247
|
var field = _ref3.field;
|
|
248
248
|
return /*#__PURE__*/_jsxs(Field, {
|
|
249
249
|
label: /*#__PURE__*/_jsx("h2", {
|
|
250
|
-
className: stl(
|
|
250
|
+
className: stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
251
251
|
children: "Select how your customers can sort their search results"
|
|
252
252
|
}),
|
|
253
253
|
labelFor: sortingOptions[0],
|
|
254
254
|
state: getFieldState("sorting"),
|
|
255
|
-
className: stl(
|
|
255
|
+
className: stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
256
256
|
children: [/*#__PURE__*/_jsx("div", {
|
|
257
|
-
className: stl(
|
|
257
|
+
className: stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["mt-4 typo-subdued"]))),
|
|
258
258
|
children: "Select the sort order options you'd like to show customers. You can change these later."
|
|
259
259
|
}), /*#__PURE__*/_jsx("div", {
|
|
260
|
-
className: stl(
|
|
260
|
+
className: stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["mt-7"]))),
|
|
261
261
|
children: sortingOptions.map(function (option) {
|
|
262
262
|
return /*#__PURE__*/_jsxs("label", {
|
|
263
263
|
htmlFor: option,
|
|
264
|
-
className: stl(
|
|
264
|
+
className: stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["flex gap-2 p-4 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
265
265
|
children: [/*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({
|
|
266
266
|
id: option,
|
|
267
267
|
required: true,
|
|
@@ -285,21 +285,21 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
285
285
|
var field = _ref4.field;
|
|
286
286
|
return /*#__PURE__*/_jsxs(Field, {
|
|
287
287
|
label: /*#__PURE__*/_jsx("h2", {
|
|
288
|
-
className: stl(
|
|
288
|
+
className: stl(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
289
289
|
children: "Add filters to help narrow results"
|
|
290
290
|
}),
|
|
291
291
|
labelFor: filtersOptions[0],
|
|
292
292
|
state: getFieldState("filters"),
|
|
293
|
-
className: stl(
|
|
293
|
+
className: stl(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
294
294
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
295
|
-
className: stl(
|
|
295
|
+
className: stl(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["mt-4 typo-subdued"]))),
|
|
296
296
|
children: ["Select the filter options customers can use to refine results.", /*#__PURE__*/_jsx("br", {}), "You can edit these after setup."]
|
|
297
297
|
}), /*#__PURE__*/_jsx("div", {
|
|
298
|
-
className: stl(
|
|
298
|
+
className: stl(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["mt-7"]))),
|
|
299
299
|
children: filtersOptions.map(function (option) {
|
|
300
300
|
return /*#__PURE__*/_jsxs("label", {
|
|
301
301
|
htmlFor: option,
|
|
302
|
-
className: stl(
|
|
302
|
+
className: stl(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["flex gap-2 p-4 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
303
303
|
children: [/*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({
|
|
304
304
|
id: option,
|
|
305
305
|
required: true,
|
|
@@ -318,9 +318,9 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
318
318
|
}
|
|
319
319
|
})]
|
|
320
320
|
}), /*#__PURE__*/_jsxs("div", {
|
|
321
|
-
className: stl(
|
|
321
|
+
className: stl(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["w-full flex justify-between"]))),
|
|
322
322
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
323
|
-
className: stl(
|
|
323
|
+
className: stl(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["flex gap-2"]))),
|
|
324
324
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
325
325
|
"aria-label": "Previous step",
|
|
326
326
|
disabled: page <= 1,
|
|
@@ -354,7 +354,7 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
354
354
|
children: "Reset"
|
|
355
355
|
})]
|
|
356
356
|
}), /*#__PURE__*/_jsx("div", {
|
|
357
|
-
className: stl(
|
|
357
|
+
className: stl(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["mt-8 mx-auto"]))),
|
|
358
358
|
children: /*#__PURE__*/_jsx(DotPagination, {
|
|
359
359
|
nbPages: steps.length,
|
|
360
360
|
currentPage: page,
|
|
@@ -363,9 +363,9 @@ export var RHFMultiStepComponent = function RHFMultiStepComponent() {
|
|
|
363
363
|
})
|
|
364
364
|
})]
|
|
365
365
|
}), /*#__PURE__*/_jsx("hr", {
|
|
366
|
-
className: stl(
|
|
366
|
+
className: stl(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["text-grey-500"])))
|
|
367
367
|
}), /*#__PURE__*/_jsx("code", {
|
|
368
|
-
className: stl(
|
|
368
|
+
className: stl(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["whitespace-pre display-code"]))),
|
|
369
369
|
children: JSON.stringify(formData, null, 2)
|
|
370
370
|
})]
|
|
371
371
|
})
|
|
@@ -387,13 +387,13 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
387
387
|
revalidationEnabled = _useState8[0],
|
|
388
388
|
setRevalidationEnabled = _useState8[1];
|
|
389
389
|
var _useState9 = useState(1),
|
|
390
|
-
|
|
391
|
-
page =
|
|
392
|
-
setPage =
|
|
393
|
-
var
|
|
394
|
-
|
|
395
|
-
nextPageClicked =
|
|
396
|
-
setNextPageClicked =
|
|
390
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
391
|
+
page = _useState0[0],
|
|
392
|
+
setPage = _useState0[1];
|
|
393
|
+
var _useState1 = useState(false),
|
|
394
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
395
|
+
nextPageClicked = _useState10[0],
|
|
396
|
+
setNextPageClicked = _useState10[1];
|
|
397
397
|
var goToPage = function goToPage(newPage) {
|
|
398
398
|
return setPage(clamp(newPage, 1, steps.length));
|
|
399
399
|
};
|
|
@@ -444,9 +444,9 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
return /*#__PURE__*/_jsx("div", {
|
|
447
|
-
className: stl(
|
|
447
|
+
className: stl(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["@container w-full flex justify-center"]))),
|
|
448
448
|
children: /*#__PURE__*/_jsxs("div", {
|
|
449
|
-
className: stl(
|
|
449
|
+
className: stl(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["flex flex-col gap-8 w-full @lg:w-4/5"]))),
|
|
450
450
|
children: [/*#__PURE__*/_jsxs(Form, {
|
|
451
451
|
onSubmit: function onSubmit(e) {
|
|
452
452
|
setRevalidationEnabled(true);
|
|
@@ -456,19 +456,19 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
456
456
|
setRevalidationEnabled(false);
|
|
457
457
|
formik.handleReset(e);
|
|
458
458
|
},
|
|
459
|
-
className: stl(
|
|
459
|
+
className: stl(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["flex flex-col gap-8 overflow-hidden"]))),
|
|
460
460
|
children: [/*#__PURE__*/_jsx(FormErrorMessage, {
|
|
461
461
|
locale: {
|
|
462
462
|
errorText: function errorText(invalidFields) {
|
|
463
463
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
464
464
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
465
|
-
className: stl(
|
|
465
|
+
className: stl(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["display-heading mb-2"]))),
|
|
466
466
|
children: ["Please fix ", invalidFields.length, " error", invalidFields.length > 1 ? "s" : "", " below and try again."]
|
|
467
467
|
}), /*#__PURE__*/_jsx("div", {
|
|
468
|
-
className: stl(
|
|
468
|
+
className: stl(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["flex flex-col"]))),
|
|
469
469
|
children: /*#__PURE__*/_jsx("a", {
|
|
470
470
|
href: "#",
|
|
471
|
-
className: stl(
|
|
471
|
+
className: stl(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["text-black underline hover:text-grey-800"]))),
|
|
472
472
|
onClick: function onClick(e) {
|
|
473
473
|
e.preventDefault();
|
|
474
474
|
var firstInvalid = steps.find(function (step) {
|
|
@@ -485,26 +485,26 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
}), /*#__PURE__*/_jsxs("div", {
|
|
488
|
-
className: stl(
|
|
488
|
+
className: stl(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["flex transition-transform ease-out duration-500"]))),
|
|
489
489
|
style: {
|
|
490
490
|
transform: "translateX(-".concat((page - 1) * 100, "%)")
|
|
491
491
|
},
|
|
492
492
|
children: [/*#__PURE__*/_jsx(Field, {
|
|
493
493
|
label: /*#__PURE__*/_jsx("h2", {
|
|
494
|
-
className: stl(
|
|
494
|
+
className: stl(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
495
495
|
children: "How should we display products that contain multiple variants?"
|
|
496
496
|
}),
|
|
497
497
|
labelFor: variantsEnum[0],
|
|
498
498
|
state: getFieldState("variants"),
|
|
499
|
-
className: stl(
|
|
499
|
+
className: stl(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
500
500
|
children: /*#__PURE__*/_jsx("div", {
|
|
501
|
-
className: stl(
|
|
501
|
+
className: stl(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["mt-7"]))),
|
|
502
502
|
children: variantsOptions.map(function (option) {
|
|
503
503
|
return /*#__PURE__*/_jsxs("label", {
|
|
504
504
|
htmlFor: option.value,
|
|
505
|
-
className: stl(
|
|
505
|
+
className: stl(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["flex flex-col gap-3 p-6 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
506
506
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
507
|
-
className: stl(
|
|
507
|
+
className: stl(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["flex items-center gap-2"]))),
|
|
508
508
|
children: [/*#__PURE__*/_jsx(RadioButton, _objectSpread(_objectSpread({
|
|
509
509
|
id: option.value,
|
|
510
510
|
"aria-labelledby": option.value,
|
|
@@ -514,10 +514,10 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
514
514
|
value: option.value,
|
|
515
515
|
type: "radio"
|
|
516
516
|
})), {}, {
|
|
517
|
-
className: stl(
|
|
517
|
+
className: stl(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["shrink-0"])))
|
|
518
518
|
})), option.title]
|
|
519
519
|
}), /*#__PURE__*/_jsx("div", {
|
|
520
|
-
className: stl(
|
|
520
|
+
className: stl(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["ml-6 typo-subdued"]))),
|
|
521
521
|
children: option.description
|
|
522
522
|
})]
|
|
523
523
|
}, option.value);
|
|
@@ -525,20 +525,20 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
525
525
|
})
|
|
526
526
|
}), /*#__PURE__*/_jsx(Field, {
|
|
527
527
|
label: /*#__PURE__*/_jsx("h2", {
|
|
528
|
-
className: stl(
|
|
528
|
+
className: stl(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
529
529
|
children: "How would you like to show out-of-stock items?"
|
|
530
530
|
}),
|
|
531
531
|
labelFor: outOfStockEnum[0],
|
|
532
532
|
state: getFieldState("outOfStock"),
|
|
533
|
-
className: stl(
|
|
533
|
+
className: stl(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
534
534
|
children: /*#__PURE__*/_jsx("div", {
|
|
535
|
-
className: stl(
|
|
535
|
+
className: stl(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["mt-7"]))),
|
|
536
536
|
children: outOfStockOptions.map(function (option) {
|
|
537
537
|
return /*#__PURE__*/_jsxs("label", {
|
|
538
538
|
htmlFor: option.value,
|
|
539
|
-
className: stl(
|
|
539
|
+
className: stl(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["flex flex-col gap-3 p-6 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
540
540
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
541
|
-
className: stl(
|
|
541
|
+
className: stl(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["flex items-center gap-2"]))),
|
|
542
542
|
children: [/*#__PURE__*/_jsx(RadioButton, _objectSpread(_objectSpread({
|
|
543
543
|
id: option.value,
|
|
544
544
|
"aria-labelledby": option.value,
|
|
@@ -548,10 +548,10 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
548
548
|
value: option.value,
|
|
549
549
|
type: "radio"
|
|
550
550
|
})), {}, {
|
|
551
|
-
className: stl(
|
|
551
|
+
className: stl(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["shrink-0"])))
|
|
552
552
|
})), option.title]
|
|
553
553
|
}), /*#__PURE__*/_jsx("div", {
|
|
554
|
-
className: stl(
|
|
554
|
+
className: stl(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["ml-6 typo-subdued"]))),
|
|
555
555
|
children: option.description
|
|
556
556
|
})]
|
|
557
557
|
}, option.value);
|
|
@@ -559,21 +559,21 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
559
559
|
})
|
|
560
560
|
}), /*#__PURE__*/_jsxs(Field, {
|
|
561
561
|
label: /*#__PURE__*/_jsx("h2", {
|
|
562
|
-
className: stl(
|
|
562
|
+
className: stl(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
563
563
|
children: "Select how your customers can sort their search results"
|
|
564
564
|
}),
|
|
565
565
|
labelFor: sortingOptions[0],
|
|
566
566
|
state: getFieldState("sorting"),
|
|
567
|
-
className: stl(
|
|
567
|
+
className: stl(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
568
568
|
children: [/*#__PURE__*/_jsx("div", {
|
|
569
|
-
className: stl(
|
|
569
|
+
className: stl(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["mt-4 typo-subdued"]))),
|
|
570
570
|
children: "Select the sort order options you'd like to show customers. You can change these later."
|
|
571
571
|
}), /*#__PURE__*/_jsx("div", {
|
|
572
|
-
className: stl(
|
|
572
|
+
className: stl(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["mt-7"]))),
|
|
573
573
|
children: sortingOptions.map(function (option) {
|
|
574
574
|
return /*#__PURE__*/_jsxs("label", {
|
|
575
575
|
htmlFor: option,
|
|
576
|
-
className: stl(
|
|
576
|
+
className: stl(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["flex gap-2 p-4 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
577
577
|
children: [/*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({
|
|
578
578
|
id: option,
|
|
579
579
|
required: true,
|
|
@@ -591,21 +591,21 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
591
591
|
})]
|
|
592
592
|
}), /*#__PURE__*/_jsxs(Field, {
|
|
593
593
|
label: /*#__PURE__*/_jsx("h2", {
|
|
594
|
-
className: stl(
|
|
594
|
+
className: stl(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["display-xlarge whitespace-normal inline"]))),
|
|
595
595
|
children: "Add filters to help narrow results"
|
|
596
596
|
}),
|
|
597
597
|
labelFor: filtersOptions[0],
|
|
598
598
|
state: getFieldState("filters"),
|
|
599
|
-
className: stl(
|
|
599
|
+
className: stl(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["w-full shrink-0"]))),
|
|
600
600
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
601
|
-
className: stl(
|
|
601
|
+
className: stl(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["mt-4 typo-subdued"]))),
|
|
602
602
|
children: ["Select the filter options customers can use to refine results.", /*#__PURE__*/_jsx("br", {}), "You can edit these after setup."]
|
|
603
603
|
}), /*#__PURE__*/_jsx("div", {
|
|
604
|
-
className: stl(
|
|
604
|
+
className: stl(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["mt-7"]))),
|
|
605
605
|
children: filtersOptions.map(function (option) {
|
|
606
606
|
return /*#__PURE__*/_jsxs("label", {
|
|
607
607
|
htmlFor: option,
|
|
608
|
-
className: stl(
|
|
608
|
+
className: stl(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["flex gap-2 p-4 rounded display-body transition-colors hover:bg-grey-100"]))),
|
|
609
609
|
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
610
610
|
id: option,
|
|
611
611
|
required: true,
|
|
@@ -622,9 +622,9 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
622
622
|
})]
|
|
623
623
|
})]
|
|
624
624
|
}), /*#__PURE__*/_jsxs("div", {
|
|
625
|
-
className: stl(
|
|
625
|
+
className: stl(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["w-full flex justify-between"]))),
|
|
626
626
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
627
|
-
className: stl(
|
|
627
|
+
className: stl(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["flex gap-2"]))),
|
|
628
628
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
629
629
|
"aria-label": "Previous step",
|
|
630
630
|
disabled: page <= 1,
|
|
@@ -656,7 +656,7 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
656
656
|
children: "Reset"
|
|
657
657
|
})]
|
|
658
658
|
}), /*#__PURE__*/_jsx("div", {
|
|
659
|
-
className: stl(
|
|
659
|
+
className: stl(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["mt-8 mx-auto"]))),
|
|
660
660
|
children: /*#__PURE__*/_jsx(DotPagination, {
|
|
661
661
|
nbPages: steps.length,
|
|
662
662
|
currentPage: page,
|
|
@@ -665,9 +665,9 @@ export var FormikMultiStepComponent = function FormikMultiStepComponent() {
|
|
|
665
665
|
})
|
|
666
666
|
})]
|
|
667
667
|
}), /*#__PURE__*/_jsx("hr", {
|
|
668
|
-
className: stl(
|
|
668
|
+
className: stl(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["text-grey-500"])))
|
|
669
669
|
}), /*#__PURE__*/_jsx("code", {
|
|
670
|
-
className: stl(
|
|
670
|
+
className: stl(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["whitespace-pre display-code"]))),
|
|
671
671
|
children: JSON.stringify(formData, null, 2)
|
|
672
672
|
})]
|
|
673
673
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20
|
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -256,9 +256,9 @@ export var RHFValidationStrategiesComponent = function RHFValidationStrategiesCo
|
|
|
256
256
|
})]
|
|
257
257
|
})]
|
|
258
258
|
}), /*#__PURE__*/_jsx("hr", {
|
|
259
|
-
className: stl(
|
|
259
|
+
className: stl(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["text-grey-500"])))
|
|
260
260
|
}), /*#__PURE__*/_jsx("code", {
|
|
261
|
-
className: stl(
|
|
261
|
+
className: stl(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["whitespace-pre display-code"]))),
|
|
262
262
|
children: JSON.stringify(formData, null, 2)
|
|
263
263
|
})]
|
|
264
264
|
})
|
|
@@ -318,9 +318,9 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
318
318
|
};
|
|
319
319
|
useFormikAutoFocusOnError(formik);
|
|
320
320
|
return /*#__PURE__*/_jsx("div", {
|
|
321
|
-
className: stl(
|
|
321
|
+
className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["@container w-full flex justify-center"]))),
|
|
322
322
|
children: /*#__PURE__*/_jsxs("div", {
|
|
323
|
-
className: stl(
|
|
323
|
+
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["flex flex-col gap-8 w-full @lg:w-1/2"]))),
|
|
324
324
|
children: [/*#__PURE__*/_jsxs(Form, {
|
|
325
325
|
onSubmit: function onSubmit(e) {
|
|
326
326
|
setRevalidationEnabled(true);
|
|
@@ -330,13 +330,13 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
330
330
|
setRevalidationEnabled(false);
|
|
331
331
|
formik.handleReset(e);
|
|
332
332
|
},
|
|
333
|
-
className: stl(
|
|
333
|
+
className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["flex flex-col items-start gap-6 min-w-72"]))),
|
|
334
334
|
children: [/*#__PURE__*/_jsx(FormErrorMessage, {}), /*#__PURE__*/_jsx(Field, {
|
|
335
335
|
label: "Card Owner",
|
|
336
336
|
labelFor: "cardOwner",
|
|
337
337
|
description: "Please enter the card owner",
|
|
338
338
|
state: getFieldState("cardOwner"),
|
|
339
|
-
className: stl(
|
|
339
|
+
className: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["w-full"]))),
|
|
340
340
|
children: /*#__PURE__*/_jsx(Input, _objectSpread({
|
|
341
341
|
id: "cardOwner",
|
|
342
342
|
placeholder: "John Doe",
|
|
@@ -347,7 +347,7 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
347
347
|
labelFor: "cardNumber",
|
|
348
348
|
description: "Please enter the card number",
|
|
349
349
|
state: getFieldState("cardNumber"),
|
|
350
|
-
className: stl(
|
|
350
|
+
className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["w-full"]))),
|
|
351
351
|
children: /*#__PURE__*/_jsx(Input, _objectSpread(_objectSpread({
|
|
352
352
|
id: "cardNumber",
|
|
353
353
|
placeholder: "Card number",
|
|
@@ -366,13 +366,13 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
366
366
|
}
|
|
367
367
|
}))
|
|
368
368
|
}), /*#__PURE__*/_jsxs("div", {
|
|
369
|
-
className: stl(
|
|
369
|
+
className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["w-full flex gap-4 flex-col @xl:flex-row"]))),
|
|
370
370
|
children: [/*#__PURE__*/_jsx(Field, {
|
|
371
371
|
label: "Card Expiration Date",
|
|
372
372
|
labelFor: "cardExpirationDate",
|
|
373
373
|
description: "Please enter the card expiration date",
|
|
374
374
|
state: getFieldState("cardExpirationDate"),
|
|
375
|
-
className: stl(
|
|
375
|
+
className: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["w-full"]))),
|
|
376
376
|
children: /*#__PURE__*/_jsx(Input, _objectSpread(_objectSpread({
|
|
377
377
|
id: "cardExpirationDate",
|
|
378
378
|
placeholder: "MM/YY",
|
|
@@ -395,7 +395,7 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
395
395
|
labelFor: "cardCVC",
|
|
396
396
|
description: "Please enter the card security code",
|
|
397
397
|
state: getFieldState("cardCVC"),
|
|
398
|
-
className: stl(
|
|
398
|
+
className: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["w-full"]))),
|
|
399
399
|
children: /*#__PURE__*/_jsx(Input, _objectSpread(_objectSpread({
|
|
400
400
|
id: "cardCVC",
|
|
401
401
|
placeholder: "CVC",
|
|
@@ -410,7 +410,7 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
410
410
|
}))
|
|
411
411
|
})]
|
|
412
412
|
}), /*#__PURE__*/_jsxs("div", {
|
|
413
|
-
className: stl(
|
|
413
|
+
className: stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["flex gap-2"]))),
|
|
414
414
|
children: [/*#__PURE__*/_jsx(FormSubmit, {
|
|
415
415
|
variant: "primary",
|
|
416
416
|
"aria-label": "Save the form",
|
|
@@ -424,9 +424,9 @@ export var FormikValidationStrategiesComponent = function FormikValidationStrate
|
|
|
424
424
|
})]
|
|
425
425
|
})]
|
|
426
426
|
}), /*#__PURE__*/_jsx("hr", {
|
|
427
|
-
className: stl(
|
|
427
|
+
className: stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["text-grey-500"])))
|
|
428
428
|
}), /*#__PURE__*/_jsx("code", {
|
|
429
|
-
className: stl(
|
|
429
|
+
className: stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["whitespace-pre display-code"]))),
|
|
430
430
|
children: JSON.stringify(formData, null, 2)
|
|
431
431
|
})]
|
|
432
432
|
})
|
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["className", "style", "startIcon", "endItem", "disabled", "readOnly", "clearable", "type", "variant", "locale", "required"];
|
|
6
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
9
|
import cx from "clsx";
|
|
@@ -88,7 +88,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
|
88
88
|
labelId = _useField.labelId,
|
|
89
89
|
descriptionId = _useField.descriptionId,
|
|
90
90
|
inputId = _useField.inputId;
|
|
91
|
-
var isControlled =
|
|
91
|
+
var isControlled = "value" in inputProps;
|
|
92
92
|
var _useState3 = useState(function () {
|
|
93
93
|
return isControlled ? inputProps.value : inputProps.defaultValue;
|
|
94
94
|
}),
|
|
@@ -117,7 +117,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
|
117
117
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
|
118
118
|
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["ml-4 shrink-0 size-4 ", ""])), disabled ? "text-grey-300" : focused ? "text-accent-600" : "text-grey-500")
|
|
119
119
|
}), /*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({
|
|
120
|
-
className: cx(stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["no-search-input-decoration"]))), Icon ? stl(
|
|
120
|
+
className: cx(stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["no-search-input-decoration"]))), Icon ? stl(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["mx-2"]))) : stl(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["mx-4"])))),
|
|
121
121
|
ref: inputRefCallback,
|
|
122
122
|
type: type,
|
|
123
123
|
"aria-labelledby": labelId,
|
|
@@ -146,7 +146,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
|
146
146
|
(_inputProps$onBlur = inputProps.onBlur) === null || _inputProps$onBlur === void 0 || _inputProps$onBlur.call(inputProps, evt);
|
|
147
147
|
}
|
|
148
148
|
})), clearable && !disabled && !readOnly && !isValueEmpty ? /*#__PURE__*/_jsx(IconButton, {
|
|
149
|
-
className: stl(
|
|
149
|
+
className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["mr-2 ", ""])), focused ? "visible" : "invisible group-hover:visible"),
|
|
150
150
|
title: locale.clearInput,
|
|
151
151
|
icon: XIcon,
|
|
152
152
|
variant: "subtle",
|
|
@@ -158,15 +158,15 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
|
158
158
|
triggerInputChange("");
|
|
159
159
|
}
|
|
160
160
|
}) : null, !!endItem && /*#__PURE__*/_jsx("div", {
|
|
161
|
-
className: stl(
|
|
161
|
+
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["mr-4"]))),
|
|
162
162
|
children: endItem
|
|
163
163
|
}), /*#__PURE__*/_jsx(StatusIcon, {}), type === "number" && !disabled && /*#__PURE__*/_jsxs("div", {
|
|
164
|
-
className: stl(
|
|
164
|
+
className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["input-spinner"]))),
|
|
165
165
|
children: [/*#__PURE__*/_jsx("button", {
|
|
166
166
|
tabIndex: -1,
|
|
167
167
|
type: "button",
|
|
168
168
|
disabled: readOnly,
|
|
169
|
-
className: stl(
|
|
169
|
+
className: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["input-spinner-button ", ""])), readOnly && "cursor-not-allowed"),
|
|
170
170
|
"aria-label": locale.increment,
|
|
171
171
|
onClick: function onClick() {
|
|
172
172
|
var _inputRef$current$val, _inputRef$current2;
|
|
@@ -184,13 +184,13 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
|
184
184
|
},
|
|
185
185
|
children: /*#__PURE__*/_jsx(ChevronUpIcon, {
|
|
186
186
|
size: 12,
|
|
187
|
-
className: cx(isInvalid && stl(
|
|
187
|
+
className: cx(isInvalid && stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["text-red-700"]))))
|
|
188
188
|
})
|
|
189
189
|
}), /*#__PURE__*/_jsx("button", {
|
|
190
190
|
tabIndex: -1,
|
|
191
191
|
type: "button",
|
|
192
192
|
disabled: readOnly,
|
|
193
|
-
className: stl(
|
|
193
|
+
className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["input-spinner-button ", ""])), readOnly && "cursor-not-allowed"),
|
|
194
194
|
"aria-label": locale.decrement,
|
|
195
195
|
onClick: function onClick() {
|
|
196
196
|
var _inputRef$current$val2, _inputRef$current3;
|
|
@@ -208,7 +208,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
|
208
208
|
},
|
|
209
209
|
children: /*#__PURE__*/_jsx(ChevronDownIcon, {
|
|
210
210
|
size: 12,
|
|
211
|
-
className: cx(isInvalid && stl(
|
|
211
|
+
className: cx(isInvalid && stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["text-red-700"]))))
|
|
212
212
|
})
|
|
213
213
|
})]
|
|
214
214
|
})]
|