@chayns-components/core 5.5.3 → 5.5.7

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.
Files changed (70) hide show
  1. package/AGENTS.md +87 -2
  2. package/lib/cjs/components/checkbox/Checkbox.js +2 -1
  3. package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
  4. package/lib/cjs/components/copyable-content/CopyableContent.js +102 -0
  5. package/lib/cjs/components/copyable-content/CopyableContent.js.map +1 -0
  6. package/lib/cjs/components/copyable-content/CopyableContent.styles.js +152 -0
  7. package/lib/cjs/components/copyable-content/CopyableContent.styles.js.map +1 -0
  8. package/lib/cjs/components/copyable-content/CopyableContent.test.js +83 -0
  9. package/lib/cjs/components/copyable-content/CopyableContent.test.js.map +1 -0
  10. package/lib/cjs/components/copyable-content/copyableContentClipboard.js +59 -0
  11. package/lib/cjs/components/copyable-content/copyableContentClipboard.js.map +1 -0
  12. package/lib/cjs/components/copyable-content/copyableContentClipboard.test.js +40 -0
  13. package/lib/cjs/components/copyable-content/copyableContentClipboard.test.js.map +1 -0
  14. package/lib/cjs/constants/textStrings.js +18 -0
  15. package/lib/cjs/constants/textStrings.js.map +1 -1
  16. package/lib/cjs/index.js +7 -0
  17. package/lib/cjs/index.js.map +1 -1
  18. package/lib/esm/components/checkbox/Checkbox.js +2 -1
  19. package/lib/esm/components/checkbox/Checkbox.js.map +1 -1
  20. package/lib/esm/components/copyable-content/CopyableContent.js +93 -0
  21. package/lib/esm/components/copyable-content/CopyableContent.js.map +1 -0
  22. package/lib/esm/components/copyable-content/CopyableContent.styles.js +145 -0
  23. package/lib/esm/components/copyable-content/CopyableContent.styles.js.map +1 -0
  24. package/lib/esm/components/copyable-content/CopyableContent.test.js +80 -0
  25. package/lib/esm/components/copyable-content/CopyableContent.test.js.map +1 -0
  26. package/lib/esm/components/copyable-content/copyableContentClipboard.js +52 -0
  27. package/lib/esm/components/copyable-content/copyableContentClipboard.js.map +1 -0
  28. package/lib/esm/components/copyable-content/copyableContentClipboard.test.js +38 -0
  29. package/lib/esm/components/copyable-content/copyableContentClipboard.test.js.map +1 -0
  30. package/lib/esm/constants/textStrings.js +18 -0
  31. package/lib/esm/constants/textStrings.js.map +1 -1
  32. package/lib/esm/index.js +1 -0
  33. package/lib/esm/index.js.map +1 -1
  34. package/lib/types/components/accordion/Accordion.styles.d.ts +3 -3
  35. package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +3 -3
  36. package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +30 -30
  37. package/lib/types/components/amount-control/AmountControl.styles.d.ts +3 -3
  38. package/lib/types/components/button/Button.styles.d.ts +9 -9
  39. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +3 -3
  40. package/lib/types/components/copyable-content/CopyableContent.d.ts +9 -0
  41. package/lib/types/components/copyable-content/CopyableContent.styles.d.ts +25 -0
  42. package/lib/types/components/copyable-content/copyableContentClipboard.d.ts +1 -0
  43. package/lib/types/components/dropdown-body-wrapper/delayed-dropdown-content/DelayedDropdownContent.styles.d.ts +3 -3
  44. package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +3 -3
  45. package/lib/types/components/file-input/FileInput.styles.d.ts +3 -3
  46. package/lib/types/components/file-select/FileSelect.styles.d.ts +3 -3
  47. package/lib/types/components/filter/Filter.styles.d.ts +3 -3
  48. package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +3 -3
  49. package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.d.ts +6 -6
  50. package/lib/types/components/input/Input.styles.d.ts +9 -9
  51. package/lib/types/components/list/list-item/ListItem.styles.d.ts +4 -4
  52. package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +3 -3
  53. package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +11 -11
  54. package/lib/types/components/masonry/masonry-item/MasonryItem.styles.d.ts +3 -3
  55. package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +6 -6
  56. package/lib/types/components/multi-action-button/MultiActionButton.styles.d.ts +3 -3
  57. package/lib/types/components/multi-action-button/action-button/ActionButton.styles.d.ts +3 -3
  58. package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +3 -3
  59. package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +3 -3
  60. package/lib/types/components/radio-button/RadioButton.styles.d.ts +3 -3
  61. package/lib/types/components/search-box/SearchBox.styles.d.ts +3 -3
  62. package/lib/types/components/search-input/SearchInput.styles.d.ts +6 -6
  63. package/lib/types/components/skeleton/base-skeleton/BaseSkeleton.styles.d.ts +6 -6
  64. package/lib/types/components/slider/Slider.styles.d.ts +5 -5
  65. package/lib/types/components/slider-button/SliderButton.styles.d.ts +3 -3
  66. package/lib/types/components/text-area/TextArea.styles.d.ts +3 -3
  67. package/lib/types/components/truncation/Truncation.styles.d.ts +3 -3
  68. package/lib/types/constants/textStrings.d.ts +18 -0
  69. package/lib/types/index.d.ts +1 -0
  70. package/package.json +11 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyableContentClipboard.js","names":["_format","require","RICH_MIME_TYPES","createClipboardItem","data","ClipboardItem","supportsRichMimeTypes","supports","every","mimeType","copyPlainText","source","navigator","clipboard","write","Blob","type","writeText","copyableContentToClipboard","Error","html","formatStringToHtml","exports"],"sources":["../../../../src/components/copyable-content/copyableContentClipboard.ts"],"sourcesContent":["import { formatStringToHtml } from '@chayns-components/format';\n\nconst RICH_MIME_TYPES = ['text/plain', 'text/markdown', 'text/html'] as const;\n\nconst createClipboardItem = (data: Record<string, Blob>) => new ClipboardItem(data);\n\nconst supportsRichMimeTypes = () => {\n if (typeof ClipboardItem === 'undefined' || typeof ClipboardItem.supports !== 'function') {\n return true;\n }\n\n return RICH_MIME_TYPES.every((mimeType) => ClipboardItem.supports(mimeType));\n};\n\nconst copyPlainText = async (source: string) => {\n if (typeof ClipboardItem !== 'undefined') {\n try {\n await navigator.clipboard.write([\n createClipboardItem({ 'text/plain': new Blob([source], { type: 'text/plain' }) }),\n ]);\n return;\n } catch {\n // Use writeText as the final browser-compatible fallback.\n }\n }\n\n await navigator.clipboard.writeText(source);\n};\n\nexport const copyableContentToClipboard = async (source: string) => {\n if (!navigator.clipboard) {\n throw new Error('Clipboard API is not available.');\n }\n\n if (typeof ClipboardItem === 'undefined' || !supportsRichMimeTypes()) {\n await copyPlainText(source);\n return;\n }\n\n const { html } = formatStringToHtml(source);\n\n try {\n await navigator.clipboard.write([\n createClipboardItem({\n 'text/plain': new Blob([source], { type: 'text/plain' }),\n 'text/markdown': new Blob([source], { type: 'text/markdown' }),\n 'text/html': new Blob([html], { type: 'text/html' }),\n }),\n ]);\n } catch {\n await copyPlainText(source);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,MAAMC,eAAe,GAAG,CAAC,YAAY,EAAE,eAAe,EAAE,WAAW,CAAU;AAE7E,MAAMC,mBAAmB,GAAIC,IAA0B,IAAK,IAAIC,aAAa,CAACD,IAAI,CAAC;AAEnF,MAAME,qBAAqB,GAAGA,CAAA,KAAM;EAChC,IAAI,OAAOD,aAAa,KAAK,WAAW,IAAI,OAAOA,aAAa,CAACE,QAAQ,KAAK,UAAU,EAAE;IACtF,OAAO,IAAI;EACf;EAEA,OAAOL,eAAe,CAACM,KAAK,CAAEC,QAAQ,IAAKJ,aAAa,CAACE,QAAQ,CAACE,QAAQ,CAAC,CAAC;AAChF,CAAC;AAED,MAAMC,aAAa,GAAG,MAAOC,MAAc,IAAK;EAC5C,IAAI,OAAON,aAAa,KAAK,WAAW,EAAE;IACtC,IAAI;MACA,MAAMO,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAC5BX,mBAAmB,CAAC;QAAE,YAAY,EAAE,IAAIY,IAAI,CAAC,CAACJ,MAAM,CAAC,EAAE;UAAEK,IAAI,EAAE;QAAa,CAAC;MAAE,CAAC,CAAC,CACpF,CAAC;MACF;IACJ,CAAC,CAAC,MAAM;MACJ;IAAA;EAER;EAEA,MAAMJ,SAAS,CAACC,SAAS,CAACI,SAAS,CAACN,MAAM,CAAC;AAC/C,CAAC;AAEM,MAAMO,0BAA0B,GAAG,MAAOP,MAAc,IAAK;EAChE,IAAI,CAACC,SAAS,CAACC,SAAS,EAAE;IACtB,MAAM,IAAIM,KAAK,CAAC,iCAAiC,CAAC;EACtD;EAEA,IAAI,OAAOd,aAAa,KAAK,WAAW,IAAI,CAACC,qBAAqB,CAAC,CAAC,EAAE;IAClE,MAAMI,aAAa,CAACC,MAAM,CAAC;IAC3B;EACJ;EAEA,MAAM;IAAES;EAAK,CAAC,GAAG,IAAAC,0BAAkB,EAACV,MAAM,CAAC;EAE3C,IAAI;IACA,MAAMC,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAC5BX,mBAAmB,CAAC;MAChB,YAAY,EAAE,IAAIY,IAAI,CAAC,CAACJ,MAAM,CAAC,EAAE;QAAEK,IAAI,EAAE;MAAa,CAAC,CAAC;MACxD,eAAe,EAAE,IAAID,IAAI,CAAC,CAACJ,MAAM,CAAC,EAAE;QAAEK,IAAI,EAAE;MAAgB,CAAC,CAAC;MAC9D,WAAW,EAAE,IAAID,IAAI,CAAC,CAACK,IAAI,CAAC,EAAE;QAAEJ,IAAI,EAAE;MAAY,CAAC;IACvD,CAAC,CAAC,CACL,CAAC;EACN,CAAC,CAAC,MAAM;IACJ,MAAMN,aAAa,CAACC,MAAM,CAAC;EAC/B;AACJ,CAAC;AAACW,OAAA,CAAAJ,0BAAA,GAAAA,0BAAA","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ var _format = require("@chayns-components/format");
4
+ var _vitest = require("vitest");
5
+ var _copyableContentClipboard = require("./copyableContentClipboard");
6
+ const source = '# Heading\n\n[Link](https://example.com)';
7
+ const readBlob = blob => new Promise((resolve, reject) => {
8
+ const reader = new FileReader();
9
+ reader.onerror = () => reject(reader.error);
10
+ reader.onload = () => resolve(reader.result);
11
+ reader.readAsText(blob);
12
+ });
13
+ (0, _vitest.describe)('copyableContentToClipboard', () => {
14
+ (0, _vitest.afterEach)(() => {
15
+ _vitest.vi.restoreAllMocks();
16
+ });
17
+ (0, _vitest.it)('writes exact source as plain text and markdown with safe HTML', async () => {
18
+ const write = _vitest.vi.spyOn(navigator.clipboard, 'write').mockResolvedValue();
19
+ await (0, _copyableContentClipboard.copyableContentToClipboard)(source);
20
+ const item = write.mock.calls[0][0][0];
21
+ await (0, _vitest.expect)(readBlob(await item.getType('text/plain'))).resolves.toBe(source);
22
+ await (0, _vitest.expect)(readBlob(await item.getType('text/markdown'))).resolves.toBe(source);
23
+ await (0, _vitest.expect)(readBlob(await item.getType('text/html'))).resolves.toBe((0, _format.formatStringToHtml)(source).html);
24
+ });
25
+ (0, _vitest.it)('uses a plain ClipboardItem when rich MIME types are unsupported', async () => {
26
+ _vitest.vi.stubGlobal('ClipboardItem', Object.assign(class {}, {
27
+ supports: () => false
28
+ }));
29
+ const write = _vitest.vi.spyOn(navigator.clipboard, 'write').mockResolvedValue();
30
+ await (0, _copyableContentClipboard.copyableContentToClipboard)(source);
31
+ (0, _vitest.expect)(write).toHaveBeenCalledTimes(1);
32
+ });
33
+ (0, _vitest.it)('uses writeText after ClipboardItem writes fail', async () => {
34
+ _vitest.vi.spyOn(navigator.clipboard, 'write').mockRejectedValue(new Error('denied'));
35
+ const writeText = _vitest.vi.spyOn(navigator.clipboard, 'writeText').mockResolvedValue();
36
+ await (0, _copyableContentClipboard.copyableContentToClipboard)(source);
37
+ (0, _vitest.expect)(writeText).toHaveBeenCalledWith(source);
38
+ });
39
+ });
40
+ //# sourceMappingURL=copyableContentClipboard.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyableContentClipboard.test.js","names":["_format","require","_vitest","_copyableContentClipboard","source","readBlob","blob","Promise","resolve","reject","reader","FileReader","onerror","error","onload","result","readAsText","describe","afterEach","vi","restoreAllMocks","it","write","spyOn","navigator","clipboard","mockResolvedValue","copyableContentToClipboard","item","mock","calls","expect","getType","resolves","toBe","formatStringToHtml","html","stubGlobal","Object","assign","supports","toHaveBeenCalledTimes","mockRejectedValue","Error","writeText","toHaveBeenCalledWith"],"sources":["../../../../src/components/copyable-content/copyableContentClipboard.test.ts"],"sourcesContent":["import { formatStringToHtml } from '@chayns-components/format';\nimport { afterEach, describe, expect, it, vi } from 'vitest';\nimport { copyableContentToClipboard } from './copyableContentClipboard';\n\nconst source = '# Heading\\n\\n[Link](https://example.com)';\n\nconst readBlob = (blob: Blob) =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = () => reject(reader.error);\n reader.onload = () => resolve(reader.result as string);\n reader.readAsText(blob);\n });\n\ndescribe('copyableContentToClipboard', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n });\n\n it('writes exact source as plain text and markdown with safe HTML', async () => {\n const write = vi.spyOn(navigator.clipboard, 'write').mockResolvedValue();\n\n await copyableContentToClipboard(source);\n\n const item = write.mock.calls[0][0][0] as unknown as ClipboardItem;\n await expect(readBlob(await item.getType('text/plain'))).resolves.toBe(source);\n await expect(readBlob(await item.getType('text/markdown'))).resolves.toBe(source);\n await expect(readBlob(await item.getType('text/html'))).resolves.toBe(\n formatStringToHtml(source).html,\n );\n });\n\n it('uses a plain ClipboardItem when rich MIME types are unsupported', async () => {\n vi.stubGlobal('ClipboardItem', Object.assign(class {}, { supports: () => false }));\n const write = vi.spyOn(navigator.clipboard, 'write').mockResolvedValue();\n\n await copyableContentToClipboard(source);\n\n expect(write).toHaveBeenCalledTimes(1);\n });\n\n it('uses writeText after ClipboardItem writes fail', async () => {\n vi.spyOn(navigator.clipboard, 'write').mockRejectedValue(new Error('denied'));\n const writeText = vi.spyOn(navigator.clipboard, 'writeText').mockResolvedValue();\n\n await copyableContentToClipboard(source);\n\n expect(writeText).toHaveBeenCalledWith(source);\n });\n});\n"],"mappings":";;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,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,MAAMuB,IAAI,CAACI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAACC,QAAQ,CAACC,IAAI,CACjE,IAAAC,0BAAkB,EAAC/B,MAAM,CAAC,CAACgC,IAC/B,CAAC;EACL,CAAC,CAAC;EAEF,IAAAf,UAAE,EAAC,iEAAiE,EAAE,YAAY;IAC9EF,UAAE,CAACkB,UAAU,CAAC,eAAe,EAAEC,MAAM,CAACC,MAAM,CAAC,MAAM,EAAE,EAAE;MAAEC,QAAQ,EAAEA,CAAA,KAAM;IAAM,CAAC,CAAC,CAAC;IAClF,MAAMlB,KAAK,GAAGH,UAAE,CAACI,KAAK,CAACC,SAAS,CAACC,SAAS,EAAE,OAAO,CAAC,CAACC,iBAAiB,CAAC,CAAC;IAExE,MAAM,IAAAC,oDAA0B,EAACvB,MAAM,CAAC;IAExC,IAAA2B,cAAM,EAACT,KAAK,CAAC,CAACmB,qBAAqB,CAAC,CAAC,CAAC;EAC1C,CAAC,CAAC;EAEF,IAAApB,UAAE,EAAC,gDAAgD,EAAE,YAAY;IAC7DF,UAAE,CAACI,KAAK,CAACC,SAAS,CAACC,SAAS,EAAE,OAAO,CAAC,CAACiB,iBAAiB,CAAC,IAAIC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7E,MAAMC,SAAS,GAAGzB,UAAE,CAACI,KAAK,CAACC,SAAS,CAACC,SAAS,EAAE,WAAW,CAAC,CAACC,iBAAiB,CAAC,CAAC;IAEhF,MAAM,IAAAC,oDAA0B,EAACvB,MAAM,CAAC;IAExC,IAAA2B,cAAM,EAACa,SAAS,CAAC,CAACC,oBAAoB,CAACzC,MAAM,CAAC;EAClD,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -45,6 +45,24 @@ var _default = exports.default = {
45
45
  stringName: 'txt_chayns_components_core_components_fileItem_remove',
46
46
  fallback: 'Entfernen'
47
47
  }
48
+ },
49
+ copyableContent: {
50
+ copy: {
51
+ stringName: 'txt_chayns_components_core_components_copyableContent_copy',
52
+ fallback: 'Kopieren'
53
+ },
54
+ share: {
55
+ stringName: 'txt_chayns_components_core_components_copyableContent_share',
56
+ fallback: 'Teilen'
57
+ },
58
+ copied: {
59
+ stringName: 'txt_chayns_components_core_components_copyableContent_copied',
60
+ fallback: 'Kopiert'
61
+ },
62
+ copyFailed: {
63
+ stringName: 'txt_chayns_components_core_components_copyableContent_copyFailed',
64
+ fallback: 'Kopieren fehlgeschlagen'
65
+ }
48
66
  }
49
67
  }
