@frontify/guideline-blocks-settings 3.0.2 → 3.0.4

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 (262) hide show
  1. package/dist/_virtual/_rolldown/runtime.es.js +17 -0
  2. package/dist/components/Attachments/AttachmentItem.es.js +116 -168
  3. package/dist/components/Attachments/AttachmentItem.es.js.map +1 -1
  4. package/dist/components/Attachments/Attachments.es.js +145 -137
  5. package/dist/components/Attachments/Attachments.es.js.map +1 -1
  6. package/dist/components/Attachments/AttachmentsButtonTrigger.es.js +25 -28
  7. package/dist/components/Attachments/AttachmentsButtonTrigger.es.js.map +1 -1
  8. package/dist/components/BlockInjectButton/BlockInjectButton.es.js +114 -126
  9. package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -1
  10. package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +53 -74
  11. package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
  12. package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js +26 -31
  13. package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js.map +1 -1
  14. package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js +22 -25
  15. package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js.map +1 -1
  16. package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js +17 -28
  17. package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js.map +1 -1
  18. package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js +25 -35
  19. package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js.map +1 -1
  20. package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js +41 -34
  21. package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js.map +1 -1
  22. package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js +41 -36
  23. package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js.map +1 -1
  24. package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js +24 -33
  25. package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js.map +1 -1
  26. package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js +20 -11
  27. package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js.map +1 -1
  28. package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js +18 -10
  29. package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js.map +1 -1
  30. package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js +10 -12
  31. package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js.map +1 -1
  32. package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js +13 -13
  33. package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js.map +1 -1
  34. package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js +21 -19
  35. package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js.map +1 -1
  36. package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js +18 -25
  37. package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js.map +1 -1
  38. package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js +18 -17
  39. package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js.map +1 -1
  40. package/dist/components/BlockItemWrapper/constants.es.js +6 -6
  41. package/dist/components/BlockItemWrapper/constants.es.js.map +1 -1
  42. package/dist/components/Link/LinkInput.es.js +63 -63
  43. package/dist/components/Link/LinkInput.es.js.map +1 -1
  44. package/dist/components/Link/LinkSelector/DocumentLink.es.js +46 -63
  45. package/dist/components/Link/LinkSelector/DocumentLink.es.js.map +1 -1
  46. package/dist/components/Link/LinkSelector/DocumentLinks.es.js +50 -64
  47. package/dist/components/Link/LinkSelector/DocumentLinks.es.js.map +1 -1
  48. package/dist/components/Link/LinkSelector/LinkSelector2.es.js +77 -0
  49. package/dist/components/Link/LinkSelector/LinkSelector2.es.js.map +1 -0
  50. package/dist/components/Link/LinkSelector/LoadingIndicator.es.js +10 -6
  51. package/dist/components/Link/LinkSelector/LoadingIndicator.es.js.map +1 -1
  52. package/dist/components/Link/LinkSelector/PageLink.es.js +53 -67
  53. package/dist/components/Link/LinkSelector/PageLink.es.js.map +1 -1
  54. package/dist/components/Link/LinkSelector/PageLinks.es.js +28 -37
  55. package/dist/components/Link/LinkSelector/PageLinks.es.js.map +1 -1
  56. package/dist/components/Link/LinkSelector/SectionLink.es.js +31 -24
  57. package/dist/components/Link/LinkSelector/SectionLink.es.js.map +1 -1
  58. package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js +6 -5
  59. package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js.map +1 -1
  60. package/dist/components/Link/utils/getUrl.es.js +10 -12
  61. package/dist/components/Link/utils/getUrl.es.js.map +1 -1
  62. package/dist/components/Link/utils/relativeUrlRegex.es.js +6 -5
  63. package/dist/components/Link/utils/relativeUrlRegex.es.js.map +1 -1
  64. package/dist/components/Link/utils/url.es.js +21 -17
  65. package/dist/components/Link/utils/url.es.js.map +1 -1
  66. package/dist/components/RichTextEditor/RichTextEditor.es.js +61 -68
  67. package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
  68. package/dist/components/RichTextEditor/SerializedText.es.js +25 -22
  69. package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -1
  70. package/dist/components/RichTextEditor/constants.es.js +6 -5
  71. package/dist/components/RichTextEditor/constants.es.js.map +1 -1
  72. package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js +30 -37
  73. package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -1
  74. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +31 -39
  75. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -1
  76. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js +12 -11
  77. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js.map +1 -1
  78. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +19 -23
  79. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -1
  80. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +24 -26
  81. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -1
  82. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +46 -53
  83. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -1
  84. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +52 -54
  85. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -1
  86. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +68 -68
  87. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -1
  88. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +91 -103
  89. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -1
  90. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js +26 -32
  91. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js.map +1 -1
  92. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +47 -53
  93. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +1 -1
  94. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js +12 -18
  95. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +1 -1
  96. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js +21 -25
  97. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +1 -1
  98. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +29 -37
  99. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +1 -1
  100. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js +13 -17
  101. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js.map +1 -1
  102. package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +56 -62
  103. package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -1
  104. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js +9 -12
  105. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +1 -1
  106. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +23 -24
  107. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +1 -1
  108. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +28 -33
  109. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -1
  110. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +61 -80
  111. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -1
  112. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +23 -23
  113. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -1
  114. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js +18 -18
  115. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +1 -1
  116. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js +13 -12
  117. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +1 -1
  118. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +9 -8
  119. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +1 -1
  120. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js +11 -10
  121. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js.map +1 -1
  122. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js +85 -84
  123. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js.map +1 -1
  124. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js +13 -16
  125. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +1 -1
  126. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js +13 -16
  127. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js.map +1 -1
  128. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js +10 -13
  129. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +1 -1
  130. package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +45 -51
  131. package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -1
  132. package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js +20 -22
  133. package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js.map +1 -1
  134. package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/helpers.es.js +12 -12
  135. package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/helpers.es.js.map +1 -1
  136. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +48 -57
  137. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
  138. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +46 -48
  139. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -1
  140. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +12 -8
  141. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -1
  142. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +62 -71
  143. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -1
  144. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +76 -77
  145. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -1
  146. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +17 -21
  147. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -1
  148. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +17 -10
  149. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -1
  150. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +11 -10
  151. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +1 -1
  152. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkToolbarButton.es.js +22 -26
  153. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkToolbarButton.es.js.map +1 -1
  154. package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js +6 -5
  155. package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js.map +1 -1
  156. package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +39 -40
  157. package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -1
  158. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +10 -10
  159. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -1
  160. package/dist/components/RichTextEditor/plugins/OrderedListPlugin/index.es.js +26 -26
  161. package/dist/components/RichTextEditor/plugins/OrderedListPlugin/index.es.js.map +1 -1
  162. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +40 -46
  163. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -1
  164. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +40 -46
  165. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -1
  166. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +40 -46
  167. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -1
  168. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +41 -47
  169. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -1
  170. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +41 -47
  171. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -1
  172. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +41 -47
  173. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -1
  174. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +41 -47
  175. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -1
  176. package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js +44 -38
  177. package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js.map +1 -1
  178. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +41 -47
  179. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -1
  180. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +40 -46
  181. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -1
  182. package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +45 -41
  183. package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -1
  184. package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +40 -48
  185. package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -1
  186. package/dist/components/RichTextEditor/plugins/UnorderedListPlugin/index.es.js +29 -29
  187. package/dist/components/RichTextEditor/plugins/UnorderedListPlugin/index.es.js.map +1 -1
  188. package/dist/components/RichTextEditor/plugins/styles.es.js +167 -166
  189. package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -1
  190. package/dist/helpers/addHttps.es.js +12 -12
  191. package/dist/helpers/addHttps.es.js.map +1 -1
  192. package/dist/helpers/convertToRichTextValue.es.js +14 -6
  193. package/dist/helpers/convertToRichTextValue.es.js.map +1 -1
  194. package/dist/helpers/hasRichTextValue.es.js +13 -14
  195. package/dist/helpers/hasRichTextValue.es.js.map +1 -1
  196. package/dist/helpers/isDownloadable.es.js +6 -5
  197. package/dist/helpers/isDownloadable.es.js.map +1 -1
  198. package/dist/hooks/useAttachments.es.js +65 -73
  199. package/dist/hooks/useAttachments.es.js.map +1 -1
  200. package/dist/hooks/useIsInViewport.es.js +20 -21
  201. package/dist/hooks/useIsInViewport.es.js.map +1 -1
  202. package/dist/index.cjs.js +6 -8
  203. package/dist/index.cjs.js.map +1 -1
  204. package/dist/index.d.ts +8 -7
  205. package/dist/index.es.js +221 -213
  206. package/dist/index.es.js.map +1 -1
  207. package/dist/index.umd.js +6 -8
  208. package/dist/index.umd.js.map +1 -1
  209. package/dist/settings/background.es.js +20 -21
  210. package/dist/settings/background.es.js.map +1 -1
  211. package/dist/settings/border.es.js +62 -64
  212. package/dist/settings/border.es.js.map +1 -1
  213. package/dist/settings/borderRadius.es.js +49 -52
  214. package/dist/settings/borderRadius.es.js.map +1 -1
  215. package/dist/settings/borderRadiusExtended.es.js +58 -60
  216. package/dist/settings/borderRadiusExtended.es.js.map +1 -1
  217. package/dist/settings/defaultValues.es.js +16 -19
  218. package/dist/settings/defaultValues.es.js.map +1 -1
  219. package/dist/settings/gutter.es.js +48 -52
  220. package/dist/settings/gutter.es.js.map +1 -1
  221. package/dist/settings/margin.es.js +49 -52
  222. package/dist/settings/margin.es.js.map +1 -1
  223. package/dist/settings/marginExtended.es.js +62 -64
  224. package/dist/settings/marginExtended.es.js.map +1 -1
  225. package/dist/settings/padding.es.js +49 -52
  226. package/dist/settings/padding.es.js.map +1 -1
  227. package/dist/settings/paddingExtended.es.js +62 -64
  228. package/dist/settings/paddingExtended.es.js.map +1 -1
  229. package/dist/settings/securityDownloadable.es.js +16 -16
  230. package/dist/settings/securityDownloadable.es.js.map +1 -1
  231. package/dist/settings/securityGlobalControl.es.js +26 -32
  232. package/dist/settings/securityGlobalControl.es.js.map +1 -1
  233. package/dist/settings/types.es.js +41 -47
  234. package/dist/settings/types.es.js.map +1 -1
  235. package/dist/styles.css +2 -1
  236. package/dist/utilities/color/getReadableColor.es.js +15 -13
  237. package/dist/utilities/color/getReadableColor.es.js.map +1 -1
  238. package/dist/utilities/color/isDark.es.js +14 -9
  239. package/dist/utilities/color/isDark.es.js.map +1 -1
  240. package/dist/utilities/color/setAlpha.es.js +7 -6
  241. package/dist/utilities/color/setAlpha.es.js.map +1 -1
  242. package/dist/utilities/color/toColorObject.es.js +14 -8
  243. package/dist/utilities/color/toColorObject.es.js.map +1 -1
  244. package/dist/utilities/color/toHex8String.es.js +7 -6
  245. package/dist/utilities/color/toHex8String.es.js.map +1 -1
  246. package/dist/utilities/color/toHexString.es.js +7 -6
  247. package/dist/utilities/color/toHexString.es.js.map +1 -1
  248. package/dist/utilities/color/toRgbaString.es.js +7 -6
  249. package/dist/utilities/color/toRgbaString.es.js.map +1 -1
  250. package/dist/utilities/color/toShortRgba.es.js +18 -11
  251. package/dist/utilities/color/toShortRgba.es.js.map +1 -1
  252. package/dist/utilities/react/getBackgroundColorStyles.es.js +7 -8
  253. package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -1
  254. package/dist/utilities/react/getBorderStyles.es.js +12 -11
  255. package/dist/utilities/react/getBorderStyles.es.js.map +1 -1
  256. package/dist/utilities/react/getRadiusStyles.es.js +7 -8
  257. package/dist/utilities/react/getRadiusStyles.es.js.map +1 -1
  258. package/dist/utilities/react/joinClassNames.es.js +6 -5
  259. package/dist/utilities/react/joinClassNames.es.js.map +1 -1
  260. package/package.json +8 -10
  261. package/dist/components/Link/LinkSelector/LinkSelector.es.js +0 -72
  262. package/dist/components/Link/LinkSelector/LinkSelector.es.js.map +0 -1
