@remember-web/primitive 0.1.18 → 0.1.19

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.
Files changed (56) hide show
  1. package/dist/src/Buttons/Button/index.cjs.js +5 -6
  2. package/dist/src/Buttons/Button/index.cjs.js.map +1 -1
  3. package/dist/src/Buttons/Button/index.d.ts +3 -8
  4. package/dist/src/Buttons/Button/index.d.ts.map +1 -1
  5. package/dist/src/Buttons/Button/index.esm.js +3 -4
  6. package/dist/src/Buttons/Button/index.esm.js.map +1 -1
  7. package/dist/src/Buttons/Button/styles.cjs.js +1 -1
  8. package/dist/src/Buttons/Button/styles.cjs.js.map +1 -1
  9. package/dist/src/Buttons/Button/styles.d.ts +1 -2
  10. package/dist/src/Buttons/Button/styles.d.ts.map +1 -1
  11. package/dist/src/Buttons/Button/styles.esm.js +1 -1
  12. package/dist/src/Buttons/Button/styles.esm.js.map +1 -1
  13. package/dist/src/Buttons/Button/types.d.ts +4 -6
  14. package/dist/src/Buttons/Button/types.d.ts.map +1 -1
  15. package/dist/src/Common/Flex/index.cjs.js +8 -7
  16. package/dist/src/Common/Flex/index.cjs.js.map +1 -1
  17. package/dist/src/Common/Flex/index.d.ts +5 -4
  18. package/dist/src/Common/Flex/index.d.ts.map +1 -1
  19. package/dist/src/Common/Flex/index.esm.js +8 -7
  20. package/dist/src/Common/Flex/index.esm.js.map +1 -1
  21. package/dist/src/Common/Grid/index.cjs.js +1 -0
  22. package/dist/src/Common/Grid/index.cjs.js.map +1 -1
  23. package/dist/src/Common/Grid/index.d.ts +1 -0
  24. package/dist/src/Common/Grid/index.d.ts.map +1 -1
  25. package/dist/src/Common/Grid/index.esm.js +1 -0
  26. package/dist/src/Common/Grid/index.esm.js.map +1 -1
  27. package/dist/src/Common/Typography/index.cjs.js +4 -7
  28. package/dist/src/Common/Typography/index.cjs.js.map +1 -1
  29. package/dist/src/Common/Typography/index.d.ts +6 -9
  30. package/dist/src/Common/Typography/index.d.ts.map +1 -1
  31. package/dist/src/Common/Typography/index.esm.js +4 -7
  32. package/dist/src/Common/Typography/index.esm.js.map +1 -1
  33. package/dist/src/Common/index.d.ts +1 -1
  34. package/dist/src/Common/index.d.ts.map +1 -1
  35. package/dist/src/Modals/Dialog/index.cjs.js +1 -1
  36. package/dist/src/Modals/Dialog/index.cjs.js.map +1 -1
  37. package/dist/src/Modals/Dialog/index.esm.js +1 -1
  38. package/dist/src/Modals/Dialog/index.esm.js.map +1 -1
  39. package/dist/src/Paginations/CompactPagination/index.cjs.js +1 -1
  40. package/dist/src/Paginations/CompactPagination/index.cjs.js.map +1 -1
  41. package/dist/src/Paginations/CompactPagination/index.esm.js +1 -1
  42. package/dist/src/Paginations/CompactPagination/index.esm.js.map +1 -1
  43. package/dist/src/index.cjs.js +6 -6
  44. package/dist/src/index.esm.js +1 -1
  45. package/package.json +2 -2
  46. package/src/Buttons/Button/Button.stories.tsx +1 -1
  47. package/src/Buttons/Button/index.tsx +32 -39
  48. package/src/Buttons/Button/styles.ts +2 -3
  49. package/src/Buttons/Button/types.ts +6 -12
  50. package/src/Common/Divider/Divider.stories.tsx +1 -1
  51. package/src/Common/Flex/index.tsx +29 -28
  52. package/src/Common/Grid/index.tsx +1 -0
  53. package/src/Common/Typography/index.tsx +24 -37
  54. package/src/Common/index.ts +1 -1
  55. package/src/Modals/Dialog/index.tsx +1 -1
  56. package/src/Paginations/CompactPagination/index.tsx +1 -1
@@ -7,7 +7,7 @@ var react = require('react');
7
7
  require('../../Common/Divider/index.cjs.js');
8
8
  require('../../Common/Flex/index.cjs.js');
9
9
  require('../../Common/Grid/index.cjs.js');
10
- var index$1 = require('../../Common/Spinner/index.cjs.js');
10
+ var index = require('../../Common/Spinner/index.cjs.js');
11
11
  require('../../Common/Typography/styles.cjs.js');
12
12
  var jsxRuntime = require('react/jsx-runtime');
13
13
  var _const = require('./const.cjs.js');
@@ -21,7 +21,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWith
21
21
  var _excluded = ["children", "color", "size", "variant", "layout", "isLoading", "filled", "icon", "iconPosition"];
22
22
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
23
23
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24
- var Button = function Button(_ref, ref) {
24
+ var Button = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
25
25
  var children = _ref.children,
26
26
  color = _ref.color,
27
27
  _ref$size = _ref.size,
@@ -49,14 +49,13 @@ var Button = function Button(_ref, ref) {
49
49
  "aria-busy": isLoading,
50
50
  ref: ref
51
51
  }, props), {}, {
52
- children: isLoading ? /*#__PURE__*/jsxRuntime.jsx(index$1.Spinner, {
52
+ children: isLoading ? /*#__PURE__*/jsxRuntime.jsx(index.Spinner, {
53
53
  size: _const.SPINNER_SIZE_MAP[size]
54
54
  }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
55
55
  children: [iconPosition === 'left' && icon, children, iconPosition === 'right' && icon]
56
56
  })
57
57
  }));
58
- };
59
- var index = /*#__PURE__*/react.forwardRef(Button);
58
+ });
60
59
 
61
- module.exports = index;
60
+ module.exports = Button;
62
61
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/Buttons/Button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ElementType, ForwardRefRenderFunction } from 'react';\nimport { forwardRef } from 'react';\nimport type { As } from '@remember-web/shared';\n\nimport { Spinner } from '@/Common';\n\nimport { SPINNER_SIZE_MAP } from './const';\nimport { StyledButton } from './styles';\nimport type { ButtonProps } from './types';\n\nconst Button: ForwardRefRenderFunction<\n HTMLButtonElement,\n ButtonProps<'button'> & As<ElementType>\n> = (\n {\n children,\n color,\n size = 'small',\n variant = 'primary',\n layout = 'block',\n isLoading = false,\n filled = variant === 'primary',\n icon,\n iconPosition = 'left',\n ...props\n },\n ref\n) => (\n <StyledButton\n $color={color}\n $size={size}\n $variant={variant}\n $layout={layout}\n $isLoading={isLoading}\n $filled={filled}\n aria-live=\"polite\"\n aria-busy={isLoading}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Spinner size={SPINNER_SIZE_MAP[size]} />\n ) : (\n <>\n {iconPosition === 'left' && icon}\n {children}\n {iconPosition === 'right' && icon}\n </>\n )}\n </StyledButton>\n);\n\ntype ButtonComponentWithRef = <T extends ElementType = 'button'>(\n props: { as?: T | null } & ButtonProps<T> & {\n ref?: React.ComponentPropsWithRef<T>['ref'];\n }\n) => React.ReactElement | null;\n\nexport default forwardRef(Button) as ButtonComponentWithRef;\n"],"names":["size","variant","layout","isLoading","filled","iconPosition","props","$color","$size","$variant","$layout","$isLoading","$filled","ref","children"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAYb;AAgBK;;;AATDA;;AACAC;;AACAC;;AACAC;;AACAC;;;AAEAC;AACGC;AAAK;AAKRC;AACAC;AACAC;AACAC;AACAC;AACAC;AACA;AACA;AACAC;AAAS;AACAC;;AAG+B;AAEtCA;;AAKD;AACY;AASjB;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Buttons/Button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport { type PolymorphicComponent } from 'styled-components';\n\nimport { Spinner } from '@/Common';\n\nimport { SPINNER_SIZE_MAP } from './const';\nimport { StyledButton } from './styles';\nimport type { ButtonProps } from './types';\n\nconst Button = forwardRef(function (\n {\n children,\n color,\n size = 'small',\n variant = 'primary',\n layout = 'block',\n isLoading = false,\n filled = variant === 'primary',\n icon,\n iconPosition = 'left',\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement | null>\n) {\n return (\n <StyledButton\n $color={color}\n $size={size}\n $variant={variant}\n $layout={layout}\n $isLoading={isLoading}\n $filled={filled}\n aria-live=\"polite\"\n aria-busy={isLoading}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Spinner size={SPINNER_SIZE_MAP[size]} />\n ) : (\n <>\n {iconPosition === 'left' && icon}\n {children}\n {iconPosition === 'right' && icon}\n </>\n )}\n </StyledButton>\n );\n}) as PolymorphicComponent<'web', ButtonProps>;\n\nexport default Button;\n"],"names":["Button","size","variant","layout","isLoading","filled","iconPosition","props","$color","$size","$variant","$layout","$isLoading","$filled","ref","children"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAYPA;AAcJ;;;AAVEC;;AACAC;;AACAC;;AACAC;;AACAC;;;AAEAC;AACGC;AAIL;AAEIC;AACAC;AACAC;AACAC;AACAC;AACAC;AACA;AACA;AACAC;AAAS;AACAC;;AAG+B;AAEtCA;;AAKD;AAGP;;"}
@@ -1,10 +1,5 @@
1
- import type { ElementType } from 'react';
1
+ import { type PolymorphicComponent } from 'styled-components';
2
2
  import type { ButtonProps } from './types';
3
- type ButtonComponentWithRef = <T extends ElementType = 'button'>(props: {
4
- as?: T | null;
5
- } & ButtonProps<T> & {
6
- ref?: React.ComponentPropsWithRef<T>['ref'];
7
- }) => React.ReactElement | null;
8
- declare const _default: ButtonComponentWithRef;
9
- export default _default;
3
+ declare const Button: PolymorphicComponent<"web", ButtonProps>;
4
+ export default Button;
10
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Buttons/Button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,OAAO,CAAC;AAQnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA4C3C,KAAK,sBAAsB,GAAG,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,EAC7D,KAAK,EAAE;IAAE,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;CAC7C,KACA,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;;AAE/B,wBAA4D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Buttons/Button/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAM9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,MAAM,0CAuCkC,CAAC;AAE/C,eAAe,MAAM,CAAC"}
@@ -14,7 +14,7 @@ import { StyledButton } from './styles.esm.js';
14
14
  var _excluded = ["children", "color", "size", "variant", "layout", "isLoading", "filled", "icon", "iconPosition"];
15
15
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
16
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- var Button = function Button(_ref, ref) {
17
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
18
  var children = _ref.children,
19
19
  color = _ref.color,
20
20
  _ref$size = _ref.size,
@@ -48,8 +48,7 @@ var Button = function Button(_ref, ref) {
48
48
  children: [iconPosition === 'left' && icon, children, iconPosition === 'right' && icon]
49
49
  })
50
50
  }));
51
- };
52
- var index = /*#__PURE__*/forwardRef(Button);
51
+ });
53
52
 
54
- export { index as default };
53
+ export { Button as default };
55
54
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/Buttons/Button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ElementType, ForwardRefRenderFunction } from 'react';\nimport { forwardRef } from 'react';\nimport type { As } from '@remember-web/shared';\n\nimport { Spinner } from '@/Common';\n\nimport { SPINNER_SIZE_MAP } from './const';\nimport { StyledButton } from './styles';\nimport type { ButtonProps } from './types';\n\nconst Button: ForwardRefRenderFunction<\n HTMLButtonElement,\n ButtonProps<'button'> & As<ElementType>\n> = (\n {\n children,\n color,\n size = 'small',\n variant = 'primary',\n layout = 'block',\n isLoading = false,\n filled = variant === 'primary',\n icon,\n iconPosition = 'left',\n ...props\n },\n ref\n) => (\n <StyledButton\n $color={color}\n $size={size}\n $variant={variant}\n $layout={layout}\n $isLoading={isLoading}\n $filled={filled}\n aria-live=\"polite\"\n aria-busy={isLoading}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Spinner size={SPINNER_SIZE_MAP[size]} />\n ) : (\n <>\n {iconPosition === 'left' && icon}\n {children}\n {iconPosition === 'right' && icon}\n </>\n )}\n </StyledButton>\n);\n\ntype ButtonComponentWithRef = <T extends ElementType = 'button'>(\n props: { as?: T | null } & ButtonProps<T> & {\n ref?: React.ComponentPropsWithRef<T>['ref'];\n }\n) => React.ReactElement | null;\n\nexport default forwardRef(Button) as ButtonComponentWithRef;\n"],"names":["size","variant","layout","isLoading","filled","iconPosition","props","$color","$size","$variant","$layout","$isLoading","$filled","ref","children"],"mappings":";;;;;;;;;;;;;AAAa;AAAA;AAAA;AAYb;AAgBK;;;AATDA;;AACAC;;AACAC;;AACAC;;AACAC;;;AAEAC;AACGC;AAAK;AAKRC;AACAC;AACAC;AACAC;AACAC;AACAC;AACA;AACA;AACAC;AAAS;AACAC;;AAG+B;AAEtCA;;AAKD;AACY;AASjB;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Buttons/Button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport { type PolymorphicComponent } from 'styled-components';\n\nimport { Spinner } from '@/Common';\n\nimport { SPINNER_SIZE_MAP } from './const';\nimport { StyledButton } from './styles';\nimport type { ButtonProps } from './types';\n\nconst Button = forwardRef(function (\n {\n children,\n color,\n size = 'small',\n variant = 'primary',\n layout = 'block',\n isLoading = false,\n filled = variant === 'primary',\n icon,\n iconPosition = 'left',\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement | null>\n) {\n return (\n <StyledButton\n $color={color}\n $size={size}\n $variant={variant}\n $layout={layout}\n $isLoading={isLoading}\n $filled={filled}\n aria-live=\"polite\"\n aria-busy={isLoading}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Spinner size={SPINNER_SIZE_MAP[size]} />\n ) : (\n <>\n {iconPosition === 'left' && icon}\n {children}\n {iconPosition === 'right' && icon}\n </>\n )}\n </StyledButton>\n );\n}) as PolymorphicComponent<'web', ButtonProps>;\n\nexport default Button;\n"],"names":["Button","size","variant","layout","isLoading","filled","iconPosition","props","$color","$size","$variant","$layout","$isLoading","$filled","ref","children"],"mappings":";;;;;;;;;;;;;AAAa;AAAA;AAAA;AAYPA;AAcJ;;;AAVEC;;AACAC;;AACAC;;AACAC;;AACAC;;;AAEAC;AACGC;AAIL;AAEIC;AACAC;AACAC;AACAC;AACAC;AACAC;AACA;AACA;AACAC;AAAS;AACAC;;AAG+B;AAEtCA;;AAKD;AAGP;;"}
@@ -3,8 +3,8 @@
3
3
 
