1mpacto-react-ui 2.0.23 → 2.0.25
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/assets/_mixins.scss +72 -72
- package/dist/assets/icons/arrow-narrow-down.svg +3 -3
- package/dist/components/Button/Button.cjs +12 -12
- package/dist/components/Button/Button.mjs +24 -24
- package/dist/components/ButtonIcon/ButtonIcon.cjs +12 -12
- package/dist/components/ButtonIcon/ButtonIcon.mjs +20 -20
- package/dist/components/Calendar/CalendarYear.cjs +2 -2
- package/dist/components/Calendar/CalendarYear.mjs +2 -2
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.mjs +126 -107
- package/dist/components/Upload/UploadImage.cjs +12 -12
- package/dist/components/Upload/UploadImage.mjs +28 -28
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.d.ts +127 -128
- package/dist/package.json.mjs +1 -1
- package/dist/src/interfaces/components/Chart/index.d.ts +10 -0
- package/dist/src/interfaces/components/Tabs/index.d.ts +1 -1
- package/dist/types-external/table.d.ts +15 -15
- package/package.json +127 -128
package/dist/assets/_mixins.scss
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'sass:list';
|
|
3
|
-
|
|
4
|
-
@mixin ring($width: 1px, $color: 'transparent', $inset: 0, $important: 0) {
|
|
5
|
-
$ring-style: 0 0 0 $width $color;
|
|
6
|
-
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
7
|
-
|
|
8
|
-
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@mixin ring-left($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
12
|
-
$ring-style: (-$width) 0 0 $color;
|
|
13
|
-
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
14
|
-
|
|
15
|
-
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@mixin ring-top($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
19
|
-
$ring-style: 0 (-$width) 0 $color;
|
|
20
|
-
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
21
|
-
|
|
22
|
-
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@mixin ring-right($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
26
|
-
$ring-style: $width 0 0 $color;
|
|
27
|
-
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
28
|
-
|
|
29
|
-
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@mixin ring-bottom($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
33
|
-
$ring-style: 0 $width 0 $color;
|
|
34
|
-
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
35
|
-
|
|
36
|
-
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@function getColor($color-map, $color) {
|
|
40
|
-
@if map.has-key($color-map, $color) {
|
|
41
|
-
@return map.get($color-map, $color);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@return $color;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@mixin getTypography($typo-map, $name, $important: false) {
|
|
48
|
-
@if map.has-key($typo-map, $name) {
|
|
49
|
-
& {
|
|
50
|
-
$values: map.get($typo-map, $name);
|
|
51
|
-
$font-size: list.nth($values, 1);
|
|
52
|
-
$props: list.nth($values, 2);
|
|
53
|
-
$line-height: map.get($props, 'line-height');
|
|
54
|
-
$font-weight: map.get($props, 'font-weight');
|
|
55
|
-
|
|
56
|
-
@if $important {
|
|
57
|
-
font-size: $font-size !important;
|
|
58
|
-
line-height: $line-height !important;
|
|
59
|
-
font-weight: $font-weight !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@else {
|
|
63
|
-
font-size: $font-size;
|
|
64
|
-
line-height: $line-height;
|
|
65
|
-
font-weight: $font-weight;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@else {
|
|
71
|
-
@warn 'Typography "#{$name}" not found in the typography map.';
|
|
72
|
-
}
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:list';
|
|
3
|
+
|
|
4
|
+
@mixin ring($width: 1px, $color: 'transparent', $inset: 0, $important: 0) {
|
|
5
|
+
$ring-style: 0 0 0 $width $color;
|
|
6
|
+
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
7
|
+
|
|
8
|
+
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin ring-left($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
12
|
+
$ring-style: (-$width) 0 0 $color;
|
|
13
|
+
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
14
|
+
|
|
15
|
+
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin ring-top($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
19
|
+
$ring-style: 0 (-$width) 0 $color;
|
|
20
|
+
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
21
|
+
|
|
22
|
+
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin ring-right($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
26
|
+
$ring-style: $width 0 0 $color;
|
|
27
|
+
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
28
|
+
|
|
29
|
+
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin ring-bottom($width: 1px, $color: 'currentColor', $inset: 0, $important: 0) {
|
|
33
|
+
$ring-style: 0 $width 0 $color;
|
|
34
|
+
$shadow: if($inset==1, inset $ring-style, $ring-style);
|
|
35
|
+
|
|
36
|
+
box-shadow: if($important==1, $shadow !important, $shadow);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@function getColor($color-map, $color) {
|
|
40
|
+
@if map.has-key($color-map, $color) {
|
|
41
|
+
@return map.get($color-map, $color);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@return $color;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin getTypography($typo-map, $name, $important: false) {
|
|
48
|
+
@if map.has-key($typo-map, $name) {
|
|
49
|
+
& {
|
|
50
|
+
$values: map.get($typo-map, $name);
|
|
51
|
+
$font-size: list.nth($values, 1);
|
|
52
|
+
$props: list.nth($values, 2);
|
|
53
|
+
$line-height: map.get($props, 'line-height');
|
|
54
|
+
$font-weight: map.get($props, 'font-weight');
|
|
55
|
+
|
|
56
|
+
@if $important {
|
|
57
|
+
font-size: $font-size !important;
|
|
58
|
+
line-height: $line-height !important;
|
|
59
|
+
font-weight: $font-weight !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@else {
|
|
63
|
+
font-size: $font-size;
|
|
64
|
+
line-height: $line-height;
|
|
65
|
+
font-weight: $font-weight;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@else {
|
|
71
|
+
@warn 'Typography "#{$name}" not found in the typography map.';
|
|
72
|
+
}
|
|
73
73
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M10.6673 11.3333L8.00065 14M8.00065 14L5.33398 11.3333M8.00065 14V2" stroke="#CFD8DC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.6673 11.3333L8.00065 14M8.00065 14L5.33398 11.3333M8.00065 14V2" stroke="#CFD8DC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),
|
|
2
|
-
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
3
|
-
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
4
|
-
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
5
|
-
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
6
|
-
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
7
|
-
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
8
|
-
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
9
|
-
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
10
|
-
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
11
|
-
6.79445 20.9604 7.02733 21.6311 6.63315Z`,fill:"currentColor"})}),c=
|
|
12
|
-
${e?
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),s=require("react"),r=require("./style.module.scss.cjs"),a=require("./Button.config.cjs"),p=({className:i=""})=>n.jsx("svg",{className:`${r.default["icon-loading"]} ${i??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:n.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063
|
|
2
|
+
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
3
|
+
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
4
|
+
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
5
|
+
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
6
|
+
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
7
|
+
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
8
|
+
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
9
|
+
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
10
|
+
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
11
|
+
6.79445 20.9604 7.02733 21.6311 6.63315Z`,fill:"currentColor"})}),c=s.forwardRef((i,d)=>{const{size:l="reguler",variants:u="primary-laba-blue-10",startIcon:t=()=>n.jsx(n.Fragment,{}),endIcon:o=()=>n.jsx(n.Fragment,{}),children:C,className:g,classNameIconLoading:m,loading:e,onClick:f,type:h="button",disabled:x,...j}=i;return n.jsxs("button",{onClick:e?void 0:f,ref:d,className:`${a.configButton.size[l]} ${a.configButton.variants[u]}
|
|
12
|
+
${e?r.default.loading:""} ${g??""}`,type:h,disabled:x??e,...j,children:[!e&&n.jsxs(n.Fragment,{children:[typeof t=="function"&&t(),s.isValidElement(t)&&t]}),e&&n.jsx(p,{className:`${a.configButton.loadingSize[l]} ${m}`}),C,!e&&n.jsxs(n.Fragment,{children:[typeof o=="function"&&o(),s.isValidElement(o)&&o]})]})});c.displayName="Button";exports.default=c;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
1
|
+
import { jsx as o, Fragment as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as b, isValidElement as c } from "react";
|
|
3
3
|
import d from "./style.module.scss.mjs";
|
|
4
4
|
import { configButton as l } from "./Button.config.mjs";
|
|
5
|
-
const v = ({ className:
|
|
5
|
+
const v = ({ className: a = "" }) => /* @__PURE__ */ o(
|
|
6
6
|
"svg",
|
|
7
7
|
{
|
|
8
|
-
className: `${d["icon-loading"]} ${
|
|
8
|
+
className: `${d["icon-loading"]} ${a ?? ""}`,
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
10
|
width: "25",
|
|
11
11
|
height: "24",
|
|
@@ -14,27 +14,27 @@ const v = ({ className: e = "" }) => /* @__PURE__ */ o(
|
|
|
14
14
|
children: /* @__PURE__ */ o(
|
|
15
15
|
"path",
|
|
16
16
|
{
|
|
17
|
-
d: `M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063
|
|
18
|
-
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
19
|
-
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
20
|
-
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
21
|
-
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
22
|
-
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
23
|
-
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
24
|
-
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
25
|
-
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
26
|
-
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
17
|
+
d: `M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063
|
|
18
|
+
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
19
|
+
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
20
|
+
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
21
|
+
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
22
|
+
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
23
|
+
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
24
|
+
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
25
|
+
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
26
|
+
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
27
27
|
6.79445 20.9604 7.02733 21.6311 6.63315Z`,
|
|
28
28
|
fill: "currentColor"
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
}
|
|
32
|
-
), y = b((
|
|
32
|
+
), y = b((a, C) => {
|
|
33
33
|
const {
|
|
34
34
|
size: s = "reguler",
|
|
35
35
|
variants: m = "primary-laba-blue-10",
|
|
36
|
-
startIcon:
|
|
37
|
-
endIcon:
|
|
36
|
+
startIcon: t = () => /* @__PURE__ */ o(e, {}),
|
|
37
|
+
endIcon: i = () => /* @__PURE__ */ o(e, {}),
|
|
38
38
|
children: f,
|
|
39
39
|
className: g,
|
|
40
40
|
classNameIconLoading: p,
|
|
@@ -43,8 +43,8 @@ const v = ({ className: e = "" }) => /* @__PURE__ */ o(
|
|
|
43
43
|
type: h = "button",
|
|
44
44
|
disabled: $,
|
|
45
45
|
...w
|
|
46
|
-
} =
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
} = a;
|
|
47
|
+
return /* @__PURE__ */ r(
|
|
48
48
|
"button",
|
|
49
49
|
{
|
|
50
50
|
onClick: n ? void 0 : u,
|
|
@@ -55,15 +55,15 @@ const v = ({ className: e = "" }) => /* @__PURE__ */ o(
|
|
|
55
55
|
disabled: $ ?? n,
|
|
56
56
|
...w,
|
|
57
57
|
children: [
|
|
58
|
-
!n && /* @__PURE__ */
|
|
59
|
-
typeof
|
|
60
|
-
c(
|
|
58
|
+
!n && /* @__PURE__ */ r(e, { children: [
|
|
59
|
+
typeof t == "function" && t(),
|
|
60
|
+
c(t) && t
|
|
61
61
|
] }),
|
|
62
62
|
n && /* @__PURE__ */ o(v, { className: `${l.loadingSize[s]} ${p}` }),
|
|
63
63
|
f,
|
|
64
|
-
!n && /* @__PURE__ */
|
|
65
|
-
typeof
|
|
66
|
-
c(
|
|
64
|
+
!n && /* @__PURE__ */ r(e, { children: [
|
|
65
|
+
typeof i == "function" && i(),
|
|
66
|
+
c(i) && i
|
|
67
67
|
] })
|
|
68
68
|
]
|
|
69
69
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),h=require("react"),
|
|
2
|
-
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
3
|
-
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
4
|
-
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
5
|
-
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
6
|
-
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
7
|
-
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
8
|
-
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
9
|
-
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
10
|
-
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
11
|
-
6.79445 20.9604 7.02733 21.6311 6.63315Z`,fill:"currentColor"})}),
|
|
12
|
-
${n?
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),h=require("react"),s=require("./style.module.scss.cjs"),t=require("./ButtonIcon.config.cjs"),b=({className:o=""})=>e.jsx("svg",{className:`${s.default["icon-loading"]} ${o??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:e.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063
|
|
2
|
+
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
3
|
+
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
4
|
+
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
5
|
+
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
6
|
+
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
7
|
+
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
8
|
+
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
9
|
+
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
10
|
+
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
11
|
+
6.79445 20.9604 7.02733 21.6311 6.63315Z`,fill:"currentColor"})}),a=h.forwardRef((o,l)=>{const{size:i="reguler",variants:r="primary-laba-blue-10",children:c,className:u,classNameIconLoading:d,loading:n,onClick:C,type:g="button",disabled:f,...m}=o;return e.jsxs("button",{onClick:n?void 0:C,ref:l,className:`${t.configButton.size[i]} ${t.configButton.variants[r]}
|
|
12
|
+
${n?s.default.loading:""} ${u??""}`,type:g,disabled:f??n,...m,children:[n&&e.jsx(b,{className:`${t.configButton.loadingSize[i]} ${d}`}),c]})});a.displayName="ButtonIcon";exports.default=a;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { configButton as
|
|
5
|
-
const h = ({ className: o = "" }) => /* @__PURE__ */
|
|
3
|
+
import r from "./style.module.scss.mjs";
|
|
4
|
+
import { configButton as i } from "./ButtonIcon.config.mjs";
|
|
5
|
+
const h = ({ className: o = "" }) => /* @__PURE__ */ t(
|
|
6
6
|
"svg",
|
|
7
7
|
{
|
|
8
|
-
className: `${
|
|
8
|
+
className: `${r["icon-loading"]} ${o ?? ""}`,
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
10
|
width: "25",
|
|
11
11
|
height: "24",
|
|
12
12
|
viewBox: "0 0 25 24",
|
|
13
13
|
fill: "none",
|
|
14
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ t(
|
|
15
15
|
"path",
|
|
16
16
|
{
|
|
17
|
-
d: `M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063
|
|
18
|
-
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
19
|
-
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
20
|
-
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
21
|
-
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
22
|
-
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
23
|
-
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
24
|
-
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
25
|
-
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
26
|
-
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
17
|
+
d: `M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063
|
|
18
|
+
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629
|
|
19
|
+
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861
|
|
20
|
+
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514
|
|
21
|
+
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731
|
|
22
|
+
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543
|
|
23
|
+
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776
|
|
24
|
+
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858
|
|
25
|
+
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607
|
|
26
|
+
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049
|
|
27
27
|
6.79445 20.9604 7.02733 21.6311 6.63315Z`,
|
|
28
28
|
fill: "currentColor"
|
|
29
29
|
}
|
|
@@ -31,7 +31,7 @@ const h = ({ className: o = "" }) => /* @__PURE__ */ i(
|
|
|
31
31
|
}
|
|
32
32
|
), $ = f((o, e) => {
|
|
33
33
|
const {
|
|
34
|
-
size:
|
|
34
|
+
size: a = "reguler",
|
|
35
35
|
variants: s = "primary-laba-blue-10",
|
|
36
36
|
children: l,
|
|
37
37
|
className: C,
|
|
@@ -47,13 +47,13 @@ const h = ({ className: o = "" }) => /* @__PURE__ */ i(
|
|
|
47
47
|
{
|
|
48
48
|
onClick: n ? void 0 : d,
|
|
49
49
|
ref: e,
|
|
50
|
-
className: `${
|
|
51
|
-
${n ?
|
|
50
|
+
className: `${i.size[a]} ${i.variants[s]}
|
|
51
|
+
${n ? r.loading : ""} ${C ?? ""}`,
|
|
52
52
|
type: m,
|
|
53
53
|
disabled: g ?? n,
|
|
54
54
|
...p,
|
|
55
55
|
children: [
|
|
56
|
-
n && /* @__PURE__ */
|
|
56
|
+
n && /* @__PURE__ */ t(h, { className: `${i.loadingSize[a]} ${c}` }),
|
|
57
57
|
l
|
|
58
58
|
]
|
|
59
59
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),y=require("react"),c=require("./style.module.scss.cjs"),m=({className:o})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:`iru-h-4 iru-w-4 iru-text-blue-700 ${o??""}`,viewBox:"0 0 512 512",children:n.jsx("path",{d:`M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8
|
|
2
|
-
0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),y=require("react"),c=require("./style.module.scss.cjs"),m=({className:o})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:`iru-h-4 iru-w-4 iru-text-blue-700 ${o??""}`,viewBox:"0 0 512 512",children:n.jsx("path",{d:`M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8
|
|
2
|
+
0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3
|
|
3
3
|
0s-12.5 32.8 0 45.3l192 192z`})}),b=({title:o,state:a,type:l,setUpYear:t={startYear:1970,endAfterThisYear:20},hiddenHeader:h,setActiveTypeCalendar:i,onChangeYear:u})=>{const x=(r,e)=>{const s=a.focusedDate.set({year:r});e?(i("month"),a.setFocusedDate(s)):!e&&typeof u=="function"&&u(s)},g=(r,e,s)=>Array.from({length:(e-r)/s+1},(f,d)=>r+d*s);return y.useEffect(()=>{const r=document.getElementById(`calendar-year-${a.focusedDate.year}`),e=document.getElementById("wrapper-calendar-year");r&&e&&e.scrollTo({behavior:"instant",top:r.offsetTop-93})},[]),n.jsxs("div",{className:`iru-w-[296px] ${c.default["container-calendar"]}`,children:[!h&&n.jsx("div",{className:`${c.default["header-calendar"]} iru-my-2`,children:n.jsxs("div",{className:`${c.default["header-button-calendar"]} ${l.includes("date")||l.includes("month")?"":c.default.disabled}`,onClick:()=>{l.includes("date")?i("date"):l.includes("month")&&i("month")},children:[o," ",(l.includes("date")||l.includes("month"))&&n.jsx(m,{})]})}),n.jsx("div",{id:"wrapper-calendar-year",className:c.default["year-calendar"],children:g(t?.startYear,new Date().getFullYear()+t.endAfterThisYear,1).map(r=>{const e=Number(r),s=a?.minValue?e<a?.minValue?.year:!1,f=a?.maxValue?e>a?.maxValue?.year:!1,d=s||f;return n.jsx("div",{id:`calendar-year-${r}`,onClick:()=>{d||x(e,l.includes("month"))},className:`${c.default["cell-year"]} ${a.focusedDate.year===e&&!d?c.default.selected:""} ${a.focusedDate.year!==e&&!d?"hover:iru-bg-laba-blue-01":""} ${d?"iru-text-gray-400":"iru-cursor-pointer"}`,children:r},r)})})]})};exports.ChevronDownIcon=m;exports.default=b;
|
|
@@ -11,8 +11,8 @@ const $ = ({ className: d }) => /* @__PURE__ */ o(
|
|
|
11
11
|
children: /* @__PURE__ */ o(
|
|
12
12
|
"path",
|
|
13
13
|
{
|
|
14
|
-
d: `M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8
|
|
15
|
-
0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3
|
|
14
|
+
d: `M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8
|
|
15
|
+
0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3
|
|
16
16
|
0s-12.5 32.8 0 45.3l192 192z`
|
|
17
17
|
}
|
|
18
18
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("react/jsx-runtime"),v=require("chart.js"),h=require("react"),T=require("react-chartjs-2"),M=require("../../utils/common.cjs"),k=require("../PortalComponent/PortalComponent.cjs");v.Chart.register(v.ArcElement,v.Tooltip);const O=(t,n,e)=>{const a=n>0?t/n*100:0;switch(e){case"decimal":return M.formatNumber(t,"decimal");case"currency":return M.formatNumber(t,"currency");default:return`${Math.round(a)}%`}},D=()=>{const t=Math.floor(Math.random()*360),n=60+Math.floor(Math.random()*30),e=45+Math.floor(Math.random()*20);return((s,r,o)=>{r/=100,o/=100;const l=r*Math.min(o,1-o),u=d=>{const i=(d+s/30)%12,c=o-l*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*c).toString(16).padStart(2,"0")};return`#${u(0)}${u(8)}${u(4)}`})(t,n,e)},q=(t,n)=>Array.isArray(t)?t[n]||D():typeof t=="string"?t:D(),P=t=>t!=="data"&&t.startsWith("data"),B=t=>{const n=t.data?.length??0;return Object.keys(t).filter(e=>{const a=t[e];return P(e)&&Array.isArray(a)&&a.length===n})},j=(t,n,e)=>n.reduce((a,s)=>{const r=t[s];return Array.isArray(r)&&(a[s]=r[e]),a},{}),E=t=>Object.keys(t[0]??{}).filter(P).reduce((e,a)=>(e[a]=t.map(s=>s[a]),e),{}),C=(t,n={})=>({labels:t.map(e=>e.label),values:t.map(e=>e.value),colors:t.map(e=>e.backgroundColor||D()),extraDatasetData:E(t),mergedMap:n}),K=t=>{const n=t.labels??[],e=t.datasets[0];if(!e)return[];const a=e.data??[],s=B(e);return a.map((r,o)=>({label:n[o]??"",value:r,backgroundColor:q(e.backgroundColor,o),...j(e,s,o)}))},R=(t,n)=>{if(!n)return C(t);const{mode:e,value:a,otherLabel:s="Other",otherBackgroundColor:r="#B0BEC5"}=n,o=t.reduce((c,f)=>c+f.value,0),l=[],u=[];let d=0;t.forEach(c=>{(e==="percentage"?c.value/o*100<a:c.value<a)?(d+=c.value,u.push(c)):l.push(c)});const i={};if(d>0){const c=E(u);l.push({...c,label:s,value:d,backgroundColor:r}),i[l.length-1]=u}return C(l,i)},F=(t,n,e)=>({chart:a,tooltip:s})=>{const r={};if(s.opacity===0){t(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!s.dataPoints||s.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const o=a.canvas.getBoundingClientRect();r.left=o.left+window.pageXOffset+s.caretX+"px",r.top=o.top+window.pageYOffset+s.caretY+"px";const l=s.dataPoints[0].dataIndex,u=s.dataPoints[0].dataset,d=s.dataPoints?.[0]?.label??"",i=s.dataPoints?.[0]?.raw??0,c=u.backgroundColor?.[l]??"",f=u.data?.reduce((g,y)=>g+y,0)||1,p=f>0?i/f*100:0,b=Object.keys(u).filter(P),m=j(u,b,l);t({label:d,value:i,percentage:p,formattedValue:O(i,f,n),backgroundColor:typeof c=="string"?c:"#000",mergedItems:e[l]??[],style:r,dataPoints:s.dataPoints,...m})},L=(t,n)=>({id:"pieLabelPlugin",afterDraw(e){const{ctx:a}=e,s=e.getDatasetMeta(0),r=e.data.datasets[0].data.reduce((o,l)=>o+l,0);s.data.forEach((o,l)=>{const d=e.data.datasets[0].data[l]??0;if((r>0?d/r*100:0)<n)return;const{x:c,y:f}=o.tooltipPosition(!1),p=e.data.labels?.[l];a.save(),a.textAlign="center",a.textBaseline="middle",a.fillStyle="#FFFFFF",a.font="bold 10px Inter, sans-serif",a.fillText(p,c||0,(f||0)-6),a.fillText(O(d,r,t),c||0,(f||0)+8),a.restore()})}}),V={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0}},elements:{arc:{hoverOffset:8,borderWidth:0}}},$=({data:t,height:n,classNameContainer:e,id:a,options:s,CustomTooltip:r,threshold:o,valueFormat:l,hideLabelBelowPercentage:u=5})=>{const[d,i]=h.useState({style:{opacity:0,position:"absolute",left:0,top:0},label:"",value:0,percentage:0,formattedValue:"",backgroundColor:"",mergedItems:[],dataPoints:[]}),c=h.useMemo(()=>K(t),[t]),{labels:f,values:p,colors:b,extraDatasetData:m,mergedMap:g}=h.useMemo(()=>R(c,o),[c,o]),y=h.useMemo(()=>({labels:f,datasets:[{...t.datasets[0],...m,data:p,backgroundColor:b,hoverOffset:8,borderWidth:0}]}),[f,p,b,m,t.datasets]),w=h.useMemo(()=>{const A={plugins:{tooltip:{enabled:!r,external:r?({chart:I,tooltip:S})=>F(i,l,g)({chart:I,tooltip:S}):void 0}}};return M.mergeObjects(V,A,s??{})},[s,r,l,g]);return x.jsxs("div",{id:a,className:e,style:{height:n||"300px"},children:[r&&x.jsx(k.default,{selector:"body",children:x.jsx(r,{...d})}),x.jsx(T.Pie,{data:y,options:w,plugins:[L(l,u)]})]})};exports.default=$;
|