50
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"textStrings.js","names":["components","filter","filterContent","input","placeholder","stringName","fallback","sort","filterButtons","all","truncation","less","more","fileItem","download","remove"],"sources":["../../../src/constants/textStrings.ts"],"sourcesContent":["export default {\n components: {\n filter: {\n filterContent: {\n input: {\n placeholder: {\n stringName:\n 'txt_chayns_components_core_components_filter_filterContent_input_placeholder',\n fallback: 'Suche',\n },\n },\n sort: {\n stringName: 'txt_chayns_components_core_components_filter_filterContent_sort',\n fallback: 'Sortierung',\n },\n },\n },\n filterButtons: {\n all: {\n stringName: 'txt_chayns_components_core_components_filterButtons_all',\n fallback: 'Alle',\n },\n },\n truncation: {\n less: {\n stringName: 'txt_chayns_components_core_components_truncation_less',\n fallback: 'Weniger',\n },\n more: {\n stringName: 'txt_chayns_components_core_components_truncation_more',\n fallback: 'Mehr',\n },\n },\n fileItem: {\n download: {\n stringName: 'txt_chayns_components_core_components_fileItem_download',\n fallback: 'Download',\n },\n remove: {\n stringName: 'txt_chayns_components_core_components_fileItem_remove',\n fallback: 'Entfernen',\n },\n },\n },\n} as const;\n"],"mappings":";;;;;;iCAAe;EACXA,UAAU,EAAE;IACRC,MAAM,EAAE;MACJC,aAAa,EAAE;QACXC,KAAK,EAAE;UACHC,WAAW,EAAE;YACTC,UAAU,EACN,8EAA8E;YAClFC,QAAQ,EAAE;UACd;QACJ,CAAC;QACDC,IAAI,EAAE;UACFF,UAAU,EAAE,iEAAiE;UAC7EC,QAAQ,EAAE;QACd;MACJ;IACJ,CAAC;IACDE,aAAa,EAAE;MACXC,GAAG,EAAE;QACDJ,UAAU,EAAE,yDAAyD;QACrEC,QAAQ,EAAE;MACd;IACJ,CAAC;IACDI,UAAU,EAAE;MACRC,IAAI,EAAE;QACFN,UAAU,EAAE,uDAAuD;QACnEC,QAAQ,EAAE;MACd,CAAC;MACDM,IAAI,EAAE;QACFP,UAAU,EAAE,uDAAuD;QACnEC,QAAQ,EAAE;MACd;IACJ,CAAC;IACDO,QAAQ,EAAE;MACNC,QAAQ,EAAE;QACNT,UAAU,EAAE,yDAAyD;QACrEC,QAAQ,EAAE;MACd,CAAC;MACDS,MAAM,EAAE;QACJV,UAAU,EAAE,uDAAuD;QACnEC,QAAQ,EAAE;MACd;IACJ;EACJ;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"textStrings.js","names":["components","filter","filterContent","input","placeholder","stringName","fallback","sort","filterButtons","all","truncation","less","more","fileItem","download","remove","copyableContent","copy","share","copied","copyFailed"],"sources":["../../../src/constants/textStrings.ts"],"sourcesContent":["export default {\n components: {\n filter: {\n filterContent: {\n input: {\n placeholder: {\n stringName:\n 'txt_chayns_components_core_components_filter_filterContent_input_placeholder',\n fallback: 'Suche',\n },\n },\n sort: {\n stringName: 'txt_chayns_components_core_components_filter_filterContent_sort',\n fallback: 'Sortierung',\n },\n },\n },\n filterButtons: {\n all: {\n stringName: 'txt_chayns_components_core_components_filterButtons_all',\n fallback: 'Alle',\n },\n },\n truncation: {\n less: {\n stringName: 'txt_chayns_components_core_components_truncation_less',\n fallback: 'Weniger',\n },\n more: {\n stringName: 'txt_chayns_components_core_components_truncation_more',\n fallback: 'Mehr',\n },\n },\n fileItem: {\n download: {\n stringName: 'txt_chayns_components_core_components_fileItem_download',\n fallback: 'Download',\n },\n remove: {\n stringName: 'txt_chayns_components_core_components_fileItem_remove',\n fallback: 'Entfernen',\n },\n },\n copyableContent: {\n copy: {\n stringName: 'txt_chayns_components_core_components_copyableContent_copy',\n fallback: 'Kopieren',\n },\n share: {\n stringName: 'txt_chayns_components_core_components_copyableContent_share',\n fallback: 'Teilen',\n },\n copied: {\n stringName: 'txt_chayns_components_core_components_copyableContent_copied',\n fallback: 'Kopiert',\n },\n copyFailed: {\n stringName: 'txt_chayns_components_core_components_copyableContent_copyFailed',\n fallback: 'Kopieren fehlgeschlagen',\n },\n },\n },\n} as const;\n"],"mappings":";;;;;;iCAAe;EACXA,UAAU,EAAE;IACRC,MAAM,EAAE;MACJC,aAAa,EAAE;QACXC,KAAK,EAAE;UACHC,WAAW,EAAE;YACTC,UAAU,EACN,8EAA8E;YAClFC,QAAQ,EAAE;UACd;QACJ,CAAC;QACDC,IAAI,EAAE;UACFF,UAAU,EAAE,iEAAiE;UAC7EC,QAAQ,EAAE;QACd;MACJ;IACJ,CAAC;IACDE,aAAa,EAAE;MACXC,GAAG,EAAE;QACDJ,UAAU,EAAE,yDAAyD;QACrEC,QAAQ,EAAE;MACd;IACJ,CAAC;IACDI,UAAU,EAAE;MACRC,IAAI,EAAE;QACFN,UAAU,EAAE,uDAAuD;QACnEC,QAAQ,EAAE;MACd,CAAC;MACDM,IAAI,EAAE;QACFP,UAAU,EAAE,uDAAuD;QACnEC,QAAQ,EAAE;MACd;IACJ,CAAC;IACDO,QAAQ,EAAE;MACNC,QAAQ,EAAE;QACNT,UAAU,EAAE,yDAAyD;QACrEC,QAAQ,EAAE;MACd,CAAC;MACDS,MAAM,EAAE;QACJV,UAAU,EAAE,uDAAuD;QACnEC,QAAQ,EAAE;MACd;IACJ,CAAC;IACDU,eAAe,EAAE;MACbC,IAAI,EAAE;QACFZ,UAAU,EAAE,4DAA4D;QACxEC,QAAQ,EAAE;MACd,CAAC;MACDY,KAAK,EAAE;QACHb,UAAU,EAAE,6DAA6D;QACzEC,QAAQ,EAAE;MACd,CAAC;MACDa,MAAM,EAAE;QACJd,UAAU,EAAE,8DAA8D;QAC1EC,QAAQ,EAAE;MACd,CAAC;MACDc,UAAU,EAAE;QACRf,UAAU,EAAE,kEAAkE;QAC9EC,QAAQ,EAAE;MACd;IACJ;EACJ;AACJ,CAAC","ignoreList":[]}
package/lib/cjs/index.js CHANGED
@@ -141,6 +141,12 @@ Object.defineProperty(exports, "ContextMenuAlignment", {
141
141
  return _ContextMenu2.ContextMenuAlignment;
142
142
  }
143
143
  });
