diff --git a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/LogoSpinner.js b/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/LogoSpinner.js deleted file mode 100644 index 10c377c48..000000000 --- a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/LogoSpinner.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright 2020-2021 Lowdefy, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -import React from 'react'; - -const LogoSpinner = ({ color, barColor }) => ( - <svg width="100%" height="100%" viewBox="0 0 94 91" version="1.1"> - <g> - <path - d="M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z" - style={{ fill: color || '#bfbfbf' }} - /> - <rect - className="loading-bar" - x={16} - y={15} - width={30} - height={59} - style={{ fill: barColor || '#f1f1f1' }} - /> - <rect - className="loading-bar-sm" - x={53} - y={52} - width={25} - height={25} - style={{ fill: barColor || '#f1f1f1' }} - /> - </g> - </svg> -); - -LogoSpinner.meta = { - icons: [], - styles: [], -}; - -export default LogoSpinner; diff --git a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/LogoSpinner.test.js b/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/LogoSpinner.test.js deleted file mode 100644 index f980b836f..000000000 --- a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/LogoSpinner.test.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright 2020-2021 Lowdefy, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -import React from 'react'; -import LogoSpinner from './LogoSpinner.js'; -import { render } from '@testing-library/react'; - -test('default', () => { - const { container } = render(<LogoSpinner />); - expect(container.firstChild).toMatchInlineSnapshot(` - <svg - height="100%" - version="1.1" - viewBox="0 0 94 91" - width="100%" - > - <g> - <path - d="M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z" - style="fill: #bfbfbf;" - /> - <rect - class="loading-bar" - height="59" - style="fill: #f1f1f1;" - width="30" - x="16" - y="15" - /> - <rect - class="loading-bar-sm" - height="25" - style="fill: #f1f1f1;" - width="25" - x="53" - y="52" - /> - </g> - </svg> - `); -}); - -test('color props', () => { - const { container } = render(<LogoSpinner color="red" barColor="green" />); - expect(container.firstChild).toMatchInlineSnapshot(` - <svg - height="100%" - version="1.1" - viewBox="0 0 94 91" - width="100%" - > - <g> - <path - d="M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z" - style="fill: red;" - /> - <rect - class="loading-bar" - height="59" - style="fill: green;" - width="30" - x="16" - y="15" - /> - <rect - class="loading-bar-sm" - height="25" - style="fill: green;" - width="25" - x="53" - y="52" - /> - </g> - </svg> - `); -}); diff --git a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/examples.yaml b/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/examples.yaml deleted file mode 100644 index e472d432d..000000000 --- a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/examples.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2020-2021 Lowdefy, Inc - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- id: default - type: LogoSpinner - description: Default diff --git a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/style.less b/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/style.less deleted file mode 100644 index 0241ad040..000000000 --- a/packages/plugins/blocks/blocks-loaders/src/blocks/LogoSpinner/style.less +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright 2020-2021 Lowdefy, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -.loading-bar { - animation: loading-bar-morph 0.5s linear alternate 0s infinite; - transform-origin: bottom; -} - -@keyframes loading-bar-morph { - 0% { - transform: scaleY(0.6); - } - 100% { - transform: scaleY(0.95) translateY(5%); - } -} - -.loading-bar-sm { - animation: loading-bar-morph-sm 0.5s linear alternate 0s infinite; - transform-origin: bottom; -} - -@keyframes loading-bar-morph-sm { - 0% { - transform: scaleY(1.4) translateY(5%); - } - 100% { - transform: scaleY(0.9); - } -} diff --git a/packages/plugins/blocks/blocks-loaders/src/blocks/Spinner/Spinner.js b/packages/plugins/blocks/blocks-loaders/src/blocks/Spinner/Spinner.js index 63310b5ae..b916ba68b 100644 --- a/packages/plugins/blocks/blocks-loaders/src/blocks/Spinner/Spinner.js +++ b/packages/plugins/blocks/blocks-loaders/src/blocks/Spinner/Spinner.js @@ -17,8 +17,6 @@ import React from 'react'; import { blockDefaultProps } from '@lowdefy/block-utils'; -import LogoSpinner from '../LogoSpinner/LogoSpinner.js'; - const Spinner = ({ properties, methods }) => { return ( <div @@ -31,10 +29,6 @@ const Spinner = ({ properties, methods }) => { })} > <div style={{ width: properties.size || 50, margin: 'auto', height: properties.size || 50 }}> - <LogoSpinner - color={properties.color} - barColor={properties.barColor || (properties.shaded === true ? '#f1f1f1' : '#fff')} - /> <div className={methods.makeCssClass({ textAlign: 'center',