@shoplflow/templates 0.1.49 → 0.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1632,9 +1632,17 @@ var AttachmentItemSingle = ({ item, onDelete }) => {
1632
1632
  /* @__PURE__ */ jsxRuntime.jsxs(base.StackContainer.Horizontal, { align: "center", spacing: "spacing04", children: [
1633
1633
  /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "body2_400", color: "neutral700", lineClamp: 1, textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.name }),
1634
1634
  /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, {}),
1635
- /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "body2_400", color: "neutral400", children: item.extension }),
1636
- /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, {}),
1637
- /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "body2_400", color: "neutral400", children: formatFileSize(item.size) })
1635
+ item.extension && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1636
+ /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, {}),
1637
+ /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "body2_400", color: "neutral400", children: item.extension })
1638
+ ] }),
1639
+ item.size && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1640
+ /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, {}),
1641
+ /* @__PURE__ */ jsxRuntime.jsxs(base.Text, { typography: "body2_400", color: "neutral400", children: [
1642
+ formatFileSize(item.size),
1643
+ " adsfasdf"
1644
+ ] })
1645
+ ] })
1638
1646
  ] }),
1639
1647
  /* @__PURE__ */ jsxRuntime.jsx(base.IconButton, { sizeVar: "S", styleVar: "GHOST", children: /* @__PURE__ */ jsxRuntime.jsx(
1640
1648
  base.Icon,
@@ -1649,6 +1657,7 @@ var AttachmentItemSingle = ({ item, onDelete }) => {
1649
1657
  };
1650
1658
  exports.AttachmentItemSingle = AttachmentItemSingle;
1651
1659
  var AttachmentItemMulti = ({ item, children, thumbnail, onDelete }) => {
1660
+ var _a;
1652
1661
  const formatFileSize = (bytes) => {
1653
1662
  if (bytes === 0) {
1654
1663
  return "0 Bytes";
@@ -1677,7 +1686,7 @@ var AttachmentItemMulti = ({ item, children, thumbnail, onDelete }) => {
1677
1686
  thumbnail,
1678
1687
  /* @__PURE__ */ jsxRuntime.jsx(base.StackContainer.Vertical, { flex: "1", align: "flex-start", height: "100%", children: item ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1679
1688
  /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "body1_400", color: "neutral700", lineClamp: 1, textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.name }),
1680
- /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "caption_400", color: "neutral400", children: formatFileSize(item.size) })
1689
+ item.size && /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "caption_400", color: "neutral400", children: formatFileSize((_a = item.size) != null ? _a : 0) })
1681
1690
  ] }) : children }),
1682
1691
  /* @__PURE__ */ jsxRuntime.jsx(base.IconButton, { sizeVar: "S", styleVar: "GHOST", children: /* @__PURE__ */ jsxRuntime.jsx(
1683
1692
  base.Icon,
package/dist/index.d.cts CHANGED
@@ -295,8 +295,8 @@ declare const TableComponent: TableComponentType;
295
295
 
296
296
  interface AttachmentItemData {
297
297
  name: string;
298
- extension: string;
299
- size: number;
298
+ extension?: string;
299
+ size?: number;
300
300
  }
301
301
  interface AttachmentListProps {
302
302
  onDelete?: (e: React.MouseEvent<HTMLButtonElement>) => void;
package/dist/index.d.ts CHANGED
@@ -295,8 +295,8 @@ declare const TableComponent: TableComponentType;
295
295
 
296
296
  interface AttachmentItemData {
297
297
  name: string;
298
- extension: string;
299
- size: number;
298
+ extension?: string;
299
+ size?: number;
300
300
  }
301
301
  interface AttachmentListProps {
302
302
  onDelete?: (e: React.MouseEvent<HTMLButtonElement>) => void;
package/dist/index.js CHANGED
@@ -1626,9 +1626,17 @@ var AttachmentItemSingle = ({ item, onDelete }) => {
1626
1626
  /* @__PURE__ */ jsxs(StackContainer.Horizontal, { align: "center", spacing: "spacing04", children: [
1627
1627
  /* @__PURE__ */ jsx(Text, { typography: "body2_400", color: "neutral700", lineClamp: 1, textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.name }),
1628
1628
  /* @__PURE__ */ jsx(StyledSeparator, {}),
1629
- /* @__PURE__ */ jsx(Text, { typography: "body2_400", color: "neutral400", children: item.extension }),
1630
- /* @__PURE__ */ jsx(StyledSeparator, {}),
1631
- /* @__PURE__ */ jsx(Text, { typography: "body2_400", color: "neutral400", children: formatFileSize(item.size) })
1629
+ item.extension && /* @__PURE__ */ jsxs(Fragment, { children: [
1630
+ /* @__PURE__ */ jsx(StyledSeparator, {}),
1631
+ /* @__PURE__ */ jsx(Text, { typography: "body2_400", color: "neutral400", children: item.extension })
1632
+ ] }),
1633
+ item.size && /* @__PURE__ */ jsxs(Fragment, { children: [
1634
+ /* @__PURE__ */ jsx(StyledSeparator, {}),
1635
+ /* @__PURE__ */ jsxs(Text, { typography: "body2_400", color: "neutral400", children: [
1636
+ formatFileSize(item.size),
1637
+ " adsfasdf"
1638
+ ] })
1639
+ ] })
1632
1640
  ] }),
1633
1641
  /* @__PURE__ */ jsx(IconButton, { sizeVar: "S", styleVar: "GHOST", children: /* @__PURE__ */ jsx(
1634
1642
  Icon,
@@ -1643,6 +1651,7 @@ var AttachmentItemSingle = ({ item, onDelete }) => {
1643
1651
  };
1644
1652
  var AttachmentItemSingle_default = AttachmentItemSingle;
1645
1653
  var AttachmentItemMulti = ({ item, children, thumbnail, onDelete }) => {
1654
+ var _a;
1646
1655
  const formatFileSize = (bytes) => {
1647
1656
  if (bytes === 0) {
1648
1657
  return "0 Bytes";
@@ -1671,7 +1680,7 @@ var AttachmentItemMulti = ({ item, children, thumbnail, onDelete }) => {
1671
1680
  thumbnail,
1672
1681
  /* @__PURE__ */ jsx(StackContainer.Vertical, { flex: "1", align: "flex-start", height: "100%", children: item ? /* @__PURE__ */ jsxs(Fragment, { children: [
1673
1682
  /* @__PURE__ */ jsx(Text, { typography: "body1_400", color: "neutral700", lineClamp: 1, textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.name }),
1674
- /* @__PURE__ */ jsx(Text, { typography: "caption_400", color: "neutral400", children: formatFileSize(item.size) })
1683
+ item.size && /* @__PURE__ */ jsx(Text, { typography: "caption_400", color: "neutral400", children: formatFileSize((_a = item.size) != null ? _a : 0) })
1675
1684
  ] }) : children }),
1676
1685
  /* @__PURE__ */ jsx(IconButton, { sizeVar: "S", styleVar: "GHOST", children: /* @__PURE__ */ jsx(
1677
1686
  Icon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplflow/templates",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -91,7 +91,7 @@
91
91
  "react-datepicker": "^7.3.0",
92
92
  "react-dom": "^18.2.0",
93
93
  "simplebar-react": "^3.2.6",
94
- "@shoplflow/base": "^0.45.1",
94
+ "@shoplflow/base": "^0.45.2",
95
95
  "@shoplflow/hada-assets": "^0.1.8",
96
96
  "@shoplflow/shopl-assets": "^0.12.27",
97
97
  "@shoplflow/utils": "^0.7.0"