4
4
  var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
5
5
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
6
- var styled = require('styled-components');
7
6
  var mixin = require('@remember-web/mixin');
7
+ var styled = require('styled-components');
8
8
  var _const = require('./const.cjs.js');
9
9
 
10
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Buttons/Button/styles.ts"],"sourcesContent":["'use client';\n\nimport type { DataAttributes } from 'styled-components';\nimport styled, { css } from 'styled-components';\nimport {\n bg100,\n disabled,\n getTypographyStyles,\n primary100,\n primary200,\n} from '@remember-web/mixin';\n\nimport { BUTTON_COLORS, BUTTON_SIZES, ICON_GAP_MAP } from './const';\nimport type { ButtonStyleProps } from './types';\n\nexport const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(\n ({ $size, $layout, $color, ...props }) => [\n // 공용 스타일\n css`\n all: unset;\n appearance: none;\n\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n\n display: ${$layout === 'inline' ? 'inline-flex' : 'flex'};\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n gap: ${ICON_GAP_MAP[$size]};\n\n ${getTypographyStyles(BUTTON_SIZES[$size].typography)}\n text-align: center;\n\n width: fit-content;\n ${$layout === 'fullBlock' && `width: 100%;`}\n min-width: ${BUTTON_SIZES[$size].minWidth};\n height: ${BUTTON_SIZES[$size].height};\n padding: ${BUTTON_SIZES[$size].padding};\n border-radius: 4px;\n\n color: ${(props.$variant.startsWith('outline') ? $color : null) ??\n BUTTON_COLORS[props.$variant].color};\n\n &:focus-visible:not(:disabled) {\n outline: 2px solid ${primary100};\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n\n &::before {\n display: none;\n }\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${primary200};\n opacity: 0;\n pointer-events: none;\n\n transition: opacity 0.2s;\n }\n @media (hover: hover) {\n &:hover::before {\n opacity: 0.1;\n }\n }\n &:active::before {\n opacity: 0.2;\n }\n `,\n\n // primary 스타일\n props.$variant === 'primary' &&\n css`\n background-color: ${$color ??\n BUTTON_COLORS[props.$variant].backgroundColor};\n &:disabled {\n background-color: ${disabled};\n }\n &::before {\n background-color: ${primary200};\n }\n `,\n\n // outline 스타일\n props.$variant === 'outline' &&\n css`\n background-color: ${props.$filled\n ? bg100\n : BUTTON_COLORS[props.$variant].backgroundColor};\n border: 1px solid ${$color ?? BUTTON_COLORS[props.$variant].borderColor};\n &:disabled {\n border-color: ${disabled};\n color: ${disabled};\n }\n &::before {\n background-color: ${$color ?? primary100};\n }\n `,\n ]\n);\n"],"names":["props","css"],"mappings":";;;;;;;;;;;;;;;AAAa;AAAA;AAeN;AACL;AAAA;;;AAA8BA;AAAK;AAEjCC;AAmEA;AACAD;AAYA;;AAeD;;"}
1
+ {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Buttons/Button/styles.ts"],"sourcesContent":["'use client';\n\nimport {\n bg100,\n disabled,\n getTypographyStyles,\n primary100,\n primary200,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\n\nimport { BUTTON_COLORS, BUTTON_SIZES, ICON_GAP_MAP } from './const';\nimport type { ButtonStyleProps } from './types';\n\nexport const StyledButton = styled.button<ButtonStyleProps>(\n ({ $size, $layout, $color, ...props }) => [\n // 공용 스타일\n css`\n all: unset;\n appearance: none;\n\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n\n display: ${$layout === 'inline' ? 'inline-flex' : 'flex'};\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n gap: ${ICON_GAP_MAP[$size]};\n\n ${getTypographyStyles(BUTTON_SIZES[$size].typography)}\n text-align: center;\n\n width: fit-content;\n ${$layout === 'fullBlock' && `width: 100%;`}\n min-width: ${BUTTON_SIZES[$size].minWidth};\n height: ${BUTTON_SIZES[$size].height};\n padding: ${BUTTON_SIZES[$size].padding};\n border-radius: 4px;\n\n color: ${(props.$variant.startsWith('outline') ? $color : null) ??\n BUTTON_COLORS[props.$variant].color};\n\n &:focus-visible:not(:disabled) {\n outline: 2px solid ${primary100};\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n\n &::before {\n display: none;\n }\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${primary200};\n opacity: 0;\n pointer-events: none;\n\n transition: opacity 0.2s;\n }\n @media (hover: hover) {\n &:hover::before {\n opacity: 0.1;\n }\n }\n &:active::before {\n opacity: 0.2;\n }\n `,\n\n // primary 스타일\n props.$variant === 'primary' &&\n css`\n background-color: ${$color ??\n BUTTON_COLORS[props.$variant].backgroundColor};\n &:disabled {\n background-color: ${disabled};\n }\n &::before {\n background-color: ${primary200};\n }\n `,\n\n // outline 스타일\n props.$variant === 'outline' &&\n css`\n background-color: ${props.$filled\n ? bg100\n : BUTTON_COLORS[props.$variant].backgroundColor};\n border: 1px solid ${$color ?? BUTTON_COLORS[props.$variant].borderColor};\n &:disabled {\n border-color: ${disabled};\n color: ${disabled};\n }\n &::before {\n background-color: ${$color ?? primary100};\n }\n `,\n ]\n);\n"],"names":["props","css"],"mappings":";;;;;;;;;;;;;;;AAAa;AAAA;AAcN;AACL;AAAA;;;AAA8BA;AAAK;AAEjCC;AAmEA;AACAD;AAYA;;AAeD;;"}
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import type { DataAttributes } from 'styled-components';
3
2
  import type { ButtonStyleProps } from './types';
4
- export declare const StyledButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ButtonStyleProps & DataAttributes>>;
3
+ export declare const StyledButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ButtonStyleProps>>;
5
4
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Buttons/Button/styles.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,YAAY,0PAmGxB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Buttons/Button/styles.ts"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,YAAY,yOAmGxB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
- import styled, { css } from 'styled-components';
5
4
  import { getTypographyStyles, primary100, primary200, disabled, bg100 } from '@remember-web/mixin';
5
+ import styled, { css } from 'styled-components';
6
6
  import { ICON_GAP_MAP, BUTTON_SIZES, BUTTON_COLORS } from './const.esm.js';
7
7
 
8
8
  var _templateObject, _templateObject2, _templateObject3;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.esm.js","sources":["../../../../src/Buttons/Button/styles.ts"],"sourcesContent":["'use client';\n\nimport type { DataAttributes } from 'styled-components';\nimport styled, { css } from 'styled-components';\nimport {\n bg100,\n disabled,\n getTypographyStyles,\n primary100,\n primary200,\n} from '@remember-web/mixin';\n\nimport { BUTTON_COLORS, BUTTON_SIZES, ICON_GAP_MAP } from './const';\nimport type { ButtonStyleProps } from './types';\n\nexport const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(\n ({ $size, $layout, $color, ...props }) => [\n // 공용 스타일\n css`\n all: unset;\n appearance: none;\n\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n\n display: ${$layout === 'inline' ? 'inline-flex' : 'flex'};\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n gap: ${ICON_GAP_MAP[$size]};\n\n ${getTypographyStyles(BUTTON_SIZES[$size].typography)}\n text-align: center;\n\n width: fit-content;\n ${$layout === 'fullBlock' && `width: 100%;`}\n min-width: ${BUTTON_SIZES[$size].minWidth};\n height: ${BUTTON_SIZES[$size].height};\n padding: ${BUTTON_SIZES[$size].padding};\n border-radius: 4px;\n\n color: ${(props.$variant.startsWith('outline') ? $color : null) ??\n BUTTON_COLORS[props.$variant].color};\n\n &:focus-visible:not(:disabled) {\n outline: 2px solid ${primary100};\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n\n &::before {\n display: none;\n }\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${primary200};\n opacity: 0;\n pointer-events: none;\n\n transition: opacity 0.2s;\n }\n @media (hover: hover) {\n &:hover::before {\n opacity: 0.1;\n }\n }\n &:active::before {\n opacity: 0.2;\n }\n `,\n\n // primary 스타일\n props.$variant === 'primary' &&\n css`\n background-color: ${$color ??\n BUTTON_COLORS[props.$variant].backgroundColor};\n &:disabled {\n background-color: ${disabled};\n }\n &::before {\n background-color: ${primary200};\n }\n `,\n\n // outline 스타일\n props.$variant === 'outline' &&\n css`\n background-color: ${props.$filled\n ? bg100\n : BUTTON_COLORS[props.$variant].backgroundColor};\n border: 1px solid ${$color ?? BUTTON_COLORS[props.$variant].borderColor};\n &:disabled {\n border-color: ${disabled};\n color: ${disabled};\n }\n &::before {\n background-color: ${$color ?? primary100};\n }\n `,\n ]\n);\n"],"names":["props","css"],"mappings":";;;;;;;AAAa;AAAA;AAeN;AACL;AAAA;;;AAA8BA;AAAK;AAEjCC;AAmEA;AACAD;AAYA;;AAeD;;"}
1
+ {"version":3,"file":"styles.esm.js","sources":["../../../../src/Buttons/Button/styles.ts"],"sourcesContent":["'use client';\n\nimport {\n bg100,\n disabled,\n getTypographyStyles,\n primary100,\n primary200,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\n\nimport { BUTTON_COLORS, BUTTON_SIZES, ICON_GAP_MAP } from './const';\nimport type { ButtonStyleProps } from './types';\n\nexport const StyledButton = styled.button<ButtonStyleProps>(\n ({ $size, $layout, $color, ...props }) => [\n // 공용 스타일\n css`\n all: unset;\n appearance: none;\n\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n\n display: ${$layout === 'inline' ? 'inline-flex' : 'flex'};\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n gap: ${ICON_GAP_MAP[$size]};\n\n ${getTypographyStyles(BUTTON_SIZES[$size].typography)}\n text-align: center;\n\n width: fit-content;\n ${$layout === 'fullBlock' && `width: 100%;`}\n min-width: ${BUTTON_SIZES[$size].minWidth};\n height: ${BUTTON_SIZES[$size].height};\n padding: ${BUTTON_SIZES[$size].padding};\n border-radius: 4px;\n\n color: ${(props.$variant.startsWith('outline') ? $color : null) ??\n BUTTON_COLORS[props.$variant].color};\n\n &:focus-visible:not(:disabled) {\n outline: 2px solid ${primary100};\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n\n &::before {\n display: none;\n }\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${primary200};\n opacity: 0;\n pointer-events: none;\n\n transition: opacity 0.2s;\n }\n @media (hover: hover) {\n &:hover::before {\n opacity: 0.1;\n }\n }\n &:active::before {\n opacity: 0.2;\n }\n `,\n\n // primary 스타일\n props.$variant === 'primary' &&\n css`\n background-color: ${$color ??\n BUTTON_COLORS[props.$variant].backgroundColor};\n &:disabled {\n background-color: ${disabled};\n }\n &::before {\n background-color: ${primary200};\n }\n `,\n\n // outline 스타일\n props.$variant === 'outline' &&\n css`\n background-color: ${props.$filled\n ? bg100\n : BUTTON_COLORS[props.$variant].backgroundColor};\n border: 1px solid ${$color ?? BUTTON_COLORS[props.$variant].borderColor};\n &:disabled {\n border-color: ${disabled};\n color: ${disabled};\n }\n &::before {\n background-color: ${$color ?? primary100};\n }\n `,\n ]\n);\n"],"names":["props","css"],"mappings":";;;;;;;AAAa;AAAA;AAcN;AACL;AAAA;;;AAA8BA;AAAK;AAEjCC;AAmEA;AACAD;AAYA;;AAeD;;"}
@@ -1,6 +1,6 @@
1
- import type { ElementType } from 'react';
2
- import type { ConvertTransientProps } from '@remember-web/shared';
3
1
  import type { ColorVariable } from '@remember-web/mixin';
2
+ import type { ConvertTransientProps } from '@remember-web/shared';
3
+ import type { ComponentProps } from 'react';
4
4
  export type ButtonSize = 'small' | 'medium' | 'large' | 'xLarge';
5
5
  export type ButtonVariant = 'primary' | 'outline';
6
6
  export type ButtonLayout = 'inline' | 'block' | 'fullBlock';
@@ -13,10 +13,8 @@ export interface ButtonStyleProps {
13
13
  $isLoading: boolean;
14
14
  $filled?: boolean;
15
15
  }
16
- type ConvertProps = ConvertTransientProps<Partial<ButtonStyleProps>>;
17
- export type ButtonProps<AsT extends ElementType> = Omit<React.ComponentPropsWithoutRef<AsT>, keyof ButtonStyleProps | 'icon' | 'iconPosition'> & ConvertProps & {
16
+ export type ButtonProps = ConvertTransientProps<Partial<ButtonStyleProps>> & {
18
17
  icon?: React.ReactNode;
19
18
  iconPosition?: 'left' | 'right';
20
- };
21
- export {};
19
+ } & ComponentProps<'button'>;
22
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/Buttons/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAE5D,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,KAAK,YAAY,GAAG,qBAAqB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAErE,MAAM,MAAM,WAAW,CAAC,GAAG,SAAS,WAAW,IAAI,IAAI,CACrD,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,EACnC,MAAM,gBAAgB,GAAG,MAAM,GAAG,cAAc,CACjD,GACC,YAAY,GAAG;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/Buttons/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAE5D,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC"}
@@ -4,6 +4,7 @@
4
4
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
5
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
6
6
  var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
7
+ var react = require('react');
7
8
  var styled = require('styled-components');
8
9
  var jsxRuntime = require('react/jsx-runtime');
9
10
 
@@ -14,7 +15,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWith
14
15
  var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefault(_taggedTemplateLiteral);
15
16
  var styled__default = /*#__PURE__*/_interopDefault(styled);
16
17
 
17
- var _excluded = ["as", "width", "height", "direction", "gap", "align", "justify", "wrap"];
18
+ var _excluded = ["width", "height", "direction", "gap", "align", "justify", "wrap"];
18
19
  var _templateObject;
19
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -45,9 +46,9 @@ var StyledFlex = styled__default.default.div(function (_ref) {
45
46
  * @prop {CSSProperties['flexDirection']} direction
46
47
  * @prop {CSSProperties['flexWrap']} wrap
47
48
  */
48
- var Flex = function Flex(_ref2) {
49
- var as = _ref2.as,
50
- width = _ref2.width,
49
+
50
+ var Flex = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {
51
+ var width = _ref2.width,
51
52
  height = _ref2.height,
52
53
  direction = _ref2.direction,
53
54
  gap = _ref2.gap,
@@ -56,7 +57,7 @@ var Flex = function Flex(_ref2) {
56
57
  wrap = _ref2.wrap,
57
58
  props = _objectWithoutProperties__default.default(_ref2, _excluded);
58
59
  return /*#__PURE__*/jsxRuntime.jsx(StyledFlex, _objectSpread({
59
- as: as,
60
+ ref: ref,
60
61
  $width: width,
61
62
  $height: height,
62
63
  $direction: direction,
@@ -65,7 +66,7 @@ var Flex = function Flex(_ref2) {
65
66
  $justify: justify,
66
67
  $wrap: wrap
67
68
  }, props));
68
- };
69
+ });
69
70
 
70
- exports.Flex = Flex;
71
+ module.exports = Flex;
71
72
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/Common/Flex/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ElementType, HTMLAttributes } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { ConvertTransientProps } from '@remember-web/shared';\n\nexport interface FlexProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType;\n $align?: CSSProperties['alignItems'];\n $direction?: CSSProperties['flexDirection'];\n $justify?: CSSProperties['justifyContent'];\n $wrap?: CSSProperties['flexWrap'];\n $gap?: string | number;\n $width?: string | number;\n $height?: string | number;\n}\n\nconst StyledFlex = styled.div<Partial<FlexProps>>(\n ({\n $align = 'center',\n $direction = 'row',\n $justify = 'center',\n $wrap = 'nowrap',\n $gap = 0,\n $width = 'auto',\n $height = 'auto',\n }) => css`\n box-sizing: border-box;\n display: flex;\n width: ${typeof $width === 'number' ? `${$width}px` : $width};\n height: ${typeof $height === 'number' ? `${$height}px` : $height};\n\n gap: ${typeof $gap === 'number' ? `${$gap}px` : $gap};\n align-items: ${$align};\n justify-content: ${$justify};\n flex-direction: ${$direction};\n flex-wrap: ${$wrap};\n `\n);\n\n/**\n * @prop {string} width\n * @prop {string} height\n * @prop {string} gap\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['flexDirection']} direction\n * @prop {CSSProperties['flexWrap']} wrap\n */\nexport const Flex = ({\n as,\n width,\n height,\n direction,\n gap,\n align,\n justify,\n wrap,\n ...props\n}: ConvertTransientProps<FlexProps>) => (\n <StyledFlex\n as={as}\n $width={width}\n $height={height}\n $direction={direction}\n $gap={gap}\n $align={align}\n $justify={justify}\n $wrap={wrap}\n {...props}\n />\n);\n"],"names":["$align","$direction","$justify","$wrap","$gap","$width","$height","props","as"],"mappings":";;;;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAAA;AAiBb;AACE;AACEA;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AAWkB;;AAItB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACiB;;;;;;;;AASZC;AAAK;AAGNC;AACAH;AACAC;AACAL;AACAG;AACAJ;AACAE;AACAC;;AAEA;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Common/Flex/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport type { CSSProperties, ComponentProps, ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport styled, { css } from 'styled-components';\n\nexport interface FlexStyledProps extends ComponentProps<'div'> {\n $align?: CSSProperties['alignItems'];\n $direction?: CSSProperties['flexDirection'];\n $justify?: CSSProperties['justifyContent'];\n $wrap?: CSSProperties['flexWrap'];\n $gap?: string | number;\n $width?: string | number;\n $height?: string | number;\n}\n\nconst StyledFlex = styled.div<Partial<FlexStyledProps>>(\n ({\n $align = 'center',\n $direction = 'row',\n $justify = 'center',\n $wrap = 'nowrap',\n $gap = 0,\n $width = 'auto',\n $height = 'auto',\n }) => css`\n box-sizing: border-box;\n display: flex;\n width: ${typeof $width === 'number' ? `${$width}px` : $width};\n height: ${typeof $height === 'number' ? `${$height}px` : $height};\n\n gap: ${typeof $gap === 'number' ? `${$gap}px` : $gap};\n align-items: ${$align};\n justify-content: ${$justify};\n flex-direction: ${$direction};\n flex-wrap: ${$wrap};\n `\n);\n\n/**\n * @prop {string} width\n * @prop {string} height\n * @prop {string} gap\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['flexDirection']} direction\n * @prop {CSSProperties['flexWrap']} wrap\n */\n\nconst Flex = forwardRef(function (\n { width, height, direction, gap, align, justify, wrap, ...props }: FlexProps,\n ref: ForwardedRef<HTMLDivElement | null>\n) {\n return (\n <StyledFlex\n ref={ref}\n $width={width}\n $height={height}\n $direction={direction}\n $gap={gap}\n $align={align}\n $justify={justify}\n $wrap={wrap}\n {...props}\n />\n );\n}) as PolymorphicComponent<'web', FlexProps>;\n\ntype FlexProps = ConvertTransientProps<FlexStyledProps>;\n\nexport default Flex;\n"],"names":["$align","$direction","$justify","$wrap","$gap","$width","$height","Flex","props","ref"],"mappings":";;;;;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAAA;AAkBb;AACE;AACEA;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AAWkB;;AAItB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEMC;AAGJ;;;;;;;AAF0DC;AAG1D;AAEIC;AACAJ;AACAC;AACAL;AACAG;AACAJ;AACAE;AACAC;;AAIN;;"}
@@ -1,7 +1,7 @@
1
- import type { CSSProperties, ElementType, HTMLAttributes } from 'react';
2
1
  import type { ConvertTransientProps } from '@remember-web/shared';
3
- export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
4
- as?: ElementType;
2
+ import type { CSSProperties, ComponentProps } from 'react';
3
+ import type { PolymorphicComponent } from 'styled-components';
4
+ export interface FlexStyledProps extends ComponentProps<'div'> {
5
5
  $align?: CSSProperties['alignItems'];
6
6
  $direction?: CSSProperties['flexDirection'];
7
7
  $justify?: CSSProperties['justifyContent'];
@@ -19,5 +19,6 @@ export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
19
19
  * @prop {CSSProperties['flexDirection']} direction
20
20
  * @prop {CSSProperties['flexWrap']} wrap
21
21
  */
22
- export declare const Flex: ({ as, width, height, direction, gap, align, justify, wrap, ...props }: ConvertTransientProps<FlexProps>) => import("react/jsx-runtime").JSX.Element;
22
+ declare const Flex: PolymorphicComponent<"web", ConvertTransientProps<FlexStyledProps>>;
23
+ export default Flex;
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Common/Flex/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAyBD;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,0EAUd,sBAAsB,SAAS,CAAC,4CAYlC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Common/Flex/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAgB,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC5D,MAAM,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAyBD;;;;;;;;GAQG;AAEH,QAAA,MAAM,IAAI,qEAiBkC,CAAC;AAI7C,eAAe,IAAI,CAAC"}
@@ -2,10 +2,11 @@
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
4
  import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
5
+ import { forwardRef } from 'react';
5
6
  import styled, { css } from 'styled-components';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
8
- var _excluded = ["as", "width", "height", "direction", "gap", "align", "justify", "wrap"];
9
+ var _excluded = ["width", "height", "direction", "gap", "align", "justify", "wrap"];
9
10
  var _templateObject;
10
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -36,9 +37,9 @@ var StyledFlex = styled.div(function (_ref) {
36
37
  * @prop {CSSProperties['flexDirection']} direction
37
38
  * @prop {CSSProperties['flexWrap']} wrap
38
39
  */
39
- var Flex = function Flex(_ref2) {
40
- var as = _ref2.as,
41
- width = _ref2.width,
40
+
41
+ var Flex = /*#__PURE__*/forwardRef(function (_ref2, ref) {
42
+ var width = _ref2.width,
42
43
  height = _ref2.height,
43
44
  direction = _ref2.direction,
44
45
  gap = _ref2.gap,
@@ -47,7 +48,7 @@ var Flex = function Flex(_ref2) {
47
48
  wrap = _ref2.wrap,
48
49
  props = _objectWithoutProperties(_ref2, _excluded);
49
50
  return /*#__PURE__*/jsx(StyledFlex, _objectSpread({
50
- as: as,
51
+ ref: ref,
51
52
  $width: width,
52
53
  $height: height,
53
54
  $direction: direction,
@@ -56,7 +57,7 @@ var Flex = function Flex(_ref2) {
56
57
  $justify: justify,
57
58
  $wrap: wrap
58
59
  }, props));
59
- };
60
+ });
60
61
 
61
- export { Flex };
62
+ export { Flex as default };
62
63
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/Common/Flex/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ElementType, HTMLAttributes } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { ConvertTransientProps } from '@remember-web/shared';\n\nexport interface FlexProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType;\n $align?: CSSProperties['alignItems'];\n $direction?: CSSProperties['flexDirection'];\n $justify?: CSSProperties['justifyContent'];\n $wrap?: CSSProperties['flexWrap'];\n $gap?: string | number;\n $width?: string | number;\n $height?: string | number;\n}\n\nconst StyledFlex = styled.div<Partial<FlexProps>>(\n ({\n $align = 'center',\n $direction = 'row',\n $justify = 'center',\n $wrap = 'nowrap',\n $gap = 0,\n $width = 'auto',\n $height = 'auto',\n }) => css`\n box-sizing: border-box;\n display: flex;\n width: ${typeof $width === 'number' ? `${$width}px` : $width};\n height: ${typeof $height === 'number' ? `${$height}px` : $height};\n\n gap: ${typeof $gap === 'number' ? `${$gap}px` : $gap};\n align-items: ${$align};\n justify-content: ${$justify};\n flex-direction: ${$direction};\n flex-wrap: ${$wrap};\n `\n);\n\n/**\n * @prop {string} width\n * @prop {string} height\n * @prop {string} gap\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['flexDirection']} direction\n * @prop {CSSProperties['flexWrap']} wrap\n */\nexport const Flex = ({\n as,\n width,\n height,\n direction,\n gap,\n align,\n justify,\n wrap,\n ...props\n}: ConvertTransientProps<FlexProps>) => (\n <StyledFlex\n as={as}\n $width={width}\n $height={height}\n $direction={direction}\n $gap={gap}\n $align={align}\n $justify={justify}\n $wrap={wrap}\n {...props}\n />\n);\n"],"names":["$align","$direction","$justify","$wrap","$gap","$width","$height","props","as"],"mappings":";;;;;;;AAAa;AAAA;AAAA;AAAA;AAiBb;AACE;AACEA;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AAWkB;;AAItB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACiB;;;;;;;;AASZC;AAAK;AAGNC;AACAH;AACAC;AACAL;AACAG;AACAJ;AACAE;AACAC;;AAEA;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Common/Flex/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport type { CSSProperties, ComponentProps, ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport styled, { css } from 'styled-components';\n\nexport interface FlexStyledProps extends ComponentProps<'div'> {\n $align?: CSSProperties['alignItems'];\n $direction?: CSSProperties['flexDirection'];\n $justify?: CSSProperties['justifyContent'];\n $wrap?: CSSProperties['flexWrap'];\n $gap?: string | number;\n $width?: string | number;\n $height?: string | number;\n}\n\nconst StyledFlex = styled.div<Partial<FlexStyledProps>>(\n ({\n $align = 'center',\n $direction = 'row',\n $justify = 'center',\n $wrap = 'nowrap',\n $gap = 0,\n $width = 'auto',\n $height = 'auto',\n }) => css`\n box-sizing: border-box;\n display: flex;\n width: ${typeof $width === 'number' ? `${$width}px` : $width};\n height: ${typeof $height === 'number' ? `${$height}px` : $height};\n\n gap: ${typeof $gap === 'number' ? `${$gap}px` : $gap};\n align-items: ${$align};\n justify-content: ${$justify};\n flex-direction: ${$direction};\n flex-wrap: ${$wrap};\n `\n);\n\n/**\n * @prop {string} width\n * @prop {string} height\n * @prop {string} gap\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['flexDirection']} direction\n * @prop {CSSProperties['flexWrap']} wrap\n */\n\nconst Flex = forwardRef(function (\n { width, height, direction, gap, align, justify, wrap, ...props }: FlexProps,\n ref: ForwardedRef<HTMLDivElement | null>\n) {\n return (\n <StyledFlex\n ref={ref}\n $width={width}\n $height={height}\n $direction={direction}\n $gap={gap}\n $align={align}\n $justify={justify}\n $wrap={wrap}\n {...props}\n />\n );\n}) as PolymorphicComponent<'web', FlexProps>;\n\ntype FlexProps = ConvertTransientProps<FlexStyledProps>;\n\nexport default Flex;\n"],"names":["$align","$direction","$justify","$wrap","$gap","$width","$height","Flex","props","ref"],"mappings":";;;;;;;;AAAa;AAAA;AAAA;AAAA;AAkBb;AACE;AACEA;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AACAC;;AAWkB;;AAItB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEMC;AAGJ;;;;;;;AAF0DC;AAG1D;AAEIC;AACAJ;AACAC;AACAL;AACAG;AACAJ;AACAE;AACAC;;AAIN;;"}
@@ -54,6 +54,7 @@ var StyledGrid = styled__default.default.div(_templateObject || (_templateObject
54
54
  });
55
55
 
56
56
  /**
57
+ * @deprecated
57
58
  * @prop {string} width
58
59
  * @prop {string} height
59
60
  * @prop {CSSProperties['alignItems']} align
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/Common/Grid/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nexport interface GridProps extends HTMLAttributes<HTMLDivElement> {\n width?: string;\n height?: string;\n align?: CSSProperties['alignItems'];\n justify?: CSSProperties['justifyContent'];\n flow?: CSSProperties['gridAutoFlow'];\n columns?: number;\n gap?: string;\n columnGap?: string;\n rowGap?: string;\n}\n\nconst StyledGrid = styled.div<Partial<GridProps>>`\n box-sizing: border-box;\n display: grid;\n width: ${({ width = '100%' }) => width};\n height: ${({ height = '100%' }) => height};\n align-items: ${({ align = 'center' }) => align};\n justify-content: ${({ justify = 'center' }) => justify};\n grid-auto-flow: ${({ flow = 'center' }) => flow};\n grid-template-columns: ${({ columns = 1 }) => `repeat(${columns}, 1fr)`};\n gap: ${({ gap = '0px' }) => gap};\n column-gap: ${({ columnGap = '0px' }) => columnGap};\n row-gap: ${({ rowGap = '0px' }) => rowGap};\n`;\n\n/**\n * @prop {string} width\n * @prop {string} height\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['gridAutoFlow']} flow\n * @prop {number} columns\n * @prop {string} gap\n * @prop {string} columnGap\n * @prop {string} rowGap\n */\nexport const Grid = (props: GridProps) => <StyledGrid {...props} />;\n"],"names":["width","height","align","justify","flow","columns","gap","columnGap","rowGap"],"mappings":";;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAiBb;AAGW;AAAGA;AAAc;AAAY;AAC5B;AAAGC;AAAe;AAAa;AAC1B;AAAGC;AAAgB;AAAY;AAC3B;AAAGC;AAAkB;AAAc;AACpC;AAAGC;AAAe;AAAW;AACtB;AAAGC;;AAAmC;AACxD;AAAGC;AAAW;AAAU;AACjB;AAAGC;AAAiB;AAAgB;AACvC;AAAGC;AAAc;AAAa;;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACmE;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Common/Grid/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nexport interface GridProps extends HTMLAttributes<HTMLDivElement> {\n width?: string;\n height?: string;\n align?: CSSProperties['alignItems'];\n justify?: CSSProperties['justifyContent'];\n flow?: CSSProperties['gridAutoFlow'];\n columns?: number;\n gap?: string;\n columnGap?: string;\n rowGap?: string;\n}\n\nconst StyledGrid = styled.div<Partial<GridProps>>`\n box-sizing: border-box;\n display: grid;\n width: ${({ width = '100%' }) => width};\n height: ${({ height = '100%' }) => height};\n align-items: ${({ align = 'center' }) => align};\n justify-content: ${({ justify = 'center' }) => justify};\n grid-auto-flow: ${({ flow = 'center' }) => flow};\n grid-template-columns: ${({ columns = 1 }) => `repeat(${columns}, 1fr)`};\n gap: ${({ gap = '0px' }) => gap};\n column-gap: ${({ columnGap = '0px' }) => columnGap};\n row-gap: ${({ rowGap = '0px' }) => rowGap};\n`;\n\n/**\n * @deprecated\n * @prop {string} width\n * @prop {string} height\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['gridAutoFlow']} flow\n * @prop {number} columns\n * @prop {string} gap\n * @prop {string} columnGap\n * @prop {string} rowGap\n */\nexport const Grid = (props: GridProps) => <StyledGrid {...props} />;\n"],"names":["width","height","align","justify","flow","columns","gap","columnGap","rowGap"],"mappings":";;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAiBb;AAGW;AAAGA;AAAc;AAAY;AAC5B;AAAGC;AAAe;AAAa;AAC1B;AAAGC;AAAgB;AAAY;AAC3B;AAAGC;AAAkB;AAAc;AACpC;AAAGC;AAAe;AAAW;AACtB;AAAGC;;AAAmC;AACxD;AAAGC;AAAW;AAAU;AACjB;AAAGC;AAAiB;AAAgB;AACvC;AAAGC;AAAc;AAAa;;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACmE;;"}
@@ -11,6 +11,7 @@ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
11
11
  rowGap?: string;
12
12
  }
13
13
  /**
14
+ * @deprecated
14
15
  * @prop {string} width
15
16
  * @prop {string} height
16
17
  * @prop {CSSProperties['alignItems']} align
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Common/Grid/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAgBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,UAAW,SAAS,4CAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Common/Grid/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAgBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,UAAW,SAAS,4CAA8B,CAAC"}
@@ -46,6 +46,7 @@ var StyledGrid = styled.div(_templateObject || (_templateObject = _taggedTemplat
46
46
  });
47
47
 
48
48
  /**
49
+ * @deprecated
49
50
  * @prop {string} width
50
51
  * @prop {string} height
51
52
  * @prop {CSSProperties['alignItems']} align
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/Common/Grid/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nexport interface GridProps extends HTMLAttributes<HTMLDivElement> {\n width?: string;\n height?: string;\n align?: CSSProperties['alignItems'];\n justify?: CSSProperties['justifyContent'];\n flow?: CSSProperties['gridAutoFlow'];\n columns?: number;\n gap?: string;\n columnGap?: string;\n rowGap?: string;\n}\n\nconst StyledGrid = styled.div<Partial<GridProps>>`\n box-sizing: border-box;\n display: grid;\n width: ${({ width = '100%' }) => width};\n height: ${({ height = '100%' }) => height};\n align-items: ${({ align = 'center' }) => align};\n justify-content: ${({ justify = 'center' }) => justify};\n grid-auto-flow: ${({ flow = 'center' }) => flow};\n grid-template-columns: ${({ columns = 1 }) => `repeat(${columns}, 1fr)`};\n gap: ${({ gap = '0px' }) => gap};\n column-gap: ${({ columnGap = '0px' }) => columnGap};\n row-gap: ${({ rowGap = '0px' }) => rowGap};\n`;\n\n/**\n * @prop {string} width\n * @prop {string} height\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['gridAutoFlow']} flow\n * @prop {number} columns\n * @prop {string} gap\n * @prop {string} columnGap\n * @prop {string} rowGap\n */\nexport const Grid = (props: GridProps) => <StyledGrid {...props} />;\n"],"names":["width","height","align","justify","flow","columns","gap","columnGap","rowGap"],"mappings":";;;;;;AAAa;AAAA;AAAA;AAiBb;AAGW;AAAGA;AAAc;AAAY;AAC5B;AAAGC;AAAe;AAAa;AAC1B;AAAGC;AAAgB;AAAY;AAC3B;AAAGC;AAAkB;AAAc;AACpC;AAAGC;AAAe;AAAW;AACtB;AAAGC;;AAAmC;AACxD;AAAGC;AAAW;AAAU;AACjB;AAAGC;AAAiB;AAAgB;AACvC;AAAGC;AAAc;AAAa;;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACmE;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Common/Grid/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nexport interface GridProps extends HTMLAttributes<HTMLDivElement> {\n width?: string;\n height?: string;\n align?: CSSProperties['alignItems'];\n justify?: CSSProperties['justifyContent'];\n flow?: CSSProperties['gridAutoFlow'];\n columns?: number;\n gap?: string;\n columnGap?: string;\n rowGap?: string;\n}\n\nconst StyledGrid = styled.div<Partial<GridProps>>`\n box-sizing: border-box;\n display: grid;\n width: ${({ width = '100%' }) => width};\n height: ${({ height = '100%' }) => height};\n align-items: ${({ align = 'center' }) => align};\n justify-content: ${({ justify = 'center' }) => justify};\n grid-auto-flow: ${({ flow = 'center' }) => flow};\n grid-template-columns: ${({ columns = 1 }) => `repeat(${columns}, 1fr)`};\n gap: ${({ gap = '0px' }) => gap};\n column-gap: ${({ columnGap = '0px' }) => columnGap};\n row-gap: ${({ rowGap = '0px' }) => rowGap};\n`;\n\n/**\n * @deprecated\n * @prop {string} width\n * @prop {string} height\n * @prop {CSSProperties['alignItems']} align\n * @prop {CSSProperties['justifyContent']} justify\n * @prop {CSSProperties['gridAutoFlow']} flow\n * @prop {number} columns\n * @prop {string} gap\n * @prop {string} columnGap\n * @prop {string} rowGap\n */\nexport const Grid = (props: GridProps) => <StyledGrid {...props} />;\n"],"names":["width","height","align","justify","flow","columns","gap","columnGap","rowGap"],"mappings":";;;;;;AAAa;AAAA;AAAA;AAiBb;AAGW;AAAGA;AAAc;AAAY;AAC5B;AAAGC;AAAe;AAAa;AAC1B;AAAGC;AAAgB;AAAY;AAC3B;AAAGC;AAAkB;AAAc;AACpC;AAAGC;AAAe;AAAW;AACtB;AAAGC;;AAAmC;AACxD;AAAGC;AAAW;AAAU;AACjB;AAAGC;AAAiB;AAAgB;AACvC;AAAGC;AAAc;AAAa;;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACmE;;"}
@@ -12,12 +12,11 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
12
  var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
13
13
  var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);
14
14
 
15
- var _excluded = ["variant", "as", "color", "children", "ellipsis", "maxWidth"];
15
+ var _excluded = ["variant", "color", "children", "ellipsis", "maxWidth"];
16
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
- var Typography = function Typography(_ref, ref) {
18
+ var Typography = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
19
19
  var variant = _ref.variant,
20
- as = _ref.as,
21
20
  color = _ref.color,
22
21
  children = _ref.children,
23
22
  ellipsis = _ref.ellipsis,
@@ -25,7 +24,6 @@ var Typography = function Typography(_ref, ref) {
25
24
  props = _objectWithoutProperties__default.default(_ref, _excluded);
26
25
  return /*#__PURE__*/jsxRuntime.jsx(styles.StyledTypography, _objectSpread(_objectSpread({
27
26
  ref: ref,
28
- as: as,
29
27
  $variant: variant,
30
28
  $color: color,
31
29
  $ellipsis: ellipsis,
@@ -33,8 +31,7 @@ var Typography = function Typography(_ref, ref) {
33
31
  }, props), {}, {
34
32
  children: children
35
33
  }));
36
- };
37
- var Typography$1 = /*#__PURE__*/react.forwardRef(Typography);
34
+ });
38
35
 
39
- module.exports = Typography$1;
36
+ module.exports = Typography;
40
37
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/Common/Typography/index.tsx"],"sourcesContent":["'use client';\n\nimport type {\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n CSSProperties,\n ElementType,\n ReactElement,\n ReactNode,\n} from 'react';\nimport { forwardRef } from 'react';\nimport { type TypographyStyle } from '@remember-web/mixin';\n\nimport { StyledTypography } from './styles';\n\nconst Typography = <T extends ElementType>(\n {\n variant,\n as,\n color,\n children,\n ellipsis,\n maxWidth,\n ...props\n }: TypographyProps<T>,\n ref: ComponentPropsWithRef<T>['ref']\n) => (\n <StyledTypography\n ref={ref}\n as={as}\n $variant={variant}\n $color={color}\n $ellipsis={ellipsis}\n $maxWidth={maxWidth}\n {...props}\n >\n {children}\n </StyledTypography>\n);\n\ntype TypographyProps<T extends ElementType> = {\n variant: TypographyStyle;\n as?: T;\n color?: string;\n children?: ReactNode;\n ellipsis?: number;\n maxWidth?: CSSProperties['maxWidth'];\n} & ComponentPropsWithoutRef<T>;\n\ntype TypographyComponentWithRef = <T extends ElementType = 'div'>(\n props: TypographyProps<T> & { ref?: ComponentPropsWithRef<T>['ref'] }\n) => ReactElement | null;\n\nexport default forwardRef(Typography) as TypographyComponentWithRef;\n"],"names":["props","ref","as","$variant","$color","$ellipsis","$maxWidth","children"],"mappings":";;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAeb;AAUsC;;;;;;AAF/BA;AAAK;AAKRC;AACAC;AACAC;AACAC;AACAC;AACAC;AAAoB;AACXC;AAEA;AACQ;AAgBrB;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Common/Typography/index.tsx"],"sourcesContent":["'use client';\n\nimport { type TypographyStyle } from '@remember-web/mixin';\nimport type {\n CSSProperties,\n ComponentProps,\n ForwardedRef,\n ReactNode,\n} from 'react';\nimport { forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\n\nimport { StyledTypography } from './styles';\n\nconst Typography = forwardRef(function (\n { variant, color, children, ellipsis, maxWidth, ...props }: TypographyProps,\n ref: ForwardedRef<HTMLDivElement | null>\n) {\n return (\n <StyledTypography\n ref={ref}\n $variant={variant}\n $color={color}\n $ellipsis={ellipsis}\n $maxWidth={maxWidth}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n}) as PolymorphicComponent<'web', TypographyProps>;\n\ntype TypographyProps = {\n variant: TypographyStyle;\n color?: string;\n children?: ReactNode;\n ellipsis?: number;\n maxWidth?: CSSProperties['maxWidth'];\n} & ComponentProps<'div'>;\n\nexport default Typography;\n"],"names":["Typography","props","ref","$variant","$color","$ellipsis","$maxWidth","children"],"mappings":";;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAcPA;AAGJ;;;;;AAFmDC;AAGnD;AAEIC;AACAC;AACAC;AACAC;AACAC;AAAoB;AACXC;AAEA;AAGf;;"}
@@ -1,16 +1,13 @@
1
- import type { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, ElementType, ReactElement, ReactNode } from 'react';
2
1
  import { type TypographyStyle } from '@remember-web/mixin';
3
- type TypographyProps<T extends ElementType> = {
2
+ import type { CSSProperties, ComponentProps, ReactNode } from 'react';
3
+ import type { PolymorphicComponent } from 'styled-components';
4
+ declare const Typography: PolymorphicComponent<"web", TypographyProps>;
5
+ type TypographyProps = {
4
6
  variant: TypographyStyle;
5
- as?: T;
6
7
  color?: string;
7
8
  children?: ReactNode;
8
9
  ellipsis?: number;
9
10
  maxWidth?: CSSProperties['maxWidth'];
10
- } & ComponentPropsWithoutRef<T>;
11
- type TypographyComponentWithRef = <T extends ElementType = 'div'>(props: TypographyProps<T> & {
12
- ref?: ComponentPropsWithRef<T>['ref'];
13
- }) => ReactElement | null;
14
- declare const _default: TypographyComponentWithRef;
15
- export default _default;
11
+ } & ComponentProps<'div'>;
12
+ export default Typography;
16
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Common/Typography/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA6B3D,KAAK,eAAe,CAAC,CAAC,SAAS,WAAW,IAAI;IAC5C,OAAO,EAAE,eAAe,CAAC;IACzB,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACtC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEhC,KAAK,0BAA0B,GAAG,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAC9D,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,KAClE,YAAY,GAAG,IAAI,CAAC;;AAEzB,wBAAoE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Common/Typography/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EAEd,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAI9D,QAAA,MAAM,UAAU,8CAgBkC,CAAC;AAEnD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACtC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1B,eAAe,UAAU,CAAC"}
@@ -5,12 +5,11 @@ import { forwardRef } from 'react';
5
5
  import { StyledTypography } from './styles.esm.js';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
- var _excluded = ["variant", "as", "color", "children", "ellipsis", "maxWidth"];
8
+ var _excluded = ["variant", "color", "children", "ellipsis", "maxWidth"];
9
9
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
10
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- var Typography = function Typography(_ref, ref) {
11
+ var Typography = /*#__PURE__*/forwardRef(function (_ref, ref) {
12
12
  var variant = _ref.variant,
13
- as = _ref.as,
14
13
  color = _ref.color,
15
14
  children = _ref.children,
16
15
  ellipsis = _ref.ellipsis,
@@ -18,7 +17,6 @@ var Typography = function Typography(_ref, ref) {
18
17
  props = _objectWithoutProperties(_ref, _excluded);
19
18
  return /*#__PURE__*/jsx(StyledTypography, _objectSpread(_objectSpread({
20
19
  ref: ref,
21
- as: as,
22
20
  $variant: variant,
23
21
  $color: color,
24
22
  $ellipsis: ellipsis,
@@ -26,8 +24,7 @@ var Typography = function Typography(_ref, ref) {
26
24
  }, props), {}, {
27
25
  children: children
28
26
  }));
29
- };
30
- var Typography$1 = /*#__PURE__*/forwardRef(Typography);
27
+ });
31
28
 
32
- export { Typography$1 as default };
29
+ export { Typography as default };
33
30
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/Common/Typography/index.tsx"],"sourcesContent":["'use client';\n\nimport type {\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n CSSProperties,\n ElementType,\n ReactElement,\n ReactNode,\n} from 'react';\nimport { forwardRef } from 'react';\nimport { type TypographyStyle } from '@remember-web/mixin';\n\nimport { StyledTypography } from './styles';\n\nconst Typography = <T extends ElementType>(\n {\n variant,\n as,\n color,\n children,\n ellipsis,\n maxWidth,\n ...props\n }: TypographyProps<T>,\n ref: ComponentPropsWithRef<T>['ref']\n) => (\n <StyledTypography\n ref={ref}\n as={as}\n $variant={variant}\n $color={color}\n $ellipsis={ellipsis}\n $maxWidth={maxWidth}\n {...props}\n >\n {children}\n </StyledTypography>\n);\n\ntype TypographyProps<T extends ElementType> = {\n variant: TypographyStyle;\n as?: T;\n color?: string;\n children?: ReactNode;\n ellipsis?: number;\n maxWidth?: CSSProperties['maxWidth'];\n} & ComponentPropsWithoutRef<T>;\n\ntype TypographyComponentWithRef = <T extends ElementType = 'div'>(\n props: TypographyProps<T> & { ref?: ComponentPropsWithRef<T>['ref'] }\n) => ReactElement | null;\n\nexport default forwardRef(Typography) as TypographyComponentWithRef;\n"],"names":["props","ref","as","$variant","$color","$ellipsis","$maxWidth","children"],"mappings":";;;;;;;AAAa;AAAA;AAAA;AAeb;AAUsC;;;;;;AAF/BA;AAAK;AAKRC;AACAC;AACAC;AACAC;AACAC;AACAC;AAAoB;AACXC;AAEA;AACQ;AAgBrB;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Common/Typography/index.tsx"],"sourcesContent":["'use client';\n\nimport { type TypographyStyle } from '@remember-web/mixin';\nimport type {\n CSSProperties,\n ComponentProps,\n ForwardedRef,\n ReactNode,\n} from 'react';\nimport { forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\n\nimport { StyledTypography } from './styles';\n\nconst Typography = forwardRef(function (\n { variant, color, children, ellipsis, maxWidth, ...props }: TypographyProps,\n ref: ForwardedRef<HTMLDivElement | null>\n) {\n return (\n <StyledTypography\n ref={ref}\n $variant={variant}\n $color={color}\n $ellipsis={ellipsis}\n $maxWidth={maxWidth}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n}) as PolymorphicComponent<'web', TypographyProps>;\n\ntype TypographyProps = {\n variant: TypographyStyle;\n color?: string;\n children?: ReactNode;\n ellipsis?: number;\n maxWidth?: CSSProperties['maxWidth'];\n} & ComponentProps<'div'>;\n\nexport default Typography;\n"],"names":["Typography","props","ref","$variant","$color","$ellipsis","$maxWidth","children"],"mappings":";;;;;;;AAAa;AAAA;AAAA;AAcPA;AAGJ;;;;;AAFmDC;AAGnD;AAEIC;AACAC;AACAC;AACAC;AACAC;AAAoB;AACXC;AAEA;AAGf;;"}
@@ -1,5 +1,5 @@
1
1
  export * from './Divider';
2
- export * from './Flex';
2
+ export { default as Flex } from './Flex';
3
3
  export * from './Grid';
4
4
  export * from './Spinner';
5
5
  export { default as Typography } from './Typography';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Common/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,4BAA4B;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Common/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,4BAA4B;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -45,7 +45,7 @@ Dialog.Content = function (_ref2) {
45
45
  props = _objectWithoutProperties__default.default(_ref2, _excluded2);
46
46
  return /*#__PURE__*/jsxRuntime.jsxs(DialogPrimitive.Portal, {
47
47
  children: [dimmed && /*#__PURE__*/jsxRuntime.jsx(styles.StyledOverlay, {}), /*#__PURE__*/jsxRuntime.jsx(styles.DialogContent, _objectSpread(_objectSpread({}, props), {}, {
48
- children: /*#__PURE__*/jsxRuntime.jsx(index.Flex, {
48
+ children: /*#__PURE__*/jsxRuntime.jsx(index, {
49
49
  direction: "column",
50
50
  align: "center",
51
51
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/Modals/Dialog/index.tsx"],"sourcesContent":["'use client';\n\nimport type { DialogContentProps, DialogProps } from '@radix-ui/react-dialog';\nimport { Root, Trigger, Close, Portal } from '@radix-ui/react-dialog';\nimport { IconClose, PictogramAlert, PictogramCheck } from '@remember-web/icon';\n\nimport { Flex } from '@/Common/Flex';\n\nimport {\n DialogContent,\n DialogDescription,\n DialogIcon,\n DialogTitle,\n IconButton,\n StyledOverlay,\n} from './styles';\n\ninterface ContentProps extends DialogContentProps {\n children: React.ReactNode;\n dimmed?: boolean;\n}\n\n/**\n * @prop {React.ReactNode} children\n * @prop {boolean} open\n * @prop {boolean} defaultOpen\n * @prop {(open: boolean) => void} onOpenChange\n * @prop {boolean} modal\n * @prop {string} id\n */\nexport function Dialog({ children, ...props }: DialogProps) {\n return <Root {...props}>{children}</Root>;\n}\n\n/**\n * @prop {boolean} dimmed\n * @see https://www.radix-ui.com/docs/primitives/components/dialog\n */\nDialog.Content = ({ children, dimmed = true, ...props }: ContentProps) => (\n <Portal>\n {dimmed && <StyledOverlay />}\n <DialogContent {...props}>\n <Flex direction=\"column\" align=\"center\">\n {children}\n </Flex>\n </DialogContent>\n </Portal>\n);\n\nDialog.HeadIcon = ({ type = 'alert' }: { type?: 'alert' | 'confirm' }) => (\n <DialogIcon>\n {type === 'alert' && <PictogramAlert size={40} />}\n {type === 'confirm' && <PictogramCheck size={40} />}\n </DialogIcon>\n);\n\nDialog.CloseIcon = () => (\n <Close asChild>\n <IconButton type=\"button\" aria-label=\"Close\">\n <IconClose size=\"small\" />\n </IconButton>\n </Close>\n);\n\nDialog.Title = ({ children }: { children: React.ReactNode }) => (\n <DialogTitle>{children}</DialogTitle>\n);\n\nDialog.Description = ({ children }: { children: React.ReactNode }) => (\n <DialogDescription>{children}</DialogDescription>\n);\n\nDialog.Trigger = Trigger;\nDialog.Close = Close;\n"],"names":["props","children","Dialog","dimmed","direction","align","type","size"],"mappings":";;;;;;;;;;;;;;;;AAAa;;AAAA;AAAA;AAsBb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AAAqD;AAAtBA;;AACdC;AAAW;AACnC;;AAEA;AACA;AACA;AACA;AACAC;AAAiB;;AAAaC;AAAkBH;;AACvCC;;AAGGG;AAAmBC;AAAcJ;;AAEhC;AACO;AACT;AAGXC;AAAkB;AAAGI;;AACRL;AAC4BM;;AACEA;AAAS;AAAG;AACxC;AAGfL;;;;AAEgBI;AAAc;;AACbC;;;AACA;AACP;AAGVL;AAAe;;AACDD;AAAU;AAAe;AAGvCC;AAAqB;;AACDD;AAAU;AAAqB;AAGnDC;AACAA;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Modals/Dialog/index.tsx"],"sourcesContent":["'use client';\n\nimport type { DialogContentProps, DialogProps } from '@radix-ui/react-dialog';\nimport { Root, Trigger, Close, Portal } from '@radix-ui/react-dialog';\nimport { IconClose, PictogramAlert, PictogramCheck } from '@remember-web/icon';\n\nimport Flex from '@/Common/Flex';\n\nimport {\n DialogContent,\n DialogDescription,\n DialogIcon,\n DialogTitle,\n IconButton,\n StyledOverlay,\n} from './styles';\n\ninterface ContentProps extends DialogContentProps {\n children: React.ReactNode;\n dimmed?: boolean;\n}\n\n/**\n * @prop {React.ReactNode} children\n * @prop {boolean} open\n * @prop {boolean} defaultOpen\n * @prop {(open: boolean) => void} onOpenChange\n * @prop {boolean} modal\n * @prop {string} id\n */\nexport function Dialog({ children, ...props }: DialogProps) {\n return <Root {...props}>{children}</Root>;\n}\n\n/**\n * @prop {boolean} dimmed\n * @see https://www.radix-ui.com/docs/primitives/components/dialog\n */\nDialog.Content = ({ children, dimmed = true, ...props }: ContentProps) => (\n <Portal>\n {dimmed && <StyledOverlay />}\n <DialogContent {...props}>\n <Flex direction=\"column\" align=\"center\">\n {children}\n </Flex>\n </DialogContent>\n </Portal>\n);\n\nDialog.HeadIcon = ({ type = 'alert' }: { type?: 'alert' | 'confirm' }) => (\n <DialogIcon>\n {type === 'alert' && <PictogramAlert size={40} />}\n {type === 'confirm' && <PictogramCheck size={40} />}\n </DialogIcon>\n);\n\nDialog.CloseIcon = () => (\n <Close asChild>\n <IconButton type=\"button\" aria-label=\"Close\">\n <IconClose size=\"small\" />\n </IconButton>\n </Close>\n);\n\nDialog.Title = ({ children }: { children: React.ReactNode }) => (\n <DialogTitle>{children}</DialogTitle>\n);\n\nDialog.Description = ({ children }: { children: React.ReactNode }) => (\n <DialogDescription>{children}</DialogDescription>\n);\n\nDialog.Trigger = Trigger;\nDialog.Close = Close;\n"],"names":["props","children","Dialog","dimmed","direction","align","type","size"],"mappings":";;;;;;;;;;;;;;;;AAAa;;AAAA;AAAA;AAsBb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AAAqD;AAAtBA;;AACdC;AAAW;AACnC;;AAEA;AACA;AACA;AACA;AACAC;AAAiB;;AAAaC;AAAkBH;;AACvCC;;AAGGG;AAAmBC;AAAcJ;;AAEhC;AACO;AACT;AAGXC;AAAkB;AAAGI;;AACRL;AAC4BM;;AACEA;AAAS;AAAG;AACxC;AAGfL;;;;AAEgBI;AAAc;;AACbC;;;AACA;AACP;AAGVL;AAAe;;AACDD;AAAU;AAAe;AAGvCC;AAAqB;;AACDD;AAAU;AAAqB;AAGnDC;AACAA;;"}
@@ -3,7 +3,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
4
  import { Root, Portal, Close, Trigger } from '@radix-ui/react-dialog';
5
5
  import { PictogramAlert, PictogramCheck, IconClose } from '@remember-web/icon';
6
- import { Flex } from '../../Common/Flex/index.esm.js';
6
+ import Flex from '../../Common/Flex/index.esm.js';
7
7
  import { StyledOverlay, DialogContent, DialogIcon, IconButton, DialogTitle, DialogDescription } from './styles.esm.js';
8
8
  import { jsx, jsxs } from 'react/jsx-runtime';
9
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/Modals/Dialog/index.tsx"],"sourcesContent":["'use client';\n\nimport type { DialogContentProps, DialogProps } from '@radix-ui/react-dialog';\nimport { Root, Trigger, Close, Portal } from '@radix-ui/react-dialog';\nimport { IconClose, PictogramAlert, PictogramCheck } from '@remember-web/icon';\n\nimport { Flex } from '@/Common/Flex';\n\nimport {\n DialogContent,\n DialogDescription,\n DialogIcon,\n DialogTitle,\n IconButton,\n StyledOverlay,\n} from './styles';\n\ninterface ContentProps extends DialogContentProps {\n children: React.ReactNode;\n dimmed?: boolean;\n}\n\n/**\n * @prop {React.ReactNode} children\n * @prop {boolean} open\n * @prop {boolean} defaultOpen\n * @prop {(open: boolean) => void} onOpenChange\n * @prop {boolean} modal\n * @prop {string} id\n */\nexport function Dialog({ children, ...props }: DialogProps) {\n return <Root {...props}>{children}</Root>;\n}\n\n/**\n * @prop {boolean} dimmed\n * @see https://www.radix-ui.com/docs/primitives/components/dialog\n */\nDialog.Content = ({ children, dimmed = true, ...props }: ContentProps) => (\n <Portal>\n {dimmed && <StyledOverlay />}\n <DialogContent {...props}>\n <Flex direction=\"column\" align=\"center\">\n {children}\n </Flex>\n </DialogContent>\n </Portal>\n);\n\nDialog.HeadIcon = ({ type = 'alert' }: { type?: 'alert' | 'confirm' }) => (\n <DialogIcon>\n {type === 'alert' && <PictogramAlert size={40} />}\n {type === 'confirm' && <PictogramCheck size={40} />}\n </DialogIcon>\n);\n\nDialog.CloseIcon = () => (\n <Close asChild>\n <IconButton type=\"button\" aria-label=\"Close\">\n <IconClose size=\"small\" />\n </IconButton>\n </Close>\n);\n\nDialog.Title = ({ children }: { children: React.ReactNode }) => (\n <DialogTitle>{children}</DialogTitle>\n);\n\nDialog.Description = ({ children }: { children: React.ReactNode }) => (\n <DialogDescription>{children}</DialogDescription>\n);\n\nDialog.Trigger = Trigger;\nDialog.Close = Close;\n"],"names":["props","children","Dialog","dimmed","direction","align","type","size"],"mappings":";;;;;;;;;AAAa;;AAAA;AAAA;AAsBb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AAAqD;AAAtBA;;AACdC;AAAW;AACnC;;AAEA;AACA;AACA;AACA;AACAC;AAAiB;;AAAaC;AAAkBH;;AACvCC;;AAGGG;AAAmBC;AAAcJ;;AAEhC;AACO;AACT;AAGXC;AAAkB;AAAGI;;AACRL;AAC4BM;;AACEA;AAAS;AAAG;AACxC;AAGfL;;;;AAEgBI;AAAc;;AACbC;;;AACA;AACP;AAGVL;AAAe;;AACDD;AAAU;AAAe;AAGvCC;AAAqB;;AACDD;AAAU;AAAqB;AAGnDC;AACAA;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Modals/Dialog/index.tsx"],"sourcesContent":["'use client';\n\nimport type { DialogContentProps, DialogProps } from '@radix-ui/react-dialog';\nimport { Root, Trigger, Close, Portal } from '@radix-ui/react-dialog';\nimport { IconClose, PictogramAlert, PictogramCheck } from '@remember-web/icon';\n\nimport Flex from '@/Common/Flex';\n\nimport {\n DialogContent,\n DialogDescription,\n DialogIcon,\n DialogTitle,\n IconButton,\n StyledOverlay,\n} from './styles';\n\ninterface ContentProps extends DialogContentProps {\n children: React.ReactNode;\n dimmed?: boolean;\n}\n\n/**\n * @prop {React.ReactNode} children\n * @prop {boolean} open\n * @prop {boolean} defaultOpen\n * @prop {(open: boolean) => void} onOpenChange\n * @prop {boolean} modal\n * @prop {string} id\n */\nexport function Dialog({ children, ...props }: DialogProps) {\n return <Root {...props}>{children}</Root>;\n}\n\n/**\n * @prop {boolean} dimmed\n * @see https://www.radix-ui.com/docs/primitives/components/dialog\n */\nDialog.Content = ({ children, dimmed = true, ...props }: ContentProps) => (\n <Portal>\n {dimmed && <StyledOverlay />}\n <DialogContent {...props}>\n <Flex direction=\"column\" align=\"center\">\n {children}\n </Flex>\n </DialogContent>\n </Portal>\n);\n\nDialog.HeadIcon = ({ type = 'alert' }: { type?: 'alert' | 'confirm' }) => (\n <DialogIcon>\n {type === 'alert' && <PictogramAlert size={40} />}\n {type === 'confirm' && <PictogramCheck size={40} />}\n </DialogIcon>\n);\n\nDialog.CloseIcon = () => (\n <Close asChild>\n <IconButton type=\"button\" aria-label=\"Close\">\n <IconClose size=\"small\" />\n </IconButton>\n </Close>\n);\n\nDialog.Title = ({ children }: { children: React.ReactNode }) => (\n <DialogTitle>{children}</DialogTitle>\n);\n\nDialog.Description = ({ children }: { children: React.ReactNode }) => (\n <DialogDescription>{children}</DialogDescription>\n);\n\nDialog.Trigger = Trigger;\nDialog.Close = Close;\n"],"names":["props","children","Dialog","dimmed","direction","align","type","size"],"mappings":";;;;;;;;;AAAa;;AAAA;AAAA;AAsBb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AAAqD;AAAtBA;;AACdC;AAAW;AACnC;;AAEA;AACA;AACA;AACA;AACAC;AAAiB;;AAAaC;AAAkBH;;AACvCC;;AAGGG;AAAmBC;AAAcJ;;AAEhC;AACO;AACT;AAGXC;AAAkB;AAAGI;;AACRL;AAC4BM;;AACEA;AAAS;AAAG;AACxC;AAGfL;;;;AAEgBI;AAAc;;AACbC;;;AACA;AACP;AAGVL;AAAe;;AACDD;AAAU;AAAe;AAGvCC;AAAqB;;AACDD;AAAU;AAAqB;AAGnDC;AACAA;;"}
@@ -72,7 +72,7 @@ function CompactPagination(_ref) {
72
72
  color: getArrowButtonColor(isPrevPageDisabled),
73
73
  "aria-hidden": "true"
74
74
  })
75
- }), /*#__PURE__*/jsxRuntime.jsxs(index.Flex, {
75
+ }), /*#__PURE__*/jsxRuntime.jsxs(index, {
76
76
  gap: "4px",
77
77
  style: {
78
78
  minWidth: '44px',
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/Paginations/CompactPagination/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconArrow2Left, IconArrow2Right } from '@remember-web/icon';\nimport { contents000, contents300 } from '@remember-web/mixin';\n\nimport { Flex } from '@/Common/Flex';\n\nimport {\n ArrowButton,\n CompactPaginationContainer,\n CurrentPage,\n} from '../styles';\nimport type { CompactPaginationProps } from '../types';\nimport usePagination from '../usePagination';\n\nexport function CompactPagination({\n activePage = 1,\n totalItemCount = 0,\n onChangePage,\n itemCountPerPage,\n infinite = false,\n className,\n}: CompactPaginationProps) {\n const {\n totalLastPage,\n prevPage,\n nextPage,\n isPrevPageDisabled,\n isNextPageDisabled,\n } = usePagination({\n activePage,\n totalItemCount,\n pageRangeDisplayed: 1,\n itemCountPerPage,\n });\n\n const iconColor = (disabled: boolean) =>\n disabled ? contents300 : contents000;\n\n const onClickPrevPage = () => {\n const prevPageToGo =\n activePage === 1 && infinite ? totalLastPage : prevPage;\n onChangePage(prevPageToGo);\n };\n\n const onClickNextPage = () => {\n const nextPageToGo =\n activePage === totalLastPage && infinite ? 1 : nextPage;\n onChangePage(nextPageToGo);\n };\n\n const hasOnlyOnePage = totalLastPage === 1;\n\n const getArrowButtonDisabled = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return true;\n }\n if (infinite) {\n return false;\n }\n return disabled;\n };\n\n const getArrowButtonColor = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return contents300;\n }\n if (infinite) {\n return contents000;\n }\n return iconColor(disabled);\n };\n\n return (\n <CompactPaginationContainer\n className={className}\n role=\"navigation\"\n aria-label=\"페이지네이션\"\n >\n <ArrowButton\n disabled={getArrowButtonDisabled(isPrevPageDisabled)}\n onClick={onClickPrevPage}\n aria-label=\"이전 페이지로 이동\"\n >\n <IconArrow2Left\n size=\"small\"\n color={getArrowButtonColor(isPrevPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n <Flex gap=\"4px\" style={{ minWidth: '44px', userSelect: 'none' }}>\n <CurrentPage>{activePage}</CurrentPage>/ {totalLastPage}\n </Flex>\n <ArrowButton\n disabled={getArrowButtonDisabled(isNextPageDisabled)}\n onClick={onClickNextPage}\n aria-label=\"다음 페이지로 이동\"\n >\n <IconArrow2Right\n size=\"small\"\n color={getArrowButtonColor(isNextPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n </CompactPaginationContainer>\n );\n}\n"],"names":["activePage","totalItemCount","infinite","pageRangeDisplayed","itemCountPerPage","className","role","disabled","onClick","size","color","gap","style","minWidth","userSelect","children"],"mappings":";;;;;;;;;;AAeO;AAOoB;AANzBA;;AACAC;;;;AAGAC;;;AAUEF;AACAC;AACAE;AACAC;AACF;;;;;;AAEA;AAAoC;AACE;AAEtC;;;;AAMA;;;;AAMA;AAEA;AACE;AACE;AACF;AACA;AACE;AACF;AACA;;AAGF;AACE;AACE;AACF;AACA;AACE;AACF;;;;AAMEC;AACAC;AACA;;AAGEC;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AAEEC;AAAUC;AAASC;AAAkBC;;;AAC7BC;;AAA2C;AAGvDR;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AACU;AAGpB;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Paginations/CompactPagination/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconArrow2Left, IconArrow2Right } from '@remember-web/icon';\nimport { contents000, contents300 } from '@remember-web/mixin';\n\nimport Flex from '@/Common/Flex';\n\nimport {\n ArrowButton,\n CompactPaginationContainer,\n CurrentPage,\n} from '../styles';\nimport type { CompactPaginationProps } from '../types';\nimport usePagination from '../usePagination';\n\nexport function CompactPagination({\n activePage = 1,\n totalItemCount = 0,\n onChangePage,\n itemCountPerPage,\n infinite = false,\n className,\n}: CompactPaginationProps) {\n const {\n totalLastPage,\n prevPage,\n nextPage,\n isPrevPageDisabled,\n isNextPageDisabled,\n } = usePagination({\n activePage,\n totalItemCount,\n pageRangeDisplayed: 1,\n itemCountPerPage,\n });\n\n const iconColor = (disabled: boolean) =>\n disabled ? contents300 : contents000;\n\n const onClickPrevPage = () => {\n const prevPageToGo =\n activePage === 1 && infinite ? totalLastPage : prevPage;\n onChangePage(prevPageToGo);\n };\n\n const onClickNextPage = () => {\n const nextPageToGo =\n activePage === totalLastPage && infinite ? 1 : nextPage;\n onChangePage(nextPageToGo);\n };\n\n const hasOnlyOnePage = totalLastPage === 1;\n\n const getArrowButtonDisabled = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return true;\n }\n if (infinite) {\n return false;\n }\n return disabled;\n };\n\n const getArrowButtonColor = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return contents300;\n }\n if (infinite) {\n return contents000;\n }\n return iconColor(disabled);\n };\n\n return (\n <CompactPaginationContainer\n className={className}\n role=\"navigation\"\n aria-label=\"페이지네이션\"\n >\n <ArrowButton\n disabled={getArrowButtonDisabled(isPrevPageDisabled)}\n onClick={onClickPrevPage}\n aria-label=\"이전 페이지로 이동\"\n >\n <IconArrow2Left\n size=\"small\"\n color={getArrowButtonColor(isPrevPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n <Flex gap=\"4px\" style={{ minWidth: '44px', userSelect: 'none' }}>\n <CurrentPage>{activePage}</CurrentPage>/ {totalLastPage}\n </Flex>\n <ArrowButton\n disabled={getArrowButtonDisabled(isNextPageDisabled)}\n onClick={onClickNextPage}\n aria-label=\"다음 페이지로 이동\"\n >\n <IconArrow2Right\n size=\"small\"\n color={getArrowButtonColor(isNextPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n </CompactPaginationContainer>\n );\n}\n"],"names":["activePage","totalItemCount","infinite","pageRangeDisplayed","itemCountPerPage","className","role","disabled","onClick","size","color","gap","style","minWidth","userSelect","children"],"mappings":";;;;;;;;;;AAeO;AAOoB;AANzBA;;AACAC;;;;AAGAC;;;AAUEF;AACAC;AACAE;AACAC;AACF;;;;;;AAEA;AAAoC;AACE;AAEtC;;;;AAMA;;;;AAMA;AAEA;AACE;AACE;AACF;AACA;AACE;AACF;AACA;;AAGF;AACE;AACE;AACF;AACA;AACE;AACF;;;;AAMEC;AACAC;AACA;;AAGEC;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AAEEC;AAAUC;AAASC;AAAkBC;;;AAC7BC;;AAA2C;AAGvDR;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AACU;AAGpB;;"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { IconArrow2Left, IconArrow2Right } from '@remember-web/icon';
3
3
  import { contents300, contents000 } from '@remember-web/mixin';
4
- import { Flex } from '../../Common/Flex/index.esm.js';
4
+ import Flex from '../../Common/Flex/index.esm.js';
5
5
  import { CompactPaginationContainer, ArrowButton, CurrentPage } from '../styles.esm.js';
6
6
  import usePagination from '../usePagination.esm.js';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/Paginations/CompactPagination/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconArrow2Left, IconArrow2Right } from '@remember-web/icon';\nimport { contents000, contents300 } from '@remember-web/mixin';\n\nimport { Flex } from '@/Common/Flex';\n\nimport {\n ArrowButton,\n CompactPaginationContainer,\n CurrentPage,\n} from '../styles';\nimport type { CompactPaginationProps } from '../types';\nimport usePagination from '../usePagination';\n\nexport function CompactPagination({\n activePage = 1,\n totalItemCount = 0,\n onChangePage,\n itemCountPerPage,\n infinite = false,\n className,\n}: CompactPaginationProps) {\n const {\n totalLastPage,\n prevPage,\n nextPage,\n isPrevPageDisabled,\n isNextPageDisabled,\n } = usePagination({\n activePage,\n totalItemCount,\n pageRangeDisplayed: 1,\n itemCountPerPage,\n });\n\n const iconColor = (disabled: boolean) =>\n disabled ? contents300 : contents000;\n\n const onClickPrevPage = () => {\n const prevPageToGo =\n activePage === 1 && infinite ? totalLastPage : prevPage;\n onChangePage(prevPageToGo);\n };\n\n const onClickNextPage = () => {\n const nextPageToGo =\n activePage === totalLastPage && infinite ? 1 : nextPage;\n onChangePage(nextPageToGo);\n };\n\n const hasOnlyOnePage = totalLastPage === 1;\n\n const getArrowButtonDisabled = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return true;\n }\n if (infinite) {\n return false;\n }\n return disabled;\n };\n\n const getArrowButtonColor = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return contents300;\n }\n if (infinite) {\n return contents000;\n }\n return iconColor(disabled);\n };\n\n return (\n <CompactPaginationContainer\n className={className}\n role=\"navigation\"\n aria-label=\"페이지네이션\"\n >\n <ArrowButton\n disabled={getArrowButtonDisabled(isPrevPageDisabled)}\n onClick={onClickPrevPage}\n aria-label=\"이전 페이지로 이동\"\n >\n <IconArrow2Left\n size=\"small\"\n color={getArrowButtonColor(isPrevPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n <Flex gap=\"4px\" style={{ minWidth: '44px', userSelect: 'none' }}>\n <CurrentPage>{activePage}</CurrentPage>/ {totalLastPage}\n </Flex>\n <ArrowButton\n disabled={getArrowButtonDisabled(isNextPageDisabled)}\n onClick={onClickNextPage}\n aria-label=\"다음 페이지로 이동\"\n >\n <IconArrow2Right\n size=\"small\"\n color={getArrowButtonColor(isNextPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n </CompactPaginationContainer>\n );\n}\n"],"names":["activePage","totalItemCount","infinite","pageRangeDisplayed","itemCountPerPage","className","role","disabled","onClick","size","color","gap","style","minWidth","userSelect","children"],"mappings":";;;;;;;;AAeO;AAOoB;AANzBA;;AACAC;;;;AAGAC;;;AAUEF;AACAC;AACAE;AACAC;AACF;;;;;;AAEA;AAAoC;AACE;AAEtC;;;;AAMA;;;;AAMA;AAEA;AACE;AACE;AACF;AACA;AACE;AACF;AACA;;AAGF;AACE;AACE;AACF;AACA;AACE;AACF;;;;AAMEC;AACAC;AACA;;AAGEC;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AAEEC;AAAUC;AAASC;AAAkBC;;;AAC7BC;;AAA2C;AAGvDR;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AACU;AAGpB;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Paginations/CompactPagination/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconArrow2Left, IconArrow2Right } from '@remember-web/icon';\nimport { contents000, contents300 } from '@remember-web/mixin';\n\nimport Flex from '@/Common/Flex';\n\nimport {\n ArrowButton,\n CompactPaginationContainer,\n CurrentPage,\n} from '../styles';\nimport type { CompactPaginationProps } from '../types';\nimport usePagination from '../usePagination';\n\nexport function CompactPagination({\n activePage = 1,\n totalItemCount = 0,\n onChangePage,\n itemCountPerPage,\n infinite = false,\n className,\n}: CompactPaginationProps) {\n const {\n totalLastPage,\n prevPage,\n nextPage,\n isPrevPageDisabled,\n isNextPageDisabled,\n } = usePagination({\n activePage,\n totalItemCount,\n pageRangeDisplayed: 1,\n itemCountPerPage,\n });\n\n const iconColor = (disabled: boolean) =>\n disabled ? contents300 : contents000;\n\n const onClickPrevPage = () => {\n const prevPageToGo =\n activePage === 1 && infinite ? totalLastPage : prevPage;\n onChangePage(prevPageToGo);\n };\n\n const onClickNextPage = () => {\n const nextPageToGo =\n activePage === totalLastPage && infinite ? 1 : nextPage;\n onChangePage(nextPageToGo);\n };\n\n const hasOnlyOnePage = totalLastPage === 1;\n\n const getArrowButtonDisabled = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return true;\n }\n if (infinite) {\n return false;\n }\n return disabled;\n };\n\n const getArrowButtonColor = (disabled: boolean) => {\n if (hasOnlyOnePage) {\n return contents300;\n }\n if (infinite) {\n return contents000;\n }\n return iconColor(disabled);\n };\n\n return (\n <CompactPaginationContainer\n className={className}\n role=\"navigation\"\n aria-label=\"페이지네이션\"\n >\n <ArrowButton\n disabled={getArrowButtonDisabled(isPrevPageDisabled)}\n onClick={onClickPrevPage}\n aria-label=\"이전 페이지로 이동\"\n >\n <IconArrow2Left\n size=\"small\"\n color={getArrowButtonColor(isPrevPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n <Flex gap=\"4px\" style={{ minWidth: '44px', userSelect: 'none' }}>\n <CurrentPage>{activePage}</CurrentPage>/ {totalLastPage}\n </Flex>\n <ArrowButton\n disabled={getArrowButtonDisabled(isNextPageDisabled)}\n onClick={onClickNextPage}\n aria-label=\"다음 페이지로 이동\"\n >\n <IconArrow2Right\n size=\"small\"\n color={getArrowButtonColor(isNextPageDisabled)}\n aria-hidden=\"true\"\n />\n </ArrowButton>\n </CompactPaginationContainer>\n );\n}\n"],"names":["activePage","totalItemCount","infinite","pageRangeDisplayed","itemCountPerPage","className","role","disabled","onClick","size","color","gap","style","minWidth","userSelect","children"],"mappings":";;;;;;;;AAeO;AAOoB;AANzBA;;AACAC;;;;AAGAC;;;AAUEF;AACAC;AACAE;AACAC;AACF;;;;;;AAEA;AAAoC;AACE;AAEtC;;;;AAMA;;;;AAMA;AAEA;AACE;AACE;AACF;AACA;AACE;AACF;AACA;;AAGF;AACE;AACE;AACF;AACA;AACE;AACF;;;;AAMEC;AACAC;AACA;;AAGEC;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AAEEC;AAAUC;AAASC;AAAkBC;;;AAC7BC;;AAA2C;AAGvDR;AACAC;AACA;;AAGEC;AACAC;;;AAEA;AACU;AAGpB;;"}
@@ -6,11 +6,11 @@ var index$1 = require('./Buttons/Button/index.cjs.js');
6
6
  var utils = require('./Badge/utils.cjs.js');
7
7
  var Badge = require('./Badge/Badge.cjs.js');
8
8
  var style = require('./Badge/style.cjs.js');
9
- var index$3 = require('./Common/Divider/index.cjs.js');
10
- var index$4 = require('./Common/Flex/index.cjs.js');
9
+ var index$4 = require('./Common/Divider/index.cjs.js');
10
+ var index$2 = require('./Common/Flex/index.cjs.js');
11
11
  var index$5 = require('./Common/Grid/index.cjs.js');
12
12
  var index$6 = require('./Common/Spinner/index.cjs.js');
13
- var index$2 = require('./Common/Typography/index.cjs.js');
13
+ var index$3 = require('./Common/Typography/index.cjs.js');
14
14
  var styles$1 = require('./Common/Typography/styles.cjs.js');
15
15
  var Checkbox = require('./Control/Checkbox.cjs.js');
16
16
  var Toggle = require('./Control/Toggle.cjs.js');
@@ -39,11 +39,11 @@ exports.Button = index$1;
39
39
  exports.badgePseudo = utils.badgePseudo;
40
40
  exports.Badge = Badge.Badge;
41
41
  exports.getBadgePseudoCss = style.getBadgePseudoCss;
42
- exports.Divider = index$3.Divider;
43
- exports.Flex = index$4.Flex;
42
+ exports.Divider = index$4.Divider;
43
+ exports.Flex = index$2;
44
44
  exports.Grid = index$5.Grid;
45
45
  exports.Spinner = index$6.Spinner;
46
- exports.Typography = index$2;
46
+ exports.Typography = index$3;
47
47
  exports.StyledTypography = styles$1.StyledTypography;
48
48
  exports.Checkbox = Checkbox.Checkbox;
49
49
  exports._Checkbox = Checkbox._Checkbox;
@@ -5,7 +5,7 @@ export { badgePseudo } from './Badge/utils.esm.js';
5
5
  export { Badge } from './Badge/Badge.esm.js';
6
6
  export { getBadgePseudoCss } from './Badge/style.esm.js';
7
7
  export { Divider } from './Common/Divider/index.esm.js';
8
- export { Flex } from './Common/Flex/index.esm.js';
8
+ export { default as Flex } from './Common/Flex/index.esm.js';
9
9
  export { Grid } from './Common/Grid/index.esm.js';
10
10
  export { Spinner } from './Common/Spinner/index.esm.js';
11
11
  export { default as Typography } from './Common/Typography/index.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remember-web/primitive",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Remember Web Primitive Components",
5
5
  "homepage": "https://dramancompany.github.io/remember-web-packages/",
6
6
  "author": "Remember",
@@ -44,7 +44,7 @@
44
44
  "@radix-ui/react-tooltip": "^1.0.7",
45
45
  "@remember-web/icon": "^0.1.9",
46
46
  "@remember-web/mixin": "^0.1.15",
47
- "@remember-web/shared": "^0.1.0"
47
+ "@remember-web/shared": "^0.1.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@babel/core": "^7.24.4",
@@ -56,7 +56,7 @@ export const AnchorButton: Story = {
56
56
  isIconName(iconString) &&
57
57
  createElement(getIconComponentFromName(iconString));
58
58
 
59
- return <Button {...args} icon={iconElement} as="a" href="#" />;
59
+ return <Button {...(args as any)} icon={iconElement} as="a" href="#" />;
60
60
  },
61
61
  };
62
62
 
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import type { ElementType, ForwardRefRenderFunction } from 'react';
3
+ import type { ForwardedRef } from 'react';
4
4
  import { forwardRef } from 'react';
5
- import type { As } from '@remember-web/shared';
5
+ import { type PolymorphicComponent } from 'styled-components';
6
6
 
7
7
  import { Spinner } from '@/Common';
8
8
 
@@ -10,10 +10,7 @@ import { SPINNER_SIZE_MAP } from './const';
10
10
  import { StyledButton } from './styles';
11
11
  import type { ButtonProps } from './types';
12
12
 
13
- const Button: ForwardRefRenderFunction<
14
- HTMLButtonElement,
15
- ButtonProps<'button'> & As<ElementType>
16
- > = (
13
+ const Button = forwardRef(function (
17
14
  {
18
15
  children,
19
16
  color,
@@ -25,37 +22,33 @@ const Button: ForwardRefRenderFunction<
25
22
  icon,
26
23
  iconPosition = 'left',
27
24
  ...props
28
- },
29
- ref
30
- ) => (
31
- <StyledButton
32
- $color={color}
33
- $size={size}
34
- $variant={variant}
35
- $layout={layout}
36
- $isLoading={isLoading}
37
- $filled={filled}
38
- aria-live="polite"
39
- aria-busy={isLoading}
40
- ref={ref}
41
- {...props}
42
- >
43
- {isLoading ? (
44
- <Spinner size={SPINNER_SIZE_MAP[size]} />
45
- ) : (
46
- <>
47
- {iconPosition === 'left' && icon}
48
- {children}
49
- {iconPosition === 'right' && icon}
50
- </>
51
- )}
52
- </StyledButton>
53
- );
25
+ }: ButtonProps,
26
+ ref: ForwardedRef<HTMLButtonElement | null>
27
+ ) {
28
+ return (
29
+ <StyledButton
30
+ $color={color}
31
+ $size={size}
32
+ $variant={variant}
33
+ $layout={layout}
34
+ $isLoading={isLoading}
35
+ $filled={filled}
36
+ aria-live="polite"
37
+ aria-busy={isLoading}
38
+ ref={ref}
39
+ {...props}
40
+ >
41
+ {isLoading ? (
42
+ <Spinner size={SPINNER_SIZE_MAP[size]} />
43
+ ) : (
44
+ <>
45
+ {iconPosition === 'left' && icon}
46
+ {children}
47
+ {iconPosition === 'right' && icon}
48
+ </>
49
+ )}
50
+ </StyledButton>
51
+ );
52
+ }) as PolymorphicComponent<'web', ButtonProps>;
54
53
 
55
- type ButtonComponentWithRef = <T extends ElementType = 'button'>(
56
- props: { as?: T | null } & ButtonProps<T> & {
57
- ref?: React.ComponentPropsWithRef<T>['ref'];
58
- }
59
- ) => React.ReactElement | null;
60
-
61
- export default forwardRef(Button) as ButtonComponentWithRef;
54
+ export default Button;
@@ -1,7 +1,5 @@
1
1
  'use client';
2
2
 
3
- import type { DataAttributes } from 'styled-components';
4
- import styled, { css } from 'styled-components';
5
3
  import {
6
4
  bg100,
7
5
  disabled,
@@ -9,11 +7,12 @@ import {
9
7
  primary100,
10
8
  primary200,
11
9
  } from '@remember-web/mixin';
10
+ import styled, { css } from 'styled-components';
12
11
 
13
12
  import { BUTTON_COLORS, BUTTON_SIZES, ICON_GAP_MAP } from './const';
14
13
  import type { ButtonStyleProps } from './types';
15
14
 
16
- export const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(
15
+ export const StyledButton = styled.button<ButtonStyleProps>(
17
16
  ({ $size, $layout, $color, ...props }) => [
18
17
  // 공용 스타일
19
18
  css`
@@ -1,6 +1,6 @@
1
- import type { ElementType } from 'react';
2
- import type { ConvertTransientProps } from '@remember-web/shared';
3
1
  import type { ColorVariable } from '@remember-web/mixin';
2
+ import type { ConvertTransientProps } from '@remember-web/shared';
3
+ import type { ComponentProps } from 'react';
4
4
 
5
5
  export type ButtonSize = 'small' | 'medium' | 'large' | 'xLarge';
6
6
 
@@ -19,13 +19,7 @@ export interface ButtonStyleProps {
19
19
  $filled?: boolean;
20
20
  }
21
21
 
22
- type ConvertProps = ConvertTransientProps<Partial<ButtonStyleProps>>;
23
-
24
- export type ButtonProps<AsT extends ElementType> = Omit<
25
- React.ComponentPropsWithoutRef<AsT>,
26
- keyof ButtonStyleProps | 'icon' | 'iconPosition'
27
- > &
28
- ConvertProps & {
29
- icon?: React.ReactNode;
30
- iconPosition?: 'left' | 'right';
31
- };
22
+ export type ButtonProps = ConvertTransientProps<Partial<ButtonStyleProps>> & {
23
+ icon?: React.ReactNode;
24
+ iconPosition?: 'left' | 'right';
25
+ } & ComponentProps<'button'>;
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import { Flex } from '../Flex';
3
+ import Flex from '../Flex';
4
4
  import { Divider } from './index';
5
5
 
6
6
  type Story = StoryObj<typeof Divider>;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import type { CSSProperties, ElementType, HTMLAttributes } from 'react';
4
- import styled, { css } from 'styled-components';
5
3
  import type { ConvertTransientProps } from '@remember-web/shared';
4
+ import type { CSSProperties, ComponentProps, ForwardedRef } from 'react';
5
+ import { forwardRef } from 'react';
6
+ import type { PolymorphicComponent } from 'styled-components';
7
+ import styled, { css } from 'styled-components';
6
8
 
7
- export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
8
- as?: ElementType;
9
+ export interface FlexStyledProps extends ComponentProps<'div'> {
9
10
  $align?: CSSProperties['alignItems'];
10
11
  $direction?: CSSProperties['flexDirection'];
11
12
  $justify?: CSSProperties['justifyContent'];
@@ -15,7 +16,7 @@ export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
15
16
  $height?: string | number;
16
17
  }
17
18
 
18
- const StyledFlex = styled.div<Partial<FlexProps>>(
19
+ const StyledFlex = styled.div<Partial<FlexStyledProps>>(
19
20
  ({
20
21
  $align = 'center',
21
22
  $direction = 'row',
@@ -47,26 +48,26 @@ const StyledFlex = styled.div<Partial<FlexProps>>(
47
48
  * @prop {CSSProperties['flexDirection']} direction
48
49
  * @prop {CSSProperties['flexWrap']} wrap
49
50
  */
50
- export const Flex = ({
51
- as,
52
- width,
53
- height,
54
- direction,
55
- gap,
56
- align,
57
- justify,
58
- wrap,
59
- ...props
60
- }: ConvertTransientProps<FlexProps>) => (
61
- <StyledFlex
62
- as={as}
63
- $width={width}
64
- $height={height}
65
- $direction={direction}
66
- $gap={gap}
67
- $align={align}
68
- $justify={justify}
69
- $wrap={wrap}
70
- {...props}
71
- />
72
- );
51
+
52
+ const Flex = forwardRef(function (
53
+ { width, height, direction, gap, align, justify, wrap, ...props }: FlexProps,
54
+ ref: ForwardedRef<HTMLDivElement | null>
55
+ ) {
56
+ return (
57
+ <StyledFlex
58
+ ref={ref}
59
+ $width={width}
60
+ $height={height}
61
+ $direction={direction}
62
+ $gap={gap}
63
+ $align={align}
64
+ $justify={justify}
65
+ $wrap={wrap}
66
+ {...props}
67
+ />
68
+ );
69
+ }) as PolymorphicComponent<'web', FlexProps>;
70
+
71
+ type FlexProps = ConvertTransientProps<FlexStyledProps>;
72
+
73
+ export default Flex;
@@ -30,6 +30,7 @@ const StyledGrid = styled.div<Partial<GridProps>>`
30
30
  `;
31
31
 
32
32
  /**
33
+ * @deprecated
33
34
  * @prop {string} width
34
35
  * @prop {string} height
35
36
  * @prop {CSSProperties['alignItems']} align
@@ -1,54 +1,41 @@
1
1
  'use client';
2
2
 
3
+ import { type TypographyStyle } from '@remember-web/mixin';
3
4
  import type {
4
- ComponentPropsWithoutRef,
5
- ComponentPropsWithRef,
6
5
  CSSProperties,
7
- ElementType,
8
- ReactElement,
6
+ ComponentProps,
7
+ ForwardedRef,
9
8
  ReactNode,
10
9
  } from 'react';
11
10
  import { forwardRef } from 'react';
12
- import { type TypographyStyle } from '@remember-web/mixin';
11
+ import type { PolymorphicComponent } from 'styled-components';
13
12
 
14
13
  import { StyledTypography } from './styles';
15
14
 
16
- const Typography = <T extends ElementType>(
17
- {
18
- variant,
19
- as,
20
- color,
21
- children,
22
- ellipsis,
23
- maxWidth,
24
- ...props
25
- }: TypographyProps<T>,
26
- ref: ComponentPropsWithRef<T>['ref']
27
- ) => (
28
- <StyledTypography
29
- ref={ref}
30
- as={as}
31
- $variant={variant}
32
- $color={color}
33
- $ellipsis={ellipsis}
34
- $maxWidth={maxWidth}
35
- {...props}
36
- >
37
- {children}
38
- </StyledTypography>
39
- );
15
+ const Typography = forwardRef(function (
16
+ { variant, color, children, ellipsis, maxWidth, ...props }: TypographyProps,
17
+ ref: ForwardedRef<HTMLDivElement | null>
18
+ ) {
19
+ return (
20
+ <StyledTypography
21
+ ref={ref}
22
+ $variant={variant}
23
+ $color={color}
24
+ $ellipsis={ellipsis}
25
+ $maxWidth={maxWidth}
26
+ {...props}
27
+ >
28
+ {children}
29
+ </StyledTypography>
30
+ );
31
+ }) as PolymorphicComponent<'web', TypographyProps>;
40
32
 
41
- type TypographyProps<T extends ElementType> = {
33
+ type TypographyProps = {
42
34
  variant: TypographyStyle;
43
- as?: T;
44
35
  color?: string;
45
36
  children?: ReactNode;
46
37
  ellipsis?: number;
47
38
  maxWidth?: CSSProperties['maxWidth'];
48
- } & ComponentPropsWithoutRef<T>;
49
-
50
- type TypographyComponentWithRef = <T extends ElementType = 'div'>(
51
- props: TypographyProps<T> & { ref?: ComponentPropsWithRef<T>['ref'] }
52
- ) => ReactElement | null;
39
+ } & ComponentProps<'div'>;
53
40
 
54
- export default forwardRef(Typography) as TypographyComponentWithRef;
41
+ export default Typography;
@@ -1,5 +1,5 @@
1
1
  export * from './Divider';
2
- export * from './Flex';
2
+ export { default as Flex } from './Flex';
3
3
  export * from './Grid';
4
4
  export * from './Spinner';
5
5
  export { default as Typography } from './Typography';
@@ -4,7 +4,7 @@ import type { DialogContentProps, DialogProps } from '@radix-ui/react-dialog';
4
4
  import { Root, Trigger, Close, Portal } from '@radix-ui/react-dialog';
5
5
  import { IconClose, PictogramAlert, PictogramCheck } from '@remember-web/icon';
6
6
 
7
- import { Flex } from '@/Common/Flex';
7
+ import Flex from '@/Common/Flex';
8
8
 
9
9
  import {
10
10
  DialogContent,
@@ -3,7 +3,7 @@
3
3
  import { IconArrow2Left, IconArrow2Right } from '@remember-web/icon';
4
4
  import { contents000, contents300 } from '@remember-web/mixin';
5
5
 
6
- import { Flex } from '@/Common/Flex';
6
+ import Flex from '@/Common/Flex';
7
7
 
8
8
  import {
9
9
  ArrowButton,