@remember-web/primitive 0.1.17 → 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 (67) 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/Control/BaseToggle/ToggleIcon/index.cjs.js +14 -3
  36. package/dist/src/Control/BaseToggle/ToggleIcon/index.cjs.js.map +1 -1
  37. package/dist/src/Control/BaseToggle/ToggleIcon/index.d.ts.map +1 -1
  38. package/dist/src/Control/BaseToggle/ToggleIcon/index.esm.js +9 -3
  39. package/dist/src/Control/BaseToggle/ToggleIcon/index.esm.js.map +1 -1
  40. package/dist/src/Control/BaseToggle/styles.cjs.js +2 -2
  41. package/dist/src/Control/BaseToggle/styles.cjs.js.map +1 -1
  42. package/dist/src/Control/BaseToggle/styles.esm.js +2 -2
  43. package/dist/src/Control/BaseToggle/styles.esm.js.map +1 -1
  44. package/dist/src/Modals/Dialog/index.cjs.js +1 -1
  45. package/dist/src/Modals/Dialog/index.cjs.js.map +1 -1
  46. package/dist/src/Modals/Dialog/index.esm.js +1 -1
  47. package/dist/src/Modals/Dialog/index.esm.js.map +1 -1
  48. package/dist/src/Paginations/CompactPagination/index.cjs.js +1 -1
  49. package/dist/src/Paginations/CompactPagination/index.cjs.js.map +1 -1
  50. package/dist/src/Paginations/CompactPagination/index.esm.js +1 -1
  51. package/dist/src/Paginations/CompactPagination/index.esm.js.map +1 -1
  52. package/dist/src/index.cjs.js +6 -6
  53. package/dist/src/index.esm.js +1 -1
  54. package/package.json +2 -2
  55. package/src/Buttons/Button/Button.stories.tsx +1 -1
  56. package/src/Buttons/Button/index.tsx +32 -39
  57. package/src/Buttons/Button/styles.ts +2 -3
  58. package/src/Buttons/Button/types.ts +6 -12
  59. package/src/Common/Divider/Divider.stories.tsx +1 -1
  60. package/src/Common/Flex/index.tsx +29 -28
  61. package/src/Common/Grid/index.tsx +1 -0
  62. package/src/Common/Typography/index.tsx +24 -37
  63. package/src/Common/index.ts +1 -1
  64. package/src/Control/BaseToggle/ToggleIcon/index.tsx +14 -1
  65. package/src/Control/BaseToggle/styles.ts +10 -10
  66. package/src/Modals/Dialog/index.tsx +1 -1
  67. 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"}