@codacy/ui-components 0.65.44 → 0.65.46

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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MultiSliderProps } from './types';
3
+ export declare const MultiSlider: React.FC<MultiSliderProps>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.MultiSlider = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _styles = require("./styles");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ var _excluded = ["values", "min", "max", "size"];
14
+ var MultiSlider = exports.MultiSlider = function MultiSlider(_ref) {
15
+ var values = _ref.values,
16
+ _ref$min = _ref.min,
17
+ min = _ref$min === void 0 ? 0 : _ref$min,
18
+ _ref$max = _ref.max,
19
+ max = _ref$max === void 0 ? 100 : _ref$max,
20
+ _ref$size = _ref.size,
21
+ size = _ref$size === void 0 ? 'md' : _ref$size,
22
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SliderWrapper, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
24
+ size: size,
25
+ role: "progressbar",
26
+ children: values.map(function (value) {
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SliderBar, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, value), {}, {
28
+ max: max
29
+ }));
30
+ })
31
+ }));
32
+ };
@@ -0,0 +1 @@
1
+ export * from './MultiSlider';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _MultiSlider = require("./MultiSlider");
7
+ Object.keys(_MultiSlider).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _MultiSlider[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _MultiSlider[key];
14
+ }
15
+ });
16
+ });
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import { MultiSliderProps } from './types';
3
+ import { Color } from '../theme';
4
+ export declare const SliderWrapper: import("@emotion/styled").StyledComponent<{
5
+ theme?: import("@emotion/react").Theme | undefined;
6
+ as?: import("react").ElementType<any> | undefined;
7
+ } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
8
+ fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, import("../theme").CodacyTheme> | undefined;
9
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ } & import("..").FlexboxProps & import("..").GridboxProps & Pick<MultiSliderProps, "size">, {}, {}>;
12
+ export declare const SliderBar: import("@emotion/styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any> | undefined;
15
+ } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
16
+ fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, import("../theme").CodacyTheme> | undefined;
17
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
18
+ theme?: import("@emotion/react").Theme | undefined;
19
+ } & import("..").FlexboxProps & import("..").GridboxProps & {
20
+ value: number;
21
+ color: string | Color;
22
+ max: number;
23
+ }, {}, {}>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.SliderWrapper = exports.SliderBar = void 0;
8
+ var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
+ var _Flexbox = require("../Flexbox");
10
+ var SliderWrapper = exports.SliderWrapper = /*#__PURE__*/(0, _base["default"])(_Flexbox.Box, process.env.NODE_ENV === "production" ? {
11
+ target: "e1qxlj9b1"
12
+ } : {
13
+ target: "e1qxlj9b1",
14
+ label: "codacy"
15
+ })("background-color:", function (_ref) {
16
+ var theme = _ref.theme,
17
+ backgroundColor = _ref.backgroundColor;
18
+ return backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme.colors['background-brand'];
19
+ }, ";display:flex;height:", function (_ref2) {
20
+ var size = _ref2.size,
21
+ theme = _ref2.theme;
22
+ return size === 'sm' ? theme.space[1] : size === 'md' ? theme.space[2] : theme.space[3];
23
+ }, ";width:", function (_ref3) {
24
+ var width = _ref3.width;
25
+ return width !== null && width !== void 0 ? width : '100%';
26
+ }, ";border-radius:", function (_ref4) {
27
+ var theme = _ref4.theme;
28
+ return theme.radii[2];
29
+ }, ";overflow:hidden;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9NdWx0aVNsaWRlci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3dFIiwiZmlsZSI6Ii4uLy4uL3NyYy9NdWx0aVNsaWRlci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ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WdodDogJHsoeyB0aGVtZSB9KSA9PiBgMnB4IHNvbGlkICR7dGhlbWUuY29sb3JzWydiYWNrZ3JvdW5kLXByaW1hcnknXX0gYH07XG5gXG4iXX0= */"));
30
+ var SliderBar = exports.SliderBar = /*#__PURE__*/(0, _base["default"])(_Flexbox.Box, process.env.NODE_ENV === "production" ? {
31
+ target: "e1qxlj9b0"
32
+ } : {
33
+ target: "e1qxlj9b0",
34
+ label: "codacy"
35
+ })("height:100%;background-color:", function (props) {
36
+ return props.color;
37
+ }, ";width:calc(", function (props) {
38
+ return props.value / props.max * 100;
39
+ }, "% - 2px);border-right:", function (_ref5) {
40
+ var theme = _ref5.theme;
41
+ return "2px solid ".concat(theme.colors['background-primary'], " ");
42
+ }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9NdWx0aVNsaWRlci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYTJGIiwiZmlsZSI6Ii4uLy4uL3NyYy9NdWx0aVNsaWRlci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IEJveCB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBNdWx0aVNsaWRlclByb3BzIH0gZnJvbSAnLi90eXBlcydcbmltcG9ydCB7IENvbG9yIH0gZnJvbSAnLi4vdGhlbWUnXG5cbmV4cG9ydCBjb25zdCBTbGlkZXJXcmFwcGVyID0gc3R5bGVkKEJveCk8UGljazxNdWx0aVNsaWRlclByb3BzLCAnc2l6ZSc+PmBcbiAgYmFja2dyb3VuZC1jb2xvcjogJHsoeyB0aGVtZSwgYmFja2dyb3VuZENvbG9yIH0pID0+IGJhY2tncm91bmRDb2xvciA/PyB0aGVtZS5jb2xvcnNbJ2JhY2tncm91bmQtYnJhbmQnXX07XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGhlaWdodDogJHsoeyBzaXplLCB0aGVtZSB9KSA9PiAoc2l6ZSA9PT0gJ3NtJyA/IHRoZW1lLnNwYWNlWzFdIDogc2l6ZSA9PT0gJ21kJyA/IHRoZW1lLnNwYWNlWzJdIDogdGhlbWUuc3BhY2VbM10pfTtcbiAgd2lkdGg6ICR7KHsgd2lkdGggfSkgPT4gd2lkdGggPz8gJzEwMCUnfTtcbiAgYm9yZGVyLXJhZGl1czogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5yYWRpaVsyXX07XG4gIG92ZXJmbG93OiBoaWRkZW47XG5gXG5leHBvcnQgY29uc3QgU2xpZGVyQmFyID0gc3R5bGVkKEJveCk8eyB2YWx1ZTogbnVtYmVyOyBjb2xvcjogc3RyaW5nIHwgQ29sb3I7IG1heDogbnVtYmVyIH0+YFxuICBoZWlnaHQ6IDEwMCU7XG4gIGJhY2tncm91bmQtY29sb3I6ICR7cHJvcHMgPT4gcHJvcHMuY29sb3J9O1xuICB3aWR0aDogY2FsYygke3Byb3BzID0+IChwcm9wcy52YWx1ZSAvIHByb3BzLm1heCkgKiAxMDB9JSAtIDJweCk7XG4gIGJvcmRlci1yaWdodDogJHsoeyB0aGVtZSB9KSA9PiBgMnB4IHNvbGlkICR7dGhlbWUuY29sb3JzWydiYWNrZ3JvdW5kLXByaW1hcnknXX0gYH07XG5gXG4iXX0= */"));
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from '../types';
2
+ import { BoxProps } from '../Flexbox';
3
+ export interface MultiSliderProps extends BoxProps, ComponentProps {
4
+ values: {
5
+ value: number;
6
+ name: string;
7
+ color: string;
8
+ }[];
9
+ size?: 'sm' | 'md' | 'lg';
10
+ min?: number;
11
+ max?: number;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/lib/index.d.ts CHANGED
@@ -38,8 +38,10 @@ export * from './ScrollableContent';
38
38
  export * from './Switcher';
39
39
  export * from './Stepper';
40
40
  export * from './StepNumber';
41
+ export * from './BigTabs';
41
42
  export * from './hooks';
42
43
  export * from './types';
43
44
  export * from './system-props';
44
45
  export * from './ProgressBar';
45
46
  export * from './Slider';
47
+ export * from './MultiSlider';
package/lib/index.js CHANGED
@@ -443,6 +443,17 @@ Object.keys(_StepNumber).forEach(function (key) {
443
443
  }
444
444
  });
445
445
  });