@@ -1,22 +1,21 @@
1
- import { BACKGROUND_COLOR_DEFAULT_VALUE as u } from "./defaultValues.es.js";
2
- const o = (l) => {
3
- const a = l?.id ? `hasBackground${l.id}` : "hasBackground", e = l?.id ? `backgroundColor${l.id}` : "backgroundColor", d = l?.preventDefaultColor ? void 0 : l?.defaultColor || u, r = l?.label ? l.label : "Background", c = l?.switchLabel ? l.switchLabel : void 0;
4
- return {
5
- id: a,
6
- label: r,
7
- type: "switch",
8
- switchLabel: c,
9
- defaultValue: !!l?.defaultValue,
10
- on: [
11
- {
12
- id: e,
13
- defaultValue: d,
14
- type: "colorInput"
15
- }
16
- ]
17
- };
1
+ import { BACKGROUND_COLOR_DEFAULT_VALUE as e } from "./defaultValues.es.js";
2
+ //#region src/settings/background.ts
3
+ var t = (t) => {
4
+ let n = t?.id ? `hasBackground${t.id}` : "hasBackground", r = t?.id ? `backgroundColor${t.id}` : "backgroundColor", i = t?.preventDefaultColor ? void 0 : t?.defaultColor || e;
5
+ return {
6
+ id: n,
7
+ label: t?.label ? t.label : "Background",
8
+ type: "switch",
9
+ switchLabel: t?.switchLabel ? t.switchLabel : void 0,
10
+ defaultValue: !!t?.defaultValue,
11
+ on: [{
12
+ id: r,
13
+ defaultValue: i,
14
+ type: "colorInput"
15
+ }]
16
+ };
18
17
  };
19
- export {
20
- o as getBackgroundSettings
21
- };
22
- //# sourceMappingURL=background.es.js.map
18
+ //#endregion
19
+ export { t as getBackgroundSettings };
20
+
21
+ //# sourceMappingURL=background.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"background.es.js","sources":["../../src/settings/background.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type Color } from '@frontify/sidebar-settings';\n\nimport { type SettingBlock } from '../';\n\nimport { BACKGROUND_COLOR_DEFAULT_VALUE } from './defaultValues';\ntype BackgroundSettingsType = {\n id?: string;\n defaultValue?: boolean;\n defaultColor?: Color;\n preventDefaultColor?: boolean;\n switchLabel?: string;\n label?: string;\n};\n\n/**\n * Returns background settings: background switch, background color\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.defaultValue Default value for the background switch\n * @param options.defaultColor Default value for the background color\n * @param options.preventDefaultColor Whether the background color should be empty by default\n * @param options.label Label for the background input\n * @param options.switchLabel Label for the background switch\n * @returns {SettingBlock} Returns background settings\n */\n\nexport const getBackgroundSettings = (options?: BackgroundSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasBackground${options.id}` : 'hasBackground';\n const colorId = options?.id ? `backgroundColor${options.id}` : 'backgroundColor';\n const defaultColor = options?.preventDefaultColor\n ? undefined\n : options?.defaultColor || BACKGROUND_COLOR_DEFAULT_VALUE;\n const label = options?.label ? options.label : 'Background';\n const switchLabel = options?.switchLabel ? options.switchLabel : undefined;\n\n return {\n id: hasId,\n label,\n type: 'switch',\n switchLabel,\n defaultValue: !!options?.defaultValue,\n on: [\n {\n id: colorId,\n defaultValue: defaultColor,\n type: 'colorInput',\n },\n ],\n };\n};\n"],"names":["getBackgroundSettings","options","hasId","colorId","defaultColor","BACKGROUND_COLOR_DEFAULT_VALUE","label","switchLabel"],"mappings":";AA6BO,MAAMA,IAAwB,CAACC,MAAmD;AACrF,QAAMC,IAAQD,GAAS,KAAK,gBAAgBA,EAAQ,EAAE,KAAK,iBACrDE,IAAUF,GAAS,KAAK,kBAAkBA,EAAQ,EAAE,KAAK,mBACzDG,IAAeH,GAAS,sBACxB,SACAA,GAAS,gBAAgBI,GACzBC,IAAQL,GAAS,QAAQA,EAAQ,QAAQ,cACzCM,IAAcN,GAAS,cAAcA,EAAQ,cAAc;AAEjE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAAI;AAAA,IACA,MAAM;AAAA,IACN,aAAAC;AAAA,IACA,cAAc,CAAC,CAACN,GAAS;AAAA,IACzB,IAAI;AAAA,MACA;AAAA,QACI,IAAIE;AAAA,QACJ,cAAcC;AAAA,QACd,MAAM;AAAA,MAAA;AAAA,IACV;AAAA,EACJ;AAER;"}
1
+ {"version":3,"file":"background.es.js","names":[],"sources":["../../src/settings/background.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type Color } from '@frontify/sidebar-settings';\n\nimport { type SettingBlock } from '../';\n\nimport { BACKGROUND_COLOR_DEFAULT_VALUE } from './defaultValues';\ntype BackgroundSettingsType = {\n id?: string;\n defaultValue?: boolean;\n defaultColor?: Color;\n preventDefaultColor?: boolean;\n switchLabel?: string;\n label?: string;\n};\n\n/**\n * Returns background settings: background switch, background color\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.defaultValue Default value for the background switch\n * @param options.defaultColor Default value for the background color\n * @param options.preventDefaultColor Whether the background color should be empty by default\n * @param options.label Label for the background input\n * @param options.switchLabel Label for the background switch\n * @returns {SettingBlock} Returns background settings\n */\n\nexport const getBackgroundSettings = (options?: BackgroundSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasBackground${options.id}` : 'hasBackground';\n const colorId = options?.id ? `backgroundColor${options.id}` : 'backgroundColor';\n const defaultColor = options?.preventDefaultColor\n ? undefined\n : options?.defaultColor || BACKGROUND_COLOR_DEFAULT_VALUE;\n const label = options?.label ? options.label : 'Background';\n const switchLabel = options?.switchLabel ? options.switchLabel : undefined;\n\n return {\n id: hasId,\n label,\n type: 'switch',\n switchLabel,\n defaultValue: !!options?.defaultValue,\n on: [\n {\n id: colorId,\n defaultValue: defaultColor,\n type: 'colorInput',\n },\n ],\n };\n};\n"],"mappings":";;AA6BA,IAAa,KAAyB,MAAmD;CACrF,IAAM,IAAQ,GAAS,KAAK,gBAAgB,EAAQ,OAAO,iBACrD,IAAU,GAAS,KAAK,kBAAkB,EAAQ,OAAO,mBACzD,IAAe,GAAS,sBACxB,KAAA,IACA,GAAS,gBAAgB;CAI/B,OAAO;EACH,IAAI;EACJ,OALU,GAAS,QAAQ,EAAQ,QAAQ;EAM3C,MAAM;EACN,aANgB,GAAS,cAAc,EAAQ,cAAc,KAAA;EAO7D,cAAc,CAAC,CAAC,GAAS;EACzB,IAAI,CACA;GACI,IAAI;GACJ,cAAc;GACd,MAAM;EACV,CACJ;CACJ;AACJ"}
@@ -1,65 +1,63 @@
1
- /* empty css */
2
- import { numericalOrPixelRule as m, MultiInputLayout as b, appendUnit as h, minimumNumericalOrPixelRule as n, maximumNumericalOrPixelOrAutoRule as f } from "@frontify/sidebar-settings";
3
- import { BORDER_COLOR_DEFAULT_VALUE as s, BORDER_WIDTH_DEFAULT_VALUE as y } from "./defaultValues.es.js";
4
- import { BorderStyle as l } from "./types.es.js";
5
- const S = (e) => {
6
- const r = e?.id ? `hasBorder_${e.id}` : "hasBorder", t = e?.id ? `borderSelection_${e.id}` : "borderSelection", a = e?.id ? `borderStyle_${e.id}` : "borderStyle", d = e?.id ? `borderWidth_${e.id}` : "borderWidth", u = e?.id ? `borderColor_${e.id}` : "borderColor", i = e?.defaultColor || s, o = e?.switchLabel ? e.switchLabel : void 0;
7
- return {
8
- id: r,
9
- label: "Border",
10
- type: "switch",
11
- switchLabel: o,
12
- defaultValue: !!e?.defaultValue,
13
- on: [
14
- {
15
- id: t,
16
- type: "multiInput",
17
- layout: b.Columns,
18
- lastItemFullWidth: !0,
19
- blocks: [
20
- {
21
- id: a,
22
- type: "dropdown",
23
- defaultValue: l.Solid,
24
- choices: [
25
- {
26
- value: l.Solid,
27
- label: l.Solid
28
- },
29
- {
30
- value: l.Dotted,
31
- label: l.Dotted
32
- },
33
- {
34
- value: l.Dashed,
35
- label: l.Dashed
36
- }
37
- ]
38
- },
39
- {
40
- id: d,
41
- type: "input",
42
- defaultValue: y,
43
- rules: [
44
- m,
45
- n(0),
46
- f(500)
47
- ],
48
- placeholder: "e.g. 3px",
49
- onChange: (c) => h(c, d)
50
- },
51
- {
52
- id: u,
53
- type: "colorInput",
54
- defaultValue: i
55
- }
56
- ]
57
- }
58
- ],
59
- off: []
60
- };
1
+ import { BORDER_COLOR_DEFAULT_VALUE as e } from "./defaultValues.es.js";
2
+ import { BorderStyle as t } from "./types.es.js";
3
+ import { src_exports as n } from "../index.es.js";
4
+ //#region src/settings/border.ts
5
+ var r = (r) => {
6
+ let i = r?.id ? `hasBorder_${r.id}` : "hasBorder", a = r?.id ? `borderSelection_${r.id}` : "borderSelection", o = r?.id ? `borderStyle_${r.id}` : "borderStyle", s = r?.id ? `borderWidth_${r.id}` : "borderWidth", c = r?.id ? `borderColor_${r.id}` : "borderColor", l = r?.defaultColor || e;
7
+ return {
8
+ id: i,
9
+ label: "Border",
10
+ type: "switch",
11
+ switchLabel: r?.switchLabel ? r.switchLabel : void 0,
12
+ defaultValue: !!r?.defaultValue,
13
+ on: [{
14
+ id: a,
15
+ type: "multiInput",
16
+ layout: n.MultiInputLayout.Columns,
17
+ lastItemFullWidth: !0,
18
+ blocks: [
19
+ {
20
+ id: o,
21
+ type: "dropdown",
22
+ defaultValue: t.Solid,
23
+ choices: [
24
+ {
25
+ value: t.Solid,
26
+ label: t.Solid
27
+ },
28
+ {
29
+ value: t.Dotted,
30
+ label: t.Dotted
31
+ },
32
+ {
33
+ value: t.Dashed,
34
+ label: t.Dashed
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ id: s,
40
+ type: "input",
41
+ defaultValue: "1px",
42
+ rules: [
43
+ n.numericalOrPixelRule,
44
+ (0, n.minimumNumericalOrPixelRule)(0),
45
+ (0, n.maximumNumericalOrPixelOrAutoRule)(500)
46
+ ],
47
+ placeholder: "e.g. 3px",
48
+ onChange: (e) => (0, n.appendUnit)(e, s)
49
+ },
50
+ {
51
+ id: c,
52
+ type: "colorInput",
53
+ defaultValue: l
54
+ }
55
+ ]
56
+ }],
57
+ off: []
58
+ };
61
59
  };
62
- export {
63
- S as getBorderSettings
64
- };
65
- //# sourceMappingURL=border.es.js.map
60
+ //#endregion
61
+ export { r as getBorderSettings };
62
+
63
+ //# sourceMappingURL=border.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"border.es.js","sources":["../../src/settings/border.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n type Color,\n MultiInputLayout,\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n minimumNumericalOrPixelRule,\n numericalOrPixelRule,\n} from '../';\n\nimport { BORDER_COLOR_DEFAULT_VALUE, BORDER_WIDTH_DEFAULT_VALUE } from './defaultValues';\nimport { BorderStyle } from './types';\n\n/**\n * Returns border settings: border switch, border style, border width, border color\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.switchLabel Label for the border switch\n * @param options.defaultValue Default value for the border switch\n * @returns {SettingBlock} Returns border settings\n */\n\ntype BorderSettingsType = {\n id?: string;\n defaultValue?: boolean;\n defaultColor?: Color;\n switchLabel?: string;\n};\n\nexport const getBorderSettings = (options?: BorderSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasBorder_${options.id}` : 'hasBorder';\n const selectionId = options?.id ? `borderSelection_${options.id}` : 'borderSelection';\n const styleId = options?.id ? `borderStyle_${options.id}` : 'borderStyle';\n const widthId = options?.id ? `borderWidth_${options.id}` : 'borderWidth';\n const colorId = options?.id ? `borderColor_${options.id}` : 'borderColor';\n const defaultColor = options?.defaultColor || BORDER_COLOR_DEFAULT_VALUE;\n const switchLabel = options?.switchLabel ? options.switchLabel : undefined;\n\n return {\n id: hasId,\n label: 'Border',\n type: 'switch',\n switchLabel,\n defaultValue: !!options?.defaultValue,\n on: [\n {\n id: selectionId,\n type: 'multiInput',\n layout: MultiInputLayout.Columns,\n lastItemFullWidth: true,\n blocks: [\n {\n id: styleId,\n type: 'dropdown',\n defaultValue: BorderStyle.Solid,\n choices: [\n {\n value: BorderStyle.Solid,\n label: BorderStyle.Solid,\n },\n {\n value: BorderStyle.Dotted,\n label: BorderStyle.Dotted,\n },\n {\n value: BorderStyle.Dashed,\n label: BorderStyle.Dashed,\n },\n ],\n },\n {\n id: widthId,\n type: 'input',\n defaultValue: BORDER_WIDTH_DEFAULT_VALUE,\n rules: [\n numericalOrPixelRule,\n minimumNumericalOrPixelRule(0),\n maximumNumericalOrPixelOrAutoRule(500),\n ],\n placeholder: 'e.g. 3px',\n onChange: (bundle) => appendUnit(bundle, widthId),\n },\n {\n id: colorId,\n type: 'colorInput',\n defaultValue: defaultColor,\n },\n ],\n },\n ],\n off: [],\n };\n};\n"],"names":["getBorderSettings","options","hasId","selectionId","styleId","widthId","colorId","defaultColor","BORDER_COLOR_DEFAULT_VALUE","switchLabel","MultiInputLayout","BorderStyle","BORDER_WIDTH_DEFAULT_VALUE","numericalOrPixelRule","minimumNumericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","bundle","appendUnit"],"mappings":";;;;AAgCO,MAAMA,IAAoB,CAACC,MAA+C;AAC7E,QAAMC,IAAQD,GAAS,KAAK,aAAaA,EAAQ,EAAE,KAAK,aAClDE,IAAcF,GAAS,KAAK,mBAAmBA,EAAQ,EAAE,KAAK,mBAC9DG,IAAUH,GAAS,KAAK,eAAeA,EAAQ,EAAE,KAAK,eACtDI,IAAUJ,GAAS,KAAK,eAAeA,EAAQ,EAAE,KAAK,eACtDK,IAAUL,GAAS,KAAK,eAAeA,EAAQ,EAAE,KAAK,eACtDM,IAAeN,GAAS,gBAAgBO,GACxCC,IAAcR,GAAS,cAAcA,EAAQ,cAAc;AAEjE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAAO;AAAA,IACA,cAAc,CAAC,CAACR,GAAS;AAAA,IACzB,IAAI;AAAA,MACA;AAAA,QACI,IAAIE;AAAA,QACJ,MAAM;AAAA,QACN,QAAQO,EAAiB;AAAA,QACzB,mBAAmB;AAAA,QACnB,QAAQ;AAAA,UACJ;AAAA,YACI,IAAIN;AAAA,YACJ,MAAM;AAAA,YACN,cAAcO,EAAY;AAAA,YAC1B,SAAS;AAAA,cACL;AAAA,gBACI,OAAOA,EAAY;AAAA,gBACnB,OAAOA,EAAY;AAAA,cAAA;AAAA,cAEvB;AAAA,gBACI,OAAOA,EAAY;AAAA,gBACnB,OAAOA,EAAY;AAAA,cAAA;AAAA,cAEvB;AAAA,gBACI,OAAOA,EAAY;AAAA,gBACnB,OAAOA,EAAY;AAAA,cAAA;AAAA,YACvB;AAAA,UACJ;AAAA,UAEJ;AAAA,YACI,IAAIN;AAAA,YACJ,MAAM;AAAA,YACN,cAAcO;AAAA,YACd,OAAO;AAAA,cACHC;AAAA,cACAC,EAA4B,CAAC;AAAA,cAC7BC,EAAkC,GAAG;AAAA,YAAA;AAAA,YAEzC,aAAa;AAAA,YACb,UAAU,CAACC,MAAWC,EAAWD,GAAQX,CAAO;AAAA,UAAA;AAAA,UAEpD;AAAA,YACI,IAAIC;AAAA,YACJ,MAAM;AAAA,YACN,cAAcC;AAAA,UAAA;AAAA,QAClB;AAAA,MACJ;AAAA,IACJ;AAAA,IAEJ,KAAK,CAAA;AAAA,EAAC;AAEd;"}
1
+ {"version":3,"file":"border.es.js","names":[],"sources":["../../src/settings/border.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n type Color,\n MultiInputLayout,\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n minimumNumericalOrPixelRule,\n numericalOrPixelRule,\n} from '../';\n\nimport { BORDER_COLOR_DEFAULT_VALUE, BORDER_WIDTH_DEFAULT_VALUE } from './defaultValues';\nimport { BorderStyle } from './types';\n\n/**\n * Returns border settings: border switch, border style, border width, border color\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.switchLabel Label for the border switch\n * @param options.defaultValue Default value for the border switch\n * @returns {SettingBlock} Returns border settings\n */\n\ntype BorderSettingsType = {\n id?: string;\n defaultValue?: boolean;\n defaultColor?: Color;\n switchLabel?: string;\n};\n\nexport const getBorderSettings = (options?: BorderSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasBorder_${options.id}` : 'hasBorder';\n const selectionId = options?.id ? `borderSelection_${options.id}` : 'borderSelection';\n const styleId = options?.id ? `borderStyle_${options.id}` : 'borderStyle';\n const widthId = options?.id ? `borderWidth_${options.id}` : 'borderWidth';\n const colorId = options?.id ? `borderColor_${options.id}` : 'borderColor';\n const defaultColor = options?.defaultColor || BORDER_COLOR_DEFAULT_VALUE;\n const switchLabel = options?.switchLabel ? options.switchLabel : undefined;\n\n return {\n id: hasId,\n label: 'Border',\n type: 'switch',\n switchLabel,\n defaultValue: !!options?.defaultValue,\n on: [\n {\n id: selectionId,\n type: 'multiInput',\n layout: MultiInputLayout.Columns,\n lastItemFullWidth: true,\n blocks: [\n {\n id: styleId,\n type: 'dropdown',\n defaultValue: BorderStyle.Solid,\n choices: [\n {\n value: BorderStyle.Solid,\n label: BorderStyle.Solid,\n },\n {\n value: BorderStyle.Dotted,\n label: BorderStyle.Dotted,\n },\n {\n value: BorderStyle.Dashed,\n label: BorderStyle.Dashed,\n },\n ],\n },\n {\n id: widthId,\n type: 'input',\n defaultValue: BORDER_WIDTH_DEFAULT_VALUE,\n rules: [\n numericalOrPixelRule,\n minimumNumericalOrPixelRule(0),\n maximumNumericalOrPixelOrAutoRule(500),\n ],\n placeholder: 'e.g. 3px',\n onChange: (bundle) => appendUnit(bundle, widthId),\n },\n {\n id: colorId,\n type: 'colorInput',\n defaultValue: defaultColor,\n },\n ],\n },\n ],\n off: [],\n };\n};\n"],"mappings":";;;;AAgCA,IAAa,KAAqB,MAA+C;CAC7E,IAAM,IAAQ,GAAS,KAAK,aAAa,EAAQ,OAAO,aAClD,IAAc,GAAS,KAAK,mBAAmB,EAAQ,OAAO,mBAC9D,IAAU,GAAS,KAAK,eAAe,EAAQ,OAAO,eACtD,IAAU,GAAS,KAAK,eAAe,EAAQ,OAAO,eACtD,IAAU,GAAS,KAAK,eAAe,EAAQ,OAAO,eACtD,IAAe,GAAS,gBAAgB;CAG9C,OAAO;EACH,IAAI;EACJ,OAAO;EACP,MAAM;EACN,aANgB,GAAS,cAAc,EAAQ,cAAc,KAAA;EAO7D,cAAc,CAAC,CAAC,GAAS;EACzB,IAAI,CACA;GACI,IAAI;GACJ,MAAM;GACN,QAAQ,EAAA,iBAAiB;GACzB,mBAAmB;GACnB,QAAQ;IACJ;KACI,IAAI;KACJ,MAAM;KACN,cAAc,EAAY;KAC1B,SAAS;MACL;OACI,OAAO,EAAY;OACnB,OAAO,EAAY;MACvB;MACA;OACI,OAAO,EAAY;OACnB,OAAO,EAAY;MACvB;MACA;OACI,OAAO,EAAY;OACnB,OAAO,EAAY;MACvB;KACJ;IACJ;IACA;KACI,IAAI;KACJ,MAAM;KACN,cAAA;KACA,OAAO;MACH,EAAA;OACA,GAAA,EAAA,4BAAA,CAA4B,CAAC;OAC7B,GAAA,EAAA,kCAAA,CAAkC,GAAG;KACzC;KACA,aAAa;KACb,WAAW,OAAA,GAAW,EAAA,WAAA,CAAW,GAAQ,CAAO;IACpD;IACA;KACI,IAAI;KACJ,MAAM;KACN,cAAc;IAClB;GACJ;EACJ,CACJ;EACA,KAAK,CAAC;CACV;AACJ"}
@@ -1,53 +1,50 @@
1
- /* empty css */
2
- import { numericalOrPixelRule as t, appendUnit as n, minimumNumericalOrPixelRule as s, presetCustomValue as o } from "@frontify/sidebar-settings";
3
- import { Radius as a, radiusStyleMap as c } from "./types.es.js";
4
- const m = (e, l = a.None) => ({
5
- id: e,
6
- type: "segmentedControls",
7
- defaultValue: l,
8
- choices: [
9
- {
10
- value: a.None,
11
- label: "None"
12
- },
13
- {
14
- value: a.Small,
15
- label: "S"
16
- },
17
- {
18
- value: a.Medium,
19
- label: "M"
20
- },
21
- {
22
- value: a.Large,
23
- label: "L"
24
- }
25
- ]
26
- }), p = (e) => {
27
- const l = e?.id ? `hasRadius_${e.id}` : "hasRadius", u = e?.id ? `radiusValue_${e.id}` : "radiusValue", i = e?.id ? `radiusChoice_${e.id}` : "radiusChoice", r = e?.defaultRadius || a.None;
28
- return {
29
- id: l,
30
- label: "Corner radius",
31
- type: "switch",
32
- switchLabel: "Custom",
33
- defaultValue: !1,
34
- info: "Determining how rounded the corners are.",
35
- show: (d) => e?.dependentSettingId ? !!d.getBlock(e.dependentSettingId)?.value : !0,
36
- onChange: (d) => o(d, i, u, e?.radiusStyleMap || c),
37
- on: [
38
- {
39
- id: u,
40
- type: "input",
41
- placeholder: "e.g. 10px",
42
- rules: [t, s(0)],
43
- onChange: (d) => n(d, u)
44
- }
45
- ],
46
- off: [m(i, r)]
47
- };
1
+ import { Radius as e, radiusStyleMap as t } from "./types.es.js";
2
+ import { src_exports as n } from "../index.es.js";
3
+ //#region src/settings/borderRadius.ts
4
+ var r = (t, n = e.None) => ({
5
+ id: t,
6
+ type: "segmentedControls",
7
+ defaultValue: n,
8
+ choices: [
9
+ {
10
+ value: e.None,
11
+ label: "None"
12
+ },
13
+ {
14
+ value: e.Small,
15
+ label: "S"
16
+ },
17
+ {
18
+ value: e.Medium,
19
+ label: "M"
20
+ },
21
+ {
22
+ value: e.Large,
23
+ label: "L"
24
+ }
25
+ ]
26
+ }), i = (i) => {
27
+ let a = i?.id ? `hasRadius_${i.id}` : "hasRadius", o = i?.id ? `radiusValue_${i.id}` : "radiusValue", s = i?.id ? `radiusChoice_${i.id}` : "radiusChoice", c = i?.defaultRadius || e.None;
28
+ return {
29
+ id: a,
30
+ label: "Corner radius",
31
+ type: "switch",
32
+ switchLabel: "Custom",
33
+ defaultValue: !1,
34
+ info: "Determining how rounded the corners are.",
35
+ show: (e) => !i?.dependentSettingId || !!e.getBlock(i.dependentSettingId)?.value,
36
+ onChange: (e) => (0, n.presetCustomValue)(e, s, o, i?.radiusStyleMap || t),
37
+ on: [{
38
+ id: o,
39
+ type: "input",
40
+ placeholder: "e.g. 10px",
41
+ rules: [n.numericalOrPixelRule, (0, n.minimumNumericalOrPixelRule)(0)],
42
+ onChange: (e) => (0, n.appendUnit)(e, o)
43
+ }],
44
+ off: [r(s, c)]
45
+ };
48
46
  };
49
- export {
50
- p as getBorderRadiusSettings,
51
- m as getBorderRadiusSlider
52
- };
53
- //# sourceMappingURL=borderRadius.es.js.map
47
+ //#endregion
48
+ export { i as getBorderRadiusSettings, r as getBorderRadiusSlider };
49
+
50
+ //# sourceMappingURL=borderRadius.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"borderRadius.es.js","sources":["../../src/settings/borderRadius.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n type SettingBlock,\n appendUnit,\n minimumNumericalOrPixelRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { Radius, radiusStyleMap } from './types';\n\n/**\n * Returns border radius settings: border radius switch, radius slider, custom radius input\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.dependentSettingId Id of setting which the border radius is dependent on\n * @returns {SettingBlock} Returns border settings\n */\n\ntype BorderRadiusSettingsType = {\n id?: string;\n dependentSettingId?: string;\n radiusStyleMap?: Record<Radius, string>;\n defaultRadius?: Radius;\n};\n\nexport const getBorderRadiusSlider = (id: string, defaultValue: Radius = Radius.None): SettingBlock => ({\n id,\n type: 'segmentedControls',\n defaultValue,\n choices: [\n {\n value: Radius.None,\n label: 'None',\n },\n {\n value: Radius.Small,\n label: 'S',\n },\n {\n value: Radius.Medium,\n label: 'M',\n },\n {\n value: Radius.Large,\n label: 'L',\n },\n ],\n});\n\nexport const getBorderRadiusSettings = (options?: BorderRadiusSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasRadius_${options.id}` : 'hasRadius';\n const valueId = options?.id ? `radiusValue_${options.id}` : 'radiusValue';\n const choiceId = options?.id ? `radiusChoice_${options.id}` : 'radiusChoice';\n const defaultValue = options?.defaultRadius || Radius.None;\n\n return {\n id: hasId,\n label: 'Corner radius',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'Determining how rounded the corners are.',\n show: (bundle) => (options?.dependentSettingId ? !!bundle.getBlock(options.dependentSettingId)?.value : true),\n onChange: (bundle) => presetCustomValue(bundle, choiceId, valueId, options?.radiusStyleMap || radiusStyleMap),\n on: [\n {\n id: valueId,\n type: 'input',\n placeholder: 'e.g. 10px',\n rules: [numericalOrPixelRule, minimumNumericalOrPixelRule(0)],\n onChange: (bundle) => appendUnit(bundle, valueId),\n },\n ],\n off: [getBorderRadiusSlider(choiceId, defaultValue)],\n };\n};\n"],"names":["getBorderRadiusSlider","id","defaultValue","Radius","getBorderRadiusSettings","options","hasId","valueId","choiceId","bundle","presetCustomValue","radiusStyleMap","numericalOrPixelRule","minimumNumericalOrPixelRule","appendUnit"],"mappings":";;;AA4BO,MAAMA,IAAwB,CAACC,GAAYC,IAAuBC,EAAO,UAAwB;AAAA,EACpG,IAAAF;AAAA,EACA,MAAM;AAAA,EACN,cAAAC;AAAA,EACA,SAAS;AAAA,IACL;AAAA,MACI,OAAOC,EAAO;AAAA,MACd,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IAAA;AAAA,EACX;AAER,IAEaC,IAA0B,CAACC,MAAqD;AACzF,QAAMC,IAAQD,GAAS,KAAK,aAAaA,EAAQ,EAAE,KAAK,aAClDE,IAAUF,GAAS,KAAK,eAAeA,EAAQ,EAAE,KAAK,eACtDG,IAAWH,GAAS,KAAK,gBAAgBA,EAAQ,EAAE,KAAK,gBACxDH,IAAeG,GAAS,iBAAiBF,EAAO;AAEtD,SAAO;AAAA,IACH,IAAIG;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM,CAACG,MAAYJ,GAAS,qBAAqB,CAAC,CAACI,EAAO,SAASJ,EAAQ,kBAAkB,GAAG,QAAQ;AAAA,IACxG,UAAU,CAACI,MAAWC,EAAkBD,GAAQD,GAAUD,GAASF,GAAS,kBAAkBM,CAAc;AAAA,IAC5G,IAAI;AAAA,MACA;AAAA,QACI,IAAIJ;AAAA,QACJ,MAAM;AAAA,QACN,aAAa;AAAA,QACb,OAAO,CAACK,GAAsBC,EAA4B,CAAC,CAAC;AAAA,QAC5D,UAAU,CAACJ,MAAWK,EAAWL,GAAQF,CAAO;AAAA,MAAA;AAAA,IACpD;AAAA,IAEJ,KAAK,CAACP,EAAsBQ,GAAUN,CAAY,CAAC;AAAA,EAAA;AAE3D;"}
1
+ {"version":3,"file":"borderRadius.es.js","names":[],"sources":["../../src/settings/borderRadius.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n type SettingBlock,\n appendUnit,\n minimumNumericalOrPixelRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { Radius, radiusStyleMap } from './types';\n\n/**\n * Returns border radius settings: border radius switch, radius slider, custom radius input\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.dependentSettingId Id of setting which the border radius is dependent on\n * @returns {SettingBlock} Returns border settings\n */\n\ntype BorderRadiusSettingsType = {\n id?: string;\n dependentSettingId?: string;\n radiusStyleMap?: Record<Radius, string>;\n defaultRadius?: Radius;\n};\n\nexport const getBorderRadiusSlider = (id: string, defaultValue: Radius = Radius.None): SettingBlock => ({\n id,\n type: 'segmentedControls',\n defaultValue,\n choices: [\n {\n value: Radius.None,\n label: 'None',\n },\n {\n value: Radius.Small,\n label: 'S',\n },\n {\n value: Radius.Medium,\n label: 'M',\n },\n {\n value: Radius.Large,\n label: 'L',\n },\n ],\n});\n\nexport const getBorderRadiusSettings = (options?: BorderRadiusSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasRadius_${options.id}` : 'hasRadius';\n const valueId = options?.id ? `radiusValue_${options.id}` : 'radiusValue';\n const choiceId = options?.id ? `radiusChoice_${options.id}` : 'radiusChoice';\n const defaultValue = options?.defaultRadius || Radius.None;\n\n return {\n id: hasId,\n label: 'Corner radius',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'Determining how rounded the corners are.',\n show: (bundle) => (options?.dependentSettingId ? !!bundle.getBlock(options.dependentSettingId)?.value : true),\n onChange: (bundle) => presetCustomValue(bundle, choiceId, valueId, options?.radiusStyleMap || radiusStyleMap),\n on: [\n {\n id: valueId,\n type: 'input',\n placeholder: 'e.g. 10px',\n rules: [numericalOrPixelRule, minimumNumericalOrPixelRule(0)],\n onChange: (bundle) => appendUnit(bundle, valueId),\n },\n ],\n off: [getBorderRadiusSlider(choiceId, defaultValue)],\n };\n};\n"],"mappings":";;;AA4BA,IAAa,KAAyB,GAAY,IAAuB,EAAO,UAAwB;CACpG;CACA,MAAM;CACN;CACA,SAAS;EACL;GACI,OAAO,EAAO;GACd,OAAO;EACX;EACA;GACI,OAAO,EAAO;GACd,OAAO;EACX;EACA;GACI,OAAO,EAAO;GACd,OAAO;EACX;EACA;GACI,OAAO,EAAO;GACd,OAAO;EACX;CACJ;AACJ,IAEa,KAA2B,MAAqD;CACzF,IAAM,IAAQ,GAAS,KAAK,aAAa,EAAQ,OAAO,aAClD,IAAU,GAAS,KAAK,eAAe,EAAQ,OAAO,eACtD,IAAW,GAAS,KAAK,gBAAgB,EAAQ,OAAO,gBACxD,IAAe,GAAS,iBAAiB,EAAO;CAEtD,OAAO;EACH,IAAI;EACJ,OAAO;EACP,MAAM;EACN,aAAa;EACb,cAAc;EACd,MAAM;EACN,OAAO,MAAY,IAAS,sBAAqB,CAAC,CAAC,EAAO,SAAS,EAAQ,kBAAkB,CAAC,EAAE;EAChG,WAAW,OAAA,GAAW,EAAA,kBAAA,CAAkB,GAAQ,GAAU,GAAS,GAAS,kBAAkB,CAAc;EAC5G,IAAI,CACA;GACI,IAAI;GACJ,MAAM;GACN,aAAa;GACb,OAAO,CAAC,EAAA,uBAAA,GAAsB,EAAA,4BAAA,CAA4B,CAAC,CAAC;GAC5D,WAAW,OAAA,GAAW,EAAA,WAAA,CAAW,GAAQ,CAAO;EACpD,CACJ;EACA,KAAK,CAAC,EAAsB,GAAU,CAAY,CAAC;CACvD;AACJ"}
@@ -1,61 +1,59 @@
1
- /* empty css */
2
- import { numericalOrPixelRule as i, MultiInputLayout as m, appendUnit as a, presetCustomValue as u } from "@frontify/sidebar-settings";
3
- import { getBorderRadiusSlider as g } from "./borderRadius.es.js";
4
- import { radiusStyleMap as n } from "./types.es.js";
5
- const C = (e) => {
6
- const R = e?.id ? `hasExtendedCustomRadius_${e.id}` : "hasExtendedCustomRadius", h = e?.id ? `extendedRadiusValue_${e.id}` : "extendedRadiusValue", d = e?.id ? `extendedRadiusChoice_${e.id}` : "extendedRadiusChoice", o = e?.id ? `extendedRadiusTopLeft_${e.id}` : "extendedRadiusTopLeft", l = e?.id ? `extendedRadiusTopRight_${e.id}` : "extendedRadiusTopRight", r = e?.id ? `extendedRadiusBottomLeft_${e.id}` : "extendedRadiusBottomLeft", s = e?.id ? `extendedRadiusBottomRight_${e.id}` : "extendedRadiusBottomRight";
7
- return {
8
- id: R,
9
- label: "Corner radius",
10
- type: "switch",
11
- switchLabel: "Custom",
12
- defaultValue: !1,
13
- info: "Determining how rounded the corners are.",
14
- show: (t) => e?.dependentSettingId ? !!t.getBlock(e.dependentSettingId)?.value : !0,
15
- onChange: (t) => {
16
- u(t, d, o, n), u(t, d, l, n), u(t, d, r, n), u(t, d, s, n);
17
- },
18
- on: [
19
- {
20
- id: h,
21
- type: "multiInput",
22
- layout: m.Columns,
23
- blocks: [
24
- {
25
- id: o,
26
- type: "input",
27
- label: "Top Left",
28
- rules: [i],
29
- onChange: (t) => a(t, o)
30
- },
31
- {
32
- id: l,
33
- type: "input",
34
- label: "Top Right",
35
- rules: [i],
36
- onChange: (t) => a(t, l)
37
- },
38
- {
39
- id: r,
40
- type: "input",
41
- label: "Bottom Left",
42
- rules: [i],
43
- onChange: (t) => a(t, r)
44
- },
45
- {
46
- id: s,
47
- type: "input",
48
- label: "Bottom Right",
49
- rules: [i],
50
- onChange: (t) => a(t, s)
51
- }
52
- ]
53
- }
54
- ],
55
- off: [g(d, e?.defaultValue)]
56
- };
1
+ import { radiusStyleMap as e } from "./types.es.js";
2
+ import { getBorderRadiusSlider as t } from "./borderRadius.es.js";
3
+ import { src_exports as n } from "../index.es.js";
4
+ //#region src/settings/borderRadiusExtended.ts
5
+ var r = (r) => {
6
+ let i = r?.id ? `hasExtendedCustomRadius_${r.id}` : "hasExtendedCustomRadius", a = r?.id ? `extendedRadiusValue_${r.id}` : "extendedRadiusValue", o = r?.id ? `extendedRadiusChoice_${r.id}` : "extendedRadiusChoice", s = r?.id ? `extendedRadiusTopLeft_${r.id}` : "extendedRadiusTopLeft", c = r?.id ? `extendedRadiusTopRight_${r.id}` : "extendedRadiusTopRight", l = r?.id ? `extendedRadiusBottomLeft_${r.id}` : "extendedRadiusBottomLeft", u = r?.id ? `extendedRadiusBottomRight_${r.id}` : "extendedRadiusBottomRight";
7
+ return {
8
+ id: i,
9
+ label: "Corner radius",
10
+ type: "switch",
11
+ switchLabel: "Custom",
12
+ defaultValue: !1,
13
+ info: "Determining how rounded the corners are.",
14
+ show: (e) => !r?.dependentSettingId || !!e.getBlock(r.dependentSettingId)?.value,
15
+ onChange: (t) => {
16
+ (0, n.presetCustomValue)(t, o, s, e), (0, n.presetCustomValue)(t, o, c, e), (0, n.presetCustomValue)(t, o, l, e), (0, n.presetCustomValue)(t, o, u, e);
17
+ },
18
+ on: [{
19
+ id: a,
20
+ type: "multiInput",
21
+ layout: n.MultiInputLayout.Columns,
22
+ blocks: [
23
+ {
24
+ id: s,
25
+ type: "input",
26
+ label: "Top Left",
27
+ rules: [n.numericalOrPixelRule],
28
+ onChange: (e) => (0, n.appendUnit)(e, s)
29
+ },
30
+ {
31
+ id: c,
32
+ type: "input",
33
+ label: "Top Right",
34
+ rules: [n.numericalOrPixelRule],
35
+ onChange: (e) => (0, n.appendUnit)(e, c)
36
+ },
37
+ {
38
+ id: l,
39
+ type: "input",
40
+ label: "Bottom Left",
41
+ rules: [n.numericalOrPixelRule],
42
+ onChange: (e) => (0, n.appendUnit)(e, l)
43
+ },
44
+ {
45
+ id: u,
46
+ type: "input",
47
+ label: "Bottom Right",
48
+ rules: [n.numericalOrPixelRule],
49
+ onChange: (e) => (0, n.appendUnit)(e, u)
50
+ }
51
+ ]
52
+ }],
53
+ off: [t(o, r?.defaultValue)]
54
+ };
57
55
  };
58
- export {
59
- C as getExtendedBorderRadiusSettings
60
- };
61
- //# sourceMappingURL=borderRadiusExtended.es.js.map
56
+ //#endregion
57
+ export { r as getExtendedBorderRadiusSettings };
58
+
59
+ //# sourceMappingURL=borderRadiusExtended.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"borderRadiusExtended.es.js","sources":["../../src/settings/borderRadiusExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MultiInputLayout, type SettingBlock, appendUnit, numericalOrPixelRule, presetCustomValue } from '../';\n\nimport { getBorderRadiusSlider } from './borderRadius';\nimport { type Radius, radiusStyleMap } from './types';\n\n/**\n * Returns border radius settings: border radius switch, radius slider, custom radius inputs for every corner\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.dependentSettingId Id of setting which the border radius is dependent on\n * @returns {SettingBlock} Returns border settings\n */\n\ntype BorderRadiusSettingsType = {\n id?: string;\n dependentSettingId?: string;\n defaultValue?: Radius;\n};\n\nexport const getExtendedBorderRadiusSettings = (options?: BorderRadiusSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasExtendedCustomRadius_${options.id}` : 'hasExtendedCustomRadius';\n const valueId = options?.id ? `extendedRadiusValue_${options.id}` : 'extendedRadiusValue';\n const choiceId = options?.id ? `extendedRadiusChoice_${options.id}` : 'extendedRadiusChoice';\n const topLeftId = options?.id ? `extendedRadiusTopLeft_${options.id}` : 'extendedRadiusTopLeft';\n const topRightId = options?.id ? `extendedRadiusTopRight_${options.id}` : 'extendedRadiusTopRight';\n const bottomLeftId = options?.id ? `extendedRadiusBottomLeft_${options.id}` : 'extendedRadiusBottomLeft';\n const bottomRightId = options?.id ? `extendedRadiusBottomRight_${options.id}` : 'extendedRadiusBottomRight';\n\n return {\n id: hasId,\n label: 'Corner radius',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'Determining how rounded the corners are.',\n show: (bundle) => (options?.dependentSettingId ? !!bundle.getBlock(options.dependentSettingId)?.value : true),\n onChange: (bundle) => {\n presetCustomValue(bundle, choiceId, topLeftId, radiusStyleMap);\n presetCustomValue(bundle, choiceId, topRightId, radiusStyleMap);\n presetCustomValue(bundle, choiceId, bottomLeftId, radiusStyleMap);\n presetCustomValue(bundle, choiceId, bottomRightId, radiusStyleMap);\n },\n on: [\n {\n id: valueId,\n type: 'multiInput',\n layout: MultiInputLayout.Columns,\n blocks: [\n {\n id: topLeftId,\n type: 'input',\n label: 'Top Left',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, topLeftId),\n },\n {\n id: topRightId,\n type: 'input',\n label: 'Top Right',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, topRightId),\n },\n {\n id: bottomLeftId,\n type: 'input',\n label: 'Bottom Left',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, bottomLeftId),\n },\n {\n id: bottomRightId,\n type: 'input',\n label: 'Bottom Right',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, bottomRightId),\n },\n ],\n },\n ],\n off: [getBorderRadiusSlider(choiceId, options?.defaultValue)],\n };\n};\n"],"names":["getExtendedBorderRadiusSettings","options","hasId","valueId","choiceId","topLeftId","topRightId","bottomLeftId","bottomRightId","bundle","presetCustomValue","radiusStyleMap","MultiInputLayout","numericalOrPixelRule","appendUnit","getBorderRadiusSlider"],"mappings":";;;;AAsBO,MAAMA,IAAkC,CAACC,MAAqD;AACjG,QAAMC,IAAQD,GAAS,KAAK,2BAA2BA,EAAQ,EAAE,KAAK,2BAChEE,IAAUF,GAAS,KAAK,uBAAuBA,EAAQ,EAAE,KAAK,uBAC9DG,IAAWH,GAAS,KAAK,wBAAwBA,EAAQ,EAAE,KAAK,wBAChEI,IAAYJ,GAAS,KAAK,yBAAyBA,EAAQ,EAAE,KAAK,yBAClEK,IAAaL,GAAS,KAAK,0BAA0BA,EAAQ,EAAE,KAAK,0BACpEM,IAAeN,GAAS,KAAK,4BAA4BA,EAAQ,EAAE,KAAK,4BACxEO,IAAgBP,GAAS,KAAK,6BAA6BA,EAAQ,EAAE,KAAK;AAEhF,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM,CAACO,MAAYR,GAAS,qBAAqB,CAAC,CAACQ,EAAO,SAASR,EAAQ,kBAAkB,GAAG,QAAQ;AAAA,IACxG,UAAU,CAACQ,MAAW;AAClB,MAAAC,EAAkBD,GAAQL,GAAUC,GAAWM,CAAc,GAC7DD,EAAkBD,GAAQL,GAAUE,GAAYK,CAAc,GAC9DD,EAAkBD,GAAQL,GAAUG,GAAcI,CAAc,GAChED,EAAkBD,GAAQL,GAAUI,GAAeG,CAAc;AAAA,IACrE;AAAA,IACA,IAAI;AAAA,MACA;AAAA,QACI,IAAIR;AAAA,QACJ,MAAM;AAAA,QACN,QAAQS,EAAiB;AAAA,QACzB,QAAQ;AAAA,UACJ;AAAA,YACI,IAAIP;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,OAAO,CAACQ,CAAoB;AAAA,YAC5B,UAAU,CAACJ,MAAWK,EAAWL,GAAQJ,CAAS;AAAA,UAAA;AAAA,UAEtD;AAAA,YACI,IAAIC;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,OAAO,CAACO,CAAoB;AAAA,YAC5B,UAAU,CAACJ,MAAWK,EAAWL,GAAQH,CAAU;AAAA,UAAA;AAAA,UAEvD;AAAA,YACI,IAAIC;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,OAAO,CAACM,CAAoB;AAAA,YAC5B,UAAU,CAACJ,MAAWK,EAAWL,GAAQF,CAAY;AAAA,UAAA;AAAA,UAEzD;AAAA,YACI,IAAIC;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,OAAO,CAACK,CAAoB;AAAA,YAC5B,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAa;AAAA,UAAA;AAAA,QAC1D;AAAA,MACJ;AAAA,IACJ;AAAA,IAEJ,KAAK,CAACO,EAAsBX,GAAUH,GAAS,YAAY,CAAC;AAAA,EAAA;AAEpE;"}
1
+ {"version":3,"file":"borderRadiusExtended.es.js","names":[],"sources":["../../src/settings/borderRadiusExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MultiInputLayout, type SettingBlock, appendUnit, numericalOrPixelRule, presetCustomValue } from '../';\n\nimport { getBorderRadiusSlider } from './borderRadius';\nimport { type Radius, radiusStyleMap } from './types';\n\n/**\n * Returns border radius settings: border radius switch, radius slider, custom radius inputs for every corner\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @param options.dependentSettingId Id of setting which the border radius is dependent on\n * @returns {SettingBlock} Returns border settings\n */\n\ntype BorderRadiusSettingsType = {\n id?: string;\n dependentSettingId?: string;\n defaultValue?: Radius;\n};\n\nexport const getExtendedBorderRadiusSettings = (options?: BorderRadiusSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasExtendedCustomRadius_${options.id}` : 'hasExtendedCustomRadius';\n const valueId = options?.id ? `extendedRadiusValue_${options.id}` : 'extendedRadiusValue';\n const choiceId = options?.id ? `extendedRadiusChoice_${options.id}` : 'extendedRadiusChoice';\n const topLeftId = options?.id ? `extendedRadiusTopLeft_${options.id}` : 'extendedRadiusTopLeft';\n const topRightId = options?.id ? `extendedRadiusTopRight_${options.id}` : 'extendedRadiusTopRight';\n const bottomLeftId = options?.id ? `extendedRadiusBottomLeft_${options.id}` : 'extendedRadiusBottomLeft';\n const bottomRightId = options?.id ? `extendedRadiusBottomRight_${options.id}` : 'extendedRadiusBottomRight';\n\n return {\n id: hasId,\n label: 'Corner radius',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'Determining how rounded the corners are.',\n show: (bundle) => (options?.dependentSettingId ? !!bundle.getBlock(options.dependentSettingId)?.value : true),\n onChange: (bundle) => {\n presetCustomValue(bundle, choiceId, topLeftId, radiusStyleMap);\n presetCustomValue(bundle, choiceId, topRightId, radiusStyleMap);\n presetCustomValue(bundle, choiceId, bottomLeftId, radiusStyleMap);\n presetCustomValue(bundle, choiceId, bottomRightId, radiusStyleMap);\n },\n on: [\n {\n id: valueId,\n type: 'multiInput',\n layout: MultiInputLayout.Columns,\n blocks: [\n {\n id: topLeftId,\n type: 'input',\n label: 'Top Left',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, topLeftId),\n },\n {\n id: topRightId,\n type: 'input',\n label: 'Top Right',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, topRightId),\n },\n {\n id: bottomLeftId,\n type: 'input',\n label: 'Bottom Left',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, bottomLeftId),\n },\n {\n id: bottomRightId,\n type: 'input',\n label: 'Bottom Right',\n rules: [numericalOrPixelRule],\n onChange: (bundle) => appendUnit(bundle, bottomRightId),\n },\n ],\n },\n ],\n off: [getBorderRadiusSlider(choiceId, options?.defaultValue)],\n };\n};\n"],"mappings":";;;;AAsBA,IAAa,KAAmC,MAAqD;CACjG,IAAM,IAAQ,GAAS,KAAK,2BAA2B,EAAQ,OAAO,2BAChE,IAAU,GAAS,KAAK,uBAAuB,EAAQ,OAAO,uBAC9D,IAAW,GAAS,KAAK,wBAAwB,EAAQ,OAAO,wBAChE,IAAY,GAAS,KAAK,yBAAyB,EAAQ,OAAO,yBAClE,IAAa,GAAS,KAAK,0BAA0B,EAAQ,OAAO,0BACpE,IAAe,GAAS,KAAK,4BAA4B,EAAQ,OAAO,4BACxE,IAAgB,GAAS,KAAK,6BAA6B,EAAQ,OAAO;CAEhF,OAAO;EACH,IAAI;EACJ,OAAO;EACP,MAAM;EACN,aAAa;EACb,cAAc;EACd,MAAM;EACN,OAAO,MAAY,IAAS,sBAAqB,CAAC,CAAC,EAAO,SAAS,EAAQ,kBAAkB,CAAC,EAAE;EAChG,WAAW,MAAW;GAIlB,CAHA,GAAA,EAAA,kBAAA,CAAkB,GAAQ,GAAU,GAAW,CAAc,IAC7D,GAAA,EAAA,kBAAA,CAAkB,GAAQ,GAAU,GAAY,CAAc,IAC9D,GAAA,EAAA,kBAAA,CAAkB,GAAQ,GAAU,GAAc,CAAc,IAChE,GAAA,EAAA,kBAAA,CAAkB,GAAQ,GAAU,GAAe,CAAc;EACrE;EACA,IAAI,CACA;GACI,IAAI;GACJ,MAAM;GACN,QAAQ,EAAA,iBAAiB;GACzB,QAAQ;IACJ;KACI,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO,CAAC,EAAA,oBAAoB;KAC5B,WAAW,OAAA,GAAW,EAAA,WAAA,CAAW,GAAQ,CAAS;IACtD;IACA;KACI,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO,CAAC,EAAA,oBAAoB;KAC5B,WAAW,OAAA,GAAW,EAAA,WAAA,CAAW,GAAQ,CAAU;IACvD;IACA;KACI,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO,CAAC,EAAA,oBAAoB;KAC5B,WAAW,OAAA,GAAW,EAAA,WAAA,CAAW,GAAQ,CAAY;IACzD;IACA;KACI,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO,CAAC,EAAA,oBAAoB;KAC5B,WAAW,OAAA,GAAW,EAAA,WAAA,CAAW,GAAQ,CAAa;IAC1D;GACJ;EACJ,CACJ;EACA,KAAK,CAAC,EAAsB,GAAU,GAAS,YAAY,CAAC;CAChE;AACJ"}
@@ -1,19 +1,16 @@
1
- const E = {
2
- red: 241,
3
- green: 241,
4
- blue: 241,
5
- alpha: 1
6
- }, L = {
7
- red: 234,
8
- green: 235,
9
- blue: 235,
10
- alpha: 1
11
- }, A = "1px", D = "24px", _ = "24px";
12
- export {
13
- E as BACKGROUND_COLOR_DEFAULT_VALUE,
14
- L as BORDER_COLOR_DEFAULT_VALUE,
15
- A as BORDER_WIDTH_DEFAULT_VALUE,
16
- _ as MARGIN_DEFAULT_PLACEHOLDER,
17
- D as PADDING_DEFAULT_PLACEHOLDER
18
- };
19
- //# sourceMappingURL=defaultValues.es.js.map
1
+ //#region src/settings/defaultValues.ts
2
+ var e = {
3
+ red: 241,
4
+ green: 241,
5
+ blue: 241,
6
+ alpha: 1
7
+ }, t = {
8
+ red: 234,
9
+ green: 235,
10
+ blue: 235,
11
+ alpha: 1
12
+ }, n = "24px", r = "24px";
13
+ //#endregion
14
+ export { e as BACKGROUND_COLOR_DEFAULT_VALUE, t as BORDER_COLOR_DEFAULT_VALUE, r as MARGIN_DEFAULT_PLACEHOLDER, n as PADDING_DEFAULT_PLACEHOLDER };
15
+
16
+ //# sourceMappingURL=defaultValues.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultValues.es.js","sources":["../../src/settings/defaultValues.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const BACKGROUND_COLOR_DEFAULT_VALUE = {\n red: 241,\n green: 241,\n blue: 241,\n alpha: 1,\n};\n\nexport const BORDER_COLOR_DEFAULT_VALUE = {\n red: 234,\n green: 235,\n blue: 235,\n alpha: 1,\n};\n\nexport const BORDER_WIDTH_DEFAULT_VALUE = '1px';\n\nexport const PADDING_DEFAULT_PLACEHOLDER = '24px';\n\nexport const MARGIN_DEFAULT_PLACEHOLDER = '24px';\n"],"names":["BACKGROUND_COLOR_DEFAULT_VALUE","BORDER_COLOR_DEFAULT_VALUE","BORDER_WIDTH_DEFAULT_VALUE","PADDING_DEFAULT_PLACEHOLDER","MARGIN_DEFAULT_PLACEHOLDER"],"mappings":"AAEO,MAAMA,IAAiC;AAAA,EAC1C,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACX,GAEaC,IAA6B;AAAA,EACtC,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACX,GAEaC,IAA6B,OAE7BC,IAA8B,QAE9BC,IAA6B;"}
1
+ {"version":3,"file":"defaultValues.es.js","names":[],"sources":["../../src/settings/defaultValues.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const BACKGROUND_COLOR_DEFAULT_VALUE = {\n red: 241,\n green: 241,\n blue: 241,\n alpha: 1,\n};\n\nexport const BORDER_COLOR_DEFAULT_VALUE = {\n red: 234,\n green: 235,\n blue: 235,\n alpha: 1,\n};\n\nexport const BORDER_WIDTH_DEFAULT_VALUE = '1px';\n\nexport const PADDING_DEFAULT_PLACEHOLDER = '24px';\n\nexport const MARGIN_DEFAULT_PLACEHOLDER = '24px';\n"],"mappings":";AAEA,IAAa,IAAiC;CAC1C,KAAK;CACL,OAAO;CACP,MAAM;CACN,OAAO;AACX,GAEa,IAA6B;CACtC,KAAK;CACL,OAAO;CACP,MAAM;CACN,OAAO;AACX,GAIa,IAA8B,QAE9B,IAA6B"}