@frontify/guideline-blocks-settings 0.28.1 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/components/Attachments/AttachmentItem.es.js +78 -78
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -1
- package/dist/components/Attachments/Attachments.es.js +86 -86
- package/dist/components/Attachments/Attachments.es.js.map +1 -1
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js +68 -68
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +34 -34
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar.es.js +33 -33
- package/dist/components/BlockItemWrapper/Toolbar.es.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.es.js +12 -12
- package/dist/components/DownloadButton/DownloadButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.es.js +22 -22
- package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
- package/dist/components/RichTextEditor/SerializedText.es.js +8 -8
- package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -1
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +13 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +8 -8
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +6 -6
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +10 -10
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +13 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js +10 -10
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js +13 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +19 -19
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +30 -30
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js +7 -7
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +30 -30
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +8 -8
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +11 -11
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +15 -15
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +30 -30
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +3 -3
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +40 -40
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +7 -7
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +29 -29
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +10 -10
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +4 -4
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +20 -20
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +18 -18
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +16 -16
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +19 -19
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +15 -15
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js +34 -34
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js +28 -28
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js +36 -36
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js +30 -30
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/button.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js +5 -5
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js +1 -1
- package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js.map +1 -1
- package/dist/helpers/addHttps.es.js.map +1 -1
- package/dist/helpers/customCoordinatesGetterFactory.es.js.map +1 -1
- package/dist/helpers/hasRichTextValue.es.js.map +1 -1
- package/dist/hooks/useAttachments.es.js.map +1 -1
- package/dist/hooks/useDndSensors.es.js.map +1 -1
- package/dist/index.cjs.js +13 -246
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +13 -246
- package/dist/index.umd.js.map +1 -1
- package/dist/settings/background.es.js.map +1 -1
- package/dist/settings/border.es.js +1 -1
- package/dist/settings/border.es.js.map +1 -1
- package/dist/settings/borderRadius.es.js +1 -1
- package/dist/settings/borderRadius.es.js.map +1 -1
- package/dist/settings/borderRadiusExtended.es.js +1 -1
- package/dist/settings/borderRadiusExtended.es.js.map +1 -1
- package/dist/settings/gutter.es.js +1 -1
- package/dist/settings/margin.es.js +1 -1
- package/dist/settings/margin.es.js.map +1 -1
- package/dist/settings/marginExtended.es.js +1 -1
- package/dist/settings/marginExtended.es.js.map +1 -1
- package/dist/settings/padding.es.js +1 -1
- package/dist/settings/padding.es.js.map +1 -1
- package/dist/settings/paddingExtended.es.js +1 -1
- package/dist/settings/paddingExtended.es.js.map +1 -1
- package/dist/settings/securityGlobalControl.es.js +1 -1
- package/dist/styles.css +1 -0
- package/dist/styles.css.es.js +5 -0
- package/dist/styles.css.es.js.map +1 -0
- package/dist/utilities/moveItemInArray.es.js.map +1 -1
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -1
- package/dist/utilities/react/getBorderStyles.es.js.map +1 -1
- package/dist/utilities/react/getRadiusStyles.es.js.map +1 -1
- package/package.json +26 -24
- package/src/components/Attachments/AttachmentItem.tsx +2 -2
- package/src/components/Attachments/Attachments.spec.ct.tsx +4 -4
- package/src/components/Attachments/Attachments.tsx +2 -2
- package/src/components/BlockInjectButton/BlockInjectButton.spec.ct.tsx +2 -2
- package/src/components/BlockItemWrapper/BlockItemWrapper.spec.ct.tsx +8 -8
- package/src/components/BlockItemWrapper/Toolbar.tsx +1 -1
- package/src/components/RichTextEditor/RichTextEditor.spec.ct.tsx +8 -8
- package/src/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.tsx +2 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.tsx +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.tsx +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +3 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.ts +2 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.ts +5 -5
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.ts +2 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/withButton.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.tsx +2 -2
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkButton.tsx +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/index.ts +2 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.spec.ts +24 -27
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/styles.ts +1 -1
- package/src/components/RichTextEditor/serializer/nodes/button.ts +2 -1
- package/src/components/RichTextEditor/serializer/nodes/checkItemNode.ts +3 -2
- package/src/components/RichTextEditor/serializer/nodes/default.ts +5 -4
- package/src/components/RichTextEditor/serializer/nodes/link.ts +4 -3
- package/src/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.ts +5 -5
- package/src/components/RichTextEditor/serializer/serializeToHtml.ts +2 -2
- package/src/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.ts +1 -1
- package/src/hooks/useAttachments.ts +1 -1
- package/src/hooks/useDndSensors.ts +1 -1
- package/src/index.ts +3 -3
- package/src/settings/background.spec.ts +1 -1
- package/src/settings/border.spec.ts +1 -1
- package/src/settings/borderRadiusExtended.spec.ts +4 -4
- package/src/settings/marginExtended.spec.ts +4 -4
- package/src/settings/paddingExtended.spec.ts +4 -4
- package/src/styles.css +3 -0
- package/src/utilities/react/getBackgroundColorStyles.ts +2 -3
- package/src/utilities/react/getBorderStyles.ts +3 -4
- package/src/utilities/react/getRadiusStyles.ts +1 -1
- package/vite.config.ts +25 -3
- package/dist/_virtual/_commonjsHelpers.es.js +0 -7
- package/dist/_virtual/_commonjsHelpers.es.js.map +0 -1
- package/dist/_virtual/index.es.js +0 -5
- package/dist/_virtual/index.es.js.map +0 -1
- package/dist/_virtual/index.es2.js +0 -5
- package/dist/_virtual/index.es2.js.map +0 -1
- package/dist/_virtual/index.es3.js +0 -5
- package/dist/_virtual/index.es3.js.map +0 -1
- package/dist/_virtual/jsx-runtime.es.js +0 -5
- package/dist/_virtual/jsx-runtime.es.js.map +0 -1
- package/dist/_virtual/react-dom.development.es.js +0 -5
- package/dist/_virtual/react-dom.development.es.js.map +0 -1
- package/dist/_virtual/react-dom.production.min.es.js +0 -5
- package/dist/_virtual/react-dom.production.min.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +0 -1
- package/dist/_virtual/react.development.es.js +0 -5
- package/dist/_virtual/react.development.es.js.map +0 -1
- package/dist/_virtual/react.production.min.es.js +0 -5
- package/dist/_virtual/react.production.min.es.js.map +0 -1
- package/dist/_virtual/scheduler.development.es.js +0 -5
- package/dist/_virtual/scheduler.development.es.js.map +0 -1
- package/dist/_virtual/scheduler.production.min.es.js +0 -5
- package/dist/_virtual/scheduler.production.min.es.js.map +0 -1
- package/dist/style.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.es.js","sources":["../../src/settings/background.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\nimport { BACKGROUND_COLOR_DEFAULT_VALUE } from './defaultValues';\nimport { SettingBlock } from '../';\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.switchLabel Label for the background switch\n * @returns {SettingBlock} Returns background settings\n */\n\ntype BackgroundSettingsType = {\n id?: string;\n defaultValue?: boolean;\n defaultColor?: Color;\n preventDefaultColor?: boolean;\n switchLabel?: string;\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 switchLabel = options?.switchLabel ? options.switchLabel : undefined;\n\n return {\n id: hasId,\n label: 'Background',\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","switchLabel"],"mappings":";AA0Ba,MAAAA,IAAwB,CAACC,MAAmD;AACrF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,gBAAgBA,EAAQ,
|
|
1
|
+
{"version":3,"file":"background.es.js","sources":["../../src/settings/background.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\nimport { BACKGROUND_COLOR_DEFAULT_VALUE } from './defaultValues';\nimport { SettingBlock } from '../';\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.switchLabel Label for the background switch\n * @returns {SettingBlock} Returns background settings\n */\n\ntype BackgroundSettingsType = {\n id?: string;\n defaultValue?: boolean;\n defaultColor?: Color;\n preventDefaultColor?: boolean;\n switchLabel?: string;\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 switchLabel = options?.switchLabel ? options.switchLabel : undefined;\n\n return {\n id: hasId,\n label: 'Background',\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","switchLabel"],"mappings":";AA0Ba,MAAAA,IAAwB,CAACC,MAAmD;AACrF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,gBAAgBA,EAAQ,EAAE,KAAK,iBACrDE,IAAUF,KAAA,QAAAA,EAAS,KAAK,kBAAkBA,EAAQ,EAAE,KAAK,mBACzDG,IAAiBH,KAAA,QAAAA,EAAS,sBAC1B,UACAA,KAAA,gBAAAA,EAAS,iBAAgBI,GACzBC,IAAcL,KAAA,QAAAA,EAAS,cAAcA,EAAQ,cAAc;AAE1D,SAAA;AAAA,IACH,IAAIC;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAAI;AAAA,IACA,cAAc,CAAC,EAACL,KAAA,QAAAA,EAAS;AAAA,IACzB,IAAI;AAAA,MACA;AAAA,QACI,IAAIE;AAAA,QACJ,cAAcC;AAAA,QACd,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,EAAA;AAER;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { appendUnit as m, MultiInputLayout as f, numericalOrPixelRule as y, maximumNumericalOrPixelOrAutoRule as _ } from "@frontify/sidebar-settings";
|
|
3
3
|
import { BORDER_COLOR_DEFAULT_VALUE as I, BORDER_WIDTH_DEFAULT_VALUE as D } from "./defaultValues.es.js";
|
|
4
4
|
import { BorderStyle as l } from "./types.es.js";
|
|
@@ -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 Color,\n MultiInputLayout,\n SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n} from '../';\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 onChange: (bundle) => appendUnit(bundle, widthId),\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: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n placeholder: 'e.g. 3px',\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","bundle","appendUnit","MultiInputLayout","BorderStyle","BORDER_WIDTH_DEFAULT_VALUE","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule"],"mappings":";;;;AA8Ba,MAAAA,IAAoB,CAACC,MAA+C;AAC7E,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,aAAaA,EAAQ,
|
|
1
|
+
{"version":3,"file":"border.es.js","sources":["../../src/settings/border.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n Color,\n MultiInputLayout,\n SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n} from '../';\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 onChange: (bundle) => appendUnit(bundle, widthId),\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: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n placeholder: 'e.g. 3px',\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","bundle","appendUnit","Mult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UACA;AAAA,YACI,IAAIR;AAAA,YACJ,MAAM;AAAA,YACN,cAAcS;AAAA,YACd,OAAO,CAACC,GAAsBC,EAAkC,GAAG,CAAC;AAAA,YACpE,aAAa;AAAA,UACjB;AAAA,UACA;AAAA,YACI,IAAIV;AAAA,YACJ,MAAM;AAAA,YACN,cAAcC;AAAA,UAClB;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,KAAK,CAAC;AAAA,EAAA;AAEd;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { presetCustomValue as g, numericalOrPixelRule as m, appendUnit as f } from "@frontify/sidebar-settings";
|
|
3
3
|
import { Radius as a, radiusStyleMap as i } from "./types.es.js";
|
|
4
4
|
const t = (e, l = a.None) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"borderRadius.es.js","sources":["../../src/settings/borderRadius.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock, appendUnit, numericalOrPixelRule, presetCustomValue } 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],\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","_a","presetCustomValue","radiusStyleMap","numericalOrPixelRule","appendUnit"],"mappings":";;;AAsBO,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,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,EACJ;AACJ,IAEaC,IAA0B,CAACC,MAAqD;AACzF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,aAAaA,EAAQ,
|
|
1
|
+
{"version":3,"file":"borderRadius.es.js","sources":["../../src/settings/borderRadius.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock, appendUnit, numericalOrPixelRule, presetCustomValue } 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],\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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,CAACJ,MAAWK,EAAWL,GAAQF,CAAO;AAAA,MACpD;AAAA,IACJ;AAAA,IACA,KAAK,CAACP,EAAsBQ,GAAUN,CAAY,CAAC;AAAA,EAAA;AAE3D;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { presetCustomValue as a, MultiInputLayout as x, numericalOrPixelRule as u, appendUnit as l } from "@frontify/sidebar-settings";
|
|
3
3
|
import { getBorderRadiusSlider as C } from "./borderRadius.es.js";
|
|
4
4
|
import { radiusStyleMap as r } from "./types.es.js";
|
|
@@ -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, SettingBlock, appendUnit, numericalOrPixelRule, presetCustomValue } from '../';\nimport { getBorderRadiusSlider } from './borderRadius';\nimport { 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","_a","presetCustomValue","radiusStyleMap","MultiInputLayout","numericalOrPixelRule","appendUnit","getBorderRadiusSlider"],"mappings":";;;;AAqBa,MAAAA,IAAkC,CAACC,MAAqD;AACjG,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,2BAA2BA,EAAQ,
|
|
1
|
+
{"version":3,"file":"borderRadiusExtended.es.js","sources":["../../src/settings/borderRadiusExtended.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MultiInputLayout, SettingBlock, appendUnit, numericalOrPixelRule, presetCustomValue } from '../';\nimport { getBorderRadiusSlider } from './borderRadius';\nimport { 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","_a","presetCustomValue","radiusStyleMap","MultiInputLayout","numericalOrPixelRule","appendUnit","getBorderRadiusSlider"],"mappings":";;;;AAqBa,MAAAA,IAAkC,CAACC,MAAqD;AACjG,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,2BAA2BA,EAAQ,EAAE,KAAK,2BAChEE,IAAUF,KAAA,QAAAA,EAAS,KAAK,uBAAuBA,EAAQ,EAAE,KAAK,uBAC9DG,IAAWH,KAAA,QAAAA,EAAS,KAAK,wBAAwBA,EAAQ,EAAE,KAAK,wBAChEI,IAAYJ,KAAA,QAAAA,EAAS,KAAK,yBAAyBA,EAAQ,EAAE,KAAK,yBAClEK,IAAaL,KAAA,QAAAA,EAAS,KAAK,0BAA0BA,EAAQ,EAAE,KAAK,0BACpEM,IAAeN,KAAA,QAAAA,EAAS,KAAK,4BAA4BA,EAAQ,EAAE,KAAK,4BACxEO,IAAgBP,KAAA,QAAAA,EAAS,KAAK,6BAA6BA,EAAQ,EAAE,KAAK;AAEzE,SA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;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,KAAK,CAACQ,EAAsBZ,GAAUH,KAAA,gBAAAA,EAAS,YAAY,CAAC;AAAA,EAAA;AAEpE;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { presetCustomValue as C, numericalOrPixelRule as m, appendUnit as f } from "@frontify/sidebar-settings";
|
|
3
3
|
import { GutterSpacing as l, gutterSpacingStyleMap as h } from "./types.es.js";
|
|
4
4
|
const I = (e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { presetCustomValue as g, numericalOrPixelRule as c, maximumNumericalOrPixelOrAutoRule as d, appendUnit as h } from "@frontify/sidebar-settings";
|
|
3
3
|
import { MARGIN_DEFAULT_PLACEHOLDER as M } from "./defaultValues.es.js";
|
|
4
4
|
import { Margin as a, marginStyleMap as C } from "./types.es.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"margin.es.js","sources":["../../src/settings/margin.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\nimport { MARGIN_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { Margin, marginStyleMap } from './types';\n\ntype MarginSettingsType = {\n id?: string;\n marginStyleMap?: Record<Margin, string>;\n};\n\n/**\n * Returns margin settings: margin switch, margin slider, custom margin input\n *\n * @param {string} id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns margin settings\n */\nexport const getMarginSlider = (id: string): SettingBlock => ({\n id,\n type: 'segmentedControls',\n defaultValue: Margin.None,\n choices: [\n {\n value: Margin.None,\n label: 'None',\n },\n {\n value: Margin.Small,\n label: 'S',\n },\n {\n value: Margin.Medium,\n label: 'M',\n },\n {\n value: Margin.Large,\n label: 'L',\n },\n ],\n});\n\nexport const getMarginSettings = (options?: MarginSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasCustomMarginValue_${options?.id}` : 'hasCustomMarginValue';\n const valueId = options?.id ? `marginValue_${options?.id}` : 'marginValue';\n const choiceId = options?.id ? `marginChoice_${options?.id}` : 'marginChoice';\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 space',\n onChange: (bundle) => presetCustomValue(bundle, choiceId, valueId, options?.marginStyleMap || marginStyleMap),\n on: [\n {\n id: valueId,\n type: 'input',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n onChange: (bundle) => appendUnit(bundle, valueId),\n },\n ],\n off: [getMarginSlider(choiceId)],\n };\n};\n"],"names":["getMarginSlider","id","Margin","getMarginSettings","options","hasId","valueId","choiceId","bundle","presetCustomValue","marginStyleMap","MARGIN_DEFAULT_PLACEHOLDER","numericalOrPixelRule","maximumNumericalOrPixelOrAutoRule","appendUnit"],"mappings":";;;;AAuBa,MAAAA,IAAkB,CAACC,OAA8B;AAAA,EAC1D,IAAAA;AAAA,EACA,MAAM;AAAA,EACN,cAAcC,EAAO;AAAA,EACrB,SAAS;AAAA,IACL;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAO;AAAA,MACd,OAAO;AAAA,IACX;AAAA,EACJ;AACJ,IAEaC,IAAoB,CAACC,MAA+C;AAC7E,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,wBAAwBA,KAAA,gBAAAA,EAAS,
|
|
1
|
+
{"version":3,"file":"margin.es.js","sources":["../../src/settings/margin.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\nimport { MARGIN_DEFAULT_PLACEHOLDER } from './defaultValues';\nimport { Margin, marginStyleMap } from './types';\n\ntype MarginSettingsType = {\n id?: string;\n marginStyleMap?: Record<Margin, string>;\n};\n\n/**\n * Returns margin settings: margin switch, margin slider, custom margin input\n *\n * @param {string} id Custom suffix for the setting ids\n * @returns {SettingBlock} Returns margin settings\n */\nexport const getMarginSlider = (id: string): SettingBlock => ({\n id,\n type: 'segmentedControls',\n defaultValue: Margin.None,\n choices: [\n {\n value: Margin.None,\n label: 'None',\n },\n {\n value: Margin.Small,\n label: 'S',\n },\n {\n value: Margin.Medium,\n label: 'M',\n },\n {\n value: Margin.Large,\n label: 'L',\n },\n ],\n});\n\nexport const getMarginSettings = (options?: MarginSettingsType): SettingBlock => {\n const hasId = options?.id ? `hasCustomMarginValue_${options?.id}` : 'hasCustomMarginValue';\n const valueId = options?.id ? `marginValue_${options?.id}` : 'marginValue';\n const choiceId = options?.id ? `marginChoice_${options?.id}` : 'marginChoice';\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 space',\n onChange: (bundle) => presetCustomValue(bundle, choiceId, valueId, options?.marginStyleMap || marginStyleMap),\n on: [\n {\n id: valueId,\n type: 'input',\n placeholder: MARGIN_DEFAULT_PLACEHOLDER,\n rules: [numericalOrPixelRule, maximumNumericalOrPixelOrAutoRule(500)],\n onChange: (bundle) => appendUnit(bundle, valueId),\n },\n ],\n off: [getMarginSlider(choiceId)],\n };\n};\n"],"names":["getMarginSlider","id","Margin","getMarginSettings","options","hasId","valueId","choiceId","bundle","presetCustomValue","marginStyleMap","MARGIN_DEFAULT_PLACEHOLDER","numericalOrPixelRule","maximumNumericalOrP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1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { presetCustomValue as r, MultiInputLayout as I, appendUnit as l, numericalOrPixelRule as g, maximumNumericalOrPixelOrAutoRule as u } from "@frontify/sidebar-settings";
|
|
3
3
|
import { MARGIN_DEFAULT_PLACEHOLDER as m } from "./defaultValues.es.js";
|
|
4
4
|
import { getMarginSlider as y } from "./margin.es.js";
|
|
@@ -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 SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\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":";;;;;AAyBa,MAAAA,IAA4B,CAACC,MAA+C;AACrF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,2BAA2BA,KAAA,gBAAAA,EAAS,
|
|
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 SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\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":";;;;;AAyBa,MAAAA,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,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,YACP,aAAaK;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAQ;AAAA,YACjD,OAAO,CAACO,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UACxE;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,KAAK,CAACC,EAAgBb,CAAQ,CAAC;AAAA,EAAA;AAEvC;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { presetCustomValue as m, numericalOrPixelRule as g, maximumNumericalOrPixelOrAutoRule as c, appendUnit as h } from "@frontify/sidebar-settings";
|
|
3
3
|
import { PADDING_DEFAULT_PLACEHOLDER as C } from "./defaultValues.es.js";
|
|
4
4
|
import { Padding as a, paddingStyleMap as P } from "./types.es.js";
|
|
@@ -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 SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\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":";;;;AAwBa,MAAAA,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,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,OAAOA,EAAQ;AAAA,MACf,OAAO;AAAA,IACX;AAAA,EACJ;AACJ,IAEaC,IAAqB,CAACC,MAAgD;AAC/E,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,yBAAyBA,KAAA,gBAAAA,EAAS,
|
|
1
|
+
{"version":3,"file":"padding.es.js","sources":["../../src/settings/padding.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\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":";;;;AA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
|
2
2
|
import { presetCustomValue as l, MultiInputLayout as I, appendUnit as g, numericalOrPixelRule as r, maximumNumericalOrPixelOrAutoRule as u } from "@frontify/sidebar-settings";
|
|
3
3
|
import { PADDING_DEFAULT_PLACEHOLDER as m } from "./defaultValues.es.js";
|
|
4
4
|
import { getPaddingSlider as y } from "./padding.es.js";
|
|
@@ -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 SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\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":";;;;;AAyBa,MAAAA,IAA6B,CAACC,MAAgD;AACvF,QAAMC,IAAQD,KAAA,QAAAA,EAAS,KAAK,4BAA4BA,KAAA,gBAAAA,EAAS,
|
|
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 SettingBlock,\n appendUnit,\n maximumNumericalOrPixelOrAutoRule,\n numericalOrPixelRule,\n presetCustomValue,\n} from '../';\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":";;;;;AAyBa,MAAAA,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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AAM;AAAA,YACN,OAAO;AAAA,YACP,aAAaK;AAAA,YACb,UAAU,CAACJ,MAAWK,EAAWL,GAAQD,CAAQ;AAAA,YACjD,OAAO,CAACO,GAAsBC,EAAkC,GAAG,CAAC;AAAA,UACxE;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,KAAK,CAACC,EAAiBb,CAAQ,CAAC;AAAA,EAAA;AAExC;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../styles.css.es.js";
|
|
2
2
|
import { createFooter as o } from "@frontify/sidebar-settings";
|
|
3
3
|
import { Security as e } from "./types.es.js";
|
|
4
4
|
import { getSecurityGlobalControlId as l } from "./securityDownloadable.es.js";
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(147 197 253 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(147 197 253 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-pointer-events-none{pointer-events:none}.tw-pointer-events-auto{pointer-events:auto}.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-bottom-\[calc\(100\%-4px\)\]{bottom:calc(100% - 4px)}.tw-left-0{left:0}.tw-right-\[-3px\]{right:-3px}.tw-top-full{top:100%}.tw-z-10{z-index:10}.tw-z-20{z-index:20}.tw-z-\[2\]{z-index:2}.tw-m-0{margin:0}.tw-my-4{margin-top:1rem;margin-bottom:1rem}.tw-mr-1{margin-right:.25rem}.tw-mr-1\.5{margin-right:.375rem}.tw-mr-2{margin-right:.5rem}.tw-mt-3{margin-top:.75rem}.tw-mt-8{margin-top:2rem}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-h-0{height:0px}.tw-h-4{height:1rem}.tw-h-6{height:1.5rem}.tw-h-7{height:1.75rem}.tw-h-8{height:2rem}.tw-h-9{height:2.25rem}.tw-h-\[72px\]{height:72px}.tw-h-full{height:100%}.tw-min-h-\[10px\]{min-height:10px}.tw-w-0{width:0px}.tw-w-4{width:1rem}.tw-w-6{width:1.5rem}.tw-w-8{width:2rem}.tw-w-9{width:2.25rem}.tw-w-\[300px\]{width:300px}.tw-w-fit{width:-moz-fit-content;width:fit-content}.tw-w-full{width:100%}.tw-min-w-0{min-width:0px}.tw-min-w-\[400px\]{min-width:400px}.tw-flex-1{flex:1 1 0%}.tw-flex-auto{flex:1 1 auto}.tw-flex-shrink-0{flex-shrink:0}.tw-rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes tw-pulse{50%{opacity:.5}}.tw-animate-pulse{animation:tw-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.\!tw-cursor-not-allowed{cursor:not-allowed!important}.tw-cursor-grab{cursor:grab}.tw-cursor-grabbing{cursor:grabbing}.tw-cursor-pointer{cursor:pointer}.tw-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.tw-break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.tw-break-after-column{-moz-column-break-after:column;break-after:column}.tw-flex-row{flex-direction:row}.tw-flex-col{flex-direction:column}.tw-items-start{align-items:flex-start}.tw-items-center{align-items:center}.tw-justify-end{justify-content:flex-end}.tw-justify-center{justify-content:center}.tw-justify-between{justify-content:space-between}.tw-gap-0{gap:0px}.tw-gap-0\.5{gap:.125rem}.tw-gap-1{gap:.25rem}.tw-gap-2{gap:.5rem}.tw-gap-3{gap:.75rem}.tw-gap-\[2px\]{gap:2px}.tw-gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.tw-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.tw-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.tw-self-start{align-self:flex-start}.tw-overflow-hidden{overflow:hidden}.tw-overflow-y-auto{overflow-y:auto}.tw-text-ellipsis{text-overflow:ellipsis}.tw-whitespace-nowrap{white-space:nowrap}.tw-break-words{overflow-wrap:break-word}.tw-rounded{border-radius:var(--radius)}.tw-rounded-full{border-radius:9999px}.tw-rounded-sm{border-radius:.125rem}.tw-border{border-width:var(--line-width)}.tw-border-b{border-bottom-width:var(--line-width)}.tw-border-b-4{border-bottom-width:4px}.tw-border-l-4{border-left-width:4px}.tw-border-t{border-top-width:var(--line-width)}.tw-border-t-4{border-top-width:4px}.tw-border-solid{border-style:solid}.tw-border-dashed{border-style:dashed}.\!tw-border-red-50{--tw-border-opacity: 1 !important;border-color:rgb(255 128 102 / var(--tw-border-opacity))!important}.tw-border-blank-state-line{--tw-border-opacity: 1;border-color:rgb(163 165 165 / var(--tw-border-opacity))}.tw-border-blank-state-line-hover{--tw-border-opacity: 1;border-color:rgb(26 28 28 / var(--tw-border-opacity))}.tw-border-box-selected-inverse{border-color:var(--box-selected-inverse-color)}.tw-border-button-border{border-color:var(--button-border-color)}.tw-border-b-line{border-bottom-color:var(--line-color)}.tw-border-b-transparent{border-bottom-color:transparent}.tw-border-t-black-10{--tw-border-opacity: 1;border-top-color:rgb(234 235 235 / var(--tw-border-opacity))}.tw-border-t-transparent{border-top-color:transparent}.tw-bg-base{background-color:var(--base-color)}.tw-bg-base-alt{background-color:var(--base-color-alt)}.tw-bg-blank-state-pressed-inverse{--tw-bg-opacity: 1;background-color:rgb(241 241 241 / var(--tw-bg-opacity))}.tw-bg-blank-state-shaded-inverse{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.tw-bg-blank-state-weak-inverse{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.tw-bg-box-neutral-hover{background-color:var(--box-neutral-color-hover)}.tw-bg-box-neutral-strong-inverse{background-color:var(--box-neutral-strong-inverse-color)}.tw-bg-box-selected-pressed{background-color:var(--box-selected-color-pressed)}.tw-bg-box-selected-strong{background-color:var(--box-selected-strong-color)}.tw-bg-button-background{background-color:var(--button-background-color)}.tw-bg-button-background-pressed{background-color:var(--button-background-color-pressed)}.tw-bg-red-50{--tw-bg-opacity: 1;background-color:rgb(255 128 102 / var(--tw-bg-opacity))}.tw-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.tw-p-1{padding:.25rem}.tw-p-1\.5{padding:.375rem}.tw-p-2{padding:.5rem}.tw-p-4{padding:1rem}.tw-p-7{padding:1.75rem}.tw-p-\[6px\]{padding:6px}.tw-px-0{padding-left:0;padding-right:0}.tw-px-2{padding-left:.5rem;padding-right:.5rem}.tw-px-2\.5{padding-left:.625rem;padding-right:.625rem}.tw-px-5{padding-left:1.25rem;padding-right:1.25rem}.tw-px-\[1px\]{padding-left:1px;padding-right:1px}.tw-py-0{padding-top:0;padding-bottom:0}.tw-py-2{padding-top:.5rem;padding-bottom:.5rem}.tw-py-3{padding-top:.75rem;padding-bottom:.75rem}.tw-pb-2{padding-bottom:.5rem}.tw-pl-12{padding-left:3rem}.tw-pl-14{padding-left:3.5rem}.tw-pl-7{padding-left:1.75rem}.tw-pt-5{padding-top:1.25rem}.tw-text-left{text-align:left}.tw-text-right{text-align:right}.tw-font-body{font-family:var(--body-family)}.tw-font-sans{font-family:Space Grotesk Frontify,Arial,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}.tw-text-\[13px\]{font-size:13px}.tw-text-s{font-size:.875rem;line-height:1rem}.tw-text-sm{font-size:.875rem;line-height:1.25rem}.tw-text-xs{font-size:.813rem;line-height:1rem}.tw-font-bold{font-weight:700}.tw-font-medium{font-weight:500}.tw-font-normal{font-weight:400}.tw-leading-4{line-height:1rem}.tw-leading-5{line-height:1.25rem}.tw-text-blank-state-shaded{--tw-text-opacity: 1;color:rgb(114 116 116 / var(--tw-text-opacity))}.tw-text-box-neutral-strong{color:var(--box-neutral-strong-color)}.tw-text-box-selected-inverse{color:var(--box-selected-inverse-color)}.tw-text-box-selected-strong-inverse{color:var(--box-selected-strong-inverse-color)}.tw-text-red-60{--tw-text-opacity: 1;color:rgb(255 55 90 / var(--tw-text-opacity))}.tw-text-red-65{--tw-text-opacity: 1;color:rgb(229 33 68 / var(--tw-text-opacity))}.tw-text-text{color:var(--text-color)}.tw-text-text-weak{color:var(--text-color-weak)}.\!tw-line-through{text-decoration-line:line-through!important}.tw-opacity-0{opacity:0}.tw-opacity-100{opacity:1}.tw-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.tw-outline-none{outline:2px solid transparent;outline-offset:2px}.tw-outline{outline-style:solid}.tw-outline-1{outline-width:1px}.tw-outline-offset-1{outline-offset:1px}.tw-outline-offset-2{outline-offset:2px}.tw-outline-offset-\[1px\]{outline-offset:1px}.tw-outline-box-selected-inverse{outline-color:var(--box-selected-inverse-color)}.tw-outline-line{outline-color:var(--line-color)}.tw-outline-violet-60{outline-color:#825fff}.tw-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.tw-transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.first\:tw-rounded-bl:first-child{border-bottom-left-radius:var(--radius)}.first\:tw-rounded-tl:first-child{border-top-left-radius:var(--radius)}.first\:tw-rounded-tr:first-child{border-top-right-radius:var(--radius)}.last\:tw-rounded-bl:last-child{border-bottom-left-radius:var(--radius)}.last\:tw-rounded-br:last-child{border-bottom-right-radius:var(--radius)}.last\:tw-rounded-tr:last-child{border-top-right-radius:var(--radius)}.first-of-type\:tw-ml-0:first-of-type{margin-left:0}.focus-within\:tw-opacity-100:focus-within{opacity:1}.focus-within\:tw-outline:focus-within{outline-style:solid}.hover\:tw-border-blank-state-line-hover:hover{--tw-border-opacity: 1;border-color:rgb(26 28 28 / var(--tw-border-opacity))}.hover\:tw-bg-black-10:hover{--tw-bg-opacity: 1;background-color:rgb(234 235 235 / var(--tw-bg-opacity))}.hover\:tw-bg-blank-state-hover-inverse:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:tw-bg-box-neutral-hover:hover{background-color:var(--box-neutral-color-hover)}.hover\:tw-bg-box-neutral-strong-inverse-hover:hover{background-color:var(--box-neutral-strong-inverse-color-hover)}.hover\:tw-bg-box-selected-hover:hover{background-color:var(--box-selected-color-hover)}.hover\:tw-bg-button-background-hover:hover{background-color:var(--button-background-color-hover)}.hover\:tw-bg-button-background-pressed:hover{background-color:var(--button-background-color-pressed)}.hover\:tw-text-blank-state-hover:hover{--tw-text-opacity: 1;color:rgb(26 28 28 / var(--tw-text-opacity))}.hover\:tw-text-box-neutral-inverse-hover:hover{color:var(--box-neutral-inverse-color-hover)}.hover\:tw-outline:hover{outline-style:solid}.focus-visible\:tw-opacity-100:focus-visible{opacity:1}.focus-visible\:tw-ring-blue:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(94 158 214 / var(--tw-ring-opacity)) }.active\:tw-border-blank-state-line-hover:active{--tw-border-opacity: 1;border-color:rgb(26 28 28 / var(--tw-border-opacity))}.active\:tw-bg-blank-state-pressed-inverse:active{--tw-bg-opacity: 1;background-color:rgb(241 241 241 / var(--tw-bg-opacity))}.active\:tw-bg-box-neutral-strong-inverse-pressed:active{background-color:var(--box-neutral-strong-inverse-color-pressed)}.active\:tw-bg-box-selected-pressed:active{background-color:var(--box-selected-color-pressed)}.active\:tw-bg-button-background-pressed:active{background-color:var(--button-background-color-pressed)}.active\:tw-text-blank-state-pressed:active{--tw-text-opacity: 1;color:rgb(8 8 8 / var(--tw-text-opacity))}.tw-group:hover .group-hover\:tw-text-box-neutral-inverse-hover{color:var(--box-neutral-inverse-color-hover)}.tw-group:hover .group-hover\:tw-opacity-100{opacity:1}.tw-group:focus .group-focus\:tw-opacity-100{opacity:1}.\[\&\:not\(\:first-child\)\]\:tw-border-l-0:not(:first-child){border-left-width:0px}.\[\&\:not\(\:first-child\)\]\:tw-border-t-0:not(:first-child){border-top-width:0px}.\[\&\>\*\]\:tw-pointer-events-none>*{pointer-events:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moveItemInArray.es.js","sources":["../../src/utilities/moveItemInArray.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\n/**\n * Moves an item from the 'from' position to the 'to' position and updates the array\n *\n * @param {Array} array Array of items\n * @param {Number} from Initial index of the item\n * @param {Number} to New index of the item\n * @returns {Array} New array with the item moved to the new position\n */\nexport const moveItemInArray = <T>(array: T[], from: number, to: number): T[] => {\n const newArray = [...array];\n const toIndex = to < 0 ? newArray.length + to : to;\n\n if (toIndex >= 0 && toIndex < newArray.length) {\n const slice = newArray.splice(from, 1)[0];\n newArray.splice(toIndex, 0, slice);\n }\n\n return newArray;\n};\n"],"names":["moveItemInArray","array","from","to","newArray","toIndex","slice"],"mappings":"AAUO,MAAMA,IAAkB,CAAIC,GAAYC,GAAcC,MAAoB;AACvE,QAAAC,IAAW,CAAC,GAAGH,CAAK,GACpBI,IAAUF,IAAK,IAAIC,EAAS,SAASD,IAAKA;AAEhD,MAAIE,KAAW,KAAKA,IAAUD,EAAS,QAAQ;AAC3C,UAAME,IAAQF,EAAS,OAAOF,GAAM,CAAC,EAAE,CAAC;AAC/B,IAAAE,EAAA,OAAOC,GAAS,GAAGC,CAAK;AAAA;
|
|
1
|
+
{"version":3,"file":"moveItemInArray.es.js","sources":["../../src/utilities/moveItemInArray.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\n/**\n * Moves an item from the 'from' position to the 'to' position and updates the array\n *\n * @param {Array} array Array of items\n * @param {Number} from Initial index of the item\n * @param {Number} to New index of the item\n * @returns {Array} New array with the item moved to the new position\n */\nexport const moveItemInArray = <T>(array: T[], from: number, to: number): T[] => {\n const newArray = [...array];\n const toIndex = to < 0 ? newArray.length + to : to;\n\n if (toIndex >= 0 && toIndex < newArray.length) {\n const slice = newArray.splice(from, 1)[0];\n newArray.splice(toIndex, 0, slice);\n }\n\n return newArray;\n};\n"],"names":["moveItemInArray","array","from","to","newArray","toIndex","slice"],"mappings":"AAUO,MAAMA,IAAkB,CAAIC,GAAYC,GAAcC,MAAoB;AACvE,QAAAC,IAAW,CAAC,GAAGH,CAAK,GACpBI,IAAUF,IAAK,IAAIC,EAAS,SAASD,IAAKA;AAEhD,MAAIE,KAAW,KAAKA,IAAUD,EAAS,QAAQ;AAC3C,UAAME,IAAQF,EAAS,OAAOF,GAAM,CAAC,EAAE,CAAC;AAC/B,IAAAE,EAAA,OAAOC,GAAS,GAAGC,CAAK;AAAA,EACrC;AAEO,SAAAF;AACX;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBackgroundColorStyles.es.js","sources":["../../../src/utilities/react/getBackgroundColorStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CSSProperties } from 'react';\
|
|
1
|
+
{"version":3,"file":"getBackgroundColorStyles.es.js","sources":["../../../src/utilities/react/getBackgroundColorStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport type { Color } from '@frontify/fondue';\n\nimport { toRgbaString } from '../color';\n\nexport const getBackgroundColorStyles = (backgroundColor: Color): CSSProperties => ({\n backgroundColor: toRgbaString(backgroundColor),\n});\n"],"names":["getBackgroundColorStyles","backgroundColor","toRgbaString"],"mappings":";AAOa,MAAAA,IAA2B,CAACC,OAA2C;AAAA,EAChF,iBAAiBC,EAAaD,CAAe;AACjD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBorderStyles.es.js","sources":["../../../src/utilities/react/getBorderStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CSSProperties } from 'react';\
|
|
1
|
+
{"version":3,"file":"getBorderStyles.es.js","sources":["../../../src/utilities/react/getBorderStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport type { Color } from '@frontify/fondue';\n\nimport { BorderStyle, borderStyleMap } from '../../settings/types';\nimport { BORDER_COLOR_DEFAULT_VALUE } from '../../settings/defaultValues';\nimport { toRgbaString } from '../color';\n\nexport const getBorderStyles = (\n style = BorderStyle.Solid,\n borderWidth = '1px',\n color = BORDER_COLOR_DEFAULT_VALUE as Color,\n): CSSProperties => {\n return {\n borderStyle: borderStyleMap[style],\n borderWidth,\n borderColor: toRgbaString(color),\n };\n};\n"],"names":["getBorderStyles","style","BorderStyle","borderWidth","color","BORDER_COLOR_DEFAULT_VALUE","borderStyleMap","toRgbaString"],"mappings":";;;AASa,MAAAA,IAAkB,CAC3BC,IAAQC,EAAY,OACpBC,IAAc,OACdC,IAAQC,OAED;AAAA,EACH,aAAaC,EAAeL,CAAK;AAAA,EACjC,aAAAE;AAAA,EACA,aAAaI,EAAaH,CAAK;AAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRadiusStyles.es.js","sources":["../../../src/utilities/react/getRadiusStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CSSProperties } from 'react';\nimport { Radius, radiusStyleMap } from '../../settings/types';\n\nexport const getRadiusStyles = (radiusChoice: Radius, hasRadius = false, radiusValue?: number): CSSProperties => ({\n borderRadius: hasRadius ? radiusValue : radiusStyleMap[radiusChoice],\n});\n"],"names":["getRadiusStyles","radiusChoice","hasRadius","radiusValue","radiusStyleMap"],"mappings":";AAKO,MAAMA,IAAkB,CAACC,GAAsBC,IAAY,IAAOC,OAAyC;AAAA,EAC9G,cAAcD,IAAYC,IAAcC,EAAeH,CAAY;AACvE;"}
|
|
1
|
+
{"version":3,"file":"getRadiusStyles.es.js","sources":["../../../src/utilities/react/getRadiusStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport { Radius, radiusStyleMap } from '../../settings/types';\n\nexport const getRadiusStyles = (radiusChoice: Radius, hasRadius = false, radiusValue?: number): CSSProperties => ({\n borderRadius: hasRadius ? radiusValue : radiusStyleMap[radiusChoice],\n});\n"],"names":["getRadiusStyles","radiusChoice","hasRadius","radiusValue","radiusStyleMap"],"mappings":";AAKO,MAAMA,IAAkB,CAACC,GAAsBC,IAAY,IAAOC,OAAyC;AAAA,EAC9G,cAAcD,IAAYC,IAAcC,EAAeH,CAAY;AACvE;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontify/guideline-blocks-settings",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "Provides types and helpers for the guideline block development",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -19,43 +19,45 @@
|
|
|
19
19
|
"import": "./dist/index.es.js",
|
|
20
20
|
"require": "./dist/index.umd.js"
|
|
21
21
|
},
|
|
22
|
-
"./styles": "./dist/
|
|
22
|
+
"./styles": "./dist/styles.css"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@babel/core": "^7.22.
|
|
26
|
-
"@frontify/eslint-config-typescript": "^0.
|
|
25
|
+
"@babel/core": "^7.22.9",
|
|
26
|
+
"@frontify/eslint-config-typescript": "^0.16.1",
|
|
27
27
|
"@testing-library/react": "^14.0.0",
|
|
28
28
|
"@types/escape-html": "^1.0.2",
|
|
29
|
-
"@types/node": "^
|
|
30
|
-
"@types/react": "^18.2.
|
|
31
|
-
"@types/react-dom": "^18.2.
|
|
32
|
-
"@types/sinon": "^10.0.
|
|
33
|
-
"@vitejs/plugin-react": "^4.0.
|
|
29
|
+
"@types/node": "^20.4.7",
|
|
30
|
+
"@types/react": "^18.2.18",
|
|
31
|
+
"@types/react-dom": "^18.2.7",
|
|
32
|
+
"@types/sinon": "^10.0.16",
|
|
33
|
+
"@vitejs/plugin-react": "^4.0.4",
|
|
34
34
|
"autoprefixer": "^10.4.14",
|
|
35
|
-
"cypress": "^12.
|
|
36
|
-
"cypress-real-events": "^1.
|
|
37
|
-
"eslint": "^8.
|
|
35
|
+
"cypress": "^12.17.3",
|
|
36
|
+
"cypress-real-events": "^1.10.0",
|
|
37
|
+
"eslint": "^8.46.0",
|
|
38
38
|
"eslint-plugin-notice": "^0.9.10",
|
|
39
|
-
"happy-dom": "^
|
|
40
|
-
"mitt": "^3.0.
|
|
41
|
-
"msw": "^1.2.
|
|
42
|
-
"postcss": "^8.4.
|
|
43
|
-
"prettier": "^
|
|
39
|
+
"happy-dom": "^10.7.0",
|
|
40
|
+
"mitt": "^3.0.1",
|
|
41
|
+
"msw": "^1.2.3",
|
|
42
|
+
"postcss": "^8.4.27",
|
|
43
|
+
"prettier": "^3.0.1",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
45
|
"react-dom": "^18.2.0",
|
|
46
|
+
"rollup": "^3.27.2",
|
|
46
47
|
"sinon": "15.2.0",
|
|
47
|
-
"tailwindcss": "^3.3.
|
|
48
|
-
"typescript": "^5.1.
|
|
49
|
-
"vite": "^4.
|
|
50
|
-
"vite-plugin-dts": "^
|
|
51
|
-
"
|
|
48
|
+
"tailwindcss": "^3.3.3",
|
|
49
|
+
"typescript": "^5.1.6",
|
|
50
|
+
"vite": "^4.4.8",
|
|
51
|
+
"vite-plugin-dts": "^3.5.0",
|
|
52
|
+
"vite-plugin-externals": "^0.6.2",
|
|
53
|
+
"vitest": "^0.34.1"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"@ctrl/tinycolor": "^3.6.0",
|
|
55
57
|
"@dnd-kit/core": "^6.0.8",
|
|
56
58
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
57
59
|
"@dnd-kit/sortable": "^7.0.2",
|
|
58
|
-
"@frontify/fondue": "
|
|
60
|
+
"@frontify/fondue": "12.0.0-beta.296",
|
|
59
61
|
"@react-aria/focus": "^3.13.0",
|
|
60
62
|
"@react-stately/overlays": "^3.6.0",
|
|
61
63
|
"@udecode/plate": "^21",
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
"slate": "^0.94.1",
|
|
64
66
|
"slate-react": "^0.97.1",
|
|
65
67
|
"@frontify/app-bridge": "3.0.0-beta.86",
|
|
66
|
-
"@frontify/sidebar-settings": "0.6.
|
|
68
|
+
"@frontify/sidebar-settings": "0.6.1"
|
|
67
69
|
},
|
|
68
70
|
"peerDependencies": {
|
|
69
71
|
"react": "^18",
|
|
@@ -55,7 +55,7 @@ export const AttachmentItem = forwardRef<HTMLButtonElement, AttachmentItemProps>
|
|
|
55
55
|
onReplaceWithBrowse,
|
|
56
56
|
onReplaceWithUpload,
|
|
57
57
|
},
|
|
58
|
-
ref
|
|
58
|
+
ref,
|
|
59
59
|
) => {
|
|
60
60
|
const [selectedAsset, setSelectedAsset] = useState<Asset | undefined>();
|
|
61
61
|
const [openFileDialog, { selectedFiles }] = useFileInput({ multiple: true, accept: 'image/*' });
|
|
@@ -227,7 +227,7 @@ export const AttachmentItem = forwardRef<HTMLButtonElement, AttachmentItemProps>
|
|
|
227
227
|
)}
|
|
228
228
|
</button>
|
|
229
229
|
);
|
|
230
|
-
}
|
|
230
|
+
},
|
|
231
231
|
);
|
|
232
232
|
|
|
233
233
|
AttachmentItem.displayName = 'AttachmentItem';
|
|
@@ -96,7 +96,7 @@ describe('Attachments', () => {
|
|
|
96
96
|
new Promise<void>((resolve) =>
|
|
97
97
|
setTimeout(() => {
|
|
98
98
|
resolve();
|
|
99
|
-
}, 2000)
|
|
99
|
+
}, 2000),
|
|
100
100
|
);
|
|
101
101
|
|
|
102
102
|
mount(
|
|
@@ -104,7 +104,7 @@ describe('Attachments', () => {
|
|
|
104
104
|
onReplaceWithBrowse={replaceStub}
|
|
105
105
|
items={[AssetDummy.with(1), AssetDummy.with(2), AssetDummy.with(3)]}
|
|
106
106
|
appBridge={appBridge}
|
|
107
|
-
|
|
107
|
+
/>,
|
|
108
108
|
);
|
|
109
109
|
|
|
110
110
|
cy.get(FlyoutButtonSelector).click();
|
|
@@ -121,7 +121,7 @@ describe('Attachments', () => {
|
|
|
121
121
|
<Attachments
|
|
122
122
|
appBridge={getAppBridgeBlockStub({ editorState: true })}
|
|
123
123
|
items={[AssetDummy.with(1), AssetDummy.with(2), AssetDummy.with(3)]}
|
|
124
|
-
|
|
124
|
+
/>,
|
|
125
125
|
);
|
|
126
126
|
cy.get(FlyoutButtonSelector).click();
|
|
127
127
|
cy.realPress('Tab');
|
|
@@ -139,7 +139,7 @@ describe('Attachments', () => {
|
|
|
139
139
|
appBridge={getAppBridgeBlockStub({ editorState: true })}
|
|
140
140
|
items={[{ ...AssetDummy.with(1), title: 'Moved item' }, AssetDummy.with(2), AssetDummy.with(3)]}
|
|
141
141
|
onSorted={onSortStub}
|
|
142
|
-
|
|
142
|
+
/>,
|
|
143
143
|
);
|
|
144
144
|
cy.get(FlyoutButtonSelector).click();
|
|
145
145
|
cy.realPress('Tab');
|
|
@@ -87,7 +87,7 @@ export const Attachments = ({
|
|
|
87
87
|
{
|
|
88
88
|
multiSelection: true,
|
|
89
89
|
selectedValueIds: internalItems.map((internalItem) => internalItem.id),
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
91
|
);
|
|
92
92
|
};
|
|
93
93
|
|
|
@@ -104,7 +104,7 @@ export const Attachments = ({
|
|
|
104
104
|
{
|
|
105
105
|
multiSelection: false,
|
|
106
106
|
selectedValueIds: internalItems.map((internalItem) => internalItem.id),
|
|
107
|
-
}
|
|
107
|
+
},
|
|
108
108
|
);
|
|
109
109
|
};
|
|
110
110
|
|
|
@@ -18,7 +18,7 @@ describe('Block Inject Button', () => {
|
|
|
18
18
|
icon={<IconAdobeCreativeCloud />}
|
|
19
19
|
secondaryLabel="second label"
|
|
20
20
|
withMenu={false}
|
|
21
|
-
|
|
21
|
+
/>,
|
|
22
22
|
);
|
|
23
23
|
cy.get(BlockInjectButtonSelector)
|
|
24
24
|
.should('exist')
|
|
@@ -34,7 +34,7 @@ describe('Block Inject Button', () => {
|
|
|
34
34
|
secondaryLabel="second label"
|
|
35
35
|
onAssetChooseClick={cy.stub().as('onClickOpenAssetChooser')}
|
|
36
36
|
onUploadClick={cy.stub().as('onClickonUploadClick')}
|
|
37
|
-
|
|
37
|
+
/>,
|
|
38
38
|
);
|
|
39
39
|
cy.get(BlockInjectButtonSelector).click();
|
|
40
40
|
cy.get(ActionMenuItemSelector).should('have.length', 2);
|