@frontify/guideline-blocks-settings 2.0.0 → 2.0.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 (110) hide show
  1. package/dist/components/Attachments/AttachmentItem.es.js +83 -83
  2. package/dist/components/Attachments/AttachmentItem.es.js.map +1 -1
  3. package/dist/components/Attachments/Attachments.es.js +51 -54
  4. package/dist/components/Attachments/Attachments.es.js.map +1 -1
  5. package/dist/components/BlockInjectButton/BlockInjectButton.es.js +56 -57
  6. package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -1
  7. package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +25 -25
  8. package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
  9. package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js +3 -3
  10. package/dist/components/Link/LinkInput.es.js +35 -35
  11. package/dist/components/Link/LinkInput.es.js.map +1 -1
  12. package/dist/components/Link/LinkSelector/LinkSelector.es.js +31 -31
  13. package/dist/components/Link/LinkSelector/LinkSelector.es.js.map +1 -1
  14. package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js +2 -5
  15. package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js.map +1 -1
  16. package/dist/components/Link/utils/getUrl.es.js +9 -15
  17. package/dist/components/Link/utils/getUrl.es.js.map +1 -1
  18. package/dist/components/RichTextEditor/RichTextEditor.es.js +39 -39
  19. package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
  20. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +24 -25
  21. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -1
  22. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +6 -6
  23. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -1
  24. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +25 -25
  25. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -1
  26. package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +29 -33
  27. package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -1
  28. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +6 -6
  29. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +1 -1
  30. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +22 -23
  31. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -1
  32. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +61 -63
  33. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -1
  34. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +6 -6
  35. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -1
  36. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +6 -7
  37. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +1 -1
  38. package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +21 -21
  39. package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -1
  40. package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js +15 -19
  41. package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js.map +1 -1
  42. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +5 -5
  43. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +13 -13
  44. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -1
  45. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +23 -23
  46. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -1
  47. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +7 -8
  48. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -1
  49. package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +23 -27
  50. package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -1
  51. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +6 -9
  52. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -1
  53. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +24 -28
  54. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -1
  55. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +24 -28
  56. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -1
  57. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +24 -28
  58. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -1
  59. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +24 -28
  60. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -1
  61. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +24 -28
  62. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -1
  63. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +24 -28
  64. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -1
  65. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +24 -28
  66. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -1
  67. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +25 -29
  68. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -1
  69. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +25 -29
  70. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -1
  71. package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +26 -30
  72. package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -1
  73. package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +26 -30
  74. package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -1
  75. package/dist/helpers/customCoordinatesGetterFactory.es.js +18 -18
  76. package/dist/helpers/customCoordinatesGetterFactory.es.js.map +1 -1
  77. package/dist/hooks/useAttachments.es.js +6 -6
  78. package/dist/hooks/useAttachments.es.js.map +1 -1
  79. package/dist/index.cjs.js +7 -7
  80. package/dist/index.cjs.js.map +1 -1
  81. package/dist/index.d.ts +0 -15
  82. package/dist/index.es.js +208 -208
  83. package/dist/index.umd.js +7 -7
  84. package/dist/index.umd.js.map +1 -1
  85. package/dist/settings/background.es.js +4 -4
  86. package/dist/settings/background.es.js.map +1 -1
  87. package/dist/settings/border.es.js +17 -17
  88. package/dist/settings/border.es.js.map +1 -1
  89. package/dist/settings/borderRadius.es.js +12 -15
  90. package/dist/settings/borderRadius.es.js.map +1 -1
  91. package/dist/settings/borderRadiusExtended.es.js +25 -28
  92. package/dist/settings/borderRadiusExtended.es.js.map +1 -1
  93. package/dist/settings/gutter.es.js +17 -20
  94. package/dist/settings/gutter.es.js.map +1 -1
  95. package/dist/settings/margin.es.js +14 -14
  96. package/dist/settings/margin.es.js.map +1 -1
  97. package/dist/settings/marginExtended.es.js +29 -29
  98. package/dist/settings/marginExtended.es.js.map +1 -1
  99. package/dist/settings/padding.es.js +14 -14
  100. package/dist/settings/padding.es.js.map +1 -1
  101. package/dist/settings/paddingExtended.es.js +28 -28
  102. package/dist/settings/paddingExtended.es.js.map +1 -1
  103. package/dist/settings/securityDownloadable.es.js +8 -11
  104. package/dist/settings/securityDownloadable.es.js.map +1 -1
  105. package/dist/styles.css +1 -1
  106. package/dist/utilities/color/getReadableColor.es.js +6 -6
  107. package/dist/utilities/color/getReadableColor.es.js.map +1 -1
  108. package/dist/utilities/color/isDark.es.js +4 -4
  109. package/dist/utilities/color/isDark.es.js.map +1 -1
  110. package/package.json +16 -16
