@shoplflow/templates 0.1.59 → 0.1.60

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
@@ -1664,7 +1664,15 @@ var AttachmentItemSingle = ({ item, onClick, onDelete, lineClamp = 1 }) => {
1664
1664
  ] });
1665
1665
  };
1666
1666
  exports.AttachmentItemSingle = AttachmentItemSingle;
1667
- var AttachmentItemMulti = ({ item, children, thumbnail, onClick, onDelete }) => {
1667
+ var AttachmentItemMulti = ({
1668
+ item,
1669
+ children,
1670
+ thumbnail,
1671
+ onClick,
1672
+ onDelete,
1673
+ padding = "8px",
1674
+ lineClamp = 1
1675
+ }) => {
1668
1676
  var _a;
1669
1677
  const formatFileSize = (bytes) => {
1670
1678
  if (bytes === 0) {
@@ -1681,7 +1689,7 @@ var AttachmentItemMulti = ({ item, children, thumbnail, onClick, onDelete }) =>
1681
1689
  align: "center",
1682
1690
  width: "inherit",
1683
1691
  minHeight: "48px",
1684
- padding: "8px",
1692
+ padding,
1685
1693
  spacing: "spacing08",
1686
1694
  radius: "borderRadius08",
1687
1695
  onClick,
@@ -1695,7 +1703,17 @@ var AttachmentItemMulti = ({ item, children, thumbnail, onClick, onDelete }) =>
1695
1703
  children: [
1696
1704
  thumbnail,
1697
1705
  /* @__PURE__ */ jsxRuntime.jsx(base.StackContainer.Vertical, { flex: "1", align: "flex-start", height: "100%", children: item ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1698
- /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "body1_400", color: "neutral700", lineClamp: 1, textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.name }),
1706
+ /* @__PURE__ */ jsxRuntime.jsx(
1707
+ base.Text,
1708
+ {
1709
+ typography: "body1_400",
1710
+ color: "neutral700",
1711
+ lineClamp,
1712
+ textOverflow: "ellipsis",
1713
+ whiteSpace: "nowrap",
1714
+ children: item.name
1715
+ }
1716
+ ),
1699
1717
  item.size && /* @__PURE__ */ jsxRuntime.jsx(base.Text, { typography: "caption_400", color: "neutral400", children: formatFileSize((_a = item.size) != null ? _a : 0) })
1700
1718
  ] }) : children }),
1701
1719
  onDelete && /* @__PURE__ */ jsxRuntime.jsx(base.IconButton, { sizeVar: "S", styleVar: "GHOST", children: /* @__PURE__ */ jsxRuntime.jsx(
package/dist/index.d.cts CHANGED
@@ -316,6 +316,8 @@ interface AttachmentItemMultiProps {
316
316
  children?: React.ReactNode;
317
317
  onDelete?: (e: React.MouseEvent<HTMLButtonElement>) => void;
318
318
  onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
319
+ padding?: CSSProperties['padding'];
320
+ lineClamp?: number;
319
321
  }
320
322
  interface AttachmentThumbnailProps {
321
323
  iconSource?: IconSource;
package/dist/index.d.ts CHANGED
@@ -316,6 +316,8 @@ interface AttachmentItemMultiProps {
316
316
  children?: React.ReactNode;
317
317
  onDelete?: (e: React.MouseEvent<HTMLButtonElement>) => void;
318
318
  onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
319
+ padding?: CSSProperties['padding'];
320
+ lineClamp?: number;
319
321
  }
320
322
  interface AttachmentThumbnailProps {
321
323
  iconSource?: IconSource;
package/dist/index.js CHANGED
@@ -1658,7 +1658,15 @@ var AttachmentItemSingle = ({ item, onClick, onDelete, lineClamp = 1 }) => {
1658
1658
  ] });
1659
1659
  };
1660
1660
  var AttachmentItemSingle_default = AttachmentItemSingle;
1661
- var AttachmentItemMulti = ({ item, children, thumbnail, onClick, onDelete }) => {
1661
+ var AttachmentItemMulti = ({
1662
+ item,
1663
+ children,
1664
+ thumbnail,
1665
+ onClick,
1666
+ onDelete,
1667
+ padding = "8px",
1668
+ lineClamp = 1
1669
+ }) => {
1662
1670
  var _a;
1663
1671
  const formatFileSize = (bytes) => {
1664
1672
  if (bytes === 0) {
@@ -1675,7 +1683,7 @@ var AttachmentItemMulti = ({ item, children, thumbnail, onClick, onDelete }) =>
1675
1683
  align: "center",
1676
1684
  width: "inherit",
1677
1685
  minHeight: "48px",
1678
- padding: "8px",
1686
+ padding,
1679
1687
  spacing: "spacing08",
1680
1688
  radius: "borderRadius08",
1681
1689
  onClick,
@@ -1689,7 +1697,17 @@ var AttachmentItemMulti = ({ item, children, thumbnail, onClick, onDelete }) =>
1689
1697
  children: [
1690
1698
  thumbnail,
1691
1699
  /* @__PURE__ */ jsx(StackContainer.Vertical, { flex: "1", align: "flex-start", height: "100%", children: item ? /* @__PURE__ */ jsxs(Fragment, { children: [
1692
- /* @__PURE__ */ jsx(Text, { typography: "body1_400", color: "neutral700", lineClamp: 1, textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.name }),
1700
+ /* @__PURE__ */ jsx(
1701
+ Text,
1702
+ {
1703
+ typography: "body1_400",
1704
+ color: "neutral700",
1705
+ lineClamp,
1706
+ textOverflow: "ellipsis",
1707
+ whiteSpace: "nowrap",
1708
+ children: item.name
1709
+ }
1710
+ ),
1693
1711
  item.size && /* @__PURE__ */ jsx(Text, { typography: "caption_400", color: "neutral400", children: formatFileSize((_a = item.size) != null ? _a : 0) })
1694
1712
  ] }) : children }),
1695
1713
  onDelete && /* @__PURE__ */ jsx(IconButton, { sizeVar: "S", styleVar: "GHOST", children: /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplflow/templates",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
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.8",
94
+ "@shoplflow/base": "^0.45.9",
95
95
  "@shoplflow/hada-assets": "^0.1.10",
96
96
  "@shoplflow/shopl-assets": "^0.12.32",
97
97
  "@shoplflow/utils": "^0.7.2"