@frontify/guideline-blocks-settings 0.37.7 → 0.38.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/dist/components/DownloadButton/DownloadButton.es.js +14 -20
- package/dist/components/DownloadButton/DownloadButton.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FOCUS_STYLE as
|
|
3
|
-
import { useFocusRing as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { FOCUS_STYLE as a, IconArrowCircleDown16 as w } from "@frontify/fondue";
|
|
3
|
+
import { useFocusRing as d } from "@react-aria/focus";
|
|
4
4
|
import { Tooltip as o } from "../../node_modules/.pnpm/@frontify_fondue-components@16.0.4_@frontify_fondue-icons@0.15.2_react@18.3.1__@frontify_fond_op7623tx44xrzjacx6eyu4zgva/node_modules/@frontify/fondue-components/dist/fondue-components29.es.js";
|
|
5
|
-
import { joinClassNames as
|
|
6
|
-
const
|
|
7
|
-
const { isFocused:
|
|
8
|
-
return /* @__PURE__ */
|
|
5
|
+
import { joinClassNames as u } from "../../utilities/react/joinClassNames.es.js";
|
|
6
|
+
const x = ({ onDownload: e, ariaLabel: n }) => {
|
|
7
|
+
const { isFocused: r, focusProps: s } = d();
|
|
8
|
+
return /* @__PURE__ */ l(o.Root, { enterDelay: 500, children: [
|
|
9
9
|
/* @__PURE__ */ t(o.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
10
10
|
"button",
|
|
11
11
|
{
|
|
12
12
|
tabIndex: 0,
|
|
13
|
-
"aria-label": "Download",
|
|
14
|
-
...
|
|
15
|
-
className:
|
|
13
|
+
"aria-label": n ?? "Download",
|
|
14
|
+
...s,
|
|
15
|
+
className: u(["tw-outline-none tw-rounded", r && a]),
|
|
16
16
|
onClick: e,
|
|
17
|
-
onPointerDown: (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
"data-test-id": "download-button",
|
|
22
|
-
className: "tw-flex tw-text-xs tw-font-body tw-items-center tw-gap-1 tw-rounded-full tw-bg-box-neutral-strong-inverse hover:tw-bg-box-neutral-strong-inverse-hover active:tw-bg-box-neutral-strong-inverse-pressed tw-text-box-neutral-strong tw-outline tw-outline-1 tw-outline-offset-1 tw-p-1.5 tw-outline-line",
|
|
23
|
-
children: /* @__PURE__ */ t(a, {})
|
|
24
|
-
}
|
|
25
|
-
)
|
|
17
|
+
onPointerDown: (i) => i.preventDefault(),
|
|
18
|
+
"data-test-id": "download-button",
|
|
19
|
+
children: /* @__PURE__ */ t("span", { className: "tw-flex tw-text-xs tw-font-body tw-items-center tw-gap-1 tw-rounded-full tw-bg-box-neutral-strong-inverse hover:tw-bg-box-neutral-strong-inverse-hover active:tw-bg-box-neutral-strong-inverse-pressed tw-text-box-neutral-strong tw-outline tw-outline-1 tw-outline-offset-1 tw-p-1.5 tw-outline-line", children: /* @__PURE__ */ t(w, {}) })
|
|
26
20
|
}
|
|
27
21
|
) }),
|
|
28
22
|
/* @__PURE__ */ t(o.Content, { side: "top", children: "Download" })
|
|
29
23
|
] });
|
|
30
24
|
};
|
|
31
25
|
export {
|
|
32
|
-
|
|
26
|
+
x as DownloadButton
|
|
33
27
|
};
|
|
34
28
|
//# sourceMappingURL=DownloadButton.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadButton.es.js","sources":["../../../src/components/DownloadButton/DownloadButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { FOCUS_STYLE, IconArrowCircleDown16 } from '@frontify/fondue';\nimport { Tooltip } from '@frontify/fondue/components';\nimport { useFocusRing } from '@react-aria/focus';\n\nimport { joinClassNames } from '../../utilities';\n\nimport { type DownloadButtonProps } from './types';\n\nexport const DownloadButton = ({ onDownload }: DownloadButtonProps) => {\n const { isFocused, focusProps } = useFocusRing();\n\n return (\n <Tooltip.Root enterDelay={500}>\n <Tooltip.Trigger asChild>\n <button\n tabIndex={0}\n aria-label
|
|
1
|
+
{"version":3,"file":"DownloadButton.es.js","sources":["../../../src/components/DownloadButton/DownloadButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { FOCUS_STYLE, IconArrowCircleDown16 } from '@frontify/fondue';\nimport { Tooltip } from '@frontify/fondue/components';\nimport { useFocusRing } from '@react-aria/focus';\n\nimport { joinClassNames } from '../../utilities';\n\nimport { type DownloadButtonProps } from './types';\n\nexport const DownloadButton = ({ onDownload, ariaLabel }: DownloadButtonProps) => {\n const { isFocused, focusProps } = useFocusRing();\n\n return (\n <Tooltip.Root enterDelay={500}>\n <Tooltip.Trigger asChild>\n <button\n tabIndex={0}\n aria-label={ariaLabel ?? 'Download'}\n {...focusProps}\n className={joinClassNames(['tw-outline-none tw-rounded', isFocused && FOCUS_STYLE])}\n onClick={onDownload}\n onPointerDown={(e) => e.preventDefault()}\n data-test-id=\"download-button\"\n >\n <span className=\"tw-flex tw-text-xs tw-font-body tw-items-center tw-gap-1 tw-rounded-full tw-bg-box-neutral-strong-inverse hover:tw-bg-box-neutral-strong-inverse-hover active:tw-bg-box-neutral-strong-inverse-pressed tw-text-box-neutral-strong tw-outline tw-outline-1 tw-outline-offset-1 tw-p-1.5 tw-outline-line\">\n <IconArrowCircleDown16 />\n </span>\n </button>\n </Tooltip.Trigger>\n <Tooltip.Content side=\"top\">Download</Tooltip.Content>\n </Tooltip.Root>\n );\n};\n"],"names":["DownloadButton","onDownload","ariaLabel","isFocused","focusProps","useFocusRing","jsxs","Tooltip","jsx","joinClassNames","FOCUS_STYLE","e","IconArrowCircleDown16"],"mappings":";;;;;AAUO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,WAAAC,QAAqC;AAC9E,QAAM,EAAE,WAAAC,GAAW,YAAAC,EAAW,IAAIC,EAAa;AAE/C,SACK,gBAAAC,EAAAC,EAAQ,MAAR,EAAa,YAAY,KACtB,UAAA;AAAA,IAAA,gBAAAC,EAACD,EAAQ,SAAR,EAAgB,SAAO,IACpB,UAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,UAAU;AAAA,QACV,cAAYN,KAAa;AAAA,QACxB,GAAGE;AAAA,QACJ,WAAWK,EAAe,CAAC,8BAA8BN,KAAaO,CAAW,CAAC;AAAA,QAClF,SAAST;AAAA,QACT,eAAe,CAACU,MAAMA,EAAE,eAAe;AAAA,QACvC,gBAAa;AAAA,QAEb,4BAAC,QAAK,EAAA,WAAU,0SACZ,UAAA,gBAAAH,EAACI,IAAsB,CAAA,GAC3B;AAAA,MAAA;AAAA,IAAA,GAER;AAAA,sBACCL,EAAQ,SAAR,EAAgB,MAAK,OAAM,UAAQ,YAAA;AAAA,EACxC,EAAA,CAAA;AAER;"}
|