@@ -1 +1 @@
1
- {"version":3,"file":"marginExtended.es.js","sources":["../../src/settings/marginExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MultiInputLayout,\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { MARGIN_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { getMarginSlider } from './margin';\nimport { marginStyleMap } from './types';\n\ntype MarginSettingsType = {\n id?: string;\n};\n\n/**\n * Returns margin settings: margin switch, margin slider, custom margin input for every direction\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns margin settings\n */\nexport const getMarginExtendedSettings = (options?: MarginSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasExtendedCustomMargin_${options?.id}` : 'hasExtendedCustomMargin';\n const valueId = options?.id ? `extendedMarginValues_${options?.id}` : 'extendedMarginValues';\n const choiceId = options?.id ? `extendedMarginChoice_${options?.id}` : 'extendedMarginChoice';\n const topId = options?.id ? `extendedMarginTop_${options?.id}` : 'extendedMarginTop';\n const leftId = options?.id ? `extendedMarginLeft_${options?.id}` : 'extendedMarginLeft';\n const rightId = options?.id ? `extendedMarginRight_${options?.id}` : 'extendedMarginRight';\n const bottomId = options?.id ? `extendedMarginBottom_${options?.id}` : 'extendedMarginBottom';\n\n return {\n id: hasId,\n label: 'Margin',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'The spacing around UI elements to create more negative space',\n onChange: (bundle) => {\n presetCustomValue(bundle, choiceId, topId, marginStyleMap);\n presetCustomValue(bundle, choiceId, leftId, marginStyleMap);\n presetCustomValue(bundle, choiceId, rightId, marginStyleMap);\n presetCustomValue(bundle, choiceId, bottomId, marginStyleMap);\n },\n on: [\n {\n id: valueId,\n type: 'multiInput',\n layout: MultiInputLayout.Spider,\n blocks: [\n {\n id: topId,\n type: 'input',\n label: 'Top',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, topId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: leftId,\n type: 'input',\n label: 'Left',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, leftId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: rightId,\n type: 'input',\n label: 'Right',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, rightId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: bottomId,\n type: 'input',\n label: 'Bottom',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, bottomId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n ],\n },\n ],\n off: [getMarginSlider(choiceId)],\n };\n};\n"],"names":["getMarginExtendedSettings","options","hasId","valueId","choiceId","topId","leftId","rightId","bottomId","bundle","presetCustomValue","marginStyleMap","MultiInputLayout","MARGIN_DEFAULT_PLACEHOLDER","appendUnit","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","getMarginSlider"],"mappings":";;;;;AA0BO,MAAMA,IAA4B,CAACC,MAA+C;AACrF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,2BAA2BA,KAAA,gBAAAA,EAAS,EAAE,KAAK,2BACjEE,IAAUF,KAAA,QAAAA,EAAS,KAAK,wBAAwBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,wBAChEG,IAAWH,KAAA,QAAAA,EAAS,KAAK,wBAAwBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,wBACjEI,IAAQJ,KAAA,QAAAA,EAAS,KAAK,qBAAqBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,qBAC3DK,IAASL,KAAA,QAAAA,EAAS,KAAK,sBAAsBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,sBAC7DM,IAAUN,KAAA,QAAAA,EAAS,KAAK,uBAAuBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,uBAC/DO,IAAWP,KAAA,QAAAA,EAAS,KAAK,wBAAwBA,KAAA,gBAAAA,EAAS,EAAE,KAAK;AAEvE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,UAAU,CAACO,MAAW;AAClB,MAAAC,EAAkBD,GAAQL,GAAUC,GAAOM,CAAc,GACzDD,EAAkBD,GAAQL,GAAUE,GAAQK,CAAc,GAC1DD,EAAkBD,GAAQL,GAAUG,GAASI,CAAc,GAC3DD,EAAkBD,GAAQL,GAAUI,GAAUG,CAAc;AAAA,IAChE;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,aAAaQ;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQJ,CAAK;AAAA,YAC9C,OAAO,CAACU,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIV;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaO;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQH,CAAM;AAAA,YAC/C,OAAO,CAACS,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIT;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaM;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQF,CAAO;AAAA,YAChD,OAAO,CAACQ,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIR;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaK;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAQ;AAAA,YACjD,OAAO,CAACO,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,QACxE;AAAA,MACJ;AAAA,IACJ;AAAA,IAEJ,KAAK,CAACC,EAAgBb,CAAQ,CAAC;AAAA,EAAA;AAEvC;"}
1
+ {"version":3,"file":"marginExtended.es.js","sources":["../../src/settings/marginExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MultiInputLayout,\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { MARGIN_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { getMarginSlider } from './margin';\nimport { marginStyleMap } from './types';\n\ntype MarginSettingsType = {\n id?: string;\n};\n\n/**\n * Returns margin settings: margin switch, margin slider, custom margin input for every direction\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns margin settings\n */\nexport const getMarginExtendedSettings = (options?: MarginSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasExtendedCustomMargin_${options?.id}` : 'hasExtendedCustomMargin';\n const valueId = options?.id ? `extendedMarginValues_${options?.id}` : 'extendedMarginValues';\n const choiceId = options?.id ? `extendedMarginChoice_${options?.id}` : 'extendedMarginChoice';\n const topId = options?.id ? `extendedMarginTop_${options?.id}` : 'extendedMarginTop';\n const leftId = options?.id ? `extendedMarginLeft_${options?.id}` : 'extendedMarginLeft';\n const rightId = options?.id ? `extendedMarginRight_${options?.id}` : 'extendedMarginRight';\n const bottomId = options?.id ? `extendedMarginBottom_${options?.id}` : 'extendedMarginBottom';\n\n return {\n id: hasId,\n label: 'Margin',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'The spacing around UI elements to create more negative space',\n onChange: (bundle) => {\n presetCustomValue(bundle, choiceId, topId, marginStyleMap);\n presetCustomValue(bundle, choiceId, leftId, marginStyleMap);\n presetCustomValue(bundle, choiceId, rightId, marginStyleMap);\n presetCustomValue(bundle, choiceId, bottomId, marginStyleMap);\n },\n on: [\n {\n id: valueId,\n type: 'multiInput',\n layout: MultiInputLayout.Spider,\n blocks: [\n {\n id: topId,\n type: 'input',\n label: 'Top',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, topId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: leftId,\n type: 'input',\n label: 'Left',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, leftId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: rightId,\n type: 'input',\n label: 'Right',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, rightId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: bottomId,\n type: 'input',\n label: 'Bottom',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, bottomId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n ],\n },\n ],\n off: [getMarginSlider(choiceId)],\n };\n};\n"],"names":["getMarginExtendedSettings","options","hasId","valueId","choiceId","topId","leftId","rightId","bottomId","bundle","presetCustomValue","marginStyleMap","MultiInputLayout","MARGIN_DEFAULT_PLACEHOLDER","appendUnit","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","getMarginSlider"],"mappings":";;;;;AA0BO,MAAMA,IAA4B,CAACC,MAA+C;AACrF,QAAMC,IAAQD,GAAS,KAAK,2BAA2BA,GAAS,EAAE,KAAK,2BACjEE,IAAUF,GAAS,KAAK,wBAAwBA,GAAS,EAAE,KAAK,wBAChEG,IAAWH,GAAS,KAAK,wBAAwBA,GAAS,EAAE,KAAK,wBACjEI,IAAQJ,GAAS,KAAK,qBAAqBA,GAAS,EAAE,KAAK,qBAC3DK,IAASL,GAAS,KAAK,sBAAsBA,GAAS,EAAE,KAAK,sBAC7DM,IAAUN,GAAS,KAAK,uBAAuBA,GAAS,EAAE,KAAK,uBAC/DO,IAAWP,GAAS,KAAK,wBAAwBA,GAAS,EAAE,KAAK;AAEvE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,UAAU,CAACO,MAAW;AAClB,MAAAC,EAAkBD,GAAQL,GAAUC,GAAOM,CAAc,GACzDD,EAAkBD,GAAQL,GAAUE,GAAQK,CAAc,GAC1DD,EAAkBD,GAAQL,GAAUG,GAASI,CAAc,GAC3DD,EAAkBD,GAAQL,GAAUI,GAAUG,CAAc;AAAA,IAChE;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,aAAaQ;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQJ,CAAK;AAAA,YAC9C,OAAO,CAACU,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIV;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaO;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQH,CAAM;AAAA,YAC/C,OAAO,CAACS,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIT;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaM;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQF,CAAO;AAAA,YAChD,OAAO,CAACQ,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIR;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaK;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAQ;AAAA,YACjD,OAAO,CAACO,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,QACxE;AAAA,MACJ;AAAA,IACJ;AAAA,IAEJ,KAAK,CAACC,EAAgBb,CAAQ,CAAC;AAAA,EAAA;AAEvC;"}
@@ -1,8 +1,8 @@
1
1
  /* empty css */
