@shoplflow/base 0.24.6 → 0.24.8

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/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var React3 = require('react');
4
- var styled6 = require('@emotion/styled');
3
+ var React2 = require('react');
4
+ var styled5 = require('@emotion/styled');
5
5
  var framerMotion = require('framer-motion');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var reactDom$1 = require('react-dom');
8
- var utils = require('@shoplflow/utils');
9
8
  var react$1 = require('@emotion/react');
9
+ var utils = require('@shoplflow/utils');
10
10
  var Scrollbars = require('react-custom-scrollbars-2');
11
11
  var react = require('@floating-ui/react');
12
12
  var reactDom = require('@floating-ui/react-dom');
@@ -33,8 +33,8 @@ function _interopNamespace(e) {
33
33
  return Object.freeze(n);
34
34
  }
35
35
 
36
- var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
37
- var styled6__default = /*#__PURE__*/_interopDefault(styled6);
36
+ var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
37
+ var styled5__default = /*#__PURE__*/_interopDefault(styled5);
38
38
  var Scrollbars__default = /*#__PURE__*/_interopDefault(Scrollbars);
39
39
  var ShoplAssets__namespace = /*#__PURE__*/_interopNamespace(ShoplAssets);
40
40
  var HadaAssets__namespace = /*#__PURE__*/_interopNamespace(HadaAssets);
@@ -143,13 +143,13 @@ var require_classnames = __commonJS({
143
143
  }
144
144
  });