446
+ var _BigTabs = require("./BigTabs");
447
+ Object.keys(_BigTabs).forEach(function (key) {
448
+ if (key === "default" || key === "__esModule") return;
449
+ if (key in exports && exports[key] === _BigTabs[key]) return;
450
+ Object.defineProperty(exports, key, {
451
+ enumerable: true,
452
+ get: function get() {
453
+ return _BigTabs[key];
454
+ }
455
+ });
456
+ });
446
457
  var _hooks = require("./hooks");
447
458
  Object.keys(_hooks).forEach(function (key) {
448
459
  if (key === "default" || key === "__esModule") return;
@@ -497,4 +508,15 @@ Object.keys(_Slider).forEach(function (key) {
497
508
  return _Slider[key];
498
509
  }
499
510
  });
511
+ });
512
+ var _MultiSlider = require("./MultiSlider");
513
+ Object.keys(_MultiSlider).forEach(function (key) {
514
+ if (key === "default" || key === "__esModule") return;
515
+ if (key in exports && exports[key] === _MultiSlider[key]) return;
516
+ Object.defineProperty(exports, key, {
517
+ enumerable: true,
518
+ get: function get() {
519
+ return _MultiSlider[key];
520
+ }
521
+ });
500
522
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.65.44",
3
+ "version": "0.65.46",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",