@bynder/compact-view 5.2.1 → 5.2.2

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 (555) hide show
  1. package/AccessToken.js +5 -0
  2. package/AccessToken2.js +176 -0
  3. package/AccessToken3.js +4 -0
  4. package/ActiveFilter.js +6 -5
  5. package/ActiveFilters.js +24 -24
  6. package/AddMedia.js +1 -1
  7. package/AdditionalInfo.js +18 -0
  8. package/Advanced.js +3 -3
  9. package/App.js +46 -43
  10. package/Arrow.js +14 -0
  11. package/AssetCard.js +32 -29
  12. package/AssetCardMetaproperties.js +14 -13
  13. package/AssetFilter.js +36 -35
  14. package/AssetFilterContext.js +3 -3
  15. package/AssetItem.js +14 -13
  16. package/AssetList.js +7 -7
  17. package/AssetTypeItem.js +13 -12
  18. package/Autocomplete_new.js +41 -37
  19. package/Axios2.js +136 -0
  20. package/AxiosError.js +54 -0
  21. package/AxiosHeaders.js +181 -0
  22. package/AxiosURLSearchParams.js +33 -0
  23. package/Badge.js +44 -0
  24. package/Baloon.js +42 -0
  25. package/BaseStyles.js +10 -0
  26. package/Blob.js +4 -0
  27. package/Box.js +22 -0
  28. package/Button.js +39 -0
  29. package/Button.styles.js +40 -0
  30. package/ButtonAction.js +3 -3
  31. package/ButtonLegacy.js +48 -0
  32. package/ButtonLegacy.styles.js +28 -0
  33. package/CancelToken.js +77 -0
  34. package/CanceledError.js +11 -0
  35. package/Card.js +84 -0
  36. package/CardSkeleton.js +15 -14
  37. package/Checkbox.js +85 -0
  38. package/Checkbox.styles.js +2 -2
  39. package/Checkmark.js +7 -0
  40. package/Chip.js +70 -40
  41. package/Chip2.js +42 -0
  42. package/CollectionCard.js +9 -8
  43. package/CollectionItem.js +15 -14
  44. package/CollectionList.js +2 -2
  45. package/CollectionView.js +2 -2
  46. package/CollectionsView.js +6 -6
  47. package/ColorHexInput.js +31 -0
  48. package/ColorPicker.js +66 -0
  49. package/ColorPickerSolid.js +20 -0
  50. package/ColorPickerWithOpacity.js +37 -0
  51. package/Combobox.js +61 -0
  52. package/ConcealedAction.js +16 -0
  53. package/ConnectButton.js +1 -1
  54. package/Container.js +14 -13
  55. package/Container2.js +31 -0
  56. package/Content.js +16 -0
  57. package/ContextAction.js +18 -17
  58. package/ContextActionButton.js +29 -0
  59. package/ControlGroup.js +32 -0
  60. package/DOMFunctions.js +27 -0
  61. package/Dat.js +62 -50
  62. package/DatDropdownItem.js +20 -19
  63. package/DesignSystemContext.js +4 -4
  64. package/DesignSystemProvider.js +29 -0
  65. package/DirectionSelect.js +16 -15
  66. package/Divider.js +21 -0
  67. package/DomainInput.js +15 -14
  68. package/DragRange.js +25 -0
  69. package/DragSelect.js +11 -11
  70. package/Dropdown.js +12 -11
  71. package/Dropdown2.js +169 -0
  72. package/DropdownContent.js +2 -2
  73. package/DropdownListItem.js +3 -3
  74. package/Enum.js +12 -0
  75. package/ErrorMessage.js +20 -19
  76. package/FieldSelect.js +4 -4
  77. package/FilePlaceholder.js +19 -0
  78. package/FileSelector.js +11 -10
  79. package/Flex.js +21 -0
  80. package/FontPicker.js +104 -0
  81. package/Footer.js +16 -0
  82. package/Form.js +23 -0
  83. package/FormData.js +4 -0
  84. package/Frame.js +64 -0
  85. package/Group.js +17 -0
  86. package/Group2.js +26 -0
  87. package/Header2.js +43 -0
  88. package/Header22.js +15 -0
  89. package/HelperText.js +26 -0
  90. package/HorizontalScroll.js +4 -4
  91. package/HttpHandler.js +74 -0
  92. package/HttpResponse.js +85 -0
  93. package/HttpStatusCode.js +71 -0
  94. package/IconPlaceholder.js +18 -0
  95. package/Image.js +19 -0
  96. package/Images.js +30 -0
  97. package/Indicator.js +74 -0
  98. package/InfiniteScroll.js +8 -8
  99. package/InlineBanner.js +51 -0
  100. package/Input.js +109 -0
  101. package/Input.styles.js +71 -0
  102. package/InputContainer.js +9 -0
  103. package/InputField.js +74 -0
  104. package/InputRow.js +18 -0
  105. package/Inspector.js +34 -0
  106. package/InteractiveIcon.js +28 -0
  107. package/InterceptorManager.js +58 -0
  108. package/Item.js +107 -0
  109. package/Item2.js +14 -0
  110. package/Item4.js +190 -0
  111. package/Label.js +33 -0
  112. package/LeftArrow.js +3 -3
  113. package/List.js +25 -0
  114. package/ListItem.js +11 -0
  115. package/ListItem2.js +58 -0
  116. package/ListItem4.js +37 -0
  117. package/MetapropertyFilterContent.js +2 -2
  118. package/MetapropertyOption.js +2 -3
  119. package/Middleware.js +49 -0
  120. package/Middleware2.js +49 -0
  121. package/Modal.js +2 -2
  122. package/Modal2.js +31 -0
  123. package/ModalBase.js +117 -0
  124. package/ModalBase.styles.js +75 -0
  125. package/ModalConfirmation.js +8 -0
  126. package/NoResults.js +16 -15
  127. package/OffsetContext.js +9 -0
  128. package/Oops.js +1 -1
  129. package/OpacityInput.js +17 -0
  130. package/Option_new.js +19 -18
  131. package/Overlay.js +35 -0
  132. package/Parser.js +131 -0
  133. package/Prefixer.js +187 -0
  134. package/Radio.js +78 -0
  135. package/RadioGroup.js +25 -0
  136. package/RangeInput.js +41 -0
  137. package/RefreshingSpinner.js +3 -3
  138. package/ReportModal.js +16 -14
  139. package/RequestHandler.js +119 -0
  140. package/RightArrow.js +4 -4
  141. package/Row.js +16 -0
  142. package/SearchInput.js +15 -15
  143. package/SearchInput2.js +46 -0
  144. package/SectionTitle.js +17 -0
  145. package/Select.js +49 -0
  146. package/SelectButtonText.js +16 -0
  147. package/SelectedItemContainer.js +11 -10
  148. package/SelectedItems.js +2 -2
  149. package/SelectionFooter.js +8 -7
  150. package/Serializer.js +27 -0
  151. package/ShadowRootInternal.js +17 -17
  152. package/Sidebar.js +17 -0
  153. package/Skeleton.js +6 -6
  154. package/Slider.constants.js +6 -0
  155. package/Slider.js +128 -0
  156. package/SmartFilterContent.js +2 -2
  157. package/SmartFilterSelect_new.js +2 -2
  158. package/Smartfilters_new.js +53 -50
  159. package/Spinner.js +2 -2
  160. package/Spinner2.js +15 -0
  161. package/StatefulAssetList.js +15 -15
  162. package/Stats.js +16 -0
  163. package/StatsItem.js +23 -0
  164. package/Status.js +32 -0
  165. package/Switch.js +82 -0
  166. package/SwitchNLS.js +26 -23
  167. package/Tabs2.js +10 -0
  168. package/TagItem.js +8 -8
  169. package/Tags.js +9 -9
  170. package/Text2.js +11 -0
  171. package/Text22.js +18 -0
  172. package/Text4.js +18 -0
  173. package/Textarea.js +92 -0
  174. package/Theming.js +4 -4
  175. package/Thumb.js +28 -0
  176. package/Thumbnail.js +91 -0
  177. package/Tokenizer.js +147 -0
  178. package/Toolbar.js +13 -12
  179. package/Tooltip.js +2 -2
  180. package/Tooltip2.js +111 -0
  181. package/TruncatedText.js +34 -0
  182. package/URLSearchParams.js +5 -0
  183. package/Utility.js +56 -0
  184. package/ViewSwitch.js +8 -7
  185. package/_check_private_redeclaration.js +7 -0
  186. package/_class_apply_descriptor_get.js +6 -0
  187. package/_class_apply_descriptor_set.js +11 -0
  188. package/_class_extract_field_descriptor.js +7 -0
  189. package/_class_private_field_get.js +9 -0
  190. package/_class_private_field_init.js +7 -0
  191. package/_class_private_field_set.js +9 -0
  192. package/_commonjsHelpers.js +6 -0
  193. package/adapters.js +53 -0
  194. package/api.js +25 -0
  195. package/api2.js +40 -0
  196. package/api3.js +406 -0
  197. package/applyScopeDataToEvent.js +83 -0
  198. package/applyScopeDataToEvent2.js +55 -0
  199. package/asset.type.js +9 -9
  200. package/autocomplete.js +2 -2
  201. package/axios.js +46 -0
  202. package/base.js +57 -0
  203. package/baseclient.js +498 -0
  204. package/bind.js +8 -0
  205. package/browser.js +44 -0
  206. package/buildFullPath.js +9 -0
  207. package/buildURL.js +23 -0
  208. package/bundle.esm.js +81 -0
  209. package/calculateContainerMaxHeight.js +12 -0
  210. package/calculateNodeHeight.js +35 -0
  211. package/carrier.js +13 -0
  212. package/chain.js +8 -0
  213. package/checkGlobals.js +13 -0
  214. package/checks.js +178 -0
  215. package/chunk-6HYIRFX2.js +1 -0
  216. package/cleanUrl.js +11 -0
  217. package/client.js +76 -0
  218. package/clientreport.js +15 -0
  219. package/clsx.js +17 -0
  220. package/colorTransforms.js +12 -0
  221. package/combineMetaproperties.js +1 -1
  222. package/combineURLs.js +6 -0
  223. package/composeSignals.js +30 -0
  224. package/constants.js +2 -12
  225. package/constants2.js +82 -0
  226. package/constants3.js +14 -0
  227. package/constants4.js +8 -0
  228. package/constants5.js +4 -0
  229. package/constants6.js +4 -0
  230. package/context.js +12 -0
  231. package/context10.js +12 -0
  232. package/context2.js +9 -0
  233. package/context3.js +12 -0
  234. package/context6.js +5 -0
  235. package/cookieStore.js +116 -0
  236. package/cookies.js +32 -0
  237. package/core.js +42 -0
  238. package/currentScopes.js +9 -0
  239. package/data.js +4 -0
  240. package/de_DE.json.js +18 -0
  241. package/debug-build.js +4 -0
  242. package/debug-build2.js +4 -0
  243. package/debug-build3.js +4 -0
  244. package/debug-build4.js +4 -0
  245. package/debug-build5.js +4 -0
  246. package/debug-build6.js +4 -0
  247. package/decorators.js +37 -0
  248. package/defaultScopes.js +12 -0
  249. package/devUtils.js +20 -0
  250. package/dispatchRequest.js +31 -0
  251. package/doc.js +26 -0
  252. package/domHelpers.js +15 -0
  253. package/dsn.js +54 -0
  254. package/dynamicSamplingContext.js +34 -0
  255. package/dynamicSamplingContext2.js +34 -0
  256. package/emotion-unitless.esm.js +52 -0
  257. package/en_US.json.js +23 -0
  258. package/englishText-12403056.js +6 -0
  259. package/env.js +6 -0
  260. package/envelope.js +113 -0
  261. package/envelope2.js +23 -0
  262. package/envelope3.js +24 -0
  263. package/error.js +9 -0
  264. package/errors.js +33 -0
  265. package/errors2.js +55 -0
  266. package/es_ES.json.js +18 -0
  267. package/es_MX.json.js +18 -0
  268. package/eventProcessors.js +27 -0
  269. package/eventProcessors2.js +23 -0
  270. package/eventbuilder.js +128 -0
  271. package/exports.js +11 -0
  272. package/exports2.js +16 -0
  273. package/exports3.js +8 -0
  274. package/fetch.js +44 -0
  275. package/fetch2.js +141 -0
  276. package/filterAssets.js +1 -1
  277. package/fixFontSpaceInUrl.js +8 -0
  278. package/focusWithoutScrolling.js +45 -0
  279. package/forceHiddenStyles.js +19 -0
  280. package/formDataToJSON.js +31 -0
  281. package/fr_FR.json.js +18 -0
  282. package/getAbsoluteUrl.js +13 -0
  283. package/getAsset.js +1 -1
  284. package/getAssetCounts.js +1 -1
  285. package/getAssets.js +2 -2
  286. package/getCallFrame.js +12 -0
  287. package/getCollections.js +1 -1
  288. package/getFilterOptions.js +1 -1
  289. package/getFilters.js +1 -1
  290. package/getFilters_new.js +1 -1
  291. package/getRequestCookies.js +40 -0
  292. package/getRootSpan.js +6 -0
  293. package/getRootSpan2.js +6 -0
  294. package/getSimilarityAssets.js +1 -1
  295. package/getSizingData.js +45 -0
  296. package/getStatusCodeColor.js +6 -0
  297. package/getThumbPosition.js +6 -0
  298. package/getTimestamp.js +7 -0
  299. package/getUseLayerOptions.js +49 -0
  300. package/handlers.js +92 -6
  301. package/handlers2.js +6 -0
  302. package/helpers.js +3 -4
  303. package/helpers2.js +6 -0
  304. package/hexFromPercentage.js +7 -0
  305. package/http.js +17 -0
  306. package/hub.js +446 -0
  307. package/hub2.js +442 -0
  308. package/immer.js +472 -0
  309. package/import.js +7 -0
  310. package/index-esm.js +10781 -0
  311. package/index-esm2.js +138 -0
  312. package/index-esm3.js +131 -0
  313. package/index.browser.js +11 -0
  314. package/index.module.js +57 -0
  315. package/index.module2.js +72 -0
  316. package/index.module3.js +57 -0
  317. package/index10.js +20 -0
  318. package/index102.js +273 -0
  319. package/index11.js +18 -0
  320. package/index112.js +29 -0
  321. package/index12.js +38 -0
  322. package/index13.js +2432 -0
  323. package/index14.js +558 -0
  324. package/index15.js +58 -0
  325. package/index16.js +4 -0
  326. package/index17.js +89 -0
  327. package/index18.js +9 -0
  328. package/index19.js +62 -0
  329. package/index20.js +15 -0
  330. package/index21.js +11 -0
  331. package/index22.js +42 -0
  332. package/index23.js +9 -0
  333. package/index24.js +10 -0
  334. package/index25.js +7 -0
  335. package/index26.js +12 -0
  336. package/index27.js +11 -0
  337. package/index28.js +639 -0
  338. package/index29.js +76 -0
  339. package/index3.js +5 -53
  340. package/index30.js +7 -0
  341. package/index31.js +22 -0
  342. package/index32.js +2 -0
  343. package/index33.js +7 -0
  344. package/index34.js +20 -0
  345. package/index35.js +8 -0
  346. package/index36.js +4 -0
  347. package/index37.js +13 -0
  348. package/index38.js +13 -0
  349. package/index39.js +15 -0
  350. package/index4.js +1684 -17
  351. package/index40.js +13 -0
  352. package/index41.js +21 -0
  353. package/index42.js +66 -0
  354. package/index43.js +8 -0
  355. package/index44.js +57 -0
  356. package/index45.js +69 -0
  357. package/index46.js +33 -0
  358. package/index47.js +13 -0
  359. package/index48.js +123 -0
  360. package/index49.js +88 -0
  361. package/index5.js +27 -0
  362. package/index50.js +10 -0
  363. package/index51.js +13 -0
  364. package/index52.js +16 -0
  365. package/index53.js +16 -0
  366. package/index54.js +9 -0
  367. package/index55.js +9 -0
  368. package/index56.js +17 -0
  369. package/index57.js +31 -0
  370. package/index58.js +18 -0
  371. package/index6.js +315 -0
  372. package/index7.js +4 -0
  373. package/index72.js +228 -0
  374. package/index8.js +5051 -0
  375. package/index82.js +8 -0
  376. package/index9.js +55 -0
  377. package/index92.js +12 -0
  378. package/integration.js +38 -0
  379. package/is.js +77 -0
  380. package/is2.js +14 -0
  381. package/is3.js +14 -0
  382. package/isAbsoluteURL.js +6 -0
  383. package/isAbsoluteUrl2.js +6 -0
  384. package/isAxiosError.js +7 -0
  385. package/isCancel.js +6 -0
  386. package/isIterable.js +6 -0
  387. package/isStringEqual.js +6 -0
  388. package/isURLSameOrigin.js +8 -0
  389. package/isValidHexValue.js +6 -0
  390. package/isVirtualEvent.js +11 -0
  391. package/iso.js +38 -0
  392. package/it_IT.json.js +18 -0
  393. package/itemContext.js +5 -0
  394. package/ja_JP.json.js +18 -0
  395. package/ko_KR.json.js +18 -0
  396. package/localStorageHelper.js +32 -0
  397. package/localStorageHelper2.js +4 -0
  398. package/localization.js +46 -0
  399. package/logger2.js +56 -0
  400. package/logger3.js +56 -0
  401. package/logger4.js +56 -0
  402. package/makeHexWithOpacity.js +12 -0
  403. package/makeInternalTokens.js +22 -0
  404. package/matchRequestUrl.js +23 -0
  405. package/memo.js +25 -0
  406. package/merge.js +13 -0
  407. package/mergeConfig.js +70 -0
  408. package/mergeProps.js +22 -0
  409. package/mergeRefs.js +9 -0
  410. package/middleware.js +177 -0
  411. package/middleware2.js +177 -0
  412. package/misc.js +58 -0
  413. package/misc2.js +28 -0
  414. package/misc3.js +24 -0
  415. package/nl_NL.json.js +18 -0
  416. package/normalize.js +97 -0
  417. package/normalizePath.js +11 -0
  418. package/normalizeResponse.js +1 -1
  419. package/normalizeRows.js +10 -0
  420. package/notify.js +52 -0
  421. package/null.js +4 -0
  422. package/object.js +110 -0
  423. package/object2.js +39 -0
  424. package/object3.js +17 -0
  425. package/opacityPercentageFromHex.js +9 -0
  426. package/openLink.js +27 -0
  427. package/package.json +1 -1
  428. package/packageVersion.js +4 -0
  429. package/parse.js +9 -0
  430. package/parse2.js +44 -0
  431. package/parseHeaders.js +30 -0
  432. package/parseProtocol.js +7 -0
  433. package/pl_PL.json.js +18 -0
  434. package/platform.js +42 -0
  435. package/prepareEvent.js +141 -0
  436. package/prepareEvent2.js +5 -0
  437. package/prepareEvent3.js +5 -0
  438. package/progressEventReducer.js +35 -0
  439. package/promisebuffer.js +44 -0
  440. package/propagationContext.js +11 -0
  441. package/pt_BR.json.js +18 -0
  442. package/ratelimit.js +37 -0
  443. package/react.js +19 -0
  444. package/react2.js +19 -0
  445. package/regexes.js +51 -0
  446. package/registries.js +41 -0
  447. package/resolveConfig.js +33 -0
  448. package/ru_RU.json.js +18 -0
  449. package/runAfterTransition.js +35 -0
  450. package/schemas.js +368 -0
  451. package/schemas2.js +691 -0
  452. package/scope.js +412 -0
  453. package/scope2.js +407 -0
  454. package/scope3.js +348 -0
  455. package/sdk-DhxX43BH.js +4813 -0
  456. package/sdkMetadata.js +15 -0
  457. package/serializeRequest.js +12 -0
  458. package/serializeResponse.js +14 -0
  459. package/session.js +57 -0
  460. package/session2.js +57 -0
  461. package/session3.js +16 -0
  462. package/settle.js +14 -0
  463. package/shadowdom.js +13 -0
  464. package/shadowdom2.js +13 -0
  465. package/spanOnScope.js +12 -0
  466. package/spanUtils.js +31 -0
  467. package/spanUtils2.js +31 -0
  468. package/speedometer.js +19 -0
  469. package/spread.js +8 -0
  470. package/stack-parsers.js +48 -0
  471. package/stackStrategy.js +98 -0
  472. package/stacktrace.js +49 -0
  473. package/state.js +106 -0
  474. package/store/useDatStore.d.ts +11 -8
  475. package/string.js +6 -0
  476. package/styled-components.browser.esm.js +530 -0
  477. package/styles.js +55 -0
  478. package/styles2.js +17 -0
  479. package/supports.js +6 -0
  480. package/syncpromise.js +121 -0
  481. package/syncpromise2.js +109 -0
  482. package/textSelection.js +33 -0
  483. package/textStyles.js +20 -0
  484. package/theme.js +238 -0
  485. package/themeContainers.js +20 -0
  486. package/themes3.js +26 -0
  487. package/throttle.js +15 -0
  488. package/time.js +24 -0
  489. package/time2.js +24 -0
  490. package/time3.js +24 -0
  491. package/toFormData.js +85 -0
  492. package/toPublicUrl.js +9 -0
  493. package/toURLEncodedForm.js +13 -0
  494. package/token.js +236 -0
  495. package/tokenExpirationHelper.js +48 -0
  496. package/tokenExpirationHelper2.js +4 -0
  497. package/tokensAndThemes.js +92 -0
  498. package/tr_TR.json.js +18 -0
  499. package/trackStream.js +63 -0
  500. package/transformData.js +13 -0
  501. package/transitional.js +8 -0
  502. package/trimMetapropertyValue.js +1 -1
  503. package/tslib.es6.js +18 -0
  504. package/typeof.js +11 -0
  505. package/urlHelper.js +15 -0
  506. package/urlHelper2.js +4 -0
  507. package/useAutoHeight.js +25 -0
  508. package/useDatStore.js +31 -27
  509. package/useEffectEvent.js +18 -0
  510. package/useFocus.js +30 -0
  511. package/useFocusRing.js +34 -0
  512. package/useFocusVisible.js +92 -0
  513. package/useFocusWithin.js +57 -0
  514. package/useFonts.js +118 -0
  515. package/useGlobalListeners.js +34 -0
  516. package/useGroupContext.js +10 -0
  517. package/useHover.js +79 -0
  518. package/useId.js +8 -0
  519. package/useId2.js +17 -0
  520. package/useKeyDown.js +14 -0
  521. package/useLayoutEffect.js +6 -0
  522. package/useOrderingStore.js +6 -6
  523. package/usePress.js +359 -0
  524. package/useRouterStore.js +6 -6
  525. package/useScrollHighlightedIntoView.js +24 -0
  526. package/useSearchStore.js +5 -5
  527. package/useSimilaritySearchStore.js +6 -6
  528. package/useSyncRef.js +12 -0
  529. package/useTranslate.js +13 -0
  530. package/useZIndex.js +9 -0
  531. package/userfeedback.js +28 -0
  532. package/util.js +265 -0
  533. package/utils/fixFontSpaceInUrl.d.ts +1 -0
  534. package/utils.js +26 -44
  535. package/utils2.js +43 -45
  536. package/utils3.js +50 -0
  537. package/utils4.js +12 -0
  538. package/utils5.js +71 -0
  539. package/utils6.js +222 -0
  540. package/utils7.js +9 -0
  541. package/utils8.js +70 -0
  542. package/validator.js +54 -0
  543. package/vanilla.js +14 -0
  544. package/vanilla2.js +14 -0
  545. package/version.js +4 -0
  546. package/version2.js +4 -0
  547. package/version3.js +4 -0
  548. package/versionContext.js +9 -0
  549. package/versions.js +8 -0
  550. package/worldwide.js +19 -0
  551. package/worldwide2.js +15 -0
  552. package/worldwide3.js +10 -0
  553. package/xhr.js +71 -0
  554. package/zh_CN.json.js +18 -0
  555. package/zh_TW.json.js +18 -0
package/ColorPicker.js ADDED
@@ -0,0 +1,66 @@
1
+ import { jsxs as w, jsx as o, Fragment as _ } from "react/jsx-runtime";
2
+ import { useState as v, useRef as b } from "react";
3
+ import { useLayer as y, mergeRefs as k } from "react-laag";
4
+ import u from "./styled-components.browser.esm.js";
5
+ import { token as r } from "./token.js";
6
+ import { useId as I } from "./useId.js";
7
+ import { useKeyDown as P } from "./useKeyDown.js";
8
+ import { getFirstShadowElement as E, isInShadow as O } from "./shadowdom.js";
9
+ import { ColorPickerSolid as s } from "./ColorPickerSolid.js";
10
+ import { useZIndex as S } from "./useZIndex.js";
11
+ import { ColorPickerWithOpacity as d } from "./ColorPickerWithOpacity.js";
12
+ function h(e) {
13
+ return typeof e.value == "string";
14
+ }
15
+ function Y(e) {
16
+ const {
17
+ trigger: n,
18
+ value: B,
19
+ onChange: R,
20
+ ...l
21
+ } = e, [t, a] = v(!1), i = b(), c = I("colorpicker"), g = S("colorpicker"), {
22
+ renderLayer: m,
23
+ triggerProps: {
24
+ ref: p
25
+ },
26
+ layerProps: x
27
+ } = y({
28
+ isOpen: t,
29
+ /**
30
+ * Until https://github.com/everweij/react-laag/issues/84 is fixed,
31
+ * we can't use the onOutsideClick option in the Shadow DOM.
32
+ */
33
+ onOutsideClick: O(i.current) ? void 0 : () => a(!1),
34
+ triggerOffset: 8,
35
+ containerOffset: 16,
36
+ auto: !0,
37
+ container: E(i.current),
38
+ placement: "bottom-start",
39
+ preferX: "left",
40
+ preferY: "bottom",
41
+ possiblePlacements: ["bottom-start", "top-start", "bottom-end", "top-end"]
42
+ });
43
+ return P("Escape", () => {
44
+ t && a(!1);
45
+ }), n ? /* @__PURE__ */ w(_, { children: [
46
+ n({
47
+ isOpen: t,
48
+ onClick: () => a((C) => !C),
49
+ "aria-haspopup": !0,
50
+ "aria-expanded": t,
51
+ "aria-controls": c,
52
+ ref: k(p, i)
53
+ }),
54
+ t && m(/* @__PURE__ */ o(z, { id: c, $zIndex: g, ...x, ...l, children: /* @__PURE__ */ o(f, { children: h(e) ? /* @__PURE__ */ o(s, { value: e.value, onChange: e.onChange }) : /* @__PURE__ */ o(d, { value: e.value, onChange: e.onChange }) }) }))
55
+ ] }) : /* @__PURE__ */ o(f, { ...l, children: h(e) ? /* @__PURE__ */ o(s, { value: e.value, onChange: e.onChange }) : /* @__PURE__ */ o(d, { value: e.value, onChange: e.onChange }) });
56
+ }
57
+ const z = u.div.withConfig({
58
+ displayName: "Container",
59
+ componentId: "sc-cayxfr-0"
60
+ })(["z-index:", ";"], (e) => e.$zIndex), f = u.div.withConfig({
61
+ displayName: "ColorPickerCard",
62
+ componentId: "sc-cayxfr-1"
63
+ })(["width:298px;border-radius:", ";background-color:", ";box-shadow:", ",", ";.react-colorful{width:100%;height:auto;}.react-colorful__saturation{height:156px;margin-bottom:", ";border-bottom:none;border-radius:", " ", " 0 0;box-shadow:none;}.react-colorful__hue,.react-colorful__alpha{height:8px;margin:0 ", " ", ";border-radius:", ";}.react-colorful__hue{box-shadow:inset 0 0 0 1px ", `;}.react-colorful__alpha{background-image:url("data:image/svg+xml,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Crect height='8' width='8' y='0' x='0' fill='%23ffffff'/%3E%3Crect height='4' width='4' y='0' x='0' fill='%23e9ecee'/%3E%3Crect height='4' width='4' y='4' x='4' fill='%23e9ecee'/%3E%3C/svg%3E%0A");}.react-colorful__alpha-gradient{height:8px;border-radius:`, ";box-shadow:inset 0 0 0 1px ", ";}.react-colorful__pointer{width:16px;height:16px;border-width:4px;box-shadow:0 0 0 1px ", ";cursor:pointer;}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%);}.react-colorful__interactive:active .react-colorful__pointer{width:20px;height:20px;border-width:6px;}.react-colorful__pointer-fill{box-shadow:inset ", ";}"], r.radiusBase, r.gray10, r.elevationStatic, r.elevation2, r.spacing6, r.radiusBase, r.radiusBase, r.spacing5, r.spacing6, r.radiusPill, r.gray100a, r.radiusBase, r.gray100a, r.gray200a, r.elevation1);
64
+ export {
65
+ Y as ColorPicker
66
+ };
@@ -0,0 +1,20 @@
1
+ import { jsxs as t, Fragment as e, jsx as r } from "react/jsx-runtime";
2
+ import { HexColorPicker as m } from "react-colorful";
3
+ import { ColorHexInput as p } from "./ColorHexInput.js";
4
+ import { InputContainer as c } from "./InputContainer.js";
5
+ function d({
6
+ value: n,
7
+ onChange: i
8
+ }) {
9
+ return /* @__PURE__ */ t(e, { children: [
10
+ /* @__PURE__ */ r(m, { color: n, onChange: (o) => {
11
+ i(o);
12
+ } }),
13
+ /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(p, { value: n, onChange: (o) => {
14
+ i(o);
15
+ } }) })
16
+ ] });
17
+ }
18
+ export {
19
+ d as ColorPickerSolid
20
+ };
@@ -0,0 +1,37 @@
1
+ import { jsxs as p, Fragment as c, jsx as i } from "react/jsx-runtime";
2
+ import { HexAlphaColorPicker as m } from "react-colorful";
3
+ import { makeHexWithOpacity as a } from "./makeHexWithOpacity.js";
4
+ import { opacityPercentageFromHex as n } from "./opacityPercentageFromHex.js";
5
+ import { ColorHexInput as e } from "./ColorHexInput.js";
6
+ import { InputContainer as y } from "./InputContainer.js";
7
+ import { OpacityInput as h } from "./OpacityInput.js";
8
+ function H({
9
+ value: o,
10
+ onChange: t
11
+ }) {
12
+ return /* @__PURE__ */ p(c, { children: [
13
+ /* @__PURE__ */ i(m, { color: a(o), onChange: (r) => {
14
+ t({
15
+ color: r.substring(0, 7),
16
+ opacity: n(r)
17
+ });
18
+ } }),
19
+ /* @__PURE__ */ p(y, { $hasAlphaChannel: !0, children: [
20
+ /* @__PURE__ */ i(e, { value: o.color, opacity: o.opacity, onChange: (r) => {
21
+ t({
22
+ color: r,
23
+ opacity: o.opacity
24
+ });
25
+ } }),
26
+ /* @__PURE__ */ i(h, { value: o.opacity, onChange: (r) => {
27
+ t({
28
+ color: o.color,
29
+ opacity: r
30
+ });
31
+ } })
32
+ ] })
33
+ ] });
34
+ }
35
+ export {
36
+ H as ColorPickerWithOpacity
37
+ };
package/Combobox.js ADDED
@@ -0,0 +1,61 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { useState as v, useRef as y } from "react";
3
+ import { Item as B } from "./Item2.js";
4
+ import { Text as D } from "./Text2.js";
5
+ import { Dropdown as n } from "./Dropdown2.js";
6
+ import { Input as F } from "./Input.js";
7
+ import { ListItem as K } from "./ListItem.js";
8
+ function m({
9
+ children: p,
10
+ openOn: o = "type",
11
+ isAnyValueAllowed: e = !1,
12
+ value: r,
13
+ onChange: s,
14
+ onOpen: u,
15
+ onClose: a,
16
+ onClean: g,
17
+ icon: x,
18
+ placeholder: d,
19
+ id: h,
20
+ iconRight: C,
21
+ isDisabled: I,
22
+ ...b
23
+ }) {
24
+ const [T, k] = v(""), f = y(null);
25
+ return /* @__PURE__ */ i(n.OffsetContext.Provider, { value: "extra", children: /* @__PURE__ */ i(
26
+ n,
27
+ {
28
+ containerRef: f,
29
+ trigger: ({
30
+ isOpen: L,
31
+ onClick: S,
32
+ onKeyDown: j,
33
+ ...R
34
+ }, {
35
+ open: c,
36
+ close: l
37
+ }) => /* @__PURE__ */ i(F, { onFocus: () => {
38
+ o === "focus" && c(), e || k(r);
39
+ }, onBlur: (t) => {
40
+ if (e)
41
+ return;
42
+ f.current?.contains(t.relatedTarget) || r.trim().length > 0 && (l(), s(T));
43
+ }, onClean: g, value: r, onChange: (t) => {
44
+ s(t), t.trim().length > 0 && c(), o === "type" && t.trim().length === 0 && l();
45
+ }, iconRight: C || (o === "focus" ? /* @__PURE__ */ i(n.Arrow, {}) : void 0), icon: x, placeholder: d, id: h, hasClearButton: !0, role: "combobox", "aria-autocomplete": "list", isDisabled: I, ...R }),
46
+ position: "bottom",
47
+ isKeepingFocusOnTrigger: e,
48
+ role: "listbox",
49
+ onOpen: u,
50
+ onClose: a,
51
+ ...b,
52
+ children: o === "type" && r.trim().length === 0 ? null : p
53
+ }
54
+ ) });
55
+ }
56
+ m.Item = B;
57
+ m.ListItem = K;
58
+ m.Text = D;
59
+ export {
60
+ m as Combobox
61
+ };
@@ -0,0 +1,16 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import e from "./styled-components.browser.esm.js";
3
+ function d({
4
+ isVisible: i,
5
+ ...t
6
+ }) {
7
+ return /* @__PURE__ */ o(c, { $isVisible: i, ...t });
8
+ }
9
+ const c = e.div.withConfig({
10
+ displayName: "ConcealedActionStyled",
11
+ componentId: "sc-4sj39p-0"
12
+ })(["width:", ";opacity:", ";&:focus-within{width:auto;opacity:1;}"], (i) => i.$isVisible ? "auto" : "var(--list-item-concealead-action-width, 0)", (i) => i.$isVisible ? "1" : "var(--list-item-concealead-action-opacity, 0)");
13
+ export {
14
+ d as ConcealedAction,
15
+ c as ConcealedActionStyled
16
+ };
package/ConnectButton.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { Button as n } from "@bynder/design-system";
2
+ import { Button as n } from "./Button.js";
3
3
  import { __ as o } from "./index2.js";
4
4
  function e(i) {
5
5
  return /* @__PURE__ */ t(
package/Container.js CHANGED
@@ -1,34 +1,35 @@
1
1
  import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
- import n from "styled-components";
3
- import { IconCancel as l } from "@bynder/icons";
4
- import { token as t, Button as c } from "@bynder/design-system";
2
+ import i from "./styled-components.browser.esm.js";
3
+ import { IconCancel as l } from "./index4.js";
4
+ import { Button as c } from "./Button.js";
5
+ import { token as t } from "./token.js";
5
6
  import { useModalContext as s } from "./Modal.js";
6
7
  import { __ as a } from "./index2.js";
7
- function C(i) {
8
- const e = s();
8
+ function v(e) {
9
+ const n = s();
9
10
  return /* @__PURE__ */ r(
10
- d,
11
+ m,
11
12
  {
12
13
  className: "cv-root",
13
14
  style: {
14
15
  minHeight: 320
15
16
  },
16
17
  children: [
17
- e !== null && /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(
18
+ n !== null && /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(
18
19
  c,
19
20
  {
20
21
  variant: "clean",
21
- onClick: e.onClose,
22
+ onClick: n.onClose,
22
23
  title: a("Close"),
23
24
  icon: /* @__PURE__ */ o(l, {})
24
25
  }
25
26
  ) }),
26
- /* @__PURE__ */ o(p, { children: i.children })
27
+ /* @__PURE__ */ o(p, { children: e.children })
27
28
  ]
28
29
  }
29
30
  );
30
31
  }
31
- const d = n.div`
32
+ const m = i.div`
32
33
  width: 100%;
33
34
  height: 100%;
34
35
  display: flex;
@@ -37,15 +38,15 @@ const d = n.div`
37
38
  justify-content: center;
38
39
  position: relative;
39
40
  background-color: ${t.gray10};
40
- `, m = n.div`
41
+ `, d = i.div`
41
42
  position: absolute;
42
43
  top: ${t.spacing4};
43
44
  right: ${t.spacing5};
44
- `, p = n.div`
45
+ `, p = i.div`
45
46
  display: flex;
46
47
  flex-direction: column;
47
48
  font-size: ${t.fontSize300};
48
49
  `;
49
50
  export {
50
- C as Container
51
+ v as Container
51
52
  };
package/Container2.js ADDED
@@ -0,0 +1,31 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as p, useRef as f, useContext as u, useEffect as g } from "react";
3
+ import l from "./styled-components.browser.esm.js";
4
+ import { token as o } from "./token.js";
5
+ import { useZIndex as h } from "./useZIndex.js";
6
+ import { useDropdownContext as y } from "./context3.js";
7
+ import { mergeRefs as $ } from "./mergeRefs.js";
8
+ import { ItemContext as w } from "./itemContext.js";
9
+ const W = p(({
10
+ children: e,
11
+ minWidth: r,
12
+ role: a = "menu",
13
+ dynamicMaxHeight: d,
14
+ ...t
15
+ }, m) => {
16
+ const s = h("dropdown"), x = f(null), {
17
+ dispatch: n
18
+ } = y(), i = u(w);
19
+ return g(() => () => {
20
+ n({
21
+ type: "purge-menu-items",
22
+ payload: i
23
+ });
24
+ }, [e, n, i]), /* @__PURE__ */ c(C, { $minWidth: r, $dynamicMaxHeight: d, role: a, ref: $(m, x), $zIndex: s, ...t, onMouseLeave: t.onMouseLeave, children: e });
25
+ }), C = l.div.withConfig({
26
+ displayName: "ContainerStyled",
27
+ componentId: "sc-17oolf2-0"
28
+ })(["z-index:", ";overflow-y:auto;box-sizing:border-box;min-width:", ";max-width:336px;max-height:", ";padding:", " 0;border-radius:", ";background:", ";color:", ";box-shadow:", ",", ";&:empty{display:none;}"], (e) => e.$zIndex, (e) => e.$minWidth ? e.$minWidth : "224px", (e) => e.$dynamicMaxHeight ? `${e.$dynamicMaxHeight}px` : `calc(36px * 9.5 + ${o.spacing3})`, o.spacing3, o.radiusBase, o.gray10, o.colorText, o.elevationStatic, o.elevation2);
29
+ export {
30
+ W as Container
31
+ };
package/Content.js ADDED
@@ -0,0 +1,16 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import r from "./styled-components.browser.esm.js";
3
+ import { baseStyles as e } from "./BaseStyles.js";
4
+ import { token as o } from "./token.js";
5
+ function c({
6
+ children: t
7
+ }) {
8
+ return /* @__PURE__ */ n(i, { children: t });
9
+ }
10
+ const i = r.div.withConfig({
11
+ displayName: "ContentStyled",
12
+ componentId: "sc-rmi3y-0"
13
+ })(["", " flex-grow:1;overflow-y:auto;padding:", " ", ";overscroll-behavior:contain;"], e, o.spacing3, o.spacing6);
14
+ export {
15
+ c as Content
16
+ };
package/ContextAction.js CHANGED
@@ -1,12 +1,13 @@
1
- import { jsx as n, jsxs as C } from "react/jsx-runtime";
2
- import { IconOpenInNew as s, IconCrop as a, IconMore as p } from "@bynder/icons";
3
- import { Card as i, Dropdown as e } from "@bynder/design-system";
1
+ import { jsx as n, jsxs as p } from "react/jsx-runtime";
2
+ import { IconOpenInNew as s, IconCrop as a, IconMore as C } from "./index4.js";
3
+ import { Card as t } from "./Card.js";
4
+ import { Dropdown as o } from "./Dropdown2.js";
4
5
  import { useConfig as w } from "./ConfigContext.js";
5
6
  import { __ as h } from "./index2.js";
6
- function _({ dragState: r, transformBaseUrl: d, portalUrl: l, onOpenDAT: c }) {
7
- const { hideExternalAccess: o, selectionMode: m } = w(), t = m === "SingleSelectFile" && d;
8
- return !t && o ? null : !t && !o && r !== "select" ? /* @__PURE__ */ n(
9
- i.ContextActionButton,
7
+ function _({ dragState: r, transformBaseUrl: m, portalUrl: l, onOpenDAT: c }) {
8
+ const { hideExternalAccess: e, selectionMode: d } = w(), i = d === "SingleSelectFile" && m;
9
+ return !i && e ? null : !i && !e && r !== "select" ? /* @__PURE__ */ n(
10
+ t.ContextActionButton,
10
11
  {
11
12
  "aria-label": h("Open in new tab"),
12
13
  onClick: () => {
@@ -14,22 +15,22 @@ function _({ dragState: r, transformBaseUrl: d, portalUrl: l, onOpenDAT: c }) {
14
15
  },
15
16
  children: /* @__PURE__ */ n(s, {})
16
17
  }
17
- ) : t && o ? /* @__PURE__ */ n(i.ContextActionButton, { "aria-label": "New transformation", onClick: c, children: /* @__PURE__ */ n(a, {}) }) : /* @__PURE__ */ C(
18
- e,
18
+ ) : i && e ? /* @__PURE__ */ n(t.ContextActionButton, { "aria-label": "New transformation", onClick: c, children: /* @__PURE__ */ n(a, {}) }) : /* @__PURE__ */ p(
19
+ o,
19
20
  {
20
- trigger: ({ isOpen: u, ...f }) => r !== "select" ? /* @__PURE__ */ n(
21
- i.ContextActionButton,
21
+ trigger: ({ isOpen: f, ...u }) => r !== "select" ? /* @__PURE__ */ n(
22
+ t.ContextActionButton,
22
23
  {
23
24
  "aria-label": "Menu",
24
- isPressed: u,
25
- ...f,
26
- children: /* @__PURE__ */ n(p, {})
25
+ isPressed: f,
26
+ ...u,
27
+ children: /* @__PURE__ */ n(C, {})
27
28
  }
28
29
  ) : null,
29
30
  isClosedOnScroll: !0,
30
31
  children: [
31
32
  /* @__PURE__ */ n(
32
- e.Item,
33
+ o.Item,
33
34
  {
34
35
  icon: /* @__PURE__ */ n(s, {}),
35
36
  onClick: () => {
@@ -38,8 +39,8 @@ function _({ dragState: r, transformBaseUrl: d, portalUrl: l, onOpenDAT: c }) {
38
39
  children: "Open asset"
39
40
  }
40
41
  ),
41
- /* @__PURE__ */ n(e.Divider, {}),
42
- /* @__PURE__ */ n(e.Item, { icon: /* @__PURE__ */ n(a, {}), onClick: c, children: "New transformation" })
42
+ /* @__PURE__ */ n(o.Divider, {}),
43
+ /* @__PURE__ */ n(o.Item, { icon: /* @__PURE__ */ n(a, {}), onClick: c, children: "New transformation" })
43
44
  ]
44
45
  }
45
46
  );
@@ -0,0 +1,29 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { useFocusRing as f } from "./useFocusRing.js";
4
+ import u, { css as i } from "./styled-components.browser.esm.js";
5
+ import { token as o } from "./token.js";
6
+ import { Tooltip as x } from "./Tooltip2.js";
7
+ const $ = p(({
8
+ children: t,
9
+ isDisabled: r = !1,
10
+ isPressed: s = !1,
11
+ tooltip: e,
12
+ "aria-label": c,
13
+ ...l
14
+ }, d) => {
15
+ const {
16
+ isFocusVisible: g,
17
+ focusProps: b
18
+ } = f(), n = /* @__PURE__ */ a(m, { disabled: r, type: "button", $isFocusVisible: g, ref: d, $isPressed: s, "aria-label": c, ...b, ...l, children: t });
19
+ return e ? /* @__PURE__ */ a(x, { timing: "delay", content: e, children: n }) : n;
20
+ }), m = u.button.withConfig({
21
+ displayName: "ContextActionButtonStyled",
22
+ componentId: "sc-1w5xfy3-0"
23
+ })(["display:inline-flex;vertical-align:middle;flex-wrap:nowrap;justify-content:center;align-items:center;box-sizing:border-box;min-width:40px;height:32px;padding:0 ", ";border:none;border-radius:", ";background-color:transparent;box-shadow:0 0 0 1px ", ";font-weight:400;font-style:normal;font-size:", ";font-family:", ";line-height:", ";letter-spacing:normal;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;fill:currentcolor;transition-duration:0.1s;transition-property:background-color,border-color,box-shadow,color;", ""], o.spacing3, o.brandRadiusBase, o.gray100a, o.fontSize75, o.brandFontStackBase, o.lineHeightBase, (t) => {
24
+ const r = i(["background-color:", ";color:", ";box-shadow:0 0 0 1px ", ";"], o.gray10, o.gray800, o.gray100a);
25
+ return i(["background-color:rgb(", " / 90%);color:", ";", " &:hover{background-color:", ";color:", ";box-shadow:", ",", ";}&:active{", "}&:disabled{background-color:rgb(", " / 70%);color:", ";box-shadow:0 0 0 1px ", ";cursor:default;}"], o["white-rgb"], o.gray600a, t.$isPressed && r, o.gray10, o.gray800, o.elevation1, o.elevationStatic, r, o["white-rgb"], o.gray200a, o.gray100a);
26
+ });
27
+ export {
28
+ $ as ContextActionButton
29
+ };
@@ -0,0 +1,32 @@
1
+ import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
+ import h from "react";
3
+ import m from "./styled-components.browser.esm.js";
4
+ import { token as g } from "./token.js";
5
+ import { Form as i } from "./Form.js";
6
+ import { useId as l } from "./useId.js";
7
+ function q({
8
+ children: c,
9
+ label: r,
10
+ labelSecondaryText: a,
11
+ isInvalid: n,
12
+ helperText: t,
13
+ helperTextIcon: p,
14
+ ...s
15
+ }) {
16
+ const e = l("control-group-label"), d = l("control-group-helper-text");
17
+ return /* @__PURE__ */ u(i.Group, { "aria-labelledby": r ? e : void 0, "aria-describedby": t ? d : void 0, "aria-invalid": n, ...s, children: [
18
+ r && /* @__PURE__ */ o(i.Label, { id: e, secondaryText: a, children: r }),
19
+ /* @__PURE__ */ o(b, { children: h.Children.map(c, (f) => /* @__PURE__ */ o(y, { children: f })) }),
20
+ t && /* @__PURE__ */ o(i.HelperText, { isInvalid: n, icon: p, id: d, children: t })
21
+ ] });
22
+ }
23
+ const b = m.ul.withConfig({
24
+ displayName: "List",
25
+ componentId: "sc-166qdv5-0"
26
+ })(["margin:0;padding:0;list-style:none;"]), y = m.li.withConfig({
27
+ displayName: "Item",
28
+ componentId: "sc-166qdv5-1"
29
+ })(["&:not(:last-child){margin-bottom:", ";}"], g.spacing2);
30
+ export {
31
+ q as ControlGroup
32
+ };
@@ -0,0 +1,27 @@
1
+ import { isShadowRoot as f } from "./domHelpers.js";
2
+ import { shadowDOM as o } from "./import.js";
3
+ function n(t, a) {
4
+ if (!o()) return a && t ? t.contains(a) : !1;
5
+ if (!t || !a) return !1;
6
+ let e = a;
7
+ for (; e !== null; ) {
8
+ if (e === t) return !0;
9
+ e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
10
+ }
11
+ return !1;
12
+ }
13
+ const s = (t = document) => {
14
+ var a;
15
+ if (!o()) return t.activeElement;
16
+ let e = t.activeElement;
17
+ for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
18
+ return e;
19
+ };
20
+ function d(t) {
21
+ return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
22
+ }
23
+ export {
24
+ s as getActiveElement,
25
+ d as getEventTarget,
26
+ n as nodeContains
27
+ };
package/Dat.js CHANGED
@@ -1,76 +1,88 @@
1
- import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
- import { useState as h, useEffect as C } from "react";
3
- import { createPortal as T } from "react-dom";
4
- import y from "styled-components";
5
- import { token as u, Modal as M, Button as c } from "@bynder/design-system";
6
- import { DATBuilder as A } from "@bynder/dat-frontend";
7
- import { useRootElement as P } from "./RootElementContext.js";
8
- import { useDat as S } from "./useDatStore.js";
9
- function L() {
10
- const l = P(), [r, v] = h(), [i, d] = h(), {
11
- datUrl: x,
1
+ import { jsxs as C, jsx as n } from "react/jsx-runtime";
2
+ import { useState as u, useEffect as U } from "react";
3
+ import { createPortal as M } from "react-dom";
4
+ import v from "./styled-components.browser.esm.js";
5
+ import { Button as c } from "./Button.js";
6
+ import { Modal as P } from "./Modal2.js";
7
+ import { token as y } from "./token.js";
8
+ import { DATBuilder as S } from "./index8.js";
9
+ import { useRootElement as j } from "./RootElementContext.js";
10
+ import { useDat as E } from "./useDatStore.js";
11
+ import { useAuth as I } from "./LoginContext.js";
12
+ import { fixFontSpacesInUrl as F } from "./fixFontSpaceInUrl.js";
13
+ function X() {
14
+ const l = j(), d = I(), [i, x] = u(), [a, m] = u(), {
15
+ datUrl: k,
12
16
  assetName: g,
13
- datExtension: k,
17
+ datExtension: w,
14
18
  transformation: t,
15
- closeDat: m,
16
- setTransformation: f
17
- } = S();
18
- C(() => {
19
+ closeDat: f,
20
+ setTransformation: p,
21
+ assetId: B
22
+ } = E();
23
+ U(() => {
19
24
  const o = l.querySelector(".cv-root");
20
- o && v(o);
25
+ o && x(o);
21
26
  }, [l]);
22
- const s = (o, n) => {
23
- o && t && f({ url: o, preset: n, asset: t.asset }), m();
24
- }, p = (o, n) => {
25
- w(n) && t ? d({ url: o, preset: n, asset: t.asset }) : s(o, n);
26
- }, e = () => d(void 0), B = () => {
27
- s(i?.url, i?.preset), e();
28
- }, D = () => {
29
- f(void 0), e(), m();
30
- }, w = (o) => o.content.io.length > 0;
31
- return r ? T(
32
- /* @__PURE__ */ b(U, { children: [
33
- /* @__PURE__ */ a(
34
- E,
27
+ const s = (o, e) => {
28
+ if (o && t) {
29
+ const A = F(o);
30
+ p({ url: A, preset: e, asset: t.asset });
31
+ }
32
+ f();
33
+ }, h = (o, e) => {
34
+ b(e) && t ? m({ url: o, preset: e, asset: t.asset }) : s(o, e);
35
+ }, r = () => m(void 0), D = () => {
36
+ s(a?.url, a?.preset), r();
37
+ }, T = () => {
38
+ p(void 0), r(), f();
39
+ }, b = (o) => o.content.io.length > 0;
40
+ return i ? M(
41
+ /* @__PURE__ */ C(O, { children: [
42
+ /* @__PURE__ */ n(
43
+ R,
35
44
  {
36
45
  mediaInfo: {
37
- extension: k,
38
- baseURL: x,
46
+ extension: [w],
47
+ baseURL: k,
39
48
  name: g,
40
49
  width: 1,
41
- height: 1
50
+ height: 1,
51
+ id: B,
52
+ isPublic: 0
42
53
  },
43
54
  canViewPresets: !1,
44
55
  canViewTransformations: !0,
45
56
  hideBottomBar: !0,
46
57
  onApply: s,
47
- onDone: p,
48
- onBack: p,
49
- initialTransformations: t?.preset?.content.io
58
+ onDone: h,
59
+ onBack: h,
60
+ initialTransformations: t?.preset?.content.io,
61
+ jwtTokenOverride: d?.getAccessToken ? d.getAccessToken() : void 0
50
62
  }
51
63
  ),
52
- /* @__PURE__ */ a(
53
- M,
64
+ /* @__PURE__ */ n(
65
+ P,
54
66
  {
55
- isOpen: !!i,
67
+ isOpen: !!a,
56
68
  title: "Transformations not yet applied",
57
- container: r,
58
- onClose: e,
59
- actionPrimary: /* @__PURE__ */ a(c, { variant: "primary", onClick: B, children: "Apply transformations" }),
60
- actionSecondary: /* @__PURE__ */ a(c, { variant: "secondary", onClick: e, children: "Cancel" }),
61
- actionTertiary: /* @__PURE__ */ a(c, { variant: "secondary", onClick: D, children: "Discard changes" }),
69
+ container: i,
70
+ onClose: r,
71
+ actionPrimary: /* @__PURE__ */ n(c, { variant: "primary", onClick: D, children: "Apply transformations" }),
72
+ actionSecondary: /* @__PURE__ */ n(c, { variant: "secondary", onClick: r, children: "Cancel" }),
73
+ actionTertiary: /* @__PURE__ */ n(c, { variant: "secondary", onClick: T, children: "Discard changes" }),
62
74
  children: "Transformations not yet applied. Do you want to apply transformations now, or discard changes?"
63
75
  }
64
76
  )
65
77
  ] }),
66
- r
78
+ i
67
79
  ) : null;
68
80
  }
69
- const U = y.div`
70
- background-color: ${u.white};
81
+ const O = v.div`
82
+ background-color: ${y.white};
71
83
  z-index: 999999;
72
84
  overflow: hidden;
73
- border-radius: ${u.radiusBase};
85
+ border-radius: ${y.radiusBase};
74
86
  display: flex;
75
87
  flex-direction: column;
76
88
  align-items: stretch;
@@ -80,10 +92,10 @@ const U = y.div`
80
92
  bottom: 0;
81
93
  left: 0;
82
94
  right: 0;
83
- `, E = y(A)`
95
+ `, R = v(S)`
84
96
  height: 100%;
85
97
  width: 100%;
86
98
  `;
87
99
  export {
88
- L as Dat
100
+ X as Dat
89
101
  };