145
145
  exports.useDomain = (domain = "SHOPL") => {
146
- const [domainType, setDomainType] = React3.useState(void 0);
147
- React3.useEffect(() => {
146
+ const [domainType, setDomainType] = React2.useState(void 0);
147
+ React2.useEffect(() => {
148
148
  if (domain) {
149
149
  setDomainType(domain);
150
150
  }
151
151
  }, [domain]);
152
- React3.useEffect(() => {
152
+ React2.useEffect(() => {
153
153
  if (!domainType) {
154
154
  return;
155
155
  }
@@ -179,7 +179,7 @@ var fadeInOut = {
179
179
  }
180
180
  }
181
181
  };
182
- var BackDropStyled = styled6__default.default(framerMotion.motion.div)`
182
+ var BackDropStyled = styled5__default.default(framerMotion.motion.div)`
183
183
  display: flex;
184
184
  align-items: center;
185
185
  justify-content: center;
@@ -205,126 +205,73 @@ var BackDrop = ({ children }) => {
205
205
  );
206
206
  };
207
207
  var BackDrop_default = BackDrop;
208
- var ModalHandlerContext = React3.createContext({
209
- addModal: utils.noop,
210
- removeModal: utils.noop
211
- });
212
- var ModalContext = React3.createContext([]);
213
- var SpaceMarginWrapper = styled6__default.default(framerMotion.motion.div)`
208
+ var getSizeBySizeVariant = (size2) => {
209
+ switch (size2) {
210
+ case "XS":
211
+ return "18px";
212
+ case "S":
213
+ return "24px";
214
+ case "M":
215
+ return "32px";
216
+ case "L":
217
+ return "48px";
218
+ case "XL":
219
+ return "72px";
220
+ default:
221
+ return "32px";
222
+ }
223
+ };
224
+ var StyledAvatar = styled5__default.default.picture`
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ width: ${({ sizeVar }) => getSizeBySizeVariant(sizeVar)};
229
+ height: ${({ sizeVar }) => getSizeBySizeVariant(sizeVar)};
214
230
  position: relative;
231
+ overflow: hidden;
232
+ border-radius: 50%;
233
+ `;
234
+ var StyledAvatarContainer = styled5__default.default.div`
215
235
  display: flex;
216
236
  align-items: center;
217
237
  justify-content: center;
218
- flex-grow: 1;
219
- z-index: 101;
220
- padding: 32px 20px;
238
+ width: fit-content;
239
+ height: fit-content;
240
+ position: relative;
241
+ `;
242
+ var StyledAvatarImage = styled5__default.default.img`
221
243
  width: 100%;
222
244
  height: 100%;
223
245
  `;
224
- var ModalPortal = () => {
225
- const modal = React3.useContext(ModalContext);
226
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
227
- /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: modal.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(BackDrop_default, { children: /* @__PURE__ */ jsxRuntime.jsx(SpaceMarginWrapper, { children: item.component }) }, index)) }),
228
- document.body
229
- ) });
230
- };
231
- exports.ModalProvider = ModalPortal;
232
- var ModalProvider = ({ children }) => {
233
- const [openedModals, setOpenedModals] = React3.useState([]);
234
- const addModal = (component, id) => {
235
- setOpenedModals((modals) => {
236
- if (modals) {
237
- return [...modals, { component, id }];
238
- }
239
- return [{ component, id }];
240
- });
241
- };
242
- const removeModal = (props) => {
243
- const { id, deps } = props || {
244
- id: void 0,
245
- deps: void 0
246
- };
247
- const isIncludeAllProps = Boolean(id && deps);
248
- const isIncludeId = Boolean(id);
249
- const isNotIncludeAllProps = !id && Boolean(utils.isNullOrUndefined(deps));
250
- const isIncludeDeps = Boolean(Boolean(!utils.isNullOrUndefined(deps)) && !id);
251
- if (isIncludeAllProps) {
252
- throw new Error("id\uC640 deps\uB294 \uB3D9\uC2DC\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
253
- }
254
- if (isIncludeId) {
255
- setOpenedModals((modal) => {
256
- const filterModal = modal.filter((modal2) => modal2.id !== id);
257
- return [...filterModal];
258
- });
259
- return;
260
- }
261
- if (isNotIncludeAllProps || deps === 1) {
262
- setOpenedModals((modal) => {
263
- const removeModal2 = modal.slice(0, -1);
264
- return [...removeModal2];
265
- });
266
- return;
267
- }
268
- if (isIncludeDeps) {
269
- if (deps === 0 || deps === void 0) {
270
- return;
271
- }
272
- setOpenedModals((modal) => {
273
- const removeDeps = modal.slice(0, -deps);
274
- return [...removeDeps];
275
- });
276
- return;
277
- }
278
- };
279
- const dispatch = React3.useMemo(() => ({ addModal, removeModal }), []);
280
- React3.useEffect(() => {
281
- if (openedModals.length === 1) {
282
- document.body.style.cssText = "overflow:hidden";
283
- return () => {
284
- document.body.style.cssText = "overflow:unset";
285
- };
286
- }
287
- }, [openedModals.length]);
288
- return /* @__PURE__ */ jsxRuntime.jsx(ModalContext.Provider, { value: openedModals, children: /* @__PURE__ */ jsxRuntime.jsx(ModalHandlerContext.Provider, { value: dispatch, children }) });
289
- };
290
- var ModalProvider_default = ModalProvider;
291
- var PopperPortal = () => {
292
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
293
- /* @__PURE__ */ jsxRuntime.jsx(
294
- "div",
295
- {
296
- id: "popper-portal-key",
297
- style: {
298
- zIndex: 20001,
299
- position: "relative"
300
- }
301
- }
302
- ),
303
- document.body
304
- ) });
305
- };
306
- var PopperPortal_default = PopperPortal;
307
- var ShoplflowProvider = ({ children, domain = "SHOPL" }) => {
308
- exports.useDomain(domain);
309
- return /* @__PURE__ */ jsxRuntime.jsxs(ModalProvider_default, { children: [
310
- /* @__PURE__ */ jsxRuntime.jsx(PopperPortal_default, {}),
311
- /* @__PURE__ */ jsxRuntime.jsx(exports.ModalProvider, {}),
312
- children
246
+ var StyledAvatarBadge = styled5__default.default.div`
247
+ position: absolute;
248
+ display: flex;
249
+ align-items: center;
250
+ justify-content: center;
251
+ width: fit-content;
252
+ height: fit-content;
253
+ bottom: 0;
254
+ right: 0;
255
+ `;
256
+
257
+ // src/assets/mocks/AvatarNone.png
258
+ var AvatarNone_default = "./AvatarNone-F5VQQNT7.png";
259
+ var Avatar = (_a) => {
260
+ var _b = _a, { src, badge } = _b, rest = __objRest(_b, ["src", "badge"]);
261
+ return /* @__PURE__ */ jsxRuntime.jsxs(StyledAvatarContainer, { children: [
262
+ /* @__PURE__ */ jsxRuntime.jsx(StyledAvatar, __spreadProps(__spreadValues({ "data-shoplflow": "Avatar" }, rest), { children: /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarImage, { src: src != null ? src : AvatarNone_default }) })),
263
+ /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarBadge, { children: badge })
313
264
  ] });
314
265
  };
315
- exports.ShoplflowProvider = ShoplflowProvider;
316
- exports.useHandleModal = () => {
317
- const { addModal, removeModal } = React3.useContext(ModalHandlerContext);
318
- return {
319
- addModal,
320
- removeModal
321
- };
322
- };
323
- exports.useModalValue = () => {
324
- const modal = React3.useContext(ModalContext);
325
- return {
326
- modal
327
- };
266
+ exports.Avatar = Avatar;
267
+
268
+ // src/components/Avatar/Avatar.types.ts
269
+ exports.AvatarSizeVariants = {
270
+ XS: "XS",
271
+ S: "S",
272
+ M: "M",
273
+ L: "L",
274
+ XL: "XL"
328
275
  };
329
276
 
330
277
  // src/styles/tokens.ts
@@ -518,75 +465,9 @@ exports.typographyTokens = {
518
465
  caption_700,
519
466
  caption_400
520
467
  };
521
- var getSizeBySizeVariant = (size2) => {
522
- switch (size2) {
523
- case "XS":
524
- return "18px";
525
- case "S":
526
- return "24px";
527
- case "M":
528
- return "32px";
529
- case "L":
530
- return "48px";
531
- case "XL":
532
- return "72px";
533
- default:
534
- return "32px";
535
- }
536
- };
537
- var StyledAvatar = styled6__default.default.picture`
538
- display: flex;
539
- align-items: center;
540
- justify-content: center;
541
- width: ${({ sizeVar }) => getSizeBySizeVariant(sizeVar)};
542
- height: ${({ sizeVar }) => getSizeBySizeVariant(sizeVar)};
543
- position: relative;
544
- overflow: hidden;
545
- border-radius: 50%;
546
- `;
547
- var StyledAvatarContainer = styled6__default.default.div`
548
- display: flex;
549
- align-items: center;
550
- justify-content: center;
551
- width: fit-content;
552
- height: fit-content;
553
- position: relative;
554
- `;
555
- var StyledAvatarImage = styled6__default.default.img`
556
- width: 100%;
557
- height: 100%;
558
- `;
559
- var StyledAvatarBadge = styled6__default.default.div`
560
- position: absolute;
561
- display: flex;
562
- align-items: center;
563
- justify-content: center;
564
- width: fit-content;
565
- height: fit-content;
566
- bottom: 0;
567
- right: 0;
568
- `;
569
-
570
- // src/assets/mocks/AvatarNone.png
571
- var AvatarNone_default = "./AvatarNone-F5VQQNT7.png";
572
- var Avatar = (_a) => {
573
- var _b = _a, { src, badge } = _b, rest = __objRest(_b, ["src", "badge"]);
574
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledAvatarContainer, { children: [
575
- /* @__PURE__ */ jsxRuntime.jsx(StyledAvatar, __spreadProps(__spreadValues({ "data-shoplflow": "Avatar" }, rest), { children: /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarImage, { src: src != null ? src : AvatarNone_default }) })),
576
- /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarBadge, { children: badge })
577
- ] });
578
- };
579
- exports.Avatar = Avatar;
580
468
 
581
- // src/components/Avatar/Avatar.types.ts
582
- exports.AvatarSizeVariants = {
583
- XS: "XS",
584
- S: "S",
585
- M: "M",
586
- L: "L",
587
- XL: "XL"
588
- };
589
- exports.StyledStack = styled6__default.default.div`
469
+ // src/components/Stack/Stack.styled.ts
470
+ exports.StyledStack = styled5__default.default.div`
590
471
  display: flex;
591
472
  width: ${({ width }) => width};
592
473
  max-width: ${({ maxWidth }) => maxWidth};
@@ -604,7 +485,7 @@ exports.StyledStack = styled6__default.default.div`
604
485
  border-radius: ${({ radius }) => radius && exports.borderRadiusTokens[radius]};
605
486
  animation: 0.2s all ease-in-out;
606
487
  `;
607
- var createStackComponent = (stackOption) => React3.forwardRef(function Stack2(_h, ref) {
488
+ var createStackComponent = (stackOption) => React2.forwardRef(function Stack2(_h, ref) {
608
489
  var _i = _h, {
609
490
  as = "div",
610
491
  spacing = stackOption == null ? void 0 : stackOption.spacing,
@@ -668,7 +549,7 @@ var setEllipsis = (maxLines) => {
668
549
  text-overflow: ellipsis;
669
550
  `;
670
551
  };
671
- var StyledText = styled6__default.default.span`
552
+ var StyledText = styled5__default.default.span`
672
553
  display: ${({ display }) => display && display};
673
554
  align-items: center;
674
555
  color: ${({ color }) => color && exports.colorTokens[color]};
@@ -685,7 +566,7 @@ var StyledText = styled6__default.default.span`
685
566
  word-break: ${wordBreak};
686
567
  `};
687
568
  `;
688
- var Text = React3.forwardRef(
569
+ var Text = React2.forwardRef(
689
570
  (_a, ref) => {
690
571
  var _b = _a, {
691
572
  children,
@@ -763,7 +644,7 @@ var getModalBodyTopBottomPadding = (isIncludeHeader) => {
763
644
  padding-bottom: 24px;
764
645
  `;
765
646
  };
766
- var Container = styled6__default.default.div`
647
+ var Container = styled5__default.default.div`
767
648
  display: flex;
768
649
  flex-direction: column;
769
650
  border-radius: ${exports.borderRadiusTokens.borderRadius08};
@@ -777,7 +658,7 @@ var Container = styled6__default.default.div`
777
658
  width: ${({ sizeVar }) => getModalWidthFromSize(sizeVar)}px;
778
659
  max-width: ${({ sizeVar }) => getModalWidthFromSize(sizeVar)}px;
779
660
  `;
780
- var HeaderContainer = styled6__default.default.div`
661
+ var HeaderContainer = styled5__default.default.div`
781
662
  display: flex;
782
663
  width: 100%;
783
664
  min-height: 64px;
@@ -786,7 +667,7 @@ var HeaderContainer = styled6__default.default.div`
786
667
  padding: 12px 16px 12px 24px;
787
668
  gap: 10px;
788
669
  `;
789
- var BodyContainer = styled6__default.default.div`
670
+ var BodyContainer = styled5__default.default.div`
790
671
  display: flex;
791
672
  width: 100%;
792
673
  height: 100%;
@@ -798,7 +679,7 @@ var BodyContainer = styled6__default.default.div`
798
679
  flex: 1;
799
680
  ${({ isIncludeHeader }) => getModalBodyTopBottomPadding(isIncludeHeader)}
800
681
  `;
801
- var ModalBodyContainerInner = styled6__default.default.div`
682
+ var ModalBodyContainerInner = styled5__default.default.div`
802
683
  display: grid;
803
684
  align-self: stretch;
804
685
  flex-direction: column;
@@ -807,7 +688,7 @@ var ModalBodyContainerInner = styled6__default.default.div`
807
688
  height: calc(100%);
808
689
  box-sizing: border-box;
809
690
  `;
810
- var ModalBodyContent = styled6__default.default.div`
691
+ var ModalBodyContent = styled5__default.default.div`
811
692
  display: flex;
812
693
  flex-direction: column;
813
694
  height: 100%;
@@ -815,7 +696,7 @@ var ModalBodyContent = styled6__default.default.div`
815
696
  padding: 0 24px;
816
697
  background: ${exports.colorTokens.neutral0};
817
698
  `;
818
- var FooterContainer = styled6__default.default.div`
699
+ var FooterContainer = styled5__default.default.div`
819
700
  display: flex;
820
701
  width: 100%;
821
702
  flex-direction: row;
@@ -842,9 +723,9 @@ exports.MODAL_FOOTER_KEY = Symbol("MODAL_FOOTER");
842
723
  var ModalContainer = (_a) => {
843
724
  var _b = _a, { children, outsideClick = utils.noop } = _b, rest = __objRest(_b, ["children", "outsideClick"]);
844
725
  const ref = utils.useParentElementClick(outsideClick);
845
- const childrenArray = React3__namespace.default.Children.toArray(children);
726
+ const childrenArray = React2__namespace.default.Children.toArray(children);
846
727
  const findHeader = childrenArray.find((child) => {
847
- if (!React3__namespace.default.isValidElement(child)) {
728
+ if (!React2__namespace.default.isValidElement(child)) {
848
729
  return child;
849
730
  }
850
731
  if (child.type[exports.MODAL_HEADER_KEY]) {
@@ -852,18 +733,18 @@ var ModalContainer = (_a) => {
852
733
  }
853
734
  });
854
735
  const findFooter = childrenArray.find((child) => {
855
- if (!React3__namespace.default.isValidElement(child)) {
736
+ if (!React2__namespace.default.isValidElement(child)) {
856
737
  return child;
857
738
  }
858
739
  if (child.type[exports.MODAL_FOOTER_KEY]) {
859
740
  return child;
860
741
  }
861
742
  });
862
- const addPropInChildren = React3__namespace.default.Children.map(childrenArray, (child) => {
863
- if (!React3__namespace.default.isValidElement(child)) {
743
+ const addPropInChildren = React2__namespace.default.Children.map(childrenArray, (child) => {
744
+ if (!React2__namespace.default.isValidElement(child)) {
864
745
  return child;
865
746
  }
866
- return React3__namespace.default.cloneElement(child, {
747
+ return React2__namespace.default.cloneElement(child, {
867
748
  isIncludeHeader: Boolean(findHeader),
868
749
  isIncludeFooter: Boolean(findFooter),
869
750
  sizeVar: rest.sizeVar,
@@ -896,7 +777,7 @@ var ModalBody = ({
896
777
  const headerHeight = 64;
897
778
  const footerHeight = 64;
898
779
  const topBottomMargin = 64;
899
- const getHeaderFooterHeight = React3.useCallback(() => {
780
+ const getHeaderFooterHeight = React2.useCallback(() => {
900
781
  let result = 0;
901
782
  if (isIncludeHeader) {
902
783
  result += headerHeight;
@@ -906,7 +787,7 @@ var ModalBody = ({
906
787
  }
907
788
  return result;
908
789
  }, [isIncludeFooter, isIncludeHeader]);
909
- const headerFooterHeight = React3.useMemo(() => getHeaderFooterHeight(), [getHeaderFooterHeight]);
790
+ const headerFooterHeight = React2.useMemo(() => getHeaderFooterHeight(), [getHeaderFooterHeight]);
910
791
  const setAutoHeightMin = () => {
911
792
  if (modalContainerHeight) {
912
793
  return modalContainerHeight - headerFooterHeight;
@@ -938,6 +819,85 @@ var ModalHeader = ({ children }) => {
938
819
  };
939
820
  ModalHeader[exports.MODAL_HEADER_KEY] = true;
940
821
  var ModalHeader_default = ModalHeader;
822
+ exports.ModalHandlerContext = React2.createContext({
823
+ addModal: utils.noop,
824
+ removeModal: utils.noop
825
+ });
826
+ exports.ModalContext = React2.createContext([]);
827
+
828
+ // src/components/Modal/hooks/useModalValue.ts
829
+ exports.useModalValue = () => {
830
+ const modal = React2.useContext(exports.ModalContext);
831
+ return {
832
+ modal
833
+ };
834
+ };
835
+ exports.useHandleModal = () => {
836
+ const { addModal, removeModal } = React2.useContext(exports.ModalHandlerContext);
837
+ return {
838
+ addModal,
839
+ removeModal
840
+ };
841
+ };
842
+ var ModalProvider = ({ children }) => {
843
+ const [openedModals, setOpenedModals] = React2.useState([]);
844
+ const addModal = (component, id) => {
845
+ setOpenedModals((modals) => {
846
+ if (modals) {
847
+ return [...modals, { component, id }];
848
+ }
849
+ return [{ component, id }];
850
+ });
851
+ };
852
+ const removeModal = (props) => {
853
+ const { id, deps } = props || {
854
+ id: void 0,
855
+ deps: void 0
856
+ };
857
+ const isIncludeAllProps = Boolean(id && deps);
858
+ const isIncludeId = Boolean(id);
859
+ const isNotIncludeAllProps = !id && Boolean(utils.isNullOrUndefined(deps));
860
+ const isIncludeDeps = Boolean(Boolean(!utils.isNullOrUndefined(deps)) && !id);
861
+ if (isIncludeAllProps) {
862
+ throw new Error("id\uC640 deps\uB294 \uB3D9\uC2DC\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
863
+ }
864
+ if (isIncludeId) {
865
+ setOpenedModals((modal) => {
866
+ const filterModal = modal.filter((modal2) => modal2.id !== id);
867
+ return [...filterModal];
868
+ });
869
+ return;
870
+ }
871
+ if (isNotIncludeAllProps || deps === 1) {
872
+ setOpenedModals((modal) => {
873
+ const removeModal2 = modal.slice(0, -1);
874
+ return [...removeModal2];
875
+ });
876
+ return;
877
+ }
878
+ if (isIncludeDeps) {
879
+ if (deps === 0 || deps === void 0) {
880
+ return;
881
+ }
882
+ setOpenedModals((modal) => {
883
+ const removeDeps = modal.slice(0, -deps);
884
+ return [...removeDeps];
885
+ });
886
+ return;
887
+ }
888
+ };
889
+ const dispatch = React2.useMemo(() => ({ addModal, removeModal }), []);
890
+ React2.useEffect(() => {
891
+ if (openedModals.length === 1) {
892
+ document.body.style.cssText = "overflow:hidden";
893
+ return () => {
894
+ document.body.style.cssText = "overflow:unset";
895
+ };
896
+ }
897
+ }, [openedModals.length]);
898
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.ModalContext.Provider, { value: openedModals, children: /* @__PURE__ */ jsxRuntime.jsx(exports.ModalHandlerContext.Provider, { value: dispatch, children }) });
899
+ };
900
+ var ModalProvider_default = ModalProvider;
941
901
 
942
902
  // src/components/Modal/index.ts
943
903
  exports.Modal = {
@@ -946,7 +906,7 @@ exports.Modal = {
946
906
  Body: ModalBody_default,
947
907
  Footer: ModalFooter_default
948
908
  };
949
- var SwitchContainer = styled6__default.default.div`
909
+ var SwitchContainer = styled5__default.default.div`
950
910
  width: 32px;
951
911
  height: 32px;
952
912
  border-radius: 6px;
@@ -959,7 +919,7 @@ var SwitchContainer = styled6__default.default.div`
959
919
  background: ${({ isDisabled }) => !isDisabled && exports.colorTokens.neutral400_5};
960
920
  }
961
921
  `;
962
- var StyledSwitch = styled6__default.default.input`
922
+ var StyledSwitch = styled5__default.default.input`
963
923
  appearance: none;
964
924
  border: none;
965
925
  border-radius: 12px;
@@ -1000,17 +960,17 @@ var StyledSwitch = styled6__default.default.input`
1000
960
  }
1001
961
  `;
1002
962
  var useOnToggle = (selected, defaultSelected) => {
1003
- const [isToggle, setIsToggle] = React3.useState(false);
963
+ const [isToggle, setIsToggle] = React2.useState(false);
1004
964
  const isControlled = selected !== void 0;
1005
965
  const handleToggle = () => {
1006
966
  !isControlled && setIsToggle((prev) => !prev);
1007
967
  };
1008
- React3.useEffect(() => {
968
+ React2.useEffect(() => {
1009
969
  if (isControlled) {
1010
970
  setIsToggle(selected);
1011
971
  }
1012
972
  }, [isControlled, selected]);
1013
- React3.useEffect(() => {
973
+ React2.useEffect(() => {
1014
974
  if (!isControlled && defaultSelected !== void 0) {
1015
975
  setIsToggle(defaultSelected);
1016
976
  }
@@ -1109,7 +1069,7 @@ var solidStyle = ({
1109
1069
  }
1110
1070
  `};
1111
1071
  `;
1112
- var StyledChip = styled6__default.default.button`
1072
+ var StyledChip = styled5__default.default.button`
1113
1073
  display: flex;
1114
1074
  align-items: center;
1115
1075
  justify-content: center;
@@ -1239,7 +1199,7 @@ var getStyleBySizeVar = (sizeVar) => {
1239
1199
  `;
1240
1200
  }
1241
1201
  };
1242
- var StyledChipButton = styled6__default.default.button`
1202
+ var StyledChipButton = styled5__default.default.button`
1243
1203
  display: flex;
1244
1204
  align-items: center;
1245
1205
  justify-content: center;
@@ -1358,7 +1318,7 @@ var getStyleBySizeVar2 = (sizeVar) => {
1358
1318
  `;
1359
1319
  }
1360
1320
  };
1361
- var StyledButton = styled6__default.default.button`
1321
+ var StyledButton = styled5__default.default.button`
1362
1322
  display: flex;
1363
1323
  align-items: center;
1364
1324
  justify-content: center;
@@ -1372,7 +1332,7 @@ var StyledButton = styled6__default.default.button`
1372
1332
  ${({ sizeVar }) => getStyleBySizeVar2(sizeVar)};
1373
1333
  ${({ disabled }) => getDisabledStyle(disabled)};
1374
1334
  `;
1375
- var Button = React3.forwardRef(
1335
+ var Button = React2.forwardRef(
1376
1336
  (_a, ref) => {
1377
1337
  var _b = _a, {
1378
1338
  styleVar = "PRIMARY",
@@ -1508,7 +1468,7 @@ var getStyleByStyleVar2 = (styleVar, color, isHovered) => {
1508
1468
  `;
1509
1469
  }
1510
1470
  };
1511
- var StyledIconButton = styled6__default.default.button`
1471
+ var StyledIconButton = styled5__default.default.button`
1512
1472
  display: flex;
1513
1473
  flex-shrink: 0;
1514
1474
  border-radius: ${exports.borderRadiusTokens.borderRadius06};
@@ -1524,10 +1484,10 @@ var StyledIconButton = styled6__default.default.button`
1524
1484
  height: 20px;
1525
1485
  }
1526
1486
  `;
1527
- var IconButton = React3.forwardRef(
1487
+ var IconButton = React2.forwardRef(
1528
1488
  (_a, ref) => {
1529
1489
  var _b = _a, { styleVar, sizeVar, disabled, children, color, onMouseEnter, onMouseLeave } = _b, rest = __objRest(_b, ["styleVar", "sizeVar", "disabled", "children", "color", "onMouseEnter", "onMouseLeave"]);
1530
- const [isHovered, setIsHovered] = React3.useState(false);
1490
+ const [isHovered, setIsHovered] = React2.useState(false);
1531
1491
  const handleOnMouseEnter = (e) => {
1532
1492
  setIsHovered(true);
1533
1493
  onMouseEnter && onMouseEnter(e);
@@ -1586,7 +1546,7 @@ var alertStyle = react$1.css`
1586
1546
  fill: ${exports.colorTokens.red300};
1587
1547
  }
1588
1548
  `;
1589
- var StyledCallout = styled6__default.default.div`
1549
+ var StyledCallout = styled5__default.default.div`
1590
1550
  display: flex;
1591
1551
  justify-content: flex-start;
1592
1552
  align-items: start;
@@ -1596,12 +1556,12 @@ var StyledCallout = styled6__default.default.div`
1596
1556
  ${({ styleVar }) => styleVar === "INFORMATION" && informationStyle}
1597
1557
  ${({ styleVar }) => styleVar === "ALERT" && alertStyle}
1598
1558
  `;
1599
- var StyledCalloutIcon = styled6__default.default.svg`
1559
+ var StyledCalloutIcon = styled5__default.default.svg`
1600
1560
  display: flex;
1601
1561
  min-height: 20px;
1602
1562
  min-width: 20px;
1603
1563
  `;
1604
- styled6__default.default.div`
1564
+ styled5__default.default.div`
1605
1565
  padding: 2px 0;
1606
1566
  `;
1607
1567
  var Callout = (_a) => {
@@ -1624,13 +1584,13 @@ exports.CalloutTypes = {
1624
1584
  INFORMATION: "INFORMATION",
1625
1585
  ALERT: "ALERT"
1626
1586
  };
1627
- exports.StyledPopper = styled6__default.default.div`
1587
+ exports.StyledPopper = styled5__default.default.div`
1628
1588
  width: ${({ width }) => width != null ? width : "fit-content"};
1629
1589
  height: ${({ height }) => height && height};
1630
1590
  `;
1631
- var PopperContext = React3.createContext(null);
1591
+ var PopperContext = React2.createContext(null);
1632
1592
  var usePopper = () => {
1633
- const context = React3__namespace.useContext(PopperContext);
1593
+ const context = React2__namespace.useContext(PopperContext);
1634
1594
  if (context === null) {
1635
1595
  throw new Error("usePopper must be used within a PopperProvider");
1636
1596
  }
@@ -1658,7 +1618,7 @@ function mergeRefs(...refs) {
1658
1618
  };
1659
1619
  }
1660
1620
  function useMergeRefs(...refs) {
1661
- return React3.useMemo(() => mergeRefs(...refs), refs);
1621
+ return React2.useMemo(() => mergeRefs(...refs), refs);
1662
1622
  }
1663
1623
  var Popper = ({
1664
1624
  placement,
@@ -1668,7 +1628,7 @@ var Popper = ({
1668
1628
  middlewares,
1669
1629
  children
1670
1630
  }) => {
1671
- const [isOpen, setIsOpen] = React3.useState(false);
1631
+ const [isOpen, setIsOpen] = React2.useState(false);
1672
1632
  const { refs, floatingStyles } = reactDom.useFloating({
1673
1633
  strategy,
1674
1634
  placement,
@@ -1683,18 +1643,18 @@ var Popper = ({
1683
1643
  });
1684
1644
  return /* @__PURE__ */ jsxRuntime.jsx(PopperContext.Provider, { value: __spreadProps(__spreadValues({}, refs), { floatingStyles: __spreadProps(__spreadValues({}, floatingStyles), { zIndex: 100 }), isOpen, setIsOpen }), children });
1685
1645
  };
1686
- exports.PopperTrigger = React3.forwardRef(
1646
+ exports.PopperTrigger = React2.forwardRef(
1687
1647
  (_a, ref) => {
1688
1648
  var _b = _a, { children, isOpen = false } = _b, rest = __objRest(_b, ["children", "isOpen"]);
1689
1649
  const { setReference, setIsOpen } = usePopper();
1690
1650
  const refs = useMergeRefs(ref, setReference);
1691
- React3.useEffect(() => {
1651
+ React2.useEffect(() => {
1692
1652
  setIsOpen(isOpen);
1693
1653
  }, [isOpen, setIsOpen]);
1694
1654
  return /* @__PURE__ */ jsxRuntime.jsx(exports.StyledPopper, __spreadProps(__spreadValues({ ref: refs, "data-shoplflow": "Popper" }, rest), { children }));
1695
1655
  }
1696
1656
  );
1697
- exports.PopperPortal = React3.forwardRef(
1657
+ exports.PopperPortal = React2.forwardRef(
1698
1658
  ({ children, animation: initialAnimation }, ref) => {
1699
1659
  const { floatingStyles, setFloating, isOpen } = usePopper();
1700
1660
  const animation = initialAnimation != null ? initialAnimation : fadeInOut;
@@ -1776,10 +1736,10 @@ exports.getDropdownIconSizeBySizeVar = (size2) => {
1776
1736
  `;
1777
1737
  }
1778
1738
  };
1779
- exports.StyledDropdown = styled6__default.default.div`
1739
+ exports.StyledDropdown = styled5__default.default.div`
1780
1740
  width: ${({ width }) => width};
1781
1741
  `;
1782
- exports.StyledDropdownContent = styled6__default.default.div`
1742
+ exports.StyledDropdownContent = styled5__default.default.div`
1783
1743
  display: flex;
1784
1744
  flex-direction: column;
1785
1745
  background: ${exports.colorTokens.neutral0};
@@ -1788,7 +1748,7 @@ exports.StyledDropdownContent = styled6__default.default.div`
1788
1748
  border-radius: 6px;
1789
1749
  box-shadow: ${exports.boxShadowTokens.dropShadow};
1790
1750
  `;
1791
- exports.StyledDropdownButton = styled6__default.default.button`
1751
+ exports.StyledDropdownButton = styled5__default.default.button`
1792
1752
  display: flex;
1793
1753
  flex-direction: row;
1794
1754
  align-items: center;
@@ -1803,16 +1763,16 @@ exports.StyledDropdownButton = styled6__default.default.button`
1803
1763
  cursor: not-allowed;
1804
1764
  `}
1805
1765
  `;
1806
- exports.DropdownButtonIcon = styled6__default.default(framerMotion.motion.div)`
1766
+ exports.DropdownButtonIcon = styled5__default.default(framerMotion.motion.div)`
1807
1767
  display: flex;
1808
1768
  align-items: center;
1809
1769
  justify-content: center;
1810
1770
 
1811
1771
  ${({ sizeVar }) => sizeVar && exports.getDropdownIconSizeBySizeVar(sizeVar)};
1812
1772
  `;
1813
- var DropdownContext = React3.createContext(null);
1773
+ var DropdownContext = React2.createContext(null);
1814
1774
  var useDropdown = () => {
1815
- const context = React3.useContext(DropdownContext);
1775
+ const context = React2.useContext(DropdownContext);
1816
1776
  if (context === null) {
1817
1777
  throw new Error("useDropdown must be used within a DropdownProvider");
1818
1778
  }
@@ -1832,7 +1792,7 @@ var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled }) => {
1832
1792
  }
1833
1793
  return exports.colorTokens.neutral300;
1834
1794
  };
1835
- var InputWrapper = styled6__default.default.label`
1795
+ var InputWrapper = styled5__default.default.label`
1836
1796
  display: flex;
1837
1797
  align-items: center;
1838
1798
  width: ${({ width }) => width != null ? width : "100%"};
@@ -1878,7 +1838,7 @@ var getIconSize = (size2) => {
1878
1838
  return "24px";
1879
1839
  }
1880
1840
  };
1881
- exports.StyledIcon = styled6__default.default.svg`
1841
+ exports.StyledIcon = styled5__default.default.svg`
1882
1842
  width: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
1883
1843
  min-width: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
1884
1844
  height: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
@@ -1887,16 +1847,16 @@ exports.StyledIcon = styled6__default.default.svg`
1887
1847
  fill: ${({ color }) => color && exports.colorTokens[color]};
1888
1848
  }
1889
1849
  `;
1890
- var Icon = React3.forwardRef((_a, ref) => {
1850
+ var Icon = React2.forwardRef((_a, ref) => {
1891
1851
  var _b = _a, { iconSource } = _b, rest = __objRest(_b, ["iconSource"]);
1892
1852
  return /* @__PURE__ */ jsxRuntime.jsx(exports.StyledIcon, __spreadProps(__spreadValues({ as: iconSource, ref }, rest), { "data-shoplflow": "Icon" }));
1893
1853
  });
1894
1854
  exports.Icon = Icon;
1895
- var DropdownButton = React3.forwardRef(
1855
+ var DropdownButton = React2.forwardRef(
1896
1856
  (_a, ref) => {
1897
1857
  var _b = _a, { width, onClick, sizeVar = "M", placeholder, value, disabled, leftSource } = _b, rest = __objRest(_b, ["width", "onClick", "sizeVar", "placeholder", "value", "disabled", "leftSource"]);
1898
1858
  const { isOpen, setIsOpen } = useDropdown();
1899
- const [isHovered, setIsHovered] = React3.useState(false);
1859
+ const [isHovered, setIsHovered] = React2.useState(false);
1900
1860
  const handleOnClick = (e) => {
1901
1861
  if (!disabled) {
1902
1862
  onClick && onClick(e);
@@ -1921,16 +1881,7 @@ var DropdownButton = React3.forwardRef(
1921
1881
  height: exports.getDropdownHeightBySizeVar(sizeVar),
1922
1882
  children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledDropdownButton, __spreadProps(__spreadValues({ ref, onClick: handleOnClick, disabled }, rest), { sizeVar, children: [
1923
1883
  leftSource && leftSource,
1924
- value ? /* @__PURE__ */ jsxRuntime.jsx(
1925
- exports.Text,
1926
- {
1927
- typography: exports.getDropdownFontSizeBySizeVar(sizeVar),
1928
- color: "neutral700",
1929
- textOverflow: "ellipsis",
1930
- lineClamp: 1,
1931
- children: value
1932
- }
1933
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1884
+ value || /* @__PURE__ */ jsxRuntime.jsx(
1934
1885
  exports.Text,
1935
1886
  {
1936
1887
  typography: exports.getDropdownFontSizeBySizeVar(sizeVar),
@@ -1987,10 +1938,10 @@ var Dropdown = ({
1987
1938
  option = "CLICK",
1988
1939
  width = "100%"
1989
1940
  }) => {
1990
- const [triggerRef, setTriggerRef] = React3.useState(null);
1991
- const [size2, setSize] = React3.useState({ width: 0, height: 0 });
1992
- const [isOpen, setIsOpen] = React3.useState(false);
1993
- React3.useEffect(() => {
1941
+ const [triggerRef, setTriggerRef] = React2.useState(null);
1942
+ const [size2, setSize] = React2.useState({ width: 0, height: 0 });
1943
+ const [isOpen, setIsOpen] = React2.useState(false);
1944
+ React2.useEffect(() => {
1994
1945
  if (triggerRef) {
1995
1946
  setSize({
1996
1947
  width: triggerRef.offsetWidth,
@@ -1998,7 +1949,7 @@ var Dropdown = ({
1998
1949
  });
1999
1950
  }
2000
1951
  }, [triggerRef]);
2001
- React3.useEffect(() => {
1952
+ React2.useEffect(() => {
2002
1953
  if (initialIsOpen === void 0) {
2003
1954
  return;
2004
1955
  }
@@ -2021,12 +1972,12 @@ var Dropdown = ({
2021
1972
  Dropdown.Button = DropdownButton;
2022
1973
  Dropdown.Content = DropdownContent;
2023
1974
  exports.Dropdown = Dropdown;
2024
- var Container2 = styled6__default.default.div`
1975
+ var Container2 = styled5__default.default.div`
2025
1976
  width: 32px;
2026
1977
  height: 32px;
2027
1978
  padding: 7px;
2028
1979
  `;
2029
- var IconButton2 = styled6__default.default.button`
1980
+ var IconButton2 = styled5__default.default.button`
2030
1981
  display: flex;
2031
1982
  width: 16px;
2032
1983
  height: 16px;
@@ -2046,7 +1997,7 @@ var IconButton2 = styled6__default.default.button`
2046
1997
  }
2047
1998
  `;
2048
1999
  var MUNUS_BUTTON_SYMBOL_KEY = Symbol("SHOPLFLOW_MUNUS_BUTTON");
2049
- var MinusButton = React3.forwardRef((_a, ref) => {
2000
+ var MinusButton = React2.forwardRef((_a, ref) => {
2050
2001
  var _b = _a, { onClick, color = "neutral300" } = _b, rest = __objRest(_b, ["onClick", "color"]);
2051
2002
  return /* @__PURE__ */ jsxRuntime.jsx(Container2, { "data-shoplflow": "minusButton", children: /* @__PURE__ */ jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({ color, onClick, ref }, rest), { children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2052
2003
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2133,7 +2084,7 @@ var getStylesByStyleVariant = (styleVariant, isSelected, isHovered) => {
2133
2084
  return "";
2134
2085
  }
2135
2086
  };
2136
- var StyledCheckbox = styled6__default.default.button`
2087
+ var StyledCheckbox = styled5__default.default.button`
2137
2088
  display: flex;
2138
2089
  align-items: center;
2139
2090
  justify-content: center;
@@ -2148,7 +2099,7 @@ var StyledCheckbox = styled6__default.default.button`
2148
2099
  ${({ styleVar, isSelected, isHovered }) => getStylesByStyleVariant(styleVar, isSelected, isHovered)};
2149
2100
  ${({ disabled }) => getDisabledStyle(disabled)}
2150
2101
  `;
2151
- var Container3 = styled6__default.default.button`
2102
+ var Container3 = styled5__default.default.button`
2152
2103
  display: flex;
2153
2104
  align-items: center;
2154
2105
  justify-content: center;
@@ -2177,7 +2128,7 @@ var Checkbox = (_a) => {
2177
2128
  "styleVar"
2178
2129
  ]);
2179
2130
  const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2180
- const [isHovered, toggleHovered] = React3.useState(false);
2131
+ const [isHovered, toggleHovered] = React2.useState(false);
2181
2132
  const handleMouseLeave = (e) => {
2182
2133
  toggleHovered(false);
2183
2134
  onMouseLeave && onMouseLeave(e);
@@ -2234,7 +2185,7 @@ var getSelectedStyle = (isHovered) => {
2234
2185
  `}
2235
2186
  `;
2236
2187
  };
2237
- var StyledRadio = styled6__default.default.div`
2188
+ var StyledRadio = styled5__default.default.div`
2238
2189
  display: flex;
2239
2190
  align-items: center;
2240
2191
  justify-content: center;
@@ -2256,7 +2207,7 @@ var StyledRadio = styled6__default.default.div`
2256
2207
  ${({ isSelected, isHovered }) => isSelected && getSelectedStyle(isHovered)}
2257
2208
  ${({ disabled }) => getDisabledStyle(disabled)}
2258
2209
  `;
2259
- var Container4 = styled6__default.default.button`
2210
+ var Container4 = styled5__default.default.button`
2260
2211
  display: flex;
2261
2212
  align-items: center;
2262
2213
  justify-content: center;
@@ -2269,7 +2220,7 @@ exports.RADIO_SYMBOL_KEY = Symbol("SHOPLFLOW_RADIO");
2269
2220
  var Radio = (_a) => {
2270
2221
  var _b = _a, { isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave } = _b, rest = __objRest(_b, ["isSelected", "defaultSelected", "disabled", "onClick", "onMouseEnter", "onMouseLeave"]);
2271
2222
  const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2272
- const [isHovered, toggleHovered] = React3.useState(false);
2223
+ const [isHovered, toggleHovered] = React2.useState(false);
2273
2224
  const handleMouseLeave = (e) => {
2274
2225
  toggleHovered(false);
2275
2226
  onMouseLeave && onMouseLeave(e);
@@ -2333,7 +2284,7 @@ exports.getFontStylesBySizeVar = (sizeVar) => {
2333
2284
  return "body1_400";
2334
2285
  }
2335
2286
  };
2336
- exports.StyledMenu = styled6__default.default.li`
2287
+ exports.StyledMenu = styled5__default.default.li`
2337
2288
  display: flex;
2338
2289
  width: 100%;
2339
2290
  flex-direction: row;
@@ -2376,7 +2327,7 @@ var Menu = (_a) => {
2376
2327
  "disabled"
2377
2328
  ]);
2378
2329
  const [selected, handleToggle] = useOnToggle(isSelected, defaultSelected);
2379
- const LeftSourceClone = leftSource ? React3__namespace.default.cloneElement(leftSource, __spreadProps(__spreadValues({}, rest), {
2330
+ const LeftSourceClone = leftSource ? React2__namespace.default.cloneElement(leftSource, __spreadProps(__spreadValues({}, rest), {
2380
2331
  isSelected
2381
2332
  })) : leftSource;
2382
2333
  const handleOnClick = (e) => {
@@ -2408,7 +2359,7 @@ exports.MenuSizeVariants = {
2408
2359
  S: "S",
2409
2360
  M: "M"
2410
2361
  };
2411
- exports.StyledList = styled6__default.default.li`
2362
+ exports.StyledList = styled5__default.default.li`
2412
2363
  display: flex;
2413
2364
  flex-direction: row;
2414
2365
  width: 100%;
@@ -2423,7 +2374,7 @@ exports.StyledList = styled6__default.default.li`
2423
2374
  background: ${exports.colorTokens.neutral100};
2424
2375
  }
2425
2376
  `;
2426
- exports.StyledText2Rows = styled6__default.default.div`
2377
+ exports.StyledText2Rows = styled5__default.default.div`
2427
2378
  display: flex;
2428
2379
  flex-direction: column;
2429
2380
  justify-content: center;
@@ -2431,7 +2382,7 @@ exports.StyledText2Rows = styled6__default.default.div`
2431
2382
  `;
2432
2383
  var List = (_a) => {
2433
2384
  var _b = _a, { children, leftSource, rightSource } = _b, rest = __objRest(_b, ["children", "leftSource", "rightSource"]);
2434
- const LeftSourceClone = leftSource ? React3__namespace.default.cloneElement(leftSource, __spreadValues({}, rest)) : leftSource;
2385
+ const LeftSourceClone = leftSource ? React2__namespace.default.cloneElement(leftSource, __spreadValues({}, rest)) : leftSource;
2435
2386
  if (!children && rightSource) {
2436
2387
  throw new Error("RightSource\uB294 children\uC774 \uD544\uC218\uB85C \uD3EC\uD568\uB418\uC5B4\uC57C\uD569\uB2C8\uB2E4.");
2437
2388
  }
@@ -2533,7 +2484,7 @@ var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
2533
2484
  `;
2534
2485
  }
2535
2486
  };
2536
- var StyledTag = styled6__default.default.div`
2487
+ var StyledTag = styled5__default.default.div`
2537
2488
  display: flex;
2538
2489
  align-items: center;
2539
2490
  flex-direction: row;
@@ -2576,7 +2527,7 @@ exports.TagSizeVariants = {
2576
2527
  S: "S",
2577
2528
  M: "M"
2578
2529
  };
2579
- var StyledInput = styled6__default.default.input`
2530
+ var StyledInput = styled5__default.default.input`
2580
2531
  padding: 4px 0 4px 12px;
2581
2532
  background-color: transparent;
2582
2533
  width: 100%;
@@ -2597,13 +2548,13 @@ var StyledInput = styled6__default.default.input`
2597
2548
  -moz-appearance: textfield;
2598
2549
  }
2599
2550
  `;
2600
- var RightElementWrapper = styled6__default.default.div`
2551
+ var RightElementWrapper = styled5__default.default.div`
2601
2552
  display: flex;
2602
2553
  flex-direction: row;
2603
2554
  align-items: center;
2604
2555
  padding: 0 8px 0 0;
2605
2556
  `;
2606
- var Wrapper = styled6__default.default.div`
2557
+ var Wrapper = styled5__default.default.div`
2607
2558
  display: flex;
2608
2559
  width: 100%;
2609
2560
  justify-content: flex-end;
@@ -2618,7 +2569,7 @@ var TextCounter = ({ currentLength, maxLength }) => {
2618
2569
  ] });
2619
2570
  };
2620
2571
  var TextCounter_default = TextCounter;
2621
- React3.createContext({
2572
+ React2.createContext({
2622
2573
  domain: "SHOPL",
2623
2574
  handleToggleTheme: () => {
2624
2575
  }
@@ -2631,7 +2582,7 @@ var assetFunction = (iconName, domainProps) => {
2631
2582
  const ShoplIcon = ShoplAssets__namespace[iconName];
2632
2583
  return domain === "hada" ? HadaIcon : ShoplIcon;
2633
2584
  };
2634
- var Input = React3.forwardRef(
2585
+ var Input = React2.forwardRef(
2635
2586
  (_a, ref) => {
2636
2587
  var _b = _a, {
2637
2588
  onFocus,
@@ -2664,20 +2615,20 @@ var Input = React3.forwardRef(
2664
2615
  "className",
2665
2616
  "width"
2666
2617
  ]);
2667
- const [text, setText] = React3.useState("");
2668
- const [isFocused, setIsFocused] = React3.useState(false);
2669
- const [type, setType] = React3.useState("text");
2670
- const [isHovered, setIsHovered] = React3.useState(false);
2671
- const uniqueId = React3.useId();
2672
- const inputRef = React3__namespace.default.useRef(null);
2618
+ const [text, setText] = React2.useState("");
2619
+ const [isFocused, setIsFocused] = React2.useState(false);
2620
+ const [type, setType] = React2.useState("text");
2621
+ const [isHovered, setIsHovered] = React2.useState(false);
2622
+ const uniqueId = React2.useId();
2623
+ const inputRef = React2__namespace.default.useRef(null);
2673
2624
  const refs = useMergeRefs(ref, inputRef);
2674
- const convertToString = React3.useCallback((value2) => {
2625
+ const convertToString = React2.useCallback((value2) => {
2675
2626
  if (typeof value2 !== "number") {
2676
2627
  return typeof value2 === "string" ? value2 : value2.join("");
2677
2628
  }
2678
2629
  return String(value2);
2679
2630
  }, []);
2680
- const sliceText = React3.useCallback(
2631
+ const sliceText = React2.useCallback(
2681
2632
  (value2) => {
2682
2633
  if (maxLength && value2.length > maxLength) {
2683
2634
  return value2.slice(0, maxLength);
@@ -2686,7 +2637,7 @@ var Input = React3.forwardRef(
2686
2637
  },
2687
2638
  [maxLength]
2688
2639
  );
2689
- const limitRange = React3.useCallback(
2640
+ const limitRange = React2.useCallback(
2690
2641
  (value2) => {
2691
2642
  if (min && Number(value2) < min) {
2692
2643
  return String(min);
@@ -2743,14 +2694,14 @@ var Input = React3.forwardRef(
2743
2694
  setType("password");
2744
2695
  }
2745
2696
  };
2746
- React3.useEffect(() => {
2697
+ React2.useEffect(() => {
2747
2698
  if (defaultValue !== void 0) {
2748
2699
  const convertString = convertToString(defaultValue);
2749
2700
  const slicedText = sliceText(convertString);
2750
2701
  setText(slicedText);
2751
2702
  }
2752
2703
  }, [convertToString, defaultValue, maxLength, sliceText]);
2753
- React3.useEffect(() => {
2704
+ React2.useEffect(() => {
2754
2705
  var _a2;
2755
2706
  if (value !== void 0) {
2756
2707
  const convertString = convertToString(value);
@@ -2759,7 +2710,7 @@ var Input = React3.forwardRef(
2759
2710
  setText(slicedText);
2760
2711
  }
2761
2712
  }, [convertToString, maxLength, sliceText, value]);
2762
- React3.useEffect(() => {
2713
+ React2.useEffect(() => {
2763
2714
  setType(initialType);
2764
2715
  }, [initialType]);
2765
2716
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2807,7 +2758,7 @@ var Input = React3.forwardRef(
2807
2758
  }
2808
2759
  );
2809
2760
  exports.Input = Input;
2810
- exports.StyledInputButton = styled6__default.default.div`
2761
+ exports.StyledInputButton = styled5__default.default.div`
2811
2762
  display: flex;
2812
2763
  flex-direction: row;
2813
2764
  align-items: center;
@@ -2822,7 +2773,7 @@ exports.StyledInputButton = styled6__default.default.div`
2822
2773
  cursor: not-allowed;
2823
2774
  `}
2824
2775
  `;
2825
- exports.StyledInputButtonContent = styled6__default.default.input`
2776
+ exports.StyledInputButtonContent = styled5__default.default.input`
2826
2777
  display: flex;
2827
2778
  width: 100%;
2828
2779
  border: none;
@@ -2832,12 +2783,12 @@ exports.StyledInputButtonContent = styled6__default.default.input`
2832
2783
  color: ${exports.colorTokens.neutral350};
2833
2784
  }
2834
2785
  `;
2835
- var InputButton = React3.forwardRef(
2786
+ var InputButton = React2.forwardRef(
2836
2787
  (_a, ref) => {
2837
2788
  var _b = _a, { value, defaultValue, onChange, onClick, isSelected, disabled = false, rightSource, onClear, width } = _b, rest = __objRest(_b, ["value", "defaultValue", "onChange", "onClick", "isSelected", "disabled", "rightSource", "onClear", "width"]);
2838
- const [text, setText] = React3.useState("");
2839
- const [isHovered, setIsHovered] = React3.useState(false);
2840
- const convertToString = React3.useCallback((value2) => {
2789
+ const [text, setText] = React2.useState("");
2790
+ const [isHovered, setIsHovered] = React2.useState(false);
2791
+ const convertToString = React2.useCallback((value2) => {
2841
2792
  if (typeof value2 !== "number") {
2842
2793
  return typeof value2 === "string" ? value2 : value2.join("");
2843
2794
  }
@@ -2862,19 +2813,19 @@ var InputButton = React3.forwardRef(
2862
2813
  const handleOnMouseLeave = () => {
2863
2814
  setIsHovered(false);
2864
2815
  };
2865
- React3.useEffect(() => {
2816
+ React2.useEffect(() => {
2866
2817
  if (defaultValue) {
2867
2818
  const convertString = convertToString(defaultValue);
2868
2819
  setText(convertString);
2869
2820
  }
2870
2821
  }, [convertToString, defaultValue]);
2871
- React3.useEffect(() => {
2822
+ React2.useEffect(() => {
2872
2823
  if (value) {
2873
2824
  const convertString = convertToString(value);
2874
2825
  setText(convertString);
2875
2826
  }
2876
2827
  }, [convertToString, value]);
2877
- React3.useEffect(() => {
2828
+ React2.useEffect(() => {
2878
2829
  onChange && onChange(convertToString(value != null ? value : ""));
2879
2830
  }, [convertToString, onChange, value]);
2880
2831
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2899,7 +2850,7 @@ var InputButton = React3.forwardRef(
2899
2850
  }
2900
2851
  );
2901
2852
  exports.InputButton = InputButton;
2902
- var BottomElementWrapper = styled6__default.default.div`
2853
+ var BottomElementWrapper = styled5__default.default.div`
2903
2854
  display: flex;
2904
2855
  width: 100%;
2905
2856
  flex-direction: row;
@@ -2907,7 +2858,7 @@ var BottomElementWrapper = styled6__default.default.div`
2907
2858
  gap: 8px;
2908
2859
  background-color: ${exports.colorTokens.neutral0};
2909
2860
  `;
2910
- var StyledTextarea = styled6__default.default.textarea`
2861
+ var StyledTextarea = styled5__default.default.textarea`
2911
2862
  padding: 8px 12px 0 12px;
2912
2863
  background-color: transparent;
2913
2864
  resize: none;
@@ -2920,7 +2871,7 @@ var StyledTextarea = styled6__default.default.textarea`
2920
2871
  color: ${exports.colorTokens.neutral350};
2921
2872
  }
2922
2873
  `;
2923
- var TextArea = React3.forwardRef(
2874
+ var TextArea = React2.forwardRef(
2924
2875
  (_a, ref) => {
2925
2876
  var _b = _a, {
2926
2877
  name,
@@ -2951,9 +2902,9 @@ var TextArea = React3.forwardRef(
2951
2902
  "width",
2952
2903
  "className"
2953
2904
  ]);
2954
- const [text, setText] = React3.useState("");
2955
- const [isFocused, setIsFocused] = React3.useState(false);
2956
- const [isHovered, setIsHovered] = React3.useState(false);
2905
+ const [text, setText] = React2.useState("");
2906
+ const [isFocused, setIsFocused] = React2.useState(false);
2907
+ const [isHovered, setIsHovered] = React2.useState(false);
2957
2908
  const handleOnMouseEnter = () => {
2958
2909
  setIsHovered(true);
2959
2910
  };
@@ -2978,7 +2929,7 @@ var TextArea = React3.forwardRef(
2978
2929
  }
2979
2930
  return String(value2);
2980
2931
  };
2981
- React3.useEffect(() => {
2932
+ React2.useEffect(() => {
2982
2933
  if (defaultValue) {
2983
2934
  const convertString = convertToString(defaultValue);
2984
2935
  if (maxLength && convertString.length > maxLength) {
@@ -2987,7 +2938,7 @@ var TextArea = React3.forwardRef(
2987
2938
  setText(convertString);
2988
2939
  }
2989
2940
  }, [defaultValue, maxLength]);
2990
- React3.useEffect(() => {
2941
+ React2.useEffect(() => {
2991
2942
  if (value) {
2992
2943
  const convertString = convertToString(value);
2993
2944
  if (maxLength && convertString.length > maxLength) {
@@ -2996,7 +2947,7 @@ var TextArea = React3.forwardRef(
2996
2947
  setText(convertToString(value));
2997
2948
  }
2998
2949
  }, [maxLength, value]);
2999
- const uniqueId = React3.useId();
2950
+ const uniqueId = React2.useId();
3000
2951
  return /* @__PURE__ */ jsxRuntime.jsxs(
3001
2952
  InputWrapper,
3002
2953
  {
@@ -3035,7 +2986,7 @@ var TextArea = React3.forwardRef(
3035
2986
  }
3036
2987
  );
3037
2988
  exports.TextArea = TextArea;
3038
- var StyledSelectInputButton = styled6__default.default.div`
2989
+ var StyledSelectInputButton = styled5__default.default.div`
3039
2990
  display: flex;
3040
2991
  flex-direction: row;
3041
2992
  align-items: center;
@@ -3076,7 +3027,7 @@ var SelectInputButton = (_a) => {
3076
3027
  "width",
3077
3028
  "rightSource"
3078
3029
  ]);
3079
- const [isHovered, setIsHovered] = React3.useState(false);
3030
+ const [isHovered, setIsHovered] = React2.useState(false);
3080
3031
  const handleOnClick = (e) => {
3081
3032
  e.preventDefault();
3082
3033
  e.stopPropagation();
@@ -3128,6 +3079,50 @@ var SelectInputButton = (_a) => {
3128
3079
  );
3129
3080
  };
3130
3081
  exports.SelectInputButton = SelectInputButton;
3082
+ var SpaceMarginWrapper = styled5__default.default(framerMotion.motion.div)`
3083
+ position: relative;
3084
+ display: flex;
3085
+ align-items: center;
3086
+ justify-content: center;
3087
+ flex-grow: 1;
3088
+ z-index: 101;
3089
+ padding: 32px 20px;
3090
+ width: 100%;
3091
+ height: 100%;
3092
+ `;
3093
+ var ModalPortal = () => {
3094
+ const modal = React2.useContext(exports.ModalContext);
3095
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
3096
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: modal.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(BackDrop_default, { children: /* @__PURE__ */ jsxRuntime.jsx(SpaceMarginWrapper, { children: item.component }) }, index)) }),
3097
+ document.body
3098
+ ) });
3099
+ };
3100
+ exports.ModalProvider = ModalPortal;
3101
+ var PopperPortal2 = () => {
3102
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
3103
+ /* @__PURE__ */ jsxRuntime.jsx(
3104
+ "div",
3105
+ {
3106
+ id: "popper-portal-key",
3107
+ style: {
3108
+ zIndex: 20001,
3109
+ position: "relative"
3110
+ }
3111
+ }
3112
+ ),
3113
+ document.body
3114
+ ) });
3115
+ };
3116
+ var PopperPortal_default = PopperPortal2;
3117
+ var ShoplflowProvider = ({ children, domain = "SHOPL" }) => {
3118
+ exports.useDomain(domain);
3119
+ return /* @__PURE__ */ jsxRuntime.jsxs(ModalProvider_default, { children: [
3120
+ /* @__PURE__ */ jsxRuntime.jsx(PopperPortal_default, {}),
3121
+ /* @__PURE__ */ jsxRuntime.jsx(exports.ModalProvider, {}),
3122
+ children
3123
+ ] });
3124
+ };
3125
+ exports.ShoplflowProvider = ShoplflowProvider;
3131
3126
  /*! Bundled license information:
3132
3127
 
3133
3128
  classnames/index.js: