period-ui 0.13.0 → 0.13.1

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.
@@ -1,2 +1,3 @@
1
1
  export * from './product-selector-option-content';
2
+ export * from './product-selector-thumbnail';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC"}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./product-selector-option-content"), exports);
18
+ __exportStar(require("./product-selector-thumbnail"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,+DAA6C"}
@@ -1 +1 @@
1
- {"version":3,"file":"product-selector-option-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,KAAK,2CA8CvE"}
1
+ {"version":3,"file":"product-selector-option-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAwCvE"}
@@ -4,9 +4,10 @@ exports.ProductSelectorOptionContent = ProductSelectorOptionContent;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const components_1 = require("../../../../components");
6
6
  const tailwind_utils_1 = require("../../../../utils/tailwind-utils");
7
+ const product_selector_thumbnail_1 = require("./product-selector-thumbnail");
7
8
  function ProductSelectorOptionContent({ option, isActive }) {
8
9
  return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-row items-center gap-2 p-4 cursor-pointer bg-white', {
9
10
  'bg-gray-05': isActive,
10
- }), children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center overflow-hidden rounded border border-gray-04 bg-gray-05", children: option.imageUrl ? ((0, jsx_runtime_1.jsx)("img", { src: option.imageUrl, alt: "", className: "h-full w-full object-cover" })) : ((0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.IMAGE, size: components_1.IconSize.XL, color: components_1.IconColor.GRAY_03 })) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-1 flex-row items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-col", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "line-clamp-2", children: option.name }), option.code && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "truncate", children: option.code }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-shrink-0 flex-col items-end", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "whitespace-nowrap", children: option.priceLabel }), option.stockLabel && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "whitespace-nowrap", children: option.stockLabel }))] })] })] }));
11
+ }), children: [(0, jsx_runtime_1.jsx)(product_selector_thumbnail_1.ProductSelectorThumbnail, { imageUrl: option.imageUrl }), (0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-1 flex-row items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-col", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "line-clamp-2", children: option.name }), option.code && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "truncate", children: option.code }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-shrink-0 flex-col items-end", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "whitespace-nowrap", children: option.priceLabel }), option.stockLabel && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "whitespace-nowrap", children: option.stockLabel }))] })] })] }));
11
12
  }
12
13
  //# sourceMappingURL=product-selector-option-content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-selector-option-content.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":";;AAiBA,oEA8CC;;AA/DD,uDAQgC;AAChC,qEAA4D;AAQ5D,SAAgB,4BAA4B,CAAC,EAAE,MAAM,EA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,"file":"product-selector-option-content.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":";;AAUA,oEAwCC;;AAlDD,uDAAuE;AACvE,qEAA4D;AAE5D,6EAAwE;AAOxE,SAAgB,4BAA4B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAS;IACtE,OAAO,CACL,iCACE,SAAS,EAAE,IAAA,yBAAQ,EAAC,8DAA8D,EAAE;YAClF,YAAY,EAAE,QAAQ;SACvB,CAAC,aAEF,uBAAC,qDAAwB,IAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAI,EAEvD,iCAAK,SAAS,EAAC,iEAAiE,aAC9E,iCAAK,SAAS,EAAC,uBAAuB,aACpC,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,SAAS,EAAC,cAAc,YACtD,MAAM,CAAC,IAAI,GACP,EAEN,MAAM,CAAC,IAAI,IAAI,CACd,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,MAAM,EAAE,KAAK,EAAE,uBAAU,CAAC,QAAQ,EAAE,SAAS,EAAC,UAAU,YAChF,MAAM,CAAC,IAAI,GACP,CACR,IACG,EAEN,iCAAK,SAAS,EAAC,uCAAuC,aACpD,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,SAAS,EAAC,mBAAmB,YAC3D,MAAM,CAAC,UAAU,GACb,EAEN,MAAM,CAAC,UAAU,IAAI,CACpB,uBAAC,iBAAI,IACH,OAAO,EAAE,wBAAW,CAAC,MAAM,EAC3B,KAAK,EAAE,uBAAU,CAAC,QAAQ,EAC1B,SAAS,EAAC,mBAAmB,YAE5B,MAAM,CAAC,UAAU,GACb,CACR,IACG,IACF,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ imageUrl?: string;
3
+ };
4
+ export declare function ProductSelectorThumbnail({ imageUrl }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=product-selector-thumbnail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-selector-thumbnail.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-thumbnail.tsx"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAkB3D"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductSelectorThumbnail = ProductSelectorThumbnail;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const components_1 = require("../../../../components");
7
+ function ProductSelectorThumbnail({ imageUrl }) {
8
+ const [failedImageUrl, setFailedImageUrl] = (0, react_1.useState)();
9
+ const isImageAvailable = Boolean(imageUrl) && imageUrl !== failedImageUrl;
10
+ return ((0, jsx_runtime_1.jsx)("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center overflow-hidden rounded border border-gray-04 bg-gray-05", children: isImageAvailable ? ((0, jsx_runtime_1.jsx)("img", { src: imageUrl, alt: "", className: "h-full w-full object-cover", onError: () => setFailedImageUrl(imageUrl) })) : ((0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.IMAGE, size: components_1.IconSize.XL, color: components_1.IconColor.GRAY_03 })) }));
11
+ }
12
+ //# sourceMappingURL=product-selector-thumbnail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-selector-thumbnail.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-thumbnail.tsx"],"names":[],"mappings":";;AAOA,4DAkBC;;AAzBD,iCAAiC;AACjC,uDAAoF;AAMpF,SAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAS;IAC1D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,GAAU,CAAC;IAC/D,MAAM,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,cAAc,CAAC;IAE1E,OAAO,CACL,gCAAK,SAAS,EAAC,mHAAmH,YAC/H,gBAAgB,CAAC,CAAC,CAAC,CAClB,gCACE,GAAG,EAAE,QAAQ,EACb,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,4BAA4B,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAC1C,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,sBAAS,IAAC,IAAI,EAAE,uBAAU,CAAC,KAAK,EAAE,IAAI,EAAE,qBAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,sBAAS,CAAC,OAAO,GAAI,CACnF,GACG,CACP,CAAC;AACJ,CAAC"}