@frontify/guideline-blocks-settings 0.33.1 → 0.33.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/{.eslintrc.js → .eslintrc.cjs} +5 -0
- package/CHANGELOG.md +20 -0
- package/package.json +47 -47
- package/src/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.spec.tsx +1 -1
- package/src/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.tsx +1 -1
- package/src/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.spec.tsx +2 -2
- package/src/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.spec.tsx +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +1 -1
- package/tsconfig.json +17 -20
- package/tsconfig.node.json +12 -0
- package/dist/components/Attachments/AttachmentItem.es.js +0 -174
- package/dist/components/Attachments/AttachmentItem.es.js.map +0 -1
- package/dist/components/Attachments/Attachments.es.js +0 -160
- package/dist/components/Attachments/Attachments.es.js.map +0 -1
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js +0 -29
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js.map +0 -1
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js +0 -150
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +0 -71
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js +0 -33
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js +0 -26
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js +0 -28
- package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js +0 -35
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js +0 -44
- package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js +0 -25
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/ToolbarFlyoutMenu.es.js +0 -29
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/ToolbarFlyoutMenu.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js +0 -22
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js +0 -12
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js +0 -20
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js +0 -6
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js +0 -11
- package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js +0 -18
- package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js +0 -26
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js +0 -18
- package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js.map +0 -1
- package/dist/components/BlockItemWrapper/constants.es.js +0 -6
- package/dist/components/BlockItemWrapper/constants.es.js.map +0 -1
- package/dist/components/DownloadButton/DownloadButton.es.js +0 -39
- package/dist/components/DownloadButton/DownloadButton.es.js.map +0 -1
- package/dist/components/Link/LinkInput.es.js +0 -63
- package/dist/components/Link/LinkInput.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/DocumentLink.es.js +0 -68
- package/dist/components/Link/LinkSelector/DocumentLink.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js +0 -60
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/LinkSelector.es.js +0 -78
- package/dist/components/Link/LinkSelector/LinkSelector.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js +0 -7
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/PageLink.es.js +0 -70
- package/dist/components/Link/LinkSelector/PageLink.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/PageLinks.es.js +0 -38
- package/dist/components/Link/LinkSelector/PageLinks.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/SectionLink.es.js +0 -25
- package/dist/components/Link/LinkSelector/SectionLink.es.js.map +0 -1
- package/dist/components/Link/utils/getUrl.es.js +0 -18
- package/dist/components/Link/utils/getUrl.es.js.map +0 -1
- package/dist/components/Link/utils/relativeUrlRegex.es.js +0 -5
- package/dist/components/Link/utils/relativeUrlRegex.es.js.map +0 -1
- package/dist/components/Link/utils/url.es.js +0 -17
- package/dist/components/Link/utils/url.es.js.map +0 -1
- package/dist/components/RichTextEditor/RichTextEditor.es.js +0 -42
- package/dist/components/RichTextEditor/RichTextEditor.es.js.map +0 -1
- package/dist/components/RichTextEditor/SerializedText.es.js +0 -20
- package/dist/components/RichTextEditor/SerializedText.es.js.map +0 -1
- package/dist/components/RichTextEditor/constants.es.js +0 -5
- package/dist/components/RichTextEditor/constants.es.js.map +0 -1
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js +0 -35
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +0 -54
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js +0 -12
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +0 -17
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +0 -30
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +0 -16
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +0 -43
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js +0 -25
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js +0 -20
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js +0 -26
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +0 -69
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +0 -105
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js +0 -20
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js +0 -32
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +0 -58
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js +0 -19
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js +0 -26
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +0 -43
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js +0 -18
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +0 -62
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js +0 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +0 -25
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +0 -35
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +0 -86
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +0 -24
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js +0 -19
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js +0 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +0 -11
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js +0 -10
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js +0 -81
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js +0 -18
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js +0 -17
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js +0 -14
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +0 -53
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +0 -19
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +0 -43
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +0 -53
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +0 -29
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +0 -8
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +0 -66
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +0 -40
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +0 -93
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +0 -25
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +0 -27
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +0 -12
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js +0 -5
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +0 -39
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +0 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +0 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +0 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +0 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +0 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +0 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +0 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js +0 -40
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +0 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +0 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +0 -41
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +0 -49
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +0 -1
- package/dist/components/RichTextEditor/plugins/styles.es.js +0 -167
- package/dist/components/RichTextEditor/plugins/styles.es.js.map +0 -1
- package/dist/helpers/addHttps.es.js +0 -14
- package/dist/helpers/addHttps.es.js.map +0 -1
- package/dist/helpers/convertToRichTextValue.es.js +0 -6
- package/dist/helpers/convertToRichTextValue.es.js.map +0 -1
- package/dist/helpers/customCoordinatesGetterFactory.es.js +0 -32
- package/dist/helpers/customCoordinatesGetterFactory.es.js.map +0 -1
- package/dist/helpers/hasRichTextValue.es.js +0 -15
- package/dist/helpers/hasRichTextValue.es.js.map +0 -1
- package/dist/helpers/isDownloadable.es.js +0 -6
- package/dist/helpers/isDownloadable.es.js.map +0 -1
- package/dist/helpers/mapColorPalettes.es.js +0 -28
- package/dist/helpers/mapColorPalettes.es.js.map +0 -1
- package/dist/hooks/useAttachments.es.js +0 -53
- package/dist/hooks/useAttachments.es.js.map +0 -1
- package/dist/hooks/useDndSensors.es.js +0 -20
- package/dist/hooks/useDndSensors.es.js.map +0 -1
- package/dist/index.cjs.js +0 -4
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -1191
- package/dist/index.es.js +0 -217
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -4
- package/dist/index.umd.js.map +0 -1
- package/dist/settings/background.es.js +0 -22
- package/dist/settings/background.es.js.map +0 -1
- package/dist/settings/border.es.js +0 -61
- package/dist/settings/border.es.js.map +0 -1
- package/dist/settings/borderRadius.es.js +0 -56
- package/dist/settings/borderRadius.es.js.map +0 -1
- package/dist/settings/borderRadiusExtended.es.js +0 -64
- package/dist/settings/borderRadiusExtended.es.js.map +0 -1
- package/dist/settings/defaultValues.es.js +0 -19
- package/dist/settings/defaultValues.es.js.map +0 -1
- package/dist/settings/gutter.es.js +0 -56
- package/dist/settings/gutter.es.js.map +0 -1
- package/dist/settings/margin.es.js +0 -53
- package/dist/settings/margin.es.js.map +0 -1
- package/dist/settings/marginExtended.es.js +0 -65
- package/dist/settings/marginExtended.es.js.map +0 -1
- package/dist/settings/padding.es.js +0 -53
- package/dist/settings/padding.es.js.map +0 -1
- package/dist/settings/paddingExtended.es.js +0 -65
- package/dist/settings/paddingExtended.es.js.map +0 -1
- package/dist/settings/securityDownloadable.es.js +0 -19
- package/dist/settings/securityDownloadable.es.js.map +0 -1
- package/dist/settings/securityGlobalControl.es.js +0 -33
- package/dist/settings/securityGlobalControl.es.js.map +0 -1
- package/dist/settings/types.es.js +0 -48
- package/dist/settings/types.es.js.map +0 -1
- package/dist/styles.css +0 -1
- package/dist/styles.css.es.js +0 -5
- package/dist/styles.css.es.js.map +0 -1
- package/dist/utilities/color/getReadableColor.es.js +0 -14
- package/dist/utilities/color/getReadableColor.es.js.map +0 -1
- package/dist/utilities/color/isDark.es.js +0 -10
- package/dist/utilities/color/isDark.es.js.map +0 -1
- package/dist/utilities/color/setAlpha.es.js +0 -6
- package/dist/utilities/color/setAlpha.es.js.map +0 -1
- package/dist/utilities/color/toColorObject.es.js +0 -9
- package/dist/utilities/color/toColorObject.es.js.map +0 -1
- package/dist/utilities/color/toHex8String.es.js +0 -7
- package/dist/utilities/color/toHex8String.es.js.map +0 -1
- package/dist/utilities/color/toHexString.es.js +0 -7
- package/dist/utilities/color/toHexString.es.js.map +0 -1
- package/dist/utilities/color/toRgbaString.es.js +0 -7
- package/dist/utilities/color/toRgbaString.es.js.map +0 -1
- package/dist/utilities/color/toShortRgba.es.js +0 -11
- package/dist/utilities/color/toShortRgba.es.js.map +0 -1
- package/dist/utilities/moveItemInArray.es.js +0 -12
- package/dist/utilities/moveItemInArray.es.js.map +0 -1
- package/dist/utilities/react/getBackgroundColorStyles.es.js +0 -8
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +0 -1
- package/dist/utilities/react/getBorderStyles.es.js +0 -12
- package/dist/utilities/react/getBorderStyles.es.js.map +0 -1
- package/dist/utilities/react/getRadiusStyles.es.js +0 -8
- package/dist/utilities/react/getRadiusStyles.es.js.map +0 -1
- package/dist/utilities/react/joinClassNames.es.js +0 -5
- package/dist/utilities/react/joinClassNames.es.js.map +0 -1
- /package/{postcss.config.js → postcss.config.cjs} +0 -0
- /package/{tailwind.config.js → tailwind.config.ts} +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Security as t } from "./types.es.js";
|
|
2
|
-
const c = (e) => {
|
|
3
|
-
const r = d(e == null ? void 0 : e.globalControlId);
|
|
4
|
-
return {
|
|
5
|
-
id: e != null && e.id ? e.id : "downloadable",
|
|
6
|
-
type: "switch",
|
|
7
|
-
defaultValue: !1,
|
|
8
|
-
label: "Downloadable",
|
|
9
|
-
show: (a) => {
|
|
10
|
-
var l;
|
|
11
|
-
return ((l = a.getBlock(r)) == null ? void 0 : l.value) === t.Custom;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}, d = (e) => e || "security";
|
|
15
|
-
export {
|
|
16
|
-
c as getSecurityDownloadableSetting,
|
|
17
|
-
d as getSecurityGlobalControlId
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=securityDownloadable.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"securityDownloadable.es.js","sources":["../../src/settings/securityDownloadable.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from '..';\nimport { Security } from './types';\n\n/**\n * Returns the downloadable security settings.\n *\n * @param {string} id custom id for the setting block\n * @param {string} globalControlId custom id for the global control setting block\n *\n * @returns {SettingBlock} Returns downloadable security settings.\n */\n\ntype SecurityDownloadableSettingType = {\n id?: string;\n globalControlId?: string;\n};\n\nexport const getSecurityDownloadableSetting = (options?: SecurityDownloadableSettingType): SettingBlock => {\n const securityId = getSecurityGlobalControlId(options?.globalControlId);\n return {\n id: options?.id ? options.id : 'downloadable',\n type: 'switch',\n defaultValue: false,\n label: 'Downloadable',\n show: (bundle) => bundle.getBlock(securityId)?.value === Security.Custom,\n };\n};\n\nexport const getSecurityGlobalControlId = (id?: string): string => {\n return id || 'security';\n};\n"],"names":["getSecurityDownloadableSetting","options","securityId","getSecurityGlobalControlId","bundle","_a","Security","id"],"mappings":";AAmBa,MAAAA,IAAiC,CAACC,MAA4D;AACjG,QAAAC,IAAaC,EAA2BF,KAAA,gBAAAA,EAAS,eAAe;AAC/D,SAAA;AAAA,IACH,IAAIA,KAAA,QAAAA,EAAS,KAAKA,EAAQ,KAAK;AAAA,IAC/B,MAAM;AAAA,IACN,cAAc;AAAA,IACd,OAAO;AAAA,IACP,MAAM,CAACG,MAAW;;AAAA,eAAAC,IAAAD,EAAO,SAASF,CAAU,MAA1B,gBAAAG,EAA6B,WAAUC,EAAS;AAAA;AAAA,EAAA;AAE1E,GAEaH,IAA6B,CAACI,MAChCA,KAAM;"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import "../styles.css.es.js";
|
|
2
|
-
import { createFooter as o } from "@frontify/sidebar-settings";
|
|
3
|
-
import { Security as e } from "./types.es.js";
|
|
4
|
-
import { getSecurityGlobalControlId as l } from "./securityDownloadable.es.js";
|
|
5
|
-
const c = (t) => [
|
|
6
|
-
{
|
|
7
|
-
id: l(t),
|
|
8
|
-
type: "segmentedControls",
|
|
9
|
-
defaultValue: e.Global,
|
|
10
|
-
choices: [
|
|
11
|
-
{
|
|
12
|
-
value: e.Global,
|
|
13
|
-
label: "Global Settings"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
value: e.Custom,
|
|
17
|
-
label: "Custom"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "globalSettingsInfo",
|
|
23
|
-
type: "notification",
|
|
24
|
-
footer: o({
|
|
25
|
-
label: "Change global settings [here].",
|
|
26
|
-
replace: { here: { event: "general-settings.open" } }
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
];
|
|
30
|
-
export {
|
|
31
|
-
c as getSecurityGlobalControlSetting
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=securityGlobalControl.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"securityGlobalControl.es.js","sources":["../../src/settings/securityGlobalControl.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock, createFooter } from '..';\nimport { Security } from './types';\nimport { getSecurityGlobalControlId } from './securityDownloadable';\n\n/**\n * Returns segment controls for global security settings.\n *\n * @param {string} id custom id for the setting block\n *\n * @returns {SettingBlock} Returns\n */\n\nexport const getSecurityGlobalControlSetting = (id?: string): SettingBlock[] => {\n const securityId = getSecurityGlobalControlId(id);\n return [\n {\n id: securityId,\n type: 'segmentedControls',\n defaultValue: Security.Global,\n choices: [\n {\n value: Security.Global,\n label: 'Global Settings',\n },\n {\n value: Security.Custom,\n label: 'Custom',\n },\n ],\n },\n {\n id: 'globalSettingsInfo',\n type: 'notification',\n footer: createFooter({\n label: 'Change global settings [here].',\n replace: { here: { event: 'general-settings.open' } },\n }),\n },\n ];\n};\n"],"names":["getSecurityGlobalControlSetting","id","getSecurityGlobalControlId","Security","createFooter"],"mappings":";;;;AAca,MAAAA,IAAkC,CAACC,MAErC;AAAA,EACH;AAAA,IACI,IAHWC,EAA2BD,CAAE;AAAA,IAIxC,MAAM;AAAA,IACN,cAAcE,EAAS;AAAA,IACvB,SAAS;AAAA,MACL;AAAA,QACI,OAAOA,EAAS;AAAA,QAChB,OAAO;AAAA,MACX;AAAA,MACA;AAAA,QACI,OAAOA,EAAS;AAAA,QAChB,OAAO;AAAA,MACX;AAAA,IACJ;AAAA,EACJ;AAAA,EACA;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQC,EAAa;AAAA,MACjB,OAAO;AAAA,MACP,SAAS,EAAE,MAAM,EAAE,OAAO,0BAA0B;AAAA,IAAA,CACvD;AAAA,EACL;AAAA;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var l = /* @__PURE__ */ ((e) => (e.Solid = "Solid", e.Dashed = "Dashed", e.Dotted = "Dotted", e))(l || {});
|
|
2
|
-
const p = {
|
|
3
|
-
Solid: "solid",
|
|
4
|
-
Dotted: "dotted",
|
|
5
|
-
Dashed: "dashed"
|
|
6
|
-
};
|
|
7
|
-
var o = /* @__PURE__ */ ((e) => (e.None = "None", e.Small = "Small", e.Medium = "Medium", e.Large = "Large", e))(o || {});
|
|
8
|
-
const x = {
|
|
9
|
-
None: "0px",
|
|
10
|
-
Small: "2px",
|
|
11
|
-
Medium: "4px",
|
|
12
|
-
Large: "12px"
|
|
13
|
-
};
|
|
14
|
-
var a = /* @__PURE__ */ ((e) => (e.None = "None", e.Small = "Small", e.Medium = "Medium", e.Large = "Large", e))(a || {});
|
|
15
|
-
const d = {
|
|
16
|
-
None: "0px",
|
|
17
|
-
Small: "24px",
|
|
18
|
-
Medium: "36px",
|
|
19
|
-
Large: "60px"
|
|
20
|
-
};
|
|
21
|
-
var t = /* @__PURE__ */ ((e) => (e.None = "None", e.Small = "Small", e.Medium = "Medium", e.Large = "Large", e))(t || {});
|
|
22
|
-
const u = {
|
|
23
|
-
None: "0px",
|
|
24
|
-
Small: "24px",
|
|
25
|
-
Medium: "36px",
|
|
26
|
-
Large: "60px"
|
|
27
|
-
};
|
|
28
|
-
var r = /* @__PURE__ */ ((e) => (e.Global = "Global", e.Custom = "Custom", e))(r || {}), m = /* @__PURE__ */ ((e) => (e.Auto = "Auto", e.S = "S", e.M = "M", e.L = "L", e))(m || {});
|
|
29
|
-
const S = {
|
|
30
|
-
Auto: "4px",
|
|
31
|
-
S: "10px",
|
|
32
|
-
M: "30px",
|
|
33
|
-
L: "50px"
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
l as BorderStyle,
|
|
37
|
-
m as GutterSpacing,
|
|
38
|
-
t as Margin,
|
|
39
|
-
a as Padding,
|
|
40
|
-
o as Radius,
|
|
41
|
-
r as Security,
|
|
42
|
-
p as borderStyleMap,
|
|
43
|
-
S as gutterSpacingStyleMap,
|
|
44
|
-
u as marginStyleMap,
|
|
45
|
-
d as paddingStyleMap,
|
|
46
|
-
x as radiusStyleMap
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=types.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.es.js","sources":["../../src/settings/types.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/sidebar-settings';\n\nexport enum BorderStyle {\n Solid = 'Solid',\n Dashed = 'Dashed',\n Dotted = 'Dotted',\n}\n\nexport const borderStyleMap: Record<BorderStyle, string> = {\n [BorderStyle.Solid]: 'solid',\n [BorderStyle.Dotted]: 'dotted',\n [BorderStyle.Dashed]: 'dashed',\n};\n\nexport enum Radius {\n None = 'None',\n Small = 'Small',\n Medium = 'Medium',\n Large = 'Large',\n}\n\nexport const radiusStyleMap: Record<Radius, string> = {\n [Radius.None]: '0px',\n [Radius.Small]: '2px',\n [Radius.Medium]: '4px',\n [Radius.Large]: '12px',\n};\n\nexport enum Padding {\n None = 'None',\n Small = 'Small',\n Medium = 'Medium',\n Large = 'Large',\n}\n\nexport const paddingStyleMap: Record<Padding, string> = {\n [Padding.None]: '0px',\n [Padding.Small]: '24px',\n [Padding.Medium]: '36px',\n [Padding.Large]: '60px',\n};\n\nexport type PaddingSettings = {\n paddingChoice: Padding;\n hasCustomPaddingValue: boolean;\n paddingValue: string;\n};\n\nexport type PaddingExtendedSettings = {\n hasExtendedCustomPadding: boolean;\n extendedPaddingChoice: Padding;\n extendedPaddingTop: string;\n extendedPaddingRight: string;\n extendedPaddingBottom: string;\n extendedPaddingLeft: string;\n};\n\nexport type RadiusExtendedSettings = {\n hasExtendedCustomRadius: boolean;\n extendedRadiusChoice: Radius;\n extendedRadiusTopLeft: string;\n extendedRadiusTopRight: string;\n extendedRadiusBottomLeft: string;\n extendedRadiusBottomRight: string;\n};\n\nexport type BorderSettings = {\n hasBorder: boolean;\n borderStyle: BorderStyle;\n borderWidth: string;\n borderColor: Color;\n};\n\nexport type RadiusSettings = {\n hasRadius: boolean;\n radiusValue: string;\n radiusChoice: Radius;\n};\n\nexport enum Margin {\n None = 'None',\n Small = 'Small',\n Medium = 'Medium',\n Large = 'Large',\n}\n\nexport const marginStyleMap: Record<Margin, string> = {\n [Margin.None]: '0px',\n [Margin.Small]: '24px',\n [Margin.Medium]: '36px',\n [Margin.Large]: '60px',\n};\n\nexport type MarginSettings = {\n marginChoice: Margin;\n hasCustomMarginValue: boolean;\n marginValue: string;\n};\n\nexport type MarginExtendedSettings = {\n hasExtendedCustomMargin: boolean;\n extendedMarginChoice: Margin;\n extendedMarginTop: string;\n extendedMarginRight: string;\n extendedMarginBottom: string;\n extendedMarginLeft: string;\n};\n\nexport enum Security {\n Global = 'Global',\n Custom = 'Custom',\n}\n\nexport enum GutterSpacing {\n Auto = 'Auto',\n S = 'S',\n M = 'M',\n L = 'L',\n}\n\nexport const gutterSpacingStyleMap: Record<GutterSpacing, string> = {\n [GutterSpacing.Auto]: '4px',\n [GutterSpacing.S]: '10px',\n [GutterSpacing.M]: '30px',\n [GutterSpacing.L]: '50px',\n};\n"],"names":["BorderStyle","borderStyleMap","Radius","radiusStyleMap","Padding","paddingStyleMap","Margin","marginStyleMap","Security","GutterSpacing","gutterSpacingStyleMap"],"mappings":"AAIY,IAAAA,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,SAAS,UAHDA,IAAAA,KAAA,CAAA,CAAA;AAML,MAAMC,IAA8C;AAAA,EACtD,OAAoB;AAAA,EACpB,QAAqB;AAAA,EACrB,QAAqB;AAC1B;AAEY,IAAAC,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAJAA,IAAAA,KAAA,CAAA,CAAA;AAOL,MAAMC,IAAyC;AAAA,EACjD,MAAc;AAAA,EACd,OAAe;AAAA,EACf,QAAgB;AAAA,EAChB,OAAe;AACpB;AAEY,IAAAC,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAJAA,IAAAA,KAAA,CAAA,CAAA;AAOL,MAAMC,IAA2C;AAAA,EACnD,MAAe;AAAA,EACf,OAAgB;AAAA,EAChB,QAAiB;AAAA,EACjB,OAAgB;AACrB;AAuCY,IAAAC,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAJAA,IAAAA,KAAA,CAAA,CAAA;AAOL,MAAMC,IAAyC;AAAA,EACjD,MAAc;AAAA,EACd,OAAe;AAAA,EACf,QAAgB;AAAA,EAChB,OAAe;AACpB;AAiBY,IAAAC,sBAAAA,OACRA,EAAA,SAAS,UACTA,EAAA,SAAS,UAFDA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,IAAI,KACJA,EAAA,IAAI,KACJA,EAAA,IAAI,KAJIA,IAAAA,KAAA,CAAA,CAAA;AAOL,MAAMC,IAAuD;AAAA,EAC/D,MAAqB;AAAA,EACrB,GAAkB;AAAA,EAClB,GAAkB;AAAA,EAClB,GAAkB;AACvB;"}
|
package/dist/styles.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
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-isolate{isolation:isolate}.tw-z-20{z-index:20}.tw-z-\[2\]{z-index:2}.tw-z-\[60\]{z-index:60}.tw-m-0{margin:0}.tw-my-4{margin-top:1rem;margin-bottom:1rem}.-tw-mr-2{margin-right:-.5rem}.tw-mr-2{margin-right:.5rem}.tw-mt-1{margin-top:.25rem}.tw-mt-3{margin-top:.75rem}.tw-mt-5{margin-top:1.25rem}.tw-mt-8{margin-top:2rem}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-h-0{height:0px}.tw-h-10{height:2.5rem}.tw-h-6{height:1.5rem}.tw-h-8{height:2rem}.tw-h-9{height:2.25rem}.tw-h-\[26px\]{height:26px}.tw-h-\[72px\]{height:72px}.tw-h-full{height:100%}.tw-min-h-\[10px\]{min-height:10px}.tw-w-0{width:0px}.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-none{flex:none}.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-grab{cursor:grab!important}.\!tw-cursor-not-allowed{cursor:not-allowed!important}.tw-cursor-grab{cursor:grab}.tw-cursor-grabbing{cursor:grabbing}.tw-cursor-pointer{cursor:pointer}.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-px{gap:1px}.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-divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(var(--line-width) * var(--tw-divide-x-reverse));border-left-width:calc(var(--line-width) * calc(1 - var(--tw-divide-x-reverse)))}.tw-divide-line-strong>:not([hidden])~:not([hidden]){border-color:var(--line-color-strong)}.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-whitespace-pre-wrap{white-space:pre-wrap}.tw-rounded{border-radius:var(--radius)}.tw-rounded-full{border-radius:9999px}.tw-rounded-md{border-radius:.375rem}.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-button-border{border-color:var(--button-border-color)}.tw-border-line-strong{border-color:var(--line-color-strong)}.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-pressed{background-color:var(--box-neutral-color-pressed)}.tw-bg-box-neutral-strong-inverse{background-color:var(--box-neutral-strong-inverse-color)}.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-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-px{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-1{padding-bottom:.25rem}.tw-pb-1\.5{padding-bottom:.375rem}.tw-pl-12{padding-left:3rem}.tw-pl-14{padding-left:3.5rem}.tw-pl-3{padding-left:.75rem}.tw-pl-3\.5{padding-left:.875rem}.tw-pl-7{padding-left:1.75rem}.tw-pr-2{padding-right:.5rem}.tw-pr-2\.5{padding-right:.625rem}.tw-pr-3{padding-right:.75rem}.tw-pr-3\.5{padding-right:.875rem}.tw-pt-1{padding-top:.25rem}.tw-pt-1\.5{padding-top:.375rem}.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-body-small{font-size:var(--body-size-small);line-height:var(--body-size-small-line-height)}.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-leading-none{line-height:1}.tw-text-blank-state-shaded{--tw-text-opacity: 1;color:rgb(114 116 116 / var(--tw-text-opacity))}.tw-text-box-neutral-inverse{color:var(--box-neutral-inverse-color)}.tw-text-box-neutral-inverse-pressed{color:var(--box-neutral-inverse-color-pressed)}.tw-text-box-neutral-strong{color:var(--box-neutral-strong-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-text{color:var(--text-color)}.tw-text-text-negative{color:var(--text-color-negative)}.tw-text-text-weak{color:var(--text-color-weak)}.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-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px 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-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)}.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-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-z-10:focus-visible{z-index:10}.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-cursor-grabbing:active{cursor:grabbing}.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-pressed:active{background-color:var(--box-neutral-color-pressed)}.active\:tw-bg-box-neutral-strong-inverse-pressed:active{background-color:var(--box-neutral-strong-inverse-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))}.active\:tw-text-box-neutral-inverse-pressed:active{color:var(--box-neutral-inverse-color-pressed)}.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}
|
package/dist/styles.css.es.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TinyColor as n, readability as c } from "@ctrl/tinycolor";
|
|
2
|
-
import { toShortRgba as i } from "./toShortRgba.es.js";
|
|
3
|
-
const s = (r) => typeof r == "object" && ["red", "green", "blue"].every((t) => r == null ? void 0 : r.hasOwnProperty(t)), a = (r, e) => {
|
|
4
|
-
const t = s(r) ? i(r) : r, p = s(e) ? i(e) : e;
|
|
5
|
-
let o = new n(t);
|
|
6
|
-
const d = new n(p);
|
|
7
|
-
for (; c(o, d) < 4.5; )
|
|
8
|
-
o = o.darken(1);
|
|
9
|
-
return o.toRgbString();
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
a as getReadableColor
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=getReadableColor.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getReadableColor.es.js","sources":["../../../src/utilities/color/getReadableColor.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ColorInput, TinyColor, readability } from '@ctrl/tinycolor';\nimport { toShortRgba } from './toShortRgba';\nimport { Color } from '@frontify/sidebar-settings';\n\n/**\n * Returns darkened text color for a given background color, so that it is readable and has enough contrast (above 4.5)\n *\n * @param {Object} textColor Object of RGBA values\n * @param {Object} backgroundColor Object of RGBA values\n * @returns {string} To be used as css value\n */\n\nconst isRgbaLongFormat = (value: unknown): value is Color => {\n const requiredKeys = ['red', 'green', 'blue'];\n return typeof value === 'object' && requiredKeys.every((i) => value?.hasOwnProperty(i));\n};\n\nexport const getReadableColor = (textColor: unknown, backgroundColor: unknown): string => {\n const inputTextColor = isRgbaLongFormat(textColor) ? toShortRgba(textColor) : (textColor as ColorInput);\n const inputBackgroundColor = isRgbaLongFormat(backgroundColor)\n ? toShortRgba(backgroundColor)\n : (backgroundColor as ColorInput);\n let parsedTextColor = new TinyColor(inputTextColor);\n const parsedBackgroundColor = new TinyColor(inputBackgroundColor);\n\n //darken the text color until readability is good\n while (readability(parsedTextColor, parsedBackgroundColor) < 4.5) {\n parsedTextColor = parsedTextColor.darken(1);\n }\n\n return parsedTextColor.toRgbString();\n};\n"],"names":["isRgbaLongFormat","value","i","getReadableColor","textColor","backgroundColor","inputTextColor","toShortRgba","inputBackgroundColor","parsedTextColor","TinyColor","parsedBackgroundColor","readability"],"mappings":";;AAcA,MAAMA,IAAmB,CAACC,MAEf,OAAOA,KAAU,YADH,CAAC,OAAO,SAAS,MAAM,EACK,MAAM,CAACC,MAAMD,KAAA,gBAAAA,EAAO,eAAeC,EAAE,GAG7EC,IAAmB,CAACC,GAAoBC,MAAqC;AACtF,QAAMC,IAAiBN,EAAiBI,CAAS,IAAIG,EAAYH,CAAS,IAAKA,GACzEI,IAAuBR,EAAiBK,CAAe,IACvDE,EAAYF,CAAe,IAC1BA;AACH,MAAAI,IAAkB,IAAIC,EAAUJ,CAAc;AAC5C,QAAAK,IAAwB,IAAID,EAAUF,CAAoB;AAGhE,SAAOI,EAAYH,GAAiBE,CAAqB,IAAI;AACvC,IAAAF,IAAAA,EAAgB,OAAO,CAAC;AAG9C,SAAOA,EAAgB;AAC3B;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TinyColor as n } from "@ctrl/tinycolor";
|
|
2
|
-
import { toShortRgba as s } from "./toShortRgba.es.js";
|
|
3
|
-
const i = (r) => typeof r == "object" && ["red", "green", "blue"].every((o) => r == null ? void 0 : r.hasOwnProperty(o)), y = (r, e) => {
|
|
4
|
-
const o = i(r) ? s(r) : r, t = new n(o);
|
|
5
|
-
return e ? t.getBrightness() < e : t.isDark() || t.getAlpha() > 0.25 && t.getAlpha() < 1;
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
y as isDark
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=isDark.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isDark.es.js","sources":["../../../src/utilities/color/isDark.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ColorInput, TinyColor } from '@ctrl/tinycolor';\nimport { toShortRgba } from './toShortRgba';\nimport { Color } from '@frontify/sidebar-settings';\n\n/**\n * Calculates if text should be in a light color depending on color (e.g. background-color)\n *\n * @param {Object} value Object of RGBA values\n * @param {Number|undefined} threshold Threshold for the brightness\n * @returns {Boolean} Return if the color is dark\n */\n\nconst isRgbaLongFormat = (value: unknown): value is Color => {\n const requiredKeys = ['red', 'green', 'blue'];\n return typeof value === 'object' && requiredKeys.every((i) => value?.hasOwnProperty(i));\n};\n\nexport const isDark = (color: unknown, threshold?: number): boolean => {\n const inputColor = isRgbaLongFormat(color) ? toShortRgba(color) : (color as ColorInput);\n const parsedColor = new TinyColor(inputColor);\n\n if (threshold) {\n return parsedColor.getBrightness() < threshold;\n }\n\n return parsedColor.isDark() || (parsedColor.getAlpha() > 0.25 && parsedColor.getAlpha() < 1);\n};\n"],"names":["isRgbaLongFormat","value","i","isDark","color","threshold","inputColor","toShortRgba","parsedColor","TinyColor"],"mappings":";;AAcA,MAAMA,IAAmB,CAACC,MAEf,OAAOA,KAAU,YADH,CAAC,OAAO,SAAS,MAAM,EACK,MAAM,CAACC,MAAMD,KAAA,gBAAAA,EAAO,eAAeC,EAAE,GAG7EC,IAAS,CAACC,GAAgBC,MAAgC;AACnE,QAAMC,IAAaN,EAAiBI,CAAK,IAAIG,EAAYH,CAAK,IAAKA,GAC7DI,IAAc,IAAIC,EAAUH,CAAU;AAE5C,SAAID,IACOG,EAAY,cAAkB,IAAAH,IAGlCG,EAAY,OAAa,KAAAA,EAAY,aAAa,QAAQA,EAAY,SAAa,IAAA;AAC9F;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setAlpha.es.js","sources":["../../../src/utilities/color/setAlpha.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { TinyColor } from '@ctrl/tinycolor';\n\n/**\n * Sets alpha value and returns rgba string.\n *\n * @param {string} color Rgb or hex string.\n * @returns {String} To be used as css value.\n */\n\nexport const setAlpha = (alpha: number, color?: string): string => {\n return new TinyColor(color).setAlpha(alpha).toRgbString();\n};\n"],"names":["setAlpha","alpha","color","TinyColor"],"mappings":";AAWa,MAAAA,IAAW,CAACC,GAAeC,MAC7B,IAAIC,EAAUD,CAAK,EAAE,SAASD,CAAK,EAAE;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toColorObject.es.js","sources":["../../../src/utilities/color/toColorObject.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\nimport { TinyColor } from '@ctrl/tinycolor';\n\n/**\n * Maps color strings to color objects.\n *\n * @param {String} String representing color\n * @returns {Color} Color object\n */\n\nexport const toColorObject = (colorString: string): Color => {\n const { r, g, b, a } = new TinyColor(colorString);\n return { red: r, green: g, blue: b, alpha: a };\n};\n"],"names":["toColorObject","colorString","g","b","a","TinyColor"],"mappings":";AAYa,MAAAA,IAAgB,CAACC,MAA+B;AACnD,QAAA,EAAE,GAAG,GAAAC,GAAG,GAAAC,GAAG,GAAAC,MAAM,IAAIC,EAAUJ,CAAW;AACzC,SAAA,EAAE,KAAK,GAAG,OAAOC,GAAG,MAAMC,GAAG,OAAOC;AAC/C;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toHex8String.es.js","sources":["../../../src/utilities/color/toHex8String.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { toShortRgba } from './toShortRgba';\n\n/**\n * Maps color object of rgba values to hex alpha string.\n *\n * @param {Object} Color object\n * @returns {String} To be used as css value.\n */\n\nexport const toHex8String = (color: Color): string => new TinyColor(toShortRgba(color)).toHex8String();\n"],"names":["toHex8String","color","TinyColor","toShortRgba"],"mappings":";;AAaa,MAAAA,IAAe,CAACC,MAAyB,IAAIC,EAAUC,EAAYF,CAAK,CAAC,EAAE,aAAa;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toHexString.es.js","sources":["../../../src/utilities/color/toHexString.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { toShortRgba } from './toShortRgba';\n\n/**\n * Maps color object of rgba values to hex alpha string.\n */\nexport const toHexString = (color: Color): string => new TinyColor(toShortRgba(color)).toHexString();\n"],"names":["toHexString","color","TinyColor","toShortRgba"],"mappings":";;AASa,MAAAA,IAAc,CAACC,MAAyB,IAAIC,EAAUC,EAAYF,CAAK,CAAC,EAAE,YAAY;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toRgbaString.es.js","sources":["../../../src/utilities/color/toRgbaString.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { toShortRgba } from './toShortRgba';\n\n/**\n * Maps color object of rgba values to rgba string.\n *\n * @param {Object} Color object\n * @returns {String} To be used as css value.\n */\n\nexport const toRgbaString = (color: Color): string => new TinyColor(toShortRgba(color)).toRgbString();\n"],"names":["toRgbaString","color","TinyColor","toShortRgba"],"mappings":";;AAaa,MAAAA,IAAe,CAACC,MAAyB,IAAIC,EAAUC,EAAYF,CAAK,CAAC,EAAE,YAAY;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const a = (e) => {
|
|
2
|
-
const n = (r) => typeof r == "object" && ["red", "green", "blue"].every((s) => r.hasOwnProperty(s)), o = (r) => {
|
|
3
|
-
const t = typeof r.alpha == "number" ? r.alpha : 1;
|
|
4
|
-
return { r: r.red, g: r.green, b: r.blue, a: t };
|
|
5
|
-
};
|
|
6
|
-
return n(e) ? o(e) : e;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
a as toShortRgba
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=toShortRgba.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toShortRgba.es.js","sources":["../../../src/utilities/color/toShortRgba.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Color } from '@frontify/fondue';\n\ntype ShortNotationColor = {\n r: number;\n g: number;\n b: number;\n a?: number;\n};\n\n/**\n * Maps color object from long to short rgba notation.\n *\n * @param {Object} Color object\n * @returns {Object} ShortNotationColor object\n */\n\nexport const toShortRgba = (color: unknown): ShortNotationColor => {\n const isRgbaLongFormat = (value: Color) => {\n const requiredKeys = ['red', 'green', 'blue'];\n return typeof value === 'object' && requiredKeys.every((i) => value.hasOwnProperty(i));\n };\n\n const mapToShortFormat = (value: Color): ShortNotationColor => {\n const alpha = typeof value.alpha === 'number' ? value.alpha : 1;\n return { r: value.red, g: value.green, b: value.blue, a: alpha };\n };\n\n if (isRgbaLongFormat(color as Color)) {\n return mapToShortFormat(color as Color);\n }\n\n return color as ShortNotationColor;\n};\n"],"names":["toShortRgba","color","isRgbaLongFormat","value","i","mapToShortFormat","alpha"],"mappings":"AAkBa,MAAAA,IAAc,CAACC,MAAuC;AACzD,QAAAC,IAAmB,CAACC,MAEf,OAAOA,KAAU,YADH,CAAC,OAAO,SAAS,MAAM,EACK,MAAM,CAACC,MAAMD,EAAM,eAAeC,CAAC,CAAC,GAGnFC,IAAmB,CAACF,MAAqC;AAC3D,UAAMG,IAAQ,OAAOH,EAAM,SAAU,WAAWA,EAAM,QAAQ;AACvD,WAAA,EAAE,GAAGA,EAAM,KAAK,GAAGA,EAAM,OAAO,GAAGA,EAAM,MAAM,GAAGG,EAAM;AAAA,EAAA;AAG/D,SAAAJ,EAAiBD,CAAc,IACxBI,EAAiBJ,CAAc,IAGnCA;AACX;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const l = (c, r, n) => {
|
|
2
|
-
const e = [...c], t = n < 0 ? e.length + n : n;
|
|
3
|
-
if (t >= 0 && t < e.length) {
|
|
4
|
-
const s = e.splice(r, 1)[0];
|
|
5
|
-
e.splice(t, 0, s);
|
|
6
|
-
}
|
|
7
|
-
return e;
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
l as moveItemInArray
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=moveItemInArray.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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,12 +0,0 @@
|
|
|
1
|
-
import { borderStyleMap as e, BorderStyle as d } from "../../settings/types.es.js";
|
|
2
|
-
import { BORDER_COLOR_DEFAULT_VALUE as l } from "../../settings/defaultValues.es.js";
|
|
3
|
-
import { toRgbaString as m } from "../color/toRgbaString.es.js";
|
|
4
|
-
const b = (r = d.Solid, o = "1px", t = l) => ({
|
|
5
|
-
borderStyle: e[r],
|
|
6
|
-
borderWidth: o,
|
|
7
|
-
borderColor: m(t)
|
|
8
|
-
});
|
|
9
|
-
export {
|
|
10
|
-
b as getBorderStyles
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=getBorderStyles.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joinClassNames.es.js","sources":["../../../src/utilities/react/joinClassNames.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\n/**\n * Cleans and joins an array of inputs with possible undefined or boolean values.\n *\n * @param {Array} classNames Array of class names\n * @returns Clean string to be used for class name.\n */\nexport const joinClassNames = (classNames: (string | undefined | boolean)[]): string =>\n classNames.filter(Boolean).join(' ');\n"],"names":["joinClassNames","classNames"],"mappings":"AAQa,MAAAA,IAAiB,CAACC,MAC3BA,EAAW,OAAO,OAAO,EAAE,KAAK,GAAG;"}
|
|
File without changes
|
|
File without changes
|