Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@snack-uikit/loaders

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snack-uikit/loaders - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

dist/components/types.d.ts

14

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# 0.5.0 (2023-12-14)
### BREAKING CHANGES
* **FF-3729:** replace enum with unions ([910db4a](https://github.com/cloud-ru-tech/snack-uikit/commit/910db4aa8231ccbc58e538e5c5c1f461b1dec275))
## 0.4.1 (2023-12-06)

@@ -116,3 +127,4 @@

**Note:** Version bump only for package @snack-uikit/loaders
### Only dependencies have been changed
* [@snack-uikit/utils@3.2.0](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/utils/CHANGELOG.md)

@@ -119,0 +131,0 @@

12

dist/components/constants.d.ts

@@ -1,6 +0,6 @@

export declare enum LoaderSize {
XS = "xs",
S = "s",
M = "m",
L = "l"
}
export declare const LOADER_SIZE: {
readonly XS: "xs";
readonly S: "s";
readonly M: "m";
readonly L: "l";
};

@@ -1,7 +0,6 @@

export var LoaderSize;
(function (LoaderSize) {
LoaderSize["XS"] = "xs";
LoaderSize["S"] = "s";
LoaderSize["M"] = "m";
LoaderSize["L"] = "l";
})(LoaderSize || (LoaderSize = {}));
export const LOADER_SIZE = {
XS: 'xs',
S: 's',
M: 'm',
L: 'l',
};

@@ -1,6 +0,6 @@

import { WithSupportProps } from '@snack-uikit/utils';
declare enum Size {
S = "s",
XS = "xs"
}
import { ValueOf, WithSupportProps } from '@snack-uikit/utils';
declare const SIZE: {
readonly S: "s";
readonly XS: "xs";
};
export type ProgressBarProps = WithSupportProps<{

@@ -10,3 +10,3 @@ /** Процент загрузки от 0 до 100 */

/** Размер */
size: Size;
size: ValueOf<typeof SIZE>;
/** CSS-класс */

@@ -17,5 +17,2 @@ className?: string;

export declare function ProgressBar({ progress, size, className, ...rest }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
export declare namespace ProgressBar {
var sizes: typeof Size;
}
export {};

@@ -15,8 +15,7 @@ var __rest = (this && this.__rest) || function (s, e) {

import { extractSupportProps } from '@snack-uikit/utils';
import classNames from './styles.module.css';
var Size;
(function (Size) {
Size["S"] = "s";
Size["XS"] = "xs";
})(Size || (Size = {}));
import styles from './styles.module.css';
const SIZE = {
S: 's',
XS: 'xs',
};
/** Компонент индикатор загрузки */

@@ -26,4 +25,3 @@ export function ProgressBar(_a) {

const roundedProgress = Math.max(Math.min(progress, 100), 0);
return (_jsx("div", Object.assign({ className: cn(classNames.progressBarContainer, className) }, extractSupportProps(rest), { "data-size": size }, { children: _jsx("div", { className: classNames.progressBarFiller, "data-test-id": 'progress-bar-filler', style: { '--progress': `${roundedProgress}%` } }) })));
return (_jsx("div", Object.assign({ className: cn(styles.progressBarContainer, className) }, extractSupportProps(rest), { "data-size": size }, { children: _jsx("div", { className: styles.progressBarFiller, "data-test-id": 'progress-bar-filler', style: { '--progress': `${roundedProgress}%` } }) })));
}
ProgressBar.sizes = Size;
import { WithSupportProps } from '@snack-uikit/utils';
import { LoaderSize } from '../constants';
import { LoaderSize } from '../types';
export type SpinnerProps = WithSupportProps<{

@@ -11,4 +11,1 @@ /** Размер */

export declare function Spinner({ size, className, ...rest }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
export declare namespace Spinner {
var sizes: typeof LoaderSize;
}

@@ -15,9 +15,8 @@ var __rest = (this && this.__rest) || function (s, e) {

import { extractSupportProps } from '@snack-uikit/utils';
import { LoaderSize } from '../constants';
import { LOADER_SIZE } from '../constants';
import styles from './styles.module.css';
/** Компонент спиннер */
export function Spinner(_a) {
var { size = LoaderSize.S, className } = _a, rest = __rest(_a, ["size", "className"]);
var { size = LOADER_SIZE.S, className } = _a, rest = __rest(_a, ["size", "className"]);
return (_jsxs("svg", Object.assign({ viewBox: '0 0 24 24', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', className: cn(styles.spinner, className) }, extractSupportProps(rest), { "data-size": size }, { children: [_jsxs("mask", Object.assign({ id: 'spinnerMask' }, { children: [_jsx("circle", { opacity: '0.24', cx: '11.8926', cy: '12', r: '9', strokeWidth: '1.5' }), _jsx("path", { d: 'M2.89258 12C2.89258 7.02944 6.92202 3 11.8926 3', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' })] })), _jsx("g", Object.assign({ mask: 'url(#spinnerMask)' }, { children: _jsx("path", { d: 'M0 0H24V24H0V0Z' }) }))] })));
}
Spinner.sizes = LoaderSize;
import { WithSupportProps } from '@snack-uikit/utils';
import { LoaderSize } from '../constants';
import { LoaderSize } from '../types';
export type SunProps = WithSupportProps<{

@@ -11,4 +11,1 @@ /** Размер */

export declare function Sun({ size, className, ...rest }: SunProps): import("react/jsx-runtime").JSX.Element;
export declare namespace Sun {
var sizes: typeof LoaderSize;
}

@@ -15,9 +15,8 @@ var __rest = (this && this.__rest) || function (s, e) {

import { extractSupportProps } from '@snack-uikit/utils';
import { LoaderSize } from '../constants';
import { LOADER_SIZE } from '../constants';
import styles from './styles.module.css';
/** Компонент спиннер */
export function Sun(_a) {
var { size = LoaderSize.S, className } = _a, rest = __rest(_a, ["size", "className"]);
var { size = LOADER_SIZE.S, className } = _a, rest = __rest(_a, ["size", "className"]);
return (_jsxs("svg", Object.assign({ viewBox: '0 0 24 24', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', id: 'SunSVG', className: cn(styles.sun, className) }, extractSupportProps(rest), { "data-size": size }, { children: [_jsx("path", { d: 'M12 4V7', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M6.34302 6.34314L8.46434 8.46446', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M4 12L7 12', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M6.34302 17.6569L8.46434 15.5355', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M12 17V20', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M15.5354 15.5355L17.6567 17.6568', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M17 12L20 12', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' }), _jsx("path", { d: 'M15.5354 8.46448L17.6567 6.34316', strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round' })] })));
}
Sun.sizes = LoaderSize;

@@ -7,3 +7,3 @@ {

"title": "Loaders",
"version": "0.4.1",
"version": "0.5.0",
"sideEffects": [

@@ -36,7 +36,7 @@ "*.css",

"dependencies": {
"@snack-uikit/utils": "3.1.0",
"@snack-uikit/utils": "3.2.0",
"@tanem/react-nprogress": "5.0.35",
"classnames": "2.3.2"
},
"gitHead": "76a159dde7baccf49dc7b11e1fd7abc31424b42f"
"gitHead": "bd39c5e674f3b91b0e2487782a04b15034cf3d8b"
}

@@ -11,7 +11,7 @@ # Loaders

```typescript jsx
import {ProgressBar, ProgressBarPage, Spinner, Sun} from "@snack-uikit/loaders";
import { ProgressBar, ProgressBarPage, Spinner, Sun } from "@snack-uikit/loaders";
<ProgressBar
progress={20}
size={ProgressBar.sizes.SizeXS}
size='xs'
/>

@@ -27,7 +27,7 @@

<Spinner
size={Spinner.sizes.XS}
size='xs'
/>
<Sun
size={Sun.sizes.L}
size='l'
/>

@@ -43,3 +43,3 @@ ```

|------|------|---------------|-------------|
| size* | enum Size: `"s"`, `"xs"` | - | Размер |
| size* | enum ValueOf<{ readonly S: "s"; readonly XS: "xs"; }>: `"s"`, `"xs"` | - | Размер |
| progress* | `number` | - | Процент загрузки от 0 до 100 |

@@ -62,3 +62,3 @@ | className | `string` | - | CSS-класс |

|------|------|---------------|-------------|
| size | enum LoaderSize: `"xs"`, `"s"`, `"m"`, `"l"` | LoaderSize.S | Размер |
| size | enum LoaderSize: `"s"`, `"xs"`, `"m"`, `"l"` | s | Размер |
| className | `string` | - | CSS-класс |

@@ -70,6 +70,6 @@ ## Sun

|------|------|---------------|-------------|
| size | enum LoaderSize: `"xs"`, `"s"`, `"m"`, `"l"` | LoaderSize.S | Размер |
| size | enum LoaderSize: `"s"`, `"xs"`, `"m"`, `"l"` | s | Размер |
| className | `string` | - | CSS-класс |
[//]: DOCUMENTATION_SECTION_END
[//]: DOCUMENTATION_SECTION_END

@@ -1,6 +0,6 @@

export enum LoaderSize {
XS = 'xs',
S = 's',
M = 'm',
L = 'l',
}
export const LOADER_SIZE = {
XS: 'xs',
S: 's',
M: 'm',
L: 'l',
} as const;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc