@shoplflow/base 0.24.5 → 0.24.7

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);
@@ -1987,10 +1947,10 @@ var Dropdown = ({
1987
1947
  option = "CLICK",
1988
1948
  width = "100%"
1989
1949
  }) => {
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(() => {
1950
+ const [triggerRef, setTriggerRef] = React2.useState(null);
1951
+ const [size2, setSize] = React2.useState({ width: 0, height: 0 });
1952
+ const [isOpen, setIsOpen] = React2.useState(false);
1953
+ React2.useEffect(() => {
1994
1954
  if (triggerRef) {
1995
1955
  setSize({
1996
1956
  width: triggerRef.offsetWidth,
@@ -1998,7 +1958,7 @@ var Dropdown = ({
1998
1958
  });
1999
1959
  }
2000
1960
  }, [triggerRef]);
2001
- React3.useEffect(() => {
1961
+ React2.useEffect(() => {
2002
1962
  if (initialIsOpen === void 0) {
2003
1963
  return;
2004
1964
  }
@@ -2021,12 +1981,12 @@ var Dropdown = ({
2021
1981
  Dropdown.Button = DropdownButton;
2022
1982
  Dropdown.Content = DropdownContent;
2023
1983
  exports.Dropdown = Dropdown;
2024
- var Container2 = styled6__default.default.div`
1984
+ var Container2 = styled5__default.default.div`
2025
1985
  width: 32px;
2026
1986
  height: 32px;
2027
1987
  padding: 7px;
2028
1988
  `;
2029
- var IconButton2 = styled6__default.default.button`
1989
+ var IconButton2 = styled5__default.default.button`
2030
1990
  display: flex;
2031
1991
  width: 16px;
2032
1992
  height: 16px;
@@ -2046,7 +2006,7 @@ var IconButton2 = styled6__default.default.button`
2046
2006
  }
2047
2007
  `;
2048
2008
  var MUNUS_BUTTON_SYMBOL_KEY = Symbol("SHOPLFLOW_MUNUS_BUTTON");
2049
- var MinusButton = React3.forwardRef((_a, ref) => {
2009
+ var MinusButton = React2.forwardRef((_a, ref) => {
2050
2010
  var _b = _a, { onClick, color = "neutral300" } = _b, rest = __objRest(_b, ["onClick", "color"]);
2051
2011
  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
2012
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2133,7 +2093,7 @@ var getStylesByStyleVariant = (styleVariant, isSelected, isHovered) => {
2133
2093
  return "";
2134
2094
  }
2135
2095
  };
2136
- var StyledCheckbox = styled6__default.default.button`
2096
+ var StyledCheckbox = styled5__default.default.button`
2137
2097
  display: flex;
2138
2098
  align-items: center;
2139
2099
  justify-content: center;
@@ -2148,13 +2108,14 @@ var StyledCheckbox = styled6__default.default.button`
2148
2108
  ${({ styleVar, isSelected, isHovered }) => getStylesByStyleVariant(styleVar, isSelected, isHovered)};
2149
2109
  ${({ disabled }) => getDisabledStyle(disabled)}
2150
2110
  `;
2151
- var Container3 = styled6__default.default.button`
2111
+ var Container3 = styled5__default.default.button`
2152
2112
  display: flex;
2153
2113
  align-items: center;
2154
2114
  justify-content: center;
2155
2115
  padding: 4px;
2156
2116
  width: fit-content;
2157
2117
  height: fit-content;
2118
+ background-color: transparent;
2158
2119
  `;
2159
2120
  exports.CHECKBOX_SYMBOL_KEY = Symbol("SHOPLFLOW_CHECKBOX");
2160
2121
  var Checkbox = (_a) => {
@@ -2176,7 +2137,7 @@ var Checkbox = (_a) => {
2176
2137
  "styleVar"
2177
2138
  ]);
2178
2139
  const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2179
- const [isHovered, toggleHovered] = React3.useState(false);
2140
+ const [isHovered, toggleHovered] = React2.useState(false);
2180
2141
  const handleMouseLeave = (e) => {
2181
2142
  toggleHovered(false);
2182
2143
  onMouseLeave && onMouseLeave(e);
@@ -2233,7 +2194,7 @@ var getSelectedStyle = (isHovered) => {
2233
2194
  `}
2234
2195
  `;
2235
2196
  };
2236
- var StyledRadio = styled6__default.default.div`
2197
+ var StyledRadio = styled5__default.default.div`
2237
2198
  display: flex;
2238
2199
  align-items: center;
2239
2200
  justify-content: center;
@@ -2255,7 +2216,7 @@ var StyledRadio = styled6__default.default.div`
2255
2216
  ${({ isSelected, isHovered }) => isSelected && getSelectedStyle(isHovered)}
2256
2217
  ${({ disabled }) => getDisabledStyle(disabled)}
2257
2218
  `;
2258
- var Container4 = styled6__default.default.button`
2219
+ var Container4 = styled5__default.default.button`
2259
2220
  display: flex;
2260
2221
  align-items: center;
2261
2222
  justify-content: center;
@@ -2268,7 +2229,7 @@ exports.RADIO_SYMBOL_KEY = Symbol("SHOPLFLOW_RADIO");
2268
2229
  var Radio = (_a) => {
2269
2230
  var _b = _a, { isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave } = _b, rest = __objRest(_b, ["isSelected", "defaultSelected", "disabled", "onClick", "onMouseEnter", "onMouseLeave"]);
2270
2231
  const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2271
- const [isHovered, toggleHovered] = React3.useState(false);
2232
+ const [isHovered, toggleHovered] = React2.useState(false);
2272
2233
  const handleMouseLeave = (e) => {
2273
2234
  toggleHovered(false);
2274
2235
  onMouseLeave && onMouseLeave(e);
@@ -2332,7 +2293,7 @@ exports.getFontStylesBySizeVar = (sizeVar) => {
2332
2293
  return "body1_400";
2333
2294
  }
2334
2295
  };
2335
- exports.StyledMenu = styled6__default.default.li`
2296
+ exports.StyledMenu = styled5__default.default.li`
2336
2297
  display: flex;
2337
2298
  width: 100%;
2338
2299
  flex-direction: row;
@@ -2375,7 +2336,7 @@ var Menu = (_a) => {
2375
2336
  "disabled"
2376
2337
  ]);
2377
2338
  const [selected, handleToggle] = useOnToggle(isSelected, defaultSelected);
2378
- const LeftSourceClone = leftSource ? React3__namespace.default.cloneElement(leftSource, __spreadProps(__spreadValues({}, rest), {
2339
+ const LeftSourceClone = leftSource ? React2__namespace.default.cloneElement(leftSource, __spreadProps(__spreadValues({}, rest), {
2379
2340
  isSelected
2380
2341
  })) : leftSource;
2381
2342
  const handleOnClick = (e) => {
@@ -2407,7 +2368,7 @@ exports.MenuSizeVariants = {
2407
2368
  S: "S",
2408
2369
  M: "M"
2409
2370
  };
2410
- exports.StyledList = styled6__default.default.li`
2371
+ exports.StyledList = styled5__default.default.li`
2411
2372
  display: flex;
2412
2373
  flex-direction: row;
2413
2374
  width: 100%;
@@ -2422,7 +2383,7 @@ exports.StyledList = styled6__default.default.li`
2422
2383
  background: ${exports.colorTokens.neutral100};
2423
2384
  }
2424
2385
  `;
2425
- exports.StyledText2Rows = styled6__default.default.div`
2386
+ exports.StyledText2Rows = styled5__default.default.div`
2426
2387
  display: flex;
2427
2388
  flex-direction: column;
2428
2389
  justify-content: center;
@@ -2430,7 +2391,7 @@ exports.StyledText2Rows = styled6__default.default.div`
2430
2391
  `;
2431
2392
  var List = (_a) => {
2432
2393
  var _b = _a, { children, leftSource, rightSource } = _b, rest = __objRest(_b, ["children", "leftSource", "rightSource"]);
2433
- const LeftSourceClone = leftSource ? React3__namespace.default.cloneElement(leftSource, __spreadValues({}, rest)) : leftSource;
2394
+ const LeftSourceClone = leftSource ? React2__namespace.default.cloneElement(leftSource, __spreadValues({}, rest)) : leftSource;
2434
2395
  if (!children && rightSource) {
2435
2396
  throw new Error("RightSource\uB294 children\uC774 \uD544\uC218\uB85C \uD3EC\uD568\uB418\uC5B4\uC57C\uD569\uB2C8\uB2E4.");
2436
2397
  }
@@ -2532,7 +2493,7 @@ var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
2532
2493
  `;
2533
2494
  }
2534
2495
  };
2535
- var StyledTag = styled6__default.default.div`
2496
+ var StyledTag = styled5__default.default.div`
2536
2497
  display: flex;
2537
2498
  align-items: center;
2538
2499
  flex-direction: row;
@@ -2575,7 +2536,7 @@ exports.TagSizeVariants = {
2575
2536
  S: "S",
2576
2537
  M: "M"
2577
2538
  };
2578
- var StyledInput = styled6__default.default.input`
2539
+ var StyledInput = styled5__default.default.input`
2579
2540
  padding: 4px 0 4px 12px;
2580
2541
  background-color: transparent;
2581
2542
  width: 100%;
@@ -2596,13 +2557,13 @@ var StyledInput = styled6__default.default.input`
2596
2557
  -moz-appearance: textfield;
2597
2558
  }
2598
2559
  `;
2599
- var RightElementWrapper = styled6__default.default.div`
2560
+ var RightElementWrapper = styled5__default.default.div`
2600
2561
  display: flex;
2601
2562
  flex-direction: row;
2602
2563
  align-items: center;
2603
2564
  padding: 0 8px 0 0;
2604
2565
  `;
2605
- var Wrapper = styled6__default.default.div`
2566
+ var Wrapper = styled5__default.default.div`
2606
2567
  display: flex;
2607
2568
  width: 100%;
2608
2569
  justify-content: flex-end;
@@ -2617,7 +2578,7 @@ var TextCounter = ({ currentLength, maxLength }) => {
2617
2578
  ] });
2618
2579
  };
2619
2580
  var TextCounter_default = TextCounter;
2620
- React3.createContext({
2581
+ React2.createContext({
2621
2582
  domain: "SHOPL",
2622
2583
  handleToggleTheme: () => {
2623
2584
  }
@@ -2630,7 +2591,7 @@ var assetFunction = (iconName, domainProps) => {
2630
2591
  const ShoplIcon = ShoplAssets__namespace[iconName];
2631
2592
  return domain === "hada" ? HadaIcon : ShoplIcon;
2632
2593
  };
2633
- var Input = React3.forwardRef(
2594
+ var Input = React2.forwardRef(
2634
2595
  (_a, ref) => {
2635
2596
  var _b = _a, {
2636
2597
  onFocus,
@@ -2663,20 +2624,20 @@ var Input = React3.forwardRef(
2663
2624
  "className",
2664
2625
  "width"
2665
2626
  ]);
2666
- const [text, setText] = React3.useState("");
2667
- const [isFocused, setIsFocused] = React3.useState(false);
2668
- const [type, setType] = React3.useState("text");
2669
- const [isHovered, setIsHovered] = React3.useState(false);
2670
- const uniqueId = React3.useId();
2671
- const inputRef = React3__namespace.default.useRef(null);
2627
+ const [text, setText] = React2.useState("");
2628
+ const [isFocused, setIsFocused] = React2.useState(false);
2629
+ const [type, setType] = React2.useState("text");
2630
+ const [isHovered, setIsHovered] = React2.useState(false);
2631
+ const uniqueId = React2.useId();
2632
+ const inputRef = React2__namespace.default.useRef(null);
2672
2633
  const refs = useMergeRefs(ref, inputRef);
2673
- const convertToString = React3.useCallback((value2) => {
2634
+ const convertToString = React2.useCallback((value2) => {
2674
2635
  if (typeof value2 !== "number") {
2675
2636
  return typeof value2 === "string" ? value2 : value2.join("");
2676
2637
  }
2677
2638
  return String(value2);
2678
2639
  }, []);
2679
- const sliceText = React3.useCallback(
2640
+ const sliceText = React2.useCallback(
2680
2641
  (value2) => {
2681
2642
  if (maxLength && value2.length > maxLength) {
2682
2643
  return value2.slice(0, maxLength);
@@ -2685,7 +2646,7 @@ var Input = React3.forwardRef(
2685
2646
  },
2686
2647
  [maxLength]
2687
2648
  );
2688
- const limitRange = React3.useCallback(
2649
+ const limitRange = React2.useCallback(
2689
2650
  (value2) => {
2690
2651
  if (min && Number(value2) < min) {
2691
2652
  return String(min);
@@ -2742,14 +2703,14 @@ var Input = React3.forwardRef(
2742
2703
  setType("password");
2743
2704
  }
2744
2705
  };
2745
- React3.useEffect(() => {
2706
+ React2.useEffect(() => {
2746
2707
  if (defaultValue !== void 0) {
2747
2708
  const convertString = convertToString(defaultValue);
2748
2709
  const slicedText = sliceText(convertString);
2749
2710
  setText(slicedText);
2750
2711
  }
2751
2712
  }, [convertToString, defaultValue, maxLength, sliceText]);
2752
- React3.useEffect(() => {
2713
+ React2.useEffect(() => {
2753
2714
  var _a2;
2754
2715
  if (value !== void 0) {
2755
2716
  const convertString = convertToString(value);
@@ -2758,7 +2719,7 @@ var Input = React3.forwardRef(
2758
2719
  setText(slicedText);
2759
2720
  }
2760
2721
  }, [convertToString, maxLength, sliceText, value]);
2761
- React3.useEffect(() => {
2722
+ React2.useEffect(() => {
2762
2723
  setType(initialType);
2763
2724
  }, [initialType]);
2764
2725
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2806,7 +2767,7 @@ var Input = React3.forwardRef(
2806
2767
  }
2807
2768
  );
2808
2769
  exports.Input = Input;
2809
- exports.StyledInputButton = styled6__default.default.div`
2770
+ exports.StyledInputButton = styled5__default.default.div`
2810
2771
  display: flex;
2811
2772
  flex-direction: row;
2812
2773
  align-items: center;
@@ -2821,7 +2782,7 @@ exports.StyledInputButton = styled6__default.default.div`
2821
2782
  cursor: not-allowed;
2822
2783
  `}
2823
2784
  `;
2824
- exports.StyledInputButtonContent = styled6__default.default.input`
2785
+ exports.StyledInputButtonContent = styled5__default.default.input`
2825
2786
  display: flex;
2826
2787
  width: 100%;
2827
2788
  border: none;
@@ -2831,12 +2792,12 @@ exports.StyledInputButtonContent = styled6__default.default.input`
2831
2792
  color: ${exports.colorTokens.neutral350};
2832
2793
  }
2833
2794
  `;
2834
- var InputButton = React3.forwardRef(
2795
+ var InputButton = React2.forwardRef(
2835
2796
  (_a, ref) => {
2836
2797
  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"]);
2837
- const [text, setText] = React3.useState("");
2838
- const [isHovered, setIsHovered] = React3.useState(false);
2839
- const convertToString = React3.useCallback((value2) => {
2798
+ const [text, setText] = React2.useState("");
2799
+ const [isHovered, setIsHovered] = React2.useState(false);
2800
+ const convertToString = React2.useCallback((value2) => {
2840
2801
  if (typeof value2 !== "number") {
2841
2802
  return typeof value2 === "string" ? value2 : value2.join("");
2842
2803
  }
@@ -2861,19 +2822,19 @@ var InputButton = React3.forwardRef(
2861
2822
  const handleOnMouseLeave = () => {
2862
2823
  setIsHovered(false);
2863
2824
  };
2864
- React3.useEffect(() => {
2825
+ React2.useEffect(() => {
2865
2826
  if (defaultValue) {
2866
2827
  const convertString = convertToString(defaultValue);
2867
2828
  setText(convertString);
2868
2829
  }
2869
2830
  }, [convertToString, defaultValue]);
2870
- React3.useEffect(() => {
2831
+ React2.useEffect(() => {
2871
2832
  if (value) {
2872
2833
  const convertString = convertToString(value);
2873
2834
  setText(convertString);
2874
2835
  }
2875
2836
  }, [convertToString, value]);
2876
- React3.useEffect(() => {
2837
+ React2.useEffect(() => {
2877
2838
  onChange && onChange(convertToString(value != null ? value : ""));
2878
2839
  }, [convertToString, onChange, value]);
2879
2840
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2898,7 +2859,7 @@ var InputButton = React3.forwardRef(
2898
2859
  }
2899
2860
  );
2900
2861
  exports.InputButton = InputButton;
2901
- var BottomElementWrapper = styled6__default.default.div`
2862
+ var BottomElementWrapper = styled5__default.default.div`
2902
2863
  display: flex;
2903
2864
  width: 100%;
2904
2865
  flex-direction: row;
@@ -2906,7 +2867,7 @@ var BottomElementWrapper = styled6__default.default.div`
2906
2867
  gap: 8px;
2907
2868
  background-color: ${exports.colorTokens.neutral0};
2908
2869
  `;
2909
- var StyledTextarea = styled6__default.default.textarea`
2870
+ var StyledTextarea = styled5__default.default.textarea`
2910
2871
  padding: 8px 12px 0 12px;
2911
2872
  background-color: transparent;
2912
2873
  resize: none;
@@ -2919,7 +2880,7 @@ var StyledTextarea = styled6__default.default.textarea`
2919
2880
  color: ${exports.colorTokens.neutral350};
2920
2881
  }
2921
2882
  `;
2922
- var TextArea = React3.forwardRef(
2883
+ var TextArea = React2.forwardRef(
2923
2884
  (_a, ref) => {
2924
2885
  var _b = _a, {
2925
2886
  name,
@@ -2950,9 +2911,9 @@ var TextArea = React3.forwardRef(
2950
2911
  "width",
2951
2912
  "className"
2952
2913
  ]);
2953
- const [text, setText] = React3.useState("");
2954
- const [isFocused, setIsFocused] = React3.useState(false);
2955
- const [isHovered, setIsHovered] = React3.useState(false);
2914
+ const [text, setText] = React2.useState("");
2915
+ const [isFocused, setIsFocused] = React2.useState(false);
2916
+ const [isHovered, setIsHovered] = React2.useState(false);
2956
2917
  const handleOnMouseEnter = () => {
2957
2918
  setIsHovered(true);
2958
2919
  };
@@ -2977,7 +2938,7 @@ var TextArea = React3.forwardRef(
2977
2938
  }
2978
2939
  return String(value2);
2979
2940
  };
2980
- React3.useEffect(() => {
2941
+ React2.useEffect(() => {
2981
2942
  if (defaultValue) {
2982
2943
  const convertString = convertToString(defaultValue);
2983
2944
  if (maxLength && convertString.length > maxLength) {
@@ -2986,7 +2947,7 @@ var TextArea = React3.forwardRef(
2986
2947
  setText(convertString);
2987
2948
  }
2988
2949
  }, [defaultValue, maxLength]);
2989
- React3.useEffect(() => {
2950
+ React2.useEffect(() => {
2990
2951
  if (value) {
2991
2952
  const convertString = convertToString(value);
2992
2953
  if (maxLength && convertString.length > maxLength) {
@@ -2995,7 +2956,7 @@ var TextArea = React3.forwardRef(
2995
2956
  setText(convertToString(value));
2996
2957
  }
2997
2958
  }, [maxLength, value]);
2998
- const uniqueId = React3.useId();
2959
+ const uniqueId = React2.useId();
2999
2960
  return /* @__PURE__ */ jsxRuntime.jsxs(
3000
2961
  InputWrapper,
3001
2962
  {
@@ -3034,7 +2995,7 @@ var TextArea = React3.forwardRef(
3034
2995
  }
3035
2996
  );
3036
2997
  exports.TextArea = TextArea;
3037
- var StyledSelectInputButton = styled6__default.default.div`
2998
+ var StyledSelectInputButton = styled5__default.default.div`
3038
2999
  display: flex;
3039
3000
  flex-direction: row;
3040
3001
  align-items: center;
@@ -3075,7 +3036,7 @@ var SelectInputButton = (_a) => {
3075
3036
  "width",
3076
3037
  "rightSource"
3077
3038
  ]);
3078
- const [isHovered, setIsHovered] = React3.useState(false);
3039
+ const [isHovered, setIsHovered] = React2.useState(false);
3079
3040
  const handleOnClick = (e) => {
3080
3041
  e.preventDefault();
3081
3042
  e.stopPropagation();
@@ -3127,6 +3088,50 @@ var SelectInputButton = (_a) => {
3127
3088
  );
3128
3089
  };
3129
3090
  exports.SelectInputButton = SelectInputButton;
3091
+ var SpaceMarginWrapper = styled5__default.default(framerMotion.motion.div)`
3092
+ position: relative;
3093
+ display: flex;
3094
+ align-items: center;
3095
+ justify-content: center;
3096
+ flex-grow: 1;
3097
+ z-index: 101;
3098
+ padding: 32px 20px;
3099
+ width: 100%;
3100
+ height: 100%;
3101
+ `;
3102
+ var ModalPortal = () => {
3103
+ const modal = React2.useContext(exports.ModalContext);
3104
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
3105
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: modal.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(BackDrop_default, { children: /* @__PURE__ */ jsxRuntime.jsx(SpaceMarginWrapper, { children: item.component }) }, index)) }),
3106
+ document.body
3107
+ ) });
3108
+ };
3109
+ exports.ModalProvider = ModalPortal;
3110
+ var PopperPortal2 = () => {
3111
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
3112
+ /* @__PURE__ */ jsxRuntime.jsx(
3113
+ "div",
3114
+ {
3115
+ id: "popper-portal-key",
3116
+ style: {
3117
+ zIndex: 20001,
3118
+ position: "relative"
3119
+ }
3120
+ }
3121
+ ),
3122
+ document.body
3123
+ ) });
3124
+ };
3125
+ var PopperPortal_default = PopperPortal2;
3126
+ var ShoplflowProvider = ({ children, domain = "SHOPL" }) => {
3127
+ exports.useDomain(domain);
3128
+ return /* @__PURE__ */ jsxRuntime.jsxs(ModalProvider_default, { children: [
3129
+ /* @__PURE__ */ jsxRuntime.jsx(PopperPortal_default, {}),
3130
+ /* @__PURE__ */ jsxRuntime.jsx(exports.ModalProvider, {}),
3131
+ children
3132
+ ] });
3133
+ };
3134
+ exports.ShoplflowProvider = ShoplflowProvider;
3130
3135
  /*! Bundled license information:
3131
3136
 
3132
3137
  classnames/index.js: