@remember-web/primitive 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/Avatars/Avatar/index.cjs.js +1 -1
- package/dist/src/Avatars/Avatar/index.cjs.js.map +1 -1
- package/dist/src/Avatars/Avatar/index.esm.js +2 -2
- package/dist/src/Avatars/Avatar/index.esm.js.map +1 -1
- package/dist/src/Chips/Chip/index.cjs.js +1 -0
- package/dist/src/Chips/Chip/index.cjs.js.map +1 -1
- package/dist/src/Chips/Chip/index.d.ts.map +1 -1
- package/dist/src/Chips/Chip/index.esm.js +1 -0
- package/dist/src/Chips/Chip/index.esm.js.map +1 -1
- package/dist/src/Logos/EnvLabel/index.d.ts +0 -1
- package/dist/src/Logos/EnvLabel/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/Avatars/Avatar/Avatar.stories.tsx +1 -1
- package/src/Avatars/Avatar/index.tsx +2 -2
- package/src/Chips/Chip/index.tsx +1 -0
|
@@ -23,7 +23,7 @@ var Avatar = function Avatar(_ref, ref) {
|
|
|
23
23
|
var _ref$size = _ref.size,
|
|
24
24
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
25
25
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
26
|
-
backgroundColor = _ref$backgroundColor === void 0 ? mixin.
|
|
26
|
+
backgroundColor = _ref$backgroundColor === void 0 ? mixin.fixedBgWhite : _ref$backgroundColor,
|
|
27
27
|
_ref$border = _ref.border,
|
|
28
28
|
border = _ref$border === void 0 ? {
|
|
29
29
|
color: mixin.divider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Avatars/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconAvatarEmpty } from '@remember-web/icon';\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Avatars/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconAvatarEmpty } from '@remember-web/icon';\nimport { divider, fixedBgWhite } from '@remember-web/mixin';\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport type { ComponentPropsWithoutRef, ForwardRefRenderFunction } from 'react';\nimport { forwardRef, useState } from 'react';\n\nimport type { StyledAvatarProps } from '@/Avatars/Avatar/styles';\nimport {\n AvatarContainer,\n StyledAvatar,\n StyledBottomBadge,\n StyledNotificationBadge,\n} from '@/Avatars/Avatar/styles';\n\nexport type AvatarProps = Partial<ConvertTransientProps<StyledAvatarProps>> &\n ComponentPropsWithoutRef<'div'>;\n\nconst Avatar: ForwardRefRenderFunction<HTMLDivElement, AvatarProps> = (\n {\n size = 'medium',\n backgroundColor = fixedBgWhite,\n border = { color: divider, width: '1px' },\n rounded = true,\n imageUrl,\n badges,\n children,\n ...rest\n }: AvatarProps,\n ref\n) => {\n const [imageError, setImageError] = useState(false);\n\n return (\n <AvatarContainer ref={ref} {...rest}>\n <StyledAvatar\n $size={size}\n $backgroundColor={backgroundColor}\n $border={border}\n $rounded={rounded}\n $badges={badges}\n >\n {!imageError && imageUrl ? (\n <img\n src={imageUrl}\n loading=\"lazy\"\n alt=\"avatar\"\n onError={() => setImageError(true)}\n />\n ) : (\n children ?? <IconAvatarEmpty size=\"100%\" />\n )}\n </StyledAvatar>\n\n {badges?.bottom && (\n <StyledBottomBadge $size={size} $bgColor={badges.bottom.bgColor}>\n {badges.bottom.content}\n </StyledBottomBadge>\n )}\n\n {badges?.notification && <StyledNotificationBadge $size={size} />}\n </AvatarContainer>\n );\n};\n\nexport default forwardRef(Avatar);\n"],"names":["size","backgroundColor","color","width","rounded","rest","imageError","setImageError","ref","$size","$backgroundColor","$border","$rounded","$badges","children","src","loading","alt","$bgColor"],"mappings":";;;;;;;;;;;;;;;;;;AAAa;AAAA;AAAA;AAmBb;AAYK;AAVDA;;AACAC;;;AACWC;AAAgBC;AAAa;;AACxCC;;;;AAIGC;AAIL;;AAAOC;AAAYC;AAEnB;AACmBC;AAAS;;AAEtBC;AACAC;AACAC;AACAC;AACAC;AAAgBC;AAIZC;AACAC;AACAC;;;AACkC;;AAGPjB;;AAC9B;AAIkBS;AAAaS;AAAgCJ;AACxC;AAIwBL;AAAY;AAAG;AAGvE;AAEA;;"}
|
|
@@ -3,7 +3,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import { IconAvatarEmpty } from '@remember-web/icon';
|
|
6
|
-
import { divider,
|
|
6
|
+
import { divider, fixedBgWhite } from '@remember-web/mixin';
|
|
7
7
|
import { forwardRef, useState } from 'react';
|
|
8
8
|
import { AvatarContainer, StyledAvatar, StyledBottomBadge, StyledNotificationBadge } from './styles.esm.js';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -15,7 +15,7 @@ var Avatar = function Avatar(_ref, ref) {
|
|
|
15
15
|
var _ref$size = _ref.size,
|
|
16
16
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
17
17
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
18
|
-
backgroundColor = _ref$backgroundColor === void 0 ?
|
|
18
|
+
backgroundColor = _ref$backgroundColor === void 0 ? fixedBgWhite : _ref$backgroundColor,
|
|
19
19
|
_ref$border = _ref.border,
|
|
20
20
|
border = _ref$border === void 0 ? {
|
|
21
21
|
color: divider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../../src/Avatars/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconAvatarEmpty } from '@remember-web/icon';\nimport {
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../../src/Avatars/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { IconAvatarEmpty } from '@remember-web/icon';\nimport { divider, fixedBgWhite } from '@remember-web/mixin';\nimport type { ConvertTransientProps } from '@remember-web/shared';\nimport type { ComponentPropsWithoutRef, ForwardRefRenderFunction } from 'react';\nimport { forwardRef, useState } from 'react';\n\nimport type { StyledAvatarProps } from '@/Avatars/Avatar/styles';\nimport {\n AvatarContainer,\n StyledAvatar,\n StyledBottomBadge,\n StyledNotificationBadge,\n} from '@/Avatars/Avatar/styles';\n\nexport type AvatarProps = Partial<ConvertTransientProps<StyledAvatarProps>> &\n ComponentPropsWithoutRef<'div'>;\n\nconst Avatar: ForwardRefRenderFunction<HTMLDivElement, AvatarProps> = (\n {\n size = 'medium',\n backgroundColor = fixedBgWhite,\n border = { color: divider, width: '1px' },\n rounded = true,\n imageUrl,\n badges,\n children,\n ...rest\n }: AvatarProps,\n ref\n) => {\n const [imageError, setImageError] = useState(false);\n\n return (\n <AvatarContainer ref={ref} {...rest}>\n <StyledAvatar\n $size={size}\n $backgroundColor={backgroundColor}\n $border={border}\n $rounded={rounded}\n $badges={badges}\n >\n {!imageError && imageUrl ? (\n <img\n src={imageUrl}\n loading=\"lazy\"\n alt=\"avatar\"\n onError={() => setImageError(true)}\n />\n ) : (\n children ?? <IconAvatarEmpty size=\"100%\" />\n )}\n </StyledAvatar>\n\n {badges?.bottom && (\n <StyledBottomBadge $size={size} $bgColor={badges.bottom.bgColor}>\n {badges.bottom.content}\n </StyledBottomBadge>\n )}\n\n {badges?.notification && <StyledNotificationBadge $size={size} />}\n </AvatarContainer>\n );\n};\n\nexport default forwardRef(Avatar);\n"],"names":["size","backgroundColor","color","width","rounded","rest","imageError","setImageError","ref","$size","$backgroundColor","$border","$rounded","$badges","children","src","loading","alt","$bgColor"],"mappings":";;;;;;;;;;AAAa;AAAA;AAAA;AAmBb;AAYK;AAVDA;;AACAC;;;AACWC;AAAgBC;AAAa;;AACxCC;;;;AAIGC;AAIL;;AAAOC;AAAYC;AAEnB;AACmBC;AAAS;;AAEtBC;AACAC;AACAC;AACAC;AACAC;AAAgBC;AAIZC;AACAC;AACAC;;;AACkC;;AAGPjB;;AAC9B;AAIkBS;AAAaS;AAAgCJ;AACxC;AAIwBL;AAAY;AAAG;AAGvE;AAEA;;"}
|
|
@@ -41,6 +41,7 @@ var Chip = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
41
41
|
"data-chip-disabled": props.disabled
|
|
42
42
|
}, rest), {}, {
|
|
43
43
|
children: [props.leftIcon, props.children, props.onDelete && /*#__PURE__*/jsxRuntime.jsx(styles.ButtonWrapper, {
|
|
44
|
+
type: "button",
|
|
44
45
|
onClick: function onClick(e) {
|
|
45
46
|
var _props$onDelete;
|
|
46
47
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Chips/Chip/index.tsx"],"sourcesContent":["import { IconCloseS } from '@remember-web/icon';\nimport { type ForwardedRef, forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport { ButtonWrapper, StyledChip } from './styles';\nimport { ensureValidChipProps } from './typeGuard';\nimport type { ChipProps } from './types';\n\nexport const Chip = forwardRef(\n (props: ChipProps, ref: ForwardedRef<HTMLDivElement | null>) => {\n const {\n size = 'medium',\n variant = 'filled',\n selected = false,\n clickable = true,\n ...rest\n } = props;\n\n // NOTE: 개발 모드에서만 런타임 체크 수행\n if (process.env.NODE_ENV === 'development') {\n ensureValidChipProps(props);\n }\n\n return (\n <StyledChip\n ref={ref}\n aria-live=\"polite\"\n $size={size}\n $variant={variant}\n $selected={selected}\n $clickable={clickable}\n data-chip-disabled={props.disabled}\n {...rest}\n >\n {props.leftIcon}\n {props.children}\n {props.onDelete && (\n <ButtonWrapper\n onClick={(e: React.MouseEvent | React.KeyboardEvent) => {\n e.stopPropagation();\n e.preventDefault();\n props.onDelete?.();\n }}\n className=\"delete-button\"\n >\n {props.deleteIcon || <IconCloseS />}\n </ButtonWrapper>\n )}\n </StyledChip>\n );\n }\n) as PolymorphicComponent<'web', ChipProps>;\n"],"names":["Chip","forwardRef","props","ref","_props$size","size","_props$variant","variant","_props$selected","selected","_props$clickable","clickable","rest","_objectWithoutProperties","_excluded","process","env","NODE_ENV","ensureValidChipProps","_jsxs","StyledChip","_objectSpread","$size","$variant","$selected","$clickable","disabled","children","leftIcon","onDelete","_jsx","ButtonWrapper","onClick","e","_props$onDelete","stopPropagation","preventDefault","call","className","deleteIcon","IconCloseS"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,IAAMA,IAAI,gBAAGC,gBAAU,CAC5B,UAACC,KAAgB,EAAEC,GAAwC,EAAK;AAC9D,EAAA,IAAAC,WAAA,GAMIF,KAAK,CALPG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,WAAA;IAAAE,cAAA,GAKbJ,KAAK,CAJPK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,cAAA;IAAAE,eAAA,GAIhBN,KAAK,CAHPO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,eAAA;IAAAE,gBAAA,GAGdR,KAAK,CAFPS,SAAS;AAATA,IAAAA,SAAS,GAAAD,gBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,gBAAA;AACbE,IAAAA,IAAI,GAAAC,yCAAA,CACLX,KAAK,EAAAY,SAAA,CAAA;;AAET;AACA,EAAA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa,EAAE;IAC1CC,8BAAoB,CAAChB,KAAK,CAAC;AAC7B;AAEA,EAAA,oBACEiB,eAAA,CAACC,iBAAU,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACTlB,IAAAA,GAAG,EAAEA,GAAI;AACT,IAAA,WAAA,EAAU,QAAQ;AAClBmB,IAAAA,KAAK,EAAEjB,IAAK;AACZkB,IAAAA,QAAQ,EAAEhB,OAAQ;AAClBiB,IAAAA,SAAS,EAAEf,QAAS;AACpBgB,IAAAA,UAAU,EAAEd,SAAU;AACtB,IAAA,oBAAA,EAAoBT,KAAK,CAACwB;AAAS,GAAA,EAC/Bd,IAAI,CAAA,EAAA,EAAA,EAAA;AAAAe,IAAAA,QAAA,EAAA,CAEPzB,KAAK,CAAC0B,QAAQ,EACd1B,KAAK,CAACyB,QAAQ,EACdzB,KAAK,CAAC2B,QAAQ,iBACbC,cAAA,CAACC,oBAAa,EAAA;AACZC,MAAAA,OAAO,EAAE,SAAAA,OAAAA,CAACC,CAAyC,EAAK;AAAA,QAAA,IAAAC,eAAA;QACtDD,CAAC,CAACE,eAAe,EAAE;QACnBF,CAAC,CAACG,cAAc,EAAE;AAClB,QAAA,CAAAF,eAAA,
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../../src/Chips/Chip/index.tsx"],"sourcesContent":["import { IconCloseS } from '@remember-web/icon';\nimport { type ForwardedRef, forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport { ButtonWrapper, StyledChip } from './styles';\nimport { ensureValidChipProps } from './typeGuard';\nimport type { ChipProps } from './types';\n\nexport const Chip = forwardRef(\n (props: ChipProps, ref: ForwardedRef<HTMLDivElement | null>) => {\n const {\n size = 'medium',\n variant = 'filled',\n selected = false,\n clickable = true,\n ...rest\n } = props;\n\n // NOTE: 개발 모드에서만 런타임 체크 수행\n if (process.env.NODE_ENV === 'development') {\n ensureValidChipProps(props);\n }\n\n return (\n <StyledChip\n ref={ref}\n aria-live=\"polite\"\n $size={size}\n $variant={variant}\n $selected={selected}\n $clickable={clickable}\n data-chip-disabled={props.disabled}\n {...rest}\n >\n {props.leftIcon}\n {props.children}\n {props.onDelete && (\n <ButtonWrapper\n type=\"button\"\n onClick={(e: React.MouseEvent | React.KeyboardEvent) => {\n e.stopPropagation();\n e.preventDefault();\n props.onDelete?.();\n }}\n className=\"delete-button\"\n >\n {props.deleteIcon || <IconCloseS />}\n </ButtonWrapper>\n )}\n </StyledChip>\n );\n }\n) as PolymorphicComponent<'web', ChipProps>;\n"],"names":["Chip","forwardRef","props","ref","_props$size","size","_props$variant","variant","_props$selected","selected","_props$clickable","clickable","rest","_objectWithoutProperties","_excluded","process","env","NODE_ENV","ensureValidChipProps","_jsxs","StyledChip","_objectSpread","$size","$variant","$selected","$clickable","disabled","children","leftIcon","onDelete","_jsx","ButtonWrapper","type","onClick","e","_props$onDelete","stopPropagation","preventDefault","call","className","deleteIcon","IconCloseS"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,IAAMA,IAAI,gBAAGC,gBAAU,CAC5B,UAACC,KAAgB,EAAEC,GAAwC,EAAK;AAC9D,EAAA,IAAAC,WAAA,GAMIF,KAAK,CALPG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,WAAA;IAAAE,cAAA,GAKbJ,KAAK,CAJPK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,cAAA;IAAAE,eAAA,GAIhBN,KAAK,CAHPO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,eAAA;IAAAE,gBAAA,GAGdR,KAAK,CAFPS,SAAS;AAATA,IAAAA,SAAS,GAAAD,gBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,gBAAA;AACbE,IAAAA,IAAI,GAAAC,yCAAA,CACLX,KAAK,EAAAY,SAAA,CAAA;;AAET;AACA,EAAA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa,EAAE;IAC1CC,8BAAoB,CAAChB,KAAK,CAAC;AAC7B;AAEA,EAAA,oBACEiB,eAAA,CAACC,iBAAU,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACTlB,IAAAA,GAAG,EAAEA,GAAI;AACT,IAAA,WAAA,EAAU,QAAQ;AAClBmB,IAAAA,KAAK,EAAEjB,IAAK;AACZkB,IAAAA,QAAQ,EAAEhB,OAAQ;AAClBiB,IAAAA,SAAS,EAAEf,QAAS;AACpBgB,IAAAA,UAAU,EAAEd,SAAU;AACtB,IAAA,oBAAA,EAAoBT,KAAK,CAACwB;AAAS,GAAA,EAC/Bd,IAAI,CAAA,EAAA,EAAA,EAAA;AAAAe,IAAAA,QAAA,EAAA,CAEPzB,KAAK,CAAC0B,QAAQ,EACd1B,KAAK,CAACyB,QAAQ,EACdzB,KAAK,CAAC2B,QAAQ,iBACbC,cAAA,CAACC,oBAAa,EAAA;AACZC,MAAAA,IAAI,EAAC,QAAQ;AACbC,MAAAA,OAAO,EAAE,SAAAA,OAAAA,CAACC,CAAyC,EAAK;AAAA,QAAA,IAAAC,eAAA;QACtDD,CAAC,CAACE,eAAe,EAAE;QACnBF,CAAC,CAACG,cAAc,EAAE;AAClB,QAAA,CAAAF,eAAA,GAAAjC,KAAK,CAAC2B,QAAQ,MAAA,IAAA,IAAAM,eAAA,KAAA,MAAA,IAAdA,eAAA,CAAAG,IAAA,CAAApC,KAAiB,CAAC;OAClB;AACFqC,MAAAA,SAAS,EAAC,eAAe;MAAAZ,QAAA,EAExBzB,KAAK,CAACsC,UAAU,iBAAIV,cAAA,CAACW,eAAU,EAAA,EAAE;AAAC,KACtB,CAChB;AAAA,GAAA,CACS,CAAC;AAEjB,CACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Chips/Chip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Chips/Chip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,wCA4C0B,CAAC"}
|
|
@@ -34,6 +34,7 @@ var Chip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
34
34
|
"data-chip-disabled": props.disabled
|
|
35
35
|
}, rest), {}, {
|
|
36
36
|
children: [props.leftIcon, props.children, props.onDelete && /*#__PURE__*/jsx(ButtonWrapper, {
|
|
37
|
+
type: "button",
|
|
37
38
|
onClick: function onClick(e) {
|
|
38
39
|
var _props$onDelete;
|
|
39
40
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../../src/Chips/Chip/index.tsx"],"sourcesContent":["import { IconCloseS } from '@remember-web/icon';\nimport { type ForwardedRef, forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport { ButtonWrapper, StyledChip } from './styles';\nimport { ensureValidChipProps } from './typeGuard';\nimport type { ChipProps } from './types';\n\nexport const Chip = forwardRef(\n (props: ChipProps, ref: ForwardedRef<HTMLDivElement | null>) => {\n const {\n size = 'medium',\n variant = 'filled',\n selected = false,\n clickable = true,\n ...rest\n } = props;\n\n // NOTE: 개발 모드에서만 런타임 체크 수행\n if (process.env.NODE_ENV === 'development') {\n ensureValidChipProps(props);\n }\n\n return (\n <StyledChip\n ref={ref}\n aria-live=\"polite\"\n $size={size}\n $variant={variant}\n $selected={selected}\n $clickable={clickable}\n data-chip-disabled={props.disabled}\n {...rest}\n >\n {props.leftIcon}\n {props.children}\n {props.onDelete && (\n <ButtonWrapper\n onClick={(e: React.MouseEvent | React.KeyboardEvent) => {\n e.stopPropagation();\n e.preventDefault();\n props.onDelete?.();\n }}\n className=\"delete-button\"\n >\n {props.deleteIcon || <IconCloseS />}\n </ButtonWrapper>\n )}\n </StyledChip>\n );\n }\n) as PolymorphicComponent<'web', ChipProps>;\n"],"names":["Chip","forwardRef","props","ref","_props$size","size","_props$variant","variant","_props$selected","selected","_props$clickable","clickable","rest","_objectWithoutProperties","_excluded","process","env","NODE_ENV","ensureValidChipProps","_jsxs","StyledChip","_objectSpread","$size","$variant","$selected","$clickable","disabled","children","leftIcon","onDelete","_jsx","ButtonWrapper","onClick","e","_props$onDelete","stopPropagation","preventDefault","call","className","deleteIcon","IconCloseS"],"mappings":";;;;;;;;;;;AAOO,IAAMA,IAAI,gBAAGC,UAAU,CAC5B,UAACC,KAAgB,EAAEC,GAAwC,EAAK;AAC9D,EAAA,IAAAC,WAAA,GAMIF,KAAK,CALPG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,WAAA;IAAAE,cAAA,GAKbJ,KAAK,CAJPK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,cAAA;IAAAE,eAAA,GAIhBN,KAAK,CAHPO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,eAAA;IAAAE,gBAAA,GAGdR,KAAK,CAFPS,SAAS;AAATA,IAAAA,SAAS,GAAAD,gBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,gBAAA;AACbE,IAAAA,IAAI,GAAAC,wBAAA,CACLX,KAAK,EAAAY,SAAA,CAAA;;AAET;AACA,EAAA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa,EAAE;IAC1CC,oBAAoB,CAAChB,KAAK,CAAC;AAC7B;AAEA,EAAA,oBACEiB,IAAA,CAACC,UAAU,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACTlB,IAAAA,GAAG,EAAEA,GAAI;AACT,IAAA,WAAA,EAAU,QAAQ;AAClBmB,IAAAA,KAAK,EAAEjB,IAAK;AACZkB,IAAAA,QAAQ,EAAEhB,OAAQ;AAClBiB,IAAAA,SAAS,EAAEf,QAAS;AACpBgB,IAAAA,UAAU,EAAEd,SAAU;AACtB,IAAA,oBAAA,EAAoBT,KAAK,CAACwB;AAAS,GAAA,EAC/Bd,IAAI,CAAA,EAAA,EAAA,EAAA;AAAAe,IAAAA,QAAA,EAAA,CAEPzB,KAAK,CAAC0B,QAAQ,EACd1B,KAAK,CAACyB,QAAQ,EACdzB,KAAK,CAAC2B,QAAQ,iBACbC,GAAA,CAACC,aAAa,EAAA;AACZC,MAAAA,OAAO,EAAE,SAAAA,OAAAA,CAACC,CAAyC,EAAK;AAAA,QAAA,IAAAC,eAAA;QACtDD,CAAC,CAACE,eAAe,EAAE;QACnBF,CAAC,CAACG,cAAc,EAAE;AAClB,QAAA,CAAAF,eAAA,
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../../src/Chips/Chip/index.tsx"],"sourcesContent":["import { IconCloseS } from '@remember-web/icon';\nimport { type ForwardedRef, forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport { ButtonWrapper, StyledChip } from './styles';\nimport { ensureValidChipProps } from './typeGuard';\nimport type { ChipProps } from './types';\n\nexport const Chip = forwardRef(\n (props: ChipProps, ref: ForwardedRef<HTMLDivElement | null>) => {\n const {\n size = 'medium',\n variant = 'filled',\n selected = false,\n clickable = true,\n ...rest\n } = props;\n\n // NOTE: 개발 모드에서만 런타임 체크 수행\n if (process.env.NODE_ENV === 'development') {\n ensureValidChipProps(props);\n }\n\n return (\n <StyledChip\n ref={ref}\n aria-live=\"polite\"\n $size={size}\n $variant={variant}\n $selected={selected}\n $clickable={clickable}\n data-chip-disabled={props.disabled}\n {...rest}\n >\n {props.leftIcon}\n {props.children}\n {props.onDelete && (\n <ButtonWrapper\n type=\"button\"\n onClick={(e: React.MouseEvent | React.KeyboardEvent) => {\n e.stopPropagation();\n e.preventDefault();\n props.onDelete?.();\n }}\n className=\"delete-button\"\n >\n {props.deleteIcon || <IconCloseS />}\n </ButtonWrapper>\n )}\n </StyledChip>\n );\n }\n) as PolymorphicComponent<'web', ChipProps>;\n"],"names":["Chip","forwardRef","props","ref","_props$size","size","_props$variant","variant","_props$selected","selected","_props$clickable","clickable","rest","_objectWithoutProperties","_excluded","process","env","NODE_ENV","ensureValidChipProps","_jsxs","StyledChip","_objectSpread","$size","$variant","$selected","$clickable","disabled","children","leftIcon","onDelete","_jsx","ButtonWrapper","type","onClick","e","_props$onDelete","stopPropagation","preventDefault","call","className","deleteIcon","IconCloseS"],"mappings":";;;;;;;;;;;AAOO,IAAMA,IAAI,gBAAGC,UAAU,CAC5B,UAACC,KAAgB,EAAEC,GAAwC,EAAK;AAC9D,EAAA,IAAAC,WAAA,GAMIF,KAAK,CALPG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,WAAA;IAAAE,cAAA,GAKbJ,KAAK,CAJPK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,cAAA;IAAAE,eAAA,GAIhBN,KAAK,CAHPO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,eAAA;IAAAE,gBAAA,GAGdR,KAAK,CAFPS,SAAS;AAATA,IAAAA,SAAS,GAAAD,gBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,gBAAA;AACbE,IAAAA,IAAI,GAAAC,wBAAA,CACLX,KAAK,EAAAY,SAAA,CAAA;;AAET;AACA,EAAA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa,EAAE;IAC1CC,oBAAoB,CAAChB,KAAK,CAAC;AAC7B;AAEA,EAAA,oBACEiB,IAAA,CAACC,UAAU,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACTlB,IAAAA,GAAG,EAAEA,GAAI;AACT,IAAA,WAAA,EAAU,QAAQ;AAClBmB,IAAAA,KAAK,EAAEjB,IAAK;AACZkB,IAAAA,QAAQ,EAAEhB,OAAQ;AAClBiB,IAAAA,SAAS,EAAEf,QAAS;AACpBgB,IAAAA,UAAU,EAAEd,SAAU;AACtB,IAAA,oBAAA,EAAoBT,KAAK,CAACwB;AAAS,GAAA,EAC/Bd,IAAI,CAAA,EAAA,EAAA,EAAA;AAAAe,IAAAA,QAAA,EAAA,CAEPzB,KAAK,CAAC0B,QAAQ,EACd1B,KAAK,CAACyB,QAAQ,EACdzB,KAAK,CAAC2B,QAAQ,iBACbC,GAAA,CAACC,aAAa,EAAA;AACZC,MAAAA,IAAI,EAAC,QAAQ;AACbC,MAAAA,OAAO,EAAE,SAAAA,OAAAA,CAACC,CAAyC,EAAK;AAAA,QAAA,IAAAC,eAAA;QACtDD,CAAC,CAACE,eAAe,EAAE;QACnBF,CAAC,CAACG,cAAc,EAAE;AAClB,QAAA,CAAAF,eAAA,GAAAjC,KAAK,CAAC2B,QAAQ,MAAA,IAAA,IAAAM,eAAA,KAAA,MAAA,IAAdA,eAAA,CAAAG,IAAA,CAAApC,KAAiB,CAAC;OAClB;AACFqC,MAAAA,SAAS,EAAC,eAAe;MAAAZ,QAAA,EAExBzB,KAAK,CAACsC,UAAU,iBAAIV,GAAA,CAACW,UAAU,EAAA,EAAE;AAAC,KACtB,CAChB;AAAA,GAAA,CACS,CAAC;AAEjB,CACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Logos/EnvLabel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Logos/EnvLabel/index.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GACf,YAAY,GACZ,OAAO,GACP,OAAO,GACP,OAAO,GACP,MAAM,GACN,aAAa,CAAC;AAElB,eAAO,MAAM,WAAW,SAAU,OAAO,KAAG,WAAW,GAAG,SA0BzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remember-web/primitive",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Remember Web Primitive Components",
|
|
5
5
|
"homepage": "https://dramancompany.github.io/remember-web-packages/",
|
|
6
6
|
"author": "Remember",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@radix-ui/react-separator": "^1.0.3",
|
|
42
42
|
"@radix-ui/react-switch": "^1.0.3",
|
|
43
43
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
44
|
-
"@remember-web/icon": "^0.
|
|
45
|
-
"@remember-web/mixin": "^0.
|
|
44
|
+
"@remember-web/icon": "^0.4.0",
|
|
45
|
+
"@remember-web/mixin": "^0.3.0",
|
|
46
46
|
"@remember-web/shared": "^0.1.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -7,7 +7,7 @@ import { IconLikeFilledS } from '@remember-web/icon';
|
|
|
7
7
|
import Avatar from '.';
|
|
8
8
|
|
|
9
9
|
const IMAGE_URL =
|
|
10
|
-
'https://
|
|
10
|
+
'https://career-cdn.alpha.rememberapp.co.kr/upload/open_profile/images/1663953/profile/2025/07/24/16/09/5ecf2c6157bb52cca32eeeaca3d5ac37/original.png?1753340996';
|
|
11
11
|
type Story = StoryObj<typeof Avatar>;
|
|
12
12
|
|
|
13
13
|
const meta = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { IconAvatarEmpty } from '@remember-web/icon';
|
|
4
|
-
import {
|
|
4
|
+
import { divider, fixedBgWhite } from '@remember-web/mixin';
|
|
5
5
|
import type { ConvertTransientProps } from '@remember-web/shared';
|
|
6
6
|
import type { ComponentPropsWithoutRef, ForwardRefRenderFunction } from 'react';
|
|
7
7
|
import { forwardRef, useState } from 'react';
|
|
@@ -20,7 +20,7 @@ export type AvatarProps = Partial<ConvertTransientProps<StyledAvatarProps>> &
|
|
|
20
20
|
const Avatar: ForwardRefRenderFunction<HTMLDivElement, AvatarProps> = (
|
|
21
21
|
{
|
|
22
22
|
size = 'medium',
|
|
23
|
-
backgroundColor =
|
|
23
|
+
backgroundColor = fixedBgWhite,
|
|
24
24
|
border = { color: divider, width: '1px' },
|
|
25
25
|
rounded = true,
|
|
26
26
|
imageUrl,
|