@frontify/guideline-blocks-settings 0.30.1 → 0.31.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @frontify/guideline-blocks-settings
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#698](https://github.com/Frontify/brand-sdk/pull/698) [`1003fea`](https://github.com/Frontify/brand-sdk/commit/1003feab2b08e4cc4db5629306e2f25cda8bae86) Thanks [@ragi96](https://github.com/ragi96)! - feat: move @frontify/app-bridge to peer dependencies
8
+
9
+ ### Patch Changes
10
+
11
+ - [#697](https://github.com/Frontify/brand-sdk/pull/697) [`759188b`](https://github.com/Frontify/brand-sdk/commit/759188b28219e23ef7ce19edbc2d5e3248270ea8) Thanks [@fulopdaniel](https://github.com/fulopdaniel)! - chore: bumps @frontify/fondue to 12.0.0-beta.396
12
+
13
+ - Updated dependencies [[`759188b`](https://github.com/Frontify/brand-sdk/commit/759188b28219e23ef7ce19edbc2d5e3248270ea8)]:
14
+ - @frontify/sidebar-settings@0.9.1
15
+
16
+ ## 0.30.2
17
+
18
+ ### Patch Changes
19
+
20
+ - [#687](https://github.com/Frontify/brand-sdk/pull/687) [`b044981`](https://github.com/Frontify/brand-sdk/commit/b0449814d55554e82507e1341d0f42a35f17a5e5) Thanks [@ragi96](https://github.com/ragi96)! - chore(Attachments): replace deprecated functions with hooks
21
+
22
+ - [#696](https://github.com/Frontify/brand-sdk/pull/696) [`edc00b0`](https://github.com/Frontify/brand-sdk/commit/edc00b0cb1b04753e1563231eb1e28f9e7d05670) Thanks [@SamCreasey](https://github.com/SamCreasey)! - fix(Attachments): Add line-height class to `AttachmentsButtonTrigger`.
23
+
24
+ - [#695](https://github.com/Frontify/brand-sdk/pull/695) [`d7764c1`](https://github.com/Frontify/brand-sdk/commit/d7764c129ee1d61aaed4ce519e70eb5d0984bfec) Thanks [@ragi96](https://github.com/ragi96)! - chore: bump @frontify/fondue to v12.0.0-beta.395
25
+
26
+ - [#689](https://github.com/Frontify/brand-sdk/pull/689) [`6c34c1c`](https://github.com/Frontify/brand-sdk/commit/6c34c1c8e354f95bb873a70bceef0939198574c4) Thanks [@fulopdaniel](https://github.com/fulopdaniel)! - feat(Attachments): temporarily disable sorting
27
+
28
+ - Updated dependencies [[`d79e69a`](https://github.com/Frontify/brand-sdk/commit/d79e69a1c6d8f901b7f91866a92fd0d99363f07d), [`d7764c1`](https://github.com/Frontify/brand-sdk/commit/d7764c129ee1d61aaed4ce519e70eb5d0984bfec)]:
29
+ - @frontify/sidebar-settings@0.9.0
30
+
3
31
  ## 0.30.1
4
32
 
5
33
  ### Patch Changes
package/README.md CHANGED
@@ -58,3 +58,17 @@ import '@frontify/guideline-blocks-settings/styles';
58
58
  ## Development
59
59
 
60
60
  Run `pnpm build` to make changes directly available to the linked packages.
61
+
62
+ To run the tests, linter, or type checker, first update @frontify/app-bridge. For the latest version, execute:
63
+
64
+ ```
65
+ pnpm add @frontify/app-bridge@workspace:^ --filter {packages/guideline-blocks-settings}
66
+ ```
67
+
68
+ For a specific version, such as 3.0.2, execute:
69
+
70
+ ```
71
+ pnpm add @frontify/app-bridge@3.0.2 --filter {packages/guideline-blocks-settings}
72
+ ```
73
+
74
+ After updating, you can run the following commands as needed. For testing, use `pnpm test`. For linting, use `pnpm lint`. For type checking, use `pnpm typecheck`.
@@ -1,145 +1,126 @@
1
- import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as A, useState as j, useEffect as I } from "react";
3
- import { useFileInput as D, useAssetUpload as E } from "@frontify/app-bridge";
4
- import { useSortable as M } from "@dnd-kit/sortable";
5
- import { useFocusRing as P } from "@react-aria/focus";
6
- import { LoadingCircle as V, LoadingCircleSize as B, FOCUS_STYLE as L, IconGrabHandle20 as U, Flyout as $, FlyoutPlacement as O, Button as T, IconPen20 as X, ButtonEmphasis as G, ActionMenu as H, MenuItemContentSize as f, IconArrowCircleUp20 as _, IconImageStack20 as Y, MenuItemStyle as q, IconTrashBin20 as J, IconImage24 as K, IconPlayFrame24 as Q, IconMusicNote24 as W, IconDocument24 as Z } from "@frontify/fondue";
7
- import { joinClassNames as h } from "../../utilities/react/joinClassNames.es.js";
8
- const tt = (e) => e === "IMAGE" ? /* @__PURE__ */ t(K, {}) : e === "VIDEO" ? /* @__PURE__ */ t(Q, {}) : e === "AUDIO" ? /* @__PURE__ */ t(W, {}) : /* @__PURE__ */ t(Z, {}), y = A(
1
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as F, useState as z, useEffect as v } from "react";
3
+ import { useFileInput as A, useAssetUpload as R } from "@frontify/app-bridge";
4
+ import { useSortable as D } from "@dnd-kit/sortable";
5
+ import { LoadingCircle as M, LoadingCircleSize as j, Flyout as B, FlyoutPlacement as E, Button as P, IconPen20 as V, ButtonEmphasis as $, ActionMenu as L, MenuItemContentSize as f, IconArrowCircleUp20 as O, IconImageStack20 as U, MenuItemStyle as X, IconTrashBin20 as T, IconImage24 as G, IconPlayFrame24 as H, IconMusicNote24 as _, IconDocument24 as q } from "@frontify/fondue";
6
+ import { joinClassNames as I } from "../../utilities/react/joinClassNames.es.js";
7
+ const J = (e) => e === "IMAGE" ? /* @__PURE__ */ t(G, {}) : e === "VIDEO" ? /* @__PURE__ */ t(H, {}) : e === "AUDIO" ? /* @__PURE__ */ t(_, {}) : /* @__PURE__ */ t(q, {}), y = F(
9
8
  ({
10
9
  item: e,
11
10
  isEditing: s,
12
- draggableProps: c,
13
- transformStyle: u,
14
- isDragging: o,
15
- isOverlay: a,
16
- isLoading: n,
17
- onDelete: d,
18
- onReplaceWithBrowse: m,
19
- onReplaceWithUpload: S,
11
+ transformStyle: c,
12
+ isDragging: r,
13
+ isOverlay: i,
14
+ isLoading: m,
15
+ onDelete: l,
16
+ onReplaceWithBrowse: d,
17
+ onReplaceWithUpload: u,
20
18
  onDownload: w
21
- }, k) => {
22
- const [r, i] = j(), [C, { selectedFiles: l }] = D({ multiple: !0, accept: "image/*" }), [N, { results: g, doneAll: p }] = E(), { focusProps: F, isFocusVisible: v } = P();
23
- I(() => {
24
- l && N(l[0]);
25
- }, [l]), I(() => {
26
- p && S(g[0]);
27
- }, [p, g]);
28
- const z = n || l && !p;
29
- return /* @__PURE__ */ b(
19
+ }, b) => {
20
+ const [a, o] = z(), [S, { selectedFiles: n }] = A({ multiple: !0, accept: "image/*" }), [C, { results: h, doneAll: p }] = R();
21
+ v(() => {
22
+ n && C(n[0]);
23
+ }, [n]), v(() => {
24
+ p && u(h[0]);
25
+ }, [p, h]);
26
+ const N = m || n && !p;
27
+ return /* @__PURE__ */ g(
30
28
  "button",
31
29
  {
32
30
  "aria-label": "Download attachment",
33
31
  "data-test-id": "attachments-item",
34
32
  onClick: () => w == null ? void 0 : w(),
35
- ref: k,
33
+ ref: b,
36
34
  style: {
37
- ...u,
38
- opacity: o && !a ? 0.3 : 1,
35
+ ...c,
36
+ opacity: r && !i ? 0.3 : 1,
39
37
  fontFamily: "var(-f-theme-settings-body-font-family)"
40
38
  },
41
- className: h([
39
+ className: I([
42
40
  "tw-cursor-pointer tw-text-left tw-w-full tw-relative tw-flex tw-gap-3 tw-px-5 tw-py-3 tw-items-center tw-group hover:tw-bg-box-neutral-hover",
43
- o ? "tw-bg-box-neutral-hover" : ""
41
+ r ? "tw-bg-box-neutral-hover" : ""
44
42
  ]),
45
43
  children: [
46
- /* @__PURE__ */ t("div", { className: "tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover", children: z ? /* @__PURE__ */ t(V, { size: B.Small }) : tt(e.objectType) }),
47
- /* @__PURE__ */ b("div", { className: "tw-text-s tw-flex-1 tw-min-w-0", children: [
44
+ /* @__PURE__ */ t("div", { className: "tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover", children: N ? /* @__PURE__ */ t(M, { size: j.Small }) : J(e.objectType) }),
45
+ /* @__PURE__ */ g("div", { className: "tw-text-s tw-flex-1 tw-min-w-0", children: [
48
46
  /* @__PURE__ */ t("div", { className: "tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis tw-font-bold tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover", children: e.title }),
49
47
  /* @__PURE__ */ t("div", { className: "tw-text-text-weak", children: `${e.fileSizeHumanReadable} - ${e.extension}` })
50
48
  ] }),
51
- s && /* @__PURE__ */ b(
49
+ s && /* @__PURE__ */ t(
52
50
  "div",
53
51
  {
54
52
  "data-test-id": "attachments-actionbar",
55
- className: h([
53
+ className: I([
56
54
  "tw-flex tw-gap-0.5 group-focus:tw-opacity-100 focus-visible:tw-opacity-100 focus-within:tw-opacity-100 group-hover:tw-opacity-100",
57
- a || (r == null ? void 0 : r.id) === e.id ? "tw-opacity-100" : "tw-opacity-0"
55
+ i || (a == null ? void 0 : a.id) === e.id ? "tw-opacity-100" : "tw-opacity-0"
58
56
  ]),
59
- children: [
60
- /* @__PURE__ */ t(
61
- "button",
62
- {
63
- ...F,
64
- ...c,
65
- "aria-label": "Drag attachment",
66
- className: h([
67
- " tw-border-button-border tw-bg-button-background active:tw-bg-button-background-pressed tw-group tw-border tw-box-box tw-relative tw-flex tw-items-center tw-justify-center tw-outline-none tw-font-medium tw-rounded tw-h-9 tw-w-9 ",
68
- o || a ? "tw-cursor-grabbing tw-bg-button-background-pressed hover:tw-bg-button-background-pressed" : "tw-cursor-grab hover:tw-bg-button-background-hover",
69
- v && L,
70
- v && "tw-z-[2]"
71
- ]),
72
- children: /* @__PURE__ */ t(U, {})
73
- }
74
- ),
75
- /* @__PURE__ */ t("div", { "data-test-id": "attachments-actionbar-flyout", children: /* @__PURE__ */ t(
76
- $,
77
- {
78
- placement: O.Right,
79
- isOpen: (r == null ? void 0 : r.id) === e.id,
80
- fitContent: !0,
81
- legacyFooter: !1,
82
- onOpenChange: (x) => i(x ? e : void 0),
83
- trigger: (x, R) => /* @__PURE__ */ t(
84
- T,
85
- {
86
- ref: R,
87
- icon: /* @__PURE__ */ t(X, {}),
88
- emphasis: G.Default,
89
- onClick: () => i(e)
90
- }
91
- ),
92
- children: /* @__PURE__ */ t(
93
- H,
94
- {
95
- menuBlocks: [
96
- {
97
- id: "menu",
98
- menuItems: [
99
- {
100
- id: "upload",
101
- size: f.XSmall,
102
- title: "Replace with upload",
103
- onClick: () => {
104
- C(), i(void 0);
105
- },
106
- initialValue: !0,
107
- decorator: /* @__PURE__ */ t("div", { className: "tw-mr-2", children: /* @__PURE__ */ t(_, {}) })
57
+ children: /* @__PURE__ */ t("div", { "data-test-id": "attachments-actionbar-flyout", children: /* @__PURE__ */ t(
58
+ B,
59
+ {
60
+ placement: E.Right,
61
+ isOpen: (a == null ? void 0 : a.id) === e.id,
62
+ fitContent: !0,
63
+ legacyFooter: !1,
64
+ onOpenChange: (x) => o(x ? e : void 0),
65
+ trigger: (x, k) => /* @__PURE__ */ t(
66
+ P,
67
+ {
68
+ ref: k,
69
+ icon: /* @__PURE__ */ t(V, {}),
70
+ emphasis: $.Default,
71
+ onClick: () => o(e)
72
+ }
73
+ ),
74
+ children: /* @__PURE__ */ t(
75
+ L,
76
+ {
77
+ menuBlocks: [
78
+ {
79
+ id: "menu",
80
+ menuItems: [
81
+ {
82
+ id: "upload",
83
+ size: f.XSmall,
84
+ title: "Replace with upload",
85
+ onClick: () => {
86
+ S(), o(void 0);
108
87
  },
109
- {
110
- id: "asset",
111
- size: f.XSmall,
112
- title: "Replace with asset",
113
- onClick: () => {
114
- m(), i(void 0);
115
- },
116
- initialValue: !0,
117
- decorator: /* @__PURE__ */ t("div", { className: "tw-mr-2", children: /* @__PURE__ */ t(Y, {}) })
118
- }
119
- ]
120
- },
121
- {
122
- id: "menu-delete",
123
- menuItems: [
124
- {
125
- id: "delete",
126
- size: f.XSmall,
127
- title: "Delete",
128
- style: q.Danger,
129
- onClick: () => {
130
- d(), i(void 0);
131
- },
132
- initialValue: !0,
133
- decorator: /* @__PURE__ */ t("div", { className: "tw-mr-2", children: /* @__PURE__ */ t(J, {}) })
134
- }
135
- ]
136
- }
137
- ]
138
- }
139
- )
140
- }
141
- ) })
142
- ]
88
+ initialValue: !0,
89
+ decorator: /* @__PURE__ */ t("div", { className: "tw-mr-2", children: /* @__PURE__ */ t(O, {}) })
90
+ },
91
+ {
92
+ id: "asset",
93
+ size: f.XSmall,
94
+ title: "Replace with asset",
95
+ onClick: () => {
96
+ d(), o(void 0);
97
+ },
98
+ initialValue: !0,
99
+ decorator: /* @__PURE__ */ t("div", { className: "tw-mr-2", children: /* @__PURE__ */ t(U, {}) })
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ id: "menu-delete",
105
+ menuItems: [
106
+ {
107
+ id: "delete",
108
+ size: f.XSmall,
109
+ title: "Delete",
110
+ style: X.Danger,
111
+ onClick: () => {
112
+ l(), o(void 0);
113
+ },
114
+ initialValue: !0,
115
+ decorator: /* @__PURE__ */ t("div", { className: "tw-mr-2", children: /* @__PURE__ */ t(T, {}) })
116
+ }
117
+ ]
118
+ }
119
+ ]
120
+ }
121
+ )
122
+ }
123
+ ) })
143
124
  }
144
125
  )
145
126
  ]
@@ -148,27 +129,27 @@ const tt = (e) => e === "IMAGE" ? /* @__PURE__ */ t(K, {}) : e === "VIDEO" ? /*
148
129
  }
149
130
  );
150
131
  y.displayName = "AttachmentItem";
151
- const st = (e) => {
152
- const { attributes: s, listeners: c, setNodeRef: u, transform: o, transition: a, isDragging: n } = M({
132
+ const et = (e) => {
133
+ const { attributes: s, listeners: c, setNodeRef: r, transform: i, transition: m, isDragging: l } = D({
153
134
  id: e.item.id
154
135
  }), d = {
155
- transform: o ? `translate(${o.x}px, ${o.y}px)` : "",
156
- transition: a,
157
- zIndex: n ? 2 : 1
158
- }, m = { ...s, ...c };
136
+ transform: i ? `translate(${i.x}px, ${i.y}px)` : "",
137
+ transition: m,
138
+ zIndex: l ? 2 : 1
139
+ }, u = { ...s, ...c };
159
140
  return /* @__PURE__ */ t(
160
141
  y,
161
142
  {
162
- ref: u,
163
- isDragging: n,
143
+ ref: r,
144
+ isDragging: l,
164
145
  transformStyle: d,
165
- draggableProps: m,
146
+ draggableProps: u,
166
147
  ...e
167
148
  }
168
149
  );
169
150
  };
170
151
  export {
171
152
  y as AttachmentItem,
172
- st as SortableAttachmentItem
153
+ et as SortableAttachmentItem
173
154
  };
174
155
  //# sourceMappingURL=AttachmentItem.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentItem.es.js","sources":["../../../src/components/Attachments/AttachmentItem.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MutableRefObject, forwardRef, useEffect, useState } from 'react';\nimport { Asset, useAssetUpload, useFileInput } from '@frontify/app-bridge';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { useFocusRing } from '@react-aria/focus';\n\nimport {\n ActionMenu,\n Button,\n ButtonEmphasis,\n FOCUS_STYLE,\n Flyout,\n FlyoutPlacement,\n IconArrowCircleUp20,\n IconDocument24,\n IconGrabHandle20,\n IconImage24,\n IconImageStack20,\n IconMusicNote24,\n IconPen20,\n IconPlayFrame24,\n IconTrashBin20,\n LoadingCircle,\n LoadingCircleSize,\n MenuItemContentSize,\n MenuItemStyle,\n} from '@frontify/fondue';\nimport { AttachmentItemProps, SortableAttachmentItemProps } from './types';\nimport { joinClassNames } from '../../utilities';\n\nconst getDecorator = (type: string) => {\n if (type === 'IMAGE') {\n return <IconImage24 />;\n } else if (type === 'VIDEO') {\n return <IconPlayFrame24 />;\n } else if (type === 'AUDIO') {\n return <IconMusicNote24 />;\n } else {\n return <IconDocument24 />;\n }\n};\n\nexport const AttachmentItem = forwardRef<HTMLButtonElement, AttachmentItemProps>(\n (\n {\n item,\n isEditing,\n draggableProps,\n transformStyle,\n isDragging,\n isOverlay,\n isLoading,\n onDelete,\n onReplaceWithBrowse,\n onReplaceWithUpload,\n onDownload,\n },\n ref,\n ) => {\n const [selectedAsset, setSelectedAsset] = useState<Asset | undefined>();\n const [openFileDialog, { selectedFiles }] = useFileInput({ multiple: true, accept: 'image/*' });\n const [uploadFile, { results: uploadResults, doneAll }] = useAssetUpload();\n const { focusProps, isFocusVisible } = useFocusRing();\n\n useEffect(() => {\n if (selectedFiles) {\n uploadFile(selectedFiles[0]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedFiles]);\n\n useEffect(() => {\n if (doneAll) {\n onReplaceWithUpload(uploadResults[0]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [doneAll, uploadResults]);\n\n const showLoadingCircle = isLoading || (selectedFiles && !doneAll);\n\n return (\n <button\n aria-label=\"Download attachment\"\n data-test-id=\"attachments-item\"\n onClick={() => onDownload?.()}\n ref={ref}\n style={{\n ...transformStyle,\n opacity: isDragging && !isOverlay ? 0.3 : 1,\n fontFamily: 'var(-f-theme-settings-body-font-family)',\n }}\n className={joinClassNames([\n 'tw-cursor-pointer tw-text-left tw-w-full tw-relative tw-flex tw-gap-3 tw-px-5 tw-py-3 tw-items-center tw-group hover:tw-bg-box-neutral-hover',\n isDragging ? 'tw-bg-box-neutral-hover' : '',\n ])}\n >\n <div className=\"tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover\">\n {showLoadingCircle ? (\n <LoadingCircle size={LoadingCircleSize.Small} />\n ) : (\n getDecorator(item.objectType)\n )}\n </div>\n <div className=\"tw-text-s tw-flex-1 tw-min-w-0\">\n <div className=\"tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis tw-font-bold tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover\">\n {item.title}\n </div>\n <div className=\"tw-text-text-weak\">{`${item.fileSizeHumanReadable} - ${item.extension}`}</div>\n </div>\n {isEditing && (\n <div\n data-test-id=\"attachments-actionbar\"\n className={joinClassNames([\n 'tw-flex tw-gap-0.5 group-focus:tw-opacity-100 focus-visible:tw-opacity-100 focus-within:tw-opacity-100 group-hover:tw-opacity-100',\n isOverlay || selectedAsset?.id === item.id ? 'tw-opacity-100' : 'tw-opacity-0',\n ])}\n >\n <button\n {...focusProps}\n {...draggableProps}\n aria-label=\"Drag attachment\"\n className={joinClassNames([\n ' tw-border-button-border tw-bg-button-background active:tw-bg-button-background-pressed tw-group tw-border tw-box-box tw-relative tw-flex tw-items-center tw-justify-center tw-outline-none tw-font-medium tw-rounded tw-h-9 tw-w-9 ',\n isDragging || isOverlay\n ? 'tw-cursor-grabbing tw-bg-button-background-pressed hover:tw-bg-button-background-pressed'\n : 'tw-cursor-grab hover:tw-bg-button-background-hover',\n isFocusVisible && FOCUS_STYLE,\n isFocusVisible && 'tw-z-[2]',\n ])}\n >\n <IconGrabHandle20 />\n </button>\n <div data-test-id=\"attachments-actionbar-flyout\">\n <Flyout\n placement={FlyoutPlacement.Right}\n isOpen={selectedAsset?.id === item.id}\n fitContent\n legacyFooter={false}\n onOpenChange={(isOpen) => setSelectedAsset(isOpen ? item : undefined)}\n trigger={(_, ref) => (\n <Button\n ref={ref as MutableRefObject<HTMLButtonElement>}\n icon={<IconPen20 />}\n emphasis={ButtonEmphasis.Default}\n onClick={() => setSelectedAsset(item)}\n />\n )}\n >\n <ActionMenu\n menuBlocks={[\n {\n id: 'menu',\n menuItems: [\n {\n id: 'upload',\n size: MenuItemContentSize.XSmall,\n title: 'Replace with upload',\n onClick: () => {\n openFileDialog();\n setSelectedAsset(undefined);\n },\n\n initialValue: true,\n decorator: (\n <div className=\"tw-mr-2\">\n <IconArrowCircleUp20 />\n </div>\n ),\n },\n\n {\n id: 'asset',\n size: MenuItemContentSize.XSmall,\n title: 'Replace with asset',\n onClick: () => {\n onReplaceWithBrowse();\n setSelectedAsset(undefined);\n },\n initialValue: true,\n decorator: (\n <div className=\"tw-mr-2\">\n <IconImageStack20 />\n </div>\n ),\n },\n ],\n },\n {\n id: 'menu-delete',\n menuItems: [\n {\n id: 'delete',\n size: MenuItemContentSize.XSmall,\n title: 'Delete',\n style: MenuItemStyle.Danger,\n onClick: () => {\n onDelete();\n setSelectedAsset(undefined);\n },\n\n initialValue: true,\n decorator: (\n <div className=\"tw-mr-2\">\n <IconTrashBin20 />\n </div>\n ),\n },\n ],\n },\n ]}\n />\n </Flyout>\n </div>\n </div>\n )}\n </button>\n );\n },\n);\n\nAttachmentItem.displayName = 'AttachmentItem';\n\nexport const SortableAttachmentItem = (props: SortableAttachmentItemProps) => {\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id: props.item.id,\n });\n\n const transformStyle = {\n transform: transform ? `translate(${transform.x}px, ${transform.y}px)` : '',\n transition,\n zIndex: isDragging ? 2 : 1,\n };\n\n const draggableProps = { ...attributes, ...listeners };\n\n return (\n <AttachmentItem\n ref={setNodeRef}\n isDragging={isDragging}\n transformStyle={transformStyle}\n draggableProps={draggableProps}\n {...props}\n />\n );\n};\n"],"names":["getDecorator","type","IconImage24","IconPlayFrame24","IconMusicNote24","IconDocument24","AttachmentItem","forwardRef","item","isEditing","draggableProps","transformStyle","isDragging","isOverlay","isLoading","onDelete","onReplaceWithBrowse","onReplaceWithUpload","onDownload","ref","selectedAsset","setSelectedAsset","useState","openFileDialog","selectedFiles","useFileInput","uploadFile","uploadResults","doneAll","useAssetUpload","focusProps","isFocusVisible","useFocusRing","useEffect","showLoadingCircle","jsxs","joinClassNames","jsx","LoadingCircle","LoadingCircleSize","FOCUS_STYLE","IconGrabHandle20","Flyout","FlyoutPlacement","isOpen","_","Button","IconPen20","ButtonEmphasis","ActionMenu","MenuItemContentSize","IconArrowCircleUp20","IconImageStack20","MenuItemStyle","IconTrashBin20","SortableAttachmentItem","props","attributes","listeners","setNodeRef","transform","transition","useSortable"],"mappings":";;;;;;;AA+BA,MAAMA,KAAe,CAACC,MACdA,MAAS,4BACDC,GAAY,CAAA,CAAA,IACbD,MAAS,4BACRE,GAAgB,CAAA,CAAA,IACjBF,MAAS,4BACRG,GAAgB,CAAA,CAAA,sBAEhBC,GAAe,CAAA,CAAA,GAIlBC,IAAiBC;AAAA,EAC1B,CACI;AAAA,IACI,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,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;AAEAhD,EAAe,cAAc;AAEhB,MAAAiD,KAAyB,CAACC,MAAuC;AACpE,QAAA,EAAE,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,YAAAjD,MAAekD,EAAY;AAAA,IACzF,IAAIN,EAAM,KAAK;AAAA,EAAA,CAClB,GAEK7C,IAAiB;AAAA,IACnB,WAAWiD,IAAY,aAAaA,EAAU,CAAC,OAAOA,EAAU,CAAC,QAAQ;AAAA,IACzE,YAAAC;AAAA,IACA,QAAQjD,IAAa,IAAI;AAAA,EAAA,GAGvBF,IAAiB,EAAE,GAAG+C,GAAY,GAAGC,EAAU;AAGjD,SAAA,gBAAArB;AAAA,IAAC/B;AAAA,IAAA;AAAA,MACG,KAAKqD;AAAA,MACL,YAAA/C;AAAA,MACA,gBAAAD;AAAA,MACA,gBAAAD;AAAA,MACC,GAAG8C;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
1
+ {"version":3,"file":"AttachmentItem.es.js","sources":["../../../src/components/Attachments/AttachmentItem.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MutableRefObject, forwardRef, useEffect, useState } from 'react';\nimport { Asset, useAssetUpload, useFileInput } from '@frontify/app-bridge';\nimport { useSortable } from '@dnd-kit/sortable';\n\nimport {\n ActionMenu,\n Button,\n ButtonEmphasis,\n Flyout,\n FlyoutPlacement,\n IconArrowCircleUp20,\n IconDocument24,\n IconImage24,\n IconImageStack20,\n IconMusicNote24,\n IconPen20,\n IconPlayFrame24,\n IconTrashBin20,\n LoadingCircle,\n LoadingCircleSize,\n MenuItemContentSize,\n MenuItemStyle,\n} from '@frontify/fondue';\nimport { AttachmentItemProps, SortableAttachmentItemProps } from './types';\nimport { joinClassNames } from '../../utilities';\n\nconst getDecorator = (type: string) => {\n if (type === 'IMAGE') {\n return <IconImage24 />;\n } else if (type === 'VIDEO') {\n return <IconPlayFrame24 />;\n } else if (type === 'AUDIO') {\n return <IconMusicNote24 />;\n } else {\n return <IconDocument24 />;\n }\n};\n\nexport const AttachmentItem = forwardRef<HTMLButtonElement, AttachmentItemProps>(\n (\n {\n item,\n isEditing,\n transformStyle,\n isDragging,\n isOverlay,\n isLoading,\n onDelete,\n onReplaceWithBrowse,\n onReplaceWithUpload,\n onDownload,\n },\n ref,\n ) => {\n const [selectedAsset, setSelectedAsset] = useState<Asset | undefined>();\n const [openFileDialog, { selectedFiles }] = useFileInput({ multiple: true, accept: 'image/*' });\n const [uploadFile, { results: uploadResults, doneAll }] = useAssetUpload();\n\n useEffect(() => {\n if (selectedFiles) {\n uploadFile(selectedFiles[0]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedFiles]);\n\n useEffect(() => {\n if (doneAll) {\n onReplaceWithUpload(uploadResults[0]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [doneAll, uploadResults]);\n\n const showLoadingCircle = isLoading || (selectedFiles && !doneAll);\n\n return (\n <button\n aria-label=\"Download attachment\"\n data-test-id=\"attachments-item\"\n onClick={() => onDownload?.()}\n ref={ref}\n style={{\n ...transformStyle,\n opacity: isDragging && !isOverlay ? 0.3 : 1,\n fontFamily: 'var(-f-theme-settings-body-font-family)',\n }}\n className={joinClassNames([\n 'tw-cursor-pointer tw-text-left tw-w-full tw-relative tw-flex tw-gap-3 tw-px-5 tw-py-3 tw-items-center tw-group hover:tw-bg-box-neutral-hover',\n isDragging ? 'tw-bg-box-neutral-hover' : '',\n ])}\n >\n <div className=\"tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover\">\n {showLoadingCircle ? (\n <LoadingCircle size={LoadingCircleSize.Small} />\n ) : (\n getDecorator(item.objectType)\n )}\n </div>\n <div className=\"tw-text-s tw-flex-1 tw-min-w-0\">\n <div className=\"tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis tw-font-bold tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover\">\n {item.title}\n </div>\n <div className=\"tw-text-text-weak\">{`${item.fileSizeHumanReadable} - ${item.extension}`}</div>\n </div>\n {isEditing && (\n <div\n data-test-id=\"attachments-actionbar\"\n className={joinClassNames([\n 'tw-flex tw-gap-0.5 group-focus:tw-opacity-100 focus-visible:tw-opacity-100 focus-within:tw-opacity-100 group-hover:tw-opacity-100',\n isOverlay || selectedAsset?.id === item.id ? 'tw-opacity-100' : 'tw-opacity-0',\n ])}\n >\n <div data-test-id=\"attachments-actionbar-flyout\">\n <Flyout\n placement={FlyoutPlacement.Right}\n isOpen={selectedAsset?.id === item.id}\n fitContent\n legacyFooter={false}\n onOpenChange={(isOpen) => setSelectedAsset(isOpen ? item : undefined)}\n trigger={(_, ref) => (\n <Button\n ref={ref as MutableRefObject<HTMLButtonElement>}\n icon={<IconPen20 />}\n emphasis={ButtonEmphasis.Default}\n onClick={() => setSelectedAsset(item)}\n />\n )}\n >\n <ActionMenu\n menuBlocks={[\n {\n id: 'menu',\n menuItems: [\n {\n id: 'upload',\n size: MenuItemContentSize.XSmall,\n title: 'Replace with upload',\n onClick: () => {\n openFileDialog();\n setSelectedAsset(undefined);\n },\n\n initialValue: true,\n decorator: (\n <div className=\"tw-mr-2\">\n <IconArrowCircleUp20 />\n </div>\n ),\n },\n\n {\n id: 'asset',\n size: MenuItemContentSize.XSmall,\n title: 'Replace with asset',\n onClick: () => {\n onReplaceWithBrowse();\n setSelectedAsset(undefined);\n },\n initialValue: true,\n decorator: (\n <div className=\"tw-mr-2\">\n <IconImageStack20 />\n </div>\n ),\n },\n ],\n },\n {\n id: 'menu-delete',\n menuItems: [\n {\n id: 'delete',\n size: MenuItemContentSize.XSmall,\n title: 'Delete',\n style: MenuItemStyle.Danger,\n onClick: () => {\n onDelete();\n setSelectedAsset(undefined);\n },\n\n initialValue: true,\n decorator: (\n <div className=\"tw-mr-2\">\n <IconTrashBin20 />\n </div>\n ),\n },\n ],\n },\n ]}\n />\n </Flyout>\n </div>\n </div>\n )}\n </button>\n );\n },\n);\n\nAttachmentItem.displayName = 'AttachmentItem';\n\nexport const SortableAttachmentItem = (props: SortableAttachmentItemProps) => {\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id: props.item.id,\n });\n\n const transformStyle = {\n transform: transform ? `translate(${transform.x}px, ${transform.y}px)` : '',\n transition,\n zIndex: isDragging ? 2 : 1,\n };\n\n const draggableProps = { ...attributes, ...listeners };\n\n return (\n <AttachmentItem\n ref={setNodeRef}\n isDragging={isDragging}\n transformStyle={transformStyle}\n draggableProps={draggableProps}\n {...props}\n />\n );\n};\n"],"names":["getDecorator","type","IconImage24","IconPlayFrame24","IconMusicNote24","IconDocument24","AttachmentItem","forwardRef","item","isEditing","transformStyle","isDragging","isOverlay","isLoading","onDelete","onReplaceWithBrowse","onReplaceWithUpload","onDownload","ref","selectedAsset","setSelectedAsset","useState","openFileDialog","selectedFiles","useFileInput","uploadFile","uploadResults","doneAll","useAssetUpload","useEffect","showLoadingCircle","jsxs","joinClassNames","jsx","LoadingCircle","LoadingCircleSize","Flyout","FlyoutPlacement","isOpen","_","Button","IconPen20","ButtonEmphasis","ActionMenu","MenuItemContentSize","IconArrowCircleUp20","IconImageStack20","MenuItemStyle","IconTrashBin20","SortableAttachmentItem","props","attributes","listeners","setNodeRef","transform","transition","useSortable","draggableProps"],"mappings":";;;;;;AA4BA,MAAMA,IAAe,CAACC,MACdA,MAAS,4BACDC,GAAY,CAAA,CAAA,IACbD,MAAS,4BACRE,GAAgB,CAAA,CAAA,IACjBF,MAAS,4BACRG,GAAgB,CAAA,CAAA,sBAEhBC,GAAe,CAAA,CAAA,GAIlBC,IAAiBC;AAAA,EAC1B,CACI;AAAA,IACI,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,KAEJC,MACC;AACD,UAAM,CAACC,GAAeC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