144
+ Object.defineProperty(exports, "CopyableContent", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _CopyableContent.default;
148
+ }
149
+ });
144
150
  Object.defineProperty(exports, "DropdownBodyWrapper", {
145
151
  enumerable: true,
146
152
  get: function () {
@@ -615,6 +621,7 @@ var _FileSelect = _interopRequireDefault(require("./components/file-select/FileS
615
621
  var _DropdownBodyWrapper = _interopRequireDefault(require("./components/dropdown-body-wrapper/DropdownBodyWrapper"));
616
622
  var _ComboBox = _interopRequireDefault(require("./components/combobox/ComboBox"));
617
623
  var _ContentCard = _interopRequireDefault(require("./components/content-card/ContentCard"));
624
+ var _CopyableContent = _interopRequireDefault(require("./components/copyable-content/CopyableContent"));
618
625
  var _HighlightSlider = _interopRequireDefault(require("./components/highlight-slider/HighlightSlider"));
619
626
  var _ContextMenu = _interopRequireDefault(require("./components/context-menu/ContextMenu"));
620
627
  var _ContextMenu2 = require("./components/context-menu/ContextMenu.types");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_ListItem2","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","_skeleton","_types","_Masonry","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType, getHumanSize } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\nexport { default as Skeleton } from './components/skeleton';\nexport { SkeletonAnimationType } from './components/skeleton/types';\nexport { default as Masonry } from './components/masonry/Masonry';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAApF,uBAAAmF,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_CopyableContent","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_ListItem2","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","_skeleton","_types","_Masonry","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport {\n default as CopyableContent,\n type CopyableContentProps,\n} from './components/copyable-content/CopyableContent';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType, getHumanSize } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\nexport { default as Skeleton } from './components/skeleton';\nexport { SkeletonAnimationType } from './components/skeleton/types';\nexport { default as Masonry } from './components/masonry/Masonry';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ox = ({
38
38
  }, [shouldShowCentered]);
39
39
  const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(shouldEnableKeyboardHighlighting && !isDisabled);
40
40
  return /*#__PURE__*/React.createElement(StyledCheckbox, {
41
- ref: checkboxRootRef
41
+ ref: checkboxRootRef,
42
+ className: "beta-chayns-checkbox"
42
43
  }, /*#__PURE__*/React.createElement(StyledCheckboxInput, {
43
44
  $shouldShowKeyboardHighlighting: shouldShowKeyboardHighlighting,
44
45
  checked: isChecked,
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["React","useCallback","useEffect","useRef","useState","useKeyboardFocusHighlighting","useUuid","getHeightOfSingleTextLine","StyledCheckbox","StyledCheckboxBox","StyledCheckboxBoxWrapper","StyledCheckboxInput","StyledCheckboxLabel","Checkbox","children","isChecked","isDisabled","labelClassName","onChange","shouldShowAsSwitch","borderRadius","colors","shouldShowCentered","shouldChangeOnLabelClick","shouldEnableKeyboardHighlighting","isActive","setIsActive","checkboxTop","setCheckboxTop","undefined","checkboxBoxRef","checkboxRootRef","handleChange","event","target","checked","uuid","current","singleLineHeight","container","boxHeight","getBoundingClientRect","height","shouldShowKeyboardHighlighting","createElement","ref","$shouldShowKeyboardHighlighting","disabled","id","type","$shouldShowAsSwitch","style","top","transform","htmlFor","$isChecked","$isDisabled","$checkedBackgroundColor","checkedBackgroundColor","$uncheckedBackgroundColor","uncheckedBackgroundColor","$borderRadius","$borderColor","borderColor","className","$shouldChangeOnLabelClick","displayName"],"sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FC,\n KeyboardEvent,\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport { useUuid } from '../../hooks/uuid';\nimport { getHeightOfSingleTextLine } from '../../utils/calculate';\nimport {\n StyledCheckbox,\n StyledCheckboxBox,\n StyledCheckboxBoxWrapper,\n StyledCheckboxInput,\n StyledCheckboxLabel,\n} from './Checkbox.styles';\n\ntype CheckboxColors = {\n /**\n * Background color for the checked state.\n */\n checkedBackgroundColor?: CSSProperties['backgroundColor'];\n /**\n * Background color for the unchecked state.\n */\n uncheckedBackgroundColor?: CSSProperties['backgroundColor'];\n\n /**\n * Border color for the checkbox or switch indicator.\n */\n borderColor?: CSSProperties['borderColor'];\n};\n\nexport type CheckboxProps = {\n /**\n * Text for checkbox or switch\n */\n children?: ReactElement | string;\n /**\n * Indicates whether the checkbox or switch is selected\n */\n isChecked?: boolean;\n /**\n * Disables the checkbox or switch so it cannot be toggled\n */\n isDisabled?: boolean;\n /**\n * Classname for the label\n */\n labelClassName?: string;\n /**\n * Function to be executed if the checked value changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether the label should change the state of the checkbox\n */\n shouldChangeOnLabelClick?: boolean;\n /**\n * Changes the design to use switch instead of checkbox\n */\n shouldShowAsSwitch?: boolean;\n /**\n * Border radius for the checkbox or switch indicator.\n */\n borderRadius?: CSSProperties['borderRadius'];\n colors?: CheckboxColors;\n /**\n * Whether the Checkbox should be displayed centered to the label or at the top\n */\n shouldShowCentered?: boolean;\n /**\n * Enables keyboard-only focus highlighting.\n */\n shouldEnableKeyboardHighlighting?: boolean;\n};\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n isChecked,\n isDisabled,\n labelClassName,\n onChange,\n shouldShowAsSwitch,\n borderRadius,\n colors,\n shouldShowCentered = false,\n shouldChangeOnLabelClick = true,\n shouldEnableKeyboardHighlighting,\n}) => {\n const [isActive, setIsActive] = useState(isChecked ?? false);\n const [checkboxTop, setCheckboxTop] = useState<number | undefined>(undefined);\n\n const checkboxBoxRef = useRef<HTMLLabelElement>(null);\n const checkboxRootRef = useRef<HTMLDivElement>(null);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setIsActive(event.target.checked);\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange],\n );\n\n const uuid = useUuid();\n\n useEffect(() => {\n if (checkboxRootRef.current && !shouldShowCentered) {\n const singleLineHeight = getHeightOfSingleTextLine({\n container: checkboxRootRef.current,\n });\n\n const boxHeight = checkboxBoxRef.current?.getBoundingClientRect().height ?? 0;\n\n setCheckboxTop((singleLineHeight - boxHeight) / 2);\n }\n }, [shouldShowCentered]);\n\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n\n return (\n <StyledCheckbox ref={checkboxRootRef}>\n <StyledCheckboxInput\n $shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n checked={isChecked}\n disabled={isDisabled}\n id={uuid}\n onChange={handleChange}\n type=\"checkbox\"\n />\n\n <StyledCheckboxBoxWrapper\n $shouldShowAsSwitch={shouldShowAsSwitch}\n style={{\n top: shouldShowCentered ? '50%' : checkboxTop,\n transform: shouldShowCentered ? 'translateY(-50%)' : undefined,\n }}\n >\n <StyledCheckboxBox\n htmlFor={uuid}\n ref={checkboxBoxRef}\n $isChecked={isChecked ?? isActive}\n $isDisabled={isDisabled}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n $checkedBackgroundColor={colors?.checkedBackgroundColor}\n $uncheckedBackgroundColor={colors?.uncheckedBackgroundColor}\n $borderRadius={borderRadius}\n $borderColor={colors?.borderColor}\n />\n </StyledCheckboxBoxWrapper>\n <StyledCheckboxLabel\n className={labelClassName}\n $isDisabled={isDisabled}\n $shouldChangeOnLabelClick={shouldChangeOnLabelClick}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n htmlFor={shouldChangeOnLabelClick ? uuid : undefined}\n >\n {children}\n </StyledCheckboxLabel>\n </StyledCheckbox>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"mappings":"AAAA,OAAOA,KAAK,IAORC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACL,OAAO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AW,EAAExC,UAAW;IACxBiD,yBAAyB,EAAE1C,wBAAyB;IACpD2B,mBAAmB,EAAE/B,kBAAmB;IACxCmC,OAAO,EAAE/B,wBAAwB,GAAGa,IAAI,GAAGP;EAAU,GAEpDf,QACgB,CACT,CAAC;AAEzB,CAAC;AAEDD,QAAQ,CAACqD,WAAW,GAAG,UAAU;AAEjC,eAAerD,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"Checkbox.js","names":["React","useCallback","useEffect","useRef","useState","useKeyboardFocusHighlighting","useUuid","getHeightOfSingleTextLine","StyledCheckbox","StyledCheckboxBox","StyledCheckboxBoxWrapper","StyledCheckboxInput","StyledCheckboxLabel","Checkbox","children","isChecked","isDisabled","labelClassName","onChange","shouldShowAsSwitch","borderRadius","colors","shouldShowCentered","shouldChangeOnLabelClick","shouldEnableKeyboardHighlighting","isActive","setIsActive","checkboxTop","setCheckboxTop","undefined","checkboxBoxRef","checkboxRootRef","handleChange","event","target","checked","uuid","current","singleLineHeight","container","boxHeight","getBoundingClientRect","height","shouldShowKeyboardHighlighting","createElement","ref","className","$shouldShowKeyboardHighlighting","disabled","id","type","$shouldShowAsSwitch","style","top","transform","htmlFor","$isChecked","$isDisabled","$checkedBackgroundColor","checkedBackgroundColor","$uncheckedBackgroundColor","uncheckedBackgroundColor","$borderRadius","$borderColor","borderColor","$shouldChangeOnLabelClick","displayName"],"sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FC,\n KeyboardEvent,\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport { useUuid } from '../../hooks/uuid';\nimport { getHeightOfSingleTextLine } from '../../utils/calculate';\nimport {\n StyledCheckbox,\n StyledCheckboxBox,\n StyledCheckboxBoxWrapper,\n StyledCheckboxInput,\n StyledCheckboxLabel,\n} from './Checkbox.styles';\n\ntype CheckboxColors = {\n /**\n * Background color for the checked state.\n */\n checkedBackgroundColor?: CSSProperties['backgroundColor'];\n /**\n * Background color for the unchecked state.\n */\n uncheckedBackgroundColor?: CSSProperties['backgroundColor'];\n\n /**\n * Border color for the checkbox or switch indicator.\n */\n borderColor?: CSSProperties['borderColor'];\n};\n\nexport type CheckboxProps = {\n /**\n * Text for checkbox or switch\n */\n children?: ReactElement | string;\n /**\n * Indicates whether the checkbox or switch is selected\n */\n isChecked?: boolean;\n /**\n * Disables the checkbox or switch so it cannot be toggled\n */\n isDisabled?: boolean;\n /**\n * Classname for the label\n */\n labelClassName?: string;\n /**\n * Function to be executed if the checked value changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether the label should change the state of the checkbox\n */\n shouldChangeOnLabelClick?: boolean;\n /**\n * Changes the design to use switch instead of checkbox\n */\n shouldShowAsSwitch?: boolean;\n /**\n * Border radius for the checkbox or switch indicator.\n */\n borderRadius?: CSSProperties['borderRadius'];\n colors?: CheckboxColors;\n /**\n * Whether the Checkbox should be displayed centered to the label or at the top\n */\n shouldShowCentered?: boolean;\n /**\n * Enables keyboard-only focus highlighting.\n */\n shouldEnableKeyboardHighlighting?: boolean;\n};\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n isChecked,\n isDisabled,\n labelClassName,\n onChange,\n shouldShowAsSwitch,\n borderRadius,\n colors,\n shouldShowCentered = false,\n shouldChangeOnLabelClick = true,\n shouldEnableKeyboardHighlighting,\n}) => {\n const [isActive, setIsActive] = useState(isChecked ?? false);\n const [checkboxTop, setCheckboxTop] = useState<number | undefined>(undefined);\n\n const checkboxBoxRef = useRef<HTMLLabelElement>(null);\n const checkboxRootRef = useRef<HTMLDivElement>(null);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setIsActive(event.target.checked);\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange],\n );\n\n const uuid = useUuid();\n\n useEffect(() => {\n if (checkboxRootRef.current && !shouldShowCentered) {\n const singleLineHeight = getHeightOfSingleTextLine({\n container: checkboxRootRef.current,\n });\n\n const boxHeight = checkboxBoxRef.current?.getBoundingClientRect().height ?? 0;\n\n setCheckboxTop((singleLineHeight - boxHeight) / 2);\n }\n }, [shouldShowCentered]);\n\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n\n return (\n <StyledCheckbox ref={checkboxRootRef} className=\"beta-chayns-checkbox\">\n <StyledCheckboxInput\n $shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n checked={isChecked}\n disabled={isDisabled}\n id={uuid}\n onChange={handleChange}\n type=\"checkbox\"\n />\n\n <StyledCheckboxBoxWrapper\n $shouldShowAsSwitch={shouldShowAsSwitch}\n style={{\n top: shouldShowCentered ? '50%' : checkboxTop,\n transform: shouldShowCentered ? 'translateY(-50%)' : undefined,\n }}\n >\n <StyledCheckboxBox\n htmlFor={uuid}\n ref={checkboxBoxRef}\n $isChecked={isChecked ?? isActive}\n $isDisabled={isDisabled}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n $checkedBackgroundColor={colors?.checkedBackgroundColor}\n $uncheckedBackgroundColor={colors?.uncheckedBackgroundColor}\n $borderRadius={borderRadius}\n $borderColor={colors?.borderColor}\n />\n </StyledCheckboxBoxWrapper>\n <StyledCheckboxLabel\n className={labelClassName}\n $isDisabled={isDisabled}\n $shouldChangeOnLabelClick={shouldChangeOnLabelClick}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n htmlFor={shouldChangeOnLabelClick ? uuid : undefined}\n >\n {children}\n </StyledCheckboxLabel>\n </StyledCheckbox>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"mappings":"AAAA,OAAOA,KAAK,IAORC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,4BAA4B,QAAQ,0CAA0C;AACvF,SAASC,OAAO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,yBAAyB,EAAE1C,wBAAyB;IACpD4B,mBAAmB,EAAEhC,kBAAmB;IACxCoC,OAAO,EAAEhC,wBAAwB,GAAGa,IAAI,GAAGP;EAAU,GAEpDf,QACgB,CACT,CAAC;AAEzB,CAAC;AAEDD,QAAQ,CAACqD,WAAW,GAAG,UAAU;AAEjC,eAAerD,QAAQ","ignoreList":[]}
@@ -0,0 +1,93 @@
1
+ import { formatStringToHtml } from '@chayns-components/format';
2
+ import { ttsToITextString, useTextstringValue } from '@chayns-components/textstring';
3
+ import { createDialog, DialogType, ToastType } from 'chayns-api';
4
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
5
+ import textStrings from '../../constants/textStrings';
6
+ import SharingContextMenu from '../sharing-context-menu/SharingContextMenu';
7
+ import Icon from '../icon/Icon';
8
+ import { StyledCopyableContent, StyledCopyableContentActionGroup, StyledCopyableContentActions, StyledCopyableContentBody, StyledCopyableContentButton } from './CopyableContent.styles';
9
+ import { copyableContentToClipboard } from './copyableContentClipboard';
10
+ const STICKY_ACTION_OFFSET = 8;
11
+ const CopyableContent = ({
12
+ content,
13
+ children,
14
+ copiedMessage,
15
+ copyFailedMessage
16
+ }) => {
17
+ const [isActionGroupSticky, setIsActionGroupSticky] = useState(false);
18
+ const actionGroupRef = useRef(null);
19
+ const defaultCopyButtonText = useTextstringValue({
20
+ textstring: ttsToITextString(textStrings.components.copyableContent.copy)
21
+ });
22
+ const defaultCopiedMessage = useTextstringValue({
23
+ textstring: ttsToITextString(textStrings.components.copyableContent.copied)
24
+ });
25
+ const defaultCopyFailedMessage = useTextstringValue({
26
+ textstring: ttsToITextString(textStrings.components.copyableContent.copyFailed)
27
+ });
28
+ const shareText = useTextstringValue({
29
+ textstring: ttsToITextString(textStrings.components.copyableContent.share)
30
+ });
31
+ const html = useMemo(() => formatStringToHtml(content).html, [content]);
32
+ useEffect(() => {
33
+ const updateStickyState = () => {
34
+ const actionGroupTop = actionGroupRef.current?.getBoundingClientRect().top;
35
+ setIsActionGroupSticky(actionGroupTop !== undefined && actionGroupTop <= STICKY_ACTION_OFFSET);
36
+ };
37
+ updateStickyState();
38
+ document.addEventListener('scroll', updateStickyState, true);
39
+ window.addEventListener('resize', updateStickyState);
40
+ return () => {
41
+ document.removeEventListener('scroll', updateStickyState, true);
42
+ window.removeEventListener('resize', updateStickyState);
43
+ };
44
+ }, []);
45
+ const handleCopy = useCallback(async () => {
46
+ try {
47
+ await copyableContentToClipboard(content);
48
+ void createDialog({
49
+ showCloseIcon: true,
50
+ text: copiedMessage ?? defaultCopiedMessage,
51
+ toastType: ToastType.SUCCESS,
52
+ type: DialogType.TOAST
53
+ }).open();
54
+ } catch {
55
+ void createDialog({
56
+ showCloseIcon: true,
57
+ text: copyFailedMessage ?? defaultCopyFailedMessage,
58
+ toastType: ToastType.ERROR,
59
+ type: DialogType.TOAST
60
+ }).open();
61
+ }
62
+ }, [content, copiedMessage, defaultCopiedMessage, defaultCopyFailedMessage, copyFailedMessage]);
63
+ return /*#__PURE__*/React.createElement(StyledCopyableContent, {
64
+ className: "copyable-content"
65
+ }, /*#__PURE__*/React.createElement(StyledCopyableContentActions, {
66
+ ref: actionGroupRef
67
+ }, /*#__PURE__*/React.createElement(StyledCopyableContentActionGroup, null, /*#__PURE__*/React.createElement(StyledCopyableContentButton, {
68
+ $isSticky: isActionGroupSticky,
69
+ "aria-label": defaultCopyButtonText,
70
+ onClick: () => {
71
+ void handleCopy();
72
+ },
73
+ type: "button"
74
+ }, /*#__PURE__*/React.createElement(Icon, {
75
+ icons: ['fa-light fa-copy']
76
+ })), /*#__PURE__*/React.createElement(SharingContextMenu, {
77
+ link: content,
78
+ shouldUseDefaultTriggerStyles: false
79
+ }, /*#__PURE__*/React.createElement(StyledCopyableContentButton, {
80
+ $isSticky: isActionGroupSticky,
81
+ "aria-label": shareText,
82
+ type: "button"
83
+ }, /*#__PURE__*/React.createElement(Icon, {
84
+ icons: ['fa fa-share-nodes']
85
+ }))))), /*#__PURE__*/React.createElement(StyledCopyableContentBody, null, children ?? /*#__PURE__*/React.createElement("div", {
86
+ dangerouslySetInnerHTML: {
87
+ __html: html
88
+ }
89
+ })));
90
+ };
91
+ CopyableContent.displayName = 'CopyableContent';
92
+ export default CopyableContent;
93
+ //# sourceMappingURL=CopyableContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyableContent.js","names":["formatStringToHtml","ttsToITextString","useTextstringValue","createDialog","DialogType","ToastType","React","useCallback","useEffect","useMemo","useRef","useState","textStrings","SharingContextMenu","Icon","StyledCopyableContent","StyledCopyableContentActionGroup","StyledCopyableContentActions","StyledCopyableContentBody","StyledCopyableContentButton","copyableContentToClipboard","STICKY_ACTION_OFFSET","CopyableContent","content","children","copiedMessage","copyFailedMessage","isActionGroupSticky","setIsActionGroupSticky","actionGroupRef","defaultCopyButtonText","textstring","components","copyableContent","copy","defaultCopiedMessage","copied","defaultCopyFailedMessage","copyFailed","shareText","share","html","updateStickyState","actionGroupTop","current","getBoundingClientRect","top","undefined","document","addEventListener","window","removeEventListener","handleCopy","showCloseIcon","text","toastType","SUCCESS","type","TOAST","open","ERROR","createElement","className","ref","$isSticky","onClick","icons","link","shouldUseDefaultTriggerStyles","dangerouslySetInnerHTML","__html","displayName"],"sources":["../../../../src/components/copyable-content/CopyableContent.tsx"],"sourcesContent":["import { formatStringToHtml } from '@chayns-components/format';\nimport { ttsToITextString, useTextstringValue } from '@chayns-components/textstring';\nimport { createDialog, DialogType, ToastType } from 'chayns-api';\nimport React, { FC, ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport textStrings from '../../constants/textStrings';\nimport SharingContextMenu from '../sharing-context-menu/SharingContextMenu';\nimport Icon from '../icon/Icon';\nimport {\n StyledCopyableContent,\n StyledCopyableContentActionGroup,\n StyledCopyableContentActions,\n StyledCopyableContentBody,\n StyledCopyableContentButton,\n} from './CopyableContent.styles';\nimport { copyableContentToClipboard } from './copyableContentClipboard';\n\nexport type CopyableContentProps = {\n content: string;\n children?: ReactNode;\n copiedMessage?: string;\n copyFailedMessage?: string;\n};\n\nconst STICKY_ACTION_OFFSET = 8;\n\nconst CopyableContent: FC<CopyableContentProps> = ({\n content,\n children,\n copiedMessage,\n copyFailedMessage,\n}) => {\n const [isActionGroupSticky, setIsActionGroupSticky] = useState(false);\n\n const actionGroupRef = useRef<HTMLDivElement>(null);\n\n const defaultCopyButtonText = useTextstringValue({\n textstring: ttsToITextString(textStrings.components.copyableContent.copy),\n });\n const defaultCopiedMessage = useTextstringValue({\n textstring: ttsToITextString(textStrings.components.copyableContent.copied),\n });\n const defaultCopyFailedMessage = useTextstringValue({\n textstring: ttsToITextString(textStrings.components.copyableContent.copyFailed),\n });\n const shareText = useTextstringValue({\n textstring: ttsToITextString(textStrings.components.copyableContent.share),\n });\n\n const html = useMemo(() => formatStringToHtml(content).html, [content]);\n\n useEffect(() => {\n const updateStickyState = () => {\n const actionGroupTop = actionGroupRef.current?.getBoundingClientRect().top;\n setIsActionGroupSticky(\n actionGroupTop !== undefined && actionGroupTop <= STICKY_ACTION_OFFSET,\n );\n };\n\n updateStickyState();\n document.addEventListener('scroll', updateStickyState, true);\n window.addEventListener('resize', updateStickyState);\n\n return () => {\n document.removeEventListener('scroll', updateStickyState, true);\n window.removeEventListener('resize', updateStickyState);\n };\n }, []);\n\n const handleCopy = useCallback(async () => {\n try {\n await copyableContentToClipboard(content);\n void createDialog({\n showCloseIcon: true,\n text: copiedMessage ?? defaultCopiedMessage,\n toastType: ToastType.SUCCESS,\n type: DialogType.TOAST,\n }).open();\n } catch {\n void createDialog({\n showCloseIcon: true,\n text: copyFailedMessage ?? defaultCopyFailedMessage,\n toastType: ToastType.ERROR,\n type: DialogType.TOAST,\n }).open();\n }\n }, [content, copiedMessage, defaultCopiedMessage, defaultCopyFailedMessage, copyFailedMessage]);\n\n return (\n <StyledCopyableContent className=\"copyable-content\">\n <StyledCopyableContentActions ref={actionGroupRef}>\n <StyledCopyableContentActionGroup>\n <StyledCopyableContentButton\n $isSticky={isActionGroupSticky}\n aria-label={defaultCopyButtonText}\n onClick={() => {\n void handleCopy();\n }}\n type=\"button\"\n >\n <Icon icons={['fa-light fa-copy']} />\n </StyledCopyableContentButton>\n <SharingContextMenu link={content} shouldUseDefaultTriggerStyles={false}>\n <StyledCopyableContentButton\n $isSticky={isActionGroupSticky}\n aria-label={shareText}\n type=\"button\"\n >\n <Icon icons={['fa fa-share-nodes']} />\n </StyledCopyableContentButton>\n </SharingContextMenu>\n </StyledCopyableContentActionGroup>\n </StyledCopyableContentActions>\n <StyledCopyableContentBody>\n {children ?? <div dangerouslySetInnerHTML={{ __html: html }} />}\n </StyledCopyableContentBody>\n </StyledCopyableContent>\n );\n};\n\nCopyableContent.displayName = 'CopyableContent';\n\nexport default CopyableContent;\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,2BAA2B;AAC9D,SAASC,gBAAgB,EAAEC,kBAAkB,QAAQ,+BAA+B;AACpF,SAASC,YAAY,EAAEC,UAAU,EAAEC,SAAS,QAAQ,YAAY;AAChE,OAAOC,KAAK,IAAmBC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/F,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,kBAAkB,MAAM,4CAA4C;AAC3E,OAAOC,IAAI,MAAM,cAAc;AAC/B,SACIC,qBAAqB,EACrBC,gCAAgC,EAChCC,4BAA4B,EAC5BC,yBAAyB,EACzBC,2BAA2B,QACxB,0BAA0B;AACjC,SAASC,0BAA0B,QAAQ,4BAA4B;AASvE,MAAMC,oBAAoB,GAAG,CAAC;AAE9B,MAAMC,eAAyC,GAAGA,CAAC;EAC/CC,OAAO;EACPC,QAAQ;EACRC,aAAa;EACbC;AACJ,CAAC,KAAK;EACF,MAAM,CAACC,mBAAmB,EAAEC,sBAAsB,CAAC,GAAGjB,QAAQ,CAAC,KAAK,CAAC;EAErE,MAAMkB,cAAc,GAAGnB,MAAM,CAAiB,IAAI,C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CACX,CAAC,eAC9B5D,KAAA,CAAAuD,aAAA,CAAChD,kBAAkB;IAACsD,IAAI,EAAE5C,OAAQ;IAAC6C,6BAA6B,EAAE;EAAM,gBACpE9D,KAAA,CAAAuD,aAAA,CAAC1C,2BAA2B;IACxB6C,SAAS,EAAErC,mBAAoB;IAC/B,cAAYY,SAAU;IACtBkB,IAAI,EAAC;EAAQ,gBAEbnD,KAAA,CAAAuD,aAAA,CAAC/C,IAAI;IAACoD,KAAK,EAAE,CAAC,mBAAmB;EAAE,CAAE,CACZ,CACb,CACU,CACR,CAAC,eAC/B5D,KAAA,CAAAuD,aAAA,CAAC3C,yBAAyB,QACrBM,QAAQ,iBAAIlB,KAAA,CAAAuD,aAAA;IAAKQ,uBAAuB,EAAE;MAAEC,MAAM,EAAE7B;IAAK;EAAE,CAAE,CACvC,CACR,CAAC;AAEhC,CAAC;AAEDnB,eAAe,CAACiD,WAAW,GAAG,iBAAiB;AAE/C,eAAejD,eAAe","ignoreList":[]}
@@ -0,0 +1,145 @@
1
+ import styled from 'styled-components';
2
+ export const StyledCopyableContent = styled.section`
3
+ --copyable-content-action-size: 32px;
4
+ --copyable-content-action-inset: 8px;
5
+
6
+ min-width: 0;
7
+ max-width: 100%;
8
+ overflow-x: clip;
9
+ overflow-wrap: anywhere;
10
+ padding-top: calc(
11
+ var(--copyable-content-action-size) + var(--copyable-content-action-inset) * 2
12
+ );
13
+ border-radius: ${({
14
+ theme
15
+ }) => theme.cardBorderRadius}px;
16
+ background-color: rgba(
17
+ ${({
18
+ theme
19
+ }) => theme['secondary-100-rgb']},
20
+ ${({
21
+ theme
22
+ }) => theme.cardBackgroundOpacity}
23
+ );
24
+ color: ${({
25
+ theme
26
+ }) => theme.text};
27
+ `;
28
+ export const StyledCopyableContentActions = styled.div`
29
+ position: sticky;
30
+ top: var(--copyable-content-action-inset);
31
+ z-index: 1;
32
+ display: flex;
33
+ justify-content: flex-end;
34
+ height: calc(var(--copyable-content-action-size) + var(--copyable-content-action-inset));
35
+ margin-top: calc(
36
+ (var(--copyable-content-action-size) + var(--copyable-content-action-inset)) * -1
37
+ );
38
+ padding-right: var(--copyable-content-action-inset);
39
+ `;
40
+ export const StyledCopyableContentActionGroup = styled.div`
41
+ display: flex;
42
+ gap: 4px;
43
+ height: var(--copyable-content-action-size);
44
+ `;
45
+ export const StyledCopyableContentButton = styled.button`
46
+ box-sizing: border-box;
47
+ border: 1px solid ${({
48
+ $isSticky,
49
+ theme
50
+ }) => $isSticky ? theme['202'] : 'transparent'};
51
+ border-radius: 4px;
52
+ width: var(--copyable-content-action-size);
53
+ height: var(--copyable-content-action-size);
54
+ padding: 0;
55
+ cursor: pointer;
56
+ background-color: ${({
57
+ $isSticky,
58
+ theme
59
+ }) => $isSticky ? theme['100'] : 'transparent'};
60
+ color: ${({
61
+ theme
62
+ }) => theme.text};
63
+ box-shadow: ${({
64
+ $isSticky
65
+ }) => $isSticky ? '0 2px 8px rgba(0, 0, 0, 0.16)' : 'none'};
66
+ transition:
67
+ background-color 0.15s ease,
68
+ border-color 0.15s ease,
69
+ box-shadow 0.15s ease,
70
+ transform 0.15s ease;
71
+
72
+ &:hover {
73
+ background-color: rgba(${({
74
+ theme
75
+ }) => theme['text-rgb']}, 0.1);
76
+ box-shadow: inset 0 0 0 1px rgba(${({
77
+ theme
78
+ }) => theme['text-rgb']}, 0.06);
79
+ }
80
+
81
+ &:active {
82
+ transform: scale(0.9);
83
+ }
84
+
85
+ &:focus-visible {
86
+ outline: 2px solid ${({
87
+ theme
88
+ }) => theme.buttonBackgroundColor};
89
+ outline-offset: 2px;
90
+ }
91
+ `;
92
+ export const StyledCopyableContentBody = styled.div`
93
+ min-width: 0;
94
+ max-width: 100%;
95
+ overflow-wrap: anywhere;
96
+ padding: 0 12px 12px;
97
+
98
+ h1,
99
+ h2,
100
+ h3,
101
+ h4,
102
+ h5,
103
+ h6,
104
+ p,
105
+ ul,
106
+ ol,
107
+ blockquote {
108
+ margin: 0 0 12px;
109
+ }
110
+
111
+ h1,
112
+ h2,
113
+ h3,
114
+ h4,
115
+ h5,
116
+ h6 {
117
+ color: ${({
118
+ theme
119
+ }) => theme.headline};
120
+ }
121
+
122
+ ul,
123
+ ol {
124
+ padding-left: 24px;
125
+ }
126
+
127
+ blockquote {
128
+ padding-left: 12px;
129
+ border-left: 3px solid ${({
130
+ theme
131
+ }) => theme['202']};
132
+ }
133
+
134
+ a {
135
+ color: ${({
136
+ theme
137
+ }) => theme.primary};
138
+ overflow-wrap: anywhere;
139
+ }
140
+
141
+ > :last-child {
142
+ margin-bottom: 0;
143
+ }
144
+ `;
145
+ //# sourceMappingURL=CopyableContent.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyableContent.styles.js","names":["styled","StyledCopyableContent","section","theme","cardBorderRadius","cardBackgroundOpacity","text","StyledCopyableContentActions","div","StyledCopyableContentActionGroup","StyledCopyableContentButton","button","$isSticky","buttonBackgroundColor","StyledCopyableContentBody","headline","primary"],"sources":["../../../../src/components/copyable-content/CopyableContent.styles.ts"],"sourcesContent":["import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport styled from 'styled-components';\n\ntype StyledCopyableContentProps = WithTheme<unknown>;\n\nexport const StyledCopyableContent = styled.section<StyledCopyableContentProps>`\n --copyable-content-action-size: 32px;\n --copyable-content-action-inset: 8px;\n\n min-width: 0;\n max-width: 100%;\n overflow-x: clip;\n overflow-wrap: anywhere;\n padding-top: calc(\n var(--copyable-content-action-size) + var(--copyable-content-action-inset) * 2\n );\n border-radius: ${({ theme }) => theme.cardBorderRadius}px;\n background-color: rgba(\n ${({ theme }) => theme['secondary-100-rgb']},\n ${({ theme }) => theme.cardBackgroundOpacity}\n );\n color: ${({ theme }) => theme.text};\n`;\n\ntype StyledCopyableContentButtonProps = WithTheme<{\n $isSticky: boolean;\n}>;\n\nexport const StyledCopyableContentActions = styled.div<StyledCopyableContentProps>`\n position: sticky;\n top: var(--copyable-content-action-inset);\n z-index: 1;\n display: flex;\n justify-content: flex-end;\n height: calc(var(--copyable-content-action-size) + var(--copyable-content-action-inset));\n margin-top: calc(\n (var(--copyable-content-action-size) + var(--copyable-content-action-inset)) * -1\n );\n padding-right: var(--copyable-content-action-inset);\n`;\n\nexport const StyledCopyableContentActionGroup = styled.div`\n display: flex;\n gap: 4px;\n height: var(--copyable-content-action-size);\n`;\n\nexport const StyledCopyableContentButton = styled.button<StyledCopyableContentButtonProps>`\n box-sizing: border-box;\n border: 1px solid ${({ $isSticky, theme }) => ($isSticky ? theme['202'] : 'transparent')};\n border-radius: 4px;\n width: var(--copyable-content-action-size);\n height: var(--copyable-content-action-size);\n padding: 0;\n cursor: pointer;\n background-color: ${({ $isSticky, theme }) => ($isSticky ? theme['100'] : 'transparent')};\n color: ${({ theme }) => theme.text};\n box-shadow: ${({ $isSticky }) => ($isSticky ? '0 2px 8px rgba(0, 0, 0, 0.16)' : 'none')};\n transition:\n background-color 0.15s ease,\n border-color 0.15s ease,\n box-shadow 0.15s ease,\n transform 0.15s ease;\n\n &:hover {\n background-color: rgba(${({ theme }) => theme['text-rgb']}, 0.1);\n box-shadow: inset 0 0 0 1px rgba(${({ theme }) => theme['text-rgb']}, 0.06);\n }\n\n &:active {\n transform: scale(0.9);\n }\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.buttonBackgroundColor};\n outline-offset: 2px;\n }\n`;\n\nexport const StyledCopyableContentBody = styled.div<StyledCopyableContentProps>`\n min-width: 0;\n max-width: 100%;\n overflow-wrap: anywhere;\n padding: 0 12px 12px;\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p,\n ul,\n ol,\n blockquote {\n margin: 0 0 12px;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: ${({ theme }) => theme.headline};\n }\n\n ul,\n ol {\n padding-left: 24px;\n }\n\n blockquote {\n padding-left: 12px;\n border-left: 3px solid ${({ theme }) => theme['202']};\n }\n\n a {\n color: ${({ theme }) => theme.primary};\n overflow-wrap: anywhere;\n }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