@pedidopago/ui 1.4.5 → 1.5.0
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/dist/components/Badge/styles.d.ts.map +1 -1
- package/dist/components/Badge/styles.js +1 -1
- package/dist/components/Button/styles.d.ts.map +1 -1
- package/dist/components/Button/styles.js +1 -1
- package/dist/components/DateInput/index.d.ts.map +1 -1
- package/dist/components/DateInput/index.js +1 -0
- package/dist/components/Dialog/index.js +2 -2
- package/dist/components/Icon/data/dash.d.ts.map +1 -1
- package/dist/components/Icon/data/dash.js +1 -1
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/Icon/types.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -2
- package/dist/components/MultipleSelect/components/OptionsArea/styles.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/OptionsArea/styles.js +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/SelectAreaWrapper.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/SelectAreaWrapper.js +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/SelectedOptionsArea.d.ts +3 -1
- package/dist/components/MultipleSelect/components/SelectArea/SelectedOptionsArea.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/SelectedOptionsArea.js +29 -21
- package/dist/components/MultipleSelect/components/SelectArea/index.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/index.js +2 -0
- package/dist/components/Progress/Circle/index.d.ts +2 -2
- package/dist/components/Progress/Circle/index.d.ts.map +1 -1
- package/dist/components/Progress/Circle/index.js +52 -35
- package/dist/components/Progress/Circle/styles.d.ts +28 -0
- package/dist/components/Progress/Circle/styles.d.ts.map +1 -0
- package/dist/components/Progress/Circle/styles.js +83 -0
- package/dist/components/Progress/Circle/types.d.ts +19 -0
- package/dist/components/Progress/Circle/types.d.ts.map +1 -0
- package/dist/components/Progress/Circle/types.js +1 -0
- package/dist/components/Progress/Linear/index.d.ts +2 -2
- package/dist/components/Progress/Linear/index.d.ts.map +1 -1
- package/dist/components/Progress/Linear/index.js +28 -25
- package/dist/components/Progress/Linear/styles.d.ts +16 -0
- package/dist/components/Progress/Linear/styles.d.ts.map +1 -0
- package/dist/components/Progress/Linear/styles.js +79 -0
- package/dist/components/Progress/Linear/types.d.ts +25 -0
- package/dist/components/Progress/Linear/types.d.ts.map +1 -0
- package/dist/components/Progress/Linear/types.js +1 -0
- package/dist/components/Progress/index.d.ts +2 -2
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +15 -45
- package/dist/components/Progress/types.d.ts +16 -0
- package/dist/components/Progress/types.d.ts.map +1 -0
- package/dist/components/Progress/types.js +1 -0
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +14 -0
- package/dist/components/Tabs/TabsExample.js +1 -0
- package/dist/components/Tabs/components/TabPanel.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabPanel.js +3 -1
- package/dist/components/Tabs/styles.d.ts +2 -0
- package/dist/components/Tabs/styles.d.ts.map +1 -1
- package/dist/components/Tabs/styles.js +3 -1
- package/dist/components/Tabs/types.d.ts +1 -0
- package/dist/components/Tabs/types.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -1
- package/dist/shared/hooks/devices.d.ts +9 -0
- package/dist/shared/hooks/devices.d.ts.map +1 -0
- package/dist/shared/hooks/devices.js +14 -0
- package/dist/shared/hooks/useBreakpoints.d.ts +26 -0
- package/dist/shared/hooks/useBreakpoints.d.ts.map +1 -0
- package/dist/shared/hooks/useBreakpoints.js +129 -0
- package/dist/shared/hooks/useDevices.d.ts +9 -0
- package/dist/shared/hooks/useDevices.d.ts.map +1 -0
- package/dist/shared/hooks/useDevices.js +61 -0
- package/dist/shared/hooks/useWindowSize.d.ts +4 -0
- package/dist/shared/hooks/useWindowSize.d.ts.map +1 -1
- package/dist/utils/colorToGray.d.ts +1 -1
- package/dist/utils/colorToGray.d.ts.map +1 -1
- package/dist/utils/getValuesBySize.d.ts +7 -0
- package/dist/utils/getValuesBySize.d.ts.map +1 -0
- package/dist/utils/getValuesBySize.js +10 -0
- package/package.json +1 -1
|
@@ -7,12 +7,24 @@ exports.LinearProgress = LinearProgress;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
+
var _Flex = _interopRequireDefault(require("../../../components/Flex"));
|
|
11
|
+
|
|
10
12
|
var _getSteps = require("../getSteps");
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _styles = require("./styles");
|
|
13
15
|
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
|
|
18
|
+
var _excluded = ["height", "showValue", "steps"];
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
16
28
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
29
|
|
|
18
30
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -25,14 +37,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
25
37
|
|
|
26
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
39
|
|
|
40
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
|
+
|
|
42
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
43
|
+
|
|
28
44
|
function LinearProgress(_ref) {
|
|
29
|
-
var
|
|
30
|
-
height = _ref.height,
|
|
31
|
-
isAnimated = _ref.isAnimated,
|
|
32
|
-
color = _ref.color,
|
|
33
|
-
grayColor = _ref.grayColor,
|
|
45
|
+
var height = _ref.height,
|
|
34
46
|
showValue = _ref.showValue,
|
|
35
|
-
steps = _ref.steps
|
|
47
|
+
steps = _ref.steps,
|
|
48
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
49
|
|
|
37
50
|
var _useState = (0, _react.useState)(),
|
|
38
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -40,26 +53,16 @@ function LinearProgress(_ref) {
|
|
|
40
53
|
setMetric = _useState2[1];
|
|
41
54
|
|
|
42
55
|
(0, _react.useEffect)(function () {
|
|
43
|
-
if (showValue === 'percent') setMetric(Math.round(percent));
|
|
44
|
-
if (showValue === 'step' && steps) setMetric((0, _getSteps.getSteps)(steps, percent));
|
|
45
|
-
}, [percent, showValue, steps]);
|
|
46
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
width: '100%',
|
|
50
|
-
alignItems: 'flex-end'
|
|
51
|
-
},
|
|
52
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_style.ProgressBar, {
|
|
56
|
+
if (showValue === 'percent') setMetric(Math.round(props.percent));
|
|
57
|
+
if (showValue === 'step' && steps) setMetric((0, _getSteps.getSteps)(steps, props.percent));
|
|
58
|
+
}, [props.percent, showValue, steps]);
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Flex.default, {
|
|
60
|
+
alignItems: "flex-end",
|
|
61
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ProgressBar, {
|
|
53
62
|
height: height,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
percent: percent,
|
|
57
|
-
isAnimated: isAnimated,
|
|
58
|
-
color: color
|
|
59
|
-
})
|
|
60
|
-
}), (showValue === 'percent' || showValue === 'step') && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_style.ValueLinear, {
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.PercentBar, _objectSpread({}, props))
|
|
64
|
+
}), (showValue === 'percent' || showValue === 'step') && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ValueLinear, {
|
|
61
65
|
height: height,
|
|
62
|
-
grayColor: grayColor,
|
|
63
66
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
64
67
|
className: "valueMetric",
|
|
65
68
|
children: metric
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DisplayValueProps } from '../types';
|
|
3
|
+
import { ProgressBarInterface, PercentBarInterface } from './types';
|
|
4
|
+
export declare const ProgressBar: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: import("react").ElementType<any> | undefined;
|
|
7
|
+
} & ProgressBarInterface, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
export declare const ValueLinear: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
|
+
} & DisplayValueProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const PercentBar: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
} & PercentBarInterface, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Progress/Linear/styles.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,WAAW;;;gIAMvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;6HAiBvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;+HAqBtB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ValueLinear = exports.ProgressBar = exports.PercentBar = void 0;
|
|
7
|
+
|
|
8
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
+
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
|
|
12
|
+
var _colorCheck = require("../../../utils/colorCheck");
|
|
13
|
+
|
|
14
|
+
var _getValuesBySize = require("../../../utils/getValuesBySize");
|
|
15
|
+
|
|
16
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
22
|
+
var ProgressBar = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n background-color: ", ";\n height: ", "px;\n border-radius: 10px;\n overflow: hidden;\n"])), function (_ref) {
|
|
23
|
+
var theme = _ref.theme;
|
|
24
|
+
return theme.colors.neutral.neutral1;
|
|
25
|
+
}, function (_ref2) {
|
|
26
|
+
var height = _ref2.height;
|
|
27
|
+
return (0, _getValuesBySize.getValuesBySize)({
|
|
28
|
+
sm: 8,
|
|
29
|
+
md: 16,
|
|
30
|
+
lg: 24
|
|
31
|
+
}, height);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
exports.ProgressBar = ProgressBar;
|
|
35
|
+
|
|
36
|
+
var ValueLinear = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "px;\n display: flex;\n font-weight: bolder;\n font-size: ", "px;\n align-items: center;\n\n .valueMetric {\n color: ", ";\n }\n\n .metric {\n font-size: ", "px;\n\n color: ", ";\n }\n padding-left: 10px;\n"])), function (_ref3) {
|
|
37
|
+
var height = _ref3.height;
|
|
38
|
+
return (0, _getValuesBySize.getValuesBySize)({
|
|
39
|
+
sm: 20,
|
|
40
|
+
md: 30,
|
|
41
|
+
lg: 50
|
|
42
|
+
}, height);
|
|
43
|
+
}, function (_ref4) {
|
|
44
|
+
var height = _ref4.height;
|
|
45
|
+
return (0, _getValuesBySize.getValuesBySize)({
|
|
46
|
+
sm: 10,
|
|
47
|
+
md: 16,
|
|
48
|
+
lg: 24
|
|
49
|
+
}, height);
|
|
50
|
+
}, function (_ref5) {
|
|
51
|
+
var theme = _ref5.theme;
|
|
52
|
+
return theme.colors.neutral.black;
|
|
53
|
+
}, function (_ref6) {
|
|
54
|
+
var height = _ref6.height;
|
|
55
|
+
return (0, _getValuesBySize.getValuesBySize)({
|
|
56
|
+
sm: 10,
|
|
57
|
+
md: 11,
|
|
58
|
+
lg: 12
|
|
59
|
+
}, height);
|
|
60
|
+
}, function (_ref7) {
|
|
61
|
+
var theme = _ref7.theme;
|
|
62
|
+
return theme.colors.neutral.neutral5;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
exports.ValueLinear = ValueLinear;
|
|
66
|
+
|
|
67
|
+
var PercentBar = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", ";\n\n width: ", "%;\n max-width: 100%;\n height: 100%;\n border-radius: 8px;\n transition: ", ";\n"])), function (_ref8) {
|
|
68
|
+
var color = _ref8.color,
|
|
69
|
+
theme = _ref8.theme;
|
|
70
|
+
return color && Array.isArray(color) ? (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n 270deg,\n ", " 0.81%,\n ", " 100%\n );\n "])), (0, _colorCheck.stripThemeColors)(color[1], theme.colors) || color[1], (0, _colorCheck.stripThemeColors)(color[0], theme.colors) || color[0]) : (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: ", ";\n "])), color ? (0, _colorCheck.stripThemeColors)(color, theme.colors) || color : theme.colors.primary.default);
|
|
71
|
+
}, function (_ref9) {
|
|
72
|
+
var percent = _ref9.percent;
|
|
73
|
+
return percent;
|
|
74
|
+
}, function (_ref10) {
|
|
75
|
+
var isAnimated = _ref10.isAnimated;
|
|
76
|
+
return isAnimated ? 'width 1s ease' : '';
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
exports.PercentBar = PercentBar;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ProgressBarInterface {
|
|
2
|
+
height?: string;
|
|
3
|
+
}
|
|
4
|
+
export interface PercentBarInterface {
|
|
5
|
+
percent: number;
|
|
6
|
+
isAnimated?: boolean;
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type ProgressComponent = PercentBarInterface & {
|
|
10
|
+
type?: 'linear' | 'circle';
|
|
11
|
+
height?: 'sm' | 'md' | 'lg';
|
|
12
|
+
size?: number;
|
|
13
|
+
stroke?: number;
|
|
14
|
+
circleBody?: boolean;
|
|
15
|
+
showValue?: string;
|
|
16
|
+
steps?: number;
|
|
17
|
+
};
|
|
18
|
+
export interface Linear {
|
|
19
|
+
height?: string;
|
|
20
|
+
percent: number;
|
|
21
|
+
isAnimated?: boolean;
|
|
22
|
+
color?: string;
|
|
23
|
+
steps?: number;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Progress/Linear/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,iBAAiB,GAAG,mBAAmB,GAAG;IACpD,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ProgressComponent } from './
|
|
3
|
-
export declare function Progress({
|
|
2
|
+
import { ProgressComponent } from './Linear/types';
|
|
3
|
+
export declare function Progress({ height, size, stroke, circleBody, type, ...props }: ProgressComponent): JSX.Element;
|
|
4
4
|
export default Progress;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,eAM/F;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -6,69 +6,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Progress = Progress;
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
|
|
11
|
-
var _colorToGray = require("../../utils/colorToGray");
|
|
12
|
-
|
|
13
9
|
var _Circle = require("./Circle");
|
|
14
10
|
|
|
15
11
|
var _Linear = require("./Linear");
|
|
16
12
|
|
|
17
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
var _excluded = ["height", "size", "stroke", "circleBody", "type"];
|
|
20
16
|
|
|
21
|
-
function
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
18
|
|
|
23
|
-
function
|
|
19
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
20
|
|
|
25
|
-
function
|
|
21
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
22
|
|
|
27
|
-
function
|
|
23
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
28
24
|
|
|
29
|
-
function
|
|
25
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
30
26
|
|
|
31
27
|
function Progress(_ref) {
|
|
32
|
-
var
|
|
33
|
-
percent = _ref.percent,
|
|
34
|
-
height = _ref.height,
|
|
35
|
-
isAnimated = _ref.isAnimated,
|
|
36
|
-
color = _ref.color,
|
|
28
|
+
var height = _ref.height,
|
|
37
29
|
size = _ref.size,
|
|
38
30
|
stroke = _ref.stroke,
|
|
39
31
|
circleBody = _ref.circleBody,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var _useState = (0, _react.useState)(),
|
|
44
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
grayColor = _useState2[0],
|
|
46
|
-
setGrayColor = _useState2[1];
|
|
32
|
+
type = _ref.type,
|
|
33
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
47
34
|
|
|
48
|
-
(0,
|
|
49
|
-
if (color) {
|
|
50
|
-
setGrayColor((0, _colorToGray.convertColor)(color));
|
|
51
|
-
}
|
|
52
|
-
}, [color]);
|
|
53
|
-
return type === 'circle' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Circle.CircleProgress, {
|
|
54
|
-
percent: percent,
|
|
55
|
-
size: size,
|
|
56
|
-
isAnimated: isAnimated,
|
|
57
|
-
color: color,
|
|
58
|
-
grayColor: grayColor,
|
|
59
|
-
stroke: stroke,
|
|
35
|
+
return type === 'circle' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Circle.CircleProgress, _objectSpread(_objectSpread({}, props), {}, {
|
|
60
36
|
circleBody: circleBody,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Linear.LinearProgress, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
isAnimated: isAnimated,
|
|
67
|
-
color: color,
|
|
68
|
-
grayColor: grayColor,
|
|
69
|
-
showValue: showValue,
|
|
70
|
-
steps: steps
|
|
71
|
-
});
|
|
37
|
+
stroke: stroke,
|
|
38
|
+
size: size
|
|
39
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Linear.LinearProgress, _objectSpread(_objectSpread({}, props), {}, {
|
|
40
|
+
height: height
|
|
41
|
+
}));
|
|
72
42
|
}
|
|
73
43
|
|
|
74
44
|
var _default = Progress;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface DisplayValueProps {
|
|
2
|
+
height?: string;
|
|
3
|
+
size?: number;
|
|
4
|
+
colorMode?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type ArrayColor = [number, number, number];
|
|
7
|
+
export interface objectGray {
|
|
8
|
+
neutral1: ArrayColor;
|
|
9
|
+
neutral2: ArrayColor;
|
|
10
|
+
neutral3: ArrayColor;
|
|
11
|
+
neutral4: ArrayColor;
|
|
12
|
+
neutral5: ArrayColor;
|
|
13
|
+
neutral6: ArrayColor;
|
|
14
|
+
black: ArrayColor;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAClD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAOpB,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAOpB,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,QAAA,MAAM,MAAM,kJAkNX,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
|
@@ -152,6 +152,20 @@ var Select = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
152
152
|
setHeightModal((_optionsModalRef$curr2 = optionsModalRef.current) === null || _optionsModalRef$curr2 === void 0 ? void 0 : _optionsModalRef$curr2.getBoundingClientRect().height);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
(0, _react.useEffect)(function () {
|
|
156
|
+
var modalParent = document.querySelector('[data-scroll=dispatch-scroll]');
|
|
157
|
+
|
|
158
|
+
var handler = function handler() {
|
|
159
|
+
if (optionsMenuOpen) {
|
|
160
|
+
setOptionsMenuOpen(false);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
modalParent === null || modalParent === void 0 ? void 0 : modalParent.addEventListener('scroll', handler);
|
|
165
|
+
return function () {
|
|
166
|
+
return modalParent === null || modalParent === void 0 ? void 0 : modalParent.removeEventListener('scroll', handler);
|
|
167
|
+
};
|
|
168
|
+
}, [optionsMenuOpen]);
|
|
155
169
|
(0, _react.useEffect)(function () {
|
|
156
170
|
document.addEventListener('click', function () {
|
|
157
171
|
return setOptionsMenuOpen(false);
|
|
@@ -64,6 +64,7 @@ var TabsExample = function TabsExample(_ref) {
|
|
|
64
64
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.TabPanel, {
|
|
65
65
|
value: currentTab,
|
|
66
66
|
index: 2,
|
|
67
|
+
noPadding: true,
|
|
67
68
|
children: "Item 2 content"
|
|
68
69
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.TabPanel, {
|
|
69
70
|
value: currentTab,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"TabPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,cAAc,CAavC,CAAC"}
|
|
@@ -12,13 +12,15 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
12
12
|
var TabPanel = function TabPanel(_ref) {
|
|
13
13
|
var children = _ref.children,
|
|
14
14
|
index = _ref.index,
|
|
15
|
-
value = _ref.value
|
|
15
|
+
value = _ref.value,
|
|
16
|
+
noPadding = _ref.noPadding;
|
|
16
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TabPanelContainer, {
|
|
17
18
|
id: "simple-tabpanel-".concat(index),
|
|
18
19
|
hidden: Number(value) !== Number(index),
|
|
19
20
|
role: "tabpanel",
|
|
20
21
|
"aria-labelledby": "simple-tabpanel-".concat(index),
|
|
21
22
|
children: Number(value) === Number(index) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TabPanelWrapper, {
|
|
23
|
+
noPadding: noPadding,
|
|
22
24
|
children: children
|
|
23
25
|
})
|
|
24
26
|
});
|
|
@@ -22,6 +22,8 @@ export declare const TabButtonIcon: import("@emotion/styled").StyledComponent<{
|
|
|
22
22
|
export declare const TabPanelWrapper: import("@emotion/styled").StyledComponent<{
|
|
23
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
24
|
as?: import("react").ElementType<any> | undefined;
|
|
25
|
+
} & {
|
|
26
|
+
noPadding?: boolean | undefined;
|
|
25
27
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
28
|
export declare const TabLoadingSkeleton: import("@emotion/styled").StyledComponent<{
|
|
27
29
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;yGAiBzB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;qHAoErB,CAAC;AAEF,eAAO,MAAM,aAAa;;;2GAGzB,CAAC;AAEF,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;yGAiBzB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;qHAoErB,CAAC;AAEF,eAAO,MAAM,aAAa;;;2GAGzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;yGAI3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;6HAgC9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;YACpB,OAAO;yGAGhB,CAAC;AAEF,eAAO,MAAM,YAAY;;;iNAqBvB,CAAC"}
|
|
@@ -48,7 +48,9 @@ var TabButtonIcon = _styled.default.span(_templateObject2 || (_templateObject2 =
|
|
|
48
48
|
|
|
49
49
|
exports.TabButtonIcon = TabButtonIcon;
|
|
50
50
|
|
|
51
|
-
var TabPanelWrapper = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding:
|
|
51
|
+
var TabPanelWrapper = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n"])), function (props) {
|
|
52
|
+
return props.noPadding ? 0 : 20;
|
|
53
|
+
});
|
|
52
54
|
|
|
53
55
|
exports.TabPanelWrapper = TabPanelWrapper;
|
|
54
56
|
|
|
@@ -32,6 +32,7 @@ export declare type ITabProps = HTMLAttributes<HTMLButtonElement> & {
|
|
|
32
32
|
export declare type ITabPanelProps = HTMLAttributes<HTMLDivElement> & {
|
|
33
33
|
value: string | number;
|
|
34
34
|
index: string | number;
|
|
35
|
+
noPadding?: boolean;
|
|
35
36
|
};
|
|
36
37
|
export declare type GenericThemeProps = {
|
|
37
38
|
theme?: ExtendThemeProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE,OA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GAAG;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -44,5 +44,11 @@ export { default as Radio } from './components/RadioInput';
|
|
|
44
44
|
export { default as Switch } from './components/Switch';
|
|
45
45
|
export { default as useToast } from './components/Toast/hooks/useToast';
|
|
46
46
|
export { default as ToastProvider } from './components/Toast/contexts/ToastProvider';
|
|
47
|
+
export { useDevices } from './shared/hooks/useDevices';
|
|
48
|
+
export { useBreakpoints } from './shared/hooks/useBreakpoints';
|
|
49
|
+
export { useDisableBodyScroll } from './shared/hooks/useDisableBodyScroll';
|
|
50
|
+
export { useKeyPress } from './shared/hooks/useKeyPress';
|
|
51
|
+
export { useOnClickOutside } from './shared/hooks/useOnClickOutside';
|
|
52
|
+
export { useWindowSize } from './shared/hooks/useWindowSize';
|
|
47
53
|
export * from './shared/theme';
|
|
48
54
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EA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AE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,13 @@ var _exportNames = {
|
|
|
46
46
|
Radio: true,
|
|
47
47
|
Switch: true,
|
|
48
48
|
useToast: true,
|
|
49
|
-
ToastProvider: true
|
|
49
|
+
ToastProvider: true,
|
|
50
|
+
useDevices: true,
|
|
51
|
+
useBreakpoints: true,
|
|
52
|
+
useDisableBodyScroll: true,
|
|
53
|
+
useKeyPress: true,
|
|
54
|
+
useOnClickOutside: true,
|
|
55
|
+
useWindowSize: true
|
|
50
56
|
};
|
|
51
57
|
Object.defineProperty(exports, "Alert", {
|
|
52
58
|
enumerable: true,
|
|
@@ -300,12 +306,48 @@ Object.defineProperty(exports, "Typography", {
|
|
|
300
306
|
return _Typography.default;
|
|
301
307
|
}
|
|
302
308
|
});
|
|
309
|
+
Object.defineProperty(exports, "useBreakpoints", {
|
|
310
|
+
enumerable: true,
|
|
311
|
+
get: function get() {
|
|
312
|
+
return _useBreakpoints.useBreakpoints;
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
Object.defineProperty(exports, "useDevices", {
|
|
316
|
+
enumerable: true,
|
|
317
|
+
get: function get() {
|
|
318
|
+
return _useDevices.useDevices;
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
Object.defineProperty(exports, "useDisableBodyScroll", {
|
|
322
|
+
enumerable: true,
|
|
323
|
+
get: function get() {
|
|
324
|
+
return _useDisableBodyScroll.useDisableBodyScroll;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
Object.defineProperty(exports, "useKeyPress", {
|
|
328
|
+
enumerable: true,
|
|
329
|
+
get: function get() {
|
|
330
|
+
return _useKeyPress.useKeyPress;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
Object.defineProperty(exports, "useOnClickOutside", {
|
|
334
|
+
enumerable: true,
|
|
335
|
+
get: function get() {
|
|
336
|
+
return _useOnClickOutside.useOnClickOutside;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
303
339
|
Object.defineProperty(exports, "useToast", {
|
|
304
340
|
enumerable: true,
|
|
305
341
|
get: function get() {
|
|
306
342
|
return _useToast.default;
|
|
307
343
|
}
|
|
308
344
|
});
|
|
345
|
+
Object.defineProperty(exports, "useWindowSize", {
|
|
346
|
+
enumerable: true,
|
|
347
|
+
get: function get() {
|
|
348
|
+
return _useWindowSize.useWindowSize;
|
|
349
|
+
}
|
|
350
|
+
});
|
|
309
351
|
|
|
310
352
|
var _Alert = _interopRequireDefault(require("./components/Alert"));
|
|
311
353
|
|
|
@@ -421,6 +463,18 @@ var _useToast = _interopRequireDefault(require("./components/Toast/hooks/useToas
|
|
|
421
463
|
|
|
422
464
|
var _ToastProvider = _interopRequireDefault(require("./components/Toast/contexts/ToastProvider"));
|
|
423
465
|
|
|
466
|
+
var _useDevices = require("./shared/hooks/useDevices");
|
|
467
|
+
|
|
468
|
+
var _useBreakpoints = require("./shared/hooks/useBreakpoints");
|
|
469
|
+
|
|
470
|
+
var _useDisableBodyScroll = require("./shared/hooks/useDisableBodyScroll");
|
|
471
|
+
|
|
472
|
+
var _useKeyPress = require("./shared/hooks/useKeyPress");
|
|
473
|
+
|
|
474
|
+
var _useOnClickOutside = require("./shared/hooks/useOnClickOutside");
|
|
475
|
+
|
|
476
|
+
var _useWindowSize = require("./shared/hooks/useWindowSize");
|
|
477
|
+
|
|
424
478
|
var _theme = require("./shared/theme");
|
|
425
479
|
|
|
426
480
|
Object.keys(_theme).forEach(function (key) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const devices: {
|
|
2
|
+
mobile: number;
|
|
3
|
+
tablet: number;
|
|
4
|
+
'monitor-small': number;
|
|
5
|
+
'monitor-wide': number;
|
|
6
|
+
'monitor-ultra': number;
|
|
7
|
+
};
|
|
8
|
+
export declare type DeviceTypes = 'mobile' | 'tablet' | 'monitor-small' | 'monitor-wide' | 'monitor-ultra' | number;
|
|
9
|
+
//# sourceMappingURL=devices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/devices.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC;AAEF,oBAAY,WAAW,GACnB,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,cAAc,GACd,eAAe,GACf,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.devices = void 0;
|
|
7
|
+
var devices = {
|
|
8
|
+
mobile: 425,
|
|
9
|
+
tablet: 768,
|
|
10
|
+
'monitor-small': 1024,
|
|
11
|
+
'monitor-wide': 1440,
|
|
12
|
+
'monitor-ultra': 2560
|
|
13
|
+
};
|
|
14
|
+
exports.devices = devices;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
declare type BreakpointsConfig = {
|
|
3
|
+
base: number;
|
|
4
|
+
sm: number;
|
|
5
|
+
md: number;
|
|
6
|
+
lg: number;
|
|
7
|
+
xl: number;
|
|
8
|
+
xxl: number;
|
|
9
|
+
};
|
|
10
|
+
declare type BreakpointName = 'base' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
11
|
+
declare type BreakpointValue = {
|
|
12
|
+
[key in BreakpointName]?: ReactNode | string | number | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* It returns a function that takes a breakpoint value object and returns the value
|
|
16
|
+
* of the closest breakpoint to the current window size
|
|
17
|
+
* @param {BreakpointsConfig} [breakpointsConfig] - This is an optional parameter
|
|
18
|
+
* that allows you to pass in your own breakpoints.
|
|
19
|
+
* @returns a `breakpointPicker` function, which receives an object with breakpoint keys and values.
|
|
20
|
+
* @example const flexDirection = breapointPicker({ sm: 'column', lg: 'row' });
|
|
21
|
+
*/
|
|
22
|
+
export declare const useBreakpoints: (breakpointsConfig?: BreakpointsConfig | undefined) => {
|
|
23
|
+
breakpointPicker: (breakpointValues: BreakpointValue) => ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=useBreakpoints.d.ts.map
|