2
- import { appendUnit as m, numericalOrPixelRule as g, maximumNumericalOrPixelOrAutoRule as c, presetCustomValue as h } from "@frontify/sidebar-settings";
3
- import { PADDING_DEFAULT_PLACEHOLDER as C } from "./defaultValues.es.js";
4
- import { Padding as a, paddingStyleMap as P } from "./types.es.js";
5
- const f = (e) => ({
2
+ import { numericalOrPixelRule as n, appendUnit as u, maximumNumericalOrPixelOrAutoRule as r, presetCustomValue as o } from "@frontify/sidebar-settings";
3
+ import { PADDING_DEFAULT_PLACEHOLDER as m } from "./defaultValues.es.js";
4
+ import { Padding as a, paddingStyleMap as g } from "./types.es.js";
5
+ const c = (e) => ({
6
6
  id: e,
7
7
  type: "segmentedControls",
8
8
  defaultValue: a.Small,
@@ -24,30 +24,30 @@ const f = (e) => ({
24
24
  label: "L"
25
25
  }
26
26
  ]
27
- }), v = (e) => {
28
- const r = e != null && e.id ? `hasCustomPaddingValue_${e == null ? void 0 : e.id}` : "hasCustomPaddingValue", l = e != null && e.id ? `paddingValue_${e == null ? void 0 : e.id}` : "paddingValue", u = e != null && e.id ? `paddingChoice_${e == null ? void 0 : e.id}` : "paddingChoice";
27
+ }), P = (e) => {
28
+ const t = e?.id ? `hasCustomPaddingValue_${e?.id}` : "hasCustomPaddingValue", l = e?.id ? `paddingValue_${e?.id}` : "paddingValue", i = e?.id ? `paddingChoice_${e?.id}` : "paddingChoice";
29
29
  return {
30
- id: r,
30
+ id: t,
31
31
  label: "Padding",
32
32
  type: "switch",
33
33
  switchLabel: "Custom",
34
34
  defaultValue: !1,
35
35
  info: "The spacing around UI elements to create more negative space",
36
- onChange: (d) => h(d, u, l, (e == null ? void 0 : e.paddingStyleMap) || P),
36
+ onChange: (d) => o(d, i, l, e?.paddingStyleMap || g),
37
37
  on: [
38
38
  {
39
39
  id: l,
40
40
  type: "input",
41
- placeholder: C,
42
- rules: [g, c(500)],
43
- onChange: (d) => m(d, l)
41
+ placeholder: m,
42
+ rules: [n, r(500)],
43
+ onChange: (d) => u(d, l)
44
44
  }
45
45
  ],
46
- off: [f(u)]
46
+ off: [c(i)]
47
47
  };
48
48
  };
49
49
  export {
50
- v as getPaddingSettings,
51
- f as getPaddingSlider
50
+ P as getPaddingSettings,
51
+ c as getPaddingSlider
52
52
  };
53
53
  //# sourceMappingURL=padding.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"padding.es.js","sources":["../../src/settings/padding.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { PADDING_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { Padding, paddingStyleMap } from './types';\n\ntype PaddingSettingsType = {\n id?: string;\n paddingStyleMap?: Record<Padding, string>;\n};\n\n/**\n * Returns padding settings: padding switch, padding slider, custom padding input\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns padding settings\n */\nexport const getPaddingSlider = (id: string): SettingBlock => ({\n id,\n type: 'segmentedControls',\n defaultValue: Padding.Small,\n choices: [\n {\n value: Padding.None,\n label: 'None',\n },\n {\n value: Padding.Small,\n label: 'S',\n },\n {\n value: Padding.Medium,\n label: 'M',\n },\n {\n value: Padding.Large,\n label: 'L',\n },\n ],\n});\n\nexport const getPaddingSettings = (options?: PaddingSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasCustomPaddingValue_${options?.id}` : 'hasCustomPaddingValue';\n const valueId = options?.id ? `paddingValue_${options?.id}` : 'paddingValue';\n const choiceId = options?.id ? `paddingChoice_${options?.id}` : 'paddingChoice';\n\n return {\n id: hasId,\n label: 'Padding',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'The spacing around UI elements to create more negative space',\n onChange: (bundle) => presetCustomValue(bundle, choiceId, valueId, options?.paddingStyleMap || paddingStyleMap),\n on: [\n {\n id: valueId,\n type: 'input',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n onChange: (bundle) => appendUnit(bundle, valueId),\n },\n ],\n off: [getPaddingSlider(choiceId)],\n };\n};\n"],"names":["getPaddingSlider","id","Padding","getPaddingSettings","options","hasId","valueId","choiceId","bundle","presetCustomValue","paddingStyleMap","PADDING_DEFAULT_PLACEHOLDER","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","appendUnit"],"mappings":";;;;AAyBO,MAAMA,IAAmB,CAACC,OAA8B;AAAA,EAC3D,IAAAA;AAAA,EACA,MAAM;AAAA,EACN,cAAcC,EAAQ;AAAA,EACtB,SAAS;AAAA,IACL;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACX;AAER,IAEaC,IAAqB,CAACC,MAAgD;AAC/E,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,yBAAyBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,yBAC/DE,IAAUF,KAAA,QAAAA,EAAS,KAAK,gBAAgBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,gBACxDG,IAAWH,KAAA,QAAAA,EAAS,KAAK,iBAAiBA,KAAA,gBAAAA,EAAS,EAAE,KAAK;AAEhE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,UAAU,CAACG,MAAWC,EAAkBD,GAAQD,GAAUD,IAASF,KAAA,gBAAAA,EAAS,oBAAmBM,CAAe;AAAA,IAC9G,IAAI;AAAA,MACA;AAAA,QACI,IAAIJ;AAAA,QACJ,MAAM;AAAA,QACN,aAAaK;AAAA,QACb,OAAO,CAACC,GAAsBC,EAAkC,GAAG,CAAC;AAAA,QACpE,UAAU,CAACL,MAAWM,EAAWN,GAAQF,CAAO;AAAA,MAAA;AAAA,IACpD;AAAA,IAEJ,KAAK,CAACN,EAAiBO,CAAQ,CAAC;AAAA,EAAA;AAExC;"}
1
+ {"version":3,"file":"padding.es.js","sources":["../../src/settings/padding.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { PADDING_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { Padding, paddingStyleMap } from './types';\n\ntype PaddingSettingsType = {\n id?: string;\n paddingStyleMap?: Record<Padding, string>;\n};\n\n/**\n * Returns padding settings: padding switch, padding slider, custom padding input\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns padding settings\n */\nexport const getPaddingSlider = (id: string): SettingBlock => ({\n id,\n type: 'segmentedControls',\n defaultValue: Padding.Small,\n choices: [\n {\n value: Padding.None,\n label: 'None',\n },\n {\n value: Padding.Small,\n label: 'S',\n },\n {\n value: Padding.Medium,\n label: 'M',\n },\n {\n value: Padding.Large,\n label: 'L',\n },\n ],\n});\n\nexport const getPaddingSettings = (options?: PaddingSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasCustomPaddingValue_${options?.id}` : 'hasCustomPaddingValue';\n const valueId = options?.id ? `paddingValue_${options?.id}` : 'paddingValue';\n const choiceId = options?.id ? `paddingChoice_${options?.id}` : 'paddingChoice';\n\n return {\n id: hasId,\n label: 'Padding',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'The spacing around UI elements to create more negative space',\n onChange: (bundle) => presetCustomValue(bundle, choiceId, valueId, options?.paddingStyleMap || paddingStyleMap),\n on: [\n {\n id: valueId,\n type: 'input',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n onChange: (bundle) => appendUnit(bundle, valueId),\n },\n ],\n off: [getPaddingSlider(choiceId)],\n };\n};\n"],"names":["getPaddingSlider","id","Padding","getPaddingSettings","options","hasId","valueId","choiceId","bundle","presetCustomValue","paddingStyleMap","PADDING_DEFAULT_PLACEHOLDER","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","appendUnit"],"mappings":";;;;AAyBO,MAAMA,IAAmB,CAACC,OAA8B;AAAA,EAC3D,IAAAA;AAAA,EACA,MAAM;AAAA,EACN,cAAcC,EAAQ;AAAA,EACtB,SAAS;AAAA,IACL;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,IAEX;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACX;AAER,IAEaC,IAAqB,CAACC,MAAgD;AAC/E,QAAMC,IAAQD,GAAS,KAAK,yBAAyBA,GAAS,EAAE,KAAK,yBAC/DE,IAAUF,GAAS,KAAK,gBAAgBA,GAAS,EAAE,KAAK,gBACxDG,IAAWH,GAAS,KAAK,iBAAiBA,GAAS,EAAE,KAAK;AAEhE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,UAAU,CAACG,MAAWC,EAAkBD,GAAQD,GAAUD,GAASF,GAAS,mBAAmBM,CAAe;AAAA,IAC9G,IAAI;AAAA,MACA;AAAA,QACI,IAAIJ;AAAA,QACJ,MAAM;AAAA,QACN,aAAaK;AAAA,QACb,OAAO,CAACC,GAAsBC,EAAkC,GAAG,CAAC;AAAA,QACpE,UAAU,CAACL,MAAWM,EAAWN,GAAQF,CAAO;AAAA,MAAA;AAAA,IACpD;AAAA,IAEJ,KAAK,CAACN,EAAiBO,CAAQ,CAAC;AAAA,EAAA;AAExC;"}
@@ -1,65 +1,65 @@
1
1
  /* empty css */
2
- import { numericalOrPixelRule as l, maximumNumericalOrPixelOrAutoRule as g, appendUnit as r, MultiInputLayout as I, presetCustomValue as u } from "@frontify/sidebar-settings";
3
- import { PADDING_DEFAULT_PLACEHOLDER as m } from "./defaultValues.es.js";
4
- import { getPaddingSlider as y } from "./padding.es.js";
5
- import { paddingStyleMap as c } from "./types.es.js";
6
- const b = (e) => {
7
- const t = e != null && e.id ? `hasExtendedCustomPadding_${e == null ? void 0 : e.id}` : "hasExtendedCustomPadding", C = e != null && e.id ? `extendedPaddingValues_${e == null ? void 0 : e.id}` : "extendedPaddingValues", a = e != null && e.id ? `extendedPaddingChoice_${e == null ? void 0 : e.id}` : "extendedPaddingChoice", h = e != null && e.id ? `extendedPaddingTop_${e == null ? void 0 : e.id}` : "extendedPaddingTop", P = e != null && e.id ? `extendedPaddingLeft_${e == null ? void 0 : e.id}` : "extendedPaddingLeft", x = e != null && e.id ? `extendedPaddingRight_${e == null ? void 0 : e.id}` : "extendedPaddingRight", f = e != null && e.id ? `extendedPaddingBottom_${e == null ? void 0 : e.id}` : "extendedPaddingBottom";
2
+ import { numericalOrPixelRule as i, MultiInputLayout as P, maximumNumericalOrPixelOrAutoRule as a, appendUnit as n, presetCustomValue as l } from "@frontify/sidebar-settings";
3
+ import { PADDING_DEFAULT_PLACEHOLDER as g } from "./defaultValues.es.js";
4
+ import { getPaddingSlider as x } from "./padding.es.js";
5
+ import { paddingStyleMap as r } from "./types.es.js";
6
+ const _ = (e) => {
7
+ const h = e?.id ? `hasExtendedCustomPadding_${e?.id}` : "hasExtendedCustomPadding", p = e?.id ? `extendedPaddingValues_${e?.id}` : "extendedPaddingValues", t = e?.id ? `extendedPaddingChoice_${e?.id}` : "extendedPaddingChoice", o = e?.id ? `extendedPaddingTop_${e?.id}` : "extendedPaddingTop", u = e?.id ? `extendedPaddingLeft_${e?.id}` : "extendedPaddingLeft", m = e?.id ? `extendedPaddingRight_${e?.id}` : "extendedPaddingRight", c = e?.id ? `extendedPaddingBottom_${e?.id}` : "extendedPaddingBottom";
8
8
  return {
9
- id: t,
9
+ id: h,
10
10
  label: "Padding",
11
11
  type: "switch",
12
12
  switchLabel: "Custom",
13
13
  defaultValue: !1,
14
14
  info: "The spacing around UI elements to create more negative space",
15
15
  onChange: (d) => {
16
- u(d, a, h, c), u(d, a, P, c), u(d, a, x, c), u(d, a, f, c);
16
+ l(d, t, o, r), l(d, t, u, r), l(d, t, m, r), l(d, t, c, r);
17
17
  },
18
18
  on: [
19
19
  {
20
- id: C,
20
+ id: p,
21
21
  type: "multiInput",
22
- layout: I.Spider,
22
+ layout: P.Spider,
23
23
  blocks: [
24
24
  {
25
- id: h,
25
+ id: o,
26
26
  type: "input",
27
27
  label: "Top",
28
- placeholder: m,
29
- onChange: (d) => r(d, h),
30
- rules: [l, g(500)]
28
+ placeholder: g,
29
+ onChange: (d) => n(d, o),
30
+ rules: [i, a(500)]
31
31
  },
32
32
  {
33
- id: P,
33
+ id: u,
34
34
  type: "input",
35
35
  label: "Left",
36
- placeholder: m,
37
- onChange: (d) => r(d, P),
38
- rules: [l, g(500)]
36
+ placeholder: g,
37
+ onChange: (d) => n(d, u),
38
+ rules: [i, a(500)]
39
39
  },
40
40
  {
41
- id: x,
41
+ id: m,
42
42
  type: "input",
43
43
  label: "Right",
44
- placeholder: m,
45
- onChange: (d) => r(d, x),
46
- rules: [l, g(500)]
44
+ placeholder: g,
45
+ onChange: (d) => n(d, m),
46
+ rules: [i, a(500)]
47
47
  },
48
48
  {
49
- id: f,
49
+ id: c,
50
50
  type: "input",
51
51
  label: "Bottom",
52
- placeholder: m,
53
- onChange: (d) => r(d, f),
54
- rules: [l, g(500)]
52
+ placeholder: g,
53
+ onChange: (d) => n(d, c),
54
+ rules: [i, a(500)]
55
55
  }
56
56
  ]
57
57
  }
58
58
  ],
59
- off: [y(a)]
59
+ off: [x(t)]
60
60
  };
61
61
  };
62
62
  export {
63
- b as getPaddingExtendedSettings
63
+ _ as getPaddingExtendedSettings
64
64
  };
65
65
  //# sourceMappingURL=paddingExtended.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paddingExtended.es.js","sources":["../../src/settings/paddingExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MultiInputLayout,\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { PADDING_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { getPaddingSlider } from './padding';\nimport { paddingStyleMap } from './types';\n\ntype PaddingSettingsType = {\n id?: string;\n};\n\n/**\n * Returns padding settings: padding switch, padding slider, custom padding input for every direction\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns padding settings\n */\nexport const getPaddingExtendedSettings = (options?: PaddingSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasExtendedCustomPadding_${options?.id}` : 'hasExtendedCustomPadding';\n const valueId = options?.id ? `extendedPaddingValues_${options?.id}` : 'extendedPaddingValues';\n const choiceId = options?.id ? `extendedPaddingChoice_${options?.id}` : 'extendedPaddingChoice';\n const topId = options?.id ? `extendedPaddingTop_${options?.id}` : 'extendedPaddingTop';\n const leftId = options?.id ? `extendedPaddingLeft_${options?.id}` : 'extendedPaddingLeft';\n const rightId = options?.id ? `extendedPaddingRight_${options?.id}` : 'extendedPaddingRight';\n const bottomId = options?.id ? `extendedPaddingBottom_${options?.id}` : 'extendedPaddingBottom';\n\n return {\n id: hasId,\n label: 'Padding',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'The spacing around UI elements to create more negative space',\n onChange: (bundle) => {\n presetCustomValue(bundle, choiceId, topId, paddingStyleMap);\n presetCustomValue(bundle, choiceId, leftId, paddingStyleMap);\n presetCustomValue(bundle, choiceId, rightId, paddingStyleMap);\n presetCustomValue(bundle, choiceId, bottomId, paddingStyleMap);\n },\n on: [\n {\n id: valueId,\n type: 'multiInput',\n layout: MultiInputLayout.Spider,\n blocks: [\n {\n id: topId,\n type: 'input',\n label: 'Top',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, topId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: leftId,\n type: 'input',\n label: 'Left',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, leftId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: rightId,\n type: 'input',\n label: 'Right',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, rightId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: bottomId,\n type: 'input',\n label: 'Bottom',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, bottomId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n ],\n },\n ],\n off: [getPaddingSlider(choiceId)],\n };\n};\n"],"names":["getPaddingExtendedSettings","options","hasId","valueId","choiceId","topId","leftId","rightId","bottomId","bundle","presetCustomValue","paddingStyleMap","MultiInputLayout","PADDING_DEFAULT_PLACEHOLDER","appendUnit","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","getPaddingSlider"],"mappings":";;;;;AA0BO,MAAMA,IAA6B,CAACC,MAAgD;AACvF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,4BAA4BA,KAAA,gBAAAA,EAAS,EAAE,KAAK,4BAClEE,IAAUF,KAAA,QAAAA,EAAS,KAAK,yBAAyBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,yBACjEG,IAAWH,KAAA,QAAAA,EAAS,KAAK,yBAAyBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,yBAClEI,IAAQJ,KAAA,QAAAA,EAAS,KAAK,sBAAsBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,sBAC5DK,IAASL,KAAA,QAAAA,EAAS,KAAK,uBAAuBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,uBAC9DM,IAAUN,KAAA,QAAAA,EAAS,KAAK,wBAAwBA,KAAA,gBAAAA,EAAS,EAAE,KAAK,wBAChEO,IAAWP,KAAA,QAAAA,EAAS,KAAK,yBAAyBA,KAAA,gBAAAA,EAAS,EAAE,KAAK;AAExE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,UAAU,CAACO,MAAW;AAClB,MAAAC,EAAkBD,GAAQL,GAAUC,GAAOM,CAAe,GAC1DD,EAAkBD,GAAQL,GAAUE,GAAQK,CAAe,GAC3DD,EAAkBD,GAAQL,GAAUG,GAASI,CAAe,GAC5DD,EAAkBD,GAAQL,GAAUI,GAAUG,CAAe;AAAA,IACjE;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,aAAaQ;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQJ,CAAK;AAAA,YAC9C,OAAO,CAACU,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIV;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaO;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQH,CAAM;AAAA,YAC/C,OAAO,CAACS,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIT;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaM;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQF,CAAO;AAAA,YAChD,OAAO,CAACQ,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIR;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaK;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAQ;AAAA,YACjD,OAAO,CAACO,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,QACxE;AAAA,MACJ;AAAA,IACJ;AAAA,IAEJ,KAAK,CAACC,EAAiBb,CAAQ,CAAC;AAAA,EAAA;AAExC;"}
1
+ {"version":3,"file":"paddingExtended.es.js","sources":["../../src/settings/paddingExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MultiInputLayout,\n type SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\n\nimport { PADDING_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { getPaddingSlider } from './padding';\nimport { paddingStyleMap } from './types';\n\ntype PaddingSettingsType = {\n id?: string;\n};\n\n/**\n * Returns padding settings: padding switch, padding slider, custom padding input for every direction\n *\n * @param options Options for the settings\n * @param options.id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns padding settings\n */\nexport const getPaddingExtendedSettings = (options?: PaddingSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasExtendedCustomPadding_${options?.id}` : 'hasExtendedCustomPadding';\n const valueId = options?.id ? `extendedPaddingValues_${options?.id}` : 'extendedPaddingValues';\n const choiceId = options?.id ? `extendedPaddingChoice_${options?.id}` : 'extendedPaddingChoice';\n const topId = options?.id ? `extendedPaddingTop_${options?.id}` : 'extendedPaddingTop';\n const leftId = options?.id ? `extendedPaddingLeft_${options?.id}` : 'extendedPaddingLeft';\n const rightId = options?.id ? `extendedPaddingRight_${options?.id}` : 'extendedPaddingRight';\n const bottomId = options?.id ? `extendedPaddingBottom_${options?.id}` : 'extendedPaddingBottom';\n\n return {\n id: hasId,\n label: 'Padding',\n type: 'switch',\n switchLabel: 'Custom',\n defaultValue: false,\n info: 'The spacing around UI elements to create more negative space',\n onChange: (bundle) => {\n presetCustomValue(bundle, choiceId, topId, paddingStyleMap);\n presetCustomValue(bundle, choiceId, leftId, paddingStyleMap);\n presetCustomValue(bundle, choiceId, rightId, paddingStyleMap);\n presetCustomValue(bundle, choiceId, bottomId, paddingStyleMap);\n },\n on: [\n {\n id: valueId,\n type: 'multiInput',\n layout: MultiInputLayout.Spider,\n blocks: [\n {\n id: topId,\n type: 'input',\n label: 'Top',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, topId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: leftId,\n type: 'input',\n label: 'Left',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, leftId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: rightId,\n type: 'input',\n label: 'Right',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, rightId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n {\n id: bottomId,\n type: 'input',\n label: 'Bottom',\n placeholder: PADDING_DEFAULT_PLACEHOLDER,\n onChange: (bundle) => appendUnit(bundle, bottomId),\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n },\n ],\n },\n ],\n off: [getPaddingSlider(choiceId)],\n };\n};\n"],"names":["getPaddingExtendedSettings","options","hasId","valueId","choiceId","topId","leftId","rightId","bottomId","bundle","presetCustomValue","paddingStyleMap","MultiInputLayout","PADDING_DEFAULT_PLACEHOLDER","appendUnit","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","getPaddingSlider"],"mappings":";;;;;AA0BO,MAAMA,IAA6B,CAACC,MAAgD;AACvF,QAAMC,IAAQD,GAAS,KAAK,4BAA4BA,GAAS,EAAE,KAAK,4BAClEE,IAAUF,GAAS,KAAK,yBAAyBA,GAAS,EAAE,KAAK,yBACjEG,IAAWH,GAAS,KAAK,yBAAyBA,GAAS,EAAE,KAAK,yBAClEI,IAAQJ,GAAS,KAAK,sBAAsBA,GAAS,EAAE,KAAK,sBAC5DK,IAASL,GAAS,KAAK,uBAAuBA,GAAS,EAAE,KAAK,uBAC9DM,IAAUN,GAAS,KAAK,wBAAwBA,GAAS,EAAE,KAAK,wBAChEO,IAAWP,GAAS,KAAK,yBAAyBA,GAAS,EAAE,KAAK;AAExE,SAAO;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,UAAU,CAACO,MAAW;AAClB,MAAAC,EAAkBD,GAAQL,GAAUC,GAAOM,CAAe,GAC1DD,EAAkBD,GAAQL,GAAUE,GAAQK,CAAe,GAC3DD,EAAkBD,GAAQL,GAAUG,GAASI,CAAe,GAC5DD,EAAkBD,GAAQL,GAAUI,GAAUG,CAAe;AAAA,IACjE;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,aAAaQ;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQJ,CAAK;AAAA,YAC9C,OAAO,CAACU,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIV;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaO;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQH,CAAM;AAAA,YAC/C,OAAO,CAACS,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIT;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaM;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQF,CAAO;AAAA,YAChD,OAAO,CAACQ,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,UAExE;AAAA,YACI,IAAIR;AAAA,YACJ,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaK;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAQ;AAAA,YACjD,OAAO,CAACO,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UAAA;AAAA,QACxE;AAAA,MACJ;AAAA,IACJ;AAAA,IAEJ,KAAK,CAACC,EAAiBb,CAAQ,CAAC;AAAA,EAAA;AAExC;"}
@@ -1,19 +1,16 @@
1
- import { Security as t } from "./types.es.js";
2
- const c = (e) => {
3
- const r = d(e == null ? void 0 : e.globalControlId);
1
+ import { Security as o } from "./types.es.js";
2
+ const d = (e) => {
3
+ const t = r(e?.globalControlId);
4
4
  return {
5
- id: e != null && e.id ? e.id : "downloadable",
5
+ id: e?.id ? e.id : "downloadable",
6
6
  type: "switch",
7
7
  defaultValue: !1,
8
8
  label: "Downloadable",
9
- show: (a) => {
10
- var l;
11
- return ((l = a.getBlock(r)) == null ? void 0 : l.value) === t.Custom;
12
- }
9
+ show: (l) => l.getBlock(t)?.value === o.Custom
13
10
  };
14
- }, d = (e) => e || "security";
11
+ }, r = (e) => e || "security";
15
12
  export {
16
- c as getSecurityDownloadableSetting,
17
- d as getSecurityGlobalControlId
13
+ d as getSecurityDownloadableSetting,
14
+ r as getSecurityGlobalControlId
18
15
  };
19
16
  //# sourceMappingURL=securityDownloadable.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"securityDownloadable.es.js","sources":["../../src/settings/securityDownloadable.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type SettingBlock } from '..';\n\nimport { Security } from './types';\n\n/**\n * Returns the downloadable security settings.\n *\n * @param {string} id custom id for the setting block\n * @param {string} globalControlId custom id for the global control setting block\n *\n * @returns {SettingBlock} Returns downloadable security settings.\n */\n\ntype SecurityDownloadableSettingType = {\n id?: string;\n globalControlId?: string;\n};\n\nexport const getSecurityDownloadableSetting = (options?: SecurityDownloadableSettingType): SettingBlock => {\n const securityId = getSecurityGlobalControlId(options?.globalControlId);\n return {\n id: options?.id ? options.id : 'downloadable',\n type: 'switch',\n defaultValue: false,\n label: 'Downloadable',\n show: (bundle) => bundle.getBlock(securityId)?.value === Security.Custom,\n };\n};\n\nexport const getSecurityGlobalControlId = (id?: string): string => {\n return id || 'security';\n};\n"],"names":["getSecurityDownloadableSetting","options","securityId","getSecurityGlobalControlId","bundle","_a","Security","id"],"mappings":";AAoBO,MAAMA,IAAiC,CAACC,MAA4D;AACvG,QAAMC,IAAaC,EAA2BF,KAAA,gBAAAA,EAAS,eAAe;AACtE,SAAO;AAAA,IACH,IAAIA,KAAA,QAAAA,EAAS,KAAKA,EAAQ,KAAK;AAAA,IAC/B,MAAM;AAAA,IACN,cAAc;AAAA,IACd,OAAO;AAAA,IACP,MAAM,CAACG;;AAAW,eAAAC,IAAAD,EAAO,SAASF,CAAU,MAA1B,gBAAAG,EAA6B,WAAUC,EAAS;AAAA;AAAA,EAAA;AAE1E,GAEaH,IAA6B,CAACI,MAChCA,KAAM;"}
1
+ {"version":3,"file":"securityDownloadable.es.js","sources":["../../src/settings/securityDownloadable.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type SettingBlock } from '..';\n\nimport { Security } from './types';\n\n/**\n * Returns the downloadable security settings.\n *\n * @param {string} id custom id for the setting block\n * @param {string} globalControlId custom id for the global control setting block\n *\n * @returns {SettingBlock} Returns downloadable security settings.\n */\n\ntype SecurityDownloadableSettingType = {\n id?: string;\n globalControlId?: string;\n};\n\nexport const getSecurityDownloadableSetting = (options?: SecurityDownloadableSettingType): SettingBlock => {\n const securityId = getSecurityGlobalControlId(options?.globalControlId);\n return {\n id: options?.id ? options.id : 'downloadable',\n type: 'switch',\n defaultValue: false,\n label: 'Downloadable',\n show: (bundle) => bundle.getBlock(securityId)?.value === Security.Custom,\n };\n};\n\nexport const getSecurityGlobalControlId = (id?: string): string => {\n return id || 'security';\n};\n"],"names":["getSecurityDownloadableSetting","options","securityId","getSecurityGlobalControlId","bundle","Security","id"],"mappings":";AAoBO,MAAMA,IAAiC,CAACC,MAA4D;AACvG,QAAMC,IAAaC,EAA2BF,GAAS,eAAe;AACtE,SAAO;AAAA,IACH,IAAIA,GAAS,KAAKA,EAAQ,KAAK;AAAA,IAC/B,MAAM;AAAA,IACN,cAAc;AAAA,IACd,OAAO;AAAA,IACP,MAAM,CAACG,MAAWA,EAAO,SAASF,CAAU,GAAG,UAAUG,EAAS;AAAA,EAAA;AAE1E,GAEaF,IAA6B,CAACG,MAChCA,KAAM;"}